@dxos/react-ui-editor 0.8.4-main.84f28bd → 0.8.4-main.ae835ea
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 +4225 -3369
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +71 -1
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- 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 +4225 -3369
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +71 -1
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/components/Editor/Editor.d.ts +24 -9
- package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
- package/dist/types/src/components/Editor/Editor.stories.d.ts +27 -0
- package/dist/types/src/components/Editor/Editor.stories.d.ts.map +1 -0
- package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +17 -2
- package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
- 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/lists.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/util.d.ts +6 -20
- package/dist/types/src/components/EditorToolbar/util.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts +1 -1
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- 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 +26 -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 +10 -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/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 +4 -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 -3
- 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/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/popover/PopoverMenuProvider.d.ts +36 -0
- package/dist/types/src/extensions/popover/PopoverMenuProvider.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/index.d.ts +8 -0
- package/dist/types/src/extensions/popover/index.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/menu-presets.d.ts +4 -0
- package/dist/types/src/extensions/popover/menu-presets.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/menu.d.ts +24 -0
- package/dist/types/src/extensions/popover/menu.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/modal.d.ts +7 -0
- package/dist/types/src/extensions/popover/modal.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/popover.d.ts +47 -0
- package/dist/types/src/extensions/popover/popover.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/usePopoverMenu.d.ts +34 -0
- package/dist/types/src/extensions/popover/usePopoverMenu.d.ts.map +1 -0
- package/dist/types/src/extensions/popover/util.d.ts +8 -0
- package/dist/types/src/extensions/popover/util.d.ts.map +1 -0
- 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/state.d.ts +2 -0
- package/dist/types/src/extensions/state.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 +72 -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 +4 -8
- 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 +21 -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 +6 -9
- package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/dist/types/src/testing/PreviewPopover.d.ts +20 -0
- package/dist/types/src/testing/PreviewPopover.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/util.d.ts +1 -0
- package/dist/types/src/testing/util.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 +1 -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 +71 -61
- package/src/components/Editor/Editor.stories.tsx +69 -0
- package/src/components/Editor/Editor.tsx +58 -15
- package/src/components/EditorToolbar/EditorToolbar.tsx +104 -93
- package/src/components/EditorToolbar/blocks.ts +22 -25
- package/src/components/EditorToolbar/formatting.ts +22 -25
- package/src/components/EditorToolbar/headings.ts +16 -9
- package/src/components/EditorToolbar/image.ts +8 -4
- package/src/components/EditorToolbar/lists.ts +16 -19
- package/src/components/EditorToolbar/search.ts +8 -4
- package/src/components/EditorToolbar/util.ts +18 -23
- package/src/components/EditorToolbar/view-mode.ts +11 -6
- package/src/components/index.ts +0 -1
- package/src/defaults.ts +5 -2
- package/src/extensions/autocomplete/autocomplete.ts +220 -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 +31 -24
- 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 +157 -0
- package/src/extensions/awareness/awareness-provider.ts +2 -2
- package/src/extensions/awareness/awareness.ts +2 -2
- package/src/extensions/comments.ts +18 -13
- package/src/extensions/dnd.ts +1 -1
- package/src/extensions/factories.ts +55 -37
- package/src/extensions/focus.ts +5 -4
- package/src/extensions/folding.tsx +4 -6
- package/src/extensions/hashtag.tsx +2 -2
- package/src/extensions/index.ts +4 -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 +24 -14
- package/src/extensions/markdown/formatting.test.ts +6 -6
- package/src/extensions/markdown/formatting.ts +11 -11
- package/src/extensions/markdown/highlight.ts +1 -1
- package/src/extensions/markdown/image.ts +3 -4
- package/src/extensions/markdown/link.ts +3 -0
- package/src/extensions/markdown/table.ts +7 -1
- package/src/extensions/mention.ts +1 -1
- 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 +7 -6
- package/src/extensions/outliner/selection.ts +1 -1
- package/src/extensions/outliner/tree.test.ts +2 -1
- package/src/extensions/outliner/tree.ts +2 -2
- package/src/extensions/popover/PopoverMenuProvider.tsx +220 -0
- package/src/extensions/popover/index.ts +12 -0
- package/src/extensions/popover/menu-presets.ts +124 -0
- package/src/extensions/popover/menu.ts +67 -0
- package/src/extensions/popover/modal.ts +24 -0
- package/src/extensions/popover/popover.ts +289 -0
- package/src/extensions/popover/usePopoverMenu.ts +173 -0
- package/src/extensions/popover/util.ts +29 -0
- package/src/extensions/preview/index.ts +1 -1
- package/src/extensions/preview/preview.ts +67 -67
- package/src/extensions/selection.ts +2 -2
- package/src/extensions/state.ts +7 -0
- package/src/extensions/tags/extended-markdown.test.ts +261 -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 +393 -0
- package/src/extensions/tags/xml-util.ts +94 -0
- package/src/hooks/useTextEditor.ts +27 -39
- package/src/stories/CommandDialog.stories.tsx +78 -0
- package/src/stories/Comments.stories.tsx +14 -10
- package/src/stories/EditorToolbar.stories.tsx +17 -17
- package/src/stories/Experimental.stories.tsx +17 -13
- package/src/stories/Markdown.stories.tsx +25 -21
- package/src/stories/Outliner.stories.tsx +54 -35
- package/src/stories/Popover.stories.tsx +163 -0
- package/src/stories/Preview.stories.tsx +49 -41
- package/src/stories/Tags.stories.tsx +81 -0
- package/src/stories/TextEditor.stories.tsx +41 -60
- package/src/stories/components/EditorStory.tsx +17 -16
- package/src/styles/theme.ts +18 -15
- package/src/testing/PreviewPopover.tsx +80 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/util.ts +2 -0
- 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 +2 -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/node-esm/chunk-YXYQPV6R.mjs.map +0 -7
- 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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/popover/util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,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"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import '@dxos/lit-ui/dx-ref-tag.pcss';
|
|
2
1
|
import { type EditorState, type Extension } from '@codemirror/state';
|
|
3
2
|
import { type SyntaxNode } from '@lezer/common';
|
|
3
|
+
export type PreviewBlock = {
|
|
4
|
+
link: PreviewLinkRef;
|
|
5
|
+
el: HTMLElement;
|
|
6
|
+
};
|
|
4
7
|
export type PreviewLinkRef = {
|
|
5
8
|
suggest?: boolean;
|
|
6
9
|
block?: boolean;
|
|
@@ -12,10 +15,9 @@ export type PreviewLinkTarget = {
|
|
|
12
15
|
text?: string;
|
|
13
16
|
object?: any;
|
|
14
17
|
};
|
|
15
|
-
export type PreviewLookup = (link: PreviewLinkRef) => Promise<PreviewLinkTarget | null | undefined>;
|
|
16
18
|
export type PreviewOptions = {
|
|
17
|
-
addBlockContainer?: (
|
|
18
|
-
removeBlockContainer?: (
|
|
19
|
+
addBlockContainer?: (block: PreviewBlock) => void;
|
|
20
|
+
removeBlockContainer?: (block: PreviewBlock) => void;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* Create preview decorations.
|
|
@@ -23,10 +25,8 @@ export type PreviewOptions = {
|
|
|
23
25
|
export declare const preview: (options?: PreviewOptions) => Extension;
|
|
24
26
|
/**
|
|
25
27
|
* Link references.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* ![Label][dxn:echo:123] Block reference
|
|
29
|
-
* ![Label][?dxn:echo:123] Suggestion
|
|
28
|
+
* [Label](dxn:echo:123) Inline reference
|
|
29
|
+
*  Block reference
|
|
30
30
|
*/
|
|
31
31
|
export declare const getLinkRef: (state: EditorState, node: SyntaxNode) => PreviewLinkRef | undefined;
|
|
32
32
|
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/preview/preview.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/preview/preview.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAA+B,MAAM,mBAAmB,CAAC;AAElG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,WAAW,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,UAAS,cAAmB,KAAG,SAmBtD,CAAC;AA0DF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,WAAW,EAAE,MAAM,UAAU,KAAG,cAAc,GAAG,SAclF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/extensions/state.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,gDAA2C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { type XmlWidgetRegistry } from './xml-tags';
|
|
3
|
+
export type ExtendedMarkdownOptions = {
|
|
4
|
+
registry?: XmlWidgetRegistry;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Extended markdown parser with mixed parser for custom rendering of XML tags.
|
|
8
|
+
*/
|
|
9
|
+
export declare const extendedMarkdown: ({ registry }?: ExtendedMarkdownOptions) => Extension;
|
|
10
|
+
//# sourceMappingURL=extended-markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extended-markdown.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/tags/extended-markdown.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,eAAc,uBAA4B,KAAG,SAiB7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extended-markdown.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/tags/extended-markdown.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/tags/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
export type StreamerOptions = {
|
|
3
|
+
cursor?: boolean;
|
|
4
|
+
fadeIn?: boolean | {
|
|
5
|
+
removalDelay?: number;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Extension that adds a blinking cursor widget at the end of the document.
|
|
10
|
+
*/
|
|
11
|
+
export declare const streamer: (options?: StreamerOptions) => Extension;
|
|
12
|
+
//# sourceMappingURL=streamer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamer.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/tags/streamer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAA2B,MAAM,mBAAmB,CAAC;AAQ5E,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,MAAM,CAAC,EAAE,OAAO,GAAG;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAS,eAAoB,KAAG,SAKxD,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { WidgetType } from '@codemirror/view';
|
|
3
|
+
import { type ComponentType, type FC } from 'react';
|
|
4
|
+
export type StateDispatch<T> = T | ((state: T) => T);
|
|
5
|
+
/**
|
|
6
|
+
* Manages widget state.
|
|
7
|
+
*/
|
|
8
|
+
export interface XmlWidgetStateManager {
|
|
9
|
+
updateWidget<T>(id: string, props: StateDispatch<T>): void;
|
|
10
|
+
}
|
|
11
|
+
export type XmlEventHandler<TEvent = any> = (event: TEvent) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Widget component.
|
|
14
|
+
*/
|
|
15
|
+
export type XmlWidgetProps<TContext = any, TProps = any> = TProps & {
|
|
16
|
+
_tag: string;
|
|
17
|
+
context: TContext;
|
|
18
|
+
onEvent?: XmlEventHandler;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Factory for creating widgets.
|
|
22
|
+
*/
|
|
23
|
+
export type XmlWidgetFactory = (props: XmlWidgetProps, onEvent?: XmlEventHandler) => WidgetType | null;
|
|
24
|
+
/**
|
|
25
|
+
* Widget registry definition.
|
|
26
|
+
*/
|
|
27
|
+
export type XmlWidgetDef = {
|
|
28
|
+
block?: boolean;
|
|
29
|
+
/** Native widget. */
|
|
30
|
+
factory?: XmlWidgetFactory;
|
|
31
|
+
/** React widget. */
|
|
32
|
+
Component?: FC<XmlWidgetProps>;
|
|
33
|
+
};
|
|
34
|
+
export type XmlWidgetRegistry = Record<string, XmlWidgetDef>;
|
|
35
|
+
export declare const getXmlTextChild: (children: any[]) => string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Update context.
|
|
38
|
+
*/
|
|
39
|
+
export declare const xmlTagContextEffect: import("@codemirror/state").StateEffectType<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Update widget.
|
|
42
|
+
*/
|
|
43
|
+
export declare const xmlTagUpdateEffect: import("@codemirror/state").StateEffectType<{
|
|
44
|
+
id: string;
|
|
45
|
+
value: any;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Reset all state.
|
|
49
|
+
*/
|
|
50
|
+
export declare const xmlTagResetEffect: import("@codemirror/state").StateEffectType<null>;
|
|
51
|
+
export type XmlWidgetState = {
|
|
52
|
+
id: string;
|
|
53
|
+
props: any;
|
|
54
|
+
root: HTMLElement;
|
|
55
|
+
Component: ComponentType<any>;
|
|
56
|
+
};
|
|
57
|
+
export interface XmlWidgetNotifier {
|
|
58
|
+
mounted(widget: XmlWidgetState): void;
|
|
59
|
+
unmounted(id: string): void;
|
|
60
|
+
}
|
|
61
|
+
export type XmlTagsOptions = {
|
|
62
|
+
registry?: XmlWidgetRegistry;
|
|
63
|
+
/**
|
|
64
|
+
* Called when a widget is mounted or unmounted.
|
|
65
|
+
*/
|
|
66
|
+
setWidgets?: (widgets: XmlWidgetState[]) => void;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Extension that adds thread-related functionality including XML tag decorations.
|
|
70
|
+
*/
|
|
71
|
+
export declare const xmlTags: (options?: XmlTagsOptions) => Extension;
|
|
72
|
+
//# sourceMappingURL=xml-tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml-tags.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/tags/xml-tags.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA8C,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AASpD,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC5D;AAED,MAAM,MAAM,eAAe,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,QAAQ,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,MAAM,GAAG;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,eAAe,KAAK,UAAU,GAAG,IAAI,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qBAAqB;IACrB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB;IACpB,SAAS,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAE7D,eAAO,MAAM,eAAe,GAAI,UAAU,GAAG,EAAE,KAAG,MAAM,GAAG,IAG1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,kDAA4B,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,kBAAkB;QAA4B,MAAM;WAAS,GAAG;EAAK,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,iBAAiB,mDAAuB,CAAC;AAStD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,UAAS,cAAmB,KAAG,SA4KtD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type EditorState } from '@codemirror/state';
|
|
2
|
+
import { type SyntaxNode } from '@lezer/common';
|
|
3
|
+
export type Tag = Record<string, any> & {
|
|
4
|
+
_tag: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Parse XML Element.
|
|
8
|
+
*/
|
|
9
|
+
export declare const nodeToJson: (state: EditorState, node: SyntaxNode) => Tag | undefined;
|
|
10
|
+
//# sourceMappingURL=xml-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml-util.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/tags/xml-util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,WAAW,EAAE,MAAM,UAAU,KAAG,GAAG,GAAG,SA6EvE,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type EditorStateConfig, type Text } from '@codemirror/state';
|
|
2
2
|
import { EditorView } from '@codemirror/view';
|
|
3
|
-
import { type
|
|
4
|
-
import { type DependencyList, type KeyboardEventHandler, type RefObject } from 'react';
|
|
3
|
+
import { type ComponentPropsWithoutRef, type DependencyList, type RefObject } from 'react';
|
|
5
4
|
import { type MaybeProvider } from '@dxos/util';
|
|
6
5
|
import { type EditorSelection } from '../extensions';
|
|
7
6
|
export type CursorInfo = {
|
|
@@ -13,12 +12,9 @@ export type CursorInfo = {
|
|
|
13
12
|
after?: string;
|
|
14
13
|
};
|
|
15
14
|
export type UseTextEditor = {
|
|
16
|
-
parentRef: RefObject<HTMLDivElement>;
|
|
17
|
-
view
|
|
18
|
-
focusAttributes?:
|
|
19
|
-
tabIndex: 0;
|
|
20
|
-
onKeyUp: KeyboardEventHandler<HTMLDivElement>;
|
|
21
|
-
};
|
|
15
|
+
parentRef: RefObject<HTMLDivElement | null>;
|
|
16
|
+
view: EditorView | null;
|
|
17
|
+
focusAttributes?: ComponentPropsWithoutRef<'div'>;
|
|
22
18
|
};
|
|
23
19
|
export type UseTextEditorProps = Pick<EditorStateConfig, 'extensions'> & {
|
|
24
20
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextEditor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,iBAAiB,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"useTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextEditor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,iBAAiB,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEnB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,aAAa,EAA8B,MAAM,YAAY,CAAC;AAE5E,OAAO,EAAE,KAAK,eAAe,EAA6D,MAAM,eAAe,CAAC;AAKhH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GAAG;IACvE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAO,aAAa,CAAC,kBAAkB,CAAM,EAC7C,OAAM,cAAmB,KACxB,aAuHF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: () => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
//# sourceMappingURL=CommandDialog.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandDialog.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/CommandDialog.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAuC,MAAM,OAAO,CAAC;AA2D5D,QAAA,MAAM,IAAI;;;;;;;CAOqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import '@
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Pick<import("..").UseTextEditorProps, "selection" | "scrollTo" | "id" | "extensions"> & Pick<import("..").ThemeExtensionsOptions, "slots"> & {
|
|
6
|
+
debug?: import("./components").DebugMode;
|
|
7
|
+
debugCustom?: (view: import("@codemirror/view").EditorView) => React.ReactNode;
|
|
8
|
+
text?: string;
|
|
9
|
+
object?: import("@dxos/echo/internal").Expando;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
lineNumbers?: boolean;
|
|
13
|
+
onReady?: (view: import("@codemirror/view").EditorView) => void;
|
|
14
|
+
} & React.RefAttributes<import("@codemirror/view").EditorView | null>>;
|
|
15
|
+
decorators: import("@storybook/react").Decorator[];
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: string;
|
|
18
|
+
};
|
|
12
19
|
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Comments: Story;
|
|
23
|
+
export declare const Annotations: Story;
|
|
13
24
|
//# sourceMappingURL=Comments.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Comments.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Comments.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Comments.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Comments.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAkB,MAAM,OAAO,CAAC;AAcvC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAO0B,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,QAAQ,EAAE,KAmCtB,CAAC;AAyBF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
|
|
@@ -1,11 +1,47 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
3
|
-
import
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import { type UseTextEditorProps } from '../hooks';
|
|
5
4
|
type StoryProps = {
|
|
6
5
|
placeholder?: string;
|
|
7
6
|
} & UseTextEditorProps;
|
|
8
|
-
declare const meta:
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
render: ({ autoFocus, initialValue, placeholder }: StoryProps) => React.JSX.Element;
|
|
10
|
+
decorators: import("@storybook/react").Decorator[];
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: string;
|
|
13
|
+
translations: [{
|
|
14
|
+
readonly 'en-US': {
|
|
15
|
+
readonly "react-ui-editor": {
|
|
16
|
+
readonly 'strong label': "Bold";
|
|
17
|
+
readonly 'emphasis label': "Italics";
|
|
18
|
+
readonly 'strikethrough label': "Strikethrough";
|
|
19
|
+
readonly 'code label': "Code";
|
|
20
|
+
readonly 'link label': "Link";
|
|
21
|
+
readonly 'list-bullet label': "Bullet list";
|
|
22
|
+
readonly 'list-ordered label': "Numbered list";
|
|
23
|
+
readonly 'list-task label': "Task list";
|
|
24
|
+
readonly 'blockquote label': "Block quote";
|
|
25
|
+
readonly 'codeblock label': "Code block";
|
|
26
|
+
readonly 'comment label': "Create comment";
|
|
27
|
+
readonly 'selection overlaps existing comment label': "Selection overlaps existing comment";
|
|
28
|
+
readonly 'select text to comment label': "Select text to comment";
|
|
29
|
+
readonly 'image label': "Insert image";
|
|
30
|
+
readonly 'table label': "Create table";
|
|
31
|
+
readonly 'heading label': "Heading level";
|
|
32
|
+
readonly 'heading level label_zero': "Paragraph";
|
|
33
|
+
readonly 'heading level label_one': "Heading level {{count}}";
|
|
34
|
+
readonly 'heading level label_other': "Heading level {{count}}";
|
|
35
|
+
readonly 'view mode label': "Editor view";
|
|
36
|
+
readonly 'preview mode label': "Live preview";
|
|
37
|
+
readonly 'readonly mode label': "Read only";
|
|
38
|
+
readonly 'search label': "Search";
|
|
39
|
+
readonly 'source mode label': "Source";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
9
45
|
export default meta;
|
|
10
46
|
type Story = StoryObj<typeof meta>;
|
|
11
47
|
export declare const Default: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorToolbar.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/EditorToolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"EditorToolbar.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/EditorToolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgC,MAAM,OAAO,CAAC;AAkBrD,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,UAAU,CAAC;AAIlE,KAAK,UAAU,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC;AA+ChE,QAAA,MAAM,IAAI;;uDA7CsD,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDrC,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import '@
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Pick<import("..").UseTextEditorProps, "selection" | "scrollTo" | "id" | "extensions"> & Pick<import("..").ThemeExtensionsOptions, "slots"> & {
|
|
6
|
+
debug?: import("./components").DebugMode;
|
|
7
|
+
debugCustom?: (view: import("@codemirror/view").EditorView) => React.ReactNode;
|
|
8
|
+
text?: string;
|
|
9
|
+
object?: import("@dxos/echo/internal").Expando;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
lineNumbers?: boolean;
|
|
13
|
+
onReady?: (view: import("@codemirror/view").EditorView) => void;
|
|
14
|
+
} & React.RefAttributes<import("@codemirror/view").EditorView | null>>;
|
|
15
|
+
decorators: import("@storybook/react").Decorator[];
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: string;
|
|
18
|
+
};
|
|
15
19
|
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Typewriter: Story;
|
|
23
|
+
export declare const Blast: Story;
|
|
24
|
+
export declare const DND: Story;
|
|
16
25
|
//# sourceMappingURL=Experimental.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Experimental.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Experimental.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Experimental.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Experimental.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAO0B,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,KAqBnB,CAAC;AAMF,eAAO,MAAM,GAAG,EAAE,KAajB,CAAC"}
|
|
@@ -1,46 +1,35 @@
|
|
|
1
|
-
import '@
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
export declare const Image: {
|
|
20
|
-
render: () => React.JSX.Element;
|
|
21
|
-
};
|
|
22
|
-
export declare const Code: {
|
|
23
|
-
render: () => React.JSX.Element;
|
|
24
|
-
};
|
|
25
|
-
export declare const Lists: {
|
|
26
|
-
render: () => React.JSX.Element;
|
|
27
|
-
};
|
|
28
|
-
export declare const BulletList: {
|
|
29
|
-
render: () => React.JSX.Element;
|
|
30
|
-
};
|
|
31
|
-
export declare const OrderedList: {
|
|
32
|
-
render: () => React.JSX.Element;
|
|
33
|
-
};
|
|
34
|
-
export declare const TaskList: {
|
|
35
|
-
render: () => React.JSX.Element;
|
|
36
|
-
};
|
|
37
|
-
export declare const TaskListEmpty: {
|
|
38
|
-
render: () => React.JSX.Element;
|
|
39
|
-
};
|
|
40
|
-
export declare const Table: {
|
|
41
|
-
render: () => React.JSX.Element;
|
|
42
|
-
};
|
|
43
|
-
export declare const CommentedOut: {
|
|
44
|
-
render: () => React.JSX.Element;
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Pick<import("..").UseTextEditorProps, "selection" | "scrollTo" | "id" | "extensions"> & Pick<import("..").ThemeExtensionsOptions, "slots"> & {
|
|
6
|
+
debug?: import("./components").DebugMode;
|
|
7
|
+
debugCustom?: (view: import("@codemirror/view").EditorView) => React.ReactNode;
|
|
8
|
+
text?: string;
|
|
9
|
+
object?: import("@dxos/echo/internal").Expando;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
lineNumbers?: boolean;
|
|
13
|
+
onReady?: (view: import("@codemirror/view").EditorView) => void;
|
|
14
|
+
} & React.RefAttributes<import("@codemirror/view").EditorView | null>>;
|
|
15
|
+
decorators: import("@storybook/react").Decorator[];
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: string;
|
|
18
|
+
};
|
|
45
19
|
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Default: Story;
|
|
23
|
+
export declare const Blockquote: Story;
|
|
24
|
+
export declare const Headings: Story;
|
|
25
|
+
export declare const Links: Story;
|
|
26
|
+
export declare const Image: Story;
|
|
27
|
+
export declare const Code: Story;
|
|
28
|
+
export declare const Lists: Story;
|
|
29
|
+
export declare const BulletList: Story;
|
|
30
|
+
export declare const OrderedList: Story;
|
|
31
|
+
export declare const TaskList: Story;
|
|
32
|
+
export declare const TaskListEmpty: Story;
|
|
33
|
+
export declare const Table: Story;
|
|
34
|
+
export declare const CommentedOut: Story;
|
|
46
35
|
//# sourceMappingURL=Markdown.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Markdown.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Markdown.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Markdown.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAO0B,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAMF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAMF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAC"}
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
type StoryProps = {
|
|
4
|
-
text
|
|
4
|
+
text?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const meta:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
args: {
|
|
13
|
-
text: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const Nested: {
|
|
17
|
-
args: {
|
|
18
|
-
text: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare const Continuation: {
|
|
22
|
-
args: {
|
|
23
|
-
text: string;
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
render: ({ text }: StoryProps) => React.JSX.Element;
|
|
9
|
+
decorators: import("@storybook/react").Decorator[];
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
24
12
|
};
|
|
25
13
|
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Empty: Story;
|
|
17
|
+
export declare const Basic: Story;
|
|
18
|
+
export declare const Nested: Story;
|
|
19
|
+
export declare const Continuation: Story;
|
|
26
20
|
//# sourceMappingURL=Outliner.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Outliner.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Outliner.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Outliner.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Outliner.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA0B,MAAM,OAAO,CAAC;AAkB/C,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAiDF,QAAA,MAAM,IAAI;;uBA/CsB,UAAU;;;;;CAsDL,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAanB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAapB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type UsePopoverMenuProps } from '../extensions';
|
|
4
|
+
type StoryProps = Omit<UsePopoverMenuProps, 'viewRef'> & {
|
|
5
|
+
text: string;
|
|
6
|
+
};
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
render: ({ text, ...props }: StoryProps) => React.JSX.Element;
|
|
10
|
+
decorators: import("@storybook/react").Decorator[];
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const Formatting: Story;
|
|
19
|
+
export declare const Link: Story;
|
|
20
|
+
//# sourceMappingURL=Popover.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Popover.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD,OAAO,EAIL,KAAK,mBAAmB,EAQzB,MAAM,eAAe,CAAC;AAyBvB,KAAK,UAAU,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAuD1E,QAAA,MAAM,IAAI;;iCArDgC,UAAU;;;;;CA4Df,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAsBlB,CAAC"}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import '@
|
|
1
|
+
import { type EditorView } from '@codemirror/view';
|
|
2
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<Pick<import("..").UseTextEditorProps, "selection" | "scrollTo" | "id" | "extensions"> & Pick<import("..").ThemeExtensionsOptions, "slots"> & {
|
|
7
|
+
debug?: import("./components").DebugMode;
|
|
8
|
+
debugCustom?: (view: EditorView) => React.ReactNode;
|
|
9
|
+
text?: string;
|
|
10
|
+
object?: import("@dxos/echo/internal").Expando;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
lineNumbers?: boolean;
|
|
14
|
+
onReady?: (view: EditorView) => void;
|
|
15
|
+
} & React.RefAttributes<EditorView | null>>;
|
|
16
|
+
decorators: import("@storybook/react").Decorator[];
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: string;
|
|
19
|
+
};
|
|
9
20
|
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Default: Story;
|
|
10
24
|
//# sourceMappingURL=Preview.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Preview.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Preview.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAoD,MAAM,OAAO,CAAC;AAsKzE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAO0B,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAiDrB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: ({ text }: {
|
|
6
|
+
text?: string;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
decorators: import("@storybook/react").Decorator[];
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
//# sourceMappingURL=Tags.stories.d.ts.map
|