@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { NodeViewProps } from "@tiptap/react";
|
|
3
|
+
import { CSSProperties, ComponentType, ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/editor/nodes/node-view-context/node-view-context.d.ts
|
|
6
|
+
type NodeViewPlugin = ComponentType<NodeViewProps>;
|
|
7
|
+
type NodeWithAttrs<TAttrs> = Omit<NodeViewProps['node'], 'attrs'> & {
|
|
8
|
+
attrs: TAttrs;
|
|
9
|
+
};
|
|
10
|
+
interface NodeViewValue<TAttrs = Record<string, unknown>> extends Omit<NodeViewProps, 'node' | 'updateAttributes'> {
|
|
11
|
+
node: NodeWithAttrs<TAttrs>;
|
|
12
|
+
updateAttributes: (attributes: Partial<TAttrs>) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function useNodeView<TAttrs = Record<string, unknown>>(): NodeViewValue<TAttrs>;
|
|
15
|
+
declare const useNodeViewPlugins: () => NodeViewPlugin[];
|
|
16
|
+
interface NodeViewChromeProps {
|
|
17
|
+
value: NodeViewProps;
|
|
18
|
+
plugins?: NodeViewPlugin[];
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const NodeViewChrome: ({
|
|
22
|
+
value,
|
|
23
|
+
plugins,
|
|
24
|
+
children
|
|
25
|
+
}: NodeViewChromeProps) => react_jsx_runtime0.JSX.Element;
|
|
26
|
+
declare const withNodeViewChrome: <P extends NodeViewProps>(View: ComponentType<P>, plugins?: NodeViewPlugin[]) => (props: P) => react_jsx_runtime0.JSX.Element;
|
|
27
|
+
interface PluginNodeViewProps {
|
|
28
|
+
className?: string;
|
|
29
|
+
frameClassName?: string;
|
|
30
|
+
style?: CSSProperties;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
declare const PluginNodeView: ({
|
|
34
|
+
className,
|
|
35
|
+
frameClassName,
|
|
36
|
+
style,
|
|
37
|
+
children
|
|
38
|
+
}: PluginNodeViewProps) => react_jsx_runtime0.JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { PluginNodeViewProps as a, withNodeViewChrome as c, PluginNodeView as i, NodeViewPlugin as n, useNodeView as o, NodeViewValue as r, useNodeViewPlugins as s, NodeViewChrome as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Node, NodeViewProps } from "@tiptap/core";
|
|
2
|
+
import * as react_jsx_runtime40 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/editor/nodes/tabs/tabs.d.ts
|
|
5
|
+
declare const TABS: {
|
|
6
|
+
readonly name: "tabs";
|
|
7
|
+
readonly tag: "tabs";
|
|
8
|
+
};
|
|
9
|
+
declare const TAB_TITLE: {
|
|
10
|
+
readonly name: "tabTitle";
|
|
11
|
+
readonly tag: "tab-title";
|
|
12
|
+
};
|
|
13
|
+
declare const TAB_CONTENT: {
|
|
14
|
+
readonly name: "tabContent";
|
|
15
|
+
readonly tag: "tab-content";
|
|
16
|
+
};
|
|
17
|
+
declare const Tabs: Node<any, any>;
|
|
18
|
+
declare const TabTitle: Node<any, any>;
|
|
19
|
+
declare const TabContent: Node<any, any>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/editor/nodes/tabs/tabs-node.d.ts
|
|
22
|
+
declare function TabsNode(props: NodeViewProps): react_jsx_runtime40.JSX.Element;
|
|
23
|
+
declare function TabTitleNode(): react_jsx_runtime40.JSX.Element;
|
|
24
|
+
declare function TabContentNode(props: NodeViewProps): react_jsx_runtime40.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { TAB_CONTENT as a, TabTitle as c, TABS as i, Tabs as l, TabTitleNode as n, TAB_TITLE as o, TabsNode as r, TabContent as s, TabContentNode as t };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-drag-resize/index.d.ts
|
|
4
|
+
declare const RESIZE_CONSTANTS: {
|
|
5
|
+
DEFAULT_WIDTH: number;
|
|
6
|
+
DEFAULT_HEIGHT: number;
|
|
7
|
+
};
|
|
8
|
+
type ResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
9
|
+
interface Size {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
interface LimitSize {
|
|
14
|
+
width: boolean;
|
|
15
|
+
height: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface UseResizeProps {
|
|
18
|
+
boundaryRef: React.RefObject<HTMLElement | null>;
|
|
19
|
+
size: Size;
|
|
20
|
+
keepAspectRatio?: boolean;
|
|
21
|
+
limitSize?: LimitSize;
|
|
22
|
+
minSize?: Size;
|
|
23
|
+
maxSize?: Size;
|
|
24
|
+
direction?: ResizeDirection;
|
|
25
|
+
onResize?: (size: Size) => void;
|
|
26
|
+
}
|
|
27
|
+
declare function useResize({
|
|
28
|
+
boundaryRef,
|
|
29
|
+
size,
|
|
30
|
+
keepAspectRatio,
|
|
31
|
+
minSize,
|
|
32
|
+
maxSize,
|
|
33
|
+
limitSize,
|
|
34
|
+
direction,
|
|
35
|
+
onResize
|
|
36
|
+
}: UseResizeProps): {
|
|
37
|
+
onMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
38
|
+
onTouchStart: (e: React.TouchEvent<HTMLDivElement>) => void;
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { useResize as a, UseResizeProps as i, ResizeDirection as n, Size as r, RESIZE_CONSTANTS as t };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./src-
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./src-Dz1mULYA.cjs`);exports.Api=e.i,exports.ApiClient=e.t,exports.default=e.t,exports.Auth=e.r,exports.Media=e.n;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ApiConfig, r as
|
|
2
|
-
export {
|
|
1
|
+
import { a as Auth, i as UploadValues, n as ApiConfig, o as Api, r as Media, s as ApiClientContext, t as ApiClient } from "./index-DCzaZKG0.cjs";
|
|
2
|
+
export { Api, ApiClient, ApiClient as default, ApiClientContext, ApiConfig, Auth, Media, UploadValues };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ApiConfig, r as
|
|
2
|
-
export {
|
|
1
|
+
import { a as Auth, i as UploadValues, n as ApiConfig, o as Api, r as Media, s as ApiClientContext, t as ApiClient } from "./index-CqZGdObz.mjs";
|
|
2
|
+
export { Api, ApiClient, ApiClient as default, ApiClientContext, ApiConfig, Auth, Media, UploadValues };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./src-BB55dPBE.mjs";export{e as Api,r as ApiClient,r as default,n as Auth,t as Media};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cva as e}from"class-variance-authority";import{useState as t}from"react";import n from"clsx";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{FontAwesomeIcon as o}from"@fortawesome/react-fontawesome";const s=e(`komc:flex komc:flex-col komc:w-full`,{variants:{required:{true:n(`komc:[&>label>span:first-child]:after:content-["*"]`,`komc:[&>label>span:first-child]:after:text-red-500`,`komc:[&>label>span:first-child]:after:ml-1`,`komc:[&>button>span:first-child]:after:content-["*"]`,`komc:[&>button>span:first-child]:after:text-red-500`,`komc:[&>button>span:first-child]:after:ml-1`),false:``},gap:{sm:`komc:gap-y-2.5`,md:`komc:gap-y-3`,lg:`komc:gap-y-4`,xl:`komc:gap-y-4.5`}},defaultVariants:{required:!1}}),c=e(`komc:flex komc:flex-row komc:items-center komc:gap-1 komc:ml-5`,{variants:{helpTextColor:{default:`komc:text-neutral-500`,primary:`komc:text-blue-500`,warning:`komc:text-yellow-500`,error:`komc:text-red-500`}},defaultVariants:{helpTextColor:`default`}}),l=({htmlFor:e,id:n,text:l,actions:u=null,collapse:d,defaultCollapsed:f=!0,helpText:p,helpTextPrefixIcon:m=null,helpTextColor:h=`default`,children:g=null,required:_=!1,className:v,gap:y=`sm`})=>{let[b,x]=t(f),S=()=>{d&&x(e=>!e)};return l?d?a(`div`,{"data-komc":!0,className:s({className:v,required:_,gap:y}),children:[a(`label`,{htmlFor:e||n,className:`komc:flex komc:flex-row komc:flex-wrap komc:items-center`,children:[i(`span`,{className:`komc:text-lg komc:text-neutral-600`,children:l}),u&&a(`div`,{className:`komc:flex komc:flex-row komc:gap-x-2 komc:mx-2`,children:[i(`div`,{className:`komc:h-4.5 komc:border-l komc:border-neutral-100`}),u]}),p&&a(`div`,{className:c({helpTextColor:h}),children:[m&&i(`div`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-3.25 komc:h-3.5`,children:i(o,{icon:m,className:`komc:w-3.25 komc:h-3.5 komc:text-sm`})}),i(`span`,{className:`komc:text-xs`,children:p})]}),i(`button`,{type:`button`,className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-7 komc:h-7 komc:ml-auto komc:rounded-sm komc:bg-neutral-50`,onClick:e=>{e.stopPropagation(),S()},children:i(o,{icon:d(b),className:`komc:w-3.25 komc:h-3.5 komc:text-sm`})})]}),b&&g]}):a(`div`,{"data-komc":!0,className:s({className:v,required:_,gap:y}),children:[a(`label`,{htmlFor:e||n,className:`komc:flex komc:flex-row komc:flex-wrap komc:items-center`,children:[i(`span`,{className:`komc:text-lg komc:text-neutral-600`,children:l}),u&&a(`div`,{className:`komc:flex komc:flex-row komc:gap-x-2 komc:mx-2`,children:[i(`div`,{className:`komc:h-4.5 komc:border-l komc:border-neutral-100`}),u]}),p&&a(`div`,{className:c({helpTextColor:h}),children:[m&&i(`div`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-3.25 komc:h-3.5`,children:i(o,{icon:m,className:`komc:w-3.25 komc:h-3.5 komc:text-sm`})}),i(`span`,{className:`komc:text-xs`,children:p})]})]}),g]}):i(r,{children:g})};export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`class-variance-authority`),n=require(`react`),r=require(`clsx`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`@fortawesome/react-fontawesome`);const o=(0,t.cva)(`komc:flex komc:flex-col komc:w-full`,{variants:{required:{true:(0,r.default)(`komc:[&>label>span:first-child]:after:content-["*"]`,`komc:[&>label>span:first-child]:after:text-red-500`,`komc:[&>label>span:first-child]:after:ml-1`,`komc:[&>button>span:first-child]:after:content-["*"]`,`komc:[&>button>span:first-child]:after:text-red-500`,`komc:[&>button>span:first-child]:after:ml-1`),false:``},gap:{sm:`komc:gap-y-2.5`,md:`komc:gap-y-3`,lg:`komc:gap-y-4`,xl:`komc:gap-y-4.5`}},defaultVariants:{required:!1}}),s=(0,t.cva)(`komc:flex komc:flex-row komc:items-center komc:gap-1 komc:ml-5`,{variants:{helpTextColor:{default:`komc:text-neutral-500`,primary:`komc:text-blue-500`,warning:`komc:text-yellow-500`,error:`komc:text-red-500`}},defaultVariants:{helpTextColor:`default`}}),c=({htmlFor:e,id:t,text:r,actions:c=null,collapse:l,defaultCollapsed:u=!0,helpText:d,helpTextPrefixIcon:f=null,helpTextColor:p=`default`,children:m=null,required:h=!1,className:g,gap:_=`sm`})=>{let[v,y]=(0,n.useState)(u),b=()=>{l&&y(e=>!e)};return r?l?(0,i.jsxs)(`div`,{"data-komc":!0,className:o({className:g,required:h,gap:_}),children:[(0,i.jsxs)(`label`,{htmlFor:e||t,className:`komc:flex komc:flex-row komc:flex-wrap komc:items-center`,children:[(0,i.jsx)(`span`,{className:`komc:text-lg komc:text-neutral-600`,children:r}),c&&(0,i.jsxs)(`div`,{className:`komc:flex komc:flex-row komc:gap-x-2 komc:mx-2`,children:[(0,i.jsx)(`div`,{className:`komc:h-4.5 komc:border-l komc:border-neutral-100`}),c]}),d&&(0,i.jsxs)(`div`,{className:s({helpTextColor:p}),children:[f&&(0,i.jsx)(`div`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-3.25 komc:h-3.5`,children:(0,i.jsx)(a.FontAwesomeIcon,{icon:f,className:`komc:w-3.25 komc:h-3.5 komc:text-sm`})}),(0,i.jsx)(`span`,{className:`komc:text-xs`,children:d})]}),(0,i.jsx)(`button`,{type:`button`,className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-7 komc:h-7 komc:ml-auto komc:rounded-sm komc:bg-neutral-50`,onClick:e=>{e.stopPropagation(),b()},children:(0,i.jsx)(a.FontAwesomeIcon,{icon:l(v),className:`komc:w-3.25 komc:h-3.5 komc:text-sm`})})]}),v&&m]}):(0,i.jsxs)(`div`,{"data-komc":!0,className:o({className:g,required:h,gap:_}),children:[(0,i.jsxs)(`label`,{htmlFor:e||t,className:`komc:flex komc:flex-row komc:flex-wrap komc:items-center`,children:[(0,i.jsx)(`span`,{className:`komc:text-lg komc:text-neutral-600`,children:r}),c&&(0,i.jsxs)(`div`,{className:`komc:flex komc:flex-row komc:gap-x-2 komc:mx-2`,children:[(0,i.jsx)(`div`,{className:`komc:h-4.5 komc:border-l komc:border-neutral-100`}),c]}),d&&(0,i.jsxs)(`div`,{className:s({helpTextColor:p}),children:[f&&(0,i.jsx)(`div`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-3.25 komc:h-3.5`,children:(0,i.jsx)(a.FontAwesomeIcon,{icon:f,className:`komc:w-3.25 komc:h-3.5 komc:text-sm`})}),(0,i.jsx)(`span`,{className:`komc:text-xs`,children:d})]})]}),m]}):(0,i.jsx)(i.Fragment,{children:m})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./node-view-context-D-1j5isf.mjs";import{n as t}from"./use-drag-resize--3PrrhJj.mjs";import{cva as n}from"class-variance-authority";import{memo as r,useLayoutEffect as i,useRef as a}from"react";import o from"clsx";import{Fragment as s,jsx as c}from"react/jsx-runtime";const l=({directions:e,...t})=>c(s,{children:e.map(e=>c(f,{...t,direction:e},e))}),u=n(o(`komc:absolute komc:z-50 komc:flex komc:items-center komc:justify-center`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:opacity-0 komc:group-hover:opacity-100`),{variants:{direction:{left:`komc:-left-1 komc:top-[50%] komc:-translate-y-1/2 komc:cursor-ew-resize`,right:`komc:-right-1 komc:top-[50%] komc:-translate-y-1/2 komc:cursor-ew-resize`,top:`komc:-top-1 komc:left-[50%] komc:-translate-x-1/2 komc:cursor-ns-resize`,bottom:`komc:-bottom-1 komc:left-[50%] komc:-translate-x-1/2 komc:cursor-ns-resize`,"top-left":`komc:-top-1 komc:left-1 komc:cursor-nw-resize`,"top-right":`komc:-top-1 komc:right-1 komc:cursor-ne-resize`,"bottom-left":`komc:-bottom-1 komc:left-1 komc:cursor-sw-resize`,"bottom-right":`komc:-bottom-1 komc:right-1 komc:cursor-se-resize`}},defaultVariants:{direction:`left`}}),d=n(`komc:flex komc:items-center komc:justify-center komc:group/resize`,{variants:{direction:{left:`komc:h-14 komc:w-6 komc:[&_div]:h-full komc:[&_div]:w-1.5`,right:`komc:h-14 komc:w-6 komc:[&_div]:h-full komc:[&_div]:w-1.5`,top:`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,bottom:`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"top-left":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"top-right":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"bottom-left":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"bottom-right":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`}},defaultVariants:{direction:`left`}}),f=r(({direction:e,...n})=>{let r=t({...n,direction:e,limitSize:{width:!0,height:!1}});return c(`div`,{"data-komc":!0,className:u({direction:e}),children:c(`div`,{className:d({direction:e}),draggable:!1,onDragStart:e=>e.preventDefault(),...r,children:c(`div`,{className:`komc:rounded-full komc:border komc:border-white komc:bg-black/40 komc:group-hover/resize:bg-blue-500/50`})})})});f.displayName=`ResizeHandler`;const p=(t={})=>{let n=t.directions??[`left`,`right`];return function(){let{node:t,updateAttributes:r,editor:o,getPos:s}=e(),u=a(null),d=Number(t.attrs.width),f=Number(t.attrs.height);return i(()=>{let e=s();if(typeof e!=`number`)return;let t=o.view.nodeDOM(e);u.current=t instanceof HTMLElement?t:null}),c(l,{directions:n,boundaryRef:u,size:{width:d,height:f},onResize:r})}},m=p();export{p as i,m as n,f as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./node-view-context-YTl_1gGD.cjs`),n=require(`./use-drag-resize-BO3zANv3.cjs`);let r=require(`class-variance-authority`),i=require(`react`),a=require(`clsx`);a=e.t(a);let o=require(`react/jsx-runtime`);const s=({directions:e,...t})=>(0,o.jsx)(o.Fragment,{children:e.map(e=>(0,o.jsx)(u,{...t,direction:e},e))}),c=(0,r.cva)((0,a.default)(`komc:absolute komc:z-50 komc:flex komc:items-center komc:justify-center`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:opacity-0 komc:group-hover:opacity-100`),{variants:{direction:{left:`komc:-left-1 komc:top-[50%] komc:-translate-y-1/2 komc:cursor-ew-resize`,right:`komc:-right-1 komc:top-[50%] komc:-translate-y-1/2 komc:cursor-ew-resize`,top:`komc:-top-1 komc:left-[50%] komc:-translate-x-1/2 komc:cursor-ns-resize`,bottom:`komc:-bottom-1 komc:left-[50%] komc:-translate-x-1/2 komc:cursor-ns-resize`,"top-left":`komc:-top-1 komc:left-1 komc:cursor-nw-resize`,"top-right":`komc:-top-1 komc:right-1 komc:cursor-ne-resize`,"bottom-left":`komc:-bottom-1 komc:left-1 komc:cursor-sw-resize`,"bottom-right":`komc:-bottom-1 komc:right-1 komc:cursor-se-resize`}},defaultVariants:{direction:`left`}}),l=(0,r.cva)(`komc:flex komc:items-center komc:justify-center komc:group/resize`,{variants:{direction:{left:`komc:h-14 komc:w-6 komc:[&_div]:h-full komc:[&_div]:w-1.5`,right:`komc:h-14 komc:w-6 komc:[&_div]:h-full komc:[&_div]:w-1.5`,top:`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,bottom:`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"top-left":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"top-right":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"bottom-left":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`,"bottom-right":`komc:h-6 komc:w-14 komc:[&_div]:h-1.5 komc:[&_div]:w-full`}},defaultVariants:{direction:`left`}}),u=(0,i.memo)(({direction:e,...t})=>{let r=n.n({...t,direction:e,limitSize:{width:!0,height:!1}});return(0,o.jsx)(`div`,{"data-komc":!0,className:c({direction:e}),children:(0,o.jsx)(`div`,{className:l({direction:e}),draggable:!1,onDragStart:e=>e.preventDefault(),...r,children:(0,o.jsx)(`div`,{className:`komc:rounded-full komc:border komc:border-white komc:bg-black/40 komc:group-hover/resize:bg-blue-500/50`})})})});u.displayName=`ResizeHandler`;const d=(e={})=>{let n=e.directions??[`left`,`right`];return function(){let{node:e,updateAttributes:r,editor:a,getPos:c}=t.r(),l=(0,i.useRef)(null),u=Number(e.attrs.width),d=Number(e.attrs.height);return(0,i.useLayoutEffect)(()=>{let e=c();if(typeof e!=`number`)return;let t=a.view.nodeDOM(e);l.current=t instanceof HTMLElement?t:null}),(0,o.jsx)(s,{directions:n,boundaryRef:l,size:{width:u,height:d},onResize:r})}},f=d();Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./editor-DvLUotoh.cjs`),n=require(`./node-view-context-YTl_1gGD.cjs`),r=require(`./use-drag-resize-BO3zANv3.cjs`);let i=require(`react`),a=require(`clsx`);a=e.t(a);let o=require(`react/jsx-runtime`);const s={"width-under-min":e=>`Minimum width is ${e}px`,"width-over-max":e=>`Maximum width is ${e}px`,"height-under-min":e=>`Minimum height is ${e}px`},c=({width:e=0,height:n=0,edit:c=!1,setEdit:d=()=>{},onChange:f,onExitEdit:p,minWidth:m=r.t.DEFAULT_WIDTH,minHeight:h=r.t.DEFAULT_HEIGHT,maxWidth:g,maxHeight:_,className:v})=>{let y=(0,i.useRef)(null),[b,x]=(0,i.useState)(null),[S,C]=(0,i.useState)(e),[w,T]=(0,i.useState)(n),[E,D]=(0,i.useState)(null),O=(0,i.useRef)(e&&n?e/n:1),k=g??b??1/0,A=_??1/0,j=(0,i.useMemo)(()=>({min:{width:m,height:h},max:{width:k,height:A}}),[h,m,A,k]);(0,i.useLayoutEffect)(()=>{if(g!=null)return;let e=y.current?.parentElement,t=e?.parentElement??e;if(!t)return;let n=()=>{x(t.clientWidth)};n();let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},[g]),(0,i.useEffect)(()=>{let e=y.current?.parentElement;if(!e)return;let t=()=>{c&&(d(!1),p?.())};return e.addEventListener(`mouseleave`,t),()=>e.removeEventListener(`mouseleave`,t)},[c,p,d]);let M=()=>{c||(d(!0),e&&n&&(O.current=e/n))},N=e=>{c||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),M())},P=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let n=Number(e.target.value),{width:r,height:i,result:a}=t.n({...j,width:n,height:w,type:`width`,currentRatio:O.current});C(r),T(i),D(a)},F=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let n=Number(e.target.value),{width:r,height:i,result:a}=t.n({...j,width:S,height:n,type:`height`,currentRatio:O.current});C(r),T(i),D(a)},I=()=>{E||S<m||S>k||w<h||(d(!1),f?.({width:S,height:w}))};(0,i.useEffect)(()=>{C(e),T(n),e&&n&&(O.current=e/n);let{result:r}=t.n({...j,width:e,height:n,type:`width`,currentRatio:O.current}),{result:i}=t.n({...j,width:e,height:n,type:`height`,currentRatio:O.current});D(r||i||null)},[j,c,n,e]);let L=E===`width-over-max`?k:E===`height-under-min`?h:m;return(0,o.jsx)(`div`,{ref:y,"data-komc":!0,role:c?void 0:`button`,tabIndex:c?void 0:0,className:(0,a.default)(`komc:absolute komc:flex komc:flex-col komc:items-center komc:justify-center`,`komc:text-center komc:text-base komc:text-black`,c?`komc:z-55 komc:-inset-1.5 komc:bg-white/60 komc:opacity-100`:(0,a.default)(`komc:top-1/2 komc:left-1/2 komc:z-40 komc:-translate-x-1/2`,`komc:-translate-y-1/2 komc:opacity-0 komc:group-hover:opacity-100`),v),onClick:M,onKeyDown:N,children:(0,o.jsxs)(`div`,{className:(0,a.default)(`komc:relative komc:flex komc:flex-row komc:items-center komc:justify-center komc:gap-x-1`,!c&&`komc:cursor-pointer`),children:[(0,o.jsx)(`div`,{className:`komc:relative komc:inline`,children:(0,o.jsx)(l,{label:`Width`,focus:c,value:S,onChange:P,disabled:!c})}),(0,o.jsx)(`span`,{children:`x`}),(0,o.jsx)(`div`,{className:`komc:relative komc:inline`,children:(0,o.jsx)(l,{label:`Height`,value:w,onChange:F,disabled:!c})}),c&&(0,o.jsx)(`button`,{type:`button`,"aria-label":`Save size`,onClick:e=>{e.stopPropagation(),I()},disabled:!!E,className:(0,a.default)(`komc:ml-1 komc:flex komc:h-5 komc:w-5 komc:shrink-0 komc:cursor-pointer`,`komc:items-center komc:justify-center komc:rounded komc:bg-blue-500`,`komc:text-white komc:hover:bg-blue-600`,`komc:disabled:pointer-events-none komc:disabled:hidden`),children:(0,o.jsx)(u,{})}),c&&E&&(0,o.jsx)(`div`,{className:`komc:absolute komc:top-6 komc:text-xs komc:whitespace-nowrap komc:text-red-600`,children:s[E](L)})]})})},l=({label:e,focus:t=!1,value:n,onChange:r,disabled:a})=>{let[s,c]=(0,i.useState)(30),l=(0,i.useRef)(null),u=(0,i.useRef)(null);return(0,i.useEffect)(()=>{l.current&&c(l.current.offsetWidth||30)},[n]),(0,i.useEffect)(()=>{t&&!a&&u.current?.focus()},[a,t]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{ref:l,"aria-hidden":`true`,className:`komc:pointer-events-none komc:invisible komc:absolute komc:whitespace-pre komc:text-base`,children:n||` `}),(0,o.jsx)(`input`,{ref:u,type:`text`,inputMode:`numeric`,maxLength:5,value:n,onChange:r,disabled:a,"aria-label":e,className:`komc:bg-transparent komc:text-center komc:text-base komc:outline-none komc:disabled:pointer-events-none`,style:{width:`${s+8}px`}})]})},u=()=>(0,o.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`none`,"aria-hidden":`true`,children:(0,o.jsx)(`path`,{d:`M3.5 8.5 6.5 11.5 12.5 4.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),d=(e={})=>function(){let{node:t,updateAttributes:r,editor:a,getPos:s}=n.r(),[l,u]=(0,i.useState)(!1),[d,f]=(0,i.useState)(),p=Number(t.attrs.width),m=Number(t.attrs.height);return(0,i.useLayoutEffect)(()=>{if(e.maxWidth!=null)return;let t=s();if(typeof t!=`number`)return;let n=a.view.nodeDOM(t);if(!(n instanceof HTMLElement))return;let r=()=>{f(n.clientWidth)};r();let i=new ResizeObserver(r);return i.observe(n),()=>i.disconnect()},[a,s]),(0,o.jsx)(c,{width:p,height:m,edit:l,setEdit:u,onChange:r,onExitEdit:()=>a.commands.focus(),minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth??d,maxHeight:e.maxHeight})},f=d();Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./editor-CHuJTM4H.mjs";import{r as t}from"./node-view-context-D-1j5isf.mjs";import{t as n}from"./use-drag-resize--3PrrhJj.mjs";import{useEffect as r,useLayoutEffect as i,useMemo as a,useRef as o,useState as s}from"react";import c from"clsx";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f={"width-under-min":e=>`Minimum width is ${e}px`,"width-over-max":e=>`Maximum width is ${e}px`,"height-under-min":e=>`Minimum height is ${e}px`},p=({width:t=0,height:l=0,edit:p=!1,setEdit:g=()=>{},onChange:_,onExitEdit:v,minWidth:y=n.DEFAULT_WIDTH,minHeight:b=n.DEFAULT_HEIGHT,maxWidth:x,maxHeight:S,className:C})=>{let w=o(null),[T,E]=s(null),[D,O]=s(t),[k,A]=s(l),[j,M]=s(null),N=o(t&&l?t/l:1),P=x??T??1/0,F=S??1/0,I=a(()=>({min:{width:y,height:b},max:{width:P,height:F}}),[b,y,F,P]);i(()=>{if(x!=null)return;let e=w.current?.parentElement,t=e?.parentElement??e;if(!t)return;let n=()=>{E(t.clientWidth)};n();let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},[x]),r(()=>{let e=w.current?.parentElement;if(!e)return;let t=()=>{p&&(g(!1),v?.())};return e.addEventListener(`mouseleave`,t),()=>e.removeEventListener(`mouseleave`,t)},[p,v,g]);let L=()=>{p||(g(!0),t&&l&&(N.current=t/l))},R=e=>{p||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),L())},z=t=>{if(!/^[0-9]*$/.test(t.target.value))return;let n=Number(t.target.value),{width:r,height:i,result:a}=e({...I,width:n,height:k,type:`width`,currentRatio:N.current});O(r),A(i),M(a)},B=t=>{if(!/^[0-9]*$/.test(t.target.value))return;let n=Number(t.target.value),{width:r,height:i,result:a}=e({...I,width:D,height:n,type:`height`,currentRatio:N.current});O(r),A(i),M(a)},V=()=>{j||D<y||D>P||k<b||(g(!1),_?.({width:D,height:k}))};r(()=>{O(t),A(l),t&&l&&(N.current=t/l);let{result:n}=e({...I,width:t,height:l,type:`width`,currentRatio:N.current}),{result:r}=e({...I,width:t,height:l,type:`height`,currentRatio:N.current});M(n||r||null)},[I,p,l,t]);let H=j===`width-over-max`?P:j===`height-under-min`?b:y;return u(`div`,{ref:w,"data-komc":!0,role:p?void 0:`button`,tabIndex:p?void 0:0,className:c(`komc:absolute komc:flex komc:flex-col komc:items-center komc:justify-center`,`komc:text-center komc:text-base komc:text-black`,p?`komc:z-55 komc:-inset-1.5 komc:bg-white/60 komc:opacity-100`:c(`komc:top-1/2 komc:left-1/2 komc:z-40 komc:-translate-x-1/2`,`komc:-translate-y-1/2 komc:opacity-0 komc:group-hover:opacity-100`),C),onClick:L,onKeyDown:R,children:d(`div`,{className:c(`komc:relative komc:flex komc:flex-row komc:items-center komc:justify-center komc:gap-x-1`,!p&&`komc:cursor-pointer`),children:[u(`div`,{className:`komc:relative komc:inline`,children:u(m,{label:`Width`,focus:p,value:D,onChange:z,disabled:!p})}),u(`span`,{children:`x`}),u(`div`,{className:`komc:relative komc:inline`,children:u(m,{label:`Height`,value:k,onChange:B,disabled:!p})}),p&&u(`button`,{type:`button`,"aria-label":`Save size`,onClick:e=>{e.stopPropagation(),V()},disabled:!!j,className:c(`komc:ml-1 komc:flex komc:h-5 komc:w-5 komc:shrink-0 komc:cursor-pointer`,`komc:items-center komc:justify-center komc:rounded komc:bg-blue-500`,`komc:text-white komc:hover:bg-blue-600`,`komc:disabled:pointer-events-none komc:disabled:hidden`),children:u(h,{})}),p&&j&&u(`div`,{className:`komc:absolute komc:top-6 komc:text-xs komc:whitespace-nowrap komc:text-red-600`,children:f[j](H)})]})})},m=({label:e,focus:t=!1,value:n,onChange:i,disabled:a})=>{let[c,f]=s(30),p=o(null),m=o(null);return r(()=>{p.current&&f(p.current.offsetWidth||30)},[n]),r(()=>{t&&!a&&m.current?.focus()},[a,t]),d(l,{children:[u(`span`,{ref:p,"aria-hidden":`true`,className:`komc:pointer-events-none komc:invisible komc:absolute komc:whitespace-pre komc:text-base`,children:n||` `}),u(`input`,{ref:m,type:`text`,inputMode:`numeric`,maxLength:5,value:n,onChange:i,disabled:a,"aria-label":e,className:`komc:bg-transparent komc:text-center komc:text-base komc:outline-none komc:disabled:pointer-events-none`,style:{width:`${c+8}px`}})]})},h=()=>u(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`none`,"aria-hidden":`true`,children:u(`path`,{d:`M3.5 8.5 6.5 11.5 12.5 4.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),g=(e={})=>function(){let{node:n,updateAttributes:r,editor:a,getPos:o}=t(),[c,l]=s(!1),[d,f]=s(),m=Number(n.attrs.width),h=Number(n.attrs.height);return i(()=>{if(e.maxWidth!=null)return;let t=o();if(typeof t!=`number`)return;let n=a.view.nodeDOM(t);if(!(n instanceof HTMLElement))return;let r=()=>{f(n.clientWidth)};r();let i=new ResizeObserver(r);return i.observe(n),()=>i.disconnect()},[a,o]),u(p,{width:m,height:h,edit:c,setEdit:l,onChange:r,onExitEdit:()=>a.commands.focus(),minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth??d,maxHeight:e.maxHeight})},_=g();export{_ as n,g as r,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{NodeViewWrapper as e}from"@tiptap/react";import{createContext as t,useContext as n}from"react";import r from"clsx";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=t(null),s=t([]);function c(){let e=n(o);if(!e)throw Error(`useNodeView must be used inside a node view`);return e}const l=()=>n(s),u=({value:e,plugins:t=[],children:n})=>i(o.Provider,{value:e,children:i(s.Provider,{value:t,children:n})}),d=(e,t=[])=>n=>i(u,{value:n,plugins:t,children:i(e,{...n})}),f=({className:t,frameClassName:s,style:c,children:u})=>{let d=n(o),f=l();if(!d)throw Error(`PluginNodeView must be used inside a node view`);return i(e,{className:r(`komc:relative komc:flex komc:w-full komc:min-w-0 komc:max-w-full komc:flex-row komc:items-center komc:overscroll-none komc:touch-none komc:select-none komc:group`,t),children:a(`div`,{className:r(`komc-node-frame komc:relative komc:flex komc:min-w-0 komc:h-full komc:w-full komc:max-w-full komc:justify-center`,s),style:c,children:[u,f.map((e,t)=>i(e,{...d},t))]})})};export{d as a,l as i,f as n,c as r,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@tiptap/react`),n=require(`react`),r=require(`clsx`);r=e.t(r);let i=require(`react/jsx-runtime`);const a=(0,n.createContext)(null),o=(0,n.createContext)([]);function s(){let e=(0,n.useContext)(a);if(!e)throw Error(`useNodeView must be used inside a node view`);return e}const c=()=>(0,n.useContext)(o),l=({value:e,plugins:t=[],children:n})=>(0,i.jsx)(a.Provider,{value:e,children:(0,i.jsx)(o.Provider,{value:t,children:n})}),u=(e,t=[])=>n=>(0,i.jsx)(l,{value:n,plugins:t,children:(0,i.jsx)(e,{...n})}),d=`komc:relative komc:flex komc:w-full komc:min-w-0 komc:max-w-full komc:flex-row komc:items-center komc:overscroll-none komc:touch-none komc:select-none komc:group`,f=`komc-node-frame komc:relative komc:flex komc:min-w-0 komc:h-full komc:w-full komc:max-w-full komc:justify-center`,p=({className:e,frameClassName:o,style:s,children:l})=>{let u=(0,n.useContext)(a),d=c();if(!u)throw Error(`PluginNodeView must be used inside a node view`);return(0,i.jsx)(t.NodeViewWrapper,{className:(0,r.default)(`komc:relative komc:flex komc:w-full komc:min-w-0 komc:max-w-full komc:flex-row komc:items-center komc:overscroll-none komc:touch-none komc:select-none komc:group`,e),children:(0,i.jsxs)(`div`,{className:(0,r.default)(`komc-node-frame komc:relative komc:flex komc:min-w-0 komc:h-full komc:w-full komc:max-w-full komc:justify-center`,o),style:s,children:[l,d.map((e,t)=>(0,i.jsx)(e,{...u},t))]})})};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../src-
|
|
1
|
+
"use client";require(`../../src-Dz1mULYA.cjs`);const e=require(`../../api-client-BXH8Rm-J.cjs`);exports.ApiClientProvider=e.t,exports.useApiClient=e.n;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ApiConfig, t as ApiClient } from "../../index-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ApiConfig, t as ApiClient } from "../../index-DCzaZKG0.cjs";
|
|
2
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/providers/api-client/api-client.d.ts
|
|
5
5
|
declare function ApiClientProvider({
|
|
@@ -8,7 +8,7 @@ declare function ApiClientProvider({
|
|
|
8
8
|
}: {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
config: ApiConfig;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime27.JSX.Element;
|
|
12
12
|
declare function useApiClient(): ApiClient;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { ApiClientProvider, useApiClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ApiConfig, t as ApiClient } from "../../index-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ApiConfig, t as ApiClient } from "../../index-CqZGdObz.mjs";
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/providers/api-client/api-client.d.ts
|
|
5
5
|
declare function ApiClientProvider({
|
|
@@ -8,7 +8,7 @@ declare function ApiClientProvider({
|
|
|
8
8
|
}: {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
config: ApiConfig;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime2.JSX.Element;
|
|
12
12
|
declare function useApiClient(): ApiClient;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { ApiClientProvider, useApiClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../src-
|
|
1
|
+
"use client";import"../../src-BB55dPBE.mjs";import{n as e,t}from"../../api-client-xK3Ua3Gr.mjs";export{t as ApiClientProvider,e as useApiClient};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`);const r=(0,t.createContext)(null);function i({editor:e,children:i}){let a=(0,t.useMemo)(()=>({editor:e}),[e]);return(0,n.jsx)(r.Provider,{value:a,children:i})}function a(){let e=(0,t.useContext)(r);if(!e)throw Error(`useEditorContext must be used within EditorProvider`);return e}function o(){let{editor:e}=a();if(!e)throw Error(`Editor is not available`);return e}function s(){return a().editor}exports.EditorProvider=i,exports.useEditorContext=a,exports.useOptionalEditor=s,exports.useRequiredEditor=o;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/providers/editor/editor.d.ts
|
|
6
|
+
interface EditorContextValue {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
}
|
|
9
|
+
interface EditorProviderProps {
|
|
10
|
+
editor: Editor | null;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare function EditorProvider({
|
|
14
|
+
editor,
|
|
15
|
+
children
|
|
16
|
+
}: EditorProviderProps): react_jsx_runtime26.JSX.Element;
|
|
17
|
+
declare function useEditorContext(): EditorContextValue;
|
|
18
|
+
declare function useRequiredEditor(): Editor;
|
|
19
|
+
declare function useOptionalEditor(): Editor | null;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { EditorProvider, useEditorContext, useOptionalEditor, useRequiredEditor };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/providers/editor/editor.d.ts
|
|
6
|
+
interface EditorContextValue {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
}
|
|
9
|
+
interface EditorProviderProps {
|
|
10
|
+
editor: Editor | null;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare function EditorProvider({
|
|
14
|
+
editor,
|
|
15
|
+
children
|
|
16
|
+
}: EditorProviderProps): react_jsx_runtime1.JSX.Element;
|
|
17
|
+
declare function useEditorContext(): EditorContextValue;
|
|
18
|
+
declare function useRequiredEditor(): Editor;
|
|
19
|
+
declare function useOptionalEditor(): Editor | null;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { EditorProvider, useEditorContext, useOptionalEditor, useRequiredEditor };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,useContext as t,useMemo as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=e(null);function a({editor:e,children:t}){let a=n(()=>({editor:e}),[e]);return r(i.Provider,{value:a,children:t})}function o(){let e=t(i);if(!e)throw Error(`useEditorContext must be used within EditorProvider`);return e}function s(){let{editor:e}=o();if(!e)throw Error(`Editor is not available`);return e}function c(){return o().editor}export{a as EditorProvider,o as useEditorContext,c as useOptionalEditor,s as useRequiredEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`notistack`);function r({maxSnack:e=3,...r}){return(0,t.jsx)(n.SnackbarProvider,{maxSnack:e,...r})}exports.NotiStackProvider=r;
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`notistack`);function r({maxSnack:e=3,...r}){return(0,t.jsx)(n.SnackbarProvider,{maxSnack:e,...r})}exports.NotiStackProvider=r;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
1
2
|
import { ComponentProps } from "react";
|
|
2
|
-
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
3
|
import { SnackbarProvider } from "notistack";
|
|
4
4
|
|
|
5
5
|
//#region src/providers/noti-stack/noti-stack.d.ts
|
|
6
6
|
declare function NotiStackProvider({
|
|
7
7
|
maxSnack,
|
|
8
8
|
...props
|
|
9
|
-
}: ComponentProps<typeof SnackbarProvider>):
|
|
9
|
+
}: ComponentProps<typeof SnackbarProvider>): react_jsx_runtime28.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { NotiStackProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{SnackbarProvider as t}from"notistack";function n({maxSnack:n=3,...r}){return e(t,{maxSnack:n,...r})}export{n as NotiStackProvider};
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{SnackbarProvider as t}from"notistack";function n({maxSnack:n=3,...r}){return e(t,{maxSnack:n,...r})}export{n as NotiStackProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./label-jZuNIGyF.cjs`);let n=require(`class-variance-authority`),r=require(`clsx`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`react-select`);a=e.t(a);const o=(0,n.cva)(`komc:gap-x-2.5 komc:h-full! komc:border-[0.6px]! komc:shadow-field komc:form-field!`,{variants:{rounded:{sm:`komc:rounded-sm!`,md:`komc:rounded-md!`,lg:`komc:rounded-lg!`,xl:`komc:rounded-xl!`}},defaultVariants:{rounded:`lg`}}),s=(0,n.cva)(`komc:gap-2 komc:pl-4! komc:pr-0! komc:m-0!`,{variants:{size:{none:`komc:py-0!`,sm:`komc:py-2!`,md:`komc:py-2.5!`,lg:`komc:py-2.75!`}},defaultVariants:{size:`md`}}),c=({size:e,rounded:t})=>({control:e=>(0,r.default)(e.className,o({rounded:t}),e.isFocused&&`komc-active`),valueContainer:t=>(0,r.default)(t.className,s({size:e})),input:e=>(0,r.default)(e.className,`komc:h-full komc:p-0! komc:m-0!`),placeholder:e=>(0,r.default)(e.className,`komc:h-full`),clearIndicator:e=>(0,r.default)(e.className,`komc:p-2.5! komc:pl-0!`),indicatorSeparator:e=>(0,r.default)(e.className,`komc:my-3.5! komc:bg-neutral-100!`),dropdownIndicator:e=>(0,r.default)(e.className,`komc:px-2.5!`),multiValue:e=>(0,r.default)(e.className,`komc:h-full komc:p-0! komc:m-0!`),menu:e=>(0,r.default)(e.className,`komc:z-10001!`)}),l=({label:e,size:n=`md`,rounded:o=`lg`,isMulti:s,className:l,...u})=>(0,i.jsx)(t.t,{...e,children:(0,i.jsx)(`div`,{"data-komc":!0,children:(0,i.jsx)(a.default,{isMulti:s,className:(0,r.default)(`komc:text-lg`,l),classNames:c({size:n,rounded:o}),...u})})});Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./label-DeEAgKAc.mjs";import{cva as t}from"class-variance-authority";import n from"clsx";import{jsx as r}from"react/jsx-runtime";import i from"react-select";const a=t(`komc:gap-x-2.5 komc:h-full! komc:border-[0.6px]! komc:shadow-field komc:form-field!`,{variants:{rounded:{sm:`komc:rounded-sm!`,md:`komc:rounded-md!`,lg:`komc:rounded-lg!`,xl:`komc:rounded-xl!`}},defaultVariants:{rounded:`lg`}}),o=t(`komc:gap-2 komc:pl-4! komc:pr-0! komc:m-0!`,{variants:{size:{none:`komc:py-0!`,sm:`komc:py-2!`,md:`komc:py-2.5!`,lg:`komc:py-2.75!`}},defaultVariants:{size:`md`}}),s=({size:e,rounded:t})=>({control:e=>n(e.className,a({rounded:t}),e.isFocused&&`komc-active`),valueContainer:t=>n(t.className,o({size:e})),input:e=>n(e.className,`komc:h-full komc:p-0! komc:m-0!`),placeholder:e=>n(e.className,`komc:h-full`),clearIndicator:e=>n(e.className,`komc:p-2.5! komc:pl-0!`),indicatorSeparator:e=>n(e.className,`komc:my-3.5! komc:bg-neutral-100!`),dropdownIndicator:e=>n(e.className,`komc:px-2.5!`),multiValue:e=>n(e.className,`komc:h-full komc:p-0! komc:m-0!`),menu:e=>n(e.className,`komc:z-10001!`)}),c=({label:t,size:a=`md`,rounded:o=`lg`,isMulti:c,className:l,...u})=>r(e,{...t,children:r(`div`,{"data-komc":!0,children:r(i,{isMulti:c,className:n(`komc:text-lg`,l),classNames:s({size:a,rounded:o}),...u})})});export{o as i,s as n,a as r,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`class-variance-authority`),n=require(`clsx`);n=e.t(n);let r=require(`react/jsx-runtime`);const i=(0,t.cva)((0,n.default)(`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:n,height:a,className:o,...s}){let c=n?typeof n==`string`?n:`${n}px`:void 0,l=a?typeof a==`string`?a:`${a}px`:void 0;return(0,r.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}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cva as e}from"class-variance-authority";import t from"clsx";import{jsx as n}from"react/jsx-runtime";const r=e(t(`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:t,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 n(`div`,{"data-komc":!0,"aria-hidden":`true`,className:r({size:e,rounded:t,className:o}),style:{width:c,height:l},...s})}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"js-cookie";import t from"query-string";var n=class{constructor(e){this.ctx=e}async getPriorityPosition(e,t){let n=`${this.ctx.apiEndpoint}/assist/priority-current-position?priority=${e}&type=${t}&order=desc`;return(await(await fetch(n,{method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`})).json()).result}},r=class{constructor(e){this.ctx=e}async login(e,t){let n=`${this.ctx.apiEndpoint}/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}async accessLog(){if(this.ctx.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.ctx.apiEndpoint}/access-log`,t=await fetch(e,{headers:{Authorization:this.ctx.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async me(){if(this.ctx.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.ctx.apiEndpoint}/me`,t=await fetch(e,{headers:{Authorization:this.ctx.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async hasPermission(e,t,n=!1,r=!1){if(this.ctx.getToken()===void 0){if(!r)throw Error(`로그인 필요`);return}let i=`${this.ctx.apiEndpoint}/has-permission?obj=${e}&act=${t}`;n&&(i=`${i}&exact=true`);let a=await fetch(i,{headers:{Authorization:this.ctx.getBearer()}});if(!a.ok){if(!r)throw Error(`인증에러`);return}return await a.json()}},i=class{constructor(e){this.ctx=e}cdnMedia(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.ctx.cdnEndpoint}/media/resized/${n}/${t}/${r}`}return`${this.ctx.cdnEndpoint}/media/${e}`}cdnStatic(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.ctx.cdnEndpoint}/media/resized/${n}/${t}/${r}`}return`${this.ctx.cdnEndpoint}/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.ctx.apiEndpoint}/upload/presign?${n}`,{credentials:`include`,headers:{Authorization:this.ctx.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))}},a=class{auth;api;media;constructor(e){let t={apiEndpoint:e.apiEndpoint,cdnEndpoint:e.cdnEndpoint,getToken:()=>this.getToken(),getBearer:()=>this.getBearer()};this.auth=new r(t),this.api=new n(t),this.media=new i(t)}getToken(){return e.get(`access`)}getBearer(){return`Bearer ${this.getToken()}`}};export{n as i,i as n,r,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
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{constructor(e){this.ctx=e}async getPriorityPosition(e,t){let n=`${this.ctx.apiEndpoint}/assist/priority-current-position?priority=${e}&type=${t}&order=desc`;return(await(await fetch(n,{method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`})).json()).result}},i=class{constructor(e){this.ctx=e}async login(e,t){let n=`${this.ctx.apiEndpoint}/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}async accessLog(){if(this.ctx.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.ctx.apiEndpoint}/access-log`,t=await fetch(e,{headers:{Authorization:this.ctx.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async me(){if(this.ctx.getToken()===void 0)throw Error(`로그인 필요`);let e=`${this.ctx.apiEndpoint}/me`,t=await fetch(e,{headers:{Authorization:this.ctx.getBearer()}});if(!t.ok)throw Error(`인증에러`);return await t.json()}async hasPermission(e,t,n=!1,r=!1){if(this.ctx.getToken()===void 0){if(!r)throw Error(`로그인 필요`);return}let i=`${this.ctx.apiEndpoint}/has-permission?obj=${e}&act=${t}`;n&&(i=`${i}&exact=true`);let a=await fetch(i,{headers:{Authorization:this.ctx.getBearer()}});if(!a.ok){if(!r)throw Error(`인증에러`);return}return await a.json()}},a=class{constructor(e){this.ctx=e}cdnMedia(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.ctx.cdnEndpoint}/media/resized/${n}/${t}/${r}`}return`${this.ctx.cdnEndpoint}/media/${e}`}cdnStatic(e,t){if(!e)return``;if(t){let[n,r]=e.split(`/`);return`${this.ctx.cdnEndpoint}/media/resized/${n}/${t}/${r}`}return`${this.ctx.cdnEndpoint}/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.ctx.apiEndpoint}/upload/presign?${t}`,{credentials:`include`,headers:{Authorization:this.ctx.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))}},o=class{auth;api;media;constructor(e){let t={apiEndpoint:e.apiEndpoint,cdnEndpoint:e.cdnEndpoint,getToken:()=>this.getToken(),getBearer:()=>this.getBearer()};this.auth=new i(t),this.api=new r(t),this.media=new a(t)}getToken(){return t.default.get(`access`)}getBearer(){return`Bearer ${this.getToken()}`}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|