@machinerd/js-module 0.10.0 → 0.11.1
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 +134 -59
- package/dist/align-CdK8Ar2w.mjs +1 -0
- package/dist/align-Dp4avXIm.cjs +1 -0
- package/dist/{api-client-B-kwZogn.mjs → api-client-D2UDU0fw.mjs} +1 -1
- package/dist/{api-client-BH5tW3p8.cjs → api-client-D7WV9lod.cjs} +1 -1
- package/dist/basic-image-C_Q1qL3X.mjs +1 -0
- package/dist/basic-image-DqKtJzvC.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 -0
- package/dist/editor/index.d.cts +58 -0
- package/dist/editor/index.d.mts +58 -0
- package/dist/editor/index.mjs +1 -0
- 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-CjW1pMb_.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-BH4lb2K5.cjs +1 -0
- package/dist/image-DCRvyqH3.mjs +1 -0
- package/dist/index-90Zl6qBK.d.cts +17 -0
- package/dist/index-BE0yu6JW.d.mts +73 -0
- package/dist/index-BHIPhj3k.d.mts +40 -0
- package/dist/index-BHsUbtLC.d.cts +11 -0
- package/dist/index-BKn2KTaw.d.cts +45 -0
- package/dist/index-BMxk2WJs.d.mts +56 -0
- package/dist/index-Bokh2eMG.d.mts +34 -0
- package/dist/{util/fetcher.d.cts → index-Bpp6ufv-.d.cts} +2 -2
- package/dist/index-BxqkZ148.d.cts +18 -0
- package/dist/index-ByhcgmSd.d.cts +43 -0
- package/dist/index-C-4QxPEj.d.cts +34 -0
- package/dist/index-C3wA7a3i.d.mts +7 -0
- package/dist/index-CFP0MOF3.d.mts +31 -0
- package/dist/index-CLS7OQza.d.cts +31 -0
- package/dist/index-CLxl-tUO.d.cts +41 -0
- package/dist/index-CN8vImmH.d.cts +43 -0
- package/dist/index-CTp6ZndQ.d.mts +43 -0
- package/dist/{util/fetcher.d.mts → index-C_5zGF-K.d.mts} +2 -2
- package/dist/index-CcpFy_mT.d.mts +17 -0
- package/dist/index-Cjrxf1Di.d.cts +40 -0
- package/dist/index-CoMstKUb.d.cts +26 -0
- package/dist/index-CvoFIe_Y.d.cts +7 -0
- package/dist/index-Cxc49Lmr.d.mts +19 -0
- package/dist/index-D0Uuydfo.d.cts +6 -0
- package/dist/index-D5uh7klO.d.mts +18 -0
- package/dist/index-DEbgGPvL.d.mts +26 -0
- package/dist/{use-subset-image-Ck1Gk5Qk.d.mts → index-DHyXKIBX.d.cts} +1 -1
- package/dist/index-DOLVFIAi.d.cts +73 -0
- package/dist/index-DTtrJ-ei.d.cts +10 -0
- package/dist/index-DeXwS1TW.d.mts +10 -0
- package/dist/index-Dhkwd0rJ.d.cts +19 -0
- package/dist/{use-subset-image-oZAiC9VK.d.cts → index-DxW8JBva.d.mts} +1 -1
- package/dist/index-F4q_POK6.d.mts +43 -0
- package/dist/index-LJemrhZD.d.mts +45 -0
- package/dist/index-PHOOF3aY.d.cts +56 -0
- package/dist/index-aA4ojwuQ.d.mts +6 -0
- package/dist/index-qmN89543.d.mts +11 -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.d.mts +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-DuOwAcib.cjs +1 -0
- package/dist/src-blAkna22.mjs +1 -0
- package/dist/styles/admin.css +2424 -0
- package/dist/styles/editor.css +3109 -0
- package/dist/styles/index.css +919 -64
- package/dist/subset-image-Bukna29P.cjs +1 -0
- package/dist/subset-image-C7qO8AiN.mjs +1 -0
- package/dist/subset-image-Co0fWefj.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/ui/button/index.d.cts +50 -0
- package/dist/ui/button/index.d.mts +50 -0
- 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.d.mts +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 +6 -6
- 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 -0
- package/dist/ui/dropdown/index.d.cts +44 -0
- package/dist/ui/dropdown/index.d.mts +44 -0
- package/dist/ui/dropdown/index.mjs +1 -0
- 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-DfYVewmw.mjs +1 -0
- package/dist/use-subset-image-wa7xQOwx.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.mts → common/index.d.cts} +5 -5
- package/dist/util/{common.d.cts → common/index.d.mts} +5 -5
- package/dist/{common-CCtD91nO.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.cts → file/index.d.cts} +2 -2
- package/dist/util/{file.d.mts → file/index.d.mts} +2 -2
- package/dist/util/file/index.mjs +1 -0
- package/dist/util/{format.d.cts → format/index.d.cts} +1 -1
- package/dist/util/{format.d.mts → format/index.d.mts} +1 -1
- 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 +165 -84
- package/dist/common-BQEGjmFn.cjs +0 -1
- package/dist/common-D4sUwkFd.cjs +0 -1
- package/dist/common-L3y7_eAy.mjs +0 -1
- package/dist/file-5mweNdAM.cjs +0 -1
- package/dist/hooks/common/index.cjs +0 -1
- package/dist/hooks/common/index.d.cts +0 -71
- package/dist/hooks/common/index.d.mts +0 -71
- package/dist/hooks/common/index.mjs +0 -1
- package/dist/hooks/use-snackbar.cjs +0 -1
- package/dist/index-CFOJBfVt.d.mts +0 -41
- package/dist/index-ChiDX5zW.d.cts +0 -41
- package/dist/skeleton-BCdxpynL.cjs +0 -1
- package/dist/skeleton-azZrk5-3.mjs +0 -1
- package/dist/src-6KfzqI9Z.cjs +0 -1
- package/dist/src-Ce2i3Lkj.mjs +0 -1
- package/dist/ui/index.cjs +0 -1
- package/dist/ui/index.d.cts +0 -135
- package/dist/ui/index.d.mts +0 -135
- package/dist/ui/index.mjs +0 -1
- package/dist/use-subset-image-CTy5mCLo.cjs +0 -1
- package/dist/use-subset-image-LQWsE5P4.mjs +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/file.cjs +0 -1
- package/dist/util/file.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-DmBRPhe2.cjs → use-dialog-stack-CH2nhH1Q.cjs} +0 -0
- /package/dist/{use-dialog-stack-STwnhvBB.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/{format.cjs → format/index.cjs} +0 -0
- /package/dist/util/{format.mjs → format/index.mjs} +0 -0
- /package/dist/util/{generator.mjs → generator/index.mjs} +0 -0
- /package/dist/util/{phone.mjs → phone/index.mjs} +0 -0
package/README.md
CHANGED
|
@@ -2,104 +2,152 @@
|
|
|
2
2
|
|
|
3
3
|
React용 공용 UI·훅·유틸·API 클라이언트 패키지입니다.
|
|
4
4
|
|
|
5
|
-
**현재 버전:** `0.6` (`package.json`의 `version` 필드와 동일합니다. 배포 전에는 해당 값을 확인하세요.)
|
|
6
|
-
|
|
7
|
-
**Peer dependency:** `react`, `react-dom` — `^18.3.1` 또는 `^19.0.0`
|
|
8
|
-
|
|
9
5
|
---
|
|
10
6
|
|
|
11
7
|
## 설치
|
|
12
8
|
|
|
13
9
|
```bash
|
|
14
10
|
pnpm add @machinerd/js-module
|
|
15
|
-
npm install @machinerd/js-module
|
|
16
|
-
yarn add @machinerd/js-module
|
|
17
11
|
```
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
`npm` / `yarn`도 동일합니다. 사용하는 UI에 맞는 peer dependency는 소비하는 앱에 설치해야 합니다. 아래 표를 참고하세요.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## CSS
|
|
18
|
+
|
|
19
|
+
유틸·훅·프로바이더만 쓰면 CSS는 필요 없습니다. `komc:` 유틸이나 `[data-komc]`가 있는 UI를 쓰면 스타일을 import 해야 합니다.
|
|
20
|
+
|
|
21
|
+
| 파일 | 필요할 때 |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `@machinerd/js-module/styles/index.css` | 공통 UI (버튼, 다이얼로그, 캐러셀 등) |
|
|
24
|
+
| `@machinerd/js-module/styles/admin.css` | 어드민 필드·토큰·`form-field` |
|
|
25
|
+
| `@machinerd/js-module/styles/editor.css` | 에디터 콘텐츠 스타일 |
|
|
20
26
|
|
|
21
27
|
```js
|
|
22
28
|
import '@machinerd/js-module/styles/index.css';
|
|
29
|
+
import '@machinerd/js-module/styles/admin.css';
|
|
30
|
+
import '@machinerd/js-module/styles/editor.css';
|
|
23
31
|
```
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
클래스는 `komc:` prefix이고, 공통 UI 리셋·토큰은 `[data-komc]` 안에만 적용됩니다. 호스트 앱의 Tailwind와 겹치지 않습니다. `editor.css`는 TipTap이 붙이는 `.tiptap`에 바로 걸립니다. `data-komc`나 `editor-wrapper`는 필요 없습니다. 필드 크롬까지 쓰려면 `admin.css`를 같이 넣습니다. 노드 호버·선택 링은 `.komc-node-frame`에, 드래그는 `data-drag-handle`에 걸립니다.
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
---
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
import ApiClient, { type ApiConfig } from '@machinerd/js-module';
|
|
37
|
+
## 에디터
|
|
31
38
|
|
|
32
|
-
|
|
33
|
-
apiEndpoint: 'https://api.example.com',
|
|
34
|
-
cdnEndpoint: 'https://cdn.example.com',
|
|
35
|
-
});
|
|
39
|
+
`Loader`와 노드·익스텐션은 엔트리가 나뉘어 있습니다. 서버에서 스키마만 쓸 때는 노드/익스텐션을 직접 import 하면 됩니다.
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
```js
|
|
42
|
+
import { Loader } from '@machinerd/js-module/editor';
|
|
43
|
+
import { CustomHeading } from '@machinerd/js-module/editor/nodes/custom-heading';
|
|
44
|
+
import { Align } from '@machinerd/js-module/editor/extensions/align';
|
|
39
45
|
```
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Providers
|
|
47
|
+
이미지 노드에 호스트 메뉴를 붙이려면 `plugins`에 컴포넌트를 넣습니다. `NodeSize` / `NodeResizer`는 기본 플러그인이라 같이 넣지 않아도 됩니다. 크기 입력의 최소·최댓값은 `size`로 넘기고, `plugins`에 `nodeSize()`를 또 넣으면 오버레이가 두 번 뜹니다. 메뉴는 NodeView 안에서 렌더되고, `useNodeView()`로 `updateAttributes` / `node` / `deleteNode`를 씁니다.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
```js
|
|
50
|
+
import { MenuWrapper, useNodeView } from '@machinerd/js-module/editor/nodes/menu-wrapper';
|
|
51
|
+
import type { SubsetImageAttrs } from '@machinerd/js-module/editor/nodes/subset-image';
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
function ImageMenu() {
|
|
54
|
+
const { node, updateAttributes, deleteNode } =
|
|
55
|
+
useNodeView<SubsetImageAttrs>();
|
|
49
56
|
|
|
50
|
-
export function App({ children }: { children: React.ReactNode }) {
|
|
51
57
|
return (
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
>
|
|
58
|
-
{children}
|
|
59
|
-
</ApiClientProvider>
|
|
58
|
+
<MenuWrapper>
|
|
59
|
+
<MenuWrapper.Item
|
|
60
|
+
onClick={() => updateAttributes({ alt: node.attrs.alt })}
|
|
61
|
+
/>
|
|
62
|
+
<MenuWrapper.Item onClick={deleteNode} />
|
|
63
|
+
</MenuWrapper>
|
|
60
64
|
);
|
|
61
65
|
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## UI 컴포넌트 (`@machinerd/js-module/ui/common`)
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
import '@machinerd/js-module/styles/index.css';
|
|
67
|
+
new Loader().mediaset({
|
|
68
|
+
subsetImage: {
|
|
69
|
+
size: { maxWidth: 829 },
|
|
70
|
+
plugins: [ImageMenu],
|
|
71
|
+
},
|
|
72
|
+
basicImage: { plugins: [ImageMenu] },
|
|
73
|
+
});
|
|
77
74
|
```
|
|
78
75
|
|
|
76
|
+
| 엔트리 | 내용 |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `@machinerd/js-module/editor` | `Loader` |
|
|
79
|
+
| `@machinerd/js-module/editor/nodes/basic-image` | `BasicImage` |
|
|
80
|
+
| `@machinerd/js-module/editor/nodes/subset-image` | `SubsetImage`, `SubsetImageAttrs` |
|
|
81
|
+
| `@machinerd/js-module/editor/nodes/custom-heading` | `CustomHeading` |
|
|
82
|
+
| `@machinerd/js-module/editor/nodes/table` | `Table`, `TableRow`, `TableCell`, `TableHeader` |
|
|
83
|
+
| `@machinerd/js-module/editor/nodes/tabs` | `Tabs`, `TabTitle`, `TabContent` |
|
|
84
|
+
| `@machinerd/js-module/editor/nodes/menu-wrapper` | `MenuWrapper`, `useNodeView` |
|
|
85
|
+
| `@machinerd/js-module/editor/nodes/node-view-context` | `useNodeView`, `PluginNodeView`, `withNodeViewChrome` |
|
|
86
|
+
| `@machinerd/js-module/editor/nodes/node-resize` | `NodeResizer`, `NodeResizerPlugin` |
|
|
87
|
+
| `@machinerd/js-module/editor/nodes/node-size` | `NodeSize`, `NodeSizePlugin`, `nodeSize` |
|
|
88
|
+
| `@machinerd/js-module/editor/extensions/align` | `Align` |
|
|
89
|
+
| `@machinerd/js-module/editor/extensions/table-resize` | `TableResize` |
|
|
90
|
+
| `@machinerd/js-module/editor/extensions/table-controls` | `TableControls` |
|
|
91
|
+
|
|
79
92
|
---
|
|
80
93
|
|
|
81
|
-
##
|
|
94
|
+
## Peer dependency
|
|
95
|
+
|
|
96
|
+
`react` / `react-dom`만 필수입니다. 나머지는 해당 엔트리를 쓸 때만 설치하면 됩니다.
|
|
97
|
+
|
|
98
|
+
| 패키지 | 버전 | 필수 | 사용처 |
|
|
99
|
+
| --- | --- | --- | --- |
|
|
100
|
+
| `react` | `^18.3.1` 또는 `^19.0.0` | 예 | 전체 |
|
|
101
|
+
| `react-dom` | `^18.3.1` 또는 `^19.0.0` | 예 | 전체 |
|
|
102
|
+
| `@fortawesome/fontawesome-svg-core` | `^6.0.0` 또는 `^7.0.0` | 아니오 | 어드민 필드 아이콘 타입 |
|
|
103
|
+
| `@fortawesome/react-fontawesome` | `^3.0.0` | 아니오 | 어드민 필드 아이콘 렌더 |
|
|
104
|
+
| `@floating-ui/react` | `^0.27.0` | 아니오 | `ui/dropdown` |
|
|
105
|
+
| `@dnd-kit/core` | `^6.0.0` | 아니오 | `ui/dnd`, video/source/file/series/sns/image-list 필드 |
|
|
106
|
+
| `@dnd-kit/modifiers` | `^9.0.0` | 아니오 | `ui/dnd` |
|
|
107
|
+
| `@dnd-kit/sortable` | `^10.0.0` | 아니오 | `ui/dnd`, video/source/file/series/sns/image-list 필드 |
|
|
108
|
+
| `@dnd-kit/utilities` | `^3.0.0` | 아니오 | `ui/dnd`, video/source/file/series/sns/image-list 필드 |
|
|
109
|
+
| `embla-carousel` | `^8.0.0` | 아니오 | `ui/carousel` |
|
|
110
|
+
| `embla-carousel-react` | `^8.0.0` | 아니오 | `ui/carousel` |
|
|
111
|
+
| `motion` | `^13.0.0` | 아니오 | `ui/motion-dialog`, `ui/radius-handler` |
|
|
112
|
+
| `notistack` | `^3.0.0` | 아니오 | `hooks/use-snackbar`, `providers/noti-stack` |
|
|
113
|
+
| `react-dropzone` | `>=14.0.0 <21.0.0` | 아니오 | `ui/admin/dropzone-field` |
|
|
114
|
+
| `react-hook-form` | `^7.0.0` | 아니오 | `ui/admin/with-extra-field` |
|
|
115
|
+
| `react-select` | `^5.0.0` | 아니오 | `ui/admin/select-field`, `ui/admin/source-field`, `ui/admin/sns-field`, `ui/admin/async-select-field`, `ui/admin/country-select` |
|
|
116
|
+
| `react-select-async-paginate` | `^0.7.0` | 아니오 | `ui/admin/async-select-field`, `ui/admin/country-select` |
|
|
117
|
+
| `@tailwindcss/typography` | `^0.5.0` | 아니오 | `styles/editor.css` |
|
|
118
|
+
| `@tiptap/core` | `^3.0.0` | 아니오 | 에디터 |
|
|
119
|
+
| `@tiptap/extension-color` | `^3.0.0` | 아니오 | 에디터 |
|
|
120
|
+
| `@tiptap/extension-details` | `^3.0.0` | 아니오 | 에디터 |
|
|
121
|
+
| `@tiptap/extension-document` | `^3.0.0` | 아니오 | 에디터 |
|
|
122
|
+
| `@tiptap/extension-heading` | `^3.0.0` | 아니오 | 에디터 |
|
|
123
|
+
| `@tiptap/extension-image` | `^3.0.0` | 아니오 | 에디터 |
|
|
124
|
+
| `@tiptap/extension-list` | `^3.0.0` | 아니오 | 에디터 |
|
|
125
|
+
| `@tiptap/extension-paragraph` | `^3.0.0` | 아니오 | 에디터 |
|
|
126
|
+
| `@tiptap/extension-table` | `^3.0.0` | 아니오 | 에디터 |
|
|
127
|
+
| `@tiptap/extension-text` | `^3.0.0` | 아니오 | 에디터 |
|
|
128
|
+
| `@tiptap/extension-text-style` | `^3.0.0` | 아니오 | 에디터 |
|
|
129
|
+
| `@tiptap/extension-youtube` | `^3.0.0` | 아니오 | 에디터 |
|
|
130
|
+
| `@tiptap/extensions` | `^3.0.0` | 아니오 | 에디터 |
|
|
131
|
+
| `@tiptap/pm` | `^3.0.0` | 아니오 | 에디터 |
|
|
132
|
+
| `@tiptap/react` | `^3.0.0` | 아니오 | 에디터 |
|
|
133
|
+
| `@tiptap/starter-kit` | `^3.0.0` | 아니오 | 에디터 |
|
|
134
|
+
| `@tiptap/suggestion` | `^3.0.0` | 아니오 | 에디터 |
|
|
82
135
|
|
|
83
|
-
|
|
136
|
+
---
|
|
84
137
|
|
|
85
|
-
|
|
86
|
-
pnpm install
|
|
87
|
-
pnpm build
|
|
88
|
-
```
|
|
138
|
+
## 로컬 개발
|
|
89
139
|
|
|
90
|
-
|
|
140
|
+
- 패키지 매니저는 `pnpm`입니다 (`packageManager`: `pnpm@10.25.0`).
|
|
141
|
+
- 소비하는 앱은 `dist`를 봅니다. 코드를 바꾼 뒤에는 이 저장소에서 다시 빌드해야 합니다.
|
|
142
|
+
- UI 루트에는 `data-komc`가 있어야 리셋·토큰이 적용됩니다. 라이브러리 컴포넌트가 대부분 붙여 둡니다.
|
|
143
|
+
- 다른 프로젝트에서 확인하려면 빌드 후 tarball을 넣습니다.
|
|
91
144
|
|
|
92
145
|
```bash
|
|
93
146
|
pnpm pack
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
소비하는 프로젝트에서:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
147
|
pnpm add /절대/또는/상대/경로/machinerd-js-module-[VERSION].tgz
|
|
100
148
|
```
|
|
101
149
|
|
|
102
|
-
|
|
150
|
+
`package.json`에는 이렇게 적어도 됩니다.
|
|
103
151
|
|
|
104
152
|
```json
|
|
105
153
|
{
|
|
@@ -108,3 +156,30 @@ pnpm add /절대/또는/상대/경로/machinerd-js-module-[VERSION].tgz
|
|
|
108
156
|
}
|
|
109
157
|
}
|
|
110
158
|
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 빌드
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
pnpm install
|
|
166
|
+
pnpm build
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
`pnpm build`는 JS(`tsdown`)와 CSS(`index` / `admin` / `editor`)를 `dist`에 만듭니다. 배포 전에만 쓰려면 `pnpm build:pack`으로 빌드와 `pack`을 한 번에 할 수 있습니다.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 테스트
|
|
174
|
+
|
|
175
|
+
단위 테스트 스크립트는 아직 없습니다. 지금은 아래를 쓰면 됩니다.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pnpm lint
|
|
179
|
+
pnpm build:tsc
|
|
180
|
+
pnpm storybook
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
- `lint` — ESLint
|
|
184
|
+
- `build:tsc` — 타입 체크
|
|
185
|
+
- `storybook` — `http://localhost:6006`에서 UI 확인
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Extension as e,isNodeSelection as t}from"@tiptap/core";const n=e.create({name:`align`,addOptions(){return{types:[`paragraph`,`heading`],defaultAlign:`left`}},addGlobalAttributes(){return[{types:this.options.types,attributes:{align:{default:this.options.defaultAlign,parseHTML:e=>e.getAttribute(`data-align`)??this.options.defaultAlign,renderHTML:e=>!e.align||e.align===this.options.defaultAlign?{}:{"data-align":e.align}}}}]},addCommands(){return{setAlign:e=>({editor:n,commands:r})=>{let{selection:i}=n.state;if(t(i)){let t=i.node;if(this.options.types.includes(t.type.name))return r.updateAttributes(t.type.name,{align:e})}let{$from:a}=i;for(let t=a.depth;t>=0;t--){let n=a.node(t);if(this.options.types.includes(n.type.name))return r.updateAttributes(n.type.name,{align:e})}return!1},unsetAlign:()=>({editor:e,commands:n})=>{let{selection:r}=e.state;if(t(r)){let e=r.node;if(this.options.types.includes(e.type.name))return n.updateAttributes(e.type.name,{align:this.options.defaultAlign})}let{$from:i}=r;for(let e=i.depth;e>=0;e--){let t=i.node(e);if(this.options.types.includes(t.type.name))return n.updateAttributes(t.type.name,{align:this.options.defaultAlign})}return!1}}}});export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@tiptap/core`);const n=t.Extension.create({name:`align`,addOptions(){return{types:[`paragraph`,`heading`],defaultAlign:`left`}},addGlobalAttributes(){return[{types:this.options.types,attributes:{align:{default:this.options.defaultAlign,parseHTML:e=>e.getAttribute(`data-align`)??this.options.defaultAlign,renderHTML:e=>!e.align||e.align===this.options.defaultAlign?{}:{"data-align":e.align}}}}]},addCommands(){return{setAlign:e=>({editor:n,commands:r})=>{let{selection:i}=n.state;if((0,t.isNodeSelection)(i)){let t=i.node;if(this.options.types.includes(t.type.name))return r.updateAttributes(t.type.name,{align:e})}let{$from:a}=i;for(let t=a.depth;t>=0;t--){let n=a.node(t);if(this.options.types.includes(n.type.name))return r.updateAttributes(n.type.name,{align:e})}return!1},unsetAlign:()=>({editor:e,commands:n})=>{let{selection:r}=e.state;if((0,t.isNodeSelection)(r)){let e=r.node;if(this.options.types.includes(e.type.name))return n.updateAttributes(e.type.name,{align:this.options.defaultAlign})}let{$from:i}=r;for(let e=i.depth;e>=0;e--){let t=i.node(e);if(this.options.types.includes(t.type.name))return n.updateAttributes(t.type.name,{align:this.options.defaultAlign})}return!1}}}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./src-
|
|
1
|
+
import{t as e}from"./src-blAkna22.mjs";import{createContext as t,useContext as n,useMemo as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=t(null);function o({children:t,config:n}){let{apiEndpoint:o,cdnEndpoint:s}=n,c=r(()=>new e({apiEndpoint:o,cdnEndpoint:s}),[o,s]);return i(a.Provider,{value:c,children:t})}function s(){let e=n(a);if(!e)throw Error(`ApiClient not found`);return e}export{s as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./src-
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./src-DuOwAcib.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.createContext)(null);function a({children:e,config:a}){let{apiEndpoint:o,cdnEndpoint:s}=a,c=(0,n.useMemo)(()=>new t.t({apiEndpoint:o,cdnEndpoint:s}),[o,s]);return(0,r.jsx)(i.Provider,{value:c,children:e})}function o(){let e=(0,n.useContext)(i);if(!e)throw Error(`ApiClient not found`);return e}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./subset-image-C7qO8AiN.mjs";import{mergeAttributes as t}from"@tiptap/core";import n from"@tiptap/extension-image";const r=n.extend({group:`block`,atom:!0,draggable:!0,addOptions(){return{...this.parent?.(),plugins:[],size:{}}},parseHTML(){return[{tag:`img`}]},renderHTML({HTMLAttributes:e}){return[`img`,t(e)]},addAttributes(){return{...this.parent?.(),src:{default:``},alt:{default:``},width:{default:400},height:{default:400},imagePosition:{default:`left`},imageRadius:{default:0},originalWidth:{default:1280}}},addNodeView(){return e(this.options.plugins,this.options.size)}});export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./subset-image-Bukna29P.cjs`);let n=require(`@tiptap/core`),r=require(`@tiptap/extension-image`);r=e.t(r);const i=r.default.extend({group:`block`,atom:!0,draggable:!0,addOptions(){return{...this.parent?.(),plugins:[],size:{}}},parseHTML(){return[{tag:`img`}]},renderHTML({HTMLAttributes:e}){return[`img`,(0,n.mergeAttributes)(e)]},addAttributes(){return{...this.parent?.(),src:{default:``},alt:{default:``},width:{default:400},height:{default:400},imagePosition:{default:`left`},imageRadius:{default:0},originalWidth:{default:1280}}},addNodeView(){return t.o(this.options.plugins,this.options.size)}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`lodash-es`);const i=`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/`,a=({countryCode:e,...i})=>{let a=(0,t.useMemo)(()=>`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/`+(0,r.lowerCase)(e)+`.svg`,[e]),o=e=>{e.currentTarget.remove()};return(0,n.jsx)(`img`,{"data-komc":!0,width:`34px`,height:`24px`,src:a,alt:e,...i,onError:o})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as e}from"react";import{jsx as t}from"react/jsx-runtime";import{lowerCase as n}from"lodash-es";const r=({countryCode:r,...i})=>{let a=e(()=>`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/`+n(r)+`.svg`,[r]),o=e=>{e.currentTarget.remove()};return t(`img`,{"data-komc":!0,width:`34px`,height:`24px`,src:a,alt:r,...i,onError:o})};export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@tiptap/extension-heading`);t=e.t(t);const n=t.default.extend({addAttributes(){return{...this.parent?.(),class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@tiptap/extension-heading";const t=e.extend({addAttributes(){return{...this.parent?.(),class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}}});export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useSortable as t}from"@dnd-kit/sortable";import{CSS as n}from"@dnd-kit/utilities";function r({id:r,render:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=t({id:r});return e(`div`,{ref:s,"data-komc":!0,style:{width:`100%`,zIndex:u?`100`:`auto`,opacity:u?.7:1,transform:n.Translate.toString(c),transition:l},children:i(a,o)})}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`@dnd-kit/sortable`),r=require(`@dnd-kit/utilities`);function i({id:e,render:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=(0,n.useSortable)({id:e});return(0,t.jsx)(`div`,{ref:s,"data-komc":!0,style:{width:`100%`,zIndex:u?`100`:`auto`,opacity:u?.7:1,transform:r.CSS.Translate.toString(c),transition:l},children:i(a,o)})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../align-Dp4avXIm.cjs`);exports.Align=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../../../align-CdK8Ar2w.mjs";export{e as Align};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../table-controls-CQmqnc4R.cjs`);exports.TableControls=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../../../table-controls-CpCGiLvR.mjs";export{e as TableControls};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../table-resize-DI2Pf2Mi.cjs`);exports.TableResize=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../../../table-resize-w9EsReKV.mjs";export{e as TableResize};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../src-DuOwAcib.cjs`);const t=require(`../align-Dp4avXIm.cjs`),n=require(`../table-controls-CQmqnc4R.cjs`),r=require(`../table-resize-DI2Pf2Mi.cjs`);require(`../file-DeZ1OKdy.cjs`),require(`../api-client-D7WV9lod.cjs`),require(`../use-subset-image-wa7xQOwx.cjs`),require(`../skeleton-7P1IZD3G.cjs`),require(`../image-BH4lb2K5.cjs`),require(`../editor-DvLUotoh.cjs`),require(`../node-view-context-YTl_1gGD.cjs`),require(`../use-drag-resize-BO3zANv3.cjs`),require(`../node-resize-dantnBzP.cjs`),require(`../node-size-BQQGo7t7.cjs`);const i=require(`../subset-image-Bukna29P.cjs`),a=require(`../basic-image-DqKtJzvC.cjs`),o=require(`../custom-heading-By14y5ug.cjs`);require(`../subset-image-P2NQM0-3.cjs`);const s=require(`../table-DmwOZtdl.cjs`),c=require(`../tabs-DiryrHZ7.cjs`);let l=require(`@tiptap/extension-text-style`),u=require(`@tiptap/extension-details`);u=e.t(u);let d=require(`@tiptap/extension-youtube`);d=e.t(d);let f=require(`@tiptap/starter-kit`);f=e.t(f);const p=(e,t)=>t?e.configure(t):e;var m=class{#e=[];#t=new Set;textset(e={}){return this.#t.has(`text`)?this:(this.#t.add(`text`),this.#e.push(l.TextStyleKit.configure({color:{types:[`textStyle`,`listItem`]},...e.textStyleKit}),f.default.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1},link:{openOnClick:!1,autolink:!0,defaultProtocol:`https`},heading:!1,...e.starterKit}),o.t.configure({levels:[1,2,3],...e.customHeading})),this)}mediaset(e={}){return this.#t.has(`media`)?this:(this.#t.add(`media`),this.#e.push(p(a.t,e.basicImage),p(i.r,e.subsetImage),d.default.configure({controls:!1,nocookie:!0,width:480,height:320,...e.youtube})),this)}tableset(e={}){return this.#t.has(`table`)?this:(this.#t.add(`table`),this.#e.push(s.t.configure({resizable:!0,...e.table}),p(s.i,e.tableRow),p(s.n,e.tableCell),p(s.r,e.tableHeader),p(r.t,e.tableResize),p(n.t,e.tableControls)),this)}layoutset(e={}){return this.#t.has(`layout`)?this:(this.#t.add(`layout`),this.#e.push(p(c.o,e.tabs),p(c.a,e.tabTitle),p(c.i,e.tabContent),t.t.configure({types:[`paragraph`,`heading`],defaultAlign:`left`,...e.align}),u.default.configure({persist:!0,HTMLAttributes:{class:`details`},...e.details}),p(u.DetailsContent,e.detailsContent),p(u.DetailsSummary,e.detailsSummary)),this)}otherset(e=[]){return this.#e.push(...e),this}init(){return[...this.#e]}};exports.Loader=m;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { t as Align } from "../index-BxqkZ148.cjs";
|
|
2
|
+
import { n as TableControls } from "../index-Dhkwd0rJ.cjs";
|
|
3
|
+
import { t as TableResize } from "../index-D0Uuydfo.cjs";
|
|
4
|
+
import "../index-Cjrxf1Di.cjs";
|
|
5
|
+
import "../index-ByhcgmSd.cjs";
|
|
6
|
+
import { t as BasicImage } from "../index-BHsUbtLC.cjs";
|
|
7
|
+
import { t as CustomHeading } from "../index-CvoFIe_Y.cjs";
|
|
8
|
+
import { r as SubsetImage } from "../index-C-4QxPEj.cjs";
|
|
9
|
+
import { i as TableRow, n as TableCell, r as TableHeader, t as Table } from "../index-DTtrJ-ei.cjs";
|
|
10
|
+
import { c as TabTitle, l as Tabs, s as TabContent } from "../index-CoMstKUb.cjs";
|
|
11
|
+
import { Extensions } from "@tiptap/core";
|
|
12
|
+
import { TextStyleKit } from "@tiptap/extension-text-style";
|
|
13
|
+
import Details, { DetailsContent, DetailsSummary } from "@tiptap/extension-details";
|
|
14
|
+
import Youtube from "@tiptap/extension-youtube";
|
|
15
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
16
|
+
|
|
17
|
+
//#region src/editor/loader.d.ts
|
|
18
|
+
type Config<T> = T extends {
|
|
19
|
+
configure: (options?: infer O) => unknown;
|
|
20
|
+
} ? O : never;
|
|
21
|
+
interface TextSetOptions {
|
|
22
|
+
textStyleKit?: Config<typeof TextStyleKit>;
|
|
23
|
+
starterKit?: Config<typeof StarterKit>;
|
|
24
|
+
customHeading?: Config<typeof CustomHeading>;
|
|
25
|
+
}
|
|
26
|
+
interface MediaSetOptions {
|
|
27
|
+
basicImage?: Config<typeof BasicImage>;
|
|
28
|
+
subsetImage?: Config<typeof SubsetImage>;
|
|
29
|
+
youtube?: Config<typeof Youtube>;
|
|
30
|
+
}
|
|
31
|
+
interface TableSetOptions {
|
|
32
|
+
table?: Config<typeof Table>;
|
|
33
|
+
tableRow?: Config<typeof TableRow>;
|
|
34
|
+
tableCell?: Config<typeof TableCell>;
|
|
35
|
+
tableHeader?: Config<typeof TableHeader>;
|
|
36
|
+
tableResize?: Config<typeof TableResize>;
|
|
37
|
+
tableControls?: Config<typeof TableControls>;
|
|
38
|
+
}
|
|
39
|
+
interface LayoutSetOptions {
|
|
40
|
+
tabs?: Config<typeof Tabs>;
|
|
41
|
+
tabTitle?: Config<typeof TabTitle>;
|
|
42
|
+
tabContent?: Config<typeof TabContent>;
|
|
43
|
+
align?: Config<typeof Align>;
|
|
44
|
+
details?: Config<typeof Details>;
|
|
45
|
+
detailsContent?: Config<typeof DetailsContent>;
|
|
46
|
+
detailsSummary?: Config<typeof DetailsSummary>;
|
|
47
|
+
}
|
|
48
|
+
declare class Loader {
|
|
49
|
+
#private;
|
|
50
|
+
textset(options?: TextSetOptions): this;
|
|
51
|
+
mediaset(options?: MediaSetOptions): this;
|
|
52
|
+
tableset(options?: TableSetOptions): this;
|
|
53
|
+
layoutset(options?: LayoutSetOptions): this;
|
|
54
|
+
otherset(extensions?: Extensions): this;
|
|
55
|
+
init(): Extensions;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { type LayoutSetOptions, Loader, type MediaSetOptions, type TableSetOptions, type TextSetOptions };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { t as Align } from "../index-D5uh7klO.mjs";
|
|
2
|
+
import { n as TableControls } from "../index-Cxc49Lmr.mjs";
|
|
3
|
+
import { t as TableResize } from "../index-aA4ojwuQ.mjs";
|
|
4
|
+
import "../index-BHIPhj3k.mjs";
|
|
5
|
+
import "../index-CTp6ZndQ.mjs";
|
|
6
|
+
import { t as BasicImage } from "../index-qmN89543.mjs";
|
|
7
|
+
import { t as CustomHeading } from "../index-C3wA7a3i.mjs";
|
|
8
|
+
import { r as SubsetImage } from "../index-Bokh2eMG.mjs";
|
|
9
|
+
import { i as TableRow, n as TableCell, r as TableHeader, t as Table } from "../index-DeXwS1TW.mjs";
|
|
10
|
+
import { c as TabTitle, l as Tabs, s as TabContent } from "../index-DEbgGPvL.mjs";
|
|
11
|
+
import { TextStyleKit } from "@tiptap/extension-text-style";
|
|
12
|
+
import Details, { DetailsContent, DetailsSummary } from "@tiptap/extension-details";
|
|
13
|
+
import Youtube from "@tiptap/extension-youtube";
|
|
14
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
15
|
+
import { Extensions } from "@tiptap/core";
|
|
16
|
+
|
|
17
|
+
//#region src/editor/loader.d.ts
|
|
18
|
+
type Config<T> = T extends {
|
|
19
|
+
configure: (options?: infer O) => unknown;
|
|
20
|
+
} ? O : never;
|
|
21
|
+
interface TextSetOptions {
|
|
22
|
+
textStyleKit?: Config<typeof TextStyleKit>;
|
|
23
|
+
starterKit?: Config<typeof StarterKit>;
|
|
24
|
+
customHeading?: Config<typeof CustomHeading>;
|
|
25
|
+
}
|
|
26
|
+
interface MediaSetOptions {
|
|
27
|
+
basicImage?: Config<typeof BasicImage>;
|
|
28
|
+
subsetImage?: Config<typeof SubsetImage>;
|
|
29
|
+
youtube?: Config<typeof Youtube>;
|
|
30
|
+
}
|
|
31
|
+
interface TableSetOptions {
|
|
32
|
+
table?: Config<typeof Table>;
|
|
33
|
+
tableRow?: Config<typeof TableRow>;
|
|
34
|
+
tableCell?: Config<typeof TableCell>;
|
|
35
|
+
tableHeader?: Config<typeof TableHeader>;
|
|
36
|
+
tableResize?: Config<typeof TableResize>;
|
|
37
|
+
tableControls?: Config<typeof TableControls>;
|
|
38
|
+
}
|
|
39
|
+
interface LayoutSetOptions {
|
|
40
|
+
tabs?: Config<typeof Tabs>;
|
|
41
|
+
tabTitle?: Config<typeof TabTitle>;
|
|
42
|
+
tabContent?: Config<typeof TabContent>;
|
|
43
|
+
align?: Config<typeof Align>;
|
|
44
|
+
details?: Config<typeof Details>;
|
|
45
|
+
detailsContent?: Config<typeof DetailsContent>;
|
|
46
|
+
detailsSummary?: Config<typeof DetailsSummary>;
|
|
47
|
+
}
|
|
48
|
+
declare class Loader {
|
|
49
|
+
#private;
|
|
50
|
+
textset(options?: TextSetOptions): this;
|
|
51
|
+
mediaset(options?: MediaSetOptions): this;
|
|
52
|
+
tableset(options?: TableSetOptions): this;
|
|
53
|
+
layoutset(options?: LayoutSetOptions): this;
|
|
54
|
+
otherset(extensions?: Extensions): this;
|
|
55
|
+
init(): Extensions;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { type LayoutSetOptions, Loader, type MediaSetOptions, type TableSetOptions, type TextSetOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../src-blAkna22.mjs";import{t as e}from"../align-CdK8Ar2w.mjs";import{t}from"../table-controls-CpCGiLvR.mjs";import{t as n}from"../table-resize-w9EsReKV.mjs";import"../file-CapBKYce.mjs";import"../api-client-D2UDU0fw.mjs";import"../use-subset-image-DfYVewmw.mjs";import"../skeleton-D4Q9wT-o.mjs";import"../image-DCRvyqH3.mjs";import"../editor-CHuJTM4H.mjs";import"../node-view-context-D-1j5isf.mjs";import"../use-drag-resize--3PrrhJj.mjs";import"../node-resize-Cs4wR_HY.mjs";import"../node-size-Bg-g2Png.mjs";import{r}from"../subset-image-C7qO8AiN.mjs";import{t as i}from"../basic-image-C_Q1qL3X.mjs";import{t as a}from"../custom-heading-eGRLcDQZ.mjs";import"../subset-image-Co0fWefj.mjs";import{i as o,n as s,r as c,t as l}from"../table-CKVL_ezW.mjs";import{a as u,i as d,o as f}from"../tabs-DQ1db_eg.mjs";import{TextStyleKit as p}from"@tiptap/extension-text-style";import m,{DetailsContent as h,DetailsSummary as g}from"@tiptap/extension-details";import _ from"@tiptap/extension-youtube";import v from"@tiptap/starter-kit";const y=(e,t)=>t?e.configure(t):e;var b=class{#e=[];#t=new Set;textset(e={}){return this.#t.has(`text`)?this:(this.#t.add(`text`),this.#e.push(p.configure({color:{types:[`textStyle`,`listItem`]},...e.textStyleKit}),v.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1},link:{openOnClick:!1,autolink:!0,defaultProtocol:`https`},heading:!1,...e.starterKit}),a.configure({levels:[1,2,3],...e.customHeading})),this)}mediaset(e={}){return this.#t.has(`media`)?this:(this.#t.add(`media`),this.#e.push(y(i,e.basicImage),y(r,e.subsetImage),_.configure({controls:!1,nocookie:!0,width:480,height:320,...e.youtube})),this)}tableset(e={}){return this.#t.has(`table`)?this:(this.#t.add(`table`),this.#e.push(l.configure({resizable:!0,...e.table}),y(o,e.tableRow),y(s,e.tableCell),y(c,e.tableHeader),y(n,e.tableResize),y(t,e.tableControls)),this)}layoutset(t={}){return this.#t.has(`layout`)?this:(this.#t.add(`layout`),this.#e.push(y(f,t.tabs),y(u,t.tabTitle),y(d,t.tabContent),e.configure({types:[`paragraph`,`heading`],defaultAlign:`left`,...t.align}),m.configure({persist:!0,HTMLAttributes:{class:`details`},...t.details}),y(h,t.detailsContent),y(g,t.detailsSummary)),this)}otherset(e=[]){return this.#e.push(...e),this}init(){return[...this.#e]}};export{b as Loader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";require(`../../../src-DuOwAcib.cjs`),require(`../../../file-DeZ1OKdy.cjs`),require(`../../../api-client-D7WV9lod.cjs`),require(`../../../use-subset-image-wa7xQOwx.cjs`),require(`../../../skeleton-7P1IZD3G.cjs`),require(`../../../image-BH4lb2K5.cjs`),require(`../../../editor-DvLUotoh.cjs`),require(`../../../node-view-context-YTl_1gGD.cjs`),require(`../../../use-drag-resize-BO3zANv3.cjs`),require(`../../../node-resize-dantnBzP.cjs`),require(`../../../node-size-BQQGo7t7.cjs`),require(`../../../subset-image-Bukna29P.cjs`);const e=require(`../../../basic-image-DqKtJzvC.cjs`);exports.BasicImage=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../../../src-blAkna22.mjs";import"../../../file-CapBKYce.mjs";import"../../../api-client-D2UDU0fw.mjs";import"../../../use-subset-image-DfYVewmw.mjs";import"../../../skeleton-D4Q9wT-o.mjs";import"../../../image-DCRvyqH3.mjs";import"../../../editor-CHuJTM4H.mjs";import"../../../node-view-context-D-1j5isf.mjs";import"../../../use-drag-resize--3PrrhJj.mjs";import"../../../node-resize-Cs4wR_HY.mjs";import"../../../node-size-Bg-g2Png.mjs";import"../../../subset-image-C7qO8AiN.mjs";import{t as e}from"../../../basic-image-C_Q1qL3X.mjs";export{e as BasicImage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../custom-heading-By14y5ug.cjs`);exports.CustomHeading=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../../../custom-heading-eGRLcDQZ.mjs";export{e as CustomHeading};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../../chunk-Bmb41Sf3.cjs`),t=require(`../../../node-view-context-YTl_1gGD.cjs`);let n=require(`react`),r=require(`clsx`);r=e.t(r);let i=require(`react/jsx-runtime`);const a=({className:e,children:t,...n})=>(0,i.jsx)(`div`,{"data-komc":!0,className:(0,r.default)(`komc:absolute komc:top-1 komc:right-1 komc:z-45`,`komc:flex komc:flex-row komc:items-center komc:gap-2`,`komc:rounded-sm komc:bg-neutral-50 komc:p-0.5 komc:px-1`,`komc:drop-shadow-sm`,`komc:opacity-0 komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:group-hover:opacity-100`,e),...n,children:t}),o=({active:e=!1,className:t,children:n,onClick:a,onMouseDown:o,...s})=>(0,i.jsx)(`button`,{type:`button`,className:(0,r.default)(`komc:flex komc:h-4 komc:w-4 komc:shrink-0 komc:cursor-pointer`,`komc:items-center komc:justify-center komc:rounded-sm komc:p-3`,`komc:hover:bg-neutral-100`,e?`komc-active komc:text-orange-500`:`komc:text-neutral-900`,t),onMouseDown:e=>{e.preventDefault(),o?.(e)},onClick:e=>{e.stopPropagation(),a?.(e)},...s,children:n}),s=({className:e,children:t,...a})=>{let o=n.Children.toArray(t).filter(Boolean);return o.length===0?null:(0,i.jsx)(`div`,{className:(0,r.default)(`komc:absolute komc:top-8 komc:left-0 komc:w-full`,e),...a,children:o})},c=(e=null)=>{let[t,r]=(0,n.useState)(e);return{activeKey:t,toggle:(0,n.useCallback)(e=>{r(t=>t===e?null:e)},[]),setActiveKey:r}},l=Object.assign(a,{Item:o,Panel:s});exports.MenuWrapper=l,exports.MenuWrapperItem=o,exports.MenuWrapperPanel=s,exports.useMenuPanel=c,exports.useNodeView=t.r;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { o as useNodeView } from "../../../index-Cjrxf1Di.cjs";
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
|
+
import * as react5 from "react";
|
|
4
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/editor/nodes/menu-wrapper/menu-wrapper.d.ts
|
|
7
|
+
interface MenuWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface MenuWrapperItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
11
|
+
active?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const MenuWrapperItem: ({
|
|
14
|
+
active,
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
onClick,
|
|
18
|
+
onMouseDown,
|
|
19
|
+
...rest
|
|
20
|
+
}: MenuWrapperItemProps) => react_jsx_runtime7.JSX.Element;
|
|
21
|
+
interface MenuWrapperPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare const MenuWrapperPanel: ({
|
|
25
|
+
className,
|
|
26
|
+
children,
|
|
27
|
+
...rest
|
|
28
|
+
}: MenuWrapperPanelProps) => react_jsx_runtime7.JSX.Element | null;
|
|
29
|
+
declare const useMenuPanel: <K extends string = string>(initial?: K | null) => {
|
|
30
|
+
activeKey: K | null;
|
|
31
|
+
toggle: (key: K) => void;
|
|
32
|
+
setActiveKey: react5.Dispatch<react5.SetStateAction<K | null>>;
|
|
33
|
+
};
|
|
34
|
+
declare const MenuWrapper: (({
|
|
35
|
+
className,
|
|
36
|
+
children,
|
|
37
|
+
...rest
|
|
38
|
+
}: MenuWrapperProps) => react_jsx_runtime7.JSX.Element) & {
|
|
39
|
+
Item: ({
|
|
40
|
+
active,
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
onClick,
|
|
44
|
+
onMouseDown,
|
|
45
|
+
...rest
|
|
46
|
+
}: MenuWrapperItemProps) => react_jsx_runtime7.JSX.Element;
|
|
47
|
+
Panel: ({
|
|
48
|
+
className,
|
|
49
|
+
children,
|
|
50
|
+
...rest
|
|
51
|
+
}: MenuWrapperPanelProps) => react_jsx_runtime7.JSX.Element | null;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { MenuWrapper, MenuWrapperItem, type MenuWrapperItemProps, MenuWrapperPanel, type MenuWrapperPanelProps, type MenuWrapperProps, useMenuPanel, useNodeView };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { o as useNodeView } from "../../../index-BHIPhj3k.mjs";
|
|
2
|
+
import * as react13 from "react";
|
|
3
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from "react";
|
|
4
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/editor/nodes/menu-wrapper/menu-wrapper.d.ts
|
|
7
|
+
interface MenuWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface MenuWrapperItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
11
|
+
active?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const MenuWrapperItem: ({
|
|
14
|
+
active,
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
onClick,
|
|
18
|
+
onMouseDown,
|
|
19
|
+
...rest
|
|
20
|
+
}: MenuWrapperItemProps) => react_jsx_runtime2.JSX.Element;
|
|
21
|
+
interface MenuWrapperPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare const MenuWrapperPanel: ({
|
|
25
|
+
className,
|
|
26
|
+
children,
|
|
27
|
+
...rest
|
|
28
|
+
}: MenuWrapperPanelProps) => react_jsx_runtime2.JSX.Element | null;
|
|
29
|
+
declare const useMenuPanel: <K extends string = string>(initial?: K | null) => {
|
|
30
|
+
activeKey: K | null;
|
|
31
|
+
toggle: (key: K) => void;
|
|
32
|
+
setActiveKey: react13.Dispatch<react13.SetStateAction<K | null>>;
|
|
33
|
+
};
|
|
34
|
+
declare const MenuWrapper: (({
|
|
35
|
+
className,
|
|
36
|
+
children,
|
|
37
|
+
...rest
|
|
38
|
+
}: MenuWrapperProps) => react_jsx_runtime2.JSX.Element) & {
|
|
39
|
+
Item: ({
|
|
40
|
+
active,
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
onClick,
|
|
44
|
+
onMouseDown,
|
|
45
|
+
...rest
|
|
46
|
+
}: MenuWrapperItemProps) => react_jsx_runtime2.JSX.Element;
|
|
47
|
+
Panel: ({
|
|
48
|
+
className,
|
|
49
|
+
children,
|
|
50
|
+
...rest
|
|
51
|
+
}: MenuWrapperPanelProps) => react_jsx_runtime2.JSX.Element | null;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { MenuWrapper, MenuWrapperItem, type MenuWrapperItemProps, MenuWrapperPanel, type MenuWrapperPanelProps, type MenuWrapperProps, useMenuPanel, useNodeView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{r as e}from"../../../node-view-context-D-1j5isf.mjs";import{Children as t,useCallback as n,useState as r}from"react";import i from"clsx";import{jsx as a}from"react/jsx-runtime";const o=({className:e,children:t,...n})=>a(`div`,{"data-komc":!0,className:i(`komc:absolute komc:top-1 komc:right-1 komc:z-45`,`komc:flex komc:flex-row komc:items-center komc:gap-2`,`komc:rounded-sm komc:bg-neutral-50 komc:p-0.5 komc:px-1`,`komc:drop-shadow-sm`,`komc:opacity-0 komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:group-hover:opacity-100`,e),...n,children:t}),s=({active:e=!1,className:t,children:n,onClick:r,onMouseDown:o,...s})=>a(`button`,{type:`button`,className:i(`komc:flex komc:h-4 komc:w-4 komc:shrink-0 komc:cursor-pointer`,`komc:items-center komc:justify-center komc:rounded-sm komc:p-3`,`komc:hover:bg-neutral-100`,e?`komc-active komc:text-orange-500`:`komc:text-neutral-900`,t),onMouseDown:e=>{e.preventDefault(),o?.(e)},onClick:e=>{e.stopPropagation(),r?.(e)},...s,children:n}),c=({className:e,children:n,...r})=>{let o=t.toArray(n).filter(Boolean);return o.length===0?null:a(`div`,{className:i(`komc:absolute komc:top-8 komc:left-0 komc:w-full`,e),...r,children:o})},l=(e=null)=>{let[t,i]=r(e);return{activeKey:t,toggle:n(e=>{i(t=>t===e?null:e)},[]),setActiveKey:i}},u=Object.assign(o,{Item:s,Panel:c});export{u as MenuWrapper,s as MenuWrapperItem,c as MenuWrapperPanel,l as useMenuPanel,e as useNodeView};
|