@dxos/react-ui-editor 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (124) hide show
  1. package/dist/lib/browser/index.mjs +548 -423
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/browser/translations.mjs +39 -0
  5. package/dist/lib/browser/translations.mjs.map +7 -0
  6. package/dist/lib/node-esm/index.mjs +548 -423
  7. package/dist/lib/node-esm/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/meta.json +1 -1
  9. package/dist/lib/node-esm/translations.mjs +41 -0
  10. package/dist/lib/node-esm/translations.mjs.map +7 -0
  11. package/dist/types/src/components/Editor/Editor.d.ts +30 -13
  12. package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
  13. package/dist/types/src/components/Editor/Editor.stories.d.ts +4 -4
  14. package/dist/types/src/components/Editor/Editor.stories.d.ts.map +1 -1
  15. package/dist/types/src/components/{EditorContent/EditorContent.d.ts → Editor/EditorView.d.ts} +5 -5
  16. package/dist/types/src/components/Editor/EditorView.d.ts.map +1 -0
  17. package/dist/types/src/components/Editor/controller.d.ts.map +1 -0
  18. package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts.map +1 -1
  19. package/dist/types/src/components/EditorMenuProvider/menu.d.ts.map +1 -1
  20. package/dist/types/src/components/EditorMenuProvider/popover.d.ts +2 -1
  21. package/dist/types/src/components/EditorMenuProvider/popover.d.ts.map +1 -1
  22. package/dist/types/src/components/EditorMenuProvider/useEditorMenu.d.ts.map +1 -1
  23. package/dist/types/src/components/EditorPreviewProvider/EditorPreviewProvider.d.ts.map +1 -1
  24. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +2 -2
  25. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
  26. package/dist/types/src/components/EditorToolbar/blocks.d.ts +1 -1
  27. package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
  28. package/dist/types/src/components/EditorToolbar/formatting.d.ts +1 -1
  29. package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
  30. package/dist/types/src/components/EditorToolbar/headings.d.ts +1 -1
  31. package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
  32. package/dist/types/src/components/EditorToolbar/image.d.ts.map +1 -1
  33. package/dist/types/src/components/EditorToolbar/index.d.ts +1 -1
  34. package/dist/types/src/components/EditorToolbar/index.d.ts.map +1 -1
  35. package/dist/types/src/components/EditorToolbar/lists.d.ts +1 -1
  36. package/dist/types/src/components/EditorToolbar/lists.d.ts.map +1 -1
  37. package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -1
  38. package/dist/types/src/components/EditorToolbar/types.d.ts +6 -0
  39. package/dist/types/src/components/EditorToolbar/types.d.ts.map +1 -0
  40. package/dist/types/src/components/EditorToolbar/view-mode.d.ts +2 -2
  41. package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
  42. package/dist/types/src/components/index.d.ts +0 -2
  43. package/dist/types/src/components/index.d.ts.map +1 -1
  44. package/dist/types/src/extensions/Assistant.stories.d.ts +10 -0
  45. package/dist/types/src/extensions/Assistant.stories.d.ts.map +1 -0
  46. package/dist/types/src/extensions/assistant-extension.d.ts +24 -0
  47. package/dist/types/src/extensions/assistant-extension.d.ts.map +1 -0
  48. package/dist/types/src/extensions/index.d.ts +2 -0
  49. package/dist/types/src/extensions/index.d.ts.map +1 -0
  50. package/dist/types/src/hooks/index.d.ts +1 -0
  51. package/dist/types/src/hooks/index.d.ts.map +1 -1
  52. package/dist/types/src/hooks/useBasicMarkdownExtensions.d.ts +25 -0
  53. package/dist/types/src/hooks/useBasicMarkdownExtensions.d.ts.map +1 -0
  54. package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
  55. package/dist/types/src/index.d.ts +1 -2
  56. package/dist/types/src/index.d.ts.map +1 -1
  57. package/dist/types/src/stories/Automerge.stories.d.ts +24 -24
  58. package/dist/types/src/stories/Automerge.stories.d.ts.map +1 -1
  59. package/dist/types/src/stories/Comments.stories.d.ts +1 -1
  60. package/dist/types/src/stories/Comments.stories.d.ts.map +1 -1
  61. package/dist/types/src/stories/EditorToolbar.stories.d.ts +27 -25
  62. package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
  63. package/dist/types/src/stories/Experimental.stories.d.ts +2 -2
  64. package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -1
  65. package/dist/types/src/stories/Markdown.stories.d.ts +1 -1
  66. package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -1
  67. package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
  68. package/dist/types/src/stories/Popover.stories.d.ts.map +1 -1
  69. package/dist/types/src/stories/Preview.stories.d.ts +1 -1
  70. package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
  71. package/dist/types/src/stories/Tags.stories.d.ts.map +1 -1
  72. package/dist/types/src/stories/TextEditor.stories.d.ts +1 -1
  73. package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
  74. package/dist/types/src/stories/Theme.stories.d.ts.map +1 -1
  75. package/dist/types/src/stories/components/EditorStory.d.ts +1 -1
  76. package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
  77. package/dist/types/src/stories/components/util.d.ts +2 -1
  78. package/dist/types/src/stories/components/util.d.ts.map +1 -1
  79. package/dist/types/src/translations.d.ts +24 -24
  80. package/dist/types/src/translations.d.ts.map +1 -1
  81. package/dist/types/src/util/react.d.ts +1 -1
  82. package/dist/types/src/util/react.d.ts.map +1 -1
  83. package/dist/types/tsconfig.tsbuildinfo +1 -1
  84. package/package.json +50 -41
  85. package/src/components/Editor/Editor.stories.tsx +10 -15
  86. package/src/components/Editor/Editor.tsx +51 -34
  87. package/src/components/Editor/EditorView.tsx +103 -0
  88. package/src/components/EditorMenuProvider/popover.ts +2 -1
  89. package/src/components/EditorToolbar/EditorToolbar.tsx +9 -7
  90. package/src/components/EditorToolbar/blocks.ts +3 -2
  91. package/src/components/EditorToolbar/formatting.ts +3 -2
  92. package/src/components/EditorToolbar/headings.ts +3 -2
  93. package/src/components/EditorToolbar/image.ts +1 -1
  94. package/src/components/EditorToolbar/index.ts +2 -2
  95. package/src/components/EditorToolbar/lists.ts +3 -2
  96. package/src/components/EditorToolbar/search.ts +1 -1
  97. package/src/components/EditorToolbar/types.ts +8 -0
  98. package/src/components/EditorToolbar/view-mode.ts +4 -3
  99. package/src/components/index.ts +0 -3
  100. package/src/extensions/Assistant.stories.tsx +112 -0
  101. package/src/extensions/assistant-extension.tsx +223 -0
  102. package/src/extensions/index.ts +5 -0
  103. package/src/hooks/index.ts +1 -0
  104. package/src/hooks/useBasicMarkdownExtensions.ts +55 -0
  105. package/src/index.ts +1 -4
  106. package/src/stories/Automerge.stories.tsx +2 -1
  107. package/src/stories/Comments.stories.tsx +2 -1
  108. package/src/stories/EditorToolbar.stories.tsx +35 -78
  109. package/src/stories/Experimental.stories.tsx +7 -7
  110. package/src/stories/Theme.stories.tsx +2 -2
  111. package/src/stories/components/EditorStory.tsx +9 -7
  112. package/src/stories/components/util.tsx +1 -1
  113. package/src/util/react.tsx +1 -1
  114. package/dist/types/src/components/EditorContent/EditorContent.d.ts.map +0 -1
  115. package/dist/types/src/components/EditorContent/controller.d.ts.map +0 -1
  116. package/dist/types/src/components/EditorContent/index.d.ts +0 -3
  117. package/dist/types/src/components/EditorContent/index.d.ts.map +0 -1
  118. package/dist/types/src/components/EditorToolbar/useEditorToolbar.d.ts +0 -11
  119. package/dist/types/src/components/EditorToolbar/useEditorToolbar.d.ts.map +0 -1
  120. package/src/components/EditorContent/EditorContent.tsx +0 -82
  121. package/src/components/EditorContent/index.ts +0 -6
  122. package/src/components/EditorToolbar/useEditorToolbar.ts +0 -20
  123. /package/dist/types/src/components/{EditorContent → Editor}/controller.d.ts +0 -0
  124. /package/src/components/{EditorContent → Editor}/controller.ts +0 -0
