@machinerd/js-module 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/README.md +132 -63
  2. package/dist/align-CdK8Ar2w.mjs +1 -0
  3. package/dist/align-Dp4avXIm.cjs +1 -0
  4. package/dist/{api-client-C3o2pO0q.cjs → api-client-BXH8Rm-J.cjs} +1 -1
  5. package/dist/{api-client-C0sbSOQf.mjs → api-client-xK3Ua3Gr.mjs} +1 -1
  6. package/dist/basic-image-D26zahpC.mjs +1 -0
  7. package/dist/basic-image-Wl0IBgOX.cjs +1 -0
  8. package/dist/country-flag-8HG6HZPi.cjs +1 -0
  9. package/dist/country-flag-Bypgu_rR.mjs +1 -0
  10. package/dist/custom-heading-By14y5ug.cjs +1 -0
  11. package/dist/custom-heading-eGRLcDQZ.mjs +1 -0
  12. package/dist/dnd-CeWNVM-V.mjs +1 -0
  13. package/dist/dnd-DHNRwFj8.cjs +1 -0
  14. package/dist/editor/extensions/align/index.cjs +1 -0
  15. package/dist/editor/extensions/align/index.d.cts +2 -0
  16. package/dist/editor/extensions/align/index.d.mts +2 -0
  17. package/dist/editor/extensions/align/index.mjs +1 -0
  18. package/dist/editor/extensions/table-controls/index.cjs +1 -0
  19. package/dist/editor/extensions/table-controls/index.d.cts +2 -0
  20. package/dist/editor/extensions/table-controls/index.d.mts +2 -0
  21. package/dist/editor/extensions/table-controls/index.mjs +1 -0
  22. package/dist/editor/extensions/table-resize/index.cjs +1 -0
  23. package/dist/editor/extensions/table-resize/index.d.cts +2 -0
  24. package/dist/editor/extensions/table-resize/index.d.mts +2 -0
  25. package/dist/editor/extensions/table-resize/index.mjs +1 -0
  26. package/dist/editor/index.cjs +1 -1
  27. package/dist/editor/index.d.cts +51 -73
  28. package/dist/editor/index.d.mts +51 -73
  29. package/dist/editor/index.mjs +1 -1
  30. package/dist/editor/nodes/basic-image/index.cjs +1 -0
  31. package/dist/editor/nodes/basic-image/index.d.cts +4 -0
  32. package/dist/editor/nodes/basic-image/index.d.mts +4 -0
  33. package/dist/editor/nodes/basic-image/index.mjs +1 -0
  34. package/dist/editor/nodes/custom-heading/index.cjs +1 -0
  35. package/dist/editor/nodes/custom-heading/index.d.cts +2 -0
  36. package/dist/editor/nodes/custom-heading/index.d.mts +2 -0
  37. package/dist/editor/nodes/custom-heading/index.mjs +1 -0
  38. package/dist/editor/nodes/menu-wrapper/index.cjs +1 -0
  39. package/dist/editor/nodes/menu-wrapper/index.d.cts +54 -0
  40. package/dist/editor/nodes/menu-wrapper/index.d.mts +54 -0
  41. package/dist/editor/nodes/menu-wrapper/index.mjs +1 -0
  42. package/dist/editor/nodes/node-resize/index.cjs +1 -0
  43. package/dist/editor/nodes/node-resize/index.d.cts +27 -0
  44. package/dist/editor/nodes/node-resize/index.d.mts +27 -0
  45. package/dist/editor/nodes/node-resize/index.mjs +1 -0
  46. package/dist/editor/nodes/node-size/index.cjs +1 -0
  47. package/dist/editor/nodes/node-size/index.d.cts +3 -0
  48. package/dist/editor/nodes/node-size/index.d.mts +3 -0
  49. package/dist/editor/nodes/node-size/index.mjs +1 -0
  50. package/dist/editor/nodes/node-view-context/index.cjs +1 -0
  51. package/dist/editor/nodes/node-view-context/index.d.cts +2 -0
  52. package/dist/editor/nodes/node-view-context/index.d.mts +2 -0
  53. package/dist/editor/nodes/node-view-context/index.mjs +1 -0
  54. package/dist/editor/nodes/subset-image/index.cjs +1 -0
  55. package/dist/editor/nodes/subset-image/index.d.cts +5 -0
  56. package/dist/editor/nodes/subset-image/index.d.mts +5 -0
  57. package/dist/editor/nodes/subset-image/index.mjs +1 -0
  58. package/dist/editor/nodes/table/index.cjs +1 -0
  59. package/dist/editor/nodes/table/index.d.cts +2 -0
  60. package/dist/editor/nodes/table/index.d.mts +2 -0
  61. package/dist/editor/nodes/table/index.mjs +1 -0
  62. package/dist/editor/nodes/tabs/index.cjs +1 -0
  63. package/dist/editor/nodes/tabs/index.d.cts +2 -0
  64. package/dist/editor/nodes/tabs/index.d.mts +2 -0
  65. package/dist/editor/nodes/tabs/index.mjs +1 -0
  66. package/dist/editor-CHuJTM4H.mjs +1 -0
  67. package/dist/editor-DvLUotoh.cjs +1 -0
  68. package/dist/{file-B-UJkabO.mjs → file-CapBKYce.mjs} +1 -1
  69. package/dist/file-DeZ1OKdy.cjs +1 -0
  70. package/dist/hooks/use-delay-unmount/index.cjs +1 -0
  71. package/dist/hooks/use-delay-unmount/index.d.cts +4 -0
  72. package/dist/hooks/use-delay-unmount/index.d.mts +4 -0
  73. package/dist/hooks/use-delay-unmount/index.mjs +1 -0
  74. package/dist/hooks/use-dialog-stack/index.cjs +1 -0
  75. package/dist/hooks/use-dialog-stack/index.d.cts +4 -0
  76. package/dist/hooks/use-dialog-stack/index.d.mts +4 -0
  77. package/dist/hooks/use-dialog-stack/index.mjs +1 -0
  78. package/dist/hooks/use-drag-resize/index.cjs +1 -0
  79. package/dist/hooks/use-drag-resize/index.d.cts +2 -0
  80. package/dist/hooks/use-drag-resize/index.d.mts +2 -0
  81. package/dist/hooks/use-drag-resize/index.mjs +1 -0
  82. package/dist/hooks/use-drag-scroll/index.cjs +1 -0
  83. package/dist/hooks/use-drag-scroll/index.d.cts +13 -0
  84. package/dist/hooks/use-drag-scroll/index.d.mts +13 -0
  85. package/dist/hooks/use-drag-scroll/index.mjs +1 -0
  86. package/dist/hooks/use-effect-once/index.cjs +1 -0
  87. package/dist/hooks/use-effect-once/index.d.cts +7 -0
  88. package/dist/hooks/use-effect-once/index.d.mts +7 -0
  89. package/dist/hooks/use-effect-once/index.mjs +1 -0
  90. package/dist/hooks/use-outside-click/index.cjs +1 -0
  91. package/dist/hooks/use-outside-click/index.d.cts +13 -0
  92. package/dist/hooks/use-outside-click/index.d.mts +13 -0
  93. package/dist/hooks/use-outside-click/index.mjs +1 -0
  94. package/dist/hooks/use-scroll-lock/index.cjs +1 -0
  95. package/dist/hooks/use-scroll-lock/index.d.cts +12 -0
  96. package/dist/hooks/use-scroll-lock/index.d.mts +12 -0
  97. package/dist/hooks/use-scroll-lock/index.mjs +1 -0
  98. package/dist/hooks/use-scroll-top/index.cjs +1 -0
  99. package/dist/hooks/use-scroll-top/index.d.cts +17 -0
  100. package/dist/hooks/use-scroll-top/index.d.mts +17 -0
  101. package/dist/hooks/use-scroll-top/index.mjs +1 -0
  102. package/dist/hooks/use-snackbar/index.cjs +1 -0
  103. package/dist/hooks/{use-snackbar.d.cts → use-snackbar/index.d.cts} +1 -1
  104. package/dist/hooks/{use-snackbar.d.mts → use-snackbar/index.d.mts} +1 -1
  105. package/dist/hooks/use-sticky/index.cjs +1 -0
  106. package/dist/hooks/use-sticky/index.d.cts +9 -0
  107. package/dist/hooks/use-sticky/index.d.mts +9 -0
  108. package/dist/hooks/use-sticky/index.mjs +1 -0
  109. package/dist/hooks/use-subset-image/index.cjs +1 -0
  110. package/dist/hooks/use-subset-image/index.d.cts +2 -0
  111. package/dist/hooks/use-subset-image/index.d.mts +2 -0
  112. package/dist/hooks/use-subset-image/index.mjs +1 -0
  113. package/dist/hooks/use-window-size/index.cjs +1 -0
  114. package/dist/hooks/use-window-size/index.d.cts +6 -0
  115. package/dist/hooks/use-window-size/index.d.mts +6 -0
  116. package/dist/hooks/use-window-size/index.mjs +1 -0
  117. package/dist/image-CAEWHuaM.mjs +1 -0
  118. package/dist/image-kIL2PjTS.cjs +1 -0
  119. package/dist/index-90Zl6qBK.d.cts +17 -0
  120. package/dist/index-BD2sHM7a.d.cts +34 -0
  121. package/dist/index-BJgz2hkX.d.cts +56 -0
  122. package/dist/index-BKqI0jBF.d.mts +43 -0
  123. package/dist/index-BMZtFPh-.d.cts +43 -0
  124. package/dist/index-BT7Y7xkm.d.cts +7 -0
  125. package/dist/index-BTUIpavj.d.mts +34 -0
  126. package/dist/index-BlQhHmTa.d.cts +31 -0
  127. package/dist/index-BoJg4HO3.d.mts +56 -0
  128. package/dist/{util/fetcher.d.cts → index-Bpp6ufv-.d.cts} +2 -2
  129. package/dist/index-BxqkZ148.d.cts +18 -0
  130. package/dist/index-C3wA7a3i.d.mts +7 -0
  131. package/dist/index-CLxl-tUO.d.cts +41 -0
  132. package/dist/index-CV-nhdHd.d.mts +43 -0
  133. package/dist/{util/fetcher.d.mts → index-C_5zGF-K.d.mts} +2 -2
  134. package/dist/index-C_YTuhwX.d.mts +11 -0
  135. package/dist/index-CcpFy_mT.d.mts +17 -0
  136. package/dist/{index-B1YNV_Vm.d.cts → index-CqZGdObz.d.mts} +47 -15
  137. package/dist/index-Cxc49Lmr.d.mts +19 -0
  138. package/dist/index-D-NPxMFr.d.cts +11 -0
  139. package/dist/index-D0Uuydfo.d.cts +6 -0
  140. package/dist/index-D5uh7klO.d.mts +18 -0
  141. package/dist/{index-C8chDULk.d.mts → index-DCzaZKG0.d.cts} +47 -15
  142. package/dist/index-DDG8MvPD.d.mts +31 -0
  143. package/dist/index-DEolXbf5.d.cts +26 -0
  144. package/dist/index-DHXj3w9p.d.mts +40 -0
  145. package/dist/{use-subset-image-Dygkyw-W.d.mts → index-DHyXKIBX.d.cts} +1 -1
  146. package/dist/index-DSVr-P8y.d.mts +45 -0
  147. package/dist/index-DTtrJ-ei.d.cts +10 -0
  148. package/dist/index-D_Hfb-z2.d.cts +45 -0
  149. package/dist/index-DeXwS1TW.d.mts +10 -0
  150. package/dist/index-Dhkwd0rJ.d.cts +19 -0
  151. package/dist/index-DrUJZDtK.d.cts +43 -0
  152. package/dist/index-DvEtYdm4.d.cts +40 -0
  153. package/dist/{use-subset-image-bDB5TSd4.d.cts → index-DxW8JBva.d.mts} +1 -1
  154. package/dist/index-X2XMkoEC.d.mts +26 -0
  155. package/dist/index-aA4ojwuQ.d.mts +6 -0
  156. package/dist/index-wiRVGgrx.d.mts +41 -0
  157. package/dist/index.cjs +1 -1
  158. package/dist/index.d.cts +2 -2
  159. package/dist/index.d.mts +2 -2
  160. package/dist/index.mjs +1 -1
  161. package/dist/label-DeEAgKAc.mjs +1 -0
  162. package/dist/label-jZuNIGyF.cjs +1 -0
  163. package/dist/node-resize-Cs4wR_HY.mjs +1 -0
  164. package/dist/node-resize-dantnBzP.cjs +1 -0
  165. package/dist/node-size-BQQGo7t7.cjs +1 -0
  166. package/dist/node-size-Bg-g2Png.mjs +1 -0
  167. package/dist/node-view-context-D-1j5isf.mjs +1 -0
  168. package/dist/node-view-context-YTl_1gGD.cjs +1 -0
  169. package/dist/providers/api-client/index.cjs +1 -1
  170. package/dist/providers/api-client/index.d.cts +3 -3
  171. package/dist/providers/api-client/index.d.mts +3 -3
  172. package/dist/providers/api-client/index.mjs +1 -1
  173. package/dist/providers/editor/index.cjs +1 -0
  174. package/dist/providers/editor/index.d.cts +21 -0
  175. package/dist/providers/editor/index.d.mts +21 -0
  176. package/dist/providers/editor/index.mjs +1 -0
  177. package/dist/providers/noti-stack/index.cjs +1 -1
  178. package/dist/providers/noti-stack/index.d.cts +2 -2
  179. package/dist/providers/noti-stack/index.mjs +1 -1
  180. package/dist/select-field-CoNJTWRb.cjs +1 -0
  181. package/dist/select-field-DeyQlWxq.mjs +1 -0
  182. package/dist/skeleton-7P1IZD3G.cjs +1 -0
  183. package/dist/skeleton-D4Q9wT-o.mjs +1 -0
  184. package/dist/src-BB55dPBE.mjs +1 -0
  185. package/dist/src-Dz1mULYA.cjs +1 -0
  186. package/dist/styles/admin.css +2424 -0
  187. package/dist/styles/editor.css +2917 -63
  188. package/dist/styles/index.css +788 -184
  189. package/dist/subset-image-AaZA0RuB.cjs +1 -0
  190. package/dist/subset-image-Co0fWefj.mjs +1 -0
  191. package/dist/subset-image-DnZ2TqZY.mjs +1 -0
  192. package/dist/subset-image-P2NQM0-3.cjs +0 -0
  193. package/dist/switch-BDdSF3lu.cjs +1 -0
  194. package/dist/switch-DTQt7BzY.mjs +1 -0
  195. package/dist/table-CKVL_ezW.mjs +1 -0
  196. package/dist/table-DmwOZtdl.cjs +1 -0
  197. package/dist/table-controls-CQmqnc4R.cjs +1 -0
  198. package/dist/table-controls-CpCGiLvR.mjs +1 -0
  199. package/dist/table-resize-DI2Pf2Mi.cjs +1 -0
  200. package/dist/table-resize-w9EsReKV.mjs +1 -0
  201. package/dist/tabs-DQ1db_eg.mjs +1 -0
  202. package/dist/tabs-DiryrHZ7.cjs +1 -0
  203. package/dist/text-field-CTxoUkAg.cjs +1 -0
  204. package/dist/text-field-D2x9nugT.mjs +1 -0
  205. package/dist/ui/admin/async-select-field/index.cjs +1 -0
  206. package/dist/ui/admin/async-select-field/index.d.cts +35 -0
  207. package/dist/ui/admin/async-select-field/index.d.mts +35 -0
  208. package/dist/ui/admin/async-select-field/index.mjs +1 -0
  209. package/dist/ui/admin/country-select/index.cjs +1 -0
  210. package/dist/ui/admin/country-select/index.d.cts +47 -0
  211. package/dist/ui/admin/country-select/index.d.mts +47 -0
  212. package/dist/ui/admin/country-select/index.mjs +1 -0
  213. package/dist/ui/admin/dropzone-field/index.cjs +1 -0
  214. package/dist/ui/admin/dropzone-field/index.d.cts +110 -0
  215. package/dist/ui/admin/dropzone-field/index.d.mts +110 -0
  216. package/dist/ui/admin/dropzone-field/index.mjs +1 -0
  217. package/dist/ui/admin/email-field/index.cjs +1 -0
  218. package/dist/ui/admin/email-field/index.d.cts +9 -0
  219. package/dist/ui/admin/email-field/index.d.mts +9 -0
  220. package/dist/ui/admin/email-field/index.mjs +1 -0
  221. package/dist/ui/admin/file-field/index.cjs +1 -0
  222. package/dist/ui/admin/file-field/index.d.cts +36 -0
  223. package/dist/ui/admin/file-field/index.d.mts +36 -0
  224. package/dist/ui/admin/file-field/index.mjs +1 -0
  225. package/dist/ui/admin/image-list-field/index.cjs +1 -0
  226. package/dist/ui/admin/image-list-field/index.d.cts +53 -0
  227. package/dist/ui/admin/image-list-field/index.d.mts +53 -0
  228. package/dist/ui/admin/image-list-field/index.mjs +1 -0
  229. package/dist/ui/admin/label/index.cjs +1 -0
  230. package/dist/ui/admin/label/index.d.cts +2 -0
  231. package/dist/ui/admin/label/index.d.mts +2 -0
  232. package/dist/ui/admin/label/index.mjs +1 -0
  233. package/dist/ui/admin/priority-field/index.cjs +1 -0
  234. package/dist/ui/admin/priority-field/index.d.cts +19 -0
  235. package/dist/ui/admin/priority-field/index.d.mts +19 -0
  236. package/dist/ui/admin/priority-field/index.mjs +1 -0
  237. package/dist/ui/admin/select-field/index.cjs +1 -0
  238. package/dist/ui/admin/select-field/index.d.cts +3 -0
  239. package/dist/ui/admin/select-field/index.d.mts +3 -0
  240. package/dist/ui/admin/select-field/index.mjs +1 -0
  241. package/dist/ui/admin/series-field/index.cjs +1 -0
  242. package/dist/ui/admin/series-field/index.d.cts +37 -0
  243. package/dist/ui/admin/series-field/index.d.mts +37 -0
  244. package/dist/ui/admin/series-field/index.mjs +1 -0
  245. package/dist/ui/admin/sns-field/index.cjs +1 -0
  246. package/dist/ui/admin/sns-field/index.d.cts +50 -0
  247. package/dist/ui/admin/sns-field/index.d.mts +50 -0
  248. package/dist/ui/admin/sns-field/index.mjs +1 -0
  249. package/dist/ui/admin/source-field/index.cjs +1 -0
  250. package/dist/ui/admin/source-field/index.d.cts +34 -0
  251. package/dist/ui/admin/source-field/index.d.mts +34 -0
  252. package/dist/ui/admin/source-field/index.mjs +1 -0
  253. package/dist/ui/admin/text-area-field/index.cjs +1 -0
  254. package/dist/ui/admin/text-area-field/index.d.cts +20 -0
  255. package/dist/ui/admin/text-area-field/index.d.mts +20 -0
  256. package/dist/ui/admin/text-area-field/index.mjs +1 -0
  257. package/dist/ui/admin/text-field/index.cjs +1 -0
  258. package/dist/ui/admin/text-field/index.d.cts +3 -0
  259. package/dist/ui/admin/text-field/index.d.mts +3 -0
  260. package/dist/ui/admin/text-field/index.mjs +1 -0
  261. package/dist/ui/admin/url-field/index.cjs +1 -0
  262. package/dist/ui/admin/url-field/index.d.cts +9 -0
  263. package/dist/ui/admin/url-field/index.d.mts +9 -0
  264. package/dist/ui/admin/url-field/index.mjs +1 -0
  265. package/dist/ui/admin/video-field/index.cjs +1 -0
  266. package/dist/ui/admin/video-field/index.d.cts +24 -0
  267. package/dist/ui/admin/video-field/index.d.mts +24 -0
  268. package/dist/ui/admin/video-field/index.mjs +1 -0
  269. package/dist/ui/admin/with-extra-field/index.cjs +1 -0
  270. package/dist/ui/admin/with-extra-field/index.d.cts +19 -0
  271. package/dist/ui/admin/with-extra-field/index.d.mts +19 -0
  272. package/dist/ui/admin/with-extra-field/index.mjs +1 -0
  273. package/dist/ui/bottom-app-bar/index.cjs +1 -0
  274. package/dist/ui/bottom-app-bar/index.d.cts +21 -0
  275. package/dist/ui/bottom-app-bar/index.d.mts +21 -0
  276. package/dist/ui/bottom-app-bar/index.mjs +1 -0
  277. package/dist/ui/button/index.cjs +1 -0
  278. package/dist/{button-DHvx-GAg.d.cts → ui/button/index.d.cts} +11 -11
  279. package/dist/{button-DRIyBtEB.d.mts → ui/button/index.d.mts} +13 -13
  280. package/dist/ui/button/index.mjs +1 -0
  281. package/dist/ui/carousel/index.cjs +1 -1
  282. package/dist/ui/carousel/index.d.cts +9 -9
  283. package/dist/ui/carousel/index.mjs +1 -1
  284. package/dist/ui/conditional-wrapper/index.cjs +1 -0
  285. package/dist/ui/conditional-wrapper/index.d.cts +29 -0
  286. package/dist/ui/conditional-wrapper/index.d.mts +29 -0
  287. package/dist/ui/conditional-wrapper/index.mjs +1 -0
  288. package/dist/ui/country-flag/index.cjs +1 -0
  289. package/dist/ui/country-flag/index.d.cts +13 -0
  290. package/dist/ui/country-flag/index.d.mts +13 -0
  291. package/dist/ui/country-flag/index.mjs +1 -0
  292. package/dist/ui/dialog/index.cjs +1 -1
  293. package/dist/ui/dialog/index.d.cts +5 -5
  294. package/dist/ui/dialog/index.d.mts +7 -7
  295. package/dist/ui/dialog/index.mjs +1 -1
  296. package/dist/ui/dnd/index.cjs +1 -1
  297. package/dist/ui/dnd/index.d.cts +2 -2
  298. package/dist/ui/dnd/index.mjs +1 -1
  299. package/dist/ui/dropdown/index.cjs +1 -1
  300. package/dist/ui/dropdown/index.d.cts +16 -44
  301. package/dist/ui/dropdown/index.d.mts +16 -44
  302. package/dist/ui/dropdown/index.mjs +1 -1
  303. package/dist/ui/image/index.cjs +1 -1
  304. package/dist/ui/image/index.d.cts +3 -45
  305. package/dist/ui/image/index.d.mts +3 -45
  306. package/dist/ui/image/index.mjs +1 -1
  307. package/dist/ui/input/index.cjs +1 -0
  308. package/dist/ui/input/index.d.cts +22 -0
  309. package/dist/ui/input/index.d.mts +22 -0
  310. package/dist/ui/input/index.mjs +1 -0
  311. package/dist/ui/motion-dialog/index.cjs +1 -1
  312. package/dist/ui/motion-dialog/index.mjs +1 -1
  313. package/dist/ui/radius-handler/index.cjs +1 -0
  314. package/dist/ui/radius-handler/index.d.cts +17 -0
  315. package/dist/ui/radius-handler/index.d.mts +17 -0
  316. package/dist/ui/radius-handler/index.mjs +1 -0
  317. package/dist/ui/sheet/index.cjs +1 -1
  318. package/dist/ui/sheet/index.d.cts +2 -2
  319. package/dist/ui/sheet/index.d.mts +2 -2
  320. package/dist/ui/sheet/index.mjs +1 -1
  321. package/dist/ui/skeleton/index.cjs +1 -0
  322. package/dist/ui/skeleton/index.d.cts +26 -0
  323. package/dist/ui/skeleton/index.d.mts +26 -0
  324. package/dist/ui/skeleton/index.mjs +1 -0
  325. package/dist/ui/stable-text/index.cjs +1 -0
  326. package/dist/ui/stable-text/index.d.cts +13 -0
  327. package/dist/ui/stable-text/index.d.mts +13 -0
  328. package/dist/ui/stable-text/index.mjs +1 -0
  329. package/dist/ui/switch/index.cjs +1 -1
  330. package/dist/ui/switch/index.d.cts +1 -15
  331. package/dist/ui/switch/index.d.mts +1 -15
  332. package/dist/ui/switch/index.mjs +1 -1
  333. package/dist/ui/tooltip/index.cjs +1 -1
  334. package/dist/ui/tooltip/index.d.cts +2 -2
  335. package/dist/ui/tooltip/index.d.mts +2 -2
  336. package/dist/ui/tooltip/index.mjs +1 -1
  337. package/dist/use-delay-unmount-CNNJXNX5.cjs +1 -0
  338. package/dist/use-delay-unmount-_wzkutyv.mjs +1 -0
  339. package/dist/use-drag-resize--3PrrhJj.mjs +1 -0
  340. package/dist/use-drag-resize-BO3zANv3.cjs +1 -0
  341. package/dist/use-outside-click-BS2UOXoV.cjs +1 -0
  342. package/dist/use-outside-click-tsaJo3cz.mjs +1 -0
  343. package/dist/use-subset-image-B9ZSiVjx.mjs +1 -0
  344. package/dist/use-subset-image-BUurDItP.cjs +1 -0
  345. package/dist/util/browser/index.cjs +1 -0
  346. package/dist/util/{browser.d.cts → browser/index.d.cts} +1 -1
  347. package/dist/util/{browser.d.mts → browser/index.d.mts} +1 -1
  348. package/dist/util/common/index.cjs +1 -0
  349. package/dist/util/{common.d.cts → common/index.d.cts} +5 -5
  350. package/dist/util/{common.d.mts → common/index.d.mts} +5 -5
  351. package/dist/{common-ZUMpASnc.mjs → util/common/index.mjs} +1 -1
  352. package/dist/util/date/index.cjs +1 -0
  353. package/dist/util/{date.d.cts → date/index.d.cts} +1 -1
  354. package/dist/util/{date.d.mts → date/index.d.mts} +1 -1
  355. package/dist/util/editor/index.cjs +1 -0
  356. package/dist/util/editor/index.d.cts +55 -0
  357. package/dist/util/editor/index.d.mts +55 -0
  358. package/dist/util/editor/index.mjs +1 -0
  359. package/dist/util/fetcher/index.d.cts +2 -0
  360. package/dist/util/fetcher/index.d.mts +2 -0
  361. package/dist/util/file/index.cjs +1 -0
  362. package/dist/util/{file.d.mts → file/index.d.cts} +2 -2
  363. package/dist/util/{file.d.cts → file/index.d.mts} +2 -2
  364. package/dist/util/file/index.mjs +1 -0
  365. package/dist/util/format/index.cjs +1 -0
  366. package/dist/util/format/index.d.cts +6 -0
  367. package/dist/util/format/index.d.mts +6 -0
  368. package/dist/util/format/index.mjs +1 -0
  369. package/dist/util/generator/index.cjs +1 -0
  370. package/dist/util/{generator.d.cts → generator/index.d.cts} +1 -1
  371. package/dist/util/{generator.d.mts → generator/index.d.mts} +1 -1
  372. package/dist/util/phone/index.cjs +1 -0
  373. package/dist/util/{phone.d.cts → phone/index.d.cts} +1 -1
  374. package/dist/util/{phone.d.mts → phone/index.d.mts} +1 -1
  375. package/package.json +151 -108
  376. package/dist/button-CQZuaIU7.mjs +0 -1
  377. package/dist/button-ChX3XGbR.cjs +0 -1
  378. package/dist/common-B8HXyhZa.cjs +0 -1
  379. package/dist/common-CWHkXe0F.mjs +0 -1
  380. package/dist/common-D4sUwkFd.cjs +0 -1
  381. package/dist/file-5mweNdAM.cjs +0 -1
  382. package/dist/format-1_RTNUQv.mjs +0 -1
  383. package/dist/format-DEuImTYJ.cjs +0 -1
  384. package/dist/hooks/common/index.cjs +0 -1
  385. package/dist/hooks/common/index.d.cts +0 -72
  386. package/dist/hooks/common/index.d.mts +0 -72
  387. package/dist/hooks/common/index.mjs +0 -1
  388. package/dist/hooks/use-snackbar.cjs +0 -1
  389. package/dist/skeleton-B5ZccRFX.cjs +0 -1
  390. package/dist/skeleton-Y22bmaaB.mjs +0 -1
  391. package/dist/src-6KfzqI9Z.cjs +0 -1
  392. package/dist/src-CIMlbgv1.mjs +0 -1
  393. package/dist/ui/index.cjs +0 -1
  394. package/dist/ui/index.d.cts +0 -92
  395. package/dist/ui/index.d.mts +0 -92
  396. package/dist/ui/index.mjs +0 -1
  397. package/dist/ui/preserve-focus-button/index.cjs +0 -1
  398. package/dist/ui/preserve-focus-button/index.d.cts +0 -12
  399. package/dist/ui/preserve-focus-button/index.d.mts +0 -12
  400. package/dist/ui/preserve-focus-button/index.mjs +0 -1
  401. package/dist/ui-Bs9PP9eC.cjs +0 -1
  402. package/dist/ui-D2DoC_0E.mjs +0 -1
  403. package/dist/use-drag-resize-BdeLdulk.mjs +0 -1
  404. package/dist/use-drag-resize-DEgcua2U.d.cts +0 -48
  405. package/dist/use-drag-resize-DRHPv5RK.d.mts +0 -48
  406. package/dist/use-drag-resize-DeDqPC4h.cjs +0 -1
  407. package/dist/use-subset-image-Df2fCrtH.mjs +0 -1
  408. package/dist/use-subset-image-o_gmC1HL.cjs +0 -1
  409. package/dist/util/browser.cjs +0 -1
  410. package/dist/util/common.cjs +0 -1
  411. package/dist/util/common.mjs +0 -1
  412. package/dist/util/date.cjs +0 -1
  413. package/dist/util/editor.cjs +0 -1
  414. package/dist/util/editor.d.cts +0 -21
  415. package/dist/util/editor.d.mts +0 -21
  416. package/dist/util/editor.mjs +0 -1
  417. package/dist/util/file.cjs +0 -1
  418. package/dist/util/file.mjs +0 -1
  419. package/dist/util/format.cjs +0 -1
  420. package/dist/util/format.d.cts +0 -34
  421. package/dist/util/format.d.mts +0 -34
  422. package/dist/util/format.mjs +0 -1
  423. package/dist/util/generator.cjs +0 -1
  424. package/dist/util/phone.cjs +0 -1
  425. /package/dist/hooks/{use-snackbar.mjs → use-snackbar/index.mjs} +0 -0
  426. /package/dist/{use-dialog-stack-YiLs-sNf.cjs → use-dialog-stack-CH2nhH1Q.cjs} +0 -0
  427. /package/dist/{use-dialog-stack-Crj8YWJl.mjs → use-dialog-stack-nI1GTvfl.mjs} +0 -0
  428. /package/dist/util/{browser.mjs → browser/index.mjs} +0 -0
  429. /package/dist/util/{date.mjs → date/index.mjs} +0 -0
  430. /package/dist/util/{fetcher.cjs → fetcher/index.cjs} +0 -0
  431. /package/dist/util/{fetcher.mjs → fetcher/index.mjs} +0 -0
  432. /package/dist/util/{generator.mjs → generator/index.mjs} +0 -0
  433. /package/dist/util/{phone.mjs → phone/index.mjs} +0 -0
