@forgedevstack/ink 1.1.6 → 1.1.8

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 (278) hide show
  1. package/CHANGELOG.md +57 -1
  2. package/README.md +9 -1
  3. package/bin/ink.const.mjs +26 -0
  4. package/bin/ink.mjs +58 -0
  5. package/dist/common-components/icons/BulletListIcon.cjs +1 -0
  6. package/dist/common-components/icons/BulletListIcon.d.ts +3 -0
  7. package/dist/common-components/icons/BulletListIcon.d.ts.map +1 -0
  8. package/dist/common-components/icons/BulletListIcon.js +11 -0
  9. package/dist/common-components/icons/ChecklistIcon.cjs +1 -0
  10. package/dist/common-components/icons/ChecklistIcon.d.ts +3 -0
  11. package/dist/common-components/icons/ChecklistIcon.d.ts.map +1 -0
  12. package/dist/common-components/icons/ChecklistIcon.js +10 -0
  13. package/dist/common-components/icons/ImageToolIcon.cjs +1 -0
  14. package/dist/common-components/icons/ImageToolIcon.d.ts +3 -0
  15. package/dist/common-components/icons/ImageToolIcon.d.ts.map +1 -0
  16. package/dist/common-components/icons/ImageToolIcon.js +10 -0
  17. package/dist/common-components/icons/LinkToolIcon.cjs +1 -0
  18. package/dist/common-components/icons/LinkToolIcon.d.ts +3 -0
  19. package/dist/common-components/icons/LinkToolIcon.d.ts.map +1 -0
  20. package/dist/common-components/icons/LinkToolIcon.js +9 -0
  21. package/dist/common-components/icons/OrderedListIcon.cjs +1 -0
  22. package/dist/common-components/icons/OrderedListIcon.d.ts +3 -0
  23. package/dist/common-components/icons/OrderedListIcon.d.ts.map +1 -0
  24. package/dist/common-components/icons/OrderedListIcon.js +9 -0
  25. package/dist/common-components/icons/QuoteIcon.cjs +1 -0
  26. package/dist/common-components/icons/QuoteIcon.d.ts +3 -0
  27. package/dist/common-components/icons/QuoteIcon.d.ts.map +1 -0
  28. package/dist/common-components/icons/QuoteIcon.js +6 -0
  29. package/dist/common-components/icons/TableToolIcon.cjs +1 -0
  30. package/dist/common-components/icons/TableToolIcon.d.ts +3 -0
  31. package/dist/common-components/icons/TableToolIcon.d.ts.map +1 -0
  32. package/dist/common-components/icons/TableToolIcon.js +9 -0
  33. package/dist/common-components/icons/index.d.ts +7 -0
  34. package/dist/common-components/icons/index.d.ts.map +1 -1
  35. package/dist/common-components/index.d.ts +1 -1
  36. package/dist/common-components/index.d.ts.map +1 -1
  37. package/dist/components/InkEditor/InkEditor.cjs +1 -1
  38. package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
  39. package/dist/components/InkEditor/InkEditor.js +1230 -778
  40. package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -1
  41. package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts.map +1 -1
  42. package/dist/components/InkEditor/components/AiPanel/AiPanel.js +58 -52
  43. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.cjs +1 -0
  44. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.d.ts +4 -0
  45. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.d.ts.map +1 -0
  46. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.js +209 -0
  47. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.types.d.ts +10 -0
  48. package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.types.d.ts.map +1 -0
  49. package/dist/components/InkEditor/components/ExcelSheetPanel/index.d.ts +3 -0
  50. package/dist/components/InkEditor/components/ExcelSheetPanel/index.d.ts.map +1 -0
  51. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.cjs +1 -0
  52. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.d.ts +4 -0
  53. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.d.ts.map +1 -0
  54. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.js +91 -0
  55. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.types.d.ts +11 -0
  56. package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.types.d.ts.map +1 -0
  57. package/dist/components/InkEditor/components/GraphEditModal/index.d.ts +3 -0
  58. package/dist/components/InkEditor/components/GraphEditModal/index.d.ts.map +1 -0
  59. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.cjs +1 -0
  60. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.d.ts +4 -0
  61. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.d.ts.map +1 -0
  62. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.js +98 -0
  63. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.types.d.ts +10 -0
  64. package/dist/components/InkEditor/components/GraphPicker/GraphPicker.types.d.ts.map +1 -0
  65. package/dist/components/InkEditor/components/GraphPicker/index.d.ts +3 -0
  66. package/dist/components/InkEditor/components/GraphPicker/index.d.ts.map +1 -0
  67. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.cjs +1 -0
  68. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.d.ts +4 -0
  69. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.d.ts.map +1 -0
  70. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.js +27 -0
  71. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.d.ts +7 -0
  72. package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.d.ts.map +1 -0
  73. package/dist/components/InkEditor/components/HtmlSourcePanel/index.d.ts +3 -0
  74. package/dist/components/InkEditor/components/HtmlSourcePanel/index.d.ts.map +1 -0
  75. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.cjs +1 -0
  76. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.d.ts +4 -0
  77. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.d.ts.map +1 -0
  78. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.js +36 -0
  79. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts +8 -0
  80. package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts.map +1 -0
  81. package/dist/components/InkEditor/components/OutlineRail/index.d.ts +3 -0
  82. package/dist/components/InkEditor/components/OutlineRail/index.d.ts.map +1 -0
  83. package/dist/components/InkEditor/components/SlashMenu/SlashMenu.cjs +1 -1
  84. package/dist/components/InkEditor/components/SlashMenu/SlashMenu.d.ts +1 -0
  85. package/dist/components/InkEditor/components/SlashMenu/SlashMenu.d.ts.map +1 -1
  86. package/dist/components/InkEditor/components/SlashMenu/SlashMenu.js +62 -17
  87. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.cjs +1 -0
  88. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.cjs +1 -0
  89. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.d.ts +10 -0
  90. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.d.ts.map +1 -0
  91. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.js +18 -0
  92. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.d.ts +4 -0
  93. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.d.ts.map +1 -0
  94. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.js +95 -0
  95. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.types.d.ts +11 -0
  96. package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.types.d.ts.map +1 -0
  97. package/dist/components/InkEditor/components/TableSizePicker/index.d.ts +3 -0
  98. package/dist/components/InkEditor/components/TableSizePicker/index.d.ts.map +1 -0
  99. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.cjs +1 -0
  100. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts +4 -0
  101. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts.map +1 -0
  102. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.js +81 -0
  103. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.types.d.ts +12 -0
  104. package/dist/components/InkEditor/components/ThemePicker/ThemePicker.types.d.ts.map +1 -0
  105. package/dist/components/InkEditor/components/ThemePicker/index.d.ts +3 -0
  106. package/dist/components/InkEditor/components/ThemePicker/index.d.ts.map +1 -0
  107. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.cjs +1 -0
  108. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.d.ts +4 -0
  109. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.d.ts.map +1 -0
  110. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.js +79 -0
  111. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.types.d.ts +10 -0
  112. package/dist/components/InkEditor/components/TitleGallery/TitleGallery.types.d.ts.map +1 -0
  113. package/dist/components/InkEditor/components/TitleGallery/index.d.ts +3 -0
  114. package/dist/components/InkEditor/components/TitleGallery/index.d.ts.map +1 -0
  115. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
  116. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.d.ts.map +1 -1
  117. package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +41 -17
  118. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
  119. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts.map +1 -1
  120. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.js +93 -18
  121. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.types.d.ts +6 -0
  122. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.types.d.ts.map +1 -0
  123. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.cjs +1 -0
  124. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts +3 -0
  125. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts.map +1 -0
  126. package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.js +15 -0
  127. package/dist/components/InkEditor/components/ToolbarDropdown/index.d.ts +2 -0
  128. package/dist/components/InkEditor/components/ToolbarDropdown/index.d.ts.map +1 -1
  129. package/dist/components/InkEditor/components/index.d.ts +16 -0
  130. package/dist/components/InkEditor/components/index.d.ts.map +1 -1
  131. package/dist/components/InkEditor/helpers/format.utils.cjs +2 -2
  132. package/dist/components/InkEditor/helpers/format.utils.d.ts +1 -1
  133. package/dist/components/InkEditor/helpers/format.utils.d.ts.map +1 -1
  134. package/dist/components/InkEditor/helpers/format.utils.js +72 -72
  135. package/dist/constants/colorMode.const.cjs +1 -1
  136. package/dist/constants/colorMode.const.d.ts +1 -1
  137. package/dist/constants/colorMode.const.d.ts.map +1 -1
  138. package/dist/constants/colorMode.const.js +4 -4
  139. package/dist/constants/contextMenu.const.cjs +1 -1
  140. package/dist/constants/contextMenu.const.d.ts +2 -0
  141. package/dist/constants/contextMenu.const.d.ts.map +1 -1
  142. package/dist/constants/contextMenu.const.js +17 -15
  143. package/dist/constants/defaultIcons.cjs +1 -1
  144. package/dist/constants/defaultIcons.d.ts.map +1 -1
  145. package/dist/constants/defaultIcons.js +35 -18
  146. package/dist/constants/defaults.const.cjs +1 -1
  147. package/dist/constants/defaults.const.d.ts +95 -1
  148. package/dist/constants/defaults.const.d.ts.map +1 -1
  149. package/dist/constants/defaults.const.js +323 -57
  150. package/dist/constants/generals.const.cjs +1 -1
  151. package/dist/constants/generals.const.d.ts +90 -0
  152. package/dist/constants/generals.const.d.ts.map +1 -1
  153. package/dist/constants/generals.const.js +75 -4
  154. package/dist/constants/index.d.ts +1 -0
  155. package/dist/constants/index.d.ts.map +1 -1
  156. package/dist/constants/keyboard.const.cjs +1 -1
  157. package/dist/constants/keyboard.const.d.ts +1 -0
  158. package/dist/constants/keyboard.const.d.ts.map +1 -1
  159. package/dist/constants/keyboard.const.js +2 -1
  160. package/dist/constants/lists.const.cjs +1 -1
  161. package/dist/constants/lists.const.d.ts +1 -0
  162. package/dist/constants/lists.const.d.ts.map +1 -1
  163. package/dist/constants/lists.const.js +10 -9
  164. package/dist/constants/numbers.cjs +1 -1
  165. package/dist/constants/numbers.d.ts +19 -1
  166. package/dist/constants/numbers.d.ts.map +1 -1
  167. package/dist/constants/numbers.js +46 -27
  168. package/dist/constants/plugins.const.cjs +1 -0
  169. package/dist/constants/plugins.const.d.ts +13 -0
  170. package/dist/constants/plugins.const.d.ts.map +1 -0
  171. package/dist/constants/plugins.const.js +45 -0
  172. package/dist/constants/premium.const.cjs +1 -1
  173. package/dist/constants/premium.const.d.ts.map +1 -1
  174. package/dist/constants/premium.const.js +10 -9
  175. package/dist/constants/table.const.cjs +1 -1
  176. package/dist/constants/table.const.d.ts +4 -0
  177. package/dist/constants/table.const.d.ts.map +1 -1
  178. package/dist/constants/table.const.js +10 -6
  179. package/dist/constants/toolbar.const.cjs +1 -1
  180. package/dist/constants/toolbar.const.d.ts +8 -0
  181. package/dist/constants/toolbar.const.d.ts.map +1 -1
  182. package/dist/constants/toolbar.const.js +16 -8
  183. package/dist/constants/toolbarMenu.const.cjs +1 -1
  184. package/dist/constants/toolbarMenu.const.d.ts +2 -0
  185. package/dist/constants/toolbarMenu.const.d.ts.map +1 -1
  186. package/dist/constants/toolbarMenu.const.js +80 -18
  187. package/dist/hooks/index.d.ts +2 -0
  188. package/dist/hooks/index.d.ts.map +1 -0
  189. package/dist/hooks/useToolbarOverflow.cjs +1 -0
  190. package/dist/hooks/useToolbarOverflow.d.ts +8 -0
  191. package/dist/hooks/useToolbarOverflow.d.ts.map +1 -0
  192. package/dist/hooks/useToolbarOverflow.js +29 -0
  193. package/dist/index.cjs +1 -1
  194. package/dist/index.d.ts +6 -3
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +126 -93
  197. package/dist/plugins/excel/excel.utils.cjs +1 -0
  198. package/dist/plugins/excel/excel.utils.d.ts +13 -0
  199. package/dist/plugins/excel/excel.utils.d.ts.map +1 -0
  200. package/dist/plugins/excel/excel.utils.js +40 -0
  201. package/dist/plugins/excel/index.d.ts +3 -0
  202. package/dist/plugins/excel/index.d.ts.map +1 -0
  203. package/dist/plugins/graph/graph.const.cjs +1 -0
  204. package/dist/plugins/graph/graph.const.d.ts +14 -0
  205. package/dist/plugins/graph/graph.const.d.ts.map +1 -0
  206. package/dist/plugins/graph/graph.const.js +24 -0
  207. package/dist/plugins/graph/graph.types.d.ts +7 -0
  208. package/dist/plugins/graph/graph.types.d.ts.map +1 -0
  209. package/dist/plugins/graph/graph.utils.cjs +1 -0
  210. package/dist/plugins/graph/graph.utils.d.ts +11 -0
  211. package/dist/plugins/graph/graph.utils.d.ts.map +1 -0
  212. package/dist/plugins/graph/graph.utils.js +76 -0
  213. package/dist/plugins/graph/index.d.ts +4 -0
  214. package/dist/plugins/graph/index.d.ts.map +1 -0
  215. package/dist/plugins/host/index.d.ts +2 -0
  216. package/dist/plugins/host/index.d.ts.map +1 -0
  217. package/dist/plugins/host/inkPlugins.cjs +1 -0
  218. package/dist/plugins/host/inkPlugins.d.ts +16 -0
  219. package/dist/plugins/host/inkPlugins.d.ts.map +1 -0
  220. package/dist/plugins/host/inkPlugins.js +20 -0
  221. package/dist/plugins/index.d.ts +5 -0
  222. package/dist/plugins/index.d.ts.map +1 -0
  223. package/dist/plugins/theme/index.d.ts +4 -0
  224. package/dist/plugins/theme/index.d.ts.map +1 -0
  225. package/dist/plugins/theme/inkTheme.cjs +1 -0
  226. package/dist/plugins/theme/inkTheme.d.ts +5 -0
  227. package/dist/plugins/theme/inkTheme.d.ts.map +1 -0
  228. package/dist/plugins/theme/inkTheme.js +30 -0
  229. package/dist/plugins/theme/theme.const.cjs +1 -0
  230. package/dist/plugins/theme/theme.const.d.ts +9 -0
  231. package/dist/plugins/theme/theme.const.d.ts.map +1 -0
  232. package/dist/plugins/theme/theme.const.js +15 -0
  233. package/dist/plugins/theme/theme.types.d.ts +12 -0
  234. package/dist/plugins/theme/theme.types.d.ts.map +1 -0
  235. package/dist/plugins/titles/index.d.ts +4 -0
  236. package/dist/plugins/titles/index.d.ts.map +1 -0
  237. package/dist/plugins/titles/titles.const.cjs +1 -0
  238. package/dist/plugins/titles/titles.const.d.ts +4 -0
  239. package/dist/plugins/titles/titles.const.d.ts.map +1 -0
  240. package/dist/plugins/titles/titles.const.js +15 -0
  241. package/dist/plugins/titles/titles.types.d.ts +2 -0
  242. package/dist/plugins/titles/titles.types.d.ts.map +1 -0
  243. package/dist/plugins/titles/titles.utils.cjs +1 -0
  244. package/dist/plugins/titles/titles.utils.d.ts +3 -0
  245. package/dist/plugins/titles/titles.utils.d.ts.map +1 -0
  246. package/dist/plugins/titles/titles.utils.js +14 -0
  247. package/dist/styles.css +1 -1
  248. package/dist/types/features.types.d.ts +1 -1
  249. package/dist/types/features.types.d.ts.map +1 -1
  250. package/dist/types/index.d.ts +3 -1
  251. package/dist/types/index.d.ts.map +1 -1
  252. package/dist/types/ink.types.d.ts +15 -2
  253. package/dist/types/ink.types.d.ts.map +1 -1
  254. package/dist/types/outline.types.d.ts +6 -0
  255. package/dist/types/outline.types.d.ts.map +1 -0
  256. package/dist/types/plugin.types.d.ts +8 -0
  257. package/dist/types/plugin.types.d.ts.map +1 -0
  258. package/dist/types/premium.types.d.ts +2 -2
  259. package/dist/types/premium.types.d.ts.map +1 -1
  260. package/dist/utils/index.d.ts +5 -2
  261. package/dist/utils/index.d.ts.map +1 -1
  262. package/dist/utils/outline.utils.cjs +1 -0
  263. package/dist/utils/outline.utils.d.ts +8 -0
  264. package/dist/utils/outline.utils.d.ts.map +1 -0
  265. package/dist/utils/outline.utils.js +49 -0
  266. package/dist/utils/slash.utils.cjs +1 -1
  267. package/dist/utils/slash.utils.d.ts +5 -0
  268. package/dist/utils/slash.utils.d.ts.map +1 -1
  269. package/dist/utils/slash.utils.js +24 -7
  270. package/dist/utils/table.utils.cjs +1 -1
  271. package/dist/utils/table.utils.d.ts +4 -0
  272. package/dist/utils/table.utils.d.ts.map +1 -1
  273. package/dist/utils/table.utils.js +84 -45
  274. package/dist/utils/words.utils.cjs +1 -0
  275. package/dist/utils/words.utils.d.ts +2 -0
  276. package/dist/utils/words.utils.d.ts.map +1 -0
  277. package/dist/utils/words.utils.js +14 -0
  278. package/package.json +7 -1
