@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,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};
|
package/dist/src-6KfzqI9Z.cjs
DELETED
|
@@ -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}});
|
package/dist/src-CIMlbgv1.mjs
DELETED
|
@@ -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;
|
package/dist/ui/index.d.cts
DELETED
|
@@ -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 };
|
package/dist/ui/index.d.mts
DELETED
|
@@ -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};
|
package/dist/ui-Bs9PP9eC.cjs
DELETED
|
@@ -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}});
|
package/dist/ui-D2DoC_0E.mjs
DELETED
|
@@ -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}});
|
package/dist/util/browser.cjs
DELETED
|
@@ -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;
|
package/dist/util/common.cjs
DELETED
|
@@ -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;
|
package/dist/util/common.mjs
DELETED
|
@@ -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};
|
package/dist/util/date.cjs
DELETED
|
@@ -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;
|
package/dist/util/editor.cjs
DELETED
|
@@ -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;
|
package/dist/util/editor.d.cts
DELETED
|
@@ -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 };
|
package/dist/util/editor.d.mts
DELETED
|
@@ -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 };
|
package/dist/util/editor.mjs
DELETED
|
@@ -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};
|
package/dist/util/file.cjs
DELETED
|
@@ -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;
|
package/dist/util/file.mjs
DELETED
|
@@ -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};
|
package/dist/util/format.cjs
DELETED
|
@@ -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;
|
package/dist/util/format.d.cts
DELETED
|
@@ -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 };
|