@dxos/react-ui-editor 0.8.4-main.5ea62a8 → 0.8.4-main.72ec0f3
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 +5006 -3698
- 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 +5006 -3698
- 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/index.d.ts +2 -1
- package/dist/types/src/components/EditorToolbar/index.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/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 +1 -1
- 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/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.map +1 -1
- package/dist/types/src/extensions/factories.d.ts +11 -11
- 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/bundle.d.ts +6 -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 +1 -3
- package/dist/types/src/extensions/markdown/formatting.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/tree.d.ts +1 -1
- 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/{Command.stories.d.ts → CommandDialog.stories.d.ts} +2 -3
- package/dist/types/src/stories/CommandDialog.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Comments.stories.d.ts +3 -4
- package/dist/types/src/stories/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/stories/EditorToolbar.stories.d.ts +1 -2
- package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Experimental.stories.d.ts +3 -4
- package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Markdown.stories.d.ts +3 -4
- package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -1
- package/dist/types/src/stories/Outliner.stories.d.ts +0 -1
- package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
- package/dist/types/src/stories/{CommandMenu.stories.d.ts → Popover.stories.d.ts} +6 -6
- package/dist/types/src/stories/Popover.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Preview.stories.d.ts +4 -4
- 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 +3 -5
- package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/EditorStory.d.ts +7 -5
- 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/types/types.d.ts +2 -2
- package/dist/types/src/types/types.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 +68 -66
- 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 +101 -91
- package/src/components/EditorToolbar/{lists.ts → actions.ts} +46 -16
- package/src/components/EditorToolbar/blocks.ts +2 -1
- package/src/components/EditorToolbar/formatting.ts +2 -1
- package/src/components/EditorToolbar/headings.ts +8 -5
- package/src/components/EditorToolbar/image.ts +1 -1
- package/src/components/EditorToolbar/index.ts +3 -7
- package/src/components/EditorToolbar/search.ts +1 -1
- package/src/components/EditorToolbar/useEditorToolbar.ts +20 -0
- package/src/components/EditorToolbar/view-mode.ts +2 -1
- package/src/components/index.ts +8 -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 +21 -17
- package/src/extensions/{command → autocomplete}/typeahead.ts +6 -48
- package/src/extensions/automerge/automerge.stories.tsx +9 -9
- package/src/extensions/automerge/automerge.ts +28 -9
- package/src/extensions/automerge/cursor.ts +1 -1
- package/src/extensions/automerge/sync.ts +8 -4
- package/src/extensions/automerge/update-automerge.ts +1 -1
- package/src/extensions/autoscroll.ts +163 -0
- package/src/extensions/awareness/awareness-provider.ts +2 -2
- package/src/extensions/blocks.ts +131 -0
- package/src/extensions/bookmarks.ts +75 -0
- package/src/extensions/comments.ts +7 -2
- package/src/extensions/factories.ts +50 -32
- 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/bundle.ts +37 -6
- package/src/extensions/markdown/decorate.ts +26 -17
- package/src/extensions/markdown/formatting.ts +8 -10
- package/src/extensions/markdown/highlight.ts +1 -1
- 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/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 +1 -1
- package/src/extensions/outliner/outliner.ts +5 -5
- package/src/extensions/outliner/tree.test.ts +1 -1
- package/src/extensions/outliner/tree.ts +1 -1
- 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 +8 -9
- package/src/stories/EditorToolbar.stories.tsx +15 -14
- package/src/stories/Experimental.stories.tsx +7 -7
- package/src/stories/Markdown.stories.tsx +6 -6
- package/src/stories/Outliner.stories.tsx +40 -32
- package/src/stories/Popover.stories.tsx +162 -0
- package/src/stories/Preview.stories.tsx +46 -43
- package/src/stories/Tags.stories.tsx +95 -0
- package/src/stories/TextEditor.stories.tsx +10 -33
- package/src/stories/components/EditorStory.tsx +30 -17
- package/src/stories/components/util.tsx +40 -8
- package/src/styles/markdown.ts +1 -1
- package/src/styles/theme.ts +13 -11
- package/src/types/types.ts +1 -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.map +0 -1
- 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 -3
- package/dist/types/src/testing/util.d.ts.map +0 -1
- package/src/components/EditorToolbar/util.ts +0 -76
- 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 -211
- package/src/extensions/command/command.ts +0 -34
- package/src/extensions/command/hint.ts +0 -103
- package/src/extensions/command/index.ts +0 -10
- package/src/extensions/command/state.ts +0 -90
- package/src/extensions/command/useCommandMenu.ts +0 -119
- package/src/stories/Command.stories.tsx +0 -101
- package/src/stories/CommandMenu.stories.tsx +0 -161
- package/src/testing/index.ts +0 -5
- package/src/testing/util.ts +0 -7
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
linkTooltip,
|
|
20
20
|
table,
|
|
21
21
|
} from '../../extensions';
|
|
22
|
-
import { str } from '../../
|
|
23
|
-
import { createRenderer } from '../../util';
|
|
22
|
+
import { createRenderer, str } from '../../util';
|
|
24
23
|
|
|
25
24
|
export const num = () => faker.number.int({ min: 0, max: 9999 }).toLocaleString();
|
|
26
25
|
|
|
27
26
|
export const img = '';
|
|
28
27
|
|
|
29
28
|
export const code = str(
|
|
29
|
+
// prettier-ignore
|
|
30
30
|
'// Code',
|
|
31
31
|
'const Component = () => {',
|
|
32
32
|
' const x = 100;',
|
|
@@ -38,7 +38,7 @@ export const code = str(
|
|
|
38
38
|
// Content blocks for stories
|
|
39
39
|
export const content = {
|
|
40
40
|
tasks: str(
|
|
41
|
-
//
|
|
41
|
+
// prettier-ignore
|
|
42
42
|
'### TaskList',
|
|
43
43
|
'',
|
|
44
44
|
`- [x] ${faker.lorem.sentences()}`,
|
|
@@ -50,7 +50,7 @@ export const content = {
|
|
|
50
50
|
),
|
|
51
51
|
|
|
52
52
|
bullets: str(
|
|
53
|
-
//
|
|
53
|
+
// prettier-ignore
|
|
54
54
|
'### BulletList',
|
|
55
55
|
'',
|
|
56
56
|
`- ${faker.lorem.sentences()}`,
|
|
@@ -62,7 +62,7 @@ export const content = {
|
|
|
62
62
|
),
|
|
63
63
|
|
|
64
64
|
numbered: str(
|
|
65
|
-
//
|
|
65
|
+
// prettier-ignore
|
|
66
66
|
'### OrderedList (part 1)',
|
|
67
67
|
'',
|
|
68
68
|
`1. ${faker.lorem.sentences()}`,
|
|
@@ -81,11 +81,34 @@ export const content = {
|
|
|
81
81
|
|
|
82
82
|
typescript: code,
|
|
83
83
|
|
|
84
|
-
codeblocks: str(
|
|
84
|
+
codeblocks: str(
|
|
85
|
+
// prettier-ignore
|
|
86
|
+
'### Code',
|
|
87
|
+
'',
|
|
88
|
+
'```bash',
|
|
89
|
+
'$ ls -las',
|
|
90
|
+
'```',
|
|
91
|
+
'',
|
|
92
|
+
'```tsx',
|
|
93
|
+
code,
|
|
94
|
+
'```',
|
|
95
|
+
'',
|
|
96
|
+
),
|
|
85
97
|
|
|
86
|
-
comment: str(
|
|
98
|
+
comment: str(
|
|
99
|
+
// prettier-ignore
|
|
100
|
+
'### Comment',
|
|
101
|
+
'',
|
|
102
|
+
'<!--',
|
|
103
|
+
'A comment',
|
|
104
|
+
'-->',
|
|
105
|
+
'',
|
|
106
|
+
'Partial comment. <!-- comment. -->',
|
|
107
|
+
'',
|
|
108
|
+
),
|
|
87
109
|
|
|
88
110
|
links: str(
|
|
111
|
+
// prettier-ignore
|
|
89
112
|
'### Links',
|
|
90
113
|
'',
|
|
91
114
|
'This is a naked link https://dxos.org within a sentence.',
|
|
@@ -97,6 +120,7 @@ export const content = {
|
|
|
97
120
|
),
|
|
98
121
|
|
|
99
122
|
table: str(
|
|
123
|
+
// prettier-ignore
|
|
100
124
|
'### Tables',
|
|
101
125
|
'',
|
|
102
126
|
`| ${faker.lorem.word().padStart(12)} | ${faker.lorem.word().padStart(12)} | ${faker.lorem.word().padStart(12)} |`,
|
|
@@ -113,9 +137,16 @@ export const content = {
|
|
|
113
137
|
...[1, 2, 3, 4, 5, 6].map((level) => ['#'.repeat(level) + ` Heading ${level}`, faker.lorem.sentences(), '']).flat(),
|
|
114
138
|
),
|
|
115
139
|
|
|
116
|
-
formatting: str(
|
|
140
|
+
formatting: str(
|
|
141
|
+
// prettier-ignore
|
|
142
|
+
'### Formatting',
|
|
143
|
+
'',
|
|
144
|
+
'This this is **bold**, ~~strikethrough~~, _italic_, and `f(INLINE)`.',
|
|
145
|
+
'',
|
|
146
|
+
),
|
|
117
147
|
|
|
118
148
|
blockquotes: str(
|
|
149
|
+
// prettier-ignore
|
|
119
150
|
'### Blockquotes',
|
|
120
151
|
'',
|
|
121
152
|
'> This is a block quote.',
|
|
@@ -154,6 +185,7 @@ export const text = str(
|
|
|
154
185
|
'---',
|
|
155
186
|
'## Misc',
|
|
156
187
|
content.codeblocks,
|
|
188
|
+
content.comment,
|
|
157
189
|
content.table,
|
|
158
190
|
content.image,
|
|
159
191
|
content.footer,
|
package/src/styles/markdown.ts
CHANGED
package/src/styles/theme.ts
CHANGED
|
@@ -74,12 +74,12 @@ export const defaultTheme: ThemeStyles = {
|
|
|
74
74
|
*/
|
|
75
75
|
'.cm-gutters': {
|
|
76
76
|
borderRight: 'none',
|
|
77
|
-
// background: 'transparent',
|
|
78
77
|
},
|
|
79
78
|
'.cm-gutter': {},
|
|
80
79
|
'.cm-gutter.cm-lineNumbers': {
|
|
81
80
|
paddingRight: '4px',
|
|
82
81
|
borderRight: '1px solid var(--dx-subduedSeparator)',
|
|
82
|
+
color: 'var(--dx-subduedText)',
|
|
83
83
|
},
|
|
84
84
|
'.cm-gutter.cm-lineNumbers .cm-gutterElement': {
|
|
85
85
|
minWidth: '40px',
|
|
@@ -110,6 +110,7 @@ export const defaultTheme: ThemeStyles = {
|
|
|
110
110
|
borderLeft: '2px solid var(--dx-cmCursor)',
|
|
111
111
|
},
|
|
112
112
|
'.cm-placeholder': {
|
|
113
|
+
fontFamily: fontBody,
|
|
113
114
|
color: 'var(--dx-placeholder)',
|
|
114
115
|
},
|
|
115
116
|
|
|
@@ -156,7 +157,7 @@ export const defaultTheme: ThemeStyles = {
|
|
|
156
157
|
* Tooltip.
|
|
157
158
|
*/
|
|
158
159
|
'.cm-tooltip': {
|
|
159
|
-
background: 'var(--dx-
|
|
160
|
+
background: 'var(--dx-baseSurface)',
|
|
160
161
|
},
|
|
161
162
|
'.cm-tooltip-below': {},
|
|
162
163
|
|
|
@@ -165,10 +166,10 @@ export const defaultTheme: ThemeStyles = {
|
|
|
165
166
|
* https://github.com/codemirror/autocomplete/blob/main/src/completion.ts
|
|
166
167
|
*/
|
|
167
168
|
'.cm-tooltip.cm-tooltip-autocomplete': {
|
|
168
|
-
marginTop: '
|
|
169
|
-
marginLeft: '-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
marginTop: '6px',
|
|
170
|
+
marginLeft: '-10px',
|
|
171
|
+
border: '2px solid var(--dx-separator)',
|
|
172
|
+
borderRadius: '4px',
|
|
172
173
|
},
|
|
173
174
|
'.cm-tooltip.cm-tooltip-autocomplete > ul': {
|
|
174
175
|
maxHeight: '20em',
|
|
@@ -177,13 +178,12 @@ export const defaultTheme: ThemeStyles = {
|
|
|
177
178
|
padding: '4px',
|
|
178
179
|
},
|
|
179
180
|
'.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected]': {
|
|
180
|
-
background: 'var(--dx-
|
|
181
|
-
color: 'var(--dx-
|
|
181
|
+
background: 'var(--dx-activeSurface)',
|
|
182
|
+
color: 'var(--dx-activeSurfaceText)',
|
|
182
183
|
},
|
|
183
184
|
'.cm-tooltip.cm-tooltip-autocomplete > ul > completion-section': {
|
|
184
185
|
paddingLeft: '4px !important',
|
|
185
|
-
|
|
186
|
-
color: 'var(--dx-accentText)',
|
|
186
|
+
color: 'var(--dx-hoverSurfaceText)',
|
|
187
187
|
},
|
|
188
188
|
|
|
189
189
|
'.cm-completionInfo': {
|
|
@@ -197,10 +197,12 @@ export const defaultTheme: ThemeStyles = {
|
|
|
197
197
|
},
|
|
198
198
|
'.cm-completionLabel': {
|
|
199
199
|
fontFamily: fontBody,
|
|
200
|
+
color: 'var(--dx-description)',
|
|
201
|
+
padding: '0 4px',
|
|
200
202
|
},
|
|
201
203
|
'.cm-completionMatchedText': {
|
|
202
204
|
textDecoration: 'none !important',
|
|
203
|
-
|
|
205
|
+
color: 'var(--dx-baseText)',
|
|
204
206
|
},
|
|
205
207
|
|
|
206
208
|
/**
|
package/src/types/types.ts
CHANGED
package/src/util/debug.ts
CHANGED
|
@@ -7,12 +7,17 @@ import { type EditorView } from '@codemirror/view';
|
|
|
7
7
|
|
|
8
8
|
import { log } from '@dxos/log';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `trim` from `@dxos/util`.
|
|
12
|
+
*/
|
|
13
|
+
export const str = (...lines: string[]) => lines.join('\n');
|
|
14
|
+
|
|
15
|
+
export const wrapWithCatch = (fn: (...args: any[]) => any, label?: string) => {
|
|
11
16
|
return (...args: any[]) => {
|
|
12
17
|
try {
|
|
13
18
|
return fn(...args);
|
|
14
19
|
} catch (err) {
|
|
15
|
-
log.catch(err);
|
|
20
|
+
log.catch(err, { label });
|
|
16
21
|
}
|
|
17
22
|
};
|
|
18
23
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Range } from '@codemirror/state';
|
|
6
|
+
import { type Decoration, type DecorationSet } from '@codemirror/view';
|
|
7
|
+
|
|
8
|
+
export const decorationSetToArray = (deco: DecorationSet): readonly Range<Decoration>[] => {
|
|
9
|
+
const ranges: Range<Decoration>[] = [];
|
|
10
|
+
const iter = deco.iter();
|
|
11
|
+
while (iter.value) {
|
|
12
|
+
ranges.push({
|
|
13
|
+
from: iter.from,
|
|
14
|
+
to: iter.to,
|
|
15
|
+
value: iter.value,
|
|
16
|
+
});
|
|
17
|
+
iter.next();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return ranges;
|
|
21
|
+
};
|
package/src/util/dom.ts
CHANGED
|
@@ -2,30 +2,28 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface Rect {
|
|
5
|
+
export type Rect = {
|
|
8
6
|
readonly left: number;
|
|
9
7
|
readonly right: number;
|
|
10
8
|
readonly top: number;
|
|
11
9
|
readonly bottom: number;
|
|
12
|
-
}
|
|
10
|
+
};
|
|
13
11
|
|
|
14
|
-
export const flattenRect = (rect: Rect, left: boolean) => {
|
|
12
|
+
export const flattenRect = (rect: Rect, left: boolean): Rect => {
|
|
15
13
|
const x = left ? rect.left : rect.right;
|
|
16
14
|
return { left: x, right: x, top: rect.top, bottom: rect.bottom };
|
|
17
15
|
};
|
|
18
16
|
|
|
19
17
|
let scratchRange: Range | null;
|
|
20
18
|
|
|
21
|
-
export const textRange = (node: Text, from: number, to = from) => {
|
|
19
|
+
export const textRange = (node: Text, from: number, to = from): Range => {
|
|
22
20
|
const range = scratchRange || (scratchRange = document.createRange());
|
|
23
21
|
range.setEnd(node, to);
|
|
24
22
|
range.setStart(node, from);
|
|
25
23
|
return range;
|
|
26
24
|
};
|
|
27
25
|
|
|
28
|
-
export const clientRectsFor = (dom: Node) => {
|
|
26
|
+
export const clientRectsFor = (dom: Node): DOMRectList => {
|
|
29
27
|
if (dom.nodeType === 3) {
|
|
30
28
|
return textRange(dom as Text, 0, dom.nodeValue!.length).getClientRects();
|
|
31
29
|
} else if (dom.nodeType === 1) {
|
|
@@ -34,23 +32,3 @@ export const clientRectsFor = (dom: Node) => {
|
|
|
34
32
|
return [] as any as DOMRectList;
|
|
35
33
|
}
|
|
36
34
|
};
|
|
37
|
-
|
|
38
|
-
export type ElementOptions = {
|
|
39
|
-
className?: string;
|
|
40
|
-
text?: string;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const createElement = (tag: string, options?: ElementOptions, children?: HTMLElement[]): HTMLElement => {
|
|
44
|
-
const el = document.createElement(tag);
|
|
45
|
-
if (options?.className) {
|
|
46
|
-
el.className = options.className;
|
|
47
|
-
}
|
|
48
|
-
if (options?.text) {
|
|
49
|
-
el.textContent = options.text;
|
|
50
|
-
}
|
|
51
|
-
if (children) {
|
|
52
|
-
el.append(...(Array.isArray(children) ? children : [children]));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return el;
|
|
56
|
-
};
|
package/src/util/index.ts
CHANGED
package/src/util/react.tsx
CHANGED
|
@@ -22,7 +22,7 @@ export const renderRoot = <T extends Element>(root: T, node: ReactNode): T => {
|
|
|
22
22
|
* @deprecated
|
|
23
23
|
*/
|
|
24
24
|
export const createRenderer =
|
|
25
|
-
<
|
|
25
|
+
<TProps extends object>(Component: FC<TProps>): RenderCallback<TProps> =>
|
|
26
26
|
(el, props) => {
|
|
27
27
|
renderRoot(
|
|
28
28
|
el,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type EditorView } from '@codemirror/view';\nimport { Schema } from 'effect';\n\n// Runtime data structure.\nexport type Range = {\n from: number;\n to: number;\n};\n\n// Persistent data structure.\n// TODO(burdon): Rename annotation?\nexport type Comment = {\n id: string;\n cursor?: string;\n};\n\n/**\n * Callback that renders into a DOM element within the editor.\n */\nexport type RenderCallback<Props extends object> = (el: HTMLElement, props: Props, view: EditorView) => void;\n\nexport const EditorViewModes = ['preview', 'readonly', 'source'] as const;\nexport const EditorViewMode = Schema.Union(...EditorViewModes.map((mode) => Schema.Literal(mode)));\nexport type EditorViewMode = Schema.Schema.Type<typeof EditorViewMode>;\n\nexport const EditorInputModes = ['default', 'vim', 'vscode'] as const;\nexport const EditorInputMode = Schema.Union(...EditorInputModes.map((mode) => Schema.Literal(mode)));\nexport type EditorInputMode = Schema.Schema.Type<typeof EditorInputMode>;\n"],
|
|
5
|
-
"mappings": ";AAKA,SAASA,cAAc;AAoBhB,IAAMC,kBAAkB;EAAC;EAAW;EAAY;;AAChD,IAAMC,iBAAiBC,OAAOC,MAAK,GAAIH,gBAAgBI,IAAI,CAACC,SAASH,OAAOI,QAAQD,IAAAA,CAAAA,CAAAA;AAGpF,IAAME,mBAAmB;EAAC;EAAW;EAAO;;AAC5C,IAAMC,kBAAkBN,OAAOC,MAAK,GAAII,iBAAiBH,IAAI,CAACC,SAASH,OAAOI,QAAQD,IAAAA,CAAAA,CAAAA;",
|
|
6
|
-
"names": ["Schema", "EditorViewModes", "EditorViewMode", "Schema", "Union", "map", "mode", "Literal", "EditorInputModes", "EditorInputMode"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/testing/util.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n/** deprecated Replace with @dxos/util trim */\n// TODO(burdon): Remove\nexport const str = (...lines: string[]) => lines.join('\\n');\n"],
|
|
5
|
-
"mappings": ";AAMO,IAAMA,MAAM,IAAIC,UAAoBA,MAAMC,KAAK,IAAA;",
|
|
6
|
-
"names": ["str", "lines", "join"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type EditorView } from '@codemirror/view';\nimport { Schema } from 'effect';\n\n// Runtime data structure.\nexport type Range = {\n from: number;\n to: number;\n};\n\n// Persistent data structure.\n// TODO(burdon): Rename annotation?\nexport type Comment = {\n id: string;\n cursor?: string;\n};\n\n/**\n * Callback that renders into a DOM element within the editor.\n */\nexport type RenderCallback<Props extends object> = (el: HTMLElement, props: Props, view: EditorView) => void;\n\nexport const EditorViewModes = ['preview', 'readonly', 'source'] as const;\nexport const EditorViewMode = Schema.Union(...EditorViewModes.map((mode) => Schema.Literal(mode)));\nexport type EditorViewMode = Schema.Schema.Type<typeof EditorViewMode>;\n\nexport const EditorInputModes = ['default', 'vim', 'vscode'] as const;\nexport const EditorInputMode = Schema.Union(...EditorInputModes.map((mode) => Schema.Literal(mode)));\nexport type EditorInputMode = Schema.Schema.Type<typeof EditorInputMode>;\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,cAAc;AAoBhB,IAAMC,kBAAkB;EAAC;EAAW;EAAY;;AAChD,IAAMC,iBAAiBC,OAAOC,MAAK,GAAIH,gBAAgBI,IAAI,CAACC,SAASH,OAAOI,QAAQD,IAAAA,CAAAA,CAAAA;AAGpF,IAAME,mBAAmB;EAAC;EAAW;EAAO;;AAC5C,IAAMC,kBAAkBN,OAAOC,MAAK,GAAII,iBAAiBH,IAAI,CAACC,SAASH,OAAOI,QAAQD,IAAAA,CAAAA,CAAAA;",
|
|
6
|
-
"names": ["Schema", "EditorViewModes", "EditorViewMode", "Schema", "Union", "map", "mode", "Literal", "EditorInputModes", "EditorInputMode"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/testing/util.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n/** deprecated Replace with @dxos/util trim */\n// TODO(burdon): Remove\nexport const str = (...lines: string[]) => lines.join('\\n');\n"],
|
|
5
|
-
"mappings": ";;;AAMO,IAAMA,MAAM,IAAIC,UAAoBA,MAAMC,KAAK,IAAA;",
|
|
6
|
-
"names": ["str", "lines", "join"]
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type EditorView } from '@codemirror/view';
|
|
2
|
-
import { type NodeArg } from '@dxos/app-graph';
|
|
3
|
-
import { type EditorToolbarState } from './util';
|
|
4
|
-
export declare const createLists: (state: EditorToolbarState, getView: () => EditorView) => {
|
|
5
|
-
nodes: (Readonly<Omit<Readonly<{
|
|
6
|
-
id: string;
|
|
7
|
-
type: string;
|
|
8
|
-
cacheable?: string[];
|
|
9
|
-
properties: Readonly<import("@dxos/react-ui-menu").MenuActionProperties>;
|
|
10
|
-
data: import("@dxos/app-graph").ActionData;
|
|
11
|
-
}>, "properties"> & {
|
|
12
|
-
properties: Readonly<import("@dxos/react-ui-menu").MenuActionProperties>;
|
|
13
|
-
}> | NodeArg<any>)[];
|
|
14
|
-
edges: {
|
|
15
|
-
source: string;
|
|
16
|
-
target: string;
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=lists.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/lists.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK/C,OAAO,EAAE,KAAK,kBAAkB,EAA+C,MAAM,QAAQ,CAAC;AAiC9F,eAAO,MAAM,WAAW,GAAI,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU;;;;;;;;;;;;;;CAW/E,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type EditorView } from '@codemirror/view';
|
|
2
|
-
import { type Rx } from '@effect-rx/rx-react';
|
|
3
|
-
import { type Action } from '@dxos/app-graph';
|
|
4
|
-
import { type Live } from '@dxos/live-object';
|
|
5
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
6
|
-
import { type ActionGraphProps, type MenuActionProperties, type MenuItemGroup, type MenuSeparator, type ToolbarMenuActionGroupProperties } from '@dxos/react-ui-menu';
|
|
7
|
-
import type { EditorAction, Formatting } from '../../extensions';
|
|
8
|
-
import { type EditorViewMode } from '../../types';
|
|
9
|
-
export type EditorToolbarState = Formatting & Partial<{
|
|
10
|
-
viewMode: EditorViewMode;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const useEditorToolbarState: (initialState?: Partial<EditorToolbarState>) => Live<EditorToolbarState>;
|
|
13
|
-
export type EditorToolbarFeatureFlags = Partial<{
|
|
14
|
-
headings: boolean;
|
|
15
|
-
formatting: boolean;
|
|
16
|
-
lists: boolean;
|
|
17
|
-
blocks: boolean;
|
|
18
|
-
search: boolean;
|
|
19
|
-
image: () => void;
|
|
20
|
-
viewMode: (mode: EditorViewMode) => void;
|
|
21
|
-
}>;
|
|
22
|
-
export type EditorToolbarActionGraphProps = {
|
|
23
|
-
state: Live<EditorToolbarState>;
|
|
24
|
-
getView: () => EditorView;
|
|
25
|
-
customActions?: Rx.Rx<ActionGraphProps>;
|
|
26
|
-
};
|
|
27
|
-
export type EditorToolbarProps = ThemedClassName<EditorToolbarActionGraphProps & EditorToolbarFeatureFlags & {
|
|
28
|
-
attendableId?: string;
|
|
29
|
-
role?: string;
|
|
30
|
-
}>;
|
|
31
|
-
export type EditorToolbarItem = EditorAction | MenuItemGroup | MenuSeparator;
|
|
32
|
-
export declare const createEditorAction: (id: string, props: Partial<MenuActionProperties>, invoke: () => void) => Action<MenuActionProperties>;
|
|
33
|
-
export declare const createEditorActionGroup: (id: string, props: Omit<ToolbarMenuActionGroupProperties, "icon">, icon?: string) => {
|
|
34
|
-
id: string;
|
|
35
|
-
type: string;
|
|
36
|
-
properties: {
|
|
37
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
38
|
-
hidden?: boolean | undefined;
|
|
39
|
-
variant: "dropdownMenu" | "toggleGroup";
|
|
40
|
-
value: string | (string & string[]);
|
|
41
|
-
disabled?: boolean | undefined;
|
|
42
|
-
iconOnly: boolean;
|
|
43
|
-
testId?: string | undefined;
|
|
44
|
-
checked?: boolean | undefined;
|
|
45
|
-
selectCardinality: "single" | "multiple";
|
|
46
|
-
label: import("@dxos/react-ui").Label;
|
|
47
|
-
icon: string | undefined;
|
|
48
|
-
};
|
|
49
|
-
data: typeof import("@dxos/app-graph").actionGroupSymbol;
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EAGtC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,cAAc,CAAA;CAAE,CAAC,CAAC;AAEpF,eAAO,MAAM,qBAAqB,GAAI,eAAc,OAAO,CAAC,kBAAkB,CAAM,6BAEnF,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAEhB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,UAAU,CAAC;IAE1B,aAAa,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAC9C,6BAA6B,GAAG,yBAAyB,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CACrG,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,CAAC;AAE7E,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,EAAE,OAAO,OAAO,CAAC,oBAAoB,CAAC,EAAE,QAAQ,MAAM,IAAI,KAK/F,MAAM,CAAC,oBAAoB,CAClC,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,IAAI,MAAM,EACV,OAAO,IAAI,CAAC,gCAAgC,EAAE,MAAM,CAAC,EACrD,OAAO,MAAM;;;;;;;;;;;;;;;;;CASd,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type EditorView } from '@codemirror/view';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type Label } from '@dxos/react-ui';
|
|
4
|
-
import { type MaybePromise } from '@dxos/util';
|
|
5
|
-
export type CommandMenuGroup = {
|
|
6
|
-
id: string;
|
|
7
|
-
label?: Label;
|
|
8
|
-
items: CommandMenuItem[];
|
|
9
|
-
};
|
|
10
|
-
export type CommandMenuItem = {
|
|
11
|
-
id: string;
|
|
12
|
-
label: Label;
|
|
13
|
-
icon?: string;
|
|
14
|
-
onSelect?: (view: EditorView, head: number) => MaybePromise<void>;
|
|
15
|
-
};
|
|
16
|
-
export type CommandMenuProps = {
|
|
17
|
-
groups: CommandMenuGroup[];
|
|
18
|
-
currentItem?: string;
|
|
19
|
-
onSelect: (item: CommandMenuItem) => void;
|
|
20
|
-
};
|
|
21
|
-
export declare const CommandMenu: ({ groups, currentItem, onSelect }: CommandMenuProps) => React.JSX.Element;
|
|
22
|
-
export declare const getItem: (groups: CommandMenuGroup[], id?: string) => CommandMenuItem | undefined;
|
|
23
|
-
export declare const getNextItem: (groups: CommandMenuGroup[], id?: string) => CommandMenuItem;
|
|
24
|
-
export declare const getPreviousItem: (groups: CommandMenuGroup[], id?: string) => CommandMenuItem;
|
|
25
|
-
export declare const filterItems: (groups: CommandMenuGroup[], filter: (item: CommandMenuItem) => boolean) => CommandMenuGroup[];
|
|
26
|
-
export declare const insertAtCursor: (view: EditorView, head: number, insert: string) => void;
|
|
27
|
-
/**
|
|
28
|
-
* If the cursor is at the start of a line, insert the text at the cursor.
|
|
29
|
-
* Otherwise, insert the text on a new line.
|
|
30
|
-
*/
|
|
31
|
-
export declare const insertAtLineStart: (view: EditorView, head: number, insert: string) => void;
|
|
32
|
-
export declare const coreSlashCommands: CommandMenuGroup;
|
|
33
|
-
export declare const linkSlashCommands: CommandMenuGroup;
|
|
34
|
-
//# sourceMappingURL=CommandMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Popover/CommandMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,EAAQ,KAAK,KAAK,EAA+D,MAAM,gBAAgB,CAAC;AAC/G,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CAC3C,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,mCAAmC,gBAAgB,sBAyB9E,CAAC;AAiEF,eAAO,MAAM,OAAO,GAAI,QAAQ,gBAAgB,EAAE,EAAE,KAAK,MAAM,KAAG,eAAe,GAAG,SAEnF,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,gBAAgB,EAAE,EAAE,KAAK,MAAM,KAAG,eAIrE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,QAAQ,gBAAgB,EAAE,EAAE,KAAK,MAAM,KAAG,eAIzE,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,QAAQ,gBAAgB,EAAE,EAC1B,QAAQ,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,KACzC,gBAAgB,EAKlB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,UAAU,EAAE,MAAM,MAAM,EAAE,QAAQ,MAAM,SAK5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,UAAU,EAAE,MAAM,MAAM,EAAE,QAAQ,MAAM,SAW/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBA6E/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBA2B/B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type PreviewLinkRef, type PreviewLinkTarget, type PreviewLookup } from '../../extensions';
|
|
3
|
-
type RefDropdownMenuValue = Partial<{
|
|
4
|
-
link: PreviewLinkRef;
|
|
5
|
-
target: PreviewLinkTarget;
|
|
6
|
-
pending: boolean;
|
|
7
|
-
}>;
|
|
8
|
-
declare const useRefDropdownMenu: (consumerName: string) => Partial<{
|
|
9
|
-
link: PreviewLinkRef;
|
|
10
|
-
target: PreviewLinkTarget;
|
|
11
|
-
pending: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
type RefDropdownMenuProviderProps = PropsWithChildren<{
|
|
14
|
-
onLookup?: PreviewLookup;
|
|
15
|
-
}>;
|
|
16
|
-
export declare const RefDropdownMenu: {
|
|
17
|
-
Provider: ({ children, onLookup }: RefDropdownMenuProviderProps) => React.JSX.Element;
|
|
18
|
-
};
|
|
19
|
-
export { useRefDropdownMenu };
|
|
20
|
-
export type { RefDropdownMenuProviderProps, RefDropdownMenuValue };
|
|
21
|
-
//# sourceMappingURL=RefDropdownMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RefDropdownMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Popover/RefDropdownMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA4D,MAAM,OAAO,CAAC;AAMhH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOnG,KAAK,oBAAoB,GAAG,OAAO,CAAC;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAGH,QAAA,MAAuC,kBAAkB;UANjD,cAAc;YACZ,iBAAiB;aAChB,OAAO;EAIqG,CAAC;AAExH,KAAK,4BAA4B,GAAG,iBAAiB,CAAC;IACpD,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC,CAAC;AAiDH,eAAO,MAAM,eAAe;uCA/C6B,4BAA4B;CAiDpF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,YAAY,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type DxRefTag, type DxRefTagActivate } from '@dxos/lit-ui';
|
|
3
|
-
import { type PreviewLinkRef, type PreviewLinkTarget, type PreviewLookup } from '../../extensions';
|
|
4
|
-
export type RefPopoverProps = PropsWithChildren<{
|
|
5
|
-
modal?: boolean;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
onOpenChange?: (open: boolean) => void;
|
|
8
|
-
onActivate?: (event: DxRefTagActivate) => void;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const RefPopover: React.ForwardRefExoticComponent<{
|
|
11
|
-
modal?: boolean;
|
|
12
|
-
open?: boolean;
|
|
13
|
-
onOpenChange?: (open: boolean) => void;
|
|
14
|
-
onActivate?: (event: DxRefTagActivate) => void;
|
|
15
|
-
} & {
|
|
16
|
-
children?: React.ReactNode | undefined;
|
|
17
|
-
} & React.RefAttributes<DxRefTag | null>>;
|
|
18
|
-
type RefPopoverValue = Partial<{
|
|
19
|
-
link: PreviewLinkRef;
|
|
20
|
-
target: PreviewLinkTarget;
|
|
21
|
-
pending: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
declare const useRefPopover: (consumerName: string) => Partial<{
|
|
24
|
-
link: PreviewLinkRef;
|
|
25
|
-
target: PreviewLinkTarget;
|
|
26
|
-
pending: boolean;
|
|
27
|
-
}>;
|
|
28
|
-
type PreviewProviderProps = PropsWithChildren<{
|
|
29
|
-
onLookup?: PreviewLookup;
|
|
30
|
-
}>;
|
|
31
|
-
declare const PreviewProvider: ({ children, onLookup }: PreviewProviderProps) => React.JSX.Element;
|
|
32
|
-
export { PreviewProvider, useRefPopover };
|
|
33
|
-
export type { PreviewProviderProps, RefPopoverValue };
|
|
34
|
-
//# sourceMappingURL=RefPopover.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RefPopover.d.ts","sourceRoot":"","sources":["../../../../../src/components/Popover/RefPopover.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EACZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAInG,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU;YANb,OAAO;WACR,OAAO;mBACC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;iBACzB,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI;;;yCAwB/C,CAAC;AAGF,KAAK,eAAe,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAGtG,QAAA,MAAkC,aAAa;UAHR,cAAc;YAAU,iBAAiB;aAAW,OAAO;EAGA,CAAC;AAEnG,KAAK,oBAAoB,GAAG,iBAAiB,CAAC;IAAE,QAAQ,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE5E,QAAA,MAAM,eAAe,GAAI,wBAAwB,oBAAoB,sBAiCpE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAE1C,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Popover/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Completion, type CompletionSource } from '@codemirror/autocomplete';
|
|
2
|
-
import { type Extension } from '@codemirror/state';
|
|
3
|
-
export type AutocompleteResult = Completion;
|
|
4
|
-
export type AutocompleteOptions = {
|
|
5
|
-
activateOnTyping?: boolean;
|
|
6
|
-
override?: CompletionSource[];
|
|
7
|
-
onSearch?: (text: string) => Completion[];
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Autocomplete extension.
|
|
11
|
-
*/
|
|
12
|
-
export declare const autocomplete: ({ activateOnTyping, override, onSearch }?: AutocompleteOptions) => Extension;
|
|
13
|
-
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/extensions/autocomplete.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,gBAAgB,EAGtB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,EAAE,CAAC;CAC3C,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,2CAA0C,mBAAwB,KAAG,SAqCjG,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Command, type KeyBinding } from '@codemirror/view';
|
|
2
|
-
export type Action = {
|
|
3
|
-
type: 'insert';
|
|
4
|
-
text: string;
|
|
5
|
-
} | {
|
|
6
|
-
type: 'cancel';
|
|
7
|
-
};
|
|
8
|
-
export type ActionHandler = (action: Action) => void;
|
|
9
|
-
export declare const openEffect: import("@codemirror/state").StateEffectType<{
|
|
10
|
-
pos: number;
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const closeEffect: import("@codemirror/state").StateEffectType<null>;
|
|
14
|
-
export declare const openCommand: Command;
|
|
15
|
-
export declare const closeCommand: Command;
|
|
16
|
-
export declare const commandKeyBindings: readonly KeyBinding[];
|
|
17
|
-
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/command/action.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIlF,MAAM,MAAM,MAAM,GACd;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAErD,eAAO,MAAM,UAAU;SAA6B,MAAM;gBAAc,OAAO;EAAK,CAAC;AACrF,eAAO,MAAM,WAAW,mDAA6B,CAAC;AAEtD,eAAO,MAAM,WAAW,EAAE,OAWzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAO1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EAUnD,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { StateField } from '@codemirror/state';
|
|
2
|
-
import { type Range } from '../../types';
|
|
3
|
-
import { type PlaceholderOptions } from './placeholder';
|
|
4
|
-
export type CommandMenuOptions = {
|
|
5
|
-
trigger: string | string[];
|
|
6
|
-
placeholder?: Partial<PlaceholderOptions>;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
onArrowDown?: () => void;
|
|
9
|
-
onArrowUp?: () => void;
|
|
10
|
-
onEnter?: () => void;
|
|
11
|
-
onTextChange?: (trigger: string, text: string) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const commandMenu: (options: CommandMenuOptions) => (import("@codemirror/state").Extension | StateField<CommandState | null>)[];
|
|
14
|
-
type CommandState = {
|
|
15
|
-
trigger: string;
|
|
16
|
-
range: Range;
|
|
17
|
-
};
|
|
18
|
-
export declare const commandRangeEffect: import("@codemirror/state").StateEffectType<CommandState | null>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=command-menu.d.ts.map
|