@@ -0,0 +1,11 @@
1
+ import { GraphColors, GraphPoint } from '../../../../plugins/graph';
2
+ export type GraphEditMode = 'values' | 'colors';
3
+ export type GraphEditModalProps = {
4
+ open: boolean;
5
+ mode: GraphEditMode;
6
+ points: GraphPoint[];
7
+ colors: GraphColors;
8
+ onClose: () => void;
9
+ onApply: (points: GraphPoint[], colors: GraphColors) => void;
10
+ };
11
+ //# sourceMappingURL=GraphEditModal.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphEditModal.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/GraphEditModal/GraphEditModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { GraphEditModal } from './GraphEditModal';
2
+ export type { GraphEditModalProps, GraphEditMode } from './GraphEditModal.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/GraphEditModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),K=require("react-dom"),A=require("../../../../constants/numbers.cjs"),a=require("../../../../constants/generals.const.cjs"),D=require("../../../../constants/colorMode.const.cjs"),M=require("../../../../constants/keyboard.const.cjs"),o=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const s=require("../../../../plugins/graph/graph.const.cjs"),p=require("../../../../plugins/graph/graph.utils.cjs"),h=require("../ToolbarDropdown/ToolbarDropdown.utils.cjs"),q=require("../ToolbarButton/ToolbarButton.cjs"),g=N=>{const{icon:v,disabled:d=!1,hint:I,onHint:T,pluginColor:b,onInsert:w}=N,[c,i]=n.useState(!1),[l,G]=n.useState(s.GRAPH_KIND_DEFAULT),[_,H]=n.useState({top:A.NUMBER_ZERO,left:A.NUMBER_ZERO}),E=n.useRef(null),L=n.useRef(null),S=n.useRef(null);return n.useEffect(()=>{if(!c)return;const e=()=>{const r=h.getToolbarDropdownMenuPosition(L.current);H({top:r.top,left:r.left})};e();const u=r=>{var m,P;const R=r.target;(m=E.current)!=null&&m.contains(R)||(P=S.current)!=null&&P.contains(R)||i(!1)},f=r=>{r.key===M.KEY_ESCAPE&&i(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",f),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",f),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[c]),t.jsxs("div",{className:o.INK_CLASS_STYLE_DD,ref:E,children:[t.jsx("div",{ref:L,children:t.jsx(q.ToolbarButton,{icon:v,title:a.INK_GRAPH_TITLE,hint:I,onHint:T,pluginColor:b,disabled:d,onClick:()=>{d||i(e=>!e)}})}),c?K.createPortal(t.jsxs("div",{ref:S,className:`${o.INK_CLASS_STYLE_MENU} ${o.INK_CLASS_STYLE_MENU_PORTAL} ${o.INK_CLASS_STYLE_MENU_FORCED} ${o.INK_CLASS_GRAPH_PANEL}`,"data-color-mode":D.COLOR_MODE_LIGHT,role:"dialog","aria-label":a.INK_GRAPH_TITLE,style:{top:_.top,left:_.left},children:[t.jsx("div",{className:o.INK_CLASS_GRAPH_TYPES,children:s.GRAPH_KINDS.map(e=>t.jsx("button",{type:"button","aria-pressed":e===l,onMouseDown:u=>{u.preventDefault(),G(e)},children:s.GRAPH_KIND_LABELS[e]},e))}),t.jsx("div",{className:o.INK_CLASS_GRAPH_PREVIEW,dangerouslySetInnerHTML:{__html:p.buildGraphHtml(l,s.GRAPH_SAMPLE)}}),t.jsx("button",{type:"button",onMouseDown:e=>{e.preventDefault(),w(p.buildGraphHtml(l,s.GRAPH_SAMPLE)),i(!1)},children:a.INK_GRAPH_INSERT})]}),document.body):null]})};exports.GraphPicker=g;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { GraphPickerProps } from './GraphPicker.types';
3
+ export declare const GraphPicker: FC<GraphPickerProps>;
4
+ //# sourceMappingURL=GraphPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/GraphPicker/GraphPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA0B7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAiG5C,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { jsxs as S, jsx as o } from "react/jsx-runtime";
2
+ import { useState as l, useRef as m, useEffect as G } from "react";
3
+ import { createPortal as M } from "react-dom";
4
+ import { NUMBER_ZERO as A } from "../../../../constants/numbers.js";
5
+ import { INK_GRAPH_TITLE as N, INK_GRAPH_INSERT as b } from "../../../../constants/generals.const.js";
6
+ import { COLOR_MODE_LIGHT as h } from "../../../../constants/colorMode.const.js";
7
+ import { KEY_ESCAPE as y } from "../../../../constants/keyboard.const.js";
8
+ import { INK_CLASS_STYLE_DD as g, INK_CLASS_STYLE_MENU as O, INK_CLASS_STYLE_MENU_PORTAL as k, INK_CLASS_STYLE_MENU_FORCED as Y, INK_CLASS_GRAPH_PANEL as U, INK_CLASS_GRAPH_TYPES as $, INK_CLASS_GRAPH_PREVIEW as B } from "../../../../constants/defaults.const.js";
9
+ import "../../../../constants/openai.const.js";
10
+ import "../../../../utils/paste.utils.js";
11
+ import { GRAPH_KIND_DEFAULT as j, GRAPH_KINDS as z, GRAPH_KIND_LABELS as F, GRAPH_SAMPLE as P } from "../../../../plugins/graph/graph.const.js";
12
+ import { buildGraphHtml as v } from "../../../../plugins/graph/graph.utils.js";
13
+ import { getToolbarDropdownMenuPosition as x } from "../ToolbarDropdown/ToolbarDropdown.utils.js";
14
+ import { ToolbarButton as V } from "../ToolbarButton/ToolbarButton.js";
15
+ const me = (R) => {
16
+ const { icon: I, disabled: d = !1, hint: w, onHint: K, pluginColor: T, onInsert: D } = R, [i, n] = l(!1), [s, H] = l(j), [a, C] = l({ top: A, left: A }), c = m(null), u = m(null), _ = m(null);
17
+ return G(() => {
18
+ if (!i) return;
19
+ const e = () => {
20
+ const t = x(u.current);
21
+ C({ top: t.top, left: t.left });
22
+ };
23
+ e();
24
+ const r = (t) => {
25
+ var E, L;
26
+ const p = t.target;
27
+ (E = c.current) != null && E.contains(p) || (L = _.current) != null && L.contains(p) || n(!1);
28
+ }, f = (t) => {
29
+ t.key === y && n(!1);
30
+ };
31
+ return document.addEventListener("mousedown", r), document.addEventListener("keydown", f), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
32
+ document.removeEventListener("mousedown", r), document.removeEventListener("keydown", f), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
33
+ };
34
+ }, [i]), /* @__PURE__ */ S("div", { className: g, ref: c, children: [
35
+ /* @__PURE__ */ o("div", { ref: u, children: /* @__PURE__ */ o(
36
+ V,
37
+ {
38
+ icon: I,
39
+ title: N,
40
+ hint: w,
41
+ onHint: K,
42
+ pluginColor: T,
43
+ disabled: d,
44
+ onClick: () => {
45
+ d || n((e) => !e);
46
+ }
47
+ }
48
+ ) }),
49
+ i ? M(
50
+ /* @__PURE__ */ S(
51
+ "div",
52
+ {
53
+ ref: _,
54
+ className: `${O} ${k} ${Y} ${U}`,
55
+ "data-color-mode": h,
56
+ role: "dialog",
57
+ "aria-label": N,
58
+ style: { top: a.top, left: a.left },
59
+ children: [
60
+ /* @__PURE__ */ o("div", { className: $, children: z.map((e) => /* @__PURE__ */ o(
61
+ "button",
62
+ {
63
+ type: "button",
64
+ "aria-pressed": e === s,
65
+ onMouseDown: (r) => {
66
+ r.preventDefault(), H(e);
67
+ },
68
+ children: F[e]
69
+ },
70
+ e
71
+ )) }),
72
+ /* @__PURE__ */ o(
73
+ "div",
74
+ {
75
+ className: B,
76
+ dangerouslySetInnerHTML: { __html: v(s, P) }
77
+ }
78
+ ),
79
+ /* @__PURE__ */ o(
80
+ "button",
81
+ {
82
+ type: "button",
83
+ onMouseDown: (e) => {
84
+ e.preventDefault(), D(v(s, P)), n(!1);
85
+ },
86
+ children: b
87
+ }
88
+ )
89
+ ]
90
+ }
91
+ ),
92
+ document.body
93
+ ) : null
94
+ ] });
95
+ };
96
+ export {
97
+ me as GraphPicker
98
+ };
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export type GraphPickerProps = {
3
+ icon: ReactNode;
4
+ disabled?: boolean;
5
+ hint?: string;
6
+ onHint?: (hint: string) => void;
7
+ pluginColor?: string;
8
+ onInsert: (html: string) => void;
9
+ };
10
+ //# sourceMappingURL=GraphPicker.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphPicker.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/GraphPicker/GraphPicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,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,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { GraphPicker } from './GraphPicker';
2
+ export type { GraphPickerProps } from './GraphPicker.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/GraphPicker/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 u=require("react/jsx-runtime"),o=require("../../../../constants/generals.const.cjs"),i=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const c=e=>{const{value:r,onChange:t,disabled:a=!1,minHeight:n}=e,l=s=>{t(s.target.value)};return u.jsx("textarea",{className:i.INK_CLASS_SOURCE,"aria-label":o.INK_HTML_SOURCE_TITLE,value:r,disabled:a,spellCheck:!1,style:{minHeight:n},onChange:l})};exports.HtmlSourcePanel=c;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { HtmlSourcePanelProps } from './HtmlSourcePanel.types';
3
+ export declare const HtmlSourcePanel: FC<HtmlSourcePanelProps>;
4
+ //# sourceMappingURL=HtmlSourcePanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlSourcePanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,EAAE,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAkBpD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { INK_HTML_SOURCE_TITLE as m } from "../../../../constants/generals.const.js";
3
+ import { INK_CLASS_SOURCE as i } from "../../../../constants/defaults.const.js";
4
+ import "../../../../constants/openai.const.js";
5
+ import "../../../../utils/paste.utils.js";
6
+ import "react";
7
+ import "react-dom";
8
+ const _ = (e) => {
9
+ const { value: a, onChange: t, disabled: o = !1, minHeight: r } = e;
10
+ return /* @__PURE__ */ n(
11
+ "textarea",
12
+ {
13
+ className: i,
14
+ "aria-label": m,
15
+ value: a,
16
+ disabled: o,
17
+ spellCheck: !1,
18
+ style: { minHeight: r },
19
+ onChange: (l) => {
20
+ t(l.target.value);
21
+ }
22
+ }
23
+ );
24
+ };
25
+ export {
26
+ _ as HtmlSourcePanel
27
+ };
@@ -0,0 +1,7 @@
1
+ export type HtmlSourcePanelProps = {
2
+ value: string;
3
+ onChange: (next: string) => void;
4
+ disabled?: boolean;
5
+ minHeight?: string;
6
+ };
7
+ //# sourceMappingURL=HtmlSourcePanel.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlSourcePanel.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { HtmlSourcePanel } from './HtmlSourcePanel';
2
+ export type { HtmlSourcePanelProps } from './HtmlSourcePanel.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/HtmlSourcePanel/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 s=require("react/jsx-runtime"),i=require("../../../../constants/numbers.cjs"),e=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const L=t=>{const{items:_,activeIndex:I,onSelect:r,onHide:l}=t;return s.jsxs("aside",{className:e.INK_CLASS_OUTLINE,"aria-label":e.INK_OUTLINE_LABEL,children:[s.jsxs("div",{className:e.INK_CLASS_OUTLINE_LABEL,children:[e.INK_OUTLINE_LABEL,l?s.jsx("button",{type:"button",className:e.INK_CLASS_OUTLINE_TOGGLE,onClick:l,children:e.INK_OUTLINE_HIDE}):null]}),_.length===i.NUMBER_ZERO?s.jsx("p",{className:e.INK_CLASS_OUTLINE_ITEM,children:e.INK_OUTLINE_EMPTY}):null,_.map(n=>{const N=n.index===I;return s.jsxs("button",{type:"button",className:`${e.INK_CLASS_OUTLINE_ITEM} ${e.INK_CLASS_OUTLINE_ITEM}--h${n.level}${N?` ${e.INK_CLASS_OUTLINE_ITEM_ACTIVE}`:""}`,onClick:()=>r(n.index),children:[s.jsx("span",{className:`${e.INK_CLASS_OUTLINE_ITEM}-dot`,"aria-hidden":"true"}),n.text]},`${n.level}-${n.index}`)})]})};exports.OutlineRail=L;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { OutlineRailProps } from './OutlineRail.types';
3
+ export declare const OutlineRail: FC<OutlineRailProps>;
4
+ //# sourceMappingURL=OutlineRail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OutlineRail.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/OutlineRail/OutlineRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAYhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAiC5C,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { jsxs as t, jsx as l } from "react/jsx-runtime";
2
+ import { NUMBER_ZERO as I } from "../../../../constants/numbers.js";
3
+ import { INK_OUTLINE_LABEL as r, INK_CLASS_OUTLINE as c, INK_CLASS_OUTLINE_LABEL as E, INK_OUTLINE_HIDE as L, INK_CLASS_OUTLINE_TOGGLE as d, INK_OUTLINE_EMPTY as m, INK_CLASS_OUTLINE_ITEM as n, INK_CLASS_OUTLINE_ITEM_ACTIVE as p } from "../../../../constants/defaults.const.js";
4
+ import "../../../../constants/openai.const.js";
5
+ import "../../../../utils/paste.utils.js";
6
+ import "react";
7
+ import "react-dom";
8
+ const x = (N) => {
9
+ const { items: i, activeIndex: a, onSelect: s, onHide: o } = N;
10
+ return /* @__PURE__ */ t("aside", { className: c, "aria-label": r, children: [
11
+ /* @__PURE__ */ t("div", { className: E, children: [
12
+ r,
13
+ o ? /* @__PURE__ */ l("button", { type: "button", className: d, onClick: o, children: L }) : null
14
+ ] }),
15
+ i.length === I ? /* @__PURE__ */ l("p", { className: n, children: m }) : null,
16
+ i.map((e) => {
17
+ const _ = e.index === a;
18
+ return /* @__PURE__ */ t(
19
+ "button",
20
+ {
21
+ type: "button",
22
+ className: `${n} ${n}--h${e.level}${_ ? ` ${p}` : ""}`,
23
+ onClick: () => s(e.index),
24
+ children: [
25
+ /* @__PURE__ */ l("span", { className: `${n}-dot`, "aria-hidden": "true" }),
26
+ e.text
27
+ ]
28
+ },
29
+ `${e.level}-${e.index}`
30
+ );
31
+ })
32
+ ] });
33
+ };
34
+ export {
35
+ x as OutlineRail
36
+ };
@@ -0,0 +1,8 @@
1
+ import { OutlineItem } from '../../../../types';
2
+ export type OutlineRailProps = {
3
+ items: OutlineItem[];
4
+ activeIndex: number;
5
+ onSelect: (index: number) => void;
6
+ onHide?: () => void;
7
+ };
8
+ //# sourceMappingURL=OutlineRail.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OutlineRail.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/OutlineRail/OutlineRail.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { OutlineRail } from './OutlineRail';
2
+ export type { OutlineRailProps } from './OutlineRail.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/OutlineRail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=n=>{const{items:l,top:s,left:o,onSelect:a}=n;return l.length===0?null:t.jsx("div",{className:"Ink-Slash",style:{top:s,left:o},role:"listbox","aria-label":"Slash commands",children:l.map(e=>t.jsx("button",{type:"button",role:"option",className:"Ink-Slash__item",onMouseDown:r=>{r.preventDefault(),a(e)},children:e.label},e.id))})};exports.SlashMenu=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),S=require("../../../../constants/numbers.cjs"),a=require("../../../../constants/generals.const.cjs"),n=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");const N=require("../../../../utils/slash.utils.cjs");require("../../../../utils/paste.utils.cjs");require("react");require("react-dom");const m=i=>{var t;const{items:l,top:h,left:d,query:c,onSelect:o}=i;if(l.length===S.NUMBER_ZERO)return null;const u=N.groupSlashCommands(l),I=(t=l[S.NUMBER_ZERO])==null?void 0:t.id;return s.jsxs("div",{className:"Ink-Slash",style:{top:h,left:d},role:"listbox","aria-label":n.SLASH_ARIA_LABEL,children:[s.jsxs("div",{className:"Ink-Slash__search","aria-hidden":"true",children:[n.SLASH_SEARCH_LABEL,a.SLASH_PREFIX,c?` ${c}`:""]}),u.map(r=>s.jsxs("div",{className:"Ink-Slash__group",children:[s.jsx("div",{className:"Ink-Slash__cat",children:r.category}),r.items.map(e=>{const _=e.id===I;return s.jsxs("button",{type:"button",role:"option","aria-selected":_,className:`Ink-Slash__item${_?" Ink-Slash__item--sel":""}`,onMouseDown:A=>{A.preventDefault(),o(e)},children:[s.jsx("span",{className:`Ink-Slash__mark${e.category===n.SLASH_CATEGORY_AI?`${a.SPACE_STRING}${n.INK_CLASS_SLASH_MARK_AI}`:""}`,children:e.mark}),s.jsxs("span",{className:"Ink-Slash__txt",children:[s.jsx("span",{className:"Ink-Slash__name",children:e.label}),s.jsx("span",{className:"Ink-Slash__desc",children:e.description})]}),s.jsx("span",{className:"Ink-Slash__key",children:_?a.SLASH_ENTER_SHORTCUT:e.shortcut})]},e.id)})]},r.category)),s.jsxs("div",{className:"Ink-Slash__hint",children:[a.SLASH_HINT_BEFORE,s.jsx("span",{className:"Ink-Slash__caret","aria-hidden":"true"}),a.SLASH_HINT_AFTER,s.jsx("kbd",{className:"Ink-Slash__key",children:a.SLASH_MOD_SHORTCUT}),a.SLASH_HINT_AI]})]})};exports.SlashMenu=m;
@@ -4,6 +4,7 @@ export interface SlashMenuProps {
4
4
  items: SlashCommandItem[];
5
5
  top: number;
6
6
  left: number;
7
+ query: string;
7
8
  onSelect: (item: SlashCommandItem) => void;
8
9
  }
