@dxos/react-ui-editor 0.8.1 → 0.8.2-main.10c050d
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/index.mjs +4152 -2852
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +6 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/node/index.cjs +3318 -2009
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +29 -0
- package/dist/lib/node/testing/index.cjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +4152 -2852
- 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 +8 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +1 -1
- package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/blocks.d.ts +4 -3
- package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/formatting.d.ts +4 -3
- package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/headings.d.ts +4 -3
- package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/{comment.d.ts → image.d.ts} +4 -5
- package/dist/types/src/components/EditorToolbar/image.d.ts.map +1 -0
- package/dist/types/src/components/EditorToolbar/index.d.ts +1 -1
- package/dist/types/src/components/EditorToolbar/index.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/lists.d.ts +4 -3
- package/dist/types/src/components/EditorToolbar/lists.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/search.d.ts +17 -0
- package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -0
- package/dist/types/src/components/EditorToolbar/util.d.ts +17 -25
- package/dist/types/src/components/EditorToolbar/util.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/{viewMode.d.ts → view-mode.d.ts} +5 -4
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -0
- package/dist/types/src/components/Popover/RefDropdownMenu.d.ts +21 -0
- package/dist/types/src/components/Popover/RefDropdownMenu.d.ts.map +1 -0
- package/dist/types/src/components/Popover/RefPopover.d.ts +21 -0
- package/dist/types/src/components/Popover/RefPopover.d.ts.map +1 -0
- package/dist/types/src/components/Popover/index.d.ts +3 -0
- package/dist/types/src/components/Popover/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/defaults.d.ts +3 -5
- package/dist/types/src/defaults.d.ts.map +1 -1
- package/dist/types/src/extensions/annotations.d.ts +4 -1
- package/dist/types/src/extensions/annotations.d.ts.map +1 -1
- package/dist/types/src/extensions/autocomplete.d.ts +1 -2
- package/dist/types/src/extensions/autocomplete.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +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.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/automerge/update-codemirror.d.ts +1 -1
- package/dist/types/src/extensions/automerge/update-codemirror.d.ts.map +1 -1
- package/dist/types/src/extensions/awareness/awareness-provider.d.ts.map +1 -1
- package/dist/types/src/extensions/awareness/awareness.d.ts.map +1 -1
- package/dist/types/src/extensions/blast.d.ts.map +1 -1
- package/dist/types/src/extensions/command/action.d.ts +17 -0
- package/dist/types/src/extensions/command/action.d.ts.map +1 -0
- package/dist/types/src/extensions/command/command.d.ts +4 -10
- package/dist/types/src/extensions/command/command.d.ts.map +1 -1
- package/dist/types/src/extensions/command/hint.d.ts +18 -4
- package/dist/types/src/extensions/command/hint.d.ts.map +1 -1
- package/dist/types/src/extensions/command/index.d.ts +3 -0
- package/dist/types/src/extensions/command/index.d.ts.map +1 -1
- package/dist/types/src/extensions/command/menu.d.ts +6 -11
- package/dist/types/src/extensions/command/menu.d.ts.map +1 -1
- package/dist/types/src/extensions/command/state.d.ts +9 -11
- package/dist/types/src/extensions/command/state.d.ts.map +1 -1
- package/dist/types/src/extensions/command/typeahead.d.ts +17 -0
- package/dist/types/src/extensions/command/typeahead.d.ts.map +1 -0
- package/dist/types/src/extensions/comments.d.ts +9 -17
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/dist/types/src/extensions/debug.d.ts.map +1 -1
- package/dist/types/src/extensions/dnd.d.ts.map +1 -1
- package/dist/types/src/extensions/factories.d.ts +4 -0
- package/dist/types/src/extensions/factories.d.ts.map +1 -1
- package/dist/types/src/extensions/folding.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +3 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/json.d.ts +7 -0
- package/dist/types/src/extensions/json.d.ts.map +1 -0
- package/dist/types/src/extensions/listener.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/{editorAction.d.ts → action.d.ts} +1 -1
- package/dist/types/src/extensions/markdown/action.d.ts.map +1 -0
- package/dist/types/src/extensions/markdown/bundle.d.ts +2 -1
- package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/changes.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/debug.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/decorate.d.ts +5 -1
- package/dist/types/src/extensions/markdown/decorate.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/formatting.d.ts +3 -3
- package/dist/types/src/extensions/markdown/formatting.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/index.d.ts +1 -1
- package/dist/types/src/extensions/markdown/index.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/link.d.ts +4 -1
- package/dist/types/src/extensions/markdown/link.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/styles.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/table.d.ts.map +1 -1
- package/dist/types/src/extensions/mention.d.ts.map +1 -1
- package/dist/types/src/extensions/modes.d.ts +5 -5
- package/dist/types/src/extensions/modes.d.ts.map +1 -1
- package/dist/types/src/extensions/outliner/commands.d.ts +10 -0
- package/dist/types/src/extensions/outliner/commands.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/editor.d.ts +5 -0
- package/dist/types/src/extensions/outliner/editor.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/editor.test.d.ts +2 -0
- package/dist/types/src/extensions/outliner/editor.test.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/index.d.ts +4 -0
- package/dist/types/src/extensions/outliner/index.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/outliner.d.ts +13 -0
- package/dist/types/src/extensions/outliner/outliner.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/outliner.test.d.ts +2 -0
- package/dist/types/src/extensions/outliner/outliner.test.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/selection.d.ts +12 -0
- package/dist/types/src/extensions/outliner/selection.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/tree.d.ts +79 -0
- package/dist/types/src/extensions/outliner/tree.d.ts.map +1 -0
- package/dist/types/src/extensions/outliner/tree.test.d.ts +2 -0
- package/dist/types/src/extensions/outliner/tree.test.d.ts.map +1 -0
- package/dist/types/src/extensions/preview/index.d.ts +2 -0
- package/dist/types/src/extensions/preview/index.d.ts.map +1 -0
- package/dist/types/src/extensions/preview/preview.d.ts +39 -0
- package/dist/types/src/extensions/preview/preview.d.ts.map +1 -0
- package/dist/types/src/extensions/selection.d.ts.map +1 -1
- package/dist/types/src/extensions/typewriter.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useTextEditor.d.ts +2 -1
- package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
- package/dist/types/src/stories/Command.stories.d.ts +7 -0
- package/dist/types/src/stories/Command.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Comments.stories.d.ts +13 -0
- package/dist/types/src/stories/Comments.stories.d.ts.map +1 -0
- package/dist/types/src/stories/EditorToolbar.stories.d.ts +12 -0
- package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Experimental.stories.d.ts +16 -0
- package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Markdown.stories.d.ts +46 -0
- package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Outliner.stories.d.ts +26 -0
- package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Preview.stories.d.ts +10 -0
- package/dist/types/src/stories/Preview.stories.d.ts.map +1 -0
- package/dist/types/src/stories/TextEditor.stories.d.ts +55 -0
- package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -0
- package/dist/types/src/stories/util.d.ts +53 -0
- package/dist/types/src/stories/util.d.ts.map +1 -0
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/dist/types/src/styles/tokens.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/util.d.ts +2 -0
- package/dist/types/src/testing/util.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +5 -0
- package/dist/types/src/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.map +1 -1
- package/dist/types/src/util/dom.d.ts.map +1 -1
- package/dist/types/src/util/facet.d.ts.map +1 -1
- package/dist/types/src/util/react.d.ts +6 -1
- package/dist/types/src/util/react.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -30
- package/src/components/EditorToolbar/EditorToolbar.tsx +95 -72
- package/src/components/EditorToolbar/blocks.ts +27 -6
- package/src/components/EditorToolbar/formatting.ts +34 -7
- package/src/components/EditorToolbar/headings.ts +9 -8
- package/src/components/EditorToolbar/image.ts +16 -0
- package/src/components/EditorToolbar/index.ts +7 -1
- package/src/components/EditorToolbar/lists.ts +26 -7
- package/src/components/EditorToolbar/search.ts +19 -0
- package/src/components/EditorToolbar/util.ts +19 -20
- package/src/components/EditorToolbar/{viewMode.ts → view-mode.ts} +9 -8
- package/src/components/Popover/RefDropdownMenu.tsx +77 -0
- package/src/components/Popover/RefPopover.tsx +75 -0
- package/src/components/Popover/index.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/defaults.ts +12 -13
- package/src/extensions/annotations.ts +41 -64
- package/src/extensions/autocomplete.ts +5 -6
- package/src/extensions/automerge/automerge.stories.tsx +13 -24
- package/src/extensions/automerge/automerge.test.tsx +6 -5
- package/src/extensions/automerge/automerge.ts +2 -2
- package/src/extensions/automerge/defs.ts +1 -2
- package/src/extensions/automerge/sync.ts +7 -7
- package/src/extensions/automerge/update-automerge.ts +1 -1
- package/src/extensions/automerge/update-codemirror.ts +3 -4
- package/src/extensions/awareness/awareness-provider.ts +4 -4
- package/src/extensions/awareness/awareness.ts +7 -7
- package/src/extensions/blast.ts +9 -9
- package/src/extensions/command/action.ts +49 -0
- package/src/extensions/command/command.ts +7 -27
- package/src/extensions/command/hint.ts +36 -33
- package/src/extensions/command/index.ts +3 -0
- package/src/extensions/command/menu.ts +79 -51
- package/src/extensions/command/state.ts +41 -61
- package/src/extensions/command/typeahead.ts +116 -0
- package/src/extensions/comments.ts +11 -76
- package/src/extensions/factories.ts +13 -0
- package/src/extensions/folding.tsx +1 -1
- package/src/extensions/index.ts +3 -0
- package/src/extensions/json.ts +56 -0
- package/src/extensions/markdown/bundle.ts +13 -9
- package/src/extensions/markdown/changes.ts +3 -2
- package/src/extensions/markdown/decorate.ts +19 -17
- package/src/extensions/markdown/formatting.ts +6 -6
- package/src/extensions/markdown/image.ts +14 -13
- package/src/extensions/markdown/index.ts +1 -1
- package/src/extensions/markdown/link.ts +33 -24
- package/src/extensions/markdown/styles.ts +4 -3
- package/src/extensions/markdown/table.ts +3 -3
- package/src/extensions/modes.ts +5 -6
- package/src/extensions/outliner/commands.ts +270 -0
- package/src/extensions/outliner/editor.test.ts +33 -0
- package/src/extensions/outliner/editor.ts +184 -0
- package/src/extensions/outliner/index.ts +7 -0
- package/src/extensions/outliner/outliner.test.ts +99 -0
- package/src/extensions/outliner/outliner.ts +168 -0
- package/src/extensions/outliner/selection.ts +50 -0
- package/src/extensions/outliner/tree.test.ts +164 -0
- package/src/extensions/outliner/tree.ts +315 -0
- package/src/extensions/preview/index.ts +5 -0
- package/src/extensions/preview/preview.ts +271 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useTextEditor.ts +4 -3
- package/src/stories/Command.stories.tsx +97 -0
- package/src/stories/Comments.stories.tsx +98 -0
- package/src/stories/EditorToolbar.stories.tsx +96 -0
- package/src/stories/Experimental.stories.tsx +86 -0
- package/src/stories/Markdown.stories.tsx +121 -0
- package/src/stories/Outliner.stories.tsx +108 -0
- package/src/stories/Preview.stories.tsx +149 -0
- package/src/stories/TextEditor.stories.tsx +256 -0
- package/src/stories/util.tsx +326 -0
- package/src/styles/theme.ts +15 -5
- package/src/styles/tokens.ts +1 -2
- package/src/testing/index.ts +5 -0
- package/src/testing/util.ts +5 -0
- package/src/types.ts +7 -0
- package/src/util/react.tsx +20 -2
- package/dist/types/src/InputMode.stories.d.ts +0 -57
- package/dist/types/src/InputMode.stories.d.ts.map +0 -1
- package/dist/types/src/TextEditor.stories.d.ts +0 -115
- package/dist/types/src/TextEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/EditorToolbar/comment.d.ts.map +0 -1
- package/dist/types/src/components/EditorToolbar/viewMode.d.ts.map +0 -1
- package/dist/types/src/extensions/command/preview.d.ts +0 -12
- package/dist/types/src/extensions/command/preview.d.ts.map +0 -1
- package/dist/types/src/extensions/markdown/editorAction.d.ts.map +0 -1
- package/dist/types/src/fragments.d.ts +0 -3
- package/dist/types/src/fragments.d.ts.map +0 -1
- package/dist/types/src/hooks/useActionHandler.d.ts +0 -4
- package/dist/types/src/hooks/useActionHandler.d.ts.map +0 -1
- package/src/InputMode.stories.tsx +0 -124
- package/src/TextEditor.stories.tsx +0 -856
- package/src/components/EditorToolbar/comment.ts +0 -23
- package/src/extensions/command/preview.ts +0 -79
- package/src/fragments.ts +0 -19
- package/src/hooks/useActionHandler.ts +0 -12
- /package/src/extensions/markdown/{editorAction.ts → action.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"typewriter.d.ts","sourceRoot":"","sources":["../../../../src/extensions/typewriter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,UAAU,
|
1
|
+
{"version":3,"file":"typewriter.d.ts","sourceRoot":"","sources":["../../../../src/extensions/typewriter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,mBAAsC,WAAgB,KAAG,SAgDnF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type EditorStateConfig } from '@codemirror/state';
|
1
|
+
import { type EditorStateConfig, type Text } from '@codemirror/state';
|
2
2
|
import { EditorView } from '@codemirror/view';
|
3
3
|
import { type TabsterTypes } from '@fluentui/react-tabster';
|
4
4
|
import { type DependencyList, type KeyboardEventHandler, type RefObject } from 'react';
|
@@ -22,6 +22,7 @@ export type CursorInfo = {
|
|
22
22
|
};
|
23
23
|
export type UseTextEditorProps = Pick<EditorStateConfig, 'extensions'> & {
|
24
24
|
id?: string;
|
25
|
+
doc?: Text;
|
25
26
|
initialValue?: string;
|
26
27
|
className?: string;
|
27
28
|
autoFocus?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextEditor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
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,EAAqB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE9E,OAAO,EAAE,KAAK,eAAe,EAA6D,MAAM,eAAe,CAAC;AAGhH,MAAM,MAAM,aAAa,GAAG;IAE1B,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,eAAe,CAAC,EAAE,YAAY,CAAC,mBAAmB,GAAG;QACnD,QAAQ,EAAE,CAAC,CAAC;QACZ,OAAO,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;KAC/C,CAAC;CACH,CAAC;AAEF,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,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,MAAM,CAAC;IACnB,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;AAIF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAO,aAAa,CAAC,kBAAkB,CAAM,EAC7C,OAAM,cAAmB,KACxB,aA+HF,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import { type Meta } from '@dxos/storybook-utils';
|
3
|
+
import { EditorStory } from './util';
|
4
|
+
declare const meta: Meta<typeof EditorStory>;
|
5
|
+
export default meta;
|
6
|
+
export declare const Default: {};
|
7
|
+
//# sourceMappingURL=Command.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Command.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Command.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAMrB,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAsDrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CA0BlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import React from 'react';
|
3
|
+
import { type Meta } from '@dxos/storybook-utils';
|
4
|
+
import { EditorStory } from './util';
|
5
|
+
declare const meta: Meta<typeof EditorStory>;
|
6
|
+
export default meta;
|
7
|
+
export declare const Comments: {
|
8
|
+
render: () => React.JSX.Element;
|
9
|
+
};
|
10
|
+
export declare const Annotations: {
|
11
|
+
render: () => React.JSX.Element;
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=Comments.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Comments.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Comments.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAqB,MAAM,QAAQ,CAAC;AAMxD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,QAAQ;;CAmCpB,CAAC;AAyBF,eAAO,MAAM,WAAW;;CAIvB,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import { type StoryObj } from '@storybook/react';
|
3
|
+
import { type Meta } from '@dxos/storybook-utils';
|
4
|
+
import { type UseTextEditorProps } from '../hooks';
|
5
|
+
type StoryProps = {
|
6
|
+
placeholder?: string;
|
7
|
+
} & UseTextEditorProps;
|
8
|
+
declare const meta: Meta<StoryProps>;
|
9
|
+
export default meta;
|
10
|
+
type Story = StoryObj<typeof meta>;
|
11
|
+
export declare const Default: Story;
|
12
|
+
//# sourceMappingURL=EditorToolbar.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EditorToolbar.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/EditorToolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMjD,OAAO,EAAE,KAAK,IAAI,EAAyB,MAAM,uBAAuB,CAAC;AAezE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGlE,KAAK,UAAU,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC;AAgDhE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAK1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import React from 'react';
|
3
|
+
import { type Meta } from '@dxos/storybook-utils';
|
4
|
+
import { EditorStory } from './util';
|
5
|
+
declare const meta: Meta<typeof EditorStory>;
|
6
|
+
export default meta;
|
7
|
+
export declare const Typewriter: {
|
8
|
+
render: () => React.JSX.Element;
|
9
|
+
};
|
10
|
+
export declare const Blast: {
|
11
|
+
render: () => React.JSX.Element;
|
12
|
+
};
|
13
|
+
export declare const DND: {
|
14
|
+
render: () => React.JSX.Element;
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=Experimental.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Experimental.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Experimental.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAW,MAAM,QAAQ,CAAC;AAI9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAQpB,eAAO,MAAM,UAAU;;CAOtB,CAAC;AAMF,eAAO,MAAM,KAAK;;CAqBjB,CAAC;AAMF,eAAO,MAAM,GAAG;;CAaf,CAAC"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import React from 'react';
|
3
|
+
import { type Meta } from '@dxos/storybook-utils';
|
4
|
+
import { EditorStory } from './util';
|
5
|
+
declare const meta: Meta<typeof EditorStory>;
|
6
|
+
export default meta;
|
7
|
+
export declare const Default: {
|
8
|
+
render: () => React.JSX.Element;
|
9
|
+
};
|
10
|
+
export declare const Blockquote: {
|
11
|
+
render: () => React.JSX.Element;
|
12
|
+
};
|
13
|
+
export declare const Headings: {
|
14
|
+
render: () => React.JSX.Element;
|
15
|
+
};
|
16
|
+
export declare const Links: {
|
17
|
+
render: () => React.JSX.Element;
|
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;
|
45
|
+
};
|
46
|
+
//# sourceMappingURL=Markdown.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Markdown.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Markdown.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAiE,MAAM,QAAQ,CAAC;AAIpG,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,UAAU;;CAQtB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,IAAI;;CAEhB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAOjB,CAAC;AAMF,eAAO,MAAM,UAAU;;CAEtB,CAAC;AAMF,eAAO,MAAM,WAAW;;CAEvB,CAAC;AAMF,eAAO,MAAM,QAAQ;;CAIpB,CAAC;AAEF,eAAO,MAAM,aAAa;;CAEzB,CAAC;AAMF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAMF,eAAO,MAAM,YAAY;;CAWxB,CAAC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import { type Meta } from '@dxos/storybook-utils';
|
3
|
+
type StoryProps = {
|
4
|
+
text: string;
|
5
|
+
};
|
6
|
+
declare const meta: Meta<StoryProps>;
|
7
|
+
export default meta;
|
8
|
+
export declare const Empty: {
|
9
|
+
args: {};
|
10
|
+
};
|
11
|
+
export declare const Basic: {
|
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;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
//# sourceMappingURL=Outliner.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Outliner.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Outliner.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAKrB,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAOzE,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA8BF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAK1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;CAajB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;CAalB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAgBxB,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import React from 'react';
|
3
|
+
import { type Meta } from '@dxos/storybook-utils';
|
4
|
+
import { EditorStory } from './util';
|
5
|
+
declare const meta: Meta<typeof EditorStory>;
|
6
|
+
export default meta;
|
7
|
+
export declare const Default: {
|
8
|
+
render: () => React.JSX.Element;
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=Preview.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Preview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AA+FrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;CA+BnB,CAAC"}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import '@dxos-theme';
|
2
|
+
import React from 'react';
|
3
|
+
import { type Meta } from '@dxos/storybook-utils';
|
4
|
+
import { EditorStory } from './util';
|
5
|
+
declare const meta: Meta<typeof EditorStory>;
|
6
|
+
export default meta;
|
7
|
+
export declare const Default: {
|
8
|
+
render: () => React.JSX.Element;
|
9
|
+
};
|
10
|
+
export declare const Everything: {
|
11
|
+
render: () => React.JSX.Element;
|
12
|
+
};
|
13
|
+
export declare const Empty: {
|
14
|
+
render: () => React.JSX.Element;
|
15
|
+
};
|
16
|
+
export declare const Readonly: {
|
17
|
+
render: () => React.JSX.Element;
|
18
|
+
};
|
19
|
+
export declare const NoExtensions: {
|
20
|
+
render: () => React.JSX.Element;
|
21
|
+
};
|
22
|
+
export declare const Vim: {
|
23
|
+
render: () => React.JSX.Element;
|
24
|
+
};
|
25
|
+
export declare const Listener: {
|
26
|
+
render: () => React.JSX.Element;
|
27
|
+
};
|
28
|
+
export declare const Folding: {
|
29
|
+
render: () => React.JSX.Element;
|
30
|
+
};
|
31
|
+
export declare const Scrolling: {
|
32
|
+
render: () => React.JSX.Element;
|
33
|
+
};
|
34
|
+
export declare const ScrollingWithImages: {
|
35
|
+
render: () => React.JSX.Element;
|
36
|
+
};
|
37
|
+
export declare const ScrollTo: {
|
38
|
+
render: () => React.JSX.Element;
|
39
|
+
};
|
40
|
+
export declare const Typescript: {
|
41
|
+
render: () => React.JSX.Element;
|
42
|
+
};
|
43
|
+
export declare const Autocomplete: {
|
44
|
+
render: () => React.JSX.Element;
|
45
|
+
};
|
46
|
+
export declare const Typeahead: {
|
47
|
+
render: () => React.JSX.Element;
|
48
|
+
};
|
49
|
+
export declare const Mention: {
|
50
|
+
render: () => React.JSX.Element;
|
51
|
+
};
|
52
|
+
export declare const Search: {
|
53
|
+
render: () => React.JSX.Element;
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=TextEditor.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/TextEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EACL,WAAW,EAWZ,MAAM,QAAQ,CAAC;AAgBhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAMF,eAAO,MAAM,UAAU;;CAEtB,CAAC;AAMF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAMF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAMF,eAAO,MAAM,YAAY;;CAExB,CAAC;AAMF,eAAO,MAAM,GAAG;;CAOf,CAAC;AAMF,eAAO,MAAM,QAAQ;;CAgBpB,CAAC;AAMF,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAMF,eAAO,MAAM,SAAS;;CAUrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;CAI/B,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAepB,CAAC;AAMF,eAAO,MAAM,UAAU;;CAQtB,CAAC;AAMF,eAAO,MAAM,YAAY;;CAcxB,CAAC;AAQF,eAAO,MAAM,SAAS;;CAYrB,CAAC;AAMF,eAAO,MAAM,OAAO;;CAWnB,CAAC;AAMF,eAAO,MAAM,MAAM;;CAQlB,CAAC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { type Completion } from '@codemirror/autocomplete';
|
2
|
+
import { type Extension } from '@codemirror/state';
|
3
|
+
import { type EditorView } from '@codemirror/view';
|
4
|
+
import React, { type ReactNode } from 'react';
|
5
|
+
import { type EditorSelectionState, type ThemeExtensionsOptions } from '../extensions';
|
6
|
+
import { type UseTextEditorProps } from '../hooks';
|
7
|
+
export declare const num: () => string;
|
8
|
+
export declare const img = "";
|
9
|
+
export declare const code: string;
|
10
|
+
export declare const content: {
|
11
|
+
tasks: string;
|
12
|
+
bullets: string;
|
13
|
+
numbered: string;
|
14
|
+
typescript: string;
|
15
|
+
codeblocks: string;
|
16
|
+
comment: string;
|
17
|
+
links: string;
|
18
|
+
table: string;
|
19
|
+
image: string;
|
20
|
+
headings: string;
|
21
|
+
formatting: string;
|
22
|
+
blockquotes: string;
|
23
|
+
paragraphs: string;
|
24
|
+
footer: string;
|
25
|
+
};
|
26
|
+
export declare const text: string;
|
27
|
+
export declare const links: Completion[];
|
28
|
+
export declare const names: string[];
|
29
|
+
export declare const renderLinkTooltip: import("..").RenderCallback<{
|
30
|
+
url: string;
|
31
|
+
}>;
|
32
|
+
export declare const renderLinkButton: import("..").RenderCallback<{
|
33
|
+
url: string;
|
34
|
+
}>;
|
35
|
+
export declare const defaultExtensions: Extension[];
|
36
|
+
export declare const allExtensions: Extension[];
|
37
|
+
export declare const longText: string;
|
38
|
+
export declare const largeWithImages: string;
|
39
|
+
export declare const headings: string;
|
40
|
+
export declare const global: Map<string, EditorSelectionState>;
|
41
|
+
export type DebugMode = 'raw' | 'tree' | 'raw+tree';
|
42
|
+
export type StoryProps = {
|
43
|
+
id?: string;
|
44
|
+
debug?: DebugMode;
|
45
|
+
debugCustom?: (view: EditorView) => ReactNode;
|
46
|
+
text?: string;
|
47
|
+
readOnly?: boolean;
|
48
|
+
placeholder?: string;
|
49
|
+
lineNumbers?: boolean;
|
50
|
+
onReady?: (view: EditorView) => void;
|
51
|
+
} & Pick<UseTextEditorProps, 'scrollTo' | 'selection' | 'extensions'> & Pick<ThemeExtensionsOptions, 'slots'>;
|
52
|
+
export declare const EditorStory: ({ id, debug, debugCustom, text, readOnly, placeholder, lineNumbers, scrollTo, selection, extensions, slots, onReady, }: StoryProps) => React.JSX.Element;
|
53
|
+
//# sourceMappingURL=util.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/stories/util.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAY5E,OAAO,EAEL,KAAK,oBAAoB,EAYzB,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,eAAO,MAAM,GAAG,cAAiE,CAAC;AAElF,eAAO,MAAM,GAAG,yDAAyD,CAAC;AAE1E,eAAO,MAAM,IAAI,QAOhB,CAAC;AAGF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CA+FnB,CAAC;AAGF,eAAO,MAAM,IAAI,QAwBhB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAAU,EAM7B,CAAC;AAEF,eAAO,MAAM,KAAK,UAA4E,CAAC;AAe/F,eAAO,MAAM,iBAAiB;SAVD,MAAM;EAUyB,CAAC;AAU7D,eAAO,MAAM,gBAAgB;SARD,MAAM;EAQwB,CAAC;AAG3D,eAAO,MAAM,iBAAiB,EAAE,SAAS,EAIxC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAAS,EAOpC,CAAC;AAGF,eAAO,MAAM,QAAQ,QAEN,CAAC;AAEhB,eAAO,MAAM,eAAe,QAGb,CAAC;AAEhB,eAAO,MAAM,QAAQ,QAIpB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAA0C,CAAC;AAG9D,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC,GACnE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;AAGxC,eAAO,MAAM,WAAW,GAAI,wHAazB,UAAU,sBAiDZ,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/styles/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,YAAY,EAAE,
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/styles/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,YAAY,EAAE,WA6N1B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/styles/tokens.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/styles/tokens.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,QAA8B,CAAC;AACpD,eAAO,MAAM,QAAQ,QAA8B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG,GAAI,GAAG,OAAO,MAAM,EAAE,WAAqB,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type EditorView } from '@codemirror/view';
|
1
2
|
export type Range = {
|
2
3
|
from: number;
|
3
4
|
to: number;
|
@@ -6,4 +7,8 @@ export type Comment = {
|
|
6
7
|
id: string;
|
7
8
|
cursor?: string;
|
8
9
|
};
|
10
|
+
/**
|
11
|
+
* Callback that renders into a DOM element within the editor.
|
12
|
+
*/
|
13
|
+
export type RenderCallback<Props extends object> = (el: HTMLElement, props: Props, view: EditorView) => void;
|
9
14
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAIF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,MAAM,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/util/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/util/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,KAAK,EAAE,GAAG,KAAK,KAAG,OAA2C,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAC/D,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAOD,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,CAAC,SAAS,8DAA4C;IAErE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,GAAI,OAAO,WAAW,EAAE,OAAO,KAAK,YAKpE;IAEF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,GAAI,OAAO,WAAW,EAAE,QAAQ,MAAM;;;kBAOtE;CACH"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/util/debug.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,eAAO,MAAM,aAAa,
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/util/debug.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,eAAO,MAAM,aAAa,GAAI,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,MAC/C,GAAG,MAAM,GAAG,EAAE,QAOvB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,QAAQ,EAAE,IAAI,CAAC,KAAG,CAOxC,CAAC;AAErB;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,SAAS,WAAW,EAAE,EAAE,MAAM,UAAU,SAG5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,WAAW,EAAE,SAmBrD,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/util/dom.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/util/dom.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,EAAE,MAAM,OAAO;;;;;CAGpD,CAAC;AAIF,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,EAAE,MAAM,MAAM,EAAE,WAAS,UAK5D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,IAAI,gBAQvC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../../../src/util/facet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,CAAC,
|
1
|
+
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../../../src/util/facet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,gBAMvD,CAAC"}
|
@@ -1,7 +1,12 @@
|
|
1
|
-
import { type ReactNode } from 'react';
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
2
|
+
import { type RenderCallback } from '../types';
|
2
3
|
export type ElementOptions = {
|
3
4
|
className?: string;
|
4
5
|
};
|
5
6
|
export declare const createElement: (tag: string, options?: ElementOptions, children?: ReactNode) => HTMLElement;
|
6
7
|
export declare const renderRoot: <T extends Element>(root: T, node: ReactNode) => T;
|
8
|
+
/**
|
9
|
+
* Utility to create a renderer for a React component.
|
10
|
+
*/
|
11
|
+
export declare const createRenderer: <Props extends object>(Component: FC<Props>) => RenderCallback<Props>;
|
7
12
|
//# sourceMappingURL=react.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/util/react.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/util/react.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAI/C,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,UAAU,cAAc,EAAE,WAAW,SAAS,KAAG,WAU3F,CAAC;AAIF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,SAAS,KAAG,CAGxE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACxB,KAAK,SAAS,MAAM,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,KAAG,cAAc,CAAC,KAAK,CAUjE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":"5.
|
1
|
+
{"version":"5.8.3"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dxos/react-ui-editor",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.2-main.10c050d",
|
4
4
|
"description": "Document editing experience within a DXOS shell.",
|
5
5
|
"homepage": "https://dxos.org",
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
@@ -13,6 +13,11 @@
|
|
13
13
|
"types": "./dist/types/src/index.d.ts",
|
14
14
|
"browser": "./dist/lib/browser/index.mjs",
|
15
15
|
"node": "./dist/lib/node-esm/index.mjs"
|
16
|
+
},
|
17
|
+
"./testing": {
|
18
|
+
"types": "./dist/types/src/testing/index.d.ts",
|
19
|
+
"browser": "./dist/lib/browser/testing/index.mjs",
|
20
|
+
"node": "./dist/lib/node-esm/testing/index.mjs"
|
16
21
|
}
|
17
22
|
},
|
18
23
|
"types": "dist/types/src/index.d.ts",
|
@@ -24,9 +29,11 @@
|
|
24
29
|
"src"
|
25
30
|
],
|
26
31
|
"dependencies": {
|
32
|
+
"@automerge/automerge": "3.0.0-beta.4",
|
27
33
|
"@codemirror/autocomplete": "^6.18.1",
|
28
34
|
"@codemirror/commands": "^6.6.2",
|
29
35
|
"@codemirror/lang-javascript": "^6.2.2",
|
36
|
+
"@codemirror/lang-json": "^6.0.1",
|
30
37
|
"@codemirror/lang-markdown": "^6.3.0",
|
31
38
|
"@codemirror/language": "^6.10.3",
|
32
39
|
"@codemirror/language-data": "^6.5.1",
|
@@ -40,38 +47,43 @@
|
|
40
47
|
"@lezer/generator": "^1.7.1",
|
41
48
|
"@lezer/highlight": "^1.2.1",
|
42
49
|
"@lezer/markdown": "^1.3.1",
|
43
|
-
"@preact/
|
50
|
+
"@preact-signals/safe-react": "^0.9.0",
|
51
|
+
"@preact/signals-react": "^3.2.0",
|
44
52
|
"@radix-ui/react-context": "1.1.1",
|
45
53
|
"@replit/codemirror-vim": "^6.2.1",
|
46
54
|
"@replit/codemirror-vscode-keymap": "^6.0.2",
|
55
|
+
"ajv": "^8.17.1",
|
47
56
|
"codemirror": "^6.0.1",
|
48
57
|
"lib0": "^0.2.65",
|
49
58
|
"lodash.defaultsdeep": "^4.6.1",
|
50
|
-
"lodash.get": "^4.4.2",
|
51
59
|
"lodash.merge": "^4.6.2",
|
52
60
|
"lodash.sortby": "^4.7.0",
|
53
61
|
"style-mod": "^4.1.0",
|
54
|
-
"@dxos/app-graph": "0.8.
|
55
|
-
"@dxos/async": "0.8.
|
56
|
-
"@dxos/
|
57
|
-
"@dxos/
|
58
|
-
"@dxos/
|
59
|
-
"@dxos/
|
60
|
-
"@dxos/
|
61
|
-
"@dxos/
|
62
|
-
"@dxos/live-object": "0.8.
|
63
|
-
"@dxos/log": "0.8.
|
64
|
-
"@dxos/protocols": "0.8.
|
65
|
-
"@dxos/react-
|
66
|
-
"@dxos/react-
|
67
|
-
"@dxos/util": "0.8.
|
62
|
+
"@dxos/app-graph": "0.8.2-main.10c050d",
|
63
|
+
"@dxos/async": "0.8.2-main.10c050d",
|
64
|
+
"@dxos/context": "0.8.2-main.10c050d",
|
65
|
+
"@dxos/debug": "0.8.2-main.10c050d",
|
66
|
+
"@dxos/display-name": "0.8.2-main.10c050d",
|
67
|
+
"@dxos/invariant": "0.8.2-main.10c050d",
|
68
|
+
"@dxos/lit-ui": "0.8.2-main.10c050d",
|
69
|
+
"@dxos/echo-schema": "0.8.2-main.10c050d",
|
70
|
+
"@dxos/live-object": "0.8.2-main.10c050d",
|
71
|
+
"@dxos/log": "0.8.2-main.10c050d",
|
72
|
+
"@dxos/protocols": "0.8.2-main.10c050d",
|
73
|
+
"@dxos/react-hooks": "0.8.2-main.10c050d",
|
74
|
+
"@dxos/react-ui-menu": "0.8.2-main.10c050d",
|
75
|
+
"@dxos/util": "0.8.2-main.10c050d"
|
68
76
|
},
|
69
77
|
"devDependencies": {
|
78
|
+
"@automerge/automerge": "3.0.0-beta.4",
|
79
|
+
"@automerge/automerge-repo": "2.0.1",
|
80
|
+
"@automerge/automerge-repo-network-broadcastchannel": "2.0.1",
|
81
|
+
"@effect-rx/rx-react": "^0.34.1",
|
82
|
+
"@effect/platform": "0.80.12",
|
70
83
|
"@phosphor-icons/react": "^2.1.5",
|
71
84
|
"@types/chai": "^4.2.15",
|
72
85
|
"@types/chai-dom": "^1.11.0",
|
73
86
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
74
|
-
"@types/lodash.get": "^4.4.7",
|
75
87
|
"@types/lodash.merge": "^4.6.6",
|
76
88
|
"@types/lodash.sortby": "^4.7.7",
|
77
89
|
"@types/react": "~18.2.0",
|
@@ -79,6 +91,7 @@
|
|
79
91
|
"@types/react-test-renderer": "^17.0.2",
|
80
92
|
"chai": "^4.4.1",
|
81
93
|
"chai-dom": "^1.11.0",
|
94
|
+
"effect": "3.14.21",
|
82
95
|
"happy-dom": "^13.3.1",
|
83
96
|
"jsdom": "^24.0.0",
|
84
97
|
"mocha": "^10.6.0",
|
@@ -88,23 +101,26 @@
|
|
88
101
|
"vite": "5.4.7",
|
89
102
|
"vite-plugin-top-level-await": "^1.4.1",
|
90
103
|
"vite-plugin-wasm": "^3.3.0",
|
91
|
-
"@dxos/
|
92
|
-
"@dxos/echo-signals": "0.8.
|
93
|
-
"@dxos/
|
94
|
-
"@dxos/
|
95
|
-
"@dxos/
|
96
|
-
"@dxos/react-
|
97
|
-
"@dxos/storybook-utils": "0.8.
|
98
|
-
"@dxos/react-
|
99
|
-
"@dxos/react-ui": "0.8.
|
104
|
+
"@dxos/config": "0.8.2-main.10c050d",
|
105
|
+
"@dxos/echo-signals": "0.8.2-main.10c050d",
|
106
|
+
"@dxos/keyboard": "0.8.2-main.10c050d",
|
107
|
+
"@dxos/random": "0.8.2-main.10c050d",
|
108
|
+
"@dxos/react-ui": "0.8.2-main.10c050d",
|
109
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.10c050d",
|
110
|
+
"@dxos/storybook-utils": "0.8.2-main.10c050d",
|
111
|
+
"@dxos/react-client": "0.8.2-main.10c050d",
|
112
|
+
"@dxos/react-ui-theme": "0.8.2-main.10c050d"
|
100
113
|
},
|
101
114
|
"peerDependencies": {
|
115
|
+
"@effect-rx/rx-react": "^0.34.1",
|
116
|
+
"@effect/platform": "0.80.12",
|
102
117
|
"@phosphor-icons/react": "^2.1.5",
|
118
|
+
"effect": "^3.13.3",
|
103
119
|
"react": "~18.2.0",
|
104
120
|
"react-dom": "~18.2.0",
|
105
|
-
"@dxos/react-
|
106
|
-
"@dxos/react-
|
107
|
-
"@dxos/react-ui": "0.8.
|
121
|
+
"@dxos/react-client": "0.8.2-main.10c050d",
|
122
|
+
"@dxos/react-ui-theme": "0.8.2-main.10c050d",
|
123
|
+
"@dxos/react-ui": "0.8.2-main.10c050d"
|
108
124
|
},
|
109
125
|
"publishConfig": {
|
110
126
|
"access": "public"
|