@dou-ui/editor 0.1.0-alpha.17 → 0.1.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collaboration/binding.js +39 -49
- package/dist/collaboration/binding.js.map +1 -1
- package/dist/collaboration/inline-diff.js +138 -0
- package/dist/collaboration/inline-diff.js.map +1 -0
- package/dist/collaboration/merged-props.js +10 -10
- package/dist/collaboration/merged-props.js.map +1 -1
- package/dist/collaboration/order.js +41 -1
- package/dist/collaboration/order.js.map +1 -1
- package/dist/collaboration/table.js +64 -25
- package/dist/collaboration/table.js.map +1 -1
- package/dist/collaboration/text.js +213 -1
- package/dist/collaboration/text.js.map +1 -1
- package/dist/core/comments.js +85 -3
- package/dist/core/comments.js.map +1 -1
- package/dist/define-block.js +6 -3
- package/dist/define-block.js.map +1 -1
- package/dist/editor.js.map +1 -1
- package/dist/flow/board-block.js.map +1 -1
- package/dist/flow/board-block.vue_vue_type_script_setup_true_lang.js +70 -9
- package/dist/flow/board-block.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/flow/board.js +124 -5
- package/dist/flow/board.js.map +1 -1
- package/dist/flow/index.js +5 -2
- package/dist/flow/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/collaboration/inline-diff.d.ts +9 -0
- package/dist/types/collaboration/order.d.ts +5 -0
- package/dist/types/collaboration/table.d.ts +5 -1
- package/dist/types/collaboration/text.d.ts +20 -0
- package/dist/types/core/comments.d.ts +39 -3
- package/dist/types/define-block.d.ts +16 -4
- package/dist/types/editor.d.ts +9 -1
- package/dist/types/flow/board.d.ts +15 -2
- package/dist/types/flow/index.d.ts +8 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/use-comments.js +2 -2
- package/dist/use-comments.js.map +1 -1
- package/package.json +7 -7
package/dist/types/index.d.ts
CHANGED
|
@@ -234,7 +234,7 @@ export type { EditorComments, EditorContext, EditorEmits, EditorExpose, EditorLi
|
|
|
234
234
|
export { EditorTransaction } from './core/transaction';
|
|
235
235
|
export type { BlockEdge, BlockPatch, BlockPlacement, EditorTransactionMeta, } from './core/transaction';
|
|
236
236
|
export type { BlockChanges } from './core/changes';
|
|
237
|
-
export type { CommentAnchor, CommentRange } from './core/comments';
|
|
237
|
+
export type { BlockCommentAnchor, BlockCommentsSpec, CommentAnchor, CommentRange, } from './core/comments';
|
|
238
238
|
export { editorLocales, useEditorMessages } from './locale';
|
|
239
239
|
export type { EditorMessages, EditorMessagesOverride } from './locale';
|
|
240
240
|
export { filterOptions } from './catalog';
|
package/dist/use-comments.js
CHANGED
|
@@ -83,9 +83,9 @@ function useEditorComments(options) {
|
|
|
83
83
|
if (current && pending.value) setPendingComment(current, null);
|
|
84
84
|
open(null);
|
|
85
85
|
}
|
|
86
|
-
function apply(action) {
|
|
86
|
+
function apply(action, how = {}) {
|
|
87
87
|
const current = view.value;
|
|
88
|
-
if (action.type === "create") {
|
|
88
|
+
if (action.type === "create" && !how.anchored) {
|
|
89
89
|
const range = pending.value;
|
|
90
90
|
if (!current || !range) return;
|
|
91
91
|
anchorComment(current, range, action.thread.id);
|
package/dist/use-comments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-comments.js","names":[],"sources":["../src/use-comments.ts"],"sourcesContent":["import { applyCommentAction, type CommentAction, type CommentThread } from 'dou-ui'\nimport { TextSelection, type EditorState } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\nimport { computed, shallowRef, watch, type ShallowRef } from 'vue'\nimport {\n anchorComment,\n commentAnchors,\n commentsAt,\n commentPlugin,\n setPendingComment,\n unanchorComment,\n type CommentAnchor,\n type CommentRange,\n} from './core/comments'\nimport type { CommentsProvider } from './core/extension'\nimport type { EditorComments, EditorEmits, EditorProps } from './editor'\n\ntype Emit = <K extends keyof EditorEmits>(event: K, ...args: EditorEmits[K]) => void\n\n/** The selected text in a read-only editor, which keeps no selection of its own. */\nfunction domSelection(view: EditorView): CommentRange | null {\n const selection = view.dom.ownerDocument.getSelection()\n if (!selection || selection.isCollapsed || !selection.rangeCount) return null\n const range = selection.getRangeAt(0)\n if (!view.dom.contains(range.startContainer) || !view.dom.contains(range.endContainer))\n return null\n try {\n const from = view.posAtDOM(range.startContainer, range.startOffset)\n const to = view.posAtDOM(range.endContainer, range.endOffset)\n return to > from ? { from, to } : null\n } catch {\n return null\n }\n}\n\n/** Whether a range holds text a thread can be about: not only a divider, not in code. */\nfunction hasText(state: EditorState, range: CommentRange) {\n let text = false\n state.doc.nodesBetween(range.from, range.to, (node) => {\n if (text) return false\n if (!node.isTextblock) return true\n text = !node.type.spec.code && node.content.size > 0\n return false\n })\n return text\n}\n\nexport function useEditorComments(options: {\n props: EditorProps\n emit: Emit\n view: ShallowRef<EditorView | null>\n provider: CommentsProvider | null\n}) {\n const { props, emit, view, provider } = options\n\n const threads = computed<readonly CommentThread[]>(\n () => provider?.threads.value ?? props.comments ?? [],\n )\n const enabled = computed(() => !!provider || props.comments !== undefined)\n const writable = computed(() => enabled.value && !!props.author && props.commentable !== false)\n const known = computed(() => new Set(threads.value.map((thread) => thread.id)))\n\n // the shared document's threads, mirrored to `v-model:comments`\n if (provider)\n watch(provider.threads, (value) => emit('update:comments', [...value]), { immediate: true })\n\n const innerActive = shallowRef<string | null>(null)\n const active = computed(() =>\n props.activeComment === undefined ? innerActive.value : props.activeComment,\n )\n function open(id: string | null) {\n if (id === active.value) return\n innerActive.value = id\n emit('update:activeComment', id)\n }\n\n const pending = shallowRef<CommentRange | null>(null)\n\n function selection(): CommentRange | null {\n const current = view.value\n if (!current) return null\n const range = current.editable\n ? current.state.selection instanceof TextSelection && !current.state.selection.empty\n ? { from: current.state.selection.from, to: current.state.selection.to }\n : null\n : domSelection(current)\n return range && hasText(current.state, range) ? range : null\n }\n\n const focusRequest = shallowRef(0)\n\n /** The open thread the cursor is in, innermost first. */\n function threadAtCursor(): string | null {\n const current = view.value\n if (!current) return null\n const ids = commentsAt(current.state, current.state.selection.from)\n return ids.find((id) => isOpen(id)) ?? null\n }\n\n function start(): boolean {\n const current = view.value\n if (!current || !enabled.value) return false\n const range = selection()\n if (!range) {\n // on commented text: open its thread, ready to reply\n const id = threadAtCursor()\n if (!id) return false\n open(id)\n focusRequest.value++\n return true\n }\n if (!writable.value) return false\n open(null)\n setPendingComment(current, range)\n return true\n }\n\n function close() {\n const current = view.value\n if (current && pending.value) setPendingComment(current, null)\n open(null)\n }\n\n function apply(action: CommentAction) {\n const current = view.value\n if (action.type === 'create') {\n const range = pending.value\n if (!current || !range) return\n anchorComment(current, range, action.thread.id)\n } else if (current && action.type === 'remove') unanchorComment(current, action.threadId)\n if (provider) provider.apply(action)\n else emit('update:comments', applyCommentAction(threads.value, action))\n emit('commentAction', action)\n if (action.type === 'create') {\n open(action.thread.id)\n focusRequest.value++\n } else if (action.type === 'remove' || action.type === 'resolve') open(null)\n }\n\n const isOpen = (id: string) => {\n const thread = threads.value.find((item) => item.id === id)\n return !!thread && !thread.resolved\n }\n\n const plugin = commentPlugin({\n known: () => (enabled.value ? known.value : null),\n onClick: (ids) => {\n if (pending.value && view.value) setPendingComment(view.value, null)\n open(ids.find(isOpen) ?? null)\n },\n // selecting other text (the formatting toolbar shows) closes an open thread\n onSelect: () => {\n if (!pending.value) open(null)\n },\n onPending: (range) => (pending.value = range),\n })\n\n function anchors(): Record<string, CommentAnchor | null> {\n const found = view.value ? commentAnchors(view.value.state.doc) : new Map()\n return Object.fromEntries(\n threads.value.map((thread) => [thread.id, found.get(thread.id) ?? null]),\n )\n }\n\n const comments: EditorComments = {\n enabled,\n writable,\n threads,\n author: computed(() => props.author),\n active,\n pending,\n focusRequest,\n selection,\n start,\n apply,\n open,\n close,\n }\n\n return { comments, plugin, anchors }\n}\n"],"mappings":";;;;;;AAoBA,SAAS,aAAa,MAAuC;CAC3D,MAAM,YAAY,KAAK,IAAI,cAAc,aAAa;CACtD,IAAI,CAAC,aAAa,UAAU,eAAe,CAAC,UAAU,YAAY,OAAO;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AAI,OAAO,OAAO,OAAO;EACzB,YAAY,QAAQ;EACpB,KAAK,wBAAwB,EAAE;CACjC;CAEA,MAAM,UAAU,WAAgC,IAAI;CAEpD,SAAS,YAAiC;EACxC,MAAM,UAAU,KAAK;EACrB,IAAI,CAAC,SAAS,OAAO;EACrB,MAAM,QAAQ,QAAQ,WAClB,QAAQ,MAAM,qBAAqB,iBAAiB,CAAC,QAAQ,MAAM,UAAU,QAC3E;GAAE,MAAM,QAAQ,MAAM,UAAU;GAAM,IAAI,QAAQ,MAAM,UAAU;EAAG,IACrE,OACF,aAAa,OAAO;EACxB,OAAO,SAAS,QAAQ,QAAQ,OAAO,KAAK,IAAI,QAAQ;CAC1D;CAEA,MAAM,eAAe,WAAW,CAAC;;CAGjC,SAAS,iBAAgC;EACvC,MAAM,UAAU,KAAK;EACrB,IAAI,CAAC,SAAS,OAAO;EAErB,OADY,WAAW,QAAQ,OAAO,QAAQ,MAAM,UAAU,IACvD,CAAA,CAAI,MAAM,OAAO,OAAO,EAAE,CAAC,KAAK;CACzC;CAEA,SAAS,QAAiB;EACxB,MAAM,UAAU,KAAK;EACrB,IAAI,CAAC,WAAW,CAAC,QAAQ,OAAO,OAAO;EACvC,MAAM,QAAQ,UAAU;EACxB,IAAI,CAAC,OAAO;GAEV,MAAM,KAAK,eAAe;GAC1B,IAAI,CAAC,IAAI,OAAO;GAChB,KAAK,EAAE;GACP,aAAa;GACb,OAAO;EACT;EACA,IAAI,CAAC,SAAS,OAAO,OAAO;EAC5B,KAAK,IAAI;EACT,kBAAkB,SAAS,KAAK;EAChC,OAAO;CACT;CAEA,SAAS,QAAQ;EACf,MAAM,UAAU,KAAK;EACrB,IAAI,WAAW,QAAQ,OAAO,kBAAkB,SAAS,IAAI;EAC7D,KAAK,IAAI;CACX;CAEA,SAAS,MAAM,QAAuB;
|
|
1
|
+
{"version":3,"file":"use-comments.js","names":[],"sources":["../src/use-comments.ts"],"sourcesContent":["import { applyCommentAction, type CommentAction, type CommentThread } from 'dou-ui'\nimport { TextSelection, type EditorState } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\nimport { computed, shallowRef, watch, type ShallowRef } from 'vue'\nimport {\n anchorComment,\n commentAnchors,\n commentsAt,\n commentPlugin,\n setPendingComment,\n unanchorComment,\n type CommentAnchor,\n type CommentRange,\n} from './core/comments'\nimport type { CommentsProvider } from './core/extension'\nimport type { EditorComments, EditorEmits, EditorProps } from './editor'\n\ntype Emit = <K extends keyof EditorEmits>(event: K, ...args: EditorEmits[K]) => void\n\n/** The selected text in a read-only editor, which keeps no selection of its own. */\nfunction domSelection(view: EditorView): CommentRange | null {\n const selection = view.dom.ownerDocument.getSelection()\n if (!selection || selection.isCollapsed || !selection.rangeCount) return null\n const range = selection.getRangeAt(0)\n if (!view.dom.contains(range.startContainer) || !view.dom.contains(range.endContainer))\n return null\n try {\n const from = view.posAtDOM(range.startContainer, range.startOffset)\n const to = view.posAtDOM(range.endContainer, range.endOffset)\n return to > from ? { from, to } : null\n } catch {\n return null\n }\n}\n\n/** Whether a range holds text a thread can be about: not only a divider, not in code. */\nfunction hasText(state: EditorState, range: CommentRange) {\n let text = false\n state.doc.nodesBetween(range.from, range.to, (node) => {\n if (text) return false\n if (!node.isTextblock) return true\n text = !node.type.spec.code && node.content.size > 0\n return false\n })\n return text\n}\n\nexport function useEditorComments(options: {\n props: EditorProps\n emit: Emit\n view: ShallowRef<EditorView | null>\n provider: CommentsProvider | null\n}) {\n const { props, emit, view, provider } = options\n\n const threads = computed<readonly CommentThread[]>(\n () => provider?.threads.value ?? props.comments ?? [],\n )\n const enabled = computed(() => !!provider || props.comments !== undefined)\n const writable = computed(() => enabled.value && !!props.author && props.commentable !== false)\n const known = computed(() => new Set(threads.value.map((thread) => thread.id)))\n\n // the shared document's threads, mirrored to `v-model:comments`\n if (provider)\n watch(provider.threads, (value) => emit('update:comments', [...value]), { immediate: true })\n\n const innerActive = shallowRef<string | null>(null)\n const active = computed(() =>\n props.activeComment === undefined ? innerActive.value : props.activeComment,\n )\n function open(id: string | null) {\n if (id === active.value) return\n innerActive.value = id\n emit('update:activeComment', id)\n }\n\n const pending = shallowRef<CommentRange | null>(null)\n\n function selection(): CommentRange | null {\n const current = view.value\n if (!current) return null\n const range = current.editable\n ? current.state.selection instanceof TextSelection && !current.state.selection.empty\n ? { from: current.state.selection.from, to: current.state.selection.to }\n : null\n : domSelection(current)\n return range && hasText(current.state, range) ? range : null\n }\n\n const focusRequest = shallowRef(0)\n\n /** The open thread the cursor is in, innermost first. */\n function threadAtCursor(): string | null {\n const current = view.value\n if (!current) return null\n const ids = commentsAt(current.state, current.state.selection.from)\n return ids.find((id) => isOpen(id)) ?? null\n }\n\n function start(): boolean {\n const current = view.value\n if (!current || !enabled.value) return false\n const range = selection()\n if (!range) {\n // on commented text: open its thread, ready to reply\n const id = threadAtCursor()\n if (!id) return false\n open(id)\n focusRequest.value++\n return true\n }\n if (!writable.value) return false\n open(null)\n setPendingComment(current, range)\n return true\n }\n\n function close() {\n const current = view.value\n if (current && pending.value) setPendingComment(current, null)\n open(null)\n }\n\n function apply(action: CommentAction, how: { anchored?: boolean } = {}) {\n const current = view.value\n if (action.type === 'create' && !how.anchored) {\n const range = pending.value\n if (!current || !range) return\n anchorComment(current, range, action.thread.id)\n } else if (current && action.type === 'remove') unanchorComment(current, action.threadId)\n if (provider) provider.apply(action)\n else emit('update:comments', applyCommentAction(threads.value, action))\n emit('commentAction', action)\n if (action.type === 'create') {\n open(action.thread.id)\n focusRequest.value++\n } else if (action.type === 'remove' || action.type === 'resolve') open(null)\n }\n\n const isOpen = (id: string) => {\n const thread = threads.value.find((item) => item.id === id)\n return !!thread && !thread.resolved\n }\n\n const plugin = commentPlugin({\n known: () => (enabled.value ? known.value : null),\n onClick: (ids) => {\n if (pending.value && view.value) setPendingComment(view.value, null)\n open(ids.find(isOpen) ?? null)\n },\n // selecting other text (the formatting toolbar shows) closes an open thread\n onSelect: () => {\n if (!pending.value) open(null)\n },\n onPending: (range) => (pending.value = range),\n })\n\n function anchors(): Record<string, CommentAnchor | null> {\n const found = view.value ? commentAnchors(view.value.state.doc) : new Map()\n return Object.fromEntries(\n threads.value.map((thread) => [thread.id, found.get(thread.id) ?? null]),\n )\n }\n\n const comments: EditorComments = {\n enabled,\n writable,\n threads,\n author: computed(() => props.author),\n active,\n pending,\n focusRequest,\n selection,\n start,\n apply,\n open,\n close,\n }\n\n return { comments, plugin, anchors }\n}\n"],"mappings":";;;;;;AAoBA,SAAS,aAAa,MAAuC;CAC3D,MAAM,YAAY,KAAK,IAAI,cAAc,aAAa;CACtD,IAAI,CAAC,aAAa,UAAU,eAAe,CAAC,UAAU,YAAY,OAAO;CACzE,MAAM,QAAQ,UAAU,WAAW,CAAC;CACpC,IAAI,CAAC,KAAK,IAAI,SAAS,MAAM,cAAc,KAAK,CAAC,KAAK,IAAI,SAAS,MAAM,YAAY,GACnF,OAAO;CACT,IAAI;EACF,MAAM,OAAO,KAAK,SAAS,MAAM,gBAAgB,MAAM,WAAW;EAClE,MAAM,KAAK,KAAK,SAAS,MAAM,cAAc,MAAM,SAAS;EAC5D,OAAO,KAAK,OAAO;GAAE;GAAM;EAAG,IAAI;CACpC,QAAQ;EACN,OAAO;CACT;AACF;;AAGA,SAAS,QAAQ,OAAoB,OAAqB;CACxD,IAAI,OAAO;CACX,MAAM,IAAI,aAAa,MAAM,MAAM,MAAM,KAAK,SAAS;EACrD,IAAI,MAAM,OAAO;EACjB,IAAI,CAAC,KAAK,aAAa,OAAO;EAC9B,OAAO,CAAC,KAAK,KAAK,KAAK,QAAQ,KAAK,QAAQ,OAAO;EACnD,OAAO;CACT,CAAC;CACD,OAAO;AACT;AAEA,SAAgB,kBAAkB,SAK/B;CACD,MAAM,EAAE,OAAO,MAAM,MAAM,aAAa;CAExC,MAAM,UAAU,eACR,UAAU,QAAQ,SAAS,MAAM,YAAY,CAAC,CACtD;CACA,MAAM,UAAU,eAAe,CAAC,CAAC,YAAY,MAAM,aAAa,KAAA,CAAS;CACzE,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AI;EAC/B;EACA,YAAY,UAAW,QAAQ,QAAQ;CACzC,CAAC;CAED,SAAS,UAAgD;EACvD,MAAM,QAAQ,KAAK,QAAQ,eAAe,KAAK,MAAM,MAAM,GAAG,oBAAI,IAAI,IAAI;EAC1E,OAAO,OAAO,YACZ,QAAQ,MAAM,KAAK,WAAW,CAAC,OAAO,IAAI,MAAM,IAAI,OAAO,EAAE,KAAK,IAAI,CAAC,CACzE;CACF;CAiBA,OAAO;EAAE,UAAA;GAdP;GACA;GACA;GACA,QAAQ,eAAe,MAAM,MAAM;GACnC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EAGO;EAAU;EAAQ;CAAQ;AACrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dou-ui/editor",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.19",
|
|
4
4
|
"description": "DouUI 的块编辑器:基于 ProseMirror,文档由可拖动、可转换的块组成",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"build": "vite build && vue-tsc -p tsconfig.build.json && bun scripts/build-style.ts"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@dou-ui/code": "0.1.0-alpha.
|
|
66
|
-
"@dou-ui/flow": "0.1.0-alpha.
|
|
67
|
-
"dou-ui": "0.1.0-alpha.
|
|
65
|
+
"@dou-ui/code": "0.1.0-alpha.19",
|
|
66
|
+
"@dou-ui/flow": "0.1.0-alpha.19",
|
|
67
|
+
"dou-ui": "0.1.0-alpha.19",
|
|
68
68
|
"vue": "^3.5.0",
|
|
69
69
|
"yjs": "^13.6.0",
|
|
70
70
|
"markdown-it": "^14.0.0"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@dou-ui/icons": "0.1.0-alpha.
|
|
87
|
+
"@dou-ui/icons": "0.1.0-alpha.19",
|
|
88
88
|
"prosemirror-commands": "^1.7.2",
|
|
89
89
|
"prosemirror-history": "^1.5.1",
|
|
90
90
|
"prosemirror-inputrules": "^1.5.1",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"access": "public"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@dou-ui/code": "0.1.0-alpha.
|
|
103
|
-
"@dou-ui/flow": "0.1.0-alpha.
|
|
102
|
+
"@dou-ui/code": "0.1.0-alpha.19",
|
|
103
|
+
"@dou-ui/flow": "0.1.0-alpha.19",
|
|
104
104
|
"@types/markdown-it": "^14.1.2",
|
|
105
105
|
"markdown-it": "^14.1.0",
|
|
106
106
|
"y-protocols": "^1.0.7",
|