@multiplatform.one/rich-text 6.1.0 → 6.3.0

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 (649) hide show
  1. package/README.md +60 -0
  2. package/dist/cjs/RichEditor.cjs +84 -9
  3. package/dist/cjs/RichEditor.native.js +422 -35
  4. package/dist/cjs/RichEditor.native.js.map +1 -1
  5. package/dist/cjs/RichTextEditor/index.cjs +18 -2
  6. package/dist/cjs/RichTextEditor/index.native.js +18 -2
  7. package/dist/cjs/RichTextEditor/index.native.js.map +1 -1
  8. package/dist/cjs/constants.cjs +52 -29
  9. package/dist/cjs/constants.native.js +59 -29
  10. package/dist/cjs/constants.native.js.map +1 -1
  11. package/dist/cjs/editor/BlockDragHandle.cjs +22 -7
  12. package/dist/cjs/editor/BlockDragHandle.native.js +41 -7
  13. package/dist/cjs/editor/BlockDragHandle.native.js.map +1 -1
  14. package/dist/cjs/editor/SlashCommands.cjs +249 -293
  15. package/dist/cjs/editor/SlashCommands.native.js +306 -340
  16. package/dist/cjs/editor/SlashCommands.native.js.map +1 -1
  17. package/dist/cjs/editor/TentapEditor.native.js +44 -12
  18. package/dist/cjs/editor/TentapEditor.native.js.map +1 -1
  19. package/dist/cjs/editor/TiptapEditor.cjs +140 -33
  20. package/dist/cjs/editor/TiptapEditor.native.js +153 -33
  21. package/dist/cjs/editor/TiptapEditor.native.js.map +1 -1
  22. package/dist/cjs/editor/blockAnchor.cjs +43 -0
  23. package/dist/cjs/editor/blockAnchor.native.js +68 -0
  24. package/dist/cjs/editor/blockAnchor.native.js.map +1 -0
  25. package/dist/cjs/editor/codeBlockPreview.cjs +230 -0
  26. package/dist/cjs/editor/codeBlockPreview.native.js +265 -0
  27. package/dist/cjs/editor/codeBlockPreview.native.js.map +1 -0
  28. package/dist/cjs/editor/editorStyles.cjs +203 -34
  29. package/dist/cjs/editor/editorStyles.native.js +203 -34
  30. package/dist/cjs/editor/editorStyles.native.js.map +1 -1
  31. package/dist/cjs/editor/emoji.cjs +128 -0
  32. package/dist/cjs/editor/emoji.native.js +184 -0
  33. package/dist/cjs/editor/emoji.native.js.map +1 -0
  34. package/dist/cjs/editor/lazyKatex.cjs +78 -0
  35. package/dist/cjs/editor/lazyKatex.native.js +117 -0
  36. package/dist/cjs/editor/lazyKatex.native.js.map +1 -0
  37. package/dist/cjs/editor/markdown.cjs +216 -0
  38. package/dist/cjs/editor/markdown.native.js +278 -0
  39. package/dist/cjs/editor/markdown.native.js.map +1 -0
  40. package/dist/cjs/editor/mathematics.cjs +168 -0
  41. package/dist/cjs/editor/mathematics.native.js +202 -0
  42. package/dist/cjs/editor/mathematics.native.js.map +1 -0
  43. package/dist/cjs/editor/media.cjs +138 -0
  44. package/dist/cjs/editor/media.native.js +172 -0
  45. package/dist/cjs/editor/media.native.js.map +1 -0
  46. package/dist/cjs/editor/mentions.cjs +73 -0
  47. package/dist/cjs/editor/mentions.native.js +84 -0
  48. package/dist/cjs/editor/mentions.native.js.map +1 -0
  49. package/dist/cjs/editor/pasteCleanup.cjs +83 -0
  50. package/dist/cjs/editor/pasteCleanup.native.js +175 -0
  51. package/dist/cjs/editor/pasteCleanup.native.js.map +1 -0
  52. package/dist/cjs/editor/suggestionPopup.cjs +297 -0
  53. package/dist/cjs/editor/suggestionPopup.native.js +327 -0
  54. package/dist/cjs/editor/suggestionPopup.native.js.map +1 -0
  55. package/dist/cjs/preview.cjs +263 -0
  56. package/dist/cjs/preview.native.js +294 -0
  57. package/dist/cjs/preview.native.js.map +1 -0
  58. package/dist/cjs/shared/t.cjs +53 -0
  59. package/dist/cjs/shared/t.native.js +56 -0
  60. package/dist/cjs/shared/t.native.js.map +1 -0
  61. package/dist/cjs/shared/url.cjs +35 -0
  62. package/dist/cjs/shared/url.native.js +38 -0
  63. package/dist/cjs/shared/url.native.js.map +1 -0
  64. package/dist/cjs/styled.cjs +13 -6
  65. package/dist/cjs/styled.native.js +13 -6
  66. package/dist/cjs/styled.native.js.map +1 -1
  67. package/dist/cjs/toolbar/BubbleToolbar.cjs +10 -8
  68. package/dist/cjs/toolbar/BubbleToolbar.native.js +10 -8
  69. package/dist/cjs/toolbar/BubbleToolbar.native.js.map +1 -1
  70. package/dist/cjs/toolbar/CodeBlockBubble.cjs +59 -23
  71. package/dist/cjs/toolbar/CodeBlockBubble.native.js +71 -25
  72. package/dist/cjs/toolbar/CodeBlockBubble.native.js.map +1 -1
  73. package/dist/cjs/toolbar/ColorPicker.cjs +19 -54
  74. package/dist/cjs/toolbar/ColorPicker.native.js +81 -179
  75. package/dist/cjs/toolbar/ColorPicker.native.js.map +1 -1
  76. package/dist/cjs/toolbar/FixedToolbar.cjs +33 -10
  77. package/dist/cjs/toolbar/FixedToolbar.native.js +46 -54
  78. package/dist/cjs/toolbar/FixedToolbar.native.js.map +1 -1
  79. package/dist/cjs/toolbar/HeadingPicker.cjs +32 -39
  80. package/dist/cjs/toolbar/HeadingPicker.native.js +61 -51
  81. package/dist/cjs/toolbar/HeadingPicker.native.js.map +1 -1
  82. package/dist/cjs/toolbar/ImageBubble.cjs +20 -43
  83. package/dist/cjs/toolbar/ImageBubble.native.js +20 -43
  84. package/dist/cjs/toolbar/ImageBubble.native.js.map +1 -1
  85. package/dist/cjs/toolbar/ImageDialog.cjs +5 -4
  86. package/dist/cjs/toolbar/ImageDialog.native.js +76 -65
  87. package/dist/cjs/toolbar/ImageDialog.native.js.map +1 -1
  88. package/dist/cjs/toolbar/LinkBubble.cjs +23 -70
  89. package/dist/cjs/toolbar/LinkBubble.native.js +23 -70
  90. package/dist/cjs/toolbar/LinkBubble.native.js.map +1 -1
  91. package/dist/cjs/toolbar/LinkDialog.cjs +19 -18
  92. package/dist/cjs/toolbar/LinkDialog.native.js +86 -83
  93. package/dist/cjs/toolbar/LinkDialog.native.js.map +1 -1
  94. package/dist/cjs/toolbar/ListPicker.cjs +32 -43
  95. package/dist/cjs/toolbar/ListPicker.native.js +43 -44
  96. package/dist/cjs/toolbar/ListPicker.native.js.map +1 -1
  97. package/dist/cjs/toolbar/MathBubble.cjs +159 -0
  98. package/dist/cjs/toolbar/MathBubble.native.js +169 -0
  99. package/dist/cjs/toolbar/MathBubble.native.js.map +1 -0
  100. package/dist/cjs/toolbar/MoreDropdown.cjs +51 -98
  101. package/dist/cjs/toolbar/MoreDropdown.native.js +73 -98
  102. package/dist/cjs/toolbar/MoreDropdown.native.js.map +1 -1
  103. package/dist/cjs/toolbar/StatusBar.cjs +19 -10
  104. package/dist/cjs/toolbar/StatusBar.native.js +19 -10
  105. package/dist/cjs/toolbar/StatusBar.native.js.map +1 -1
  106. package/dist/cjs/toolbar/TableBubble.cjs +77 -95
  107. package/dist/cjs/toolbar/TableBubble.native.js +73 -71
  108. package/dist/cjs/toolbar/TableBubble.native.js.map +1 -1
  109. package/dist/cjs/toolbar/ToolbarButton.cjs +86 -21
  110. package/dist/cjs/toolbar/ToolbarButton.native.js +14 -4
  111. package/dist/cjs/toolbar/ToolbarButton.native.js.map +1 -1
  112. package/dist/cjs/toolbar/icons.cjs +111 -468
  113. package/dist/cjs/toolbar/shortcuts.cjs +73 -24
  114. package/dist/cjs/toolbar/shortcuts.native.js +73 -24
  115. package/dist/cjs/toolbar/shortcuts.native.js.map +1 -1
  116. package/dist/cjs/toolbar/useHorizontalScroll.cjs +25 -5
  117. package/dist/cjs/toolbar/useHorizontalScroll.native.js +25 -5
  118. package/dist/cjs/toolbar/useHorizontalScroll.native.js.map +1 -1
  119. package/dist/cjs/toolbar/useRovingFocus.cjs +80 -0
  120. package/dist/cjs/toolbar/useRovingFocus.native.js +113 -0
  121. package/dist/cjs/toolbar/useRovingFocus.native.js.map +1 -0
  122. package/dist/cjs/types.native.js.map +1 -1
  123. package/dist/esm/RichEditor.mjs +85 -10
  124. package/dist/esm/RichEditor.mjs.map +1 -1
  125. package/dist/esm/RichEditor.native.js +425 -38
  126. package/dist/esm/RichEditor.native.js.map +1 -1
  127. package/dist/esm/RichTextEditor/index.mjs +18 -2
  128. package/dist/esm/RichTextEditor/index.mjs.map +1 -1
  129. package/dist/esm/RichTextEditor/index.native.js +18 -2
  130. package/dist/esm/RichTextEditor/index.native.js.map +1 -1
  131. package/dist/esm/constants.mjs +47 -29
  132. package/dist/esm/constants.mjs.map +1 -1
  133. package/dist/esm/constants.native.js +54 -29
  134. package/dist/esm/constants.native.js.map +1 -1
  135. package/dist/esm/editor/BlockDragHandle.mjs +22 -7
  136. package/dist/esm/editor/BlockDragHandle.mjs.map +1 -1
  137. package/dist/esm/editor/BlockDragHandle.native.js +41 -7
  138. package/dist/esm/editor/BlockDragHandle.native.js.map +1 -1
  139. package/dist/esm/editor/SlashCommands.mjs +250 -294
  140. package/dist/esm/editor/SlashCommands.mjs.map +1 -1
  141. package/dist/esm/editor/SlashCommands.native.js +307 -341
  142. package/dist/esm/editor/SlashCommands.native.js.map +1 -1
  143. package/dist/esm/editor/TentapEditor.native.js +45 -13
  144. package/dist/esm/editor/TentapEditor.native.js.map +1 -1
  145. package/dist/esm/editor/TiptapEditor.mjs +142 -35
  146. package/dist/esm/editor/TiptapEditor.mjs.map +1 -1
  147. package/dist/esm/editor/TiptapEditor.native.js +155 -35
  148. package/dist/esm/editor/TiptapEditor.native.js.map +1 -1
  149. package/dist/esm/editor/blockAnchor.mjs +18 -0
  150. package/dist/esm/editor/blockAnchor.mjs.map +1 -0
  151. package/dist/esm/editor/blockAnchor.native.js +40 -0
  152. package/dist/esm/editor/blockAnchor.native.js.map +1 -0
  153. package/dist/esm/editor/codeBlockPreview.mjs +190 -0
  154. package/dist/esm/editor/codeBlockPreview.mjs.map +1 -0
  155. package/dist/esm/editor/codeBlockPreview.native.js +222 -0
  156. package/dist/esm/editor/codeBlockPreview.native.js.map +1 -0
  157. package/dist/esm/editor/editorStyles.mjs +203 -34
  158. package/dist/esm/editor/editorStyles.mjs.map +1 -1
  159. package/dist/esm/editor/editorStyles.native.js +203 -34
  160. package/dist/esm/editor/editorStyles.native.js.map +1 -1
  161. package/dist/esm/editor/emoji.mjs +88 -0
  162. package/dist/esm/editor/emoji.mjs.map +1 -0
  163. package/dist/esm/editor/emoji.native.js +141 -0
  164. package/dist/esm/editor/emoji.native.js.map +1 -0
  165. package/dist/esm/editor/lazyKatex.mjs +40 -0
  166. package/dist/esm/editor/lazyKatex.mjs.map +1 -0
  167. package/dist/esm/editor/lazyKatex.native.js +76 -0
  168. package/dist/esm/editor/lazyKatex.native.js.map +1 -0
  169. package/dist/esm/editor/markdown.mjs +179 -0
  170. package/dist/esm/editor/markdown.mjs.map +1 -0
  171. package/dist/esm/editor/markdown.native.js +238 -0
  172. package/dist/esm/editor/markdown.native.js.map +1 -0
  173. package/dist/esm/editor/mathematics.mjs +142 -0
  174. package/dist/esm/editor/mathematics.mjs.map +1 -0
  175. package/dist/esm/editor/mathematics.native.js +173 -0
  176. package/dist/esm/editor/mathematics.native.js.map +1 -0
  177. package/dist/esm/editor/media.mjs +113 -0
  178. package/dist/esm/editor/media.mjs.map +1 -0
  179. package/dist/esm/editor/media.native.js +144 -0
  180. package/dist/esm/editor/media.native.js.map +1 -0
  181. package/dist/esm/editor/mentions.mjs +37 -0
  182. package/dist/esm/editor/mentions.mjs.map +1 -0
  183. package/dist/esm/editor/mentions.native.js +45 -0
  184. package/dist/esm/editor/mentions.native.js.map +1 -0
  185. package/dist/esm/editor/pasteCleanup.mjs +57 -0
  186. package/dist/esm/editor/pasteCleanup.mjs.map +1 -0
  187. package/dist/esm/editor/pasteCleanup.native.js +146 -0
  188. package/dist/esm/editor/pasteCleanup.native.js.map +1 -0
  189. package/dist/esm/editor/suggestionPopup.mjs +268 -0
  190. package/dist/esm/editor/suggestionPopup.mjs.map +1 -0
  191. package/dist/esm/editor/suggestionPopup.native.js +295 -0
  192. package/dist/esm/editor/suggestionPopup.native.js.map +1 -0
  193. package/dist/esm/preview.mjs +236 -0
  194. package/dist/esm/preview.mjs.map +1 -0
  195. package/dist/esm/preview.native.js +264 -0
  196. package/dist/esm/preview.native.js.map +1 -0
  197. package/dist/esm/shared/t.mjs +17 -0
  198. package/dist/esm/shared/t.mjs.map +1 -0
  199. package/dist/esm/shared/t.native.js +17 -0
  200. package/dist/esm/shared/t.native.js.map +1 -0
  201. package/dist/esm/shared/url.mjs +10 -0
  202. package/dist/esm/shared/url.mjs.map +1 -0
  203. package/dist/esm/shared/url.native.js +10 -0
  204. package/dist/esm/shared/url.native.js.map +1 -0
  205. package/dist/esm/styled.mjs +13 -6
  206. package/dist/esm/styled.mjs.map +1 -1
  207. package/dist/esm/styled.native.js +13 -6
  208. package/dist/esm/styled.native.js.map +1 -1
  209. package/dist/esm/toolbar/BubbleToolbar.mjs +11 -9
  210. package/dist/esm/toolbar/BubbleToolbar.mjs.map +1 -1
  211. package/dist/esm/toolbar/BubbleToolbar.native.js +11 -9
  212. package/dist/esm/toolbar/BubbleToolbar.native.js.map +1 -1
  213. package/dist/esm/toolbar/CodeBlockBubble.mjs +60 -24
  214. package/dist/esm/toolbar/CodeBlockBubble.mjs.map +1 -1
  215. package/dist/esm/toolbar/CodeBlockBubble.native.js +72 -26
  216. package/dist/esm/toolbar/CodeBlockBubble.native.js.map +1 -1
  217. package/dist/esm/toolbar/ColorPicker.mjs +21 -56
  218. package/dist/esm/toolbar/ColorPicker.mjs.map +1 -1
  219. package/dist/esm/toolbar/ColorPicker.native.js +82 -180
  220. package/dist/esm/toolbar/ColorPicker.native.js.map +1 -1
  221. package/dist/esm/toolbar/FixedToolbar.mjs +34 -11
  222. package/dist/esm/toolbar/FixedToolbar.mjs.map +1 -1
  223. package/dist/esm/toolbar/FixedToolbar.native.js +47 -55
  224. package/dist/esm/toolbar/FixedToolbar.native.js.map +1 -1
  225. package/dist/esm/toolbar/HeadingPicker.mjs +34 -41
  226. package/dist/esm/toolbar/HeadingPicker.mjs.map +1 -1
  227. package/dist/esm/toolbar/HeadingPicker.native.js +63 -53
  228. package/dist/esm/toolbar/HeadingPicker.native.js.map +1 -1
  229. package/dist/esm/toolbar/ImageBubble.mjs +20 -43
  230. package/dist/esm/toolbar/ImageBubble.mjs.map +1 -1
  231. package/dist/esm/toolbar/ImageBubble.native.js +20 -43
  232. package/dist/esm/toolbar/ImageBubble.native.js.map +1 -1
  233. package/dist/esm/toolbar/ImageDialog.mjs +5 -4
  234. package/dist/esm/toolbar/ImageDialog.mjs.map +1 -1
  235. package/dist/esm/toolbar/ImageDialog.native.js +75 -64
  236. package/dist/esm/toolbar/ImageDialog.native.js.map +1 -1
  237. package/dist/esm/toolbar/LinkBubble.mjs +23 -70
  238. package/dist/esm/toolbar/LinkBubble.mjs.map +1 -1
  239. package/dist/esm/toolbar/LinkBubble.native.js +23 -70
  240. package/dist/esm/toolbar/LinkBubble.native.js.map +1 -1
  241. package/dist/esm/toolbar/LinkDialog.mjs +17 -16
  242. package/dist/esm/toolbar/LinkDialog.mjs.map +1 -1
  243. package/dist/esm/toolbar/LinkDialog.native.js +84 -80
  244. package/dist/esm/toolbar/LinkDialog.native.js.map +1 -1
  245. package/dist/esm/toolbar/ListPicker.mjs +33 -44
  246. package/dist/esm/toolbar/ListPicker.mjs.map +1 -1
  247. package/dist/esm/toolbar/ListPicker.native.js +44 -45
  248. package/dist/esm/toolbar/ListPicker.native.js.map +1 -1
  249. package/dist/esm/toolbar/MathBubble.mjs +134 -0
  250. package/dist/esm/toolbar/MathBubble.mjs.map +1 -0
  251. package/dist/esm/toolbar/MathBubble.native.js +141 -0
  252. package/dist/esm/toolbar/MathBubble.native.js.map +1 -0
  253. package/dist/esm/toolbar/MoreDropdown.mjs +50 -97
  254. package/dist/esm/toolbar/MoreDropdown.mjs.map +1 -1
  255. package/dist/esm/toolbar/MoreDropdown.native.js +72 -97
  256. package/dist/esm/toolbar/MoreDropdown.native.js.map +1 -1
  257. package/dist/esm/toolbar/StatusBar.mjs +19 -10
  258. package/dist/esm/toolbar/StatusBar.mjs.map +1 -1
  259. package/dist/esm/toolbar/StatusBar.native.js +19 -10
  260. package/dist/esm/toolbar/StatusBar.native.js.map +1 -1
  261. package/dist/esm/toolbar/TableBubble.mjs +77 -95
  262. package/dist/esm/toolbar/TableBubble.mjs.map +1 -1
  263. package/dist/esm/toolbar/TableBubble.native.js +73 -71
  264. package/dist/esm/toolbar/TableBubble.native.js.map +1 -1
  265. package/dist/esm/toolbar/ToolbarButton.mjs +87 -22
  266. package/dist/esm/toolbar/ToolbarButton.mjs.map +1 -1
  267. package/dist/esm/toolbar/ToolbarButton.native.js +14 -4
  268. package/dist/esm/toolbar/ToolbarButton.native.js.map +1 -1
  269. package/dist/esm/toolbar/icons.mjs +109 -469
  270. package/dist/esm/toolbar/icons.mjs.map +1 -1
  271. package/dist/esm/toolbar/shortcuts.mjs +73 -24
  272. package/dist/esm/toolbar/shortcuts.mjs.map +1 -1
  273. package/dist/esm/toolbar/shortcuts.native.js +73 -24
  274. package/dist/esm/toolbar/shortcuts.native.js.map +1 -1
  275. package/dist/esm/toolbar/useHorizontalScroll.mjs +25 -6
  276. package/dist/esm/toolbar/useHorizontalScroll.mjs.map +1 -1
  277. package/dist/esm/toolbar/useHorizontalScroll.native.js +25 -6
  278. package/dist/esm/toolbar/useHorizontalScroll.native.js.map +1 -1
  279. package/dist/esm/toolbar/useRovingFocus.mjs +55 -0
  280. package/dist/esm/toolbar/useRovingFocus.mjs.map +1 -0
  281. package/dist/esm/toolbar/useRovingFocus.native.js +85 -0
  282. package/dist/esm/toolbar/useRovingFocus.native.js.map +1 -0
  283. package/dist/esm/types.mjs.map +1 -1
  284. package/dist/esm/types.native.js.map +1 -1
  285. package/dist/jsx/RichEditor.mjs +85 -10
  286. package/dist/jsx/RichEditor.mjs.map +1 -1
  287. package/dist/jsx/RichEditor.native.js +422 -35
  288. package/dist/jsx/RichEditor.native.js.map +1 -1
  289. package/dist/jsx/RichTextEditor/index.mjs +18 -2
  290. package/dist/jsx/RichTextEditor/index.mjs.map +1 -1
  291. package/dist/jsx/RichTextEditor/index.native.js +18 -2
  292. package/dist/jsx/RichTextEditor/index.native.js.map +1 -1
  293. package/dist/jsx/constants.mjs +47 -29
  294. package/dist/jsx/constants.mjs.map +1 -1
  295. package/dist/jsx/constants.native.js +59 -29
  296. package/dist/jsx/constants.native.js.map +1 -1
  297. package/dist/jsx/editor/BlockDragHandle.mjs +22 -7
  298. package/dist/jsx/editor/BlockDragHandle.mjs.map +1 -1
  299. package/dist/jsx/editor/BlockDragHandle.native.js +41 -7
  300. package/dist/jsx/editor/BlockDragHandle.native.js.map +1 -1
  301. package/dist/jsx/editor/SlashCommands.mjs +250 -294
  302. package/dist/jsx/editor/SlashCommands.mjs.map +1 -1
  303. package/dist/jsx/editor/SlashCommands.native.js +306 -340
  304. package/dist/jsx/editor/SlashCommands.native.js.map +1 -1
  305. package/dist/jsx/editor/TentapEditor.native.js +44 -12
  306. package/dist/jsx/editor/TentapEditor.native.js.map +1 -1
  307. package/dist/jsx/editor/TiptapEditor.mjs +142 -35
  308. package/dist/jsx/editor/TiptapEditor.mjs.map +1 -1
  309. package/dist/jsx/editor/TiptapEditor.native.js +153 -33
  310. package/dist/jsx/editor/TiptapEditor.native.js.map +1 -1
  311. package/dist/jsx/editor/blockAnchor.mjs +18 -0
  312. package/dist/jsx/editor/blockAnchor.mjs.map +1 -0
  313. package/dist/jsx/editor/blockAnchor.native.js +68 -0
  314. package/dist/jsx/editor/blockAnchor.native.js.map +1 -0
  315. package/dist/jsx/editor/codeBlockPreview.mjs +190 -0
  316. package/dist/jsx/editor/codeBlockPreview.mjs.map +1 -0
  317. package/dist/jsx/editor/codeBlockPreview.native.js +265 -0
  318. package/dist/jsx/editor/codeBlockPreview.native.js.map +1 -0
  319. package/dist/jsx/editor/editorStyles.mjs +203 -34
  320. package/dist/jsx/editor/editorStyles.mjs.map +1 -1
  321. package/dist/jsx/editor/editorStyles.native.js +203 -34
  322. package/dist/jsx/editor/editorStyles.native.js.map +1 -1
  323. package/dist/jsx/editor/emoji.mjs +88 -0
  324. package/dist/jsx/editor/emoji.mjs.map +1 -0
  325. package/dist/jsx/editor/emoji.native.js +184 -0
  326. package/dist/jsx/editor/emoji.native.js.map +1 -0
  327. package/dist/jsx/editor/lazyKatex.mjs +40 -0
  328. package/dist/jsx/editor/lazyKatex.mjs.map +1 -0
  329. package/dist/jsx/editor/lazyKatex.native.js +117 -0
  330. package/dist/jsx/editor/lazyKatex.native.js.map +1 -0
  331. package/dist/jsx/editor/markdown.mjs +179 -0
  332. package/dist/jsx/editor/markdown.mjs.map +1 -0
  333. package/dist/jsx/editor/markdown.native.js +278 -0
  334. package/dist/jsx/editor/markdown.native.js.map +1 -0
  335. package/dist/jsx/editor/mathematics.mjs +142 -0
  336. package/dist/jsx/editor/mathematics.mjs.map +1 -0
  337. package/dist/jsx/editor/mathematics.native.js +202 -0
  338. package/dist/jsx/editor/mathematics.native.js.map +1 -0
  339. package/dist/jsx/editor/media.mjs +113 -0
  340. package/dist/jsx/editor/media.mjs.map +1 -0
  341. package/dist/jsx/editor/media.native.js +172 -0
  342. package/dist/jsx/editor/media.native.js.map +1 -0
  343. package/dist/jsx/editor/mentions.mjs +37 -0
  344. package/dist/jsx/editor/mentions.mjs.map +1 -0
  345. package/dist/jsx/editor/mentions.native.js +84 -0
  346. package/dist/jsx/editor/mentions.native.js.map +1 -0
  347. package/dist/jsx/editor/pasteCleanup.mjs +57 -0
  348. package/dist/jsx/editor/pasteCleanup.mjs.map +1 -0
  349. package/dist/jsx/editor/pasteCleanup.native.js +175 -0
  350. package/dist/jsx/editor/pasteCleanup.native.js.map +1 -0
  351. package/dist/jsx/editor/suggestionPopup.mjs +268 -0
  352. package/dist/jsx/editor/suggestionPopup.mjs.map +1 -0
  353. package/dist/jsx/editor/suggestionPopup.native.js +327 -0
  354. package/dist/jsx/editor/suggestionPopup.native.js.map +1 -0
  355. package/dist/jsx/preview.mjs +236 -0
  356. package/dist/jsx/preview.mjs.map +1 -0
  357. package/dist/jsx/preview.native.js +294 -0
  358. package/dist/jsx/preview.native.js.map +1 -0
  359. package/dist/jsx/shared/t.mjs +17 -0
  360. package/dist/jsx/shared/t.mjs.map +1 -0
  361. package/dist/jsx/shared/t.native.js +56 -0
  362. package/dist/jsx/shared/t.native.js.map +1 -0
  363. package/dist/jsx/shared/url.mjs +10 -0
  364. package/dist/jsx/shared/url.mjs.map +1 -0
  365. package/dist/jsx/shared/url.native.js +38 -0
  366. package/dist/jsx/shared/url.native.js.map +1 -0
  367. package/dist/jsx/styled.mjs +13 -6
  368. package/dist/jsx/styled.mjs.map +1 -1
  369. package/dist/jsx/styled.native.js +13 -6
  370. package/dist/jsx/styled.native.js.map +1 -1
  371. package/dist/jsx/toolbar/BubbleToolbar.mjs +11 -9
  372. package/dist/jsx/toolbar/BubbleToolbar.mjs.map +1 -1
  373. package/dist/jsx/toolbar/BubbleToolbar.native.js +10 -8
  374. package/dist/jsx/toolbar/BubbleToolbar.native.js.map +1 -1
  375. package/dist/jsx/toolbar/CodeBlockBubble.mjs +60 -24
  376. package/dist/jsx/toolbar/CodeBlockBubble.mjs.map +1 -1
  377. package/dist/jsx/toolbar/CodeBlockBubble.native.js +71 -25
  378. package/dist/jsx/toolbar/CodeBlockBubble.native.js.map +1 -1
  379. package/dist/jsx/toolbar/ColorPicker.mjs +21 -56
  380. package/dist/jsx/toolbar/ColorPicker.mjs.map +1 -1
  381. package/dist/jsx/toolbar/ColorPicker.native.js +81 -179
  382. package/dist/jsx/toolbar/ColorPicker.native.js.map +1 -1
  383. package/dist/jsx/toolbar/FixedToolbar.mjs +34 -11
  384. package/dist/jsx/toolbar/FixedToolbar.mjs.map +1 -1
  385. package/dist/jsx/toolbar/FixedToolbar.native.js +46 -54
  386. package/dist/jsx/toolbar/FixedToolbar.native.js.map +1 -1
  387. package/dist/jsx/toolbar/HeadingPicker.mjs +34 -41
  388. package/dist/jsx/toolbar/HeadingPicker.mjs.map +1 -1
  389. package/dist/jsx/toolbar/HeadingPicker.native.js +61 -51
  390. package/dist/jsx/toolbar/HeadingPicker.native.js.map +1 -1
  391. package/dist/jsx/toolbar/ImageBubble.mjs +20 -43
  392. package/dist/jsx/toolbar/ImageBubble.mjs.map +1 -1
  393. package/dist/jsx/toolbar/ImageBubble.native.js +20 -43
  394. package/dist/jsx/toolbar/ImageBubble.native.js.map +1 -1
  395. package/dist/jsx/toolbar/ImageDialog.mjs +5 -4
  396. package/dist/jsx/toolbar/ImageDialog.mjs.map +1 -1
  397. package/dist/jsx/toolbar/ImageDialog.native.js +76 -65
  398. package/dist/jsx/toolbar/ImageDialog.native.js.map +1 -1
  399. package/dist/jsx/toolbar/LinkBubble.mjs +23 -70
  400. package/dist/jsx/toolbar/LinkBubble.mjs.map +1 -1
  401. package/dist/jsx/toolbar/LinkBubble.native.js +23 -70
  402. package/dist/jsx/toolbar/LinkBubble.native.js.map +1 -1
  403. package/dist/jsx/toolbar/LinkDialog.mjs +17 -16
  404. package/dist/jsx/toolbar/LinkDialog.mjs.map +1 -1
  405. package/dist/jsx/toolbar/LinkDialog.native.js +86 -83
  406. package/dist/jsx/toolbar/LinkDialog.native.js.map +1 -1
  407. package/dist/jsx/toolbar/ListPicker.mjs +33 -44
  408. package/dist/jsx/toolbar/ListPicker.mjs.map +1 -1
  409. package/dist/jsx/toolbar/ListPicker.native.js +43 -44
  410. package/dist/jsx/toolbar/ListPicker.native.js.map +1 -1
  411. package/dist/jsx/toolbar/MathBubble.mjs +134 -0
  412. package/dist/jsx/toolbar/MathBubble.mjs.map +1 -0
  413. package/dist/jsx/toolbar/MathBubble.native.js +169 -0
  414. package/dist/jsx/toolbar/MathBubble.native.js.map +1 -0
  415. package/dist/jsx/toolbar/MoreDropdown.mjs +50 -97
  416. package/dist/jsx/toolbar/MoreDropdown.mjs.map +1 -1
  417. package/dist/jsx/toolbar/MoreDropdown.native.js +73 -98
  418. package/dist/jsx/toolbar/MoreDropdown.native.js.map +1 -1
  419. package/dist/jsx/toolbar/StatusBar.mjs +19 -10
  420. package/dist/jsx/toolbar/StatusBar.mjs.map +1 -1
  421. package/dist/jsx/toolbar/StatusBar.native.js +19 -10
  422. package/dist/jsx/toolbar/StatusBar.native.js.map +1 -1
  423. package/dist/jsx/toolbar/TableBubble.mjs +77 -95
  424. package/dist/jsx/toolbar/TableBubble.mjs.map +1 -1
  425. package/dist/jsx/toolbar/TableBubble.native.js +73 -71
  426. package/dist/jsx/toolbar/TableBubble.native.js.map +1 -1
  427. package/dist/jsx/toolbar/ToolbarButton.mjs +87 -22
  428. package/dist/jsx/toolbar/ToolbarButton.mjs.map +1 -1
  429. package/dist/jsx/toolbar/ToolbarButton.native.js +14 -4
  430. package/dist/jsx/toolbar/ToolbarButton.native.js.map +1 -1
  431. package/dist/jsx/toolbar/icons.mjs +109 -469
  432. package/dist/jsx/toolbar/icons.mjs.map +1 -1
  433. package/dist/jsx/toolbar/shortcuts.mjs +73 -24
  434. package/dist/jsx/toolbar/shortcuts.mjs.map +1 -1
  435. package/dist/jsx/toolbar/shortcuts.native.js +73 -24
  436. package/dist/jsx/toolbar/shortcuts.native.js.map +1 -1
  437. package/dist/jsx/toolbar/useHorizontalScroll.mjs +25 -6
  438. package/dist/jsx/toolbar/useHorizontalScroll.mjs.map +1 -1
  439. package/dist/jsx/toolbar/useHorizontalScroll.native.js +25 -5
  440. package/dist/jsx/toolbar/useHorizontalScroll.native.js.map +1 -1
  441. package/dist/jsx/toolbar/useRovingFocus.mjs +55 -0
  442. package/dist/jsx/toolbar/useRovingFocus.mjs.map +1 -0
  443. package/dist/jsx/toolbar/useRovingFocus.native.js +113 -0
  444. package/dist/jsx/toolbar/useRovingFocus.native.js.map +1 -0
  445. package/dist/jsx/types.mjs.map +1 -1
  446. package/dist/jsx/types.native.js.map +1 -1
  447. package/package.json +28 -13
  448. package/src/RichEditor.native.tsx +451 -49
  449. package/src/RichEditor.stories.tsx +158 -0
  450. package/src/RichEditor.tsx +121 -7
  451. package/src/RichTextEditor/index.tsx +41 -3
  452. package/src/RichTextEditor/richTextEditor.spec.tsx +11 -4
  453. package/src/constants.ts +86 -24
  454. package/src/editor/BlockDragHandle.ts +30 -5
  455. package/src/editor/SlashCommands.tsx +228 -293
  456. package/src/editor/TentapEditor.native.tsx +68 -17
  457. package/src/editor/TiptapEditor.tsx +187 -22
  458. package/src/editor/blockAnchor.spec.ts +70 -0
  459. package/src/editor/blockAnchor.ts +42 -0
  460. package/src/editor/codeBlockPreview.spec.ts +144 -0
  461. package/src/editor/codeBlockPreview.ts +266 -0
  462. package/src/editor/css.d.ts +2 -0
  463. package/src/editor/details.spec.ts +48 -0
  464. package/src/editor/editorStyles.spec.ts +25 -0
  465. package/src/editor/editorStyles.ts +218 -34
  466. package/src/editor/emoji.spec.ts +88 -0
  467. package/src/editor/emoji.ts +147 -0
  468. package/src/editor/emojilib.d.ts +16 -0
  469. package/src/editor/lazyKatex.spec.ts +38 -0
  470. package/src/editor/lazyKatex.ts +68 -0
  471. package/src/editor/markdown.spec.ts +196 -0
  472. package/src/editor/markdown.ts +249 -0
  473. package/src/editor/mathematics.spec.ts +97 -0
  474. package/src/editor/mathematics.ts +179 -0
  475. package/src/editor/media.spec.ts +121 -0
  476. package/src/editor/media.ts +133 -0
  477. package/src/editor/mentions.spec.ts +41 -0
  478. package/src/editor/mentions.ts +55 -0
  479. package/src/editor/pasteCleanup.spec.ts +84 -0
  480. package/src/editor/pasteCleanup.ts +124 -0
  481. package/src/editor/suggestionPopup.spec.tsx +105 -0
  482. package/src/editor/suggestionPopup.tsx +414 -0
  483. package/src/editor/tiptapEditor.spec.tsx +15 -8
  484. package/src/exports.spec.ts +4 -2
  485. package/src/index.ts +7 -1
  486. package/src/integration.spec.tsx +38 -9
  487. package/src/preview.spec.ts +130 -0
  488. package/src/preview.ts +287 -0
  489. package/src/richEditor.spec.tsx +10 -3
  490. package/src/shared/t.ts +25 -0
  491. package/src/shared/url.ts +16 -0
  492. package/src/styled.ts +13 -6
  493. package/src/toolbar/BubbleToolbar.tsx +11 -8
  494. package/src/toolbar/CodeBlockBubble.tsx +66 -28
  495. package/src/toolbar/ColorPicker.native.tsx +126 -0
  496. package/src/toolbar/ColorPicker.tsx +23 -67
  497. package/src/toolbar/FixedToolbar.native.tsx +51 -51
  498. package/src/toolbar/FixedToolbar.tsx +54 -10
  499. package/src/toolbar/HeadingPicker.tsx +46 -38
  500. package/src/toolbar/ImageBubble.tsx +26 -44
  501. package/src/toolbar/ImageDialog.native.tsx +97 -0
  502. package/src/toolbar/ImageDialog.tsx +5 -4
  503. package/src/toolbar/LinkBubble.tsx +27 -64
  504. package/src/toolbar/LinkDialog.native.tsx +117 -0
  505. package/src/toolbar/LinkDialog.tsx +28 -24
  506. package/src/toolbar/ListPicker.tsx +47 -43
  507. package/src/toolbar/MathBubble.tsx +140 -0
  508. package/src/toolbar/MoreDropdown.tsx +53 -60
  509. package/src/toolbar/StatusBar.tsx +13 -8
  510. package/src/toolbar/TableBubble.tsx +82 -94
  511. package/src/toolbar/ToolbarButton.native.tsx +14 -4
  512. package/src/toolbar/ToolbarButton.tsx +98 -19
  513. package/src/toolbar/bubbleToolbar.spec.tsx +2 -1
  514. package/src/toolbar/fixedToolbar.spec.tsx +4 -2
  515. package/src/toolbar/icons.tsx +113 -323
  516. package/src/toolbar/shortcuts.ts +77 -24
  517. package/src/toolbar/toolbarPrimitives.spec.tsx +29 -1
  518. package/src/toolbar/toolbarSubComponents.spec.tsx +4 -2
  519. package/src/toolbar/useHorizontalScroll.spec.ts +67 -0
  520. package/src/toolbar/useHorizontalScroll.tsx +39 -12
  521. package/src/toolbar/useRovingFocus.spec.tsx +100 -0
  522. package/src/toolbar/useRovingFocus.ts +82 -0
  523. package/src/types.spec.ts +40 -1
  524. package/src/types.ts +28 -0
  525. package/types/RichEditor.d.ts +51 -0
  526. package/types/RichEditor.d.ts.map +1 -0
  527. package/types/RichEditor.native.d.ts +59 -0
  528. package/types/RichEditor.native.d.ts.map +1 -0
  529. package/types/RichTextEditor/index.d.ts +71 -0
  530. package/types/RichTextEditor/index.d.ts.map +1 -0
  531. package/types/constants.d.ts +49 -0
  532. package/types/constants.d.ts.map +1 -0
  533. package/types/context.d.ts +10 -0
  534. package/types/context.d.ts.map +1 -0
  535. package/types/editor/BlockDragHandle.d.ts +8 -0
  536. package/types/editor/BlockDragHandle.d.ts.map +1 -0
  537. package/types/editor/MarkdownPaste.d.ts +8 -0
  538. package/types/editor/MarkdownPaste.d.ts.map +1 -0
  539. package/types/editor/SlashCommands.d.ts +24 -0
  540. package/types/editor/SlashCommands.d.ts.map +1 -0
  541. package/types/editor/TentapEditor.native.d.ts +21 -0
  542. package/types/editor/TentapEditor.native.d.ts.map +1 -0
  543. package/types/editor/TiptapEditor.d.ts +24 -0
  544. package/types/editor/TiptapEditor.d.ts.map +1 -0
  545. package/types/editor/blockAnchor.d.ts +25 -0
  546. package/types/editor/blockAnchor.d.ts.map +1 -0
  547. package/types/editor/codeBlockPreview.d.ts +51 -0
  548. package/types/editor/codeBlockPreview.d.ts.map +1 -0
  549. package/types/editor/editorStyles.d.ts +25 -0
  550. package/types/editor/editorStyles.d.ts.map +1 -0
  551. package/types/editor/emoji.d.ts +45 -0
  552. package/types/editor/emoji.d.ts.map +1 -0
  553. package/types/editor/index.d.ts +11 -0
  554. package/types/editor/index.d.ts.map +1 -0
  555. package/types/editor/lazyKatex.d.ts +33 -0
  556. package/types/editor/lazyKatex.d.ts.map +1 -0
  557. package/types/editor/markdown.d.ts +24 -0
  558. package/types/editor/markdown.d.ts.map +1 -0
  559. package/types/editor/mathematics.d.ts +44 -0
  560. package/types/editor/mathematics.d.ts.map +1 -0
  561. package/types/editor/media.d.ts +32 -0
  562. package/types/editor/media.d.ts.map +1 -0
  563. package/types/editor/mentions.d.ts +15 -0
  564. package/types/editor/mentions.d.ts.map +1 -0
  565. package/types/editor/pasteCleanup.d.ts +24 -0
  566. package/types/editor/pasteCleanup.d.ts.map +1 -0
  567. package/types/editor/suggestionPopup.d.ts +113 -0
  568. package/types/editor/suggestionPopup.d.ts.map +1 -0
  569. package/types/editor/types.d.ts +80 -0
  570. package/types/editor/types.d.ts.map +1 -0
  571. package/types/editor/useEditorState.d.ts +19 -0
  572. package/types/editor/useEditorState.d.ts.map +1 -0
  573. package/types/index.d.ts +11 -0
  574. package/types/index.d.ts.map +1 -0
  575. package/types/preview.d.ts +44 -0
  576. package/types/preview.d.ts.map +1 -0
  577. package/types/shared/t.d.ts +10 -0
  578. package/types/shared/t.d.ts.map +1 -0
  579. package/types/shared/url.d.ts +9 -0
  580. package/types/shared/url.d.ts.map +1 -0
  581. package/types/styled.d.ts +40 -0
  582. package/types/styled.d.ts.map +1 -0
  583. package/types/toolbar/BubbleToolbar.d.ts +23 -0
  584. package/types/toolbar/BubbleToolbar.d.ts.map +1 -0
  585. package/types/toolbar/CodeBlockBubble.d.ts +10 -0
  586. package/types/toolbar/CodeBlockBubble.d.ts.map +1 -0
  587. package/types/toolbar/ColorPicker.d.ts +15 -0
  588. package/types/toolbar/ColorPicker.d.ts.map +1 -0
  589. package/types/toolbar/ColorPicker.native.d.ts +20 -0
  590. package/types/toolbar/ColorPicker.native.d.ts.map +1 -0
  591. package/types/toolbar/FixedToolbar.d.ts +32 -0
  592. package/types/toolbar/FixedToolbar.d.ts.map +1 -0
  593. package/types/toolbar/FixedToolbar.native.d.ts +30 -0
  594. package/types/toolbar/FixedToolbar.native.d.ts.map +1 -0
  595. package/types/toolbar/HeadingPicker.d.ts +14 -0
  596. package/types/toolbar/HeadingPicker.d.ts.map +1 -0
  597. package/types/toolbar/ImageBubble.d.ts +10 -0
  598. package/types/toolbar/ImageBubble.d.ts.map +1 -0
  599. package/types/toolbar/ImageDialog.d.ts +12 -0
  600. package/types/toolbar/ImageDialog.d.ts.map +1 -0
  601. package/types/toolbar/ImageDialog.native.d.ts +15 -0
  602. package/types/toolbar/ImageDialog.native.d.ts.map +1 -0
  603. package/types/toolbar/LinkBubble.d.ts +10 -0
  604. package/types/toolbar/LinkBubble.d.ts.map +1 -0
  605. package/types/toolbar/LinkDialog.d.ts +20 -0
  606. package/types/toolbar/LinkDialog.d.ts.map +1 -0
  607. package/types/toolbar/LinkDialog.native.d.ts +18 -0
  608. package/types/toolbar/LinkDialog.native.d.ts.map +1 -0
  609. package/types/toolbar/ListPicker.d.ts +14 -0
  610. package/types/toolbar/ListPicker.d.ts.map +1 -0
  611. package/types/toolbar/MathBubble.d.ts +11 -0
  612. package/types/toolbar/MathBubble.d.ts.map +1 -0
  613. package/types/toolbar/MoreDropdown.d.ts +13 -0
  614. package/types/toolbar/MoreDropdown.d.ts.map +1 -0
  615. package/types/toolbar/ResizeHandle.d.ts +11 -0
  616. package/types/toolbar/ResizeHandle.d.ts.map +1 -0
  617. package/types/toolbar/StatusBar.d.ts +11 -0
  618. package/types/toolbar/StatusBar.d.ts.map +1 -0
  619. package/types/toolbar/TableBubble.d.ts +10 -0
  620. package/types/toolbar/TableBubble.d.ts.map +1 -0
  621. package/types/toolbar/ToolbarButton.d.ts +35 -0
  622. package/types/toolbar/ToolbarButton.d.ts.map +1 -0
  623. package/types/toolbar/ToolbarButton.native.d.ts +30 -0
  624. package/types/toolbar/ToolbarButton.native.d.ts.map +1 -0
  625. package/types/toolbar/ToolbarGroup.d.ts +14 -0
  626. package/types/toolbar/ToolbarGroup.d.ts.map +1 -0
  627. package/types/toolbar/icons.d.ts +52 -0
  628. package/types/toolbar/icons.d.ts.map +1 -0
  629. package/types/toolbar/icons.native.d.ts +41 -0
  630. package/types/toolbar/icons.native.d.ts.map +1 -0
  631. package/types/toolbar/shortcuts.d.ts +34 -0
  632. package/types/toolbar/shortcuts.d.ts.map +1 -0
  633. package/types/toolbar/useHorizontalScroll.d.ts +43 -0
  634. package/types/toolbar/useHorizontalScroll.d.ts.map +1 -0
  635. package/types/toolbar/useRovingFocus.d.ts +10 -0
  636. package/types/toolbar/useRovingFocus.d.ts.map +1 -0
  637. package/types/types.d.ts +125 -0
  638. package/types/types.d.ts.map +1 -0
  639. package/dist/cjs/RichEditor.stories.cjs +0 -327
  640. package/dist/cjs/RichEditor.stories.native.js +0 -342
  641. package/dist/cjs/RichEditor.stories.native.js.map +0 -1
  642. package/dist/esm/RichEditor.stories.mjs +0 -291
  643. package/dist/esm/RichEditor.stories.mjs.map +0 -1
  644. package/dist/esm/RichEditor.stories.native.js +0 -303
  645. package/dist/esm/RichEditor.stories.native.js.map +0 -1
  646. package/dist/jsx/RichEditor.stories.mjs +0 -291
  647. package/dist/jsx/RichEditor.stories.mjs.map +0 -1
  648. package/dist/jsx/RichEditor.stories.native.js +0 -342
  649. package/dist/jsx/RichEditor.stories.native.js.map +0 -1
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Shared constants for the rich text editor
3
+ */
4
+ import type { NativeCapability } from "./types";
5
+ export interface ColorEntry {
6
+ /** Display name for the color */
7
+ name: string;
8
+ /** CSS color value (theme custom property on web), or null for default/none */
9
+ value: string | null;
10
+ }
11
+ /** A palette entry backed by a theme token instead of a literal color */
12
+ export interface ColorTokenEntry {
13
+ /** Display name for the color */
14
+ name: string;
15
+ /** Theme token key (e.g. "red11"), or null for default/none */
16
+ token: string | null;
17
+ }
18
+ export declare const TEXT_COLOR_TOKENS: ColorTokenEntry[];
19
+ /**
20
+ * Dark-scheme display names for the same tokens: the values are identical
21
+ * (theme vars re-resolve per scheme) — only the neutral ink's honest label
22
+ * flips (color12 renders near-white in dark).
23
+ */
24
+ export declare const TEXT_COLOR_TOKENS_DARK: ColorTokenEntry[];
25
+ /**
26
+ * Highlight washes ride the radix step-5 component backgrounds: pastel in
27
+ * light, deep-dim in dark — the scheme's own ink (color12, inherited by the
28
+ * mark) stays legible on them in both schemes.
29
+ */
30
+ export declare const HIGHLIGHT_COLOR_TOKENS: ColorTokenEntry[];
31
+ export declare const TEXT_COLORS: ColorEntry[];
32
+ export declare const TEXT_COLORS_DARK: ColorEntry[];
33
+ export declare const HIGHLIGHT_COLORS: ColorEntry[];
34
+ /**
35
+ * Every theme token the palettes reference — the single list used to inject
36
+ * resolved CSS custom properties into the native 10Tap webview.
37
+ */
38
+ export declare const PALETTE_THEME_TOKENS: string[];
39
+ /**
40
+ * Maps each EditorCommand to whether 10Tap supports it via bridge extensions.
41
+ *
42
+ * Supported commands use actual bridge methods (ColorBridge, HighlightBridge,
43
+ * ImageBridge, TaskListBridge, etc.).
44
+ *
45
+ * Unsupported commands (subscript, superscript, textAlign, codeBlock,
46
+ * horizontalRule, clearFormatting) have no 10Tap bridge equivalent.
47
+ */
48
+ export declare const NATIVE_SUPPORTED_COMMANDS: NativeCapability;
49
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD,MAAM,WAAW,UAAU;IACzB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAmBD,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAK9C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAInD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAUnD,CAAC;AAcF,eAAO,MAAM,WAAW,EAAE,UAAU,EAAyC,CAAC;AAC9E,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAA8C,CAAC;AACxF,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAA8C,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,EAMxC,CAAC;AAMF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBA2CvC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shared context for the rich text editor compound component
3
+ */
4
+ import type { FontSizeTokens } from "tamagui";
5
+ export declare const RichEditorContext: import("@tamagui/web").StyledContext<{
6
+ size: FontSizeTokens;
7
+ compact: boolean;
8
+ disabled: boolean;
9
+ }>;
10
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,eAAO,MAAM,iBAAiB;UACtB,cAAc;aACX,OAAO;cACN,OAAO;EAKjB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Universal block drag handle extension.
3
+ * Shows a grip icon to the left of the hovered top-level block.
4
+ * Dragging from the handle moves the entire block.
5
+ */
6
+ import { Extension } from "@tiptap/core";
7
+ export declare const BlockDragHandle: Extension<any, any>;
8
+ //# sourceMappingURL=BlockDragHandle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockDragHandle.d.ts","sourceRoot":"","sources":["../../src/editor/BlockDragHandle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAsDzC,eAAO,MAAM,eAAe,qBAyG1B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Extension that intercepts paste events containing markdown-formatted plain
3
+ * text and converts it to HTML before insertion. If the clipboard already
4
+ * contains HTML (e.g. from a web page), the default paste behavior is used.
5
+ */
6
+ import { Extension } from "@tiptap/core";
7
+ export declare const MarkdownPaste: Extension<any, any>;
8
+ //# sourceMappingURL=MarkdownPaste.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownPaste.d.ts","sourceRoot":"","sources":["../../src/editor/MarkdownPaste.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,eAAO,MAAM,aAAa,qBAiCxB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Slash commands extension -- type "/" to open a searchable menu of block
3
+ * types. Uses @tiptap/suggestion for trigger/matching and the shared
4
+ * suggestion popup (LC-16: same list, rows, chrome, and keyboard handling
5
+ * as the @ mention menu).
6
+ */
7
+ import { Extension } from "@tiptap/core";
8
+ import type { Editor, Range } from "@tiptap/core";
9
+ import { type SuggestionRow } from "./suggestionPopup";
10
+ export interface SlashCommandItem {
11
+ /** Stable identifier (also the row key) */
12
+ id: string;
13
+ /** Translated display title */
14
+ title: string;
15
+ /** Translated one-line description */
16
+ description: string;
17
+ icon: SuggestionRow["icon"];
18
+ command: (props: {
19
+ editor: Editor;
20
+ range: Range;
21
+ }) => void;
22
+ }
23
+ export declare const SlashCommands: Extension<any, any>;
24
+ //# sourceMappingURL=SlashCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommands.d.ts","sourceRoot":"","sources":["../../src/editor/SlashCommands.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAsBlD,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAM3B,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5D;AAiMD,eAAO,MAAM,aAAa,qBAgDxB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 10Tap-based rich text editor for React Native
3
+ *
4
+ * Rebuilt to properly use 10Tap bridge extensions:
5
+ * - ColorBridge for text color
6
+ * - HighlightBridge for highlight/background color
7
+ * - ImageBridge for image insertion
8
+ * - TaskListBridge for task lists
9
+ *
10
+ * Uses getEditorStateFromBridge() for state mapping and
11
+ * RichEditorContext for styling from the compound component.
12
+ *
13
+ * No BubbleToolbar (10Tap does not support floating menus).
14
+ */
15
+ import type { RichEditorProps, RichEditorRef } from "../types";
16
+ export interface TentapEditorProps extends RichEditorProps {
17
+ /** Fill the available space (fullscreen modal) instead of using minHeight */
18
+ fill?: boolean;
19
+ }
20
+ export declare const TentapEditor: import("react").ForwardRefExoticComponent<TentapEditorProps & import("react").RefAttributes<RichEditorRef>>;
21
+ //# sourceMappingURL=TentapEditor.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TentapEditor.native.d.ts","sourceRoot":"","sources":["../../src/editor/TentapEditor.native.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA0BH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAiB,MAAM,UAAU,CAAC;AAmB9E,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,6EAA6E;IAC7E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,eAAO,MAAM,YAAY,6GAkPxB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Tiptap-based rich text editor for web
3
+ *
4
+ * Uses extracted utilities:
5
+ * - getEditorCSS() for ProseMirror styles (theme-aware CSS custom properties)
6
+ * - getEditorStateFromTiptap() for state mapping
7
+ * - RichEditorContext for styling context
8
+ * - BubbleToolbar for inline formatting on text selection
9
+ */
10
+ import type { RichEditorProps, RichEditorRef } from "../types";
11
+ export interface TiptapEditorProps extends RichEditorProps {
12
+ /** Show the bubble toolbar on text selection (web only) */
13
+ showBubbleToolbar?: boolean;
14
+ /** CSS font-family string for body text (resolved from knobs) */
15
+ bodyFontFamily?: string;
16
+ /** CSS font-family string for headings (resolved from knobs) */
17
+ headingFontFamily?: string;
18
+ /** Current editing mode: richtext (WYSIWYG) or markdown (raw source) */
19
+ editorMode?: "richtext" | "markdown";
20
+ /** Fullscreen mode: content fills the flex parent and scrolls internally */
21
+ fullscreen?: boolean;
22
+ }
23
+ export declare const TiptapEditor: import("react").NamedExoticComponent<TiptapEditorProps & import("react").RefAttributes<RichEditorRef>>;
24
+ //# sourceMappingURL=TiptapEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TiptapEditor.d.ts","sourceRoot":"","sources":["../../src/editor/TiptapEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuCH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAiB,MAAM,UAAU,CAAC;AAyL9E,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wEAAwE;IACxE,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACrC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAiBD,eAAO,MAAM,YAAY,wGAsgBxB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Block-rect anchoring for bubble menus (web).
3
+ *
4
+ * Tiptap's BubbleMenu anchors to the text caret by default. For tall blocks
5
+ * (tables, code blocks) that puts the bubble INSIDE the block box — hovering
6
+ * over the first table row / first code line, where it traps pointer events
7
+ * and chases the caret on every keystroke. Anchoring to the block's own DOM
8
+ * rect keeps the bubble outside the block (above it, or flipped below by
9
+ * floating-ui), so block content stays clickable and the bubble holds still
10
+ * while typing. GitLab's content editor anchors its table/code chrome the
11
+ * same way.
12
+ */
13
+ import type { Editor } from "@tiptap/core";
14
+ interface BlockVirtualElement {
15
+ getBoundingClientRect: () => DOMRect;
16
+ contextElement: Element;
17
+ }
18
+ /**
19
+ * Returns a floating-ui VirtualElement for the nearest ancestor node of
20
+ * `nodeTypeName` containing the selection, or null when the selection is
21
+ * not inside one (the bubble is hidden by `shouldShow` in that case).
22
+ */
23
+ export declare function getBlockVirtualElement(editor: Editor, nodeTypeName: string): BlockVirtualElement | null;
24
+ export {};
25
+ //# sourceMappingURL=blockAnchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockAnchor.d.ts","sourceRoot":"","sources":["../../src/editor/blockAnchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,UAAU,mBAAmB;IAC3B,qBAAqB,EAAE,MAAM,OAAO,CAAC;IACrC,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,GACnB,mBAAmB,GAAG,IAAI,CAa5B"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Code block with live below-block preview for `mermaid` and `math`
3
+ * languages — GitLab content-editor parity.
4
+ *
5
+ * The code stays a normal editable code block (language picker, copy,
6
+ * tab-indent, lowlight all keep working through contentDOM); when the
7
+ * language is `mermaid` or `math` a preview pane renders below the source:
8
+ *
9
+ * - mermaid: SVG via the canonical `@multiplatform.one/markdown` renderer
10
+ * (LC-16 — one implementation; the engine is dynamically imported on the
11
+ * first diagram, zero eager bytes).
12
+ * - math: display-mode KaTeX via lazyKatex (same discipline).
13
+ *
14
+ * Re-renders are debounced while typing; the previous preview stays
15
+ * visible until the new one lands (no flicker). Invalid source shows the
16
+ * parse error in the pane (Axiom 6: show the error, never blank).
17
+ *
18
+ * `$$ ` at the start of a line opens a math block (GitLab-style display
19
+ * math input); ```mermaid and ```math fences already work through the
20
+ * inherited code block input rule.
21
+ */
22
+ import { Extension } from "@tiptap/core";
23
+ import type { Editor } from "@tiptap/core";
24
+ export interface PreviewChrome {
25
+ /** Color scheme forwarded to the diagram/math renderers */
26
+ scheme: "light" | "dark";
27
+ /** CSS font family forwarded to mermaid's theme config */
28
+ fontFamily?: string;
29
+ }
30
+ interface PreviewChromeStorage {
31
+ value: PreviewChrome;
32
+ listeners: Set<() => void>;
33
+ }
34
+ declare module "@tiptap/core" {
35
+ interface Storage {
36
+ previewChrome: PreviewChromeStorage;
37
+ }
38
+ }
39
+ /**
40
+ * Storage-only extension carrying the resolved scheme for block previews.
41
+ * The editor host pushes values (setPreviewChrome) from React land; node
42
+ * views subscribe so a theme flip re-renders live diagrams.
43
+ */
44
+ export declare const PreviewChromeStore: Extension<any, PreviewChromeStorage>;
45
+ export declare function setPreviewChrome(editor: Editor, chrome: PreviewChrome): void;
46
+ export declare const PREVIEW_LANGUAGES: readonly ["mermaid", "math"];
47
+ export type PreviewLanguage = (typeof PREVIEW_LANGUAGES)[number];
48
+ export declare function getPreviewKind(language: string | null | undefined): PreviewLanguage | null;
49
+ export declare const CodeBlockWithPreview: import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any>;
50
+ export {};
51
+ //# sourceMappingURL=codeBlockPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeBlockPreview.d.ts","sourceRoot":"","sources":["../../src/editor/codeBlockPreview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,SAAS,EAA0B,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAQ3C,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,oBAAoB;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;CAC5B;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,OAAO;QACf,aAAa,EAAE,oBAAoB,CAAC;KACrC;CACF;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,sCAK7B,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAQ5E;AAUD,eAAO,MAAM,iBAAiB,8BAA+B,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAI1F;AAQD,eAAO,MAAM,oBAAoB,4GA0K/B,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * CSS styles for the ProseMirror editor content area.
3
+ *
4
+ * ProseMirror renders its own DOM outside Tamagui, so CSS injection via
5
+ * a <style> tag is necessary. Colors use Tamagui CSS custom properties
6
+ * for theme awareness.
7
+ */
8
+ export interface EditorCSSOptions {
9
+ /** Minimum height of the editor in pixels */
10
+ minHeight?: number;
11
+ /** Maximum height of the editor in pixels (enables scroll) */
12
+ maxHeight?: number;
13
+ /** CSS font-family string for body text */
14
+ bodyFontFamily?: string;
15
+ /** CSS font-family string for headings */
16
+ headingFontFamily?: string;
17
+ /** Fullscreen mode: fill the container instead of min/max pixel heights */
18
+ fullscreen?: boolean;
19
+ /** Bubble/popup fade duration in ms; 0 = animation none (motion silenced) */
20
+ motionMs?: number;
21
+ /** Per-instance scope class so bubble motion rules do not cross editors */
22
+ scopeClass?: string;
23
+ }
24
+ export declare function getEditorCSS(options?: EditorCSSOptions): string;
25
+ //# sourceMappingURL=editorStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editorStyles.d.ts","sourceRoot":"","sources":["../../src/editor/editorStyles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAkanE"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * `:emoji:` autocomplete for the rich text editor (web) — GitLab parity.
3
+ *
4
+ * Third suggestion source on the shared LC-16 popup (same rows, chrome,
5
+ * keyboard handling, and ARIA roles as slash commands and @ mentions).
6
+ * Typing `:` opens a searchable shortname list; selecting inserts the plain
7
+ * unicode character (like GitLab's editor), so the markdown round-trip is
8
+ * lossless by construction — an emoji is just text.
9
+ *
10
+ * Bundle discipline: the emoji dataset (emojilib, ~32 KB gz) is NOT in the
11
+ * editor chunk. It is dynamically imported on the first `:` trigger and
12
+ * cached for the session.
13
+ */
14
+ import { Extension } from "@tiptap/core";
15
+ import type { Editor, Range } from "@tiptap/core";
16
+ export interface EmojiEntry {
17
+ /** Shortname, e.g. "thumbsup" (typed between colons) */
18
+ name: string;
19
+ /** The unicode character inserted into the document */
20
+ char: string;
21
+ /** Search keywords from the dataset */
22
+ keywords: string[];
23
+ }
24
+ /**
25
+ * Loads and flattens the emojilib dataset on first use. The dynamic import
26
+ * keeps the JSON out of the editor chunk (zero eager bytes); the promise is
27
+ * cached so the fetch happens at most once per session.
28
+ */
29
+ export declare function loadEmojiIndex(): Promise<EmojiEntry[]>;
30
+ /** Test seam: reset the cached dataset promise */
31
+ export declare function resetEmojiIndexForTesting(): void;
32
+ /**
33
+ * Ranked shortname search: exact name, name prefix, name substring, then
34
+ * keyword prefix/substring. Ties keep dataset order (faces first), matching
35
+ * the GitLab popup's feel. An empty query lists the head of the dataset.
36
+ */
37
+ export declare function searchEmoji(entries: EmojiEntry[], query: string, limit?: number): EmojiEntry[];
38
+ /** Inserts the unicode character, replacing the `:query` trigger text */
39
+ export declare function insertEmoji(editor: Editor, range: Range, char: string): void;
40
+ /**
41
+ * `:` trigger suggestion menu. Own plugin key — the slash menu owns the
42
+ * default Suggestion key and the two must coexist.
43
+ */
44
+ export declare const EmojiSuggestion: Extension<any, any>;
45
+ //# sourceMappingURL=emoji.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../src/editor/emoji.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAUlD,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AASD;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAatD;AAED,kDAAkD;AAClD,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,UAAU,EAAE,CAmB1F;AAMD,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAE5E;AAID;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAmC1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Editor internal exports
3
+ *
4
+ * These are implementation details used by the compound component.
5
+ * Public API is exported from src/index.ts.
6
+ */
7
+ export { TiptapEditor } from "./TiptapEditor";
8
+ export type { TiptapEditorProps } from "./TiptapEditor";
9
+ export { getEditorCSS } from "./editorStyles";
10
+ export { getEditorStateFromTiptap, getEditorStateFromBridge } from "./useEditorState";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Lazy KaTeX renderer for `$...$` inline and `$$...$$` block math.
3
+ *
4
+ * Bundle discipline: KaTeX (~70 KB gz JS + CSS + fonts) never rides the
5
+ * editor chunk. Both the library and its stylesheet load through dynamic
6
+ * import on the first math render and are cached for the session. The
7
+ * stylesheet colors inherit `currentColor`, so dark schemes work without
8
+ * a separate dark CSS pass.
9
+ *
10
+ * The result contract is Axiom 6 friendly — invalid TeX returns
11
+ * `{ ok: false, error }` with KaTeX's parse message so callers can show
12
+ * the error instead of a blank node.
13
+ */
14
+ export type KatexRenderResult = {
15
+ ok: true;
16
+ html: string;
17
+ } | {
18
+ ok: false;
19
+ error: string;
20
+ };
21
+ /** Renders TeX to KaTeX HTML markup (display mode for `$$` blocks) */
22
+ export declare function renderKatexHtml(latex: string, options?: {
23
+ displayMode?: boolean;
24
+ }): Promise<KatexRenderResult>;
25
+ /**
26
+ * Mounts KaTeX markup as real DOM nodes. KaTeX output is spans + MathML by
27
+ * construction; parsing inert and stripping executables is defense in
28
+ * depth, mirroring the mermaid mount helper.
29
+ */
30
+ export declare function mountKatexHtml(container: HTMLElement, html: string): void;
31
+ /** Test seam: reset the cached library promise */
32
+ export declare function resetKatexForTesting(): void;
33
+ //# sourceMappingURL=lazyKatex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazyKatex.d.ts","sourceRoot":"","sources":["../../src/editor/lazyKatex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAiB1F,sEAAsE;AACtE,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,OAAO,CAAC,iBAAiB,CAAC,CAY5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQzE;AAED,kDAAkD;AAClD,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Canonical HTML <-> Markdown conversion for the rich text editor (web).
3
+ *
4
+ * One implementation (LC-16) shared by the markdown source mode toggle and
5
+ * the markdown paste handler. GFM coverage beyond turndown's defaults:
6
+ * strikethrough, task lists (Tiptap's label-nested checkbox markup), and
7
+ * pipe tables. Marks with no markdown syntax (underline, sub/superscript,
8
+ * highlight, text color spans) survive as inline HTML so the
9
+ * rich -> markdown -> rich round-trip is lossless for every toolbar feature.
10
+ *
11
+ * GitLab-flavored extras (round-trip lossless):
12
+ * - `$x$` inline math <-> `<span data-type="inline-math" data-latex>`
13
+ * - `$$ ... $$` block math <-> code block with language "math"
14
+ * (``` math fences parse to the same node; `$$` is the canonical output)
15
+ * - ```mermaid fences <-> code block with language "mermaid" (turndown's
16
+ * fenced rule + marked's language classes handle this natively)
17
+ * - `<details>` collapsible sections stay raw HTML in markdown, exactly
18
+ * like GitLab renders them
19
+ */
20
+ /** Convert editor HTML to GFM markdown */
21
+ export declare function htmlToMarkdown(html: string): string;
22
+ /** Convert GFM markdown to HTML the Tiptap schema can ingest */
23
+ export declare function markdownToHtml(markdown: string): string;
24
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/editor/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkIH,0CAA0C;AAC1C,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD;AA4FD,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGvD"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Inline math node (`$x^2$`) rendered with lazy-loaded KaTeX — GitLab
3
+ * parity for dollar math in the rich text editor.
4
+ *
5
+ * - Typing `$latex$` converts to a rendered formula (input rule; prices
6
+ * like "$5 and $10" never convert — content cannot start/end with
7
+ * whitespace).
8
+ * - The node is an inline atom carrying the raw TeX in `data-latex`; the
9
+ * MathBubble edits it in place (updateInlineMath command).
10
+ * - Invalid TeX shows the raw source in an error style with the KaTeX
11
+ * parse message (Axiom 6: show the error, never blank).
12
+ * - Block math (`$$ ... $$`) is a code block with language "math" — see
13
+ * codeBlockPreview.ts — matching GitLab's ```math fence model.
14
+ *
15
+ * Serialization: `<span data-type="inline-math" data-latex="...">` <->
16
+ * `$...$` (editor/markdown.ts), so the source toggle is lossless.
17
+ */
18
+ import { Node } from "@tiptap/core";
19
+ export interface InlineMathOptions {
20
+ HTMLAttributes: Record<string, any>;
21
+ }
22
+ declare module "@tiptap/core" {
23
+ interface Commands<ReturnType> {
24
+ inlineMath: {
25
+ /** Inserts an inline math node and selects it (opens the MathBubble) */
26
+ insertInlineMath: (attributes?: {
27
+ latex?: string;
28
+ }) => ReturnType;
29
+ /** Updates the latex of the selected inline math node */
30
+ updateInlineMath: (attributes: {
31
+ latex: string;
32
+ }) => ReturnType;
33
+ };
34
+ }
35
+ }
36
+ /**
37
+ * Matches `$...$` as the last thing typed. match[1] is the dollar span
38
+ * (what the node replaces), match[2] the TeX. The character before the
39
+ * opening `$` must not be another `$` (that is block math), and content
40
+ * cannot start/end with whitespace or contain `$`/newlines.
41
+ */
42
+ export declare const INLINE_MATH_INPUT_RULE: RegExp;
43
+ export declare const InlineMath: Node<InlineMathOptions, any>;
44
+ //# sourceMappingURL=mathematics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mathematics.d.ts","sourceRoot":"","sources":["../../src/editor/mathematics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAKpE,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACrC;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,UAAU,EAAE;YACV,wEAAwE;YACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,EAAE;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,KAAK,UAAU,CAAC;YAClE,yDAAyD;YACzD,gBAAgB,EAAE,CAAC,UAAU,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAA;aAAE,KAAK,UAAU,CAAC;SACjE,CAAC;KACH;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QAAsD,CAAC;AAE1F,eAAO,MAAM,UAAU,8BAoIrB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Image / attachment paste-and-drop handling (web).
3
+ *
4
+ * Files pasted or dropped into the editor route through prop-driven upload
5
+ * hooks -- the package assumes no backend:
6
+ * - Images: `onImageUpload(file) -> Promise<url>` inserts an image node at
7
+ * the paste/drop position. Without a hook, images fall back to an inline
8
+ * base64 data URI so the flow still works in demos and offline hosts.
9
+ * - Other files: `onFileUpload(file) -> Promise<{ url, name? }>` inserts an
10
+ * attachment chip (a link with `data-attachment`). Without a hook there is
11
+ * no URL to link, so the file is ignored (honest no-op).
12
+ */
13
+ import { Extension } from "@tiptap/core";
14
+ export interface MediaUploadHandlers {
15
+ /** Uploads a pasted/dropped image and resolves its URL */
16
+ onImageUpload?: (file: File) => Promise<string>;
17
+ /** Uploads a pasted/dropped non-image file and resolves its URL (+ display name) */
18
+ onFileUpload?: (file: File) => Promise<{
19
+ url: string;
20
+ name?: string;
21
+ }>;
22
+ }
23
+ export interface MediaUploadStorage {
24
+ handlers: MediaUploadHandlers;
25
+ }
26
+ declare module "@tiptap/core" {
27
+ interface Storage {
28
+ mediaUpload: MediaUploadStorage;
29
+ }
30
+ }
31
+ export declare const MediaUpload: Extension<any, MediaUploadStorage>;
32
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/editor/media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,oFAAoF;IACpF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxE;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,OAAO;QACf,WAAW,EAAE,kBAAkB,CAAC;KACjC;CACF;AAyDD,eAAO,MAAM,WAAW,oCA2CtB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @ mention support for the rich text editor (web).
3
+ *
4
+ * Reuses the forms `MentionItem` contract (LC-16: same suggestion data
5
+ * shape as `MentionInput`) and the shared suggestion popup (same rows,
6
+ * chrome, and keyboard handling as the slash menu). The host wires data via
7
+ * the `mentions` prop -- the package assumes no backend.
8
+ *
9
+ * Inserted mentions are Tiptap mention nodes rendered as
10
+ * `<span data-type="mention" data-id="...">@label</span>` chips.
11
+ */
12
+ import type { RichTextMentionOptions } from "../types";
13
+ export type { RichTextMentionOptions };
14
+ export declare function createMentionExtension(options: RichTextMentionOptions): import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
15
+ //# sourceMappingURL=mentions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mentions.d.ts","sourceRoot":"","sources":["../../src/editor/mentions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIvD,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAUvC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,mJA2BrE"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Paste sanitizer for HTML clipboard payloads from Google Docs and
3
+ * Microsoft Word/Outlook.
4
+ *
5
+ * Both sources wrap content in junk that either breaks ProseMirror parsing
6
+ * or smuggles presentation into the document:
7
+ * - Google Docs wraps the entire fragment in
8
+ * `<b style="font-weight:normal" id="docs-internal-guid-...">` (which
9
+ * ProseMirror would read as bold) and inlines font/size styles on spans.
10
+ * - Word ships `<o:p>` tags, `Mso*` classes, `mso-*` style declarations,
11
+ * XML islands, and conditional comments.
12
+ *
13
+ * The cleanup keeps semantics (b/strong/i/em/u/lists/headings/links and
14
+ * color/background-color styles the editor actually supports) and drops
15
+ * the rest. Non-office HTML passes through untouched.
16
+ */
17
+ /** True when the clipboard HTML comes from Google Docs or Microsoft Office */
18
+ export declare function isOfficeHtml(html: string): boolean;
19
+ /**
20
+ * Sanitize office-suite clipboard HTML. Non-office HTML is returned as-is
21
+ * (regular web copy already parses cleanly).
22
+ */
23
+ export declare function cleanPastedHtml(html: string): string;
24
+ //# sourceMappingURL=pasteCleanup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pasteCleanup.d.ts","sourceRoot":"","sources":["../../src/editor/pasteCleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAWH,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElD;AAmED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAuBpD"}