@forgedevstack/ink 1.1.7 → 1.1.9

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 (295) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +9 -1
  3. package/bin/ink.const.mjs +26 -0
  4. package/bin/ink.mjs +58 -0
  5. package/dist/components/InkEditor/InkEditor.cjs +1 -1
  6. package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
  7. package/dist/components/InkEditor/InkEditor.js +1193 -834
  8. package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -1
  9. package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts.map +1 -1
  10. package/dist/components/InkEditor/components/AiPanel/AiPanel.js +58 -52
  11. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.cjs +1 -0
  12. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.d.ts +4 -0
  13. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.d.ts.map +1 -0
  14. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.js +223 -0
  15. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.types.d.ts +10 -0
  16. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.types.d.ts.map +1 -0
  17. package/dist/components/InkEditor/components/ExcelSheetPanel/index.d.ts +3 -0
  18. package/dist/components/InkEditor/components/ExcelSheetPanel/index.d.ts.map +1 -0
  19. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.cjs +1 -0
  20. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.d.ts +4 -0
  21. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.d.ts.map +1 -0
  22. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.js +91 -0
  23. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.types.d.ts +11 -0
  24. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.types.d.ts.map +1 -0
  25. package/dist/components/InkEditor/components/GraphEditModal/index.d.ts +3 -0
  26. package/dist/components/InkEditor/components/GraphEditModal/index.d.ts.map +1 -0
  27. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.cjs +1 -0
  28. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.d.ts +4 -0
  29. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.d.ts.map +1 -0
  30. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.js +98 -0
  31. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.types.d.ts +10 -0
  32. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.types.d.ts.map +1 -0
  33. package/dist/components/InkEditor/components/GraphPicker/index.d.ts +3 -0
  34. package/dist/components/InkEditor/components/GraphPicker/index.d.ts.map +1 -0
  35. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.cjs +1 -0
  36. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.d.ts +4 -0
  37. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.d.ts.map +1 -0
  38. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.js +27 -0
  39. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.d.ts +7 -0
  40. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.d.ts.map +1 -0
  41. package/dist/components/InkEditor/components/HtmlSourcePanel/index.d.ts +3 -0
  42. package/dist/components/InkEditor/components/HtmlSourcePanel/index.d.ts.map +1 -0
  43. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.cjs +1 -1
  44. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.d.ts.map +1 -1
  45. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.js +17 -12
  46. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts +1 -0
  47. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts.map +1 -1
  48. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.cjs +1 -0
  49. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.cjs +1 -0
  50. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.d.ts +7 -0
  51. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.d.ts.map +1 -0
  52. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.js +9 -0
  53. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.d.ts +4 -0
  54. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.d.ts.map +1 -0
  55. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.js +82 -0
  56. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.types.d.ts +8 -0
  57. package/dist/components/InkEditor/components/PresenceStack/PresenceStack.types.d.ts.map +1 -0
  58. package/dist/components/InkEditor/components/PresenceStack/index.d.ts +3 -0
  59. package/dist/components/InkEditor/components/PresenceStack/index.d.ts.map +1 -0
  60. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.cjs +1 -0
  61. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.cjs +1 -0
  62. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.d.ts +7 -0
  63. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.d.ts.map +1 -0
  64. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.js +10 -0
  65. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.d.ts +4 -0
  66. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.d.ts.map +1 -0
  67. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.js +65 -0
  68. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.types.d.ts +6 -0
  69. package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.types.d.ts.map +1 -0
  70. package/dist/components/InkEditor/components/RemoteCursors/index.d.ts +3 -0
  71. package/dist/components/InkEditor/components/RemoteCursors/index.d.ts.map +1 -0
  72. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.cjs +1 -0
  73. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.cjs +1 -0
  74. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.d.ts +10 -0
  75. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.d.ts.map +1 -0
  76. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.js +18 -0
  77. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.d.ts +4 -0
  78. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.d.ts.map +1 -0
  79. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.js +96 -0
  80. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.types.d.ts +11 -0
  81. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.types.d.ts.map +1 -0
  82. package/dist/components/InkEditor/components/TableSizePicker/index.d.ts +3 -0
  83. package/dist/components/InkEditor/components/TableSizePicker/index.d.ts.map +1 -0
  84. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.cjs +1 -0
  85. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts +4 -0
  86. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts.map +1 -0
  87. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.js +65 -0
  88. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.types.d.ts +12 -0
  89. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.types.d.ts.map +1 -0
  90. package/dist/components/InkEditor/components/ThemePicker/hooks/index.d.ts +3 -0
  91. package/dist/components/InkEditor/components/ThemePicker/hooks/index.d.ts.map +1 -0
  92. package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.cjs +1 -0
  93. package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.d.ts +13 -0
  94. package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.d.ts.map +1 -0
  95. package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.js +39 -0
  96. package/dist/components/InkEditor/components/ThemePicker/index.d.ts +3 -0
  97. package/dist/components/InkEditor/components/ThemePicker/index.d.ts.map +1 -0
  98. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.cjs +1 -0
  99. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.d.ts +4 -0
  100. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.d.ts.map +1 -0
  101. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.js +79 -0
  102. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.types.d.ts +10 -0
  103. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.types.d.ts.map +1 -0
  104. package/dist/components/InkEditor/components/TitleGallery/index.d.ts +3 -0
  105. package/dist/components/InkEditor/components/TitleGallery/index.d.ts.map +1 -0
  106. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
  107. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.d.ts.map +1 -1
  108. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +41 -18
  109. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
  110. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts.map +1 -1
  111. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.js +25 -23
  112. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.cjs +1 -1
  113. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts +1 -1
  114. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts.map +1 -1
  115. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.js +7 -7
  116. package/dist/components/InkEditor/components/index.d.ts +18 -0
  117. package/dist/components/InkEditor/components/index.d.ts.map +1 -1
  118. package/dist/components/InkEditor/helpers/format.utils.cjs +2 -2
  119. package/dist/components/InkEditor/helpers/format.utils.d.ts +1 -1
  120. package/dist/components/InkEditor/helpers/format.utils.d.ts.map +1 -1
  121. package/dist/components/InkEditor/helpers/format.utils.js +72 -72
  122. package/dist/components/InkTabs/InkTabs.cjs +1 -0
  123. package/dist/components/InkTabs/InkTabs.d.ts +4 -0
  124. package/dist/components/InkTabs/InkTabs.d.ts.map +1 -0
  125. package/dist/components/InkTabs/InkTabs.js +104 -0
  126. package/dist/components/InkTabs/index.d.ts +2 -0
  127. package/dist/components/InkTabs/index.d.ts.map +1 -0
  128. package/dist/components/InkWorkspace/InkWorkspace.cjs +1 -0
  129. package/dist/components/InkWorkspace/InkWorkspace.d.ts +4 -0
  130. package/dist/components/InkWorkspace/InkWorkspace.d.ts.map +1 -0
  131. package/dist/components/InkWorkspace/InkWorkspace.js +317 -0
  132. package/dist/components/InkWorkspace/components/WorkspaceIcons.cjs +1 -0
  133. package/dist/components/InkWorkspace/components/WorkspaceIcons.d.ts +11 -0
  134. package/dist/components/InkWorkspace/components/WorkspaceIcons.d.ts.map +1 -0
  135. package/dist/components/InkWorkspace/components/WorkspaceIcons.js +39 -0
  136. package/dist/components/InkWorkspace/hooks/useInkWorkspace.cjs +1 -0
  137. package/dist/components/InkWorkspace/hooks/useInkWorkspace.d.ts +30 -0
  138. package/dist/components/InkWorkspace/hooks/useInkWorkspace.d.ts.map +1 -0
  139. package/dist/components/InkWorkspace/hooks/useInkWorkspace.js +72 -0
  140. package/dist/components/InkWorkspace/index.d.ts +4 -0
  141. package/dist/components/InkWorkspace/index.d.ts.map +1 -0
  142. package/dist/components/index.d.ts +2 -0
  143. package/dist/components/index.d.ts.map +1 -1
  144. package/dist/constants/collab.const.cjs +1 -0
  145. package/dist/constants/collab.const.d.ts +20 -0
  146. package/dist/constants/collab.const.d.ts.map +1 -0
  147. package/dist/constants/collab.const.js +54 -0
  148. package/dist/constants/colorMode.const.cjs +1 -1
  149. package/dist/constants/colorMode.const.d.ts +1 -1
  150. package/dist/constants/colorMode.const.d.ts.map +1 -1
  151. package/dist/constants/colorMode.const.js +4 -4
  152. package/dist/constants/contextMenu.const.cjs +1 -1
  153. package/dist/constants/contextMenu.const.d.ts +2 -0
  154. package/dist/constants/contextMenu.const.d.ts.map +1 -1
  155. package/dist/constants/contextMenu.const.js +17 -15
  156. package/dist/constants/defaultIcons.cjs +1 -1
  157. package/dist/constants/defaultIcons.d.ts.map +1 -1
  158. package/dist/constants/defaultIcons.js +20 -13
  159. package/dist/constants/defaults.const.cjs +1 -1
  160. package/dist/constants/defaults.const.d.ts +48 -0
  161. package/dist/constants/defaults.const.d.ts.map +1 -1
  162. package/dist/constants/defaults.const.js +201 -102
  163. package/dist/constants/generals.const.cjs +1 -1
  164. package/dist/constants/generals.const.d.ts +48 -0
  165. package/dist/constants/generals.const.d.ts.map +1 -1
  166. package/dist/constants/generals.const.js +71 -28
  167. package/dist/constants/index.d.ts +3 -0
  168. package/dist/constants/index.d.ts.map +1 -1
  169. package/dist/constants/numbers.cjs +1 -1
  170. package/dist/constants/numbers.d.ts +14 -0
  171. package/dist/constants/numbers.d.ts.map +1 -1
  172. package/dist/constants/numbers.js +47 -28
  173. package/dist/constants/plugins.const.cjs +1 -0
  174. package/dist/constants/plugins.const.d.ts +13 -0
  175. package/dist/constants/plugins.const.d.ts.map +1 -0
  176. package/dist/constants/plugins.const.js +45 -0
  177. package/dist/constants/table.const.cjs +1 -1
  178. package/dist/constants/table.const.d.ts +4 -0
  179. package/dist/constants/table.const.d.ts.map +1 -1
  180. package/dist/constants/table.const.js +10 -6
  181. package/dist/constants/toolbar.const.cjs +1 -1
  182. package/dist/constants/toolbar.const.d.ts +7 -0
  183. package/dist/constants/toolbar.const.d.ts.map +1 -1
  184. package/dist/constants/toolbar.const.js +16 -9
  185. package/dist/constants/toolbarMenu.const.cjs +1 -1
  186. package/dist/constants/toolbarMenu.const.d.ts +2 -0
  187. package/dist/constants/toolbarMenu.const.d.ts.map +1 -1
  188. package/dist/constants/toolbarMenu.const.js +80 -19
  189. package/dist/constants/workspace.const.cjs +1 -0
  190. package/dist/constants/workspace.const.d.ts +24 -0
  191. package/dist/constants/workspace.const.d.ts.map +1 -0
  192. package/dist/constants/workspace.const.js +23 -0
  193. package/dist/hooks/index.d.ts +4 -0
  194. package/dist/hooks/index.d.ts.map +1 -0
  195. package/dist/hooks/useInkCollaboration.cjs +1 -0
  196. package/dist/hooks/useInkCollaboration.d.ts +4 -0
  197. package/dist/hooks/useInkCollaboration.d.ts.map +1 -0
  198. package/dist/hooks/useInkCollaboration.js +86 -0
  199. package/dist/hooks/useToolbarOverflow.cjs +1 -0
  200. package/dist/hooks/useToolbarOverflow.d.ts +8 -0
  201. package/dist/hooks/useToolbarOverflow.d.ts.map +1 -0
  202. package/dist/hooks/useToolbarOverflow.js +29 -0
  203. package/dist/index.cjs +1 -1
  204. package/dist/index.d.ts +8 -3
  205. package/dist/index.d.ts.map +1 -1
  206. package/dist/index.js +150 -104
  207. package/dist/plugins/excel/excel.utils.cjs +1 -0
  208. package/dist/plugins/excel/excel.utils.d.ts +13 -0
  209. package/dist/plugins/excel/excel.utils.d.ts.map +1 -0
  210. package/dist/plugins/excel/excel.utils.js +40 -0
  211. package/dist/plugins/excel/index.d.ts +3 -0
  212. package/dist/plugins/excel/index.d.ts.map +1 -0
  213. package/dist/plugins/graph/graph.const.cjs +1 -0
  214. package/dist/plugins/graph/graph.const.d.ts +14 -0
  215. package/dist/plugins/graph/graph.const.d.ts.map +1 -0
  216. package/dist/plugins/graph/graph.const.js +24 -0
  217. package/dist/plugins/graph/graph.types.d.ts +7 -0
  218. package/dist/plugins/graph/graph.types.d.ts.map +1 -0
  219. package/dist/plugins/graph/graph.utils.cjs +1 -0
  220. package/dist/plugins/graph/graph.utils.d.ts +11 -0
  221. package/dist/plugins/graph/graph.utils.d.ts.map +1 -0
  222. package/dist/plugins/graph/graph.utils.js +76 -0
  223. package/dist/plugins/graph/index.d.ts +4 -0
  224. package/dist/plugins/graph/index.d.ts.map +1 -0
  225. package/dist/plugins/host/index.d.ts +2 -0
  226. package/dist/plugins/host/index.d.ts.map +1 -0
  227. package/dist/plugins/host/inkPlugins.cjs +1 -0
  228. package/dist/plugins/host/inkPlugins.d.ts +16 -0
  229. package/dist/plugins/host/inkPlugins.d.ts.map +1 -0
  230. package/dist/plugins/host/inkPlugins.js +20 -0
  231. package/dist/plugins/index.d.ts +5 -0
  232. package/dist/plugins/index.d.ts.map +1 -0
  233. package/dist/plugins/theme/index.d.ts +4 -0
  234. package/dist/plugins/theme/index.d.ts.map +1 -0
  235. package/dist/plugins/theme/inkTheme.cjs +1 -0
  236. package/dist/plugins/theme/inkTheme.d.ts +5 -0
  237. package/dist/plugins/theme/inkTheme.d.ts.map +1 -0
  238. package/dist/plugins/theme/inkTheme.js +27 -0
  239. package/dist/plugins/theme/theme.const.cjs +1 -0
  240. package/dist/plugins/theme/theme.const.d.ts +9 -0
  241. package/dist/plugins/theme/theme.const.d.ts.map +1 -0
  242. package/dist/plugins/theme/theme.const.js +15 -0
  243. package/dist/plugins/theme/theme.types.d.ts +12 -0
  244. package/dist/plugins/theme/theme.types.d.ts.map +1 -0
  245. package/dist/plugins/titles/index.d.ts +4 -0
  246. package/dist/plugins/titles/index.d.ts.map +1 -0
  247. package/dist/plugins/titles/titles.const.cjs +1 -0
  248. package/dist/plugins/titles/titles.const.d.ts +4 -0
  249. package/dist/plugins/titles/titles.const.d.ts.map +1 -0
  250. package/dist/plugins/titles/titles.const.js +15 -0
  251. package/dist/plugins/titles/titles.types.d.ts +2 -0
  252. package/dist/plugins/titles/titles.types.d.ts.map +1 -0
  253. package/dist/plugins/titles/titles.utils.cjs +1 -0
  254. package/dist/plugins/titles/titles.utils.d.ts +3 -0
  255. package/dist/plugins/titles/titles.utils.d.ts.map +1 -0
  256. package/dist/plugins/titles/titles.utils.js +14 -0
  257. package/dist/styles.css +1 -1
  258. package/dist/types/collab.types.d.ts +55 -0
  259. package/dist/types/collab.types.d.ts.map +1 -0
  260. package/dist/types/features.types.d.ts +1 -1
  261. package/dist/types/features.types.d.ts.map +1 -1
  262. package/dist/types/index.d.ts +3 -0
  263. package/dist/types/index.d.ts.map +1 -1
  264. package/dist/types/ink.types.d.ts +10 -2
  265. package/dist/types/ink.types.d.ts.map +1 -1
  266. package/dist/types/plugin.types.d.ts +8 -0
  267. package/dist/types/plugin.types.d.ts.map +1 -0
  268. package/dist/types/premium.types.d.ts +1 -1
  269. package/dist/types/premium.types.d.ts.map +1 -1
  270. package/dist/types/workspace.types.d.ts +54 -0
  271. package/dist/types/workspace.types.d.ts.map +1 -0
  272. package/dist/utils/collab.utils.cjs +1 -0
  273. package/dist/utils/collab.utils.d.ts +5 -0
  274. package/dist/utils/collab.utils.d.ts.map +1 -0
  275. package/dist/utils/collab.utils.js +32 -0
  276. package/dist/utils/collab.utils.test.d.ts +2 -0
  277. package/dist/utils/collab.utils.test.d.ts.map +1 -0
  278. package/dist/utils/index.d.ts +3 -1
  279. package/dist/utils/index.d.ts.map +1 -1
  280. package/dist/utils/ink.brand.test.d.ts +2 -0
  281. package/dist/utils/ink.brand.test.d.ts.map +1 -0
  282. package/dist/utils/outline.utils.cjs +1 -1
  283. package/dist/utils/outline.utils.d.ts.map +1 -1
  284. package/dist/utils/outline.utils.js +32 -32
  285. package/dist/utils/table.utils.cjs +1 -1
  286. package/dist/utils/table.utils.d.ts +4 -0
  287. package/dist/utils/table.utils.d.ts.map +1 -1
  288. package/dist/utils/table.utils.js +84 -45
  289. package/dist/utils/workspace.utils.cjs +1 -0
  290. package/dist/utils/workspace.utils.d.ts +5 -0
  291. package/dist/utils/workspace.utils.d.ts.map +1 -0
  292. package/dist/utils/workspace.utils.js +26 -0
  293. package/dist/utils/workspace.utils.test.d.ts +2 -0
  294. package/dist/utils/workspace.utils.test.d.ts.map +1 -0
  295. package/package.json +7 -1