package/README.md CHANGED
@@ -2,110 +2,152 @@
2
2
 
3
3
  React용 공용 UI·훅·유틸·API 클라이언트 패키지입니다.
4
4
 
5
- **현재 버전:** `0.6` (`package.json`의 `version` 필드와 동일합니다. 배포 전에는 해당 값을 확인하세요.)
6
-
7
- **Peer dependency:** `react`, `react-dom` — `^18.3.1` 또는 `^19.0.0`
8
-
9
5
  ---
10
6
 
11
7
  ## 설치
12
8
 
13
9
  ```bash
14
10
  pnpm add @machinerd/js-module
15
- npm install @machinerd/js-module
16
- yarn add @machinerd/js-module
17
11
  ```
18
12
 
19
- 컴포넌트를 사용한다면 CSS도 함께 import 해야 합니다.
13
+ `npm` / `yarn`도 동일합니다. 사용하는 UI에 맞는 peer dependency는 소비하는 앱에 설치해야 합니다. 아래 표를 참고하세요.
20
14
 
21
- ```js
22
- import '@machinerd/js-module/styles/index.css';
23
- ```
15
+ ---
16
+
17
+ ## CSS
24
18
 
25
- 에디터(Tiptap) 때만 아래를 추가로 넣습니다.
19
+ 유틸·훅·프로바이더만 쓰면 CSS는 필요 없습니다. `komc:` 유틸이나 `[data-komc]`가 있는 UI쓰면 스타일을 import 해야 합니다.
20
+
21
+ | 파일 | 필요할 때 |
22
+ | --- | --- |
23
+ | `@machinerd/js-module/styles/index.css` | 공통 UI (버튼, 다이얼로그, 캐러셀 등) |
24
+ | `@machinerd/js-module/styles/admin.css` | 어드민 필드·토큰·`form-field` |
25
+ | `@machinerd/js-module/styles/editor.css` | 에디터 콘텐츠 스타일 |
26
26
 