9
10
  export declare const SlashMenu: FC<SlashMenuProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"SlashMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SlashMenu/SlashMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqBxC,CAAC"}
1
+ {"version":3,"file":"SlashMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SlashMenu/SlashMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqDxC,CAAC"}
@@ -1,20 +1,65 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- const c = (n) => {
3
- const { items: l, top: o, left: s, onSelect: a } = n;
4
- return l.length === 0 ? null : /* @__PURE__ */ t("div", { className: "Ink-Slash", style: { top: o, left: s }, role: "listbox", "aria-label": "Slash commands", children: l.map((e) => /* @__PURE__ */ t(
5
- "button",
6
- {
7
- type: "button",
8
- role: "option",
9
- className: "Ink-Slash__item",
10
- onMouseDown: (r) => {
11
- r.preventDefault(), a(e);
12
- },
13
- children: e.label
14
- },
15
- e.id
16
- )) });
1
+ import { jsxs as e, jsx as s } from "react/jsx-runtime";
2
+ import { NUMBER_ZERO as S } from "../../../../constants/numbers.js";
3
+ import { SLASH_PREFIX as p, SPACE_STRING as A, SLASH_ENTER_SHORTCUT as N, SLASH_HINT_BEFORE as k, SLASH_HINT_AFTER as H, SLASH_HINT_AI as L, SLASH_MOD_SHORTCUT as u } from "../../../../constants/generals.const.js";
4
+ import { SLASH_ARIA_LABEL as E, SLASH_SEARCH_LABEL as R, INK_CLASS_SLASH_MARK_AI as T, SLASH_CATEGORY_AI as f } from "../../../../constants/defaults.const.js";
5
+ import "../../../../constants/openai.const.js";
6
+ import { groupSlashCommands as y } from "../../../../utils/slash.utils.js";
7
+ import "../../../../utils/paste.utils.js";
8
+ import "react";
9
+ import "react-dom";
10
+ const D = (c) => {
11
+ var t;
12
+ const { items: l, top: o, left: i, query: _, onSelect: h } = c;
13
+ if (l.length === S) return null;
14
+ const d = y(l), m = (t = l[S]) == null ? void 0 : t.id;
15
+ return /* @__PURE__ */ e("div", { className: "Ink-Slash", style: { top: o, left: i }, role: "listbox", "aria-label": E, children: [
16
+ /* @__PURE__ */ e("div", { className: "Ink-Slash__search", "aria-hidden": "true", children: [
17
+ R,
18
+ p,
19
+ _ ? ` ${_}` : ""
20
+ ] }),
21
+ d.map((n) => /* @__PURE__ */ e("div", { className: "Ink-Slash__group", children: [
22
+ /* @__PURE__ */ s("div", { className: "Ink-Slash__cat", children: n.category }),
23
+ n.items.map((a) => {
24
+ const r = a.id === m;
25
+ return /* @__PURE__ */ e(
26
+ "button",
27
+ {
28
+ type: "button",
29
+ role: "option",
30
+ "aria-selected": r,
31
+ className: `Ink-Slash__item${r ? " Ink-Slash__item--sel" : ""}`,
32
+ onMouseDown: (I) => {
33
+ I.preventDefault(), h(a);
34
+ },
35
+ children: [
36
+ /* @__PURE__ */ s(
37
+ "span",
38
+ {
39
+ className: `Ink-Slash__mark${a.category === f ? `${A}${T}` : ""}`,
40
+ children: a.mark
41
+ }
42
+ ),
43
+ /* @__PURE__ */ e("span", { className: "Ink-Slash__txt", children: [
44
+ /* @__PURE__ */ s("span", { className: "Ink-Slash__name", children: a.label }),
45
+ /* @__PURE__ */ s("span", { className: "Ink-Slash__desc", children: a.description })
46
+ ] }),
47
+ /* @__PURE__ */ s("span", { className: "Ink-Slash__key", children: r ? N : a.shortcut })
48
+ ]
49
+ },
50
+ a.id
51
+ );
52
+ })
53
+ ] }, n.category)),
54
+ /* @__PURE__ */ e("div", { className: "Ink-Slash__hint", children: [
55
+ k,
56
+ /* @__PURE__ */ s("span", { className: "Ink-Slash__caret", "aria-hidden": "true" }),
57
+ H,
58
+ /* @__PURE__ */ s("kbd", { className: "Ink-Slash__key", children: u }),
59
+ L
60
+ ] })
61
+ ] });
17
62
  };
18
63
  export {
19
- c as SlashMenu
64
+ D as SlashMenu
20
65
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("react"),v=require("react-dom"),_=require("../../../../constants/numbers.cjs"),L=require("../../../../constants/generals.const.cjs"),w=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:I=!1,onSelect:P}=C,[a,E]=s.useState(!1),[u,d]=s.useState(c.TABLE_PICKER_INITIAL_HOVER),[T,m]=s.useState(c.TABLE_PICKER_EMPTY_POSITION),A=s.useRef(null),S=s.useRef(null),R=s.useRef(null);s.useEffect(()=>{if(!a)return;const e=()=>{const o=b.getToolbarDropdownMenuPosition(S.current);m({top:o.top,left:o.left})};e();const r=o=>{var K,N;const l=o.target;(K=A.current)!=null&&K.contains(l)||(N=R.current)!=null&&N.contains(l)||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)}},[a]);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,l=i<=u.rows&&o<=u.cols;return{rows:i,cols:o,isOn:l,key:`${i}-${o}`}});return n.jsxs("div",{className:t.INK_CLASS_TABLE_PICKER,ref:A,children:[n.jsx("div",{ref:S,children:n.jsx(O.ToolbarButton,{icon:f,title:L.INK_TABLE_INSERT_TITLE,disabled:I,onClick:()=>{I||(d(c.TABLE_PICKER_INITIAL_HOVER),E(e=>!e))}})}),a?v.createPortal(n.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":w.COLOR_MODE_LIGHT,role:"grid","aria-label":L.INK_TABLE_INSERT_TITLE,style:{top:T.top,left:T.left},children:[n.jsx("div",{className:t.INK_CLASS_TABLE_PICKER_GRID,style:{gridTemplateColumns:`repeat(${_.INK_TABLE_PICKER_MAX}, 1fr)`},children:M.map(e=>n.jsx("button",{type:"button",className:`${t.INK_CLASS_TABLE_PICKER_CELL}${e.isOn?`${L.SPACE_STRING}${t.INK_CLASS_TABLE_PICKER_CELL_ON}`:""}`,"aria-label":`${e.rows}${c.TABLE_PICKER_TIMES_MARK}${e.cols}`,onMouseEnter:()=>d({rows:e.rows,cols:e.cols}),onMouseDown:r=>{r.preventDefault(),P(e.rows,e.cols),E(!1)}},e.key))}),n.jsxs("div",{className:t.INK_CLASS_TABLE_PICKER_LABEL,children:[u.rows,c.TABLE_PICKER_TIMES_MARK,u.cols]})]}),document.body):null]})};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,95 @@
1
+ import { jsxs as l, jsx as E } from "react/jsx-runtime";
2
+ import { useState as m, useRef as a, 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 K } from "./TableSizePicker.const.js";
14
+ const se = (R) => {
15
+ const { icon: v, disabled: L = !1, onSelect: w } = R, [c, s] = m(!1), [i, d] = m(N), [f, P] = m(j), u = a(null), I = a(null), S = a(null);
16
+ B(() => {
17
+ if (!c) return;
18
+ const e = () => {
19
+ const o = G(I.current);
20
+ P({ top: o.top, left: o.left });
21
+ };
22
+ e();
23
+ const t = (o) => {
24
+ var p, T;
25
+ const _ = o.target;
26
+ (p = u.current) != null && p.contains(_) || (T = S.current) != null && T.contains(_) || s(!1);
27
+ }, r = (o) => {
28
+ o.key === b && s(!1);
29
+ };
30
+ return document.addEventListener("mousedown", t), document.addEventListener("keydown", r), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
31
+ document.removeEventListener("mousedown", t), document.removeEventListener("keydown", r), window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
32
+ };
33
+ }, [c]);
34
+ const M = Array.from({ length: n * n }, (e, t) => {
35
+ const r = Math.floor(t / n) + A, o = t % n + A, _ = r <= i.rows && o <= i.cols;
36
+ return { rows: r, cols: o, isOn: _, key: `${r}-${o}` };
37
+ });
38
+ return /* @__PURE__ */ l("div", { className: g, ref: u, children: [
39
+ /* @__PURE__ */ E("div", { ref: I, children: /* @__PURE__ */ E(
40
+ H,
41
+ {
42
+ icon: v,
43
+ title: C,
44
+ disabled: L,
45
+ onClick: () => {
46
+ L || (d(N), s((e) => !e));
47
+ }
48
+ }
49
+ ) }),
50
+ c ? O(
51
+ /* @__PURE__ */ l(
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((e) => /* @__PURE__ */ E(
67
+ "button",
68
+ {
69
+ type: "button",
70
+ className: `${U}${e.isOn ? `${$}${x}` : ""}`,
71
+ "aria-label": `${e.rows}${K}${e.cols}`,
72
+ onMouseEnter: () => d({ rows: e.rows, cols: e.cols }),
73
+ onMouseDown: (t) => {
74
+ t.preventDefault(), w(e.rows, e.cols), s(!1);
75
+ }
76
+ },
77
+ e.key
78
+ ))
79
+ }
80
+ ),
81
+ /* @__PURE__ */ l("div", { className: z, children: [
82
+ i.rows,
83
+ K,
84
+ i.cols
85
+ ] })
86
+ ]
87
+ }
88
+ ),
89
+ document.body
90
+ ) : null
91
+ ] });
92
+ };
93
+ export {
94
+ se as TableSizePicker
95
+ };
@@ -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 n=require("react/jsx-runtime"),o=require("react"),y=require("react-dom"),L=require("../../../../constants/numbers.cjs"),T=require("../../../../constants/generals.const.cjs"),g=require("../../../../constants/colorMode.const.cjs"),I=require("../../../../constants/keyboard.const.cjs"),c=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const P=require("../../../../plugins/theme/theme.const.cjs");require("../../../../plugins/host/inkPlugins.cjs");const C=require("../ToolbarDropdown/ToolbarDropdown.utils.cjs"),O=require("../ToolbarButton/ToolbarButton.cjs"),k=p=>{const{icon:b,disabled:u=!1,hint:w,onHint:S,pluginColor:q,value:M,onChange:R}=p,[i,r]=o.useState(!1),[l,N]=o.useState({top:L.NUMBER_ZERO,left:L.NUMBER_ZERO}),a=o.useRef(null),d=o.useRef(null),E=o.useRef(null);return o.useEffect(()=>{if(!i)return;const e=()=>{const t=C.getToolbarDropdownMenuPosition(d.current);N({top:t.top,left:t.left})};e();const s=t=>{var m,v;const f=t.target;(m=a.current)!=null&&m.contains(f)||(v=E.current)!=null&&v.contains(f)||r(!1)},_=t=>{t.key===I.KEY_ESCAPE&&r(!1)};return document.addEventListener("mousedown",s),document.addEventListener("keydown",_),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("keydown",_),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[i]),n.jsxs("div",{ref:a,children:[n.jsx("div",{ref:d,children:n.jsx(O.ToolbarButton,{icon:b,title:T.INK_THEME_TITLE,hint:w,onHint:S,pluginColor:q,disabled:u,onClick:()=>{u||r(e=>!e)}})}),i?y.createPortal(n.jsx("div",{ref:E,className:`${c.INK_CLASS_STYLE_MENU} ${c.INK_CLASS_STYLE_MENU_PORTAL} ${c.INK_CLASS_STYLE_MENU_FORCED}`,"data-color-mode":g.COLOR_MODE_LIGHT,role:"listbox","aria-label":T.INK_THEME_TITLE,style:{top:l.top,left:l.left},children:P.INK_THEMES.map(e=>n.jsx("button",{type:"button",role:"option","aria-selected":e.id===M,className:"Ink-Editor__style-option",onMouseDown:s=>{s.preventDefault(),R(e.id),r(!1)},children:e.label},e.id))}),document.body):null]})};exports.ThemePicker=k;
@@ -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