@dxos/react-ui-editor 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a

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 (146) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +754 -731
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +39 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/node-esm/index.mjs +754 -731
  9. package/dist/lib/node-esm/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/meta.json +1 -1
  11. package/dist/lib/node-esm/translations.mjs +41 -0
  12. package/dist/lib/node-esm/translations.mjs.map +7 -0
  13. package/dist/types/src/components/Editor/Editor.d.ts +36 -25
  14. package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
  15. package/dist/types/src/components/Editor/Editor.stories.d.ts +4 -4
  16. package/dist/types/src/components/Editor/Editor.stories.d.ts.map +1 -1
  17. package/dist/types/src/components/{EditorContent/EditorContent.d.ts → Editor/EditorView.d.ts} +5 -5
  18. package/dist/types/src/components/Editor/EditorView.d.ts.map +1 -0
  19. package/dist/types/src/components/Editor/controller.d.ts.map +1 -0
  20. package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts +1 -3
  21. package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts.map +1 -1
  22. package/dist/types/src/components/EditorMenuProvider/menu-presets.d.ts.map +1 -1
  23. package/dist/types/src/components/EditorMenuProvider/menu.d.ts.map +1 -1
  24. package/dist/types/src/components/EditorMenuProvider/popover.d.ts +2 -1
  25. package/dist/types/src/components/EditorMenuProvider/popover.d.ts.map +1 -1
  26. package/dist/types/src/components/EditorMenuProvider/useEditorMenu.d.ts.map +1 -1
  27. package/dist/types/src/components/EditorPreviewProvider/EditorPreviewProvider.d.ts.map +1 -1
  28. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +2 -2
  29. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
  30. package/dist/types/src/components/EditorToolbar/blocks.d.ts +4 -19
  31. package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
  32. package/dist/types/src/components/EditorToolbar/formatting.d.ts +4 -19
  33. package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
  34. package/dist/types/src/components/EditorToolbar/headings.d.ts +4 -19
  35. package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
  36. package/dist/types/src/components/EditorToolbar/image.d.ts +3 -9
  37. package/dist/types/src/components/EditorToolbar/image.d.ts.map +1 -1
  38. package/dist/types/src/components/EditorToolbar/index.d.ts +1 -2
  39. package/dist/types/src/components/EditorToolbar/index.d.ts.map +1 -1
  40. package/dist/types/src/components/EditorToolbar/lists.d.ts +6 -0
  41. package/dist/types/src/components/EditorToolbar/lists.d.ts.map +1 -0
  42. package/dist/types/src/components/EditorToolbar/search.d.ts +3 -9
  43. package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -1
  44. package/dist/types/src/components/EditorToolbar/types.d.ts +6 -0
  45. package/dist/types/src/components/EditorToolbar/types.d.ts.map +1 -0
  46. package/dist/types/src/components/EditorToolbar/view-mode.d.ts +5 -20
  47. package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
  48. package/dist/types/src/components/index.d.ts +0 -2
  49. package/dist/types/src/components/index.d.ts.map +1 -1
  50. package/dist/types/src/extensions/Assistant.stories.d.ts +10 -0
  51. package/dist/types/src/extensions/Assistant.stories.d.ts.map +1 -0
  52. package/dist/types/src/extensions/assistant-extension.d.ts +24 -0
  53. package/dist/types/src/extensions/assistant-extension.d.ts.map +1 -0
  54. package/dist/types/src/extensions/index.d.ts +2 -0
  55. package/dist/types/src/extensions/index.d.ts.map +1 -0
  56. package/dist/types/src/hooks/index.d.ts +1 -0
  57. package/dist/types/src/hooks/index.d.ts.map +1 -1
  58. package/dist/types/src/hooks/useBasicMarkdownExtensions.d.ts +25 -0
  59. package/dist/types/src/hooks/useBasicMarkdownExtensions.d.ts.map +1 -0
  60. package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
  61. package/dist/types/src/index.d.ts +1 -2
  62. package/dist/types/src/index.d.ts.map +1 -1
  63. package/dist/types/src/stories/Automerge.stories.d.ts +24 -24
  64. package/dist/types/src/stories/Automerge.stories.d.ts.map +1 -1
  65. package/dist/types/src/stories/Comments.stories.d.ts +1 -1
  66. package/dist/types/src/stories/Comments.stories.d.ts.map +1 -1
  67. package/dist/types/src/stories/EditorToolbar.stories.d.ts +28 -26
  68. package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
  69. package/dist/types/src/stories/Experimental.stories.d.ts +2 -2
  70. package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -1
  71. package/dist/types/src/stories/Markdown.stories.d.ts +1 -1
  72. package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -1
  73. package/dist/types/src/stories/Outliner.stories.d.ts +2 -2
  74. package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
  75. package/dist/types/src/stories/Popover.stories.d.ts +2 -2
  76. package/dist/types/src/stories/Popover.stories.d.ts.map +1 -1
  77. package/dist/types/src/stories/Preview.stories.d.ts +1 -1
  78. package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
  79. package/dist/types/src/stories/Tags.stories.d.ts.map +1 -1
  80. package/dist/types/src/stories/TextEditor.stories.d.ts +1 -1
  81. package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
  82. package/dist/types/src/stories/Theme.stories.d.ts.map +1 -1
  83. package/dist/types/src/stories/components/EditorStory.d.ts +2 -2
  84. package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
  85. package/dist/types/src/stories/components/util.d.ts +2 -1
  86. package/dist/types/src/stories/components/util.d.ts.map +1 -1
  87. package/dist/types/src/translations.d.ts +24 -24
  88. package/dist/types/src/translations.d.ts.map +1 -1
  89. package/dist/types/src/util/react.d.ts +1 -1
  90. package/dist/types/src/util/react.d.ts.map +1 -1
  91. package/dist/types/tsconfig.tsbuildinfo +1 -1
  92. package/package.json +58 -49
  93. package/src/components/Editor/Editor.stories.tsx +15 -21
  94. package/src/components/Editor/Editor.tsx +54 -53
  95. package/src/components/Editor/EditorView.tsx +102 -0
  96. package/src/components/EditorMenuProvider/EditorMenuProvider.tsx +3 -5
  97. package/src/components/EditorMenuProvider/menu-presets.ts +1 -0
  98. package/src/components/EditorMenuProvider/popover.ts +3 -1
  99. package/src/components/EditorMenuProvider/useEditorMenu.ts +2 -1
  100. package/src/components/EditorPreviewProvider/EditorPreviewProvider.tsx +1 -1
  101. package/src/components/EditorToolbar/EditorToolbar.tsx +29 -48
  102. package/src/components/EditorToolbar/blocks.ts +54 -46
  103. package/src/components/EditorToolbar/formatting.ts +44 -45
  104. package/src/components/EditorToolbar/headings.ts +44 -50
  105. package/src/components/EditorToolbar/image.ts +16 -21
  106. package/src/components/EditorToolbar/index.ts +2 -3
  107. package/src/components/EditorToolbar/lists.ts +58 -0
  108. package/src/components/EditorToolbar/search.ts +16 -21
  109. package/src/components/EditorToolbar/types.ts +8 -0
  110. package/src/components/EditorToolbar/view-mode.ts +37 -43
  111. package/src/components/index.ts +0 -3
  112. package/src/extensions/Assistant.stories.tsx +112 -0
  113. package/src/extensions/assistant-extension.tsx +223 -0
  114. package/src/extensions/index.ts +5 -0
  115. package/src/hooks/index.ts +1 -0
  116. package/src/hooks/useBasicMarkdownExtensions.ts +55 -0
  117. package/src/index.ts +1 -4
  118. package/src/stories/Automerge.stories.tsx +14 -11
  119. package/src/stories/Comments.stories.tsx +2 -2
  120. package/src/stories/EditorToolbar.stories.tsx +36 -64
  121. package/src/stories/Experimental.stories.tsx +10 -10
  122. package/src/stories/Outliner.stories.tsx +3 -4
  123. package/src/stories/Popover.stories.tsx +6 -7
  124. package/src/stories/Preview.stories.tsx +6 -7
  125. package/src/stories/Theme.stories.tsx +2 -2
  126. package/src/stories/components/EditorStory.tsx +17 -8
  127. package/src/stories/components/util.tsx +38 -36
  128. package/src/translations.ts +29 -24
  129. package/src/util/react.tsx +1 -1
  130. package/dist/types/src/components/EditorContent/EditorContent.d.ts.map +0 -1
  131. package/dist/types/src/components/EditorContent/controller.d.ts.map +0 -1
  132. package/dist/types/src/components/EditorContent/index.d.ts +0 -3
  133. package/dist/types/src/components/EditorContent/index.d.ts.map +0 -1
  134. package/dist/types/src/components/EditorToolbar/actions.d.ts +0 -25
  135. package/dist/types/src/components/EditorToolbar/actions.d.ts.map +0 -1
  136. package/dist/types/src/components/EditorToolbar/useEditorToolbar.d.ts +0 -11
  137. package/dist/types/src/components/EditorToolbar/useEditorToolbar.d.ts.map +0 -1
  138. package/dist/types/src/stories/CommandDialog.stories.d.ts +0 -14
  139. package/dist/types/src/stories/CommandDialog.stories.d.ts.map +0 -1
  140. package/src/components/EditorContent/EditorContent.tsx +0 -83
  141. package/src/components/EditorContent/index.ts +0 -6
  142. package/src/components/EditorToolbar/actions.ts +0 -87
  143. package/src/components/EditorToolbar/useEditorToolbar.ts +0 -20
  144. package/src/stories/CommandDialog.stories.tsx +0 -81
  145. /package/dist/types/src/components/{EditorContent → Editor}/controller.d.ts +0 -0
  146. /package/src/components/{EditorContent → Editor}/controller.ts +0 -0