27
27
  ```js
28
+ import '@machinerd/js-module/styles/index.css';
29
+ import '@machinerd/js-module/styles/admin.css';
28
30
  import '@machinerd/js-module/styles/editor.css';
29
31
  ```
30
32
 
31
- ---
33
+ 클래스는 `komc:` prefix이고, 공통 UI 리셋·토큰은 `[data-komc]` 안에만 적용됩니다. 호스트 앱의 Tailwind와 겹치지 않습니다. `editor.css`는 TipTap이 붙이는 `.tiptap`에 바로 걸립니다. `data-komc`나 `editor-wrapper`는 필요 없습니다. 필드 크롬까지 쓰려면 `admin.css`를 같이 넣습니다. 노드 호버·선택 링은 `.komc-node-frame`에, 드래그는 `data-drag-handle`에 걸립니다.
32
34
 
33
- ## API 클라이언트 (`@machinerd/js-module`)
35
+ ---
34
36
 
35
- ```ts
36
- import ApiClient, { type ApiConfig } from '@machinerd/js-module';
37
+ ## 에디터
37
38
 
38
- const client = new ApiClient({
39
- apiEndpoint: 'https://api.example.com',
40
- cdnEndpoint: 'https://cdn.example.com',
41
- });
39
+ `Loader`와 노드·익스텐션은 엔트리가 나뉘어 있습니다. 서버에서 스키마만 쓸 때는 노드/익스텐션을 직접 import 하면 됩니다.
42
40
 
43
- await client.login(/* ... */);
44
- client.cdnMedia('path/to/key');
41
+ ```js
42
+ import { Loader } from '@machinerd/js-module/editor';
43
+ import { CustomHeading } from '@machinerd/js-module/editor/nodes/custom-heading';
44
+ import { Align } from '@machinerd/js-module/editor/extensions/align';
45
45
  ```
46
46
 
47
- ---
48
-
49
- ## Providers
47
+ 이미지 노드에 호스트 메뉴를 붙이려면 `plugins`에 컴포넌트를 넣습니다. `NodeSize` / `NodeResizer`는 기본 플러그인이라 같이 넣지 않아도 됩니다. 크기 입력의 최소·최댓값은 `size`로 넘기고, `plugins`에 `nodeSize()`를 또 넣으면 오버레이가 두 번 뜹니다. 메뉴는 NodeView 안에서 렌더되고, `useNodeView()`로 `updateAttributes` / `node` / `deleteNode`를 씁니다.
50
48
 
51
- **`Image`·`useSubsetImage` 등 CDN 경로를 다루는 UI·훅**은 내부에서 `useApiClient()`로 **`ApiClient` 인스턴스**에 접근합니다.
49
+ ```js
50
+ import { MenuWrapper, useNodeView } from '@machinerd/js-module/editor/nodes/menu-wrapper';
51
+ import type { SubsetImageAttrs } from '@machinerd/js-module/editor/nodes/subset-image';
52
52
 
