@dxos/react-ui-editor 0.8.4-main.5ea62a8 → 0.8.4-main.60689f5b1c

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 (414) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +1416 -7865
  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 +1416 -7864
  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 +54 -15
  14. package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
  15. package/dist/types/src/components/Editor/Editor.stories.d.ts +23 -0
  16. package/dist/types/src/components/Editor/Editor.stories.d.ts.map +1 -0
  17. package/dist/types/src/components/Editor/EditorView.d.ts +31 -0
  18. package/dist/types/src/components/Editor/EditorView.d.ts.map +1 -0
  19. package/dist/types/src/components/Editor/controller.d.ts +10 -0
  20. package/dist/types/src/components/Editor/controller.d.ts.map +1 -0
  21. package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts +34 -0
  22. package/dist/types/src/components/EditorMenuProvider/EditorMenuProvider.d.ts.map +1 -0
  23. package/dist/types/src/components/EditorMenuProvider/index.d.ts +6 -0
  24. package/dist/types/src/components/EditorMenuProvider/index.d.ts.map +1 -0
  25. package/dist/types/src/components/EditorMenuProvider/menu-presets.d.ts +4 -0
  26. package/dist/types/src/components/EditorMenuProvider/menu-presets.d.ts.map +1 -0
  27. package/dist/types/src/components/EditorMenuProvider/menu.d.ts +28 -0
  28. package/dist/types/src/components/EditorMenuProvider/menu.d.ts.map +1 -0
  29. package/dist/types/src/components/EditorMenuProvider/popover.d.ts +47 -0
  30. package/dist/types/src/components/EditorMenuProvider/popover.d.ts.map +1 -0
  31. package/dist/types/src/components/EditorMenuProvider/useEditorMenu.d.ts +34 -0
  32. package/dist/types/src/components/EditorMenuProvider/useEditorMenu.d.ts.map +1 -0
  33. package/dist/types/src/components/EditorPreviewProvider/EditorPreviewProvider.d.ts +16 -0
  34. package/dist/types/src/components/EditorPreviewProvider/EditorPreviewProvider.d.ts.map +1 -0
  35. package/dist/types/src/components/EditorPreviewProvider/index.d.ts +2 -0
  36. package/dist/types/src/components/EditorPreviewProvider/index.d.ts.map +1 -0
  37. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +28 -2
  38. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
  39. package/dist/types/src/components/EditorToolbar/blocks.d.ts +4 -17
  40. package/dist/types/src/components/EditorToolbar/blocks.d.ts.map +1 -1
  41. package/dist/types/src/components/EditorToolbar/formatting.d.ts +4 -17
  42. package/dist/types/src/components/EditorToolbar/formatting.d.ts.map +1 -1
  43. package/dist/types/src/components/EditorToolbar/headings.d.ts +4 -17
  44. package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
  45. package/dist/types/src/components/EditorToolbar/image.d.ts +3 -15
  46. package/dist/types/src/components/EditorToolbar/image.d.ts.map +1 -1
  47. package/dist/types/src/components/EditorToolbar/index.d.ts +1 -1
  48. package/dist/types/src/components/EditorToolbar/index.d.ts.map +1 -1
  49. package/dist/types/src/components/EditorToolbar/lists.d.ts +4 -17
  50. package/dist/types/src/components/EditorToolbar/lists.d.ts.map +1 -1
  51. package/dist/types/src/components/EditorToolbar/search.d.ts +3 -15
  52. package/dist/types/src/components/EditorToolbar/search.d.ts.map +1 -1
  53. package/dist/types/src/components/EditorToolbar/types.d.ts +6 -0
  54. package/dist/types/src/components/EditorToolbar/types.d.ts.map +1 -0
  55. package/dist/types/src/components/EditorToolbar/view-mode.d.ts +5 -18
  56. package/dist/types/src/components/EditorToolbar/view-mode.d.ts.map +1 -1
  57. package/dist/types/src/components/index.d.ts +2 -2
  58. package/dist/types/src/components/index.d.ts.map +1 -1
  59. package/dist/types/src/extensions/Assistant.stories.d.ts +10 -0
  60. package/dist/types/src/extensions/Assistant.stories.d.ts.map +1 -0
  61. package/dist/types/src/extensions/assistant-extension.d.ts +24 -0
  62. package/dist/types/src/extensions/assistant-extension.d.ts.map +1 -0
  63. package/dist/types/src/extensions/index.d.ts +1 -22
  64. package/dist/types/src/extensions/index.d.ts.map +1 -1
  65. package/dist/types/src/hooks/index.d.ts +1 -0
  66. package/dist/types/src/hooks/index.d.ts.map +1 -1
  67. package/dist/types/src/hooks/useBasicMarkdownExtensions.d.ts +25 -0
  68. package/dist/types/src/hooks/useBasicMarkdownExtensions.d.ts.map +1 -0
  69. package/dist/types/src/hooks/useTextEditor.d.ts +6 -10
  70. package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
  71. package/dist/types/src/index.d.ts +0 -9
  72. package/dist/types/src/index.d.ts.map +1 -1
  73. package/dist/types/src/stories/Automerge.stories.d.ts +44 -0
  74. package/dist/types/src/stories/Automerge.stories.d.ts.map +1 -0
  75. package/dist/types/src/stories/Comments.stories.d.ts +4 -4
  76. package/dist/types/src/stories/Comments.stories.d.ts.map +1 -1
  77. package/dist/types/src/stories/EditorToolbar.stories.d.ts +30 -29
  78. package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
  79. package/dist/types/src/stories/Experimental.stories.d.ts +5 -5
  80. package/dist/types/src/stories/Experimental.stories.d.ts.map +1 -1
  81. package/dist/types/src/stories/Markdown.stories.d.ts +4 -4
  82. package/dist/types/src/stories/Markdown.stories.d.ts.map +1 -1
  83. package/dist/types/src/stories/Outliner.stories.d.ts +2 -3
  84. package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
  85. package/dist/types/src/stories/{CommandMenu.stories.d.ts → Popover.stories.d.ts} +6 -6
  86. package/dist/types/src/stories/Popover.stories.d.ts.map +1 -0
  87. package/dist/types/src/stories/Preview.stories.d.ts +5 -4
  88. package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
  89. package/dist/types/src/stories/{Command.stories.d.ts → Tags.stories.d.ts} +4 -3
  90. package/dist/types/src/stories/Tags.stories.d.ts.map +1 -0
  91. package/dist/types/src/stories/TextEditor.stories.d.ts +4 -5
  92. package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
  93. package/dist/types/src/stories/Theme.stories.d.ts +8 -0
  94. package/dist/types/src/stories/Theme.stories.d.ts.map +1 -0
  95. package/dist/types/src/stories/components/EditorStory.d.ts +11 -20
  96. package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
  97. package/dist/types/src/stories/components/util.d.ts +4 -3
  98. package/dist/types/src/stories/components/util.d.ts.map +1 -1
  99. package/dist/types/src/translations.d.ts +26 -26
  100. package/dist/types/src/translations.d.ts.map +1 -1
  101. package/dist/types/src/util/index.d.ts +0 -4
  102. package/dist/types/src/util/index.d.ts.map +1 -1
  103. package/dist/types/src/util/react.d.ts +7 -6
  104. package/dist/types/src/util/react.d.ts.map +1 -1
  105. package/dist/types/tsconfig.tsbuildinfo +1 -1
  106. package/package.json +94 -84
  107. package/src/components/Editor/Editor.stories.tsx +89 -0
  108. package/src/components/Editor/Editor.tsx +171 -24
  109. package/src/components/Editor/EditorView.tsx +102 -0
  110. package/src/components/Editor/controller.ts +50 -0
  111. package/src/components/EditorMenuProvider/EditorMenuProvider.tsx +226 -0
  112. package/src/components/EditorMenuProvider/index.ts +10 -0
  113. package/src/components/EditorMenuProvider/menu-presets.ts +125 -0
  114. package/src/components/EditorMenuProvider/menu.ts +70 -0
  115. package/src/components/EditorMenuProvider/popover.ts +287 -0
  116. package/src/components/EditorMenuProvider/useEditorMenu.ts +180 -0
  117. package/src/components/EditorPreviewProvider/EditorPreviewProvider.tsx +79 -0
  118. package/src/components/EditorPreviewProvider/index.ts +5 -0
  119. package/src/components/EditorToolbar/EditorToolbar.tsx +90 -111
  120. package/src/components/EditorToolbar/blocks.ts +55 -47
  121. package/src/components/EditorToolbar/formatting.ts +44 -45
  122. package/src/components/EditorToolbar/headings.ts +47 -50
  123. package/src/components/EditorToolbar/image.ts +16 -14
  124. package/src/components/EditorToolbar/index.ts +2 -7
  125. package/src/components/EditorToolbar/lists.ts +42 -40
  126. package/src/components/EditorToolbar/search.ts +16 -14
  127. package/src/components/EditorToolbar/types.ts +8 -0
  128. package/src/components/EditorToolbar/view-mode.ts +37 -42
  129. package/src/components/index.ts +3 -2
  130. package/src/extensions/Assistant.stories.tsx +112 -0
  131. package/src/extensions/assistant-extension.tsx +223 -0
  132. package/src/extensions/index.ts +2 -23
  133. package/src/hooks/index.ts +1 -0
  134. package/src/hooks/useBasicMarkdownExtensions.ts +55 -0
  135. package/src/hooks/useTextEditor.ts +39 -45
  136. package/src/index.ts +0 -13
  137. package/src/stories/Automerge.stories.tsx +177 -0
  138. package/src/stories/Comments.stories.tsx +52 -48
  139. package/src/stories/EditorToolbar.stories.tsx +46 -58
  140. package/src/stories/Experimental.stories.tsx +17 -19
  141. package/src/stories/Markdown.stories.tsx +19 -19
  142. package/src/stories/Outliner.stories.tsx +45 -39
  143. package/src/stories/Popover.stories.tsx +157 -0
  144. package/src/stories/Preview.stories.tsx +105 -88
  145. package/src/stories/Tags.stories.tsx +104 -0
  146. package/src/stories/TextEditor.stories.tsx +20 -49
  147. package/src/stories/Theme.stories.tsx +61 -0
  148. package/src/stories/components/EditorStory.tsx +47 -31
  149. package/src/stories/components/util.tsx +90 -59
  150. package/src/translations.ts +30 -25
  151. package/src/util/index.ts +1 -5
  152. package/src/util/react.tsx +9 -14
  153. package/dist/lib/browser/chunk-22UMM3QJ.mjs +0 -22
  154. package/dist/lib/browser/chunk-22UMM3QJ.mjs.map +0 -7
  155. package/dist/lib/browser/testing/index.mjs +0 -6
  156. package/dist/lib/browser/testing/index.mjs.map +0 -7
  157. package/dist/lib/browser/types/index.mjs +0 -13
  158. package/dist/lib/browser/types/index.mjs.map +0 -7
  159. package/dist/lib/node-esm/chunk-YXYQPV6R.mjs +0 -24
  160. package/dist/lib/node-esm/chunk-YXYQPV6R.mjs.map +0 -7
  161. package/dist/lib/node-esm/testing/index.mjs +0 -8
  162. package/dist/lib/node-esm/testing/index.mjs.map +0 -7
  163. package/dist/lib/node-esm/types/index.mjs +0 -14
  164. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  165. package/dist/types/src/components/EditorToolbar/util.d.ts +0 -51
  166. package/dist/types/src/components/EditorToolbar/util.d.ts.map +0 -1
  167. package/dist/types/src/components/Popover/CommandMenu.d.ts +0 -34
  168. package/dist/types/src/components/Popover/CommandMenu.d.ts.map +0 -1
  169. package/dist/types/src/components/Popover/RefDropdownMenu.d.ts +0 -21
  170. package/dist/types/src/components/Popover/RefDropdownMenu.d.ts.map +0 -1
  171. package/dist/types/src/components/Popover/RefPopover.d.ts +0 -34
  172. package/dist/types/src/components/Popover/RefPopover.d.ts.map +0 -1
  173. package/dist/types/src/components/Popover/index.d.ts +0 -4
  174. package/dist/types/src/components/Popover/index.d.ts.map +0 -1
  175. package/dist/types/src/defaults.d.ts +0 -14
  176. package/dist/types/src/defaults.d.ts.map +0 -1
  177. package/dist/types/src/extensions/annotations.d.ts +0 -9
  178. package/dist/types/src/extensions/annotations.d.ts.map +0 -1
  179. package/dist/types/src/extensions/autocomplete.d.ts +0 -13
  180. package/dist/types/src/extensions/autocomplete.d.ts.map +0 -1
  181. package/dist/types/src/extensions/automerge/automerge.d.ts +0 -4
  182. package/dist/types/src/extensions/automerge/automerge.d.ts.map +0 -1
  183. package/dist/types/src/extensions/automerge/automerge.stories.d.ts +0 -47
  184. package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +0 -1
  185. package/dist/types/src/extensions/automerge/automerge.test.d.ts +0 -2
  186. package/dist/types/src/extensions/automerge/automerge.test.d.ts.map +0 -1
  187. package/dist/types/src/extensions/automerge/cursor.d.ts +0 -4
  188. package/dist/types/src/extensions/automerge/cursor.d.ts.map +0 -1
  189. package/dist/types/src/extensions/automerge/defs.d.ts +0 -17
  190. package/dist/types/src/extensions/automerge/defs.d.ts.map +0 -1
  191. package/dist/types/src/extensions/automerge/index.d.ts +0 -2
  192. package/dist/types/src/extensions/automerge/index.d.ts.map +0 -1
  193. package/dist/types/src/extensions/automerge/sync.d.ts +0 -17
  194. package/dist/types/src/extensions/automerge/sync.d.ts.map +0 -1
  195. package/dist/types/src/extensions/automerge/update-automerge.d.ts +0 -6
  196. package/dist/types/src/extensions/automerge/update-automerge.d.ts.map +0 -1
  197. package/dist/types/src/extensions/automerge/update-codemirror.d.ts +0 -5
  198. package/dist/types/src/extensions/automerge/update-codemirror.d.ts.map +0 -1
  199. package/dist/types/src/extensions/awareness/awareness-provider.d.ts +0 -31
  200. package/dist/types/src/extensions/awareness/awareness-provider.d.ts.map +0 -1
  201. package/dist/types/src/extensions/awareness/awareness.d.ts +0 -46
  202. package/dist/types/src/extensions/awareness/awareness.d.ts.map +0 -1
  203. package/dist/types/src/extensions/awareness/index.d.ts +0 -3
  204. package/dist/types/src/extensions/awareness/index.d.ts.map +0 -1
  205. package/dist/types/src/extensions/blast.d.ts +0 -25
  206. package/dist/types/src/extensions/blast.d.ts.map +0 -1
  207. package/dist/types/src/extensions/command/action.d.ts +0 -17
  208. package/dist/types/src/extensions/command/action.d.ts.map +0 -1
  209. package/dist/types/src/extensions/command/command-menu.d.ts +0 -20
  210. package/dist/types/src/extensions/command/command-menu.d.ts.map +0 -1
  211. package/dist/types/src/extensions/command/command.d.ts +0 -6
  212. package/dist/types/src/extensions/command/command.d.ts.map +0 -1
  213. package/dist/types/src/extensions/command/floating-menu.d.ts +0 -7
  214. package/dist/types/src/extensions/command/floating-menu.d.ts.map +0 -1
  215. package/dist/types/src/extensions/command/hint.d.ts +0 -24
  216. package/dist/types/src/extensions/command/hint.d.ts.map +0 -1
  217. package/dist/types/src/extensions/command/index.d.ts +0 -7
  218. package/dist/types/src/extensions/command/index.d.ts.map +0 -1
  219. package/dist/types/src/extensions/command/placeholder.d.ts +0 -10
  220. package/dist/types/src/extensions/command/placeholder.d.ts.map +0 -1
  221. package/dist/types/src/extensions/command/state.d.ts +0 -16
  222. package/dist/types/src/extensions/command/state.d.ts.map +0 -1
  223. package/dist/types/src/extensions/command/typeahead.d.ts +0 -22
  224. package/dist/types/src/extensions/command/typeahead.d.ts.map +0 -1
  225. package/dist/types/src/extensions/command/useCommandMenu.d.ts +0 -26
  226. package/dist/types/src/extensions/command/useCommandMenu.d.ts.map +0 -1
  227. package/dist/types/src/extensions/comments.d.ts +0 -95
  228. package/dist/types/src/extensions/comments.d.ts.map +0 -1
  229. package/dist/types/src/extensions/debug.d.ts +0 -3
  230. package/dist/types/src/extensions/debug.d.ts.map +0 -1
  231. package/dist/types/src/extensions/dnd.d.ts +0 -9
  232. package/dist/types/src/extensions/dnd.d.ts.map +0 -1
  233. package/dist/types/src/extensions/factories.d.ts +0 -83
  234. package/dist/types/src/extensions/factories.d.ts.map +0 -1
  235. package/dist/types/src/extensions/focus.d.ts +0 -7
  236. package/dist/types/src/extensions/focus.d.ts.map +0 -1
  237. package/dist/types/src/extensions/folding.d.ts +0 -7
  238. package/dist/types/src/extensions/folding.d.ts.map +0 -1
  239. package/dist/types/src/extensions/hashtag.d.ts +0 -3
  240. package/dist/types/src/extensions/hashtag.d.ts.map +0 -1
  241. package/dist/types/src/extensions/json.d.ts +0 -7
  242. package/dist/types/src/extensions/json.d.ts.map +0 -1
  243. package/dist/types/src/extensions/listener.d.ts +0 -11
  244. package/dist/types/src/extensions/listener.d.ts.map +0 -1
  245. package/dist/types/src/extensions/markdown/action.d.ts +0 -12
  246. package/dist/types/src/extensions/markdown/action.d.ts.map +0 -1
  247. package/dist/types/src/extensions/markdown/bundle.d.ts +0 -18
  248. package/dist/types/src/extensions/markdown/bundle.d.ts.map +0 -1
  249. package/dist/types/src/extensions/markdown/changes.d.ts +0 -10
  250. package/dist/types/src/extensions/markdown/changes.d.ts.map +0 -1
  251. package/dist/types/src/extensions/markdown/changes.test.d.ts +0 -2
  252. package/dist/types/src/extensions/markdown/changes.test.d.ts.map +0 -1
  253. package/dist/types/src/extensions/markdown/debug.d.ts +0 -11
  254. package/dist/types/src/extensions/markdown/debug.d.ts.map +0 -1
  255. package/dist/types/src/extensions/markdown/decorate.d.ts +0 -17
  256. package/dist/types/src/extensions/markdown/decorate.d.ts.map +0 -1
  257. package/dist/types/src/extensions/markdown/formatting.d.ts +0 -63
  258. package/dist/types/src/extensions/markdown/formatting.d.ts.map +0 -1
  259. package/dist/types/src/extensions/markdown/formatting.test.d.ts +0 -3
  260. package/dist/types/src/extensions/markdown/formatting.test.d.ts.map +0 -1
  261. package/dist/types/src/extensions/markdown/highlight.d.ts +0 -37
  262. package/dist/types/src/extensions/markdown/highlight.d.ts.map +0 -1
  263. package/dist/types/src/extensions/markdown/image.d.ts +0 -7
  264. package/dist/types/src/extensions/markdown/image.d.ts.map +0 -1
  265. package/dist/types/src/extensions/markdown/index.d.ts +0 -10
  266. package/dist/types/src/extensions/markdown/index.d.ts.map +0 -1
  267. package/dist/types/src/extensions/markdown/link.d.ts +0 -7
  268. package/dist/types/src/extensions/markdown/link.d.ts.map +0 -1
  269. package/dist/types/src/extensions/markdown/parser.test.d.ts +0 -2
  270. package/dist/types/src/extensions/markdown/parser.test.d.ts.map +0 -1
  271. package/dist/types/src/extensions/markdown/styles.d.ts +0 -4
  272. package/dist/types/src/extensions/markdown/styles.d.ts.map +0 -1
  273. package/dist/types/src/extensions/markdown/table.d.ts +0 -8
  274. package/dist/types/src/extensions/markdown/table.d.ts.map +0 -1
  275. package/dist/types/src/extensions/mention.d.ts +0 -7
  276. package/dist/types/src/extensions/mention.d.ts.map +0 -1
  277. package/dist/types/src/extensions/modes.d.ts +0 -10
  278. package/dist/types/src/extensions/modes.d.ts.map +0 -1
  279. package/dist/types/src/extensions/outliner/commands.d.ts +0 -10
  280. package/dist/types/src/extensions/outliner/commands.d.ts.map +0 -1
  281. package/dist/types/src/extensions/outliner/editor.d.ts +0 -5
  282. package/dist/types/src/extensions/outliner/editor.d.ts.map +0 -1
  283. package/dist/types/src/extensions/outliner/editor.test.d.ts +0 -2
  284. package/dist/types/src/extensions/outliner/editor.test.d.ts.map +0 -1
  285. package/dist/types/src/extensions/outliner/index.d.ts +0 -4
  286. package/dist/types/src/extensions/outliner/index.d.ts.map +0 -1
  287. package/dist/types/src/extensions/outliner/outliner.d.ts +0 -11
  288. package/dist/types/src/extensions/outliner/outliner.d.ts.map +0 -1
  289. package/dist/types/src/extensions/outliner/outliner.test.d.ts +0 -2
  290. package/dist/types/src/extensions/outliner/outliner.test.d.ts.map +0 -1
  291. package/dist/types/src/extensions/outliner/selection.d.ts +0 -12
  292. package/dist/types/src/extensions/outliner/selection.d.ts.map +0 -1
  293. package/dist/types/src/extensions/outliner/tree.d.ts +0 -79
  294. package/dist/types/src/extensions/outliner/tree.d.ts.map +0 -1
  295. package/dist/types/src/extensions/outliner/tree.test.d.ts +0 -2
  296. package/dist/types/src/extensions/outliner/tree.test.d.ts.map +0 -1
  297. package/dist/types/src/extensions/preview/index.d.ts +0 -2
  298. package/dist/types/src/extensions/preview/index.d.ts.map +0 -1
  299. package/dist/types/src/extensions/preview/preview.d.ts +0 -32
  300. package/dist/types/src/extensions/preview/preview.d.ts.map +0 -1
  301. package/dist/types/src/extensions/selection.d.ts +0 -24
  302. package/dist/types/src/extensions/selection.d.ts.map +0 -1
  303. package/dist/types/src/extensions/typewriter.d.ts +0 -10
  304. package/dist/types/src/extensions/typewriter.d.ts.map +0 -1
  305. package/dist/types/src/stories/Command.stories.d.ts.map +0 -1
  306. package/dist/types/src/stories/CommandMenu.stories.d.ts.map +0 -1
  307. package/dist/types/src/styles/index.d.ts +0 -4
  308. package/dist/types/src/styles/index.d.ts.map +0 -1
  309. package/dist/types/src/styles/markdown.d.ts +0 -8
  310. package/dist/types/src/styles/markdown.d.ts.map +0 -1
  311. package/dist/types/src/styles/theme.d.ts +0 -38
  312. package/dist/types/src/styles/theme.d.ts.map +0 -1
  313. package/dist/types/src/styles/tokens.d.ts +0 -3
  314. package/dist/types/src/styles/tokens.d.ts.map +0 -1
  315. package/dist/types/src/testing/index.d.ts +0 -2
  316. package/dist/types/src/testing/index.d.ts.map +0 -1
  317. package/dist/types/src/testing/util.d.ts +0 -3
  318. package/dist/types/src/testing/util.d.ts.map +0 -1
  319. package/dist/types/src/types/index.d.ts +0 -2
  320. package/dist/types/src/types/index.d.ts.map +0 -1
  321. package/dist/types/src/types/types.d.ts +0 -21
  322. package/dist/types/src/types/types.d.ts.map +0 -1
  323. package/dist/types/src/util/cursor.d.ts +0 -31
  324. package/dist/types/src/util/cursor.d.ts.map +0 -1
  325. package/dist/types/src/util/debug.d.ts +0 -17
  326. package/dist/types/src/util/debug.d.ts.map +0 -1
  327. package/dist/types/src/util/dom.d.ts +0 -20
  328. package/dist/types/src/util/dom.d.ts.map +0 -1
  329. package/dist/types/src/util/facet.d.ts +0 -3
  330. package/dist/types/src/util/facet.d.ts.map +0 -1
  331. package/src/components/EditorToolbar/util.ts +0 -76
  332. package/src/components/Popover/CommandMenu.tsx +0 -279
  333. package/src/components/Popover/RefDropdownMenu.tsx +0 -85
  334. package/src/components/Popover/RefPopover.tsx +0 -99
  335. package/src/components/Popover/index.ts +0 -7
  336. package/src/defaults.ts +0 -52
  337. package/src/extensions/annotations.ts +0 -55
  338. package/src/extensions/autocomplete.ts +0 -69
  339. package/src/extensions/automerge/automerge.stories.tsx +0 -149
  340. package/src/extensions/automerge/automerge.test.tsx +0 -78
  341. package/src/extensions/automerge/automerge.ts +0 -86
  342. package/src/extensions/automerge/cursor.ts +0 -28
  343. package/src/extensions/automerge/defs.ts +0 -31
  344. package/src/extensions/automerge/index.ts +0 -5
  345. package/src/extensions/automerge/sync.ts +0 -75
  346. package/src/extensions/automerge/update-automerge.ts +0 -50
  347. package/src/extensions/automerge/update-codemirror.ts +0 -115
  348. package/src/extensions/awareness/awareness-provider.ts +0 -127
  349. package/src/extensions/awareness/awareness.ts +0 -315
  350. package/src/extensions/awareness/index.ts +0 -6
  351. package/src/extensions/blast.ts +0 -363
  352. package/src/extensions/command/action.ts +0 -56
  353. package/src/extensions/command/command-menu.ts +0 -211
  354. package/src/extensions/command/command.ts +0 -34
  355. package/src/extensions/command/floating-menu.ts +0 -133
  356. package/src/extensions/command/hint.ts +0 -103
  357. package/src/extensions/command/index.ts +0 -10
  358. package/src/extensions/command/placeholder.ts +0 -113
  359. package/src/extensions/command/state.ts +0 -90
  360. package/src/extensions/command/typeahead.ts +0 -129
  361. package/src/extensions/command/useCommandMenu.ts +0 -119
  362. package/src/extensions/comments.ts +0 -593
  363. package/src/extensions/debug.ts +0 -15
  364. package/src/extensions/dnd.ts +0 -37
  365. package/src/extensions/factories.ts +0 -260
  366. package/src/extensions/focus.ts +0 -35
  367. package/src/extensions/folding.tsx +0 -46
  368. package/src/extensions/hashtag.tsx +0 -68
  369. package/src/extensions/json.ts +0 -57
  370. package/src/extensions/listener.ts +0 -38
  371. package/src/extensions/markdown/action.ts +0 -117
  372. package/src/extensions/markdown/bundle.ts +0 -74
  373. package/src/extensions/markdown/changes.test.ts +0 -26
  374. package/src/extensions/markdown/changes.ts +0 -149
  375. package/src/extensions/markdown/debug.ts +0 -44
  376. package/src/extensions/markdown/decorate.ts +0 -592
  377. package/src/extensions/markdown/formatting.test.ts +0 -498
  378. package/src/extensions/markdown/formatting.ts +0 -1267
  379. package/src/extensions/markdown/highlight.ts +0 -183
  380. package/src/extensions/markdown/image.ts +0 -119
  381. package/src/extensions/markdown/index.ts +0 -13
  382. package/src/extensions/markdown/link.ts +0 -47
  383. package/src/extensions/markdown/parser.test.ts +0 -75
  384. package/src/extensions/markdown/styles.ts +0 -135
  385. package/src/extensions/markdown/table.ts +0 -144
  386. package/src/extensions/mention.ts +0 -41
  387. package/src/extensions/modes.ts +0 -41
  388. package/src/extensions/outliner/commands.ts +0 -270
  389. package/src/extensions/outliner/editor.test.ts +0 -33
  390. package/src/extensions/outliner/editor.ts +0 -184
  391. package/src/extensions/outliner/index.ts +0 -7
  392. package/src/extensions/outliner/outliner.test.ts +0 -100
  393. package/src/extensions/outliner/outliner.ts +0 -167
  394. package/src/extensions/outliner/selection.ts +0 -50
  395. package/src/extensions/outliner/tree.test.ts +0 -168
  396. package/src/extensions/outliner/tree.ts +0 -317
  397. package/src/extensions/preview/index.ts +0 -5
  398. package/src/extensions/preview/preview.ts +0 -193
  399. package/src/extensions/selection.ts +0 -100
  400. package/src/extensions/typewriter.ts +0 -68
  401. package/src/stories/Command.stories.tsx +0 -101
  402. package/src/stories/CommandMenu.stories.tsx +0 -161
  403. package/src/styles/index.ts +0 -7
  404. package/src/styles/markdown.ts +0 -26
  405. package/src/styles/theme.ts +0 -267
  406. package/src/styles/tokens.ts +0 -17
  407. package/src/testing/index.ts +0 -5
  408. package/src/testing/util.ts +0 -7
  409. package/src/types/index.ts +0 -5
  410. package/src/types/types.ts +0 -32
  411. package/src/util/cursor.ts +0 -56
  412. package/src/util/debug.ts +0 -64
  413. package/src/util/dom.ts +0 -56
  414. package/src/util/facet.ts +0 -13
