mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
v0.7.28
This commit is contained in:
parent
d4a7102c71
commit
af69710736
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hiveteams/collab-bridge",
|
||||
"version": "0.7.27",
|
||||
"version": "0.7.28",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
@ -18,9 +18,8 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"prepublishOnly": "yarn run build:module",
|
||||
"build:module": "yarn run build:types && yarn run build:js",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
|
||||
"build:module": "yarn run build:js",
|
||||
"build:js": "./node_modules/typescript/bin/tsc -p ./tsconfig.json",
|
||||
"watch": "yarn build:js -w",
|
||||
"test": "jest"
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Operation, Range } from 'slate'
|
||||
import { BaseSetNodeOperation, Operation, Range } from 'slate'
|
||||
|
||||
import { CursorData } from '../model'
|
||||
import { toJS } from '../utils'
|
||||
@ -15,7 +15,9 @@ export const setCursor = (
|
||||
|
||||
if (!doc.cursors) doc.cursors = {}
|
||||
|
||||
const newCursor = cursorOps[cursorOps.length - 1]?.newProperties || {}
|
||||
const newCursor =
|
||||
(cursorOps[cursorOps.length - 1] as BaseSetNodeOperation)
|
||||
?.newProperties || {}
|
||||
|
||||
if (selection) {
|
||||
const newCursorData = Object.assign(
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './path'
|
||||
export * from './apply'
|
||||
export * from './convert'
|
||||
export * from './utils'
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Element, Node, Path } from 'slate'
|
||||
import { Element, Path } from 'slate'
|
||||
|
||||
import { SyncValue } from '../model'
|
||||
|
||||
export const isTree = (node: Node): boolean => Boolean(node?.children)
|
||||
export const isTree = (node: Element): boolean => Boolean(node?.children)
|
||||
|
||||
export const getTarget = (doc: SyncValue | Element, path: Path) => {
|
||||
const iterate = (current: any, idx: number) => {
|
||||
|
@ -2,8 +2,12 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": ["./src/**/*"],
|
||||
"compilerOptions": {
|
||||
"target": "es2019",
|
||||
"module": "commonjs",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"composite": true
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user