@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
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime44 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ui/sheet/sheet.d.ts
5
5
  type Direction = 'top' | 'bottom' | 'left' | 'right';
@@ -23,6 +23,6 @@ declare function Sheet({
23
23
  className,
24
24
  closeOnBackdropClick,
25
25
  zIndex
26
- }: SheetProps): react_jsx_runtime2.JSX.Element | null;
26
+ }: SheetProps): react_jsx_runtime44.JSX.Element | null;
27
27
  //#endregion
28
28
  export { Sheet, type SheetProps };
@@ -1 +1 @@
1
- "use client";import"../../src-CIMlbgv1.mjs";import"../../file-B-UJkabO.mjs";import"../../use-drag-resize-BdeLdulk.mjs";import{l as e}from"../../common-CWHkXe0F.mjs";import{t}from"../../use-dialog-stack-Crj8YWJl.mjs";import"../../api-client-C0sbSOQf.mjs";import"../../use-subset-image-Df2fCrtH.mjs";import n,{useCallback as r,useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import c from"clsx";import{cva as l}from"class-variance-authority";const u=l(c(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),d=l(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function f({isOpen:n,onClose:l,direction:f=`bottom`,size:p=`full`,children:m,className:h,closeOnBackdropClick:g=!0,zIndex:_=1001}){let v=e(n,300),[y,b]=a(!1);t(n,l),i(()=>{if(n&&v){let e=setTimeout(()=>b(!0),10);return()=>clearTimeout(e)}else n||b(!1)},[n,v]);let x=r(()=>{g&&l()},[g,l]);return v?s(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:_},children:[o(`button`,{type:`button`,"data-state":y?`open`:`closed`,className:c(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:x,"aria-label":`close sheet`}),o(`div`,{"data-state":y?`open`:`closed`,className:c(u({direction:f,className:h}),d({direction:f,size:p})),role:`dialog`,"aria-modal":`true`,children:m})]}):null}export{f as Sheet};
1
+ "use client";import{t as e}from"../../use-delay-unmount-_wzkutyv.mjs";import{t}from"../../use-dialog-stack-nI1GTvfl.mjs";import{cva as n}from"class-variance-authority";import r,{useCallback as i,useEffect as a,useState as o}from"react";import s from"clsx";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=n(s(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),d=n(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function f({isOpen:n,onClose:r,direction:f=`bottom`,size:p=`full`,children:m,className:h,closeOnBackdropClick:g=!0,zIndex:_=1001}){let v=e(n,300),[y,b]=o(!1);t(n,r),a(()=>{if(n&&v){let e=setTimeout(()=>b(!0),10);return()=>clearTimeout(e)}else n||b(!1)},[n,v]);let x=i(()=>{g&&r()},[g,r]);return v?l(`aside`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:_},children:[c(`button`,{type:`button`,"data-state":y?`open`:`closed`,className:s(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:x,"aria-label":`close sheet`}),c(`section`,{"data-state":y?`open`:`closed`,className:s(u({direction:f,className:h}),d({direction:f,size:p})),role:`dialog`,"aria-modal":`true`,children:m})]}):null}export{f as Sheet};
@@ -0,0 +1 @@
1
+ const e=require(`../../skeleton-7P1IZD3G.cjs`);exports.Skeleton=e.t;
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime46 from "react/jsx-runtime";
2
+ import { HTMLAttributes } from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+ import * as class_variance_authority_types7 from "class-variance-authority/types";
5
+
6
+ //#region src/ui/skeleton/skeleton.d.ts
7
+ declare const classes: (props?: ({
8
+ size?: "xs" | "sm" | "lg" | "md" | "xl" | "square" | "2xl" | "3xl" | "full" | null | undefined;
9
+ rounded?: "none" | "sm" | "lg" | "md" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
10
+ } & class_variance_authority_types7.ClassProp) | undefined) => string;
11
+ interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
12
+ width?: string | number;
13
+ height?: string | number;
14
+ size?: VariantProps<typeof classes>['size'];
15
+ rounded?: VariantProps<typeof classes>['rounded'];
16
+ }
17
+ declare function Skeleton({
18
+ size,
19
+ rounded,
20
+ width,
21
+ height,
22
+ className,
23
+ ...props
24
+ }: SkeletonProps): react_jsx_runtime46.JSX.Element;
25
+ //#endregion
26
+ export { Skeleton, type SkeletonProps };
@@ -0,0 +1,26 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { HTMLAttributes } from "react";
3
+ import * as react_jsx_runtime43 from "react/jsx-runtime";
4
+ import * as class_variance_authority_types8 from "class-variance-authority/types";
5
+
6
+ //#region src/ui/skeleton/skeleton.d.ts
7
+ declare const classes: (props?: ({
8
+ size?: "xs" | "sm" | "lg" | "md" | "xl" | "square" | "2xl" | "3xl" | "full" | null | undefined;
9
+ rounded?: "none" | "sm" | "lg" | "md" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
10
+ } & class_variance_authority_types8.ClassProp) | undefined) => string;
11
+ interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
12
+ width?: string | number;
13
+ height?: string | number;
14
+ size?: VariantProps<typeof classes>['size'];
15
+ rounded?: VariantProps<typeof classes>['rounded'];
16
+ }
17
+ declare function Skeleton({
18
+ size,
19
+ rounded,
20
+ width,
21
+ height,
22
+ className,
23
+ ...props
24
+ }: SkeletonProps): react_jsx_runtime43.JSX.Element;
25
+ //#endregion
26
+ export { Skeleton, type SkeletonProps };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../skeleton-D4Q9wT-o.mjs";export{e as Skeleton};
@@ -0,0 +1 @@
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`clsx`);t=e.t(t);let n=require(`react/jsx-runtime`);function r({children:e,className:r,...i}){return(0,n.jsx)(`span`,{...i,"data-komc":!0,"data-text":`${e}`,className:(0,t.default)(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,r),children:e})}exports.StableText=r;
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime47 from "react/jsx-runtime";
2
+ import { HTMLAttributes } from "react";
3
+
4
+ //#region src/ui/stable-text/stable-text.d.ts
5
+ declare function StableText({
6
+ children,
7
+ className,
8
+ ...props
9
+ }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
10
+ children: string | number;
11
+ }): react_jsx_runtime47.JSX.Element;
12
+ //#endregion
13
+ export { StableText };
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from "react";
2
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
3
+
4
+ //#region src/ui/stable-text/stable-text.d.ts
5
+ declare function StableText({
6
+ children,
7
+ className,
8
+ ...props
9
+ }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
10
+ children: string | number;
11
+ }): react_jsx_runtime36.JSX.Element;
12
+ //#endregion
13
+ export { StableText };
@@ -0,0 +1 @@
1
+ import e from"clsx";import{jsx as t}from"react/jsx-runtime";function n({children:n,className:r,...i}){return t(`span`,{...i,"data-komc":!0,"data-text":`${n}`,className:e(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,r),children:n})}export{n as StableText};
@@ -1 +1 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`react`);t=e.t(t);let n=require(`react/jsx-runtime`),r=require(`clsx`);r=e.t(r);let i=require(`class-variance-authority`);const a=(0,i.cva)((0,r.default)(`komc:inline-flex komc:items-center`),{variants:{placement:{top:`komc:flex-col-reverse komc:gap-y-2.5`,bottom:`komc:flex-col komc:gap-y-2.5`,start:`komc:flex-row-reverse komc:gap-x-2`,end:`komc:flex-row komc:gap-x-2`},disabled:{false:`komc:cursor-pointer`,true:`komc:cursor-default komc:opacity-50`},checked:{false:`komc:[&>button]:bg-gray-300 komc:[&_span]:translate-x-0.5`,true:`komc:[&>button]:bg-blue-500 komc:[&_span]:translate-x-4.5`}},defaultVariants:{placement:`end`,disabled:!1,checked:!1}}),o=t.default.forwardRef(({label:e,placement:i=`end`,checked:o=!1,disabled:s=!1,onChange:c},l)=>{let u=(0,t.useId)(),d=()=>{s||c?.(!o)};return(0,n.jsxs)(`div`,{"data-komc":!0,className:(0,r.default)(a({placement:i,disabled:s,checked:o})),children:[(0,n.jsx)(`button`,{ref:l,id:u,type:`button`,role:`switch`,disabled:s,className:`komc:flex komc:items-center komc:rounded-full komc:transition komc:w-10 komc:h-6 komc:cursor-pointer komc:disabled:cursor-default`,"aria-checked":o,onClick:d,children:(0,n.jsx)(`span`,{className:`komc:size-5 komc:rounded-full komc:bg-white komc:transition komc:shadow-xs`})}),e?(0,n.jsx)(`label`,{htmlFor:u,className:`komc:text-xs komc:font-medium komc:text-neutral-500`,children:e}):null]})});exports.Switch=o;
1
+ "use client";const e=require(`../../switch-BDdSF3lu.cjs`);exports.Switch=e.t;
@@ -1,16 +1,2 @@
1
- import React from "react";
2
-
3
- //#region src/ui/switch/switch.d.ts
4
- type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
5
- interface SwitchProps {
6
- label?: string;
7
- placement?: LabelPlacement;
8
- checked?: boolean;
9
- disabled?: boolean;
10
- onChange?(checked: boolean): void;
11
- }
12
- /** @deprecated Use `SwitchProps`. */
13
- type SwtichProps = SwitchProps;
14
- declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
15
- //#endregion
1
+ import { i as SwtichProps, n as Switch, r as SwitchProps, t as LabelPlacement } from "../../index-90Zl6qBK.cjs";
16
2
  export { LabelPlacement, Switch, SwitchProps, SwtichProps };
