@dxos/react-ui-editor 0.8.2-main.f11618f → 0.8.2-staging.42af850
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 +4450 -3278
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -64
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node/index.cjs +2701 -1528
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +3 -75
- package/dist/lib/node/testing/index.cjs.map +4 -4
- package/dist/lib/node-esm/index.mjs +4450 -3278
- 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 +3 -64
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- 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 +14 -22
- package/dist/types/src/components/EditorToolbar/util.d.ts.map +1 -1
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts +4 -3
- package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
- 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/{testing → components/Popover}/RefPopover.d.ts +1 -1
- 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 +2 -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/command.d.ts +1 -2
- package/dist/types/src/extensions/command/command.d.ts.map +1 -1
- package/dist/types/src/extensions/command/hint.d.ts +14 -2
- package/dist/types/src/extensions/command/hint.d.ts.map +1 -1
- package/dist/types/src/extensions/command/index.d.ts +2 -0
- package/dist/types/src/extensions/command/index.d.ts.map +1 -1
- package/dist/types/src/extensions/command/menu.d.ts +4 -14
- package/dist/types/src/extensions/command/menu.d.ts.map +1 -1
- package/dist/types/src/extensions/command/state.d.ts +1 -1
- 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 +2 -12
- 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 +2 -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 +1 -0
- package/dist/types/src/extensions/markdown/decorate.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/formatting.d.ts +1 -1
- 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.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/preview.d.ts.map +1 -1
- 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.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/{TextEditorComments.stories.d.ts → Comments.stories.d.ts} +3 -3
- 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/{TextEditorSpecial.stories.d.ts → Experimental.stories.d.ts} +3 -6
- 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/{TextEditorBasic.stories.d.ts → TextEditor.stories.d.ts} +9 -36
- package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -0
- package/dist/types/src/stories/{story-utils.d.ts → util.d.ts} +6 -6
- 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 +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- 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/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.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +41 -31
- package/src/components/EditorToolbar/EditorToolbar.tsx +93 -70
- 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 +16 -17
- package/src/components/EditorToolbar/view-mode.ts +9 -8
- package/src/components/Popover/RefDropdownMenu.tsx +77 -0
- package/src/{testing → components/Popover}/RefPopover.tsx +5 -4
- package/src/components/Popover/index.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/defaults.ts +10 -13
- package/src/extensions/annotations.ts +41 -64
- package/src/extensions/autocomplete.ts +5 -6
- package/src/extensions/automerge/automerge.stories.tsx +11 -14
- 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/command.ts +1 -3
- package/src/extensions/command/hint.ts +7 -7
- package/src/extensions/command/index.ts +2 -0
- package/src/extensions/command/menu.ts +75 -50
- package/src/extensions/command/typeahead.ts +116 -0
- package/src/extensions/comments.ts +4 -69
- package/src/extensions/factories.ts +13 -0
- package/src/extensions/index.ts +2 -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 +15 -14
- package/src/extensions/markdown/formatting.ts +4 -4
- package/src/extensions/markdown/image.ts +2 -2
- package/src/extensions/markdown/index.ts +1 -1
- 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/preview.ts +5 -5
- package/src/hooks/index.ts +0 -1
- package/src/stories/Command.stories.tsx +97 -0
- package/src/stories/{TextEditorComments.stories.tsx → Comments.stories.tsx} +13 -14
- package/src/stories/EditorToolbar.stories.tsx +96 -0
- package/src/stories/{TextEditorSpecial.stories.tsx → Experimental.stories.tsx} +9 -30
- package/src/stories/Markdown.stories.tsx +121 -0
- package/src/stories/Outliner.stories.tsx +108 -0
- package/src/stories/{TextEditorPreview.stories.tsx → Preview.stories.tsx} +46 -136
- package/src/stories/{TextEditorBasic.stories.tsx → TextEditor.stories.tsx} +78 -111
- package/src/stories/{story-utils.tsx → util.tsx} +28 -31
- package/src/styles/theme.ts +15 -5
- package/src/styles/tokens.ts +1 -2
- package/src/testing/index.ts +1 -1
- package/src/testing/util.ts +5 -0
- package/dist/types/src/components/EditorToolbar/comment.d.ts.map +0 -1
- package/dist/types/src/extensions/markdown/editorAction.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/dist/types/src/stories/InputMode.stories.d.ts +0 -57
- package/dist/types/src/stories/InputMode.stories.d.ts.map +0 -1
- package/dist/types/src/stories/TextEditorBasic.stories.d.ts.map +0 -1
- package/dist/types/src/stories/TextEditorComments.stories.d.ts.map +0 -1
- package/dist/types/src/stories/TextEditorPreview.stories.d.ts +0 -13
- package/dist/types/src/stories/TextEditorPreview.stories.d.ts.map +0 -1
- package/dist/types/src/stories/TextEditorSpecial.stories.d.ts.map +0 -1
- package/dist/types/src/stories/story-utils.d.ts.map +0 -1
- package/dist/types/src/testing/RefPopover.d.ts.map +0 -1
- package/src/components/EditorToolbar/comment.ts +0 -23
- package/src/hooks/useActionHandler.ts +0 -12
- package/src/stories/InputMode.stories.tsx +0 -124
- /package/src/extensions/markdown/{editorAction.ts → action.ts} +0 -0
@@ -5,45 +5,44 @@
|
|
5
5
|
import '@dxos-theme';
|
6
6
|
|
7
7
|
import { javascript } from '@codemirror/lang-javascript';
|
8
|
-
import { markdown } from '@codemirror/lang-markdown';
|
9
8
|
import { openSearchPanel } from '@codemirror/search';
|
10
9
|
import React from 'react';
|
11
10
|
|
11
|
+
import { log } from '@dxos/log';
|
12
12
|
import { withLayout, withTheme, type Meta } from '@dxos/storybook-utils';
|
13
13
|
|
14
14
|
import {
|
15
|
-
|
16
|
-
defaultExtensions,
|
15
|
+
EditorStory,
|
17
16
|
allExtensions,
|
18
|
-
text,
|
19
|
-
str,
|
20
17
|
content,
|
21
|
-
|
22
|
-
largeWithImages,
|
23
|
-
headings,
|
18
|
+
defaultExtensions,
|
24
19
|
global,
|
25
|
-
|
26
|
-
renderLinkTooltip,
|
20
|
+
largeWithImages,
|
27
21
|
links,
|
22
|
+
longText,
|
28
23
|
names,
|
29
|
-
|
24
|
+
renderLinkButton,
|
25
|
+
text,
|
26
|
+
} from './util';
|
30
27
|
import { editorMonospace } from '../defaults';
|
31
28
|
import {
|
32
29
|
InputModeExtensions,
|
33
|
-
|
30
|
+
autocomplete,
|
34
31
|
decorateMarkdown,
|
35
32
|
folding,
|
36
33
|
image,
|
37
|
-
|
38
|
-
table,
|
39
|
-
autocomplete,
|
34
|
+
listener,
|
40
35
|
mention,
|
36
|
+
selectionState,
|
37
|
+
staticCompletion,
|
38
|
+
typeahead,
|
41
39
|
} from '../extensions';
|
40
|
+
import { str } from '../testing';
|
42
41
|
|
43
|
-
const meta: Meta<typeof
|
42
|
+
const meta: Meta<typeof EditorStory> = {
|
44
43
|
title: 'ui/react-ui-editor/TextEditor',
|
44
|
+
render: EditorStory,
|
45
45
|
decorators: [withTheme, withLayout({ fullscreen: true })],
|
46
|
-
render: DefaultStory,
|
47
46
|
parameters: { layout: 'fullscreen' },
|
48
47
|
};
|
49
48
|
|
@@ -54,7 +53,7 @@ export default meta;
|
|
54
53
|
//
|
55
54
|
|
56
55
|
export const Default = {
|
57
|
-
render: () => <
|
56
|
+
render: () => <EditorStory text={text} extensions={defaultExtensions} />,
|
58
57
|
};
|
59
58
|
|
60
59
|
//
|
@@ -62,7 +61,7 @@ export const Default = {
|
|
62
61
|
//
|
63
62
|
|
64
63
|
export const Everything = {
|
65
|
-
render: () => <
|
64
|
+
render: () => <EditorStory text={text} extensions={allExtensions} selection={{ anchor: 99, head: 110 }} />,
|
66
65
|
};
|
67
66
|
|
68
67
|
//
|
@@ -70,7 +69,7 @@ export const Everything = {
|
|
70
69
|
//
|
71
70
|
|
72
71
|
export const Empty = {
|
73
|
-
render: () => <
|
72
|
+
render: () => <EditorStory extensions={defaultExtensions} />,
|
74
73
|
};
|
75
74
|
|
76
75
|
//
|
@@ -78,7 +77,7 @@ export const Empty = {
|
|
78
77
|
//
|
79
78
|
|
80
79
|
export const Readonly = {
|
81
|
-
render: () => <
|
80
|
+
render: () => <EditorStory text={text} extensions={defaultExtensions} readOnly />,
|
82
81
|
};
|
83
82
|
|
84
83
|
//
|
@@ -86,7 +85,7 @@ export const Readonly = {
|
|
86
85
|
//
|
87
86
|
|
88
87
|
export const NoExtensions = {
|
89
|
-
render: () => <
|
88
|
+
render: () => <EditorStory text={text} />,
|
90
89
|
};
|
91
90
|
|
92
91
|
//
|
@@ -95,7 +94,7 @@ export const NoExtensions = {
|
|
95
94
|
|
96
95
|
export const Vim = {
|
97
96
|
render: () => (
|
98
|
-
<
|
97
|
+
<EditorStory
|
99
98
|
text={str('# Vim Mode', '', 'The distant future. The year 2000.', '', content.paragraphs)}
|
100
99
|
extensions={[defaultExtensions, InputModeExtensions.vim]}
|
101
100
|
/>
|
@@ -103,16 +102,42 @@ export const Vim = {
|
|
103
102
|
};
|
104
103
|
|
105
104
|
//
|
106
|
-
//
|
105
|
+
// Listener
|
106
|
+
//
|
107
|
+
|
108
|
+
export const Listener = {
|
109
|
+
render: () => (
|
110
|
+
<EditorStory
|
111
|
+
text={str('# Listener', '', content.footer)}
|
112
|
+
extensions={[
|
113
|
+
listener({
|
114
|
+
onFocus: (focusing) => {
|
115
|
+
log.info('listener', { focusing });
|
116
|
+
},
|
117
|
+
onChange: (text) => {
|
118
|
+
log.info('listener', { text });
|
119
|
+
},
|
120
|
+
}),
|
121
|
+
]}
|
122
|
+
/>
|
123
|
+
),
|
124
|
+
};
|
125
|
+
|
126
|
+
//
|
127
|
+
// Folding
|
107
128
|
//
|
108
129
|
|
109
130
|
export const Folding = {
|
110
|
-
render: () => <
|
131
|
+
render: () => <EditorStory text={text} extensions={[folding()]} />,
|
111
132
|
};
|
112
133
|
|
134
|
+
//
|
135
|
+
// Scrolling
|
136
|
+
//
|
137
|
+
|
113
138
|
export const Scrolling = {
|
114
139
|
render: () => (
|
115
|
-
<
|
140
|
+
<EditorStory
|
116
141
|
text={str('# Large Document', '', longText)}
|
117
142
|
extensions={selectionState({
|
118
143
|
setState: (id, state) => global.set(id, state),
|
@@ -124,7 +149,7 @@ export const Scrolling = {
|
|
124
149
|
|
125
150
|
export const ScrollingWithImages = {
|
126
151
|
render: () => (
|
127
|
-
<
|
152
|
+
<EditorStory text={str('# Large Document', '', largeWithImages)} extensions={[decorateMarkdown(), image()]} />
|
128
153
|
),
|
129
154
|
};
|
130
155
|
|
@@ -135,7 +160,7 @@ export const ScrollTo = {
|
|
135
160
|
const text = str('# Scroll To', longText, '', word, '', longText);
|
136
161
|
const idx = text.indexOf(word);
|
137
162
|
return (
|
138
|
-
<
|
163
|
+
<EditorStory
|
139
164
|
text={text}
|
140
165
|
extensions={defaultExtensions}
|
141
166
|
scrollTo={idx}
|
@@ -145,91 +170,13 @@ export const ScrollTo = {
|
|
145
170
|
},
|
146
171
|
};
|
147
172
|
|
148
|
-
//
|
149
|
-
// Markdown
|
150
|
-
//
|
151
|
-
|
152
|
-
export const Blockquote = {
|
153
|
-
render: () => (
|
154
|
-
<DefaultStory
|
155
|
-
text={str('> Blockquote', 'continuation', content.footer)}
|
156
|
-
extensions={decorateMarkdown()}
|
157
|
-
debug='raw'
|
158
|
-
/>
|
159
|
-
),
|
160
|
-
};
|
161
|
-
|
162
|
-
export const Headings = {
|
163
|
-
render: () => (
|
164
|
-
<DefaultStory text={headings} extensions={decorateMarkdown({ numberedHeadings: { from: 2, to: 4 } })} />
|
165
|
-
),
|
166
|
-
};
|
167
|
-
|
168
|
-
export const Links = {
|
169
|
-
render: () => (
|
170
|
-
<DefaultStory text={str(content.links, content.footer)} extensions={[linkTooltip(renderLinkTooltip)]} />
|
171
|
-
),
|
172
|
-
};
|
173
|
-
|
174
|
-
export const Image = {
|
175
|
-
render: () => <DefaultStory text={str(content.image, content.footer)} extensions={[image()]} />,
|
176
|
-
};
|
177
|
-
|
178
|
-
export const Code = {
|
179
|
-
render: () => <DefaultStory text={str(content.codeblocks, content.footer)} extensions={[decorateMarkdown()]} />,
|
180
|
-
};
|
181
|
-
|
182
|
-
export const Lists = {
|
183
|
-
render: () => (
|
184
|
-
<DefaultStory
|
185
|
-
text={str(content.tasks, '', content.bullets, '', content.numbered, content.footer)}
|
186
|
-
extensions={[decorateMarkdown()]}
|
187
|
-
/>
|
188
|
-
),
|
189
|
-
};
|
190
|
-
|
191
|
-
export const BulletList = {
|
192
|
-
render: () => <DefaultStory text={str(content.bullets, content.footer)} extensions={[decorateMarkdown()]} />,
|
193
|
-
};
|
194
|
-
|
195
|
-
export const OrderedList = {
|
196
|
-
render: () => <DefaultStory text={str(content.numbered, content.footer)} extensions={[decorateMarkdown()]} />,
|
197
|
-
};
|
198
|
-
|
199
|
-
export const TaskList = {
|
200
|
-
render: () => (
|
201
|
-
<DefaultStory text={str(content.tasks, content.footer)} extensions={[decorateMarkdown()]} debug='raw+tree' />
|
202
|
-
),
|
203
|
-
};
|
204
|
-
|
205
|
-
export const Table = {
|
206
|
-
render: () => <DefaultStory text={str(content.table, content.footer)} extensions={[decorateMarkdown(), table()]} />,
|
207
|
-
};
|
208
|
-
|
209
|
-
//
|
210
|
-
// Commented out
|
211
|
-
//
|
212
|
-
|
213
|
-
export const CommentedOut = {
|
214
|
-
render: () => (
|
215
|
-
<DefaultStory
|
216
|
-
text={str('# Commented out', '', content.comment, content.footer)}
|
217
|
-
extensions={[
|
218
|
-
decorateMarkdown(),
|
219
|
-
markdown(),
|
220
|
-
// commentBlock()
|
221
|
-
]}
|
222
|
-
/>
|
223
|
-
),
|
224
|
-
};
|
225
|
-
|
226
173
|
//
|
227
174
|
// Typescript
|
228
175
|
//
|
229
176
|
|
230
177
|
export const Typescript = {
|
231
178
|
render: () => (
|
232
|
-
<
|
179
|
+
<EditorStory
|
233
180
|
text={content.typescript}
|
234
181
|
lineNumbers
|
235
182
|
extensions={[editorMonospace, javascript({ typescript: true })]}
|
@@ -238,12 +185,12 @@ export const Typescript = {
|
|
238
185
|
};
|
239
186
|
|
240
187
|
//
|
241
|
-
//
|
188
|
+
// Autocomplete
|
242
189
|
//
|
243
190
|
|
244
191
|
export const Autocomplete = {
|
245
192
|
render: () => (
|
246
|
-
<
|
193
|
+
<EditorStory
|
247
194
|
text={str('# Autocomplete', '', 'Press Ctrl-Space...', content.footer)}
|
248
195
|
extensions={[
|
249
196
|
decorateMarkdown({ renderLinkButton }),
|
@@ -257,13 +204,33 @@ export const Autocomplete = {
|
|
257
204
|
),
|
258
205
|
};
|
259
206
|
|
207
|
+
//
|
208
|
+
// Typeahead
|
209
|
+
//
|
210
|
+
|
211
|
+
const completions = ['type', 'AND', 'OR', 'NOT', 'dxos.org'];
|
212
|
+
|
213
|
+
export const Typeahead = {
|
214
|
+
render: () => (
|
215
|
+
<EditorStory
|
216
|
+
text={str('# Typeahead', '')}
|
217
|
+
extensions={[
|
218
|
+
decorateMarkdown({ renderLinkButton }),
|
219
|
+
typeahead({
|
220
|
+
onComplete: staticCompletion(completions, completions[0]),
|
221
|
+
}),
|
222
|
+
]}
|
223
|
+
/>
|
224
|
+
),
|
225
|
+
};
|
226
|
+
|
260
227
|
//
|
261
228
|
// Mention
|
262
229
|
//
|
263
230
|
|
264
231
|
export const Mention = {
|
265
232
|
render: () => (
|
266
|
-
<
|
233
|
+
<EditorStory
|
267
234
|
text={str('# Mention', '', 'Type @...', content.footer)}
|
268
235
|
extensions={[
|
269
236
|
mention({
|
@@ -280,7 +247,7 @@ export const Mention = {
|
|
280
247
|
|
281
248
|
export const Search = {
|
282
249
|
render: () => (
|
283
|
-
<
|
250
|
+
<EditorStory
|
284
251
|
text={str('# Search', text)}
|
285
252
|
extensions={defaultExtensions}
|
286
253
|
onReady={(view) => openSearchPanel(view)}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
import { type Completion } from '@codemirror/autocomplete';
|
6
6
|
import { type Extension } from '@codemirror/state';
|
7
7
|
import { type EditorView } from '@codemirror/view';
|
8
|
-
import React, { useEffect, useState, type FC } from 'react';
|
8
|
+
import React, { type ReactNode, useEffect, useState, type FC } from 'react';
|
9
9
|
|
10
10
|
import { Expando } from '@dxos/echo-schema';
|
11
11
|
import { PublicKey } from '@dxos/keys';
|
@@ -13,32 +13,30 @@ import { live } from '@dxos/live-object';
|
|
13
13
|
import { faker } from '@dxos/random';
|
14
14
|
import { createDocAccessor, createObject } from '@dxos/react-client/echo';
|
15
15
|
import { useThemeContext, Icon } from '@dxos/react-ui';
|
16
|
+
import { JsonFilter } from '@dxos/react-ui-syntax-highlighter';
|
16
17
|
import { mx } from '@dxos/react-ui-theme';
|
17
18
|
|
18
|
-
import {
|
19
|
+
import { editorSlots, editorGutter } from '../defaults';
|
19
20
|
import {
|
20
|
-
type EditorSelectionState,
|
21
21
|
type DebugNode,
|
22
|
-
|
23
|
-
formattingKeymap,
|
24
|
-
linkTooltip,
|
25
|
-
image,
|
26
|
-
table,
|
27
|
-
folding,
|
28
|
-
} from '../extensions';
|
29
|
-
import {
|
22
|
+
type EditorSelectionState,
|
30
23
|
createDataExtensions,
|
31
24
|
createBasicExtensions,
|
32
25
|
createMarkdownExtensions,
|
33
26
|
createThemeExtensions,
|
27
|
+
decorateMarkdown,
|
34
28
|
debugTree,
|
29
|
+
folding,
|
30
|
+
formattingKeymap,
|
31
|
+
image,
|
32
|
+
linkTooltip,
|
33
|
+
table,
|
34
|
+
type ThemeExtensionsOptions,
|
35
35
|
} from '../extensions';
|
36
36
|
import { useTextEditor, type UseTextEditorProps } from '../hooks';
|
37
|
+
import { str } from '../testing';
|
37
38
|
import { createRenderer } from '../util';
|
38
39
|
|
39
|
-
// Utility functions
|
40
|
-
export const str = (...lines: string[]) => lines.join('\n');
|
41
|
-
|
42
40
|
export const num = () => faker.number.int({ min: 0, max: 9999 }).toLocaleString();
|
43
41
|
|
44
42
|
export const img = '';
|
@@ -253,24 +251,28 @@ export type DebugMode = 'raw' | 'tree' | 'raw+tree';
|
|
253
251
|
export type StoryProps = {
|
254
252
|
id?: string;
|
255
253
|
debug?: DebugMode;
|
254
|
+
debugCustom?: (view: EditorView) => ReactNode;
|
256
255
|
text?: string;
|
257
256
|
readOnly?: boolean;
|
258
257
|
placeholder?: string;
|
259
258
|
lineNumbers?: boolean;
|
260
259
|
onReady?: (view: EditorView) => void;
|
261
|
-
} & Pick<UseTextEditorProps, 'scrollTo' | 'selection' | 'extensions'
|
260
|
+
} & Pick<UseTextEditorProps, 'scrollTo' | 'selection' | 'extensions'> &
|
261
|
+
Pick<ThemeExtensionsOptions, 'slots'>;
|
262
262
|
|
263
263
|
// Default story component
|
264
|
-
export const
|
264
|
+
export const EditorStory = ({
|
265
265
|
id = 'editor-' + PublicKey.random().toHex().slice(0, 8),
|
266
266
|
debug,
|
267
|
+
debugCustom,
|
267
268
|
text,
|
268
|
-
extensions,
|
269
269
|
readOnly,
|
270
270
|
placeholder = 'New document.',
|
271
|
+
lineNumbers,
|
271
272
|
scrollTo,
|
272
273
|
selection,
|
273
|
-
|
274
|
+
extensions,
|
275
|
+
slots = editorSlots,
|
274
276
|
onReady,
|
275
277
|
}: StoryProps) => {
|
276
278
|
const [object] = useState(createObject(live(Expando, { content: text ?? '' })));
|
@@ -287,11 +289,7 @@ export const DefaultStory = ({
|
|
287
289
|
createThemeExtensions({
|
288
290
|
themeMode,
|
289
291
|
syntaxHighlighting: true,
|
290
|
-
slots
|
291
|
-
content: {
|
292
|
-
className: editorContent,
|
293
|
-
},
|
294
|
-
},
|
292
|
+
slots,
|
295
293
|
}),
|
296
294
|
editorGutter,
|
297
295
|
extensions || [],
|
@@ -310,18 +308,17 @@ export const DefaultStory = ({
|
|
310
308
|
}, [view]);
|
311
309
|
|
312
310
|
return (
|
313
|
-
<div className='
|
314
|
-
<div role='none' className='flex
|
311
|
+
<div className={mx('w-full h-full grid overflow-hidden', debug && 'grid-cols-[1fr_600px]')}>
|
312
|
+
<div role='none' className='flex overflow-hidden' ref={parentRef} {...focusAttributes} />
|
315
313
|
{debug && (
|
316
|
-
<div className='
|
314
|
+
<div className='grid h-full auto-rows-fr border-l border-separator divide-y divide-separator overflow-hidden'>
|
315
|
+
{view && debugCustom?.(view)}
|
317
316
|
{(debug === 'raw' || debug === 'raw+tree') && (
|
318
|
-
<pre className='p-1
|
319
|
-
|
320
|
-
{(debug === 'tree' || debug === 'raw+tree') && (
|
321
|
-
<pre className='p-1 font-mono text-xs text-green-800 dark:text-green-200'>
|
322
|
-
{JSON.stringify(tree, null, 2)}
|
317
|
+
<pre className='p-1 text-xs text-green-800 dark:text-green-200 overflow-auto'>
|
318
|
+
{view?.state.doc.toString()}
|
323
319
|
</pre>
|
324
320
|
)}
|
321
|
+
{(debug === 'tree' || debug === 'raw+tree') && <JsonFilter data={tree} classNames='p-1 text-xs' />}
|
325
322
|
</div>
|
326
323
|
)}
|
327
324
|
</div>
|
package/src/styles/theme.ts
CHANGED
@@ -119,6 +119,9 @@ export const defaultTheme: ThemeStyles = {
|
|
119
119
|
'.cm-selectionBackground': {
|
120
120
|
background: 'var(--dx-cmSelection)',
|
121
121
|
},
|
122
|
+
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground': {
|
123
|
+
background: 'var(--dx-cmFocusedSelection)',
|
124
|
+
},
|
122
125
|
|
123
126
|
/**
|
124
127
|
* Search.
|
@@ -164,18 +167,25 @@ export const defaultTheme: ThemeStyles = {
|
|
164
167
|
'.cm-tooltip.cm-tooltip-autocomplete': {
|
165
168
|
marginTop: '4px',
|
166
169
|
marginLeft: '-3px',
|
170
|
+
borderColor: 'var(--dx-separator)',
|
171
|
+
borderTop: 'none',
|
167
172
|
},
|
168
173
|
'.cm-tooltip.cm-tooltip-autocomplete > ul': {
|
169
174
|
maxHeight: '20em',
|
170
175
|
},
|
171
|
-
'.cm-tooltip.cm-tooltip-autocomplete > ul > li': {
|
172
|
-
|
176
|
+
'.cm-tooltip.cm-tooltip-autocomplete > ul > li': {
|
177
|
+
padding: '4px',
|
178
|
+
},
|
179
|
+
'.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected]': {
|
180
|
+
background: 'var(--dx-hoverSurface)',
|
181
|
+
},
|
173
182
|
'.cm-tooltip.cm-tooltip-autocomplete > ul > completion-section': {
|
174
183
|
paddingLeft: '4px !important',
|
175
184
|
borderBottom: 'none !important',
|
176
185
|
color: 'var(--dx-accentText)',
|
177
186
|
},
|
178
|
-
|
187
|
+
|
188
|
+
'.cm-completionInfo': {
|
179
189
|
width: '360px !important',
|
180
190
|
margin: '-10px 1px 0 1px',
|
181
191
|
padding: '8px !important',
|
@@ -226,7 +236,7 @@ export const defaultTheme: ThemeStyles = {
|
|
226
236
|
backgroundColor: 'var(--dx-input)',
|
227
237
|
},
|
228
238
|
'.cm-panel input:focus, .cm-panel button:focus': {
|
229
|
-
outline: '1px solid var(--dx-
|
239
|
+
outline: '1px solid var(--dx-neutralFocusIndicator)',
|
230
240
|
},
|
231
241
|
'.cm-panel label': {
|
232
242
|
display: 'inline-flex',
|
@@ -239,7 +249,7 @@ export const defaultTheme: ThemeStyles = {
|
|
239
249
|
height: '8px',
|
240
250
|
marginRight: '6px !important',
|
241
251
|
padding: '2px !important',
|
242
|
-
color: 'var(--dx-
|
252
|
+
color: 'var(--dx-neutralFocusIndicator)',
|
243
253
|
},
|
244
254
|
'.cm-panel button': {
|
245
255
|
'&:hover': {
|
package/src/styles/tokens.ts
CHANGED
package/src/testing/index.ts
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/comment.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAarE,eAAO,MAAM,aAAa,UAAW,kBAAkB;;;;;;;;;;;;;;CAGrD,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"editorAction.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/editorAction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAsBhE,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,aAAa,GACb,cAAc,GACd,WAAW,GACX,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,OAAO,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAE5F,eAAO,MAAM,oBAAoB,EAAE,oBAyDlC,CAAC"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { type EditorView } from '@codemirror/view';
|
2
|
-
import { type EditorAction } from '../extensions';
|
3
|
-
export declare const useActionHandler: (view?: EditorView | null) => (action: EditorAction) => void | null | undefined;
|
4
|
-
//# sourceMappingURL=useActionHandler.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useActionHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useActionHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,gBAAgB,UAAW,UAAU,GAAG,IAAI,cAC3B,YAAY,4BACzC,CAAC"}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import '@dxos-theme';
|
2
|
-
import React from 'react';
|
3
|
-
import { type UseTextEditorProps } from '../hooks';
|
4
|
-
type StoryProps = {
|
5
|
-
placeholder?: string;
|
6
|
-
readOnly?: boolean;
|
7
|
-
} & UseTextEditorProps;
|
8
|
-
export declare const Default: {
|
9
|
-
render: () => React.JSX.Element;
|
10
|
-
};
|
11
|
-
export declare const Markdown: {
|
12
|
-
args: {
|
13
|
-
autoFocus: boolean;
|
14
|
-
placeholder: string;
|
15
|
-
initialValue: string;
|
16
|
-
};
|
17
|
-
};
|
18
|
-
declare const _default: {
|
19
|
-
title: string;
|
20
|
-
render: ({ autoFocus, initialValue, placeholder, readOnly }: StoryProps) => React.JSX.Element;
|
21
|
-
decorators: import("@storybook/react").Decorator[];
|
22
|
-
parameters: {
|
23
|
-
translations: {
|
24
|
-
'en-US': {
|
25
|
-
"react-ui-editor": {
|
26
|
-
'strong label': string;
|
27
|
-
'emphasis label': string;
|
28
|
-
'strikethrough label': string;
|
29
|
-
'code label': string;
|
30
|
-
'link label': string;
|
31
|
-
'list-bullet label': string;
|
32
|
-
'list-ordered label': string;
|
33
|
-
'list-task label': string;
|
34
|
-
'blockquote label': string;
|
35
|
-
'codeblock label': string;
|
36
|
-
'comment label': string;
|
37
|
-
'selection overlaps existing comment label': string;
|
38
|
-
'select text to comment label': string;
|
39
|
-
'image label': string;
|
40
|
-
'heading label': string;
|
41
|
-
'table label': string;
|
42
|
-
'heading level label_zero': string;
|
43
|
-
'heading level label_one': string;
|
44
|
-
'heading level label_other': string;
|
45
|
-
'view mode label': string;
|
46
|
-
'preview mode label': string;
|
47
|
-
'readonly mode label': string;
|
48
|
-
'search label': string;
|
49
|
-
'source mode label': string;
|
50
|
-
};
|
51
|
-
};
|
52
|
-
}[];
|
53
|
-
layout: string;
|
54
|
-
};
|
55
|
-
};
|
56
|
-
export default _default;
|
57
|
-
//# sourceMappingURL=InputMode.stories.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"InputMode.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/InputMode.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAmB,MAAM,OAAO,CAAC;AAiBxC,OAAO,EAAmC,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGpF,KAAK,UAAU,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,kBAAkB,CAAC;AAqEpF,eAAO,MAAM,OAAO;;CAanB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAC;;;iEAxFwE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,UAAU;;CAQtB,CAAC;AAMF,eAAO,MAAM,YAAY;;CAcxB,CAAC;AAMF,eAAO,MAAM,OAAO;;CAWnB,CAAC;AAMF,eAAO,MAAM,MAAM;;CAQlB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TextEditorComments.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/TextEditorComments.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAA0B,MAAM,eAAe,CAAC;AAKrE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAKnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,QAAQ;;CAsCpB,CAAC;AAyBF,eAAO,MAAM,WAAW;;CAIvB,CAAC"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import '@dxos-theme';
|
2
|
-
import React from 'react';
|
3
|
-
import { type Meta } from '@dxos/storybook-utils';
|
4
|
-
import { DefaultStory } from './story-utils';
|
5
|
-
declare const meta: Meta<typeof DefaultStory>;
|
6
|
-
export default meta;
|
7
|
-
export declare const Preview: {
|
8
|
-
render: () => React.JSX.Element;
|
9
|
-
};
|
10
|
-
export declare const Command: {
|
11
|
-
render: () => React.JSX.Element;
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=TextEditorPreview.stories.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TextEditorPreview.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/TextEditorPreview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAA2D,MAAM,OAAO,CAAC;AAKhF,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAO,MAAM,eAAe,CAAC;AAelD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAKnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO;;CA8BnB,CAAC;AAwFF,eAAO,MAAM,OAAO;;CAwBnB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TextEditorSpecial.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/TextEditorSpecial.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,YAAY,EAAgB,MAAM,eAAe,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAKnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,QAAQ;;CAgBpB,CAAC;AAQF,eAAO,MAAM,UAAU;;CAOtB,CAAC;AAMF,eAAO,MAAM,KAAK;;CAqBjB,CAAC;AAMF,eAAO,MAAM,GAAG;;CAaf,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"story-utils.d.ts","sourceRoot":"","sources":["../../../../src/stories/story-utils.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,KAAuC,MAAM,OAAO,CAAC;AAW5D,OAAO,EACL,KAAK,oBAAoB,EAQ1B,MAAM,eAAe,CAAC;AAQvB,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,eAAO,MAAM,GAAG,aAAc,MAAM,EAAE,WAAqB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