@dxos/react-ui-editor 0.8.4-main.c1de068 → 0.8.4-main.dedc0f3

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.
Files changed (210) hide show
  1. package/dist/lib/browser/index.mjs +2074 -888
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/browser/testing/index.mjs.map +2 -2
  5. package/dist/lib/node-esm/index.mjs +2074 -888
  6. package/dist/lib/node-esm/index.mjs.map +4 -4
  7. package/dist/lib/node-esm/meta.json +1 -1
  8. package/dist/lib/node-esm/testing/index.mjs.map +2 -2
  9. package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
  10. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
  11. package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
  12. package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
  13. package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
  14. package/dist/types/src/components/EditorToolbar/image.d.ts.map +1 -1
  15. package/dist/types/src/components/EditorToolbar/lists.d.ts.map +1 -1
  16. package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -1
  17. package/dist/types/src/components/EditorToolbar/util.d.ts +2 -2
  18. package/dist/types/src/components/EditorToolbar/util.d.ts.map +1 -1
  19. package/dist/types/src/components/EditorToolbar/view-mode.d.ts +1 -1
  20. package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
  21. package/dist/types/src/components/Popover/CommandMenu.d.ts.map +1 -1
  22. package/dist/types/src/components/Popover/RefDropdownMenu.d.ts +2 -9
  23. package/dist/types/src/components/Popover/RefDropdownMenu.d.ts.map +1 -1
  24. package/dist/types/src/components/Popover/RefPopover.d.ts +20 -17
  25. package/dist/types/src/components/Popover/RefPopover.d.ts.map +1 -1
  26. package/dist/types/src/defaults.d.ts.map +1 -1
  27. package/dist/types/src/extensions/autocomplete.d.ts +20 -7
  28. package/dist/types/src/extensions/autocomplete.d.ts.map +1 -1
  29. package/dist/types/src/extensions/automerge/automerge.d.ts.map +1 -1
  30. package/dist/types/src/extensions/automerge/automerge.stories.d.ts +9 -18
  31. package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +1 -1
  32. package/dist/types/src/extensions/automerge/defs.d.ts +1 -1
  33. package/dist/types/src/extensions/automerge/defs.d.ts.map +1 -1
  34. package/dist/types/src/extensions/automerge/sync.d.ts.map +1 -1
  35. package/dist/types/src/extensions/automerge/update-automerge.d.ts.map +1 -1
  36. package/dist/types/src/extensions/autoscroll.d.ts +10 -0
  37. package/dist/types/src/extensions/autoscroll.d.ts.map +1 -0
  38. package/dist/types/src/extensions/command/action.d.ts +1 -1
  39. package/dist/types/src/extensions/command/action.d.ts.map +1 -1
  40. package/dist/types/src/extensions/command/command-menu.d.ts +1 -1
  41. package/dist/types/src/extensions/command/command-menu.d.ts.map +1 -1
  42. package/dist/types/src/extensions/command/command.d.ts.map +1 -1
  43. package/dist/types/src/extensions/command/hint.d.ts +2 -7
  44. package/dist/types/src/extensions/command/hint.d.ts.map +1 -1
  45. package/dist/types/src/extensions/command/state.d.ts +1 -1
  46. package/dist/types/src/extensions/command/state.d.ts.map +1 -1
  47. package/dist/types/src/extensions/command/typeahead.d.ts.map +1 -1
  48. package/dist/types/src/extensions/command/useCommandMenu.d.ts +4 -4
  49. package/dist/types/src/extensions/command/useCommandMenu.d.ts.map +1 -1
  50. package/dist/types/src/extensions/comments.d.ts +1 -1
  51. package/dist/types/src/extensions/comments.d.ts.map +1 -1
  52. package/dist/types/src/extensions/dnd.d.ts.map +1 -1
  53. package/dist/types/src/extensions/factories.d.ts +2 -7
  54. package/dist/types/src/extensions/factories.d.ts.map +1 -1
  55. package/dist/types/src/extensions/index.d.ts +2 -0
  56. package/dist/types/src/extensions/index.d.ts.map +1 -1
  57. package/dist/types/src/extensions/markdown/action.d.ts.map +1 -1
  58. package/dist/types/src/extensions/markdown/bundle.d.ts +8 -2
  59. package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
  60. package/dist/types/src/extensions/markdown/changes.d.ts +1 -1
  61. package/dist/types/src/extensions/markdown/changes.d.ts.map +1 -1
  62. package/dist/types/src/extensions/markdown/decorate.d.ts +9 -1
  63. package/dist/types/src/extensions/markdown/decorate.d.ts.map +1 -1
  64. package/dist/types/src/extensions/markdown/formatting.d.ts +1 -1
  65. package/dist/types/src/extensions/markdown/formatting.d.ts.map +1 -1
  66. package/dist/types/src/extensions/markdown/formatting.test.d.ts.map +1 -1
  67. package/dist/types/src/extensions/markdown/highlight.d.ts.map +1 -1
  68. package/dist/types/src/extensions/markdown/image.d.ts.map +1 -1
  69. package/dist/types/src/extensions/outliner/outliner.d.ts +1 -1
  70. package/dist/types/src/extensions/outliner/outliner.d.ts.map +1 -1
  71. package/dist/types/src/extensions/outliner/selection.d.ts.map +1 -1
  72. package/dist/types/src/extensions/outliner/tree.d.ts +2 -2
  73. package/dist/types/src/extensions/outliner/tree.d.ts.map +1 -1
  74. package/dist/types/src/extensions/preview/preview.d.ts +3 -5
  75. package/dist/types/src/extensions/preview/preview.d.ts.map +1 -1
  76. package/dist/types/src/extensions/tags/extended-markdown.d.ts +10 -0
  77. package/dist/types/src/extensions/tags/extended-markdown.d.ts.map +1 -0
  78. package/dist/types/src/extensions/tags/extended-markdown.test.d.ts +2 -0
  79. package/dist/types/src/extensions/tags/extended-markdown.test.d.ts.map +1 -0
  80. package/dist/types/src/extensions/tags/index.d.ts +4 -0
  81. package/dist/types/src/extensions/tags/index.d.ts.map +1 -0
  82. package/dist/types/src/extensions/tags/streamer.d.ts +12 -0
  83. package/dist/types/src/extensions/tags/streamer.d.ts.map +1 -0
  84. package/dist/types/src/extensions/tags/xml-tags.d.ts +71 -0
  85. package/dist/types/src/extensions/tags/xml-tags.d.ts.map +1 -0
  86. package/dist/types/src/extensions/tags/xml-util.d.ts +10 -0
  87. package/dist/types/src/extensions/tags/xml-util.d.ts.map +1 -0
  88. package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
  89. package/dist/types/src/stories/Command.stories.d.ts +12 -4
  90. package/dist/types/src/stories/Command.stories.d.ts.map +1 -1
  91. package/dist/types/src/stories/CommandMenu.stories.d.ts +10 -3
  92. package/dist/types/src/stories/CommandMenu.stories.d.ts.map +1 -1
  93. package/dist/types/src/stories/Comments.stories.d.ts +21 -9
  94. package/dist/types/src/stories/Comments.stories.d.ts.map +1 -1
  95. package/dist/types/src/stories/EditorToolbar.stories.d.ts +39 -2
  96. package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
  97. package/dist/types/src/stories/Experimental.stories.d.ts +22 -12
  98. package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -1
  99. package/dist/types/src/stories/Markdown.stories.d.ts +32 -42
  100. package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -1
  101. package/dist/types/src/stories/Outliner.stories.d.ts +15 -20
  102. package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
  103. package/dist/types/src/stories/Preview.stories.d.ts +21 -6
  104. package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
  105. package/dist/types/src/stories/Tags.stories.d.ts +17 -0
  106. package/dist/types/src/stories/Tags.stories.d.ts.map +1 -0
  107. package/dist/types/src/stories/TextEditor.stories.d.ts +38 -51
  108. package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
  109. package/dist/types/src/stories/components/EditorStory.d.ts +3 -6
  110. package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
  111. package/dist/types/src/styles/theme.d.ts.map +1 -1
  112. package/dist/types/src/testing/util.d.ts +1 -0
  113. package/dist/types/src/testing/util.d.ts.map +1 -1
  114. package/dist/types/src/translations.d.ts +1 -1
  115. package/dist/types/src/types/types.d.ts +1 -1
  116. package/dist/types/src/util/cursor.d.ts.map +1 -1
  117. package/dist/types/src/util/debug.d.ts +1 -1
  118. package/dist/types/src/util/debug.d.ts.map +1 -1
  119. package/dist/types/src/util/decorations.d.ts +4 -0
  120. package/dist/types/src/util/decorations.d.ts.map +1 -0
  121. package/dist/types/src/util/dom.d.ts +2 -12
  122. package/dist/types/src/util/dom.d.ts.map +1 -1
  123. package/dist/types/src/util/domino.d.ts +18 -0
  124. package/dist/types/src/util/domino.d.ts.map +1 -0
  125. package/dist/types/src/util/index.d.ts +2 -0
  126. package/dist/types/src/util/index.d.ts.map +1 -1
  127. package/dist/types/src/util/react.d.ts +1 -1
  128. package/dist/types/src/util/react.d.ts.map +1 -1
  129. package/dist/types/tsconfig.tsbuildinfo +1 -1
  130. package/package.json +57 -51
  131. package/src/components/Editor/Editor.tsx +1 -1
  132. package/src/components/EditorToolbar/EditorToolbar.tsx +40 -30
  133. package/src/components/EditorToolbar/blocks.ts +21 -24
  134. package/src/components/EditorToolbar/formatting.ts +22 -25
  135. package/src/components/EditorToolbar/headings.ts +10 -5
  136. package/src/components/EditorToolbar/image.ts +8 -4
  137. package/src/components/EditorToolbar/lists.ts +16 -19
  138. package/src/components/EditorToolbar/search.ts +8 -4
  139. package/src/components/EditorToolbar/util.ts +16 -5
  140. package/src/components/EditorToolbar/view-mode.ts +11 -6
  141. package/src/components/Popover/CommandMenu.tsx +3 -3
  142. package/src/components/Popover/RefDropdownMenu.tsx +20 -16
  143. package/src/components/Popover/RefPopover.tsx +63 -45
  144. package/src/defaults.ts +5 -2
  145. package/src/extensions/autocomplete.ts +204 -54
  146. package/src/extensions/automerge/automerge.stories.tsx +25 -18
  147. package/src/extensions/automerge/automerge.ts +4 -3
  148. package/src/extensions/automerge/defs.ts +1 -1
  149. package/src/extensions/automerge/sync.ts +1 -1
  150. package/src/extensions/automerge/update-automerge.ts +1 -1
  151. package/src/extensions/autoscroll.ts +151 -0
  152. package/src/extensions/awareness/awareness.ts +2 -2
  153. package/src/extensions/command/action.ts +1 -1
  154. package/src/extensions/command/command-menu.ts +6 -5
  155. package/src/extensions/command/command.ts +3 -3
  156. package/src/extensions/command/floating-menu.ts +1 -1
  157. package/src/extensions/command/hint.ts +2 -1
  158. package/src/extensions/command/placeholder.ts +1 -1
  159. package/src/extensions/command/state.ts +4 -3
  160. package/src/extensions/command/typeahead.ts +2 -2
  161. package/src/extensions/command/useCommandMenu.ts +5 -4
  162. package/src/extensions/comments.ts +18 -13
  163. package/src/extensions/dnd.ts +1 -1
  164. package/src/extensions/factories.ts +9 -21
  165. package/src/extensions/folding.tsx +2 -2
  166. package/src/extensions/index.ts +2 -0
  167. package/src/extensions/markdown/action.ts +2 -1
  168. package/src/extensions/markdown/bundle.ts +25 -3
  169. package/src/extensions/markdown/changes.ts +1 -1
  170. package/src/extensions/markdown/decorate.ts +23 -14
  171. package/src/extensions/markdown/formatting.test.ts +6 -6
  172. package/src/extensions/markdown/formatting.ts +3 -3
  173. package/src/extensions/markdown/highlight.ts +1 -1
  174. package/src/extensions/markdown/image.ts +3 -4
  175. package/src/extensions/markdown/table.ts +7 -1
  176. package/src/extensions/mention.ts +1 -1
  177. package/src/extensions/outliner/outliner.test.ts +3 -2
  178. package/src/extensions/outliner/outliner.ts +5 -4
  179. package/src/extensions/outliner/selection.ts +1 -1
  180. package/src/extensions/outliner/tree.test.ts +2 -1
  181. package/src/extensions/outliner/tree.ts +2 -2
  182. package/src/extensions/preview/preview.ts +59 -59
  183. package/src/extensions/tags/extended-markdown.test.ts +261 -0
  184. package/src/extensions/tags/extended-markdown.ts +78 -0
  185. package/src/extensions/tags/index.ts +7 -0
  186. package/src/extensions/tags/streamer.ts +244 -0
  187. package/src/extensions/tags/xml-tags.ts +335 -0
  188. package/src/extensions/tags/xml-util.ts +94 -0
  189. package/src/hooks/useTextEditor.ts +3 -3
  190. package/src/stories/Command.stories.tsx +24 -31
  191. package/src/stories/CommandMenu.stories.tsx +23 -22
  192. package/src/stories/Comments.stories.tsx +10 -6
  193. package/src/stories/EditorToolbar.stories.tsx +8 -8
  194. package/src/stories/Experimental.stories.tsx +12 -8
  195. package/src/stories/Markdown.stories.tsx +21 -17
  196. package/src/stories/Outliner.stories.tsx +17 -14
  197. package/src/stories/Preview.stories.tsx +27 -26
  198. package/src/stories/Tags.stories.tsx +81 -0
  199. package/src/stories/TextEditor.stories.tsx +40 -34
  200. package/src/stories/components/EditorStory.tsx +9 -10
  201. package/src/styles/theme.ts +8 -6
  202. package/src/testing/util.ts +2 -0
  203. package/src/translations.ts +1 -1
  204. package/src/util/cursor.ts +2 -1
  205. package/src/util/debug.ts +2 -2
  206. package/src/util/decorations.ts +21 -0
  207. package/src/util/dom.ts +5 -27
  208. package/src/util/domino.ts +51 -0
  209. package/src/util/index.ts +2 -0
  210. package/src/util/react.tsx +1 -1
