@arcadeai/design-system 3.39.0 → 3.39.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/dist/CompositeItem-CniPsjzP.js +30 -0
- package/dist/CompositeList-yq5K_yj6.js +81 -0
- package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
- package/dist/DialogRoot-DDokfJcO.js +57 -0
- package/dist/DialogTrigger-CFUE8YsM.js +402 -0
- package/dist/DirectionContext-BSOheMwC.js +10 -0
- package/dist/FieldItemContext-CF2fRwBC.js +12 -0
- package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
- package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
- package/dist/LabelableContext-Dzw1DWuj.js +171 -0
- package/dist/Separator-CswSYAXX.js +25 -0
- package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
- package/dist/andromeeda-B-gfN00q.js +4 -0
- package/dist/angular-html-dA1qUKRV.js +32 -0
- package/dist/angular-ts-CXyBC0vY.js +21 -0
- package/dist/apl-CjNiDgad.js +3 -3
- package/dist/assets/icons/telegram.js +10 -0
- package/dist/assets/images/arcade-grid.d.ts.map +1 -1
- package/dist/assets/images/arcade-grid.js +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/astro--3ZkKqYU.js +18 -0
- package/dist/astro-CFFExE8Q.js +5 -5
- package/dist/aurora-x-B56eICma.js +4 -0
- package/dist/ayu-dark-DJSOaKig.js +4 -0
- package/dist/ayu-light-BPfFt4v-.js +4 -0
- package/dist/ayu-mirage-DmPLRBj7.js +4 -0
- package/dist/blade-BoRuQEEj.js +20 -0
- package/dist/blade-D0HyNvCw.js +4 -4
- package/dist/c-C4SM8H98.js +6 -0
- package/dist/cairo-DM6WF2e3.js +1 -1
- package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
- package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
- package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
- package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
- package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
- package/dist/clamp-BxE4ZAuA.js +17 -0
- package/dist/cobol-HihOMwht.js +1 -1
- package/dist/coffee-D8Swy5yR.js +8 -0
- package/dist/components/index.js +665 -644
- package/dist/components/ui/atoms/accordion.d.ts +9 -7
- package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
- package/dist/components/ui/atoms/accordion.js +454 -243
- package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
- package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +149 -183
- package/dist/components/ui/atoms/alert.d.ts +2 -1
- package/dist/components/ui/atoms/alert.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert.js +36 -25
- package/dist/components/ui/atoms/avatar.d.ts +10 -5
- package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
- package/dist/components/ui/atoms/avatar.js +198 -205
- package/dist/components/ui/atoms/badge.d.ts +4 -5
- package/dist/components/ui/atoms/badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/badge.js +31 -22
- package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
- package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/atoms/breadcrumb.js +46 -29
- package/dist/components/ui/atoms/button.d.ts +4 -6
- package/dist/components/ui/atoms/button.d.ts.map +1 -1
- package/dist/components/ui/atoms/button.js +59 -28
- package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
- package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/byoc-badge.js +14 -8
- package/dist/components/ui/atoms/calendar.d.ts +6 -16
- package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
- package/dist/components/ui/atoms/calendar.js +1 -1
- package/dist/components/ui/atoms/card.d.ts +4 -2
- package/dist/components/ui/atoms/card.d.ts.map +1 -1
- package/dist/components/ui/atoms/card.js +46 -35
- package/dist/components/ui/atoms/chart.d.ts +24 -48
- package/dist/components/ui/atoms/chart.d.ts.map +1 -1
- package/dist/components/ui/atoms/chart.js +179 -148
- package/dist/components/ui/atoms/checkbox.d.ts +2 -3
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +269 -249
- package/dist/components/ui/atoms/code-block.js +1 -1
- package/dist/components/ui/atoms/collapsible.d.ts +5 -5
- package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
- package/dist/components/ui/atoms/collapsible.js +208 -23
- package/dist/components/ui/atoms/command.d.ts +4 -3
- package/dist/components/ui/atoms/command.d.ts.map +1 -1
- package/dist/components/ui/atoms/command.js +1655 -348
- package/dist/components/ui/atoms/dialog.d.ts +12 -10
- package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/dialog.js +91 -80
- package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
- package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
- package/dist/components/ui/atoms/form.d.ts +5 -3
- package/dist/components/ui/atoms/form.d.ts.map +1 -1
- package/dist/components/ui/atoms/form.js +36 -42
- package/dist/components/ui/atoms/hover-card.d.ts +5 -6
- package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
- package/dist/components/ui/atoms/hover-card.js +355 -193
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +58 -56
- package/dist/components/ui/atoms/icons/telegram.d.ts +4 -0
- package/dist/components/ui/atoms/icons/telegram.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/telegram.js +37 -0
- package/dist/components/ui/atoms/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +566 -545
- package/dist/components/ui/atoms/input-group.d.ts +20 -0
- package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
- package/dist/components/ui/atoms/input-group.js +136 -0
- package/dist/components/ui/atoms/input.d.ts.map +1 -1
- package/dist/components/ui/atoms/input.js +113 -13
- package/dist/components/ui/atoms/label.d.ts +1 -2
- package/dist/components/ui/atoms/label.d.ts.map +1 -1
- package/dist/components/ui/atoms/label.js +18 -31
- package/dist/components/ui/atoms/markdown.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
- package/dist/components/ui/atoms/popover.d.ts +8 -6
- package/dist/components/ui/atoms/popover.d.ts.map +1 -1
- package/dist/components/ui/atoms/popover.js +617 -245
- package/dist/components/ui/atoms/pro-badge.js +1 -1
- package/dist/components/ui/atoms/progress.d.ts +7 -4
- package/dist/components/ui/atoms/progress.d.ts.map +1 -1
- package/dist/components/ui/atoms/progress.js +236 -92
- package/dist/components/ui/atoms/radio-group.d.ts +4 -4
- package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
- package/dist/components/ui/atoms/radio-group.js +355 -251
- package/dist/components/ui/atoms/resizable.d.ts +3 -4
- package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
- package/dist/components/ui/atoms/resizable.js +25 -27
- package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
- package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-area.js +611 -526
- package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-button.js +27 -22
- package/dist/components/ui/atoms/select.d.ts +11 -11
- package/dist/components/ui/atoms/select.d.ts.map +1 -1
- package/dist/components/ui/atoms/select.js +1525 -889
- package/dist/components/ui/atoms/separator.d.ts +2 -3
- package/dist/components/ui/atoms/separator.d.ts.map +1 -1
- package/dist/components/ui/atoms/separator.js +16 -35
- package/dist/components/ui/atoms/sheet.d.ts +9 -9
- package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
- package/dist/components/ui/atoms/sheet.js +65 -64
- package/dist/components/ui/atoms/sidebar.d.ts +9 -15
- package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
- package/dist/components/ui/atoms/sidebar.js +288 -283
- package/dist/components/ui/atoms/skeleton.js +4 -4
- package/dist/components/ui/atoms/slider.d.ts +2 -3
- package/dist/components/ui/atoms/slider.d.ts.map +1 -1
- package/dist/components/ui/atoms/slider.js +886 -440
- package/dist/components/ui/atoms/switch.d.ts +4 -5
- package/dist/components/ui/atoms/switch.d.ts.map +1 -1
- package/dist/components/ui/atoms/switch.js +218 -151
- package/dist/components/ui/atoms/table.d.ts +2 -4
- package/dist/components/ui/atoms/table.d.ts.map +1 -1
- package/dist/components/ui/atoms/table.js +35 -36
- package/dist/components/ui/atoms/tabs.d.ts +11 -7
- package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
- package/dist/components/ui/atoms/tabs.js +492 -186
- package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
- package/dist/components/ui/atoms/textarea.js +7 -7
- package/dist/components/ui/atoms/toggle.d.ts +2 -3
- package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
- package/dist/components/ui/atoms/toggle.js +92 -45
- package/dist/components/ui/atoms/tooltip.d.ts +6 -9
- package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
- package/dist/components/ui/atoms/tooltip.js +625 -343
- package/dist/components/ui/atoms/view-tools-control.js +16 -15
- package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +365 -333
- package/dist/components/ui/index.js +665 -644
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-history-item.js +47 -40
- package/dist/components/ui/molecules/command-bar.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +26 -24
- package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +17 -11
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/message.d.ts +2 -3
- package/dist/components/ui/molecules/message.d.ts.map +1 -1
- package/dist/components/ui/molecules/message.js +10 -16
- package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
- package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
- package/dist/components/ui/molecules/prompt-input.js +21 -22
- package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +3 -3
- package/dist/components/ui/molecules/steps-progress.js +1 -0
- package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +60 -47
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
- package/dist/components/ui/molecules/user-nav.js +62 -57
- package/dist/components/ui/templates/auth-template.js +5 -5
- package/dist/composite-BASdnlNo.js +220 -0
- package/dist/composite-BSpUD7nI.js +66 -0
- package/dist/cpp-CA4iM_wM.js +18 -0
- package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
- package/dist/crystal-CRJyc4G-.js +4 -4
- package/dist/css-M7EaDHN_.js +6 -0
- package/dist/csv-B7yqA61e.js +6 -0
- package/dist/dark-plus-B4vfALTw.js +4 -0
- package/dist/detectBrowser-Dn2N72k1.js +42 -0
- package/dist/dracula-Cb59ZzY3.js +4 -0
- package/dist/dracula-soft-aaEmszbU.js +4 -0
- package/dist/edge-BYQkOzbF.js +1 -1
- package/dist/element-DSo91iOi.js +88 -0
- package/dist/elm-BtNbw_Cd.js +1 -1
- package/dist/erlang-DNcDT8Hi.js +1 -1
- package/dist/event-BCa0Un_3.js +30 -0
- package/dist/everforest-dark-CLp_21RJ.js +4 -0
- package/dist/everforest-light-CZ0NCAAv.js +4 -0
- package/dist/floating-ui.utils-48URp89E.js +126 -0
- package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
- package/dist/fsharp-CYOiIVNx.js +1 -1
- package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
- package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
- package/dist/git-rebase-ZWUFO_T4.js +1 -1
- package/dist/github-dark-BD3lImVS.js +4 -0
- package/dist/github-dark-default-ID_nBUwl.js +4 -0
- package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
- package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
- package/dist/github-light-W396yAFe.js +4 -0
- package/dist/github-light-default-DCAQ2px1.js +4 -0
- package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
- package/dist/glimmer-js-DkxNrfPT.js +2 -2
- package/dist/glimmer-ts-D6YZEmK_.js +2 -2
- package/dist/glsl-CgdqkyFp.js +8 -0
- package/dist/graphql-Bv26LTzG.js +14 -0
- package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
- package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
- package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
- package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
- package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
- package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
- package/dist/hack-ItRNKiEb.js +1 -1
- package/dist/haml-B1t5q1Sv.js +10 -0
- package/dist/haml-NZLVzu_R.js +1 -1
- package/dist/handlebars-B2fb61mr.js +14 -0
- package/dist/handlebars-mxStpSE7.js +2 -2
- package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +11 -12
- package/dist/horizon-PFtq58ZB.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BEqUWhHr.js +4 -0
- package/dist/html-B50bmoVb.js +1 -1
- package/dist/html-CPZ3oZQ7.js +10 -0
- package/dist/html-derivative-B2qv7eyt.js +8 -0
- package/dist/http-BQ2t9cn1.js +14 -0
- package/dist/hurl-RyCMCa80.js +12 -0
- package/dist/imba-DpB-wtPB.js +6 -0
- package/dist/index-3rscXtm3.js +4708 -0
- package/dist/inertValue-kpZZDBEy.js +7 -0
- package/dist/integrations/rhf/index.js +6 -5
- package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
- package/dist/java-CbphP4lz.js +6 -0
- package/dist/javascript-CgYd5l7W.js +6 -0
- package/dist/jinja-DFCUirAg.js +11 -0
- package/dist/jison-CTEI_s6O.js +8 -0
- package/dist/json-B5-prx4F.js +6 -0
- package/dist/json5-CZ8R1oUY.js +6 -0
- package/dist/jsonc-DMboCKBJ.js +6 -0
- package/dist/jsonl-YgIUi4Dg.js +6 -0
- package/dist/jsx-D4q4E1UD.js +6 -0
- package/dist/julia-2ubi2n9a.js +16 -0
- package/dist/just-CEK2SJ_k.js +4 -4
- package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
- package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
- package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
- package/dist/laserwave-B_2VVKNJ.js +4 -0
- package/dist/less-MoGo8xoS.js +6 -0
- package/dist/light-plus-IB4fPeJj.js +4 -0
- package/dist/liquid-CHzkx3jT.js +2 -2
- package/dist/lua-Bp3IRv7I.js +1 -1
- package/dist/main.js +691 -670
- package/dist/markdown-B-zRtm0x.js +6 -0
- package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
- package/dist/marko-BlmC3dqW.js +14 -0
- package/dist/marko-CJBA24Ri.js +2 -2
- package/dist/material-theme-CjsSdYF2.js +4 -0
- package/dist/material-theme-darker-DEk0vgdS.js +4 -0
- package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
- package/dist/material-theme-ocean-DK6jm24j.js +4 -0
- package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
- package/dist/mdc-C9YSUwVC.js +2 -2
- package/dist/mdc-CLNk3q28.js +12 -0
- package/dist/mdx-CiUWpBB_.js +6 -0
- package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +40 -38
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/min-dark-CJcHUHwu.js +4 -0
- package/dist/min-light-BAN2UR75.js +4 -0
- package/dist/monokai-BbXwpjKl.js +4 -0
- package/dist/night-owl-csViJ7u4.js +4 -0
- package/dist/night-owl-light-BC-NuMC3.js +4 -0
- package/dist/nim-QAjRdh9w.js +5 -5
- package/dist/nord-B8Sq-VQ0.js +4 -0
- package/dist/one-dark-pro-DTdrcl-J.js +4 -0
- package/dist/one-light-kPHTChCU.js +4 -0
- package/dist/owner-rKN292Q9.js +6 -0
- package/dist/perl-DkVrgJBg.js +3 -3
- package/dist/php-BIzsF_5x.js +4 -4
- package/dist/php-Kn-vgdBD.js +18 -0
- package/dist/plastic-DDweBgVs.js +4 -0
- package/dist/poimandres-Dqvs16BQ.js +4 -0
- package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
- package/dist/postcss-CwL8bLZI.js +6 -0
- package/dist/pug-CTOOvSEH.js +12 -0
- package/dist/pug-XOw9Q1Ho.js +1 -1
- package/dist/python-jjYlTiSH.js +6 -0
- package/dist/qml-rTNXsquU.js +1 -1
- package/dist/r-C8zl4zMO.js +6 -0
- package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
- package/dist/red-DBDwQkX-.js +4 -0
- package/dist/regexp-Dpy_RgoJ.js +6 -0
- package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
- package/dist/rose-pine-DGHrTu7e.js +4 -0
- package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
- package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
- package/dist/rst-DM32Wy3O.js +5 -5
- package/dist/ruby-BeqCs27h.js +8 -8
- package/dist/safePolygon-CJcmMc0u.js +389 -0
- package/dist/safeReact-DKq-628G.js +7 -0
- package/dist/sas-fpEvgATw.js +1 -1
- package/dist/sass-BmupNt-w.js +6 -0
- package/dist/scss-BZYVIVaN.js +8 -0
- package/dist/serializeValue-BebmSzW3.js +14 -0
- package/dist/shellscript-fMxXshxv.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +1 -1
- package/dist/slack-dark-noeC6QPl.js +4 -0
- package/dist/slack-ochin-3_2idqLR.js +4 -0
- package/dist/snazzy-light-B9cV359v.js +4 -0
- package/dist/solarized-dark-B6X0ILWr.js +4 -0
- package/dist/solarized-light-LxOemn3c.js +4 -0
- package/dist/sql-D30Zid36.js +6 -0
- package/dist/stata-B8c5fTjX.js +1 -1
- package/dist/styles-DU5BO7fS.js +16 -0
- package/dist/stylus-BoBcEBjx.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +1 -1
- package/dist/svelte-b9PAcyUe.js +14 -0
- package/dist/svelte-rYri41WT.js +3 -3
- package/dist/synthwave-84-DzQeMpV0.js +4 -0
- package/dist/templ-Crs9Ui8q.js +1 -1
- package/dist/tex-AHxmLTL0.js +1 -1
- package/dist/tokyo-night-CLM-V_Re.js +4 -0
- package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
- package/dist/ts-tags-CP1b-4Z2.js +41 -0
- package/dist/ts-tags-ioVe2PKw.js +5 -5
- package/dist/tsx-QNpb2qLW.js +6 -0
- package/dist/twig-DwV2Fi4L.js +2 -2
- package/dist/typescript-AhniRyfZ.js +6 -0
- package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
- package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
- package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
- package/dist/useButton-JYPKQKj4.js +150 -0
- package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
- package/dist/useCompositeItem-D00ALGkT.js +35 -0
- package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
- package/dist/useControlled-Sx-_x7Sz.js +32 -0
- package/dist/useFocus-Aj9ShMQu.js +97 -0
- package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
- package/dist/useLabelableId-DF_d91GP.js +44 -0
- package/dist/useOnFirstRender-B4aruaIA.js +9 -0
- package/dist/useOnMount-JHtE6teb.js +9 -0
- package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
- package/dist/useRender-BNXBkp2o.js +7 -0
- package/dist/useRenderElement-DNB2vtF1.js +274 -0
- package/dist/useRole-N-RCRzo1.js +76 -0
- package/dist/useStableCallback-CudqoENs.js +33 -0
- package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
- package/dist/useTimeout-DAqPwigF.js +33 -0
- package/dist/useValueAsRef-LhoZc6As.js +20 -0
- package/dist/useValueChanged-Bissqjjn.js +15 -0
- package/dist/valueToPercent-BBgE4D3L.js +27 -0
- package/dist/vesper-BmV7KiQ0.js +4 -0
- package/dist/visuallyHidden-PuyyGHVF.js +22 -0
- package/dist/vitesse-black-CxZz3C4s.js +4 -0
- package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
- package/dist/vitesse-light-BDJohtUr.js +4 -0
- package/dist/vue-CY6W2ID0.js +31 -0
- package/dist/vue-DXEmyXn9.js +3 -3
- package/dist/vue-html-DYXHAJ2G.js +8 -0
- package/dist/vue-vine-D41-N99t.js +4 -4
- package/dist/vue-vine-DiWTpMwZ.js +18 -0
- package/dist/wasm-3y0A1Y71.js +6 -0
- package/dist/wasm-Dm9SFfrx.js +7 -0
- package/dist/web-BbvN_Lei.js +2846 -0
- package/dist/wgsl-SXl3EZUN.js +6 -0
- package/dist/wit-Cw0CTVY0.js +6 -0
- package/dist/xml-CNXGTZ6Z.js +8 -0
- package/dist/xsl-BmSZphgC.js +1 -1
- package/dist/yaml-DZqZ2PBD.js +6 -0
- package/package.json +37 -34
- package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-437EL2iq.js +0 -52
- package/dist/index-B695uy69.js +0 -9
- package/dist/index-BEZCAdXQ.js +0 -1568
- package/dist/index-BGQepRFJ.js +0 -27
- package/dist/index-BZPx6jYI.js +0 -8
- package/dist/index-BaLuVb4t.js +0 -70
- package/dist/index-Bw62B28F.js +0 -31
- package/dist/index-By-GFSsC.js +0 -245
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-CCKe-Mpx.js +0 -6
- package/dist/index-Cv867SGx.js +0 -13
- package/dist/index-CvA4FcaC.js +0 -677
- package/dist/index-D2LZVjSn.js +0 -82
- package/dist/index-DFZozV_h.js +0 -68
- package/dist/index-DJQkmo5O.js +0 -49
- package/dist/index-DLohNuco.js +0 -36
- package/dist/index-DrFfdHac.js +0 -144
- package/dist/index-DrlYGDRT.js +0 -119
- package/dist/index-Dz8CQngS.js +0 -181
- package/dist/index-cd1ceFJg.js +0 -6973
- package/dist/index-rKs9bXHr.js +0 -6
- package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
- package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
- package/dist/web-BwFNdl01.js +0 -697
|
@@ -0,0 +1,2017 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as ae } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as ut, useState as de, useRef as F, useEffect as pe, useSyncExternalStore as ct, useMemo as dt, useId as ft, useContext as pt, useLayoutEffect as ht, useCallback as He, useImperativeHandle as Ve } from "react";
|
|
4
|
+
function gt(e, t) {
|
|
5
|
+
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
6
|
+
return t * o;
|
|
7
|
+
}
|
|
8
|
+
function vt(e, t) {
|
|
9
|
+
const n = getComputedStyle(e.ownerDocument.body), o = parseFloat(n.fontSize);
|
|
10
|
+
return t * o;
|
|
11
|
+
}
|
|
12
|
+
function mt(e) {
|
|
13
|
+
return e / 100 * window.innerHeight;
|
|
14
|
+
}
|
|
15
|
+
function bt(e) {
|
|
16
|
+
return e / 100 * window.innerWidth;
|
|
17
|
+
}
|
|
18
|
+
function yt(e) {
|
|
19
|
+
switch (typeof e) {
|
|
20
|
+
case "number":
|
|
21
|
+
return [e, "px"];
|
|
22
|
+
case "string": {
|
|
23
|
+
const t = parseFloat(e);
|
|
24
|
+
return e.endsWith("%") ? [t, "%"] : e.endsWith("px") ? [t, "px"] : e.endsWith("rem") ? [t, "rem"] : e.endsWith("em") ? [t, "em"] : e.endsWith("vh") ? [t, "vh"] : e.endsWith("vw") ? [t, "vw"] : [t, "%"];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function oe({
|
|
29
|
+
groupSize: e,
|
|
30
|
+
panelElement: t,
|
|
31
|
+
styleProp: n
|
|
32
|
+
}) {
|
|
33
|
+
let o;
|
|
34
|
+
const [r, i] = yt(n);
|
|
35
|
+
switch (i) {
|
|
36
|
+
case "%": {
|
|
37
|
+
o = r / 100 * e;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case "px": {
|
|
41
|
+
o = r;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
case "rem": {
|
|
45
|
+
o = vt(t, r);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case "em": {
|
|
49
|
+
o = gt(t, r);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case "vh": {
|
|
53
|
+
o = mt(r);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case "vw": {
|
|
57
|
+
o = bt(r);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return o;
|
|
62
|
+
}
|
|
63
|
+
function I(e) {
|
|
64
|
+
return parseFloat(e.toFixed(3));
|
|
65
|
+
}
|
|
66
|
+
function ee({
|
|
67
|
+
group: e
|
|
68
|
+
}) {
|
|
69
|
+
const { orientation: t, panels: n } = e;
|
|
70
|
+
return n.reduce((o, r) => (o += t === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o), 0);
|
|
71
|
+
}
|
|
72
|
+
function ve(e) {
|
|
73
|
+
const { panels: t } = e, n = ee({ group: e });
|
|
74
|
+
return n === 0 ? t.map((o) => ({
|
|
75
|
+
groupResizeBehavior: o.panelConstraints.groupResizeBehavior,
|
|
76
|
+
collapsedSize: 0,
|
|
77
|
+
collapsible: o.panelConstraints.collapsible === !0,
|
|
78
|
+
defaultSize: void 0,
|
|
79
|
+
disabled: o.panelConstraints.disabled,
|
|
80
|
+
minSize: 0,
|
|
81
|
+
maxSize: 100,
|
|
82
|
+
panelId: o.id
|
|
83
|
+
})) : t.map((o) => {
|
|
84
|
+
const { element: r, panelConstraints: i } = o;
|
|
85
|
+
let u = 0;
|
|
86
|
+
if (i.collapsedSize !== void 0) {
|
|
87
|
+
const l = oe({
|
|
88
|
+
groupSize: n,
|
|
89
|
+
panelElement: r,
|
|
90
|
+
styleProp: i.collapsedSize
|
|
91
|
+
});
|
|
92
|
+
u = I(l / n * 100);
|
|
93
|
+
}
|
|
94
|
+
let a;
|
|
95
|
+
if (i.defaultSize !== void 0) {
|
|
96
|
+
const l = oe({
|
|
97
|
+
groupSize: n,
|
|
98
|
+
panelElement: r,
|
|
99
|
+
styleProp: i.defaultSize
|
|
100
|
+
});
|
|
101
|
+
a = I(l / n * 100);
|
|
102
|
+
}
|
|
103
|
+
let s = 0;
|
|
104
|
+
if (i.minSize !== void 0) {
|
|
105
|
+
const l = oe({
|
|
106
|
+
groupSize: n,
|
|
107
|
+
panelElement: r,
|
|
108
|
+
styleProp: i.minSize
|
|
109
|
+
});
|
|
110
|
+
s = I(l / n * 100);
|
|
111
|
+
}
|
|
112
|
+
let c = 100;
|
|
113
|
+
if (i.maxSize !== void 0) {
|
|
114
|
+
const l = oe({
|
|
115
|
+
groupSize: n,
|
|
116
|
+
panelElement: r,
|
|
117
|
+
styleProp: i.maxSize
|
|
118
|
+
});
|
|
119
|
+
c = I(l / n * 100);
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
groupResizeBehavior: i.groupResizeBehavior,
|
|
123
|
+
collapsedSize: u,
|
|
124
|
+
collapsible: i.collapsible === !0,
|
|
125
|
+
defaultSize: a,
|
|
126
|
+
disabled: i.disabled,
|
|
127
|
+
minSize: s,
|
|
128
|
+
maxSize: c,
|
|
129
|
+
panelId: o.id
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function P(e, t = "Assertion error") {
|
|
134
|
+
if (!e)
|
|
135
|
+
throw Error(t);
|
|
136
|
+
}
|
|
137
|
+
function me(e, t) {
|
|
138
|
+
return Array.from(t).sort(
|
|
139
|
+
e === "horizontal" ? zt : St
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
function zt(e, t) {
|
|
143
|
+
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
144
|
+
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
145
|
+
}
|
|
146
|
+
function St(e, t) {
|
|
147
|
+
const n = e.element.offsetTop - t.element.offsetTop;
|
|
148
|
+
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
149
|
+
}
|
|
150
|
+
function Ye(e) {
|
|
151
|
+
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
152
|
+
}
|
|
153
|
+
function Xe(e, t) {
|
|
154
|
+
return {
|
|
155
|
+
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
156
|
+
Math.abs(e.x - t.left),
|
|
157
|
+
Math.abs(e.x - t.right)
|
|
158
|
+
),
|
|
159
|
+
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(
|
|
160
|
+
Math.abs(e.y - t.top),
|
|
161
|
+
Math.abs(e.y - t.bottom)
|
|
162
|
+
)
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function wt({
|
|
166
|
+
orientation: e,
|
|
167
|
+
rects: t,
|
|
168
|
+
targetRect: n
|
|
169
|
+
}) {
|
|
170
|
+
const o = {
|
|
171
|
+
x: n.x + n.width / 2,
|
|
172
|
+
y: n.y + n.height / 2
|
|
173
|
+
};
|
|
174
|
+
let r, i = Number.MAX_VALUE;
|
|
175
|
+
for (const u of t) {
|
|
176
|
+
const { x: a, y: s } = Xe(o, u), c = e === "horizontal" ? a : s;
|
|
177
|
+
c < i && (i = c, r = u);
|
|
178
|
+
}
|
|
179
|
+
return P(r, "No rect found"), r;
|
|
180
|
+
}
|
|
181
|
+
let ue;
|
|
182
|
+
function xt() {
|
|
183
|
+
return ue === void 0 && (typeof matchMedia == "function" ? ue = !!matchMedia("(pointer:coarse)").matches : ue = !1), ue;
|
|
184
|
+
}
|
|
185
|
+
function Ue(e) {
|
|
186
|
+
const { element: t, orientation: n, panels: o, separators: r } = e, i = me(
|
|
187
|
+
n,
|
|
188
|
+
Array.from(t.children).filter(Ye).map((m) => ({ element: m }))
|
|
189
|
+
).map(({ element: m }) => m), u = [];
|
|
190
|
+
let a = !1, s = !1, c = -1, l = -1, v = 0, f, w = [];
|
|
191
|
+
{
|
|
192
|
+
let m = -1;
|
|
193
|
+
for (const d of i)
|
|
194
|
+
d.hasAttribute("data-panel") && (m++, d.hasAttribute("data-disabled") || (v++, c === -1 && (c = m), l = m));
|
|
195
|
+
}
|
|
196
|
+
if (v > 1) {
|
|
197
|
+
let m = -1;
|
|
198
|
+
for (const d of i)
|
|
199
|
+
if (d.hasAttribute("data-panel")) {
|
|
200
|
+
m++;
|
|
201
|
+
const g = o.find(
|
|
202
|
+
(p) => p.element === d
|
|
203
|
+
);
|
|
204
|
+
if (g) {
|
|
205
|
+
if (f) {
|
|
206
|
+
const p = f.element.getBoundingClientRect(), z = d.getBoundingClientRect();
|
|
207
|
+
let y;
|
|
208
|
+
if (s) {
|
|
209
|
+
const b = n === "horizontal" ? new DOMRect(
|
|
210
|
+
p.right,
|
|
211
|
+
p.top,
|
|
212
|
+
0,
|
|
213
|
+
p.height
|
|
214
|
+
) : new DOMRect(
|
|
215
|
+
p.left,
|
|
216
|
+
p.bottom,
|
|
217
|
+
p.width,
|
|
218
|
+
0
|
|
219
|
+
), h = n === "horizontal" ? new DOMRect(z.left, z.top, 0, z.height) : new DOMRect(z.left, z.top, z.width, 0);
|
|
220
|
+
switch (w.length) {
|
|
221
|
+
case 0: {
|
|
222
|
+
y = [
|
|
223
|
+
b,
|
|
224
|
+
h
|
|
225
|
+
];
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
case 1: {
|
|
229
|
+
const L = w[0], k = wt({
|
|
230
|
+
orientation: n,
|
|
231
|
+
rects: [p, z],
|
|
232
|
+
targetRect: L.element.getBoundingClientRect()
|
|
233
|
+
});
|
|
234
|
+
y = [
|
|
235
|
+
L,
|
|
236
|
+
k === p ? h : b
|
|
237
|
+
];
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
default: {
|
|
241
|
+
y = w;
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} else
|
|
246
|
+
w.length ? y = w : y = [
|
|
247
|
+
n === "horizontal" ? new DOMRect(
|
|
248
|
+
p.right,
|
|
249
|
+
z.top,
|
|
250
|
+
z.left - p.right,
|
|
251
|
+
z.height
|
|
252
|
+
) : new DOMRect(
|
|
253
|
+
z.left,
|
|
254
|
+
p.bottom,
|
|
255
|
+
z.width,
|
|
256
|
+
z.top - p.bottom
|
|
257
|
+
)
|
|
258
|
+
];
|
|
259
|
+
for (const b of y) {
|
|
260
|
+
let h = "width" in b ? b : b.element.getBoundingClientRect();
|
|
261
|
+
const L = xt() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
262
|
+
if (h.width < L) {
|
|
263
|
+
const E = L - h.width;
|
|
264
|
+
h = new DOMRect(
|
|
265
|
+
h.x - E / 2,
|
|
266
|
+
h.y,
|
|
267
|
+
h.width + E,
|
|
268
|
+
h.height
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
if (h.height < L) {
|
|
272
|
+
const E = L - h.height;
|
|
273
|
+
h = new DOMRect(
|
|
274
|
+
h.x,
|
|
275
|
+
h.y - E / 2,
|
|
276
|
+
h.width,
|
|
277
|
+
h.height + E
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
const k = m <= c || m > l;
|
|
281
|
+
!a && !k && u.push({
|
|
282
|
+
group: e,
|
|
283
|
+
groupSize: ee({ group: e }),
|
|
284
|
+
panels: [f, g],
|
|
285
|
+
separator: "width" in b ? void 0 : b,
|
|
286
|
+
rect: h
|
|
287
|
+
}), a = !1;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
s = !1, f = g, w = [];
|
|
291
|
+
}
|
|
292
|
+
} else if (d.hasAttribute("data-separator")) {
|
|
293
|
+
d.ariaDisabled !== null && (a = !0);
|
|
294
|
+
const g = r.find(
|
|
295
|
+
(p) => p.element === d
|
|
296
|
+
);
|
|
297
|
+
g ? w.push(g) : (f = void 0, w = []);
|
|
298
|
+
} else
|
|
299
|
+
s = !0;
|
|
300
|
+
}
|
|
301
|
+
return u;
|
|
302
|
+
}
|
|
303
|
+
class qe {
|
|
304
|
+
#e = {};
|
|
305
|
+
addListener(t, n) {
|
|
306
|
+
const o = this.#e[t];
|
|
307
|
+
return o === void 0 ? this.#e[t] = [n] : o.includes(n) || o.push(n), () => {
|
|
308
|
+
this.removeListener(t, n);
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
emit(t, n) {
|
|
312
|
+
const o = this.#e[t];
|
|
313
|
+
if (o !== void 0)
|
|
314
|
+
if (o.length === 1)
|
|
315
|
+
o[0].call(null, n);
|
|
316
|
+
else {
|
|
317
|
+
let r = !1, i = null;
|
|
318
|
+
const u = Array.from(o);
|
|
319
|
+
for (let a = 0; a < u.length; a++) {
|
|
320
|
+
const s = u[a];
|
|
321
|
+
try {
|
|
322
|
+
s.call(null, n);
|
|
323
|
+
} catch (c) {
|
|
324
|
+
i === null && (r = !0, i = c);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (r)
|
|
328
|
+
throw i;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
removeAllListeners() {
|
|
332
|
+
this.#e = {};
|
|
333
|
+
}
|
|
334
|
+
removeListener(t, n) {
|
|
335
|
+
const o = this.#e[t];
|
|
336
|
+
if (o !== void 0) {
|
|
337
|
+
const r = o.indexOf(n);
|
|
338
|
+
r >= 0 && o.splice(r, 1);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
let A = /* @__PURE__ */ new Map();
|
|
343
|
+
const Je = new qe();
|
|
344
|
+
function Ct(e) {
|
|
345
|
+
A = new Map(A), A.delete(e);
|
|
346
|
+
}
|
|
347
|
+
function ke(e, t) {
|
|
348
|
+
for (const [n] of A)
|
|
349
|
+
if (n.id === e)
|
|
350
|
+
return n;
|
|
351
|
+
}
|
|
352
|
+
function W(e, t) {
|
|
353
|
+
for (const [n, o] of A)
|
|
354
|
+
if (n.id === e)
|
|
355
|
+
return o;
|
|
356
|
+
if (t)
|
|
357
|
+
throw Error(`Could not find data for Group with id ${e}`);
|
|
358
|
+
}
|
|
359
|
+
function U() {
|
|
360
|
+
return A;
|
|
361
|
+
}
|
|
362
|
+
function be(e, t) {
|
|
363
|
+
return Je.addListener("groupChange", (n) => {
|
|
364
|
+
n.group.id === e && t(n);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function j(e, t) {
|
|
368
|
+
const n = A.get(e);
|
|
369
|
+
A = new Map(A), A.set(e, t), Je.emit("groupChange", {
|
|
370
|
+
group: e,
|
|
371
|
+
prev: n,
|
|
372
|
+
next: t
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function Pt(e, t, n) {
|
|
376
|
+
let o, r = {
|
|
377
|
+
x: 1 / 0,
|
|
378
|
+
y: 1 / 0
|
|
379
|
+
};
|
|
380
|
+
for (const i of t) {
|
|
381
|
+
const u = Xe(n, i.rect);
|
|
382
|
+
switch (e) {
|
|
383
|
+
case "horizontal": {
|
|
384
|
+
u.x <= r.x && (o = i, r = u);
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
case "vertical": {
|
|
388
|
+
u.y <= r.y && (o = i, r = u);
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return o ? {
|
|
394
|
+
distance: r,
|
|
395
|
+
hitRegion: o
|
|
396
|
+
} : void 0;
|
|
397
|
+
}
|
|
398
|
+
function Lt(e) {
|
|
399
|
+
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
400
|
+
}
|
|
401
|
+
function kt(e, t) {
|
|
402
|
+
if (e === t) throw new Error("Cannot compare node with itself");
|
|
403
|
+
const n = {
|
|
404
|
+
a: Re(e),
|
|
405
|
+
b: Re(t)
|
|
406
|
+
};
|
|
407
|
+
let o;
|
|
408
|
+
for (; n.a.at(-1) === n.b.at(-1); )
|
|
409
|
+
o = n.a.pop(), n.b.pop();
|
|
410
|
+
P(
|
|
411
|
+
o,
|
|
412
|
+
"Stacking order can only be calculated for elements with a common ancestor"
|
|
413
|
+
);
|
|
414
|
+
const r = {
|
|
415
|
+
a: Ee(Me(n.a)),
|
|
416
|
+
b: Ee(Me(n.b))
|
|
417
|
+
};
|
|
418
|
+
if (r.a === r.b) {
|
|
419
|
+
const i = o.childNodes, u = {
|
|
420
|
+
a: n.a.at(-1),
|
|
421
|
+
b: n.b.at(-1)
|
|
422
|
+
};
|
|
423
|
+
let a = i.length;
|
|
424
|
+
for (; a--; ) {
|
|
425
|
+
const s = i[a];
|
|
426
|
+
if (s === u.a) return 1;
|
|
427
|
+
if (s === u.b) return -1;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return Math.sign(r.a - r.b);
|
|
431
|
+
}
|
|
432
|
+
const Mt = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
433
|
+
function Et(e) {
|
|
434
|
+
const t = getComputedStyle(Qe(e) ?? e).display;
|
|
435
|
+
return t === "flex" || t === "inline-flex";
|
|
436
|
+
}
|
|
437
|
+
function Rt(e) {
|
|
438
|
+
const t = getComputedStyle(e);
|
|
439
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Et(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || Mt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
440
|
+
}
|
|
441
|
+
function Me(e) {
|
|
442
|
+
let t = e.length;
|
|
443
|
+
for (; t--; ) {
|
|
444
|
+
const n = e[t];
|
|
445
|
+
if (P(n, "Missing node"), Rt(n)) return n;
|
|
446
|
+
}
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
function Ee(e) {
|
|
450
|
+
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
451
|
+
}
|
|
452
|
+
function Re(e) {
|
|
453
|
+
const t = [];
|
|
454
|
+
for (; e; )
|
|
455
|
+
t.push(e), e = Qe(e);
|
|
456
|
+
return t;
|
|
457
|
+
}
|
|
458
|
+
function Qe(e) {
|
|
459
|
+
const { parentNode: t } = e;
|
|
460
|
+
return Lt(t) ? t.host : t;
|
|
461
|
+
}
|
|
462
|
+
function Dt(e, t) {
|
|
463
|
+
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
464
|
+
}
|
|
465
|
+
function It({
|
|
466
|
+
groupElement: e,
|
|
467
|
+
hitRegion: t,
|
|
468
|
+
pointerEventTarget: n
|
|
469
|
+
}) {
|
|
470
|
+
if (!Ye(n) || n.contains(e) || e.contains(n))
|
|
471
|
+
return !0;
|
|
472
|
+
if (kt(n, e) > 0) {
|
|
473
|
+
let o = n;
|
|
474
|
+
for (; o; ) {
|
|
475
|
+
if (o.contains(e))
|
|
476
|
+
return !0;
|
|
477
|
+
if (Dt(o.getBoundingClientRect(), t))
|
|
478
|
+
return !1;
|
|
479
|
+
o = o.parentElement;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
return !0;
|
|
483
|
+
}
|
|
484
|
+
function ye(e, t) {
|
|
485
|
+
const n = [];
|
|
486
|
+
return t.forEach((o, r) => {
|
|
487
|
+
if (r.disabled)
|
|
488
|
+
return;
|
|
489
|
+
const i = Ue(r), u = Pt(r.orientation, i, {
|
|
490
|
+
x: e.clientX,
|
|
491
|
+
y: e.clientY
|
|
492
|
+
});
|
|
493
|
+
u && u.distance.x <= 0 && u.distance.y <= 0 && It({
|
|
494
|
+
groupElement: r.element,
|
|
495
|
+
hitRegion: u.hitRegion.rect,
|
|
496
|
+
pointerEventTarget: e.target
|
|
497
|
+
}) && n.push(u.hitRegion);
|
|
498
|
+
}), n;
|
|
499
|
+
}
|
|
500
|
+
function Tt(e, t) {
|
|
501
|
+
if (e.length !== t.length)
|
|
502
|
+
return !1;
|
|
503
|
+
for (let n = 0; n < e.length; n++)
|
|
504
|
+
if (e[n] != t[n])
|
|
505
|
+
return !1;
|
|
506
|
+
return !0;
|
|
507
|
+
}
|
|
508
|
+
function D(e, t, n = 0) {
|
|
509
|
+
return Math.abs(I(e) - I(t)) <= n;
|
|
510
|
+
}
|
|
511
|
+
function O(e, t) {
|
|
512
|
+
return D(e, t) ? 0 : e > t ? 1 : -1;
|
|
513
|
+
}
|
|
514
|
+
function Z({
|
|
515
|
+
overrideDisabledPanels: e,
|
|
516
|
+
panelConstraints: t,
|
|
517
|
+
prevSize: n,
|
|
518
|
+
size: o
|
|
519
|
+
}) {
|
|
520
|
+
const {
|
|
521
|
+
collapsedSize: r = 0,
|
|
522
|
+
collapsible: i,
|
|
523
|
+
disabled: u,
|
|
524
|
+
maxSize: a = 100,
|
|
525
|
+
minSize: s = 0
|
|
526
|
+
} = t;
|
|
527
|
+
if (u && !e)
|
|
528
|
+
return n;
|
|
529
|
+
if (O(o, s) < 0)
|
|
530
|
+
if (i) {
|
|
531
|
+
const c = (r + s) / 2;
|
|
532
|
+
O(o, c) < 0 ? o = r : o = s;
|
|
533
|
+
} else
|
|
534
|
+
o = s;
|
|
535
|
+
return o = Math.min(a, o), o = I(o), o;
|
|
536
|
+
}
|
|
537
|
+
function ie({
|
|
538
|
+
delta: e,
|
|
539
|
+
initialLayout: t,
|
|
540
|
+
panelConstraints: n,
|
|
541
|
+
pivotIndices: o,
|
|
542
|
+
prevLayout: r,
|
|
543
|
+
trigger: i
|
|
544
|
+
}) {
|
|
545
|
+
if (D(e, 0))
|
|
546
|
+
return t;
|
|
547
|
+
const u = i === "imperative-api", a = Object.values(t), s = Object.values(r), c = [...a], [l, v] = o;
|
|
548
|
+
P(l != null, "Invalid first pivot index"), P(v != null, "Invalid second pivot index");
|
|
549
|
+
let f = 0;
|
|
550
|
+
switch (i) {
|
|
551
|
+
case "keyboard": {
|
|
552
|
+
{
|
|
553
|
+
const d = e < 0 ? v : l, g = n[d];
|
|
554
|
+
P(
|
|
555
|
+
g,
|
|
556
|
+
`Panel constraints not found for index ${d}`
|
|
557
|
+
);
|
|
558
|
+
const {
|
|
559
|
+
collapsedSize: p = 0,
|
|
560
|
+
collapsible: z,
|
|
561
|
+
minSize: y = 0
|
|
562
|
+
} = g;
|
|
563
|
+
if (z) {
|
|
564
|
+
const b = a[d];
|
|
565
|
+
if (P(
|
|
566
|
+
b != null,
|
|
567
|
+
`Previous layout not found for panel index ${d}`
|
|
568
|
+
), D(b, p)) {
|
|
569
|
+
const h = y - b;
|
|
570
|
+
O(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
{
|
|
575
|
+
const d = e < 0 ? l : v, g = n[d];
|
|
576
|
+
P(
|
|
577
|
+
g,
|
|
578
|
+
`No panel constraints found for index ${d}`
|
|
579
|
+
);
|
|
580
|
+
const {
|
|
581
|
+
collapsedSize: p = 0,
|
|
582
|
+
collapsible: z,
|
|
583
|
+
minSize: y = 0
|
|
584
|
+
} = g;
|
|
585
|
+
if (z) {
|
|
586
|
+
const b = a[d];
|
|
587
|
+
if (P(
|
|
588
|
+
b != null,
|
|
589
|
+
`Previous layout not found for panel index ${d}`
|
|
590
|
+
), D(b, y)) {
|
|
591
|
+
const h = b - p;
|
|
592
|
+
O(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
default: {
|
|
599
|
+
const d = e < 0 ? v : l, g = n[d];
|
|
600
|
+
P(
|
|
601
|
+
g,
|
|
602
|
+
`Panel constraints not found for index ${d}`
|
|
603
|
+
);
|
|
604
|
+
const p = a[d], { collapsible: z, collapsedSize: y, minSize: b } = g;
|
|
605
|
+
if (z && O(p, b) < 0)
|
|
606
|
+
if (e > 0) {
|
|
607
|
+
const h = b - y, L = h / 2, k = p + e;
|
|
608
|
+
O(k, b) < 0 && (e = O(e, L) <= 0 ? 0 : h);
|
|
609
|
+
} else {
|
|
610
|
+
const h = b - y, L = 100 - h / 2, k = p - e;
|
|
611
|
+
O(k, b) < 0 && (e = O(100 + e, L) > 0 ? 0 : -h);
|
|
612
|
+
}
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
{
|
|
617
|
+
const d = e < 0 ? 1 : -1;
|
|
618
|
+
let g = e < 0 ? v : l, p = 0;
|
|
619
|
+
for (; ; ) {
|
|
620
|
+
const y = a[g];
|
|
621
|
+
P(
|
|
622
|
+
y != null,
|
|
623
|
+
`Previous layout not found for panel index ${g}`
|
|
624
|
+
);
|
|
625
|
+
const b = Z({
|
|
626
|
+
overrideDisabledPanels: u,
|
|
627
|
+
panelConstraints: n[g],
|
|
628
|
+
prevSize: y,
|
|
629
|
+
size: 100
|
|
630
|
+
}) - y;
|
|
631
|
+
if (p += b, g += d, g < 0 || g >= n.length)
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
const z = Math.min(Math.abs(e), Math.abs(p));
|
|
635
|
+
e = e < 0 ? 0 - z : z;
|
|
636
|
+
}
|
|
637
|
+
{
|
|
638
|
+
let d = e < 0 ? l : v;
|
|
639
|
+
for (; d >= 0 && d < n.length; ) {
|
|
640
|
+
const g = Math.abs(e) - Math.abs(f), p = a[d];
|
|
641
|
+
P(
|
|
642
|
+
p != null,
|
|
643
|
+
`Previous layout not found for panel index ${d}`
|
|
644
|
+
);
|
|
645
|
+
const z = p - g, y = Z({
|
|
646
|
+
overrideDisabledPanels: u,
|
|
647
|
+
panelConstraints: n[d],
|
|
648
|
+
prevSize: p,
|
|
649
|
+
size: z
|
|
650
|
+
});
|
|
651
|
+
if (!D(p, y) && (f += p - y, c[d] = y, f.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
652
|
+
numeric: !0
|
|
653
|
+
}) >= 0))
|
|
654
|
+
break;
|
|
655
|
+
e < 0 ? d-- : d++;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
if (Tt(s, c))
|
|
659
|
+
return r;
|
|
660
|
+
{
|
|
661
|
+
const d = e < 0 ? v : l, g = a[d];
|
|
662
|
+
P(
|
|
663
|
+
g != null,
|
|
664
|
+
`Previous layout not found for panel index ${d}`
|
|
665
|
+
);
|
|
666
|
+
const p = g + f, z = Z({
|
|
667
|
+
overrideDisabledPanels: u,
|
|
668
|
+
panelConstraints: n[d],
|
|
669
|
+
prevSize: g,
|
|
670
|
+
size: p
|
|
671
|
+
});
|
|
672
|
+
if (c[d] = z, !D(z, p)) {
|
|
673
|
+
let y = p - z, b = e < 0 ? v : l;
|
|
674
|
+
for (; b >= 0 && b < n.length; ) {
|
|
675
|
+
const h = c[b];
|
|
676
|
+
P(
|
|
677
|
+
h != null,
|
|
678
|
+
`Previous layout not found for panel index ${b}`
|
|
679
|
+
);
|
|
680
|
+
const L = h + y, k = Z({
|
|
681
|
+
overrideDisabledPanels: u,
|
|
682
|
+
panelConstraints: n[b],
|
|
683
|
+
prevSize: h,
|
|
684
|
+
size: L
|
|
685
|
+
});
|
|
686
|
+
if (D(h, k) || (y -= k - h, c[b] = k), D(y, 0))
|
|
687
|
+
break;
|
|
688
|
+
e > 0 ? b-- : b++;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
const w = Object.values(c).reduce(
|
|
693
|
+
(d, g) => g + d,
|
|
694
|
+
0
|
|
695
|
+
);
|
|
696
|
+
if (!D(w, 100, 0.1))
|
|
697
|
+
return r;
|
|
698
|
+
const m = Object.keys(r);
|
|
699
|
+
return c.reduce((d, g, p) => (d[m[p]] = g, d), {});
|
|
700
|
+
}
|
|
701
|
+
function V(e, t) {
|
|
702
|
+
if (Object.keys(e).length !== Object.keys(t).length)
|
|
703
|
+
return !1;
|
|
704
|
+
for (const n in e)
|
|
705
|
+
if (t[n] === void 0 || O(e[n], t[n]) !== 0)
|
|
706
|
+
return !1;
|
|
707
|
+
return !0;
|
|
708
|
+
}
|
|
709
|
+
function Y({
|
|
710
|
+
layout: e,
|
|
711
|
+
panelConstraints: t
|
|
712
|
+
}) {
|
|
713
|
+
const n = Object.values(e), o = [...n], r = o.reduce(
|
|
714
|
+
(a, s) => a + s,
|
|
715
|
+
0
|
|
716
|
+
);
|
|
717
|
+
if (o.length !== t.length)
|
|
718
|
+
throw Error(
|
|
719
|
+
`Invalid ${t.length} panel layout: ${o.map((a) => `${a}%`).join(", ")}`
|
|
720
|
+
);
|
|
721
|
+
if (!D(r, 100) && o.length > 0)
|
|
722
|
+
for (let a = 0; a < t.length; a++) {
|
|
723
|
+
const s = o[a];
|
|
724
|
+
P(s != null, `No layout data found for index ${a}`);
|
|
725
|
+
const c = 100 / r * s;
|
|
726
|
+
o[a] = c;
|
|
727
|
+
}
|
|
728
|
+
let i = 0;
|
|
729
|
+
for (let a = 0; a < t.length; a++) {
|
|
730
|
+
const s = n[a];
|
|
731
|
+
P(s != null, `No layout data found for index ${a}`);
|
|
732
|
+
const c = o[a];
|
|
733
|
+
P(c != null, `No layout data found for index ${a}`);
|
|
734
|
+
const l = Z({
|
|
735
|
+
overrideDisabledPanels: !0,
|
|
736
|
+
panelConstraints: t[a],
|
|
737
|
+
prevSize: s,
|
|
738
|
+
size: c
|
|
739
|
+
});
|
|
740
|
+
c != l && (i += c - l, o[a] = l);
|
|
741
|
+
}
|
|
742
|
+
if (!D(i, 0))
|
|
743
|
+
for (let a = 0; a < t.length; a++) {
|
|
744
|
+
const s = o[a];
|
|
745
|
+
P(s != null, `No layout data found for index ${a}`);
|
|
746
|
+
const c = s + i, l = Z({
|
|
747
|
+
overrideDisabledPanels: !0,
|
|
748
|
+
panelConstraints: t[a],
|
|
749
|
+
prevSize: s,
|
|
750
|
+
size: c
|
|
751
|
+
});
|
|
752
|
+
if (s !== l && (i -= l - s, o[a] = l, D(i, 0)))
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
const u = Object.keys(e);
|
|
756
|
+
return o.reduce((a, s, c) => (a[u[c]] = s, a), {});
|
|
757
|
+
}
|
|
758
|
+
function Ze({
|
|
759
|
+
groupId: e,
|
|
760
|
+
panelId: t
|
|
761
|
+
}) {
|
|
762
|
+
const n = () => {
|
|
763
|
+
const a = U();
|
|
764
|
+
for (const [
|
|
765
|
+
s,
|
|
766
|
+
{
|
|
767
|
+
defaultLayoutDeferred: c,
|
|
768
|
+
derivedPanelConstraints: l,
|
|
769
|
+
layout: v,
|
|
770
|
+
groupSize: f,
|
|
771
|
+
separatorToPanels: w
|
|
772
|
+
}
|
|
773
|
+
] of a)
|
|
774
|
+
if (s.id === e)
|
|
775
|
+
return {
|
|
776
|
+
defaultLayoutDeferred: c,
|
|
777
|
+
derivedPanelConstraints: l,
|
|
778
|
+
group: s,
|
|
779
|
+
groupSize: f,
|
|
780
|
+
layout: v,
|
|
781
|
+
separatorToPanels: w
|
|
782
|
+
};
|
|
783
|
+
throw Error(`Group ${e} not found`);
|
|
784
|
+
}, o = () => {
|
|
785
|
+
const a = n().derivedPanelConstraints.find(
|
|
786
|
+
(s) => s.panelId === t
|
|
787
|
+
);
|
|
788
|
+
if (a !== void 0)
|
|
789
|
+
return a;
|
|
790
|
+
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
791
|
+
}, r = () => {
|
|
792
|
+
const a = n().group.panels.find((s) => s.id === t);
|
|
793
|
+
if (a !== void 0)
|
|
794
|
+
return a;
|
|
795
|
+
throw Error(`Layout not found for Panel ${t}`);
|
|
796
|
+
}, i = () => {
|
|
797
|
+
const a = n().layout[t];
|
|
798
|
+
if (a !== void 0)
|
|
799
|
+
return a;
|
|
800
|
+
throw Error(`Layout not found for Panel ${t}`);
|
|
801
|
+
}, u = (a) => {
|
|
802
|
+
const s = i();
|
|
803
|
+
if (a === s)
|
|
804
|
+
return;
|
|
805
|
+
const {
|
|
806
|
+
defaultLayoutDeferred: c,
|
|
807
|
+
derivedPanelConstraints: l,
|
|
808
|
+
group: v,
|
|
809
|
+
groupSize: f,
|
|
810
|
+
layout: w,
|
|
811
|
+
separatorToPanels: m
|
|
812
|
+
} = n(), d = v.panels.findIndex((y) => y.id === t), g = d === v.panels.length - 1, p = ie({
|
|
813
|
+
delta: g ? s - a : a - s,
|
|
814
|
+
initialLayout: w,
|
|
815
|
+
panelConstraints: l,
|
|
816
|
+
pivotIndices: g ? [d - 1, d] : [d, d + 1],
|
|
817
|
+
prevLayout: w,
|
|
818
|
+
trigger: "imperative-api"
|
|
819
|
+
}), z = Y({
|
|
820
|
+
layout: p,
|
|
821
|
+
panelConstraints: l
|
|
822
|
+
});
|
|
823
|
+
V(w, z) || j(v, {
|
|
824
|
+
defaultLayoutDeferred: c,
|
|
825
|
+
derivedPanelConstraints: l,
|
|
826
|
+
groupSize: f,
|
|
827
|
+
layout: z,
|
|
828
|
+
separatorToPanels: m
|
|
829
|
+
});
|
|
830
|
+
};
|
|
831
|
+
return {
|
|
832
|
+
collapse: () => {
|
|
833
|
+
const { collapsible: a, collapsedSize: s } = o(), { mutableValues: c } = r(), l = i();
|
|
834
|
+
a && l !== s && (c.expandToSize = l, u(s));
|
|
835
|
+
},
|
|
836
|
+
expand: () => {
|
|
837
|
+
const { collapsible: a, collapsedSize: s, minSize: c } = o(), { mutableValues: l } = r(), v = i();
|
|
838
|
+
if (a && v === s) {
|
|
839
|
+
let f = l.expandToSize ?? c;
|
|
840
|
+
f === 0 && (f = 1), u(f);
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
getSize: () => {
|
|
844
|
+
const { group: a } = n(), s = i(), { element: c } = r(), l = a.orientation === "horizontal" ? c.offsetWidth : c.offsetHeight;
|
|
845
|
+
return {
|
|
846
|
+
asPercentage: s,
|
|
847
|
+
inPixels: l
|
|
848
|
+
};
|
|
849
|
+
},
|
|
850
|
+
isCollapsed: () => {
|
|
851
|
+
const { collapsible: a, collapsedSize: s } = o(), c = i();
|
|
852
|
+
return a && D(s, c);
|
|
853
|
+
},
|
|
854
|
+
resize: (a) => {
|
|
855
|
+
const { group: s } = n(), { element: c } = r(), l = ee({ group: s }), v = oe({
|
|
856
|
+
groupSize: l,
|
|
857
|
+
panelElement: c,
|
|
858
|
+
styleProp: a
|
|
859
|
+
}), f = I(v / l * 100);
|
|
860
|
+
u(f);
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
function De(e) {
|
|
865
|
+
if (e.defaultPrevented)
|
|
866
|
+
return;
|
|
867
|
+
const t = U();
|
|
868
|
+
ye(e, t).forEach((n) => {
|
|
869
|
+
if (n.separator && !n.separator.disableDoubleClick) {
|
|
870
|
+
const o = n.panels.find(
|
|
871
|
+
(r) => r.panelConstraints.defaultSize !== void 0
|
|
872
|
+
);
|
|
873
|
+
if (o) {
|
|
874
|
+
const r = o.panelConstraints.defaultSize, i = Ze({
|
|
875
|
+
groupId: n.group.id,
|
|
876
|
+
panelId: o.id
|
|
877
|
+
});
|
|
878
|
+
i && r !== void 0 && (i.resize(r), e.preventDefault());
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
function fe(e) {
|
|
884
|
+
const t = U();
|
|
885
|
+
for (const [n] of t)
|
|
886
|
+
if (n.separators.some(
|
|
887
|
+
(o) => o.element === e
|
|
888
|
+
))
|
|
889
|
+
return n;
|
|
890
|
+
throw Error("Could not find parent Group for separator element");
|
|
891
|
+
}
|
|
892
|
+
function Ke({
|
|
893
|
+
groupId: e
|
|
894
|
+
}) {
|
|
895
|
+
const t = () => {
|
|
896
|
+
const n = U();
|
|
897
|
+
for (const [o, r] of n)
|
|
898
|
+
if (o.id === e)
|
|
899
|
+
return { group: o, ...r };
|
|
900
|
+
throw Error(`Could not find Group with id "${e}"`);
|
|
901
|
+
};
|
|
902
|
+
return {
|
|
903
|
+
getLayout() {
|
|
904
|
+
const { defaultLayoutDeferred: n, layout: o } = t();
|
|
905
|
+
return n ? {} : o;
|
|
906
|
+
},
|
|
907
|
+
setLayout(n) {
|
|
908
|
+
const {
|
|
909
|
+
defaultLayoutDeferred: o,
|
|
910
|
+
derivedPanelConstraints: r,
|
|
911
|
+
group: i,
|
|
912
|
+
groupSize: u,
|
|
913
|
+
layout: a,
|
|
914
|
+
separatorToPanels: s
|
|
915
|
+
} = t(), c = Y({
|
|
916
|
+
layout: n,
|
|
917
|
+
panelConstraints: r
|
|
918
|
+
});
|
|
919
|
+
return o ? a : (V(a, c) || j(i, {
|
|
920
|
+
defaultLayoutDeferred: o,
|
|
921
|
+
derivedPanelConstraints: r,
|
|
922
|
+
groupSize: u,
|
|
923
|
+
layout: c,
|
|
924
|
+
separatorToPanels: s
|
|
925
|
+
}), c);
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
function H(e, t) {
|
|
930
|
+
const n = fe(e), o = W(n.id, !0), r = n.separators.find(
|
|
931
|
+
(l) => l.element === e
|
|
932
|
+
);
|
|
933
|
+
P(r, "Matching separator not found");
|
|
934
|
+
const i = o.separatorToPanels.get(r);
|
|
935
|
+
P(i, "Matching panels not found");
|
|
936
|
+
const u = i.map((l) => n.panels.indexOf(l)), a = Ke({ groupId: n.id }).getLayout(), s = ie({
|
|
937
|
+
delta: t,
|
|
938
|
+
initialLayout: a,
|
|
939
|
+
panelConstraints: o.derivedPanelConstraints,
|
|
940
|
+
pivotIndices: u,
|
|
941
|
+
prevLayout: a,
|
|
942
|
+
trigger: "keyboard"
|
|
943
|
+
}), c = Y({
|
|
944
|
+
layout: s,
|
|
945
|
+
panelConstraints: o.derivedPanelConstraints
|
|
946
|
+
});
|
|
947
|
+
V(a, c) || j(n, {
|
|
948
|
+
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
949
|
+
derivedPanelConstraints: o.derivedPanelConstraints,
|
|
950
|
+
groupSize: o.groupSize,
|
|
951
|
+
layout: c,
|
|
952
|
+
separatorToPanels: o.separatorToPanels
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
function Ie(e) {
|
|
956
|
+
if (e.defaultPrevented)
|
|
957
|
+
return;
|
|
958
|
+
const t = e.currentTarget, n = fe(t);
|
|
959
|
+
if (!n.disabled)
|
|
960
|
+
switch (e.key) {
|
|
961
|
+
case "ArrowDown": {
|
|
962
|
+
e.preventDefault(), n.orientation === "vertical" && H(t, 5);
|
|
963
|
+
break;
|
|
964
|
+
}
|
|
965
|
+
case "ArrowLeft": {
|
|
966
|
+
e.preventDefault(), n.orientation === "horizontal" && H(t, -5);
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
case "ArrowRight": {
|
|
970
|
+
e.preventDefault(), n.orientation === "horizontal" && H(t, 5);
|
|
971
|
+
break;
|
|
972
|
+
}
|
|
973
|
+
case "ArrowUp": {
|
|
974
|
+
e.preventDefault(), n.orientation === "vertical" && H(t, -5);
|
|
975
|
+
break;
|
|
976
|
+
}
|
|
977
|
+
case "End": {
|
|
978
|
+
e.preventDefault(), H(t, 100);
|
|
979
|
+
break;
|
|
980
|
+
}
|
|
981
|
+
case "Enter": {
|
|
982
|
+
e.preventDefault();
|
|
983
|
+
const o = fe(t), r = W(o.id, !0), { derivedPanelConstraints: i, layout: u, separatorToPanels: a } = r, s = o.separators.find(
|
|
984
|
+
(f) => f.element === t
|
|
985
|
+
);
|
|
986
|
+
P(s, "Matching separator not found");
|
|
987
|
+
const c = a.get(s);
|
|
988
|
+
P(c, "Matching panels not found");
|
|
989
|
+
const l = c[0], v = i.find(
|
|
990
|
+
(f) => f.panelId === l.id
|
|
991
|
+
);
|
|
992
|
+
if (P(v, "Panel metadata not found"), v.collapsible) {
|
|
993
|
+
const f = u[l.id], w = v.collapsedSize === f ? o.mutableState.expandedPanelSizes[l.id] ?? v.minSize : v.collapsedSize;
|
|
994
|
+
H(t, w - f);
|
|
995
|
+
}
|
|
996
|
+
break;
|
|
997
|
+
}
|
|
998
|
+
case "F6": {
|
|
999
|
+
e.preventDefault();
|
|
1000
|
+
const o = fe(t).separators.map(
|
|
1001
|
+
(u) => u.element
|
|
1002
|
+
), r = Array.from(o).findIndex(
|
|
1003
|
+
(u) => u === e.currentTarget
|
|
1004
|
+
);
|
|
1005
|
+
P(r !== null, "Index not found");
|
|
1006
|
+
const i = e.shiftKey ? r > 0 ? r - 1 : o.length - 1 : r + 1 < o.length ? r + 1 : 0;
|
|
1007
|
+
o[i].focus({
|
|
1008
|
+
preventScroll: !0
|
|
1009
|
+
});
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
case "Home": {
|
|
1013
|
+
e.preventDefault(), H(t, -100);
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
let K = {
|
|
1019
|
+
cursorFlags: 0,
|
|
1020
|
+
state: "inactive"
|
|
1021
|
+
};
|
|
1022
|
+
const ze = new qe();
|
|
1023
|
+
function X() {
|
|
1024
|
+
return K;
|
|
1025
|
+
}
|
|
1026
|
+
function Nt(e) {
|
|
1027
|
+
return ze.addListener("change", e);
|
|
1028
|
+
}
|
|
1029
|
+
function Ot(e) {
|
|
1030
|
+
const t = K, n = { ...K };
|
|
1031
|
+
n.cursorFlags = e, K = n, ze.emit("change", {
|
|
1032
|
+
prev: t,
|
|
1033
|
+
next: n
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
function _(e) {
|
|
1037
|
+
const t = K;
|
|
1038
|
+
K = e, ze.emit("change", {
|
|
1039
|
+
prev: t,
|
|
1040
|
+
next: e
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
function Te(e) {
|
|
1044
|
+
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0)
|
|
1045
|
+
return;
|
|
1046
|
+
const t = U(), n = ye(e, t), o = /* @__PURE__ */ new Map();
|
|
1047
|
+
let r = !1;
|
|
1048
|
+
n.forEach((i) => {
|
|
1049
|
+
i.separator && (r || (r = !0, i.separator.element.focus({
|
|
1050
|
+
preventScroll: !0
|
|
1051
|
+
})));
|
|
1052
|
+
const u = t.get(i.group);
|
|
1053
|
+
u && o.set(i.group, u.layout);
|
|
1054
|
+
}), _({
|
|
1055
|
+
cursorFlags: 0,
|
|
1056
|
+
hitRegions: n,
|
|
1057
|
+
initialLayoutMap: o,
|
|
1058
|
+
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
1059
|
+
state: "active"
|
|
1060
|
+
}), n.length && e.preventDefault();
|
|
1061
|
+
}
|
|
1062
|
+
const Ft = (e) => e, ge = () => {
|
|
1063
|
+
}, _e = 1, et = 2, tt = 4, nt = 8, Ne = 3, Oe = 12;
|
|
1064
|
+
let ce;
|
|
1065
|
+
function Fe() {
|
|
1066
|
+
return ce === void 0 && (ce = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (ce = !0)), ce;
|
|
1067
|
+
}
|
|
1068
|
+
function At({
|
|
1069
|
+
cursorFlags: e,
|
|
1070
|
+
groups: t,
|
|
1071
|
+
state: n
|
|
1072
|
+
}) {
|
|
1073
|
+
let o = 0, r = 0;
|
|
1074
|
+
switch (n) {
|
|
1075
|
+
case "active":
|
|
1076
|
+
case "hover":
|
|
1077
|
+
t.forEach((i) => {
|
|
1078
|
+
if (!i.mutableState.disableCursor)
|
|
1079
|
+
switch (i.orientation) {
|
|
1080
|
+
case "horizontal": {
|
|
1081
|
+
o++;
|
|
1082
|
+
break;
|
|
1083
|
+
}
|
|
1084
|
+
case "vertical": {
|
|
1085
|
+
r++;
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
if (!(o === 0 && r === 0)) {
|
|
1092
|
+
switch (n) {
|
|
1093
|
+
case "active": {
|
|
1094
|
+
if (e && Fe()) {
|
|
1095
|
+
const i = (e & _e) !== 0, u = (e & et) !== 0, a = (e & tt) !== 0, s = (e & nt) !== 0;
|
|
1096
|
+
if (i)
|
|
1097
|
+
return a ? "se-resize" : s ? "ne-resize" : "e-resize";
|
|
1098
|
+
if (u)
|
|
1099
|
+
return a ? "sw-resize" : s ? "nw-resize" : "w-resize";
|
|
1100
|
+
if (a)
|
|
1101
|
+
return "s-resize";
|
|
1102
|
+
if (s)
|
|
1103
|
+
return "n-resize";
|
|
1104
|
+
}
|
|
1105
|
+
break;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
return Fe() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
const Ae = /* @__PURE__ */ new WeakMap();
|
|
1112
|
+
function Se(e) {
|
|
1113
|
+
if (e.defaultView === null || e.defaultView === void 0)
|
|
1114
|
+
return;
|
|
1115
|
+
let { prevStyle: t, styleSheet: n } = Ae.get(e) ?? {};
|
|
1116
|
+
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && e.adoptedStyleSheets.push(n));
|
|
1117
|
+
const o = X();
|
|
1118
|
+
switch (o.state) {
|
|
1119
|
+
case "active":
|
|
1120
|
+
case "hover": {
|
|
1121
|
+
const r = At({
|
|
1122
|
+
cursorFlags: o.cursorFlags,
|
|
1123
|
+
groups: o.hitRegions.map((u) => u.group),
|
|
1124
|
+
state: o.state
|
|
1125
|
+
}), i = `*, *:hover {cursor: ${r} !important; }`;
|
|
1126
|
+
if (t === i)
|
|
1127
|
+
return;
|
|
1128
|
+
t = i, r ? n.cssRules.length === 0 ? n.insertRule(i) : n.replaceSync(i) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
1129
|
+
break;
|
|
1130
|
+
}
|
|
1131
|
+
case "inactive": {
|
|
1132
|
+
t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
1133
|
+
break;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
Ae.set(e, {
|
|
1137
|
+
prevStyle: t,
|
|
1138
|
+
styleSheet: n
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
function ot({
|
|
1142
|
+
document: e,
|
|
1143
|
+
event: t,
|
|
1144
|
+
hitRegions: n,
|
|
1145
|
+
initialLayoutMap: o,
|
|
1146
|
+
mountedGroups: r,
|
|
1147
|
+
pointerDownAtPoint: i,
|
|
1148
|
+
prevCursorFlags: u
|
|
1149
|
+
}) {
|
|
1150
|
+
let a = 0;
|
|
1151
|
+
n.forEach((c) => {
|
|
1152
|
+
const { group: l, groupSize: v } = c, { orientation: f, panels: w } = l, { disableCursor: m } = l.mutableState;
|
|
1153
|
+
let d = 0;
|
|
1154
|
+
i ? f === "horizontal" ? d = (t.clientX - i.x) / v * 100 : d = (t.clientY - i.y) / v * 100 : f === "horizontal" ? d = t.clientX < 0 ? -100 : 100 : d = t.clientY < 0 ? -100 : 100;
|
|
1155
|
+
const g = o.get(l), p = r.get(l);
|
|
1156
|
+
if (!g || !p)
|
|
1157
|
+
return;
|
|
1158
|
+
const {
|
|
1159
|
+
defaultLayoutDeferred: z,
|
|
1160
|
+
derivedPanelConstraints: y,
|
|
1161
|
+
groupSize: b,
|
|
1162
|
+
layout: h,
|
|
1163
|
+
separatorToPanels: L
|
|
1164
|
+
} = p;
|
|
1165
|
+
if (y && h && L) {
|
|
1166
|
+
const k = ie({
|
|
1167
|
+
delta: d,
|
|
1168
|
+
initialLayout: g,
|
|
1169
|
+
panelConstraints: y,
|
|
1170
|
+
pivotIndices: c.panels.map((E) => w.indexOf(E)),
|
|
1171
|
+
prevLayout: h,
|
|
1172
|
+
trigger: "mouse-or-touch"
|
|
1173
|
+
});
|
|
1174
|
+
if (V(k, h)) {
|
|
1175
|
+
if (d !== 0 && !m)
|
|
1176
|
+
switch (f) {
|
|
1177
|
+
case "horizontal": {
|
|
1178
|
+
a |= d < 0 ? _e : et;
|
|
1179
|
+
break;
|
|
1180
|
+
}
|
|
1181
|
+
case "vertical": {
|
|
1182
|
+
a |= d < 0 ? tt : nt;
|
|
1183
|
+
break;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
} else
|
|
1187
|
+
j(c.group, {
|
|
1188
|
+
defaultLayoutDeferred: z,
|
|
1189
|
+
derivedPanelConstraints: y,
|
|
1190
|
+
groupSize: b,
|
|
1191
|
+
layout: k,
|
|
1192
|
+
separatorToPanels: L
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
let s = 0;
|
|
1197
|
+
t.movementX === 0 ? s |= u & Ne : s |= a & Ne, t.movementY === 0 ? s |= u & Oe : s |= a & Oe, Ot(s), Se(e);
|
|
1198
|
+
}
|
|
1199
|
+
function $e(e) {
|
|
1200
|
+
const t = U(), n = X();
|
|
1201
|
+
n.state === "active" && ot({
|
|
1202
|
+
document: e.currentTarget,
|
|
1203
|
+
event: e,
|
|
1204
|
+
hitRegions: n.hitRegions,
|
|
1205
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1206
|
+
mountedGroups: t,
|
|
1207
|
+
prevCursorFlags: n.cursorFlags
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
function Ge(e) {
|
|
1211
|
+
if (e.defaultPrevented)
|
|
1212
|
+
return;
|
|
1213
|
+
const t = X(), n = U();
|
|
1214
|
+
switch (t.state) {
|
|
1215
|
+
case "active": {
|
|
1216
|
+
if (
|
|
1217
|
+
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
1218
|
+
e.buttons === 0
|
|
1219
|
+
) {
|
|
1220
|
+
_({
|
|
1221
|
+
cursorFlags: 0,
|
|
1222
|
+
state: "inactive"
|
|
1223
|
+
}), t.hitRegions.forEach((o) => {
|
|
1224
|
+
const r = W(o.group.id, !0);
|
|
1225
|
+
j(o.group, r);
|
|
1226
|
+
});
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
for (const o of t.hitRegions)
|
|
1230
|
+
if (o.separator) {
|
|
1231
|
+
const { element: r } = o.separator;
|
|
1232
|
+
r.hasPointerCapture?.(e.pointerId) || r.setPointerCapture?.(e.pointerId);
|
|
1233
|
+
}
|
|
1234
|
+
ot({
|
|
1235
|
+
document: e.currentTarget,
|
|
1236
|
+
event: e,
|
|
1237
|
+
hitRegions: t.hitRegions,
|
|
1238
|
+
initialLayoutMap: t.initialLayoutMap,
|
|
1239
|
+
mountedGroups: n,
|
|
1240
|
+
pointerDownAtPoint: t.pointerDownAtPoint,
|
|
1241
|
+
prevCursorFlags: t.cursorFlags
|
|
1242
|
+
});
|
|
1243
|
+
break;
|
|
1244
|
+
}
|
|
1245
|
+
default: {
|
|
1246
|
+
const o = ye(e, n);
|
|
1247
|
+
o.length === 0 ? t.state !== "inactive" && _({
|
|
1248
|
+
cursorFlags: 0,
|
|
1249
|
+
state: "inactive"
|
|
1250
|
+
}) : _({
|
|
1251
|
+
cursorFlags: 0,
|
|
1252
|
+
hitRegions: o,
|
|
1253
|
+
state: "hover"
|
|
1254
|
+
}), Se(e.currentTarget);
|
|
1255
|
+
break;
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
function je(e) {
|
|
1260
|
+
e.relatedTarget instanceof HTMLIFrameElement && X().state === "hover" && _({
|
|
1261
|
+
cursorFlags: 0,
|
|
1262
|
+
state: "inactive"
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
function Be(e) {
|
|
1266
|
+
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0)
|
|
1267
|
+
return;
|
|
1268
|
+
const t = X();
|
|
1269
|
+
t.state === "active" && (_({
|
|
1270
|
+
cursorFlags: 0,
|
|
1271
|
+
state: "inactive"
|
|
1272
|
+
}), t.hitRegions.length > 0 && (Se(e.currentTarget), t.hitRegions.forEach((n) => {
|
|
1273
|
+
const o = W(n.group.id, !0);
|
|
1274
|
+
j(n.group, o);
|
|
1275
|
+
}), e.preventDefault()));
|
|
1276
|
+
}
|
|
1277
|
+
function We(e) {
|
|
1278
|
+
let t = 0, n = 0;
|
|
1279
|
+
const o = {};
|
|
1280
|
+
for (const i of e)
|
|
1281
|
+
if (i.defaultSize !== void 0) {
|
|
1282
|
+
t++;
|
|
1283
|
+
const u = I(i.defaultSize);
|
|
1284
|
+
n += u, o[i.panelId] = u;
|
|
1285
|
+
} else
|
|
1286
|
+
o[i.panelId] = void 0;
|
|
1287
|
+
const r = e.length - t;
|
|
1288
|
+
if (r !== 0) {
|
|
1289
|
+
const i = I((100 - n) / r);
|
|
1290
|
+
for (const u of e)
|
|
1291
|
+
u.defaultSize === void 0 && (o[u.panelId] = i);
|
|
1292
|
+
}
|
|
1293
|
+
return o;
|
|
1294
|
+
}
|
|
1295
|
+
function $t(e, t, n) {
|
|
1296
|
+
if (!n[0])
|
|
1297
|
+
return;
|
|
1298
|
+
const o = e.panels.find((s) => s.element === t);
|
|
1299
|
+
if (!o || !o.onResize)
|
|
1300
|
+
return;
|
|
1301
|
+
const r = ee({ group: e }), i = e.orientation === "horizontal" ? o.element.offsetWidth : o.element.offsetHeight, u = o.mutableValues.prevSize, a = {
|
|
1302
|
+
asPercentage: I(i / r * 100),
|
|
1303
|
+
inPixels: i
|
|
1304
|
+
};
|
|
1305
|
+
o.mutableValues.prevSize = a, o.onResize(a, o.id, u);
|
|
1306
|
+
}
|
|
1307
|
+
function Gt(e, t) {
|
|
1308
|
+
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1309
|
+
return !1;
|
|
1310
|
+
for (const n in e)
|
|
1311
|
+
if (e[n] !== t[n])
|
|
1312
|
+
return !1;
|
|
1313
|
+
return !0;
|
|
1314
|
+
}
|
|
1315
|
+
function jt({
|
|
1316
|
+
group: e,
|
|
1317
|
+
nextGroupSize: t,
|
|
1318
|
+
prevGroupSize: n,
|
|
1319
|
+
prevLayout: o
|
|
1320
|
+
}) {
|
|
1321
|
+
if (n <= 0 || t <= 0 || n === t)
|
|
1322
|
+
return o;
|
|
1323
|
+
let r = 0, i = 0, u = !1;
|
|
1324
|
+
const a = /* @__PURE__ */ new Map(), s = [];
|
|
1325
|
+
for (const v of e.panels) {
|
|
1326
|
+
const f = o[v.id] ?? 0;
|
|
1327
|
+
if (v.panelConstraints.groupResizeBehavior === "preserve-pixel-size") {
|
|
1328
|
+
u = !0;
|
|
1329
|
+
const w = f / 100 * n, m = I(
|
|
1330
|
+
w / t * 100
|
|
1331
|
+
);
|
|
1332
|
+
a.set(v.id, m), r += m;
|
|
1333
|
+
} else
|
|
1334
|
+
s.push(v.id), i += f;
|
|
1335
|
+
}
|
|
1336
|
+
if (!u || s.length === 0)
|
|
1337
|
+
return o;
|
|
1338
|
+
const c = 100 - r, l = { ...o };
|
|
1339
|
+
if (a.forEach((v, f) => {
|
|
1340
|
+
l[f] = v;
|
|
1341
|
+
}), i > 0)
|
|
1342
|
+
for (const v of s) {
|
|
1343
|
+
const f = o[v] ?? 0;
|
|
1344
|
+
l[v] = I(
|
|
1345
|
+
f / i * c
|
|
1346
|
+
);
|
|
1347
|
+
}
|
|
1348
|
+
else {
|
|
1349
|
+
const v = I(
|
|
1350
|
+
c / s.length
|
|
1351
|
+
);
|
|
1352
|
+
for (const f of s)
|
|
1353
|
+
l[f] = v;
|
|
1354
|
+
}
|
|
1355
|
+
return l;
|
|
1356
|
+
}
|
|
1357
|
+
function Bt(e, t) {
|
|
1358
|
+
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
1359
|
+
if (n.length !== o.length)
|
|
1360
|
+
return !1;
|
|
1361
|
+
for (const r of n)
|
|
1362
|
+
if (!o.includes(r))
|
|
1363
|
+
return !1;
|
|
1364
|
+
return !0;
|
|
1365
|
+
}
|
|
1366
|
+
const Q = /* @__PURE__ */ new Map();
|
|
1367
|
+
function Wt(e) {
|
|
1368
|
+
let t = !0;
|
|
1369
|
+
P(
|
|
1370
|
+
e.element.ownerDocument.defaultView,
|
|
1371
|
+
"Cannot register an unmounted Group"
|
|
1372
|
+
);
|
|
1373
|
+
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((m) => {
|
|
1374
|
+
for (const d of m) {
|
|
1375
|
+
const { borderBoxSize: g, target: p } = d;
|
|
1376
|
+
if (p === e.element) {
|
|
1377
|
+
if (t) {
|
|
1378
|
+
const z = ee({ group: e });
|
|
1379
|
+
if (z === 0)
|
|
1380
|
+
return;
|
|
1381
|
+
const y = W(e.id);
|
|
1382
|
+
if (!y)
|
|
1383
|
+
return;
|
|
1384
|
+
const b = ve(e), h = y.defaultLayoutDeferred ? We(b) : y.layout, L = jt({
|
|
1385
|
+
group: e,
|
|
1386
|
+
nextGroupSize: z,
|
|
1387
|
+
prevGroupSize: y.groupSize,
|
|
1388
|
+
prevLayout: h
|
|
1389
|
+
}), k = Y({
|
|
1390
|
+
layout: L,
|
|
1391
|
+
panelConstraints: b
|
|
1392
|
+
});
|
|
1393
|
+
if (!y.defaultLayoutDeferred && V(y.layout, k) && Gt(
|
|
1394
|
+
y.derivedPanelConstraints,
|
|
1395
|
+
b
|
|
1396
|
+
) && y.groupSize === z)
|
|
1397
|
+
return;
|
|
1398
|
+
j(e, {
|
|
1399
|
+
defaultLayoutDeferred: !1,
|
|
1400
|
+
derivedPanelConstraints: b,
|
|
1401
|
+
groupSize: z,
|
|
1402
|
+
layout: k,
|
|
1403
|
+
separatorToPanels: y.separatorToPanels
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
} else
|
|
1407
|
+
$t(e, p, g);
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
i.observe(e.element), e.panels.forEach((m) => {
|
|
1411
|
+
P(
|
|
1412
|
+
!o.has(m.id),
|
|
1413
|
+
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
1414
|
+
), o.add(m.id), m.onResize && i.observe(m.element);
|
|
1415
|
+
});
|
|
1416
|
+
const u = ee({ group: e }), a = ve(e), s = e.panels.map(({ id: m }) => m).join(",");
|
|
1417
|
+
let c = e.mutableState.defaultLayout;
|
|
1418
|
+
c && (Bt(e.panels, c) || (c = void 0));
|
|
1419
|
+
const l = e.mutableState.layouts[s] ?? c ?? We(a), v = Y({
|
|
1420
|
+
layout: l,
|
|
1421
|
+
panelConstraints: a
|
|
1422
|
+
}), f = e.element.ownerDocument;
|
|
1423
|
+
Q.set(
|
|
1424
|
+
f,
|
|
1425
|
+
(Q.get(f) ?? 0) + 1
|
|
1426
|
+
);
|
|
1427
|
+
const w = /* @__PURE__ */ new Map();
|
|
1428
|
+
return Ue(e).forEach((m) => {
|
|
1429
|
+
m.separator && w.set(m.separator, m.panels);
|
|
1430
|
+
}), j(e, {
|
|
1431
|
+
defaultLayoutDeferred: u === 0,
|
|
1432
|
+
derivedPanelConstraints: a,
|
|
1433
|
+
groupSize: u,
|
|
1434
|
+
layout: v,
|
|
1435
|
+
separatorToPanels: w
|
|
1436
|
+
}), e.separators.forEach((m) => {
|
|
1437
|
+
P(
|
|
1438
|
+
!r.has(m.id),
|
|
1439
|
+
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
1440
|
+
), r.add(m.id), m.element.addEventListener("keydown", Ie);
|
|
1441
|
+
}), Q.get(f) === 1 && (f.addEventListener("dblclick", De, !0), f.addEventListener("pointerdown", Te, !0), f.addEventListener("pointerleave", $e), f.addEventListener("pointermove", Ge), f.addEventListener("pointerout", je), f.addEventListener("pointerup", Be, !0)), function() {
|
|
1442
|
+
t = !1, Q.set(
|
|
1443
|
+
f,
|
|
1444
|
+
Math.max(0, (Q.get(f) ?? 0) - 1)
|
|
1445
|
+
), Ct(e), e.separators.forEach((m) => {
|
|
1446
|
+
m.element.removeEventListener("keydown", Ie);
|
|
1447
|
+
}), Q.get(f) || (f.removeEventListener(
|
|
1448
|
+
"dblclick",
|
|
1449
|
+
De,
|
|
1450
|
+
!0
|
|
1451
|
+
), f.removeEventListener(
|
|
1452
|
+
"pointerdown",
|
|
1453
|
+
Te,
|
|
1454
|
+
!0
|
|
1455
|
+
), f.removeEventListener("pointerleave", $e), f.removeEventListener("pointermove", Ge), f.removeEventListener("pointerout", je), f.removeEventListener("pointerup", Be, !0)), i.disconnect();
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
function Ht() {
|
|
1459
|
+
const [e, t] = de({}), n = He(() => t({}), []);
|
|
1460
|
+
return [e, n];
|
|
1461
|
+
}
|
|
1462
|
+
function we(e) {
|
|
1463
|
+
const t = ft();
|
|
1464
|
+
return `${e ?? t}`;
|
|
1465
|
+
}
|
|
1466
|
+
const q = typeof window < "u" ? ht : pe;
|
|
1467
|
+
function re(e) {
|
|
1468
|
+
const t = F(e);
|
|
1469
|
+
return q(() => {
|
|
1470
|
+
t.current = e;
|
|
1471
|
+
}, [e]), He(
|
|
1472
|
+
(...n) => t.current?.(...n),
|
|
1473
|
+
[t]
|
|
1474
|
+
);
|
|
1475
|
+
}
|
|
1476
|
+
function xe(...e) {
|
|
1477
|
+
return re((t) => {
|
|
1478
|
+
e.forEach((n) => {
|
|
1479
|
+
if (n)
|
|
1480
|
+
switch (typeof n) {
|
|
1481
|
+
case "function": {
|
|
1482
|
+
n(t);
|
|
1483
|
+
break;
|
|
1484
|
+
}
|
|
1485
|
+
case "object": {
|
|
1486
|
+
n.current = t;
|
|
1487
|
+
break;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
});
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
function Ce(e) {
|
|
1494
|
+
const t = F({ ...e });
|
|
1495
|
+
return q(() => {
|
|
1496
|
+
for (const n in e)
|
|
1497
|
+
t.current[n] = e[n];
|
|
1498
|
+
}, [e]), t.current;
|
|
1499
|
+
}
|
|
1500
|
+
const rt = ut(null);
|
|
1501
|
+
function Vt(e, t) {
|
|
1502
|
+
const n = F({
|
|
1503
|
+
getLayout: () => ({}),
|
|
1504
|
+
setLayout: Ft
|
|
1505
|
+
});
|
|
1506
|
+
Ve(t, () => n.current, []), q(() => {
|
|
1507
|
+
Object.assign(
|
|
1508
|
+
n.current,
|
|
1509
|
+
Ke({ groupId: e })
|
|
1510
|
+
);
|
|
1511
|
+
});
|
|
1512
|
+
}
|
|
1513
|
+
function Yt({
|
|
1514
|
+
children: e,
|
|
1515
|
+
className: t,
|
|
1516
|
+
defaultLayout: n,
|
|
1517
|
+
disableCursor: o,
|
|
1518
|
+
disabled: r,
|
|
1519
|
+
elementRef: i,
|
|
1520
|
+
groupRef: u,
|
|
1521
|
+
id: a,
|
|
1522
|
+
onLayoutChange: s,
|
|
1523
|
+
onLayoutChanged: c,
|
|
1524
|
+
orientation: l = "horizontal",
|
|
1525
|
+
resizeTargetMinimumSize: v = {
|
|
1526
|
+
coarse: 20,
|
|
1527
|
+
fine: 10
|
|
1528
|
+
},
|
|
1529
|
+
style: f,
|
|
1530
|
+
...w
|
|
1531
|
+
}) {
|
|
1532
|
+
const m = F({
|
|
1533
|
+
onLayoutChange: {},
|
|
1534
|
+
onLayoutChanged: {}
|
|
1535
|
+
}), d = re((S) => {
|
|
1536
|
+
V(m.current.onLayoutChange, S) || (m.current.onLayoutChange = S, s?.(S));
|
|
1537
|
+
}), g = re((S) => {
|
|
1538
|
+
V(m.current.onLayoutChanged, S) || (m.current.onLayoutChanged = S, c?.(S));
|
|
1539
|
+
}), p = we(a), z = F(null), [y, b] = Ht(), h = F({
|
|
1540
|
+
lastExpandedPanelSizes: {},
|
|
1541
|
+
layouts: {},
|
|
1542
|
+
panels: [],
|
|
1543
|
+
resizeTargetMinimumSize: v,
|
|
1544
|
+
separators: []
|
|
1545
|
+
}), L = xe(z, i);
|
|
1546
|
+
Vt(p, u);
|
|
1547
|
+
const k = re(
|
|
1548
|
+
(S, x) => {
|
|
1549
|
+
const M = X(), C = ke(S), R = W(S);
|
|
1550
|
+
if (R) {
|
|
1551
|
+
let T = !1;
|
|
1552
|
+
return M.state === "active" && (T = M.hitRegions.some(
|
|
1553
|
+
(te) => te.group === C
|
|
1554
|
+
)), {
|
|
1555
|
+
flexGrow: R.layout[x] ?? 1,
|
|
1556
|
+
pointerEvents: T ? "none" : void 0
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
if (n?.[x])
|
|
1560
|
+
return {
|
|
1561
|
+
flexGrow: n?.[x]
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
), E = Ce({
|
|
1565
|
+
defaultLayout: n,
|
|
1566
|
+
disableCursor: o
|
|
1567
|
+
}), N = dt(
|
|
1568
|
+
() => ({
|
|
1569
|
+
get disableCursor() {
|
|
1570
|
+
return !!E.disableCursor;
|
|
1571
|
+
},
|
|
1572
|
+
getPanelStyles: k,
|
|
1573
|
+
id: p,
|
|
1574
|
+
orientation: l,
|
|
1575
|
+
registerPanel: (S) => {
|
|
1576
|
+
const x = h.current;
|
|
1577
|
+
return x.panels = me(l, [
|
|
1578
|
+
...x.panels,
|
|
1579
|
+
S
|
|
1580
|
+
]), b(), () => {
|
|
1581
|
+
x.panels = x.panels.filter(
|
|
1582
|
+
(M) => M !== S
|
|
1583
|
+
), b();
|
|
1584
|
+
};
|
|
1585
|
+
},
|
|
1586
|
+
registerSeparator: (S) => {
|
|
1587
|
+
const x = h.current;
|
|
1588
|
+
return x.separators = me(l, [
|
|
1589
|
+
...x.separators,
|
|
1590
|
+
S
|
|
1591
|
+
]), b(), () => {
|
|
1592
|
+
x.separators = x.separators.filter(
|
|
1593
|
+
(M) => M !== S
|
|
1594
|
+
), b();
|
|
1595
|
+
};
|
|
1596
|
+
},
|
|
1597
|
+
updatePanelProps: (S, { disabled: x }) => {
|
|
1598
|
+
const M = h.current.panels.find(
|
|
1599
|
+
(T) => T.id === S
|
|
1600
|
+
);
|
|
1601
|
+
M && (M.panelConstraints.disabled = x);
|
|
1602
|
+
const C = ke(p), R = W(p);
|
|
1603
|
+
C && R && j(C, {
|
|
1604
|
+
...R,
|
|
1605
|
+
derivedPanelConstraints: ve(C)
|
|
1606
|
+
});
|
|
1607
|
+
},
|
|
1608
|
+
updateSeparatorProps: (S, {
|
|
1609
|
+
disabled: x,
|
|
1610
|
+
disableDoubleClick: M
|
|
1611
|
+
}) => {
|
|
1612
|
+
const C = h.current.separators.find(
|
|
1613
|
+
(R) => R.id === S
|
|
1614
|
+
);
|
|
1615
|
+
C && (C.disabled = x, C.disableDoubleClick = M);
|
|
1616
|
+
}
|
|
1617
|
+
}),
|
|
1618
|
+
[k, p, b, l, E]
|
|
1619
|
+
), $ = F(null);
|
|
1620
|
+
return q(() => {
|
|
1621
|
+
const S = z.current;
|
|
1622
|
+
if (S === null)
|
|
1623
|
+
return;
|
|
1624
|
+
const x = h.current;
|
|
1625
|
+
let M;
|
|
1626
|
+
if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === x.panels.length) {
|
|
1627
|
+
M = {};
|
|
1628
|
+
for (const B of x.panels) {
|
|
1629
|
+
const J = E.defaultLayout[B.id];
|
|
1630
|
+
J !== void 0 && (M[B.id] = J);
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
const C = {
|
|
1634
|
+
disabled: !!r,
|
|
1635
|
+
element: S,
|
|
1636
|
+
id: p,
|
|
1637
|
+
mutableState: {
|
|
1638
|
+
defaultLayout: M,
|
|
1639
|
+
disableCursor: !!E.disableCursor,
|
|
1640
|
+
expandedPanelSizes: h.current.lastExpandedPanelSizes,
|
|
1641
|
+
layouts: h.current.layouts
|
|
1642
|
+
},
|
|
1643
|
+
orientation: l,
|
|
1644
|
+
panels: x.panels,
|
|
1645
|
+
resizeTargetMinimumSize: x.resizeTargetMinimumSize,
|
|
1646
|
+
separators: x.separators
|
|
1647
|
+
};
|
|
1648
|
+
$.current = C;
|
|
1649
|
+
const R = Wt(C), { defaultLayoutDeferred: T, derivedPanelConstraints: te, layout: se } = W(C.id, !0);
|
|
1650
|
+
!T && te.length > 0 && (d(se), g(se));
|
|
1651
|
+
const ne = be(p, (B) => {
|
|
1652
|
+
const { defaultLayoutDeferred: J, derivedPanelConstraints: Le, layout: le } = B.next;
|
|
1653
|
+
if (J || Le.length === 0)
|
|
1654
|
+
return;
|
|
1655
|
+
const at = C.panels.map(({ id: G }) => G).join(",");
|
|
1656
|
+
C.mutableState.layouts[at] = le, Le.forEach((G) => {
|
|
1657
|
+
if (G.collapsible) {
|
|
1658
|
+
const { layout: he } = B.prev ?? {};
|
|
1659
|
+
if (he) {
|
|
1660
|
+
const st = D(
|
|
1661
|
+
G.collapsedSize,
|
|
1662
|
+
le[G.panelId]
|
|
1663
|
+
), lt = D(
|
|
1664
|
+
G.collapsedSize,
|
|
1665
|
+
he[G.panelId]
|
|
1666
|
+
);
|
|
1667
|
+
st && !lt && (C.mutableState.expandedPanelSizes[G.panelId] = he[G.panelId]);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
const it = X().state !== "active";
|
|
1672
|
+
d(le), it && g(le);
|
|
1673
|
+
});
|
|
1674
|
+
return () => {
|
|
1675
|
+
$.current = null, R(), ne();
|
|
1676
|
+
};
|
|
1677
|
+
}, [
|
|
1678
|
+
r,
|
|
1679
|
+
p,
|
|
1680
|
+
g,
|
|
1681
|
+
d,
|
|
1682
|
+
l,
|
|
1683
|
+
y,
|
|
1684
|
+
E
|
|
1685
|
+
]), pe(() => {
|
|
1686
|
+
const S = $.current;
|
|
1687
|
+
S && (S.mutableState.defaultLayout = n, S.mutableState.disableCursor = !!o);
|
|
1688
|
+
}), /* @__PURE__ */ ae(rt.Provider, { value: N, children: /* @__PURE__ */ ae(
|
|
1689
|
+
"div",
|
|
1690
|
+
{
|
|
1691
|
+
...w,
|
|
1692
|
+
className: t,
|
|
1693
|
+
"data-group": !0,
|
|
1694
|
+
"data-testid": p,
|
|
1695
|
+
id: p,
|
|
1696
|
+
ref: L,
|
|
1697
|
+
style: {
|
|
1698
|
+
height: "100%",
|
|
1699
|
+
width: "100%",
|
|
1700
|
+
overflow: "hidden",
|
|
1701
|
+
...f,
|
|
1702
|
+
display: "flex",
|
|
1703
|
+
flexDirection: l === "horizontal" ? "row" : "column",
|
|
1704
|
+
flexWrap: "nowrap",
|
|
1705
|
+
// Inform the browser that the library is handling touch events for this element
|
|
1706
|
+
// but still allow users to scroll content within panels in the non-resizing direction
|
|
1707
|
+
// NOTE This is not an inherited style
|
|
1708
|
+
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
1709
|
+
touchAction: l === "horizontal" ? "pan-y" : "pan-x"
|
|
1710
|
+
},
|
|
1711
|
+
children: e
|
|
1712
|
+
}
|
|
1713
|
+
) });
|
|
1714
|
+
}
|
|
1715
|
+
Yt.displayName = "Group";
|
|
1716
|
+
function Pe() {
|
|
1717
|
+
const e = pt(rt);
|
|
1718
|
+
return P(
|
|
1719
|
+
e,
|
|
1720
|
+
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
1721
|
+
), e;
|
|
1722
|
+
}
|
|
1723
|
+
function Xt(e, t) {
|
|
1724
|
+
const { id: n } = Pe(), o = F({
|
|
1725
|
+
collapse: ge,
|
|
1726
|
+
expand: ge,
|
|
1727
|
+
getSize: () => ({
|
|
1728
|
+
asPercentage: 0,
|
|
1729
|
+
inPixels: 0
|
|
1730
|
+
}),
|
|
1731
|
+
isCollapsed: () => !1,
|
|
1732
|
+
resize: ge
|
|
1733
|
+
});
|
|
1734
|
+
Ve(t, () => o.current, []), q(() => {
|
|
1735
|
+
Object.assign(
|
|
1736
|
+
o.current,
|
|
1737
|
+
Ze({ groupId: n, panelId: e })
|
|
1738
|
+
);
|
|
1739
|
+
});
|
|
1740
|
+
}
|
|
1741
|
+
function Ut({
|
|
1742
|
+
children: e,
|
|
1743
|
+
className: t,
|
|
1744
|
+
collapsedSize: n = "0%",
|
|
1745
|
+
collapsible: o = !1,
|
|
1746
|
+
defaultSize: r,
|
|
1747
|
+
disabled: i,
|
|
1748
|
+
elementRef: u,
|
|
1749
|
+
groupResizeBehavior: a = "preserve-relative-size",
|
|
1750
|
+
id: s,
|
|
1751
|
+
maxSize: c = "100%",
|
|
1752
|
+
minSize: l = "0%",
|
|
1753
|
+
onResize: v,
|
|
1754
|
+
panelRef: f,
|
|
1755
|
+
style: w,
|
|
1756
|
+
...m
|
|
1757
|
+
}) {
|
|
1758
|
+
const d = !!s, g = we(s), p = Ce({
|
|
1759
|
+
disabled: i
|
|
1760
|
+
}), z = F(null), y = xe(z, u), {
|
|
1761
|
+
getPanelStyles: b,
|
|
1762
|
+
id: h,
|
|
1763
|
+
orientation: L,
|
|
1764
|
+
registerPanel: k,
|
|
1765
|
+
updatePanelProps: E
|
|
1766
|
+
} = Pe(), N = v !== null, $ = re(
|
|
1767
|
+
(C, R, T) => {
|
|
1768
|
+
v?.(C, s, T);
|
|
1769
|
+
}
|
|
1770
|
+
);
|
|
1771
|
+
q(() => {
|
|
1772
|
+
const C = z.current;
|
|
1773
|
+
if (C !== null) {
|
|
1774
|
+
const R = {
|
|
1775
|
+
element: C,
|
|
1776
|
+
id: g,
|
|
1777
|
+
idIsStable: d,
|
|
1778
|
+
mutableValues: {
|
|
1779
|
+
expandToSize: void 0,
|
|
1780
|
+
prevSize: void 0
|
|
1781
|
+
},
|
|
1782
|
+
onResize: N ? $ : void 0,
|
|
1783
|
+
panelConstraints: {
|
|
1784
|
+
groupResizeBehavior: a,
|
|
1785
|
+
collapsedSize: n,
|
|
1786
|
+
collapsible: o,
|
|
1787
|
+
defaultSize: r,
|
|
1788
|
+
disabled: p.disabled,
|
|
1789
|
+
maxSize: c,
|
|
1790
|
+
minSize: l
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
return k(R);
|
|
1794
|
+
}
|
|
1795
|
+
}, [
|
|
1796
|
+
a,
|
|
1797
|
+
n,
|
|
1798
|
+
o,
|
|
1799
|
+
r,
|
|
1800
|
+
N,
|
|
1801
|
+
g,
|
|
1802
|
+
d,
|
|
1803
|
+
c,
|
|
1804
|
+
l,
|
|
1805
|
+
$,
|
|
1806
|
+
k,
|
|
1807
|
+
p
|
|
1808
|
+
]), pe(() => {
|
|
1809
|
+
E(g, { disabled: i });
|
|
1810
|
+
}, [i, g, E]), Xt(g, f);
|
|
1811
|
+
const S = () => {
|
|
1812
|
+
const C = b(h, g);
|
|
1813
|
+
if (C)
|
|
1814
|
+
return JSON.stringify(C);
|
|
1815
|
+
}, x = ct(
|
|
1816
|
+
(C) => be(h, C),
|
|
1817
|
+
S,
|
|
1818
|
+
S
|
|
1819
|
+
);
|
|
1820
|
+
let M;
|
|
1821
|
+
return x ? M = JSON.parse(x) : r ? M = {
|
|
1822
|
+
flexGrow: void 0,
|
|
1823
|
+
flexShrink: void 0,
|
|
1824
|
+
flexBasis: r
|
|
1825
|
+
} : M = { flexGrow: 1 }, /* @__PURE__ */ ae(
|
|
1826
|
+
"div",
|
|
1827
|
+
{
|
|
1828
|
+
...m,
|
|
1829
|
+
"data-disabled": i || void 0,
|
|
1830
|
+
"data-panel": !0,
|
|
1831
|
+
"data-testid": g,
|
|
1832
|
+
id: g,
|
|
1833
|
+
ref: y,
|
|
1834
|
+
style: {
|
|
1835
|
+
...qt,
|
|
1836
|
+
display: "flex",
|
|
1837
|
+
flexBasis: 0,
|
|
1838
|
+
flexShrink: 1,
|
|
1839
|
+
overflow: "visible",
|
|
1840
|
+
...M
|
|
1841
|
+
},
|
|
1842
|
+
children: /* @__PURE__ */ ae(
|
|
1843
|
+
"div",
|
|
1844
|
+
{
|
|
1845
|
+
className: t,
|
|
1846
|
+
style: {
|
|
1847
|
+
maxHeight: "100%",
|
|
1848
|
+
maxWidth: "100%",
|
|
1849
|
+
flexGrow: 1,
|
|
1850
|
+
overflow: "auto",
|
|
1851
|
+
...w,
|
|
1852
|
+
// Inform the browser that the library is handling touch events for this element
|
|
1853
|
+
// but still allow users to scroll content within panels in the non-resizing direction
|
|
1854
|
+
// NOTE This is not an inherited style
|
|
1855
|
+
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
1856
|
+
touchAction: L === "horizontal" ? "pan-y" : "pan-x"
|
|
1857
|
+
},
|
|
1858
|
+
children: e
|
|
1859
|
+
}
|
|
1860
|
+
)
|
|
1861
|
+
}
|
|
1862
|
+
);
|
|
1863
|
+
}
|
|
1864
|
+
Ut.displayName = "Panel";
|
|
1865
|
+
const qt = {
|
|
1866
|
+
minHeight: 0,
|
|
1867
|
+
maxHeight: "100%",
|
|
1868
|
+
height: "auto",
|
|
1869
|
+
minWidth: 0,
|
|
1870
|
+
maxWidth: "100%",
|
|
1871
|
+
width: "auto",
|
|
1872
|
+
border: "none",
|
|
1873
|
+
borderWidth: 0,
|
|
1874
|
+
padding: 0,
|
|
1875
|
+
margin: 0
|
|
1876
|
+
};
|
|
1877
|
+
function Jt({
|
|
1878
|
+
layout: e,
|
|
1879
|
+
panelConstraints: t,
|
|
1880
|
+
panelId: n,
|
|
1881
|
+
panelIndex: o
|
|
1882
|
+
}) {
|
|
1883
|
+
let r, i;
|
|
1884
|
+
const u = e[n], a = t.find(
|
|
1885
|
+
(s) => s.panelId === n
|
|
1886
|
+
);
|
|
1887
|
+
if (a) {
|
|
1888
|
+
const s = a.maxSize, c = a.collapsible ? a.collapsedSize : a.minSize, l = [o, o + 1];
|
|
1889
|
+
i = Y({
|
|
1890
|
+
layout: ie({
|
|
1891
|
+
delta: c - u,
|
|
1892
|
+
initialLayout: e,
|
|
1893
|
+
panelConstraints: t,
|
|
1894
|
+
pivotIndices: l,
|
|
1895
|
+
prevLayout: e
|
|
1896
|
+
}),
|
|
1897
|
+
panelConstraints: t
|
|
1898
|
+
})[n], r = Y({
|
|
1899
|
+
layout: ie({
|
|
1900
|
+
delta: s - u,
|
|
1901
|
+
initialLayout: e,
|
|
1902
|
+
panelConstraints: t,
|
|
1903
|
+
pivotIndices: l,
|
|
1904
|
+
prevLayout: e
|
|
1905
|
+
}),
|
|
1906
|
+
panelConstraints: t
|
|
1907
|
+
})[n];
|
|
1908
|
+
}
|
|
1909
|
+
return {
|
|
1910
|
+
valueControls: n,
|
|
1911
|
+
valueMax: r,
|
|
1912
|
+
valueMin: i,
|
|
1913
|
+
valueNow: u
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
function Qt({
|
|
1917
|
+
children: e,
|
|
1918
|
+
className: t,
|
|
1919
|
+
disabled: n,
|
|
1920
|
+
disableDoubleClick: o,
|
|
1921
|
+
elementRef: r,
|
|
1922
|
+
id: i,
|
|
1923
|
+
style: u,
|
|
1924
|
+
...a
|
|
1925
|
+
}) {
|
|
1926
|
+
const s = we(i), c = Ce({
|
|
1927
|
+
disabled: n,
|
|
1928
|
+
disableDoubleClick: o
|
|
1929
|
+
}), [l, v] = de({}), [f, w] = de("inactive"), [m, d] = de(!1), g = F(null), p = xe(g, r), {
|
|
1930
|
+
disableCursor: z,
|
|
1931
|
+
id: y,
|
|
1932
|
+
orientation: b,
|
|
1933
|
+
registerSeparator: h,
|
|
1934
|
+
updateSeparatorProps: L
|
|
1935
|
+
} = Pe(), k = b === "horizontal" ? "vertical" : "horizontal";
|
|
1936
|
+
q(() => {
|
|
1937
|
+
const $ = g.current;
|
|
1938
|
+
if ($ !== null) {
|
|
1939
|
+
const S = {
|
|
1940
|
+
disabled: c.disabled,
|
|
1941
|
+
disableDoubleClick: c.disableDoubleClick,
|
|
1942
|
+
element: $,
|
|
1943
|
+
id: s
|
|
1944
|
+
}, x = h(S), M = Nt(
|
|
1945
|
+
(R) => {
|
|
1946
|
+
w(
|
|
1947
|
+
R.next.state !== "inactive" && R.next.hitRegions.some(
|
|
1948
|
+
(T) => T.separator === S
|
|
1949
|
+
) ? R.next.state : "inactive"
|
|
1950
|
+
);
|
|
1951
|
+
}
|
|
1952
|
+
), C = be(
|
|
1953
|
+
y,
|
|
1954
|
+
(R) => {
|
|
1955
|
+
const { derivedPanelConstraints: T, layout: te, separatorToPanels: se } = R.next, ne = se.get(S);
|
|
1956
|
+
if (ne) {
|
|
1957
|
+
const B = ne[0], J = ne.indexOf(B);
|
|
1958
|
+
v(
|
|
1959
|
+
Jt({
|
|
1960
|
+
layout: te,
|
|
1961
|
+
panelConstraints: T,
|
|
1962
|
+
panelId: B.id,
|
|
1963
|
+
panelIndex: J
|
|
1964
|
+
})
|
|
1965
|
+
);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
);
|
|
1969
|
+
return () => {
|
|
1970
|
+
M(), C(), x();
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
}, [y, s, h, c]), pe(() => {
|
|
1974
|
+
L(s, { disabled: n, disableDoubleClick: o });
|
|
1975
|
+
}, [n, o, s, L]);
|
|
1976
|
+
let E;
|
|
1977
|
+
n && !z && (E = "not-allowed");
|
|
1978
|
+
let N;
|
|
1979
|
+
return n ? N = "disabled" : f === "active" ? N = "active" : m ? N = "focus" : N = f, /* @__PURE__ */ ae(
|
|
1980
|
+
"div",
|
|
1981
|
+
{
|
|
1982
|
+
...a,
|
|
1983
|
+
"aria-controls": l.valueControls,
|
|
1984
|
+
"aria-disabled": n || void 0,
|
|
1985
|
+
"aria-orientation": k,
|
|
1986
|
+
"aria-valuemax": l.valueMax,
|
|
1987
|
+
"aria-valuemin": l.valueMin,
|
|
1988
|
+
"aria-valuenow": l.valueNow,
|
|
1989
|
+
children: e,
|
|
1990
|
+
className: t,
|
|
1991
|
+
"data-separator": N,
|
|
1992
|
+
"data-testid": s,
|
|
1993
|
+
id: s,
|
|
1994
|
+
onBlur: () => d(!1),
|
|
1995
|
+
onFocus: () => d(!0),
|
|
1996
|
+
ref: p,
|
|
1997
|
+
role: "separator",
|
|
1998
|
+
style: {
|
|
1999
|
+
flexBasis: "auto",
|
|
2000
|
+
cursor: E,
|
|
2001
|
+
...u,
|
|
2002
|
+
flexGrow: 0,
|
|
2003
|
+
flexShrink: 0,
|
|
2004
|
+
// Inform the browser that the library is handling touch events for this element
|
|
2005
|
+
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2006
|
+
touchAction: "none"
|
|
2007
|
+
},
|
|
2008
|
+
tabIndex: n ? void 0 : 0
|
|
2009
|
+
}
|
|
2010
|
+
);
|
|
2011
|
+
}
|
|
2012
|
+
Qt.displayName = "Separator";
|
|
2013
|
+
export {
|
|
2014
|
+
Qt as Q,
|
|
2015
|
+
Yt as U,
|
|
2016
|
+
Ut as Y
|
|
2017
|
+
};
|