@@ -1 +1 @@
1
- {"inputs":{"src/translations.ts":{"bytes":4288,"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":12559,"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":21357,"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":19470,"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/actions.ts":{"bytes":9020,"imports":[{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/EditorToolbar/blocks.ts":{"bytes":7250,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"}],"format":"esm"},"src/components/EditorToolbar/formatting.ts":{"bytes":7571,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"}],"format":"esm"},"src/components/EditorToolbar/headings.ts":{"bytes":7823,"imports":[{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"}],"format":"esm"},"src/components/EditorToolbar/image.ts":{"bytes":2293,"imports":[{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"}],"format":"esm"},"src/components/EditorToolbar/search.ts":{"bytes":2551,"imports":[{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"}],"format":"esm"},"src/components/EditorToolbar/view-mode.ts":{"bytes":6156,"imports":[{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"}],"format":"esm"},"src/components/EditorToolbar/EditorToolbar.tsx":{"bytes":13166,"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/actions.ts","kind":"import-statement","original":"./actions"},{"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/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":1016,"imports":[{"path":"src/components/EditorToolbar/EditorToolbar.tsx","kind":"import-statement","original":"./EditorToolbar"},{"path":"src/components/EditorToolbar/actions.ts","kind":"import-statement","original":"./actions"},{"path":"src/components/EditorToolbar/useEditorToolbar.ts","kind":"import-statement","original":"./useEditorToolbar"}],"format":"esm"},"src/components/Editor/Editor.tsx":{"bytes":15666,"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":105393},"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/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","useEditorMenu","useEditorPreview","useEditorToolbar","useTextEditor"],"entryPoint":"src/index.ts","inputs":{"src/translations.ts":{"bytesInOutput":1225},"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":5489},"src/components/EditorMenuProvider/useEditorMenu.ts":{"bytesInOutput":4334},"src/components/EditorToolbar/EditorToolbar.tsx":{"bytesInOutput":2342},"src/components/EditorToolbar/actions.ts":{"bytesInOutput":1929},"src/components/EditorToolbar/blocks.ts":{"bytesInOutput":1578},"src/components/EditorToolbar/formatting.ts":{"bytesInOutput":1607},"src/components/EditorToolbar/headings.ts":{"bytesInOutput":1746},"src/components/EditorToolbar/image.ts":{"bytesInOutput":373},"src/components/EditorToolbar/search.ts":{"bytesInOutput":420},"src/components/EditorToolbar/view-mode.ts":{"bytesInOutput":1242},"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":47202}}}
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":30797,"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":20982,"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":11560,"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":15772,"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":8232,"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":22232,"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":108581},"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":3075},"src/components/EditorMenuProvider/menu.ts":{"bytesInOutput":1066},"src/components/EditorMenuProvider/menu-presets.ts":{"bytesInOutput":3394},"src/components/EditorMenuProvider/popover.ts":{"bytesInOutput":6814},"src/components/EditorMenuProvider/EditorMenuProvider.tsx":{"bytesInOutput":5298},"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":2138},"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":1882},"src/index.ts":{"bytesInOutput":0},"src/extensions/assistant-extension.tsx":{"bytesInOutput":5609}},"bytes":50103},"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,47 +1,58 @@
1
1
  import { type Extension } from '@codemirror/state';
2
+ import { Atom } from '@effect-atom/atom-react';
2
3
  import React, { type PropsWithChildren } from 'react';
3
4
  import { type ThemedClassName } from '@dxos/react-ui';
4
- import { type EditorController, type EditorContentProps as NaturalEditorContentProps } from '../EditorContent';
5
- import { type UseEditorMenuProps } from '../EditorMenuProvider';
5
+ import { type EditorMenuProviderProps, type UseEditorMenuProps } from '../EditorMenuProvider';
6
6
  import { type EditorToolbarState, type EditorToolbarProps as NaturalEditorToolbarProps } from '../EditorToolbar';
7
+ import { type EditorController, type EditorViewProps as NaturalEditorContentProps, createEditorController } from './EditorView';
7
8
  type EditorContextValue = {
8
9
  controller?: EditorController;
9
10
  setController: (controller: EditorController) => void;
10
11
  extensions?: Extension[];
11
- } & Pick<NaturalEditorToolbarProps, 'state'>;
12
- type EditorRootProps = PropsWithChildren<Pick<EditorContextValue, 'extensions'> & Omit<UseEditorMenuProps, 'viewRef'> & Pick<EditorToolbarState, 'viewMode'>>;
13
- type EditorViewportProps = ThemedClassName<PropsWithChildren<{}>>;
14
- type EditorContentProps = Omit<NaturalEditorContentProps, 'ref'>;
15
- type EditorToolbarProps = Omit<NaturalEditorToolbarProps, 'getView' | 'state'>;
12
+ state: Atom.Writable<EditorToolbarState>;
13
+ };
14
+ declare const useEditorContext: (consumerName: string) => EditorContextValue;
16
15
  /**
17
- * Compound editor component following the Radix UI pattern.
18
- *
19
- * @example
20
- * ```tsx
21
- * EditorMenuGroup.Root>
22
- * EditorMenuGroup.Toolbar />
23
- * EditorMenuGroup.Viewport>
24
- * EditorMenuGroup.Content extensions={[...]} />
25
- * </Editor.Viewport>
26
- * </Editor.Root>
27
- * ```
16
+ * Access the editor context. Must be used within `Editor.Root`.
28
17
  */
18
+ export { useEditorContext };
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
+ }
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
+ }
29
37
  export declare const Editor: {
30
- 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
+ } & {
31
41
  children?: React.ReactNode | undefined;
32
42
  } & React.RefAttributes<EditorController | null>>;
33
- Viewport: {
34
- ({ classNames, children }: EditorViewportProps): React.JSX.Element;
43
+ Toolbar: {
44
+ (props: EditorToolbarProps): React.JSX.Element;
35
45
  displayName: string;
36
46
  };
37
47
  Content: {
38
- ({ extensions: providedExtensions, ...props }: EditorContentProps): React.JSX.Element;
48
+ ({ classNames, children }: EditorContentProps): React.JSX.Element;
39
49
  displayName: string;
40
50
  };
41
- Toolbar: {
42
- (props: EditorToolbarProps): React.JSX.Element;
51
+ View: {
52
+ ({ extensions: providedExtensions, ...props }: EditorViewProps): React.JSX.Element;
43
53
  displayName: string;
44
54
  };
45
55
  };
46
- export type { EditorController, EditorRootProps, EditorViewportProps, EditorContentProps, };
56
+ export type { EditorController, EditorRootProps, EditorContentProps, EditorViewProps, EditorToolbarProps, EditorToolbarState, };
57
+ export { createEditorController };
47
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;AAEnD,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,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AU,CAAC;;;;IAgH7C,OAAO;gBAlBqB,kBAAkB;;;IAmB9C,OAAO;mCA7DwC,kBAAkB;;;IA8DjE,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;AAkBvC,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;;;;;;;;;;;;0CAgFrC,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,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,gBAO5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,SAAU,UAAU,GAAG,IAAI,KAAG,gBA2BhE,CAAC"}
@@ -26,9 +26,7 @@ export type EditorMenuProviderProps = PropsWithChildren<{
26
26
  }) => void;
27
27
  }>;