@@ -1,10 +1,25 @@
1
1
  import '@dxos-theme';
2
+ import { type EditorView } from '@codemirror/view';
3
+ import { type StoryObj } from '@storybook/react-vite';
2
4
  import React from 'react';
3
- import { type Meta } from '@dxos/storybook-utils';
4
- import { EditorStory } from './components';
5
- declare const meta: Meta<typeof EditorStory>;
6
- export default meta;
7
- export declare const Default: {
8
- render: () => React.JSX.Element;
5
+ declare const meta: {
6
+ title: string;
7
+ component: React.ForwardRefExoticComponent<Pick<import("..").UseTextEditorProps, "selection" | "extensions" | "id" | "scrollTo"> & Pick<import("..").ThemeExtensionsOptions, "slots"> & {
8
+ debug?: import("./components").DebugMode;
9
+ debugCustom?: (view: EditorView) => React.ReactNode;
10
+ text?: string;
11
+ object?: import("@dxos/echo-schema").Expando;
12
+ readOnly?: boolean;
13
+ placeholder?: string;
14
+ lineNumbers?: boolean;
15
+ onReady?: (view: EditorView) => void;
16
+ } & React.RefAttributes<EditorView | undefined>>;
17
+ decorators: import("@storybook/react").Decorator[];
18
+ parameters: {
19
+ layout: string;
20
+ };
9
21
  };
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+ export declare const Default: Story;
10
25
  //# 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":"AAIA,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAoD,MAAM,OAAO,CAAC;AAQzE,OAAO,EAAyB,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAoJ3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAKlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;CAoDnB,CAAC"}
1
+ {"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Preview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAoD,MAAM,OAAO,CAAC;AA+JzE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAK0B,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,17 @@
1
+ import '@dxos-theme';
2
+ import { type StoryObj } from '@storybook/react-vite';
3
+ import React from 'react';
4
+ declare const meta: {
5
+ title: string;
6
+ render: ({ text }: {
7
+ text?: string;
8
+ }) => React.JSX.Element;
9
+ decorators: import("@storybook/react").Decorator[];
10
+ parameters: {
11
+ layout: string;
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+ export declare const Default: Story;
17
+ //# sourceMappingURL=Tags.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tags.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Tags.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AA0DxC,QAAA,MAAM,IAAI;;uBAhCsB;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;CAqCZ,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -1,55 +1,42 @@
1
1
  import '@dxos-theme';
2
+ import { type StoryObj } from '@storybook/react-vite';
2
3
  import React from 'react';
3
- import { type Meta } from '@dxos/storybook-utils';
4
- import { EditorStory } from './components';
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;
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<Pick<import("..").UseTextEditorProps, "selection" | "extensions" | "id" | "scrollTo"> & Pick<import("..").ThemeExtensionsOptions, "slots"> & {
7
+ debug?: import("./components").DebugMode;
8
+ debugCustom?: (view: import("@codemirror/view").EditorView) => React.ReactNode;
9
+ text?: string;
10
+ object?: import("@dxos/echo-schema").Expando;
11
+ readOnly?: boolean;
12
+ placeholder?: string;
13
+ lineNumbers?: boolean;
14
+ onReady?: (view: import("@codemirror/view").EditorView) => void;
15
+ } & React.RefAttributes<import("@codemirror/view").EditorView | undefined>>;
16
+ decorators: import("@storybook/react").Decorator[];
17
+ parameters: {
18
+ layout: string;
19
+ controls: {
20
+ disable: boolean;
21
+ };
22
+ };
54
23
  };
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+ export declare const Default: Story;
27
+ export declare const Everything: Story;
28
+ export declare const Empty: Story;
29
+ export declare const Readonly: Story;
30
+ export declare const NoExtensions: Story;
31
+ export declare const Vim: Story;
32
+ export declare const Listener: Story;
33
+ export declare const Folding: Story;
34
+ export declare const Scrolling: Story;
35
+ export declare const ScrollingWithImages: Story;
36
+ export declare const ScrollTo: Story;
37
+ export declare const Typescript: Story;
38
+ export declare const Autocomplete: Story;
39
+ export declare const Typeahead: Story;
40
+ export declare const Mention: Story;
41
+ export declare const Search: Story;
55
42
  //# sourceMappingURL=TextEditor.stories.d.ts.map
@@ -1 +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,cAAc,CAAC;AAgBtB,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"}
1
+ {"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/TextEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAIrB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAkC1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;CAK0B,CAAC;AAErC,eAAe,IAAI,CAAC;AAMpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAMF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAMF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAMF,eAAO,MAAM,GAAG,EAAE,KAOjB,CAAC;AAMF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAMF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAMF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAMF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAC;AAQF,eAAO,MAAM,SAAS,EAAE,KAYvB,CAAC;AAMF,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAMF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC"}
@@ -4,8 +4,7 @@ import { Expando } from '@dxos/echo-schema';
4
4
  import { type ThemeExtensionsOptions } from '../../extensions';
5
5
  import { type UseTextEditorProps } from '../../hooks';
6
6
  export type DebugMode = 'raw' | 'tree' | 'raw+tree';
7
- export type StoryProps = Pick<UseTextEditorProps, 'scrollTo' | 'selection' | 'extensions'> & Pick<ThemeExtensionsOptions, 'slots'> & {
8
- id?: string;
7
+ export type StoryProps = Pick<UseTextEditorProps, 'id' | 'scrollTo' | 'selection' | 'extensions'> & Pick<ThemeExtensionsOptions, 'slots'> & {
9
8
  debug?: DebugMode;
10
9
  debugCustom?: (view: EditorView) => ReactNode;
11
10
  text?: string;
@@ -15,8 +14,7 @@ export type StoryProps = Pick<UseTextEditorProps, 'scrollTo' | 'selection' | 'ex
15
14
  lineNumbers?: boolean;
16
15
  onReady?: (view: EditorView) => void;
17
16
  };
18
- export declare const EditorStory: React.ForwardRefExoticComponent<Pick<UseTextEditorProps, "selection" | "extensions" | "scrollTo"> & Pick<ThemeExtensionsOptions, "slots"> & {
19
- id?: string;
17
+ export declare const EditorStory: React.ForwardRefExoticComponent<Pick<UseTextEditorProps, "selection" | "extensions" | "id" | "scrollTo"> & Pick<ThemeExtensionsOptions, "slots"> & {
20
18
  debug?: DebugMode;
21
19
  debugCustom?: (view: EditorView) => ReactNode;
22
20
  text?: string;
@@ -29,8 +27,7 @@ export declare const EditorStory: React.ForwardRefExoticComponent<Pick<UseTextEd
29
27
  /**
30
28
  * Default story component.
31
29
  */
32
- export declare const EditorComponent: React.ForwardRefExoticComponent<Pick<UseTextEditorProps, "selection" | "extensions" | "scrollTo"> & Pick<ThemeExtensionsOptions, "slots"> & {
33
- id?: string;
30
+ export declare const EditorComponent: React.ForwardRefExoticComponent<Pick<UseTextEditorProps, "selection" | "extensions" | "id" | "scrollTo"> & Pick<ThemeExtensionsOptions, "slots"> & {
34
31
  debug?: DebugMode;
35
32
  debugCustom?: (view: EditorView) => ReactNode;
36
33
  text?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorStory.d.ts","sourceRoot":"","sources":["../../../../../src/stories/components/EditorStory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiE,MAAM,OAAO,CAAC;AAE7G,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAY5C,OAAO,EAEL,KAAK,sBAAsB,EAM5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGrE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;AAIpD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC,GACxF,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAAG;IACtC,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,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,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,CAAC;AAEJ,eAAO,MAAM,WAAW;SAXf,MAAM;YACH,SAAS;kBACH,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS;WACtC,MAAM;aACJ,OAAO;eACL,OAAO;kBACJ,MAAM;kBACN,OAAO;cACX,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI;gDAoCvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAjDnB,MAAM;YACH,SAAS;kBACH,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS;WACtC,MAAM;aACJ,OAAO;eACL,OAAO;kBACJ,MAAM;kBACN,OAAO;cACX,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI;gDAyFvC,CAAC"}
1
+ {"version":3,"file":"EditorStory.d.ts","sourceRoot":"","sources":["../../../../../src/stories/components/EditorStory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiE,MAAM,OAAO,CAAC;AAE7G,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAY5C,OAAO,EAEL,KAAK,sBAAsB,EAM5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,aAAa,CAAC;AAGrE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;AAIpD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC,GAC/F,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAAG;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,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,CAAC;AAEJ,eAAO,MAAM,WAAW;YAVZ,SAAS;kBACH,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS;WACtC,MAAM;aACJ,OAAO;eACL,OAAO;kBACJ,MAAM;kBACN,OAAO;cACX,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI;gDAoCvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;YAhDhB,SAAS;kBACH,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS;WACtC,MAAM;aACJ,OAAO;eACL,OAAO;kBACJ,MAAM;kBACN,OAAO;cACX,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI;gDAyFvC,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,WA4N1B,CAAC"}
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,WA8N1B,CAAC"}
@@ -1,2 +1,3 @@
1
+ /** deprecated Replace with @dxos/util trim */
1
2
  export declare const str: (...lines: string[]) => string;
2
3
  //# sourceMappingURL=util.d.ts.map
@@ -1 +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
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.ts"],"names":[],"mappings":"AAIA,8CAA8C;AAE9C,eAAO,MAAM,GAAG,GAAI,GAAG,OAAO,MAAM,EAAE,WAAqB,CAAC"}
@@ -16,8 +16,8 @@ export declare const translations: [{
16
16
  readonly 'selection overlaps existing comment label': "Selection overlaps existing comment";
17
17
  readonly 'select text to comment label': "Select text to comment";
18
18
  readonly 'image label': "Insert image";
19
- readonly 'heading label': "Heading level";
20
19
  readonly 'table label': "Create table";
20
+ readonly 'heading label': "Heading level";
21
21
  readonly 'heading level label_zero': "Paragraph";
22
22
  readonly 'heading level label_one': "Heading level {{count}}";
23
23
  readonly 'heading level label_other': "Heading level {{count}}";
@@ -13,7 +13,7 @@ export type Comment = {
13
13
  */
14
14
  export type RenderCallback<Props extends object> = (el: HTMLElement, props: Props, view: EditorView) => void;
15
15
  export declare const EditorViewModes: readonly ["preview", "readonly", "source"];
16
- export declare const EditorViewMode: Schema.Schema<"preview" | "readonly" | "source", "preview" | "readonly" | "source", never>;
16
+ export declare const EditorViewMode: Schema.Schema<"source" | "preview" | "readonly", "source" | "preview" | "readonly", never>;
17
17
  export type EditorViewMode = Schema.Schema.Type<typeof EditorViewMode>;
18
18
  export declare const EditorInputModes: readonly ["default", "vim", "vscode"];
19
19
  export declare const EditorInputMode: Schema.Schema<"default" | "vim" | "vscode", "default" | "vim" | "vscode", never>;
@@ -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,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
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/util/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC;;;;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,6 +1,6 @@
1
1
  import { type Transaction } from '@codemirror/state';
2
2
  import { type EditorView } from '@codemirror/view';
3
- export declare const wrapWithCatch: (fn: (...args: any[]) => any) => (...args: any[]) => any;
3
+ export declare const wrapWithCatch: (fn: (...args: any[]) => any, label?: string) => (...args: any[]) => any;
4
4
  /**
5
5
  * CodeMirror callbacks swallow errors so wrap handlers.
6
6
  */
@@ -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,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
+ {"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,EAAE,QAAQ,MAAM,MAC/D,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"}
@@ -0,0 +1,4 @@
1
+ import { type Range } from '@codemirror/state';
2
+ import { type Decoration, type DecorationSet } from '@codemirror/view';
3
+ export declare const decorationSetToArray: (deco: DecorationSet) => readonly Range<Decoration>[];
4
+ //# sourceMappingURL=decorations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorations.d.ts","sourceRoot":"","sources":["../../../../src/util/decorations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,eAAO,MAAM,oBAAoB,GAAI,MAAM,aAAa,KAAG,SAAS,KAAK,CAAC,UAAU,CAAC,EAapF,CAAC"}
@@ -1,20 +1,10 @@
1
- export interface Rect {
1
+ export type Rect = {
2
2
  readonly left: number;
3
3
  readonly right: number;
4
4
  readonly top: number;
5
5
  readonly bottom: number;
6
- }
7
- export declare const flattenRect: (rect: Rect, left: boolean) => {
8
- left: number;
9
- right: number;
10
- top: number;
11
- bottom: number;
12
6
  };
7
+ export declare const flattenRect: (rect: Rect, left: boolean) => Rect;
13
8
  export declare const textRange: (node: Text, from: number, to?: number) => Range;
14
9
  export declare const clientRectsFor: (dom: Node) => DOMRectList;
15
- export type ElementOptions = {
16
- className?: string;
17
- text?: string;
18
- };
19
- export declare const createElement: (tag: string, options?: ElementOptions, children?: HTMLElement[]) => HTMLElement;
20
10
  //# sourceMappingURL=dom.d.ts.map
@@ -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,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;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,UAAU,cAAc,EAAE,WAAW,WAAW,EAAE,KAAG,WAa/F,CAAC"}
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/util/dom.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,IAAI,GAAG;IACjB,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,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,EAAE,MAAM,OAAO,KAAG,IAGvD,CAAC;AAIF,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,EAAE,MAAM,MAAM,EAAE,WAAS,KAAG,KAK/D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,IAAI,KAAG,WAQ1C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type ClassNameValue } from '@dxos/react-ui-types';
2
+ /**
3
+ * Super lightweight chainable DOM builder.
4
+ */
5
+ export declare class Domino<T extends HTMLElement> {
6
+ static of<K extends keyof HTMLElementTagNameMap>(tag: K): Domino<HTMLElementTagNameMap[K]>;
7
+ private readonly _el;
8
+ constructor(tag: keyof HTMLElementTagNameMap);
9
+ classNames(...classNames: ClassNameValue[]): this;
10
+ text(value: string): this;
11
+ data(key: string, value: string): this;
12
+ style(styles: Partial<CSSStyleDeclaration>): this;
13
+ attr<K extends keyof T>(key: K, value: T[K]): this;
14
+ child<C extends HTMLElement>(...children: Domino<C>[]): this;
15
+ on(event: string, handler: (e: Event) => void): this;
16
+ build(): T;
17
+ }
18
+ //# sourceMappingURL=domino.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domino.d.ts","sourceRoot":"","sources":["../../../../src/util/domino.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;GAEG;AACH,qBAAa,MAAM,CAAC,CAAC,SAAS,WAAW;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAI1F,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAI;gBACZ,GAAG,EAAE,MAAM,qBAAqB;IAG5C,UAAU,CAAC,GAAG,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI;IAIjD,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAItC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,IAAI;IAIjD,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAIlD,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI;IAI5D,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IAIpD,KAAK,IAAI,CAAC;CAGX"}
@@ -1,6 +1,8 @@
1
1
  export * from './cursor';
2
+ export * from './decorations';
2
3
  export * from './debug';
3
4
  export * from './dom';
5
+ export * from './domino';
4
6
  export * from './facet';
5
7
  export * from './react';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -6,5 +6,5 @@ export declare const renderRoot: <T extends Element>(root: T, node: ReactNode) =
6
6
  * Utility to create a renderer for a React component.
7
7
  * @deprecated
8
8
  */
9
- export declare const createRenderer: <Props extends object>(Component: FC<Props>) => RenderCallback<Props>;
9
+ export declare const createRenderer: <TProps extends object>(Component: FC<TProps>) => RenderCallback<TProps>;
10
10
  //# 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,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,kBAAkB;AAElB,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,SAAS,KAAG,CAGxE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACxB,KAAK,SAAS,MAAM,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,KAAG,cAAc,CAAC,KAAK,CAUjE,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;AAE/C,kBAAkB;AAElB,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,SAAS,KAAG,CAGxE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACxB,MAAM,SAAS,MAAM,EAAE,WAAW,EAAE,CAAC,MAAM,CAAC,KAAG,cAAc,CAAC,MAAM,CAUpE,CAAC"}