wendang-react 0.0.0-stage → 0.5.5
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/LICENSE +21 -0
- package/NOTICE.md +381 -0
- package/README.md +469 -2
- package/dist/bindings/yjs.js +5 -0
- package/dist/chunks/AnchoredPanel-D3nte06T.js +68 -0
- package/dist/chunks/MindMapCanvas-VWrxTy5Q.js +2070 -0
- package/dist/chunks/MindMapViewer-DqKu_Kuz.js +180 -0
- package/dist/chunks/SpreadsheetViewer-DN_QQGud.js +157 -0
- package/dist/chunks/code-highlight-BmaqTe1m.js +30 -0
- package/dist/chunks/code-highlight-engine-BFDzDPzy.js +40 -0
- package/dist/chunks/comment-hint-DN7LKJAn.js +296 -0
- package/dist/chunks/composition-state-Bl-U1R_2.js +40 -0
- package/dist/chunks/extensions-B-CVVQhp.js +4210 -0
- package/dist/chunks/fuzzy-match-DYQR-4w2.js +89 -0
- package/dist/chunks/hooks-C53Dp0pr.js +35 -0
- package/dist/chunks/host-C-V688Rq.js +197 -0
- package/dist/chunks/index-Ii536CFG.js +720 -0
- package/dist/chunks/katex-WjrodtTU.js +71 -0
- package/dist/chunks/mind-map-controller-B6SxK3GZ.js +479 -0
- package/dist/chunks/mind-map-delete-CVsxdXfs.js +31 -0
- package/dist/chunks/mind-map-input-CEWRz_t6.js +43 -0
- package/dist/chunks/mind-topic-text-BBNTbFSe.js +446 -0
- package/dist/chunks/nodes-iKqTGr_N.js +291 -0
- package/dist/chunks/popover-placement-D3xVYdkt.js +47 -0
- package/dist/chunks/worksheet-engine-TJ54m0KC.js +125 -0
- package/dist/chunks/worksheet-preview-DsDVWxIM.js +129 -0
- package/dist/document/viewer.js +287 -0
- package/dist/document.js +3620 -0
- package/dist/index.js +8 -0
- package/dist/mindmap/viewer.js +6 -0
- package/dist/mindmap.js +123 -0
- package/dist/shared.js +52 -0
- package/dist/spreadsheet/viewer.js +5 -0
- package/dist/spreadsheet/xlsx.js +299 -0
- package/dist/spreadsheet.js +120 -0
- package/dist/styles/callout.css +34 -0
- package/dist/styles/code-block.css +58 -0
- package/dist/styles/content-style.css +619 -0
- package/dist/styles/editor-interaction.css +621 -0
- package/dist/styles/file-video.css +12 -0
- package/dist/styles/image-preview.css +103 -0
- package/dist/styles/mind-map-block.css +14 -0
- package/dist/styles/mind-map-canvas.css +80 -0
- package/dist/styles/mind-map-comments.css +93 -0
- package/dist/styles/mind-map-details.css +7 -0
- package/dist/styles/mind-map-preview.css +7 -0
- package/dist/styles/mind-map-topic.css +112 -0
- package/dist/styles/page-picker.css +47 -0
- package/dist/styles/renderer.css +45 -0
- package/dist/styles/spreadsheet-editor.css +3 -0
- package/dist/styles/tokens.css +153 -0
- package/dist/styles/video-dialog.css +41 -0
- package/dist/styles/video-embed.css +35 -0
- package/dist/styles.css +2614 -0
- package/dist/types/bindings/yjs.d.ts +3 -0
- package/dist/types/document/viewer.d.ts +3 -0
- package/dist/types/document.d.ts +7 -0
- package/dist/types/editor/BlockAffordance.d.ts +47 -0
- package/dist/types/editor/CalloutView.d.ts +2 -0
- package/dist/types/editor/CodeBlockView.d.ts +9 -0
- package/dist/types/editor/DocumentColorPanel.d.ts +8 -0
- package/dist/types/editor/DocumentEditor.d.ts +71 -0
- package/dist/types/editor/ImagePreview.d.ts +10 -0
- package/dist/types/editor/LinkPopover.d.ts +21 -0
- package/dist/types/editor/PagePicker.d.ts +7 -0
- package/dist/types/editor/SelectionToolbar.d.ts +11 -0
- package/dist/types/editor/SlashMenu.d.ts +30 -0
- package/dist/types/editor/TableControls.d.ts +9 -0
- package/dist/types/editor/VideoEmbedDialog.d.ts +6 -0
- package/dist/types/editor/document-gestures.d.ts +13 -0
- package/dist/types/editor/extensions.d.ts +29 -0
- package/dist/types/editor/nodes.d.ts +20 -0
- package/dist/types/editor/same-document.d.ts +2 -0
- package/dist/types/engine/collab/presence.d.ts +1 -0
- package/dist/types/engine/editor/block-commands.d.ts +35 -0
- package/dist/types/engine/editor/block-conversion.d.ts +12 -0
- package/dist/types/engine/editor/block-drag.d.ts +16 -0
- package/dist/types/engine/editor/block-menu-placement.d.ts +16 -0
- package/dist/types/engine/editor/callout-commands.d.ts +4 -0
- package/dist/types/engine/editor/collab-change-origin.d.ts +2 -0
- package/dist/types/engine/editor/delete-block.d.ts +2 -0
- package/dist/types/engine/editor/extensions/block-format.d.ts +19 -0
- package/dist/types/engine/editor/extensions/block-handle.d.ts +17 -0
- package/dist/types/engine/editor/extensions/block-menu-highlight.d.ts +4 -0
- package/dist/types/engine/editor/extensions/block-selection.d.ts +117 -0
- package/dist/types/engine/editor/extensions/code-highlight.d.ts +2 -0
- package/dist/types/engine/editor/extensions/collab-cursor.d.ts +13 -0
- package/dist/types/engine/editor/extensions/ime-guard.d.ts +8 -0
- package/dist/types/engine/editor/extensions/inline-comments.d.ts +15 -0
- package/dist/types/engine/editor/extensions/paste-sanitizer.d.ts +4 -0
- package/dist/types/engine/editor/extensions/slash.d.ts +16 -0
- package/dist/types/engine/editor/extensions/table-interaction.d.ts +9 -0
- package/dist/types/engine/editor/extensions/upload-placeholder.d.ts +48 -0
- package/dist/types/engine/editor/image-preview-gesture.d.ts +3 -0
- package/dist/types/engine/editor/ime/composition-state.d.ts +9 -0
- package/dist/types/engine/editor/insert-block.d.ts +6 -0
- package/dist/types/engine/editor/insert-picker-logic.d.ts +13 -0
- package/dist/types/engine/editor/link-edit.d.ts +10 -0
- package/dist/types/engine/editor/mind-map-controller.d.ts +63 -0
- package/dist/types/engine/editor/mind-map-delete.d.ts +7 -0
- package/dist/types/engine/editor/mind-map-drag.d.ts +16 -0
- package/dist/types/engine/editor/mind-map-input.d.ts +16 -0
- package/dist/types/engine/editor/mind-map-selection.d.ts +11 -0
- package/dist/types/engine/editor/nodes/columns.d.ts +6 -0
- package/dist/types/engine/editor/nodes/file-nodeview.d.ts +4 -0
- package/dist/types/engine/editor/nodes/file.d.ts +2 -0
- package/dist/types/engine/editor/nodes/image-gallery.d.ts +2 -0
- package/dist/types/engine/editor/nodes/image-nodeview.d.ts +4 -0
- package/dist/types/engine/editor/nodes/image.d.ts +1 -0
- package/dist/types/engine/editor/nodes/inline-style.d.ts +4 -0
- package/dist/types/engine/editor/nodes/math-nodeview.d.ts +2 -0
- package/dist/types/engine/editor/nodes/math.d.ts +3 -0
- package/dist/types/engine/editor/nodes/mention.d.ts +2 -0
- package/dist/types/engine/editor/nodes/mind-map-schema.d.ts +6 -0
- package/dist/types/engine/editor/nodes/page-link.d.ts +2 -0
- package/dist/types/engine/editor/nodes/table-cell.d.ts +4 -0
- package/dist/types/engine/editor/nodes/video-embed-schema.d.ts +2 -0
- package/dist/types/engine/editor/popover-placement.d.ts +35 -0
- package/dist/types/engine/editor/table-clipboard.d.ts +3 -0
- package/dist/types/engine/editor/table-commands.d.ts +20 -0
- package/dist/types/engine/editor/table-geometry.d.ts +34 -0
- package/dist/types/engine/editor/table-menu-placement.d.ts +30 -0
- package/dist/types/engine/editor/tracked-target.d.ts +8 -0
- package/dist/types/engine/editor/trailing-paragraph.d.ts +2 -0
- package/dist/types/engine/host.d.ts +2 -0
- package/dist/types/engine/renderer/attachments.d.ts +11 -0
- package/dist/types/engine/renderer/katex.d.ts +7 -0
- package/dist/types/engine/renderer/lazy-visible.d.ts +11 -0
- package/dist/types/engine/shared/callout.d.ts +1 -0
- package/dist/types/engine/shared/code-block.d.ts +1 -0
- package/dist/types/engine/shared/code-highlight-engine.d.ts +2 -0
- package/dist/types/engine/shared/code-highlight.d.ts +8 -0
- package/dist/types/engine/shared/comment-hint-position.d.ts +20 -0
- package/dist/types/engine/shared/comment-hint.d.ts +2 -0
- package/dist/types/engine/shared/document-colors.d.ts +1 -0
- package/dist/types/engine/shared/fuzzy-match.d.ts +13 -0
- package/dist/types/engine/shared/image-gallery.d.ts +1 -0
- package/dist/types/engine/shared/inline-comments.d.ts +1 -0
- package/dist/types/engine/shared/mind-map-phase2.d.ts +1 -0
- package/dist/types/engine/shared/mind-map.d.ts +1 -0
- package/dist/types/engine/shared/mind-topic-text.d.ts +1 -0
- package/dist/types/engine/shared/modal-stack.d.ts +6 -0
- package/dist/types/engine/shared/page-candidates.d.ts +6 -0
- package/dist/types/engine/shared/pinyin.d.ts +6 -0
- package/dist/types/engine/shared/preview-items.d.ts +10 -0
- package/dist/types/engine/shared/safe-href.d.ts +1 -0
- package/dist/types/engine/shared/table-cell-format.d.ts +1 -0
- package/dist/types/engine/shared/table-layout.d.ts +1 -0
- package/dist/types/engine/shared/video-embed.d.ts +1 -0
- package/dist/types/engine/shared/video-feedback.d.ts +1 -0
- package/dist/types/engine/shared/workbook.d.ts +1 -0
- package/dist/types/engine/worksheets/worksheet-engine.d.ts +16 -0
- package/dist/types/engine/worksheets/worksheet-format.d.ts +20 -0
- package/dist/types/engine/worksheets/worksheet-preview.d.ts +17 -0
- package/dist/types/engine/worksheets/worksheet-xlsx.d.ts +21 -0
- package/dist/types/engine/wui/core/dialog.d.ts +5 -0
- package/dist/types/engine/wui/core/listbox.d.ts +8 -0
- package/dist/types/engine/wui/core/placement.d.ts +40 -0
- package/dist/types/hooks.d.ts +7 -0
- package/dist/types/host-types.d.ts +58 -0
- package/dist/types/host.d.ts +24 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/mindmap/Comments.d.ts +9 -0
- package/dist/types/mindmap/Details.d.ts +13 -0
- package/dist/types/mindmap/Field.d.ts +10 -0
- package/dist/types/mindmap/MindMapCanvas.d.ts +19 -0
- package/dist/types/mindmap/MindMapEditor.d.ts +30 -0
- package/dist/types/mindmap/MindMapViewer.d.ts +23 -0
- package/dist/types/mindmap/TopicLabel.d.ts +4 -0
- package/dist/types/mindmap/viewer.d.ts +2 -0
- package/dist/types/mindmap.d.ts +4 -0
- package/dist/types/renderer/CodeToolbar.d.ts +10 -0
- package/dist/types/renderer/DocumentViewer.d.ts +23 -0
- package/dist/types/renderer/media.d.ts +33 -0
- package/dist/types/shared.d.ts +12 -0
- package/dist/types/spreadsheet/SpreadsheetEditor.d.ts +23 -0
- package/dist/types/spreadsheet/SpreadsheetViewer.d.ts +13 -0
- package/dist/types/spreadsheet/viewer.d.ts +2 -0
- package/dist/types/spreadsheet/xlsx.d.ts +2 -0
- package/dist/types/spreadsheet.d.ts +3 -0
- package/dist/types/wui/AnchoredPanel.d.ts +14 -0
- package/dist/types/wui/Dropdown.d.ts +18 -0
- package/dist/types/wui/Icon.d.ts +7 -0
- package/dist/types/wui/Tooltip.d.ts +5 -0
- package/dist/types/wui/index.d.ts +69 -0
- package/package.json +122 -3
- package/third-party-notices/@fast-csv__format@4.3.5-LICENSE.txt +21 -0
- package/third-party-notices/@fast-csv__parse@4.3.6-LICENSE.txt +21 -0
- package/third-party-notices/@flatten-js__interval-tree@1.1.3-LICENSE.txt +21 -0
- package/third-party-notices/@floating-ui__core@1.8.0-LICENSE.txt +20 -0
- package/third-party-notices/@floating-ui__dom@1.8.0-LICENSE.txt +20 -0
- package/third-party-notices/@floating-ui__react-dom@2.1.9-LICENSE.txt +20 -0
- package/third-party-notices/@floating-ui__utils@0.2.12-LICENSE.txt +20 -0
- package/third-party-notices/@grpc__grpc-js@1.14.6-LICENSE.txt +201 -0
- package/third-party-notices/@grpc__proto-loader@0.8.1-LICENSE.txt +201 -0
- package/third-party-notices/@js-sdsl__ordered-map@4.4.2-LICENSE.txt +21 -0
- package/third-party-notices/@protobufjs__aspromise@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__base64@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__codegen@2.0.5-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__eventemitter@1.1.1-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__fetch@1.1.1-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__float@1.0.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__path@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__pool@1.1.0-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__utf8@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@radix-ui__primitive@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-arrow@1.1.17-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-collection@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-compose-refs@1.1.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-context@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-dialog@1.3.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-direction@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-dismissable-layer@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-dropdown-menu@2.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-focus-guards@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-focus-scope@1.3.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-hover-card@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-id@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-menu@2.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-popover@1.3.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-popper@1.4.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-portal@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-presence@1.1.11-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-primitive@2.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-roving-focus@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-separator@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-slot@1.5.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-callback-ref@1.1.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-controllable-state@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-effect-event@0.0.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-is-hydrated@0.1.3-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-layout-effect@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-rect@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-size@1.1.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__rect@1.1.3-LICENSE.txt +21 -0
- package/third-party-notices/@tiptap__core@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-blockquote@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-bold@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-bullet-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-code-block@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-code@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-collaboration@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-document@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-dropcursor@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-gapcursor@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-hard-break@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-heading@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-horizontal-rule@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-image@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-italic@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-link@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-list-item@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-list-keymap@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-ordered-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-paragraph@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-placeholder@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-strike@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table-cell@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table-header@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table-row@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-task-item@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-task-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-text@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-underline@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extensions@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__pm@3.31.4-LICENSE.txt +21 -0
- package/third-party-notices/@tiptap__starter-kit@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__y-tiptap@3.0.7-LICENSE.txt +22 -0
- package/third-party-notices/@types__hast@3.0.5-LICENSE.txt +21 -0
- package/third-party-notices/@types__node@14.18.63-LICENSE.txt +21 -0
- package/third-party-notices/@types__node@26.6.2-LICENSE.txt +21 -0
- package/third-party-notices/@types__react-dom@19.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@types__react@19.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@types__unist@3.0.3-LICENSE.txt +21 -0
- package/third-party-notices/@univerjs__core@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__design@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__docs-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__docs@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__drawing@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__engine-formula@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__engine-render@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__icons@1.46.0-LICENSE.txt +21 -0
- package/third-party-notices/@univerjs__network@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__preset-sheets-core@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__preset-sheets-filter@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__preset-sheets-sort@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__presets@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__rpc@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-filter-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-filter@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-formula-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-formula@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-numfmt-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-numfmt@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-sort-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-sort@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__telemetry@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__themes@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@wendellhu__redi@1.1.3-LICENSE.txt +7 -0
- package/third-party-notices/ansi-regex@5.0.1-license.txt +9 -0
- package/third-party-notices/ansi-styles@4.3.0-license.txt +9 -0
- package/third-party-notices/archiver-utils@2.1.0-LICENSE.txt +22 -0
- package/third-party-notices/archiver-utils@3.0.4-LICENSE.txt +22 -0
- package/third-party-notices/archiver@5.3.2-LICENSE.txt +22 -0
- package/third-party-notices/aria-hidden@1.2.6-LICENSE.txt +21 -0
- package/third-party-notices/array-buffer-byte-length@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/arraybuffer.prototype.slice@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/async-function@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/async-lock@1.4.1-LICENSE.txt +22 -0
- package/third-party-notices/async@3.2.6-LICENSE.txt +19 -0
- package/third-party-notices/available-typed-arrays@1.0.7-LICENSE.txt +21 -0
- package/third-party-notices/balanced-match@1.0.2-LICENSE.md.txt +21 -0
- package/third-party-notices/base64-js@1.5.1-LICENSE.txt +21 -0
- package/third-party-notices/big-integer@1.6.52-LICENSE.txt +24 -0
- package/third-party-notices/bl@4.1.0-LICENSE.md.txt +13 -0
- package/third-party-notices/bluebird@3.4.7-LICENSE.txt +21 -0
- package/third-party-notices/brace-expansion@1.1.21-LICENSE.txt +21 -0
- package/third-party-notices/brace-expansion@2.1.7-LICENSE.txt +21 -0
- package/third-party-notices/buffer-crc32@0.2.13-LICENSE.txt +19 -0
- package/third-party-notices/buffer-indexof-polyfill@1.0.2-LICENSE.txt +22 -0
- package/third-party-notices/buffer@5.7.1-LICENSE.txt +21 -0
- package/third-party-notices/call-bind-apply-helpers@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/call-bind@1.0.9-LICENSE.txt +21 -0
- package/third-party-notices/call-bound@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/class-variance-authority@0.7.1-LICENSE.txt +190 -0
- package/third-party-notices/cliui@8.0.1-LICENSE.txt.txt +14 -0
- package/third-party-notices/clsx@2.1.1-license.txt +9 -0
- package/third-party-notices/cmdk@1.1.1-LICENSE.md.txt +21 -0
- package/third-party-notices/collapse-white-space@2.1.0-license.txt +22 -0
- package/third-party-notices/color-convert@2.0.1-LICENSE.txt +21 -0
- package/third-party-notices/color-name@1.1.4-LICENSE.txt +8 -0
- package/third-party-notices/commander@15.0.0-LICENSE.txt +22 -0
- package/third-party-notices/compress-commons@4.1.2-LICENSE.txt +22 -0
- package/third-party-notices/concat-map@0.0.1-LICENSE.txt +18 -0
- package/third-party-notices/core-util-is@1.0.3-LICENSE.txt +19 -0
- package/third-party-notices/crc-32@1.2.2-LICENSE.txt +201 -0
- package/third-party-notices/crc32-stream@4.0.3-LICENSE.txt +22 -0
- package/third-party-notices/csstype@3.2.3-LICENSE.txt +19 -0
- package/third-party-notices/data-view-buffer@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/data-view-byte-length@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/data-view-byte-offset@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/dayjs@1.11.23-LICENSE.txt +21 -0
- package/third-party-notices/decimal.js@10.6.0-LICENCE.md.txt +23 -0
- package/third-party-notices/define-data-property@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/define-properties@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/dequal@2.0.3-license.txt +21 -0
- package/third-party-notices/detect-node-es@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/devlop@1.1.0-license.txt +22 -0
- package/third-party-notices/dunder-proto@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/duplexer2@0.1.4-LICENSE.md.txt +26 -0
- package/third-party-notices/end-of-stream@1.4.5-LICENSE.txt +21 -0
- package/third-party-notices/es-abstract-get@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/es-abstract@1.24.2-LICENSE.txt +21 -0
- package/third-party-notices/es-define-property@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/es-errors@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/es-object-atoms@1.1.2-LICENSE.txt +21 -0
- package/third-party-notices/es-set-tostringtag@2.1.0-LICENSE.txt +21 -0
- package/third-party-notices/es-to-primitive@1.3.4-LICENSE.txt +22 -0
- package/third-party-notices/escalade@3.2.0-license.txt +9 -0
- package/third-party-notices/exceljs@4.4.0-LICENSE.txt +22 -0
- package/third-party-notices/fast-csv@4.3.6-LICENSE.txt +21 -0
- package/third-party-notices/fast-diff@1.3.0-LICENSE.txt +201 -0
- package/third-party-notices/for-each@0.3.5-LICENSE.txt +22 -0
- package/third-party-notices/fs-constants@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/fs.realpath@1.0.0-LICENSE.txt +43 -0
- package/third-party-notices/fstream@1.0.12-LICENSE.txt +15 -0
- package/third-party-notices/function-bind@1.1.2-LICENSE.txt +20 -0
- package/third-party-notices/function.prototype.name@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/functions-have-names@1.2.3-LICENSE.txt +21 -0
- package/third-party-notices/generator-function@2.0.1-LICENSE.md.txt +7 -0
- package/third-party-notices/get-caller-file@2.0.5-LICENSE.md.txt +6 -0
- package/third-party-notices/get-intrinsic@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/get-nonce@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/get-proto@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/get-symbol-description@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/glob@7.2.3-LICENSE.txt +21 -0
- package/third-party-notices/globalthis@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/gopd@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/graceful-fs@4.2.11-LICENSE.txt +15 -0
- package/third-party-notices/has-bigints@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/has-property-descriptors@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/has-proto@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/has-symbols@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/has-tostringtag@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/hasown@2.0.4-LICENSE.txt +21 -0
- package/third-party-notices/highlight.js@11.11.2-LICENSE.txt +29 -0
- package/third-party-notices/ieee754@1.2.1-LICENSE.txt +11 -0
- package/third-party-notices/immediate@3.0.6-LICENSE.txt.txt +20 -0
- package/third-party-notices/inflight@1.0.6-LICENSE.txt +15 -0
- package/third-party-notices/inherits@2.0.4-LICENSE.txt +16 -0
- package/third-party-notices/internal-slot@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/is-array-buffer@3.0.5-LICENSE.txt +21 -0
- package/third-party-notices/is-async-function@2.1.1-LICENSE.txt +20 -0
- package/third-party-notices/is-bigint@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/is-boolean-object@1.2.2-LICENSE.txt +22 -0
- package/third-party-notices/is-callable@1.2.7-LICENSE.txt +22 -0
- package/third-party-notices/is-data-view@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/is-date-object@1.1.0-LICENSE.txt +22 -0
- package/third-party-notices/is-document.all@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/is-finalizationregistry@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/is-fullwidth-code-point@3.0.0-license.txt +9 -0
- package/third-party-notices/is-generator-function@1.1.2-LICENSE.txt +20 -0
- package/third-party-notices/is-map@2.0.3-LICENSE.txt +21 -0
- package/third-party-notices/is-negative-zero@2.0.3-LICENSE.txt +20 -0
- package/third-party-notices/is-number-object@1.1.1-LICENSE.txt +22 -0
- package/third-party-notices/is-regex@1.2.1-LICENSE.txt +20 -0
- package/third-party-notices/is-set@2.0.3-LICENSE.txt +21 -0
- package/third-party-notices/is-shared-array-buffer@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/is-string@1.1.1-LICENSE.txt +22 -0
- package/third-party-notices/is-symbol@1.1.1-LICENSE.txt +22 -0
- package/third-party-notices/is-typed-array@1.1.15-LICENSE.txt +22 -0
- package/third-party-notices/is-weakmap@2.0.2-LICENSE.txt +21 -0
- package/third-party-notices/is-weakref@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/is-weakset@2.0.4-LICENSE.txt +21 -0
- package/third-party-notices/isarray@2.0.5-LICENSE.txt +21 -0
- package/third-party-notices/isomorphic.js@0.2.5-LICENSE.txt +21 -0
- package/third-party-notices/jszip@3.10.2-LICENSE.markdown.txt +651 -0
- package/third-party-notices/katex@0.18.9-LICENSE.txt +21 -0
- package/third-party-notices/kdbush@4.1.0-LICENSE.txt +15 -0
- package/third-party-notices/lazystream@1.0.1-LICENSE.txt +23 -0
- package/third-party-notices/lib0@0.2.119-LICENSE.txt +21 -0
- package/third-party-notices/lie@3.3.0-license.md.txt +7 -0
- package/third-party-notices/linkifyjs@4.3.3-LICENSE.txt +19 -0
- package/third-party-notices/listenercount@1.0.1-LICENSE.md.txt +5 -0
- package/third-party-notices/lodash-es@4.18.1-LICENSE.txt +47 -0
- package/third-party-notices/lodash.camelcase@4.3.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.defaults@4.2.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.difference@4.5.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.escaperegexp@4.1.2-LICENSE.txt +47 -0
- package/third-party-notices/lodash.flatten@4.4.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.groupby@4.6.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isboolean@3.0.3-LICENSE.txt +22 -0
- package/third-party-notices/lodash.isequal@4.5.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isfunction@3.0.9-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isnil@4.0.0-LICENSE.txt +22 -0
- package/third-party-notices/lodash.isplainobject@4.0.6-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isundefined@3.0.1-LICENSE.txt.txt +22 -0
- package/third-party-notices/lodash.union@4.6.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.uniq@4.5.0-LICENSE.txt +47 -0
- package/third-party-notices/long@5.3.2-LICENSE.txt +202 -0
- package/third-party-notices/lowlight@3.3.0-license.txt +22 -0
- package/third-party-notices/math-intrinsics@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/minimatch@3.1.5-LICENSE.txt +15 -0
- package/third-party-notices/minimatch@5.1.9-LICENSE.txt +15 -0
- package/third-party-notices/minimist@1.2.8-LICENSE.txt +18 -0
- package/third-party-notices/mkdirp@0.5.6-LICENSE.txt +21 -0
- package/third-party-notices/n-gram@2.0.2-license.txt +22 -0
- package/third-party-notices/normalize-path@3.0.0-LICENSE.txt +21 -0
- package/third-party-notices/numfmt@4.0.1-LICENSE.txt +19 -0
- package/third-party-notices/object-inspect@1.13.4-LICENSE.txt +21 -0
- package/third-party-notices/object-keys@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/object.assign@4.1.7-LICENSE.txt +21 -0
- package/third-party-notices/once@1.4.0-LICENSE.txt +15 -0
- package/third-party-notices/orderedmap@2.1.1-LICENSE.txt +19 -0
- package/third-party-notices/own-keys@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/pako@1.0.11-LICENSE.txt +21 -0
- package/third-party-notices/path-is-absolute@1.0.1-license.txt +21 -0
- package/third-party-notices/possible-typed-array-names@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/process-nextick-args@2.0.1-license.md.txt +19 -0
- package/third-party-notices/prosemirror-changeset@2.4.4-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-commands@1.7.2-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-dropcursor@1.8.4-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-gapcursor@1.4.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-history@1.5.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-inputrules@1.5.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-keymap@1.2.3-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-model@1.25.12-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-schema-list@1.5.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-state@1.4.4-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-tables@1.8.5-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-transform@1.12.2-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-view@1.42.6-LICENSE.txt +19 -0
- package/third-party-notices/protobufjs@7.6.6-LICENSE.txt +39 -0
- package/third-party-notices/quickselect@3.0.0-LICENSE.txt +15 -0
- package/third-party-notices/rbush@4.0.1-LICENSE.txt +21 -0
- package/third-party-notices/react-dom@19.3.1-LICENSE.txt +21 -0
- package/third-party-notices/react-remove-scroll@2.7.2-LICENSE.txt +21 -0
- package/third-party-notices/react-style-singleton@2.2.3-LICENSE.txt +21 -0
- package/third-party-notices/react@19.3.1-LICENSE.txt +21 -0
- package/third-party-notices/readable-stream@2.3.8-LICENSE.txt +47 -0
- package/third-party-notices/readable-stream@3.6.2-LICENSE.txt +47 -0
- package/third-party-notices/readdir-glob@1.1.3-LICENSE.txt +201 -0
- package/third-party-notices/reflect.getprototypeof@1.0.10-LICENSE.txt +21 -0
- package/third-party-notices/regexp.prototype.flags@1.5.4-LICENSE.txt +22 -0
- package/third-party-notices/require-directory@2.1.1-LICENSE.txt +22 -0
- package/third-party-notices/rimraf@2.7.1-LICENSE.txt +15 -0
- package/third-party-notices/rope-sequence@1.3.4-LICENSE.txt +19 -0
- package/third-party-notices/rxjs@7.8.2-LICENSE.txt.txt +202 -0
- package/third-party-notices/safe-array-concat@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/safe-buffer@5.1.2-LICENSE.txt +21 -0
- package/third-party-notices/safe-buffer@5.2.1-LICENSE.txt +21 -0
- package/third-party-notices/safe-push-apply@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/safe-regex-test@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/scheduler@0.28.0-LICENSE.txt +21 -0
- package/third-party-notices/set-function-length@1.2.2-LICENSE.txt +21 -0
- package/third-party-notices/set-function-name@2.0.2-LICENSE.txt +21 -0
- package/third-party-notices/set-proto@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/setimmediate@1.0.5-LICENSE.txt.txt +20 -0
- package/third-party-notices/side-channel-list@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/side-channel-map@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/side-channel-weakmap@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/side-channel@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/sonner@2.0.8-LICENSE.md.txt +21 -0
- package/third-party-notices/stop-iteration-iterator@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/string-width@4.2.3-license.txt +9 -0
- package/third-party-notices/string.prototype.trim@1.2.11-LICENSE.txt +21 -0
- package/third-party-notices/string.prototype.trimend@1.0.10-LICENSE.txt +21 -0
- package/third-party-notices/string.prototype.trimstart@1.0.8-LICENSE.txt +21 -0
- package/third-party-notices/string_decoder@1.1.1-LICENSE.txt +48 -0
- package/third-party-notices/string_decoder@1.3.0-LICENSE.txt +48 -0
- package/third-party-notices/strip-ansi@6.0.1-license.txt +9 -0
- package/third-party-notices/tar-stream@2.2.0-LICENSE.txt +21 -0
- package/third-party-notices/tiny-pinyin@1.3.2-LICENSE.txt +21 -0
- package/third-party-notices/tmp@0.2.7-LICENSE.txt +21 -0
- package/third-party-notices/traverse@0.3.10-LICENSE.txt +21 -0
- package/third-party-notices/trigram-utils@2.0.1-license.txt +22 -0
- package/third-party-notices/tslib@2.8.1-LICENSE.txt.txt +12 -0
- package/third-party-notices/typed-array-buffer@1.0.3-LICENSE.txt +21 -0
- package/third-party-notices/typed-array-byte-length@1.0.3-LICENSE.txt +21 -0
- package/third-party-notices/typed-array-byte-offset@1.0.5-LICENSE.txt +21 -0
- package/third-party-notices/typed-array-length@1.0.8-LICENSE.txt +21 -0
- package/third-party-notices/typedarray.prototype.slice@1.0.6-LICENSE.txt +21 -0
- package/third-party-notices/unbox-primitive@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/undici-types@8.9.0-LICENSE.txt +21 -0
- package/third-party-notices/unzipper@0.10.14-LICENSE.txt +25 -0
- package/third-party-notices/use-callback-ref@1.3.3-LICENSE.txt +21 -0
- package/third-party-notices/use-sidecar@1.1.3-LICENSE.txt +21 -0
- package/third-party-notices/util-deprecate@1.0.2-LICENSE.txt +24 -0
- package/third-party-notices/uuid@8.3.2-LICENSE.md.txt +9 -0
- package/third-party-notices/w3c-keyname@2.2.8-LICENSE.txt +19 -0
- package/third-party-notices/which-boxed-primitive@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/which-builtin-type@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/which-collection@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/which-typed-array@1.1.24-LICENSE.txt +22 -0
- package/third-party-notices/wrap-ansi@7.0.0-license.txt +9 -0
- package/third-party-notices/wrappy@1.0.2-LICENSE.txt +15 -0
- package/third-party-notices/xmlchars@2.2.0-LICENSE.txt +18 -0
- package/third-party-notices/y-protocols@1.0.7-LICENSE.txt +21 -0
- package/third-party-notices/y18n@5.0.8-LICENSE.txt +13 -0
- package/third-party-notices/yargs-parser@21.1.1-LICENSE.txt.txt +14 -0
- package/third-party-notices/yargs@17.7.3-LICENSE.txt +21 -0
- package/third-party-notices/yjs@13.6.33-LICENSE.txt +23 -0
- package/third-party-notices/zip-stream@4.1.1-LICENSE.txt +22 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DocumentEditor } from './editor/DocumentEditor';
|
|
2
|
+
export type { DocumentEditorProps, DocumentEditorHandle } from './editor/DocumentEditor';
|
|
3
|
+
export { coreExtensions, COLLAB_FIELD } from './editor/extensions';
|
|
4
|
+
export type { CoreExtensionOptions } from './editor/extensions';
|
|
5
|
+
export * from './engine/editor/popover-placement';
|
|
6
|
+
export { sameDocument } from './editor/same-document';
|
|
7
|
+
export type { ProseMirrorDoc, ProseMirrorNode } from 'wendang/types';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import type { BlockHoverInfo } from '../engine/editor/extensions/block-handle';
|
|
3
|
+
import type { ProseMirrorNode } from 'wendang/types';
|
|
4
|
+
export interface BlockMenuProps {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
info: BlockHoverInfo;
|
|
7
|
+
canComment?: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onPickFile: (kind: 'image' | 'file') => void;
|
|
10
|
+
onPickPage: () => void;
|
|
11
|
+
onPickVideo: () => void;
|
|
12
|
+
onRequestComment?: () => void;
|
|
13
|
+
onSharePage?: () => void;
|
|
14
|
+
onCopyLink?: () => void;
|
|
15
|
+
onConvertToSubpage?: (node: ProseMirrorNode) => void;
|
|
16
|
+
onSaveAsTemplate?: (node: ProseMirrorNode) => void;
|
|
17
|
+
onNotice?: (message: string) => void;
|
|
18
|
+
panelOnly?: 'format' | 'insert-below';
|
|
19
|
+
}
|
|
20
|
+
export declare function blockAffordanceStyle(info: BlockHoverInfo, shell: HTMLElement | null, kind: 'plus' | 'chip'): {
|
|
21
|
+
left: number;
|
|
22
|
+
top: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function BlockPlus({ style, expanded, onClick, onMouseEnter }: {
|
|
25
|
+
info: BlockHoverInfo;
|
|
26
|
+
style: {
|
|
27
|
+
left: number;
|
|
28
|
+
top: number;
|
|
29
|
+
};
|
|
30
|
+
expanded: boolean;
|
|
31
|
+
onClick: () => void;
|
|
32
|
+
onMouseEnter?: () => void;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
34
|
+
export declare function BlockChip({ editor, info, style, expanded, onOpen, onOpenFull, onMouseEnter, onHandleMouseDown }: {
|
|
35
|
+
editor: Editor;
|
|
36
|
+
info: BlockHoverInfo;
|
|
37
|
+
style: {
|
|
38
|
+
left: number;
|
|
39
|
+
top: number;
|
|
40
|
+
};
|
|
41
|
+
expanded: boolean;
|
|
42
|
+
onOpen: () => void;
|
|
43
|
+
onOpenFull: () => void;
|
|
44
|
+
onMouseEnter?: () => void;
|
|
45
|
+
onHandleMouseDown?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
47
|
+
export declare function BlockMenu(props: BlockMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NodeViewRenderer } from '@tiptap/core';
|
|
2
|
+
import { type ContentContext } from '../host';
|
|
3
|
+
interface YwikiCodeOptions {
|
|
4
|
+
canCopy?: () => boolean;
|
|
5
|
+
contentContext?: () => ContentContext;
|
|
6
|
+
}
|
|
7
|
+
export declare const createCodeBlockNodeView: (canCopy?: () => boolean, contentContext?: () => ContentContext) => NodeViewRenderer;
|
|
8
|
+
export declare const YwikiCodeBlock: import("@tiptap/core").Node<YwikiCodeOptions, any>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function DocumentColorPanel({ textColor, highlightColor, onTextColor, onHighlightColor, onReset, onClose }: {
|
|
2
|
+
textColor: string | null;
|
|
3
|
+
highlightColor: string | null;
|
|
4
|
+
onTextColor: (value: string | null) => void;
|
|
5
|
+
onHighlightColor: (value: string | null) => void;
|
|
6
|
+
onReset: () => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Doc } from 'yjs';
|
|
2
|
+
import type { Awareness } from 'y-protocols/awareness';
|
|
3
|
+
import type { ProseMirrorDoc, ProseMirrorNode, CommentItem } from 'wendang/types';
|
|
4
|
+
import { type InlineAnchor } from 'wendang/shared';
|
|
5
|
+
import type { MindMapViewState } from 'wendang/mindmap';
|
|
6
|
+
export interface DocumentEditorProps {
|
|
7
|
+
value?: ProseMirrorDoc;
|
|
8
|
+
defaultValue?: ProseMirrorDoc;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
schemaVersion?: number;
|
|
12
|
+
allowExport?: boolean;
|
|
13
|
+
canComment?: boolean;
|
|
14
|
+
pageId?: string;
|
|
15
|
+
spaceId?: string;
|
|
16
|
+
saveStatus?: string;
|
|
17
|
+
inlineComments?: CommentItem[];
|
|
18
|
+
activeCommentId?: string | null;
|
|
19
|
+
collabDoc?: Doc | null;
|
|
20
|
+
collabAwareness?: Awareness | null;
|
|
21
|
+
mindMapViewState?: MindMapViewState;
|
|
22
|
+
uploadImage?: (file: File) => Promise<{
|
|
23
|
+
id: string;
|
|
24
|
+
alt: string;
|
|
25
|
+
}>;
|
|
26
|
+
uploadFile?: (file: File) => Promise<{
|
|
27
|
+
id: string;
|
|
28
|
+
filename: string;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
size: number;
|
|
31
|
+
}>;
|
|
32
|
+
onChange?: (value: ProseMirrorDoc, meta?: {
|
|
33
|
+
remote?: boolean;
|
|
34
|
+
}) => void;
|
|
35
|
+
onReady?: () => void;
|
|
36
|
+
onBlur?: () => void;
|
|
37
|
+
onError?: (error: Error) => void;
|
|
38
|
+
onNotice?: (notice: string) => void;
|
|
39
|
+
onRequestComment?: () => void;
|
|
40
|
+
onInlineMarkClick?: (id: string) => void;
|
|
41
|
+
onCommentsChanged?: () => void;
|
|
42
|
+
onSharePage?: () => void;
|
|
43
|
+
onConvertToSubpage?: (node: ProseMirrorNode) => void;
|
|
44
|
+
onSaveAsTemplate?: (node: ProseMirrorNode) => void;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface DocumentEditorHandle {
|
|
48
|
+
isReady: () => boolean;
|
|
49
|
+
whenReady: () => Promise<void>;
|
|
50
|
+
getJSON: () => ProseMirrorDoc;
|
|
51
|
+
getSnapshot: () => ProseMirrorDoc;
|
|
52
|
+
prepareSnapshot: () => Promise<{
|
|
53
|
+
doc: ProseMirrorDoc;
|
|
54
|
+
schemaVersion: number;
|
|
55
|
+
}>;
|
|
56
|
+
setContent: (doc: ProseMirrorDoc | null) => void;
|
|
57
|
+
hasPendingTasks: () => boolean;
|
|
58
|
+
hasSelection: () => boolean;
|
|
59
|
+
focus: () => void;
|
|
60
|
+
undo: () => boolean;
|
|
61
|
+
redo: () => boolean;
|
|
62
|
+
getSelectionRect: () => {
|
|
63
|
+
left: number;
|
|
64
|
+
top: number;
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
} | null;
|
|
68
|
+
getSelectionForAnchor: () => InlineAnchor | null;
|
|
69
|
+
setSelection: (from: number, to?: number) => void;
|
|
70
|
+
}
|
|
71
|
+
export declare const DocumentEditor: import("react").ForwardRefExoticComponent<DocumentEditorProps & import("react").RefAttributes<DocumentEditorHandle>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { previewItemsFrom, type PreviewItem } from '../engine/shared/preview-items';
|
|
2
|
+
export { previewItemsFrom };
|
|
3
|
+
export declare function ImagePreview({ src, label, items, index, onClose }: {
|
|
4
|
+
src: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
items?: PreviewItem[];
|
|
7
|
+
index?: number;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
allowExport?: boolean;
|
|
10
|
+
}): import("react").ReactPortal | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type LinkEditTarget } from '../engine/editor/link-edit';
|
|
2
|
+
export interface LinkTarget {
|
|
3
|
+
href: string;
|
|
4
|
+
from: number;
|
|
5
|
+
to: number;
|
|
6
|
+
tracked?: LinkEditTarget;
|
|
7
|
+
mode: 'edit' | 'preview';
|
|
8
|
+
anchor: {
|
|
9
|
+
left: number;
|
|
10
|
+
top: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function LinkPopover({ target, onEdit, onSave, onRemove, onClose }: {
|
|
16
|
+
target: LinkTarget;
|
|
17
|
+
onEdit: () => void;
|
|
18
|
+
onSave: (href: string) => void;
|
|
19
|
+
onRemove: () => void;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}): import("react").ReactPortal | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
export interface SelectionToolbarProps {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
canComment?: boolean;
|
|
7
|
+
onRequestComment?: () => void;
|
|
8
|
+
onRequestLink?: () => void;
|
|
9
|
+
onRemoveLink?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function SelectionToolbar({ editor, x, y, canComment, onRequestComment, onRequestLink, onRemoveLink }: SelectionToolbarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { WButton } from '../wui';
|
|
3
|
+
export interface SlashMenuProps {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
from: number;
|
|
6
|
+
query: string;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onPickFile: (kind: 'image' | 'file') => void;
|
|
11
|
+
onPickPage: () => void;
|
|
12
|
+
onPickVideo: () => void;
|
|
13
|
+
}
|
|
14
|
+
type PanelValue = {
|
|
15
|
+
rows?: number;
|
|
16
|
+
cols?: number;
|
|
17
|
+
count?: number;
|
|
18
|
+
};
|
|
19
|
+
export declare function InsertPicker({ mode, x, y, yBottom, boundTop, boundBottom, onPick, onClose }: {
|
|
20
|
+
mode: 'table' | 'columns';
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
yBottom?: number;
|
|
24
|
+
boundTop?: number;
|
|
25
|
+
boundBottom?: number;
|
|
26
|
+
onPick: (value: PanelValue) => void;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
export declare function SlashMenu({ editor, from, query, x, y, onClose, onPickFile, onPickPage, onPickVideo }: SlashMenuProps): import("react").JSX.Element;
|
|
30
|
+
export { WButton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type TableGeometry } from '../engine/editor/table-geometry';
|
|
3
|
+
export declare function TableControls({ editor, hover, revision, onNotice, onBlockDrag }: {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
hover: TableGeometry | null;
|
|
6
|
+
revision: number;
|
|
7
|
+
onNotice?: (message: string) => void;
|
|
8
|
+
onBlockDrag?: (pos: number, event: MouseEvent, onClick: () => void) => void;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VideoEmbedData } from 'wendang/internal/video-embed';
|
|
2
|
+
export declare function VideoEmbedDialog({ initialUrl, onClose, onInsert }: {
|
|
3
|
+
initialUrl?: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onInsert: (video: VideoEmbedData) => void;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
export declare function documentGestures(editor: Editor, shell: HTMLElement, options: {
|
|
3
|
+
layer: () => HTMLElement;
|
|
4
|
+
onStart: () => void;
|
|
5
|
+
onEnd: () => void;
|
|
6
|
+
onImagePick: (pos: number | null) => void;
|
|
7
|
+
onPreview: (image: HTMLImageElement) => void;
|
|
8
|
+
}): {
|
|
9
|
+
start: (pos: number, event: MouseEvent, onClick?: () => void) => void;
|
|
10
|
+
consumeClick: () => boolean;
|
|
11
|
+
cancel: () => void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Extensions, NodeViewRenderer } from '@tiptap/core';
|
|
2
|
+
import type { Doc } from 'yjs';
|
|
3
|
+
import type { Awareness } from 'y-protocols/awareness';
|
|
4
|
+
import { type InlineCommentHighlightOptions } from '../engine/editor/extensions/inline-comments';
|
|
5
|
+
import { type SlashOptions } from '../engine/editor/extensions/slash';
|
|
6
|
+
import { type BlockHandleOptions } from '../engine/editor/extensions/block-handle';
|
|
7
|
+
import { type UploadPlaceholderOptions } from '../engine/editor/extensions/upload-placeholder';
|
|
8
|
+
import { type TableInteractionOptions } from '../engine/editor/extensions/table-interaction';
|
|
9
|
+
import type { AttachmentFetcher } from '../host-types';
|
|
10
|
+
import type { ContentContext } from '../host';
|
|
11
|
+
export declare const COLLAB_FIELD = "default";
|
|
12
|
+
export interface CoreExtensionOptions {
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
collabDoc?: Doc | null;
|
|
15
|
+
collabField?: string;
|
|
16
|
+
collabAwareness?: Awareness | null;
|
|
17
|
+
attachmentFetcher?: AttachmentFetcher;
|
|
18
|
+
attachmentScope?: string;
|
|
19
|
+
inlineComments?: InlineCommentHighlightOptions;
|
|
20
|
+
slash?: SlashOptions;
|
|
21
|
+
blockHandle?: BlockHandleOptions;
|
|
22
|
+
uploadPlaceholder?: UploadPlaceholderOptions;
|
|
23
|
+
tableInteraction?: TableInteractionOptions;
|
|
24
|
+
mindMapRenderer?: NodeViewRenderer;
|
|
25
|
+
videoRenderer?: NodeViewRenderer;
|
|
26
|
+
canCopyCode?: () => boolean;
|
|
27
|
+
contentContext?: () => ContentContext;
|
|
28
|
+
}
|
|
29
|
+
export declare function coreExtensions(options?: CoreExtensionOptions): Extensions;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Node, type NodeViewRenderer } from '@tiptap/core';
|
|
2
|
+
export { Columns, Column, buildColumnsJson } from '../engine/editor/nodes/columns';
|
|
3
|
+
export { FileAttachment } from '../engine/editor/nodes/file';
|
|
4
|
+
export { YwikiImage } from '../engine/editor/nodes/image';
|
|
5
|
+
export { ImageGallery } from '../engine/editor/nodes/image-gallery';
|
|
6
|
+
export { TextStyle, Highlight } from '../engine/editor/nodes/inline-style';
|
|
7
|
+
export { MathInline, MathBlock } from '../engine/editor/nodes/math';
|
|
8
|
+
export { PageLink } from '../engine/editor/nodes/page-link';
|
|
9
|
+
export { Mention } from '../engine/editor/nodes/mention';
|
|
10
|
+
export { AlignedTableCell, AlignedTableHeader } from '../engine/editor/nodes/table-cell';
|
|
11
|
+
export declare const Callout: Node<{
|
|
12
|
+
renderer?: NodeViewRenderer;
|
|
13
|
+
}, any>;
|
|
14
|
+
export { MindMapTopic, MindMapDescription, MindMapNote, MindMapRelation } from '../engine/editor/nodes/mind-map-schema';
|
|
15
|
+
export declare const MindMap: Node<{
|
|
16
|
+
renderer?: NodeViewRenderer;
|
|
17
|
+
}, any>;
|
|
18
|
+
export declare const VideoEmbed: Node<{
|
|
19
|
+
renderer?: NodeViewRenderer;
|
|
20
|
+
}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'wendang/internal/presence';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
export type BlockCommandGroup = 'basic' | 'common';
|
|
3
|
+
export interface BlockCommand {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
hint: string;
|
|
7
|
+
group: BlockCommandGroup;
|
|
8
|
+
icon: string;
|
|
9
|
+
convertible?: boolean;
|
|
10
|
+
panel?: 'table' | 'columns';
|
|
11
|
+
keywords: string[];
|
|
12
|
+
run: (ctx: BlockCommandContext) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface BlockCommandContext {
|
|
15
|
+
chain: () => ReturnType<Editor['chain']>;
|
|
16
|
+
requestPickFile?: (kind: 'image' | 'file') => void;
|
|
17
|
+
requestPickPage?: () => void;
|
|
18
|
+
requestVideo?: () => void;
|
|
19
|
+
panelValue?: {
|
|
20
|
+
rows?: number;
|
|
21
|
+
cols?: number;
|
|
22
|
+
count?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare const BLOCK_COMMANDS: BlockCommand[];
|
|
26
|
+
export declare const BLOCK_COMMAND_GROUPS: Array<{
|
|
27
|
+
id: BlockCommandGroup;
|
|
28
|
+
label: string;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function filterBlockCommands(query: string): BlockCommand[];
|
|
31
|
+
export declare function groupOf(commands: BlockCommand[]): Array<{
|
|
32
|
+
id: BlockCommandGroup;
|
|
33
|
+
label: string;
|
|
34
|
+
items: BlockCommand[];
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import type { Node as PMNode } from '@tiptap/pm/model';
|
|
3
|
+
import { type EditorState } from '@tiptap/pm/state';
|
|
4
|
+
export declare const BLOCK_TEXTUAL_TYPES: readonly ["paragraph", "heading", "blockquote", "codeBlock", "bulletList", "orderedList", "taskList", "callout"];
|
|
5
|
+
export interface MenuBlockRange {
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
nodes: PMNode[];
|
|
9
|
+
}
|
|
10
|
+
export declare function menuBlockRange(state: EditorState, pos: number): MenuBlockRange | null;
|
|
11
|
+
export declare function canConvertMenuBlocks(state: EditorState, pos: number, id: string): boolean;
|
|
12
|
+
export declare function convertMenuBlocks(editor: Editor, pos: number, id: string): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface GapCandidate {
|
|
2
|
+
pos: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function pickNearestGap(gaps: GapCandidate[], pointerY: number): GapCandidate | null;
|
|
6
|
+
export interface MovePlan {
|
|
7
|
+
deleteFrom: number;
|
|
8
|
+
deleteTo: number;
|
|
9
|
+
insertAt: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function planBlockMove(params: {
|
|
12
|
+
docSize: number;
|
|
13
|
+
from: number;
|
|
14
|
+
size: number;
|
|
15
|
+
gapPos: number;
|
|
16
|
+
}): MovePlan | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const BLOCK_SUBMENU_GAP = 6;
|
|
2
|
+
export declare const BLOCK_MENU_VIEW_MARGIN = 8;
|
|
3
|
+
export declare function placeBlockSubmenu(parent: {
|
|
4
|
+
left: number;
|
|
5
|
+
right: number;
|
|
6
|
+
}, rowTop: number, panel: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}, viewport: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}): {
|
|
13
|
+
left: number;
|
|
14
|
+
top: number;
|
|
15
|
+
maxHeight: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type CalloutAttrs } from '../shared/callout';
|
|
3
|
+
export declare function patchCallout(editor: Editor, pos: number, attrs: CalloutAttrs): boolean;
|
|
4
|
+
export declare function unwrapCallout(editor: Editor, pos: number): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export declare const TEXT_ALIGNS: readonly ["left", "center", "right", "justify"];
|
|
3
|
+
export type TextAlign = (typeof TEXT_ALIGNS)[number];
|
|
4
|
+
export declare const MAX_INDENT = 6;
|
|
5
|
+
export declare const INDENT_STEP_PX = 24;
|
|
6
|
+
export interface BlockFormatOptions {
|
|
7
|
+
types?: string[];
|
|
8
|
+
}
|
|
9
|
+
declare module '@tiptap/core' {
|
|
10
|
+
interface Commands<ReturnType> {
|
|
11
|
+
blockFormat: {
|
|
12
|
+
setTextAlign: (align: TextAlign | null) => ReturnType;
|
|
13
|
+
indentBlock: () => ReturnType;
|
|
14
|
+
outdentBlock: () => ReturnType;
|
|
15
|
+
setIndent: (level: number) => ReturnType;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export declare const BlockFormat: Extension<BlockFormatOptions, any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
export interface BlockHoverInfo {
|
|
4
|
+
pos: number;
|
|
5
|
+
type: string;
|
|
6
|
+
top: number;
|
|
7
|
+
contentLeft: number;
|
|
8
|
+
isEmpty: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BlockHandleOptions {
|
|
11
|
+
onHover: (info: BlockHoverInfo | null) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function isEmptyLineBlock(typeName: string, contentSize: number): boolean;
|
|
14
|
+
export declare const BlockHandleKey: PluginKey<{
|
|
15
|
+
dummy: true;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const BlockHandle: Extension<BlockHandleOptions, any>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey, Selection } from '@tiptap/pm/state';
|
|
3
|
+
import type { Transaction } from '@tiptap/pm/state';
|
|
4
|
+
import { Slice } from '@tiptap/pm/model';
|
|
5
|
+
import type { ResolvedPos } from '@tiptap/pm/model';
|
|
6
|
+
import type { Mapping } from '@tiptap/pm/transform';
|
|
7
|
+
import type { EditorView } from '@tiptap/pm/view';
|
|
8
|
+
import type { Node as PMNode } from '@tiptap/pm/model';
|
|
9
|
+
export interface SelectionPadding {
|
|
10
|
+
top: number;
|
|
11
|
+
bottom: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SelectedBlock {
|
|
14
|
+
from: number;
|
|
15
|
+
to: number;
|
|
16
|
+
padding?: SelectionPadding;
|
|
17
|
+
images?: SelectionPart[];
|
|
18
|
+
}
|
|
19
|
+
export interface SelectionPart {
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
}
|
|
23
|
+
export type BlockSelectionPart = {
|
|
24
|
+
kind: 'block';
|
|
25
|
+
from: number;
|
|
26
|
+
to: number;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'images';
|
|
29
|
+
from: number;
|
|
30
|
+
to: number;
|
|
31
|
+
images: SelectionPart[];
|
|
32
|
+
};
|
|
33
|
+
export declare const blockSelectionKey: PluginKey<{
|
|
34
|
+
blocks: SelectedBlock[];
|
|
35
|
+
}>;
|
|
36
|
+
export declare const SELECT_PAD_X = 6;
|
|
37
|
+
export declare const SELECT_PAD_Y = 5;
|
|
38
|
+
export interface BlockSelectionBand {
|
|
39
|
+
left: number;
|
|
40
|
+
right: number;
|
|
41
|
+
}
|
|
42
|
+
export declare function blockSelectionBand(view: EditorView): BlockSelectionBand;
|
|
43
|
+
export declare function blockSelectionBandRect(view: EditorView): DOMRect | null;
|
|
44
|
+
export declare function bandSide(x: number, proseLeft: number, proseRight: number, band: BlockSelectionBand): 'left' | 'right' | null;
|
|
45
|
+
export declare function scrollParentOf(element: Element | null): HTMLElement | null;
|
|
46
|
+
export declare function autoScrollDelta(pointerY: number, top: number, bottom: number, edge?: number, maxSpeed?: number): number;
|
|
47
|
+
export declare class BlockRangeSelection extends Selection {
|
|
48
|
+
readonly parts?: BlockSelectionPart[];
|
|
49
|
+
constructor($from: ResolvedPos, $to: ResolvedPos, parts?: BlockSelectionPart[]);
|
|
50
|
+
visible: boolean;
|
|
51
|
+
content(): Slice;
|
|
52
|
+
replace(tr: Transaction, content?: Slice): void;
|
|
53
|
+
eq(other: Selection): boolean;
|
|
54
|
+
map(doc: PMNode, mapping: Mapping): Selection;
|
|
55
|
+
toJSON(): {
|
|
56
|
+
type: string;
|
|
57
|
+
from: number;
|
|
58
|
+
to: number;
|
|
59
|
+
parts: BlockSelectionPart[] | undefined;
|
|
60
|
+
};
|
|
61
|
+
static fromJSON(doc: PMNode, json: {
|
|
62
|
+
from: number;
|
|
63
|
+
to: number;
|
|
64
|
+
parts?: BlockSelectionPart[];
|
|
65
|
+
}): BlockRangeSelection;
|
|
66
|
+
getBookmark(): import("@tiptap/pm/state").SelectionBookmark;
|
|
67
|
+
}
|
|
68
|
+
interface BlockHit {
|
|
69
|
+
pos: number;
|
|
70
|
+
node: PMNode;
|
|
71
|
+
}
|
|
72
|
+
export declare function gutterAreaHit(view: EditorView, event: MouseEvent): BlockHit | null;
|
|
73
|
+
export declare function coveredBlocks(doc: PMNode, aPos: number, bPos: number): Array<{
|
|
74
|
+
from: number;
|
|
75
|
+
to: number;
|
|
76
|
+
}>;
|
|
77
|
+
export interface MarqueeRect {
|
|
78
|
+
left: number;
|
|
79
|
+
top: number;
|
|
80
|
+
right: number;
|
|
81
|
+
bottom: number;
|
|
82
|
+
}
|
|
83
|
+
export declare function rectsIntersect(a: MarqueeRect, b: MarqueeRect): boolean;
|
|
84
|
+
export declare function marqueeImageRanges(galleryFrom: number, sizes: readonly number[], childRects: ReadonlyArray<MarqueeRect | null>, marquee: MarqueeRect): SelectionPart[];
|
|
85
|
+
export declare function selectionPartsForRange(view: EditorView, doc: PMNode, aPos: number, bPos: number, marquee: MarqueeRect): BlockSelectionPart[];
|
|
86
|
+
export declare function marqueeBox(startX: number, startY: number, x: number, y: number, hostLeft: number, hostTop: number): {
|
|
87
|
+
left: number;
|
|
88
|
+
top: number;
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
};
|
|
92
|
+
export declare function clampMarqueeBand(bandLeft: number, bandRight: number, hostLeft: number, hostRight: number, viewportRight?: number): {
|
|
93
|
+
left: number;
|
|
94
|
+
right: number;
|
|
95
|
+
};
|
|
96
|
+
export declare const BLOCK_SELECT_SLOP_PX = 8;
|
|
97
|
+
export declare function isBlockSelectGesture(dx: number, dy: number): boolean;
|
|
98
|
+
export declare function gutterClickCaretPos(doc: PMNode, pos: number): number | null;
|
|
99
|
+
export declare function shouldSuppressNativeHighlight(blocks: Array<{
|
|
100
|
+
from: number;
|
|
101
|
+
to: number;
|
|
102
|
+
}> | undefined): boolean;
|
|
103
|
+
export declare const MIN_BAND_GAP = 6;
|
|
104
|
+
export declare function selectionPadding(rects: ReadonlyArray<{
|
|
105
|
+
top: number;
|
|
106
|
+
bottom: number;
|
|
107
|
+
}>): SelectionPadding[];
|
|
108
|
+
export declare function measureBlocksPadding(view: EditorView, blocks: ReadonlyArray<{
|
|
109
|
+
from: number;
|
|
110
|
+
to: number;
|
|
111
|
+
}>): SelectionPadding[];
|
|
112
|
+
export declare function setBlockRangeSelection(view: EditorView, anchorPos: number, targetPos: number, marquee?: MarqueeRect): boolean;
|
|
113
|
+
export declare function clearBlockRangeSelection(view: EditorView): void;
|
|
114
|
+
export declare function setImageRangeSelection(view: EditorView, galleryPos: number, imageRanges: SelectionPart[]): boolean;
|
|
115
|
+
export declare function getSelectedBlocks(view: EditorView): SelectedBlock[];
|
|
116
|
+
export declare const BlockSelection: Extension<any, any>;
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
import type { Awareness } from 'y-protocols/awareness';
|
|
4
|
+
export interface CollabCursorOptions {
|
|
5
|
+
awareness: Awareness | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const CollabCursorPluginKey: PluginKey<any>;
|
|
8
|
+
export declare function buildCursor(user: {
|
|
9
|
+
name?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
colorLight?: string;
|
|
12
|
+
}): HTMLElement;
|
|
13
|
+
export declare const CollabCursor: Extension<CollabCursorOptions, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
import { shouldIgnoreForIme } from '../ime/composition-state';
|
|
4
|
+
export declare const imeKey: PluginKey<{
|
|
5
|
+
composing: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ImeGuard: Extension<any, any>;
|
|
8
|
+
export { shouldIgnoreForIme };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Extension, type Editor } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
import type { CommentItem } from 'wendang/types';
|
|
4
|
+
export interface InlineCommentHighlightOptions {
|
|
5
|
+
getComments: () => CommentItem[];
|
|
6
|
+
getActiveId?: () => string | null;
|
|
7
|
+
onMarkClick?: (commentId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
interface PluginState {
|
|
10
|
+
comments: CommentItem[];
|
|
11
|
+
}
|
|
12
|
+
export declare const inlineCommentPluginKey: PluginKey<PluginState>;
|
|
13
|
+
export declare const InlineCommentHighlight: Extension<InlineCommentHighlightOptions, any>;
|
|
14
|
+
export declare function refreshInlineComments(editor: Editor, comments: CommentItem[]): void;
|
|
15
|
+
export {};
|