@@ -0,0 +1,65 @@
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
+ import { REMOTE_CURSOR_MIN_LEFT_PX as T, REMOTE_CURSOR_CHAR_WIDTH_PX as p, REMOTE_CURSOR_LEFT_OFFSET_PX as d, REMOTE_CURSOR_MIN_TOP_PX as l, REMOTE_CURSOR_LINE_HEIGHT_PX as M, REMOTE_CURSOR_TOP_OFFSET_PX as f } from "./RemoteCursors.const.js";
3
+ import { NUMBER_ZERO as i, NUMBER_ONE as m } from "../../../../constants/numbers.js";
4
+ import { EMPTY_STRING as C } from "../../../../constants/generals.const.js";
5
+ import "../../../../constants/openai.const.js";
6
+ import { cn as N } from "../../../../utils/cn.utils.js";
7
+ import "../../../../utils/paste.utils.js";
8
+ import "react";
9
+ import "react-dom";
10
+ const I = ({
11
+ collaborators: _,
12
+ className: n = C
13
+ }) => {
14
+ const o = (_ || []).filter(
15
+ (r) => r.cursor && (r.cursor.offset !== void 0 || r.cursor.line !== void 0)
16
+ );
17
+ return o.length === i ? null : /* @__PURE__ */ e(
18
+ "div",
19
+ {
20
+ className: N("ink-remote-cursors-layer", n),
21
+ "aria-hidden": "true",
22
+ children: o.map((r) => {
23
+ var t, s;
24
+ const c = ((t = r.cursor) == null ? void 0 : t.line) ?? m, R = ((s = r.cursor) == null ? void 0 : s.col) ?? i, E = Math.max(
25
+ l,
26
+ (c - m) * M + f
27
+ ), O = Math.max(
28
+ T,
29
+ R * p + d
30
+ );
31
+ return /* @__PURE__ */ u(
32
+ "div",
33
+ {
34
+ className: "ink-remote-cursor-item",
35
+ style: {
36
+ top: `${E}px`,
37
+ left: `${O}px`
38
+ },
39
+ children: [
40
+ /* @__PURE__ */ e(
41
+ "div",
42
+ {
43
+ className: "ink-remote-cursor-caret",
44
+ style: { backgroundColor: r.color }
45
+ }
46
+ ),
47
+ /* @__PURE__ */ e(
48
+ "div",
49
+ {
50
+ className: "ink-remote-cursor-tag",
51
+ style: { backgroundColor: r.color },
52
+ children: r.name
53
+ }
54
+ )
55
+ ]
56
+ },
57
+ r.id
58
+ );
59
+ })
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ I as RemoteCursors
65
+ };
@@ -0,0 +1,6 @@
1
+ import { InkCollaborator } from '../../../../types';
2
+ export interface RemoteCursorsProps {
3
+ collaborators: InkCollaborator[];
4
+ className?: string;
5
+ }
6
+ //# sourceMappingURL=RemoteCursors.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoteCursors.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/RemoteCursors/RemoteCursors.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,3 @@
1
+ export { RemoteCursors } from './RemoteCursors';
2
+ export type { RemoteCursorsProps } from './RemoteCursors.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/RemoteCursors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),w=require("react-dom"),_=require("../../../../constants/numbers.cjs"),I=require("../../../../constants/generals.const.cjs"),v=require("../../../../constants/colorMode.const.cjs"),B=require("../../../../constants/keyboard.const.cjs"),t=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const b=require("../ToolbarDropdown/ToolbarDropdown.utils.cjs"),O=require("../ToolbarButton/ToolbarButton.cjs"),c=require("./TableSizePicker.const.cjs"),p=C=>{const{icon:f,disabled:d=!1,onSelect:P}=C,[l,E]=n.useState(!1),[u,L]=n.useState(c.TABLE_PICKER_INITIAL_HOVER),[T,m]=n.useState(c.TABLE_PICKER_EMPTY_POSITION),A=n.useRef(null),S=n.useRef(null),R=n.useRef(null);n.useEffect(()=>{if(!l)return;const e=()=>{const o=b.getToolbarDropdownMenuPosition(S.current);m({top:o.top,left:o.left})};e();const r=o=>{var K,N;const a=o.target;(K=A.current)!=null&&K.contains(a)||(N=R.current)!=null&&N.contains(a)||E(!1)},i=o=>{o.key===B.KEY_ESCAPE&&E(!1)};return document.addEventListener("mousedown",r),document.addEventListener("keydown",i),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",i),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[l]);const M=Array.from({length:_.INK_TABLE_PICKER_MAX*_.INK_TABLE_PICKER_MAX},(e,r)=>{const i=Math.floor(r/_.INK_TABLE_PICKER_MAX)+_.NUMBER_ONE,o=r%_.INK_TABLE_PICKER_MAX+_.NUMBER_ONE,a=i<=u.rows&&o<=u.cols;return{rows:i,cols:o,isOn:a,key:`${i}-${o}`}});return s.jsxs("div",{className:t.INK_CLASS_TABLE_PICKER,ref:A,children:[s.jsx("div",{ref:S,children:s.jsx(O.ToolbarButton,{icon:f,title:I.INK_TABLE_INSERT_TITLE,disabled:d,onClick:()=>{d||(L(c.TABLE_PICKER_INITIAL_HOVER),E(e=>!e))}})}),l&&w.createPortal(s.jsxs("div",{ref:R,className:`${t.INK_CLASS_STYLE_MENU} ${t.INK_CLASS_STYLE_MENU_PORTAL} ${t.INK_CLASS_STYLE_MENU_FORCED}`,"data-color-mode":v.COLOR_MODE_LIGHT,role:"grid","aria-label":I.INK_TABLE_INSERT_TITLE,style:{top:T.top,left:T.left},children:[s.jsx("div",{className:t.INK_CLASS_TABLE_PICKER_GRID,style:{gridTemplateColumns:`repeat(${_.INK_TABLE_PICKER_MAX}, 1fr)`},children:M.map(e=>s.jsx("button",{type:"button",className:`${t.INK_CLASS_TABLE_PICKER_CELL}${e.isOn?`${I.SPACE_STRING}${t.INK_CLASS_TABLE_PICKER_CELL_ON}`:""}`,"aria-label":`${e.rows}${c.TABLE_PICKER_TIMES_MARK}${e.cols}`,onMouseEnter:()=>L({rows:e.rows,cols:e.cols}),onMouseMove:()=>L({rows:e.rows,cols:e.cols}),onMouseDown:r=>{r.preventDefault(),P(e.rows,e.cols),E(!1)}},e.key))}),s.jsxs("div",{className:t.INK_CLASS_TABLE_PICKER_LABEL,children:[u.rows,c.TABLE_PICKER_TIMES_MARK,u.cols]})]}),document.body)]})};exports.TableSizePicker=p;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../../../constants/numbers.cjs");require("../../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const _={rows:E.NUMBER_ONE,cols:E.NUMBER_ONE},e={top:E.NUMBER_ZERO,left:E.NUMBER_ZERO},r=" × ";exports.TABLE_PICKER_EMPTY_POSITION=e;exports.TABLE_PICKER_INITIAL_HOVER=_;exports.TABLE_PICKER_TIMES_MARK=r;
@@ -0,0 +1,10 @@
1
+ export declare const TABLE_PICKER_INITIAL_HOVER: {
2
+ rows: number;
3
+ cols: number;
4
+ };
5
+ export declare const TABLE_PICKER_EMPTY_POSITION: {
6
+ top: number;
7
+ left: number;
8
+ };
9
+ export declare const TABLE_PICKER_TIMES_MARK = " \u00D7 ";
10
+ //# sourceMappingURL=TableSizePicker.const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSizePicker.const.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TableSizePicker/TableSizePicker.const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,aAAQ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { NUMBER_ONE as o, NUMBER_ZERO as E } from "../../../../constants/numbers.js";
2
+ import "../../../../constants/openai.const.js";
3
+ import "react/jsx-runtime";
4
+ import "../../../../utils/paste.utils.js";
5
+ import "react";
6
+ import "react-dom";
7
+ const m = {
8
+ rows: o,
9
+ cols: o
10
+ }, T = {
11
+ top: E,
12
+ left: E
13
+ }, i = " × ";
14
+ export {
15
+ T as TABLE_PICKER_EMPTY_POSITION,
16
+ m as TABLE_PICKER_INITIAL_HOVER,
17
+ i as TABLE_PICKER_TIMES_MARK
18
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { TableSizePickerProps } from './TableSizePicker.types';
3
+ export declare const TableSizePicker: FC<TableSizePickerProps>;
4
+ //# sourceMappingURL=TableSizePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSizePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TableSizePicker/TableSizePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAyB7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiGpD,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { jsxs as a, jsx as E } from "react/jsx-runtime";
2
+ import { useState as l, useRef as L, useEffect as B } from "react";
3
+ import { createPortal as O } from "react-dom";
4
+ import { INK_TABLE_PICKER_MAX as n, NUMBER_ONE as A } from "../../../../constants/numbers.js";
5
+ import { INK_TABLE_INSERT_TITLE as C, SPACE_STRING as $ } from "../../../../constants/generals.const.js";
6
+ import { COLOR_MODE_LIGHT as y } from "../../../../constants/colorMode.const.js";
7
+ import { KEY_ESCAPE as b } from "../../../../constants/keyboard.const.js";
8
+ import { INK_CLASS_TABLE_PICKER as g, INK_CLASS_STYLE_MENU as h, INK_CLASS_STYLE_MENU_PORTAL as k, INK_CLASS_STYLE_MENU_FORCED as D, INK_CLASS_TABLE_PICKER_GRID as Y, INK_CLASS_TABLE_PICKER_CELL as U, INK_CLASS_TABLE_PICKER_CELL_ON as x, INK_CLASS_TABLE_PICKER_LABEL as z } from "../../../../constants/defaults.const.js";
9
+ import "../../../../constants/openai.const.js";
10
+ import "../../../../utils/paste.utils.js";
11
+ import { getToolbarDropdownMenuPosition as G } from "../ToolbarDropdown/ToolbarDropdown.utils.js";
12
+ import { ToolbarButton as H } from "../ToolbarButton/ToolbarButton.js";
13
+ import { TABLE_PICKER_INITIAL_HOVER as N, TABLE_PICKER_EMPTY_POSITION as j, TABLE_PICKER_TIMES_MARK as w } from "./TableSizePicker.const.js";
14
+ const so = (v) => {
15
+ const { icon: K, disabled: d = !1, onSelect: R } = v, [c, s] = l(!1), [i, m] = l(N), [f, P] = l(j), u = L(null), I = L(null), S = L(null);
16
+ B(() => {
17
+ if (!c) return;
18
+ const o = () => {
19
+ const e = G(I.current);
20
+ P({ top: e.top, left: e.left });
21
+ };
22
+ o();
23
+ const t = (e) => {
24
+ var p, T;
25
+ const _ = e.target;
26
+ (p = u.current) != null && p.contains(_) || (T = S.current) != null && T.contains(_) || s(!1);
27
+ }, r = (e) => {
28
+ e.key === b && s(!1);
29
+ };
30
+ return document.addEventListener("mousedown", t), document.addEventListener("keydown", r), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
31
+ document.removeEventListener("mousedown", t), document.removeEventListener("keydown", r), window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
32
+ };
33
+ }, [c]);
34
+ const M = Array.from({ length: n * n }, (o, t) => {
35
+ const r = Math.floor(t / n) + A, e = t % n + A, _ = r <= i.rows && e <= i.cols;
36
+ return { rows: r, cols: e, isOn: _, key: `${r}-${e}` };
37
+ });
38
+ return /* @__PURE__ */ a("div", { className: g, ref: u, children: [
39
+ /* @__PURE__ */ E("div", { ref: I, children: /* @__PURE__ */ E(
40
+ H,
41
+ {
42
+ icon: K,
43
+ title: C,
44
+ disabled: d,
45
+ onClick: () => {
46
+ d || (m(N), s((o) => !o));
47
+ }
48
+ }
49
+ ) }),
50
+ c && O(
51
+ /* @__PURE__ */ a(
52
+ "div",
53
+ {
54
+ ref: S,
55
+ className: `${h} ${k} ${D}`,
56
+ "data-color-mode": y,
57
+ role: "grid",
58
+ "aria-label": C,
59
+ style: { top: f.top, left: f.left },
60
+ children: [
61
+ /* @__PURE__ */ E(
62
+ "div",
63
+ {
64
+ className: Y,
65
+ style: { gridTemplateColumns: `repeat(${n}, 1fr)` },
66
+ children: M.map((o) => /* @__PURE__ */ E(
67
+ "button",
68
+ {
69
+ type: "button",
70
+ className: `${U}${o.isOn ? `${$}${x}` : ""}`,
71
+ "aria-label": `${o.rows}${w}${o.cols}`,
72
+ onMouseEnter: () => m({ rows: o.rows, cols: o.cols }),
73
+ onMouseMove: () => m({ rows: o.rows, cols: o.cols }),
74
+ onMouseDown: (t) => {
75
+ t.preventDefault(), R(o.rows, o.cols), s(!1);
76
+ }
77
+ },
78
+ o.key
79
+ ))
80
+ }
81
+ ),
82
+ /* @__PURE__ */ a("div", { className: z, children: [
83
+ i.rows,
84
+ w,
85
+ i.cols
86
+ ] })
87
+ ]
88
+ }
89
+ ),
90
+ document.body
91
+ )
92
+ ] });
93
+ };
94
+ export {
95
+ so as TableSizePicker
96
+ };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ export type TableSizePickerProps = {
3
+ icon: ReactNode;
4
+ disabled?: boolean;
5
+ onSelect: (rows: number, cols: number) => void;
6
+ };
7
+ export type TableSizePickerPosition = {
8
+ top: number;
9
+ left: number;
10
+ };
11
+ //# sourceMappingURL=TableSizePicker.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSizePicker.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TableSizePicker/TableSizePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { TableSizePicker } from './TableSizePicker';
2
+ export type { TableSizePickerProps } from './TableSizePicker.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TableSizePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),S=require("react-dom"),c=require("../../../../constants/generals.const.cjs"),b=require("../../../../constants/colorMode.const.cjs"),n=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("react");const m=require("../../../../plugins/theme/theme.const.cjs");require("../../../../plugins/host/inkPlugins.cjs");const L=require("../ToolbarButton/ToolbarButton.cjs"),N=require("./hooks/useThemePickerMenu.cjs"),I=u=>{const{icon:a,disabled:i=!1,hint:_,onHint:d,pluginColor:T,value:E,onChange:s}=u,{open:f,setOpen:r,menuPosition:l,rootRef:p,triggerRef:q,menuRef:M}=N.useThemePickerMenu();return o.jsxs("div",{ref:p,children:[o.jsx("div",{ref:q,children:o.jsx(L.ToolbarButton,{icon:a,title:c.INK_THEME_TITLE,hint:_,onHint:d,pluginColor:T,disabled:i,onClick:()=>{i||r(e=>!e)}})}),f&&S.createPortal(o.jsx("div",{ref:M,className:`${n.INK_CLASS_STYLE_MENU} ${n.INK_CLASS_STYLE_MENU_PORTAL} ${n.INK_CLASS_STYLE_MENU_FORCED}`,"data-color-mode":b.COLOR_MODE_LIGHT,role:"listbox","aria-label":c.INK_THEME_TITLE,style:{top:l.top,left:l.left},children:m.INK_THEMES.map(e=>o.jsx("button",{type:"button",role:"option","aria-selected":e.id===E,className:"Ink-Editor__style-option",onMouseDown:t=>{t.preventDefault(),s(e.id),r(!1)},onClick:t=>{t.preventDefault(),s(e.id),r(!1)},children:e.label},e.id))}),document.body)]})};exports.ThemePicker=I;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ThemePickerProps } from './ThemePicker.types';
3
+ export declare const ThemePicker: FC<ThemePickerProps>;
4
+ //# sourceMappingURL=ThemePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ThemePicker/ThemePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAYhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAwD5C,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { jsxs as L, jsx as e } from "react/jsx-runtime";
2
+ import { createPortal as N } from "react-dom";
3
+ import { INK_THEME_TITLE as m } from "../../../../constants/generals.const.js";
4
+ import { COLOR_MODE_LIGHT as S } from "../../../../constants/colorMode.const.js";
5
+ import { INK_CLASS_STYLE_MENU as C, INK_CLASS_STYLE_MENU_PORTAL as b, INK_CLASS_STYLE_MENU_FORCED as I } from "../../../../constants/defaults.const.js";
6
+ import "../../../../constants/openai.const.js";
7
+ import "../../../../utils/paste.utils.js";
8
+ import "react";
9
+ import { INK_THEMES as M } from "../../../../plugins/theme/theme.const.js";
10
+ import "../../../../plugins/host/inkPlugins.js";
11
+ import { ToolbarButton as v } from "../ToolbarButton/ToolbarButton.js";
12
+ import { useThemePickerMenu as O } from "./hooks/useThemePickerMenu.js";
13
+ const Y = (a) => {
14
+ const { icon: p, disabled: i = !1, hint: f, onHint: s, pluginColor: d, value: c, onChange: n } = a, { open: _, setOpen: r, menuPosition: l, rootRef: u, triggerRef: E, menuRef: T } = O();
15
+ return /* @__PURE__ */ L("div", { ref: u, children: [
16
+ /* @__PURE__ */ e("div", { ref: E, children: /* @__PURE__ */ e(
17
+ v,
18
+ {
19
+ icon: p,
20
+ title: m,
21
+ hint: f,
22
+ onHint: s,
23
+ pluginColor: d,
24
+ disabled: i,
25
+ onClick: () => {
26
+ i || r((o) => !o);
27
+ }
28
+ }
29
+ ) }),
30
+ _ && N(
31
+ /* @__PURE__ */ e(
32
+ "div",
33
+ {
34
+ ref: T,
35
+ className: `${C} ${b} ${I}`,
36
+ "data-color-mode": S,
37
+ role: "listbox",
38
+ "aria-label": m,
39
+ style: { top: l.top, left: l.left },
40
+ children: M.map((o) => /* @__PURE__ */ e(
41
+ "button",
42
+ {
43
+ type: "button",
44
+ role: "option",
45
+ "aria-selected": o.id === c,
46
+ className: "Ink-Editor__style-option",
47
+ onMouseDown: (t) => {
48
+ t.preventDefault(), n(o.id), r(!1);
49
+ },
50
+ onClick: (t) => {
51
+ t.preventDefault(), n(o.id), r(!1);
52
+ },
53
+ children: o.label
54
+ },
55
+ o.id
56
+ ))
57
+ }
58
+ ),
59
+ document.body
60
+ )
61
+ ] });
62
+ };
63
+ export {
64
+ Y as ThemePicker
65
+ };
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { InkThemeId } from '../../../../plugins/theme';
3
+ export type ThemePickerProps = {
4
+ icon: ReactNode;
5
+ disabled?: boolean;
6
+ hint?: string;
7
+ onHint?: (hint: string) => void;
8
+ pluginColor?: string;
9
+ value: InkThemeId;
10
+ onChange: (id: InkThemeId) => void;
11
+ };
12
+ //# sourceMappingURL=ThemePicker.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemePicker.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ThemePicker/ThemePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;CACpC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { useThemePickerMenu } from './useThemePickerMenu';
2
+ export type { UseThemePickerMenuReturn } from './useThemePickerMenu';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/InkEditor/components/ThemePicker/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),m=require("../../../../../constants/numbers.cjs"),w=require("../../../../../constants/keyboard.const.cjs");require("../../../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../../../utils/paste.utils.cjs");require("react-dom");const R=require("../../ToolbarDropdown/ToolbarDropdown.utils.cjs"),p=()=>{const[o,r]=t.useState(!1),[E,v]=t.useState({top:m.NUMBER_ZERO,left:m.NUMBER_ZERO}),s=t.useRef(null),u=t.useRef(null),i=t.useRef(null);return t.useEffect(()=>{if(!o)return;const n=()=>{const e=R.getToolbarDropdownMenuPosition(u.current);v({top:e.top,left:e.left})};n();const c=e=>{var a,f;const l=e.target;(a=s.current)!=null&&a.contains(l)||(f=i.current)!=null&&f.contains(l)||r(!1)},d=e=>{e.key===w.KEY_ESCAPE&&r(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}},[o]),{open:o,setOpen:r,menuPosition:E,rootRef:s,triggerRef:u,menuRef:i}};exports.useThemePickerMenu=p;
@@ -0,0 +1,13 @@
1
+ export interface UseThemePickerMenuReturn {
2
+ open: boolean;
3
+ setOpen: React.Dispatch<React.SetStateAction<boolean>>;
4
+ menuPosition: {
5
+ top: number;
6
+ left: number;
7
+ };
8
+ rootRef: React.RefObject<HTMLDivElement>;
9
+ triggerRef: React.RefObject<HTMLDivElement>;
10
+ menuRef: React.RefObject<HTMLDivElement>;
11
+ }
12
+ export declare const useThemePickerMenu: () => UseThemePickerMenuReturn;
13
+ //# sourceMappingURL=useThemePickerMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemePickerMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,YAAY,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,QAAO,wBA0CrC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { useState as p, useRef as r, useEffect as w } from "react";
2
+ import { NUMBER_ZERO as a } from "../../../../../constants/numbers.js";
3
+ import { KEY_ESCAPE as L } from "../../../../../constants/keyboard.const.js";
4
+ import "../../../../../constants/openai.const.js";
5
+ import "react/jsx-runtime";
6
+ import "../../../../../utils/paste.utils.js";
7
+ import "react-dom";
8
+ import { getToolbarDropdownMenuPosition as P } from "../../ToolbarDropdown/ToolbarDropdown.utils.js";
9
+ const O = () => {
10
+ const [n, o] = p(!1), [E, v] = p({ top: a, left: a }), s = r(null), i = r(null), u = r(null);
11
+ return w(() => {
12
+ if (!n) return;
13
+ const t = () => {
14
+ const e = P(i.current);
15
+ v({ top: e.top, left: e.left });
16
+ };
17
+ t();
18
+ const c = (e) => {
19
+ var f, l;
20
+ const d = e.target;
21
+ (f = s.current) != null && f.contains(d) || (l = u.current) != null && l.contains(d) || o(!1);
22
+ }, m = (e) => {
23
+ e.key === L && o(!1);
24
+ };
25
+ return document.addEventListener("mousedown", c), document.addEventListener("keydown", m), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
26
+ document.removeEventListener("mousedown", c), document.removeEventListener("keydown", m), window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
27
+ };
28
+ }, [n]), {
29
+ open: n,
30
+ setOpen: o,
31
+ menuPosition: E,
32
+ rootRef: s,
33
+ triggerRef: i,
34
+ menuRef: u
35
+ };
36
+ };
37
+ export {
38
+ O as useThemePickerMenu
39
+ };
@@ -0,0 +1,3 @@
1
+ export { ThemePicker } from './ThemePicker';
2
+ export type { ThemePickerProps } from './ThemePicker.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ThemePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("react"),q=require("react-dom"),f=require("../../../../constants/numbers.cjs"),m=require("../../../../constants/generals.const.cjs"),K=require("../../../../constants/colorMode.const.cjs"),A=require("../../../../constants/keyboard.const.cjs"),t=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const I=require("../../../../plugins/titles/titles.const.cjs"),M=require("../ToolbarDropdown/ToolbarDropdown.utils.cjs"),x=require("../ToolbarButton/ToolbarButton.cjs"),g=N=>{const{icon:v,disabled:c=!1,hint:R,onHint:p,pluginColor:b,onSelect:w}=N,[l,s]=r.useState(!1),[u,C]=r.useState({top:f.NUMBER_ZERO,left:f.NUMBER_ZERO}),a=r.useRef(null),_=r.useRef(null),d=r.useRef(null);return r.useEffect(()=>{if(!l)return;const e=()=>{const o=M.getToolbarDropdownMenuPosition(_.current);C({top:o.top,left:o.left})};e();const i=o=>{var T,S;const L=o.target;(T=a.current)!=null&&T.contains(L)||(S=d.current)!=null&&S.contains(L)||s(!1)},E=o=>{o.key===A.KEY_ESCAPE&&s(!1)};return document.addEventListener("mousedown",i),document.addEventListener("keydown",E),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",E),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[l]),n.jsxs("div",{className:t.INK_CLASS_TITLE_GALLERY,ref:a,children:[n.jsx("div",{ref:_,children:n.jsx(x.ToolbarButton,{icon:v,title:m.INK_TITLES_TITLE,hint:R,onHint:p,pluginColor:b,disabled:c,onClick:()=>{c||s(e=>!e)}})}),l?q.createPortal(n.jsx("div",{ref:d,className:`${t.INK_CLASS_STYLE_MENU} ${t.INK_CLASS_STYLE_MENU_PORTAL} ${t.INK_CLASS_STYLE_MENU_FORCED}`,"data-color-mode":K.COLOR_MODE_LIGHT,role:"listbox","aria-label":m.INK_TITLES_TITLE,style:{top:u.top,left:u.left},children:n.jsx("div",{className:t.INK_CLASS_TITLE_GRID,children:I.TITLE_STYLE_IDS.map(e=>n.jsx("button",{type:"button",className:t.INK_CLASS_TITLE_CELL,"aria-label":e,onMouseDown:i=>{i.preventDefault(),w(e),s(!1)},children:n.jsx("span",{className:`${t.INK_CLASS_TITLE} ${t.INK_CLASS_TITLE}--${e}`,children:I.TITLE_PREVIEW_TEXT})},e))})}),document.body):null]})};exports.TitleGallery=g;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { TitleGalleryProps } from './TitleGallery.types';
3
+ export declare const TitleGallery: FC<TitleGalleryProps>;
4
+ //# sourceMappingURL=TitleGallery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleGallery.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TitleGallery/TitleGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAkB7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAsF9C,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { jsxs as K, jsx as t } from "react/jsx-runtime";
2
+ import { useState as _, useRef as s, useEffect as b } from "react";
3
+ import { createPortal as M } from "react-dom";
4
+ import { NUMBER_ZERO as p } from "../../../../constants/numbers.js";
5
+ import { INK_TITLES_TITLE as T } from "../../../../constants/generals.const.js";
6
+ import { COLOR_MODE_LIGHT as P } from "../../../../constants/colorMode.const.js";
7
+ import { KEY_ESCAPE as h } from "../../../../constants/keyboard.const.js";
8
+ import { INK_CLASS_TITLE_GALLERY as D, INK_CLASS_STYLE_MENU as O, INK_CLASS_STYLE_MENU_PORTAL as g, INK_CLASS_STYLE_MENU_FORCED as Y, INK_CLASS_TITLE_GRID as $, INK_CLASS_TITLE_CELL as x, INK_CLASS_TITLE as S } from "../../../../constants/defaults.const.js";
9
+ import "../../../../constants/openai.const.js";
10
+ import "../../../../utils/paste.utils.js";
11
+ import { TITLE_STYLE_IDS as y, TITLE_PREVIEW_TEXT as k } from "../../../../plugins/titles/titles.const.js";
12
+ import { getToolbarDropdownMenuPosition as G } from "../ToolbarDropdown/ToolbarDropdown.utils.js";
13
+ import { ToolbarButton as U } from "../ToolbarButton/ToolbarButton.js";
14
+ const oe = (v) => {
15
+ const { icon: I, disabled: l = !1, hint: N, onHint: w, pluginColor: C, onSelect: R } = v, [i, n] = _(!1), [m, A] = _({ top: p, left: p }), a = s(null), c = s(null), E = s(null);
16
+ return b(() => {
17
+ if (!i) return;
18
+ const e = () => {
19
+ const o = G(c.current);
20
+ A({ top: o.top, left: o.left });
21
+ };
22
+ e();
23
+ const r = (o) => {
24
+ var u, L;
25
+ const f = o.target;
26
+ (u = a.current) != null && u.contains(f) || (L = E.current) != null && L.contains(f) || n(!1);
27
+ }, d = (o) => {
28
+ o.key === h && n(!1);
29
+ };
30
+ return document.addEventListener("mousedown", r), document.addEventListener("keydown", d), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
31
+ document.removeEventListener("mousedown", r), document.removeEventListener("keydown", d), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
32
+ };
33
+ }, [i]), /* @__PURE__ */ K("div", { className: D, ref: a, children: [
34
+ /* @__PURE__ */ t("div", { ref: c, children: /* @__PURE__ */ t(
35
+ U,
36
+ {
37
+ icon: I,
38
+ title: T,
39
+ hint: N,
40
+ onHint: w,
41
+ pluginColor: C,
42
+ disabled: l,
43
+ onClick: () => {
44
+ l || n((e) => !e);
45
+ }
46
+ }
47
+ ) }),
48
+ i ? M(
49
+ /* @__PURE__ */ t(
50
+ "div",
51
+ {
52
+ ref: E,
53
+ className: `${O} ${g} ${Y}`,
54
+ "data-color-mode": P,
55
+ role: "listbox",
56
+ "aria-label": T,
57
+ style: { top: m.top, left: m.left },
58
+ children: /* @__PURE__ */ t("div", { className: $, children: y.map((e) => /* @__PURE__ */ t(
59
+ "button",
60
+ {
61
+ type: "button",
62
+ className: x,
63
+ "aria-label": e,
64
+ onMouseDown: (r) => {
65
+ r.preventDefault(), R(e), n(!1);
66
+ },
67
+ children: /* @__PURE__ */ t("span", { className: `${S} ${S}--${e}`, children: k })
68
+ },
69
+ e
70
+ )) })
71
+ }
72
+ ),
73
+ document.body
74
+ ) : null
75
+ ] });
76
+ };
77
+ export {
78
+ oe as TitleGallery
79
+ };
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export type TitleGalleryProps = {
3
+ icon: ReactNode;
4
+ disabled?: boolean;
5
+ hint?: string;
6
+ onHint?: (hint: string) => void;
7
+ pluginColor?: string;
8
+ onSelect: (styleId: string) => void;
9
+ };
10
+ //# sourceMappingURL=TitleGallery.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleGallery.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TitleGallery/TitleGallery.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { TitleGallery } from './TitleGallery';
2
+ export type { TitleGalleryProps } from './TitleGallery.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/TitleGallery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const c=require("../../../../common-components/Button/Button.cjs");require("react");require("react-dom");const b=o=>{const{icon:r,title:e,active:t=!1,onClick:n,disabled:s=!1,className:i}=o,u=a=>{a.preventDefault()};return l.jsx(c.Button,{title:e,"aria-label":e,"aria-pressed":t,disabled:s,active:t,className:i,onMouseDown:u,onClick:n,children:r})};exports.ToolbarButton=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("../../../../constants/generals.const.cjs"),n=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const N=require("../../../../common-components/Button/Button.cjs");require("react");require("react-dom");const S=a=>{const{icon:u,title:s,hint:l,onHint:e,pluginColor:t,active:o=!1,onClick:i,disabled:c=!1,className:d}=a,_=b=>{b.preventDefault()},q=l||s;return r.jsx("span",{className:n.INK_CLASS_TOOL_WRAP,onMouseEnter:()=>e==null?void 0:e(q),onMouseLeave:()=>e==null?void 0:e(p.EMPTY_STRING),children:r.jsxs(N.Button,{title:s,"aria-label":s,"aria-pressed":o,disabled:c,active:o,className:d,onMouseDown:_,onClick:i,children:[u,t?r.jsx("span",{className:n.INK_CLASS_PLUGIN_PIP,style:{background:t},"aria-hidden":!0}):null]})})};exports.ToolbarButton=S;
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ToolbarButton/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAqBhD,CAAC"}
1
+ {"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ToolbarButton/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA0ChD,CAAC"}