@fuma-content/studio 1.0.0 → 1.0.2
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/build/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/build/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/build/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/build/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/build/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/build/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/build/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/build/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/build/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/build/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/build/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/build/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/build/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/build/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/build/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/build/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/build/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/build/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/build/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/build/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/build/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/build/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/build/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/build/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/build/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/build/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/build/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/build/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/build/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/build/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/build/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/build/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/build/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/build/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/build/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/build/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/build/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/build/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/build/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/build/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/build/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/build/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/build/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/build/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/build/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/build/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/build/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/build/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/build/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/build/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/build/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/build/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/build/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/build/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/build/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/build/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/build/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/build/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/build/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/build/client/assets/QueryClientProvider-DqiXnN2L.js +1 -0
- package/build/client/assets/actions-DkbV2Z0p.js +1 -0
- package/build/client/assets/actions-DpkI7OTF.js +1 -0
- package/build/client/assets/badge-CZkdLoIP.js +1 -0
- package/build/client/assets/button-Bm94vje1.js +41 -0
- package/build/client/assets/client-BWBqEatf.js +1 -0
- package/build/client/assets/client-Crg-pMcu.js +1 -0
- package/build/client/assets/client-DVneG3Rq.css +1 -0
- package/build/client/assets/client-OSVRoCKH.js +569 -0
- package/build/client/assets/dropdown-menu-EF-sTINr.js +1 -0
- package/build/client/assets/entry.rsc-D51PwnQL.js +1 -0
- package/build/client/assets/index-BdrDVoE8.js +1 -0
- package/build/client/assets/index-BpILsqFO.js +1 -0
- package/build/client/assets/index-Bx93mXy1.js +11 -0
- package/build/client/assets/index-CQRgqbuL.js +1 -0
- package/build/client/assets/index-DOs5iMXj.js +1 -0
- package/build/client/assets/index-DTzAH5JX.js +1 -0
- package/build/client/assets/layout-CnpYRqF0.js +1 -0
- package/build/client/assets/mdx-BNErtsK6.js +1 -0
- package/build/client/assets/page-DOzl4Kpa.js +1 -0
- package/build/client/assets/page-uNpJU_rv.js +1 -0
- package/build/client/assets/query-z9oLNeTD.js +1 -0
- package/build/client/assets/react-B8--K7an.js +10 -0
- package/build/client/assets/root-B_CXTQpA.js +1 -0
- package/build/client/assets/root-D3NoAGI1.js +1 -0
- package/build/client/assets/root-z8crlXSh.css +1 -0
- package/build/client/assets/route-DVneG3Rq.css +1 -0
- package/build/client/assets/router-a9jyj9wf.js +10 -0
- package/build/client/assets/separator-tWFpvpUX.js +1 -0
- package/build/client/assets/sidebar-BBYit8gY.js +12 -0
- package/build/client/assets/site-header-DQkKe-WA.js +1 -0
- package/build/client/assets/spinner-BdPhtfsc.js +1 -0
- package/build/client/assets/tooltip-Dvh-iHDG.js +16 -0
- package/build/client/assets/use-sync-ZgcwUdu_.js +9 -0
- package/build/client/assets/yaml-Cloe7OVn.js +32 -0
- package/build/server/__ssr_build/__vite_rsc_assets_manifest.js +268 -0
- package/build/server/__ssr_build/assets/QueryClientProvider-DlvBH3OQ.js +30 -0
- package/build/server/__ssr_build/assets/actions-B50-3n-a.js +63 -0
- package/build/server/__ssr_build/assets/actions-BFtCTvOL.js +21 -0
- package/{src/components/ui/badge.tsx → build/server/__ssr_build/assets/badge-DYFvBSp8.js} +23 -28
- package/build/server/__ssr_build/assets/button-C_-b_vqm.js +4098 -0
- package/build/server/__ssr_build/assets/client--HXec13w.js +130 -0
- package/build/server/__ssr_build/assets/client-BqW9rGyi.js +116885 -0
- package/build/server/__ssr_build/assets/client-CU90j0R8.js +154 -0
- package/build/server/__ssr_build/assets/dropdown-menu-D2YyT3lP.js +1312 -0
- package/build/server/__ssr_build/assets/entry.rsc-Cg_DxYkh.js +12 -0
- package/build/server/__ssr_build/assets/index-B-gno69w.js +58 -0
- package/build/server/__ssr_build/assets/index-DBc0nhEL.js +288 -0
- package/build/server/__ssr_build/assets/index-Dtw6X3NW.js +1092 -0
- package/build/server/__ssr_build/assets/index-DvVNShHF.js +86 -0
- package/build/server/__ssr_build/assets/index-PpqpVA51.js +612 -0
- package/build/server/__ssr_build/assets/layout-CPnSx9PI.js +454 -0
- package/build/server/__ssr_build/assets/mdx-bmeV1kyx.js +44 -0
- package/build/server/__ssr_build/assets/page-BwoghW3K.js +38 -0
- package/build/server/__ssr_build/assets/page-HxttullC.js +89 -0
- package/build/server/__ssr_build/assets/query-C1_xUNXy.js +1975 -0
- package/build/server/__ssr_build/assets/root-CS7F-km4.js +16 -0
- package/build/server/__ssr_build/assets/root-D-Y-rGw5.js +73 -0
- package/build/server/__ssr_build/assets/separator-8UA_ceSq.js +49 -0
- package/build/server/__ssr_build/assets/sidebar-BzNOZeBO.js +13194 -0
- package/build/server/__ssr_build/assets/site-header-CXHKSzqk.js +13 -0
- package/build/server/__ssr_build/assets/spinner-BXcLlTNs.js +1291 -0
- package/build/server/__ssr_build/assets/tooltip-DZ4WdJt-.js +9553 -0
- package/build/server/__ssr_build/assets/use-sync-TRS0zL-Y.js +3404 -0
- package/build/server/__ssr_build/assets/yaml-BEdFfhvc.js +63 -0
- package/build/server/__ssr_build/index.js +36076 -0
- package/build/server/__vite_rsc_assets_manifest.js +268 -0
- package/build/server/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/build/server/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/build/server/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/build/server/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/build/server/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/build/server/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/build/server/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/build/server/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/build/server/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/build/server/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/build/server/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/build/server/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/build/server/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/build/server/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/build/server/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/build/server/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/build/server/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/build/server/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/build/server/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/build/server/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/build/server/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/build/server/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/build/server/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/build/server/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/build/server/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/build/server/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/build/server/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/build/server/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/build/server/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/build/server/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/build/server/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/build/server/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/build/server/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/build/server/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/build/server/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/build/server/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/build/server/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/build/server/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/build/server/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/build/server/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/build/server/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/build/server/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/build/server/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/build/server/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/build/server/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/build/server/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/build/server/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/build/server/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/build/server/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/build/server/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/build/server/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/build/server/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/build/server/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/build/server/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/build/server/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/build/server/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/build/server/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/build/server/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/build/server/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/build/server/assets/actions-C92yn6jE.js +61 -0
- package/build/server/assets/actions-CWWFIcb1.js +46 -0
- package/build/server/assets/actions-DZdN0IBq.js +73 -0
- package/build/server/assets/client-BdxXy6rH.js +13 -0
- package/build/server/assets/client-DLzFPnCR.js +13 -0
- package/build/server/assets/config-Cb909uq6.js +257 -0
- package/build/server/assets/index-X49ifkk3.js +9 -0
- package/build/server/assets/jsx-runtime.react-server-D3We4JeM.js +324 -0
- package/build/server/assets/layout-CRw_6FCt.js +2071 -0
- package/build/server/assets/page-BcrsPZbM.js +9 -0
- package/build/server/assets/page-zlF_Ew1s.js +72 -0
- package/build/server/assets/root-CVOXO6T9.js +23 -0
- package/build/server/assets/root-dGb6ch_9.js +38 -0
- package/build/server/assets/root-z8crlXSh.css +1 -0
- package/build/server/assets/route-DVneG3Rq.css +1 -0
- package/build/server/assets/route-Ds0B4hTo.js +44 -0
- package/build/server/assets/route-DvwlfKZg.js +21 -0
- package/build/server/assets/route-o-6k10r9.js +70774 -0
- package/build/server/index.js +17032 -0
- package/dist/bin/cli.d.mts +1 -0
- package/dist/bin/cli.mjs +71 -0
- package/dist/bin.mjs +14 -40
- package/dist/package.mjs +1 -1
- package/package.json +33 -32
- package/dist/index.d.mts +0 -52
- package/dist/index.mjs +0 -67
- package/dist/mdx/actions.mjs +0 -32
- package/dist/mdx/client.mjs +0 -167
- package/dist/src/components/code-editor/mdx.lazy.mjs +0 -19
- package/dist/src/components/code-editor/mdx.mjs +0 -44
- package/dist/src/components/code-editor/yaml.lazy.mjs +0 -22
- package/dist/src/components/code-editor/yaml.mjs +0 -63
- package/dist/src/components/editor/editor-base-kit.mjs +0 -41
- package/dist/src/components/editor/editor-kit.mjs +0 -73
- package/dist/src/components/editor/md.mjs +0 -42
- package/dist/src/components/editor/plugins/ai-kit.mjs +0 -68
- package/dist/src/components/editor/plugins/align-base-kit.mjs +0 -28
- package/dist/src/components/editor/plugins/align-kit.mjs +0 -30
- package/dist/src/components/editor/plugins/autoformat-kit.mjs +0 -214
- package/dist/src/components/editor/plugins/basic-blocks-base-kit.mjs +0 -22
- package/dist/src/components/editor/plugins/basic-blocks-kit.mjs +0 -51
- package/dist/src/components/editor/plugins/basic-marks-base-kit.mjs +0 -20
- package/dist/src/components/editor/plugins/basic-marks-kit.mjs +0 -28
- package/dist/src/components/editor/plugins/block-menu-kit.mjs +0 -11
- package/dist/src/components/editor/plugins/block-placeholder-kit.mjs +0 -14
- package/dist/src/components/editor/plugins/block-selection-kit.mjs +0 -48
- package/dist/src/components/editor/plugins/callout-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/callout-kit.mjs +0 -10
- package/dist/src/components/editor/plugins/code-block-base-kit.mjs +0 -16
- package/dist/src/components/editor/plugins/code-block-kit.mjs +0 -19
- package/dist/src/components/editor/plugins/column-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/column-kit.mjs +0 -10
- package/dist/src/components/editor/plugins/comment-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/comment-kit.mjs +0 -53
- package/dist/src/components/editor/plugins/copilot-kit.mjs +0 -49
- package/dist/src/components/editor/plugins/cursor-overlay-kit.mjs +0 -11
- package/dist/src/components/editor/plugins/date-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/date-kit.mjs +0 -10
- package/dist/src/components/editor/plugins/discussion-kit.mjs +0 -94
- package/dist/src/components/editor/plugins/dnd-kit.mjs +0 -31
- package/dist/src/components/editor/plugins/emoji-kit.mjs +0 -11
- package/dist/src/components/editor/plugins/exit-break-kit.mjs +0 -12
- package/dist/src/components/editor/plugins/fixed-toolbar-kit.mjs +0 -15
- package/dist/src/components/editor/plugins/floating-toolbar-kit.mjs +0 -15
- package/dist/src/components/editor/plugins/font-base-kit.mjs +0 -14
- package/dist/src/components/editor/plugins/font-kit.mjs +0 -19
- package/dist/src/components/editor/plugins/indent-base-kit.mjs +0 -17
- package/dist/src/components/editor/plugins/indent-kit.mjs +0 -20
- package/dist/src/components/editor/plugins/line-height-base-kit.mjs +0 -20
- package/dist/src/components/editor/plugins/line-height-kit.mjs +0 -22
- package/dist/src/components/editor/plugins/link-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/link-kit.mjs +0 -15
- package/dist/src/components/editor/plugins/list-base-kit.mjs +0 -19
- package/dist/src/components/editor/plugins/list-kit.mjs +0 -22
- package/dist/src/components/editor/plugins/markdown-kit.mjs +0 -17
- package/dist/src/components/editor/plugins/math-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/math-kit.mjs +0 -10
- package/dist/src/components/editor/plugins/media-base-kit.mjs +0 -23
- package/dist/src/components/editor/plugins/media-kit.mjs +0 -37
- package/dist/src/components/editor/plugins/slash-kit.mjs +0 -11
- package/dist/src/components/editor/plugins/suggestion-base-kit.mjs +0 -8
- package/dist/src/components/editor/plugins/suggestion-kit.mjs +0 -50
- package/dist/src/components/editor/plugins/table-base-kit.mjs +0 -13
- package/dist/src/components/editor/plugins/table-kit.mjs +0 -15
- package/dist/src/components/editor/transforms.mjs +0 -125
- package/dist/src/components/editor/ui/ai-chat-editor.mjs +0 -21
- package/dist/src/components/editor/ui/ai-menu.mjs +0 -488
- package/dist/src/components/editor/ui/ai-node.mjs +0 -24
- package/dist/src/components/editor/ui/ai-toolbar-button.mjs +0 -23
- package/dist/src/components/editor/ui/align-toolbar-button.mjs +0 -71
- package/dist/src/components/editor/ui/block-context-menu.mjs +0 -130
- package/dist/src/components/editor/ui/block-discussion.mjs +0 -200
- package/dist/src/components/editor/ui/block-draggable.mjs +0 -265
- package/dist/src/components/editor/ui/block-list-static.mjs +0 -48
- package/dist/src/components/editor/ui/block-list.mjs +0 -47
- package/dist/src/components/editor/ui/block-selection.mjs +0 -28
- package/dist/src/components/editor/ui/block-suggestion.mjs +0 -319
- package/dist/src/components/editor/ui/blockquote-node-static.mjs +0 -14
- package/dist/src/components/editor/ui/blockquote-node.mjs +0 -16
- package/dist/src/components/editor/ui/callout-node-static.mjs +0 -29
- package/dist/src/components/editor/ui/callout-node.mjs +0 -50
- package/dist/src/components/editor/ui/caption.mjs +0 -39
- package/dist/src/components/editor/ui/code-block-node-static.mjs +0 -30
- package/dist/src/components/editor/ui/code-block-node.mjs +0 -121
- package/dist/src/components/editor/ui/code-node-static.mjs +0 -15
- package/dist/src/components/editor/ui/code-node.mjs +0 -17
- package/dist/src/components/editor/ui/column-node-static.mjs +0 -32
- package/dist/src/components/editor/ui/column-node.mjs +0 -229
- package/dist/src/components/editor/ui/comment-node-static.mjs +0 -14
- package/dist/src/components/editor/ui/comment-node.mjs +0 -33
- package/dist/src/components/editor/ui/comment-toolbar-button.mjs +0 -23
- package/dist/src/components/editor/ui/comment.mjs +0 -422
- package/dist/src/components/editor/ui/cursor-overlay.mjs +0 -36
- package/dist/src/components/editor/ui/date-node-static.mjs +0 -32
- package/dist/src/components/editor/ui/date-node.mjs +0 -60
- package/dist/src/components/editor/ui/editor-static.mjs +0 -31
- package/dist/src/components/editor/ui/editor.mjs +0 -60
- package/dist/src/components/editor/ui/emoji-node.mjs +0 -46
- package/dist/src/components/editor/ui/emoji-toolbar-button.mjs +0 -415
- package/dist/src/components/editor/ui/equation-node-static.mjs +0 -65
- package/dist/src/components/editor/ui/equation-node.mjs +0 -159
- package/dist/src/components/editor/ui/equation-toolbar-button.mjs +0 -23
- package/dist/src/components/editor/ui/fixed-toolbar-buttons.mjs +0 -109
- package/dist/src/components/editor/ui/fixed-toolbar.mjs +0 -16
- package/dist/src/components/editor/ui/floating-toolbar-buttons.mjs +0 -54
- package/dist/src/components/editor/ui/floating-toolbar.mjs +0 -51
- package/dist/src/components/editor/ui/font-color-toolbar-button.mjs +0 -637
- package/dist/src/components/editor/ui/font-size-toolbar-button.mjs +0 -83
- package/dist/src/components/editor/ui/ghost-text.mjs +0 -22
- package/dist/src/components/editor/ui/heading-node-static.mjs +0 -60
- package/dist/src/components/editor/ui/heading-node.mjs +0 -62
- package/dist/src/components/editor/ui/highlight-node-static.mjs +0 -15
- package/dist/src/components/editor/ui/highlight-node.mjs +0 -17
- package/dist/src/components/editor/ui/history-toolbar-button.mjs +0 -35
- package/dist/src/components/editor/ui/hr-node-static.mjs +0 -18
- package/dist/src/components/editor/ui/hr-node.mjs +0 -23
- package/dist/src/components/editor/ui/indent-toolbar-button.mjs +0 -29
- package/dist/src/components/editor/ui/inline-combobox.mjs +0 -148
- package/dist/src/components/editor/ui/insert-toolbar-button.mjs +0 -199
- package/dist/src/components/editor/ui/kbd-node-static.mjs +0 -15
- package/dist/src/components/editor/ui/kbd-node.mjs +0 -17
- package/dist/src/components/editor/ui/line-height-toolbar-button.mjs +0 -56
- package/dist/src/components/editor/ui/link-node-static.mjs +0 -20
- package/dist/src/components/editor/ui/link-node.mjs +0 -28
- package/dist/src/components/editor/ui/link-toolbar-button.mjs +0 -21
- package/dist/src/components/editor/ui/link-toolbar.mjs +0 -141
- package/dist/src/components/editor/ui/list-toolbar-button.mjs +0 -131
- package/dist/src/components/editor/ui/mark-toolbar-button.mjs +0 -20
- package/dist/src/components/editor/ui/media-image-node-static.mjs +0 -32
- package/dist/src/components/editor/ui/media-image-node.mjs +0 -64
- package/dist/src/components/editor/ui/media-placeholder-node.mjs +0 -184
- package/dist/src/components/editor/ui/media-preview-dialog.mjs +0 -113
- package/dist/src/components/editor/ui/media-toolbar-button.mjs +0 -156
- package/dist/src/components/editor/ui/media-toolbar.mjs +0 -80
- package/dist/src/components/editor/ui/media-upload-toast.mjs +0 -39
- package/dist/src/components/editor/ui/media-video-node-static.mjs +0 -27
- package/dist/src/components/editor/ui/mode-toolbar-button.mjs +0 -112
- package/dist/src/components/editor/ui/paragraph-node-static.mjs +0 -15
- package/dist/src/components/editor/ui/paragraph-node.mjs +0 -17
- package/dist/src/components/editor/ui/resize-handle.mjs +0 -43
- package/dist/src/components/editor/ui/slash-node.mjs +0 -228
- package/dist/src/components/editor/ui/suggestion-node-static.mjs +0 -24
- package/dist/src/components/editor/ui/suggestion-node.mjs +0 -111
- package/dist/src/components/editor/ui/suggestion-toolbar-button.mjs +0 -24
- package/dist/src/components/editor/ui/table-icons.mjs +0 -1310
- package/dist/src/components/editor/ui/table-node-static.mjs +0 -68
- package/dist/src/components/editor/ui/table-node.mjs +0 -375
- package/dist/src/components/editor/ui/table-toolbar-button.mjs +0 -190
- package/dist/src/components/editor/ui/turn-into-toolbar-button.mjs +0 -168
- package/dist/src/components/editor/use-chat.mjs +0 -80
- package/dist/src/components/json-schema-editor/client.mjs +0 -46
- package/dist/src/components/json-schema-editor/components/inputs.mjs +0 -438
- package/dist/src/components/json-schema-editor/get-default-values.mjs +0 -23
- package/dist/src/components/json-schema-editor/schema.mjs +0 -131
- package/dist/src/components/json-schema-editor/utils/merge-schema.mjs +0 -134
- package/dist/src/components/json-schema-editor/utils/schema-to-string.mjs +0 -53
- package/dist/src/components/ui/alert-dialog.mjs +0 -90
- package/dist/src/components/ui/avatar.mjs +0 -32
- package/dist/src/components/ui/button.mjs +0 -48
- package/dist/src/components/ui/calendar.mjs +0 -108
- package/dist/src/components/ui/checkbox.mjs +0 -23
- package/dist/src/components/ui/combobox.mjs +0 -53
- package/dist/src/components/ui/command.mjs +0 -42
- package/dist/src/components/ui/context-menu.mjs +0 -67
- package/dist/src/components/ui/dialog.mjs +0 -9
- package/dist/src/components/ui/dropdown-menu.mjs +0 -122
- package/dist/src/components/ui/input-group.mjs +0 -31
- package/dist/src/components/ui/input.mjs +0 -15
- package/dist/src/components/ui/label.mjs +0 -19
- package/dist/src/components/ui/popover.mjs +0 -37
- package/dist/src/components/ui/select.mjs +0 -80
- package/dist/src/components/ui/separator.mjs +0 -19
- package/dist/src/components/ui/spinner.mjs +0 -16
- package/dist/src/components/ui/tabs.mjs +0 -39
- package/dist/src/components/ui/textarea.mjs +0 -14
- package/dist/src/components/ui/toolbar.mjs +0 -183
- package/dist/src/components/ui/tooltip.mjs +0 -38
- package/dist/src/hooks/editor/use-is-creator.mjs +0 -19
- package/dist/src/hooks/use-upload-file.mjs +0 -73
- package/dist/src/lib/config.mjs +0 -34
- package/dist/src/lib/data/store.d.mts +0 -15
- package/dist/src/lib/lowlight.mjs +0 -7
- package/dist/src/lib/utils/deep-equal.mjs +0 -18
- package/dist/src/lib/utils/remove-undefined.mjs +0 -18
- package/dist/src/lib/utils.mjs +0 -10
- package/next.config.ts +0 -23
- package/postcss.config.mjs +0 -7
- package/src/app/(dashboard)/collection/[name]/[...slug]/page.client.tsx +0 -26
- package/src/app/(dashboard)/collection/[name]/[...slug]/page.tsx +0 -18
- package/src/app/(dashboard)/collection/[name]/page.client.tsx +0 -82
- package/src/app/(dashboard)/collection/[name]/page.tsx +0 -11
- package/src/app/(dashboard)/layout.tsx +0 -34
- package/src/app/(dashboard)/page.tsx +0 -38
- package/src/app/api/ai/command/prompts.ts +0 -313
- package/src/app/api/ai/command/route.ts +0 -203
- package/src/app/api/ai/command/utils.ts +0 -242
- package/src/app/api/ai/copilot/route.ts +0 -33
- package/src/app/api/uploadthing/route.ts +0 -5
- package/src/app/codeblock/LICENSE +0 -21
- package/src/app/codeblock/styles.css +0 -289
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -223
- package/src/app/layout.client.tsx +0 -15
- package/src/app/layout.tsx +0 -30
- package/src/components/app-sidebar.tsx +0 -162
- package/src/components/code-editor/mdx.lazy.tsx +0 -18
- package/src/components/code-editor/mdx.tsx +0 -48
- package/src/components/code-editor/yaml.lazy.tsx +0 -20
- package/src/components/code-editor/yaml.tsx +0 -71
- package/src/components/collection/actions.tsx +0 -41
- package/src/components/collection/client.tsx +0 -63
- package/src/components/collection/context.tsx +0 -24
- package/src/components/collection/document/actions.tsx +0 -83
- package/src/components/editor/editor-base-kit.tsx +0 -37
- package/src/components/editor/editor-kit.tsx +0 -87
- package/src/components/editor/md.tsx +0 -60
- package/src/components/editor/plugins/ai-kit.tsx +0 -102
- package/src/components/editor/plugins/align-base-kit.tsx +0 -16
- package/src/components/editor/plugins/align-kit.tsx +0 -18
- package/src/components/editor/plugins/autoformat-kit.tsx +0 -236
- package/src/components/editor/plugins/basic-blocks-base-kit.tsx +0 -34
- package/src/components/editor/plugins/basic-blocks-kit.tsx +0 -87
- package/src/components/editor/plugins/basic-marks-base-kit.tsx +0 -26
- package/src/components/editor/plugins/basic-marks-kit.tsx +0 -40
- package/src/components/editor/plugins/basic-nodes-kit.tsx +0 -6
- package/src/components/editor/plugins/block-menu-kit.tsx +0 -14
- package/src/components/editor/plugins/block-placeholder-kit.tsx +0 -17
- package/src/components/editor/plugins/block-selection-kit.tsx +0 -54
- package/src/components/editor/plugins/callout-base-kit.tsx +0 -5
- package/src/components/editor/plugins/callout-kit.tsx +0 -7
- package/src/components/editor/plugins/code-block-base-kit.tsx +0 -16
- package/src/components/editor/plugins/code-block-kit.tsx +0 -19
- package/src/components/editor/plugins/column-base-kit.tsx +0 -11
- package/src/components/editor/plugins/column-kit.tsx +0 -10
- package/src/components/editor/plugins/comment-base-kit.tsx +0 -5
- package/src/components/editor/plugins/comment-kit.tsx +0 -92
- package/src/components/editor/plugins/copilot-kit.tsx +0 -70
- package/src/components/editor/plugins/cursor-overlay-kit.tsx +0 -13
- package/src/components/editor/plugins/date-base-kit.tsx +0 -5
- package/src/components/editor/plugins/date-kit.tsx +0 -7
- package/src/components/editor/plugins/discussion-kit.tsx +0 -142
- package/src/components/editor/plugins/dnd-kit.tsx +0 -25
- package/src/components/editor/plugins/emoji-kit.tsx +0 -13
- package/src/components/editor/plugins/exit-break-kit.tsx +0 -12
- package/src/components/editor/plugins/fixed-toolbar-kit.tsx +0 -19
- package/src/components/editor/plugins/floating-toolbar-kit.tsx +0 -19
- package/src/components/editor/plugins/font-base-kit.tsx +0 -20
- package/src/components/editor/plugins/font-kit.tsx +0 -29
- package/src/components/editor/plugins/indent-base-kit.tsx +0 -13
- package/src/components/editor/plugins/indent-kit.tsx +0 -22
- package/src/components/editor/plugins/line-height-base-kit.tsx +0 -14
- package/src/components/editor/plugins/line-height-kit.tsx +0 -16
- package/src/components/editor/plugins/link-base-kit.tsx +0 -5
- package/src/components/editor/plugins/link-kit.tsx +0 -15
- package/src/components/editor/plugins/list-base-kit.tsx +0 -17
- package/src/components/editor/plugins/list-kit.tsx +0 -26
- package/src/components/editor/plugins/markdown-kit.tsx +0 -13
- package/src/components/editor/plugins/math-base-kit.tsx +0 -11
- package/src/components/editor/plugins/math-kit.tsx +0 -10
- package/src/components/editor/plugins/media-base-kit.tsx +0 -25
- package/src/components/editor/plugins/media-kit.tsx +0 -28
- package/src/components/editor/plugins/slash-kit.tsx +0 -18
- package/src/components/editor/plugins/suggestion-base-kit.tsx +0 -5
- package/src/components/editor/plugins/suggestion-kit.tsx +0 -83
- package/src/components/editor/plugins/table-base-kit.tsx +0 -20
- package/src/components/editor/plugins/table-kit.tsx +0 -22
- package/src/components/editor/settings-dialog.tsx +0 -418
- package/src/components/editor/transforms.ts +0 -193
- package/src/components/editor/types.ts +0 -149
- package/src/components/editor/ui/ai-chat-editor.tsx +0 -20
- package/src/components/editor/ui/ai-menu.tsx +0 -663
- package/src/components/editor/ui/ai-node.tsx +0 -40
- package/src/components/editor/ui/ai-toolbar-button.tsx +0 -23
- package/src/components/editor/ui/align-toolbar-button.tsx +0 -78
- package/src/components/editor/ui/block-context-menu.tsx +0 -154
- package/src/components/editor/ui/block-discussion.tsx +0 -318
- package/src/components/editor/ui/block-draggable.tsx +0 -464
- package/src/components/editor/ui/block-list-static.tsx +0 -75
- package/src/components/editor/ui/block-list.tsx +0 -72
- package/src/components/editor/ui/block-selection.tsx +0 -37
- package/src/components/editor/ui/block-suggestion.tsx +0 -438
- package/src/components/editor/ui/blockquote-node-static.tsx +0 -5
- package/src/components/editor/ui/blockquote-node.tsx +0 -7
- package/src/components/editor/ui/callout-node-static.tsx +0 -30
- package/src/components/editor/ui/callout-node.tsx +0 -64
- package/src/components/editor/ui/caption.tsx +0 -55
- package/src/components/editor/ui/code-block-node-static.tsx +0 -33
- package/src/components/editor/ui/code-block-node.tsx +0 -161
- package/src/components/editor/ui/code-node-static.tsx +0 -15
- package/src/components/editor/ui/code-node.tsx +0 -17
- package/src/components/editor/ui/column-node-static.tsx +0 -27
- package/src/components/editor/ui/column-node.tsx +0 -285
- package/src/components/editor/ui/comment-node-static.tsx +0 -12
- package/src/components/editor/ui/comment-node.tsx +0 -43
- package/src/components/editor/ui/comment-toolbar-button.tsx +0 -24
- package/src/components/editor/ui/comment.tsx +0 -577
- package/src/components/editor/ui/cursor-overlay.tsx +0 -66
- package/src/components/editor/ui/date-node-static.tsx +0 -45
- package/src/components/editor/ui/date-node.tsx +0 -86
- package/src/components/editor/ui/editor-static.tsx +0 -47
- package/src/components/editor/ui/editor.tsx +0 -120
- package/src/components/editor/ui/emoji-node.tsx +0 -65
- package/src/components/editor/ui/emoji-toolbar-button.tsx +0 -582
- package/src/components/editor/ui/equation-node-static.tsx +0 -94
- package/src/components/editor/ui/equation-node.tsx +0 -218
- package/src/components/editor/ui/equation-toolbar-button.tsx +0 -24
- package/src/components/editor/ui/fixed-toolbar-buttons.tsx +0 -135
- package/src/components/editor/ui/fixed-toolbar.tsx +0 -17
- package/src/components/editor/ui/floating-toolbar-buttons.tsx +0 -72
- package/src/components/editor/ui/floating-toolbar.tsx +0 -76
- package/src/components/editor/ui/font-color-toolbar-button.tsx +0 -804
- package/src/components/editor/ui/font-size-toolbar-button.tsx +0 -102
- package/src/components/editor/ui/ghost-text.tsx +0 -27
- package/src/components/editor/ui/heading-node-static.tsx +0 -54
- package/src/components/editor/ui/heading-node.tsx +0 -54
- package/src/components/editor/ui/highlight-node-static.tsx +0 -11
- package/src/components/editor/ui/highlight-node.tsx +0 -13
- package/src/components/editor/ui/history-toolbar-button.tsx +0 -41
- package/src/components/editor/ui/hr-node-static.tsx +0 -16
- package/src/components/editor/ui/hr-node.tsx +0 -28
- package/src/components/editor/ui/indent-toolbar-button.tsx +0 -27
- package/src/components/editor/ui/inline-combobox.tsx +0 -251
- package/src/components/editor/ui/insert-toolbar-button.tsx +0 -242
- package/src/components/editor/ui/kbd-node-static.tsx +0 -15
- package/src/components/editor/ui/kbd-node.tsx +0 -17
- package/src/components/editor/ui/line-height-toolbar-button.tsx +0 -66
- package/src/components/editor/ui/link-node-static.tsx +0 -21
- package/src/components/editor/ui/link-node.tsx +0 -37
- package/src/components/editor/ui/link-toolbar-button.tsx +0 -18
- package/src/components/editor/ui/link-toolbar.tsx +0 -196
- package/src/components/editor/ui/list-toolbar-button.tsx +0 -195
- package/src/components/editor/ui/mark-toolbar-button.tsx +0 -20
- package/src/components/editor/ui/media-image-node-static.tsx +0 -33
- package/src/components/editor/ui/media-image-node.tsx +0 -75
- package/src/components/editor/ui/media-placeholder-node.tsx +0 -235
- package/src/components/editor/ui/media-preview-dialog.tsx +0 -145
- package/src/components/editor/ui/media-toolbar-button.tsx +0 -202
- package/src/components/editor/ui/media-toolbar.tsx +0 -100
- package/src/components/editor/ui/media-upload-toast.tsx +0 -59
- package/src/components/editor/ui/media-video-node-static.tsx +0 -23
- package/src/components/editor/ui/mode-toolbar-button.tsx +0 -121
- package/src/components/editor/ui/paragraph-node-static.tsx +0 -13
- package/src/components/editor/ui/paragraph-node.tsx +0 -15
- package/src/components/editor/ui/resize-handle.tsx +0 -79
- package/src/components/editor/ui/slash-node.tsx +0 -274
- package/src/components/editor/ui/suggestion-node-static.tsx +0 -30
- package/src/components/editor/ui/suggestion-node.tsx +0 -157
- package/src/components/editor/ui/suggestion-toolbar-button.tsx +0 -25
- package/src/components/editor/ui/table-icons.tsx +0 -685
- package/src/components/editor/ui/table-node-static.tsx +0 -86
- package/src/components/editor/ui/table-node.tsx +0 -569
- package/src/components/editor/ui/table-toolbar-button.tsx +0 -260
- package/src/components/editor/ui/turn-into-toolbar-button.tsx +0 -176
- package/src/components/editor/use-chat.ts +0 -120
- package/src/components/icons/logo.tsx +0 -37
- package/src/components/json-schema-editor/client.tsx +0 -55
- package/src/components/json-schema-editor/components/inputs.tsx +0 -612
- package/src/components/json-schema-editor/get-default-values.ts +0 -29
- package/src/components/json-schema-editor/schema.tsx +0 -206
- package/src/components/json-schema-editor/utils/merge-schema.ts +0 -167
- package/src/components/json-schema-editor/utils/schema-to-string.ts +0 -87
- package/src/components/nav-user.tsx +0 -102
- package/src/components/site-header.tsx +0 -13
- package/src/components/ui/alert-dialog.tsx +0 -182
- package/src/components/ui/avatar.tsx +0 -96
- package/src/components/ui/button.tsx +0 -65
- package/src/components/ui/calendar.tsx +0 -186
- package/src/components/ui/checkbox.tsx +0 -29
- package/src/components/ui/combobox.tsx +0 -267
- package/src/components/ui/command.tsx +0 -180
- package/src/components/ui/context-menu.tsx +0 -161
- package/src/components/ui/dialog.tsx +0 -142
- package/src/components/ui/drawer.tsx +0 -120
- package/src/components/ui/dropdown-menu.tsx +0 -239
- package/src/components/ui/field.tsx +0 -224
- package/src/components/ui/input-group.tsx +0 -144
- package/src/components/ui/input.tsx +0 -19
- package/src/components/ui/label.tsx +0 -18
- package/src/components/ui/popover.tsx +0 -76
- package/src/components/ui/select.tsx +0 -182
- package/src/components/ui/separator.tsx +0 -28
- package/src/components/ui/sheet.tsx +0 -130
- package/src/components/ui/sidebar.tsx +0 -608
- package/src/components/ui/sonner.tsx +0 -45
- package/src/components/ui/spinner.tsx +0 -15
- package/src/components/ui/table.tsx +0 -89
- package/src/components/ui/tabs.tsx +0 -60
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/toggle-group.tsx +0 -86
- package/src/components/ui/toggle.tsx +0 -45
- package/src/components/ui/toolbar.tsx +0 -365
- package/src/components/ui/tooltip.tsx +0 -57
- package/src/hooks/editor/use-is-creator.ts +0 -21
- package/src/hooks/use-mobile.ts +0 -19
- package/src/hooks/use-mounted.ts +0 -11
- package/src/hooks/use-upload-file.ts +0 -121
- package/src/lib/ai/markdown-joiner-transform.ts +0 -235
- package/src/lib/config.ts +0 -42
- package/src/lib/data/actions.ts +0 -46
- package/src/lib/data/boundary.client.tsx +0 -22
- package/src/lib/data/boundary.tsx +0 -22
- package/src/lib/data/query.ts +0 -9
- package/src/lib/data/store.ts +0 -52
- package/src/lib/lowlight.ts +0 -3
- package/src/lib/uploadthing.ts +0 -19
- package/src/lib/utils/deep-equal.ts +0 -37
- package/src/lib/utils/remove-undefined.ts +0 -21
- package/src/lib/utils/urls.ts +0 -6
- package/src/lib/utils.ts +0 -6
- package/tsconfig.build.json +0 -24
- package/tsconfig.json +0 -37
|
@@ -0,0 +1,1312 @@
|
|
|
1
|
+
import { c as createLucideIcon, a as createContextScope, j as createPopperScope, e as useCallbackRef, R as Root2$1, A as Anchor, g as Presence, l as Portal$1, u as useComposedRefs, b as composeEventHandlers, m as hideOthers, P as Primitive, E as dispatchDiscreteCustomEvent, p as useFocusGuards, n as ReactRemoveScroll, o as createSlot, F as FocusScope, D as DismissableLayer, C as Content, q as Arrow, r as composeRefs, k as useId, h as useControllableState, s as cn } from "./button-C_-b_vqm.js";
|
|
2
|
+
import { r as reactExports, j as jsxRuntimeExports } from "../index.js";
|
|
3
|
+
import { a as createCollection, c as createRovingFocusGroupScope, u as useDirection, I as Item, R as Root, C as Check } from "./index-DBc0nhEL.js";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { aq as ChevronRight } from "./tooltip-DZ4WdJt-.js";
|
|
6
|
+
const __iconNode$1 = [
|
|
7
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
8
|
+
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
9
|
+
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
10
|
+
];
|
|
11
|
+
const Ellipsis = createLucideIcon("ellipsis", __iconNode$1);
|
|
12
|
+
const __iconNode = [
|
|
13
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
14
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
15
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
16
|
+
];
|
|
17
|
+
const Trash = createLucideIcon("trash", __iconNode);
|
|
18
|
+
var SELECTION_KEYS = ["Enter", " "];
|
|
19
|
+
var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"];
|
|
20
|
+
var LAST_KEYS = ["ArrowUp", "PageDown", "End"];
|
|
21
|
+
var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
|
|
22
|
+
var SUB_OPEN_KEYS = {
|
|
23
|
+
ltr: [...SELECTION_KEYS, "ArrowRight"],
|
|
24
|
+
rtl: [...SELECTION_KEYS, "ArrowLeft"]
|
|
25
|
+
};
|
|
26
|
+
var SUB_CLOSE_KEYS = {
|
|
27
|
+
ltr: ["ArrowLeft"],
|
|
28
|
+
rtl: ["ArrowRight"]
|
|
29
|
+
};
|
|
30
|
+
var MENU_NAME = "Menu";
|
|
31
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
|
|
32
|
+
var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
|
|
33
|
+
createCollectionScope,
|
|
34
|
+
createPopperScope,
|
|
35
|
+
createRovingFocusGroupScope
|
|
36
|
+
]);
|
|
37
|
+
var usePopperScope = createPopperScope();
|
|
38
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
39
|
+
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
|
|
40
|
+
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
41
|
+
var Menu = (props) => {
|
|
42
|
+
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
|
|
43
|
+
const popperScope = usePopperScope(__scopeMenu);
|
|
44
|
+
const [content, setContent] = reactExports.useState(null);
|
|
45
|
+
const isUsingKeyboardRef = reactExports.useRef(false);
|
|
46
|
+
const handleOpenChange = useCallbackRef(onOpenChange);
|
|
47
|
+
const direction = useDirection(dir);
|
|
48
|
+
reactExports.useEffect(() => {
|
|
49
|
+
const handleKeyDown = () => {
|
|
50
|
+
isUsingKeyboardRef.current = true;
|
|
51
|
+
document.addEventListener("pointerdown", handlePointer, { capture: true, once: true });
|
|
52
|
+
document.addEventListener("pointermove", handlePointer, { capture: true, once: true });
|
|
53
|
+
};
|
|
54
|
+
const handlePointer = () => isUsingKeyboardRef.current = false;
|
|
55
|
+
document.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
56
|
+
return () => {
|
|
57
|
+
document.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
58
|
+
document.removeEventListener("pointerdown", handlePointer, { capture: true });
|
|
59
|
+
document.removeEventListener("pointermove", handlePointer, { capture: true });
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$1, { ...popperScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
63
|
+
MenuProvider,
|
|
64
|
+
{
|
|
65
|
+
scope: __scopeMenu,
|
|
66
|
+
open,
|
|
67
|
+
onOpenChange: handleOpenChange,
|
|
68
|
+
content,
|
|
69
|
+
onContentChange: setContent,
|
|
70
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
71
|
+
MenuRootProvider,
|
|
72
|
+
{
|
|
73
|
+
scope: __scopeMenu,
|
|
74
|
+
onClose: reactExports.useCallback(() => handleOpenChange(false), [handleOpenChange]),
|
|
75
|
+
isUsingKeyboardRef,
|
|
76
|
+
dir: direction,
|
|
77
|
+
modal,
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
) });
|
|
83
|
+
};
|
|
84
|
+
Menu.displayName = MENU_NAME;
|
|
85
|
+
var ANCHOR_NAME = "MenuAnchor";
|
|
86
|
+
var MenuAnchor = reactExports.forwardRef(
|
|
87
|
+
(props, forwardedRef) => {
|
|
88
|
+
const { __scopeMenu, ...anchorProps } = props;
|
|
89
|
+
const popperScope = usePopperScope(__scopeMenu);
|
|
90
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
MenuAnchor.displayName = ANCHOR_NAME;
|
|
94
|
+
var PORTAL_NAME$1 = "MenuPortal";
|
|
95
|
+
var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME$1, {
|
|
96
|
+
forceMount: void 0
|
|
97
|
+
});
|
|
98
|
+
var MenuPortal = (props) => {
|
|
99
|
+
const { __scopeMenu, forceMount, children, container } = props;
|
|
100
|
+
const context = useMenuContext(PORTAL_NAME$1, __scopeMenu);
|
|
101
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Portal$1, { asChild: true, container, children }) }) });
|
|
102
|
+
};
|
|
103
|
+
MenuPortal.displayName = PORTAL_NAME$1;
|
|
104
|
+
var CONTENT_NAME$1 = "MenuContent";
|
|
105
|
+
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$1);
|
|
106
|
+
var MenuContent = reactExports.forwardRef(
|
|
107
|
+
(props, forwardedRef) => {
|
|
108
|
+
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
109
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
110
|
+
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
111
|
+
const rootContext = useMenuRootContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
112
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
var MenuRootContentModal = reactExports.forwardRef(
|
|
116
|
+
(props, forwardedRef) => {
|
|
117
|
+
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
118
|
+
const ref = reactExports.useRef(null);
|
|
119
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
120
|
+
reactExports.useEffect(() => {
|
|
121
|
+
const content = ref.current;
|
|
122
|
+
if (content) return hideOthers(content);
|
|
123
|
+
}, []);
|
|
124
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
125
|
+
MenuContentImpl,
|
|
126
|
+
{
|
|
127
|
+
...props,
|
|
128
|
+
ref: composedRefs,
|
|
129
|
+
trapFocus: context.open,
|
|
130
|
+
disableOutsidePointerEvents: context.open,
|
|
131
|
+
disableOutsideScroll: true,
|
|
132
|
+
onFocusOutside: composeEventHandlers(
|
|
133
|
+
props.onFocusOutside,
|
|
134
|
+
(event) => event.preventDefault(),
|
|
135
|
+
{ checkForDefaultPrevented: false }
|
|
136
|
+
),
|
|
137
|
+
onDismiss: () => context.onOpenChange(false)
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
var MenuRootContentNonModal = reactExports.forwardRef((props, forwardedRef) => {
|
|
143
|
+
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
144
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
145
|
+
MenuContentImpl,
|
|
146
|
+
{
|
|
147
|
+
...props,
|
|
148
|
+
ref: forwardedRef,
|
|
149
|
+
trapFocus: false,
|
|
150
|
+
disableOutsidePointerEvents: false,
|
|
151
|
+
disableOutsideScroll: false,
|
|
152
|
+
onDismiss: () => context.onOpenChange(false)
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
});
|
|
156
|
+
var Slot = createSlot("MenuContent.ScrollLock");
|
|
157
|
+
var MenuContentImpl = reactExports.forwardRef(
|
|
158
|
+
(props, forwardedRef) => {
|
|
159
|
+
const {
|
|
160
|
+
__scopeMenu,
|
|
161
|
+
loop = false,
|
|
162
|
+
trapFocus,
|
|
163
|
+
onOpenAutoFocus,
|
|
164
|
+
onCloseAutoFocus,
|
|
165
|
+
disableOutsidePointerEvents,
|
|
166
|
+
onEntryFocus,
|
|
167
|
+
onEscapeKeyDown,
|
|
168
|
+
onPointerDownOutside,
|
|
169
|
+
onFocusOutside,
|
|
170
|
+
onInteractOutside,
|
|
171
|
+
onDismiss,
|
|
172
|
+
disableOutsideScroll,
|
|
173
|
+
...contentProps
|
|
174
|
+
} = props;
|
|
175
|
+
const context = useMenuContext(CONTENT_NAME$1, __scopeMenu);
|
|
176
|
+
const rootContext = useMenuRootContext(CONTENT_NAME$1, __scopeMenu);
|
|
177
|
+
const popperScope = usePopperScope(__scopeMenu);
|
|
178
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
179
|
+
const getItems = useCollection(__scopeMenu);
|
|
180
|
+
const [currentItemId, setCurrentItemId] = reactExports.useState(null);
|
|
181
|
+
const contentRef = reactExports.useRef(null);
|
|
182
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);
|
|
183
|
+
const timerRef = reactExports.useRef(0);
|
|
184
|
+
const searchRef = reactExports.useRef("");
|
|
185
|
+
const pointerGraceTimerRef = reactExports.useRef(0);
|
|
186
|
+
const pointerGraceIntentRef = reactExports.useRef(null);
|
|
187
|
+
const pointerDirRef = reactExports.useRef("right");
|
|
188
|
+
const lastPointerXRef = reactExports.useRef(0);
|
|
189
|
+
const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll : reactExports.Fragment;
|
|
190
|
+
const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;
|
|
191
|
+
const handleTypeaheadSearch = (key) => {
|
|
192
|
+
const search = searchRef.current + key;
|
|
193
|
+
const items = getItems().filter((item) => !item.disabled);
|
|
194
|
+
const currentItem = document.activeElement;
|
|
195
|
+
const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;
|
|
196
|
+
const values = items.map((item) => item.textValue);
|
|
197
|
+
const nextMatch = getNextMatch(values, search, currentMatch);
|
|
198
|
+
const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;
|
|
199
|
+
(function updateSearch(value) {
|
|
200
|
+
searchRef.current = value;
|
|
201
|
+
window.clearTimeout(timerRef.current);
|
|
202
|
+
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
|
|
203
|
+
})(search);
|
|
204
|
+
if (newItem) {
|
|
205
|
+
setTimeout(() => newItem.focus());
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
reactExports.useEffect(() => {
|
|
209
|
+
return () => window.clearTimeout(timerRef.current);
|
|
210
|
+
}, []);
|
|
211
|
+
useFocusGuards();
|
|
212
|
+
const isPointerMovingToSubmenu = reactExports.useCallback((event) => {
|
|
213
|
+
const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
|
|
214
|
+
return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
|
|
215
|
+
}, []);
|
|
216
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
217
|
+
MenuContentProvider,
|
|
218
|
+
{
|
|
219
|
+
scope: __scopeMenu,
|
|
220
|
+
searchRef,
|
|
221
|
+
onItemEnter: reactExports.useCallback(
|
|
222
|
+
(event) => {
|
|
223
|
+
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
224
|
+
},
|
|
225
|
+
[isPointerMovingToSubmenu]
|
|
226
|
+
),
|
|
227
|
+
onItemLeave: reactExports.useCallback(
|
|
228
|
+
(event) => {
|
|
229
|
+
if (isPointerMovingToSubmenu(event)) return;
|
|
230
|
+
contentRef.current?.focus();
|
|
231
|
+
setCurrentItemId(null);
|
|
232
|
+
},
|
|
233
|
+
[isPointerMovingToSubmenu]
|
|
234
|
+
),
|
|
235
|
+
onTriggerLeave: reactExports.useCallback(
|
|
236
|
+
(event) => {
|
|
237
|
+
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
238
|
+
},
|
|
239
|
+
[isPointerMovingToSubmenu]
|
|
240
|
+
),
|
|
241
|
+
pointerGraceTimerRef,
|
|
242
|
+
onPointerGraceIntentChange: reactExports.useCallback((intent) => {
|
|
243
|
+
pointerGraceIntentRef.current = intent;
|
|
244
|
+
}, []),
|
|
245
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
246
|
+
FocusScope,
|
|
247
|
+
{
|
|
248
|
+
asChild: true,
|
|
249
|
+
trapped: trapFocus,
|
|
250
|
+
onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {
|
|
251
|
+
event.preventDefault();
|
|
252
|
+
contentRef.current?.focus({ preventScroll: true });
|
|
253
|
+
}),
|
|
254
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
255
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
256
|
+
DismissableLayer,
|
|
257
|
+
{
|
|
258
|
+
asChild: true,
|
|
259
|
+
disableOutsidePointerEvents,
|
|
260
|
+
onEscapeKeyDown,
|
|
261
|
+
onPointerDownOutside,
|
|
262
|
+
onFocusOutside,
|
|
263
|
+
onInteractOutside,
|
|
264
|
+
onDismiss,
|
|
265
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
266
|
+
Root,
|
|
267
|
+
{
|
|
268
|
+
asChild: true,
|
|
269
|
+
...rovingFocusGroupScope,
|
|
270
|
+
dir: rootContext.dir,
|
|
271
|
+
orientation: "vertical",
|
|
272
|
+
loop,
|
|
273
|
+
currentTabStopId: currentItemId,
|
|
274
|
+
onCurrentTabStopIdChange: setCurrentItemId,
|
|
275
|
+
onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {
|
|
276
|
+
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
277
|
+
}),
|
|
278
|
+
preventScrollOnEntryFocus: true,
|
|
279
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
280
|
+
Content,
|
|
281
|
+
{
|
|
282
|
+
role: "menu",
|
|
283
|
+
"aria-orientation": "vertical",
|
|
284
|
+
"data-state": getOpenState(context.open),
|
|
285
|
+
"data-radix-menu-content": "",
|
|
286
|
+
dir: rootContext.dir,
|
|
287
|
+
...popperScope,
|
|
288
|
+
...contentProps,
|
|
289
|
+
ref: composedRefs,
|
|
290
|
+
style: { outline: "none", ...contentProps.style },
|
|
291
|
+
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {
|
|
292
|
+
const target = event.target;
|
|
293
|
+
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
294
|
+
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
295
|
+
const isCharacterKey = event.key.length === 1;
|
|
296
|
+
if (isKeyDownInside) {
|
|
297
|
+
if (event.key === "Tab") event.preventDefault();
|
|
298
|
+
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
299
|
+
}
|
|
300
|
+
const content = contentRef.current;
|
|
301
|
+
if (event.target !== content) return;
|
|
302
|
+
if (!FIRST_LAST_KEYS.includes(event.key)) return;
|
|
303
|
+
event.preventDefault();
|
|
304
|
+
const items = getItems().filter((item) => !item.disabled);
|
|
305
|
+
const candidateNodes = items.map((item) => item.ref.current);
|
|
306
|
+
if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
|
|
307
|
+
focusFirst(candidateNodes);
|
|
308
|
+
}),
|
|
309
|
+
onBlur: composeEventHandlers(props.onBlur, (event) => {
|
|
310
|
+
if (!event.currentTarget.contains(event.target)) {
|
|
311
|
+
window.clearTimeout(timerRef.current);
|
|
312
|
+
searchRef.current = "";
|
|
313
|
+
}
|
|
314
|
+
}),
|
|
315
|
+
onPointerMove: composeEventHandlers(
|
|
316
|
+
props.onPointerMove,
|
|
317
|
+
whenMouse((event) => {
|
|
318
|
+
const target = event.target;
|
|
319
|
+
const pointerXHasChanged = lastPointerXRef.current !== event.clientX;
|
|
320
|
+
if (event.currentTarget.contains(target) && pointerXHasChanged) {
|
|
321
|
+
const newDir = event.clientX > lastPointerXRef.current ? "right" : "left";
|
|
322
|
+
pointerDirRef.current = newDir;
|
|
323
|
+
lastPointerXRef.current = event.clientX;
|
|
324
|
+
}
|
|
325
|
+
})
|
|
326
|
+
)
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
}
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
}
|
|
334
|
+
) })
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
MenuContent.displayName = CONTENT_NAME$1;
|
|
340
|
+
var GROUP_NAME$1 = "MenuGroup";
|
|
341
|
+
var MenuGroup = reactExports.forwardRef(
|
|
342
|
+
(props, forwardedRef) => {
|
|
343
|
+
const { __scopeMenu, ...groupProps } = props;
|
|
344
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
MenuGroup.displayName = GROUP_NAME$1;
|
|
348
|
+
var LABEL_NAME$1 = "MenuLabel";
|
|
349
|
+
var MenuLabel = reactExports.forwardRef(
|
|
350
|
+
(props, forwardedRef) => {
|
|
351
|
+
const { __scopeMenu, ...labelProps } = props;
|
|
352
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
MenuLabel.displayName = LABEL_NAME$1;
|
|
356
|
+
var ITEM_NAME$1 = "MenuItem";
|
|
357
|
+
var ITEM_SELECT = "menu.itemSelect";
|
|
358
|
+
var MenuItem = reactExports.forwardRef(
|
|
359
|
+
(props, forwardedRef) => {
|
|
360
|
+
const { disabled = false, onSelect, ...itemProps } = props;
|
|
361
|
+
const ref = reactExports.useRef(null);
|
|
362
|
+
const rootContext = useMenuRootContext(ITEM_NAME$1, props.__scopeMenu);
|
|
363
|
+
const contentContext = useMenuContentContext(ITEM_NAME$1, props.__scopeMenu);
|
|
364
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
365
|
+
const isPointerDownRef = reactExports.useRef(false);
|
|
366
|
+
const handleSelect = () => {
|
|
367
|
+
const menuItem = ref.current;
|
|
368
|
+
if (!disabled && menuItem) {
|
|
369
|
+
const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });
|
|
370
|
+
menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });
|
|
371
|
+
dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);
|
|
372
|
+
if (itemSelectEvent.defaultPrevented) {
|
|
373
|
+
isPointerDownRef.current = false;
|
|
374
|
+
} else {
|
|
375
|
+
rootContext.onClose();
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
380
|
+
MenuItemImpl,
|
|
381
|
+
{
|
|
382
|
+
...itemProps,
|
|
383
|
+
ref: composedRefs,
|
|
384
|
+
disabled,
|
|
385
|
+
onClick: composeEventHandlers(props.onClick, handleSelect),
|
|
386
|
+
onPointerDown: (event) => {
|
|
387
|
+
props.onPointerDown?.(event);
|
|
388
|
+
isPointerDownRef.current = true;
|
|
389
|
+
},
|
|
390
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
|
391
|
+
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
392
|
+
}),
|
|
393
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
394
|
+
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
395
|
+
if (disabled || isTypingAhead && event.key === " ") return;
|
|
396
|
+
if (SELECTION_KEYS.includes(event.key)) {
|
|
397
|
+
event.currentTarget.click();
|
|
398
|
+
event.preventDefault();
|
|
399
|
+
}
|
|
400
|
+
})
|
|
401
|
+
}
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
);
|
|
405
|
+
MenuItem.displayName = ITEM_NAME$1;
|
|
406
|
+
var MenuItemImpl = reactExports.forwardRef(
|
|
407
|
+
(props, forwardedRef) => {
|
|
408
|
+
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
409
|
+
const contentContext = useMenuContentContext(ITEM_NAME$1, __scopeMenu);
|
|
410
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
411
|
+
const ref = reactExports.useRef(null);
|
|
412
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
413
|
+
const [isFocused, setIsFocused] = reactExports.useState(false);
|
|
414
|
+
const [textContent, setTextContent] = reactExports.useState("");
|
|
415
|
+
reactExports.useEffect(() => {
|
|
416
|
+
const menuItem = ref.current;
|
|
417
|
+
if (menuItem) {
|
|
418
|
+
setTextContent((menuItem.textContent ?? "").trim());
|
|
419
|
+
}
|
|
420
|
+
}, [itemProps.children]);
|
|
421
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
422
|
+
Collection.ItemSlot,
|
|
423
|
+
{
|
|
424
|
+
scope: __scopeMenu,
|
|
425
|
+
disabled,
|
|
426
|
+
textValue: textValue ?? textContent,
|
|
427
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
428
|
+
Primitive.div,
|
|
429
|
+
{
|
|
430
|
+
role: "menuitem",
|
|
431
|
+
"data-highlighted": isFocused ? "" : void 0,
|
|
432
|
+
"aria-disabled": disabled || void 0,
|
|
433
|
+
"data-disabled": disabled ? "" : void 0,
|
|
434
|
+
...itemProps,
|
|
435
|
+
ref: composedRefs,
|
|
436
|
+
onPointerMove: composeEventHandlers(
|
|
437
|
+
props.onPointerMove,
|
|
438
|
+
whenMouse((event) => {
|
|
439
|
+
if (disabled) {
|
|
440
|
+
contentContext.onItemLeave(event);
|
|
441
|
+
} else {
|
|
442
|
+
contentContext.onItemEnter(event);
|
|
443
|
+
if (!event.defaultPrevented) {
|
|
444
|
+
const item = event.currentTarget;
|
|
445
|
+
item.focus({ preventScroll: true });
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
})
|
|
449
|
+
),
|
|
450
|
+
onPointerLeave: composeEventHandlers(
|
|
451
|
+
props.onPointerLeave,
|
|
452
|
+
whenMouse((event) => contentContext.onItemLeave(event))
|
|
453
|
+
),
|
|
454
|
+
onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),
|
|
455
|
+
onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))
|
|
456
|
+
}
|
|
457
|
+
) })
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
);
|
|
462
|
+
var CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem";
|
|
463
|
+
var MenuCheckboxItem = reactExports.forwardRef(
|
|
464
|
+
(props, forwardedRef) => {
|
|
465
|
+
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
466
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
467
|
+
MenuItem,
|
|
468
|
+
{
|
|
469
|
+
role: "menuitemcheckbox",
|
|
470
|
+
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
471
|
+
...checkboxItemProps,
|
|
472
|
+
ref: forwardedRef,
|
|
473
|
+
"data-state": getCheckedState(checked),
|
|
474
|
+
onSelect: composeEventHandlers(
|
|
475
|
+
checkboxItemProps.onSelect,
|
|
476
|
+
() => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),
|
|
477
|
+
{ checkForDefaultPrevented: false }
|
|
478
|
+
)
|
|
479
|
+
}
|
|
480
|
+
) });
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$1;
|
|
484
|
+
var RADIO_GROUP_NAME$1 = "MenuRadioGroup";
|
|
485
|
+
var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
|
|
486
|
+
RADIO_GROUP_NAME$1,
|
|
487
|
+
{ value: void 0, onValueChange: () => {
|
|
488
|
+
} }
|
|
489
|
+
);
|
|
490
|
+
var MenuRadioGroup = reactExports.forwardRef(
|
|
491
|
+
(props, forwardedRef) => {
|
|
492
|
+
const { value, onValueChange, ...groupProps } = props;
|
|
493
|
+
const handleValueChange = useCallbackRef(onValueChange);
|
|
494
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
498
|
+
var RADIO_ITEM_NAME$1 = "MenuRadioItem";
|
|
499
|
+
var MenuRadioItem = reactExports.forwardRef(
|
|
500
|
+
(props, forwardedRef) => {
|
|
501
|
+
const { value, ...radioItemProps } = props;
|
|
502
|
+
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
503
|
+
const checked = value === context.value;
|
|
504
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
505
|
+
MenuItem,
|
|
506
|
+
{
|
|
507
|
+
role: "menuitemradio",
|
|
508
|
+
"aria-checked": checked,
|
|
509
|
+
...radioItemProps,
|
|
510
|
+
ref: forwardedRef,
|
|
511
|
+
"data-state": getCheckedState(checked),
|
|
512
|
+
onSelect: composeEventHandlers(
|
|
513
|
+
radioItemProps.onSelect,
|
|
514
|
+
() => context.onValueChange?.(value),
|
|
515
|
+
{ checkForDefaultPrevented: false }
|
|
516
|
+
)
|
|
517
|
+
}
|
|
518
|
+
) });
|
|
519
|
+
}
|
|
520
|
+
);
|
|
521
|
+
MenuRadioItem.displayName = RADIO_ITEM_NAME$1;
|
|
522
|
+
var ITEM_INDICATOR_NAME = "MenuItemIndicator";
|
|
523
|
+
var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
|
|
524
|
+
ITEM_INDICATOR_NAME,
|
|
525
|
+
{ checked: false }
|
|
526
|
+
);
|
|
527
|
+
var MenuItemIndicator = reactExports.forwardRef(
|
|
528
|
+
(props, forwardedRef) => {
|
|
529
|
+
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
530
|
+
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
|
|
531
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
532
|
+
Presence,
|
|
533
|
+
{
|
|
534
|
+
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
535
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
536
|
+
Primitive.span,
|
|
537
|
+
{
|
|
538
|
+
...itemIndicatorProps,
|
|
539
|
+
ref: forwardedRef,
|
|
540
|
+
"data-state": getCheckedState(indicatorContext.checked)
|
|
541
|
+
}
|
|
542
|
+
)
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
548
|
+
var SEPARATOR_NAME$1 = "MenuSeparator";
|
|
549
|
+
var MenuSeparator = reactExports.forwardRef(
|
|
550
|
+
(props, forwardedRef) => {
|
|
551
|
+
const { __scopeMenu, ...separatorProps } = props;
|
|
552
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
553
|
+
Primitive.div,
|
|
554
|
+
{
|
|
555
|
+
role: "separator",
|
|
556
|
+
"aria-orientation": "horizontal",
|
|
557
|
+
...separatorProps,
|
|
558
|
+
ref: forwardedRef
|
|
559
|
+
}
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
MenuSeparator.displayName = SEPARATOR_NAME$1;
|
|
564
|
+
var ARROW_NAME$1 = "MenuArrow";
|
|
565
|
+
var MenuArrow = reactExports.forwardRef(
|
|
566
|
+
(props, forwardedRef) => {
|
|
567
|
+
const { __scopeMenu, ...arrowProps } = props;
|
|
568
|
+
const popperScope = usePopperScope(__scopeMenu);
|
|
569
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
MenuArrow.displayName = ARROW_NAME$1;
|
|
573
|
+
var SUB_NAME = "MenuSub";
|
|
574
|
+
var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);
|
|
575
|
+
var MenuSub = (props) => {
|
|
576
|
+
const { __scopeMenu, children, open = false, onOpenChange } = props;
|
|
577
|
+
const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);
|
|
578
|
+
const popperScope = usePopperScope(__scopeMenu);
|
|
579
|
+
const [trigger, setTrigger] = reactExports.useState(null);
|
|
580
|
+
const [content, setContent] = reactExports.useState(null);
|
|
581
|
+
const handleOpenChange = useCallbackRef(onOpenChange);
|
|
582
|
+
reactExports.useEffect(() => {
|
|
583
|
+
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
584
|
+
return () => handleOpenChange(false);
|
|
585
|
+
}, [parentMenuContext.open, handleOpenChange]);
|
|
586
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$1, { ...popperScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
587
|
+
MenuProvider,
|
|
588
|
+
{
|
|
589
|
+
scope: __scopeMenu,
|
|
590
|
+
open,
|
|
591
|
+
onOpenChange: handleOpenChange,
|
|
592
|
+
content,
|
|
593
|
+
onContentChange: setContent,
|
|
594
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
595
|
+
MenuSubProvider,
|
|
596
|
+
{
|
|
597
|
+
scope: __scopeMenu,
|
|
598
|
+
contentId: useId(),
|
|
599
|
+
triggerId: useId(),
|
|
600
|
+
trigger,
|
|
601
|
+
onTriggerChange: setTrigger,
|
|
602
|
+
children
|
|
603
|
+
}
|
|
604
|
+
)
|
|
605
|
+
}
|
|
606
|
+
) });
|
|
607
|
+
};
|
|
608
|
+
MenuSub.displayName = SUB_NAME;
|
|
609
|
+
var SUB_TRIGGER_NAME$1 = "MenuSubTrigger";
|
|
610
|
+
var MenuSubTrigger = reactExports.forwardRef(
|
|
611
|
+
(props, forwardedRef) => {
|
|
612
|
+
const context = useMenuContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
613
|
+
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
614
|
+
const subContext = useMenuSubContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
615
|
+
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
616
|
+
const openTimerRef = reactExports.useRef(null);
|
|
617
|
+
const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
|
|
618
|
+
const scope = { __scopeMenu: props.__scopeMenu };
|
|
619
|
+
const clearOpenTimer = reactExports.useCallback(() => {
|
|
620
|
+
if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
|
|
621
|
+
openTimerRef.current = null;
|
|
622
|
+
}, []);
|
|
623
|
+
reactExports.useEffect(() => clearOpenTimer, [clearOpenTimer]);
|
|
624
|
+
reactExports.useEffect(() => {
|
|
625
|
+
const pointerGraceTimer = pointerGraceTimerRef.current;
|
|
626
|
+
return () => {
|
|
627
|
+
window.clearTimeout(pointerGraceTimer);
|
|
628
|
+
onPointerGraceIntentChange(null);
|
|
629
|
+
};
|
|
630
|
+
}, [pointerGraceTimerRef, onPointerGraceIntentChange]);
|
|
631
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
632
|
+
MenuItemImpl,
|
|
633
|
+
{
|
|
634
|
+
id: subContext.triggerId,
|
|
635
|
+
"aria-haspopup": "menu",
|
|
636
|
+
"aria-expanded": context.open,
|
|
637
|
+
"aria-controls": subContext.contentId,
|
|
638
|
+
"data-state": getOpenState(context.open),
|
|
639
|
+
...props,
|
|
640
|
+
ref: composeRefs(forwardedRef, subContext.onTriggerChange),
|
|
641
|
+
onClick: (event) => {
|
|
642
|
+
props.onClick?.(event);
|
|
643
|
+
if (props.disabled || event.defaultPrevented) return;
|
|
644
|
+
event.currentTarget.focus();
|
|
645
|
+
if (!context.open) context.onOpenChange(true);
|
|
646
|
+
},
|
|
647
|
+
onPointerMove: composeEventHandlers(
|
|
648
|
+
props.onPointerMove,
|
|
649
|
+
whenMouse((event) => {
|
|
650
|
+
contentContext.onItemEnter(event);
|
|
651
|
+
if (event.defaultPrevented) return;
|
|
652
|
+
if (!props.disabled && !context.open && !openTimerRef.current) {
|
|
653
|
+
contentContext.onPointerGraceIntentChange(null);
|
|
654
|
+
openTimerRef.current = window.setTimeout(() => {
|
|
655
|
+
context.onOpenChange(true);
|
|
656
|
+
clearOpenTimer();
|
|
657
|
+
}, 100);
|
|
658
|
+
}
|
|
659
|
+
})
|
|
660
|
+
),
|
|
661
|
+
onPointerLeave: composeEventHandlers(
|
|
662
|
+
props.onPointerLeave,
|
|
663
|
+
whenMouse((event) => {
|
|
664
|
+
clearOpenTimer();
|
|
665
|
+
const contentRect = context.content?.getBoundingClientRect();
|
|
666
|
+
if (contentRect) {
|
|
667
|
+
const side = context.content?.dataset.side;
|
|
668
|
+
const rightSide = side === "right";
|
|
669
|
+
const bleed = rightSide ? -5 : 5;
|
|
670
|
+
const contentNearEdge = contentRect[rightSide ? "left" : "right"];
|
|
671
|
+
const contentFarEdge = contentRect[rightSide ? "right" : "left"];
|
|
672
|
+
contentContext.onPointerGraceIntentChange({
|
|
673
|
+
area: [
|
|
674
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
675
|
+
// consistently within polygon bounds
|
|
676
|
+
{ x: event.clientX + bleed, y: event.clientY },
|
|
677
|
+
{ x: contentNearEdge, y: contentRect.top },
|
|
678
|
+
{ x: contentFarEdge, y: contentRect.top },
|
|
679
|
+
{ x: contentFarEdge, y: contentRect.bottom },
|
|
680
|
+
{ x: contentNearEdge, y: contentRect.bottom }
|
|
681
|
+
],
|
|
682
|
+
side
|
|
683
|
+
});
|
|
684
|
+
window.clearTimeout(pointerGraceTimerRef.current);
|
|
685
|
+
pointerGraceTimerRef.current = window.setTimeout(
|
|
686
|
+
() => contentContext.onPointerGraceIntentChange(null),
|
|
687
|
+
300
|
|
688
|
+
);
|
|
689
|
+
} else {
|
|
690
|
+
contentContext.onTriggerLeave(event);
|
|
691
|
+
if (event.defaultPrevented) return;
|
|
692
|
+
contentContext.onPointerGraceIntentChange(null);
|
|
693
|
+
}
|
|
694
|
+
})
|
|
695
|
+
),
|
|
696
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
697
|
+
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
698
|
+
if (props.disabled || isTypingAhead && event.key === " ") return;
|
|
699
|
+
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
700
|
+
context.onOpenChange(true);
|
|
701
|
+
context.content?.focus();
|
|
702
|
+
event.preventDefault();
|
|
703
|
+
}
|
|
704
|
+
})
|
|
705
|
+
}
|
|
706
|
+
) });
|
|
707
|
+
}
|
|
708
|
+
);
|
|
709
|
+
MenuSubTrigger.displayName = SUB_TRIGGER_NAME$1;
|
|
710
|
+
var SUB_CONTENT_NAME$1 = "MenuSubContent";
|
|
711
|
+
var MenuSubContent = reactExports.forwardRef(
|
|
712
|
+
(props, forwardedRef) => {
|
|
713
|
+
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
714
|
+
const { forceMount = portalContext.forceMount, ...subContentProps } = props;
|
|
715
|
+
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
716
|
+
const rootContext = useMenuRootContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
717
|
+
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
718
|
+
const ref = reactExports.useRef(null);
|
|
719
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
720
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
721
|
+
MenuContentImpl,
|
|
722
|
+
{
|
|
723
|
+
id: subContext.contentId,
|
|
724
|
+
"aria-labelledby": subContext.triggerId,
|
|
725
|
+
...subContentProps,
|
|
726
|
+
ref: composedRefs,
|
|
727
|
+
align: "start",
|
|
728
|
+
side: rootContext.dir === "rtl" ? "left" : "right",
|
|
729
|
+
disableOutsidePointerEvents: false,
|
|
730
|
+
disableOutsideScroll: false,
|
|
731
|
+
trapFocus: false,
|
|
732
|
+
onOpenAutoFocus: (event) => {
|
|
733
|
+
if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();
|
|
734
|
+
event.preventDefault();
|
|
735
|
+
},
|
|
736
|
+
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
737
|
+
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {
|
|
738
|
+
if (event.target !== subContext.trigger) context.onOpenChange(false);
|
|
739
|
+
}),
|
|
740
|
+
onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {
|
|
741
|
+
rootContext.onClose();
|
|
742
|
+
event.preventDefault();
|
|
743
|
+
}),
|
|
744
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
745
|
+
const isKeyDownInside = event.currentTarget.contains(event.target);
|
|
746
|
+
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
|
|
747
|
+
if (isKeyDownInside && isCloseKey) {
|
|
748
|
+
context.onOpenChange(false);
|
|
749
|
+
subContext.trigger?.focus();
|
|
750
|
+
event.preventDefault();
|
|
751
|
+
}
|
|
752
|
+
})
|
|
753
|
+
}
|
|
754
|
+
) }) }) });
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
MenuSubContent.displayName = SUB_CONTENT_NAME$1;
|
|
758
|
+
function getOpenState(open) {
|
|
759
|
+
return open ? "open" : "closed";
|
|
760
|
+
}
|
|
761
|
+
function isIndeterminate(checked) {
|
|
762
|
+
return checked === "indeterminate";
|
|
763
|
+
}
|
|
764
|
+
function getCheckedState(checked) {
|
|
765
|
+
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
766
|
+
}
|
|
767
|
+
function focusFirst(candidates) {
|
|
768
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
769
|
+
for (const candidate of candidates) {
|
|
770
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
771
|
+
candidate.focus();
|
|
772
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function wrapArray(array, startIndex) {
|
|
776
|
+
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
777
|
+
}
|
|
778
|
+
function getNextMatch(values, search, currentMatch) {
|
|
779
|
+
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
|
|
780
|
+
const normalizedSearch = isRepeated ? search[0] : search;
|
|
781
|
+
const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
|
|
782
|
+
let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));
|
|
783
|
+
const excludeCurrentMatch = normalizedSearch.length === 1;
|
|
784
|
+
if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);
|
|
785
|
+
const nextMatch = wrappedValues.find(
|
|
786
|
+
(value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())
|
|
787
|
+
);
|
|
788
|
+
return nextMatch !== currentMatch ? nextMatch : void 0;
|
|
789
|
+
}
|
|
790
|
+
function isPointInPolygon(point, polygon) {
|
|
791
|
+
const { x, y } = point;
|
|
792
|
+
let inside = false;
|
|
793
|
+
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
|
794
|
+
const ii = polygon[i];
|
|
795
|
+
const jj = polygon[j];
|
|
796
|
+
const xi = ii.x;
|
|
797
|
+
const yi = ii.y;
|
|
798
|
+
const xj = jj.x;
|
|
799
|
+
const yj = jj.y;
|
|
800
|
+
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
801
|
+
if (intersect) inside = !inside;
|
|
802
|
+
}
|
|
803
|
+
return inside;
|
|
804
|
+
}
|
|
805
|
+
function isPointerInGraceArea(event, area) {
|
|
806
|
+
if (!area) return false;
|
|
807
|
+
const cursorPos = { x: event.clientX, y: event.clientY };
|
|
808
|
+
return isPointInPolygon(cursorPos, area);
|
|
809
|
+
}
|
|
810
|
+
function whenMouse(handler) {
|
|
811
|
+
return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
|
|
812
|
+
}
|
|
813
|
+
var Root3 = Menu;
|
|
814
|
+
var Anchor2 = MenuAnchor;
|
|
815
|
+
var Portal = MenuPortal;
|
|
816
|
+
var Content2$1 = MenuContent;
|
|
817
|
+
var Group = MenuGroup;
|
|
818
|
+
var Label = MenuLabel;
|
|
819
|
+
var Item2$1 = MenuItem;
|
|
820
|
+
var CheckboxItem = MenuCheckboxItem;
|
|
821
|
+
var RadioGroup = MenuRadioGroup;
|
|
822
|
+
var RadioItem = MenuRadioItem;
|
|
823
|
+
var ItemIndicator = MenuItemIndicator;
|
|
824
|
+
var Separator = MenuSeparator;
|
|
825
|
+
var Arrow2$1 = MenuArrow;
|
|
826
|
+
var Sub = MenuSub;
|
|
827
|
+
var SubTrigger = MenuSubTrigger;
|
|
828
|
+
var SubContent = MenuSubContent;
|
|
829
|
+
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
830
|
+
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
|
|
831
|
+
DROPDOWN_MENU_NAME,
|
|
832
|
+
[createMenuScope]
|
|
833
|
+
);
|
|
834
|
+
var useMenuScope = createMenuScope();
|
|
835
|
+
var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
|
|
836
|
+
var DropdownMenu$1 = (props) => {
|
|
837
|
+
const {
|
|
838
|
+
__scopeDropdownMenu,
|
|
839
|
+
children,
|
|
840
|
+
dir,
|
|
841
|
+
open: openProp,
|
|
842
|
+
defaultOpen,
|
|
843
|
+
onOpenChange,
|
|
844
|
+
modal = true
|
|
845
|
+
} = props;
|
|
846
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
847
|
+
const triggerRef = reactExports.useRef(null);
|
|
848
|
+
const [open, setOpen] = useControllableState({
|
|
849
|
+
prop: openProp,
|
|
850
|
+
defaultProp: defaultOpen ?? false,
|
|
851
|
+
onChange: onOpenChange,
|
|
852
|
+
caller: DROPDOWN_MENU_NAME
|
|
853
|
+
});
|
|
854
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
855
|
+
DropdownMenuProvider,
|
|
856
|
+
{
|
|
857
|
+
scope: __scopeDropdownMenu,
|
|
858
|
+
triggerId: useId(),
|
|
859
|
+
triggerRef,
|
|
860
|
+
contentId: useId(),
|
|
861
|
+
open,
|
|
862
|
+
onOpenChange: setOpen,
|
|
863
|
+
onOpenToggle: reactExports.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
864
|
+
modal,
|
|
865
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root3, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
};
|
|
869
|
+
DropdownMenu$1.displayName = DROPDOWN_MENU_NAME;
|
|
870
|
+
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
871
|
+
var DropdownMenuTrigger$1 = reactExports.forwardRef(
|
|
872
|
+
(props, forwardedRef) => {
|
|
873
|
+
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
874
|
+
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
875
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
876
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
877
|
+
Primitive.button,
|
|
878
|
+
{
|
|
879
|
+
type: "button",
|
|
880
|
+
id: context.triggerId,
|
|
881
|
+
"aria-haspopup": "menu",
|
|
882
|
+
"aria-expanded": context.open,
|
|
883
|
+
"aria-controls": context.open ? context.contentId : void 0,
|
|
884
|
+
"data-state": context.open ? "open" : "closed",
|
|
885
|
+
"data-disabled": disabled ? "" : void 0,
|
|
886
|
+
disabled,
|
|
887
|
+
...triggerProps,
|
|
888
|
+
ref: composeRefs(forwardedRef, context.triggerRef),
|
|
889
|
+
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
890
|
+
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
891
|
+
context.onOpenToggle();
|
|
892
|
+
if (!context.open) event.preventDefault();
|
|
893
|
+
}
|
|
894
|
+
}),
|
|
895
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
896
|
+
if (disabled) return;
|
|
897
|
+
if (["Enter", " "].includes(event.key)) context.onOpenToggle();
|
|
898
|
+
if (event.key === "ArrowDown") context.onOpenChange(true);
|
|
899
|
+
if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault();
|
|
900
|
+
})
|
|
901
|
+
}
|
|
902
|
+
) });
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
DropdownMenuTrigger$1.displayName = TRIGGER_NAME;
|
|
906
|
+
var PORTAL_NAME = "DropdownMenuPortal";
|
|
907
|
+
var DropdownMenuPortal$1 = (props) => {
|
|
908
|
+
const { __scopeDropdownMenu, ...portalProps } = props;
|
|
909
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
910
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, { ...menuScope, ...portalProps });
|
|
911
|
+
};
|
|
912
|
+
DropdownMenuPortal$1.displayName = PORTAL_NAME;
|
|
913
|
+
var CONTENT_NAME = "DropdownMenuContent";
|
|
914
|
+
var DropdownMenuContent$1 = reactExports.forwardRef(
|
|
915
|
+
(props, forwardedRef) => {
|
|
916
|
+
const { __scopeDropdownMenu, ...contentProps } = props;
|
|
917
|
+
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
918
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
919
|
+
const hasInteractedOutsideRef = reactExports.useRef(false);
|
|
920
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
921
|
+
Content2$1,
|
|
922
|
+
{
|
|
923
|
+
id: context.contentId,
|
|
924
|
+
"aria-labelledby": context.triggerId,
|
|
925
|
+
...menuScope,
|
|
926
|
+
...contentProps,
|
|
927
|
+
ref: forwardedRef,
|
|
928
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
929
|
+
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
930
|
+
hasInteractedOutsideRef.current = false;
|
|
931
|
+
event.preventDefault();
|
|
932
|
+
}),
|
|
933
|
+
onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {
|
|
934
|
+
const originalEvent = event.detail.originalEvent;
|
|
935
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
936
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
937
|
+
if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
|
|
938
|
+
}),
|
|
939
|
+
style: {
|
|
940
|
+
...props.style,
|
|
941
|
+
// re-namespace exposed content custom properties
|
|
942
|
+
...{
|
|
943
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
944
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
945
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
946
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
947
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
);
|
|
954
|
+
DropdownMenuContent$1.displayName = CONTENT_NAME;
|
|
955
|
+
var GROUP_NAME = "DropdownMenuGroup";
|
|
956
|
+
var DropdownMenuGroup$1 = reactExports.forwardRef(
|
|
957
|
+
(props, forwardedRef) => {
|
|
958
|
+
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
959
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
960
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
961
|
+
}
|
|
962
|
+
);
|
|
963
|
+
DropdownMenuGroup$1.displayName = GROUP_NAME;
|
|
964
|
+
var LABEL_NAME = "DropdownMenuLabel";
|
|
965
|
+
var DropdownMenuLabel$1 = reactExports.forwardRef(
|
|
966
|
+
(props, forwardedRef) => {
|
|
967
|
+
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
968
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
969
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
|
|
970
|
+
}
|
|
971
|
+
);
|
|
972
|
+
DropdownMenuLabel$1.displayName = LABEL_NAME;
|
|
973
|
+
var ITEM_NAME = "DropdownMenuItem";
|
|
974
|
+
var DropdownMenuItem$1 = reactExports.forwardRef(
|
|
975
|
+
(props, forwardedRef) => {
|
|
976
|
+
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
977
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
978
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Item2$1, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
979
|
+
}
|
|
980
|
+
);
|
|
981
|
+
DropdownMenuItem$1.displayName = ITEM_NAME;
|
|
982
|
+
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
983
|
+
var DropdownMenuCheckboxItem$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
984
|
+
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
985
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
986
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
987
|
+
});
|
|
988
|
+
DropdownMenuCheckboxItem$1.displayName = CHECKBOX_ITEM_NAME;
|
|
989
|
+
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
990
|
+
var DropdownMenuRadioGroup$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
991
|
+
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
992
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
993
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
994
|
+
});
|
|
995
|
+
DropdownMenuRadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
996
|
+
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
997
|
+
var DropdownMenuRadioItem$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
998
|
+
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
999
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1000
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
1001
|
+
});
|
|
1002
|
+
DropdownMenuRadioItem$1.displayName = RADIO_ITEM_NAME;
|
|
1003
|
+
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
1004
|
+
var DropdownMenuItemIndicator$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
1005
|
+
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
1006
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1007
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
1008
|
+
});
|
|
1009
|
+
DropdownMenuItemIndicator$1.displayName = INDICATOR_NAME;
|
|
1010
|
+
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
1011
|
+
var DropdownMenuSeparator$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
1012
|
+
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
1013
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1014
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
1015
|
+
});
|
|
1016
|
+
DropdownMenuSeparator$1.displayName = SEPARATOR_NAME;
|
|
1017
|
+
var ARROW_NAME = "DropdownMenuArrow";
|
|
1018
|
+
var DropdownMenuArrow = reactExports.forwardRef(
|
|
1019
|
+
(props, forwardedRef) => {
|
|
1020
|
+
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
1021
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1022
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Arrow2$1, { ...menuScope, ...arrowProps, ref: forwardedRef });
|
|
1023
|
+
}
|
|
1024
|
+
);
|
|
1025
|
+
DropdownMenuArrow.displayName = ARROW_NAME;
|
|
1026
|
+
var DropdownMenuSub$1 = (props) => {
|
|
1027
|
+
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
1028
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1029
|
+
const [open, setOpen] = useControllableState({
|
|
1030
|
+
prop: openProp,
|
|
1031
|
+
defaultProp: defaultOpen ?? false,
|
|
1032
|
+
onChange: onOpenChange,
|
|
1033
|
+
caller: "DropdownMenuSub"
|
|
1034
|
+
});
|
|
1035
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
1036
|
+
};
|
|
1037
|
+
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
1038
|
+
var DropdownMenuSubTrigger$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
1039
|
+
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
1040
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1041
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
1042
|
+
});
|
|
1043
|
+
DropdownMenuSubTrigger$1.displayName = SUB_TRIGGER_NAME;
|
|
1044
|
+
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
1045
|
+
var DropdownMenuSubContent$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
1046
|
+
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
1047
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
1048
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1049
|
+
SubContent,
|
|
1050
|
+
{
|
|
1051
|
+
...menuScope,
|
|
1052
|
+
...subContentProps,
|
|
1053
|
+
ref: forwardedRef,
|
|
1054
|
+
style: {
|
|
1055
|
+
...props.style,
|
|
1056
|
+
// re-namespace exposed content custom properties
|
|
1057
|
+
...{
|
|
1058
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1059
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
1060
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
1061
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1062
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
);
|
|
1067
|
+
});
|
|
1068
|
+
DropdownMenuSubContent$1.displayName = SUB_CONTENT_NAME;
|
|
1069
|
+
var Root2 = DropdownMenu$1;
|
|
1070
|
+
var Trigger = DropdownMenuTrigger$1;
|
|
1071
|
+
var Portal2 = DropdownMenuPortal$1;
|
|
1072
|
+
var Content2 = DropdownMenuContent$1;
|
|
1073
|
+
var Group2 = DropdownMenuGroup$1;
|
|
1074
|
+
var Label2 = DropdownMenuLabel$1;
|
|
1075
|
+
var Item2 = DropdownMenuItem$1;
|
|
1076
|
+
var CheckboxItem2 = DropdownMenuCheckboxItem$1;
|
|
1077
|
+
var RadioGroup2 = DropdownMenuRadioGroup$1;
|
|
1078
|
+
var RadioItem2 = DropdownMenuRadioItem$1;
|
|
1079
|
+
var ItemIndicator2 = DropdownMenuItemIndicator$1;
|
|
1080
|
+
var Separator2 = DropdownMenuSeparator$1;
|
|
1081
|
+
var Arrow2 = DropdownMenuArrow;
|
|
1082
|
+
var Sub2 = DropdownMenuSub$1;
|
|
1083
|
+
var SubTrigger2 = DropdownMenuSubTrigger$1;
|
|
1084
|
+
var SubContent2 = DropdownMenuSubContent$1;
|
|
1085
|
+
const DropdownMenuPrimitive = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1086
|
+
__proto__: null,
|
|
1087
|
+
Arrow: Arrow2,
|
|
1088
|
+
CheckboxItem: CheckboxItem2,
|
|
1089
|
+
Content: Content2,
|
|
1090
|
+
DropdownMenu: DropdownMenu$1,
|
|
1091
|
+
DropdownMenuArrow,
|
|
1092
|
+
DropdownMenuCheckboxItem: DropdownMenuCheckboxItem$1,
|
|
1093
|
+
DropdownMenuContent: DropdownMenuContent$1,
|
|
1094
|
+
DropdownMenuGroup: DropdownMenuGroup$1,
|
|
1095
|
+
DropdownMenuItem: DropdownMenuItem$1,
|
|
1096
|
+
DropdownMenuItemIndicator: DropdownMenuItemIndicator$1,
|
|
1097
|
+
DropdownMenuLabel: DropdownMenuLabel$1,
|
|
1098
|
+
DropdownMenuPortal: DropdownMenuPortal$1,
|
|
1099
|
+
DropdownMenuRadioGroup: DropdownMenuRadioGroup$1,
|
|
1100
|
+
DropdownMenuRadioItem: DropdownMenuRadioItem$1,
|
|
1101
|
+
DropdownMenuSeparator: DropdownMenuSeparator$1,
|
|
1102
|
+
DropdownMenuSub: DropdownMenuSub$1,
|
|
1103
|
+
DropdownMenuSubContent: DropdownMenuSubContent$1,
|
|
1104
|
+
DropdownMenuSubTrigger: DropdownMenuSubTrigger$1,
|
|
1105
|
+
DropdownMenuTrigger: DropdownMenuTrigger$1,
|
|
1106
|
+
Group: Group2,
|
|
1107
|
+
Item: Item2,
|
|
1108
|
+
ItemIndicator: ItemIndicator2,
|
|
1109
|
+
Label: Label2,
|
|
1110
|
+
Portal: Portal2,
|
|
1111
|
+
RadioGroup: RadioGroup2,
|
|
1112
|
+
RadioItem: RadioItem2,
|
|
1113
|
+
Root: Root2,
|
|
1114
|
+
Separator: Separator2,
|
|
1115
|
+
Sub: Sub2,
|
|
1116
|
+
SubContent: SubContent2,
|
|
1117
|
+
SubTrigger: SubTrigger2,
|
|
1118
|
+
Trigger,
|
|
1119
|
+
createDropdownMenuScope
|
|
1120
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1121
|
+
function DropdownMenu({ ...props }) {
|
|
1122
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2, { "data-slot": "dropdown-menu", ...props });
|
|
1123
|
+
}
|
|
1124
|
+
function DropdownMenuPortal({
|
|
1125
|
+
...props
|
|
1126
|
+
}) {
|
|
1127
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal2, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1128
|
+
}
|
|
1129
|
+
function DropdownMenuTrigger({
|
|
1130
|
+
...props
|
|
1131
|
+
}) {
|
|
1132
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1133
|
+
}
|
|
1134
|
+
function DropdownMenuContent({
|
|
1135
|
+
className,
|
|
1136
|
+
align = "start",
|
|
1137
|
+
sideOffset = 4,
|
|
1138
|
+
...props
|
|
1139
|
+
}) {
|
|
1140
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1141
|
+
Content2,
|
|
1142
|
+
{
|
|
1143
|
+
"data-slot": "dropdown-menu-content",
|
|
1144
|
+
sideOffset,
|
|
1145
|
+
align,
|
|
1146
|
+
className: cn(
|
|
1147
|
+
"data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-48 origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-2xl bg-popover p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-closed:animate-out data-open:animate-in data-[state=closed]:overflow-hidden",
|
|
1148
|
+
className
|
|
1149
|
+
),
|
|
1150
|
+
...props
|
|
1151
|
+
}
|
|
1152
|
+
) });
|
|
1153
|
+
}
|
|
1154
|
+
const itemVariants = cva(
|
|
1155
|
+
"relative flex cursor-default select-none items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1156
|
+
{
|
|
1157
|
+
variants: {
|
|
1158
|
+
variant: {
|
|
1159
|
+
default: "focus:**:text-accent-foreground",
|
|
1160
|
+
destructive: "text-destructive *:[svg]:text-destructive focus:text-destructive focus:bg-destructive/10 dark:focus:bg-destructive/20"
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
defaultVariants: {
|
|
1164
|
+
variant: "default"
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
);
|
|
1168
|
+
function DropdownMenuGroup({ ...props }) {
|
|
1169
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Group2, { "data-slot": "dropdown-menu-group", ...props });
|
|
1170
|
+
}
|
|
1171
|
+
function DropdownMenuItem({
|
|
1172
|
+
className,
|
|
1173
|
+
variant = "default",
|
|
1174
|
+
...props
|
|
1175
|
+
}) {
|
|
1176
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1177
|
+
Item2,
|
|
1178
|
+
{
|
|
1179
|
+
"data-variant": variant,
|
|
1180
|
+
className: cn("group/dropdown-menu-item", itemVariants({ variant }), className),
|
|
1181
|
+
...props
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1184
|
+
}
|
|
1185
|
+
function DropdownMenuCheckboxItem({
|
|
1186
|
+
className,
|
|
1187
|
+
children,
|
|
1188
|
+
checked,
|
|
1189
|
+
...props
|
|
1190
|
+
}) {
|
|
1191
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1192
|
+
CheckboxItem2,
|
|
1193
|
+
{
|
|
1194
|
+
className: cn(itemVariants(), "py-2 pr-8 pl-3", className),
|
|
1195
|
+
checked,
|
|
1196
|
+
...props,
|
|
1197
|
+
children: [
|
|
1198
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "pointer-events-none absolute end-2 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ItemIndicator2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" }) }) }),
|
|
1199
|
+
children
|
|
1200
|
+
]
|
|
1201
|
+
}
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
function DropdownMenuRadioGroup({
|
|
1205
|
+
...props
|
|
1206
|
+
}) {
|
|
1207
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup2, { "data-slot": "dropdown-menu-radio-group", ...props });
|
|
1208
|
+
}
|
|
1209
|
+
function DropdownMenuRadioItem({
|
|
1210
|
+
className,
|
|
1211
|
+
children,
|
|
1212
|
+
...props
|
|
1213
|
+
}) {
|
|
1214
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1215
|
+
RadioItem2,
|
|
1216
|
+
{
|
|
1217
|
+
className: cn(itemVariants(), "py-2 pr-8 pl-3", className),
|
|
1218
|
+
...props,
|
|
1219
|
+
children
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
function DropdownMenuLabel({
|
|
1224
|
+
className,
|
|
1225
|
+
inset,
|
|
1226
|
+
...props
|
|
1227
|
+
}) {
|
|
1228
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1229
|
+
Label2,
|
|
1230
|
+
{
|
|
1231
|
+
"data-slot": "dropdown-menu-label",
|
|
1232
|
+
"data-inset": inset,
|
|
1233
|
+
className: cn("px-3 py-2.5 text-muted-foreground text-xs data-inset:pl-8", className),
|
|
1234
|
+
...props
|
|
1235
|
+
}
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1238
|
+
function DropdownMenuSeparator({
|
|
1239
|
+
className,
|
|
1240
|
+
...props
|
|
1241
|
+
}) {
|
|
1242
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1243
|
+
Separator2,
|
|
1244
|
+
{
|
|
1245
|
+
"data-slot": "dropdown-menu-separator",
|
|
1246
|
+
className: cn("-mx-1 my-1 h-px bg-border/50", className),
|
|
1247
|
+
...props
|
|
1248
|
+
}
|
|
1249
|
+
);
|
|
1250
|
+
}
|
|
1251
|
+
function DropdownMenuSub({ ...props }) {
|
|
1252
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Sub2, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1253
|
+
}
|
|
1254
|
+
function DropdownMenuSubTrigger({
|
|
1255
|
+
className,
|
|
1256
|
+
inset,
|
|
1257
|
+
children,
|
|
1258
|
+
...props
|
|
1259
|
+
}) {
|
|
1260
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1261
|
+
SubTrigger2,
|
|
1262
|
+
{
|
|
1263
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1264
|
+
"data-inset": inset,
|
|
1265
|
+
className: cn(
|
|
1266
|
+
"flex cursor-default select-none items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-open:bg-accent data-inset:pl-8 data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1267
|
+
className
|
|
1268
|
+
),
|
|
1269
|
+
...props,
|
|
1270
|
+
children: [
|
|
1271
|
+
children,
|
|
1272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "ml-auto" })
|
|
1273
|
+
]
|
|
1274
|
+
}
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
function DropdownMenuSubContent({
|
|
1278
|
+
className,
|
|
1279
|
+
...props
|
|
1280
|
+
}) {
|
|
1281
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1282
|
+
SubContent2,
|
|
1283
|
+
{
|
|
1284
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1285
|
+
className: cn(
|
|
1286
|
+
"data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-36 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-2xl bg-popover p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-closed:animate-out data-open:animate-in",
|
|
1287
|
+
className
|
|
1288
|
+
),
|
|
1289
|
+
...props
|
|
1290
|
+
}
|
|
1291
|
+
);
|
|
1292
|
+
}
|
|
1293
|
+
const { DropdownMenuItemIndicator } = DropdownMenuPrimitive;
|
|
1294
|
+
export {
|
|
1295
|
+
DropdownMenu as D,
|
|
1296
|
+
Ellipsis as E,
|
|
1297
|
+
Trash as T,
|
|
1298
|
+
DropdownMenuTrigger as a,
|
|
1299
|
+
DropdownMenuContent as b,
|
|
1300
|
+
DropdownMenuGroup as c,
|
|
1301
|
+
DropdownMenuItem as d,
|
|
1302
|
+
DropdownMenuSeparator as e,
|
|
1303
|
+
DropdownMenuRadioGroup as f,
|
|
1304
|
+
DropdownMenuLabel as g,
|
|
1305
|
+
DropdownMenuRadioItem as h,
|
|
1306
|
+
DropdownMenuItemIndicator as i,
|
|
1307
|
+
DropdownMenuSub as j,
|
|
1308
|
+
DropdownMenuSubTrigger as k,
|
|
1309
|
+
DropdownMenuSubContent as l,
|
|
1310
|
+
DropdownMenuPortal as m,
|
|
1311
|
+
DropdownMenuCheckboxItem as n
|
|
1312
|
+
};
|