@@ -1,16 +1,2 @@
1
- import React from "react";
2
-
3
- //#region src/ui/switch/switch.d.ts
4
- type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
5
- interface SwitchProps {
6
- label?: string;
7
- placement?: LabelPlacement;
8
- checked?: boolean;
9
- disabled?: boolean;
10
- onChange?(checked: boolean): void;
11
- }
12
- /** @deprecated Use `SwitchProps`. */
13
- type SwtichProps = SwitchProps;
14
- declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
15
- //#endregion
1
+ import { i as SwtichProps, n as Switch, r as SwitchProps, t as LabelPlacement } from "../../index-CcpFy_mT.mjs";
16
2
  export { LabelPlacement, Switch, SwitchProps, SwtichProps };
@@ -1 +1 @@
1
- "use client";import e,{useId as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"clsx";import{cva as a}from"class-variance-authority";const o=a(i(`komc:inline-flex komc:items-center`),{variants:{placement:{top:`komc:flex-col-reverse komc:gap-y-2.5`,bottom:`komc:flex-col komc:gap-y-2.5`,start:`komc:flex-row-reverse komc:gap-x-2`,end:`komc:flex-row komc:gap-x-2`},disabled:{false:`komc:cursor-pointer`,true:`komc:cursor-default komc:opacity-50`},checked:{false:`komc:[&>button]:bg-gray-300 komc:[&_span]:translate-x-0.5`,true:`komc:[&>button]:bg-blue-500 komc:[&_span]:translate-x-4.5`}},defaultVariants:{placement:`end`,disabled:!1,checked:!1}}),s=e.forwardRef(({label:e,placement:a=`end`,checked:s=!1,disabled:c=!1,onChange:l},u)=>{let d=t(),f=()=>{c||l?.(!s)};return r(`div`,{"data-komc":!0,className:i(o({placement:a,disabled:c,checked:s})),children:[n(`button`,{ref:u,id:d,type:`button`,role:`switch`,disabled:c,className:`komc:flex komc:items-center komc:rounded-full komc:transition komc:w-10 komc:h-6 komc:cursor-pointer komc:disabled:cursor-default`,"aria-checked":s,onClick:f,children:n(`span`,{className:`komc:size-5 komc:rounded-full komc:bg-white komc:transition komc:shadow-xs`})}),e?n(`label`,{htmlFor:d,className:`komc:text-xs komc:font-medium komc:text-neutral-500`,children:e}):null]})});export{s as Switch};
1
+ "use client";import{t as e}from"../../switch-DTQt7BzY.mjs";export{e as Switch};
@@ -1 +1 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`);const t=require(`../../common-D4sUwkFd.cjs`);require(`../../file-5mweNdAM.cjs`),require(`../../use-drag-resize-DeDqPC4h.cjs`);const n=require(`../../common-B8HXyhZa.cjs`);require(`../../use-dialog-stack-YiLs-sNf.cjs`),require(`../../api-client-C3o2pO0q.cjs`),require(`../../use-subset-image-o_gmC1HL.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`clsx`);a=e.t(a);let o=require(`class-variance-authority`),s=require(`react-dom`);function c({children:e,setOpen:t}){return(0,i.jsx)(`div`,{"data-komc":!0,className:(0,a.default)(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const l=(0,o.cva)(t.n(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}}),u=(0,r.forwardRef)(({portal:e,children:t,className:n,placement:r,...a},o)=>(0,i.jsx)(`div`,{ref:o,"data-komc":!0,role:`tooltip`,className:l({portal:e,placement:r,className:n}),...a,children:t}));var d=u;const f=(0,o.cva)(t.n(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:t.n(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:t.n(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":t.n(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":t.n(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":t.n(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":t.n(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}}),p=({placement:e,className:t,offset:n,...a})=>{let o=(0,r.useMemo)(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return(0,i.jsx)(`div`,{className:f({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${o}`},...a})};var m=p;const h=24,g=2,_=180,v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:o,hiddenRef:c,containerRef:l}){let[u,f]=(0,r.useState)(!1),[p,h]=(0,r.useState)(e),[g,_]=(0,r.useState)({top:0,left:0}),[y,b]=(0,r.useState)({x:0,y:0});(0,r.useEffect)(()=>{f(!0)},[]);let x=(0,r.useCallback)(()=>{let t=l.current,n=c.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),s=r.top,u=window.innerHeight-r.bottom;o===`bottom`&&u<i.height&&s>=i.height?a=v(a,`top`):o===`top`&&s<i.height&&u>=i.height&&(a=v(a,`bottom`)),h(a);let[d,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(d){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let g=m,y=window.innerWidth;g+i.width>y-4&&(g=y-i.width-4),g<4&&(g=4),_({top:p,left:g}),b({x:m-g,y:0})},[e,l,c]);return(0,r.useEffect)(()=>{if(!u||!o)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;x();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||x(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,s=0,c=``,d=()=>{if(e||a>=180)return;let t=l.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,x())}s<2&&(a+=1,n=requestAnimationFrame(d))};return n=requestAnimationFrame(d),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[u,o,x,l]),u?(0,s.createPortal)((0,i.jsxs)(d,{portal:!0,"data-komc":!0,placement:p,className:(0,a.default)(t,o?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...g},children:[(0,i.jsx)(`span`,{children:n}),(0,i.jsx)(m,{placement:p,offset:y})]}),document.body):null}const b=(0,r.forwardRef)(({children:e,content:t,defaultOpen:o=!1,className:s,placement:l=`top`})=>{let[u,f]=(0,r.useState)(o),p=(0,r.useRef)(null),m=(0,r.useRef)(null);return n.a({ref:p,setOpen:f}),(0,i.jsxs)(`div`,{ref:p,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[(0,i.jsx)(c,{setOpen:f,children:e}),(0,i.jsx)(y,{placement:l,className:s,open:u,content:t,hiddenRef:m,containerRef:p}),(0,i.jsx)(d,{ref:m,role:`presentation`,"aria-hidden":`true`,placement:l,className:(0,a.default)(`komc:opacity-0 komc:invisible`,s),children:(0,i.jsx)(`span`,{children:t})})]})});var x=b;exports.Tooltip=x;
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../use-outside-click-BS2UOXoV.cjs`);let n=require(`class-variance-authority`),r=require(`react`),i=require(`clsx`);i=e.t(i);let a=require(`react/jsx-runtime`),o=require(`react-dom`);function s({children:e,setOpen:t}){return(0,a.jsx)(`div`,{"data-komc":!0,className:(0,i.default)(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const c=(0,n.cva)((0,i.default)(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}}),l=(0,r.forwardRef)(({portal:e,children:t,className:n,placement:r,...i},o)=>(0,a.jsx)(`div`,{ref:o,"data-komc":!0,role:`tooltip`,className:c({portal:e,placement:r,className:n}),...i,children:t}));var u=l;const d=(0,n.cva)((0,i.default)(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:(0,i.default)(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:(0,i.default)(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":(0,i.default)(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":(0,i.default)(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":(0,i.default)(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":(0,i.default)(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}}),f=({placement:e,className:t,offset:n,...i})=>{let o=(0,r.useMemo)(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return(0,a.jsx)(`div`,{className:d({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${o}`},...i})};var p=f;const m=24,h=2,g=180,_=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function v({placement:e,className:t,content:n,open:s,hiddenRef:c,containerRef:l}){let[d,f]=(0,r.useState)(!1),[m,h]=(0,r.useState)(e),[g,v]=(0,r.useState)({top:0,left:0}),[y,b]=(0,r.useState)({x:0,y:0});(0,r.useEffect)(()=>{f(!0)},[]);let x=(0,r.useCallback)(()=>{let t=l.current,n=c.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),s=r.top,u=window.innerHeight-r.bottom;o===`bottom`&&u<i.height&&s>=i.height?a=_(a,`top`):o===`top`&&s<i.height&&u>=i.height&&(a=_(a,`bottom`)),h(a);let[d,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(d){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let g=m,y=window.innerWidth;g+i.width>y-4&&(g=y-i.width-4),g<4&&(g=4),v({top:p,left:g}),b({x:m-g,y:0})},[e,l,c]);return(0,r.useEffect)(()=>{if(!d||!s)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;x();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||x(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,o=0,c=``,u=()=>{if(e||a>=180)return;let t=l.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?o+=1:(o=0,c=n,x())}o<2&&(a+=1,n=requestAnimationFrame(u))};return n=requestAnimationFrame(u),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[d,s,x,l]),d?(0,o.createPortal)((0,a.jsxs)(u,{portal:!0,"data-komc":!0,placement:m,className:(0,i.default)(t,s?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...g},children:[(0,a.jsx)(`span`,{children:n}),(0,a.jsx)(p,{placement:m,offset:y})]}),document.body):null}const y=(0,r.forwardRef)(({children:e,content:n,defaultOpen:o=!1,className:c,placement:l=`top`})=>{let[d,f]=(0,r.useState)(o),p=(0,r.useRef)(null),m=(0,r.useRef)(null);return t.t({ref:p,setOpen:f}),(0,a.jsxs)(`div`,{ref:p,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[(0,a.jsx)(s,{setOpen:f,children:e}),(0,a.jsx)(v,{placement:l,className:c,open:d,content:n,hiddenRef:m,containerRef:p}),(0,a.jsx)(u,{ref:m,role:`presentation`,"aria-hidden":`true`,placement:l,className:(0,i.default)(`komc:opacity-0 komc:invisible`,c),children:(0,a.jsx)(`span`,{children:n})})]})});var b=y;exports.Tooltip=b;
@@ -1,4 +1,4 @@
1
- import * as react10 from "react";
1
+ import * as react5 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/ui/tooltip/tooltip-container.d.ts
@@ -11,6 +11,6 @@ interface TooltipContainerProps extends HTMLAttributes<HTMLDivElement> {
11
11
  placement?: TooltipPlacement;
12
12
  defaultOpen?: boolean;
13
13
  }
14
- declare const TooltipContainer: react10.ForwardRefExoticComponent<TooltipContainerProps & react10.RefAttributes<HTMLDivElement>>;
14
+ declare const TooltipContainer: react5.ForwardRefExoticComponent<TooltipContainerProps & react5.RefAttributes<HTMLDivElement>>;
15
15
  //#endregion
16
16
  export { TooltipContainer as Tooltip, type TooltipContainerProps as TooltipProps };
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react23 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/ui/tooltip/tooltip-container.d.ts
@@ -11,6 +11,6 @@ interface TooltipContainerProps extends HTMLAttributes<HTMLDivElement> {
11
11
  placement?: TooltipPlacement;
12
12
  defaultOpen?: boolean;
13
13
  }
14
- declare const TooltipContainer: react0.ForwardRefExoticComponent<TooltipContainerProps & react0.RefAttributes<HTMLDivElement>>;
14
+ declare const TooltipContainer: react23.ForwardRefExoticComponent<TooltipContainerProps & react23.RefAttributes<HTMLDivElement>>;
15
15
  //#endregion
16
16
  export { TooltipContainer as Tooltip, type TooltipContainerProps as TooltipProps };
@@ -1 +1 @@
1
- "use client";import"../../src-CIMlbgv1.mjs";import{n as e}from"../../common-ZUMpASnc.mjs";import"../../file-B-UJkabO.mjs";import"../../use-drag-resize-BdeLdulk.mjs";import{a as t}from"../../common-CWHkXe0F.mjs";import"../../use-dialog-stack-Crj8YWJl.mjs";import"../../api-client-C0sbSOQf.mjs";import"../../use-subset-image-Df2fCrtH.mjs";import{forwardRef as n,useCallback as r,useEffect as i,useMemo as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import u from"clsx";import{cva as d}from"class-variance-authority";import{createPortal as f}from"react-dom";function p({children:e,setOpen:t}){return c(`div`,{"data-komc":!0,className:u(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const m=d(e(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}});var h=n(({portal:e,children:t,className:n,placement:r,...i},a)=>c(`div`,{ref:a,"data-komc":!0,role:`tooltip`,className:m({portal:e,placement:r,className:n}),...i,children:t}));const g=d(e(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:e(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:e(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":e(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":e(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":e(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":e(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}});var _=({placement:e,className:t,offset:n,...r})=>{let i=a(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return c(`div`,{className:g({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${i}`},...r})};const v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:a,hiddenRef:o,containerRef:d}){let[p,m]=s(!1),[g,y]=s(e),[b,x]=s({top:0,left:0}),[S,C]=s({x:0,y:0});i(()=>{m(!0)},[]);let w=r(()=>{let t=d.current,n=o.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[s]=a.split(`-`),c=r.top,l=window.innerHeight-r.bottom;s===`bottom`&&l<i.height&&c>=i.height?a=v(a,`top`):s===`top`&&c<i.height&&l>=i.height&&(a=v(a,`bottom`)),y(a);let[u,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(u){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let h=m,g=window.innerWidth;h+i.width>g-4&&(h=g-i.width-4),h<4&&(h=4),x({top:p,left:h}),C({x:m-h,y:0})},[e,d,o]);return i(()=>{if(!p||!a)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;w();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||w(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let o=0,s=0,c=``,l=()=>{if(e||o>=180)return;let t=d.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,w())}s<2&&(o+=1,n=requestAnimationFrame(l))};return n=requestAnimationFrame(l),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[p,a,w,d]),p?f(l(h,{portal:!0,"data-komc":!0,placement:g,className:u(t,a?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...b},children:[c(`span`,{children:n}),c(_,{placement:g,offset:S})]}),document.body):null}var b=n(({children:e,content:n,defaultOpen:r=!1,className:i,placement:a=`top`})=>{let[d,f]=s(r),m=o(null),g=o(null);return t({ref:m,setOpen:f}),l(`div`,{ref:m,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[c(p,{setOpen:f,children:e}),c(y,{placement:a,className:i,open:d,content:n,hiddenRef:g,containerRef:m}),c(h,{ref:g,role:`presentation`,"aria-hidden":`true`,placement:a,className:u(`komc:opacity-0 komc:invisible`,i),children:c(`span`,{children:n})})]})});export{b as Tooltip};
1
+ "use client";import{t as e}from"../../use-outside-click-tsaJo3cz.mjs";import{cva as t}from"class-variance-authority";import{forwardRef as n,useCallback as r,useEffect as i,useMemo as a,useRef as o,useState as s}from"react";import c from"clsx";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{createPortal as d}from"react-dom";function f({children:e,setOpen:t}){return l(`div`,{"data-komc":!0,className:c(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const p=t(c(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}});var m=n(({portal:e,children:t,className:n,placement:r,...i},a)=>l(`div`,{ref:a,"data-komc":!0,role:`tooltip`,className:p({portal:e,placement:r,className:n}),...i,children:t}));const h=t(c(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:c(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:c(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":c(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":c(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":c(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":c(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}});var g=({placement:e,className:t,offset:n,...r})=>{let i=a(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return l(`div`,{className:h({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${i}`},...r})};const _=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function v({placement:e,className:t,content:n,open:a,hiddenRef:o,containerRef:f}){let[p,h]=s(!1),[v,y]=s(e),[b,x]=s({top:0,left:0}),[S,C]=s({x:0,y:0});i(()=>{h(!0)},[]);let w=r(()=>{let t=f.current,n=o.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[s]=a.split(`-`),c=r.top,l=window.innerHeight-r.bottom;s===`bottom`&&l<i.height&&c>=i.height?a=_(a,`top`):s===`top`&&c<i.height&&l>=i.height&&(a=_(a,`bottom`)),y(a);let[u,d]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(u){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(d){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let h=m,g=window.innerWidth;h+i.width>g-4&&(h=g-i.width-4),h<4&&(h=4),x({top:p,left:h}),C({x:m-h,y:0})},[e,f,o]);return i(()=>{if(!p||!a)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;w();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||w(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let o=0,s=0,c=``,l=()=>{if(e||o>=180)return;let t=f.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,w())}s<2&&(o+=1,n=requestAnimationFrame(l))};return n=requestAnimationFrame(l),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[p,a,w,f]),p?d(u(m,{portal:!0,"data-komc":!0,placement:v,className:c(t,a?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...b},children:[l(`span`,{children:n}),l(g,{placement:v,offset:S})]}),document.body):null}var y=n(({children:t,content:n,defaultOpen:r=!1,className:i,placement:a=`top`})=>{let[d,p]=s(r),h=o(null),g=o(null);return e({ref:h,setOpen:p}),u(`div`,{ref:h,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[l(f,{setOpen:p,children:t}),l(v,{placement:a,className:i,open:d,content:n,hiddenRef:g,containerRef:h}),l(m,{ref:g,role:`presentation`,"aria-hidden":`true`,placement:a,className:c(`komc:opacity-0 komc:invisible`,i),children:l(`span`,{children:n})})]})});export{y as Tooltip};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);function n(e,n){let[r,i]=(0,t.useState)(e);return(0,t.useEffect)(()=>{if(e){i(!0);return}let t=setTimeout(()=>i(!1),n);return()=>clearTimeout(t)},[e,n]),e||r}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -0,0 +1 @@
1
+ import{useEffect as e,useState as t}from"react";function n(n,r){let[i,a]=t(n);return e(()=>{if(n){a(!0);return}let e=setTimeout(()=>a(!1),r);return()=>clearTimeout(e)},[n,r]),n||i}export{n as t};
@@ -0,0 +1 @@
1
+ import{useCallback as e,useEffect as t,useRef as n}from"react";const r={DEFAULT_WIDTH:200,DEFAULT_HEIGHT:100},i=e=>({x:`touches`in e?e.touches[0].screenX:e.screenX,y:`touches`in e?e.touches[0].screenY:e.screenY}),a=(e,t,n,r)=>{let i={...t};switch(e){case`top-left`:i.width=t.width-n,i.height=t.height-r;break;case`top-right`:i.width=t.width+n,i.height=t.height-r;break;case`bottom-left`:i.width=t.width-n,i.height=t.height+r;break;case`bottom-right`:i.width=t.width+n,i.height=t.height+r;break;case`left`:i.width=t.width-n;break;case`right`:i.width=t.width+n;break;case`top`:i.height=t.height-r;break;case`bottom`:i.height=t.height+r;break}return i},o=(e,t,n,r)=>{let i={...e};if(r?.width||r?.height){let e=n?.width?Math.min(n.width,t.width):t.width,a=n?.height?Math.min(n.height,t.height):t.height;r.width&&(i.width=Math.min(i.width,e)),r.height&&(i.height=Math.min(i.height,a))}return i};function s(e,t,n){return t!==void 0&&(e=Math.max(e,t)),n!==void 0&&(e=Math.min(e,n)),e}function c(e,t,n){return{width:n?.width===void 0?e&&t.width?e.width:void 0:n.width,height:n?.height===void 0?e&&t.height?e.height:void 0:n.height}}function l(e,t,n,r){return[`left`,`right`].includes(e||``)?{width:t,height:Math.round(t/r)}:[`top`,`bottom`].includes(e||``)?{width:Math.round(n*r),height:n}:t/r<=n?{width:t,height:Math.round(t/r)}:{width:Math.round(n*r),height:n}}function u({boundaryRef:u,size:d,keepAspectRatio:f=!0,minSize:p={width:r.DEFAULT_WIDTH,height:r.DEFAULT_HEIGHT},maxSize:m,limitSize:h={width:!0,height:!0},direction:g=`top`,onResize:_}){let v=n(null),y=n(null);t(()=>()=>{v.current&&(document.removeEventListener(`mousemove`,v.current),document.removeEventListener(`touchmove`,v.current)),y.current&&(document.removeEventListener(`mouseup`,y.current),document.removeEventListener(`touchend`,y.current))},[]);let b=e(e=>{let t={width:Math.ceil(Math.max(p.width,Math.min(e.width,m?.width??1/0))),height:Math.ceil(Math.max(p.height,Math.min(e.height,m?.height??1/0)))};_?.(t)},[_,p,m]),x=e((e,t)=>{`touches`in e&&e.preventDefault();let{startX:n,startY:r,startSize:d,direction:g}=t,{x:_,y:v}=i(e),y=a(g,d,_-n,v-r);if(f){let e=d.width/d.height,t=u.current?.getBoundingClientRect(),{width:n,height:r}=c(t,h,m),{width:i,height:a}=l(g,s(y.width,p.width,n),s(y.height,p.height,r),e);if(i<p.width||a<p.height)return;y={width:i,height:a}}if(h.width||h.height){let e=u.current?.getBoundingClientRect();e&&(y=o(y,e,m,h))}b(y)},[h,m,b,f,p]),S=e((e,t)=>{e.preventDefault(),e.stopPropagation();let n={startX:`touches`in e?e.touches[0].screenX:e.screenX,startY:`touches`in e?e.touches[0].screenY:e.screenY,startSize:{...d},direction:t};v.current&&(document.removeEventListener(`mousemove`,v.current),document.removeEventListener(`touchmove`,v.current)),y.current&&(document.removeEventListener(`mouseup`,y.current),document.removeEventListener(`touchend`,y.current)),v.current=e=>x(e,n),y.current=()=>{v.current&&=(document.removeEventListener(`mousemove`,v.current),document.removeEventListener(`touchmove`,v.current),null),y.current&&=(document.removeEventListener(`mouseup`,y.current),document.removeEventListener(`touchend`,y.current),null)},document.addEventListener(`mousemove`,v.current),document.addEventListener(`touchmove`,v.current,{passive:!1}),document.addEventListener(`mouseup`,y.current,{once:!0}),document.addEventListener(`touchend`,y.current,{once:!0})},[d,x]);return{onMouseDown:e(e=>{S(e,g)},[S,g]),onTouchStart:e(e=>{S(e,g)},[S,g])}}export{u as n,r as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);const n={DEFAULT_WIDTH:200,DEFAULT_HEIGHT:100},r=e=>({x:`touches`in e?e.touches[0].screenX:e.screenX,y:`touches`in e?e.touches[0].screenY:e.screenY}),i=(e,t,n,r)=>{let i={...t};switch(e){case`top-left`:i.width=t.width-n,i.height=t.height-r;break;case`top-right`:i.width=t.width+n,i.height=t.height-r;break;case`bottom-left`:i.width=t.width-n,i.height=t.height+r;break;case`bottom-right`:i.width=t.width+n,i.height=t.height+r;break;case`left`:i.width=t.width-n;break;case`right`:i.width=t.width+n;break;case`top`:i.height=t.height-r;break;case`bottom`:i.height=t.height+r;break}return i},a=(e,t,n,r)=>{let i={...e};if(r?.width||r?.height){let e=n?.width?Math.min(n.width,t.width):t.width,a=n?.height?Math.min(n.height,t.height):t.height;r.width&&(i.width=Math.min(i.width,e)),r.height&&(i.height=Math.min(i.height,a))}return i};function o(e,t,n){return t!==void 0&&(e=Math.max(e,t)),n!==void 0&&(e=Math.min(e,n)),e}function s(e,t,n){return{width:n?.width===void 0?e&&t.width?e.width:void 0:n.width,height:n?.height===void 0?e&&t.height?e.height:void 0:n.height}}function c(e,t,n,r){return[`left`,`right`].includes(e||``)?{width:t,height:Math.round(t/r)}:[`top`,`bottom`].includes(e||``)?{width:Math.round(n*r),height:n}:t/r<=n?{width:t,height:Math.round(t/r)}:{width:Math.round(n*r),height:n}}function l({boundaryRef:e,size:l,keepAspectRatio:u=!0,minSize:d={width:n.DEFAULT_WIDTH,height:n.DEFAULT_HEIGHT},maxSize:f,limitSize:p={width:!0,height:!0},direction:m=`top`,onResize:h}){let g=(0,t.useRef)(null),_=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{g.current&&(document.removeEventListener(`mousemove`,g.current),document.removeEventListener(`touchmove`,g.current)),_.current&&(document.removeEventListener(`mouseup`,_.current),document.removeEventListener(`touchend`,_.current))},[]);let v=(0,t.useCallback)(e=>{let t={width:Math.ceil(Math.max(d.width,Math.min(e.width,f?.width??1/0))),height:Math.ceil(Math.max(d.height,Math.min(e.height,f?.height??1/0)))};h?.(t)},[h,d,f]),y=(0,t.useCallback)((t,n)=>{`touches`in t&&t.preventDefault();let{startX:l,startY:m,startSize:h,direction:g}=n,{x:_,y}=r(t),b=i(g,h,_-l,y-m);if(u){let t=h.width/h.height,n=e.current?.getBoundingClientRect(),{width:r,height:i}=s(n,p,f),{width:a,height:l}=c(g,o(b.width,d.width,r),o(b.height,d.height,i),t);if(a<d.width||l<d.height)return;b={width:a,height:l}}if(p.width||p.height){let t=e.current?.getBoundingClientRect();t&&(b=a(b,t,f,p))}v(b)},[p,f,v,u,d]),b=(0,t.useCallback)((e,t)=>{e.preventDefault(),e.stopPropagation();let n={startX:`touches`in e?e.touches[0].screenX:e.screenX,startY:`touches`in e?e.touches[0].screenY:e.screenY,startSize:{...l},direction:t};g.current&&(document.removeEventListener(`mousemove`,g.current),document.removeEventListener(`touchmove`,g.current)),_.current&&(document.removeEventListener(`mouseup`,_.current),document.removeEventListener(`touchend`,_.current)),g.current=e=>y(e,n),_.current=()=>{g.current&&=(document.removeEventListener(`mousemove`,g.current),document.removeEventListener(`touchmove`,g.current),null),_.current&&=(document.removeEventListener(`mouseup`,_.current),document.removeEventListener(`touchend`,_.current),null)},document.addEventListener(`mousemove`,g.current),document.addEventListener(`touchmove`,g.current,{passive:!1}),document.addEventListener(`mouseup`,_.current,{once:!0}),document.addEventListener(`touchend`,_.current,{once:!0})},[l,y]);return{onMouseDown:(0,t.useCallback)(e=>{b(e,m)},[b,m]),onTouchStart:(0,t.useCallback)(e=>{b(e,m)},[b,m])}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);function n({ref:e,setOpen:n}){let r=(0,t.useCallback)(t=>{e.current?.contains(t.target)||n(!1)},[e,n]);(0,t.useEffect)(()=>(document.addEventListener(`mousedown`,r),document.addEventListener(`touchstart`,r),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`touchstart`,r)}),[r])}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -0,0 +1 @@
1
+ import{useCallback as e,useEffect as t}from"react";function n({ref:n,setOpen:r}){let i=e(e=>{n.current?.contains(e.target)||r(!1)},[n,r]);t(()=>(document.addEventListener(`mousedown`,i),document.addEventListener(`touchstart`,i),()=>{document.removeEventListener(`mousedown`,i),document.removeEventListener(`touchstart`,i)}),[i])}export{n as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,o as n}from"./file-CapBKYce.mjs";import{n as r}from"./api-client-xK3Ua3Gr.mjs";import{useCallback as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";const l=[12,120,240,300,406,512,612,768,960,1024,1280,1440,1560,1920,2560,3840];function u({ref:u,src:d,forceLoad:f=!1,folder:p=`media`,fallbackSrc:m,origin:h,originalWidth:g,loading:_=`lazy`,...v}){let y=r(),[b,x]=c(0),[S,C]=c(f||!d),[w,T]=c(!d),E=s(null),D=s(null),O=i(e=>{E.current=e,typeof u==`function`?u(e):u&&(u.current=e)},[u]),k=i((e,t)=>{if(!e)return``;let n=e.startsWith(`/`)?e.slice(1):e;return t===`static`?y.media.cdnStatic(n):y.media.cdnMedia(n)},[y]),A=o(()=>l.filter(e=>e<=g),[g]),j=o(()=>t(d)?d:k(d,p),[k,d,p]),M=o(()=>{if(h||!e(d)||A.length===0)return;let{filenameWithoutExtension:t,directory:r}=n(d,p);if(v.width){let e=A.find(e=>e>=v.width)??A[A.length-1],n=e*2,i=A.find(e=>e>=n)??A[A.length-1];return`${k(`${r}/subsets/w${e}/${t}.webp`,p)} 1x,${k(`${r}/subsets/w${i}/${t}.webp`,p)} 2x`}let i=``;for(let e of A)i+=`${k(`${r}/subsets/w${e}/${t}.webp`,p)} ${e}w, `;return i.trim()},[A,k,p,h,d,v.width]),N=i((e,t)=>{let{filenameWithoutExtension:r,directory:i}=n(e,t);return`${k(`${i}/subsets/origin/${r}.webp`,t)}`},[k]),P=o(()=>{if(d)return`${N(d,p)} 1x`},[d,p,N]),F=i(e=>{x(t=>t>=2?(e&&(D.current=e),3):t+1)},[]),I=()=>{if(b===0)return M;if(b===1)return P},L=b>=3?m:j,R=b===0?v.sizes:void 0,z=b>0?`eager`:_;a(()=>{b<3||T(!0)},[b]),a(()=>{let e=E.current;if(!e||w)return;if(e.complete&&e.naturalWidth===0&&e.getAttribute(`src`)){F();return}if(e.complete&&e.naturalWidth>0){C(!0);return}let t=()=>{e.naturalWidth>0&&C(!0)};return e.addEventListener(`load`,t),()=>e.removeEventListener(`load`,t)},[w,b,F]);let{fill:B,...V}=v;return{ref:O,isLoad:S,isError:w,imageProps:{...V,src:L,srcSet:I(),sizes:R,loading:z,onError:w?void 0:F}}}export{u as n,l as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./file-DeZ1OKdy.cjs`),n=require(`./api-client-BXH8Rm-J.cjs`);let r=require(`react`);const i=[12,120,240,300,406,512,612,768,960,1024,1280,1440,1560,1920,2560,3840];function a({ref:e,src:a,forceLoad:o=!1,folder:s=`media`,fallbackSrc:c,origin:l,originalWidth:u,loading:d=`lazy`,...f}){let p=n.n(),[m,h]=(0,r.useState)(0),[g,_]=(0,r.useState)(o||!a),[v,y]=(0,r.useState)(!a),b=(0,r.useRef)(null),x=(0,r.useRef)(null),S=(0,r.useCallback)(t=>{b.current=t,typeof e==`function`?e(t):e&&(e.current=t)},[e]),C=(0,r.useCallback)((e,t)=>{if(!e)return``;let n=e.startsWith(`/`)?e.slice(1):e;return t===`static`?p.media.cdnStatic(n):p.media.cdnMedia(n)},[p]),w=(0,r.useMemo)(()=>i.filter(e=>e<=u),[u]),T=(0,r.useMemo)(()=>t.i(a)?a:C(a,s),[C,a,s]),E=(0,r.useMemo)(()=>{if(l||!t.a(a)||w.length===0)return;let{filenameWithoutExtension:e,directory:n}=t.o(a,s);if(f.width){let t=w.find(e=>e>=f.width)??w[w.length-1],r=t*2,i=w.find(e=>e>=r)??w[w.length-1];return`${C(`${n}/subsets/w${t}/${e}.webp`,s)} 1x,${C(`${n}/subsets/w${i}/${e}.webp`,s)} 2x`}let r=``;for(let t of w)r+=`${C(`${n}/subsets/w${t}/${e}.webp`,s)} ${t}w, `;return r.trim()},[w,C,s,l,a,f.width]),D=(0,r.useCallback)((e,n)=>{let{filenameWithoutExtension:r,directory:i}=t.o(e,n);return`${C(`${i}/subsets/origin/${r}.webp`,n)}`},[C]),O=(0,r.useMemo)(()=>{if(a)return`${D(a,s)} 1x`},[a,s,D]),k=(0,r.useCallback)(e=>{h(t=>t>=2?(e&&(x.current=e),3):t+1)},[]),A=()=>{if(m===0)return E;if(m===1)return O},j=m>=3?c:T,M=m===0?f.sizes:void 0,N=m>0?`eager`:d;(0,r.useEffect)(()=>{m<3||y(!0)},[m]),(0,r.useEffect)(()=>{let e=b.current;if(!e||v)return;if(e.complete&&e.naturalWidth===0&&e.getAttribute(`src`)){k();return}if(e.complete&&e.naturalWidth>0){_(!0);return}let t=()=>{e.naturalWidth>0&&_(!0)};return e.addEventListener(`load`,t),()=>e.removeEventListener(`load`,t)},[v,m,k]);let{fill:P,...F}=f;return{ref:S,isLoad:g,isError:v,imageProps:{...F,src:j,srcSet:A(),sizes:M,loading:N,onError:v?void 0:k}}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -0,0 +1 @@
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`js-cookie`);t=e.t(t);let n=require(`lodash-es`);const r=e=>t.default.get(e),i=(e,n,r)=>t.default.set(e,n,r),a=()=>typeof window>`u`?[]:JSON.parse(localStorage.getItem(`search-history`)||`[]`),o=e=>{let t=(0,n.uniq)([e,...a()]).slice(0,10);return localStorage.setItem(`search-history`,JSON.stringify(t)),t},s=e=>{let t=a();return t.splice(e,1),localStorage.setItem(`search-history`,JSON.stringify(t)),t},c=()=>{localStorage.setItem(`search-history`,JSON.stringify([]))},l=e=>e.endsWith(`/search`),u=e=>l(e)?e:`${e}/search`.replace(`//`,`/`),d=e=>e.replace(`/search`,``).replace(`//`,`/`),f=(e,t)=>{let n=new URLSearchParams(e);return n.delete(t),Object.fromEntries(n)},p=e=>{if(!e)return``;try{let t=new URL(e);if(t.hostname===`youtu.be`)return t.pathname.slice(1).split(`?`)[0];let n=t.searchParams.get(`v`);if(n)return n;let r=t.pathname.match(/\/(?:embed|shorts|v)\/([^/?]+)/);if(r)return r[1]}catch{let t=e.match(/(?:v=|youtu\.be\/|embed\/|shorts\/)([^&?/\s]{11})/);if(t)return t[1]}return``};exports.appendSearchPath=u,exports.clearQueryByKey=f,exports.clearSearchPath=d,exports.deleteAllSearchHistory=c,exports.deleteSearchHistory=s,exports.getCookie=r,exports.getSearchHistory=a,exports.getYoutubeVideoId=p,exports.insertSearchHistory=o,exports.isSearchPage=l,exports.setCookies=i;
@@ -1,4 +1,4 @@
1
- //#region src/util/browser.d.ts
1
+ //#region src/util/browser/index.d.ts
2
2
  declare const getCookie: (key: string) => string | undefined;
3
3
  declare const setCookies: (key: string, value: string, options?: Cookies.CookieAttributes) => string | undefined;
4
4
  declare const getSearchHistory: () => string[];
@@ -1,4 +1,4 @@
1
- //#region src/util/browser.d.ts
1
+ //#region src/util/browser/index.d.ts
2
2
  declare const getCookie: (key: string) => string | undefined;
3
3
  declare const setCookies: (key: string, value: string, options?: Cookies.CookieAttributes) => string | undefined;
4
4
  declare const getSearchHistory: () => string[];
@@ -0,0 +1 @@
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`query-string`);t=e.t(t);let n=require(`lodash-es`),r=require(`slug`);r=e.t(r),r.default.extend({'"':`-`,"”":`-`,"“":`-`,"•":`----`}),r.default.setLocale(`en`);const i=(e,n=[])=>{if(typeof window>`u`)return``;let{hash:r,search:i}=window.location,a=t.default.parse(i);Object.keys(e).forEach(t=>{e[t]?a[t]=e[t]:delete a[t]});let o={...a};return Object.keys(a).forEach(e=>{n.includes(e)&&delete o[e]}),`?${t.default.stringify(o,{encode:!0})}${r}`},a=(e,t)=>{let n=0;return e%t===0&&(n=e/t),n=Math.ceil(e/t),n<1&&(n=1),n},o=e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},s=e=>{let t=document.getElementById(`naverMapLib`);if(!t){let t=document.createElement(`script`);t.src=`https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=ecs1pyoo9b`,t.id=`naverMapLib`,document.body.appendChild(t),t.onload=()=>{e&&e()}}t&&e&&e()},c=(e,...t)=>{let n=`${e}`;return t.forEach(e=>{e&&(n=`${n}-${(0,r.default)(e)}`)}),n},l=e=>{let t=[];e.i18n?.forEach(e=>{e.locale===`en`&&e.name&&t.push(e.name)});let n=e.series?.i18n.find(e=>e.locale===`en`);return n?.name&&t.push(n.name.toLowerCase()),e.stockNo&&t.push(e.stockNo[0]),c(e.id,...t)},u=e=>{let t=e;return t.length>0?t[0].trim():``},d=(e=`en`,t,n)=>{if(!t||!n||t.length<=0)return``;let r=[...t].sort(p);if(e){let t=r.findIndex(t=>t.locale===e);if(t!==-1){let e=r.splice(t,1);r.unshift(e[0])}}for(let e of r){let t=e[n];if(!(Array.isArray(t)&&t.length===0)&&t)return t}return``},f=(e,t,n)=>{if(!t||!n||t.length<=0)return``;let r=[...t].sort(p);if(e){let t=r.findIndex(t=>t.locale===e);if(t!==-1){let e=r.splice(t,1);r.unshift(e[0])}}let i=``;for(let e of r){let t=e[n];if(t){i=String(t);break}}return i},p=(e,t)=>e.priority<t.priority?-1:e.priority>t.priority?1:0,m=(e,t,n)=>{if(e){let r;r=Array.isArray(e)?e[0]:e;try{return t(r)}catch{return n}}return n},h=(e,t)=>{let{[t]:n,...r}=e;return r},g=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))),_=(e,t)=>(0,n.intersection)(e,t).length>0,v=e=>e.split(`:`).pop()?.split(`.`).pop(),y=(e,...t)=>[e,t].flat().join(`.`).replace(`:.`,`.`),b=(e=`en`,t)=>{if(t.length<=0)return`-`;let n=t[0];return n?x(e,n.i18n):`-`},x=(e=`en`,t)=>{if(t.length===0)return``;let n=d(e,t,`address1`)?.replace(`대한민국`,``)||``,r=t.find(t=>t.locale===e)?.address2,i=[n];return e===`ko`?i.push(r):i.unshift(r),i.filter(Boolean).join(`, `).trim()},S=e=>{let t=0;for(let n of e)t+=n.weight;let n=Math.random()*t,r=0;for(let t of e)if(r+=t.weight,n<r)return t;return e[e.length-1]},C=e=>new Promise(t=>setTimeout(t,e)),w=(e,t,n)=>{if(!e||typeof e!=`object`)return e;let r=t.split(`.`),i=(e,t)=>{if(t.length===0)return Array.isArray(e)?[...e].sort((e,t)=>{let r=e.locale,i=t.locale;if(!r||!i)return 0;let a=n.indexOf(r),o=n.indexOf(i);return a===-1&&o===-1?0:a===-1?1:o===-1?-1:a-o}):e;if(Array.isArray(e))return e.map(e=>i(e,t));if(typeof e==`object`&&e){let[n,...r]=t,a=e[n];if(a!==void 0)return{...e,[n]:i(a,r)}}return e};return i(e,r)},T=async e=>new Promise((t,n)=>{let r=new Image;r.src=URL.createObjectURL(e),r.onload=()=>{t({originalWidth:r.naturalWidth,originalHeight:r.naturalHeight,originalName:e.name})},r.onerror=e=>{n(e)}});exports.calcPageCount=a,exports.comparePriorityAsc=p,exports.composeKey=y,exports.existLeastOne=_,exports.getFirstLocationAddress=b,exports.getFullAddress=x,exports.getI18nKey=v,exports.getI18nValue=f,exports.getI18nValues=d,exports.getImageInfo=T,exports.getModelName=u,exports.link=i,exports.loadExLib=s,exports.parseQuery=m,exports.productSlugify=l,exports.selectItemByWeight=S,exports.shuffle=o,exports.sleep=C,exports.slugify=c,exports.sortI18nByPriority=w,exports.withoutProperties=g,exports.withoutProperty=h;
@@ -1,4 +1,4 @@
1
- //#region src/util/common.d.ts
1
+ //#region src/util/common/index.d.ts
2
2
  declare const link: (param: Record<string, string>, deleteKeys?: string[]) => string;
3
3
  declare const calcPageCount: (total: number, perPage: number) => number;
4
4
  declare const shuffle: <T>(arr: T[]) => T[];
@@ -16,7 +16,7 @@ interface Series<I extends I18n = I18n> {
16
16
  interface I18n {
17
17
  name?: string | null;
18
18
  locale: string;
19
- priority: number;
19
+ priority?: number;
20
20
  }
21
21
  declare const productSlugify: (product: Product) => string;
22
22
  declare const getModelName: (modelName: string[]) => string;
@@ -41,9 +41,10 @@ declare const composeKey: (prefix?: Array<string | number> | string, ...keys: Ar
41
41
  interface Location<I extends LocationI18n = LocationI18n> {
42
42
  i18n: I[];
43
43
  }
44
- interface LocationI18n extends I18n {
44
+ interface LocationI18n extends Omit<I18n, 'priority'> {
45
45
  address1?: string | null;
46
46
  address2?: string | null;
47
+ priority: number;
47
48
  }
48
49
  declare const getFirstLocationAddress: (locale: string | undefined, locations: Location[]) => string;
49
50
  declare const getFullAddress: (locale: string | undefined, values: LocationI18n[]) => string;
@@ -51,7 +52,6 @@ declare const selectItemByWeight: <T extends {
51
52
  weight: number;
52
53
  }>(itemsWithWeights: T[]) => T;
53
54
  declare const sleep: (ms: number) => Promise<unknown>;
54
- declare const cn: (...classes: Array<string | false | null | undefined>) => string;
55
55
  declare const sortI18nByPriority: <T>(data: T, fields: string, priorityLocale: string[]) => T;
56
56
  interface ImageInfo {
57
57
  originalWidth: number;
@@ -60,4 +60,4 @@ interface ImageInfo {
60
60
  }
61
61
  declare const getImageInfo: (file: File) => Promise<ImageInfo>;
62
62
  //#endregion
63
- export { calcPageCount, cn, comparePriorityAsc, composeKey, existLeastOne, getFirstLocationAddress, getFullAddress, getI18nKey, getI18nValue, getI18nValues, getImageInfo, getModelName, link, loadExLib, parseQuery, productSlugify, selectItemByWeight, shuffle, sleep, slugify, sortI18nByPriority, withoutProperties, withoutProperty };
63
+ export { calcPageCount, comparePriorityAsc, composeKey, existLeastOne, getFirstLocationAddress, getFullAddress, getI18nKey, getI18nValue, getI18nValues, getImageInfo, getModelName, link, loadExLib, parseQuery, productSlugify, selectItemByWeight, shuffle, sleep, slugify, sortI18nByPriority, withoutProperties, withoutProperty };
@@ -1,4 +1,4 @@
1
- //#region src/util/common.d.ts
1
+ //#region src/util/common/index.d.ts
2
2
  declare const link: (param: Record<string, string>, deleteKeys?: string[]) => string;
3
3
  declare const calcPageCount: (total: number, perPage: number) => number;
4
4
  declare const shuffle: <T>(arr: T[]) => T[];
@@ -16,7 +16,7 @@ interface Series<I extends I18n = I18n> {
16
16
  interface I18n {
17
17
  name?: string | null;
18
18
  locale: string;
19
- priority: number;
19
+ priority?: number;
20
20
  }
21
21
  declare const productSlugify: (product: Product) => string;
22
22
  declare const getModelName: (modelName: string[]) => string;
@@ -41,9 +41,10 @@ declare const composeKey: (prefix?: Array<string | number> | string, ...keys: Ar
41
41
  interface Location<I extends LocationI18n = LocationI18n> {
42
42
  i18n: I[];
43
43
  }
44
- interface LocationI18n extends I18n {
44
+ interface LocationI18n extends Omit<I18n, 'priority'> {
45
45
  address1?: string | null;
46
46
  address2?: string | null;
47
+ priority: number;
47
48
  }
48
49
  declare const getFirstLocationAddress: (locale: string | undefined, locations: Location[]) => string;
49
50
  declare const getFullAddress: (locale: string | undefined, values: LocationI18n[]) => string;
@@ -51,7 +52,6 @@ declare const selectItemByWeight: <T extends {
51
52
  weight: number;
52
53
  }>(itemsWithWeights: T[]) => T;
53
54
  declare const sleep: (ms: number) => Promise<unknown>;
54
- declare const cn: (...classes: Array<string | false | null | undefined>) => string;
55
55
  declare const sortI18nByPriority: <T>(data: T, fields: string, priorityLocale: string[]) => T;
56
56
  interface ImageInfo {
57
57
  originalWidth: number;
@@ -60,4 +60,4 @@ interface ImageInfo {
60
60
  }
61
61
  declare const getImageInfo: (file: File) => Promise<ImageInfo>;
62
62
  //#endregion
63
- export { calcPageCount, cn, comparePriorityAsc, composeKey, existLeastOne, getFirstLocationAddress, getFullAddress, getI18nKey, getI18nValue, getI18nValues, getImageInfo, getModelName, link, loadExLib, parseQuery, productSlugify, selectItemByWeight, shuffle, sleep, slugify, sortI18nByPriority, withoutProperties, withoutProperty };
63
+ export { calcPageCount, comparePriorityAsc, composeKey, existLeastOne, getFirstLocationAddress, getFullAddress, getI18nKey, getI18nValue, getI18nValues, getImageInfo, getModelName, link, loadExLib, parseQuery, productSlugify, selectItemByWeight, shuffle, sleep, slugify, sortI18nByPriority, withoutProperties, withoutProperty };
@@ -1 +1 @@
1
- import e from"query-string";import{intersection as t}from"lodash-es";import n from"slug";n.extend({'"':`-`,"”":`-`,"“":`-`,"•":`----`}),n.setLocale(`en`);const r=(t,n=[])=>{if(typeof window>`u`)return``;let{hash:r,search:i}=window.location,a=e.parse(i);Object.keys(t).forEach(e=>{t[e]?a[e]=t[e]:delete a[e]});let o={...a};return Object.keys(a).forEach(e=>{n.includes(e)&&delete o[e]}),`?${e.stringify(o,{encode:!0})}${r}`},i=(e,t)=>{let n=0;return e%t===0&&(n=e/t),n=Math.ceil(e/t),n<1&&(n=1),n},a=e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},o=e=>{let t=document.getElementById(`naverMapLib`);if(!t){let t=document.createElement(`script`);t.src=`https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=ecs1pyoo9b`,t.id=`naverMapLib`,document.body.appendChild(t),t.onload=()=>{e&&e()}}t&&e&&e()},s=(e,...t)=>{let r=`${e}`;return t.forEach(e=>{e&&(r=`${r}-${n(e)}`)}),r},c=e=>{let t=[];e.i18n?.forEach(e=>{e.locale===`en`&&e.name&&t.push(e.name)});let n=e.series?.i18n.find(e=>e.locale===`en`);return n?.name&&t.push(n.name.toLowerCase()),e.stockNo&&t.push(e.stockNo[0]),s(e.id,...t)},l=e=>{let t=e;return t.length>0?t[0].trim():``},u=(e=`en`,t,n)=>{if(!t||!n||t.length<=0)return``;let r=[...t].sort(f);if(e){let t=r.findIndex(t=>t.locale===e);if(t!==-1){let e=r.splice(t,1);r.unshift(e[0])}}for(let e of r){let t=e[n];if(!(Array.isArray(t)&&t.length===0)&&t)return t}return``},d=(e,t,n)=>{if(!t||!n||t.length<=0)return``;let r=[...t].sort(f);if(e){let t=r.findIndex(t=>t.locale===e);if(t!==-1){let e=r.splice(t,1);r.unshift(e[0])}}let i=``;for(let e of r){let t=e[n];if(t){i=String(t);break}}return i},f=(e,t)=>e.priority<t.priority?-1:e.priority>t.priority?1:0,p=(e,t,n)=>{if(e){let r;r=Array.isArray(e)?e[0]:e;try{return t(r)}catch{return n}}return n},m=(e,t)=>{let{[t]:n,...r}=e;return r},h=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))),g=(e,n)=>t(e,n).length>0,_=e=>e.split(`:`).pop()?.split(`.`).pop(),v=(e,...t)=>[e,t].flat().join(`.`).replace(`:.`,`.`),y=(e=`en`,t)=>{if(t.length<=0)return`-`;let n=t[0];return n?b(e,n.i18n):`-`},b=(e=`en`,t)=>{if(t.length===0)return``;let n=u(e,t,`address1`)?.replace(`대한민국`,``)||``,r=t.find(t=>t.locale===e)?.address2,i=[n];return e===`ko`?i.push(r):i.unshift(r),i.filter(Boolean).join(`, `).trim()},x=e=>{let t=0;for(let n of e)t+=n.weight;let n=Math.random()*t,r=0;for(let t of e)if(r+=t.weight,n<r)return t;return e[e.length-1]},S=e=>new Promise(t=>setTimeout(t,e)),C=(...e)=>e.filter(Boolean).join(` `),w=(e,t,n)=>{if(!e||typeof e!=`object`)return e;let r=t.split(`.`),i=(e,t)=>{if(t.length===0)return Array.isArray(e)?[...e].sort((e,t)=>{let r=e.locale,i=t.locale;if(!r||!i)return 0;let a=n.indexOf(r),o=n.indexOf(i);return a===-1&&o===-1?0:a===-1?1:o===-1?-1:a-o}):e;if(Array.isArray(e))return e.map(e=>i(e,t));if(typeof e==`object`&&e){let[n,...r]=t,a=e[n];if(a!==void 0)return{...e,[n]:i(a,r)}}return e};return i(e,r)},T=async e=>new Promise((t,n)=>{let r=new Image;r.src=URL.createObjectURL(e),r.onload=()=>{t({originalWidth:r.naturalWidth,originalHeight:r.naturalHeight,originalName:e.name})},r.onerror=e=>{n(e)}});export{m as C,h as S,x as _,g as a,s as b,_ as c,T as d,l as f,c as g,p as h,v as i,d as l,o as m,C as n,y as o,r as p,f as r,b as s,i as t,u,a as v,w as x,S as y};
1
+ import e from"query-string";import{intersection as t}from"lodash-es";import n from"slug";n.extend({'"':`-`,"”":`-`,"“":`-`,"•":`----`}),n.setLocale(`en`);const r=(t,n=[])=>{if(typeof window>`u`)return``;let{hash:r,search:i}=window.location,a=e.parse(i);Object.keys(t).forEach(e=>{t[e]?a[e]=t[e]:delete a[e]});let o={...a};return Object.keys(a).forEach(e=>{n.includes(e)&&delete o[e]}),`?${e.stringify(o,{encode:!0})}${r}`},i=(e,t)=>{let n=0;return e%t===0&&(n=e/t),n=Math.ceil(e/t),n<1&&(n=1),n},a=e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},o=e=>{let t=document.getElementById(`naverMapLib`);if(!t){let t=document.createElement(`script`);t.src=`https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=ecs1pyoo9b`,t.id=`naverMapLib`,document.body.appendChild(t),t.onload=()=>{e&&e()}}t&&e&&e()},s=(e,...t)=>{let r=`${e}`;return t.forEach(e=>{e&&(r=`${r}-${n(e)}`)}),r},c=e=>{let t=[];e.i18n?.forEach(e=>{e.locale===`en`&&e.name&&t.push(e.name)});let n=e.series?.i18n.find(e=>e.locale===`en`);return n?.name&&t.push(n.name.toLowerCase()),e.stockNo&&t.push(e.stockNo[0]),s(e.id,...t)},l=e=>{let t=e;return t.length>0?t[0].trim():``},u=(e=`en`,t,n)=>{if(!t||!n||t.length<=0)return``;let r=[...t].sort(f);if(e){let t=r.findIndex(t=>t.locale===e);if(t!==-1){let e=r.splice(t,1);r.unshift(e[0])}}for(let e of r){let t=e[n];if(!(Array.isArray(t)&&t.length===0)&&t)return t}return``},d=(e,t,n)=>{if(!t||!n||t.length<=0)return``;let r=[...t].sort(f);if(e){let t=r.findIndex(t=>t.locale===e);if(t!==-1){let e=r.splice(t,1);r.unshift(e[0])}}let i=``;for(let e of r){let t=e[n];if(t){i=String(t);break}}return i},f=(e,t)=>e.priority<t.priority?-1:e.priority>t.priority?1:0,p=(e,t,n)=>{if(e){let r;r=Array.isArray(e)?e[0]:e;try{return t(r)}catch{return n}}return n},m=(e,t)=>{let{[t]:n,...r}=e;return r},h=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))),g=(e,n)=>t(e,n).length>0,_=e=>e.split(`:`).pop()?.split(`.`).pop(),v=(e,...t)=>[e,t].flat().join(`.`).replace(`:.`,`.`),y=(e=`en`,t)=>{if(t.length<=0)return`-`;let n=t[0];return n?b(e,n.i18n):`-`},b=(e=`en`,t)=>{if(t.length===0)return``;let n=u(e,t,`address1`)?.replace(`대한민국`,``)||``,r=t.find(t=>t.locale===e)?.address2,i=[n];return e===`ko`?i.push(r):i.unshift(r),i.filter(Boolean).join(`, `).trim()},x=e=>{let t=0;for(let n of e)t+=n.weight;let n=Math.random()*t,r=0;for(let t of e)if(r+=t.weight,n<r)return t;return e[e.length-1]},S=e=>new Promise(t=>setTimeout(t,e)),C=(e,t,n)=>{if(!e||typeof e!=`object`)return e;let r=t.split(`.`),i=(e,t)=>{if(t.length===0)return Array.isArray(e)?[...e].sort((e,t)=>{let r=e.locale,i=t.locale;if(!r||!i)return 0;let a=n.indexOf(r),o=n.indexOf(i);return a===-1&&o===-1?0:a===-1?1:o===-1?-1:a-o}):e;if(Array.isArray(e))return e.map(e=>i(e,t));if(typeof e==`object`&&e){let[n,...r]=t,a=e[n];if(a!==void 0)return{...e,[n]:i(a,r)}}return e};return i(e,r)},w=async e=>new Promise((t,n)=>{let r=new Image;r.src=URL.createObjectURL(e),r.onload=()=>{t({originalWidth:r.naturalWidth,originalHeight:r.naturalHeight,originalName:e.name})},r.onerror=e=>{n(e)}});export{i as calcPageCount,f as comparePriorityAsc,v as composeKey,g as existLeastOne,y as getFirstLocationAddress,b as getFullAddress,_ as getI18nKey,d as getI18nValue,u as getI18nValues,w as getImageInfo,l as getModelName,r as link,o as loadExLib,p as parseQuery,c as productSlugify,x as selectItemByWeight,a as shuffle,S as sleep,s as slugify,C as sortI18nByPriority,h as withoutProperties,m as withoutProperty};
@@ -0,0 +1 @@
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`dayjs`);t=e.t(t),require(`dayjs/locale/ko.js`);let n=require(`dayjs/plugin/relativeTime.js`);n=e.t(n),t.default.extend(n.default);const r=(e,n=`YYYY-MM-DD`,r=`en`)=>{let i=(0,t.default)(e).locale(r);return(0,t.default)().diff(i,`hour`)<12?i.fromNow():i.format(n)};exports.displayDatetime=r;
@@ -1,4 +1,4 @@
1
- //#region src/util/date.d.ts
1
+ //#region src/util/date/index.d.ts
2
2
  declare const displayDatetime: (date: string, format?: string, locale?: string) => string;
3
3
  //#endregion
4
4
  export { displayDatetime };
@@ -1,6 +1,6 @@
1
1
  import "dayjs/locale/ko.js";
2
2
 
3
- //#region src/util/date.d.ts
3
+ //#region src/util/date/index.d.ts
4
4
  declare const displayDatetime: (date: string, format?: string, locale?: string) => string;
5
5
  //#endregion
6
6
  export { displayDatetime };
@@ -0,0 +1 @@
1
+ const e=require(`../../editor-DvLUotoh.cjs`);exports.IMAGE_NODE_DRAGGING_ATTR=e.t,exports.computeAspectRatio=e.n,exports.imageNodeViewRenderer=e.r,exports.isLargeTextSelection=e.i,exports.parseDescription=e.a,exports.removeNodes=e.o,exports.teardownDragPreview=e.s,exports.visibleSelectionRect=e.c;
@@ -0,0 +1,55 @@
1
+ import { Editor, Extensions, Node, NodeViewRenderer } from "@tiptap/core";
2
+ import { ReactNodeViewProps, ReactNodeViewRendererOptions } from "@tiptap/react";
3
+ import { ComponentType } from "react";
4
+
5
+ //#region src/util/editor/index.d.ts
6
+ declare const IMAGE_NODE_DRAGGING_ATTR = "data-image-node-dragging";
7
+ declare const teardownDragPreview: () => void;
8
+ type ImageNodeViewOptions = Partial<ReactNodeViewRendererOptions>;
9
+ declare function imageNodeViewRenderer<T = HTMLElement>(component: ComponentType<ReactNodeViewProps<T>>, options?: ImageNodeViewOptions): NodeViewRenderer;
10
+ declare const removeNodes: (extensions: Extensions | Node[], nodeNames: string[], html?: string | null) => string | null | undefined;
11
+ interface ParseOptions {
12
+ default?: string | null;
13
+ }
14
+ interface ParseArrayOptions<F extends string> extends ParseOptions {
15
+ fields?: readonly F[];
16
+ }
17
+ declare function parseDescription(input: string, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string;
18
+ declare function parseDescription(input: null, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): null;
19
+ declare function parseDescription(input: undefined, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): undefined;
20
+ declare function parseDescription(input: string | null | undefined, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string | null | undefined;
21
+ declare function parseDescription(input: string | null, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string | null;
22
+ declare function parseDescription(input: string | undefined, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string | undefined;
23
+ declare function parseDescription<T extends Record<string, unknown>>(input: T[], extensions: Extensions | Node[], nodes: string[], options?: ParseArrayOptions<Extract<keyof T, string>>): T[];
24
+ interface ComputeAspectRatioParams {
25
+ min: {
26
+ width: number;
27
+ height: number;
28
+ };
29
+ max: {
30
+ width: number;
31
+ height: number;
32
+ };
33
+ width: number;
34
+ height: number;
35
+ type: 'width' | 'height';
36
+ currentRatio?: number;
37
+ }
38
+ type ComputeAspectRatioWarning = 'width-under-min' | 'width-over-max' | 'height-under-min';
39
+ interface ComputeAspectRatioResult {
40
+ width: number;
41
+ height: number;
42
+ result: ComputeAspectRatioWarning | null;
43
+ }
44
+ declare const computeAspectRatio: ({
45
+ min,
46
+ max,
47
+ width,
48
+ height,
49
+ type,
50
+ currentRatio
51
+ }: ComputeAspectRatioParams) => ComputeAspectRatioResult;
52
+ declare function isLargeTextSelection(editor: Editor): boolean;
53
+ declare function visibleSelectionRect(editor: Editor): DOMRect;
54
+ //#endregion
55
+ export { ComputeAspectRatioWarning, IMAGE_NODE_DRAGGING_ATTR, computeAspectRatio, imageNodeViewRenderer, isLargeTextSelection, parseDescription, removeNodes, teardownDragPreview, visibleSelectionRect };
@@ -0,0 +1,55 @@
1
+ import { Editor, Extensions, Node, NodeViewRenderer } from "@tiptap/core";
2
+ import { ReactNodeViewProps, ReactNodeViewRendererOptions } from "@tiptap/react";
3
+ import { ComponentType } from "react";
4
+
5
+ //#region src/util/editor/index.d.ts
6
+ declare const IMAGE_NODE_DRAGGING_ATTR = "data-image-node-dragging";
7
+ declare const teardownDragPreview: () => void;
8
+ type ImageNodeViewOptions = Partial<ReactNodeViewRendererOptions>;
9
+ declare function imageNodeViewRenderer<T = HTMLElement>(component: ComponentType<ReactNodeViewProps<T>>, options?: ImageNodeViewOptions): NodeViewRenderer;
10
+ declare const removeNodes: (extensions: Extensions | Node[], nodeNames: string[], html?: string | null) => string | null | undefined;
11
+ interface ParseOptions {
12
+ default?: string | null;
13
+ }
14
+ interface ParseArrayOptions<F extends string> extends ParseOptions {
15
+ fields?: readonly F[];
16
+ }
17
+ declare function parseDescription(input: string, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string;
18
+ declare function parseDescription(input: null, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): null;
19
+ declare function parseDescription(input: undefined, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): undefined;
20
+ declare function parseDescription(input: string | null | undefined, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string | null | undefined;
21
+ declare function parseDescription(input: string | null, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string | null;
22
+ declare function parseDescription(input: string | undefined, extensions: Extensions | Node[], nodes: string[], options?: ParseOptions): string | undefined;
23
+ declare function parseDescription<T extends Record<string, unknown>>(input: T[], extensions: Extensions | Node[], nodes: string[], options?: ParseArrayOptions<Extract<keyof T, string>>): T[];
24
+ interface ComputeAspectRatioParams {
25
+ min: {
26
+ width: number;
27
+ height: number;
28
+ };
29
+ max: {
30
+ width: number;
31
+ height: number;
32
+ };
33
+ width: number;
34
+ height: number;
35
+ type: 'width' | 'height';
36
+ currentRatio?: number;
37
+ }
38
+ type ComputeAspectRatioWarning = 'width-under-min' | 'width-over-max' | 'height-under-min';
39
+ interface ComputeAspectRatioResult {
40
+ width: number;
41
+ height: number;
42
+ result: ComputeAspectRatioWarning | null;
43
+ }
44
+ declare const computeAspectRatio: ({
45
+ min,
46
+ max,
47
+ width,
48
+ height,
49
+ type,
50
+ currentRatio
51
+ }: ComputeAspectRatioParams) => ComputeAspectRatioResult;
52
+ declare function isLargeTextSelection(editor: Editor): boolean;
53
+ declare function visibleSelectionRect(editor: Editor): DOMRect;
54
+ //#endregion
55
+ export { ComputeAspectRatioWarning, IMAGE_NODE_DRAGGING_ATTR, computeAspectRatio, imageNodeViewRenderer, isLargeTextSelection, parseDescription, removeNodes, teardownDragPreview, visibleSelectionRect };