53
- ```tsx
54
- import { ApiClientProvider } from '@machinerd/js-module/providers';
53
+ function ImageMenu() {
54
+ const { node, updateAttributes, deleteNode } =
55
+ useNodeView<SubsetImageAttrs>();
55
56
 
56
- export function App({ children }: { children: React.ReactNode }) {
57
57
  return (
58
- <ApiClientProvider
59
- config={{
60
- apiEndpoint: 'https://api.example.com',
61
- cdnEndpoint: 'https://cdn.example.com',
62
- }}
63
- >
64
- {children}
65
- </ApiClientProvider>
58
+ <MenuWrapper>
59
+ <MenuWrapper.Item
60
+ onClick={() => updateAttributes({ alt: node.attrs.alt })}
61
+ />
62
+ <MenuWrapper.Item onClick={deleteNode} />
63
+ </MenuWrapper>
66
64
  );
67
65
  }
68
- ```
69
-
70
- ---
71
66
 
72
- ## UI 컴포넌트 (`@machinerd/js-module/ui/common`)
73
-
74
- ```tsx
75
- import {
76
- Button,
77
- ...Other
78
- } from '@machinerd/js-module/ui/common';
79
- import { Carousel } from '@machinerd/js-module/ui/carousel';
80
- ...Other
81
-
82
- import '@machinerd/js-module/styles/index.css';
67
+ new Loader().mediaset({
68
+ subsetImage: {
69
+ size: { maxWidth: 829 },
70
+ plugins: [ImageMenu],
71
+ },
72
+ basicImage: { plugins: [ImageMenu] },
73
+ });
83
74
  ```
84
75
 
76
+ | 엔트리 | 내용 |
77
+ | --- | --- |
78
+ | `@machinerd/js-module/editor` | `Loader` |
79
+ | `@machinerd/js-module/editor/nodes/basic-image` | `BasicImage` |
80
+ | `@machinerd/js-module/editor/nodes/subset-image` | `SubsetImage`, `SubsetImageAttrs` |
81
+ | `@machinerd/js-module/editor/nodes/custom-heading` | `CustomHeading` |
82
+ | `@machinerd/js-module/editor/nodes/table` | `Table`, `TableRow`, `TableCell`, `TableHeader` |
83
+ | `@machinerd/js-module/editor/nodes/tabs` | `Tabs`, `TabTitle`, `TabContent` |
84
+ | `@machinerd/js-module/editor/nodes/menu-wrapper` | `MenuWrapper`, `useNodeView` |
85
+ | `@machinerd/js-module/editor/nodes/node-view-context` | `useNodeView`, `PluginNodeView`, `withNodeViewChrome` |
86
+ | `@machinerd/js-module/editor/nodes/node-resize` | `NodeResizer`, `NodeResizerPlugin` |
87
+ | `@machinerd/js-module/editor/nodes/node-size` | `NodeSize`, `NodeSizePlugin`, `nodeSize` |
88
+ | `@machinerd/js-module/editor/extensions/align` | `Align` |
89
+ | `@machinerd/js-module/editor/extensions/table-resize` | `TableResize` |
90
+ | `@machinerd/js-module/editor/extensions/table-controls` | `TableControls` |
91
+
85
92
  ---