@@ -1,37 +0,0 @@
1
- import { HighlightStyle } from '@codemirror/language';
2
- import { Tag } from '@lezer/highlight';
3
- import { type MarkdownConfig } from '@lezer/markdown';
4
- /**
5
- * Custom tags defined and processed by the GFM lezer extension.
6
- * https://github.com/lezer-parser/markdown
7
- * https://github.com/lezer-parser/markdown/blob/main/src/markdown.ts
8
- */
9
- export declare const markdownTags: {
10
- Blockquote: Tag;
11
- CodeMark: Tag;
12
- CodeText: Tag;
13
- EmphasisMark: Tag;
14
- HeaderMark: Tag;
15
- InlineCode: Tag;
16
- LinkLabel: Tag;
17
- LinkReference: Tag;
18
- ListMark: Tag;
19
- QuoteMark: Tag;
20
- URL: Tag;
21
- TableCell: Tag;
22
- };
23
- export declare const markdownTagsExtensions: MarkdownConfig[];
24
- export type HighlightOptions = {};
25
- /**
26
- * Styling based on `lezer` parser tags.
27
- * https://codemirror.net/examples/styling
28
- * https://github.com/lezer-parser/highlight
29
- * https://github.com/lezer-parser/highlight/blob/main/src/highlight.ts#L427
30
- * https://lezer.codemirror.net/docs/ref/#highlight.tags (list of tags)
31
- *
32
- * Examples:
33
- * - https://github.com/codemirror/language/blob/main/src/highlight.ts#L194
34
- * - https://github.com/codemirror/theme-one-dark/blob/main/src/one-dark.ts#L115
35
- */
36
- export declare const markdownHighlightStyle: (_options?: HighlightOptions) => HighlightStyle;
37
- //# sourceMappingURL=highlight.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/highlight.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAmB,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAS,MAAM,iBAAiB,CAAC;AAI7D;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAexB,CAAC;AAaF,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAKlD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,WAAU,gBAAqB,mBAsHrE,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- export type ImageOptions = {};
3
- /**
4
- * Create image decorations.
5
- */
6
- export declare const image: (_options?: ImageOptions) => Extension;
7
- //# sourceMappingURL=image.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/image.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,SAAS,EAA4C,MAAM,mBAAmB,CAAC;AAK/G,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,WAAU,YAAiB,KAAG,SAoCnD,CAAC"}
@@ -1,10 +0,0 @@
1
- export * from './action';
2
- export * from './bundle';
3
- export * from './debug';
4
- export * from './decorate';
5
- export * from './formatting';
6
- export * from './highlight';
7
- export * from './image';
8
- export * from './link';
9
- export * from './table';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type RenderCallback } from '../../types';
2
- export declare const linkTooltip: (renderTooltip: RenderCallback<{
3
- url: string;
4
- }>) => import("@codemirror/state").Extension & {
5
- active: import("@codemirror/state").StateField<readonly import("@codemirror/view").Tooltip[]>;
6
- };
7
- //# sourceMappingURL=link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/link.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,WAAW,GAAI,eAAe,cAAc,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;;CAiCzE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=parser.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parser.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/parser.test.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare const bulletListIndentationWidth = 24;
2
- export declare const orderedListIndentationWidth = 36;
3
- export declare const formattingStyles: import("@codemirror/state").Extension;
4
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,eAAO,MAAM,gBAAgB,uCA2H3B,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- export type TableOptions = {};
3
- /**
4
- * GFM tables.
5
- * https://github.github.com/gfm/#tables-extension
6
- */
7
- export declare const table: (options?: TableOptions) => Extension;
8
- //# sourceMappingURL=table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/table.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,mBAAmB,CAAC;AAQ3B,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,SAMlD,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { Extension } from '@codemirror/state';
2
- export type MentionOptions = {
3
- debug?: boolean;
4
- onSearch: (text: string) => string[];
5
- };
6
- export declare const mention: ({ debug, onSearch }: MentionOptions) => Extension;
7
- //# sourceMappingURL=mention.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../src/extensions/mention.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CACtC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,qBAAqB,cAAc,KAAG,SAyB7D,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- export type EditorInputConfig = {
3
- type?: string;
4
- noTabster?: boolean;
5
- };
6
- export declare const editorInputMode: import("@codemirror/state").Facet<EditorInputConfig, EditorInputConfig>;
7
- export declare const InputModeExtensions: {
8
- [mode: string]: Extension;
9
- };
10
- //# sourceMappingURL=modes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../../../../src/extensions/modes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,yEAA0C,CAAC;AAEvE,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAsB5D,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- import { type Command } from '@codemirror/view';
3
- export declare const indentItemMore: Command;
4
- export declare const indentItemLess: Command;
5
- export declare const moveItemDown: Command;
6
- export declare const moveItemUp: Command;
7
- export declare const deleteItem: Command;
8
- export declare const toggleTask: Command;
9
- export declare const commands: () => Extension;
10
- //# sourceMappingURL=commands.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/commands.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,KAAK,OAAO,EAA2B,MAAM,kBAAkB,CAAC;AASzE,eAAO,MAAM,cAAc,EAAE,OAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,OAsB5B,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,OA6B1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OA6BxB,CAAC;AAMF,eAAO,MAAM,UAAU,EAAE,OAiBxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAmBxB,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,SAwGxB,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Handle cursor movement, selection, and editing.
3
- */
4
- export declare const editor: () => import("@codemirror/state").Extension[];
5
- //# sourceMappingURL=editor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/editor.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,eAAO,MAAM,MAAM,+CA8IlB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=editor.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/editor.test.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export * from './commands';
2
- export * from './outliner';
3
- export * from './tree';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC"}
@@ -1,11 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- export type OutlinerProps = {};
3
- /**
4
- * Outliner extension.
5
- * - Stores outline as a standard markdown document with task and list markers.
6
- * - Supports continuation lines and rich formatting (with Shift+Enter).
7
- * - Constrains editor to outline structure.
8
- * - Supports smart cut-and-paste.
9
- */
10
- export declare const outliner: (options?: OutlinerProps) => Extension;
11
- //# sourceMappingURL=outliner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"outliner.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/outliner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,SAAS,EAAoB,MAAM,mBAAmB,CAAC;AA2BvF,MAAM,MAAM,aAAa,GAAG,EAAE,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAS,aAAkB,KAAG,SAwBtD,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=outliner.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"outliner.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/outliner.test.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { Compartment, type EditorState, Facet, type SelectionRange } from '@codemirror/state';
2
- import { type Command } from '@codemirror/view';
3
- export type Selection = number[];
4
- export declare const getSelection: (state: EditorState) => SelectionRange;
5
- export declare const selectionEquals: (a: number[], b: number[]) => boolean;
6
- export declare const selectionFacet: Facet<Selection, Selection>;
7
- export declare const selectionCompartment: Compartment;
8
- export declare const selectNone: Command;
9
- export declare const selectAll: Command;
10
- export declare const selectUp: Command;
11
- export declare const selectDown: Command;
12
- //# sourceMappingURL=selection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/selection.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAE,KAAK,OAAO,EAAmB,MAAM,kBAAkB,CAAC;AAIjE,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAEjC,eAAO,MAAM,YAAY,GAAI,OAAO,WAAW,KAAG,cAAsC,CAAC;AAEzF,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,YAA2D,CAAC;AAEpH,eAAO,MAAM,cAAc,6BAEzB,CAAC;AAEH,eAAO,MAAM,oBAAoB,aAAoB,CAAC;AAEtD,eAAO,MAAM,UAAU,EAAE,OAMxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OAUvB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAEtB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAExB,CAAC"}
@@ -1,79 +0,0 @@
1
- import { type EditorState, type Extension } from '@codemirror/state';
2
- import { Facet } from '@codemirror/state';
3
- import { type SyntaxNode } from '@lezer/common';
4
- import { type Range } from '../../types';
5
- /**
6
- * Represents a single item in the tree.
7
- */
8
- export interface Item {
9
- type: 'root' | 'bullet' | 'task' | 'unknown';
10
- index: number;
11
- level: number;
12
- node: SyntaxNode;
13
- parent?: Item;
14
- nextSibling?: Item;
15
- prevSibling?: Item;
16
- children: Item[];
17
- /**
18
- * Actual range.
19
- * Starts at the start of the line containing the item and ends at the end of the line before the
20
- * first child or next sibling.
21
- */
22
- lineRange: Range;
23
- /**
24
- * Range of the editable content.
25
- * This doesn't include the list or task marker or indentation.
26
- */
27
- contentRange: Range;
28
- }
29
- export declare const itemToJSON: ({ type, index, level, lineRange, contentRange, children }: Item) => any;
30
- /**
31
- * Tree assumes the entire document is a single contiguous well-formed hierarchy of markdown LiteItem nodes.
32
- */
33
- export declare class Tree implements Item {
34
- type: Item['type'];
35
- index: number;
36
- level: number;
37
- node: Item['node'];
38
- lineRange: Item['lineRange'];
39
- contentRange: Item['contentRange'];
40
- children: Item['children'];
41
- constructor(node: SyntaxNode);
42
- toJSON(): any;
43
- get root(): Item;
44
- traverse<T = any>(cb: (item: Item, level: number) => T | void): T | undefined;
45
- traverse<T = any>(item: Item, cb: (item: Item, level: number) => T | void): T | undefined;
46
- /**
47
- * Return the closest item.
48
- */
49
- find(pos: number): Item | undefined;
50
- /**
51
- * Return the first child, next sibling, or parent's next sibling.
52
- */
53
- next(item: Item, enter?: boolean): Item | undefined;
54
- /**
55
- * Return the previous sibling, or parent.
56
- */
57
- prev(item: Item): Item | undefined;
58
- /**
59
- * Return the last descendant of the item, or the item itself if it has no children.
60
- */
61
- lastDescendant(item: Item): Item;
62
- }
63
- export declare const getRange: (tree: Tree, item: Item) => [number, number];
64
- /**
65
- * Traverse the tree, calling the callback for each item.
66
- * If the callback returns a value, the traversal is stopped and the value is returned.
67
- */
68
- export declare const traverse: <T = any>(root: Item, cb: (item: Item, level: number) => T | void) => T | undefined;
69
- export declare const getListItemContent: (state: EditorState, item: Item) => string;
70
- export declare const listItemToString: (item: Item, level?: number) => string;
71
- export declare const treeFacet: Facet<Tree, Tree>;
72
- export type TreeOptions = {};
73
- /**
74
- * Creates a shadow tree of `ListItem` nodes whenever the document changes.
75
- * This adds overhead relative to the markdown AST, but allows for efficient traversal of the list items.
76
- * NOTE: Requires markdown parser to be enabled.
77
- */
78
- export declare const outlinerTree: (options?: TreeOptions) => Extension;
79
- //# sourceMappingURL=tree.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/tree.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAgC,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB;;;;OAIG;IACH,SAAS,EAAE,KAAK,CAAC;IACjB;;;OAGG;IACH,YAAY,EAAE,KAAK,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,GAAI,2DAA2D,IAAI,KAAG,GAE5F,CAAC;AAEF;;GAEG;AACH,qBAAa,IAAK,YAAW,IAAI;IAC/B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAU;IAC5B,KAAK,SAAM;IACX,KAAK,SAAM;IACX,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IACnC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAM;gBAEpB,IAAI,EAAE,UAAU;IAM5B,MAAM;IAIN,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,SAAS;IAC7E,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,SAAS;IAYzF;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAInC;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,UAAO,GAAG,IAAI,GAAG,SAAS;IAgBhD;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS;IAQlC;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;CAGjC;AAED,eAAO,MAAM,QAAQ,GAAI,MAAM,IAAI,EAAE,MAAM,IAAI,KAAG,CAAC,MAAM,EAAE,MAAM,CAGhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,GAAG,GAAG,EAAE,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,KAAG,CAAC,GAAG,SAoB/F,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,WAAW,EAAE,MAAM,IAAI,KAAG,MAEnE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,IAAI,EAAE,cAAS,WAerD,CAAC;AAUF,eAAO,MAAM,SAAS,mBAEpB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,EAAE,CAAC;AAE7B;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,UAAS,WAAgB,KAAG,SAuHxD,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tree.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/tree.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from './preview';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/preview/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
@@ -1,32 +0,0 @@
1
- import '@dxos/lit-ui/dx-ref-tag.pcss';
2
- import { type EditorState, type Extension } from '@codemirror/state';
3
- import { type SyntaxNode } from '@lezer/common';
4
- export type PreviewLinkRef = {
5
- suggest?: boolean;
6
- block?: boolean;
7
- label: string;
8
- ref: string;
9
- };
10
- export type PreviewLinkTarget = {
11
- label: string;
12
- text?: string;
13
- object?: any;
14
- };
15
- export type PreviewLookup = (link: PreviewLinkRef) => Promise<PreviewLinkTarget | null | undefined>;
16
- export type PreviewOptions = {
17
- addBlockContainer?: (link: PreviewLinkRef, el: HTMLElement) => void;
18
- removeBlockContainer?: (link: PreviewLinkRef) => void;
19
- };
20
- /**
21
- * Create preview decorations.
22
- */
23
- export declare const preview: (options?: PreviewOptions) => Extension;
24
- /**
25
- * Link references.
26
- *
27
- * [Label][dxn:echo:123] Inline reference
28
- * ![Label][dxn:echo:123] Block reference
29
- * ![Label][?dxn:echo:123] Suggestion
30
- */
31
- export declare const getLinkRef: (state: EditorState, node: SyntaxNode) => PreviewLinkRef | undefined;
32
- //# sourceMappingURL=preview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/preview/preview.ts"],"names":[],"mappings":"AAIA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAKf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAIF,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEpG,MAAM,MAAM,cAAc,GAAG;IAC3B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IACpE,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CACvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,UAAS,cAAmB,KAAG,SAatD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,WAAW,EAAE,MAAM,UAAU,KAAG,cAAc,GAAG,SAYlF,CAAC"}
@@ -1,24 +0,0 @@
1
- import { type Extension, type TransactionSpec } from '@codemirror/state';
2
- /**
3
- * Currently edited document id as FQ string.
4
- */
5
- export declare const documentId: import("@codemirror/state").Facet<string, string>;
6
- export type EditorSelection = {
7
- anchor: number;
8
- head?: number;
9
- };
10
- export type EditorSelectionState = {
11
- scrollTo?: number;
12
- selection?: EditorSelection;
13
- };
14
- export type EditorStateStore = {
15
- setState: (id: string, state: EditorSelectionState) => void;
16
- getState: (id: string) => EditorSelectionState | undefined;
17
- };
18
- export declare const createEditorStateTransaction: ({ scrollTo, selection }: EditorSelectionState) => TransactionSpec;
19
- export declare const createEditorStateStore: (keyPrefix: string) => EditorStateStore;
20
- /**
21
- * Track scrolling and selection state to be restored when switching to document.
22
- */
23
- export declare const selectionState: ({ getState, setState }?: Partial<EditorStateStore>) => Extension;
24
- //# sourceMappingURL=selection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../src/extensions/selection.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAe,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAStF;;GAEG;AACH,eAAO,MAAM,UAAU,mDAA6B,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,oBAAoB,GAAG,SAAS,CAAC;CAC5D,CAAC;AAIF,eAAO,MAAM,4BAA4B,GAAI,yBAAyB,oBAAoB,KAAG,eAO5F,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,WAAW,MAAM,KAAG,gBAWzD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,yBAAwB,OAAO,CAAC,gBAAgB,CAAM,KAAG,SAuCvF,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- export type DemoOptions = {
3
- delay?: number;
4
- items?: string[];
5
- };
6
- /**
7
- * Configurable plugin that let's user cycle through pre-configured input script.
8
- */
9
- export declare const typewriter: ({ delay, items }?: DemoOptions) => Extension;
10
- //# sourceMappingURL=typewriter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typewriter.d.ts","sourceRoot":"","sources":["../../../../src/extensions/typewriter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,mBAAsC,WAAgB,KAAG,SAgDnF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Command.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Command.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAuC,MAAM,OAAO,CAAC;AA6D5D,QAAA,MAAM,IAAI;;;;;;;CA0BqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommandMenu.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/CommandMenu.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8B,MAAM,OAAO,CAAC;AAmBnD,OAAO,EAAE,KAAK,qBAAqB,EAAkB,MAAM,eAAe,CAAC;AAQ3E,KAAK,UAAU,GAAG,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AA+B5E,QAAA,MAAM,IAAI;;mCA7BkC,UAAU;;;;;CAoCjB,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,KAAK,EAAE,KAmBnB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KA2DlB,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './markdown';
2
- export * from './theme';
3
- export * from './tokens';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/styles/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -1,8 +0,0 @@
1
- export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
- export declare const theme: {
3
- code: string;
4
- codeMark: string;
5
- mark: string;
6
- heading: (level: HeadingLevel) => string;
7
- };
8
- //# sourceMappingURL=markdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/styles/markdown.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAYjD,eAAO,MAAM,KAAK;;;;qBAIC,YAAY;CAG9B,CAAC"}
@@ -1,38 +0,0 @@
1
- import { type StyleSpec } from 'style-mod';
2
- export type ThemeStyles = Record<string, StyleSpec>;
3
- /**
4
- * Minimal styles.
5
- * https://codemirror.net/examples/styling
6
- *
7
- * Examples:
8
- * - https://github.com/codemirror/view/blob/main/src/theme.ts
9
- * - https://github.com/codemirror/theme-one-dark/blob/main/src/one-dark.ts
10
- *
11
- * Main layout:
12
- * https://codemirror.net/examples/styling
13
- * https://codemirror.net/docs/guide (DOM Structure).
14
- *
15
- * <div class="cm-editor [cm-focused] [generated classes]">
16
- * <div class="cm-scroller">
17
- * <div class="cm-gutters">
18
- * <div class="cm-gutter [...]">
19
- * <div class="cm-gutterElement">...</div>
20
- * </div>
21
- * </div>
22
- * <div class="cm-content" role="textbox" contenteditable="true">
23
- * <div class="cm-line"></div>
24
- * </div>
25
- * <div class="cm-selectionLayer">
26
- * <div class="cm-selectionBackground"></div>
27
- * </div>
28
- * <div class="cm-cursorLayer">
29
- * <div class="cm-cursor"></div>
30
- * </div>
31
- * </div>
32
- * </div>
33
- *
34
- * NOTE: `light` and `dark` selectors are preprocessed by CodeMirror and can only be in the base theme.
35
- * NOTE: Use 'unset' to remove default CM style.
36
- */
37
- export declare const defaultTheme: ThemeStyles;
38
- //# sourceMappingURL=theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/styles/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,YAAY,EAAE,WA8N1B,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const fontBody: string;
2
- export declare const fontMono: string;
3
- //# sourceMappingURL=tokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/styles/tokens.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,QAA8B,CAAC;AACpD,eAAO,MAAM,QAAQ,QAA8B,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './util';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
@@ -1,3 +0,0 @@
1
- /** deprecated Replace with @dxos/util trim */
2
- export declare const str: (...lines: string[]) => string;
3
- //# sourceMappingURL=util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.ts"],"names":[],"mappings":"AAIA,8CAA8C;AAE9C,eAAO,MAAM,GAAG,GAAI,GAAG,OAAO,MAAM,EAAE,WAAqB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './types';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
@@ -1,21 +0,0 @@
1
- import { type EditorView } from '@codemirror/view';
2
- import { Schema } from 'effect';
3
- export type Range = {
4
- from: number;
5
- to: number;
6
- };
7
- export type Comment = {
8
- id: string;
9
- cursor?: string;
10
- };
11
- /**
12
- * Callback that renders into a DOM element within the editor.
13
- */
14
- export type RenderCallback<Props extends object> = (el: HTMLElement, props: Props, view: EditorView) => void;
15
- export declare const EditorViewModes: readonly ["preview", "readonly", "source"];
16
- export declare const EditorViewMode: Schema.Schema<"preview" | "readonly" | "source", "preview" | "readonly" | "source", never>;
17
- export type EditorViewMode = Schema.Schema.Type<typeof EditorViewMode>;
18
- export declare const EditorInputModes: readonly ["default", "vim", "vscode"];
19
- export declare const EditorInputMode: Schema.Schema<"default" | "vim" | "vscode", "default" | "vim" | "vscode", never>;
20
- export type EditorInputMode = Schema.Schema.Type<typeof EditorInputMode>;
21
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAIF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,MAAM,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;AAE7G,eAAO,MAAM,eAAe,4CAA6C,CAAC;AAC1E,eAAO,MAAM,cAAc,4FAAuE,CAAC;AACnG,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,eAAO,MAAM,gBAAgB,uCAAwC,CAAC;AACtE,eAAO,MAAM,eAAe,kFAAwE,CAAC;AACrG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -1,31 +0,0 @@
1
- import { type EditorState } from '@codemirror/state';
2
- import { type Range } from '../types';
3
- /**
4
- * Determines if two ranges overlap.
5
- * A range is considered to overlap if there is any intersection
6
- * between the two ranges, inclusive of their boundaries.
7
- */
8
- export declare const overlap: (a: Range, b: Range) => boolean;
9
- /**
10
- * Converts indexes into the text document into stable peer-independent cursors.
11
- *
12
- * See:
13
- * - https://automerge.org/automerge/api-docs/js/functions/next.getCursor.html
14
- * - https://github.com/yjs/yjs?tab=readme-ov-file#relative-positions
15
- *
16
- * @param {assoc} number Negative values will associate the cursor with the previous character
17
- * while positive - with the next one.
18
- */
19
- export interface CursorConverter {
20
- toCursor(position: number, assoc?: -1 | 1 | undefined): string;
21
- fromCursor(cursor: string): number;
22
- }
23
- export declare class Cursor {
24
- static readonly converter: import("@codemirror/state").Facet<unknown, CursorConverter>;
25
- static readonly getCursorFromRange: (state: EditorState, range: Range) => string;
26
- static readonly getRangeFromCursor: (state: EditorState, cursor: string) => {
27
- from: number;
28
- to: number;
29
- } | undefined;
30
- }
31
- //# sourceMappingURL=cursor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/util/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,KAAK,EAAE,GAAG,KAAK,KAAG,OAA2C,CAAC;AAEzF;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAC/D,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAOD,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,CAAC,SAAS,8DAA4C;IAErE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,GAAI,OAAO,WAAW,EAAE,OAAO,KAAK,YAKpE;IAEF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,GAAI,OAAO,WAAW,EAAE,QAAQ,MAAM;;;kBAOtE;CACH"}
@@ -1,17 +0,0 @@
1
- import { type Transaction } from '@codemirror/state';
2
- import { type EditorView } from '@codemirror/view';
3
- export declare const wrapWithCatch: (fn: (...args: any[]) => any) => (...args: any[]) => any;
4
- /**
5
- * CodeMirror callbacks swallow errors so wrap handlers.
6
- */
7
- export declare const callbackWrapper: <T extends Function>(fn: T) => T;
8
- /**
9
- * Log all changes before dispatching them to the view.
10
- * https://codemirror.net/docs/ref/#view.EditorView.dispatch
11
- */
12
- export declare const debugDispatcher: (trs: readonly Transaction[], view: EditorView) => void;
13
- /**
14
- * Util to log transactions in update listener.
15
- */
16
- export declare const logChanges: (trs: readonly Transaction[]) => void;
17
- //# sourceMappingURL=debug.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/util/debug.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,eAAO,MAAM,aAAa,GAAI,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,MAC/C,GAAG,MAAM,GAAG,EAAE,QAOvB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,QAAQ,EAAE,IAAI,CAAC,KAAG,CAOxC,CAAC;AAErB;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,SAAS,WAAW,EAAE,EAAE,MAAM,UAAU,SAG5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,WAAW,EAAE,SAmBrD,CAAC"}