@forgedevstack/ink 1.1.8 → 1.2.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 (306) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/dist/common-components/Box/Box.cjs +1 -1
  3. package/dist/common-components/Box/Box.js +7 -6
  4. package/dist/common-components/Button/Button.cjs +1 -1
  5. package/dist/common-components/Button/Button.js +9 -8
  6. package/dist/common-components/Canvas/Canvas.cjs +1 -1
  7. package/dist/common-components/Canvas/Canvas.js +3 -2
  8. package/dist/common-components/ContextMenu/ContextMenu.cjs +1 -1
  9. package/dist/common-components/ContextMenu/ContextMenu.js +3 -2
  10. package/dist/common-components/Field/Field.cjs +1 -1
  11. package/dist/common-components/Field/Field.js +11 -10
  12. package/dist/common-components/icons/GripIcon.cjs +1 -1
  13. package/dist/common-components/icons/GripIcon.js +3 -2
  14. package/dist/components/InkEditor/InkEditor.cjs +1 -1
  15. package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
  16. package/dist/components/InkEditor/InkEditor.js +1301 -1006
  17. package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -1
  18. package/dist/components/InkEditor/components/AiPanel/AiPanel.js +13 -12
  19. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.cjs +1 -0
  20. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.cjs +1 -0
  21. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.d.ts +20 -0
  22. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.d.ts.map +1 -0
  23. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.js +25 -0
  24. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.d.ts +4 -0
  25. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.d.ts.map +1 -0
  26. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.js +61 -0
  27. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.types.d.ts +11 -0
  28. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.types.d.ts.map +1 -0
  29. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.cjs +1 -0
  30. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.d.ts +19 -0
  31. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.d.ts.map +1 -0
  32. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.js +30 -0
  33. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.test.d.ts +2 -0
  34. package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.test.d.ts.map +1 -0
  35. package/dist/components/InkEditor/components/AiSelectionBubble/index.d.ts +4 -0
  36. package/dist/components/InkEditor/components/AiSelectionBubble/index.d.ts.map +1 -0
  37. package/dist/components/InkEditor/components/BlockHandles/BlockHandles.cjs +1 -1
  38. package/dist/components/InkEditor/components/BlockHandles/BlockHandles.js +7 -6
  39. package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.cjs +1 -1
  40. package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.d.ts +2 -0
  41. package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.d.ts.map +1 -1
  42. package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.js +16 -15
  43. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.cjs +1 -1
  44. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.js +14 -13
  45. package/dist/components/InkEditor/components/FindReplace/FindReplace.cjs +1 -1
  46. package/dist/components/InkEditor/components/FindReplace/FindReplace.js +21 -20
  47. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.cjs +1 -1
  48. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.js +17 -16
  49. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.cjs +1 -1
  50. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.js +3 -2
  51. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.cjs +1 -1
  52. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.js +7 -6
  53. package/dist/components/InkEditor/components/ImageFrame/ImageFrame.cjs +1 -0
  54. package/dist/components/InkEditor/components/ImageFrame/ImageFrame.d.ts +8 -0
  55. package/dist/components/InkEditor/components/ImageFrame/ImageFrame.d.ts.map +1 -0
  56. package/dist/components/InkEditor/components/ImageFrame/ImageFrame.js +54 -0
  57. package/dist/components/InkEditor/components/ImageFrame/index.d.ts +3 -0
  58. package/dist/components/InkEditor/components/ImageFrame/index.d.ts.map +1 -0
  59. package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.cjs +1 -1
  60. package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.js +11 -10
  61. package/dist/components/InkEditor/components/MentionMenu/MentionMenu.cjs +1 -0
  62. package/dist/components/InkEditor/components/MentionMenu/MentionMenu.d.ts +16 -0
  63. package/dist/components/InkEditor/components/MentionMenu/MentionMenu.d.ts.map +1 -0
  64. package/dist/components/InkEditor/components/MentionMenu/MentionMenu.js +21 -0
  65. package/dist/components/InkEditor/components/MentionMenu/index.d.ts +3 -0
  66. package/dist/components/InkEditor/components/MentionMenu/index.d.ts.map +1 -0
  67. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.cjs +1 -1
  68. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.js +11 -10
  69. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.cjs +1 -0
  70. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.cjs +1 -0
  71. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.d.ts +7 -0
  72. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.d.ts.map +1 -0
  73. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.js +9 -0
  74. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.d.ts +4 -0
  75. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.d.ts.map +1 -0
  76. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.js +83 -0
  77. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.types.d.ts +8 -0
  78. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.types.d.ts.map +1 -0
  79. package/dist/components/InkEditor/components/PresenceStack/index.d.ts +3 -0
  80. package/dist/components/InkEditor/components/PresenceStack/index.d.ts.map +1 -0
  81. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.cjs +1 -0
  82. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.cjs +1 -0
  83. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.d.ts +7 -0
  84. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.d.ts.map +1 -0
  85. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.js +10 -0
  86. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.d.ts +4 -0
  87. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.d.ts.map +1 -0
  88. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.js +66 -0
  89. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.types.d.ts +6 -0
  90. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.types.d.ts.map +1 -0
  91. package/dist/components/InkEditor/components/RemoteCursors/index.d.ts +3 -0
  92. package/dist/components/InkEditor/components/RemoteCursors/index.d.ts.map +1 -0
  93. package/dist/components/InkEditor/components/SignPad/SignPad.cjs +1 -1
  94. package/dist/components/InkEditor/components/SignPad/SignPad.js +7 -6
  95. package/dist/components/InkEditor/components/SlashMenu/SlashMenu.cjs +1 -1
  96. package/dist/components/InkEditor/components/SlashMenu/SlashMenu.js +7 -6
  97. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.cjs +1 -1
  98. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.cjs +1 -1
  99. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.js +8 -7
  100. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.js +7 -6
  101. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.cjs +1 -1
  102. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.js +7 -6
  103. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.cjs +1 -1
  104. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.js +3 -2
  105. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
  106. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +13 -12
  107. package/dist/components/InkEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
  108. package/dist/components/InkEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +9 -8
  109. package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.cjs +1 -1
  110. package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.cjs +1 -1
  111. package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.js +9 -8
  112. package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.js +9 -8
  113. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
  114. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.js +19 -18
  115. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.cjs +1 -1
  116. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.js +6 -5
  117. package/dist/components/InkEditor/components/VersionHistory/VersionHistory.cjs +1 -0
  118. package/dist/components/InkEditor/components/VersionHistory/VersionHistory.d.ts +11 -0
  119. package/dist/components/InkEditor/components/VersionHistory/VersionHistory.d.ts.map +1 -0
  120. package/dist/components/InkEditor/components/VersionHistory/VersionHistory.js +22 -0
  121. package/dist/components/InkEditor/components/VersionHistory/index.d.ts +3 -0
  122. package/dist/components/InkEditor/components/VersionHistory/index.d.ts.map +1 -0
  123. package/dist/components/InkEditor/components/index.d.ts +11 -0
  124. package/dist/components/InkEditor/components/index.d.ts.map +1 -1
  125. package/dist/components/InkEditor/helpers/format.utils.cjs +3 -2
  126. package/dist/components/InkEditor/helpers/format.utils.d.ts +1 -0
  127. package/dist/components/InkEditor/helpers/format.utils.d.ts.map +1 -1
  128. package/dist/components/InkEditor/helpers/format.utils.js +106 -84
  129. package/dist/components/InkEditor/helpers/index.d.ts +1 -1
  130. package/dist/components/InkEditor/helpers/index.d.ts.map +1 -1
  131. package/dist/components/InkTabs/InkTabs.cjs +1 -0
  132. package/dist/components/InkTabs/InkTabs.d.ts +4 -0
  133. package/dist/components/InkTabs/InkTabs.d.ts.map +1 -0
  134. package/dist/components/InkTabs/InkTabs.js +104 -0
  135. package/dist/components/InkTabs/index.d.ts +2 -0
  136. package/dist/components/InkTabs/index.d.ts.map +1 -0
  137. package/dist/components/InkWorkspace/InkWorkspace.cjs +1 -0
  138. package/dist/components/InkWorkspace/InkWorkspace.d.ts +4 -0
  139. package/dist/components/InkWorkspace/InkWorkspace.d.ts.map +1 -0
  140. package/dist/components/InkWorkspace/InkWorkspace.js +309 -0
  141. package/dist/components/InkWorkspace/components/WorkspaceIcons.cjs +1 -0
  142. package/dist/components/InkWorkspace/components/WorkspaceIcons.d.ts +11 -0
  143. package/dist/components/InkWorkspace/components/WorkspaceIcons.d.ts.map +1 -0
  144. package/dist/components/InkWorkspace/components/WorkspaceIcons.js +39 -0
  145. package/dist/components/InkWorkspace/hooks/useInkWorkspace.cjs +1 -0
  146. package/dist/components/InkWorkspace/hooks/useInkWorkspace.d.ts +30 -0
  147. package/dist/components/InkWorkspace/hooks/useInkWorkspace.d.ts.map +1 -0
  148. package/dist/components/InkWorkspace/hooks/useInkWorkspace.js +73 -0
  149. package/dist/components/InkWorkspace/index.d.ts +4 -0
  150. package/dist/components/InkWorkspace/index.d.ts.map +1 -0
  151. package/dist/components/index.d.ts +2 -0
  152. package/dist/components/index.d.ts.map +1 -1
  153. package/dist/constants/collab.const.cjs +1 -0
  154. package/dist/constants/collab.const.d.ts +20 -0
  155. package/dist/constants/collab.const.d.ts.map +1 -0
  156. package/dist/constants/collab.const.js +54 -0
  157. package/dist/constants/contextMenu.const.cjs +1 -1
  158. package/dist/constants/contextMenu.const.d.ts +8 -0
  159. package/dist/constants/contextMenu.const.d.ts.map +1 -1
  160. package/dist/constants/contextMenu.const.js +30 -22
  161. package/dist/constants/defaultIcons.cjs +1 -1
  162. package/dist/constants/defaultIcons.js +6 -5
  163. package/dist/constants/defaults.const.cjs +1 -1
  164. package/dist/constants/defaults.const.d.ts.map +1 -1
  165. package/dist/constants/defaults.const.js +150 -138
  166. package/dist/constants/index.d.ts +2 -0
  167. package/dist/constants/index.d.ts.map +1 -1
  168. package/dist/constants/numbers.cjs +1 -1
  169. package/dist/constants/numbers.js +43 -37
  170. package/dist/constants/toolbar.const.cjs +1 -1
  171. package/dist/constants/toolbar.const.d.ts +7 -0
  172. package/dist/constants/toolbar.const.d.ts.map +1 -1
  173. package/dist/constants/toolbar.const.js +16 -9
  174. package/dist/constants/toolbarMenu.const.cjs +1 -1
  175. package/dist/constants/toolbarMenu.const.d.ts.map +1 -1
  176. package/dist/constants/toolbarMenu.const.js +25 -11
  177. package/dist/constants/workspace.const.cjs +1 -0
  178. package/dist/constants/workspace.const.d.ts +24 -0
  179. package/dist/constants/workspace.const.d.ts.map +1 -0
  180. package/dist/constants/workspace.const.js +23 -0
  181. package/dist/hooks/index.d.ts +2 -0
  182. package/dist/hooks/index.d.ts.map +1 -1
  183. package/dist/hooks/useInkCollaboration.cjs +1 -0
  184. package/dist/hooks/useInkCollaboration.d.ts +4 -0
  185. package/dist/hooks/useInkCollaboration.d.ts.map +1 -0
  186. package/dist/hooks/useInkCollaboration.js +87 -0
  187. package/dist/hooks/useToolbarOverflow.cjs +1 -1
  188. package/dist/hooks/useToolbarOverflow.js +12 -11
  189. package/dist/index.cjs +1 -1
  190. package/dist/index.d.ts +5 -3
  191. package/dist/index.d.ts.map +1 -1
  192. package/dist/index.js +151 -135
  193. package/dist/plugins/ai/demoProvider.cjs +1 -1
  194. package/dist/plugins/ai/demoProvider.js +3 -2
  195. package/dist/plugins/ai/index.cjs +1 -1
  196. package/dist/plugins/ai/index.js +25 -24
  197. package/dist/plugins/excel/excel.utils.cjs +1 -1
  198. package/dist/plugins/excel/excel.utils.js +17 -16
  199. package/dist/plugins/graph/graph.utils.cjs +1 -1
  200. package/dist/plugins/graph/graph.utils.js +7 -6
  201. package/dist/plugins/titles/titles.const.cjs +1 -1
  202. package/dist/plugins/titles/titles.const.js +9 -8
  203. package/dist/plugins/titles/titles.utils.cjs +1 -1
  204. package/dist/plugins/titles/titles.utils.js +3 -2
  205. package/dist/styles.css +1 -1
  206. package/dist/types/collab.types.d.ts +54 -0
  207. package/dist/types/collab.types.d.ts.map +1 -0
  208. package/dist/types/features.types.d.ts +1 -1
  209. package/dist/types/features.types.d.ts.map +1 -1
  210. package/dist/types/index.d.ts +2 -0
  211. package/dist/types/index.d.ts.map +1 -1
  212. package/dist/types/ink.types.d.ts +3 -1
  213. package/dist/types/ink.types.d.ts.map +1 -1
  214. package/dist/types/workspace.types.d.ts +54 -0
  215. package/dist/types/workspace.types.d.ts.map +1 -0
  216. package/dist/utils/blocks.utils.cjs +1 -1
  217. package/dist/utils/blocks.utils.js +19 -18
  218. package/dist/utils/collab.utils.cjs +1 -0
  219. package/dist/utils/collab.utils.d.ts +5 -0
  220. package/dist/utils/collab.utils.d.ts.map +1 -0
  221. package/dist/utils/collab.utils.js +33 -0
  222. package/dist/utils/collab.utils.test.d.ts +2 -0
  223. package/dist/utils/collab.utils.test.d.ts.map +1 -0
  224. package/dist/utils/comments.utils.cjs +1 -1
  225. package/dist/utils/comments.utils.d.ts +4 -0
  226. package/dist/utils/comments.utils.d.ts.map +1 -1
  227. package/dist/utils/comments.utils.js +26 -18
  228. package/dist/utils/comments.utils.test.d.ts +2 -0
  229. package/dist/utils/comments.utils.test.d.ts.map +1 -0
  230. package/dist/utils/exportDocument.utils.cjs +2 -0
  231. package/dist/utils/exportDocument.utils.d.ts +16 -0
  232. package/dist/utils/exportDocument.utils.d.ts.map +1 -0
  233. package/dist/utils/exportDocument.utils.js +85 -0
  234. package/dist/utils/exportDocument.utils.test.d.ts +2 -0
  235. package/dist/utils/exportDocument.utils.test.d.ts.map +1 -0
  236. package/dist/utils/formatPainter.utils.cjs +1 -0
  237. package/dist/utils/formatPainter.utils.d.ts +11 -0
  238. package/dist/utils/formatPainter.utils.d.ts.map +1 -0
  239. package/dist/utils/formatPainter.utils.js +20 -0
  240. package/dist/utils/formatPainter.utils.test.d.ts +2 -0
  241. package/dist/utils/formatPainter.utils.test.d.ts.map +1 -0
  242. package/dist/utils/history.utils.cjs +1 -1
  243. package/dist/utils/history.utils.js +3 -2
  244. package/dist/utils/image.utils.cjs +1 -0
  245. package/dist/utils/image.utils.d.ts +14 -0
  246. package/dist/utils/image.utils.d.ts.map +1 -0
  247. package/dist/utils/image.utils.js +33 -0
  248. package/dist/utils/image.utils.test.d.ts +2 -0
  249. package/dist/utils/image.utils.test.d.ts.map +1 -0
  250. package/dist/utils/index.d.ts +12 -3
  251. package/dist/utils/index.d.ts.map +1 -1
  252. package/dist/utils/ink.brand.test.d.ts +2 -0
  253. package/dist/utils/ink.brand.test.d.ts.map +1 -0
  254. package/dist/utils/license.utils.cjs +1 -1
  255. package/dist/utils/license.utils.js +8 -7
  256. package/dist/utils/markdown.utils.cjs +11 -0
  257. package/dist/utils/markdown.utils.d.ts +7 -0
  258. package/dist/utils/markdown.utils.d.ts.map +1 -0
  259. package/dist/utils/markdown.utils.js +87 -0
  260. package/dist/utils/markdown.utils.test.d.ts +2 -0
  261. package/dist/utils/markdown.utils.test.d.ts.map +1 -0
  262. package/dist/utils/mentions.utils.cjs +1 -0
  263. package/dist/utils/mentions.utils.d.ts +13 -0
  264. package/dist/utils/mentions.utils.d.ts.map +1 -0
  265. package/dist/utils/mentions.utils.js +23 -0
  266. package/dist/utils/mentions.utils.test.d.ts +2 -0
  267. package/dist/utils/mentions.utils.test.d.ts.map +1 -0
  268. package/dist/utils/outline.utils.cjs +1 -1
  269. package/dist/utils/outline.utils.js +9 -8
  270. package/dist/utils/paste.utils.cjs +1 -1
  271. package/dist/utils/paste.utils.d.ts +2 -0
  272. package/dist/utils/paste.utils.d.ts.map +1 -1
  273. package/dist/utils/paste.utils.js +53 -19
  274. package/dist/utils/paste.utils.test.d.ts +2 -0
  275. package/dist/utils/paste.utils.test.d.ts.map +1 -0
  276. package/dist/utils/premium.utils.cjs +1 -1
  277. package/dist/utils/premium.utils.js +12 -11
  278. package/dist/utils/selection.utils.cjs +1 -1
  279. package/dist/utils/selection.utils.js +3 -2
  280. package/dist/utils/slash.utils.cjs +1 -1
  281. package/dist/utils/slash.utils.js +10 -9
  282. package/dist/utils/table.utils.cjs +1 -1
  283. package/dist/utils/table.utils.d.ts +8 -0
  284. package/dist/utils/table.utils.d.ts.map +1 -1
  285. package/dist/utils/table.utils.js +78 -54
  286. package/dist/utils/toolbarStorage.utils.cjs +1 -1
  287. package/dist/utils/toolbarStorage.utils.js +15 -14
  288. package/dist/utils/trackChanges.utils.cjs +1 -1
  289. package/dist/utils/trackChanges.utils.js +9 -8
  290. package/dist/utils/typo.utils.cjs +1 -1
  291. package/dist/utils/typo.utils.js +8 -7
  292. package/dist/utils/versions.utils.cjs +1 -0
  293. package/dist/utils/versions.utils.d.ts +11 -0
  294. package/dist/utils/versions.utils.d.ts.map +1 -0
  295. package/dist/utils/versions.utils.js +36 -0
  296. package/dist/utils/versions.utils.test.d.ts +2 -0
  297. package/dist/utils/versions.utils.test.d.ts.map +1 -0
  298. package/dist/utils/words.utils.cjs +1 -1
  299. package/dist/utils/words.utils.js +3 -2
  300. package/dist/utils/workspace.utils.cjs +1 -0
  301. package/dist/utils/workspace.utils.d.ts +5 -0
  302. package/dist/utils/workspace.utils.d.ts.map +1 -0
  303. package/dist/utils/workspace.utils.js +26 -0
  304. package/dist/utils/workspace.utils.test.d.ts +2 -0
  305. package/dist/utils/workspace.utils.test.d.ts.map +1 -0
  306. package/package.json +1 -1
