@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,72 +0,0 @@
1
- import { a as Size, i as ResizeHandleProps, n as RESIZE_CONSTANTS, o as UseDragResizeProps, r as ResizeDirection, s as useDragResize, t as LimitSize } from "../../use-drag-resize-DRHPv5RK.mjs";
2
- import { a as useSubsetImage, i as UseSubsetImageProps, n as Folder, r as SUBSETS, t as BaseProps } from "../../use-subset-image-Dygkyw-W.mjs";
3
- import * as react5 from "react";
4
- import { DependencyList, Dispatch, EffectCallback, RefObject, SetStateAction } from "react";
5
-
6
- //#region src/hooks/use-delay-unmount.d.ts
7
- declare function useDelayUnmount(isMounted: boolean, delayTime: number): boolean;
8
- //#endregion
9
- //#region src/hooks/use-dialog-stack.d.ts
10
- declare function useDialogStack(isOpen: boolean, onClose: () => void, lockScroll?: boolean): void;
11
- //#endregion
12
- //#region src/hooks/use-drag-scroll.d.ts
13
- declare function useDragScroll(speed?: number): {
14
- ref: react5.RefObject<HTMLDivElement>;
15
- onMouseDown: (e: React.MouseEvent) => void;
16
- onMouseLeave: () => void;
17
- onMouseUp: () => void;
18
- onMouseMove: (e: React.MouseEvent) => void;
19
- onClickCapture: (e: React.MouseEvent) => void;
20
- };
21
- //#endregion
22
- //#region src/hooks/use-effect-once.d.ts
23
- declare const SKIP: unique symbol;
24
- declare function useEffectOnce(effect: () => ReturnType<EffectCallback> | typeof SKIP, deps?: DependencyList): void;
25
- //#endregion
26
- //#region src/hooks/use-outside-click.d.ts
27
- interface UseOutsideClickProps {
28
- ref: RefObject<HTMLElement | null>;
29
- setOpen: Dispatch<SetStateAction<boolean>>;
30
- }
31
- declare function useOutsideClick({
32
- ref,
33
- setOpen
34
- }: UseOutsideClickProps): void;
35
- //#endregion
36
- //#region src/hooks/use-scroll-lock.d.ts
37
- type ScrollLockType = 'mouse' | 'touch';
38
- interface UseScrollLockProps {
39
- open: boolean;
40
- type?: readonly ScrollLockType[];
41
- }
42
- declare function useScrollLock({
43
- open,
44
- type
45
- }: UseScrollLockProps): void;
46
- //#endregion
47
- //#region src/hooks/use-scroll-top.d.ts
48
- interface UseScrollTopProps {
49
- enabled?: boolean;
50
- behavior?: ScrollBehavior;
51
- }
52
- declare function useScrollTop({
53
- enabled,
54
- behavior
55
- }?: UseScrollTopProps): {
56
- isVisible: boolean;
57
- handleScrolToTop: () => void;
58
- ref: react5.RefObject<HTMLDivElement>;
59
- };
60
- //#endregion
61
- //#region src/hooks/use-sticky.d.ts
62
- declare function useSticky(): {
63
- sentinelRef: react5.Dispatch<react5.SetStateAction<HTMLDivElement | null>>;
64
- isStuck: boolean;
65
- };
66
- //#endregion
67
- //#region src/hooks/use-window-size.d.ts
68
- declare function useWindowSize(defaultWidth?: number): {
69
- windowSize: number;
70
- };
71
- //#endregion
72
- export { BaseProps, Folder, LimitSize, RESIZE_CONSTANTS, ResizeDirection, ResizeHandleProps, SKIP, SUBSETS, Size, UseDragResizeProps, UseOutsideClickProps, UseScrollLockProps, UseScrollTopProps, UseSubsetImageProps, useDelayUnmount, useDialogStack, useDragResize, useDragScroll, useEffectOnce, useOutsideClick, useScrollLock, useScrollTop, useSticky, useSubsetImage, useWindowSize };
@@ -1 +0,0 @@
1
- "use client";import"../../src-CIMlbgv1.mjs";import"../../file-B-UJkabO.mjs";import{n as e,t}from"../../use-drag-resize-BdeLdulk.mjs";import{a as n,c as r,i,l as a,n as o,o as s,r as c,s as l,t as u}from"../../common-CWHkXe0F.mjs";import{t as d}from"../../use-dialog-stack-Crj8YWJl.mjs";import"../../api-client-C0sbSOQf.mjs";import{n as f,t as p}from"../../use-subset-image-Df2fCrtH.mjs";export{t as RESIZE_CONSTANTS,s as SKIP,p as SUBSETS,a as useDelayUnmount,d as useDialogStack,e as useDragResize,r as useDragScroll,l as useEffectOnce,n as useOutsideClick,i as useScrollLock,c as useScrollTop,o as useSticky,f as useSubsetImage,u as useWindowSize};
@@ -1 +0,0 @@
1
- "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);let t=require(`notistack`);function n(){let{enqueueSnackbar:e}=(0,t.useSnackbar)();return{enqueueSnackbar:e,successSnackbar:t=>{e(t,{variant:`success`,autoHideDuration:2e3,anchorOrigin:{horizontal:`left`,vertical:`bottom`}})},errSnackbar:t=>{e(t,{variant:`error`,autoHideDuration:2e3,anchorOrigin:{horizontal:`left`,vertical:`bottom`}})}}}exports.useSnackbar=n;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./common-D4sUwkFd.cjs`);let n=require(`react/jsx-runtime`),r=require(`class-variance-authority`);const i=(0,r.cva)(t.n(`komc:w-full komc:animate-pulse komc:bg-gray-200`),{variants:{size:{xs:`komc:h-4`,sm:`komc:h-8`,md:`komc:h-12`,lg:`komc:h-16`,xl:`komc:h-20`,"2xl":`komc:h-24`,"3xl":`komc:h-28`,square:`komc:h-auto komc:aspect-square`,full:`komc:h-full`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},defaultVariants:{size:`sm`,rounded:`sm`}});function a({size:e,rounded:t,width:r,height:a,className:o,...s}){let c=r?typeof r==`string`?r:`${r}px`:void 0,l=a?typeof a==`string`?a:`${a}px`:void 0;return(0,n.jsx)(`div`,{"data-komc":!0,"aria-hidden":`true`,className:i({size:e,rounded:t,className:o}),style:{width:c,height:l},...s})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -1 +0,0 @@
1
- import{n as e}from"./common-ZUMpASnc.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(e(`komc:w-full komc:animate-pulse komc:bg-gray-200`),{variants:{size:{xs:`komc:h-4`,sm:`komc:h-8`,md:`komc:h-12`,lg:`komc:h-16`,xl:`komc:h-20`,"2xl":`komc:h-24`,"3xl":`komc:h-28`,square:`komc:h-auto komc:aspect-square`,full:`komc:h-full`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},defaultVariants:{size:`sm`,rounded:`sm`}});function i({size:e,rounded:n,width:i,height:a,className:o,...s}){let c=i?typeof i==`string`?i:`${i}px`:void 0,l=a?typeof a==`string`?a:`${a}px`:void 0;return t(`div`,{"data-komc":!0,"aria-hidden":`true`,className:r({size:e,rounded:n,className:o}),style:{width:c,height:l},...s})}export{i as t};
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`js-cookie`);t=e.t(t);let n=require(`query-string`);n=e.t(n);var r=class{#e;#t;constructor(e){this.#e=e.apiEndpoint,this.#t=e.cdnEndpoint}async login(e,t){let n=`${this.#e}/auth/login`;return await(await fetch(n,{method:`POST`,body:JSON.stringify({email:e,password:t}),headers:{"Content-Type":`application/json`},credentials:`include`})).json()}logout(e=`/`,n=`.komachine.com`){let r={path:e};window.location.hostname!==`localhost`&&(r.domain=n),t.default.remove(`access`,r),window.location.href=r.path}getToken(){return t.default.get(`access`)}getBearer(){return`Bearer ${this.getToken()}`}async accessLog(){if(this.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.#e}/access-log`,t=await fetch(e,{headers:{Authorization:this.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async me(){if(this.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.#e}/me`,t=await fetch(e,{headers:{Authorization:this.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async hasPermission(e,t,n=!1,r=!1){if(this.getToken()===void 0){if(!r)throw Error(`로그인 필요`);return}let i=`${this.#e}/has-permission?obj=${e}&act=${t}`;n&&(i=`${i}&exact=true`);let a=await fetch(i,{headers:{Authorization:this.getBearer()}});if(!a.ok){if(!r)throw Error(`인증에러`);return}return await a.json()}cdnMedia(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.#t}/media/resized/${n}/${t}/${r}`}return`${this.#t}/media/${e}`}cdnStatic(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.#t}/media/resized/${n}/${t}/${r}`}return`${this.#t}/static/${e}`}refinePath(e){if(!e?.trim())return``;if(e.startsWith(`blob:`)){let t=e.lastIndexOf(`/`);if(t!==-1){let n=e.substring(0,t+1),r=e.substring(t+1),i=r.lastIndexOf(`.`);if(i!==-1)return n+r.substring(0,i)}}return this.cdnMedia(e)}getUploadPresignURL(e){let t=n.default.stringify(e);return fetch(`${this.#e}/upload/presign?${t}`,{credentials:`include`,headers:{Authorization:this.getBearer()}})}createParaMap(e,t){let n=URL.createObjectURL(e).split(`/`).pop()||``,r=e.name.split(`.`).pop()?.toLowerCase(),i=`${t?`${t.replace(/^\//,``)}/`:``}${n}.${r}`,a={contentType:e.type||`application/octet-stream`,length:e.size,key:i};return e.type.includes(`image`)||(a.disposition=`attachment; filename*=UTF8''${encodeURI(e.name)}`),a}async upload(e,t){let n=this.createParaMap(e,t),r=await(await this.getUploadPresignURL(n)).json(),i={"Content-Length":n.length.toString(),"Content-Type":n.contentType.toString()};n.disposition&&(i[`Content-Disposition`]=n.disposition);try{await fetch(r,{method:`PUT`,headers:i,body:e,credentials:`include`})}catch(e){return new Promise((t,n)=>n(e))}return new Promise(e=>e(n.key))}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
@@ -1 +0,0 @@
1
- import e from"js-cookie";import t from"query-string";var n=class{#e;#t;constructor(e){this.#e=e.apiEndpoint,this.#t=e.cdnEndpoint}async login(e,t){let n=`${this.#e}/auth/login`;return await(await fetch(n,{method:`POST`,body:JSON.stringify({email:e,password:t}),headers:{"Content-Type":`application/json`},credentials:`include`})).json()}logout(t=`/`,n=`.komachine.com`){let r={path:t};window.location.hostname!==`localhost`&&(r.domain=n),e.remove(`access`,r),window.location.href=r.path}getToken(){return e.get(`access`)}getBearer(){return`Bearer ${this.getToken()}`}async accessLog(){if(this.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.#e}/access-log`,t=await fetch(e,{headers:{Authorization:this.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async me(){if(this.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.#e}/me`,t=await fetch(e,{headers:{Authorization:this.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async hasPermission(e,t,n=!1,r=!1){if(this.getToken()===void 0){if(!r)throw Error(`로그인 필요`);return}let i=`${this.#e}/has-permission?obj=${e}&act=${t}`;n&&(i=`${i}&exact=true`);let a=await fetch(i,{headers:{Authorization:this.getBearer()}});if(!a.ok){if(!r)throw Error(`인증에러`);return}return await a.json()}cdnMedia(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.#t}/media/resized/${n}/${t}/${r}`}return`${this.#t}/media/${e}`}cdnStatic(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.#t}/media/resized/${n}/${t}/${r}`}return`${this.#t}/static/${e}`}refinePath(e){if(!e?.trim())return``;if(e.startsWith(`blob:`)){let t=e.lastIndexOf(`/`);if(t!==-1){let n=e.substring(0,t+1),r=e.substring(t+1),i=r.lastIndexOf(`.`);if(i!==-1)return n+r.substring(0,i)}}return this.cdnMedia(e)}getUploadPresignURL(e){let n=t.stringify(e);return fetch(`${this.#e}/upload/presign?${n}`,{credentials:`include`,headers:{Authorization:this.getBearer()}})}createParaMap(e,t){let n=URL.createObjectURL(e).split(`/`).pop()||``,r=e.name.split(`.`).pop()?.toLowerCase(),i=`${t?`${t.replace(/^\//,``)}/`:``}${n}.${r}`,a={contentType:e.type||`application/octet-stream`,length:e.size,key:i};return e.type.includes(`image`)||(a.disposition=`attachment; filename*=UTF8''${encodeURI(e.name)}`),a}async upload(e,t){let n=this.createParaMap(e,t),r=await(await this.getUploadPresignURL(n)).json(),i={"Content-Length":n.length.toString(),"Content-Type":n.contentType.toString()};n.disposition&&(i[`Content-Disposition`]=n.disposition);try{await fetch(r,{method:`PUT`,headers:i,body:e,credentials:`include`})}catch(e){return new Promise((t,n)=>n(e))}return new Promise(e=>e(n.key))}};export{n as t};
package/dist/ui/index.cjs DELETED
@@ -1 +0,0 @@
1
- require(`../common-D4sUwkFd.cjs`);const e=require(`../ui-Bs9PP9eC.cjs`),t=require(`../button-ChX3XGbR.cjs`),n=require(`../skeleton-B5ZccRFX.cjs`);exports.BottomAppBar=e.a,exports.Button=t.t,exports.ConditionalEitherWrapper=e.r,exports.ConditionalWrapper=e.i,exports.Input=e.n,exports.Skeleton=n.t,exports.StableText=e.t;
@@ -1,92 +0,0 @@
1
- import { n as ButtonProps, t as Button } from "../button-DHvx-GAg.cjs";
2
- import * as react23 from "react";
3
- import React$1, { HTMLAttributes } from "react";
4
- import * as class_variance_authority_types2 from "class-variance-authority/types";
5
- import { VariantProps } from "class-variance-authority";
6
- import * as react_jsx_runtime20 from "react/jsx-runtime";
7
-
8
- //#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
9
- interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
10
- items: T[];
11
- render: (item: T) => React$1.ReactNode;
12
- }
13
- declare function BottomAppBar<T>({
14
- className,
15
- items,
16
- render,
17
- ...props
18
- }: BottomAppBarProps<T>): React$1.ReactNode;
19
- //#endregion
20
- //#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
21
- interface ConditionalWrapperProps {
22
- condition: boolean;
23
- wrapper: (children: React.ReactNode) => React.ReactNode;
24
- children: React.ReactNode;
25
- }
26
- declare function ConditionalWrapper({
27
- condition,
28
- wrapper,
29
- children
30
- }: ConditionalWrapperProps): react23.ReactNode;
31
- //#endregion
32
- //#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
33
- interface ConditionalEitherWrapperProps {
34
- condition: boolean;
35
- trueWrapper: (children: React.ReactNode) => React.ReactNode;
36
- falseWrapper: (children: React.ReactNode) => React.ReactNode;
37
- children: React.ReactNode;
38
- }
39
- declare function ConditionalEitherWrapper({
40
- condition,
41
- trueWrapper,
42
- falseWrapper,
43
- children
44
- }: ConditionalEitherWrapperProps): react23.ReactNode;
45
- //#endregion
46
- //#region src/ui/input/input.d.ts
47
- declare const classes$1: (props?: ({
48
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "base" | "xs" | "3xl" | null | undefined;
49
- gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
50
- outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
51
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
52
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
53
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
54
- size?: VariantProps<typeof classes$1>['size'];
55
- gap?: VariantProps<typeof classes$1>['gap'];
56
- outline?: VariantProps<typeof classes$1>['outline'];
57
- rounded?: VariantProps<typeof classes$1>['rounded'];
58
- prefix?: React.ReactNode;
59
- surffix?: React.ReactNode;
60
- }
61
- declare const Input: react23.ForwardRefExoticComponent<InputProps & react23.RefAttributes<HTMLInputElement>>;
62
- //#endregion
63
- //#region src/ui/skeleton/skeleton.d.ts
64
- declare const classes: (props?: ({
65
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
66
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
67
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
68
- interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
69
- width?: string | number;
70
- height?: string | number;
71
- size?: VariantProps<typeof classes>['size'];
72
- rounded?: VariantProps<typeof classes>['rounded'];
73
- }
74
- declare function Skeleton({
75
- size,
76
- rounded,
77
- width,
78
- height,
79
- className,
80
- ...props
81
- }: SkeletonProps): react_jsx_runtime20.JSX.Element;
82
- //#endregion
83
- //#region src/ui/stable-text/stable-text.d.ts
84
- declare function StableText({
85
- children,
86
- className,
87
- ...props
88
- }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
89
- children: string | number;
90
- }): react_jsx_runtime20.JSX.Element;
91
- //#endregion
92
- export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
@@ -1,92 +0,0 @@
1
- import { n as ButtonProps, t as Button } from "../button-DRIyBtEB.mjs";
2
- import * as react21 from "react";
3
- import React$1, { HTMLAttributes } from "react";
4
- import * as react_jsx_runtime21 from "react/jsx-runtime";
5
- import { VariantProps } from "class-variance-authority";
6
- import * as class_variance_authority_types2 from "class-variance-authority/types";
7
-
8
- //#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
9
- interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
10
- items: T[];
11
- render: (item: T) => React$1.ReactNode;
12
- }
13
- declare function BottomAppBar<T>({
14
- className,
15
- items,
16
- render,
17
- ...props
18
- }: BottomAppBarProps<T>): React$1.ReactNode;
19
- //#endregion
20
- //#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
21
- interface ConditionalWrapperProps {
22
- condition: boolean;
23
- wrapper: (children: React.ReactNode) => React.ReactNode;
24
- children: React.ReactNode;
25
- }
26
- declare function ConditionalWrapper({
27
- condition,
28
- wrapper,
29
- children
30
- }: ConditionalWrapperProps): react21.ReactNode;
31
- //#endregion
32
- //#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
33
- interface ConditionalEitherWrapperProps {
34
- condition: boolean;
35
- trueWrapper: (children: React.ReactNode) => React.ReactNode;
36
- falseWrapper: (children: React.ReactNode) => React.ReactNode;
37
- children: React.ReactNode;
38
- }
39
- declare function ConditionalEitherWrapper({
40
- condition,
41
- trueWrapper,
42
- falseWrapper,
43
- children
44
- }: ConditionalEitherWrapperProps): react21.ReactNode;
45
- //#endregion
46
- //#region src/ui/input/input.d.ts
47
- declare const classes$1: (props?: ({
48
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "base" | "xs" | "3xl" | null | undefined;
49
- gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
50
- outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
51
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
52
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
53
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
54
- size?: VariantProps<typeof classes$1>['size'];
55
- gap?: VariantProps<typeof classes$1>['gap'];
56
- outline?: VariantProps<typeof classes$1>['outline'];
57
- rounded?: VariantProps<typeof classes$1>['rounded'];
58
- prefix?: React.ReactNode;
59
- surffix?: React.ReactNode;
60
- }
61
- declare const Input: react21.ForwardRefExoticComponent<InputProps & react21.RefAttributes<HTMLInputElement>>;
62
- //#endregion
63
- //#region src/ui/skeleton/skeleton.d.ts
64
- declare const classes: (props?: ({
65
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
66
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
67
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
68
- interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
69
- width?: string | number;
70
- height?: string | number;
71
- size?: VariantProps<typeof classes>['size'];
72
- rounded?: VariantProps<typeof classes>['rounded'];
73
- }
74
- declare function Skeleton({
75
- size,
76
- rounded,
77
- width,
78
- height,
79
- className,
80
- ...props
81
- }: SkeletonProps): react_jsx_runtime21.JSX.Element;
82
- //#endregion
83
- //#region src/ui/stable-text/stable-text.d.ts
84
- declare function StableText({
85
- children,
86
- className,
87
- ...props
88
- }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
89
- children: string | number;
90
- }): react_jsx_runtime21.JSX.Element;
91
- //#endregion
92
- export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
package/dist/ui/index.mjs DELETED
@@ -1 +0,0 @@
1
- import"../common-ZUMpASnc.mjs";import{a as e,i as t,n,r,t as i}from"../ui-D2DoC_0E.mjs";import{t as a}from"../button-CQZuaIU7.mjs";import{t as o}from"../skeleton-Y22bmaaB.mjs";export{e as BottomAppBar,a as Button,r as ConditionalEitherWrapper,t as ConditionalWrapper,n as Input,o as Skeleton,i as StableText};
@@ -1 +0,0 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../common-D4sUwkFd.cjs`);const t=require(`../../button-ChX3XGbR.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,onMouseDown:r,...i}){return(0,n.jsx)(t.t,{...i,onMouseDown:e=>{e.preventDefault(),r?.(e)}})}exports.PreserveFocusButton=r;
@@ -1,12 +0,0 @@
1
- import { t as Button } from "../../button-DHvx-GAg.cjs";
2
- import { ComponentProps } from "react";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
-
5
- //#region src/ui/preserve-focus-button/preserve-focus.d.ts
6
- declare function PreserveFocusButton({
7
- className,
8
- onMouseDown,
9
- ...props
10
- }: ComponentProps<typeof Button>): react_jsx_runtime0.JSX.Element;
11
- //#endregion
12
- export { PreserveFocusButton };
@@ -1,12 +0,0 @@
1
- import { t as Button } from "../../button-DRIyBtEB.mjs";
2
- import { ComponentProps } from "react";
3
- import * as react_jsx_runtime4 from "react/jsx-runtime";
4
-
5
- //#region src/ui/preserve-focus-button/preserve-focus.d.ts
6
- declare function PreserveFocusButton({
7
- className,
8
- onMouseDown,
9
- ...props
10
- }: ComponentProps<typeof Button>): react_jsx_runtime4.JSX.Element;
11
- //#endregion
12
- export { PreserveFocusButton };
@@ -1 +0,0 @@
1
- "use client";import"../../common-ZUMpASnc.mjs";import{t as e}from"../../button-CQZuaIU7.mjs";import{jsx as t}from"react/jsx-runtime";function n({className:n,onMouseDown:r,...i}){return t(e,{...i,onMouseDown:e=>{e.preventDefault(),r?.(e)}})}export{n as PreserveFocusButton};
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./common-D4sUwkFd.cjs`);let n=require(`react`);n=e.t(n);let r=require(`react/jsx-runtime`),i=require(`clsx`);i=e.t(i);let a=require(`class-variance-authority`);function o({className:e,items:t,render:a,...o}){return(0,r.jsx)(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:(0,i.default)(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:(0,r.jsx)(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>(0,r.jsx)(n.default.Fragment,{children:a(e)},t))})})}function s({condition:e,wrapper:t,children:n}){return e?t(n):n}function c({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const l=(0,a.cva)(t.n(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}}),u=(0,n.forwardRef)(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:i=`xl`,outline:a=`line`,rounded:o=`lg`,className:s,...c},u)=>(0,r.jsxs)(`div`,{"data-komc":!0,className:l({size:n,gap:i,outline:a,rounded:o,className:s}),children:[e,(0,r.jsx)(`input`,{ref:u,type:`text`,...c}),t]}));var d=u;function f({children:e,className:t,...n}){return(0,r.jsx)(`span`,{...n,"data-komc":!0,"data-text":`${e}`,className:(0,i.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`,t),children:e})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
@@ -1 +0,0 @@
1
- import{n as e}from"./common-ZUMpASnc.mjs";import t,{forwardRef as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a from"clsx";import{cva as o}from"class-variance-authority";function s({className:e,items:n,render:i,...o}){return r(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:a(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:r(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${n.length}, 1fr)`},children:n.map((e,n)=>r(t.Fragment,{children:i(e)},n))})})}function c({condition:e,wrapper:t,children:n}){return e?t(n):n}function l({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const u=o(e(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}});var d=n(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:a=`xl`,outline:o=`line`,rounded:s=`lg`,className:c,...l},d)=>i(`div`,{"data-komc":!0,className:u({size:n,gap:a,outline:o,rounded:s,className:c}),children:[e,r(`input`,{ref:d,type:`text`,...l}),t]}));function f({children:e,className:t,...n}){return r(`span`,{...n,"data-komc":!0,"data-text":`${e}`,className:a(`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`,t),children:e})}export{s as a,c as i,d as n,l as r,f as t};
@@ -1 +0,0 @@
1
- import{useCallback as e,useEffect as t,useRef as n,useState as r}from"react";const i={DEFAULT_WIDTH:200,DEFAULT_HEIGHT:100},a={width:i.DEFAULT_WIDTH,height:i.DEFAULT_HEIGHT},o={width:!0,height:!0};function s(e,t,n){let r=e;return t!==void 0&&(r=Math.max(r,t)),n!==void 0&&(r=Math.min(r,n)),r}function c(e,t,n,r){let i={...t};return e.includes(`left`)&&(i.width=t.width-n),e.includes(`right`)&&(i.width=t.width+n),e.includes(`top`)&&(i.height=t.height-r),e.includes(`bottom`)&&(i.height=t.height+r),i}function l(e,t,n){let r=[],i=[];return n?.width!==void 0&&r.push(n.width),n?.height!==void 0&&i.push(n.height),e&&(t.width&&r.push(e.width),t.height&&i.push(e.height)),{width:r.length?Math.min(...r):void 0,height:i.length?Math.min(...i):void 0}}function u(e,t,n){let{width:r,height:i}=e;if(t===`left`||t===`right`)return{width:r,height:r/n};if(t===`top`||t===`bottom`)return{width:i*n,height:i};let a={width:r,height:r/n},o={width:i*n,height:i};return Math.abs(a.height-i)<=Math.abs(o.width-r)?a:o}function d(e,t,n,r){if(!r)return{width:Math.ceil(s(e.width,t.width,n.width)),height:Math.ceil(s(e.height,t.height,n.height))};let{width:i,height:a}=e;(i<=0||a<=0)&&(i=t.width,a=t.width/r);let o=Math.min(n.width===void 0?1:n.width/i,n.height===void 0?1:n.height/a,1);i*=o,a*=o;let c=Math.max(i<t.width?t.width/i:1,a<t.height?t.height/a:1,1);i*=c,a*=c;let l=Math.min(n.width===void 0?1:n.width/i,n.height===void 0?1:n.height/a,1);return i*=l,a*=l,{width:Math.ceil(i),height:Math.ceil(a)}}function f(e,t,n){let r=c(t.direction,t.startSize,e.clientX-t.startX,e.clientY-t.startY),i=n.keepAspectRatio&&t.startSize.height>0?t.startSize.width/t.startSize.height:null,a=i?u(r,t.direction,i):r,o=l(n.boundaryRef?.current?.getBoundingClientRect(),n.limitSize,n.maxSize);return d(a,n.minSize,o,i)}function p({boundaryRef:i,size:s,keepAspectRatio:c=!0,minSize:l=a,maxSize:u,limitSize:d=o,onResize:p,onResizeEnd:m}){let[h,g]=r(!1),_=n(null),v=n({boundaryRef:i,size:s,keepAspectRatio:c,limitSize:d,minSize:l,maxSize:u,onResize:p,onResizeEnd:m});t(()=>{v.current={boundaryRef:i,size:s,keepAspectRatio:c,limitSize:d,minSize:l,maxSize:u,onResize:p,onResizeEnd:m}});let y=e(e=>{let t=_.current;!t||e.pointerId!==t.pointerId||(_.current=null,g(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),v.current.onResizeEnd?.(t.lastSize))},[]),b=e(e=>{let t=_.current;if(!t||e.pointerId!==t.pointerId)return;let n=f(e,t,v.current);t.lastSize=n,v.current.onResize?.(n)},[]);return t(()=>()=>{_.current=null},[]),{isResizing:h,getHandleProps:e(e=>({onPointerDown:t=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId);let n=v.current.size,r={width:n.width,height:n.height};_.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,startSize:r,direction:e,lastSize:r},g(!0)},onPointerMove:b,onPointerUp:y,onPointerCancel:y,style:{touchAction:`none`}}),[b,y])}}export{p as n,i as t};
@@ -1,48 +0,0 @@
1
- //#region src/hooks/use-drag-resize.d.ts
2
- declare const RESIZE_CONSTANTS: {
3
- DEFAULT_WIDTH: number;
4
- DEFAULT_HEIGHT: number;
5
- };
6
- type ResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
7
- interface Size {
8
- width: number;
9
- height: number;
10
- }
11
- interface LimitSize {
12
- width: boolean;
13
- height: boolean;
14
- }
15
- interface ResizeHandleProps {
16
- onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
17
- onPointerMove: (event: React.PointerEvent<HTMLElement>) => void;
18
- onPointerUp: (event: React.PointerEvent<HTMLElement>) => void;
19
- onPointerCancel: (event: React.PointerEvent<HTMLElement>) => void;
20
- style: {
21
- touchAction: 'none';
22
- };
23
- }
24
- interface UseDragResizeProps {
25
- boundaryRef?: React.RefObject<HTMLElement | null>;
26
- size: Size;
27
- keepAspectRatio?: boolean;
28
- limitSize?: LimitSize;
29
- minSize?: Size;
30
- maxSize?: Size;
31
- onResize?: (size: Size) => void;
32
- onResizeEnd?: (size: Size) => void;
33
- }
34
- declare function useDragResize({
35
- boundaryRef,
36
- size,
37
- keepAspectRatio,
38
- minSize,
39
- maxSize,
40
- limitSize,
41
- onResize,
42
- onResizeEnd
43
- }: UseDragResizeProps): {
44
- isResizing: boolean;
45
- getHandleProps: (direction: ResizeDirection) => ResizeHandleProps;
46
- };
47
- //#endregion
48
- export { Size as a, ResizeHandleProps as i, RESIZE_CONSTANTS as n, UseDragResizeProps as o, ResizeDirection as r, useDragResize as s, LimitSize as t };
@@ -1,48 +0,0 @@
1
- //#region src/hooks/use-drag-resize.d.ts
2
- declare const RESIZE_CONSTANTS: {
3
- DEFAULT_WIDTH: number;
4
- DEFAULT_HEIGHT: number;
5
- };
6
- type ResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
7
- interface Size {
8
- width: number;
9
- height: number;
10
- }
11
- interface LimitSize {
12
- width: boolean;
13
- height: boolean;
14
- }
15
- interface ResizeHandleProps {
16
- onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
17
- onPointerMove: (event: React.PointerEvent<HTMLElement>) => void;
18
- onPointerUp: (event: React.PointerEvent<HTMLElement>) => void;
19
- onPointerCancel: (event: React.PointerEvent<HTMLElement>) => void;
20
- style: {
21
- touchAction: 'none';
22
- };
23
- }
24
- interface UseDragResizeProps {
25
- boundaryRef?: React.RefObject<HTMLElement | null>;
26
- size: Size;
27
- keepAspectRatio?: boolean;
28
- limitSize?: LimitSize;
29
- minSize?: Size;
30
- maxSize?: Size;
31
- onResize?: (size: Size) => void;
32
- onResizeEnd?: (size: Size) => void;
33
- }
34
- declare function useDragResize({
35
- boundaryRef,
36
- size,
37
- keepAspectRatio,
38
- minSize,
39
- maxSize,
40
- limitSize,
41
- onResize,
42
- onResizeEnd
43
- }: UseDragResizeProps): {
44
- isResizing: boolean;
45
- getHandleProps: (direction: ResizeDirection) => ResizeHandleProps;
46
- };
47
- //#endregion
48
- export { Size as a, ResizeHandleProps as i, RESIZE_CONSTANTS as n, UseDragResizeProps as o, ResizeDirection as r, useDragResize as s, LimitSize as t };
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);const n={DEFAULT_WIDTH:200,DEFAULT_HEIGHT:100},r={width:n.DEFAULT_WIDTH,height:n.DEFAULT_HEIGHT},i={width:!0,height:!0};function a(e,t,n){let r=e;return t!==void 0&&(r=Math.max(r,t)),n!==void 0&&(r=Math.min(r,n)),r}function o(e,t,n,r){let i={...t};return e.includes(`left`)&&(i.width=t.width-n),e.includes(`right`)&&(i.width=t.width+n),e.includes(`top`)&&(i.height=t.height-r),e.includes(`bottom`)&&(i.height=t.height+r),i}function s(e,t,n){let r=[],i=[];return n?.width!==void 0&&r.push(n.width),n?.height!==void 0&&i.push(n.height),e&&(t.width&&r.push(e.width),t.height&&i.push(e.height)),{width:r.length?Math.min(...r):void 0,height:i.length?Math.min(...i):void 0}}function c(e,t,n){let{width:r,height:i}=e;if(t===`left`||t===`right`)return{width:r,height:r/n};if(t===`top`||t===`bottom`)return{width:i*n,height:i};let a={width:r,height:r/n},o={width:i*n,height:i};return Math.abs(a.height-i)<=Math.abs(o.width-r)?a:o}function l(e,t,n,r){if(!r)return{width:Math.ceil(a(e.width,t.width,n.width)),height:Math.ceil(a(e.height,t.height,n.height))};let{width:i,height:o}=e;(i<=0||o<=0)&&(i=t.width,o=t.width/r);let s=Math.min(n.width===void 0?1:n.width/i,n.height===void 0?1:n.height/o,1);i*=s,o*=s;let c=Math.max(i<t.width?t.width/i:1,o<t.height?t.height/o:1,1);i*=c,o*=c;let l=Math.min(n.width===void 0?1:n.width/i,n.height===void 0?1:n.height/o,1);return i*=l,o*=l,{width:Math.ceil(i),height:Math.ceil(o)}}function u(e,t,n){let r=o(t.direction,t.startSize,e.clientX-t.startX,e.clientY-t.startY),i=n.keepAspectRatio&&t.startSize.height>0?t.startSize.width/t.startSize.height:null,a=i?c(r,t.direction,i):r,u=s(n.boundaryRef?.current?.getBoundingClientRect(),n.limitSize,n.maxSize);return l(a,n.minSize,u,i)}function d({boundaryRef:e,size:n,keepAspectRatio:a=!0,minSize:o=r,maxSize:s,limitSize:c=i,onResize:l,onResizeEnd:d}){let[f,p]=(0,t.useState)(!1),m=(0,t.useRef)(null),h=(0,t.useRef)({boundaryRef:e,size:n,keepAspectRatio:a,limitSize:c,minSize:o,maxSize:s,onResize:l,onResizeEnd:d});(0,t.useEffect)(()=>{h.current={boundaryRef:e,size:n,keepAspectRatio:a,limitSize:c,minSize:o,maxSize:s,onResize:l,onResizeEnd:d}});let g=(0,t.useCallback)(e=>{let t=m.current;!t||e.pointerId!==t.pointerId||(m.current=null,p(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),h.current.onResizeEnd?.(t.lastSize))},[]),_=(0,t.useCallback)(e=>{let t=m.current;if(!t||e.pointerId!==t.pointerId)return;let n=u(e,t,h.current);t.lastSize=n,h.current.onResize?.(n)},[]);return(0,t.useEffect)(()=>()=>{m.current=null},[]),{isResizing:f,getHandleProps:(0,t.useCallback)(e=>({onPointerDown:t=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId);let n=h.current.size,r={width:n.width,height:n.height};m.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,startSize:r,direction:e,lastSize:r},p(!0)},onPointerMove:_,onPointerUp:g,onPointerCancel:g,style:{touchAction:`none`}}),[_,g])}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -1 +0,0 @@
1
- import{a as e,i as t,o as n}from"./file-B-UJkabO.mjs";import{n as r}from"./api-client-C0sbSOQf.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)=>{let n=e.startsWith(`/`)?e.slice(1):e;return t===`static`?y.cdnStatic(n):y.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};
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./file-5mweNdAM.cjs`),n=require(`./api-client-C3o2pO0q.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)=>{let n=e.startsWith(`/`)?e.slice(1):e;return t===`static`?p.cdnStatic(n):p.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}});
@@ -1 +0,0 @@
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 +0,0 @@
1
- const e=require(`../common-D4sUwkFd.cjs`);exports.calcPageCount=e.t,exports.cn=e.n,exports.comparePriorityAsc=e.r,exports.composeKey=e.i,exports.existLeastOne=e.a,exports.getFirstLocationAddress=e.o,exports.getFullAddress=e.s,exports.getI18nKey=e.c,exports.getI18nValue=e.l,exports.getI18nValues=e.u,exports.getImageInfo=e.d,exports.getModelName=e.f,exports.link=e.p,exports.loadExLib=e.m,exports.parseQuery=e.h,exports.productSlugify=e.g,exports.selectItemByWeight=e._,exports.shuffle=e.v,exports.sleep=e.y,exports.slugify=e.b,exports.sortI18nByPriority=e.x,exports.withoutProperties=e.S,exports.withoutProperty=e.C;
@@ -1 +0,0 @@
1
- import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../common-ZUMpASnc.mjs";export{v as calcPageCount,p as cn,g as comparePriorityAsc,u as composeKey,r as existLeastOne,m as getFirstLocationAddress,_ as getFullAddress,a as getI18nKey,d as getI18nValue,y as getI18nValues,o as getImageInfo,s as getModelName,h as link,f as loadExLib,l as parseQuery,c as productSlugify,n as selectItemByWeight,b as shuffle,S as sleep,i as slugify,x as sortI18nByPriority,t as withoutProperties,e as withoutProperty};
@@ -1 +0,0 @@
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 +0,0 @@
1
- const e=require(`../chunk-Bmb41Sf3.cjs`);let t=require(`@tiptap/core`);const n=(e,t)=>!e.content||!Array.isArray(e.content)?e:{...e,content:e.content.filter(e=>!t.includes(e.type)).map(e=>n(e,t))},r=(e,r=[],i)=>{if(!i||e.length===0)return i;try{return(0,t.generateHTML)(n((0,t.generateJSON)(i,r),e),r)}catch(e){return console.error(`Failed to remove Tiptap nodes:`,e),i}},i=[`description`,`desc`];function a(e,t=[],n=[],a={}){let{default:o,fields:s=i}=a,c=o!==void 0;if(e===null)return null;if(e!==void 0){if(typeof e==`string`){let i=r(n,t,e);return c?i||o:i}return Array.isArray(e)?e.map(e=>{let i={};for(let a of s){if(!(a in e))continue;let s=e[a];if(s!=null&&typeof s!=`string`)continue;let l=s==null?s:r(n,t,s);i[a]=c?l||o:l}return Object.keys(i).length>0?{...e,...i}:e}):e}}const o=.75;function s(e){let{view:n,state:r}=e,{from:i,to:a}=r.selection,o=(0,t.posToDOMRect)(n,i,a),s=n.dom.getBoundingClientRect(),c=r.doc.content.size;return i<=1&&a>=c-1||o.height>=s.height*.75}function c(e){let{view:t,state:n}=e,{from:r,to:i}=n.selection,a=t.coordsAtPos(r),o=t.coordsAtPos(i),s=t.dom.getBoundingClientRect(),c=Math.max(s.top,0),l=Math.min(s.bottom,window.innerHeight),u=Math.min(a.top,o.top),d=Math.max(a.bottom,o.bottom),f=Math.max(u,c),p=Math.min(d,l),m=s.left,h=s.right,g=(f+p)/2;return new DOMRect(m,g,Math.max(h-m,0),0)}exports.isLargeTextSelection=s,exports.parseDescription=a,exports.removeNodes=r,exports.visibleSelectionRect=c;
@@ -1,21 +0,0 @@
1
- import { Editor, Extension, Node } from "@tiptap/core";
2
-
3
- //#region src/util/editor.d.ts
4
- declare const removeNodes: (nodeNames: string[], extensions?: Array<Extension | Node>, html?: string | null) => string | null | undefined;
5
- interface ParseOptions {
6
- default?: string | null;
7
- }
8
- interface ParseArrayOptions<F extends string> extends ParseOptions {
9
- fields?: readonly F[];
10
- }
11
- declare function parseDescription(input: string, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string;
12
- declare function parseDescription(input: null, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): null;
13
- declare function parseDescription(input: undefined, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): undefined;
14
- declare function parseDescription(input: string | null | undefined, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string | null | undefined;
15
- declare function parseDescription(input: string | null, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string | null;
16
- declare function parseDescription(input: string | undefined, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string | undefined;
17
- declare function parseDescription<T extends Record<string, any>>(input: T[], extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseArrayOptions<Extract<keyof T, string>>): T[];
18
- declare function isLargeTextSelection(editor: Editor): boolean;
19
- declare function visibleSelectionRect(editor: Editor): DOMRect;
20
- //#endregion
21
- export { isLargeTextSelection, parseDescription, removeNodes, visibleSelectionRect };
@@ -1,21 +0,0 @@
1
- import { Editor, Extension, Node } from "@tiptap/core";
2
-
3
- //#region src/util/editor.d.ts
4
- declare const removeNodes: (nodeNames: string[], extensions?: Array<Extension | Node>, html?: string | null) => string | null | undefined;
5
- interface ParseOptions {
6
- default?: string | null;
7
- }
8
- interface ParseArrayOptions<F extends string> extends ParseOptions {
9
- fields?: readonly F[];
10
- }
11
- declare function parseDescription(input: string, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string;
12
- declare function parseDescription(input: null, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): null;
13
- declare function parseDescription(input: undefined, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): undefined;
14
- declare function parseDescription(input: string | null | undefined, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string | null | undefined;
15
- declare function parseDescription(input: string | null, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string | null;
16
- declare function parseDescription(input: string | undefined, extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseOptions): string | undefined;
17
- declare function parseDescription<T extends Record<string, any>>(input: T[], extensions: Array<Extension | Node>, excludeNodes: string[], options?: ParseArrayOptions<Extract<keyof T, string>>): T[];
18
- declare function isLargeTextSelection(editor: Editor): boolean;
19
- declare function visibleSelectionRect(editor: Editor): DOMRect;
20
- //#endregion
21
- export { isLargeTextSelection, parseDescription, removeNodes, visibleSelectionRect };
@@ -1 +0,0 @@
1
- import{generateHTML as e,generateJSON as t,posToDOMRect as n}from"@tiptap/core";const r=(e,t)=>!e.content||!Array.isArray(e.content)?e:{...e,content:e.content.filter(e=>!t.includes(e.type)).map(e=>r(e,t))},i=(n,i=[],a)=>{if(!a||n.length===0)return a;try{return e(r(t(a,i),n),i)}catch(e){return console.error(`Failed to remove Tiptap nodes:`,e),a}},a=[`description`,`desc`];function o(e,t=[],n=[],r={}){let{default:o,fields:s=a}=r,c=o!==void 0;if(e===null)return null;if(e!==void 0){if(typeof e==`string`){let r=i(n,t,e);return c?r||o:r}return Array.isArray(e)?e.map(e=>{let r={};for(let a of s){if(!(a in e))continue;let s=e[a];if(s!=null&&typeof s!=`string`)continue;let l=s==null?s:i(n,t,s);r[a]=c?l||o:l}return Object.keys(r).length>0?{...e,...r}:e}):e}}function s(e){let{view:t,state:r}=e,{from:i,to:a}=r.selection,o=n(t,i,a),s=t.dom.getBoundingClientRect(),c=r.doc.content.size;return i<=1&&a>=c-1||o.height>=s.height*.75}function c(e){let{view:t,state:n}=e,{from:r,to:i}=n.selection,a=t.coordsAtPos(r),o=t.coordsAtPos(i),s=t.dom.getBoundingClientRect(),c=Math.max(s.top,0),l=Math.min(s.bottom,window.innerHeight),u=Math.min(a.top,o.top),d=Math.max(a.bottom,o.bottom),f=Math.max(u,c),p=Math.min(d,l),m=s.left,h=s.right,g=(f+p)/2;return new DOMRect(m,g,Math.max(h-m,0),0)}export{s as isLargeTextSelection,o as parseDescription,i as removeNodes,c as visibleSelectionRect};
@@ -1 +0,0 @@
1
- const e=require(`../file-5mweNdAM.cjs`);exports.formatBytes=e.t,exports.getFileExtension=e.n,exports.getFilename=e.r,exports.isExternalSrc=e.i,exports.isSrcSetCompatible=e.a,exports.parsePath=e.o;
@@ -1 +0,0 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"../file-B-UJkabO.mjs";export{a as formatBytes,n as getFileExtension,i as getFilename,t as isExternalSrc,e as isSrcSetCompatible,r as parsePath};
@@ -1 +0,0 @@
1
- const e=require(`../format-DEuImTYJ.cjs`);exports.computeAspectRatio=e.t,exports.formatCompactNumber=e.n,exports.formatExceedNumber=e.r,exports.formatKoNumber=e.i;
@@ -1,34 +0,0 @@
1
- //#region src/util/format.d.ts
2
- declare const formatCompactNumber: (number: number, locale?: string, options?: Intl.NumberFormatOptions) => string;
3
- declare const formatExceedNumber: (number: number, threshold: number, suffix?: string) => string;
4
- declare const formatKoNumber: (number?: number | string | null) => string;
5
- interface ComputeAspectRatioParams {
6
- min: {
7
- width: number;
8
- height: number;
9
- };
10
- max: {
11
- width: number;
12
- height: number;
13
- };
14
- width: number;
15
- height: number;
16
- type: 'width' | 'height';
17
- currentRatio?: number;
18
- }
19
- type ComputeAspectRatioWarning = 'width-under-min' | 'width-over-max' | 'height-under-min';
20
- interface ComputeAspectRatioResult {
21
- width: number;
22
- height: number;
23
- result: ComputeAspectRatioWarning | null;
24
- }
25
- declare const computeAspectRatio: ({
26
- min,
27
- max,
28
- width,
29
- height,
30
- type,
31
- currentRatio
32
- }: ComputeAspectRatioParams) => ComputeAspectRatioResult;
33
- //#endregion
34
- export { ComputeAspectRatioWarning, computeAspectRatio, formatCompactNumber, formatExceedNumber, formatKoNumber };