@@ -1 +1 @@
1
- {"inputs":{"src/translations.ts":{"bytes":4320,"imports":[],"format":"esm"},"src/components/EditorContent/controller.ts":{"bytes":3541,"imports":[],"format":"esm"},"src/hooks/useTextEditor.ts":{"bytes":17751,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":477,"imports":[{"path":"src/hooks/useTextEditor.ts","kind":"import-statement","original":"./useTextEditor"}],"format":"esm"},"src/components/EditorContent/EditorContent.tsx":{"bytes":8985,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/EditorContent/controller.ts","kind":"import-statement","original":"./controller"}],"format":"esm"},"src/components/EditorContent/index.ts":{"bytes":586,"imports":[{"path":"src/components/EditorContent/controller.ts","kind":"import-statement","original":"./controller"},{"path":"src/components/EditorContent/EditorContent.tsx","kind":"import-statement","original":"./EditorContent"}],"format":"esm"},"src/components/EditorMenuProvider/menu.ts":{"bytes":6114,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorMenuProvider/popover.ts":{"bytes":30750,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorMenuProvider/menu-presets.ts":{"bytes":12737,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/components/EditorMenuProvider/popover.ts","kind":"import-statement","original":"./popover"}],"format":"esm"},"src/components/EditorMenuProvider/EditorMenuProvider.tsx":{"bytes":21281,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorMenuProvider/useEditorMenu.ts":{"bytes":19786,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/components/EditorMenuProvider/menu.ts","kind":"import-statement","original":"./menu"},{"path":"src/components/EditorMenuProvider/popover.ts","kind":"import-statement","original":"./popover"}],"format":"esm"},"src/components/EditorMenuProvider/index.ts":{"bytes":882,"imports":[{"path":"src/components/EditorMenuProvider/menu.ts","kind":"import-statement","original":"./menu"},{"path":"src/components/EditorMenuProvider/menu-presets.ts","kind":"import-statement","original":"./menu-presets"},{"path":"src/components/EditorMenuProvider/popover.ts","kind":"import-statement","original":"./popover"},{"path":"src/components/EditorMenuProvider/EditorMenuProvider.tsx","kind":"import-statement","original":"./EditorMenuProvider"},{"path":"src/components/EditorMenuProvider/useEditorMenu.ts","kind":"import-statement","original":"./useEditorMenu"}],"format":"esm"},"src/components/EditorToolbar/blocks.ts":{"bytes":6881,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/formatting.ts":{"bytes":6798,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/headings.ts":{"bytes":6514,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/image.ts":{"bytes":1931,"imports":[{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/lists.ts":{"bytes":5917,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/search.ts":{"bytes":2225,"imports":[{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/view-mode.ts":{"bytes":4788,"imports":[{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/EditorToolbar.tsx":{"bytes":11992,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"src/components/EditorToolbar/blocks.ts","kind":"import-statement","original":"./blocks"},{"path":"src/components/EditorToolbar/formatting.ts","kind":"import-statement","original":"./formatting"},{"path":"src/components/EditorToolbar/headings.ts","kind":"import-statement","original":"./headings"},{"path":"src/components/EditorToolbar/image.ts","kind":"import-statement","original":"./image"},{"path":"src/components/EditorToolbar/lists.ts","kind":"import-statement","original":"./lists"},{"path":"src/components/EditorToolbar/search.ts","kind":"import-statement","original":"./search"},{"path":"src/components/EditorToolbar/view-mode.ts","kind":"import-statement","original":"./view-mode"}],"format":"esm"},"src/components/EditorToolbar/useEditorToolbar.ts":{"bytes":1964,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/index.ts":{"bytes":727,"imports":[{"path":"src/components/EditorToolbar/EditorToolbar.tsx","kind":"import-statement","original":"./EditorToolbar"},{"path":"src/components/EditorToolbar/useEditorToolbar.ts","kind":"import-statement","original":"./useEditorToolbar"}],"format":"esm"},"src/components/Editor/Editor.tsx":{"bytes":15224,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/EditorContent/index.ts","kind":"import-statement","original":"../EditorContent"},{"path":"src/components/EditorMenuProvider/index.ts","kind":"import-statement","original":"../EditorMenuProvider"},{"path":"src/components/EditorToolbar/index.ts","kind":"import-statement","original":"../EditorToolbar"}],"format":"esm"},"src/components/Editor/index.ts":{"bytes":470,"imports":[{"path":"src/components/Editor/Editor.tsx","kind":"import-statement","original":"./Editor"}],"format":"esm"},"src/components/EditorPreviewProvider/EditorPreviewProvider.tsx":{"bytes":8426,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorPreviewProvider/index.ts":{"bytes":520,"imports":[{"path":"src/components/EditorPreviewProvider/EditorPreviewProvider.tsx","kind":"import-statement","original":"./EditorPreviewProvider"}],"format":"esm"},"src/components/index.ts":{"bytes":1457,"imports":[{"path":"src/components/Editor/index.ts","kind":"import-statement","original":"./Editor"},{"path":"src/components/EditorContent/index.ts","kind":"import-statement","original":"./EditorContent"},{"path":"src/components/EditorMenuProvider/index.ts","kind":"import-statement","original":"./EditorMenuProvider"},{"path":"src/components/EditorPreviewProvider/index.ts","kind":"import-statement","original":"./EditorPreviewProvider"},{"path":"src/components/EditorToolbar/index.ts","kind":"import-statement","original":"./EditorToolbar"}],"format":"esm"},"src/index.ts":{"bytes":805,"imports":[{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":100288},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["Editor","EditorContent","EditorMenuProvider","EditorPreviewProvider","EditorToolbar","createEditorController","createMenuGroup","filterMenuGroups","formattingCommands","getMenuItem","getNextMenuItem","getPreviousMenuItem","linkSlashCommands","popover","popoverRangeEffect","popoverStateField","translations","useEditorContext","useEditorMenu","useEditorPreview","useEditorToolbar","useTextEditor"],"entryPoint":"src/index.ts","inputs":{"src/translations.ts":{"bytesInOutput":1229},"src/components/Editor/Editor.tsx":{"bytesInOutput":3048},"src/components/EditorContent/controller.ts":{"bytesInOutput":665},"src/components/EditorContent/EditorContent.tsx":{"bytesInOutput":1898},"src/hooks/useTextEditor.ts":{"bytesInOutput":4228},"src/components/EditorMenuProvider/menu.ts":{"bytesInOutput":1066},"src/components/EditorMenuProvider/menu-presets.ts":{"bytesInOutput":3394},"src/components/EditorMenuProvider/popover.ts":{"bytesInOutput":6843},"src/components/EditorMenuProvider/EditorMenuProvider.tsx":{"bytesInOutput":5475},"src/components/EditorMenuProvider/useEditorMenu.ts":{"bytesInOutput":4354},"src/components/EditorToolbar/EditorToolbar.tsx":{"bytesInOutput":2035},"src/components/EditorToolbar/blocks.ts":{"bytesInOutput":1399},"src/components/EditorToolbar/formatting.ts":{"bytesInOutput":1335},"src/components/EditorToolbar/headings.ts":{"bytesInOutput":1416},"src/components/EditorToolbar/image.ts":{"bytesInOutput":265},"src/components/EditorToolbar/lists.ts":{"bytesInOutput":1167},"src/components/EditorToolbar/search.ts":{"bytesInOutput":334},"src/components/EditorToolbar/view-mode.ts":{"bytesInOutput":885},"src/components/EditorToolbar/index.ts":{"bytesInOutput":0},"src/components/EditorToolbar/useEditorToolbar.ts":{"bytesInOutput":208},"src/components/index.ts":{"bytesInOutput":0},"src/components/EditorPreviewProvider/EditorPreviewProvider.tsx":{"bytesInOutput":1900},"src/index.ts":{"bytesInOutput":0}},"bytes":44829}}}
1
+ {"inputs":{"src/components/EditorMenuProvider/menu.ts":{"bytes":6007,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorMenuProvider/popover.ts":{"bytes":30692,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorMenuProvider/menu-presets.ts":{"bytes":12618,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/components/EditorMenuProvider/popover.ts","kind":"import-statement","original":"./popover"}],"format":"esm"},"src/components/EditorMenuProvider/EditorMenuProvider.tsx":{"bytes":21044,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorMenuProvider/useEditorMenu.ts":{"bytes":19681,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/components/EditorMenuProvider/menu.ts","kind":"import-statement","original":"./menu"},{"path":"src/components/EditorMenuProvider/popover.ts","kind":"import-statement","original":"./popover"}],"format":"esm"},"src/components/EditorMenuProvider/index.ts":{"bytes":770,"imports":[{"path":"src/components/EditorMenuProvider/menu.ts","kind":"import-statement","original":"./menu"},{"path":"src/components/EditorMenuProvider/menu-presets.ts","kind":"import-statement","original":"./menu-presets"},{"path":"src/components/EditorMenuProvider/popover.ts","kind":"import-statement","original":"./popover"},{"path":"src/components/EditorMenuProvider/EditorMenuProvider.tsx","kind":"import-statement","original":"./EditorMenuProvider"},{"path":"src/components/EditorMenuProvider/useEditorMenu.ts","kind":"import-statement","original":"./useEditorMenu"}],"format":"esm"},"src/components/EditorToolbar/types.ts":{"bytes":576,"imports":[],"format":"esm"},"src/components/EditorToolbar/blocks.ts":{"bytes":6752,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/formatting.ts":{"bytes":6665,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/headings.ts":{"bytes":6383,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/image.ts":{"bytes":1815,"imports":[{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/lists.ts":{"bytes":5789,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/search.ts":{"bytes":2108,"imports":[{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/view-mode.ts":{"bytes":4664,"imports":[{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorToolbar/EditorToolbar.tsx":{"bytes":11936,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"src/components/EditorToolbar/blocks.ts","kind":"import-statement","original":"./blocks"},{"path":"src/components/EditorToolbar/formatting.ts","kind":"import-statement","original":"./formatting"},{"path":"src/components/EditorToolbar/headings.ts","kind":"import-statement","original":"./headings"},{"path":"src/components/EditorToolbar/image.ts","kind":"import-statement","original":"./image"},{"path":"src/components/EditorToolbar/lists.ts","kind":"import-statement","original":"./lists"},{"path":"src/components/EditorToolbar/search.ts","kind":"import-statement","original":"./search"},{"path":"src/components/EditorToolbar/view-mode.ts","kind":"import-statement","original":"./view-mode"}],"format":"esm"},"src/components/EditorToolbar/index.ts":{"bytes":474,"imports":[{"path":"src/components/EditorToolbar/types.ts","kind":"import-statement","original":"./types"},{"path":"src/components/EditorToolbar/EditorToolbar.tsx","kind":"import-statement","original":"./EditorToolbar"}],"format":"esm"},"src/hooks/useBasicMarkdownExtensions.ts":{"bytes":5093,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useTextEditor.ts":{"bytes":17291,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":523,"imports":[{"path":"src/hooks/useBasicMarkdownExtensions.ts","kind":"import-statement","original":"./useBasicMarkdownExtensions"},{"path":"src/hooks/useTextEditor.ts","kind":"import-statement","original":"./useTextEditor"}],"format":"esm"},"src/components/Editor/controller.ts":{"bytes":3429,"imports":[],"format":"esm"},"src/components/Editor/EditorView.tsx":{"bytes":11648,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/Editor/controller.ts","kind":"import-statement","original":"./controller"}],"format":"esm"},"src/components/Editor/Editor.tsx":{"bytes":15871,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/EditorMenuProvider/index.ts","kind":"import-statement","original":"../EditorMenuProvider"},{"path":"src/components/EditorToolbar/index.ts","kind":"import-statement","original":"../EditorToolbar"},{"path":"src/components/Editor/EditorView.tsx","kind":"import-statement","original":"./EditorView"}],"format":"esm"},"src/components/Editor/index.ts":{"bytes":370,"imports":[{"path":"src/components/Editor/Editor.tsx","kind":"import-statement","original":"./Editor"}],"format":"esm"},"src/components/EditorPreviewProvider/EditorPreviewProvider.tsx":{"bytes":8294,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/components/EditorPreviewProvider/index.ts":{"bytes":409,"imports":[{"path":"src/components/EditorPreviewProvider/EditorPreviewProvider.tsx","kind":"import-statement","original":"./EditorPreviewProvider"}],"format":"esm"},"src/components/index.ts":{"bytes":609,"imports":[{"path":"src/components/Editor/index.ts","kind":"import-statement","original":"./Editor"},{"path":"src/components/EditorMenuProvider/index.ts","kind":"import-statement","original":"./EditorMenuProvider"},{"path":"src/components/EditorPreviewProvider/index.ts","kind":"import-statement","original":"./EditorPreviewProvider"}],"format":"esm"},"src/extensions/assistant-extension.tsx":{"bytes":22246,"imports":[{"path":"@codemirror/lint","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/extensions/index.ts":{"bytes":403,"imports":[{"path":"src/extensions/assistant-extension.tsx","kind":"import-statement","original":"./assistant-extension"}],"format":"esm"},"src/index.ts":{"bytes":553,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"},"src/translations.ts":{"bytes":4235,"imports":[],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":108674},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@codemirror/lint","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["Editor","EditorMenuProvider","EditorPreviewProvider","assistant","createEditorController","createMenuGroup","filterMenuGroups","formattingCommands","getMenuItem","getNextMenuItem","getPreviousMenuItem","linkSlashCommands","popover","popoverRangeEffect","popoverStateField","useBasicMarkdownExtensions","useEditorContext","useEditorMenu","useEditorPreview","useTextEditor"],"entryPoint":"src/index.ts","inputs":{"src/components/Editor/Editor.tsx":{"bytesInOutput":3094},"src/components/EditorMenuProvider/menu.ts":{"bytesInOutput":1066},"src/components/EditorMenuProvider/menu-presets.ts":{"bytesInOutput":3394},"src/components/EditorMenuProvider/popover.ts":{"bytesInOutput":6791},"src/components/EditorMenuProvider/EditorMenuProvider.tsx":{"bytesInOutput":5316},"src/components/EditorMenuProvider/useEditorMenu.ts":{"bytesInOutput":4313},"src/components/EditorToolbar/EditorToolbar.tsx":{"bytesInOutput":2027},"src/components/EditorToolbar/blocks.ts":{"bytesInOutput":1447},"src/components/EditorToolbar/formatting.ts":{"bytesInOutput":1404},"src/components/EditorToolbar/headings.ts":{"bytesInOutput":1485},"src/components/EditorToolbar/image.ts":{"bytesInOutput":333},"src/components/EditorToolbar/lists.ts":{"bytesInOutput":1236},"src/components/EditorToolbar/search.ts":{"bytesInOutput":402},"src/components/EditorToolbar/view-mode.ts":{"bytesInOutput":954},"src/components/Editor/EditorView.tsx":{"bytesInOutput":2162},"src/hooks/useBasicMarkdownExtensions.ts":{"bytesInOutput":756},"src/hooks/useTextEditor.ts":{"bytesInOutput":4164},"src/components/Editor/controller.ts":{"bytesInOutput":665},"src/components/EditorPreviewProvider/EditorPreviewProvider.tsx":{"bytesInOutput":1900},"src/index.ts":{"bytesInOutput":0},"src/extensions/assistant-extension.tsx":{"bytesInOutput":5615}},"bytes":50165},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1972},"dist/lib/node-esm/translations.mjs":{"imports":[],"exports":["translationKey","translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":1229}},"bytes":1432}}}
@@ -0,0 +1,41 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/translations.ts
4
+ var translationKey = "@dxos/react-ui-editor";
5
+ var translations = [
6
+ {
7
+ "en-US": {
8
+ [translationKey]: {
9
+ "comment.label": "Create comment",
10
+ "image.label": "Insert image",
11
+ "search.label": "Search",
12
+ "block.label": "Block",
13
+ "block.blockquote.label": "Block quote",
14
+ "block.codeblock.label": "Code block",
15
+ "block.table.label": "Create table",
16
+ "formatting.label": "Formatting",
17
+ "formatting.strong.label": "Bold",
18
+ "formatting.emphasis.label": "Italics",
19
+ "formatting.strikethrough.label": "Strikethrough",
20
+ "formatting.code.label": "Code",
21
+ "formatting.link.label": "Link",
22
+ "list.bullet.label": "Bullet list",
23
+ "list.ordered.label": "Numbered list",
24
+ "list.task.label": "Task list",
25
+ "heading.label": "Heading level",
26
+ "heading-level.label_zero": "Paragraph",
27
+ "heading-level.label_one": "Heading level {{count}}",
28
+ "heading-level.label_other": "Heading level {{count}}",
29
+ "view-mode.label": "Editor view",
30
+ "view-mode.preview.label": "Markdown",
31
+ "view-mode.source.label": "Plain text",
32
+ "view-mode.readonly.label": "Read only"
33
+ }
34
+ }
35
+ }
36
+ ];
37
+ export {
38
+ translationKey,
39
+ translations
40
+ };
41
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-editor';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'comment.label': 'Create comment',\n 'image.label': 'Insert image',\n 'search.label': 'Search',\n\n 'block.label': 'Block',\n 'block.blockquote.label': 'Block quote',\n 'block.codeblock.label': 'Code block',\n 'block.table.label': 'Create table',\n\n 'formatting.label': 'Formatting',\n 'formatting.strong.label': 'Bold',\n 'formatting.emphasis.label': 'Italics',\n 'formatting.strikethrough.label': 'Strikethrough',\n 'formatting.code.label': 'Code',\n 'formatting.link.label': 'Link',\n\n 'list.bullet.label': 'Bullet list',\n 'list.ordered.label': 'Numbered list',\n 'list.task.label': 'Task list',\n\n 'heading.label': 'Heading level',\n 'heading-level.label_zero': 'Paragraph',\n 'heading-level.label_one': 'Heading level {{count}}',\n 'heading-level.label_other': 'Heading level {{count}}',\n\n 'view-mode.label': 'Editor view',\n 'view-mode.preview.label': 'Markdown',\n 'view-mode.source.label': 'Plain text',\n 'view-mode.readonly.label': 'Read only',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,iBAAiB;QACjB,eAAe;QACf,gBAAgB;QAEhB,eAAe;QACf,0BAA0B;QAC1B,yBAAyB;QACzB,qBAAqB;QAErB,oBAAoB;QACpB,2BAA2B;QAC3B,6BAA6B;QAC7B,kCAAkC;QAClC,yBAAyB;QACzB,yBAAyB;QAEzB,qBAAqB;QACrB,sBAAsB;QACtB,mBAAmB;QAEnB,iBAAiB;QACjB,4BAA4B;QAC5B,2BAA2B;QAC3B,6BAA6B;QAE7B,mBAAmB;QACnB,2BAA2B;QAC3B,0BAA0B;QAC1B,4BAA4B;MAC9B;IACF;EACF;;",
6
+ "names": ["translationKey", "translations"]
7
+ }
@@ -1,10 +1,10 @@
1
1
  import { type Extension } from '@codemirror/state';
2
- import { type Atom } from '@effect-atom/atom-react';
2
+ import { Atom } from '@effect-atom/atom-react';
3
3
  import React, { type PropsWithChildren } from 'react';
4
4
  import { type ThemedClassName } from '@dxos/react-ui';
5
- import { type EditorController, type EditorContentProps as NaturalEditorContentProps } from '../EditorContent';
6
- import { type UseEditorMenuProps } from '../EditorMenuProvider';
5
+ import { type EditorMenuProviderProps, type UseEditorMenuProps } from '../EditorMenuProvider';
7
6
  import { type EditorToolbarState, type EditorToolbarProps as NaturalEditorToolbarProps } from '../EditorToolbar';
7
+ import { type EditorController, type EditorViewProps as NaturalEditorContentProps, createEditorController } from './EditorView';
8
8
  type EditorContextValue = {
9
9
  controller?: EditorController;
10
10
  setController: (controller: EditorController) => void;
@@ -16,26 +16,43 @@ declare const useEditorContext: (consumerName: string) => EditorContextValue;
16
16
  * Access the editor context. Must be used within `Editor.Root`.
17
17
  */
18
18
  export { useEditorContext };
19
- type EditorRootProps = PropsWithChildren<Pick<EditorContextValue, 'extensions'> & Omit<UseEditorMenuProps, 'viewRef'> & Pick<EditorToolbarState, 'viewMode'>>;
20
- type EditorViewportProps = ThemedClassName<PropsWithChildren<{}>>;
21
- type EditorContentProps = Omit<NaturalEditorContentProps, 'ref'>;
19
+ type EditorRootProps = PropsWithChildren<Pick<EditorContextValue, 'extensions'> & Omit<UseEditorMenuProps, 'viewRef'> & Pick<EditorMenuProviderProps, 'numItems'> & {
20
+ viewMode?: EditorToolbarState['viewMode'];
21
+ }>;
22
+ type EditorContentProps = ThemedClassName<PropsWithChildren<{}>>;
23
+ declare function EditorContent({ classNames, children }: EditorContentProps): React.JSX.Element;
24
+ declare namespace EditorContent {
25
+ var displayName: string;
26
+ }
27
+ type EditorViewProps = Omit<NaturalEditorContentProps, 'ref'>;
28
+ declare function EditorView({ extensions: providedExtensions, ...props }: EditorViewProps): React.JSX.Element;
29
+ declare namespace EditorView {
30
+ var displayName: string;
31
+ }
22
32
  type EditorToolbarProps = Omit<NaturalEditorToolbarProps, 'getView' | 'state'>;
33
+ declare function EditorToolbar(props: EditorToolbarProps): React.JSX.Element;
34
+ declare namespace EditorToolbar {
35
+ var displayName: string;
36
+ }
23
37
  export declare const Editor: {
24
- Root: React.ForwardRefExoticComponent<Pick<EditorContextValue, "extensions"> & Omit<UseEditorMenuProps, "viewRef"> & Pick<EditorToolbarState, "viewMode"> & {
38
+ Root: React.ForwardRefExoticComponent<Pick<EditorContextValue, "extensions"> & Omit<UseEditorMenuProps, "viewRef"> & Pick<EditorMenuProviderProps, "numItems"> & {
39
+ viewMode?: EditorToolbarState['viewMode'];
40
+ } & {
25
41
  children?: React.ReactNode | undefined;
26
42
  } & React.RefAttributes<EditorController | null>>;
27
- Viewport: {
28
- ({ classNames, children }: EditorViewportProps): React.JSX.Element;
43
+ Toolbar: {
44
+ (props: EditorToolbarProps): React.JSX.Element;
29
45
  displayName: string;
30
46
  };
31
47
  Content: {
32
- ({ extensions: providedExtensions, ...props }: EditorContentProps): React.JSX.Element;
48
+ ({ classNames, children }: EditorContentProps): React.JSX.Element;
33
49
  displayName: string;
34
50
  };
35
- Toolbar: {
36
- (props: EditorToolbarProps): React.JSX.Element;
51
+ View: {
52
+ ({ extensions: providedExtensions, ...props }: EditorViewProps): React.JSX.Element;
37
53
  displayName: string;
38
54
  };
39
55
  };
40
- export type { EditorController, EditorRootProps, EditorViewportProps, EditorContentProps, EditorToolbarProps };
56
+ export type { EditorController, EditorRootProps, EditorContentProps, EditorViewProps, EditorToolbarProps, EditorToolbarState, };
57
+ export { createEditorController };
41
58
  //# sourceMappingURL=Editor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../../../src/components/Editor/Editor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAmE,MAAM,OAAO,CAAC;AAGvH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,IAAI,yBAAyB,EAErD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAsB,KAAK,kBAAkB,EAAiB,MAAM,uBAAuB,CAAC;AACnG,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,IAAI,yBAAyB,EAErD,MAAM,kBAAkB,CAAC;AAM1B,KAAK,kBAAkB,GAAG;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,aAAa,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACtD,UAAU,CAAC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,CAAC,UAAU,CAAC;;;;IAoH7C,OAAO;gBAlBqB,kBAAkB;;;IAmB9C,OAAO;mCAjEwC,kBAAkB;;;IAkEjE,IAAI;uDA5C4D,eAAe;;;CA6ChF,CAAC;AAEF,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { type Decorator, type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- import { type EditorContentProps } from './Editor';
3
+ import { type EditorViewProps } from './Editor';
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: {
7
- ({ extensions: providedExtensions, ...props }: EditorContentProps): React.JSX.Element;
7
+ ({ extensions: providedExtensions, ...props }: EditorViewProps): React.JSX.Element;
8
8
  displayName: string;
9
9
  };
10
- decorators: (Decorator<EditorContentProps> | Decorator)[];
10
+ decorators: (Decorator | Decorator<EditorViewProps>)[];
11
11
  parameters: {
12
12
  layout: string;
13
13
  };
@@ -16,7 +16,7 @@ declare const meta: {
16
16
  };
17
17
  };
18
18
  export default meta;
19
- type Story = StoryObj<EditorContentProps>;
19
+ type Story = StoryObj<EditorViewProps>;
20
20
  export declare const Default: Story;
21
21
  export declare const WithToolbar: Story;
22
22
  export declare const WithPopover: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Editor/Editor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiBvC,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA6B3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAU6B,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC"}
1
+ {"version":3,"file":"Editor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Editor/Editor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiBvC,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAwBxD,QAAA,MAAM,IAAI;;;;;;;;QAKN,MAAM;;;;;CAK0B,CAAC;eAEtB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
3
  import { type UseTextEditorProps } from '../../hooks';
4
- import { type EditorController } from './controller';
5
- export type EditorContentProps = ThemedClassName<{
4
+ import { type EditorController, createEditorController, noopController } from './controller';
5
+ export type EditorViewProps = ThemedClassName<{
6
6
  focusable?: boolean;
7
7
  value?: string;
8
8
  onChange?: (value: string) => void;
@@ -10,9 +10,8 @@ export type EditorContentProps = ThemedClassName<{
10
10
  /**
11
11
  * Minimal text editor.
12
12
  * NOTE: This shouold not be used with the automerge extension.
13
- * @deprecated Use Editor.Content
14
13
  */
15
- export declare const EditorContent: React.ForwardRefExoticComponent<Omit<{
14
+ export declare const EditorView: React.ForwardRefExoticComponent<Omit<{
16
15
  focusable?: boolean;
17
16
  value?: string;
18
17
  onChange?: (value: string) => void;
@@ -28,4 +27,5 @@ export declare const EditorContent: React.ForwardRefExoticComponent<Omit<{
28
27
  }, "className"> & {
29
28
  classNames?: import("@dxos/ui-types").ClassNameValue;
30
29
  } & React.RefAttributes<EditorController>>;
31
- //# sourceMappingURL=EditorContent.d.ts.map
30
+ export { type EditorController, createEditorController, noopController };
31
+ //# sourceMappingURL=EditorView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Editor/EditorView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,KAAK,gBAAgB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE7F,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,GAAG,kBAAkB,CACvB,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,UAAU;gBAXP,OAAO;YACX,MAAM;eACH,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;;;;;;;;;;;;0CAiFrC,CAAC;AAEF,OAAO,EAAE,KAAK,gBAAgB,EAAE,sBAAsB,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../../src/components/Editor/controller.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC;IAC9B,OAA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AAEF,eAAO,MAAM,eAAe,kCAKzB;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,KAAG,eAUF,CAAC;AAEH,eAAO,MAAM,gBAAgB,WACnB,eAAe,EAAE,UACjB,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,KACxC,eAAe,EAKjB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { type Extension, StateField } from '@codemirror/state';
2
2
  import { EditorView } from '@codemirror/view';
3
- import { type PlaceholderOptions, type Range } from '@dxos/ui-editor';
3
+ import { type PlaceholderOptions } from '@dxos/ui-editor';
4
+ import { type Range } from '@dxos/ui-editor/types';
4
5
  export type PopoverOptions = {
5
6
  trigger?: string | string[];
6
7
  triggerKey?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorMenuProvider/popover.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAsC,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAGL,UAAU,EAKX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,KAAK,EAAgC,MAAM,iBAAiB,CAAC;AAKpG,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAMtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAA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;YACZ,iBAAiB;aAChB,OAAO;EAGqG,CAAC;AAExH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CACpF,CAAC,CAAC;AAEH;;GAEG;AAEH,eAAO,MAAM,qBAAqB,GAAI,wBAAwB,0BAA0B,sBAiDvF,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"EditorPreviewProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorPreviewProvider/EditorPreviewProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA4D,MAAM,OAAO,CAAC;AAIhH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAQ9E,QAAA,MAAqC,gBAAgB;UAL7C,cAAc;YACZ,iBAAiB;aAChB,OAAO;EAGqG,CAAC;AAExH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CACpF,CAAC,CAAC;AAEH;;GAEG;AAEH,eAAO,MAAM,qBAAqB,2BAA4B,0BAA0B,sBAiDvF,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -4,8 +4,8 @@ import React from 'react';
4
4
  import { type Node } from '@dxos/app-graph';
5
5
  import { type ThemedClassName } from '@dxos/react-ui';
6
6
  import { type ActionGraphProps, type MenuAction } from '@dxos/react-ui-menu';
7
- import { type EditorViewMode } from '@dxos/ui-editor';
8
- import { type EditorToolbarState } from './useEditorToolbar';
7
+ import { type EditorViewMode } from '@dxos/ui-editor/types';
8
+ import { type EditorToolbarState } from './types';
9
9
  export type EditorToolbarFeatureFlags = Partial<{
10
10
  showHeadings: boolean;
11
11
  showFormatting: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/EditorToolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,KAAK,gBAAgB,EAAQ,KAAK,UAAU,EAA+B,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQtD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC;IAC9C,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IAGpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAClD,CAAC,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,UAAU,CAAC;IAE1B,aAAa,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAC9C;IACE,IAAI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AI,CAAC,kBAAkB,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,UAAU,CAAC;IAE1B,aAAa,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAC9C;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC;CACnE,GAAG,CAAC,6BAA6B,GAAG,yBAAyB,CAAC,CAChE,CAAC;AAEF,eAAO,MAAM,aAAa,qFAAiE,kBAAkB,uBAU3G,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
2
  import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
- import { type EditorToolbarState } from './useEditorToolbar';
3
+ import { type EditorToolbarState } from './types';
4
4
  /** Add block actions to the builder. */
5
5
  export declare const addBlocks: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
6
6
  //# sourceMappingURL=blocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/blocks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAIvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAQ7D,wCAAwC;AACxC,eAAO,MAAM,SAAS,GACnB,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU,KAAG,oBA6CvD,CAAC"}
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/blocks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAKvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQlD,wCAAwC;AACxC,eAAO,MAAM,SAAS,UACZ,kBAAkB,WAAW,MAAM,UAAU,KAAG,oBA6CvD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
2
  import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
- import { type EditorToolbarState } from './useEditorToolbar';
3
+ import { type EditorToolbarState } from './types';
4
4
  /** Add formatting actions to the builder. */
5
5
  export declare const addFormatting: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
6
6
  //# sourceMappingURL=formatting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/formatting.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAIvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAU7D,6CAA6C;AAC7C,eAAO,MAAM,aAAa,GACvB,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU,KAAG,oBAwCvD,CAAC"}
1
+ {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/formatting.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAKvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAUlD,6CAA6C;AAC7C,eAAO,MAAM,aAAa,UAChB,kBAAkB,WAAW,MAAM,UAAU,KAAG,oBAwCvD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
2
  import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
- import { type EditorToolbarState } from './useEditorToolbar';
3
+ import { type EditorToolbarState } from './types';
4
4
  /** Add heading actions to the builder. */
5
5
  export declare const addHeadings: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
6
6
  //# sourceMappingURL=headings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/headings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAIvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAkB7D,0CAA0C;AAC1C,eAAO,MAAM,WAAW,GACrB,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU,KAAG,oBA8BvD,CAAC"}
1
+ {"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/headings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAKvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkBlD,0CAA0C;AAC1C,eAAO,MAAM,WAAW,UACd,kBAAkB,WAAW,MAAM,UAAU,KAAG,oBA8BvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/image.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,8CAA8C;AAC9C,eAAO,MAAM,cAAc,GACxB,eAAe,MAAM,IAAI,KAAG,oBAW5B,CAAC"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/image.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,8CAA8C;AAC9C,eAAO,MAAM,cAAc,kBACT,MAAM,IAAI,KAAG,oBAW5B,CAAC"}
@@ -1,3 +1,3 @@
1
+ export * from './types';
1
2
  export * from './EditorToolbar';
2
- export { type EditorToolbarState, useEditorToolbar } from './useEditorToolbar';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,KAAK,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AAExB,cAAc,iBAAiB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
2
  import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
- import { type EditorToolbarState } from './useEditorToolbar';
3
+ import { type EditorToolbarState } from './types';
4
4
  /** Add list actions to the builder. */
5
5
  export declare const addLists: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
6
6
  //# sourceMappingURL=lists.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/lists.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAIvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAQ7D,uCAAuC;AACvC,eAAO,MAAM,QAAQ,GAClB,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU,KAAG,oBAoCvD,CAAC"}
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/lists.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AAKvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQlD,uCAAuC;AACvC,eAAO,MAAM,QAAQ,UACX,kBAAkB,WAAW,MAAM,UAAU,KAAG,oBAoCvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/search.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,wCAAwC;AACxC,eAAO,MAAM,SAAS,GACnB,SAAS,MAAM,UAAU,KAAG,oBAW5B,CAAC"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/search.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,wCAAwC;AACxC,eAAO,MAAM,SAAS,YACV,MAAM,UAAU,KAAG,oBAW5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Formatting } from '@dxos/ui-editor';
2
+ import { type EditorViewMode } from '@dxos/ui-editor/types';
3
+ export type EditorToolbarState = Formatting & {
4
+ viewMode?: EditorViewMode;
5
+ };
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
2
- import { type EditorViewMode } from '@dxos/ui-editor';
3
- import { type EditorToolbarState } from './useEditorToolbar';
2
+ import { type EditorViewMode } from '@dxos/ui-editor/types';
3
+ import { type EditorToolbarState } from './types';
4
4
  /** Add view mode actions to the builder. */
5
5
  export declare const addViewMode: (state: EditorToolbarState, onViewModeChange: (mode: EditorViewMode) => void) => ActionGroupBuilderFn;
6
6
  //# sourceMappingURL=view-mode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"view-mode.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/view-mode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AACvG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAQ7D,4CAA4C;AAC5C,eAAO,MAAM,WAAW,GACrB,OAAO,kBAAkB,EAAE,kBAAkB,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,KAAG,oBA6B9E,CAAC"}
1
+ {"version":3,"file":"view-mode.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/view-mode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAyC,MAAM,qBAAqB,CAAC;AACvG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQlD,4CAA4C;AAC5C,eAAO,MAAM,WAAW,UACd,kBAAkB,oBAAoB,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,KAAG,oBA6B9E,CAAC"}
@@ -1,6 +1,4 @@
1
1
  export * from './Editor';
2
- export { EditorContent, createEditorController } from './EditorContent';
3
2
  export * from './EditorMenuProvider';
4
3
  export * from './EditorPreviewProvider';
5
- export { EditorToolbar, type EditorToolbarProps, type EditorToolbarState, useEditorToolbar } from './EditorToolbar';
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAGzB,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACxE,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ import { type EditorViewProps } from '../components';
4
+ type DefaultStoryProps = Pick<EditorViewProps, 'value'>;
5
+ declare const DefaultStory: (props: DefaultStoryProps) => React.JSX.Element;
6
+ declare const meta: Meta<typeof DefaultStory>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ //# sourceMappingURL=Assistant.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Assistant.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/Assistant.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAsC7D,KAAK,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAExD,QAAA,MAAM,YAAY,UAAW,iBAAiB,sBAwB7C,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CASnC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type Extension } from '@codemirror/state';
2
+ export type AssistantOptions = {
3
+ /**
4
+ * Invoke the language model with the given prompt and return the raw text response.
5
+ */
6
+ generate: (request: {
7
+ instructions: string;
8
+ content: string;
9
+ }) => Promise<string>;
10
+ /**
11
+ * Instructions to use for the language model.
12
+ */
13
+ instructions?: string;
14
+ /**
15
+ * Show panel automatically.
16
+ */
17
+ autoPanel?: boolean;
18
+ /**
19
+ * Debounce delay.
20
+ */
21
+ delay?: number;
22
+ };
23
+ export declare const assistant: (options: AssistantOptions) => Extension[];
24
+ //# sourceMappingURL=assistant-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-extension.d.ts","sourceRoot":"","sources":["../../../../src/extensions/assistant-extension.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAa9D,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClF;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAYF,eAAO,MAAM,SAAS,YAAa,gBAAgB,KAAG,SAAS,EA4D9D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './assistant-extension';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC"}