@@ -1,26 +1,27 @@
1
- import { jsx as t, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as f } from "react/jsx-runtime";
2
2
  import { EMPTY_STRING as N } from "../../../../constants/generals.const.js";
3
3
  import { INK_CLASS_TOOL_WRAP as _, INK_CLASS_PLUGIN_PIP as I } from "../../../../constants/defaults.const.js";
4
4
  import "../../../../constants/openai.const.js";
5
5
  import "../../../../utils/paste.utils.js";
6
+ import "../../../../utils/exportDocument.utils.js";
6
7
  import { Button as L } from "../../../../common-components/Button/Button.js";
7
8
  import "react";
8
9
  import "react-dom";
9
- const x = (a) => {
10
+ const A = (a) => {
10
11
  const {
11
- icon: l,
12
+ icon: i,
12
13
  title: e,
13
- hint: i,
14
+ hint: l,
14
15
  onHint: o,
15
16
  pluginColor: r,
16
- active: s = !1,
17
+ active: t = !1,
17
18
  onClick: n,
18
19
  disabled: m = !1,
19
20
  className: p
20
21
  } = a, c = (d) => {
21
22
  d.preventDefault();
22
- }, u = i || e;
23
- return /* @__PURE__ */ t(
23
+ }, u = l || e;
24
+ return /* @__PURE__ */ s(
24
25
  "span",
25
26
  {
26
27
  className: _,
@@ -31,15 +32,15 @@ const x = (a) => {
31
32
  {
32
33
  title: e,
33
34
  "aria-label": e,
34
- "aria-pressed": s,
35
+ "aria-pressed": t,
35
36
  disabled: m,
36
- active: s,
37
+ active: t,
37
38
  className: p,
38
39
  onMouseDown: c,
39
40
  onClick: n,
40
41
  children: [
41
- l,
42
- r ? /* @__PURE__ */ t("span", { className: I, style: { background: r }, "aria-hidden": !0 }) : null
42
+ i,
43
+ r ? /* @__PURE__ */ s("span", { className: I, style: { background: r }, "aria-hidden": !0 }) : null
43
44
  ]
44
45
  }
45
46
  )
@@ -47,5 +48,5 @@ const x = (a) => {
47
48
  );
48
49
  };
49
50
  export {
50
- x as ToolbarButton
51
+ A as ToolbarButton
51
52
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const u=a=>{const{value:t,onChange:s,title:l,disabled:i=!1,type:o="text"}=a,n=r=>{s(r.target.value)};return e.jsxs("label",{className:"Ink-Editor__color",title:l,"aria-label":l,children:[e.jsx("span",{className:"Ink-Editor__color-swatch",style:{background:t},"data-type":o}),e.jsx("input",{type:"color",value:t,disabled:i,onChange:n,list:`ink-colors-${o}`}),e.jsx("datalist",{id:`ink-colors-${o}`,children:c.INK_COLOR_SWATCHES.map(r=>e.jsx("option",{value:r},r))})]})};exports.ToolbarColorPicker=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");require("react");require("react-dom");const u=a=>{const{value:t,onChange:s,title:l,disabled:i=!1,type:o="text"}=a,n=r=>{s(r.target.value)};return e.jsxs("label",{className:"Ink-Editor__color",title:l,"aria-label":l,children:[e.jsx("span",{className:"Ink-Editor__color-swatch",style:{background:t},"data-type":o}),e.jsx("input",{type:"color",value:t,disabled:i,onChange:n,list:`ink-colors-${o}`}),e.jsx("datalist",{id:`ink-colors-${o}`,children:c.INK_COLOR_SWATCHES.map(r=>e.jsx("option",{value:r},r))})]})};exports.ToolbarColorPicker=u;
@@ -1,28 +1,29 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { INK_COLOR_SWATCHES as c } from "../../../../constants/defaults.const.js";
2
+ import { INK_COLOR_SWATCHES as p } from "../../../../constants/defaults.const.js";
3
3
  import "../../../../constants/openai.const.js";
4
4
  import "../../../../utils/paste.utils.js";
5
+ import "../../../../utils/exportDocument.utils.js";
5
6
  import "react";
6
7
  import "react-dom";
7
- const u = (r) => {
8
- const { value: e, onChange: n, title: l, disabled: i = !1, type: a = "text" } = r;
9
- return /* @__PURE__ */ s("label", { className: "Ink-Editor__color", title: l, "aria-label": l, children: [
8
+ const _ = (l) => {
9
+ const { value: e, onChange: i, title: r, disabled: n = !1, type: a = "text" } = l;
10
+ return /* @__PURE__ */ s("label", { className: "Ink-Editor__color", title: r, "aria-label": r, children: [
10
11
  /* @__PURE__ */ t("span", { className: "Ink-Editor__color-swatch", style: { background: e }, "data-type": a }),
11
12
  /* @__PURE__ */ t(
12
13
  "input",
13
14
  {
14
15
  type: "color",
15
16
  value: e,
16
- disabled: i,
17
+ disabled: n,
17
18
  onChange: (o) => {
18
- n(o.target.value);
19
+ i(o.target.value);
19
20
  },
20
21
  list: `ink-colors-${a}`
21
22
  }
22
23
  ),
23
- /* @__PURE__ */ t("datalist", { id: `ink-colors-${a}`, children: c.map((o) => /* @__PURE__ */ t("option", { value: o }, o)) })
24
+ /* @__PURE__ */ t("datalist", { id: `ink-colors-${a}`, children: p.map((o) => /* @__PURE__ */ t("option", { value: o }, o)) })
24
25
  ] });
25
26
  };
26
27
  export {
27
- u as ToolbarColorPicker
28
+ _ as ToolbarColorPicker
28
29
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("../../../../constants/toolbarMenu.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const C=require("../../../../common-components/Button/Button.cjs");require("react");require("react-dom");const s=require("./ToolbarCustomize.const.cjs"),I=t=>{const{open:T,options:n,visibleItems:O,onToggle:a,onClose:i,title:r=s.TOOLBAR_CUSTOMIZE_DEFAULT_TITLE,closeLabel:c=s.TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE,listAriaLabel:o=s.TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA}=t;if(!T)return null;const _=new Set(O);return e.jsxs("div",{className:s.TOOLBAR_CUSTOMIZE_CLASS,"aria-label":r,children:[e.jsx("p",{className:s.TOOLBAR_CUSTOMIZE_TITLE_CLASS,children:r}),e.jsx("ul",{className:s.TOOLBAR_CUSTOMIZE_LIST_CLASS,"aria-label":o,children:n.map(l=>{const L=_.has(l),S=A.TOOLBAR_OPTION_LABELS[l]??l;return e.jsx("li",{className:s.TOOLBAR_CUSTOMIZE_ITEM_CLASS,children:e.jsxs("label",{children:[e.jsx("input",{type:s.TOOLBAR_CUSTOMIZE_INPUT_TYPE,checked:L,onChange:u=>a(l,u.target.checked)}),e.jsx("span",{children:S})]})},l)})}),e.jsx("div",{className:s.TOOLBAR_CUSTOMIZE_ACTIONS_CLASS,children:e.jsx(C.Button,{type:"button",onClick:i,children:c})})]})};exports.ToolbarCustomize=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("../../../../constants/toolbarMenu.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");const C=require("../../../../common-components/Button/Button.cjs");require("react");require("react-dom");const s=require("./ToolbarCustomize.const.cjs"),I=t=>{const{open:T,options:n,visibleItems:i,onToggle:O,onClose:a,title:l=s.TOOLBAR_CUSTOMIZE_DEFAULT_TITLE,closeLabel:c=s.TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE,listAriaLabel:o=s.TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA}=t;if(!T)return null;const _=new Set(i);return e.jsxs("div",{className:s.TOOLBAR_CUSTOMIZE_CLASS,"aria-label":l,children:[e.jsx("p",{className:s.TOOLBAR_CUSTOMIZE_TITLE_CLASS,children:l}),e.jsx("ul",{className:s.TOOLBAR_CUSTOMIZE_LIST_CLASS,"aria-label":o,children:n.map(r=>{const L=_.has(r),S=A.TOOLBAR_OPTION_LABELS[r]??r;return e.jsx("li",{className:s.TOOLBAR_CUSTOMIZE_ITEM_CLASS,children:e.jsxs("label",{children:[e.jsx("input",{type:s.TOOLBAR_CUSTOMIZE_INPUT_TYPE,checked:L,onChange:u=>O(r,u.target.checked)}),e.jsx("span",{children:S})]})},r)})}),e.jsx("div",{className:s.TOOLBAR_CUSTOMIZE_ACTIONS_CLASS,children:e.jsx(C.Button,{type:"button",onClick:a,children:c})})]})};exports.ToolbarCustomize=I;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../../../constants/toolbarMenu.const.cjs");require("../../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const _="Ink-ToolbarCustomize",O="Ink-ToolbarCustomize__title",L="Ink-ToolbarCustomize__list",S="Ink-ToolbarCustomize__item",A="Ink-ToolbarCustomize__actions",I=T.TOOLBAR_CUSTOMIZE_TITLE,C=T.TOOLBAR_CUSTOMIZE_CLOSE_LABEL,E=T.TOOLBAR_CUSTOMIZE_LIST_ARIA_LABEL,o="checkbox";exports.TOOLBAR_CUSTOMIZE_ACTIONS_CLASS=A;exports.TOOLBAR_CUSTOMIZE_CLASS=_;exports.TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE=C;exports.TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA=E;exports.TOOLBAR_CUSTOMIZE_DEFAULT_TITLE=I;exports.TOOLBAR_CUSTOMIZE_INPUT_TYPE=o;exports.TOOLBAR_CUSTOMIZE_ITEM_CLASS=S;exports.TOOLBAR_CUSTOMIZE_LIST_CLASS=L;exports.TOOLBAR_CUSTOMIZE_TITLE_CLASS=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../../../constants/toolbarMenu.const.cjs");require("../../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");require("react");require("react-dom");const _="Ink-ToolbarCustomize",O="Ink-ToolbarCustomize__title",L="Ink-ToolbarCustomize__list",S="Ink-ToolbarCustomize__item",A="Ink-ToolbarCustomize__actions",I=T.TOOLBAR_CUSTOMIZE_TITLE,C=T.TOOLBAR_CUSTOMIZE_CLOSE_LABEL,E=T.TOOLBAR_CUSTOMIZE_LIST_ARIA_LABEL,o="checkbox";exports.TOOLBAR_CUSTOMIZE_ACTIONS_CLASS=A;exports.TOOLBAR_CUSTOMIZE_CLASS=_;exports.TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE=C;exports.TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA=E;exports.TOOLBAR_CUSTOMIZE_DEFAULT_TITLE=I;exports.TOOLBAR_CUSTOMIZE_INPUT_TYPE=o;exports.TOOLBAR_CUSTOMIZE_ITEM_CLASS=S;exports.TOOLBAR_CUSTOMIZE_LIST_CLASS=L;exports.TOOLBAR_CUSTOMIZE_TITLE_CLASS=O;
@@ -2,17 +2,18 @@ import { TOOLBAR_CUSTOMIZE_LIST_ARIA_LABEL as T, TOOLBAR_CUSTOMIZE_TITLE as _, T
2
2
  import "../../../../constants/openai.const.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../../../utils/paste.utils.js";
5
+ import "../../../../utils/exportDocument.utils.js";
5
6
  import "react";
6
7
  import "react-dom";
7
- const C = "Ink-ToolbarCustomize", E = "Ink-ToolbarCustomize__title", s = "Ink-ToolbarCustomize__list", U = "Ink-ToolbarCustomize__item", i = "Ink-ToolbarCustomize__actions", n = _, B = O, R = T, m = "checkbox";
8
+ const E = "Ink-ToolbarCustomize", i = "Ink-ToolbarCustomize__title", s = "Ink-ToolbarCustomize__list", U = "Ink-ToolbarCustomize__item", n = "Ink-ToolbarCustomize__actions", m = _, r = O, B = T, R = "checkbox";
8
9
  export {
9
- i as TOOLBAR_CUSTOMIZE_ACTIONS_CLASS,
10
- C as TOOLBAR_CUSTOMIZE_CLASS,
11
- B as TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE,
12
- R as TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA,
13
- n as TOOLBAR_CUSTOMIZE_DEFAULT_TITLE,
14
- m as TOOLBAR_CUSTOMIZE_INPUT_TYPE,
10
+ n as TOOLBAR_CUSTOMIZE_ACTIONS_CLASS,
11
+ E as TOOLBAR_CUSTOMIZE_CLASS,
12
+ r as TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE,
13
+ B as TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA,
14
+ m as TOOLBAR_CUSTOMIZE_DEFAULT_TITLE,
15
+ R as TOOLBAR_CUSTOMIZE_INPUT_TYPE,
15
16
  U as TOOLBAR_CUSTOMIZE_ITEM_CLASS,
16
17
  s as TOOLBAR_CUSTOMIZE_LIST_CLASS,
17
- E as TOOLBAR_CUSTOMIZE_TITLE_CLASS
18
+ i as TOOLBAR_CUSTOMIZE_TITLE_CLASS
18
19
  };
@@ -1,12 +1,13 @@
1
- import { jsxs as O, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { TOOLBAR_OPTION_LABELS as m } from "../../../../constants/toolbarMenu.const.js";
3
3
  import "../../../../constants/openai.const.js";
4
4
  import "../../../../utils/paste.utils.js";
5
+ import "../../../../utils/exportDocument.utils.js";
5
6
  import { Button as C } from "../../../../common-components/Button/Button.js";
6
7
  import "react";
7
8
  import "react-dom";
8
- import { TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA as I, TOOLBAR_CUSTOMIZE_DEFAULT_TITLE as E, TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE as d, TOOLBAR_CUSTOMIZE_CLASS as p, TOOLBAR_CUSTOMIZE_TITLE_CLASS as U, TOOLBAR_CUSTOMIZE_LIST_CLASS as h, TOOLBAR_CUSTOMIZE_ITEM_CLASS as B, TOOLBAR_CUSTOMIZE_INPUT_TYPE as R, TOOLBAR_CUSTOMIZE_ACTIONS_CLASS as b } from "./ToolbarCustomize.const.js";
9
- const x = (r) => {
9
+ import { TOOLBAR_CUSTOMIZE_DEFAULT_LIST_ARIA as I, TOOLBAR_CUSTOMIZE_DEFAULT_TITLE as E, TOOLBAR_CUSTOMIZE_DEFAULT_CLOSE as p, TOOLBAR_CUSTOMIZE_CLASS as d, TOOLBAR_CUSTOMIZE_TITLE_CLASS as U, TOOLBAR_CUSTOMIZE_LIST_CLASS as h, TOOLBAR_CUSTOMIZE_ITEM_CLASS as B, TOOLBAR_CUSTOMIZE_INPUT_TYPE as R, TOOLBAR_CUSTOMIZE_ACTIONS_CLASS as b } from "./ToolbarCustomize.const.js";
10
+ const D = (O) => {
10
11
  const {
11
12
  open: t,
12
13
  options: _,
@@ -14,16 +15,16 @@ const x = (r) => {
14
15
  onToggle: i,
15
16
  onClose: s,
16
17
  title: T = E,
17
- closeLabel: L = d,
18
+ closeLabel: L = p,
18
19
  listAriaLabel: n = I
19
- } = r;
20
+ } = O;
20
21
  if (!t) return null;
21
22
  const o = new Set(a);
22
- return /* @__PURE__ */ O("div", { className: p, "aria-label": T, children: [
23
+ return /* @__PURE__ */ r("div", { className: d, "aria-label": T, children: [
23
24
  /* @__PURE__ */ e("p", { className: U, children: T }),
24
25
  /* @__PURE__ */ e("ul", { className: h, "aria-label": n, children: _.map((l) => {
25
26
  const S = o.has(l), c = m[l] ?? l;
26
- return /* @__PURE__ */ e("li", { className: B, children: /* @__PURE__ */ O("label", { children: [
27
+ return /* @__PURE__ */ e("li", { className: B, children: /* @__PURE__ */ r("label", { children: [
27
28
  /* @__PURE__ */ e(
28
29
  "input",
29
30
  {
@@ -39,5 +40,5 @@ const x = (r) => {
39
40
  ] });
40
41
  };
41
42
  export {
42
- x as ToolbarCustomize
43
+ D as ToolbarCustomize
43
44
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),O=require("react-dom"),c=require("../../../../constants/numbers.cjs"),u=require("../../../../constants/generals.const.cjs"),g=require("../../../../constants/colorMode.const.cjs"),x=require("../../../../constants/keyboard.const.cjs"),n=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const D=require("./ToolbarDropdown.utils.cjs"),K=()=>t.jsx("svg",{className:n.INK_CLASS_STYLE_CHEV,viewBox:"0 0 10 10","aria-hidden":"true",children:t.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.4",fill:"none"})}),P=R=>{const{options:d,value:L,onChange:b,title:_,disabled:f=!1}=R,[i,l]=r.useState(!1),[E,w]=r.useState({top:c.NUMBER_ZERO,left:c.NUMBER_ZERO,minWidth:c.NUMBER_ZERO}),m=r.useRef(null),N=r.useRef(null),T=r.useRef(null),S=d.find(e=>e.value===L)??d[c.NUMBER_ZERO],I=(S==null?void 0:S.label)??u.EMPTY_STRING;r.useEffect(()=>{if(!i)return;const e=()=>{w(D.getToolbarDropdownMenuPosition(N.current))};e();const o=s=>{var p,C;const v=s.target;(p=m.current)!=null&&p.contains(v)||(C=T.current)!=null&&C.contains(v)||l(!1)},a=s=>{s.key===x.KEY_ESCAPE&&l(!1)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",a),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",a),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[i]);const M=e=>{e.preventDefault()},h=()=>{f||l(e=>!e)};return t.jsxs("div",{className:n.INK_CLASS_STYLE_DD,ref:m,children:[t.jsxs("button",{ref:N,type:"button",className:n.INK_CLASS_STYLE_TRIGGER,title:_,"aria-label":_,"aria-haspopup":"listbox","aria-expanded":i,disabled:f,onMouseDown:M,onClick:h,children:[t.jsx("span",{children:I}),t.jsx(K,{})]}),i?O.createPortal(t.jsx("div",{ref:T,className:`${n.INK_CLASS_STYLE_MENU} ${n.INK_CLASS_STYLE_MENU_PORTAL} ${n.INK_CLASS_STYLE_MENU_FORCED}`,"data-color-mode":g.COLOR_MODE_LIGHT,role:"listbox","aria-label":_,style:{top:E.top,left:E.left,minWidth:E.minWidth},children:d.map(e=>{const o=e.value===L,a=`${n.INK_CLASS_STYLE_OPTION}${o?`${u.SPACE_STRING}${n.INK_CLASS_STYLE_OPTION_SEL}`:u.EMPTY_STRING}`;return t.jsxs("button",{type:"button",role:"option","aria-selected":o,className:a,onMouseDown:s=>{s.preventDefault(),b(e.value),l(!1)},children:[o?t.jsx("span",{className:n.INK_CLASS_STYLE_CHECK,"aria-hidden":"true",children:u.INK_STYLE_CHECK}):null,e.label]},e.value)})}),document.body):null]})};exports.ToolbarDropdown=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),O=require("react-dom"),u=require("../../../../constants/numbers.cjs"),c=require("../../../../constants/generals.const.cjs"),g=require("../../../../constants/colorMode.const.cjs"),x=require("../../../../constants/keyboard.const.cjs"),n=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");const D=require("./ToolbarDropdown.utils.cjs"),K=()=>t.jsx("svg",{className:n.INK_CLASS_STYLE_CHEV,viewBox:"0 0 10 10","aria-hidden":"true",children:t.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.4",fill:"none"})}),P=R=>{const{options:d,value:L,onChange:b,title:_,disabled:f=!1}=R,[i,l]=r.useState(!1),[E,w]=r.useState({top:u.NUMBER_ZERO,left:u.NUMBER_ZERO,minWidth:u.NUMBER_ZERO}),m=r.useRef(null),N=r.useRef(null),T=r.useRef(null),S=d.find(e=>e.value===L)??d[u.NUMBER_ZERO],I=(S==null?void 0:S.label)??c.EMPTY_STRING;r.useEffect(()=>{if(!i)return;const e=()=>{w(D.getToolbarDropdownMenuPosition(N.current))};e();const o=s=>{var p,C;const v=s.target;(p=m.current)!=null&&p.contains(v)||(C=T.current)!=null&&C.contains(v)||l(!1)},a=s=>{s.key===x.KEY_ESCAPE&&l(!1)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",a),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",a),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[i]);const M=e=>{e.preventDefault()},h=()=>{f||l(e=>!e)};return t.jsxs("div",{className:n.INK_CLASS_STYLE_DD,ref:m,children:[t.jsxs("button",{ref:N,type:"button",className:n.INK_CLASS_STYLE_TRIGGER,title:_,"aria-label":_,"aria-haspopup":"listbox","aria-expanded":i,disabled:f,onMouseDown:M,onClick:h,children:[t.jsx("span",{children:I}),t.jsx(K,{})]}),i?O.createPortal(t.jsx("div",{ref:T,className:`${n.INK_CLASS_STYLE_MENU} ${n.INK_CLASS_STYLE_MENU_PORTAL} ${n.INK_CLASS_STYLE_MENU_FORCED}`,"data-color-mode":g.COLOR_MODE_LIGHT,role:"listbox","aria-label":_,style:{top:E.top,left:E.left,minWidth:E.minWidth},children:d.map(e=>{const o=e.value===L,a=`${n.INK_CLASS_STYLE_OPTION}${o?`${c.SPACE_STRING}${n.INK_CLASS_STYLE_OPTION_SEL}`:c.EMPTY_STRING}`;return t.jsxs("button",{type:"button",role:"option","aria-selected":o,className:a,onMouseDown:s=>{s.preventDefault(),b(e.value),l(!1)},children:[o?t.jsx("span",{className:n.INK_CLASS_STYLE_CHECK,"aria-hidden":"true",children:c.INK_STYLE_CHECK}):null,e.label]},e.value)})}),document.body):null]})};exports.ToolbarDropdown=P;
@@ -1,4 +1,4 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as C, useRef as _, useEffect as K } from "react";
3
3
  import { createPortal as M } from "react-dom";
4
4
  import { NUMBER_ZERO as l } from "../../../../constants/numbers.js";
@@ -8,25 +8,26 @@ import { KEY_ESCAPE as Y } from "../../../../constants/keyboard.const.js";
8
8
  import { INK_CLASS_STYLE_DD as O, INK_CLASS_STYLE_TRIGGER as P, INK_CLASS_STYLE_MENU as y, INK_CLASS_STYLE_MENU_PORTAL as x, INK_CLASS_STYLE_MENU_FORCED as $, INK_CLASS_STYLE_OPTION as k, INK_CLASS_STYLE_OPTION_SEL as G, INK_CLASS_STYLE_CHECK as H, INK_CLASS_STYLE_CHEV as U } from "../../../../constants/defaults.const.js";
9
9
  import "../../../../constants/openai.const.js";
10
10
  import "../../../../utils/paste.utils.js";
11
+ import "../../../../utils/exportDocument.utils.js";
11
12
  import { getToolbarDropdownMenuPosition as W } from "./ToolbarDropdown.utils.js";
12
- const j = () => /* @__PURE__ */ n("svg", { className: U, viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M2 3.5L5 6.5L8 3.5", stroke: "currentColor", strokeWidth: "1.4", fill: "none" }) }), re = (h) => {
13
+ const j = () => /* @__PURE__ */ t("svg", { className: U, viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M2 3.5L5 6.5L8 3.5", stroke: "currentColor", strokeWidth: "1.4", fill: "none" }) }), se = (h) => {
13
14
  const { options: a, value: E, onChange: I, title: c, disabled: S = !1 } = h, [r, s] = C(!1), [d, b] = C({
14
15
  top: l,
15
16
  left: l,
16
17
  minWidth: l
17
- }), f = _(null), L = _(null), p = _(null), u = a.find((e) => e.value === E) ?? a[l], g = (u == null ? void 0 : u.label) ?? w;
18
+ }), f = _(null), p = _(null), L = _(null), u = a.find((e) => e.value === E) ?? a[l], g = (u == null ? void 0 : u.label) ?? w;
18
19
  return K(() => {
19
20
  if (!r) return;
20
21
  const e = () => {
21
- b(W(L.current));
22
+ b(W(p.current));
22
23
  };
23
24
  e();
24
- const o = (t) => {
25
+ const o = (n) => {
25
26
  var N, T;
26
- const v = t.target;
27
- (N = f.current) != null && N.contains(v) || (T = p.current) != null && T.contains(v) || s(!1);
28
- }, i = (t) => {
29
- t.key === Y && s(!1);
27
+ const v = n.target;
28
+ (N = f.current) != null && N.contains(v) || (T = L.current) != null && T.contains(v) || s(!1);
29
+ }, i = (n) => {
30
+ n.key === Y && s(!1);
30
31
  };
31
32
  return document.addEventListener("mousedown", o), document.addEventListener("keydown", i), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
32
33
  document.removeEventListener("mousedown", o), document.removeEventListener("keydown", i), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
@@ -35,7 +36,7 @@ const j = () => /* @__PURE__ */ n("svg", { className: U, viewBox: "0 0 10 10", "
35
36
  /* @__PURE__ */ m(
36
37
  "button",
37
38
  {
38
- ref: L,
39
+ ref: p,
39
40
  type: "button",
40
41
  className: P,
41
42
  title: c,
@@ -50,16 +51,16 @@ const j = () => /* @__PURE__ */ n("svg", { className: U, viewBox: "0 0 10 10", "
50
51
  S || s((e) => !e);
51
52
  },
52
53
  children: [
53
- /* @__PURE__ */ n("span", { children: g }),
54
- /* @__PURE__ */ n(j, {})
54
+ /* @__PURE__ */ t("span", { children: g }),
55
+ /* @__PURE__ */ t(j, {})
55
56
  ]
56
57
  }
57
58
  ),
58
59
  r ? M(
59
- /* @__PURE__ */ n(
60
+ /* @__PURE__ */ t(
60
61
  "div",
61
62
  {
62
- ref: p,
63
+ ref: L,
63
64
  className: `${y} ${x} ${$}`,
64
65
  "data-color-mode": D,
65
66
  role: "listbox",
@@ -74,11 +75,11 @@ const j = () => /* @__PURE__ */ n("svg", { className: U, viewBox: "0 0 10 10", "
74
75
  role: "option",
75
76
  "aria-selected": o,
76
77
  className: i,
77
- onMouseDown: (t) => {
78
- t.preventDefault(), I(e.value), s(!1);
78
+ onMouseDown: (n) => {
79
+ n.preventDefault(), I(e.value), s(!1);
79
80
  },
80
81
  children: [
81
- o ? /* @__PURE__ */ n("span", { className: H, "aria-hidden": "true", children: A }) : null,
82
+ o ? /* @__PURE__ */ t("span", { className: H, "aria-hidden": "true", children: A }) : null,
82
83
  e.label
83
84
  ]
84
85
  },
@@ -92,5 +93,5 @@ const j = () => /* @__PURE__ */ n("svg", { className: U, viewBox: "0 0 10 10", "
92
93
  ] });
93
94
  };
94
95
  export {
95
- re as ToolbarDropdown
96
+ se as ToolbarDropdown
96
97
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../../constants/numbers.cjs");require("../../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const c=(E,o=_.INK_STYLE_MENU_ESTIMATED_HEIGHT_PX)=>{if(!E)return{top:_.NUMBER_ZERO,left:_.NUMBER_ZERO,minWidth:_.INK_STYLE_MENU_MIN_WIDTH_PX};const t=E.getBoundingClientRect(),r=window.innerWidth,N=window.innerHeight,e=Math.max(t.width,_.INK_STYLE_MENU_MIN_WIDTH_PX),M=Math.max(_.INK_STYLE_MENU_EDGE_PX,r-e-_.INK_STYLE_MENU_EDGE_PX),T=Math.min(Math.max(t.left,_.INK_STYLE_MENU_EDGE_PX),M),n=o>_.NUMBER_ZERO?o:_.INK_STYLE_MENU_ESTIMATED_HEIGHT_PX,i=t.bottom+_.INK_STYLE_MENU_GAP_PX,I=t.top-n-_.INK_STYLE_MENU_GAP_PX;return{top:i+n>N-_.INK_STYLE_MENU_EDGE_PX?Math.max(_.INK_STYLE_MENU_EDGE_PX,I):i,left:T,minWidth:e}};exports.getToolbarDropdownMenuPosition=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../../constants/numbers.cjs");require("../../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");require("react");require("react-dom");const u=(E,e=_.INK_STYLE_MENU_ESTIMATED_HEIGHT_PX)=>{if(!E)return{top:_.NUMBER_ZERO,left:_.NUMBER_ZERO,minWidth:_.INK_STYLE_MENU_MIN_WIDTH_PX};const t=E.getBoundingClientRect(),r=window.innerWidth,N=window.innerHeight,o=Math.max(t.width,_.INK_STYLE_MENU_MIN_WIDTH_PX),M=Math.max(_.INK_STYLE_MENU_EDGE_PX,r-o-_.INK_STYLE_MENU_EDGE_PX),T=Math.min(Math.max(t.left,_.INK_STYLE_MENU_EDGE_PX),M),n=e>_.NUMBER_ZERO?e:_.INK_STYLE_MENU_ESTIMATED_HEIGHT_PX,i=t.bottom+_.INK_STYLE_MENU_GAP_PX,I=t.top-n-_.INK_STYLE_MENU_GAP_PX;return{top:i+n>N-_.INK_STYLE_MENU_EDGE_PX?Math.max(_.INK_STYLE_MENU_EDGE_PX,I):i,left:T,minWidth:o}};exports.getToolbarDropdownMenuPosition=u;
@@ -1,15 +1,16 @@
1
- import { INK_STYLE_MENU_ESTIMATED_HEIGHT_PX as E, INK_STYLE_MENU_MIN_WIDTH_PX as p, NUMBER_ZERO as n, INK_STYLE_MENU_EDGE_PX as t, INK_STYLE_MENU_GAP_PX as c } from "../../../../constants/numbers.js";
1
+ import { INK_STYLE_MENU_ESTIMATED_HEIGHT_PX as p, INK_STYLE_MENU_MIN_WIDTH_PX as E, NUMBER_ZERO as n, INK_STYLE_MENU_EDGE_PX as t, INK_STYLE_MENU_GAP_PX as c } from "../../../../constants/numbers.js";
2
2
  import "../../../../constants/openai.const.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../../../utils/paste.utils.js";
5
+ import "../../../../utils/exportDocument.utils.js";
5
6
  import "react";
6
7
  import "react-dom";
7
- const P = (i, e = E) => {
8
+ const u = (i, e = p) => {
8
9
  if (!i)
9
- return { top: n, left: n, minWidth: p };
10
- const o = i.getBoundingClientRect(), M = window.innerWidth, h = window.innerHeight, _ = Math.max(o.width, p), a = Math.max(t, M - _ - t), s = Math.min(Math.max(o.left, t), a), r = e > n ? e : E, m = o.bottom + c, N = o.top - r - c;
10
+ return { top: n, left: n, minWidth: E };
11
+ const o = i.getBoundingClientRect(), M = window.innerWidth, h = window.innerHeight, _ = Math.max(o.width, E), a = Math.max(t, M - _ - t), s = Math.min(Math.max(o.left, t), a), r = e > n ? e : p, m = o.bottom + c, N = o.top - r - c;
11
12
  return { top: m + r > h - t ? Math.max(t, N) : m, left: s, minWidth: _ };
12
13
  };
13
14
  export {
14
- P as getToolbarDropdownMenuPosition
15
+ u as getToolbarDropdownMenuPosition
15
16
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=t=>{const{versions:n,onSave:o,onRestore:i,onCompare:r,onClose:a}=t;return s.jsxs("aside",{className:"Ink-Versions","aria-label":"Version history",children:[s.jsxs("div",{className:"Ink-Versions__header",children:[s.jsx("strong",{children:"Versions"}),s.jsx("button",{type:"button",className:"Ink-Editor__button Ink-Editor__button--active",onClick:o,children:"Save snapshot"}),s.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:a,children:"×"})]}),s.jsx("div",{className:"Ink-Versions__list",children:n.length===0?s.jsx("p",{className:"Ink-Versions__empty",children:"No snapshots yet."}):n.map(e=>s.jsxs("article",{className:"Ink-Versions__item",children:[s.jsx("strong",{children:e.name}),s.jsx("time",{children:new Date(e.savedAt).toLocaleString()}),s.jsxs("div",{className:"Ink-Versions__actions",children:[s.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:()=>i(e),children:"Restore"}),s.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:()=>r(e),children:"Compare"})]})]},e.id))})]})};exports.VersionHistory=l;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { InkDocumentVersion } from '../../../../utils/versions.utils';
3
+ export interface VersionHistoryProps {
4
+ versions: InkDocumentVersion[];
5
+ onSave: () => void;
6
+ onRestore: (version: InkDocumentVersion) => void;
7
+ onCompare: (version: InkDocumentVersion) => void;
8
+ onClose: () => void;
9
+ }
10
+ export declare const VersionHistory: FC<VersionHistoryProps>;
11
+ //# sourceMappingURL=VersionHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionHistory.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/VersionHistory/VersionHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAmClD,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsxs as e, jsx as n } from "react/jsx-runtime";
2
+ const d = (o) => {
3
+ const { versions: s, onSave: i, onRestore: r, onCompare: a, onClose: l } = o;
4
+ return /* @__PURE__ */ e("aside", { className: "Ink-Versions", "aria-label": "Version history", children: [
5
+ /* @__PURE__ */ e("div", { className: "Ink-Versions__header", children: [
6
+ /* @__PURE__ */ n("strong", { children: "Versions" }),
7
+ /* @__PURE__ */ n("button", { type: "button", className: "Ink-Editor__button Ink-Editor__button--active", onClick: i, children: "Save snapshot" }),
8
+ /* @__PURE__ */ n("button", { type: "button", className: "Ink-Editor__button", onClick: l, children: "×" })
9
+ ] }),
10
+ /* @__PURE__ */ n("div", { className: "Ink-Versions__list", children: s.length === 0 ? /* @__PURE__ */ n("p", { className: "Ink-Versions__empty", children: "No snapshots yet." }) : s.map((t) => /* @__PURE__ */ e("article", { className: "Ink-Versions__item", children: [
11
+ /* @__PURE__ */ n("strong", { children: t.name }),
12
+ /* @__PURE__ */ n("time", { children: new Date(t.savedAt).toLocaleString() }),
13
+ /* @__PURE__ */ e("div", { className: "Ink-Versions__actions", children: [
14
+ /* @__PURE__ */ n("button", { type: "button", className: "Ink-Editor__button", onClick: () => r(t), children: "Restore" }),
15
+ /* @__PURE__ */ n("button", { type: "button", className: "Ink-Editor__button", onClick: () => a(t), children: "Compare" })
16
+ ] })
17
+ ] }, t.id)) })
18
+ ] });
19
+ };
20
+ export {
21
+ d as VersionHistory
22
+ };
@@ -0,0 +1,3 @@
1
+ export { VersionHistory } from './VersionHistory';
2
+ export type { VersionHistoryProps } from './VersionHistory';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/VersionHistory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -3,6 +3,9 @@ export { ToolbarDropdown } from './ToolbarDropdown';
3
3
  export { ToolbarColorPicker } from './ToolbarColorPicker';
4
4
  export { CommentsPanel } from './CommentsPanel';
5
5
  export { AiPanel } from './AiPanel';
6
+ export { AiSelectionBubble } from './AiSelectionBubble';
7
+ export { capabilityForSelectionAction, htmlFromAiResponse, optionsForSelectionAction, placeAiSelectionBubble, } from './AiSelectionBubble';
8
+ export type { AiSelectionBubbleProps } from './AiSelectionBubble';
6
9
  export { AiAutocomplete, AI_AUTOCOMPLETE_DEBOUNCE_MS, AI_AUTOCOMPLETE_MAX_PREFIX_CHARS, AI_AUTOCOMPLETE_COMMAND_INSERT_TEXT, getTextBeforeCaret, getCaretPositionInRoot, } from './AiAutocomplete';
7
10
  export type { AiAutocompleteProps, AiAutocompletePosition } from './AiAutocomplete';
8
11
  export { BlockHandles, BLOCK_HANDLES_DRAG_EFFECT_MOVE, BLOCK_HANDLES_DRAG_MIME, BLOCK_HANDLES_DRAG_PAYLOAD, } from './BlockHandles';
@@ -12,6 +15,10 @@ export { SlashMenu } from './SlashMenu';
12
15
  export { OutlineRail } from './OutlineRail';
13
16
  export type { OutlineRailProps } from './OutlineRail';
14
17
  export { TrackChangesBar } from './TrackChangesBar';
18
+ export { VersionHistory } from './VersionHistory';
19
+ export type { VersionHistoryProps } from './VersionHistory';
20
+ export { MentionMenu } from './MentionMenu';
21
+ export { ImageFrame } from './ImageFrame';
15
22
  export { SignPad } from './SignPad';
16
23
  export { FindReplace } from './FindReplace';
17
24
  export { ToolbarCustomize } from './ToolbarCustomize';
@@ -30,4 +37,8 @@ export { GraphEditModal } from './GraphEditModal';
30
37
  export type { GraphEditModalProps, GraphEditMode } from './GraphEditModal';
31
38
  export { ThemePicker } from './ThemePicker';
32
39
  export type { ThemePickerProps } from './ThemePicker';
40
+ export { PresenceStack } from './PresenceStack';
41
+ export type { PresenceStackProps } from './PresenceStack';
42
+ export { RemoteCursors } from './RemoteCursors';
43
+ export type { RemoteCursorsProps } from './RemoteCursors';
33
44
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/InkEditor/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,cAAc,EACd,2BAA2B,EAC3B,gCAAgC,EAChC,mCAAmC,EACnC,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EACL,YAAY,EACZ,8BAA8B,EAC9B,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/InkEditor/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,cAAc,EACd,2BAA2B,EAC3B,gCAAgC,EAChC,mCAAmC,EACnC,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EACL,YAAY,EACZ,8BAA8B,EAC9B,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../constants/numbers.cjs"),l=require("../../../constants/fonts.const.cjs"),r=require("../../../constants/lists.const.cjs"),R=require("../../../constants/blocks.const.cjs");require("../../../constants/openai.const.cjs");require("react/jsx-runtime");const p=require("../../../utils/blocks.utils.cjs");require("../../../utils/paste.utils.cjs");require("react");require("react-dom");const M="color",y="background-color",g="background",A="color",d="style",I=1,U=3,D="removeFormat",S="insertUnorderedList",m="insertOrderedList",h="superscript",P="subscript",H="styleWithCSS",i=(t,e)=>document.execCommand(t,!1,e),c=t=>document.queryCommandState(t),B=t=>document.queryCommandValue(t),w="http://",f="https://",Y="mailto:",b="&amp;",q="&lt;",F="&gt;",k="&quot;",v=t=>t.replace(/&/g,b).replace(/</g,q).replace(/>/g,F).replace(/"/g,k),W=(t,e="")=>{if(!t)return!1;const o=t.startsWith(w)||t.startsWith(f)||t.startsWith(Y)?t:`${f}${t}`,n=window.getSelection();return(!n||n.isCollapsed)&&e?i("insertHTML",`<a href="${o}">${v(e)}</a>`):i("createLink",o)},x=t=>i("foreColor",t),K=t=>i("hiliteColor",t),C=t=>i("insertHTML",t),V=(t,e="")=>{const o=e.replace(/"/g,"&quot;");return C(`<img src="${t}" alt="${o}" style="max-width:100%;height:auto;" />`)},Z=t=>new Promise((e,o)=>{const n=new FileReader;n.onload=()=>e(String(n.result)),n.onerror=o,n.readAsDataURL(t)}),G=()=>{const t=new Set;return c("bold")&&t.add("bold"),c("italic")&&t.add("italic"),c("underline")&&t.add("underline"),c("strikeThrough")&&t.add("strikethrough"),c(S)&&t.add("bulletList"),c(m)&&t.add("orderedList"),c(h)&&t.add("superscript"),c(P)&&t.add("subscript"),t},O=t=>{t.style.removeProperty(M),t.style.removeProperty(y),t.style.removeProperty(g),t.hasAttribute(A)&&t.removeAttribute(A);const e=t.getAttribute(d);e!==null&&!e.trim()&&t.removeAttribute(d)},N=()=>{const t=window.getSelection();if(!t||t.rangeCount===a.NUMBER_ZERO)return;const o=t.getRangeAt(a.NUMBER_ZERO).commonAncestorContainer,n=o.nodeType===I?o:o.parentElement;n&&(n instanceof HTMLElement&&t.containsNode(n,!0)&&O(n),n.querySelectorAll("*").forEach(s=>{s instanceof HTMLElement&&t.containsNode(s,!0)&&O(s)}))},$=()=>{const t=i(D);return N(),t},j=t=>{const e=l.FONT_FAMILY_BY_VALUE[t]??t;if(i(H,"true"),t===l.FONT_VALUE_SYSTEM){const o=window.getSelection();if(!o||o.rangeCount===a.NUMBER_ZERO||o.isCollapsed)return i(l.FONT_COMMAND_NAME,e);const n=o.getRangeAt(a.NUMBER_ZERO),s=document.createElement("span");s.style.setProperty(l.FONT_STYLE_PROPERTY,e);try{return n.surroundContents(s),!0}catch{return i(l.FONT_COMMAND_NAME,e)}}return i(l.FONT_COMMAND_NAME,t)},Q=t=>{t.classList.remove(r.LIST_CLASS_DASH,r.LIST_CLASS_ALPHA),t.style.removeProperty("list-style-type")},X=t=>{t===r.LIST_VALUE_BULLET||t===r.LIST_VALUE_DASH?i(S):i(m);const e=window.getSelection();let n=(e==null?void 0:e.anchorNode)??null,s=null;for(;n;){if(n instanceof HTMLElement&&(n.tagName===r.LIST_TAG_UL||n.tagName===r.LIST_TAG_OL)){s=n;break}n=n.parentNode}return s&&(Q(s),t===r.LIST_VALUE_BULLET?s.style.listStyleType=r.LIST_STYLE_DISC:t===r.LIST_VALUE_DASH?s.classList.add(r.LIST_CLASS_DASH):t===r.LIST_VALUE_NUMBERS?s.style.listStyleType=r.LIST_STYLE_DECIMAL:t===r.LIST_VALUE_LETTERS&&(s.classList.add(r.LIST_CLASS_ALPHA),s.style.listStyleType=r.LIST_STYLE_LOWER_ALPHA)),!0},z=()=>{const t=window.getSelection();let e=(t==null?void 0:t.anchorNode)??null;for(;e;){if(e instanceof HTMLElement){if(e.tagName===r.LIST_TAG_UL)return e.classList.contains(r.LIST_CLASS_DASH)?r.LIST_VALUE_DASH:r.LIST_VALUE_BULLET;if(e.tagName===r.LIST_TAG_OL)return e.classList.contains(r.LIST_CLASS_ALPHA)||e.style.listStyleType===r.LIST_STYLE_LOWER_ALPHA?r.LIST_VALUE_LETTERS:r.LIST_VALUE_NUMBERS}e=e.parentNode}return r.LIST_VALUE_BULLET},J=(t,e)=>{const o=window.getSelection(),n=p.getBlockElement((o==null?void 0:o.anchorNode)??null,t);return n?(n.setAttribute(R.DIR_ATTRIBUTE,e),!0):!1},tt=t=>{if(t.key!==r.LIST_MARKDOWN_SPACE)return!1;const e=window.getSelection();if(!e||!e.isCollapsed||e.rangeCount===a.NUMBER_ZERO)return!1;const o=e.anchorNode;if(!o||o.nodeType!==U)return!1;const n=o.textContent??"",s=e.anchorOffset,T=n.slice(a.NUMBER_ZERO,s),E=T.endsWith(r.LIST_MARKDOWN_DASH)?r.LIST_MARKDOWN_DASH:T.endsWith(r.LIST_MARKDOWN_STAR)?r.LIST_MARKDOWN_STAR:null;if(!E)return!1;const L=s-E.length;if(L<a.NUMBER_ZERO)return!1;const u=L>a.NUMBER_ZERO?T[L-1]:"";if(u&&u!==`
2
- `)return!1;t.preventDefault();const _=e.getRangeAt(a.NUMBER_ZERO);return _.setStart(o,L),_.setEnd(o,s),_.deleteContents(),i(S),!0};exports.applyFontFamily=j;exports.applyListType=X;exports.clearFormatDeep=$;exports.detectListType=z;exports.execCommand=i;exports.fileToDataUrl=Z;exports.getActiveFormats=G;exports.insertHTML=C;exports.insertImage=V;exports.insertLink=W;exports.queryCommandState=c;exports.queryCommandValue=B;exports.setBlockDirection=J;exports.setHighlightColor=K;exports.setTextColor=x;exports.stripSelectionColors=N;exports.tryConvertMarkdownListPrefix=tt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../constants/numbers.cjs"),S=require("../../../constants/fonts.const.cjs"),n=require("../../../constants/lists.const.cjs"),M=require("../../../constants/blocks.const.cjs");require("../../../constants/openai.const.cjs");require("react/jsx-runtime");const y=require("../../../utils/blocks.utils.cjs");require("../../../utils/paste.utils.cjs");require("../../../utils/exportDocument.utils.cjs");require("react");require("react-dom");const g="color",I="background-color",U="background",E="color",A="style",D=1,O=3,h="removeFormat",d="insertUnorderedList",f="insertOrderedList",B="superscript",P="subscript",k="styleWithCSS",i=(e,t)=>document.execCommand(e,!1,t),l=e=>document.queryCommandState(e),w=e=>document.queryCommandValue(e),H="http://",m="https://",x="mailto:",v="&amp;",b="&lt;",q="&gt;",F="&quot;",Y=e=>e.replace(/&/g,v).replace(/</g,b).replace(/>/g,q).replace(/"/g,F),W=(e,t="")=>{if(!e)return!1;const r=e.startsWith(H)||e.startsWith(m)||e.startsWith(x)?e:`${m}${e}`,o=window.getSelection();return(!o||o.isCollapsed)&&t?i("insertHTML",`<a href="${r}">${Y(t)}</a>`):i("createLink",r)},K=e=>i("foreColor",e),Z=e=>i("hiliteColor",e),C=e=>i("insertHTML",e),V=(e,t="")=>{const r=t.replace(/"/g,"&quot;");return C(`<img src="${e}" alt="${r}" style="max-width:100%;height:auto;" />`)},G=e=>new Promise((t,r)=>{const o=new FileReader;o.onload=()=>t(String(o.result)),o.onerror=r,o.readAsDataURL(e)}),$=()=>{const e=new Set;return l("bold")&&e.add("bold"),l("italic")&&e.add("italic"),l("underline")&&e.add("underline"),l("strikeThrough")&&e.add("strikethrough"),l(d)&&e.add("bulletList"),l(f)&&e.add("orderedList"),l(B)&&e.add("superscript"),l(P)&&e.add("subscript"),e},R=e=>{e.style.removeProperty(g),e.style.removeProperty(I),e.style.removeProperty(U),e.hasAttribute(E)&&e.removeAttribute(E);const t=e.getAttribute(A);t!==null&&!t.trim()&&e.removeAttribute(A)},p=()=>{const e=window.getSelection();if(!e||e.rangeCount===c.NUMBER_ZERO)return;const r=e.getRangeAt(c.NUMBER_ZERO).commonAncestorContainer,o=r.nodeType===D?r:r.parentElement;o&&(o instanceof HTMLElement&&e.containsNode(o,!0)&&R(o),o.querySelectorAll("*").forEach(s=>{s instanceof HTMLElement&&e.containsNode(s,!0)&&R(s)}))},X=()=>{const e=i(h);return p(),e},j=e=>{const t=S.FONT_FAMILY_BY_VALUE[e]??e;if(i(k,"true"),e===S.FONT_VALUE_SYSTEM){const r=window.getSelection();if(!r||r.rangeCount===c.NUMBER_ZERO||r.isCollapsed)return i(S.FONT_COMMAND_NAME,t);const o=r.getRangeAt(c.NUMBER_ZERO),s=document.createElement("span");s.style.setProperty(S.FONT_STYLE_PROPERTY,t);try{return o.surroundContents(s),!0}catch{return i(S.FONT_COMMAND_NAME,t)}}return i(S.FONT_COMMAND_NAME,e)},Q=e=>{e.classList.remove(n.LIST_CLASS_DASH,n.LIST_CLASS_ALPHA),e.style.removeProperty("list-style-type")},z=e=>{e===n.LIST_VALUE_BULLET||e===n.LIST_VALUE_DASH?i(d):i(f);const t=window.getSelection();let o=(t==null?void 0:t.anchorNode)??null,s=null;for(;o;){if(o instanceof HTMLElement&&(o.tagName===n.LIST_TAG_UL||o.tagName===n.LIST_TAG_OL)){s=o;break}o=o.parentNode}return s&&(Q(s),e===n.LIST_VALUE_BULLET?s.style.listStyleType=n.LIST_STYLE_DISC:e===n.LIST_VALUE_DASH?s.classList.add(n.LIST_CLASS_DASH):e===n.LIST_VALUE_NUMBERS?s.style.listStyleType=n.LIST_STYLE_DECIMAL:e===n.LIST_VALUE_LETTERS&&(s.classList.add(n.LIST_CLASS_ALPHA),s.style.listStyleType=n.LIST_STYLE_LOWER_ALPHA)),!0},J=()=>{const e=window.getSelection();let t=(e==null?void 0:e.anchorNode)??null;for(;t;){if(t instanceof HTMLElement){if(t.tagName===n.LIST_TAG_UL)return t.classList.contains(n.LIST_CLASS_DASH)?n.LIST_VALUE_DASH:n.LIST_VALUE_BULLET;if(t.tagName===n.LIST_TAG_OL)return t.classList.contains(n.LIST_CLASS_ALPHA)||t.style.listStyleType===n.LIST_STYLE_LOWER_ALPHA?n.LIST_VALUE_LETTERS:n.LIST_VALUE_NUMBERS}t=t.parentNode}return n.LIST_VALUE_BULLET},ee=(e,t)=>{const r=window.getSelection(),o=y.getBlockElement((r==null?void 0:r.anchorNode)??null,e);return o?(o.setAttribute(M.DIR_ATTRIBUTE,t),!0):!1},te=[{prefix:"###",command:"formatBlock",value:"h3"},{prefix:"##",command:"formatBlock",value:"h2"},{prefix:"#",command:"formatBlock",value:"h1"},{prefix:">",command:"formatBlock",value:"blockquote"},{prefix:"1.",command:f}],re=e=>{if(e.key!==n.LIST_MARKDOWN_SPACE)return!1;const t=window.getSelection();if(!t||!t.isCollapsed||t.rangeCount===c.NUMBER_ZERO)return!1;const r=t.anchorNode;if(!r||r.nodeType!==O)return!1;const o=r.textContent??"",s=t.anchorOffset,T=o.slice(c.NUMBER_ZERO,s),a=te.find(N=>T.endsWith(N.prefix));if(!a)return!1;const _=s-a.prefix.length,u=_>c.NUMBER_ZERO?T[_-1]:"";if(u&&u!==`
2
+ `)return!1;e.preventDefault();const L=t.getRangeAt(c.NUMBER_ZERO);return L.setStart(r,_),L.setEnd(r,s),L.deleteContents(),a.value?i(a.command,a.value):i(a.command),!0},ne=e=>{if(e.key!==n.LIST_MARKDOWN_SPACE)return!1;const t=window.getSelection();if(!t||!t.isCollapsed||t.rangeCount===c.NUMBER_ZERO)return!1;const r=t.anchorNode;if(!r||r.nodeType!==O)return!1;const o=r.textContent??"",s=t.anchorOffset,T=o.slice(c.NUMBER_ZERO,s),a=T.endsWith(n.LIST_MARKDOWN_DASH)?n.LIST_MARKDOWN_DASH:T.endsWith(n.LIST_MARKDOWN_STAR)?n.LIST_MARKDOWN_STAR:null;if(!a)return!1;const _=s-a.length;if(_<c.NUMBER_ZERO)return!1;const u=_>c.NUMBER_ZERO?T[_-1]:"";if(u&&u!==`
3
+ `)return!1;e.preventDefault();const L=t.getRangeAt(c.NUMBER_ZERO);return L.setStart(r,_),L.setEnd(r,s),L.deleteContents(),i(d),!0};exports.applyFontFamily=j;exports.applyListType=z;exports.clearFormatDeep=X;exports.detectListType=J;exports.execCommand=i;exports.fileToDataUrl=G;exports.getActiveFormats=$;exports.insertHTML=C;exports.insertImage=V;exports.insertLink=W;exports.queryCommandState=l;exports.queryCommandValue=w;exports.setBlockDirection=ee;exports.setHighlightColor=Z;exports.setTextColor=K;exports.stripSelectionColors=p;exports.tryConvertMarkdownBlockPrefix=re;exports.tryConvertMarkdownListPrefix=ne;
@@ -16,6 +16,7 @@ export declare const applyFontFamily: (fontValue: string) => boolean;
16
16
  export declare const applyListType: (listValue: string) => boolean;
17
17
  export declare const detectListType: () => string;
18
18
  export declare const setBlockDirection: (root: HTMLElement, direction: typeof DIR_LTR | typeof DIR_RTL) => boolean;
19
+ export declare const tryConvertMarkdownBlockPrefix: (event: KeyboardEvent) => boolean;
19
20
  export declare const tryConvertMarkdownListPrefix: (event: KeyboardEvent) => boolean;
20
21
  export declare const isSelectionInListItem: () => boolean;
21
22
  export declare const applyFormat: (format: ToolbarOption) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"format.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/InkEditor/helpers/format.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAEL,OAAO,EACP,OAAO,EAqBR,MAAM,oBAAoB,CAAC;AAiB5B,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,OACjB,CAAC;AAE9C,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,OACf,CAAC;AAEtC,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MACf,CAAC;AAiBtC,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,qBAAiB,KAAG,OAa3D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAA0C,CAAC;AAExF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,OAA4C,CAAC;AAE/F,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,OAA0C,CAAC;AAErF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,YAAQ,KAAG,OAGnD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,OAAO,CAAC,MAAM,CAMrD,CAAC;AAEL,eAAO,MAAM,gBAAgB,QAAO,GAAG,CAAC,MAAM,CAW7C,CAAC;AAeF,eAAO,MAAM,oBAAoB,QAAO,IAkBvC,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,OAIlC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,KAAG,OAmBnD,CAAC;AAOF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,OAgCjD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,MAsBjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,WAAW,EACjB,WAAW,OAAO,OAAO,GAAG,OAAO,OAAO,KACzC,OAMF,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,OAAO,aAAa,KAAG,OA4BnE,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,OAUxC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,aAAa,KAAG,OA6BnD,CAAC"}
1
+ {"version":3,"file":"format.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/InkEditor/helpers/format.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAEL,OAAO,EACP,OAAO,EAqBR,MAAM,oBAAoB,CAAC;AAiB5B,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,OACjB,CAAC;AAE9C,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,OACf,CAAC;AAEtC,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MACf,CAAC;AAiBtC,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,qBAAiB,KAAG,OAa3D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAA0C,CAAC;AAExF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,OAA4C,CAAC;AAE/F,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,OAA0C,CAAC;AAErF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,YAAQ,KAAG,OAGnD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,OAAO,CAAC,MAAM,CAMrD,CAAC;AAEL,eAAO,MAAM,gBAAgB,QAAO,GAAG,CAAC,MAAM,CAW7C,CAAC;AAeF,eAAO,MAAM,oBAAoB,QAAO,IAkBvC,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,OAIlC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,KAAG,OAmBnD,CAAC;AAOF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,OAgCjD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,MAsBjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,WAAW,EACjB,WAAW,OAAO,OAAO,GAAG,OAAO,OAAO,KACzC,OAMF,CAAC;AAUF,eAAO,MAAM,6BAA6B,GAAI,OAAO,aAAa,KAAG,OAsBpE,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,OAAO,aAAa,KAAG,OA4BnE,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,OAUxC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,aAAa,KAAG,OA6BnD,CAAC"}