@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.
- package/README.md +132 -63
- package/dist/align-CdK8Ar2w.mjs +1 -0
- package/dist/align-Dp4avXIm.cjs +1 -0
- package/dist/{api-client-C3o2pO0q.cjs → api-client-BXH8Rm-J.cjs} +1 -1
- package/dist/{api-client-C0sbSOQf.mjs → api-client-xK3Ua3Gr.mjs} +1 -1
- package/dist/basic-image-D26zahpC.mjs +1 -0
- package/dist/basic-image-Wl0IBgOX.cjs +1 -0
- package/dist/country-flag-8HG6HZPi.cjs +1 -0
- package/dist/country-flag-Bypgu_rR.mjs +1 -0
- package/dist/custom-heading-By14y5ug.cjs +1 -0
- package/dist/custom-heading-eGRLcDQZ.mjs +1 -0
- package/dist/dnd-CeWNVM-V.mjs +1 -0
- package/dist/dnd-DHNRwFj8.cjs +1 -0
- package/dist/editor/extensions/align/index.cjs +1 -0
- package/dist/editor/extensions/align/index.d.cts +2 -0
- package/dist/editor/extensions/align/index.d.mts +2 -0
- package/dist/editor/extensions/align/index.mjs +1 -0
- package/dist/editor/extensions/table-controls/index.cjs +1 -0
- package/dist/editor/extensions/table-controls/index.d.cts +2 -0
- package/dist/editor/extensions/table-controls/index.d.mts +2 -0
- package/dist/editor/extensions/table-controls/index.mjs +1 -0
- package/dist/editor/extensions/table-resize/index.cjs +1 -0
- package/dist/editor/extensions/table-resize/index.d.cts +2 -0
- package/dist/editor/extensions/table-resize/index.d.mts +2 -0
- package/dist/editor/extensions/table-resize/index.mjs +1 -0
- package/dist/editor/index.cjs +1 -1
- package/dist/editor/index.d.cts +51 -73
- package/dist/editor/index.d.mts +51 -73
- package/dist/editor/index.mjs +1 -1
- package/dist/editor/nodes/basic-image/index.cjs +1 -0
- package/dist/editor/nodes/basic-image/index.d.cts +4 -0
- package/dist/editor/nodes/basic-image/index.d.mts +4 -0
- package/dist/editor/nodes/basic-image/index.mjs +1 -0
- package/dist/editor/nodes/custom-heading/index.cjs +1 -0
- package/dist/editor/nodes/custom-heading/index.d.cts +2 -0
- package/dist/editor/nodes/custom-heading/index.d.mts +2 -0
- package/dist/editor/nodes/custom-heading/index.mjs +1 -0
- package/dist/editor/nodes/menu-wrapper/index.cjs +1 -0
- package/dist/editor/nodes/menu-wrapper/index.d.cts +54 -0
- package/dist/editor/nodes/menu-wrapper/index.d.mts +54 -0
- package/dist/editor/nodes/menu-wrapper/index.mjs +1 -0
- package/dist/editor/nodes/node-resize/index.cjs +1 -0
- package/dist/editor/nodes/node-resize/index.d.cts +27 -0
- package/dist/editor/nodes/node-resize/index.d.mts +27 -0
- package/dist/editor/nodes/node-resize/index.mjs +1 -0
- package/dist/editor/nodes/node-size/index.cjs +1 -0
- package/dist/editor/nodes/node-size/index.d.cts +3 -0
- package/dist/editor/nodes/node-size/index.d.mts +3 -0
- package/dist/editor/nodes/node-size/index.mjs +1 -0
- package/dist/editor/nodes/node-view-context/index.cjs +1 -0
- package/dist/editor/nodes/node-view-context/index.d.cts +2 -0
- package/dist/editor/nodes/node-view-context/index.d.mts +2 -0
- package/dist/editor/nodes/node-view-context/index.mjs +1 -0
- package/dist/editor/nodes/subset-image/index.cjs +1 -0
- package/dist/editor/nodes/subset-image/index.d.cts +5 -0
- package/dist/editor/nodes/subset-image/index.d.mts +5 -0
- package/dist/editor/nodes/subset-image/index.mjs +1 -0
- package/dist/editor/nodes/table/index.cjs +1 -0
- package/dist/editor/nodes/table/index.d.cts +2 -0
- package/dist/editor/nodes/table/index.d.mts +2 -0
- package/dist/editor/nodes/table/index.mjs +1 -0
- package/dist/editor/nodes/tabs/index.cjs +1 -0
- package/dist/editor/nodes/tabs/index.d.cts +2 -0
- package/dist/editor/nodes/tabs/index.d.mts +2 -0
- package/dist/editor/nodes/tabs/index.mjs +1 -0
- package/dist/editor-CHuJTM4H.mjs +1 -0
- package/dist/editor-DvLUotoh.cjs +1 -0
- package/dist/{file-B-UJkabO.mjs → file-CapBKYce.mjs} +1 -1
- package/dist/file-DeZ1OKdy.cjs +1 -0
- package/dist/hooks/use-delay-unmount/index.cjs +1 -0
- package/dist/hooks/use-delay-unmount/index.d.cts +4 -0
- package/dist/hooks/use-delay-unmount/index.d.mts +4 -0
- package/dist/hooks/use-delay-unmount/index.mjs +1 -0
- package/dist/hooks/use-dialog-stack/index.cjs +1 -0
- package/dist/hooks/use-dialog-stack/index.d.cts +4 -0
- package/dist/hooks/use-dialog-stack/index.d.mts +4 -0
- package/dist/hooks/use-dialog-stack/index.mjs +1 -0
- package/dist/hooks/use-drag-resize/index.cjs +1 -0
- package/dist/hooks/use-drag-resize/index.d.cts +2 -0
- package/dist/hooks/use-drag-resize/index.d.mts +2 -0
- package/dist/hooks/use-drag-resize/index.mjs +1 -0
- package/dist/hooks/use-drag-scroll/index.cjs +1 -0
- package/dist/hooks/use-drag-scroll/index.d.cts +13 -0
- package/dist/hooks/use-drag-scroll/index.d.mts +13 -0
- package/dist/hooks/use-drag-scroll/index.mjs +1 -0
- package/dist/hooks/use-effect-once/index.cjs +1 -0
- package/dist/hooks/use-effect-once/index.d.cts +7 -0
- package/dist/hooks/use-effect-once/index.d.mts +7 -0
- package/dist/hooks/use-effect-once/index.mjs +1 -0
- package/dist/hooks/use-outside-click/index.cjs +1 -0
- package/dist/hooks/use-outside-click/index.d.cts +13 -0
- package/dist/hooks/use-outside-click/index.d.mts +13 -0
- package/dist/hooks/use-outside-click/index.mjs +1 -0
- package/dist/hooks/use-scroll-lock/index.cjs +1 -0
- package/dist/hooks/use-scroll-lock/index.d.cts +12 -0
- package/dist/hooks/use-scroll-lock/index.d.mts +12 -0
- package/dist/hooks/use-scroll-lock/index.mjs +1 -0
- package/dist/hooks/use-scroll-top/index.cjs +1 -0
- package/dist/hooks/use-scroll-top/index.d.cts +17 -0
- package/dist/hooks/use-scroll-top/index.d.mts +17 -0
- package/dist/hooks/use-scroll-top/index.mjs +1 -0
- package/dist/hooks/use-snackbar/index.cjs +1 -0
- package/dist/hooks/{use-snackbar.d.cts → use-snackbar/index.d.cts} +1 -1
- package/dist/hooks/{use-snackbar.d.mts → use-snackbar/index.d.mts} +1 -1
- package/dist/hooks/use-sticky/index.cjs +1 -0
- package/dist/hooks/use-sticky/index.d.cts +9 -0
- package/dist/hooks/use-sticky/index.d.mts +9 -0
- package/dist/hooks/use-sticky/index.mjs +1 -0
- package/dist/hooks/use-subset-image/index.cjs +1 -0
- package/dist/hooks/use-subset-image/index.d.cts +2 -0
- package/dist/hooks/use-subset-image/index.d.mts +2 -0
- package/dist/hooks/use-subset-image/index.mjs +1 -0
- package/dist/hooks/use-window-size/index.cjs +1 -0
- package/dist/hooks/use-window-size/index.d.cts +6 -0
- package/dist/hooks/use-window-size/index.d.mts +6 -0
- package/dist/hooks/use-window-size/index.mjs +1 -0
- package/dist/image-CAEWHuaM.mjs +1 -0
- package/dist/image-kIL2PjTS.cjs +1 -0
- package/dist/index-90Zl6qBK.d.cts +17 -0
- package/dist/index-BD2sHM7a.d.cts +34 -0
- package/dist/index-BJgz2hkX.d.cts +56 -0
- package/dist/index-BKqI0jBF.d.mts +43 -0
- package/dist/index-BMZtFPh-.d.cts +43 -0
- package/dist/index-BT7Y7xkm.d.cts +7 -0
- package/dist/index-BTUIpavj.d.mts +34 -0
- package/dist/index-BlQhHmTa.d.cts +31 -0
- package/dist/index-BoJg4HO3.d.mts +56 -0
- package/dist/{util/fetcher.d.cts → index-Bpp6ufv-.d.cts} +2 -2
- package/dist/index-BxqkZ148.d.cts +18 -0
- package/dist/index-C3wA7a3i.d.mts +7 -0
- package/dist/index-CLxl-tUO.d.cts +41 -0
- package/dist/index-CV-nhdHd.d.mts +43 -0
- package/dist/{util/fetcher.d.mts → index-C_5zGF-K.d.mts} +2 -2
- package/dist/index-C_YTuhwX.d.mts +11 -0
- package/dist/index-CcpFy_mT.d.mts +17 -0
- package/dist/{index-B1YNV_Vm.d.cts → index-CqZGdObz.d.mts} +47 -15
- package/dist/index-Cxc49Lmr.d.mts +19 -0
- package/dist/index-D-NPxMFr.d.cts +11 -0
- package/dist/index-D0Uuydfo.d.cts +6 -0
- package/dist/index-D5uh7klO.d.mts +18 -0
- package/dist/{index-C8chDULk.d.mts → index-DCzaZKG0.d.cts} +47 -15
- package/dist/index-DDG8MvPD.d.mts +31 -0
- package/dist/index-DEolXbf5.d.cts +26 -0
- package/dist/index-DHXj3w9p.d.mts +40 -0
- package/dist/{use-subset-image-Dygkyw-W.d.mts → index-DHyXKIBX.d.cts} +1 -1
- package/dist/index-DSVr-P8y.d.mts +45 -0
- package/dist/index-DTtrJ-ei.d.cts +10 -0
- package/dist/index-D_Hfb-z2.d.cts +45 -0
- package/dist/index-DeXwS1TW.d.mts +10 -0
- package/dist/index-Dhkwd0rJ.d.cts +19 -0
- package/dist/index-DrUJZDtK.d.cts +43 -0
- package/dist/index-DvEtYdm4.d.cts +40 -0
- package/dist/{use-subset-image-bDB5TSd4.d.cts → index-DxW8JBva.d.mts} +1 -1
- package/dist/index-X2XMkoEC.d.mts +26 -0
- package/dist/index-aA4ojwuQ.d.mts +6 -0
- package/dist/index-wiRVGgrx.d.mts +41 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/label-DeEAgKAc.mjs +1 -0
- package/dist/label-jZuNIGyF.cjs +1 -0
- package/dist/node-resize-Cs4wR_HY.mjs +1 -0
- package/dist/node-resize-dantnBzP.cjs +1 -0
- package/dist/node-size-BQQGo7t7.cjs +1 -0
- package/dist/node-size-Bg-g2Png.mjs +1 -0
- package/dist/node-view-context-D-1j5isf.mjs +1 -0
- package/dist/node-view-context-YTl_1gGD.cjs +1 -0
- package/dist/providers/api-client/index.cjs +1 -1
- package/dist/providers/api-client/index.d.cts +3 -3
- package/dist/providers/api-client/index.d.mts +3 -3
- package/dist/providers/api-client/index.mjs +1 -1
- package/dist/providers/editor/index.cjs +1 -0
- package/dist/providers/editor/index.d.cts +21 -0
- package/dist/providers/editor/index.d.mts +21 -0
- package/dist/providers/editor/index.mjs +1 -0
- package/dist/providers/noti-stack/index.cjs +1 -1
- package/dist/providers/noti-stack/index.d.cts +2 -2
- package/dist/providers/noti-stack/index.mjs +1 -1
- package/dist/select-field-CoNJTWRb.cjs +1 -0
- package/dist/select-field-DeyQlWxq.mjs +1 -0
- package/dist/skeleton-7P1IZD3G.cjs +1 -0
- package/dist/skeleton-D4Q9wT-o.mjs +1 -0
- package/dist/src-BB55dPBE.mjs +1 -0
- package/dist/src-Dz1mULYA.cjs +1 -0
- package/dist/styles/admin.css +2424 -0
- package/dist/styles/editor.css +2917 -63
- package/dist/styles/index.css +788 -184
- package/dist/subset-image-AaZA0RuB.cjs +1 -0
- package/dist/subset-image-Co0fWefj.mjs +1 -0
- package/dist/subset-image-DnZ2TqZY.mjs +1 -0
- package/dist/subset-image-P2NQM0-3.cjs +0 -0
- package/dist/switch-BDdSF3lu.cjs +1 -0
- package/dist/switch-DTQt7BzY.mjs +1 -0
- package/dist/table-CKVL_ezW.mjs +1 -0
- package/dist/table-DmwOZtdl.cjs +1 -0
- package/dist/table-controls-CQmqnc4R.cjs +1 -0
- package/dist/table-controls-CpCGiLvR.mjs +1 -0
- package/dist/table-resize-DI2Pf2Mi.cjs +1 -0
- package/dist/table-resize-w9EsReKV.mjs +1 -0
- package/dist/tabs-DQ1db_eg.mjs +1 -0
- package/dist/tabs-DiryrHZ7.cjs +1 -0
- package/dist/text-field-CTxoUkAg.cjs +1 -0
- package/dist/text-field-D2x9nugT.mjs +1 -0
- package/dist/ui/admin/async-select-field/index.cjs +1 -0
- package/dist/ui/admin/async-select-field/index.d.cts +35 -0
- package/dist/ui/admin/async-select-field/index.d.mts +35 -0
- package/dist/ui/admin/async-select-field/index.mjs +1 -0
- package/dist/ui/admin/country-select/index.cjs +1 -0
- package/dist/ui/admin/country-select/index.d.cts +47 -0
- package/dist/ui/admin/country-select/index.d.mts +47 -0
- package/dist/ui/admin/country-select/index.mjs +1 -0
- package/dist/ui/admin/dropzone-field/index.cjs +1 -0
- package/dist/ui/admin/dropzone-field/index.d.cts +110 -0
- package/dist/ui/admin/dropzone-field/index.d.mts +110 -0
- package/dist/ui/admin/dropzone-field/index.mjs +1 -0
- package/dist/ui/admin/email-field/index.cjs +1 -0
- package/dist/ui/admin/email-field/index.d.cts +9 -0
- package/dist/ui/admin/email-field/index.d.mts +9 -0
- package/dist/ui/admin/email-field/index.mjs +1 -0
- package/dist/ui/admin/file-field/index.cjs +1 -0
- package/dist/ui/admin/file-field/index.d.cts +36 -0
- package/dist/ui/admin/file-field/index.d.mts +36 -0
- package/dist/ui/admin/file-field/index.mjs +1 -0
- package/dist/ui/admin/image-list-field/index.cjs +1 -0
- package/dist/ui/admin/image-list-field/index.d.cts +53 -0
- package/dist/ui/admin/image-list-field/index.d.mts +53 -0
- package/dist/ui/admin/image-list-field/index.mjs +1 -0
- package/dist/ui/admin/label/index.cjs +1 -0
- package/dist/ui/admin/label/index.d.cts +2 -0
- package/dist/ui/admin/label/index.d.mts +2 -0
- package/dist/ui/admin/label/index.mjs +1 -0
- package/dist/ui/admin/priority-field/index.cjs +1 -0
- package/dist/ui/admin/priority-field/index.d.cts +19 -0
- package/dist/ui/admin/priority-field/index.d.mts +19 -0
- package/dist/ui/admin/priority-field/index.mjs +1 -0
- package/dist/ui/admin/select-field/index.cjs +1 -0
- package/dist/ui/admin/select-field/index.d.cts +3 -0
- package/dist/ui/admin/select-field/index.d.mts +3 -0
- package/dist/ui/admin/select-field/index.mjs +1 -0
- package/dist/ui/admin/series-field/index.cjs +1 -0
- package/dist/ui/admin/series-field/index.d.cts +37 -0
- package/dist/ui/admin/series-field/index.d.mts +37 -0
- package/dist/ui/admin/series-field/index.mjs +1 -0
- package/dist/ui/admin/sns-field/index.cjs +1 -0
- package/dist/ui/admin/sns-field/index.d.cts +50 -0
- package/dist/ui/admin/sns-field/index.d.mts +50 -0
- package/dist/ui/admin/sns-field/index.mjs +1 -0
- package/dist/ui/admin/source-field/index.cjs +1 -0
- package/dist/ui/admin/source-field/index.d.cts +34 -0
- package/dist/ui/admin/source-field/index.d.mts +34 -0
- package/dist/ui/admin/source-field/index.mjs +1 -0
- package/dist/ui/admin/text-area-field/index.cjs +1 -0
- package/dist/ui/admin/text-area-field/index.d.cts +20 -0
- package/dist/ui/admin/text-area-field/index.d.mts +20 -0
- package/dist/ui/admin/text-area-field/index.mjs +1 -0
- package/dist/ui/admin/text-field/index.cjs +1 -0
- package/dist/ui/admin/text-field/index.d.cts +3 -0
- package/dist/ui/admin/text-field/index.d.mts +3 -0
- package/dist/ui/admin/text-field/index.mjs +1 -0
- package/dist/ui/admin/url-field/index.cjs +1 -0
- package/dist/ui/admin/url-field/index.d.cts +9 -0
- package/dist/ui/admin/url-field/index.d.mts +9 -0
- package/dist/ui/admin/url-field/index.mjs +1 -0
- package/dist/ui/admin/video-field/index.cjs +1 -0
- package/dist/ui/admin/video-field/index.d.cts +24 -0
- package/dist/ui/admin/video-field/index.d.mts +24 -0
- package/dist/ui/admin/video-field/index.mjs +1 -0
- package/dist/ui/admin/with-extra-field/index.cjs +1 -0
- package/dist/ui/admin/with-extra-field/index.d.cts +19 -0
- package/dist/ui/admin/with-extra-field/index.d.mts +19 -0
- package/dist/ui/admin/with-extra-field/index.mjs +1 -0
- package/dist/ui/bottom-app-bar/index.cjs +1 -0
- package/dist/ui/bottom-app-bar/index.d.cts +21 -0
- package/dist/ui/bottom-app-bar/index.d.mts +21 -0
- package/dist/ui/bottom-app-bar/index.mjs +1 -0
- package/dist/ui/button/index.cjs +1 -0
- package/dist/{button-DHvx-GAg.d.cts → ui/button/index.d.cts} +11 -11
- package/dist/{button-DRIyBtEB.d.mts → ui/button/index.d.mts} +13 -13
- package/dist/ui/button/index.mjs +1 -0
- package/dist/ui/carousel/index.cjs +1 -1
- package/dist/ui/carousel/index.d.cts +9 -9
- package/dist/ui/carousel/index.mjs +1 -1
- package/dist/ui/conditional-wrapper/index.cjs +1 -0
- package/dist/ui/conditional-wrapper/index.d.cts +29 -0
- package/dist/ui/conditional-wrapper/index.d.mts +29 -0
- package/dist/ui/conditional-wrapper/index.mjs +1 -0
- package/dist/ui/country-flag/index.cjs +1 -0
- package/dist/ui/country-flag/index.d.cts +13 -0
- package/dist/ui/country-flag/index.d.mts +13 -0
- package/dist/ui/country-flag/index.mjs +1 -0
- package/dist/ui/dialog/index.cjs +1 -1
- package/dist/ui/dialog/index.d.cts +5 -5
- package/dist/ui/dialog/index.d.mts +7 -7
- package/dist/ui/dialog/index.mjs +1 -1
- package/dist/ui/dnd/index.cjs +1 -1
- package/dist/ui/dnd/index.d.cts +2 -2
- package/dist/ui/dnd/index.mjs +1 -1
- package/dist/ui/dropdown/index.cjs +1 -1
- package/dist/ui/dropdown/index.d.cts +16 -44
- package/dist/ui/dropdown/index.d.mts +16 -44
- package/dist/ui/dropdown/index.mjs +1 -1
- package/dist/ui/image/index.cjs +1 -1
- package/dist/ui/image/index.d.cts +3 -45
- package/dist/ui/image/index.d.mts +3 -45
- package/dist/ui/image/index.mjs +1 -1
- package/dist/ui/input/index.cjs +1 -0
- package/dist/ui/input/index.d.cts +22 -0
- package/dist/ui/input/index.d.mts +22 -0
- package/dist/ui/input/index.mjs +1 -0
- package/dist/ui/motion-dialog/index.cjs +1 -1
- package/dist/ui/motion-dialog/index.mjs +1 -1
- package/dist/ui/radius-handler/index.cjs +1 -0
- package/dist/ui/radius-handler/index.d.cts +17 -0
- package/dist/ui/radius-handler/index.d.mts +17 -0
- package/dist/ui/radius-handler/index.mjs +1 -0
- package/dist/ui/sheet/index.cjs +1 -1
- package/dist/ui/sheet/index.d.cts +2 -2
- package/dist/ui/sheet/index.d.mts +2 -2
- package/dist/ui/sheet/index.mjs +1 -1
- package/dist/ui/skeleton/index.cjs +1 -0
- package/dist/ui/skeleton/index.d.cts +26 -0
- package/dist/ui/skeleton/index.d.mts +26 -0
- package/dist/ui/skeleton/index.mjs +1 -0
- package/dist/ui/stable-text/index.cjs +1 -0
- package/dist/ui/stable-text/index.d.cts +13 -0
- package/dist/ui/stable-text/index.d.mts +13 -0
- package/dist/ui/stable-text/index.mjs +1 -0
- package/dist/ui/switch/index.cjs +1 -1
- package/dist/ui/switch/index.d.cts +1 -15
- package/dist/ui/switch/index.d.mts +1 -15
- package/dist/ui/switch/index.mjs +1 -1
- package/dist/ui/tooltip/index.cjs +1 -1
- package/dist/ui/tooltip/index.d.cts +2 -2
- package/dist/ui/tooltip/index.d.mts +2 -2
- package/dist/ui/tooltip/index.mjs +1 -1
- package/dist/use-delay-unmount-CNNJXNX5.cjs +1 -0
- package/dist/use-delay-unmount-_wzkutyv.mjs +1 -0
- package/dist/use-drag-resize--3PrrhJj.mjs +1 -0
- package/dist/use-drag-resize-BO3zANv3.cjs +1 -0
- package/dist/use-outside-click-BS2UOXoV.cjs +1 -0
- package/dist/use-outside-click-tsaJo3cz.mjs +1 -0
- package/dist/use-subset-image-B9ZSiVjx.mjs +1 -0
- package/dist/use-subset-image-BUurDItP.cjs +1 -0
- package/dist/util/browser/index.cjs +1 -0
- package/dist/util/{browser.d.cts → browser/index.d.cts} +1 -1
- package/dist/util/{browser.d.mts → browser/index.d.mts} +1 -1
- package/dist/util/common/index.cjs +1 -0
- package/dist/util/{common.d.cts → common/index.d.cts} +5 -5
- package/dist/util/{common.d.mts → common/index.d.mts} +5 -5
- package/dist/{common-ZUMpASnc.mjs → util/common/index.mjs} +1 -1
- package/dist/util/date/index.cjs +1 -0
- package/dist/util/{date.d.cts → date/index.d.cts} +1 -1
- package/dist/util/{date.d.mts → date/index.d.mts} +1 -1
- package/dist/util/editor/index.cjs +1 -0
- package/dist/util/editor/index.d.cts +55 -0
- package/dist/util/editor/index.d.mts +55 -0
- package/dist/util/editor/index.mjs +1 -0
- package/dist/util/fetcher/index.d.cts +2 -0
- package/dist/util/fetcher/index.d.mts +2 -0
- package/dist/util/file/index.cjs +1 -0
- package/dist/util/{file.d.mts → file/index.d.cts} +2 -2
- package/dist/util/{file.d.cts → file/index.d.mts} +2 -2
- package/dist/util/file/index.mjs +1 -0
- package/dist/util/format/index.cjs +1 -0
- package/dist/util/format/index.d.cts +6 -0
- package/dist/util/format/index.d.mts +6 -0
- package/dist/util/format/index.mjs +1 -0
- package/dist/util/generator/index.cjs +1 -0
- package/dist/util/{generator.d.cts → generator/index.d.cts} +1 -1
- package/dist/util/{generator.d.mts → generator/index.d.mts} +1 -1
- package/dist/util/phone/index.cjs +1 -0
- package/dist/util/{phone.d.cts → phone/index.d.cts} +1 -1
- package/dist/util/{phone.d.mts → phone/index.d.mts} +1 -1
- package/package.json +151 -108
- package/dist/button-CQZuaIU7.mjs +0 -1
- package/dist/button-ChX3XGbR.cjs +0 -1
- package/dist/common-B8HXyhZa.cjs +0 -1
- package/dist/common-CWHkXe0F.mjs +0 -1
- package/dist/common-D4sUwkFd.cjs +0 -1
- package/dist/file-5mweNdAM.cjs +0 -1
- package/dist/format-1_RTNUQv.mjs +0 -1
- package/dist/format-DEuImTYJ.cjs +0 -1
- package/dist/hooks/common/index.cjs +0 -1
- package/dist/hooks/common/index.d.cts +0 -72
- package/dist/hooks/common/index.d.mts +0 -72
- package/dist/hooks/common/index.mjs +0 -1
- package/dist/hooks/use-snackbar.cjs +0 -1
- package/dist/skeleton-B5ZccRFX.cjs +0 -1
- package/dist/skeleton-Y22bmaaB.mjs +0 -1
- package/dist/src-6KfzqI9Z.cjs +0 -1
- package/dist/src-CIMlbgv1.mjs +0 -1
- package/dist/ui/index.cjs +0 -1
- package/dist/ui/index.d.cts +0 -92
- package/dist/ui/index.d.mts +0 -92
- package/dist/ui/index.mjs +0 -1
- package/dist/ui/preserve-focus-button/index.cjs +0 -1
- package/dist/ui/preserve-focus-button/index.d.cts +0 -12
- package/dist/ui/preserve-focus-button/index.d.mts +0 -12
- package/dist/ui/preserve-focus-button/index.mjs +0 -1
- package/dist/ui-Bs9PP9eC.cjs +0 -1
- package/dist/ui-D2DoC_0E.mjs +0 -1
- package/dist/use-drag-resize-BdeLdulk.mjs +0 -1
- package/dist/use-drag-resize-DEgcua2U.d.cts +0 -48
- package/dist/use-drag-resize-DRHPv5RK.d.mts +0 -48
- package/dist/use-drag-resize-DeDqPC4h.cjs +0 -1
- package/dist/use-subset-image-Df2fCrtH.mjs +0 -1
- package/dist/use-subset-image-o_gmC1HL.cjs +0 -1
- package/dist/util/browser.cjs +0 -1
- package/dist/util/common.cjs +0 -1
- package/dist/util/common.mjs +0 -1
- package/dist/util/date.cjs +0 -1
- package/dist/util/editor.cjs +0 -1
- package/dist/util/editor.d.cts +0 -21
- package/dist/util/editor.d.mts +0 -21
- package/dist/util/editor.mjs +0 -1
- package/dist/util/file.cjs +0 -1
- package/dist/util/file.mjs +0 -1
- package/dist/util/format.cjs +0 -1
- package/dist/util/format.d.cts +0 -34
- package/dist/util/format.d.mts +0 -34
- package/dist/util/format.mjs +0 -1
- package/dist/util/generator.cjs +0 -1
- package/dist/util/phone.cjs +0 -1
- /package/dist/hooks/{use-snackbar.mjs → use-snackbar/index.mjs} +0 -0
- /package/dist/{use-dialog-stack-YiLs-sNf.cjs → use-dialog-stack-CH2nhH1Q.cjs} +0 -0
- /package/dist/{use-dialog-stack-Crj8YWJl.mjs → use-dialog-stack-nI1GTvfl.mjs} +0 -0
- /package/dist/util/{browser.mjs → browser/index.mjs} +0 -0
- /package/dist/util/{date.mjs → date/index.mjs} +0 -0
- /package/dist/util/{fetcher.cjs → fetcher/index.cjs} +0 -0
- /package/dist/util/{fetcher.mjs → fetcher/index.mjs} +0 -0
- /package/dist/util/{generator.mjs → generator/index.mjs} +0 -0
- /package/dist/util/{phone.mjs → phone/index.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
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):
|
|
26
|
+
}: SheetProps): react_jsx_runtime44.JSX.Element | null;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Sheet, type SheetProps };
|
package/dist/ui/sheet/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import
|
|
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};
|
package/dist/ui/switch/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../
|
|
1
|
+
"use client";const e=require(`../../switch-BDdSF3lu.cjs`);exports.Switch=e.t;
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import
|
|
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
|
|
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 };
|
package/dist/ui/switch/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import
|
|
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`)
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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=(
|
|
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;
|
|
@@ -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 };
|