86
93
 
87
- ## 로컬 개발·다른 프로젝트에서 검증
94
+ ## Peer dependency
95
+
96
+ `react` / `react-dom`만 필수입니다. 나머지는 해당 엔트리를 쓸 때만 설치하면 됩니다.
97
+
98
+ | 패키지 | 버전 | 필수 | 사용처 |
99
+ | --- | --- | --- | --- |
100
+ | `react` | `^18.3.1` 또는 `^19.0.0` | 예 | 전체 |
101
+ | `react-dom` | `^18.3.1` 또는 `^19.0.0` | 예 | 전체 |
102
+ | `@fortawesome/fontawesome-svg-core` | `^6.0.0` 또는 `^7.0.0` | 아니오 | 어드민 필드 아이콘 타입 |
103
+ | `@fortawesome/react-fontawesome` | `^3.0.0` | 아니오 | 어드민 필드 아이콘 렌더 |
104
+ | `@floating-ui/react` | `^0.27.0` | 아니오 | `ui/dropdown` |
105
+ | `@dnd-kit/core` | `^6.0.0` | 아니오 | `ui/dnd`, video/source/file/series/sns/image-list 필드 |
106
+ | `@dnd-kit/modifiers` | `^9.0.0` | 아니오 | `ui/dnd` |
107
+ | `@dnd-kit/sortable` | `^10.0.0` | 아니오 | `ui/dnd`, video/source/file/series/sns/image-list 필드 |
108
+ | `@dnd-kit/utilities` | `^3.0.0` | 아니오 | `ui/dnd`, video/source/file/series/sns/image-list 필드 |
109
+ | `embla-carousel` | `^8.0.0` | 아니오 | `ui/carousel` |
110
+ | `embla-carousel-react` | `^8.0.0` | 아니오 | `ui/carousel` |
111
+ | `motion` | `^13.0.0` | 아니오 | `ui/motion-dialog`, `ui/radius-handler` |
112
+ | `notistack` | `^3.0.0` | 아니오 | `hooks/use-snackbar`, `providers/noti-stack` |
113
+ | `react-dropzone` | `>=14.0.0 <21.0.0` | 아니오 | `ui/admin/dropzone-field` |
114
+ | `react-hook-form` | `^7.0.0` | 아니오 | `ui/admin/with-extra-field` |
115
+ | `react-select` | `^5.0.0` | 아니오 | `ui/admin/select-field`, `ui/admin/source-field`, `ui/admin/sns-field`, `ui/admin/async-select-field`, `ui/admin/country-select` |
116
+ | `react-select-async-paginate` | `^0.7.0` | 아니오 | `ui/admin/async-select-field`, `ui/admin/country-select` |
117
+ | `@tailwindcss/typography` | `^0.5.0` | 아니오 | `styles/editor.css` |
118
+ | `@tiptap/core` | `^3.0.0` | 아니오 | 에디터 |
119
+ | `@tiptap/extension-color` | `^3.0.0` | 아니오 | 에디터 |
120
+ | `@tiptap/extension-details` | `^3.0.0` | 아니오 | 에디터 |
121
+ | `@tiptap/extension-document` | `^3.0.0` | 아니오 | 에디터 |
122
+ | `@tiptap/extension-heading` | `^3.0.0` | 아니오 | 에디터 |
123
+ | `@tiptap/extension-image` | `^3.0.0` | 아니오 | 에디터 |
124
+ | `@tiptap/extension-list` | `^3.0.0` | 아니오 | 에디터 |
125
+ | `@tiptap/extension-paragraph` | `^3.0.0` | 아니오 | 에디터 |
126
+ | `@tiptap/extension-table` | `^3.0.0` | 아니오 | 에디터 |
127
+ | `@tiptap/extension-text` | `^3.0.0` | 아니오 | 에디터 |
128
+ | `@tiptap/extension-text-style` | `^3.0.0` | 아니오 | 에디터 |
129
+ | `@tiptap/extension-youtube` | `^3.0.0` | 아니오 | 에디터 |
130
+ | `@tiptap/extensions` | `^3.0.0` | 아니오 | 에디터 |
131
+ | `@tiptap/pm` | `^3.0.0` | 아니오 | 에디터 |
132
+ | `@tiptap/react` | `^3.0.0` | 아니오 | 에디터 |
133
+ | `@tiptap/starter-kit` | `^3.0.0` | 아니오 | 에디터 |
134
+ | `@tiptap/suggestion` | `^3.0.0` | 아니오 | 에디터 |
88
135
 
89
- ### 1. 이 저장소에서 빌드
136
+ ---
90
137
 
91
- ```bash
92
- pnpm install
93
- pnpm build
94
- ```
138
+ ## 로컬 개발
95
139
 
96
- ### 2. tarball로 다른 프로젝트에 넣기 (`pnpm pack`)
140
+ - 패키지 매니저는 `pnpm`입니다 (`packageManager`: `pnpm@10.25.0`).
141
+ - 소비하는 앱은 `dist`를 봅니다. 코드를 바꾼 뒤에는 이 저장소에서 다시 빌드해야 합니다.
142
+ - UI 루트에는 `data-komc`가 있어야 리셋·토큰이 적용됩니다. 라이브러리 컴포넌트가 대부분 붙여 둡니다.
143
+ - 다른 프로젝트에서 확인하려면 빌드 후 tarball을 넣습니다.
97
144
 
98
145
  ```bash
99
146
  pnpm pack
100
- ```
101
-
102
- 소비하는 프로젝트에서:
103
-
104
- ```bash
105
147
  pnpm add /절대/또는/상대/경로/machinerd-js-module-[VERSION].tgz
106
148
  ```
107
149
 
108
- 또는 `package.json`에:
150
+ `package.json`에는 이렇게 적어도 됩니다.
109
151
 
110
152
  ```json
111
153
  {
@@ -114,3 +156,30 @@ pnpm add /절대/또는/상대/경로/machinerd-js-module-[VERSION].tgz
114
156
  }
115
157
  }
116
158
  ```
