@dxos/react-ui-editor 0.8.4-main.f9ba587 → 0.8.4-main.fffef41
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/lib/browser/{chunk-22UMM3QJ.mjs → chunk-HL3YF6WC.mjs} +2 -2
- package/dist/lib/browser/chunk-HL3YF6WC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +8336 -6713
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/{chunk-YXYQPV6R.mjs → chunk-YJZGD3LY.mjs} +2 -2
- package/dist/lib/node-esm/chunk-YJZGD3LY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +8336 -6713
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/components/Editor/Editor.d.ts +37 -15
- package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
- package/dist/types/src/components/Editor/Editor.stories.d.ts +20 -0
- package/dist/types/src/components/Editor/Editor.stories.d.ts.map +1 -0
- package/dist/types/src/components/EditorContent/EditorContent.d.ts +29 -0
- package/dist/types/src/components/EditorContent/EditorContent.d.ts.map +1 -0
- package/dist/types/src/components/EditorContent/EditorContent.stories.d.ts +26 -0
- package/dist/types/src/components/EditorContent/EditorContent.stories.d.ts.map +1 -0
- package/dist/types/src/components/EditorContent/controller.d.ts +10 -0
- package/dist/types/src/components/EditorContent/controller.d.ts.map +1 -0
- package/dist/types/src/components/EditorContent/index.d.ts +3 -0
- package/dist/types/src/components/EditorContent/index.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts +36 -0
- package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/index.d.ts +7 -0
- package/dist/types/src/components/EditorMenuProvider/index.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/menu-presets.d.ts +4 -0
- package/dist/types/src/components/EditorMenuProvider/menu-presets.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/menu.d.ts +28 -0
- package/dist/types/src/components/EditorMenuProvider/menu.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/popover.d.ts +47 -0
- package/dist/types/src/components/EditorMenuProvider/popover.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/useEditorMenu.d.ts +34 -0
- package/dist/types/src/components/EditorMenuProvider/useEditorMenu.d.ts.map +1 -0
- package/dist/types/src/components/EditorMenuProvider/util.d.ts +8 -0
- package/dist/types/src/components/EditorMenuProvider/util.d.ts.map +1 -0
- package/dist/types/src/components/EditorPreviewProvider/EditorPreviewProvider.d.ts +16 -0
- package/dist/types/src/components/EditorPreviewProvider/EditorPreviewProvider.d.ts.map +1 -0
- package/dist/types/src/components/EditorPreviewProvider/index.d.ts +2 -0
- package/dist/types/src/components/EditorPreviewProvider/index.d.ts.map +1 -0
- package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +26 -2
- package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/actions.d.ts +39 -0
- package/dist/types/src/components/EditorToolbar/actions.d.ts.map +1 -0
- package/dist/types/src/components/EditorToolbar/blocks.d.ts +3 -3
- package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/formatting.d.ts +3 -3
- package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/headings.d.ts +3 -3
- package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/image.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/index.d.ts +2 -1
- package/dist/types/src/components/EditorToolbar/index.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/useEditorToolbar.d.ts +11 -0
- package/dist/types/src/components/EditorToolbar/useEditorToolbar.d.ts.map +1 -0
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts +3 -3
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/defaults.d.ts.map +1 -1
- package/dist/types/src/extensions/autocomplete/autocomplete.d.ts +17 -0
- package/dist/types/src/extensions/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/types/src/extensions/autocomplete/index.d.ts +5 -0
- package/dist/types/src/extensions/autocomplete/index.d.ts.map +1 -0
- package/dist/types/src/extensions/autocomplete/match.d.ts +13 -0
- package/dist/types/src/extensions/autocomplete/match.d.ts.map +1 -0
- package/dist/types/src/extensions/autocomplete/placeholder.d.ts +20 -0
- package/dist/types/src/extensions/autocomplete/placeholder.d.ts.map +1 -0
- package/dist/types/src/extensions/autocomplete/typeahead.d.ts +10 -0
- package/dist/types/src/extensions/autocomplete/typeahead.d.ts.map +1 -0
- package/dist/types/src/extensions/automerge/automerge.d.ts +1 -1
- package/dist/types/src/extensions/automerge/automerge.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts +10 -19
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/cursor.d.ts +1 -1
- package/dist/types/src/extensions/automerge/cursor.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/defs.d.ts +1 -1
- package/dist/types/src/extensions/automerge/defs.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/sync.d.ts +3 -3
- package/dist/types/src/extensions/automerge/sync.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/update-automerge.d.ts +1 -1
- package/dist/types/src/extensions/automerge/update-automerge.d.ts.map +1 -1
- package/dist/types/src/extensions/autoscroll.d.ts +20 -0
- package/dist/types/src/extensions/autoscroll.d.ts.map +1 -0
- package/dist/types/src/extensions/awareness/awareness-provider.d.ts +1 -1
- package/dist/types/src/extensions/awareness/awareness-provider.d.ts.map +1 -1
- package/dist/types/src/extensions/blocks.d.ts +2 -0
- package/dist/types/src/extensions/blocks.d.ts.map +1 -0
- package/dist/types/src/extensions/bookmarks.d.ts +12 -0
- package/dist/types/src/extensions/bookmarks.d.ts.map +1 -0
- package/dist/types/src/extensions/comments.d.ts +1 -1
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/dist/types/src/extensions/dnd.d.ts.map +1 -1
- package/dist/types/src/extensions/factories.d.ts +20 -19
- package/dist/types/src/extensions/factories.d.ts.map +1 -1
- package/dist/types/src/extensions/focus.d.ts.map +1 -1
- package/dist/types/src/extensions/folding.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +10 -1
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/json.d.ts +1 -1
- package/dist/types/src/extensions/json.d.ts.map +1 -1
- package/dist/types/src/extensions/listener.d.ts +8 -6
- package/dist/types/src/extensions/listener.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/action.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/bundle.d.ts +8 -2
- package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/changes.d.ts +1 -1
- package/dist/types/src/extensions/markdown/changes.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/decorate.d.ts +9 -1
- package/dist/types/src/extensions/markdown/decorate.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/formatting.d.ts +2 -4
- package/dist/types/src/extensions/markdown/formatting.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/formatting.test.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/highlight.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/image.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/link.d.ts.map +1 -1
- package/dist/types/src/extensions/modal.d.ts +7 -0
- package/dist/types/src/extensions/modal.d.ts.map +1 -0
- package/dist/types/src/extensions/modes.d.ts +1 -1
- package/dist/types/src/extensions/modes.d.ts.map +1 -1
- package/dist/types/src/extensions/outliner/menu.d.ts +8 -0
- package/dist/types/src/extensions/outliner/menu.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/outliner.d.ts +1 -1
- package/dist/types/src/extensions/outliner/outliner.d.ts.map +1 -1
- package/dist/types/src/extensions/outliner/selection.d.ts.map +1 -1
- package/dist/types/src/extensions/outliner/tree.d.ts +2 -2
- package/dist/types/src/extensions/outliner/tree.d.ts.map +1 -1
- package/dist/types/src/extensions/preview/preview.d.ts +8 -8
- package/dist/types/src/extensions/preview/preview.d.ts.map +1 -1
- package/dist/types/src/extensions/replacer.d.ts +21 -0
- package/dist/types/src/extensions/replacer.d.ts.map +1 -0
- package/dist/types/src/extensions/replacer.test.d.ts +2 -0
- package/dist/types/src/extensions/replacer.test.d.ts.map +1 -0
- package/dist/types/src/extensions/scrolling.d.ts +78 -0
- package/dist/types/src/extensions/scrolling.d.ts.map +1 -0
- package/dist/types/src/extensions/state.d.ts +2 -0
- package/dist/types/src/extensions/state.d.ts.map +1 -0
- package/dist/types/src/extensions/submit.d.ts +10 -0
- package/dist/types/src/extensions/submit.d.ts.map +1 -0
- package/dist/types/src/extensions/tab.d.ts +4 -0
- package/dist/types/src/extensions/tab.d.ts.map +1 -0
- package/dist/types/src/extensions/tags/extended-markdown.d.ts +10 -0
- package/dist/types/src/extensions/tags/extended-markdown.d.ts.map +1 -0
- package/dist/types/src/extensions/tags/extended-markdown.test.d.ts +2 -0
- package/dist/types/src/extensions/tags/extended-markdown.test.d.ts.map +1 -0
- package/dist/types/src/extensions/tags/index.d.ts +4 -0
- package/dist/types/src/extensions/tags/index.d.ts.map +1 -0
- package/dist/types/src/extensions/tags/streamer.d.ts +12 -0
- package/dist/types/src/extensions/tags/streamer.d.ts.map +1 -0
- package/dist/types/src/extensions/tags/xml-tags.d.ts +97 -0
- package/dist/types/src/extensions/tags/xml-tags.d.ts.map +1 -0
- package/dist/types/src/extensions/tags/xml-util.d.ts +10 -0
- package/dist/types/src/extensions/tags/xml-util.d.ts.map +1 -0
- package/dist/types/src/hooks/useTextEditor.d.ts +5 -9
- package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
- package/dist/types/src/stories/CommandDialog.stories.d.ts +14 -0
- package/dist/types/src/stories/CommandDialog.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Comments.stories.d.ts +21 -10
- package/dist/types/src/stories/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/stories/EditorToolbar.stories.d.ts +39 -3
- package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Experimental.stories.d.ts +22 -13
- package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Markdown.stories.d.ts +32 -43
- package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Outliner.stories.d.ts +15 -21
- package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Popover.stories.d.ts +20 -0
- package/dist/types/src/stories/Popover.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Preview.stories.d.ts +22 -7
- package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Tags.stories.d.ts +16 -0
- package/dist/types/src/stories/Tags.stories.d.ts.map +1 -0
- package/dist/types/src/stories/TextEditor.stories.d.ts +37 -52
- package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/EditorStory.d.ts +8 -9
- package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
- package/dist/types/src/stories/components/util.d.ts.map +1 -1
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -1
- package/dist/types/src/types/types.d.ts +2 -2
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/cursor.d.ts.map +1 -1
- package/dist/types/src/util/debug.d.ts +5 -1
- package/dist/types/src/util/debug.d.ts.map +1 -1
- package/dist/types/src/util/decorations.d.ts +4 -0
- package/dist/types/src/util/decorations.d.ts.map +1 -0
- package/dist/types/src/util/dom.d.ts +2 -12
- package/dist/types/src/util/dom.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/react.d.ts +1 -1
- package/dist/types/src/util/react.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +72 -67
- package/src/components/Editor/Editor.stories.tsx +89 -0
- package/src/components/Editor/Editor.tsx +160 -25
- package/src/components/EditorContent/EditorContent.stories.tsx +70 -0
- package/src/components/EditorContent/EditorContent.tsx +70 -0
- package/src/components/EditorContent/controller.ts +50 -0
- package/src/components/EditorContent/index.ts +6 -0
- package/src/components/EditorMenuProvider/EditorMenuProvider.tsx +233 -0
- package/src/components/EditorMenuProvider/index.ts +11 -0
- package/src/components/EditorMenuProvider/menu-presets.ts +123 -0
- package/src/components/EditorMenuProvider/menu.ts +71 -0
- package/src/components/EditorMenuProvider/popover.ts +287 -0
- package/src/components/EditorMenuProvider/useEditorMenu.ts +175 -0
- package/src/components/EditorMenuProvider/util.ts +31 -0
- package/src/components/EditorPreviewProvider/EditorPreviewProvider.tsx +82 -0
- package/src/components/EditorPreviewProvider/index.ts +5 -0
- package/src/components/EditorToolbar/EditorToolbar.tsx +116 -96
- package/src/components/EditorToolbar/actions.ts +86 -0
- package/src/components/EditorToolbar/blocks.ts +23 -25
- package/src/components/EditorToolbar/formatting.ts +23 -25
- package/src/components/EditorToolbar/headings.ts +17 -9
- package/src/components/EditorToolbar/image.ts +9 -5
- package/src/components/EditorToolbar/index.ts +3 -7
- package/src/components/EditorToolbar/search.ts +9 -5
- package/src/components/EditorToolbar/useEditorToolbar.ts +20 -0
- package/src/components/EditorToolbar/view-mode.ts +12 -6
- package/src/components/index.ts +8 -2
- package/src/defaults.ts +5 -2
- package/src/extensions/autocomplete/autocomplete.ts +151 -0
- package/src/extensions/autocomplete/index.ts +8 -0
- package/src/extensions/autocomplete/match.ts +46 -0
- package/src/extensions/{command → autocomplete}/placeholder.ts +22 -18
- package/src/extensions/{command → autocomplete}/typeahead.ts +8 -50
- package/src/extensions/automerge/automerge.stories.tsx +32 -25
- package/src/extensions/automerge/automerge.ts +31 -11
- package/src/extensions/automerge/cursor.ts +1 -1
- package/src/extensions/automerge/defs.ts +1 -1
- package/src/extensions/automerge/sync.ts +9 -5
- package/src/extensions/automerge/update-automerge.ts +2 -2
- package/src/extensions/autoscroll.ts +163 -0
- package/src/extensions/awareness/awareness-provider.ts +2 -2
- package/src/extensions/awareness/awareness.ts +2 -2
- package/src/extensions/blocks.ts +131 -0
- package/src/extensions/bookmarks.ts +75 -0
- package/src/extensions/comments.ts +20 -14
- package/src/extensions/dnd.ts +1 -1
- package/src/extensions/factories.ts +56 -37
- package/src/extensions/focus.ts +5 -4
- package/src/extensions/folding.tsx +3 -6
- package/src/extensions/hashtag.tsx +2 -2
- package/src/extensions/index.ts +10 -1
- package/src/extensions/json.ts +1 -1
- package/src/extensions/listener.ts +14 -20
- package/src/extensions/markdown/action.ts +2 -1
- package/src/extensions/markdown/bundle.ts +40 -6
- package/src/extensions/markdown/changes.ts +1 -1
- package/src/extensions/markdown/decorate.ts +32 -22
- package/src/extensions/markdown/formatting.test.ts +6 -6
- package/src/extensions/markdown/formatting.ts +11 -13
- package/src/extensions/markdown/highlight.ts +2 -2
- package/src/extensions/markdown/image.ts +5 -6
- package/src/extensions/markdown/link.ts +3 -0
- package/src/extensions/markdown/table.ts +13 -7
- package/src/extensions/mention.ts +1 -1
- package/src/extensions/modal.ts +24 -0
- package/src/extensions/modes.ts +2 -2
- package/src/extensions/{command/floating-menu.ts → outliner/menu.ts} +16 -21
- package/src/extensions/outliner/outliner.test.ts +3 -2
- package/src/extensions/outliner/outliner.ts +8 -7
- package/src/extensions/outliner/selection.ts +1 -1
- package/src/extensions/outliner/tree.test.ts +3 -2
- package/src/extensions/outliner/tree.ts +2 -2
- package/src/extensions/preview/index.ts +1 -1
- package/src/extensions/preview/preview.ts +69 -69
- package/src/extensions/replacer.test.ts +75 -0
- package/src/extensions/replacer.ts +93 -0
- package/src/extensions/scrolling.ts +189 -0
- package/src/extensions/selection.ts +3 -3
- package/src/extensions/state.ts +7 -0
- package/src/extensions/submit.ts +62 -0
- package/src/extensions/tab.ts +29 -0
- package/src/extensions/tags/extended-markdown.test.ts +262 -0
- package/src/extensions/tags/extended-markdown.ts +78 -0
- package/src/extensions/tags/index.ts +7 -0
- package/src/extensions/tags/streamer.ts +243 -0
- package/src/extensions/tags/xml-tags.ts +500 -0
- package/src/extensions/tags/xml-util.ts +94 -0
- package/src/extensions/typewriter.ts +1 -1
- package/src/hooks/useTextEditor.ts +31 -43
- package/src/stories/CommandDialog.stories.tsx +83 -0
- package/src/stories/Comments.stories.tsx +17 -14
- package/src/stories/EditorToolbar.stories.tsx +21 -20
- package/src/stories/Experimental.stories.tsx +17 -13
- package/src/stories/Markdown.stories.tsx +26 -22
- package/src/stories/Outliner.stories.tsx +51 -39
- package/src/stories/Popover.stories.tsx +162 -0
- package/src/stories/Preview.stories.tsx +57 -52
- package/src/stories/Tags.stories.tsx +95 -0
- package/src/stories/TextEditor.stories.tsx +42 -61
- package/src/stories/components/EditorStory.tsx +36 -24
- package/src/stories/components/util.tsx +40 -8
- package/src/styles/markdown.ts +1 -1
- package/src/styles/theme.ts +18 -15
- package/src/translations.ts +1 -1
- package/src/types/types.ts +1 -1
- package/src/util/cursor.ts +2 -1
- package/src/util/debug.ts +7 -2
- package/src/util/decorations.ts +21 -0
- package/src/util/dom.ts +5 -27
- package/src/util/index.ts +1 -0
- package/src/util/react.tsx +1 -1
- package/dist/lib/browser/chunk-22UMM3QJ.mjs.map +0 -7
- package/dist/lib/browser/testing/index.mjs +0 -6
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YXYQPV6R.mjs.map +0 -7
- package/dist/lib/node-esm/testing/index.mjs +0 -8
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/components/EditorToolbar/lists.d.ts +0 -19
- package/dist/types/src/components/EditorToolbar/lists.d.ts.map +0 -1
- package/dist/types/src/components/EditorToolbar/util.d.ts +0 -51
- package/dist/types/src/components/EditorToolbar/util.d.ts.map +0 -1
- package/dist/types/src/components/Popover/CommandMenu.d.ts +0 -34
- package/dist/types/src/components/Popover/CommandMenu.d.ts.map +0 -1
- package/dist/types/src/components/Popover/RefDropdownMenu.d.ts +0 -21
- package/dist/types/src/components/Popover/RefDropdownMenu.d.ts.map +0 -1
- package/dist/types/src/components/Popover/RefPopover.d.ts +0 -34
- package/dist/types/src/components/Popover/RefPopover.d.ts.map +0 -1
- package/dist/types/src/components/Popover/index.d.ts +0 -4
- package/dist/types/src/components/Popover/index.d.ts.map +0 -1
- package/dist/types/src/extensions/autocomplete.d.ts +0 -13
- package/dist/types/src/extensions/autocomplete.d.ts.map +0 -1
- package/dist/types/src/extensions/command/action.d.ts +0 -17
- package/dist/types/src/extensions/command/action.d.ts.map +0 -1
- package/dist/types/src/extensions/command/command-menu.d.ts +0 -20
- package/dist/types/src/extensions/command/command-menu.d.ts.map +0 -1
- package/dist/types/src/extensions/command/command.d.ts +0 -6
- package/dist/types/src/extensions/command/command.d.ts.map +0 -1
- package/dist/types/src/extensions/command/floating-menu.d.ts +0 -7
- package/dist/types/src/extensions/command/floating-menu.d.ts.map +0 -1
- package/dist/types/src/extensions/command/hint.d.ts +0 -24
- package/dist/types/src/extensions/command/hint.d.ts.map +0 -1
- package/dist/types/src/extensions/command/index.d.ts +0 -7
- package/dist/types/src/extensions/command/index.d.ts.map +0 -1
- package/dist/types/src/extensions/command/placeholder.d.ts +0 -10
- package/dist/types/src/extensions/command/placeholder.d.ts.map +0 -1
- package/dist/types/src/extensions/command/state.d.ts +0 -16
- package/dist/types/src/extensions/command/state.d.ts.map +0 -1
- package/dist/types/src/extensions/command/typeahead.d.ts +0 -22
- package/dist/types/src/extensions/command/typeahead.d.ts.map +0 -1
- package/dist/types/src/extensions/command/useCommandMenu.d.ts +0 -26
- package/dist/types/src/extensions/command/useCommandMenu.d.ts.map +0 -1
- package/dist/types/src/stories/Command.stories.d.ts +0 -7
- package/dist/types/src/stories/Command.stories.d.ts.map +0 -1
- package/dist/types/src/stories/CommandMenu.stories.d.ts +0 -13
- package/dist/types/src/stories/CommandMenu.stories.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/util.d.ts +0 -2
- package/dist/types/src/testing/util.d.ts.map +0 -1
- package/src/components/EditorToolbar/lists.ts +0 -59
- package/src/components/EditorToolbar/util.ts +0 -65
- package/src/components/Popover/CommandMenu.tsx +0 -279
- package/src/components/Popover/RefDropdownMenu.tsx +0 -85
- package/src/components/Popover/RefPopover.tsx +0 -99
- package/src/components/Popover/index.ts +0 -7
- package/src/extensions/autocomplete.ts +0 -69
- package/src/extensions/command/action.ts +0 -56
- package/src/extensions/command/command-menu.ts +0 -210
- package/src/extensions/command/command.ts +0 -34
- package/src/extensions/command/hint.ts +0 -102
- package/src/extensions/command/index.ts +0 -10
- package/src/extensions/command/state.ts +0 -89
- package/src/extensions/command/useCommandMenu.ts +0 -118
- package/src/stories/Command.stories.tsx +0 -97
- package/src/stories/CommandMenu.stories.tsx +0 -159
- package/src/testing/index.ts +0 -5
- package/src/testing/util.ts +0 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
export type AutocompleteOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Function that returns a list of suggestions based on the current text.
|
|
5
|
+
* @param text The current text before the cursor
|
|
6
|
+
* @returns Array of suggestion strings
|
|
7
|
+
*/
|
|
8
|
+
onSuggest?: (text: string) => string[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Creates an autocomplete extension that shows inline suggestions.
|
|
12
|
+
* Pressing Tab will complete the suggestion.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use typeahead.
|
|
15
|
+
*/
|
|
16
|
+
export declare const autocomplete: ({ onSuggest }?: AutocompleteOptions) => Extension;
|
|
17
|
+
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/autocomplete.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,mBAAmB,CAAC;AAWzD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CACxC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,gBAAe,mBAAwB,KAAG,SAuGtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type CompoetionContext = {
|
|
2
|
+
line: string;
|
|
3
|
+
};
|
|
4
|
+
export type CompletionOptions = {
|
|
5
|
+
default?: string;
|
|
6
|
+
minLength?: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Util to match current line to a static list of completions.
|
|
10
|
+
*/
|
|
11
|
+
export declare const staticCompletion: (completions: string[], options?: CompletionOptions) => ({ line }: CompoetionContext) => string | undefined;
|
|
12
|
+
export declare const matchCompletion: (completion: string, str: string, minLength?: number) => string | undefined;
|
|
13
|
+
//# sourceMappingURL=match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/match.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC1B,aAAa,MAAM,EAAE,EAAE,UAAS,iBAAsB,MACtD,UAAU,iBAAiB,uBAiB3B,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,KAAK,MAAM,EAAE,kBAAa,KAAG,MAAM,GAAG,SAUzF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { EditorView, WidgetType } from '@codemirror/view';
|
|
3
|
+
type Content = string | HTMLElement | ((view: EditorView) => HTMLElement);
|
|
4
|
+
export type PlaceholderOptions = {
|
|
5
|
+
content: Content;
|
|
6
|
+
delay?: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Shows a transient placeholder at the current cursor position.
|
|
10
|
+
*/
|
|
11
|
+
export declare const placeholder: ({ content, delay }: PlaceholderOptions) => Extension;
|
|
12
|
+
export declare class PlaceholderWidget extends WidgetType {
|
|
13
|
+
readonly content: Content;
|
|
14
|
+
constructor(content: Content);
|
|
15
|
+
toDOM(view: EditorView): HTMLSpanElement;
|
|
16
|
+
coordsAt(dom: HTMLElement): import("../..").Rect | null;
|
|
17
|
+
ignoreEvent(): boolean;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/placeholder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAc,UAAU,EAA+B,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInG,KAAK,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,UAAU,KAAK,WAAW,CAAC,CAAC;AAE1E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,oBAA4B,kBAAkB,KAAG,SAiD5E,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,UAAU;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO;gBAAhB,OAAO,EAAE,OAAO;IAIrC,KAAK,CAAC,IAAI,EAAE,UAAU;IAgBb,QAAQ,CAAC,GAAG,EAAE,WAAW;IAqBzB,WAAW;CAGrB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { type CompoetionContext } from './match';
|
|
3
|
+
export type TypeaheadOptions = {
|
|
4
|
+
onComplete?: (context: CompoetionContext) => string | undefined;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Shows a completion placeholder.
|
|
8
|
+
*/
|
|
9
|
+
export declare const typeahead: ({ onComplete }?: TypeaheadOptions) => Extension;
|
|
10
|
+
//# sourceMappingURL=typeahead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeahead.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/typeahead.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,EAAyB,MAAM,mBAAmB,CAAC;AAW3F,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;CACjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,iBAAgB,gBAAqB,KAAG,SA4DjE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import {
|
|
2
|
+
import { DocAccessor } from '@dxos/client/echo';
|
|
3
3
|
export declare const automerge: (accessor: DocAccessor) => Extension;
|
|
4
4
|
//# sourceMappingURL=automerge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/automerge.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/automerge.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAA2B,MAAM,mBAAmB,CAAC;AAG5E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,eAAO,MAAM,SAAS,GAAI,UAAU,WAAW,KAAG,SAqFjD,CAAC"}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import '@preact/signals-react';
|
|
2
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import { type Identity } from '@dxos/react-client/halo';
|
|
6
|
-
type EditorProps = {
|
|
7
|
-
source: DocAccessor;
|
|
8
|
-
autoFocus?: boolean;
|
|
9
|
-
space?: Space;
|
|
10
|
-
identity?: Identity;
|
|
11
|
-
};
|
|
12
|
-
declare const _default: {
|
|
4
|
+
declare const meta: {
|
|
13
5
|
title: string;
|
|
14
|
-
component:
|
|
6
|
+
component: any;
|
|
7
|
+
render: (args: unknown) => React.JSX.Element;
|
|
15
8
|
decorators: import("@storybook/react").Decorator[];
|
|
16
|
-
render: () => React.JSX.Element;
|
|
17
9
|
parameters: {
|
|
10
|
+
layout: string;
|
|
18
11
|
translations: [{
|
|
19
12
|
readonly 'en-US': {
|
|
20
13
|
readonly "react-ui-editor": {
|
|
@@ -32,8 +25,8 @@ declare const _default: {
|
|
|
32
25
|
readonly 'selection overlaps existing comment label': "Selection overlaps existing comment";
|
|
33
26
|
readonly 'select text to comment label': "Select text to comment";
|
|
34
27
|
readonly 'image label': "Insert image";
|
|
35
|
-
readonly 'heading label': "Heading level";
|
|
36
28
|
readonly 'table label': "Create table";
|
|
29
|
+
readonly 'heading label': "Heading level";
|
|
37
30
|
readonly 'heading level label_zero': "Paragraph";
|
|
38
31
|
readonly 'heading level label_one': "Heading level {{count}}";
|
|
39
32
|
readonly 'heading level label_other': "Heading level {{count}}";
|
|
@@ -47,10 +40,8 @@ declare const _default: {
|
|
|
47
40
|
}];
|
|
48
41
|
};
|
|
49
42
|
};
|
|
50
|
-
export default
|
|
51
|
-
|
|
52
|
-
export declare const
|
|
53
|
-
|
|
54
|
-
render: () => React.JSX.Element;
|
|
55
|
-
};
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
export declare const Default: Story;
|
|
46
|
+
export declare const WithEcho: Story;
|
|
56
47
|
//# sourceMappingURL=automerge.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automerge.stories.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/automerge.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"automerge.stories.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/automerge.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,uBAAuB,CAAC;AAI/B,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8B,MAAM,OAAO,CAAC;AAsGnD,QAAA,MAAM,IAAI;;eAEa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOW,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkBtB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DocAccessor } from '@dxos/
|
|
1
|
+
import { type DocAccessor } from '@dxos/client/echo';
|
|
2
2
|
import { type CursorConverter } from '../../util';
|
|
3
3
|
export declare const cursorConverter: (accessor: DocAccessor) => CursorConverter;
|
|
4
4
|
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/cursor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAG3E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,eAAe,GAAI,UAAU,WAAW,KAAG,eAkBtD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Heads, type Prop } from '@automerge/automerge';
|
|
2
|
-
import { StateEffect, type StateField, type
|
|
2
|
+
import { type EditorState, StateEffect, type StateField, type Transaction } from '@codemirror/state';
|
|
3
3
|
export type State = {
|
|
4
4
|
path: Prop[];
|
|
5
5
|
lastHeads: Heads;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/defs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAc,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/defs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAc,KAAK,WAAW,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEjH,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,SAAS,EAAE,KAAK,CAAC;IACjB,wBAAwB,EAAE,WAAW,EAAE,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,WAAW,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,KAAG,IAAI,EAA6B,CAAC;AACzG,eAAO,MAAM,YAAY,GAAI,OAAO,WAAW,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,KAAG,KAAqC,CAAC;AAElH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,0DAAsC,CAAC;AAErE,eAAO,MAAM,WAAW,GAAI,UAAU,KAAK,KAAG,WAAW,CAAC,WAAW,CAAuC,CAAC;AAE7G,eAAO,MAAM,mBAAmB,qDAA+B,CAAC;AAEhE,eAAO,MAAM,WAAW,GAAI,IAAI,WAAW,KAAG,OAE7C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StateField } from '@codemirror/state';
|
|
2
2
|
import { type EditorView } from '@codemirror/view';
|
|
3
|
-
import { type IDocHandle } from '@dxos/
|
|
3
|
+
import { type IDocHandle } from '@dxos/client/echo';
|
|
4
4
|
import { type State } from './defs';
|
|
5
5
|
/**
|
|
6
6
|
* Implements three-way merge (on each mutation).
|
|
@@ -11,7 +11,7 @@ export declare class Syncer {
|
|
|
11
11
|
private _pending;
|
|
12
12
|
constructor(_handle: IDocHandle, _state: StateField<State>);
|
|
13
13
|
reconcile(view: EditorView, editor: boolean): void;
|
|
14
|
-
onEditorChange
|
|
15
|
-
onAutomergeChange
|
|
14
|
+
private onEditorChange;
|
|
15
|
+
private onAutomergeChange;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/sync.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/sync.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,KAAK,KAAK,EAAwE,MAAM,QAAQ,CAAC;AAI1G;;GAEG;AACH,qBAAa,MAAM;IAKf,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,QAAQ,CAAS;gBAIN,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IAG5C,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAclD,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,iBAAiB;CAoB1B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Heads } from '@automerge/automerge';
|
|
2
2
|
import { type EditorState, type StateField, type Transaction } from '@codemirror/state';
|
|
3
|
-
import { type IDocHandle } from '@dxos/
|
|
3
|
+
import { type IDocHandle } from '@dxos/client/echo';
|
|
4
4
|
import { type State } from './defs';
|
|
5
5
|
export declare const updateAutomerge: (field: StateField<State>, handle: IDocHandle, transactions: Transaction[], state: EditorState) => Heads | undefined;
|
|
6
6
|
//# sourceMappingURL=update-automerge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/update-automerge.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"update-automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/update-automerge.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,eAAe,GAC1B,OAAO,UAAU,CAAC,KAAK,CAAC,EACxB,QAAQ,UAAU,EAClB,cAAc,WAAW,EAAE,EAC3B,OAAO,WAAW,KACjB,KAAK,GAAG,SA+BV,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
export declare const scrollToBottomEffect: import("@codemirror/state").StateEffectType<ScrollBehavior | undefined>;
|
|
3
|
+
export type AutoScrollOptions = {
|
|
4
|
+
/** Auto-scroll when reaches the bottom. */
|
|
5
|
+
autoScroll?: boolean;
|
|
6
|
+
/** Threshold in px to trigger scroll from bottom. */
|
|
7
|
+
threshold?: number;
|
|
8
|
+
/** Throttle time in ms. */
|
|
9
|
+
throttleDelay?: number;
|
|
10
|
+
/** Callback when auto-scrolling. */
|
|
11
|
+
onAutoScroll?: (props: {
|
|
12
|
+
view: EditorView;
|
|
13
|
+
distanceFromBottom: number;
|
|
14
|
+
}) => boolean | void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Extension that supports pinning the scroll position and automatically scrolls to the bottom when content is added.
|
|
18
|
+
*/
|
|
19
|
+
export declare const autoScroll: ({ autoScroll, threshold, throttleDelay, onAutoScroll, }?: Partial<AutoScrollOptions>) => import("@codemirror/state").Extension[];
|
|
20
|
+
//# sourceMappingURL=autoscroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoscroll.d.ts","sourceRoot":"","sources":["../../../../src/extensions/autoscroll.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAc,MAAM,kBAAkB,CAAC;AAQ1D,eAAO,MAAM,oBAAoB,yEAAmD,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,GAAG,IAAI,CAAC;CAC5F,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,UAAU,GAAI,0DAKxB,OAAO,CAAC,iBAAiB,CAAM,4CA+HjC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Event } from '@dxos/async';
|
|
2
|
-
import { type Space } from '@dxos/
|
|
2
|
+
import { type Space } from '@dxos/client/echo';
|
|
3
3
|
import { type AwarenessInfo, type AwarenessPosition, type AwarenessProvider, type AwarenessState } from './awareness';
|
|
4
4
|
export type AwarenessProviderParams = {
|
|
5
5
|
space: Space;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awareness-provider.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/awareness/awareness-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,EAAS,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"awareness-provider.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/awareness/awareness-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,EAAS,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAM/C,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAatH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,sBAAuB,YAAW,iBAAiB;IAC9D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqC;IAEnE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IAEtC,OAAO,CAAC,IAAI,CAAC,CAAU;IACvB,OAAO,CAAC,SAAS,CAAC,CAAe;IACjC,OAAO,CAAC,WAAW,CAAC,CAAiB;IAErC,SAAgB,iBAAiB,cAAqB;gBAE1C,MAAM,EAAE,uBAAuB;IAO3C,IAAI,IAAI,IAAI;IAuCZ,KAAK,IAAI,IAAI;IAMb,eAAe,IAAI,cAAc,EAAE;IAInC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,GAAG,IAAI;IAWrD,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,kBAAkB;CAM3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../src/extensions/blocks.ts"],"names":[],"mappings":"AAiGA,eAAO,MAAM,MAAM,+CAiClB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
type Bookmark = {
|
|
3
|
+
id: string;
|
|
4
|
+
pos: number;
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const addBookmark: import("@codemirror/state").StateEffectType<Bookmark>;
|
|
8
|
+
export declare const removeBookmark: import("@codemirror/state").StateEffectType<string>;
|
|
9
|
+
export declare const clearBookmarks: import("@codemirror/state").StateEffectType<void>;
|
|
10
|
+
export declare const bookmarks: () => Extension;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=bookmarks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../../../src/extensions/bookmarks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,mBAAmB,CAAC;AAGlF,KAAK,QAAQ,GAAG;IACd,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,WAAW,uDAAiC,CAAC;AAC1D,eAAO,MAAM,cAAc,qDAA+B,CAAC;AAC3D,eAAO,MAAM,cAAc,mDAA6B,CAAC;AAEzD,eAAO,MAAM,SAAS,QAAO,SAwB5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Extension, StateField } from '@codemirror/state';
|
|
2
2
|
import { type Command, EditorView, type Rect } from '@codemirror/view';
|
|
3
3
|
import { type CleanupFn } from '@dxos/async';
|
|
4
|
-
import { type
|
|
4
|
+
import { type Comment, type Range, type RenderCallback } from '../types';
|
|
5
5
|
type CommentState = {
|
|
6
6
|
comment: Comment;
|
|
7
7
|
range: Range;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../src/extensions/comments.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,SAAS,EAAe,UAAU,EAAa,MAAM,mBAAmB,CAAC;AACxG,OAAO,
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../src/extensions/comments.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,SAAS,EAAe,UAAU,EAAa,MAAM,mBAAmB,CAAC;AACxG,OAAO,EACL,KAAK,OAAO,EAEZ,UAAU,EAEV,KAAK,IAAI,EAIV,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,aAAa,CAAC;AAIvD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AASzE,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,WAAW;QAA4B,MAAM;cAAY,OAAO,EAAE;EAAK,CAAC;AAErF,eAAO,MAAM,YAAY,6DAAuC,CAAC;AAIjE;;;GAGG;AACH,eAAO,MAAM,aAAa,2BAuCxB,CAAC;AAyDH,eAAO,MAAM,oBAAoB,qDAA+B,CAAC;AAkJjE;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAyB3B,CAAC;AAMF,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C,CAAC;AAIF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAS,eAAoB,KAAG,SAiIxD,CAAC;AAMF,eAAO,MAAM,oBAAoB,GAAI,MAAM,UAAU,EAAE,IAAI,MAAM,EAAE,gBAAa,SA4B/E,CAAC;AA0BF,eAAO,MAAM,yBAAyB,GACpC,IAAI,MAAM,EACV,WAAW,CAAC,IAAI,EAAE,MAAM,IAAI,KAAK,SAAS,EAC1C,aAAa,MAAM,OAAO,EAAE,KAC3B,SAOA,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,UAAU,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,MAAM,EAAE,WAAW,OAAO,EAAE,SAYhG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dnd.d.ts","sourceRoot":"","sources":["../../../../src/extensions/dnd.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"dnd.d.ts","sourceRoot":"","sources":["../../../../src/extensions/dnd.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAc,MAAM,kBAAkB,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;QAAE,KAAK,EAAE,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAA;CAAE,CAAC;AAa7F,eAAO,MAAM,QAAQ,GAAI,UAAS,UAAe,KAAG,SAgBnD,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import { type DocAccessor, type Space } from '@dxos/
|
|
3
|
-
import { type Identity } from '@dxos/
|
|
2
|
+
import { type DocAccessor, type Space } from '@dxos/client/echo';
|
|
3
|
+
import { type Identity } from '@dxos/client/halo';
|
|
4
4
|
import { type ThemeMode } from '@dxos/react-ui';
|
|
5
5
|
import { type ThemeStyles } from '../styles';
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const filterChars: (chars: RegExp) => Extension;
|
|
7
7
|
/**
|
|
8
8
|
* https://codemirror.net/docs/extensions
|
|
9
9
|
* https://github.com/codemirror/basic-setup
|
|
10
10
|
* https://github.com/codemirror/basic-setup/blob/main/src/codemirror.ts
|
|
11
|
+
* https://github.com/codemirror/theme-one-dark
|
|
11
12
|
*/
|
|
12
13
|
export type BasicExtensionsOptions = {
|
|
13
14
|
allowMultipleSelections?: boolean;
|
|
@@ -24,11 +25,11 @@ export type BasicExtensionsOptions = {
|
|
|
24
25
|
lineNumbers?: boolean;
|
|
25
26
|
/** If false then do not set a max-width or side margin on the editor. */
|
|
26
27
|
lineWrapping?: boolean;
|
|
27
|
-
monospace?: boolean;
|
|
28
28
|
placeholder?: string;
|
|
29
29
|
/** If true user cannot edit the text, but they can still select and copy it. */
|
|
30
30
|
readOnly?: boolean;
|
|
31
31
|
search?: boolean;
|
|
32
|
+
/** NOTE: Do not use with stack sections. */
|
|
32
33
|
scrollPastEnd?: boolean;
|
|
33
34
|
standardKeymap?: boolean;
|
|
34
35
|
tabSize?: number;
|
|
@@ -36,6 +37,7 @@ export type BasicExtensionsOptions = {
|
|
|
36
37
|
export declare const createBasicExtensions: (_props?: BasicExtensionsOptions) => Extension;
|
|
37
38
|
export type ThemeExtensionsOptions = {
|
|
38
39
|
themeMode?: ThemeMode;
|
|
40
|
+
monospace?: boolean;
|
|
39
41
|
styles?: ThemeStyles;
|
|
40
42
|
syntaxHighlighting?: boolean;
|
|
41
43
|
slots?: {
|
|
@@ -45,33 +47,32 @@ export type ThemeExtensionsOptions = {
|
|
|
45
47
|
scroll?: {
|
|
46
48
|
className?: string;
|
|
47
49
|
};
|
|
48
|
-
scroller?: {
|
|
49
|
-
className?: string;
|
|
50
|
-
};
|
|
51
50
|
content?: {
|
|
52
51
|
className?: string;
|
|
53
52
|
};
|
|
54
53
|
};
|
|
55
54
|
};
|
|
56
|
-
export declare const grow:
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
export declare const grow: ThemeExtensionsOptions['slots'];
|
|
56
|
+
export declare const fullWidth: ThemeExtensionsOptions['slots'];
|
|
57
|
+
export declare const defaultThemeSlots: {
|
|
58
|
+
editor?: {
|
|
59
|
+
className?: string;
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
readonly editor: {
|
|
63
|
-
readonly className: "is-full";
|
|
61
|
+
scroll?: {
|
|
62
|
+
className?: string;
|
|
64
63
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
readonly editor: {
|
|
68
|
-
readonly className: "is-full bs-full";
|
|
64
|
+
content?: {
|
|
65
|
+
className?: string;
|
|
69
66
|
};
|
|
70
67
|
};
|
|
68
|
+
export declare const defaultStyles: {
|
|
69
|
+
dark: import("@codemirror/language").TagStyle[];
|
|
70
|
+
light: import("@codemirror/language").TagStyle[];
|
|
71
|
+
};
|
|
71
72
|
/**
|
|
72
73
|
* https://codemirror.net/examples/styling
|
|
73
74
|
*/
|
|
74
|
-
export declare const createThemeExtensions: ({ themeMode, styles, syntaxHighlighting:
|
|
75
|
+
export declare const createThemeExtensions: ({ themeMode, monospace, styles, syntaxHighlighting: syntaxHighlightingProp, slots: slotsParam, }?: ThemeExtensionsOptions) => Extension;
|
|
75
76
|
export type DataExtensionsProps<T> = {
|
|
76
77
|
id: string;
|
|
77
78
|
text?: DocAccessor<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/factories.ts"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/factories.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgC,KAAK,SAAS,EAAwB,MAAM,mBAAmB,CAAC;AAiBvG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,WAAW,CAAC;AAU3D,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,cAsBxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAqBF,eAAO,MAAM,qBAAqB,GAAI,SAAS,sBAAsB,KAAG,SA+CvE,CAAC;AAMF,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE;YACP,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,MAAM,CAAC,EAAE;YAEP,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,OAAO,CAAC,EAAE;YACR,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,sBAAsB,CAAC,OAAO,CAIvC,CAAC;AAEX,eAAO,MAAM,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAI5C,CAAC;AAEX,eAAO,MAAM,iBAAiB;aAzBjB;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;aACQ;QAEP,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;cACS;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CAgBgC,CAAC;AAEtC,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,mGAMnC,sBAA2B,KAAG,SAmBhC,CAAC;AAMF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAE,+BAA+B,mBAAmB,CAAC,CAAC,CAAC,KAAG,SAAS,EA0BxG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../../src/extensions/focus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK5D,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../../src/extensions/focus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK5D,eAAO,MAAM,UAAU,qBAWrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK,iEAUjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folding.d.ts","sourceRoot":"","sources":["../../../../src/extensions/folding.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQnD,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC;AAEhC;;GAEG;
|
|
1
|
+
{"version":3,"file":"folding.d.ts","sourceRoot":"","sources":["../../../../src/extensions/folding.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQnD,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,SAAQ,cAAmB,KAAG,SAwBrD,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './annotations';
|
|
2
2
|
export * from './autocomplete';
|
|
3
|
+
export * from './autoscroll';
|
|
3
4
|
export * from './automerge';
|
|
4
5
|
export * from './awareness';
|
|
5
6
|
export * from './blast';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './blocks';
|
|
8
|
+
export * from './bookmarks';
|
|
7
9
|
export * from './comments';
|
|
8
10
|
export * from './debug';
|
|
9
11
|
export * from './dnd';
|
|
@@ -15,9 +17,16 @@ export * from './json';
|
|
|
15
17
|
export * from './listener';
|
|
16
18
|
export * from './markdown';
|
|
17
19
|
export * from './mention';
|
|
20
|
+
export * from './modal';
|
|
18
21
|
export * from './modes';
|
|
19
22
|
export * from './outliner';
|
|
20
23
|
export * from './preview';
|
|
24
|
+
export * from './replacer';
|
|
21
25
|
export * from './selection';
|
|
26
|
+
export * from './scrolling';
|
|
27
|
+
export * from './state';
|
|
28
|
+
export * from './submit';
|
|
29
|
+
export * from './tab';
|
|
30
|
+
export * from './tags';
|
|
22
31
|
export * from './typewriter';
|
|
23
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/extensions/json.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/extensions/json.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,aAAY,qBAA0B,KAAG,SAU7E,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
2
|
export type ListenerOptions = {
|
|
3
|
-
onFocus?: (
|
|
4
|
-
|
|
3
|
+
onFocus?: (event: {
|
|
4
|
+
id: string;
|
|
5
|
+
focusing: boolean;
|
|
6
|
+
}) => void;
|
|
7
|
+
onChange?: (event: {
|
|
8
|
+
id: string;
|
|
9
|
+
text: string;
|
|
10
|
+
}) => void;
|
|
5
11
|
};
|
|
6
|
-
/**
|
|
7
|
-
* Event listener.
|
|
8
|
-
* @deprecated Use EditorView.updateListener and listen for specific update events.
|
|
9
|
-
*/
|
|
10
12
|
export declare const listener: ({ onFocus, onChange }: ListenerOptions) => Extension;
|
|
11
13
|
//# sourceMappingURL=listener.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../src/extensions/listener.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../src/extensions/listener.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,uBAAuB,eAAe,KAAG,SAejE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/action.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/action.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAuBhE,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,aAAa,GACb,cAAc,GACd,WAAW,GACX,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,OAAO,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAE5F,eAAO,MAAM,oBAAoB,EAAE,oBAyDlC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import { type
|
|
2
|
+
import { type MarkdownConfig } from '@lezer/markdown';
|
|
3
3
|
export type MarkdownBundleOptions = {
|
|
4
|
-
|
|
4
|
+
extensions?: MarkdownConfig[];
|
|
5
5
|
indentWithTab?: boolean;
|
|
6
|
+
setextHeading?: boolean;
|
|
6
7
|
};
|
|
7
8
|
/**
|
|
8
9
|
* Creates markdown extensions.
|
|
@@ -13,4 +14,9 @@ export type MarkdownBundleOptions = {
|
|
|
13
14
|
* https://codemirror.net/docs/ref/#codemirror.basicSetup
|
|
14
15
|
*/
|
|
15
16
|
export declare const createMarkdownExtensions: (options?: MarkdownBundleOptions) => Extension[];
|
|
17
|
+
/**
|
|
18
|
+
* Default customizations.
|
|
19
|
+
* https://github.com/lezer-parser/markdown/blob/main/src/markdown.ts
|
|
20
|
+
*/
|
|
21
|
+
export declare const defaultExtensions: () => MarkdownConfig[];
|
|
16
22
|
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/bundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/bundle.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,UAAS,qBAA0B,KAAG,SAAS,EA4CvF,CAAC;AASF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,cAAc,EAA+B,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { ViewPlugin, type ViewUpdate } from '@codemirror/view';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const adjustChanges: () => ViewPlugin<{
|
|
6
6
|
update(update: ViewUpdate): void;
|
|
7
|
-
}>;
|
|
7
|
+
}, undefined>;
|
|
8
8
|
export declare const createLink: (url: URL, label: string) => string;
|
|
9
9
|
export declare const createLinkLabel: (url: URL) => string;
|
|
10
10
|
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/changes.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/changes.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEjF;;GAEG;AAEH,eAAO,MAAM,aAAa;mBAGL,UAAU;aAqF9B,CAAC;AAMF,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,EAAE,OAAO,MAAM,KAAG,MAepD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,KAAK,GAAG,KAAG,MAW1C,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { type RenderCallback } from '../../types';
|
|
2
|
+
export type NodeData = {
|
|
3
|
+
name: 'Link';
|
|
4
|
+
url: string;
|
|
5
|
+
} | {
|
|
6
|
+
name: 'Image';
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
2
9
|
export interface DecorateOptions {
|
|
3
10
|
/**
|
|
4
11
|
* Prevents triggering decorations as the cursor moves through the document.
|
|
@@ -8,10 +15,11 @@ export interface DecorateOptions {
|
|
|
8
15
|
from: number;
|
|
9
16
|
to?: number;
|
|
10
17
|
};
|
|
18
|
+
listPaddingLeft?: number;
|
|
19
|
+
skip?: (node: NodeData) => boolean;
|
|
11
20
|
renderLinkButton?: RenderCallback<{
|
|
12
21
|
url: string;
|
|
13
22
|
}>;
|
|
14
|
-
listPaddingLeft?: number;
|
|
15
23
|
}
|
|
16
24
|
export declare const decorateMarkdown: (options?: DecorateOptions) => import("@codemirror/state").Extension[];
|
|
17
25
|
//# sourceMappingURL=decorate.d.ts.map
|