28
28
  /**
29
- * Implements the Popover and listens for the `dx-anchor-activate` event from the
30
- * `popover` extension's decoration.
31
- *
29
+ * Implements the Popover and listens for the `dx-anchor-activate` event from the `popover` extension's decoration.
32
30
  * NOTE: We don't use DropdownMenu because the command menu needs to manage focus explicitly.
33
31
  * I.e., focus must remain in the editor while displaying the menu (for type-ahead).
34
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"EditorMenuProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorMenuProvider/EditorMenuProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAA4C,MAAM,OAAO,CAAC;AAgB1G,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAA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I,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,cAAc,CAAA;KAAE,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;CAClD,CAAC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,kIAY5B,uBAAuB,sBA0FzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"menu-presets.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorMenuProvider/menu-presets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAG9C,eAAO,MAAM,kBAAkB,EAAE,eA6EhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAmC/B,CAAC"}
1
+ {"version":3,"file":"menu-presets.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorMenuProvider/menu-presets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAG9C,eAAO,MAAM,kBAAkB,EAAE,eA6EhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAoC/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorMenuProvider/menu.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,KAAK,EAAE,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,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9E,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,eAAe,EAAE,OAAO,MAAM,KAAG,cAAc,GAAG,SAErF,CAAC;AAEF,eAAO,MAAM,eAAe,WAAY,eAAe,EAAE,OAAO,MAAM,KAAG,cAIxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAY,eAAe,EAAE,OAAO,MAAM,KAAG,cAI5E,CAAC;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,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAClG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;IAGhD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD,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B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC;CACxE,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;IACxC,SAAS,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,uBAAuB,EAAE,aAAa,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEpH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,2DAMvB,kBAAkB,KAAG,aAgIvB,CAAC"}
@@ -1 +1 @@
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,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,g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CAAC;AAEF,eAAO,MAAM,aAAa,qFAAiE,kBAAkB,uBAU3G,CAAC"}
@@ -1,21 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
- import { type Node } from '@dxos/app-graph';
3
- import { type EditorToolbarState } from './useEditorToolbar';
4
- export declare const createBlocks: (state: EditorToolbarState, getView: () => EditorView) => {
5
- nodes: (Node.NodeArg<any, Record<string, any>> | Readonly<Omit<Readonly<{
6
- id: string;
7
- type: string;
8
- cacheable?: string[];
9
- properties: Readonly<import("@dxos/ui-types").MenuActionProperties>;
10
- data: Node.ActionData<never>;
11
- }>, "properties"> & {
12
- properties: Readonly<import("@dxos/ui-types").MenuActionProperties>;
13
- _actionContext?: Node.ActionContext;
14
- }>)[];
15
- edges: {
16
- source: string;
17
- target: string;
18
- relation: string;
19
- }[];
20
- };
2
+ import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
+ import { type EditorToolbarState } from './types';
4
+ /** Add block actions to the builder. */
5
+ export declare const addBlocks: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
21
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,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAoC7D,eAAO,MAAM,YAAY,GAAI,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU;;;;;;;;;;;;;;;;CAWhF,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,21 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
- import { type Node } from '@dxos/app-graph';
3
- import { type EditorToolbarState } from './useEditorToolbar';
4
- export declare const createFormatting: (state: EditorToolbarState, getView: () => EditorView) => {
5
- nodes: (Node.NodeArg<any, Record<string, any>> | Readonly<Omit<Readonly<{
6
- id: string;
7
- type: string;
8
- cacheable?: string[];
9
- properties: Readonly<import("@dxos/ui-types").MenuActionProperties>;
10
- data: Node.ActionData<never>;
11
- }>, "properties"> & {
12
- properties: Readonly<import("@dxos/ui-types").MenuActionProperties>;
13
- _actionContext?: Node.ActionContext;
14
- }>)[];
15
- edges: {
16
- source: string;
17
- target: string;
18
- relation: string;
19
- }[];
20
- };
2
+ import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
+ import { type EditorToolbarState } from './types';
4
+ /** Add formatting actions to the builder. */
5
+ export declare const addFormatting: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
21
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,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AA2C7D,eAAO,MAAM,gBAAgB,GAAI,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU;;;;;;;;;;;;;;;;CAUpF,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,21 +1,6 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
- import { type Node } from '@dxos/app-graph';
3
- import { type EditorToolbarState } from './useEditorToolbar';
4
- export declare const createHeadings: (state: EditorToolbarState, getView: () => EditorView) => {
5
- nodes: (Node.NodeArg<any, Record<string, any>> | Readonly<Omit<Readonly<{
6
- id: string;
7
- type: string;
8
- cacheable?: string[];
9
- properties: Readonly<import("@dxos/ui-types").MenuActionProperties>;
10
- data: Node.ActionData<never>;
11
- }>, "properties"> & {
12
- properties: Readonly<import("@dxos/ui-types").MenuActionProperties>;
13
- _actionContext?: Node.ActionContext;
14
- }>)[];
15
- edges: {
16
- source: string;
17
- target: string;
18
- relation: string;
19
- }[];
20
- };
2
+ import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
+ import { type EditorToolbarState } from './types';
4
+ /** Add heading actions to the builder. */
5
+ export declare const addHeadings: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
21
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,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AA2C7D,eAAO,MAAM,cAAc,GAAI,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU;;;;;;;;;;;;;;;;CAWlF,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,10 +1,4 @@
1
- import { type Node } from '@dxos/app-graph';
2
- export declare const createImageUpload: (onImageUpload: () => void) => {
3
- nodes: Node.NodeArg<any>[];
4
- edges: Array<{
5
- source: string;
6
- target: string;
7
- relation: "child";
8
- }>;
9
- };
1
+ import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
2
+ /** Add image upload action to the builder. */
3
+ export declare const addImageUpload: (onImageUpload: () => void) => ActionGroupBuilderFn;
10
4
  //# sourceMappingURL=image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/image.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAc5C,eAAO,MAAM,iBAAiB,GAC5B,eAAe,MAAM,IAAI,KACxB;IACD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAIpE,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,4 +1,3 @@
1
+ export * from './types';
1
2
  export * from './EditorToolbar';
2
- export { createEditorAction, createEditorActionGroup } from './actions';
3
- export { type EditorToolbarState, useEditorToolbar } from './useEditorToolbar';
4
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,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACxE,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"}
@@ -0,0 +1,6 @@
1
+ import { type EditorView } from '@codemirror/view';
2
+ import { type ActionGroupBuilderFn } from '@dxos/react-ui-menu';
3
+ import { type EditorToolbarState } from './types';
4
+ /** Add list actions to the builder. */
5
+ export declare const addLists: (state: EditorToolbarState, getView: () => EditorView) => ActionGroupBuilderFn;
6
+ //# sourceMappingURL=lists.d.ts.map
@@ -0,0 +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;AAKvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQlD,uCAAuC;AACvC,eAAO,MAAM,QAAQ,UACX,kBAAkB,WAAW,MAAM,UAAU,KAAG,oBAoCvD,CAAC"}