159
+
160
+ ---
161
+
162
+ ## 빌드
163
+
164
+ ```bash
165
+ pnpm install
166
+ pnpm build
167
+ ```
168
+
169
+ `pnpm build`는 JS(`tsdown`)와 CSS(`index` / `admin` / `editor`)를 `dist`에 만듭니다. 배포 전에만 쓰려면 `pnpm build:pack`으로 빌드와 `pack`을 한 번에 할 수 있습니다.
170
+
171
+ ---
172
+
173
+ ## 테스트
174
+
175
+ 단위 테스트 스크립트는 아직 없습니다. 지금은 아래를 쓰면 됩니다.
176
+
177
+ ```bash
178
+ pnpm lint
179
+ pnpm build:tsc
180
+ pnpm storybook
181
+ ```
182
+
183
+ - `lint` — ESLint
184
+ - `build:tsc` — 타입 체크
185
+ - `storybook` — `http://localhost:6006`에서 UI 확인
@@ -0,0 +1 @@
1
+ import{Extension as e,isNodeSelection as t}from"@tiptap/core";const n=e.create({name:`align`,addOptions(){return{types:[`paragraph`,`heading`],defaultAlign:`left`}},addGlobalAttributes(){return[{types:this.options.types,attributes:{align:{default:this.options.defaultAlign,parseHTML:e=>e.getAttribute(`data-align`)??this.options.defaultAlign,renderHTML:e=>!e.align||e.align===this.options.defaultAlign?{}:{"data-align":e.align}}}}]},addCommands(){return{setAlign:e=>({editor:n,commands:r})=>{let{selection:i}=n.state;if(t(i)){let t=i.node;if(this.options.types.includes(t.type.name))return r.updateAttributes(t.type.name,{align:e})}let{$from:a}=i;for(let t=a.depth;t>=0;t--){let n=a.node(t);if(this.options.types.includes(n.type.name))return r.updateAttributes(n.type.name,{align:e})}return!1},unsetAlign:()=>({editor:e,commands:n})=>{let{selection:r}=e.state;if(t(r)){let e=r.node;if(this.options.types.includes(e.type.name))return n.updateAttributes(e.type.name,{align:this.options.defaultAlign})}let{$from:i}=r;for(let e=i.depth;e>=0;e--){let t=i.node(e);if(this.options.types.includes(t.type.name))return n.updateAttributes(t.type.name,{align:this.options.defaultAlign})}return!1}}}});export{n as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@tiptap/core`);const n=t.Extension.create({name:`align`,addOptions(){return{types:[`paragraph`,`heading`],defaultAlign:`left`}},addGlobalAttributes(){return[{types:this.options.types,attributes:{align:{default:this.options.defaultAlign,parseHTML:e=>e.getAttribute(`data-align`)??this.options.defaultAlign,renderHTML:e=>!e.align||e.align===this.options.defaultAlign?{}:{"data-align":e.align}}}}]},addCommands(){return{setAlign:e=>({editor:n,commands:r})=>{let{selection:i}=n.state;if((0,t.isNodeSelection)(i)){let t=i.node;if(this.options.types.includes(t.type.name))return r.updateAttributes(t.type.name,{align:e})}let{$from:a}=i;for(let t=a.depth;t>=0;t--){let n=a.node(t);if(this.options.types.includes(n.type.name))return r.updateAttributes(n.type.name,{align:e})}return!1},unsetAlign:()=>({editor:e,commands:n})=>{let{selection:r}=e.state;if((0,t.isNodeSelection)(r)){let e=r.node;if(this.options.types.includes(e.type.name))return n.updateAttributes(e.type.name,{align:this.options.defaultAlign})}let{$from:i}=r;for(let e=i.depth;e>=0;e--){let t=i.node(e);if(this.options.types.includes(t.type.name))return n.updateAttributes(t.type.name,{align:this.options.defaultAlign})}return!1}}}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -1 +1 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./src-6KfzqI9Z.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.createContext)(null);function a({children:e,config:a}){let{apiEndpoint:o,cdnEndpoint:s}=a,c=(0,n.useMemo)(()=>new t.t({apiEndpoint:o,cdnEndpoint:s}),[o,s]);return(0,r.jsx)(i.Provider,{value:c,children:e})}function o(){let e=(0,n.useContext)(i);if(!e)throw Error(`ApiClient not found`);return e}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./src-Dz1mULYA.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.createContext)(null);function a({children:e,config:a}){let{apiEndpoint:o,cdnEndpoint:s}=a,c=(0,n.useMemo)(()=>new t.t({apiEndpoint:o,cdnEndpoint:s}),[o,s]);return(0,r.jsx)(i.Provider,{value:c,children:e})}function o(){let e=(0,n.useContext)(i);if(!e)throw Error(`ApiClient not found`);return e}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -1 +1 @@
1
- import{t as e}from"./src-CIMlbgv1.mjs";import{createContext as t,useContext as n,useMemo as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=t(null);function o({children:t,config:n}){let{apiEndpoint:o,cdnEndpoint:s}=n,c=r(()=>new e({apiEndpoint:o,cdnEndpoint:s}),[o,s]);return i(a.Provider,{value:c,children:t})}function s(){let e=n(a);if(!e)throw Error(`ApiClient not found`);return e}export{s as n,o as t};
1
+ import{t as e}from"./src-BB55dPBE.mjs";import{createContext as t,useContext as n,useMemo as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=t(null);function o({children:t,config:n}){let{apiEndpoint:o,cdnEndpoint:s}=n,c=r(()=>new e({apiEndpoint:o,cdnEndpoint:s}),[o,s]);return i(a.Provider,{value:c,children:t})}function s(){let e=n(a);if(!e)throw Error(`ApiClient not found`);return e}export{s as n,o as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./subset-image-DnZ2TqZY.mjs";import{mergeAttributes as t}from"@tiptap/core";import n from"@tiptap/extension-image";const r=n.extend({group:`block`,atom:!0,draggable:!0,addOptions(){return{...this.parent?.(),plugins:[],size:{}}},parseHTML(){return[{tag:`img`}]},renderHTML({HTMLAttributes:e}){return[`img`,t(e)]},addAttributes(){return{...this.parent?.(),src:{default:``},alt:{default:``},width:{default:400},height:{default:400},imagePosition:{default:`left`},imageRadius:{default:0},originalWidth:{default:1280}}},addNodeView(){return e(this.options.plugins,this.options.size)}});export{r as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./subset-image-AaZA0RuB.cjs`);let n=require(`@tiptap/core`),r=require(`@tiptap/extension-image`);r=e.t(r);const i=r.default.extend({group:`block`,atom:!0,draggable:!0,addOptions(){return{...this.parent?.(),plugins:[],size:{}}},parseHTML(){return[{tag:`img`}]},renderHTML({HTMLAttributes:e}){return[`img`,(0,n.mergeAttributes)(e)]},addAttributes(){return{...this.parent?.(),src:{default:``},alt:{default:``},width:{default:400},height:{default:400},imagePosition:{default:`left`},imageRadius:{default:0},originalWidth:{default:1280}}},addNodeView(){return t.o(this.options.plugins,this.options.size)}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`lodash-es`);const i=`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/`,a=({countryCode:e,...i})=>{let a=(0,t.useMemo)(()=>`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/`+(0,r.lowerCase)(e)+`.svg`,[e]),o=e=>{e.currentTarget.remove()};return(0,n.jsx)(`img`,{"data-komc":!0,width:`34px`,height:`24px`,src:a,alt:e,...i,onError:o})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -0,0 +1 @@
1
+ import{useMemo as e}from"react";import{jsx as t}from"react/jsx-runtime";import{lowerCase as n}from"lodash-es";const r=({countryCode:r,...i})=>{let a=e(()=>`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/`+n(r)+`.svg`,[r]),o=e=>{e.currentTarget.remove()};return t(`img`,{"data-komc":!0,width:`34px`,height:`24px`,src:a,alt:r,...i,onError:o})};export{r as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@tiptap/extension-heading`);t=e.t(t);const n=t.default.extend({addAttributes(){return{...this.parent?.(),class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -0,0 +1 @@
1
+ import e from"@tiptap/extension-heading";const t=e.extend({addAttributes(){return{...this.parent?.(),class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}}});export{t};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useSortable as t}from"@dnd-kit/sortable";import{CSS as n}from"@dnd-kit/utilities";function r({id:r,render:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=t({id:r});return e(`div`,{ref:s,"data-komc":!0,style:{width:`100%`,zIndex:u?`100`:`auto`,opacity:u?.7:1,transform:n.Translate.toString(c),transition:l},children:i(a,o)})}export{r as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`@dnd-kit/sortable`),r=require(`@dnd-kit/utilities`);function i({id:e,render:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=(0,n.useSortable)({id:e});return(0,t.jsx)(`div`,{ref:s,"data-komc":!0,style:{width:`100%`,zIndex:u?`100`:`auto`,opacity:u?.7:1,transform:r.CSS.Translate.toString(c),transition:l},children:i(a,o)})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -0,0 +1 @@
1
+ const e=require(`../../../align-Dp4avXIm.cjs`);exports.Align=e.t;
@@ -0,0 +1,2 @@
1
+ import { n as AlignType, t as Align } from "../../../index-BxqkZ148.cjs";
2
+ export { Align, AlignType };
@@ -0,0 +1,2 @@
1
+ import { n as AlignType, t as Align } from "../../../index-D5uh7klO.mjs";
2
+ export { Align, AlignType };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../../align-CdK8Ar2w.mjs";export{e as Align};
@@ -0,0 +1 @@
1
+ const e=require(`../../../table-controls-CQmqnc4R.cjs`);exports.TableControls=e.t;
@@ -0,0 +1,2 @@
1
+ import { n as TableControls, r as TableControlsStorage, t as ActiveControl } from "../../../index-Dhkwd0rJ.cjs";
2
+ export { ActiveControl, TableControls, TableControlsStorage };
@@ -0,0 +1,2 @@
1
+ import { n as TableControls, r as TableControlsStorage, t as ActiveControl } from "../../../index-Cxc49Lmr.mjs";
2
+ export { ActiveControl, TableControls, TableControlsStorage };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../../table-controls-CpCGiLvR.mjs";export{e as TableControls};
@@ -0,0 +1 @@
1
+ const e=require(`../../../table-resize-DI2Pf2Mi.cjs`);exports.TableResize=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as TableResize } from "../../../index-D0Uuydfo.cjs";
2
+ export { TableResize };
@@ -0,0 +1,2 @@
1
+ import { t as TableResize } from "../../../index-aA4ojwuQ.mjs";
2
+ export { TableResize };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../../table-resize-w9EsReKV.mjs";export{e as TableResize};
@@ -1 +1 @@
1
- "use client";const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-D4sUwkFd.cjs`),n=require(`../format-DEuImTYJ.cjs`);require(`../ui-Bs9PP9eC.cjs`),require(`../button-ChX3XGbR.cjs`);const r=require(`../skeleton-B5ZccRFX.cjs`),i=require(`../use-drag-resize-DeDqPC4h.cjs`);let a=require(`react`);a=e.t(a);let o=require(`@tiptap/react`),s=require(`react/jsx-runtime`),c=require(`clsx`);c=e.t(c);let l=require(`class-variance-authority`);const u=(0,a.createContext)(null);function d({editor:e,children:t}){let n=(0,a.useMemo)(()=>({editor:e}),[e]);return(0,s.jsx)(u.Provider,{value:n,children:t})}function f(){let e=(0,a.useContext)(u);if(!e)throw Error(`useEditorContext must be used within EditorProvider`);return e}function p(){let{editor:e}=f();if(!e)throw Error(`Editor is not available`);return e}function m(){return f().editor}const h=(0,a.forwardRef)(({plugins:e,editorRef:t,editorClassName:n=``,value:i,className:l,onChange:u,immediatelyRender:f=!0,content:p,editorProps:m,onCreate:h,onUpdate:g,..._},v)=>{let y=m?.attributes&&typeof m.attributes==`object`?m.attributes:void 0,b=(0,o.useEditor)({immediatelyRender:f,..._,content:p??i??``,editorProps:{...m,attributes:{...y,class:(0,c.default)(n,y&&`class`in y&&y.class)}},onCreate:e=>{t&&(t.current=e.editor),h?.(e)},onUpdate:e=>{u?.(e.editor.getHTML(),e.editor),g?.(e)}});return(0,a.useEffect)(()=>{if(t)return t.current=b??null,()=>{t.current===b&&(t.current=null)}},[b,t]),(0,a.useEffect)(()=>{!b||typeof i!=`string`||b.isDestroyed||b.isFocused||b.getHTML()!==i&&b.commands.setContent(i,{emitUpdate:!1})},[b,i]),(0,s.jsx)(d,{editor:b,children:(0,s.jsxs)(`div`,{"data-komc":!0,className:`komc:relative`,children:[b&&e,(0,s.jsx)(`div`,{ref:v,"data-komc":!0,className:(0,c.default)(`komc:@container/komc-editor editor-wrapper`,`komc:w-full komc:h-auto komc:relative`,`komc:border-[0.6px] komc:border-neutral-300`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:focus-within:border-blue-500 komc:focus-within:ring-4`,l),children:b?(0,s.jsx)(o.EditorContent,{editor:b}):(0,s.jsx)(r.t,{className:`komc:w-full komc:min-h-25`})})]})})}),g=(0,l.cva)(t.n(`komc:group komc:relative komc:after:pointer-events-none`,`komc:after:transition-opacity komc:after:duration-200 komc:after:ease-in-out`,`komc:after:content-[""] komc:after:rounded-(--node-radius)`,`komc:after:absolute komc:after:-inset-1.5 komc:after:z-1`),{variants:{selected:{true:`komc:after:bg-[#2383E2]/14 komc:after:opacity-100`,false:`komc:after:opacity-0`},hoverable:{true:t.n(`komc:*:data-komc-node-clip:transition-opacity`,`komc:*:data-komc-node-clip:duration-200`,`komc:*:data-komc-node-clip:ease-in-out`,`komc:*:data-komc-node-clip:outline-gray-700`,`komc:*:data-komc-node-clip:-outline-offset-1`,`komc:*:data-komc-node-clip:outline-0`,`komc:hover:*:data-komc-node-clip:opacity-70`,`komc:*:data-komc-node-clip:opacity-100`,`komc:hover:z-1`),false:``},draggable:{true:`komc:cursor-grab komc:active:cursor-grabbing komc:touch-none`,false:`komc:select-none`}},defaultVariants:{selected:!1,hoverable:!1,draggable:!1},compoundVariants:[{selected:!0,hoverable:!0,class:`komc:*:data-komc-node-clip:outline-none`},{selected:!1,hoverable:!0,class:`komc:hover:*:data-komc-node-clip:outline-3`}]}),_=(0,a.forwardRef)(({selected:e,hoverable:n,draggable:r,radius:i=0,overlay:a,className:o,style:c,children:l,...u},d)=>(0,s.jsxs)(`div`,{ref:d,style:{"--node-radius":`${i}%`,...c},className:t.n(g({selected:e,hoverable:n,draggable:r}),o),...u,"data-drag-handle":r?``:void 0,children:[(0,s.jsx)(`div`,{"data-komc-node-clip":``,className:`komc:w-full komc:h-full komc:relative komc:overflow-hidden`,style:{borderRadius:`${i}%`},children:l}),a!=null&&(0,s.jsx)(`div`,{className:`komc:absolute komc:inset-0 komc:z-2 komc:pointer-events-none komc:**:pointer-events-auto`,onPointerDown:e=>e.stopPropagation(),children:a})]}));_.displayName=`NodeFrame`;const v={width:i.t.DEFAULT_WIDTH,height:i.t.DEFAULT_HEIGHT};function y(e,t,r,i,a){return n.t({min:v,max:{width:a,height:1/0},width:e,height:t,type:r,currentRatio:i})}function b({width:e=0,height:n=0,maxWidth:r,edit:i,onEditChange:o,onChange:c}){let l=i!==void 0,[u,d]=(0,a.useState)(!1),f=l?i:u,[p,m]=(0,a.useState)(e),[h,g]=(0,a.useState)(n),[_,b]=(0,a.useState)(null),w=(0,a.useRef)(e&&n?e/n:1),T=e=>{l||d(e),o?.(e)},E=()=>{f||(T(!0),e&&n&&(w.current=e/n))},D=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let{width:t,height:n,result:i}=y(Number(e.target.value),h,`width`,w.current,r);m(t),g(n),b(i)},O=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let{width:t,height:n,result:i}=y(p,Number(e.target.value),`height`,w.current,r);m(t),g(n),b(i)},k=()=>{_||p<v.width||p>r||h<v.height||(T(!1),c?.({width:p,height:h}))};return(0,a.useEffect)(()=>{m(e),g(n),e&&n&&(w.current=e/n);let{result:t}=y(e,n,`width`,w.current,r),{result:i}=y(e,n,`height`,w.current,r);b(t||i||null)},[e,n,f,r]),(0,s.jsxs)(`div`,{className:t.n(`komc:flex komc:flex-col komc:justify-center komc:items-center`,`komc:text-base komc:text-center komc:text-black komc:absolute`,f?`komc:opacity-100 komc:-inset-1.5 komc:bg-white/60 komc:z-20`:t.n(`komc:z-10 komc:opacity-0 komc:group-hover:opacity-100`,`komc:top-1/2 komc:-translate-y-1/2 komc:left-1/2 komc:-translate-x-1/2`)),children:[!f&&(0,s.jsx)(`button`,{type:`button`,className:`komc:absolute komc:inset-0 komc:cursor-pointer`,onClick:E,"aria-label":`노드 크기 수정`}),(0,s.jsxs)(`div`,{className:t.n(`komc:flex komc:flex-row komc:justify-center komc:items-center komc:gap-x-1 komc:relative`,!f&&`komc:cursor-pointer`),children:[(0,s.jsx)(`div`,{className:`komc:inline komc:relative`,children:(0,s.jsx)(x,{shouldFocus:f,value:p,onChange:D,disabled:!f})}),(0,s.jsx)(`span`,{children:`x`}),(0,s.jsx)(`div`,{className:`komc:inline komc:relative`,children:(0,s.jsx)(x,{value:h,onChange:O,disabled:!f})}),f&&_&&(0,s.jsx)(`span`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-5 komc:h-5 komc:ml-1 komc:text-red-600`,"aria-label":`입력값이 허용 범위를 벗어났습니다`,children:(0,s.jsx)(C,{})}),f&&!_&&(0,s.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),k()},className:t.n(`komc:flex komc:shrink-0 komc:justify-center komc:items-center`,`komc:w-5 komc:h-5 komc:ml-1 komc:rounded`,`komc:bg-blue-500 komc:text-white komc:hover:bg-blue-600 komc:cursor-pointer`),children:(0,s.jsx)(S,{})})]})]})}function x({shouldFocus:e,value:t,onChange:n,disabled:r}){let[i,o]=(0,a.useState)(30),c=(0,a.useRef)(null),l=(0,a.useRef)(null);return(0,a.useEffect)(()=>{c.current&&o(c.current.offsetWidth||30)},[t]),(0,a.useEffect)(()=>{!r&&e&&l.current&&l.current.focus()},[r,e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{ref:c,"aria-hidden":`true`,className:`komc:absolute komc:invisible komc:whitespace-pre komc:text-base komc:pointer-events-none`,children:t||` `}),(0,s.jsx)(`input`,{ref:l,type:`text`,inputMode:`numeric`,maxLength:5,value:t,onChange:n,disabled:r,className:`komc:text-center komc:text-base komc:outline-none komc:bg-transparent komc:disabled:pointer-events-none`,style:{width:`${i+8}px`}})]})}function S(){return(0,s.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`none`,"aria-hidden":`true`,children:(0,s.jsx)(`path`,{d:`M3.5 8.5 6.5 11.5 12.5 4.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function C(){return(0,s.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,s.jsx)(`path`,{d:`M8 4.5v5`,stroke:`white`,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,s.jsx)(`circle`,{cx:`8`,cy:`11.5`,r:`0.9`,fill:`white`})]})}const w=(0,l.cva)(t.n(`komc:flex komc:justify-center komc:items-center komc:absolute komc:z-50`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:opacity-0 komc:group-hover:opacity-100`),{variants:{direction:{left:`komc:-left-1 komc:cursor-ew-resize komc:top-1/2 komc:-translate-y-1/2`,right:`komc:-right-1 komc:cursor-ew-resize komc:top-1/2 komc:-translate-y-1/2`,top:`komc:-top-1 komc:cursor-ns-resize komc:left-1/2 komc:-translate-x-1/2`,bottom:`komc:-bottom-1 komc:cursor-ns-resize komc:left-1/2 komc:-translate-x-1/2`,"top-left":`komc:-top-1 komc:left-1 komc:cursor-nw-resize`,"top-right":`komc:-top-1 komc:right-1 komc:cursor-ne-resize`,"bottom-left":`komc:-bottom-1 komc:left-1 komc:cursor-sw-resize`,"bottom-right":`komc:-bottom-1 komc:right-1 komc:cursor-se-resize`}},defaultVariants:{direction:`left`}}),T=(0,l.cva)(`komc:flex komc:justify-center komc:items-center komc:group/resize`,{variants:{direction:{left:`komc:w-6 komc:h-14 komc:*:w-1.5 komc:*:h-full`,right:`komc:w-6 komc:h-14 komc:*:w-1.5 komc:*:h-full`,top:`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,bottom:`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"top-left":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"top-right":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"bottom-left":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"bottom-right":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`}},defaultVariants:{direction:`left`}});function E({directions:e,limitSize:t={width:!0,height:!1},...n}){let{getHandleProps:r,isResizing:a}=i.n({...n,limitSize:t});return(0,s.jsx)(s.Fragment,{children:e.map(e=>(0,s.jsx)(D,{direction:e,isResizing:a,...r(e)},e))})}const D=(0,a.memo)(function({direction:e,isResizing:n,style:r,...i}){return(0,s.jsx)(`div`,{className:t.n(w({direction:e}),n&&`komc:opacity-100`),children:(0,s.jsx)(`div`,{className:T({direction:e}),draggable:!1,onDragStart:e=>e.preventDefault(),style:r,...i,children:(0,s.jsx)(`div`,{className:`komc:border komc:border-white komc:bg-black/40 komc:rounded-full komc:group-hover/resize:bg-blue-500/50`})})})});exports.Editor=h,exports.EditorProvider=d,exports.NodeFrame=_,exports.NodeResizer=E,exports.NodeSize=b,exports.useEditorContext=f,exports.useOptionalEditor=m,exports.useRequiredEditor=p;
1
+ "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../src-Dz1mULYA.cjs`);const t=require(`../align-Dp4avXIm.cjs`),n=require(`../table-controls-CQmqnc4R.cjs`),r=require(`../table-resize-DI2Pf2Mi.cjs`);require(`../file-DeZ1OKdy.cjs`),require(`../api-client-BXH8Rm-J.cjs`),require(`../use-subset-image-BUurDItP.cjs`),require(`../skeleton-7P1IZD3G.cjs`),require(`../image-kIL2PjTS.cjs`),require(`../editor-DvLUotoh.cjs`),require(`../node-view-context-YTl_1gGD.cjs`),require(`../use-drag-resize-BO3zANv3.cjs`),require(`../node-resize-dantnBzP.cjs`),require(`../node-size-BQQGo7t7.cjs`);const i=require(`../subset-image-AaZA0RuB.cjs`),a=require(`../basic-image-Wl0IBgOX.cjs`),o=require(`../custom-heading-By14y5ug.cjs`);require(`../subset-image-P2NQM0-3.cjs`);const s=require(`../table-DmwOZtdl.cjs`),c=require(`../tabs-DiryrHZ7.cjs`);let l=require(`@tiptap/extension-text-style`),u=require(`@tiptap/extension-details`);u=e.t(u);let d=require(`@tiptap/extension-youtube`);d=e.t(d);let f=require(`@tiptap/starter-kit`);f=e.t(f);const p=(e,t)=>t?e.configure(t):e;var m=class{#e=[];#t=new Set;textset(e={}){return this.#t.has(`text`)?this:(this.#t.add(`text`),this.#e.push(l.TextStyleKit.configure({color:{types:[`textStyle`,`listItem`]},...e.textStyleKit}),f.default.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1},link:{openOnClick:!1,autolink:!0,defaultProtocol:`https`},heading:!1,...e.starterKit}),o.t.configure({levels:[1,2,3],...e.customHeading})),this)}mediaset(e={}){return this.#t.has(`media`)?this:(this.#t.add(`media`),this.#e.push(p(a.t,e.basicImage),p(i.r,e.subsetImage),d.default.configure({controls:!1,nocookie:!0,width:480,height:320,...e.youtube})),this)}tableset(e={}){return this.#t.has(`table`)?this:(this.#t.add(`table`),this.#e.push(s.t.configure({resizable:!0,...e.table}),p(s.i,e.tableRow),p(s.n,e.tableCell),p(s.r,e.tableHeader),p(r.t,e.tableResize),p(n.t,e.tableControls)),this)}layoutset(e={}){return this.#t.has(`layout`)?this:(this.#t.add(`layout`),this.#e.push(p(c.o,e.tabs),p(c.a,e.tabTitle),p(c.i,e.tabContent),t.t.configure({types:[`paragraph`,`heading`],defaultAlign:`left`,...e.align}),u.default.configure({persist:!0,HTMLAttributes:{class:`details`},...e.details}),p(u.DetailsContent,e.detailsContent),p(u.DetailsSummary,e.detailsSummary)),this)}otherset(e=[]){return this.#e.push(...e),this}init(){return[...this.#e]}};exports.Loader=m;
@@ -1,80 +1,58 @@
1
- import { o as UseDragResizeProps, r as ResizeDirection } from "../use-drag-resize-DEgcua2U.cjs";
2
- import * as react0 from "react";
3
- import React, { ComponentProps, ReactNode } from "react";
4
- import { Editor as Editor$1, UseEditorOptions } from "@tiptap/react";
5
- import * as class_variance_authority_types0 from "class-variance-authority/types";
6
- import { VariantProps } from "class-variance-authority";
7
- import * as react_jsx_runtime12 from "react/jsx-runtime";
8
- import { Editor as Editor$2 } from "@tiptap/core";
1
+ import { t as Align } from "../index-BxqkZ148.cjs";
2
+ import { n as TableControls } from "../index-Dhkwd0rJ.cjs";
3
+ import { t as TableResize } from "../index-D0Uuydfo.cjs";
4
+ import "../index-DvEtYdm4.cjs";
5
+ import "../index-BMZtFPh-.cjs";
6
+ import { t as BasicImage } from "../index-D-NPxMFr.cjs";
7
+ import { t as CustomHeading } from "../index-BT7Y7xkm.cjs";
8
+ import { r as SubsetImage } from "../index-BD2sHM7a.cjs";
9
+ import { i as TableRow, n as TableCell, r as TableHeader, t as Table } from "../index-DTtrJ-ei.cjs";
10
+ import { c as TabTitle, l as Tabs, s as TabContent } from "../index-DEolXbf5.cjs";
11
+ import { Extensions } from "@tiptap/core";
12
+ import { TextStyleKit } from "@tiptap/extension-text-style";
13
+ import Details, { DetailsContent, DetailsSummary } from "@tiptap/extension-details";
14
+ import Youtube from "@tiptap/extension-youtube";
15
+ import StarterKit from "@tiptap/starter-kit";
9
16
 
10
- //#region src/editor/editor.d.ts
11
- interface Props extends UseEditorOptions {
12
- plugins?: React.ReactNode;
13
- editorRef?: React.MutableRefObject<Editor$1 | null>;
14
- editorClassName?: string;
15
- value?: string | null;
16
- className?: string;
17
- onChange?: (value: string, context: Editor$1) => void;
17
+ //#region src/editor/loader.d.ts
18
+ type Config<T> = T extends {
19
+ configure: (options?: infer O) => unknown;
20
+ } ? O : never;
21
+ interface TextSetOptions {
22
+ textStyleKit?: Config<typeof TextStyleKit>;
23
+ starterKit?: Config<typeof StarterKit>;
24
+ customHeading?: Config<typeof CustomHeading>;
18
25
  }
19
- declare const Editor: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
20
- //#endregion
21
- //#region src/editor/node-frame.d.ts
22
- declare const classes: (props?: ({
23
- selected?: boolean | null | undefined;
24
- hoverable?: boolean | null | undefined;
25
- draggable?: boolean | null | undefined;
26
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
27
- type NodeFrameProps = ComponentProps<'div'> & VariantProps<typeof classes> & {
28
- radius?: number;
29
- overlay?: ReactNode;
30
- };
31
- declare const NodeFrame: react0.ForwardRefExoticComponent<Omit<NodeFrameProps, "ref"> & react0.RefAttributes<HTMLDivElement>>;
32
- //#endregion
33
- //#region src/editor/node-size.d.ts
34
- interface NodeSizeProps {
35
- width?: number;
36
- height?: number;
37
- maxWidth: number;
38
- edit?: boolean;
39
- onEditChange?: (edit: boolean) => void;
40
- onChange?: (size: {
41
- width: number;
42
- height: number;
43
- }) => void;
26
+ interface MediaSetOptions {
27
+ basicImage?: Config<typeof BasicImage>;
28
+ subsetImage?: Config<typeof SubsetImage>;
29
+ youtube?: Config<typeof Youtube>;
44
30
  }
45
- declare function NodeSize({
46
- width,
47
- height,
48
- maxWidth,
49
- edit,
50
- onEditChange,
51
- onChange
52
- }: NodeSizeProps): react_jsx_runtime12.JSX.Element;
53
- //#endregion
54
- //#region src/editor/node-resizer.d.ts
55
- interface NodeResizerProps extends UseDragResizeProps {
56
- directions: ResizeDirection[];
31
+ interface TableSetOptions {
32
+ table?: Config<typeof Table>;
33
+ tableRow?: Config<typeof TableRow>;
34
+ tableCell?: Config<typeof TableCell>;
35
+ tableHeader?: Config<typeof TableHeader>;
36
+ tableResize?: Config<typeof TableResize>;
37
+ tableControls?: Config<typeof TableControls>;
57
38
  }
58
- declare function NodeResizer({
59
- directions,
60
- limitSize,
61
- ...props
62
- }: NodeResizerProps): react_jsx_runtime12.JSX.Element;
63
- //#endregion
64
- //#region src/editor/provider.d.ts
65
- interface EditorContextValue {
66
- editor: Editor$2 | null;
39
+ interface LayoutSetOptions {
40
+ tabs?: Config<typeof Tabs>;
41
+ tabTitle?: Config<typeof TabTitle>;
42
+ tabContent?: Config<typeof TabContent>;
43
+ align?: Config<typeof Align>;
44
+ details?: Config<typeof Details>;
45
+ detailsContent?: Config<typeof DetailsContent>;
46
+ detailsSummary?: Config<typeof DetailsSummary>;
67
47
  }
68
- interface EditorProviderProps {
69
- editor: Editor$2 | null;
70
- children: ReactNode;
48
+ declare class Loader {
49
+ #private;
50
+ textset(options?: TextSetOptions): this;
51
+ mediaset(options?: MediaSetOptions): this;
52
+ tableset(options?: TableSetOptions): this;
53
+ layoutset(options?: LayoutSetOptions): this;
54
+ otherset(extensions?: Extensions): this;
55
+ init(): Extensions;
71
56
  }
72
- declare function EditorProvider({
73
- editor,
74
- children
75
- }: EditorProviderProps): react_jsx_runtime12.JSX.Element;
76
- declare function useEditorContext(): EditorContextValue;
77
- declare function useRequiredEditor(): Editor$2;
78
- declare function useOptionalEditor(): Editor$2 | null;
79
57
  //#endregion
80
- export { Editor, EditorProvider, NodeFrame, NodeFrameProps, NodeResizer, NodeResizerProps, NodeSize, NodeSizeProps, useEditorContext, useOptionalEditor, useRequiredEditor };
58
+ export { type LayoutSetOptions, Loader, type MediaSetOptions, type TableSetOptions, type TextSetOptions };