@vlrc-fe/components 3.0.3 → 3.0.5
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/CHANGELOG.md +29 -0
- package/README.md +10 -1
- package/bin/registry.mjs +1124 -0
- package/bin/vlrc.mjs +102 -7
- package/dist/ConfirmModal.cjs +268 -1
- package/dist/ConfirmModal.d.ts +5 -21
- package/dist/ConfirmModal.d.ts.map +1 -1
- package/dist/ConfirmModal.js +120 -111
- package/dist/DataTable/DataTable.cjs +203 -1
- package/dist/DataTable/DataTable.js +161 -120
- package/dist/DataTable/components/DataTableColumnHeader.cjs +214 -1
- package/dist/DataTable/components/DataTableColumnHeader.d.ts +3 -3
- package/dist/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableColumnHeader.js +201 -103
- package/dist/DataTable/components/DataTableFacetedFilter.cjs +332 -1
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts +3 -3
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableFacetedFilter.js +285 -181
- package/dist/DataTable/components/DataTablePagination.cjs +200 -1
- package/dist/DataTable/components/DataTablePagination.js +188 -91
- package/dist/DataTable/components/DataTableRowActions.cjs +172 -1
- package/dist/DataTable/components/DataTableRowActions.js +161 -62
- package/dist/DataTable/components/DataTableTable.cjs +100 -1
- package/dist/DataTable/components/DataTableTable.js +87 -35
- package/dist/DataTable/components/DataTableToolbar.cjs +112 -1
- package/dist/DataTable/components/DataTableToolbar.js +106 -44
- package/dist/DataTable/components/DataTableViewOptions.cjs +113 -1
- package/dist/DataTable/components/DataTableViewOptions.js +105 -44
- package/dist/DataTable/render/createColumns.cjs +84 -1
- package/dist/DataTable/render/createColumns.js +65 -44
- package/dist/DataTable/render/defaults.cjs +38 -1
- package/dist/DataTable/render/defaults.js +18 -13
- package/dist/Dropdown/Dropdown.cjs +255 -1
- package/dist/Dropdown/Dropdown.js +138 -108
- package/dist/Form/Form.cjs +439 -1
- package/dist/Form/Form.js +417 -206
- package/dist/Form/FormDatePicker/FormDatePicker.cjs +84 -1
- package/dist/Form/FormDatePicker/FormDatePicker.js +68 -65
- package/dist/Form/FormDatePicker/MonthPickerPanel.cjs +217 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.js +194 -101
- package/dist/Form/FormDatePicker/RangeDatePicker.cjs +144 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.js +94 -77
- package/dist/Form/FormDatePicker/SingleDatePicker.cjs +191 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.js +144 -114
- package/dist/Form/FormDatePicker/TimeInput.cjs +172 -1
- package/dist/Form/FormDatePicker/TimeInput.js +162 -79
- package/dist/Form/FormDatePicker/TimePicker.cjs +107 -1
- package/dist/Form/FormDatePicker/TimePicker.js +58 -43
- package/dist/Form/FormDatePicker/YearPickerPanel.cjs +184 -1
- package/dist/Form/FormDatePicker/YearPickerPanel.js +164 -84
- package/dist/Form/FormDatePicker/types.cjs +10 -1
- package/dist/Form/FormDatePicker/types.js +8 -3
- package/dist/Form/FormDatePicker/useFormDatePicker.cjs +70 -1
- package/dist/Form/FormDatePicker/useFormDatePicker.js +58 -31
- package/dist/Form/FormFileUpload/FileUpload.cjs +603 -1
- package/dist/Form/FormFileUpload/FileUpload.js +452 -306
- package/dist/Form/FormFileUpload/index.cjs +175 -1
- package/dist/Form/FormFileUpload/index.js +164 -50
- package/dist/Form/FormMultiSelect/FormMultiSelect.cjs +46 -1
- package/dist/Form/FormMultiSelect/FormMultiSelect.js +42 -22
- package/dist/Form/FormNumberInput/FormNumberInput.cjs +71 -1
- package/dist/Form/FormNumberInput/FormNumberInput.js +60 -58
- package/dist/Form/FormNumberInput/StepperControls.cjs +104 -1
- package/dist/Form/FormNumberInput/StepperControls.js +78 -43
- package/dist/Form/FormNumberInput/useFormNumberInput.cjs +72 -1
- package/dist/Form/FormNumberInput/useFormNumberInput.js +68 -39
- package/dist/Form/FormRadioGroup/FormRadio.cjs +65 -1
- package/dist/Form/FormRadioGroup/FormRadio.js +38 -38
- package/dist/Form/FormRadioGroup/useFormRadio.cjs +38 -1
- package/dist/Form/FormRadioGroup/useFormRadio.js +27 -16
- package/dist/Form/FormSelect/FormSelect.cjs +46 -1
- package/dist/Form/FormSelect/FormSelect.js +40 -26
- package/dist/Form/FormSelect/useFormSelect.cjs +58 -1
- package/dist/Form/FormSelect/useFormSelect.js +52 -43
- package/dist/Icons/Icons.cjs +155 -1
- package/dist/Icons/Icons.js +142 -142
- package/dist/Modal.cjs +131 -1
- package/dist/Modal.d.ts +2 -14
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +63 -54
- package/dist/MultiSelect/MultiSelect.cjs +210 -1
- package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/MultiSelect.js +126 -117
- package/dist/MultiSelect/renderers.cjs +571 -1
- package/dist/MultiSelect/renderers.js +508 -309
- package/dist/MultiSelect/useMultiSelect.cjs +244 -1
- package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/useMultiSelect.js +208 -127
- package/dist/MultiSelect/utils.cjs +123 -1
- package/dist/MultiSelect/utils.js +79 -51
- package/dist/Select/BaseSelect.cjs +265 -1
- package/dist/Select/BaseSelect.js +165 -126
- package/dist/Select/MultiSelectTags.cjs +129 -1
- package/dist/Select/MultiSelectTags.js +82 -56
- package/dist/Typography/Blockquote.cjs +79 -1
- package/dist/Typography/Blockquote.js +40 -38
- package/dist/Typography/Code.cjs +131 -1
- package/dist/Typography/Code.js +64 -58
- package/dist/Typography/Link.cjs +139 -1
- package/dist/Typography/Link.d.ts +1 -2
- package/dist/Typography/Link.d.ts.map +1 -1
- package/dist/Typography/Link.js +73 -64
- package/dist/Typography/Paragraph.cjs +224 -1
- package/dist/Typography/Paragraph.d.ts +1 -2
- package/dist/Typography/Paragraph.d.ts.map +1 -1
- package/dist/Typography/Paragraph.js +118 -108
- package/dist/Typography/Text.cjs +223 -1
- package/dist/Typography/Text.d.ts +1 -2
- package/dist/Typography/Text.d.ts.map +1 -1
- package/dist/Typography/Text.js +117 -101
- package/dist/Typography/Title.cjs +220 -1
- package/dist/Typography/Title.d.ts +1 -2
- package/dist/Typography/Title.d.ts.map +1 -1
- package/dist/Typography/Title.js +126 -104
- package/dist/Typography/Typography.cjs +17 -1
- package/dist/Typography/Typography.d.ts +8 -4
- package/dist/Typography/Typography.d.ts.map +1 -1
- package/dist/Typography/Typography.js +14 -14
- package/dist/Typography/index.d.ts +1 -4
- package/dist/Typography/index.d.ts.map +1 -1
- package/dist/Typography/index.js +10 -13
- package/dist/Typography/tooltip.cjs +42 -1
- package/dist/Typography/tooltip.js +34 -14
- package/dist/Typography/types.cjs +20 -1
- package/dist/Typography/types.d.ts +4 -0
- package/dist/Typography/types.d.ts.map +1 -1
- package/dist/Typography/types.js +5 -2
- package/dist/Typography/utils.cjs +52 -1
- package/dist/Typography/utils.js +48 -21
- package/dist/Typography/weightStyles.cjs +58 -1
- package/dist/Typography/weightStyles.js +26 -25
- package/dist/_virtual/_rolldown/runtime.cjs +32 -1
- package/dist/_virtual/_rolldown/runtime.js +9 -7
- package/dist/assets/stylex.css +167 -9
- package/dist/astryx.cjs +9 -1
- package/dist/astryx.d.ts +0 -1
- package/dist/astryx.d.ts.map +1 -1
- package/dist/astryx.js +0 -1
- package/dist/index.cjs +779 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +119 -118
- package/dist/layout/Box.cjs +180 -1
- package/dist/layout/Box.d.ts +6 -8
- package/dist/layout/Box.d.ts.map +1 -1
- package/dist/layout/Box.js +116 -50
- package/dist/layout/Center.cjs +40 -1
- package/dist/layout/Center.d.ts +3 -3
- package/dist/layout/Center.d.ts.map +1 -1
- package/dist/layout/Center.js +39 -21
- package/dist/layout/Container.cjs +92 -1
- package/dist/layout/Container.d.ts +6 -8
- package/dist/layout/Container.d.ts.map +1 -1
- package/dist/layout/Container.js +46 -31
- package/dist/layout/Stack.cjs +199 -1
- package/dist/layout/Stack.d.ts +9 -9
- package/dist/layout/Stack.d.ts.map +1 -1
- package/dist/layout/Stack.js +186 -79
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +9 -9
- package/dist/lazyLoad.cjs +13 -1
- package/dist/lazyLoad.d.ts.map +1 -1
- package/dist/lazyLoad.js +9 -9
- package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +551 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +440 -234
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +546 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +452 -236
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +330 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +272 -164
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +150 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +132 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +90 -74
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +92 -67
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +11 -1
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +8 -7
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +48 -1
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +34 -31
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +145 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.js +111 -73
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +38 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +19 -16
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.cjs +126 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.js +103 -72
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.cjs +134 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.js +113 -79
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.cjs +541 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.js +459 -331
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +39 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +26 -22
- package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.cjs +304 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.js +234 -160
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.cjs +108 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.js +82 -67
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.cjs +19 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.js +12 -10
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +275 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +228 -127
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +53 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +40 -22
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +215 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.js +171 -117
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.cjs +219 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.js +178 -118
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.cjs +22 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.js +17 -13
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.cjs +802 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.js +648 -422
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.cjs +410 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.js +313 -212
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +741 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.js +602 -417
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.cjs +246 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.js +195 -121
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.cjs +27 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.js +20 -17
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.cjs +148 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.js +115 -67
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.cjs +55 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.js +27 -21
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +223 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -131
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.cjs +576 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.js +437 -308
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.cjs +202 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.js +160 -125
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.cjs +159 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.js +125 -93
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +158 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.js +128 -98
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.cjs +39 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.js +29 -24
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +19 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +109 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +91 -68
- package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +28 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.js +22 -17
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +33 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +25 -19
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +7 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.cjs +25 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +18 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.cjs +47 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +38 -28
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +38 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.js +19 -15
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +106 -1
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +95 -34
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +5 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +3 -3
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +6 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +4 -4
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +423 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +237 -202
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +35 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +42 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +37 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +20 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +7 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +5 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +27 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +15 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +41 -4
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +42 -4
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +49 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +46 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +358 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +341 -45
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +31 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +28 -7
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +35 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +32 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +44 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +41 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +49 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +46 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +61 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +58 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +38 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +35 -3
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +39 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +36 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +8 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +5 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +50 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +45 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +27 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +20 -14
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +18 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +13 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +77 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +14 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +31 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +6 -6
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +11 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +4 -3
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +210 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +197 -188
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +122 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +12 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +28 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +20 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +34 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +31 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +37 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +32 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +41 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +38 -7
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +42 -6
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +56 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +53 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +35 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +32 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +42 -4
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +34 -1
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +32 -21
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +39 -1
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +27 -20
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1391 -1
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1178 -803
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +7 -1
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +3 -4
- package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.cjs +369 -2
- package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.js +282 -238
- package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +625 -1
- package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +545 -276
- package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.cjs +1033 -9
- package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js +898 -460
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +47 -38
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +38 -64
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +13 -1
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +9 -2
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.cjs +4 -1
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +36 -1
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -16
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +15 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -10
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +167 -4
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +144 -93
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.cjs +63 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +45 -35
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +14 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +11 -9
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +84 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +75 -43
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.cjs +3 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
- package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.cjs +1617 -1
- package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +1332 -874
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.cjs +18 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.js +15 -7
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.cjs +26 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +20 -10
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.cjs +4 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.cjs +40 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +29 -16
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +36 -1
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +25 -14
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +20 -1
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +18 -3
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +46 -1
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +38 -19
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.cjs +39 -1
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +29 -11
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.cjs +18 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.js +13 -12
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.cjs +81 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.js +58 -45
- package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.cjs +1252 -3
- package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.js +1003 -648
- package/dist/theme/index.cjs +63 -1
- package/dist/theme/index.js +31 -31
- package/dist/theme/spacing.cjs +93 -1
- package/dist/theme/spacing.js +52 -26
- package/dist/theme/tokens.stylex.cjs +210 -1
- package/dist/theme/tokens.stylex.js +58 -26
- package/dist/theme/types.cjs +13 -1
- package/dist/theme/types.js +4 -3
- package/dist/theme/width.cjs +39 -1
- package/dist/theme/width.js +16 -4
- package/dist/theme/zIndex.cjs +62 -1
- package/dist/theme/zIndex.d.ts +4 -4
- package/dist/theme/zIndex.d.ts.map +1 -1
- package/dist/theme/zIndex.js +44 -15
- package/dist/theme.css +167 -9
- package/dist/ui/accordion.cjs +431 -1
- package/dist/ui/accordion.d.ts +10 -10
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +276 -136
- package/dist/ui/action-bar.cjs +274 -1
- package/dist/ui/action-bar.d.ts +11 -11
- package/dist/ui/action-bar.d.ts.map +1 -1
- package/dist/ui/action-bar.js +204 -98
- package/dist/ui/alert-dialog.cjs +538 -1
- package/dist/ui/alert-dialog.d.ts +19 -19
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +459 -167
- package/dist/ui/alert.cjs +163 -1
- package/dist/ui/alert.d.ts +7 -7
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +111 -50
- package/dist/ui/aspect-ratio.cjs +24 -1
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +22 -13
- package/dist/ui/avatar.cjs +340 -1
- package/dist/ui/avatar.d.ts +10 -10
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +226 -115
- package/dist/ui/badge-overflow.cjs +66 -1
- package/dist/ui/badge-overflow.d.ts +5 -5
- package/dist/ui/badge-overflow.d.ts.map +1 -1
- package/dist/ui/badge-overflow.js +34 -27
- package/dist/ui/badge.cjs +167 -1
- package/dist/ui/badge.d.ts +3 -3
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +48 -42
- package/dist/ui/breadcrumb.cjs +508 -1
- package/dist/ui/breadcrumb.d.ts +15 -15
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +386 -159
- package/dist/ui/button.cjs +425 -1
- package/dist/ui/button.d.ts +3 -3
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +137 -117
- package/dist/ui/calendar.cjs +625 -1
- package/dist/ui/calendar.d.ts +5 -5
- package/dist/ui/calendar.d.ts.map +1 -1
- package/dist/ui/calendar.js +309 -193
- package/dist/ui/card.cjs +401 -1
- package/dist/ui/card.d.ts +15 -15
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +300 -119
- package/dist/ui/carousel.cjs +332 -1
- package/dist/ui/carousel.d.ts +10 -10
- package/dist/ui/carousel.d.ts.map +1 -1
- package/dist/ui/carousel.js +245 -127
- package/dist/ui/checkbox.cjs +163 -1
- package/dist/ui/checkbox.d.ts +4 -4
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +62 -58
- package/dist/ui/circular-progress.cjs +144 -1
- package/dist/ui/circular-progress.d.ts +5 -5
- package/dist/ui/circular-progress.d.ts.map +1 -1
- package/dist/ui/circular-progress.js +85 -67
- package/dist/ui/code-block.cjs +823 -0
- package/dist/ui/code-block.d.ts +89 -0
- package/dist/ui/code-block.d.ts.map +1 -0
- package/dist/ui/code-block.js +813 -0
- package/dist/ui/collapsible.cjs +64 -1
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +58 -29
- package/dist/ui/command.cjs +556 -1
- package/dist/ui/command.d.ts +19 -19
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/command.js +432 -163
- package/dist/ui/compare-slider.cjs +169 -1
- package/dist/ui/compare-slider.d.ts +8 -7
- package/dist/ui/compare-slider.d.ts.map +1 -1
- package/dist/ui/compare-slider.js +106 -73
- package/dist/ui/context-menu.cjs +810 -1
- package/dist/ui/context-menu.d.ts +26 -26
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +693 -229
- package/dist/ui/copy-button.cjs +93 -1
- package/dist/ui/copy-button.d.ts +1 -2
- package/dist/ui/copy-button.d.ts.map +1 -1
- package/dist/ui/copy-button.js +56 -45
- package/dist/ui/dialog.cjs +411 -1
- package/dist/ui/dialog.d.ts +18 -18
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +319 -131
- package/dist/ui/drawer.cjs +478 -1
- package/dist/ui/drawer.d.ts +17 -17
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +396 -151
- package/dist/ui/dropdown-menu.cjs +638 -1
- package/dist/ui/dropdown-menu.d.ts +26 -26
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +511 -208
- package/dist/ui/editable.cjs +609 -1
- package/dist/ui/editable.d.ts +14 -14
- package/dist/ui/editable.d.ts.map +1 -1
- package/dist/ui/editable.js +479 -218
- package/dist/ui/empty.cjs +295 -1
- package/dist/ui/empty.d.ts +15 -15
- package/dist/ui/empty.d.ts.map +1 -1
- package/dist/ui/empty.js +267 -112
- package/dist/ui/field.cjs +621 -1
- package/dist/ui/field.d.ts +21 -21
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/field.js +468 -198
- package/dist/ui/file-upload-adapters.cjs +289 -1
- package/dist/ui/file-upload-adapters.d.ts +1 -2
- package/dist/ui/file-upload-adapters.d.ts.map +1 -1
- package/dist/ui/file-upload-adapters.js +244 -170
- package/dist/ui/file-upload.cjs +1480 -1
- package/dist/ui/file-upload.d.ts +22 -22
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +1064 -599
- package/dist/ui/flex.cjs +202 -1
- package/dist/ui/flex.d.ts +7 -6
- package/dist/ui/flex.d.ts.map +1 -1
- package/dist/ui/flex.js +111 -93
- package/dist/ui/form.cjs +453 -1
- package/dist/ui/form.d.ts +11 -11
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +421 -136
- package/dist/ui/gauge.cjs +125 -1
- package/dist/ui/gauge.d.ts +7 -6
- package/dist/ui/gauge.d.ts.map +1 -1
- package/dist/ui/gauge.js +60 -53
- package/dist/ui/grid.cjs +224 -1
- package/dist/ui/grid.d.ts +11 -7
- package/dist/ui/grid.d.ts.map +1 -1
- package/dist/ui/grid.js +126 -96
- package/dist/ui/hover-card.cjs +85 -1
- package/dist/ui/hover-card.d.ts +6 -6
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +57 -37
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/input-group.cjs +322 -1
- package/dist/ui/input-group.d.ts +12 -12
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-group.js +203 -107
- package/dist/ui/input-otp.cjs +312 -1
- package/dist/ui/input-otp.d.ts +10 -10
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +217 -94
- package/dist/ui/input.cjs +388 -1
- package/dist/ui/input.d.ts +3 -3
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +137 -119
- package/dist/ui/item.cjs +585 -1
- package/dist/ui/item.d.ts +20 -20
- package/dist/ui/item.d.ts.map +1 -1
- package/dist/ui/item.js +460 -162
- package/dist/ui/kbd.cjs +115 -1
- package/dist/ui/kbd.d.ts +5 -5
- package/dist/ui/kbd.d.ts.map +1 -1
- package/dist/ui/kbd.js +42 -37
- package/dist/ui/label.cjs +67 -1
- package/dist/ui/label.d.ts +4 -4
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +51 -21
- package/dist/ui/marker.cjs +297 -0
- package/dist/ui/marker.d.ts +25 -0
- package/dist/ui/marker.d.ts.map +1 -0
- package/dist/ui/marker.js +293 -0
- package/dist/ui/masonry.cjs +56 -1
- package/dist/ui/masonry.d.ts +4 -4
- package/dist/ui/masonry.d.ts.map +1 -1
- package/dist/ui/masonry.js +40 -37
- package/dist/ui/menubar.cjs +907 -1
- package/dist/ui/menubar.d.ts +29 -29
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +737 -252
- package/dist/ui/navigation-menu.cjs +560 -1
- package/dist/ui/navigation-menu.d.ts +18 -18
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +442 -148
- package/dist/ui/pagination.cjs +575 -1
- package/dist/ui/pagination.d.ts +13 -13
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +422 -172
- package/dist/ui/popover.cjs +93 -1
- package/dist/ui/popover.d.ts +7 -7
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +61 -42
- package/dist/ui/progress.cjs +34 -1
- package/dist/ui/progress.d.ts +3 -3
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +21 -18
- package/dist/ui/questionnaire.cjs +682 -0
- package/dist/ui/questionnaire.d.ts +111 -0
- package/dist/ui/questionnaire.d.ts.map +1 -0
- package/dist/ui/questionnaire.js +670 -0
- package/dist/ui/radio-group.cjs +221 -1
- package/dist/ui/radio-group.d.ts +6 -6
- package/dist/ui/radio-group.d.ts.map +1 -1
- package/dist/ui/radio-group.js +125 -74
- package/dist/ui/rating.cjs +190 -1
- package/dist/ui/rating.d.ts +4 -3
- package/dist/ui/rating.d.ts.map +1 -1
- package/dist/ui/rating.js +96 -79
- package/dist/ui/resizable.cjs +174 -1
- package/dist/ui/resizable.d.ts +7 -7
- package/dist/ui/resizable.d.ts.map +1 -1
- package/dist/ui/resizable.js +150 -55
- package/dist/ui/responsive-dialog.cjs +400 -1
- package/dist/ui/responsive-dialog.d.ts +17 -17
- package/dist/ui/responsive-dialog.d.ts.map +1 -1
- package/dist/ui/responsive-dialog.js +372 -155
- package/dist/ui/row-col.cjs +508 -1
- package/dist/ui/row-col.d.ts +13 -11
- package/dist/ui/row-col.d.ts.map +1 -1
- package/dist/ui/row-col.js +238 -207
- package/dist/ui/scroll-area.cjs +129 -1
- package/dist/ui/scroll-area.d.ts +6 -6
- package/dist/ui/scroll-area.d.ts.map +1 -1
- package/dist/ui/scroll-area.js +92 -49
- package/dist/ui/segmented.cjs +169 -1
- package/dist/ui/segmented.d.ts +6 -5
- package/dist/ui/segmented.d.ts.map +1 -1
- package/dist/ui/segmented.js +75 -63
- package/dist/ui/select.cjs +484 -1
- package/dist/ui/select.d.ts +17 -17
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +353 -160
- package/dist/ui/separator.cjs +44 -1
- package/dist/ui/separator.d.ts +4 -4
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +17 -17
- package/dist/ui/sheet.cjs +462 -1
- package/dist/ui/sheet.d.ts +16 -16
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +331 -141
- package/dist/ui/sidebar.cjs +1452 -1
- package/dist/ui/sidebar.d.ts +48 -48
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +1057 -439
- package/dist/ui/signature-pad.cjs +741 -0
- package/dist/ui/signature-pad.d.ts +115 -0
- package/dist/ui/signature-pad.d.ts.map +1 -0
- package/dist/ui/signature-pad.js +731 -0
- package/dist/ui/skeleton.cjs +62 -1
- package/dist/ui/skeleton.d.ts +3 -3
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/skeleton.js +50 -20
- package/dist/ui/slider.cjs +47 -1
- package/dist/ui/slider.d.ts +4 -4
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +27 -26
- package/dist/ui/sonner.cjs +28 -1
- package/dist/ui/sonner.js +24 -22
- package/dist/ui/spinner.cjs +73 -1
- package/dist/ui/spinner.d.ts +3 -3
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +29 -28
- package/dist/ui/stat.cjs +320 -1
- package/dist/ui/stat.d.ts +15 -15
- package/dist/ui/stat.d.ts.map +1 -1
- package/dist/ui/stat.js +275 -148
- package/dist/ui/stepper.cjs +785 -1
- package/dist/ui/stepper.d.ts +24 -24
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +594 -281
- package/dist/ui/switch.cjs +199 -1
- package/dist/ui/switch.d.ts +4 -4
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +79 -72
- package/dist/ui/table.cjs +435 -1
- package/dist/ui/table.d.ts +17 -17
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +369 -129
- package/dist/ui/tabs.cjs +340 -1
- package/dist/ui/tabs.d.ts +10 -10
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +204 -95
- package/dist/ui/tags-input.cjs +585 -1
- package/dist/ui/tags-input.d.ts +13 -13
- package/dist/ui/tags-input.d.ts.map +1 -1
- package/dist/ui/tags-input.js +446 -221
- package/dist/ui/textarea.cjs +119 -1
- package/dist/ui/textarea.d.ts +3 -3
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +37 -33
- package/dist/ui/timeline.cjs +583 -1
- package/dist/ui/timeline.d.ts +22 -22
- package/dist/ui/timeline.d.ts.map +1 -1
- package/dist/ui/timeline.js +409 -198
- package/dist/ui/toggle-group.cjs +128 -1
- package/dist/ui/toggle-group.d.ts +7 -7
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +92 -41
- package/dist/ui/toggle.cjs +145 -1
- package/dist/ui/toggle.d.ts +4 -4
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +38 -34
- package/dist/ui/tooltip.cjs +81 -1
- package/dist/ui/tooltip.d.ts +7 -7
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +50 -37
- package/dist/ui/useBreakpoint.cjs +91 -1
- package/dist/ui/useBreakpoint.js +66 -43
- package/dist/utils.cjs +4 -1
- package/dist/utils.d.ts +2 -12
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +3 -6
- package/package.json +10 -2
|
@@ -1 +1,1617 @@
|
|
|
1
|
-
const e=require("../../../../../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t);var n=(0,t.createContext)(null);n.displayName=`PanelGroupContext`;var r={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},i=10,a=t.useLayoutEffect,o=t.useId,s=typeof o==`function`?o:()=>null,c=0;function l(e=null){let n=s(),r=(0,t.useRef)(e||n||null);return r.current===null&&(r.current=``+c++),e??r.current}function u({children:e,className:i=``,collapsedSize:o,collapsible:s,defaultSize:c,forwardedRef:u,id:d,maxSize:f,minSize:p,onCollapse:m,onExpand:h,onResize:g,order:_,style:v,tagName:y=`div`,...b}){let x=(0,t.useContext)(n);if(x===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:S,expandPanel:C,getPanelSize:w,getPanelStyle:T,groupId:E,isPanelCollapsed:D,reevaluatePanelConstraints:O,registerPanel:k,resizePanel:A,unregisterPanel:j}=x,M=l(d),N=(0,t.useRef)({callbacks:{onCollapse:m,onExpand:h,onResize:g},constraints:{collapsedSize:o,collapsible:s,defaultSize:c,maxSize:f,minSize:p},id:M,idIsFromProps:d!==void 0,order:_});(0,t.useRef)({didLogMissingDefaultSizeWarning:!1}),a(()=>{let{callbacks:e,constraints:t}=N.current,n={...t};N.current.id=M,N.current.idIsFromProps=d!==void 0,N.current.order=_,e.onCollapse=m,e.onExpand=h,e.onResize=g,t.collapsedSize=o,t.collapsible=s,t.defaultSize=c,t.maxSize=f,t.minSize=p,(n.collapsedSize!==t.collapsedSize||n.collapsible!==t.collapsible||n.maxSize!==t.maxSize||n.minSize!==t.minSize)&&O(N.current,n)}),a(()=>{let e=N.current;return k(e),()=>{j(e)}},[_,M,k,j]),(0,t.useImperativeHandle)(u,()=>({collapse:()=>{S(N.current)},expand:e=>{C(N.current,e)},getId(){return M},getSize(){return w(N.current)},isCollapsed(){return D(N.current)},isExpanded(){return!D(N.current)},resize:e=>{A(N.current,e)}}),[S,C,w,D,M,A]);let P=T(N.current,c);return(0,t.createElement)(y,{...b,children:e,className:i,id:M,style:{...P,...v},[r.groupId]:E,[r.panel]:``,[r.panelCollapsible]:s||void 0,[r.panelId]:M,[r.panelSize]:parseFloat(``+P.flexGrow).toFixed(1)})}var d=(0,t.forwardRef)((e,n)=>(0,t.createElement)(u,{...e,forwardedRef:n}));u.displayName=`Panel`,d.displayName=`forwardRef(Panel)`;var f;function p(){return f}var m=null,h=!0,g=-1,_=null;function v(e,t){if(t){let e=(t&ee)!==0,n=(t&te)!==0,r=(t&ne)!==0,i=(t&re)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function y(){_!==null&&(document.head.removeChild(_),m=null,_=null,g=-1)}function b(e,t){if(!h)return;let n=v(e,t);if(m!==n){if(m=n,_===null){_=document.createElement(`style`);let e=p();e&&_.setAttribute(`nonce`,e),document.head.appendChild(_)}if(g>=0){var r;(r=_.sheet)==null||r.removeRule(g)}g=_.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function x(e){return e.type===`keydown`}function S(e){return e.type.startsWith(`pointer`)}function C(e){return e.type.startsWith(`mouse`)}function w(e){if(S(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(C(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function T(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function E(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function D(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:N(e),b:N(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;H(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:M(j(n.a)),b:M(j(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var O=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function k(e){let t=getComputedStyle(P(e)??e).display;return t===`flex`||t===`inline-flex`}function A(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||k(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`||O.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function j(e){let t=e.length;for(;t--;){let n=e[t];if(H(n,`Missing node`),A(n))return n}return null}function M(e){return e&&Number(getComputedStyle(e).zIndex)||0}function N(e){let t=[];for(;e;)t.push(e),e=P(e);return t}function P(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var ee=1,te=2,ne=4,re=8,ie=T()===`coarse`,F=[],I=!1,L=new Map,R=new Map,z=new Set;function ae(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=L.get(a)??0;return L.set(a,s+1),z.add(o),fe(),function(){R.delete(e),z.delete(o);let t=L.get(a)??1;if(L.set(a,t-1),fe(),t===1&&L.delete(a),F.includes(o)){let e=F.indexOf(o);e>=0&&F.splice(e,1),ue(),i(`up`,!0,null)}}}function oe(e){let{target:t}=e,{x:n,y:r}=w(e);I=!0,ce({target:t,x:n,y:r}),fe(),F.length>0&&(pe(`down`,e),e.preventDefault(),se(t)||e.stopImmediatePropagation())}function B(e){let{x:t,y:n}=w(e);if(I&&e.buttons===0&&(I=!1,pe(`up`,e)),!I){let{target:r}=e;ce({target:r,x:t,y:n})}pe(`move`,e),ue(),F.length>0&&e.preventDefault()}function V(e){let{target:t}=e,{x:n,y:r}=w(e);R.clear(),I=!1,F.length>0&&(e.preventDefault(),se(t)||e.stopImmediatePropagation()),pe(`up`,e),ce({target:t,x:n,y:r}),ue(),fe()}function se(e){let t=e;for(;t;){if(t.hasAttribute(r.resizeHandle))return!0;t=t.parentElement}return!1}function ce({target:e,x:t,y:n}){F.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),z.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=ie?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&D(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(E(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}F.push(e)}})}function le(e,t){R.set(e,t)}function ue(){let e=!1,t=!1;F.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;R.forEach(e=>{n|=e}),e&&t?b(`intersection`,n):e?b(`horizontal`,n):t?b(`vertical`,n):y()}var de=new AbortController;function fe(){de.abort(),de=new AbortController;let e={capture:!0,signal:de.signal};z.size&&(I?(F.length>0&&L.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,V,e),r.addEventListener(`pointerleave`,B,e),r.addEventListener(`pointermove`,B,e))}),window.addEventListener(`pointerup`,V,e),window.addEventListener(`pointercancel`,V,e)):L.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,oe,e),r.addEventListener(`pointermove`,B,e))}))}function pe(e,t){z.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,F.includes(n),t)})}function me(){let[e,n]=(0,t.useState)(0);return(0,t.useCallback)(()=>n(e=>e+1),[])}function H(e,t){if(!e)throw console.error(t),Error(t)}function U(e,t,n=i){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function W(e,t,n=i){return U(e,t,n)===0}function G(e,t,n){return U(e,t,n)===0}function he(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!G(i,a,n))return!1}return!0}function K({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];H(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:a=0,collapsible:o,maxSize:s=100,minSize:c=0}=r;if(U(n,c)<0){if(o){let e=(a+c)/2;n=U(n,e)<0?a:c}else n=c}return n=Math.min(s,n),n=parseFloat(n.toFixed(i)),n}function q({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(G(e,0))return t;let o=[...t],[s,c]=r;H(s!=null,`Invalid first pivot index`),H(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];H(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(H(n!=null,`Previous layout not found for panel index ${r}`),G(n,a)){let t=l-n;U(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];H(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(H(n!=null,`Previous layout not found for panel index ${r}`),G(n,l)){let t=n-a;U(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];H(e!=null,`Previous layout not found for panel index ${i}`);let o=K({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];H(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=K({panelConstraints:n,panelIndex:r,size:s});if(!G(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(he(i,o))return i;{let r=e<0?c:s,i=t[r];H(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=K({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!G(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];H(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=K({panelConstraints:n,panelIndex:r,size:a});if(G(i,s)||(t-=s-i,o[r]=s),G(t,0))break;e>0?r--:r++}}}return G(o.reduce((e,t)=>t+e,0),100)?o:i}function ge({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return H(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function J(e,t=document){return Array.from(t.querySelectorAll(`[${r.resizeHandleId}][data-panel-group-id="${e}"]`))}function _e(e,t,n=document){return J(e,n).findIndex(e=>e.getAttribute(r.resizeHandleId)===t)??null}function ve(e,t,n){let r=_e(e,t,n);return r==null?[-1,-1]:[r,r+1]}function ye(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function Y(e,t=document){return t.querySelector(`[${r.resizeHandleId}="${e}"]`)||null}function be(e,t,n,r=document){let i=Y(t,r),a=J(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function xe({committedValuesRef:e,eagerValuesRef:n,groupId:i,layout:o,panelDataArray:s,panelGroupElement:c,setLayout:l}){(0,t.useRef)({didWarnAboutMissingResizeHandle:!1}),a(()=>{if(!c)return;let e=J(i,c);for(let t=0;t<s.length-1;t++){let{valueMax:n,valueMin:r,valueNow:i}=ge({layout:o,panelsArray:s,pivotIndices:[t,t+1]}),a=e[t];if(a!=null){let e=s[t];H(e,`No panel data found for index "${t}"`),a.setAttribute(`aria-controls`,e.id),a.setAttribute(`aria-valuemax`,``+Math.round(n)),a.setAttribute(`aria-valuemin`,``+Math.round(r)),a.setAttribute(`aria-valuenow`,i==null?``:``+Math.round(i))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[i,o,s,c]),(0,t.useEffect)(()=>{if(!c)return;let e=n.current;H(e,`Eager values not found`);let{panelDataArray:t}=e;H(ye(i,c)!=null,`No group found for id "${i}"`);let a=J(i,c);H(a,`No resize handles found for group id "${i}"`);let s=a.map(e=>{let n=e.getAttribute(r.resizeHandleId);H(n,`Resize handle element has no handle id attribute`);let[a,s]=be(i,n,t,c);if(a==null||s==null)return()=>{};let u=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let r=t.findIndex(e=>e.id===a);if(r>=0){let e=t[r];H(e,`No panel data found for index ${r}`);let a=o[r],{collapsedSize:s=0,collapsible:u,minSize:d=0}=e.constraints;if(a!=null&&u){let e=q({delta:G(a,s)?d-s:s-a,initialLayout:o,panelConstraints:t.map(e=>e.constraints),pivotIndices:ve(i,n,c),prevLayout:o,trigger:`keyboard`});o!==e&&l(e)}}break}}};return e.addEventListener(`keydown`,u),()=>{e.removeEventListener(`keydown`,u)}});return()=>{s.forEach(e=>e())}},[c,e,n,i,o,s,l])}function Se(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ce(e,t){let n=e===`horizontal`,{x:r,y:i}=w(t);return n?r:i}function we(e,t,n,i,a){let o=n===`horizontal`,s=Y(t,a);H(s,`No resize handle element found for id "${t}"`);let c=s.getAttribute(r.groupId);H(c,`Resize handle element has no group id attribute`);let{initialCursorPosition:l}=i,u=Ce(n,e),d=ye(c,a);H(d,`No group element found for id "${c}"`);let f=d.getBoundingClientRect(),p=o?f.width:f.height;return(u-l)/p*100}function Te(e,t,n,r,i,a){if(x(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100}return a}return r==null?0:we(e,t,n,r,a)}function Ee({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];H(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];H(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function X(e,t,n){t.forEach((t,r)=>{let i=e[r];H(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||W(u,c))&&!W(t,c)&&r(),e&&(u==null||!W(u,c))&&W(t,c)&&e())}})}function De(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Oe({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function ke(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Ae(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function je(e){return`react-resizable-panels:${e}`}function Me(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function Ne(e,t){try{let n=je(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function Pe(e,t,n){return(Ne(e,n)??{})[Me(t)]??null}function Fe(e,t,n,r,i){let a=je(e),o=Me(t),s=Ne(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function Ie({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!G(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];H(t!=null,`No layout data found for index ${e}`);let i=100/r*t;n[e]=i}let i=0;for(let e=0;e<t.length;e++){let r=n[e];H(r!=null,`No layout data found for index ${e}`);let a=K({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!G(i,0))for(let e=0;e<t.length;e++){let r=n[e];H(r!=null,`No layout data found for index ${e}`);let a=r+i,o=K({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,G(i,0)))break}return n}var Le=100,Z={getItem:e=>(Ae(Z),Z.getItem(e)),setItem:(e,t)=>{Ae(Z),Z.setItem(e,t)}},Re={};function ze({autoSaveId:e=null,children:i,className:o=``,direction:s,forwardedRef:c,id:u=null,onLayout:d=null,keyboardResizeBy:f=null,storage:p=Z,style:m,tagName:h=`div`,...g}){let _=l(u),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(null),[w,T]=(0,t.useState)([]),E=me(),D=(0,t.useRef)({}),O=(0,t.useRef)(new Map),k=(0,t.useRef)(0),A=(0,t.useRef)({autoSaveId:e,direction:s,dragState:y,id:_,keyboardResizeBy:f,onLayout:d,storage:p}),j=(0,t.useRef)({layout:w,panelDataArray:[],panelDataArrayChanged:!1});(0,t.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,t.useImperativeHandle)(c,()=>({getId:()=>A.current.id,getLayout:()=>{let{layout:e}=j.current;return e},setLayout:e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current,i=Ie({layout:e,panelConstraints:r.map(e=>e.constraints)});Se(n,i)||(T(i),j.current.layout=i,t&&t(i),X(r,i,D.current))}}),[]),a(()=>{A.current.autoSaveId=e,A.current.direction=s,A.current.dragState=y,A.current.id=_,A.current.onLayout=d,A.current.storage=p}),xe({committedValuesRef:A,eagerValuesRef:j,groupId:_,layout:w,panelDataArray:j.current.panelDataArray,setLayout:T,panelGroupElement:v.current}),(0,t.useEffect)(()=>{let{panelDataArray:t}=j.current;if(e){if(w.length===0||w.length!==t.length)return;let n=Re[e];n??(n=ke(Fe,Le),Re[e]=n);let r=[...t],i=new Map(O.current);n(e,r,i,w,p)}},[e,w,p]),(0,t.useEffect)(()=>{});let M=(0,t.useCallback)(e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=$(r,e,n);if(H(o!=null,`Panel size not found for panel "${e.id}"`),!W(o,a)){O.current.set(e.id,o);let c=q({delta:Q(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});De(n,c)||(T(c),j.current.layout=c,t&&t(c),X(r,c,D.current))}}},[]),N=(0,t.useCallback)((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=$(i,e,r),u=t??c;if(W(s,o)){let t=O.current.get(e.id),o=t!=null&&t>=u?t:u,c=q({delta:Q(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});De(r,c)||(T(c),j.current.layout=c,n&&n(c),X(i,c,D.current))}}},[]),P=(0,t.useCallback)(e=>{let{layout:t,panelDataArray:n}=j.current,{panelSize:r}=$(n,e,t);return H(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),ie=(0,t.useCallback)((e,t)=>{let{panelDataArray:n}=j.current,r=Q(n,e);return Oe({defaultSize:t,dragState:y,layout:w,panelData:n,panelIndex:r})},[y,w]),F=(0,t.useCallback)(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=$(n,e,t);return H(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&W(a,r)},[]),I=(0,t.useCallback)(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=$(n,e,t);return H(a!=null,`Panel size not found for panel "${e.id}"`),!i||U(a,r)>0},[]),L=(0,t.useCallback)(e=>{let{panelDataArray:t}=j.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),j.current.panelDataArrayChanged=!0,E()},[E]);a(()=>{if(j.current.panelDataArrayChanged){j.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=null;if(e){let t=Pe(e,i,n);t&&(O.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=Ee({panelDataArray:i});let o=Ie({layout:a,panelConstraints:i.map(e=>e.constraints)});Se(r,o)||(T(o),j.current.layout=o,t&&t(o),X(i,o,D.current))}}),a(()=>{let e=j.current;return()=>{e.layout=[]}},[]);let R=(0,t.useCallback)(e=>{let t=!1,n=v.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=v.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=A.current,{layout:l,panelDataArray:u}=j.current,{initialLayout:d}=a??{},f=ve(o,e,r),p=Te(n,e,i,a,s,r),m=i===`horizontal`;m&&t&&(p=-p);let h=u.map(e=>e.constraints),g=q({delta:p,initialLayout:d??l,panelConstraints:h,pivotIndices:f,prevLayout:l,trigger:x(n)?`keyboard`:`mouse-or-touch`}),_=!De(l,g);(S(n)||C(n))&&k.current!=p&&(k.current=p,!_&&p!==0?m?le(e,p<0?ee:te):le(e,p<0?ne:re):le(e,0)),_&&(T(g),j.current.layout=g,c&&c(g),X(u,g,D.current))}},[]),z=(0,t.useCallback)((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=$(i,e,r);H(o!=null,`Panel size not found for panel "${e.id}"`);let c=q({delta:Q(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});De(r,c)||(T(c),j.current.layout=c,n&&n(c),X(i,c,D.current))},[]),ae=(0,t.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=j.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=$(r,e,n);u!=null&&(a&&s&&W(u,i)?W(i,o)||z(e,o):u<l?z(e,l):u>c&&z(e,c))},[z]),oe=(0,t.useCallback)((e,t)=>{let{direction:n}=A.current,{layout:r}=j.current;if(!v.current)return;let i=Y(e,v.current);H(i,`Drag handle element not found for id "${e}"`);let a=Ce(n,t);b({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),B=(0,t.useCallback)(()=>{b(null)},[]),V=(0,t.useCallback)(e=>{let{panelDataArray:t}=j.current,n=Q(t,e);n>=0&&(t.splice(n,1),delete D.current[e.id],j.current.panelDataArrayChanged=!0,E())},[E]),se=(0,t.useMemo)(()=>({collapsePanel:M,direction:s,dragState:y,expandPanel:N,getPanelSize:P,getPanelStyle:ie,groupId:_,isPanelCollapsed:F,isPanelExpanded:I,reevaluatePanelConstraints:ae,registerPanel:L,registerResizeHandle:R,resizePanel:z,startDragging:oe,stopDragging:B,unregisterPanel:V,panelGroupElement:v.current}),[M,y,s,N,P,ie,_,F,I,ae,L,R,z,oe,B,V]),ce={display:`flex`,flexDirection:s===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,t.createElement)(n.Provider,{value:se},(0,t.createElement)(h,{...g,children:i,className:o,id:u,ref:v,style:{...ce,...m},[r.group]:``,[r.groupDirection]:s,[r.groupId]:_}))}var Be=(0,t.forwardRef)((e,n)=>(0,t.createElement)(ze,{...e,forwardedRef:n}));ze.displayName=`PanelGroup`,Be.displayName=`forwardRef(PanelGroup)`;function Q(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function $(e,t,n){let r=Q(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function Ve({disabled:e,handleId:n,resizeHandler:i,panelGroupElement:a}){(0,t.useEffect)(()=>{if(e||i==null||a==null)return;let t=Y(n,a);if(t==null)return;let o=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),i(e);break;case`F6`:{e.preventDefault();let i=t.getAttribute(r.groupId);H(i,`No group element found for id "${i}"`);let o=J(i,a),s=_e(i,n,a);H(s!==null,`No resize element found for id "${n}"`),o[e.shiftKey?s>0?s-1:o.length-1:s+1<o.length?s+1:0].focus();break}}};return t.addEventListener(`keydown`,o),()=>{t.removeEventListener(`keydown`,o)}},[a,e,n,i])}function He({children:e=null,className:i=``,disabled:o=!1,hitAreaMargins:s,id:c,onBlur:u,onClick:d,onDragging:f,onFocus:p,onPointerDown:m,onPointerUp:h,style:g={},tabIndex:_=0,tagName:v=`div`,...y}){let b=(0,t.useRef)(null),x=(0,t.useRef)({onClick:d,onDragging:f,onPointerDown:m,onPointerUp:h});(0,t.useEffect)(()=>{x.current.onClick=d,x.current.onDragging=f,x.current.onPointerDown=m,x.current.onPointerUp=h});let S=(0,t.useContext)(n);if(S===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:C,groupId:w,registerResizeHandle:T,startDragging:E,stopDragging:D,panelGroupElement:O}=S,k=l(c),[A,j]=(0,t.useState)(`inactive`),[M,N]=(0,t.useState)(!1),[P,ee]=(0,t.useState)(null),te=(0,t.useRef)({state:A});a(()=>{te.current.state=A}),(0,t.useEffect)(()=>{if(o)ee(null);else{let e=T(k);ee(()=>e)}},[o,k,T]);let ne=s?.coarse??15,re=s?.fine??5;(0,t.useEffect)(()=>{if(o||P==null)return;let e=b.current;H(e,`Element ref not attached`);let t=!1;return ae(k,e,C,{coarse:ne,fine:re},(e,n,r)=>{if(!n)j(`inactive`);else switch(e){case`down`:{j(`drag`),t=!1,H(r,`Expected event to be defined for "down" action`),E(k,r);let{onDragging:e,onPointerDown:n}=x.current;e?.(!0),n?.();break}case`move`:{let{state:e}=te.current;t=!0,e!==`drag`&&j(`hover`),H(r,`Expected event to be defined for "move" action`),P(r);break}case`up`:{j(`hover`),D();let{onClick:e,onDragging:n,onPointerUp:r}=x.current;n?.(!1),r?.(),t||e?.();break}}})},[ne,C,o,re,T,k,P,E,D]),Ve({disabled:o,handleId:k,resizeHandler:P,panelGroupElement:O});let ie={touchAction:`none`,userSelect:`none`};return(0,t.createElement)(v,{...y,children:e,className:i,id:c,onBlur:()=>{N(!1),u?.()},onFocus:()=>{N(!0),p?.()},ref:b,role:`separator`,style:{...ie,...g},tabIndex:_,[r.groupDirection]:C,[r.groupId]:w,[r.resizeHandle]:``,[r.resizeHandleActive]:A===`drag`?`pointer`:M?`keyboard`:void 0,[r.resizeHandleEnabled]:!o,[r.resizeHandleId]:k,[r.resizeHandleState]:A})}He.displayName=`PanelResizeHandle`,exports.DATA_ATTRIBUTES=r,exports.Panel=d,exports.PanelGroup=Be,exports.PanelResizeHandle=He,exports.assert=H,exports.getPanelGroupElement=ye,exports.getResizeHandleElement=Y,exports.getResizeHandleElementIndex=_e,exports.getResizeHandleElementsForGroup=J,exports.getResizeHandlePanelIds=be,exports.intersects=E;
|
|
1
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_runtime.__toESM(react);
|
|
4
|
+
// ../../node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js
|
|
5
|
+
var PanelGroupContext = (0, react.createContext)(null);
|
|
6
|
+
PanelGroupContext.displayName = "PanelGroupContext";
|
|
7
|
+
var DATA_ATTRIBUTES = {
|
|
8
|
+
group: "data-panel-group",
|
|
9
|
+
groupDirection: "data-panel-group-direction",
|
|
10
|
+
groupId: "data-panel-group-id",
|
|
11
|
+
panel: "data-panel",
|
|
12
|
+
panelCollapsible: "data-panel-collapsible",
|
|
13
|
+
panelId: "data-panel-id",
|
|
14
|
+
panelSize: "data-panel-size",
|
|
15
|
+
resizeHandle: "data-resize-handle",
|
|
16
|
+
resizeHandleActive: "data-resize-handle-active",
|
|
17
|
+
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
18
|
+
resizeHandleId: "data-panel-resize-handle-id",
|
|
19
|
+
resizeHandleState: "data-resize-handle-state"
|
|
20
|
+
};
|
|
21
|
+
var PRECISION = 10;
|
|
22
|
+
var useIsomorphicLayoutEffect = react.useLayoutEffect;
|
|
23
|
+
var useId = react["useId".toString()];
|
|
24
|
+
var wrappedUseId = typeof useId === "function" ? useId : () => null;
|
|
25
|
+
var counter = 0;
|
|
26
|
+
function useUniqueId(idFromParams = null) {
|
|
27
|
+
const idFromUseId = wrappedUseId();
|
|
28
|
+
const idRef = (0, react.useRef)(idFromParams || idFromUseId || null);
|
|
29
|
+
if (idRef.current === null) idRef.current = "" + counter++;
|
|
30
|
+
return idFromParams !== null && idFromParams !== void 0 ? idFromParams : idRef.current;
|
|
31
|
+
}
|
|
32
|
+
function PanelWithForwardedRef({ children, className: classNameFromProps = "", collapsedSize, collapsible, defaultSize, forwardedRef, id: idFromProps, maxSize, minSize, onCollapse, onExpand, onResize, order, style: styleFromProps, tagName: Type = "div", ...rest }) {
|
|
33
|
+
const context = (0, react.useContext)(PanelGroupContext);
|
|
34
|
+
if (context === null) throw Error(`Panel components must be rendered within a PanelGroup container`);
|
|
35
|
+
const { collapsePanel, expandPanel, getPanelSize, getPanelStyle, groupId, isPanelCollapsed, reevaluatePanelConstraints, registerPanel, resizePanel, unregisterPanel } = context;
|
|
36
|
+
const panelId = useUniqueId(idFromProps);
|
|
37
|
+
const panelDataRef = (0, react.useRef)({
|
|
38
|
+
callbacks: {
|
|
39
|
+
onCollapse,
|
|
40
|
+
onExpand,
|
|
41
|
+
onResize
|
|
42
|
+
},
|
|
43
|
+
constraints: {
|
|
44
|
+
collapsedSize,
|
|
45
|
+
collapsible,
|
|
46
|
+
defaultSize,
|
|
47
|
+
maxSize,
|
|
48
|
+
minSize
|
|
49
|
+
},
|
|
50
|
+
id: panelId,
|
|
51
|
+
idIsFromProps: idFromProps !== void 0,
|
|
52
|
+
order
|
|
53
|
+
});
|
|
54
|
+
(0, react.useRef)({ didLogMissingDefaultSizeWarning: false });
|
|
55
|
+
useIsomorphicLayoutEffect(() => {
|
|
56
|
+
const { callbacks, constraints } = panelDataRef.current;
|
|
57
|
+
const prevConstraints = { ...constraints };
|
|
58
|
+
panelDataRef.current.id = panelId;
|
|
59
|
+
panelDataRef.current.idIsFromProps = idFromProps !== void 0;
|
|
60
|
+
panelDataRef.current.order = order;
|
|
61
|
+
callbacks.onCollapse = onCollapse;
|
|
62
|
+
callbacks.onExpand = onExpand;
|
|
63
|
+
callbacks.onResize = onResize;
|
|
64
|
+
constraints.collapsedSize = collapsedSize;
|
|
65
|
+
constraints.collapsible = collapsible;
|
|
66
|
+
constraints.defaultSize = defaultSize;
|
|
67
|
+
constraints.maxSize = maxSize;
|
|
68
|
+
constraints.minSize = minSize;
|
|
69
|
+
if (prevConstraints.collapsedSize !== constraints.collapsedSize || prevConstraints.collapsible !== constraints.collapsible || prevConstraints.maxSize !== constraints.maxSize || prevConstraints.minSize !== constraints.minSize) reevaluatePanelConstraints(panelDataRef.current, prevConstraints);
|
|
70
|
+
});
|
|
71
|
+
useIsomorphicLayoutEffect(() => {
|
|
72
|
+
const panelData = panelDataRef.current;
|
|
73
|
+
registerPanel(panelData);
|
|
74
|
+
return () => {
|
|
75
|
+
unregisterPanel(panelData);
|
|
76
|
+
};
|
|
77
|
+
}, [
|
|
78
|
+
order,
|
|
79
|
+
panelId,
|
|
80
|
+
registerPanel,
|
|
81
|
+
unregisterPanel
|
|
82
|
+
]);
|
|
83
|
+
(0, react.useImperativeHandle)(forwardedRef, () => ({
|
|
84
|
+
collapse: () => {
|
|
85
|
+
collapsePanel(panelDataRef.current);
|
|
86
|
+
},
|
|
87
|
+
expand: (minSize) => {
|
|
88
|
+
expandPanel(panelDataRef.current, minSize);
|
|
89
|
+
},
|
|
90
|
+
getId() {
|
|
91
|
+
return panelId;
|
|
92
|
+
},
|
|
93
|
+
getSize() {
|
|
94
|
+
return getPanelSize(panelDataRef.current);
|
|
95
|
+
},
|
|
96
|
+
isCollapsed() {
|
|
97
|
+
return isPanelCollapsed(panelDataRef.current);
|
|
98
|
+
},
|
|
99
|
+
isExpanded() {
|
|
100
|
+
return !isPanelCollapsed(panelDataRef.current);
|
|
101
|
+
},
|
|
102
|
+
resize: (size) => {
|
|
103
|
+
resizePanel(panelDataRef.current, size);
|
|
104
|
+
}
|
|
105
|
+
}), [
|
|
106
|
+
collapsePanel,
|
|
107
|
+
expandPanel,
|
|
108
|
+
getPanelSize,
|
|
109
|
+
isPanelCollapsed,
|
|
110
|
+
panelId,
|
|
111
|
+
resizePanel
|
|
112
|
+
]);
|
|
113
|
+
const style = getPanelStyle(panelDataRef.current, defaultSize);
|
|
114
|
+
return (0, react.createElement)(Type, {
|
|
115
|
+
...rest,
|
|
116
|
+
children,
|
|
117
|
+
className: classNameFromProps,
|
|
118
|
+
id: panelId,
|
|
119
|
+
style: {
|
|
120
|
+
...style,
|
|
121
|
+
...styleFromProps
|
|
122
|
+
},
|
|
123
|
+
[DATA_ATTRIBUTES.groupId]: groupId,
|
|
124
|
+
[DATA_ATTRIBUTES.panel]: "",
|
|
125
|
+
[DATA_ATTRIBUTES.panelCollapsible]: collapsible || void 0,
|
|
126
|
+
[DATA_ATTRIBUTES.panelId]: panelId,
|
|
127
|
+
[DATA_ATTRIBUTES.panelSize]: parseFloat("" + style.flexGrow).toFixed(1)
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
var Panel = (0, react.forwardRef)((props, ref) => (0, react.createElement)(PanelWithForwardedRef, {
|
|
131
|
+
...props,
|
|
132
|
+
forwardedRef: ref
|
|
133
|
+
}));
|
|
134
|
+
PanelWithForwardedRef.displayName = "Panel";
|
|
135
|
+
Panel.displayName = "forwardRef(Panel)";
|
|
136
|
+
var nonce;
|
|
137
|
+
function getNonce() {
|
|
138
|
+
return nonce;
|
|
139
|
+
}
|
|
140
|
+
var currentCursorStyle = null;
|
|
141
|
+
var enabled = true;
|
|
142
|
+
var prevRuleIndex = -1;
|
|
143
|
+
var styleElement = null;
|
|
144
|
+
function getCursorStyle(state, constraintFlags) {
|
|
145
|
+
if (constraintFlags) {
|
|
146
|
+
const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;
|
|
147
|
+
const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;
|
|
148
|
+
const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;
|
|
149
|
+
const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;
|
|
150
|
+
if (horizontalMin) {
|
|
151
|
+
if (verticalMin) return "se-resize";
|
|
152
|
+
else if (verticalMax) return "ne-resize";
|
|
153
|
+
else return "e-resize";
|
|
154
|
+
} else if (horizontalMax) {
|
|
155
|
+
if (verticalMin) return "sw-resize";
|
|
156
|
+
else if (verticalMax) return "nw-resize";
|
|
157
|
+
else return "w-resize";
|
|
158
|
+
} else if (verticalMin) return "s-resize";
|
|
159
|
+
else if (verticalMax) return "n-resize";
|
|
160
|
+
}
|
|
161
|
+
switch (state) {
|
|
162
|
+
case "horizontal": return "ew-resize";
|
|
163
|
+
case "intersection": return "move";
|
|
164
|
+
case "vertical": return "ns-resize";
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function resetGlobalCursorStyle() {
|
|
168
|
+
if (styleElement !== null) {
|
|
169
|
+
document.head.removeChild(styleElement);
|
|
170
|
+
currentCursorStyle = null;
|
|
171
|
+
styleElement = null;
|
|
172
|
+
prevRuleIndex = -1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function setGlobalCursorStyle(state, constraintFlags) {
|
|
176
|
+
var _styleElement$sheet$i, _styleElement$sheet2;
|
|
177
|
+
if (!enabled) return;
|
|
178
|
+
const style = getCursorStyle(state, constraintFlags);
|
|
179
|
+
if (currentCursorStyle === style) return;
|
|
180
|
+
currentCursorStyle = style;
|
|
181
|
+
if (styleElement === null) {
|
|
182
|
+
styleElement = document.createElement("style");
|
|
183
|
+
const nonce = getNonce();
|
|
184
|
+
if (nonce) styleElement.setAttribute("nonce", nonce);
|
|
185
|
+
document.head.appendChild(styleElement);
|
|
186
|
+
}
|
|
187
|
+
if (prevRuleIndex >= 0) {
|
|
188
|
+
var _styleElement$sheet;
|
|
189
|
+
(_styleElement$sheet = styleElement.sheet) === null || _styleElement$sheet === void 0 || _styleElement$sheet.removeRule(prevRuleIndex);
|
|
190
|
+
}
|
|
191
|
+
prevRuleIndex = (_styleElement$sheet$i = (_styleElement$sheet2 = styleElement.sheet) === null || _styleElement$sheet2 === void 0 ? void 0 : _styleElement$sheet2.insertRule(`*{cursor: ${style} !important;}`)) !== null && _styleElement$sheet$i !== void 0 ? _styleElement$sheet$i : -1;
|
|
192
|
+
}
|
|
193
|
+
function isKeyDown(event) {
|
|
194
|
+
return event.type === "keydown";
|
|
195
|
+
}
|
|
196
|
+
function isPointerEvent(event) {
|
|
197
|
+
return event.type.startsWith("pointer");
|
|
198
|
+
}
|
|
199
|
+
function isMouseEvent(event) {
|
|
200
|
+
return event.type.startsWith("mouse");
|
|
201
|
+
}
|
|
202
|
+
function getResizeEventCoordinates(event) {
|
|
203
|
+
if (isPointerEvent(event)) {
|
|
204
|
+
if (event.isPrimary) return {
|
|
205
|
+
x: event.clientX,
|
|
206
|
+
y: event.clientY
|
|
207
|
+
};
|
|
208
|
+
} else if (isMouseEvent(event)) return {
|
|
209
|
+
x: event.clientX,
|
|
210
|
+
y: event.clientY
|
|
211
|
+
};
|
|
212
|
+
return {
|
|
213
|
+
x: Infinity,
|
|
214
|
+
y: Infinity
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function getInputType() {
|
|
218
|
+
if (typeof matchMedia === "function") return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
|
|
219
|
+
}
|
|
220
|
+
function intersects(rectOne, rectTwo, strict) {
|
|
221
|
+
if (strict) return rectOne.x < rectTwo.x + rectTwo.width && rectOne.x + rectOne.width > rectTwo.x && rectOne.y < rectTwo.y + rectTwo.height && rectOne.y + rectOne.height > rectTwo.y;
|
|
222
|
+
else return rectOne.x <= rectTwo.x + rectTwo.width && rectOne.x + rectOne.width >= rectTwo.x && rectOne.y <= rectTwo.y + rectTwo.height && rectOne.y + rectOne.height >= rectTwo.y;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Determine which of two nodes appears in front of the other —
|
|
226
|
+
* if `a` is in front, returns 1, otherwise returns -1
|
|
227
|
+
* @param {HTMLElement | SVGElement} a
|
|
228
|
+
* @param {HTMLElement | SVGElement} b
|
|
229
|
+
*/
|
|
230
|
+
function compare(a, b) {
|
|
231
|
+
if (a === b) throw new Error("Cannot compare node with itself");
|
|
232
|
+
const ancestors = {
|
|
233
|
+
a: get_ancestors(a),
|
|
234
|
+
b: get_ancestors(b)
|
|
235
|
+
};
|
|
236
|
+
let common_ancestor;
|
|
237
|
+
while (ancestors.a.at(-1) === ancestors.b.at(-1)) {
|
|
238
|
+
a = ancestors.a.pop();
|
|
239
|
+
b = ancestors.b.pop();
|
|
240
|
+
common_ancestor = a;
|
|
241
|
+
}
|
|
242
|
+
assert(common_ancestor, "Stacking order can only be calculated for elements with a common ancestor");
|
|
243
|
+
const z_indexes = {
|
|
244
|
+
a: get_z_index(find_stacking_context(ancestors.a)),
|
|
245
|
+
b: get_z_index(find_stacking_context(ancestors.b))
|
|
246
|
+
};
|
|
247
|
+
if (z_indexes.a === z_indexes.b) {
|
|
248
|
+
const children = common_ancestor.childNodes;
|
|
249
|
+
const furthest_ancestors = {
|
|
250
|
+
a: ancestors.a.at(-1),
|
|
251
|
+
b: ancestors.b.at(-1)
|
|
252
|
+
};
|
|
253
|
+
let i = children.length;
|
|
254
|
+
while (i--) {
|
|
255
|
+
const child = children[i];
|
|
256
|
+
if (child === furthest_ancestors.a) return 1;
|
|
257
|
+
if (child === furthest_ancestors.b) return -1;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return Math.sign(z_indexes.a - z_indexes.b);
|
|
261
|
+
}
|
|
262
|
+
var props = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
263
|
+
/** @param {HTMLElement | SVGElement} node */
|
|
264
|
+
function is_flex_item(node) {
|
|
265
|
+
var _get_parent;
|
|
266
|
+
const display = getComputedStyle((_get_parent = get_parent(node)) !== null && _get_parent !== void 0 ? _get_parent : node).display;
|
|
267
|
+
return display === "flex" || display === "inline-flex";
|
|
268
|
+
}
|
|
269
|
+
/** @param {HTMLElement | SVGElement} node */
|
|
270
|
+
function creates_stacking_context(node) {
|
|
271
|
+
const style = getComputedStyle(node);
|
|
272
|
+
if (style.position === "fixed") return true;
|
|
273
|
+
if (style.zIndex !== "auto" && (style.position !== "static" || is_flex_item(node))) return true;
|
|
274
|
+
if (+style.opacity < 1) return true;
|
|
275
|
+
if ("transform" in style && style.transform !== "none") return true;
|
|
276
|
+
if ("webkitTransform" in style && style.webkitTransform !== "none") return true;
|
|
277
|
+
if ("mixBlendMode" in style && style.mixBlendMode !== "normal") return true;
|
|
278
|
+
if ("filter" in style && style.filter !== "none") return true;
|
|
279
|
+
if ("webkitFilter" in style && style.webkitFilter !== "none") return true;
|
|
280
|
+
if ("isolation" in style && style.isolation === "isolate") return true;
|
|
281
|
+
if (props.test(style.willChange)) return true;
|
|
282
|
+
if (style.webkitOverflowScrolling === "touch") return true;
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
/** @param {(HTMLElement| SVGElement)[]} nodes */
|
|
286
|
+
function find_stacking_context(nodes) {
|
|
287
|
+
let i = nodes.length;
|
|
288
|
+
while (i--) {
|
|
289
|
+
const node = nodes[i];
|
|
290
|
+
assert(node, "Missing node");
|
|
291
|
+
if (creates_stacking_context(node)) return node;
|
|
292
|
+
}
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
/** @param {HTMLElement | SVGElement} node */
|
|
296
|
+
function get_z_index(node) {
|
|
297
|
+
return node && Number(getComputedStyle(node).zIndex) || 0;
|
|
298
|
+
}
|
|
299
|
+
/** @param {HTMLElement} node */
|
|
300
|
+
function get_ancestors(node) {
|
|
301
|
+
const ancestors = [];
|
|
302
|
+
while (node) {
|
|
303
|
+
ancestors.push(node);
|
|
304
|
+
node = get_parent(node);
|
|
305
|
+
}
|
|
306
|
+
return ancestors;
|
|
307
|
+
}
|
|
308
|
+
/** @param {HTMLElement} node */
|
|
309
|
+
function get_parent(node) {
|
|
310
|
+
const { parentNode } = node;
|
|
311
|
+
if (parentNode && parentNode instanceof ShadowRoot) return parentNode.host;
|
|
312
|
+
return parentNode;
|
|
313
|
+
}
|
|
314
|
+
var EXCEEDED_HORIZONTAL_MIN = 1;
|
|
315
|
+
var EXCEEDED_HORIZONTAL_MAX = 2;
|
|
316
|
+
var EXCEEDED_VERTICAL_MIN = 4;
|
|
317
|
+
var EXCEEDED_VERTICAL_MAX = 8;
|
|
318
|
+
var isCoarsePointer = getInputType() === "coarse";
|
|
319
|
+
var intersectingHandles = [];
|
|
320
|
+
var isPointerDown = false;
|
|
321
|
+
var ownerDocumentCounts = /* @__PURE__ */ new Map();
|
|
322
|
+
var panelConstraintFlags = /* @__PURE__ */ new Map();
|
|
323
|
+
var registeredResizeHandlers = /* @__PURE__ */ new Set();
|
|
324
|
+
function registerResizeHandle(resizeHandleId, element, direction, hitAreaMargins, setResizeHandlerState) {
|
|
325
|
+
var _ownerDocumentCounts$;
|
|
326
|
+
const { ownerDocument } = element;
|
|
327
|
+
const data = {
|
|
328
|
+
direction,
|
|
329
|
+
element,
|
|
330
|
+
hitAreaMargins,
|
|
331
|
+
setResizeHandlerState
|
|
332
|
+
};
|
|
333
|
+
const count = (_ownerDocumentCounts$ = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$ !== void 0 ? _ownerDocumentCounts$ : 0;
|
|
334
|
+
ownerDocumentCounts.set(ownerDocument, count + 1);
|
|
335
|
+
registeredResizeHandlers.add(data);
|
|
336
|
+
updateListeners();
|
|
337
|
+
return function unregisterResizeHandle() {
|
|
338
|
+
var _ownerDocumentCounts$2;
|
|
339
|
+
panelConstraintFlags.delete(resizeHandleId);
|
|
340
|
+
registeredResizeHandlers.delete(data);
|
|
341
|
+
const count = (_ownerDocumentCounts$2 = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$2 !== void 0 ? _ownerDocumentCounts$2 : 1;
|
|
342
|
+
ownerDocumentCounts.set(ownerDocument, count - 1);
|
|
343
|
+
updateListeners();
|
|
344
|
+
if (count === 1) ownerDocumentCounts.delete(ownerDocument);
|
|
345
|
+
if (intersectingHandles.includes(data)) {
|
|
346
|
+
const index = intersectingHandles.indexOf(data);
|
|
347
|
+
if (index >= 0) intersectingHandles.splice(index, 1);
|
|
348
|
+
updateCursor();
|
|
349
|
+
setResizeHandlerState("up", true, null);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
function handlePointerDown(event) {
|
|
354
|
+
const { target } = event;
|
|
355
|
+
const { x, y } = getResizeEventCoordinates(event);
|
|
356
|
+
isPointerDown = true;
|
|
357
|
+
recalculateIntersectingHandles({
|
|
358
|
+
target,
|
|
359
|
+
x,
|
|
360
|
+
y
|
|
361
|
+
});
|
|
362
|
+
updateListeners();
|
|
363
|
+
if (intersectingHandles.length > 0) {
|
|
364
|
+
updateResizeHandlerStates("down", event);
|
|
365
|
+
event.preventDefault();
|
|
366
|
+
if (!isWithinResizeHandle(target)) event.stopImmediatePropagation();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function handlePointerMove(event) {
|
|
370
|
+
const { x, y } = getResizeEventCoordinates(event);
|
|
371
|
+
if (isPointerDown && event.buttons === 0) {
|
|
372
|
+
isPointerDown = false;
|
|
373
|
+
updateResizeHandlerStates("up", event);
|
|
374
|
+
}
|
|
375
|
+
if (!isPointerDown) {
|
|
376
|
+
const { target } = event;
|
|
377
|
+
recalculateIntersectingHandles({
|
|
378
|
+
target,
|
|
379
|
+
x,
|
|
380
|
+
y
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
updateResizeHandlerStates("move", event);
|
|
384
|
+
updateCursor();
|
|
385
|
+
if (intersectingHandles.length > 0) event.preventDefault();
|
|
386
|
+
}
|
|
387
|
+
function handlePointerUp(event) {
|
|
388
|
+
const { target } = event;
|
|
389
|
+
const { x, y } = getResizeEventCoordinates(event);
|
|
390
|
+
panelConstraintFlags.clear();
|
|
391
|
+
isPointerDown = false;
|
|
392
|
+
if (intersectingHandles.length > 0) {
|
|
393
|
+
event.preventDefault();
|
|
394
|
+
if (!isWithinResizeHandle(target)) event.stopImmediatePropagation();
|
|
395
|
+
}
|
|
396
|
+
updateResizeHandlerStates("up", event);
|
|
397
|
+
recalculateIntersectingHandles({
|
|
398
|
+
target,
|
|
399
|
+
x,
|
|
400
|
+
y
|
|
401
|
+
});
|
|
402
|
+
updateCursor();
|
|
403
|
+
updateListeners();
|
|
404
|
+
}
|
|
405
|
+
function isWithinResizeHandle(element) {
|
|
406
|
+
let currentElement = element;
|
|
407
|
+
while (currentElement) {
|
|
408
|
+
if (currentElement.hasAttribute(DATA_ATTRIBUTES.resizeHandle)) return true;
|
|
409
|
+
currentElement = currentElement.parentElement;
|
|
410
|
+
}
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
function recalculateIntersectingHandles({ target, x, y }) {
|
|
414
|
+
intersectingHandles.splice(0);
|
|
415
|
+
let targetElement = null;
|
|
416
|
+
if (target instanceof HTMLElement || target instanceof SVGElement) targetElement = target;
|
|
417
|
+
registeredResizeHandlers.forEach((data) => {
|
|
418
|
+
const { element: dragHandleElement, hitAreaMargins } = data;
|
|
419
|
+
const dragHandleRect = dragHandleElement.getBoundingClientRect();
|
|
420
|
+
const { bottom, left, right, top } = dragHandleRect;
|
|
421
|
+
const margin = isCoarsePointer ? hitAreaMargins.coarse : hitAreaMargins.fine;
|
|
422
|
+
if (x >= left - margin && x <= right + margin && y >= top - margin && y <= bottom + margin) {
|
|
423
|
+
if (targetElement !== null && document.contains(targetElement) && dragHandleElement !== targetElement && !dragHandleElement.contains(targetElement) && !targetElement.contains(dragHandleElement) && compare(targetElement, dragHandleElement) > 0) {
|
|
424
|
+
let currentElement = targetElement;
|
|
425
|
+
let didIntersect = false;
|
|
426
|
+
while (currentElement) {
|
|
427
|
+
if (currentElement.contains(dragHandleElement)) break;
|
|
428
|
+
else if (intersects(currentElement.getBoundingClientRect(), dragHandleRect, true)) {
|
|
429
|
+
didIntersect = true;
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
currentElement = currentElement.parentElement;
|
|
433
|
+
}
|
|
434
|
+
if (didIntersect) return;
|
|
435
|
+
}
|
|
436
|
+
intersectingHandles.push(data);
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
function reportConstraintsViolation(resizeHandleId, flag) {
|
|
441
|
+
panelConstraintFlags.set(resizeHandleId, flag);
|
|
442
|
+
}
|
|
443
|
+
function updateCursor() {
|
|
444
|
+
let intersectsHorizontal = false;
|
|
445
|
+
let intersectsVertical = false;
|
|
446
|
+
intersectingHandles.forEach((data) => {
|
|
447
|
+
const { direction } = data;
|
|
448
|
+
if (direction === "horizontal") intersectsHorizontal = true;
|
|
449
|
+
else intersectsVertical = true;
|
|
450
|
+
});
|
|
451
|
+
let constraintFlags = 0;
|
|
452
|
+
panelConstraintFlags.forEach((flag) => {
|
|
453
|
+
constraintFlags |= flag;
|
|
454
|
+
});
|
|
455
|
+
if (intersectsHorizontal && intersectsVertical) setGlobalCursorStyle("intersection", constraintFlags);
|
|
456
|
+
else if (intersectsHorizontal) setGlobalCursorStyle("horizontal", constraintFlags);
|
|
457
|
+
else if (intersectsVertical) setGlobalCursorStyle("vertical", constraintFlags);
|
|
458
|
+
else resetGlobalCursorStyle();
|
|
459
|
+
}
|
|
460
|
+
var listenersAbortController = new AbortController();
|
|
461
|
+
function updateListeners() {
|
|
462
|
+
listenersAbortController.abort();
|
|
463
|
+
listenersAbortController = new AbortController();
|
|
464
|
+
const options = {
|
|
465
|
+
capture: true,
|
|
466
|
+
signal: listenersAbortController.signal
|
|
467
|
+
};
|
|
468
|
+
if (!registeredResizeHandlers.size) return;
|
|
469
|
+
if (isPointerDown) {
|
|
470
|
+
if (intersectingHandles.length > 0) ownerDocumentCounts.forEach((count, ownerDocument) => {
|
|
471
|
+
const { body } = ownerDocument;
|
|
472
|
+
if (count > 0) {
|
|
473
|
+
body.addEventListener("contextmenu", handlePointerUp, options);
|
|
474
|
+
body.addEventListener("pointerleave", handlePointerMove, options);
|
|
475
|
+
body.addEventListener("pointermove", handlePointerMove, options);
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
window.addEventListener("pointerup", handlePointerUp, options);
|
|
479
|
+
window.addEventListener("pointercancel", handlePointerUp, options);
|
|
480
|
+
} else ownerDocumentCounts.forEach((count, ownerDocument) => {
|
|
481
|
+
const { body } = ownerDocument;
|
|
482
|
+
if (count > 0) {
|
|
483
|
+
body.addEventListener("pointerdown", handlePointerDown, options);
|
|
484
|
+
body.addEventListener("pointermove", handlePointerMove, options);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function updateResizeHandlerStates(action, event) {
|
|
489
|
+
registeredResizeHandlers.forEach((data) => {
|
|
490
|
+
const { setResizeHandlerState } = data;
|
|
491
|
+
setResizeHandlerState(action, intersectingHandles.includes(data), event);
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
function useForceUpdate() {
|
|
495
|
+
const [_, setCount] = (0, react.useState)(0);
|
|
496
|
+
return (0, react.useCallback)(() => setCount((prevCount) => prevCount + 1), []);
|
|
497
|
+
}
|
|
498
|
+
function assert(expectedCondition, message) {
|
|
499
|
+
if (!expectedCondition) {
|
|
500
|
+
console.error(message);
|
|
501
|
+
throw Error(message);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
function fuzzyCompareNumbers(actual, expected, fractionDigits = PRECISION) {
|
|
505
|
+
if (actual.toFixed(fractionDigits) === expected.toFixed(fractionDigits)) return 0;
|
|
506
|
+
else return actual > expected ? 1 : -1;
|
|
507
|
+
}
|
|
508
|
+
function fuzzyNumbersEqual$1(actual, expected, fractionDigits = PRECISION) {
|
|
509
|
+
return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
|
|
510
|
+
}
|
|
511
|
+
function fuzzyNumbersEqual(actual, expected, fractionDigits) {
|
|
512
|
+
return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
|
|
513
|
+
}
|
|
514
|
+
function fuzzyLayoutsEqual(actual, expected, fractionDigits) {
|
|
515
|
+
if (actual.length !== expected.length) return false;
|
|
516
|
+
for (let index = 0; index < actual.length; index++) {
|
|
517
|
+
const actualSize = actual[index];
|
|
518
|
+
const expectedSize = expected[index];
|
|
519
|
+
if (!fuzzyNumbersEqual(actualSize, expectedSize, fractionDigits)) return false;
|
|
520
|
+
}
|
|
521
|
+
return true;
|
|
522
|
+
}
|
|
523
|
+
function resizePanel({ panelConstraints: panelConstraintsArray, panelIndex, size }) {
|
|
524
|
+
const panelConstraints = panelConstraintsArray[panelIndex];
|
|
525
|
+
assert(panelConstraints != null, `Panel constraints not found for index ${panelIndex}`);
|
|
526
|
+
let { collapsedSize = 0, collapsible, maxSize = 100, minSize = 0 } = panelConstraints;
|
|
527
|
+
if (fuzzyCompareNumbers(size, minSize) < 0) {
|
|
528
|
+
if (collapsible) {
|
|
529
|
+
const halfwayPoint = (collapsedSize + minSize) / 2;
|
|
530
|
+
if (fuzzyCompareNumbers(size, halfwayPoint) < 0) size = collapsedSize;
|
|
531
|
+
else size = minSize;
|
|
532
|
+
} else size = minSize;
|
|
533
|
+
}
|
|
534
|
+
size = Math.min(maxSize, size);
|
|
535
|
+
size = parseFloat(size.toFixed(PRECISION));
|
|
536
|
+
return size;
|
|
537
|
+
}
|
|
538
|
+
function adjustLayoutByDelta({ delta, initialLayout, panelConstraints: panelConstraintsArray, pivotIndices, prevLayout, trigger }) {
|
|
539
|
+
if (fuzzyNumbersEqual(delta, 0)) return initialLayout;
|
|
540
|
+
const nextLayout = [...initialLayout];
|
|
541
|
+
const [firstPivotIndex, secondPivotIndex] = pivotIndices;
|
|
542
|
+
assert(firstPivotIndex != null, "Invalid first pivot index");
|
|
543
|
+
assert(secondPivotIndex != null, "Invalid second pivot index");
|
|
544
|
+
let deltaApplied = 0;
|
|
545
|
+
if (trigger === "keyboard") {
|
|
546
|
+
{
|
|
547
|
+
const index = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
548
|
+
const panelConstraints = panelConstraintsArray[index];
|
|
549
|
+
assert(panelConstraints, `Panel constraints not found for index ${index}`);
|
|
550
|
+
const { collapsedSize = 0, collapsible, minSize = 0 } = panelConstraints;
|
|
551
|
+
if (collapsible) {
|
|
552
|
+
const prevSize = initialLayout[index];
|
|
553
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index}`);
|
|
554
|
+
if (fuzzyNumbersEqual(prevSize, collapsedSize)) {
|
|
555
|
+
const localDelta = minSize - prevSize;
|
|
556
|
+
if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) delta = delta < 0 ? 0 - localDelta : localDelta;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
{
|
|
561
|
+
const index = delta < 0 ? firstPivotIndex : secondPivotIndex;
|
|
562
|
+
const panelConstraints = panelConstraintsArray[index];
|
|
563
|
+
assert(panelConstraints, `No panel constraints found for index ${index}`);
|
|
564
|
+
const { collapsedSize = 0, collapsible, minSize = 0 } = panelConstraints;
|
|
565
|
+
if (collapsible) {
|
|
566
|
+
const prevSize = initialLayout[index];
|
|
567
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index}`);
|
|
568
|
+
if (fuzzyNumbersEqual(prevSize, minSize)) {
|
|
569
|
+
const localDelta = prevSize - collapsedSize;
|
|
570
|
+
if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) delta = delta < 0 ? 0 - localDelta : localDelta;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
{
|
|
576
|
+
const increment = delta < 0 ? 1 : -1;
|
|
577
|
+
let index = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
578
|
+
let maxAvailableDelta = 0;
|
|
579
|
+
while (true) {
|
|
580
|
+
const prevSize = initialLayout[index];
|
|
581
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index}`);
|
|
582
|
+
const delta = resizePanel({
|
|
583
|
+
panelConstraints: panelConstraintsArray,
|
|
584
|
+
panelIndex: index,
|
|
585
|
+
size: 100
|
|
586
|
+
}) - prevSize;
|
|
587
|
+
maxAvailableDelta += delta;
|
|
588
|
+
index += increment;
|
|
589
|
+
if (index < 0 || index >= panelConstraintsArray.length) break;
|
|
590
|
+
}
|
|
591
|
+
const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta));
|
|
592
|
+
delta = delta < 0 ? 0 - minAbsDelta : minAbsDelta;
|
|
593
|
+
}
|
|
594
|
+
{
|
|
595
|
+
let index = delta < 0 ? firstPivotIndex : secondPivotIndex;
|
|
596
|
+
while (index >= 0 && index < panelConstraintsArray.length) {
|
|
597
|
+
const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied);
|
|
598
|
+
const prevSize = initialLayout[index];
|
|
599
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index}`);
|
|
600
|
+
const unsafeSize = prevSize - deltaRemaining;
|
|
601
|
+
const safeSize = resizePanel({
|
|
602
|
+
panelConstraints: panelConstraintsArray,
|
|
603
|
+
panelIndex: index,
|
|
604
|
+
size: unsafeSize
|
|
605
|
+
});
|
|
606
|
+
if (!fuzzyNumbersEqual(prevSize, safeSize)) {
|
|
607
|
+
deltaApplied += prevSize - safeSize;
|
|
608
|
+
nextLayout[index] = safeSize;
|
|
609
|
+
if (deltaApplied.toPrecision(3).localeCompare(Math.abs(delta).toPrecision(3), void 0, { numeric: true }) >= 0) break;
|
|
610
|
+
}
|
|
611
|
+
if (delta < 0) index--;
|
|
612
|
+
else index++;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
if (fuzzyLayoutsEqual(prevLayout, nextLayout)) return prevLayout;
|
|
616
|
+
{
|
|
617
|
+
const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
618
|
+
const prevSize = initialLayout[pivotIndex];
|
|
619
|
+
assert(prevSize != null, `Previous layout not found for panel index ${pivotIndex}`);
|
|
620
|
+
const unsafeSize = prevSize + deltaApplied;
|
|
621
|
+
const safeSize = resizePanel({
|
|
622
|
+
panelConstraints: panelConstraintsArray,
|
|
623
|
+
panelIndex: pivotIndex,
|
|
624
|
+
size: unsafeSize
|
|
625
|
+
});
|
|
626
|
+
nextLayout[pivotIndex] = safeSize;
|
|
627
|
+
if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {
|
|
628
|
+
let deltaRemaining = unsafeSize - safeSize;
|
|
629
|
+
let index = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
630
|
+
while (index >= 0 && index < panelConstraintsArray.length) {
|
|
631
|
+
const prevSize = nextLayout[index];
|
|
632
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index}`);
|
|
633
|
+
const unsafeSize = prevSize + deltaRemaining;
|
|
634
|
+
const safeSize = resizePanel({
|
|
635
|
+
panelConstraints: panelConstraintsArray,
|
|
636
|
+
panelIndex: index,
|
|
637
|
+
size: unsafeSize
|
|
638
|
+
});
|
|
639
|
+
if (!fuzzyNumbersEqual(prevSize, safeSize)) {
|
|
640
|
+
deltaRemaining -= safeSize - prevSize;
|
|
641
|
+
nextLayout[index] = safeSize;
|
|
642
|
+
}
|
|
643
|
+
if (fuzzyNumbersEqual(deltaRemaining, 0)) break;
|
|
644
|
+
if (delta > 0) index--;
|
|
645
|
+
else index++;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
if (!fuzzyNumbersEqual(nextLayout.reduce((total, size) => size + total, 0), 100)) return prevLayout;
|
|
650
|
+
return nextLayout;
|
|
651
|
+
}
|
|
652
|
+
function calculateAriaValues({ layout, panelsArray, pivotIndices }) {
|
|
653
|
+
let currentMinSize = 0;
|
|
654
|
+
let currentMaxSize = 100;
|
|
655
|
+
let totalMinSize = 0;
|
|
656
|
+
let totalMaxSize = 0;
|
|
657
|
+
const firstIndex = pivotIndices[0];
|
|
658
|
+
assert(firstIndex != null, "No pivot index found");
|
|
659
|
+
panelsArray.forEach((panelData, index) => {
|
|
660
|
+
const { constraints } = panelData;
|
|
661
|
+
const { maxSize = 100, minSize = 0 } = constraints;
|
|
662
|
+
if (index === firstIndex) {
|
|
663
|
+
currentMinSize = minSize;
|
|
664
|
+
currentMaxSize = maxSize;
|
|
665
|
+
} else {
|
|
666
|
+
totalMinSize += minSize;
|
|
667
|
+
totalMaxSize += maxSize;
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
return {
|
|
671
|
+
valueMax: Math.min(currentMaxSize, 100 - totalMinSize),
|
|
672
|
+
valueMin: Math.max(currentMinSize, 100 - totalMaxSize),
|
|
673
|
+
valueNow: layout[firstIndex]
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
function getResizeHandleElementsForGroup(groupId, scope = document) {
|
|
677
|
+
return Array.from(scope.querySelectorAll(`[${DATA_ATTRIBUTES.resizeHandleId}][data-panel-group-id="${groupId}"]`));
|
|
678
|
+
}
|
|
679
|
+
function getResizeHandleElementIndex(groupId, id, scope = document) {
|
|
680
|
+
const index = getResizeHandleElementsForGroup(groupId, scope).findIndex((handle) => handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId) === id);
|
|
681
|
+
return index !== null && index !== void 0 ? index : null;
|
|
682
|
+
}
|
|
683
|
+
function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
|
|
684
|
+
const index = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
|
|
685
|
+
return index != null ? [index, index + 1] : [-1, -1];
|
|
686
|
+
}
|
|
687
|
+
function getPanelGroupElement(id, rootElement = document) {
|
|
688
|
+
var _dataset;
|
|
689
|
+
if (rootElement instanceof HTMLElement && (rootElement === null || rootElement === void 0 ? void 0 : (_dataset = rootElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.panelGroupId) == id) return rootElement;
|
|
690
|
+
const element = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id}"]`);
|
|
691
|
+
if (element) return element;
|
|
692
|
+
return null;
|
|
693
|
+
}
|
|
694
|
+
function getResizeHandleElement(id, scope = document) {
|
|
695
|
+
const element = scope.querySelector(`[${DATA_ATTRIBUTES.resizeHandleId}="${id}"]`);
|
|
696
|
+
if (element) return element;
|
|
697
|
+
return null;
|
|
698
|
+
}
|
|
699
|
+
function getResizeHandlePanelIds(groupId, handleId, panelsArray, scope = document) {
|
|
700
|
+
var _panelsArray$index$id, _panelsArray$index, _panelsArray$id, _panelsArray;
|
|
701
|
+
const handle = getResizeHandleElement(handleId, scope);
|
|
702
|
+
const handles = getResizeHandleElementsForGroup(groupId, scope);
|
|
703
|
+
const index = handle ? handles.indexOf(handle) : -1;
|
|
704
|
+
return [(_panelsArray$index$id = (_panelsArray$index = panelsArray[index]) === null || _panelsArray$index === void 0 ? void 0 : _panelsArray$index.id) !== null && _panelsArray$index$id !== void 0 ? _panelsArray$index$id : null, (_panelsArray$id = (_panelsArray = panelsArray[index + 1]) === null || _panelsArray === void 0 ? void 0 : _panelsArray.id) !== null && _panelsArray$id !== void 0 ? _panelsArray$id : null];
|
|
705
|
+
}
|
|
706
|
+
function useWindowSplitterPanelGroupBehavior({ committedValuesRef, eagerValuesRef, groupId, layout, panelDataArray, panelGroupElement, setLayout }) {
|
|
707
|
+
(0, react.useRef)({ didWarnAboutMissingResizeHandle: false });
|
|
708
|
+
useIsomorphicLayoutEffect(() => {
|
|
709
|
+
if (!panelGroupElement) return;
|
|
710
|
+
const resizeHandleElements = getResizeHandleElementsForGroup(groupId, panelGroupElement);
|
|
711
|
+
for (let index = 0; index < panelDataArray.length - 1; index++) {
|
|
712
|
+
const { valueMax, valueMin, valueNow } = calculateAriaValues({
|
|
713
|
+
layout,
|
|
714
|
+
panelsArray: panelDataArray,
|
|
715
|
+
pivotIndices: [index, index + 1]
|
|
716
|
+
});
|
|
717
|
+
const resizeHandleElement = resizeHandleElements[index];
|
|
718
|
+
if (resizeHandleElement == null);
|
|
719
|
+
else {
|
|
720
|
+
const panelData = panelDataArray[index];
|
|
721
|
+
assert(panelData, `No panel data found for index "${index}"`);
|
|
722
|
+
resizeHandleElement.setAttribute("aria-controls", panelData.id);
|
|
723
|
+
resizeHandleElement.setAttribute("aria-valuemax", "" + Math.round(valueMax));
|
|
724
|
+
resizeHandleElement.setAttribute("aria-valuemin", "" + Math.round(valueMin));
|
|
725
|
+
resizeHandleElement.setAttribute("aria-valuenow", valueNow != null ? "" + Math.round(valueNow) : "");
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
return () => {
|
|
729
|
+
resizeHandleElements.forEach((resizeHandleElement, index) => {
|
|
730
|
+
resizeHandleElement.removeAttribute("aria-controls");
|
|
731
|
+
resizeHandleElement.removeAttribute("aria-valuemax");
|
|
732
|
+
resizeHandleElement.removeAttribute("aria-valuemin");
|
|
733
|
+
resizeHandleElement.removeAttribute("aria-valuenow");
|
|
734
|
+
});
|
|
735
|
+
};
|
|
736
|
+
}, [
|
|
737
|
+
groupId,
|
|
738
|
+
layout,
|
|
739
|
+
panelDataArray,
|
|
740
|
+
panelGroupElement
|
|
741
|
+
]);
|
|
742
|
+
(0, react.useEffect)(() => {
|
|
743
|
+
if (!panelGroupElement) return;
|
|
744
|
+
const eagerValues = eagerValuesRef.current;
|
|
745
|
+
assert(eagerValues, `Eager values not found`);
|
|
746
|
+
const { panelDataArray } = eagerValues;
|
|
747
|
+
assert(getPanelGroupElement(groupId, panelGroupElement) != null, `No group found for id "${groupId}"`);
|
|
748
|
+
const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
|
|
749
|
+
assert(handles, `No resize handles found for group id "${groupId}"`);
|
|
750
|
+
const cleanupFunctions = handles.map((handle) => {
|
|
751
|
+
const handleId = handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId);
|
|
752
|
+
assert(handleId, `Resize handle element has no handle id attribute`);
|
|
753
|
+
const [idBefore, idAfter] = getResizeHandlePanelIds(groupId, handleId, panelDataArray, panelGroupElement);
|
|
754
|
+
if (idBefore == null || idAfter == null) return () => {};
|
|
755
|
+
const onKeyDown = (event) => {
|
|
756
|
+
if (event.defaultPrevented) return;
|
|
757
|
+
switch (event.key) {
|
|
758
|
+
case "Enter": {
|
|
759
|
+
event.preventDefault();
|
|
760
|
+
const index = panelDataArray.findIndex((panelData) => panelData.id === idBefore);
|
|
761
|
+
if (index >= 0) {
|
|
762
|
+
const panelData = panelDataArray[index];
|
|
763
|
+
assert(panelData, `No panel data found for index ${index}`);
|
|
764
|
+
const size = layout[index];
|
|
765
|
+
const { collapsedSize = 0, collapsible, minSize = 0 } = panelData.constraints;
|
|
766
|
+
if (size != null && collapsible) {
|
|
767
|
+
const nextLayout = adjustLayoutByDelta({
|
|
768
|
+
delta: fuzzyNumbersEqual(size, collapsedSize) ? minSize - collapsedSize : collapsedSize - size,
|
|
769
|
+
initialLayout: layout,
|
|
770
|
+
panelConstraints: panelDataArray.map((panelData) => panelData.constraints),
|
|
771
|
+
pivotIndices: determinePivotIndices(groupId, handleId, panelGroupElement),
|
|
772
|
+
prevLayout: layout,
|
|
773
|
+
trigger: "keyboard"
|
|
774
|
+
});
|
|
775
|
+
if (layout !== nextLayout) setLayout(nextLayout);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
break;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
handle.addEventListener("keydown", onKeyDown);
|
|
783
|
+
return () => {
|
|
784
|
+
handle.removeEventListener("keydown", onKeyDown);
|
|
785
|
+
};
|
|
786
|
+
});
|
|
787
|
+
return () => {
|
|
788
|
+
cleanupFunctions.forEach((cleanupFunction) => cleanupFunction());
|
|
789
|
+
};
|
|
790
|
+
}, [
|
|
791
|
+
panelGroupElement,
|
|
792
|
+
committedValuesRef,
|
|
793
|
+
eagerValuesRef,
|
|
794
|
+
groupId,
|
|
795
|
+
layout,
|
|
796
|
+
panelDataArray,
|
|
797
|
+
setLayout
|
|
798
|
+
]);
|
|
799
|
+
}
|
|
800
|
+
function areEqual(arrayA, arrayB) {
|
|
801
|
+
if (arrayA.length !== arrayB.length) return false;
|
|
802
|
+
for (let index = 0; index < arrayA.length; index++) if (arrayA[index] !== arrayB[index]) return false;
|
|
803
|
+
return true;
|
|
804
|
+
}
|
|
805
|
+
function getResizeEventCursorPosition(direction, event) {
|
|
806
|
+
const isHorizontal = direction === "horizontal";
|
|
807
|
+
const { x, y } = getResizeEventCoordinates(event);
|
|
808
|
+
return isHorizontal ? x : y;
|
|
809
|
+
}
|
|
810
|
+
function calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement) {
|
|
811
|
+
const isHorizontal = direction === "horizontal";
|
|
812
|
+
const handleElement = getResizeHandleElement(dragHandleId, panelGroupElement);
|
|
813
|
+
assert(handleElement, `No resize handle element found for id "${dragHandleId}"`);
|
|
814
|
+
const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
|
|
815
|
+
assert(groupId, `Resize handle element has no group id attribute`);
|
|
816
|
+
let { initialCursorPosition } = initialDragState;
|
|
817
|
+
const cursorPosition = getResizeEventCursorPosition(direction, event);
|
|
818
|
+
const groupElement = getPanelGroupElement(groupId, panelGroupElement);
|
|
819
|
+
assert(groupElement, `No group element found for id "${groupId}"`);
|
|
820
|
+
const groupRect = groupElement.getBoundingClientRect();
|
|
821
|
+
const groupSizeInPixels = isHorizontal ? groupRect.width : groupRect.height;
|
|
822
|
+
return (cursorPosition - initialCursorPosition) / groupSizeInPixels * 100;
|
|
823
|
+
}
|
|
824
|
+
function calculateDeltaPercentage(event, dragHandleId, direction, initialDragState, keyboardResizeBy, panelGroupElement) {
|
|
825
|
+
if (isKeyDown(event)) {
|
|
826
|
+
const isHorizontal = direction === "horizontal";
|
|
827
|
+
let delta = 0;
|
|
828
|
+
if (event.shiftKey) delta = 100;
|
|
829
|
+
else if (keyboardResizeBy != null) delta = keyboardResizeBy;
|
|
830
|
+
else delta = 10;
|
|
831
|
+
let movement = 0;
|
|
832
|
+
switch (event.key) {
|
|
833
|
+
case "ArrowDown":
|
|
834
|
+
movement = isHorizontal ? 0 : delta;
|
|
835
|
+
break;
|
|
836
|
+
case "ArrowLeft":
|
|
837
|
+
movement = isHorizontal ? -delta : 0;
|
|
838
|
+
break;
|
|
839
|
+
case "ArrowRight":
|
|
840
|
+
movement = isHorizontal ? delta : 0;
|
|
841
|
+
break;
|
|
842
|
+
case "ArrowUp":
|
|
843
|
+
movement = isHorizontal ? 0 : -delta;
|
|
844
|
+
break;
|
|
845
|
+
case "End":
|
|
846
|
+
movement = 100;
|
|
847
|
+
break;
|
|
848
|
+
case "Home": movement = -100;
|
|
849
|
+
}
|
|
850
|
+
return movement;
|
|
851
|
+
} else {
|
|
852
|
+
if (initialDragState == null) return 0;
|
|
853
|
+
return calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
function calculateUnsafeDefaultLayout({ panelDataArray }) {
|
|
857
|
+
const layout = Array(panelDataArray.length);
|
|
858
|
+
const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
|
|
859
|
+
let numPanelsWithSizes = 0;
|
|
860
|
+
let remainingSize = 100;
|
|
861
|
+
for (let index = 0; index < panelDataArray.length; index++) {
|
|
862
|
+
const panelConstraints = panelConstraintsArray[index];
|
|
863
|
+
assert(panelConstraints, `Panel constraints not found for index ${index}`);
|
|
864
|
+
const { defaultSize } = panelConstraints;
|
|
865
|
+
if (defaultSize != null) {
|
|
866
|
+
numPanelsWithSizes++;
|
|
867
|
+
layout[index] = defaultSize;
|
|
868
|
+
remainingSize -= defaultSize;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
for (let index = 0; index < panelDataArray.length; index++) {
|
|
872
|
+
const panelConstraints = panelConstraintsArray[index];
|
|
873
|
+
assert(panelConstraints, `Panel constraints not found for index ${index}`);
|
|
874
|
+
const { defaultSize } = panelConstraints;
|
|
875
|
+
if (defaultSize != null) continue;
|
|
876
|
+
const numRemainingPanels = panelDataArray.length - numPanelsWithSizes;
|
|
877
|
+
const size = remainingSize / numRemainingPanels;
|
|
878
|
+
numPanelsWithSizes++;
|
|
879
|
+
layout[index] = size;
|
|
880
|
+
remainingSize -= size;
|
|
881
|
+
}
|
|
882
|
+
return layout;
|
|
883
|
+
}
|
|
884
|
+
function callPanelCallbacks(panelsArray, layout, panelIdToLastNotifiedSizeMap) {
|
|
885
|
+
layout.forEach((size, index) => {
|
|
886
|
+
const panelData = panelsArray[index];
|
|
887
|
+
assert(panelData, `Panel data not found for index ${index}`);
|
|
888
|
+
const { callbacks, constraints, id: panelId } = panelData;
|
|
889
|
+
const { collapsedSize = 0, collapsible } = constraints;
|
|
890
|
+
const lastNotifiedSize = panelIdToLastNotifiedSizeMap[panelId];
|
|
891
|
+
if (lastNotifiedSize == null || size !== lastNotifiedSize) {
|
|
892
|
+
panelIdToLastNotifiedSizeMap[panelId] = size;
|
|
893
|
+
const { onCollapse, onExpand, onResize } = callbacks;
|
|
894
|
+
if (onResize) onResize(size, lastNotifiedSize);
|
|
895
|
+
if (collapsible && (onCollapse || onExpand)) {
|
|
896
|
+
if (onExpand && (lastNotifiedSize == null || fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && !fuzzyNumbersEqual$1(size, collapsedSize)) onExpand();
|
|
897
|
+
if (onCollapse && (lastNotifiedSize == null || !fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && fuzzyNumbersEqual$1(size, collapsedSize)) onCollapse();
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
function compareLayouts(a, b) {
|
|
903
|
+
if (a.length !== b.length) return false;
|
|
904
|
+
else for (let index = 0; index < a.length; index++) if (a[index] != b[index]) return false;
|
|
905
|
+
return true;
|
|
906
|
+
}
|
|
907
|
+
function computePanelFlexBoxStyle({ defaultSize, dragState, layout, panelData, panelIndex, precision = 3 }) {
|
|
908
|
+
const size = layout[panelIndex];
|
|
909
|
+
let flexGrow;
|
|
910
|
+
if (size == null) flexGrow = defaultSize != void 0 ? defaultSize.toPrecision(precision) : "1";
|
|
911
|
+
else if (panelData.length === 1) flexGrow = "1";
|
|
912
|
+
else flexGrow = size.toPrecision(precision);
|
|
913
|
+
return {
|
|
914
|
+
flexBasis: 0,
|
|
915
|
+
flexGrow,
|
|
916
|
+
flexShrink: 1,
|
|
917
|
+
overflow: "hidden",
|
|
918
|
+
pointerEvents: dragState !== null ? "none" : void 0
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function debounce(callback, durationMs = 10) {
|
|
922
|
+
let timeoutId = null;
|
|
923
|
+
let callable = (...args) => {
|
|
924
|
+
if (timeoutId !== null) clearTimeout(timeoutId);
|
|
925
|
+
timeoutId = setTimeout(() => {
|
|
926
|
+
callback(...args);
|
|
927
|
+
}, durationMs);
|
|
928
|
+
};
|
|
929
|
+
return callable;
|
|
930
|
+
}
|
|
931
|
+
function initializeDefaultStorage(storageObject) {
|
|
932
|
+
try {
|
|
933
|
+
if (typeof localStorage !== "undefined") {
|
|
934
|
+
storageObject.getItem = (name) => {
|
|
935
|
+
return localStorage.getItem(name);
|
|
936
|
+
};
|
|
937
|
+
storageObject.setItem = (name, value) => {
|
|
938
|
+
localStorage.setItem(name, value);
|
|
939
|
+
};
|
|
940
|
+
} else throw new Error("localStorage not supported in this environment");
|
|
941
|
+
} catch (error) {
|
|
942
|
+
console.error(error);
|
|
943
|
+
storageObject.getItem = () => null;
|
|
944
|
+
storageObject.setItem = () => {};
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
function getPanelGroupKey(autoSaveId) {
|
|
948
|
+
return `react-resizable-panels:${autoSaveId}`;
|
|
949
|
+
}
|
|
950
|
+
function getPanelKey(panels) {
|
|
951
|
+
return panels.map((panel) => {
|
|
952
|
+
const { constraints, id, idIsFromProps, order } = panel;
|
|
953
|
+
if (idIsFromProps) return id;
|
|
954
|
+
else return order ? `${order}:${JSON.stringify(constraints)}` : JSON.stringify(constraints);
|
|
955
|
+
}).sort((a, b) => a.localeCompare(b)).join(",");
|
|
956
|
+
}
|
|
957
|
+
function loadSerializedPanelGroupState(autoSaveId, storage) {
|
|
958
|
+
try {
|
|
959
|
+
const panelGroupKey = getPanelGroupKey(autoSaveId);
|
|
960
|
+
const serialized = storage.getItem(panelGroupKey);
|
|
961
|
+
if (serialized) {
|
|
962
|
+
const parsed = JSON.parse(serialized);
|
|
963
|
+
if (typeof parsed === "object" && parsed != null) return parsed;
|
|
964
|
+
}
|
|
965
|
+
} catch (error) {}
|
|
966
|
+
return null;
|
|
967
|
+
}
|
|
968
|
+
function loadPanelGroupState(autoSaveId, panels, storage) {
|
|
969
|
+
var _loadSerializedPanelG, _state$panelKey;
|
|
970
|
+
return (_state$panelKey = ((_loadSerializedPanelG = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG !== void 0 ? _loadSerializedPanelG : {})[getPanelKey(panels)]) !== null && _state$panelKey !== void 0 ? _state$panelKey : null;
|
|
971
|
+
}
|
|
972
|
+
function savePanelGroupState(autoSaveId, panels, panelSizesBeforeCollapse, sizes, storage) {
|
|
973
|
+
var _loadSerializedPanelG2;
|
|
974
|
+
const panelGroupKey = getPanelGroupKey(autoSaveId);
|
|
975
|
+
const panelKey = getPanelKey(panels);
|
|
976
|
+
const state = (_loadSerializedPanelG2 = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG2 !== void 0 ? _loadSerializedPanelG2 : {};
|
|
977
|
+
state[panelKey] = {
|
|
978
|
+
expandToSizes: Object.fromEntries(panelSizesBeforeCollapse.entries()),
|
|
979
|
+
layout: sizes
|
|
980
|
+
};
|
|
981
|
+
try {
|
|
982
|
+
storage.setItem(panelGroupKey, JSON.stringify(state));
|
|
983
|
+
} catch (error) {
|
|
984
|
+
console.error(error);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
function validatePanelGroupLayout({ layout: prevLayout, panelConstraints }) {
|
|
988
|
+
const nextLayout = [...prevLayout];
|
|
989
|
+
const nextLayoutTotalSize = nextLayout.reduce((accumulated, current) => accumulated + current, 0);
|
|
990
|
+
if (nextLayout.length !== panelConstraints.length) throw Error(`Invalid ${panelConstraints.length} panel layout: ${nextLayout.map((size) => `${size}%`).join(", ")}`);
|
|
991
|
+
else if (!fuzzyNumbersEqual(nextLayoutTotalSize, 100) && nextLayout.length > 0) for (let index = 0; index < panelConstraints.length; index++) {
|
|
992
|
+
const unsafeSize = nextLayout[index];
|
|
993
|
+
assert(unsafeSize != null, `No layout data found for index ${index}`);
|
|
994
|
+
const safeSize = 100 / nextLayoutTotalSize * unsafeSize;
|
|
995
|
+
nextLayout[index] = safeSize;
|
|
996
|
+
}
|
|
997
|
+
let remainingSize = 0;
|
|
998
|
+
for (let index = 0; index < panelConstraints.length; index++) {
|
|
999
|
+
const unsafeSize = nextLayout[index];
|
|
1000
|
+
assert(unsafeSize != null, `No layout data found for index ${index}`);
|
|
1001
|
+
const safeSize = resizePanel({
|
|
1002
|
+
panelConstraints,
|
|
1003
|
+
panelIndex: index,
|
|
1004
|
+
size: unsafeSize
|
|
1005
|
+
});
|
|
1006
|
+
if (unsafeSize != safeSize) {
|
|
1007
|
+
remainingSize += unsafeSize - safeSize;
|
|
1008
|
+
nextLayout[index] = safeSize;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
if (!fuzzyNumbersEqual(remainingSize, 0)) for (let index = 0; index < panelConstraints.length; index++) {
|
|
1012
|
+
const prevSize = nextLayout[index];
|
|
1013
|
+
assert(prevSize != null, `No layout data found for index ${index}`);
|
|
1014
|
+
const unsafeSize = prevSize + remainingSize;
|
|
1015
|
+
const safeSize = resizePanel({
|
|
1016
|
+
panelConstraints,
|
|
1017
|
+
panelIndex: index,
|
|
1018
|
+
size: unsafeSize
|
|
1019
|
+
});
|
|
1020
|
+
if (prevSize !== safeSize) {
|
|
1021
|
+
remainingSize -= safeSize - prevSize;
|
|
1022
|
+
nextLayout[index] = safeSize;
|
|
1023
|
+
if (fuzzyNumbersEqual(remainingSize, 0)) break;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
return nextLayout;
|
|
1027
|
+
}
|
|
1028
|
+
var LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100;
|
|
1029
|
+
var defaultStorage = {
|
|
1030
|
+
getItem: (name) => {
|
|
1031
|
+
initializeDefaultStorage(defaultStorage);
|
|
1032
|
+
return defaultStorage.getItem(name);
|
|
1033
|
+
},
|
|
1034
|
+
setItem: (name, value) => {
|
|
1035
|
+
initializeDefaultStorage(defaultStorage);
|
|
1036
|
+
defaultStorage.setItem(name, value);
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
var debounceMap = {};
|
|
1040
|
+
function PanelGroupWithForwardedRef({ autoSaveId = null, children, className: classNameFromProps = "", direction, forwardedRef, id: idFromProps = null, onLayout = null, keyboardResizeBy = null, storage = defaultStorage, style: styleFromProps, tagName: Type = "div", ...rest }) {
|
|
1041
|
+
const groupId = useUniqueId(idFromProps);
|
|
1042
|
+
const panelGroupElementRef = (0, react.useRef)(null);
|
|
1043
|
+
const [dragState, setDragState] = (0, react.useState)(null);
|
|
1044
|
+
const [layout, setLayout] = (0, react.useState)([]);
|
|
1045
|
+
const forceUpdate = useForceUpdate();
|
|
1046
|
+
const panelIdToLastNotifiedSizeMapRef = (0, react.useRef)({});
|
|
1047
|
+
const panelSizeBeforeCollapseRef = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
1048
|
+
const prevDeltaRef = (0, react.useRef)(0);
|
|
1049
|
+
const committedValuesRef = (0, react.useRef)({
|
|
1050
|
+
autoSaveId,
|
|
1051
|
+
direction,
|
|
1052
|
+
dragState,
|
|
1053
|
+
id: groupId,
|
|
1054
|
+
keyboardResizeBy,
|
|
1055
|
+
onLayout,
|
|
1056
|
+
storage
|
|
1057
|
+
});
|
|
1058
|
+
const eagerValuesRef = (0, react.useRef)({
|
|
1059
|
+
layout,
|
|
1060
|
+
panelDataArray: [],
|
|
1061
|
+
panelDataArrayChanged: false
|
|
1062
|
+
});
|
|
1063
|
+
(0, react.useRef)({
|
|
1064
|
+
didLogIdAndOrderWarning: false,
|
|
1065
|
+
didLogPanelConstraintsWarning: false,
|
|
1066
|
+
prevPanelIds: []
|
|
1067
|
+
});
|
|
1068
|
+
(0, react.useImperativeHandle)(forwardedRef, () => ({
|
|
1069
|
+
getId: () => committedValuesRef.current.id,
|
|
1070
|
+
getLayout: () => {
|
|
1071
|
+
const { layout } = eagerValuesRef.current;
|
|
1072
|
+
return layout;
|
|
1073
|
+
},
|
|
1074
|
+
setLayout: (unsafeLayout) => {
|
|
1075
|
+
const { onLayout } = committedValuesRef.current;
|
|
1076
|
+
const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
|
|
1077
|
+
const safeLayout = validatePanelGroupLayout({
|
|
1078
|
+
layout: unsafeLayout,
|
|
1079
|
+
panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
|
|
1080
|
+
});
|
|
1081
|
+
if (!areEqual(prevLayout, safeLayout)) {
|
|
1082
|
+
setLayout(safeLayout);
|
|
1083
|
+
eagerValuesRef.current.layout = safeLayout;
|
|
1084
|
+
if (onLayout) onLayout(safeLayout);
|
|
1085
|
+
callPanelCallbacks(panelDataArray, safeLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}), []);
|
|
1089
|
+
useIsomorphicLayoutEffect(() => {
|
|
1090
|
+
committedValuesRef.current.autoSaveId = autoSaveId;
|
|
1091
|
+
committedValuesRef.current.direction = direction;
|
|
1092
|
+
committedValuesRef.current.dragState = dragState;
|
|
1093
|
+
committedValuesRef.current.id = groupId;
|
|
1094
|
+
committedValuesRef.current.onLayout = onLayout;
|
|
1095
|
+
committedValuesRef.current.storage = storage;
|
|
1096
|
+
});
|
|
1097
|
+
useWindowSplitterPanelGroupBehavior({
|
|
1098
|
+
committedValuesRef,
|
|
1099
|
+
eagerValuesRef,
|
|
1100
|
+
groupId,
|
|
1101
|
+
layout,
|
|
1102
|
+
panelDataArray: eagerValuesRef.current.panelDataArray,
|
|
1103
|
+
setLayout,
|
|
1104
|
+
panelGroupElement: panelGroupElementRef.current
|
|
1105
|
+
});
|
|
1106
|
+
(0, react.useEffect)(() => {
|
|
1107
|
+
const { panelDataArray } = eagerValuesRef.current;
|
|
1108
|
+
if (autoSaveId) {
|
|
1109
|
+
if (layout.length === 0 || layout.length !== panelDataArray.length) return;
|
|
1110
|
+
let debouncedSave = debounceMap[autoSaveId];
|
|
1111
|
+
if (debouncedSave == null) {
|
|
1112
|
+
debouncedSave = debounce(savePanelGroupState, LOCAL_STORAGE_DEBOUNCE_INTERVAL);
|
|
1113
|
+
debounceMap[autoSaveId] = debouncedSave;
|
|
1114
|
+
}
|
|
1115
|
+
const clonedPanelDataArray = [...panelDataArray];
|
|
1116
|
+
const clonedPanelSizesBeforeCollapse = new Map(panelSizeBeforeCollapseRef.current);
|
|
1117
|
+
debouncedSave(autoSaveId, clonedPanelDataArray, clonedPanelSizesBeforeCollapse, layout, storage);
|
|
1118
|
+
}
|
|
1119
|
+
}, [
|
|
1120
|
+
autoSaveId,
|
|
1121
|
+
layout,
|
|
1122
|
+
storage
|
|
1123
|
+
]);
|
|
1124
|
+
(0, react.useEffect)(() => {});
|
|
1125
|
+
const collapsePanel = (0, react.useCallback)((panelData) => {
|
|
1126
|
+
const { onLayout } = committedValuesRef.current;
|
|
1127
|
+
const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
|
|
1128
|
+
if (panelData.constraints.collapsible) {
|
|
1129
|
+
const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
|
|
1130
|
+
const { collapsedSize = 0, panelSize, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
|
|
1131
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
1132
|
+
if (!fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
|
|
1133
|
+
panelSizeBeforeCollapseRef.current.set(panelData.id, panelSize);
|
|
1134
|
+
const nextLayout = adjustLayoutByDelta({
|
|
1135
|
+
delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - collapsedSize : collapsedSize - panelSize,
|
|
1136
|
+
initialLayout: prevLayout,
|
|
1137
|
+
panelConstraints: panelConstraintsArray,
|
|
1138
|
+
pivotIndices,
|
|
1139
|
+
prevLayout,
|
|
1140
|
+
trigger: "imperative-api"
|
|
1141
|
+
});
|
|
1142
|
+
if (!compareLayouts(prevLayout, nextLayout)) {
|
|
1143
|
+
setLayout(nextLayout);
|
|
1144
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
1145
|
+
if (onLayout) onLayout(nextLayout);
|
|
1146
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}, []);
|
|
1151
|
+
const expandPanel = (0, react.useCallback)((panelData, minSizeOverride) => {
|
|
1152
|
+
const { onLayout } = committedValuesRef.current;
|
|
1153
|
+
const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
|
|
1154
|
+
if (panelData.constraints.collapsible) {
|
|
1155
|
+
const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
|
|
1156
|
+
const { collapsedSize = 0, panelSize = 0, minSize: minSizeFromProps = 0, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
|
|
1157
|
+
const minSize = minSizeOverride !== null && minSizeOverride !== void 0 ? minSizeOverride : minSizeFromProps;
|
|
1158
|
+
if (fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
|
|
1159
|
+
const prevPanelSize = panelSizeBeforeCollapseRef.current.get(panelData.id);
|
|
1160
|
+
const baseSize = prevPanelSize != null && prevPanelSize >= minSize ? prevPanelSize : minSize;
|
|
1161
|
+
const nextLayout = adjustLayoutByDelta({
|
|
1162
|
+
delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - baseSize : baseSize - panelSize,
|
|
1163
|
+
initialLayout: prevLayout,
|
|
1164
|
+
panelConstraints: panelConstraintsArray,
|
|
1165
|
+
pivotIndices,
|
|
1166
|
+
prevLayout,
|
|
1167
|
+
trigger: "imperative-api"
|
|
1168
|
+
});
|
|
1169
|
+
if (!compareLayouts(prevLayout, nextLayout)) {
|
|
1170
|
+
setLayout(nextLayout);
|
|
1171
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
1172
|
+
if (onLayout) onLayout(nextLayout);
|
|
1173
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
}, []);
|
|
1178
|
+
const getPanelSize = (0, react.useCallback)((panelData) => {
|
|
1179
|
+
const { layout, panelDataArray } = eagerValuesRef.current;
|
|
1180
|
+
const { panelSize } = panelDataHelper(panelDataArray, panelData, layout);
|
|
1181
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
1182
|
+
return panelSize;
|
|
1183
|
+
}, []);
|
|
1184
|
+
const getPanelStyle = (0, react.useCallback)((panelData, defaultSize) => {
|
|
1185
|
+
const { panelDataArray } = eagerValuesRef.current;
|
|
1186
|
+
const panelIndex = findPanelDataIndex(panelDataArray, panelData);
|
|
1187
|
+
return computePanelFlexBoxStyle({
|
|
1188
|
+
defaultSize,
|
|
1189
|
+
dragState,
|
|
1190
|
+
layout,
|
|
1191
|
+
panelData: panelDataArray,
|
|
1192
|
+
panelIndex
|
|
1193
|
+
});
|
|
1194
|
+
}, [dragState, layout]);
|
|
1195
|
+
const isPanelCollapsed = (0, react.useCallback)((panelData) => {
|
|
1196
|
+
const { layout, panelDataArray } = eagerValuesRef.current;
|
|
1197
|
+
const { collapsedSize = 0, collapsible, panelSize } = panelDataHelper(panelDataArray, panelData, layout);
|
|
1198
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
1199
|
+
return collapsible === true && fuzzyNumbersEqual$1(panelSize, collapsedSize);
|
|
1200
|
+
}, []);
|
|
1201
|
+
const isPanelExpanded = (0, react.useCallback)((panelData) => {
|
|
1202
|
+
const { layout, panelDataArray } = eagerValuesRef.current;
|
|
1203
|
+
const { collapsedSize = 0, collapsible, panelSize } = panelDataHelper(panelDataArray, panelData, layout);
|
|
1204
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
1205
|
+
return !collapsible || fuzzyCompareNumbers(panelSize, collapsedSize) > 0;
|
|
1206
|
+
}, []);
|
|
1207
|
+
const registerPanel = (0, react.useCallback)((panelData) => {
|
|
1208
|
+
const { panelDataArray } = eagerValuesRef.current;
|
|
1209
|
+
panelDataArray.push(panelData);
|
|
1210
|
+
panelDataArray.sort((panelA, panelB) => {
|
|
1211
|
+
const orderA = panelA.order;
|
|
1212
|
+
const orderB = panelB.order;
|
|
1213
|
+
if (orderA == null && orderB == null) return 0;
|
|
1214
|
+
else if (orderA == null) return -1;
|
|
1215
|
+
else if (orderB == null) return 1;
|
|
1216
|
+
else return orderA - orderB;
|
|
1217
|
+
});
|
|
1218
|
+
eagerValuesRef.current.panelDataArrayChanged = true;
|
|
1219
|
+
forceUpdate();
|
|
1220
|
+
}, [forceUpdate]);
|
|
1221
|
+
useIsomorphicLayoutEffect(() => {
|
|
1222
|
+
if (eagerValuesRef.current.panelDataArrayChanged) {
|
|
1223
|
+
eagerValuesRef.current.panelDataArrayChanged = false;
|
|
1224
|
+
const { autoSaveId, onLayout, storage } = committedValuesRef.current;
|
|
1225
|
+
const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
|
|
1226
|
+
let unsafeLayout = null;
|
|
1227
|
+
if (autoSaveId) {
|
|
1228
|
+
const state = loadPanelGroupState(autoSaveId, panelDataArray, storage);
|
|
1229
|
+
if (state) {
|
|
1230
|
+
panelSizeBeforeCollapseRef.current = new Map(Object.entries(state.expandToSizes));
|
|
1231
|
+
unsafeLayout = state.layout;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
if (unsafeLayout == null) unsafeLayout = calculateUnsafeDefaultLayout({ panelDataArray });
|
|
1235
|
+
const nextLayout = validatePanelGroupLayout({
|
|
1236
|
+
layout: unsafeLayout,
|
|
1237
|
+
panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
|
|
1238
|
+
});
|
|
1239
|
+
if (!areEqual(prevLayout, nextLayout)) {
|
|
1240
|
+
setLayout(nextLayout);
|
|
1241
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
1242
|
+
if (onLayout) onLayout(nextLayout);
|
|
1243
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
useIsomorphicLayoutEffect(() => {
|
|
1248
|
+
const eagerValues = eagerValuesRef.current;
|
|
1249
|
+
return () => {
|
|
1250
|
+
eagerValues.layout = [];
|
|
1251
|
+
};
|
|
1252
|
+
}, []);
|
|
1253
|
+
const registerResizeHandle = (0, react.useCallback)((dragHandleId) => {
|
|
1254
|
+
let isRTL = false;
|
|
1255
|
+
const panelGroupElement = panelGroupElementRef.current;
|
|
1256
|
+
if (panelGroupElement) {
|
|
1257
|
+
if (window.getComputedStyle(panelGroupElement, null).getPropertyValue("direction") === "rtl") isRTL = true;
|
|
1258
|
+
}
|
|
1259
|
+
return function resizeHandler(event) {
|
|
1260
|
+
event.preventDefault();
|
|
1261
|
+
const panelGroupElement = panelGroupElementRef.current;
|
|
1262
|
+
if (!panelGroupElement) return () => null;
|
|
1263
|
+
const { direction, dragState, id: groupId, keyboardResizeBy, onLayout } = committedValuesRef.current;
|
|
1264
|
+
const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
|
|
1265
|
+
const { initialLayout } = dragState !== null && dragState !== void 0 ? dragState : {};
|
|
1266
|
+
const pivotIndices = determinePivotIndices(groupId, dragHandleId, panelGroupElement);
|
|
1267
|
+
let delta = calculateDeltaPercentage(event, dragHandleId, direction, dragState, keyboardResizeBy, panelGroupElement);
|
|
1268
|
+
const isHorizontal = direction === "horizontal";
|
|
1269
|
+
if (isHorizontal && isRTL) delta = -delta;
|
|
1270
|
+
const panelConstraints = panelDataArray.map((panelData) => panelData.constraints);
|
|
1271
|
+
const nextLayout = adjustLayoutByDelta({
|
|
1272
|
+
delta,
|
|
1273
|
+
initialLayout: initialLayout !== null && initialLayout !== void 0 ? initialLayout : prevLayout,
|
|
1274
|
+
panelConstraints,
|
|
1275
|
+
pivotIndices,
|
|
1276
|
+
prevLayout,
|
|
1277
|
+
trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
|
|
1278
|
+
});
|
|
1279
|
+
const layoutChanged = !compareLayouts(prevLayout, nextLayout);
|
|
1280
|
+
if (isPointerEvent(event) || isMouseEvent(event)) {
|
|
1281
|
+
if (prevDeltaRef.current != delta) {
|
|
1282
|
+
prevDeltaRef.current = delta;
|
|
1283
|
+
if (!layoutChanged && delta !== 0) {
|
|
1284
|
+
if (isHorizontal) reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX);
|
|
1285
|
+
else reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX);
|
|
1286
|
+
} else reportConstraintsViolation(dragHandleId, 0);
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
if (layoutChanged) {
|
|
1290
|
+
setLayout(nextLayout);
|
|
1291
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
1292
|
+
if (onLayout) onLayout(nextLayout);
|
|
1293
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
}, []);
|
|
1297
|
+
const resizePanel = (0, react.useCallback)((panelData, unsafePanelSize) => {
|
|
1298
|
+
const { onLayout } = committedValuesRef.current;
|
|
1299
|
+
const { layout: prevLayout, panelDataArray } = eagerValuesRef.current;
|
|
1300
|
+
const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
|
|
1301
|
+
const { panelSize, pivotIndices } = panelDataHelper(panelDataArray, panelData, prevLayout);
|
|
1302
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
1303
|
+
const nextLayout = adjustLayoutByDelta({
|
|
1304
|
+
delta: findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1 ? panelSize - unsafePanelSize : unsafePanelSize - panelSize,
|
|
1305
|
+
initialLayout: prevLayout,
|
|
1306
|
+
panelConstraints: panelConstraintsArray,
|
|
1307
|
+
pivotIndices,
|
|
1308
|
+
prevLayout,
|
|
1309
|
+
trigger: "imperative-api"
|
|
1310
|
+
});
|
|
1311
|
+
if (!compareLayouts(prevLayout, nextLayout)) {
|
|
1312
|
+
setLayout(nextLayout);
|
|
1313
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
1314
|
+
if (onLayout) onLayout(nextLayout);
|
|
1315
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
1316
|
+
}
|
|
1317
|
+
}, []);
|
|
1318
|
+
const reevaluatePanelConstraints = (0, react.useCallback)((panelData, prevConstraints) => {
|
|
1319
|
+
const { layout, panelDataArray } = eagerValuesRef.current;
|
|
1320
|
+
const { collapsedSize: prevCollapsedSize = 0, collapsible: prevCollapsible } = prevConstraints;
|
|
1321
|
+
const { collapsedSize: nextCollapsedSize = 0, collapsible: nextCollapsible, maxSize: nextMaxSize = 100, minSize: nextMinSize = 0 } = panelData.constraints;
|
|
1322
|
+
const { panelSize: prevPanelSize } = panelDataHelper(panelDataArray, panelData, layout);
|
|
1323
|
+
if (prevPanelSize == null) return;
|
|
1324
|
+
if (prevCollapsible && nextCollapsible && fuzzyNumbersEqual$1(prevPanelSize, prevCollapsedSize)) {
|
|
1325
|
+
if (!fuzzyNumbersEqual$1(prevCollapsedSize, nextCollapsedSize)) resizePanel(panelData, nextCollapsedSize);
|
|
1326
|
+
} else if (prevPanelSize < nextMinSize) resizePanel(panelData, nextMinSize);
|
|
1327
|
+
else if (prevPanelSize > nextMaxSize) resizePanel(panelData, nextMaxSize);
|
|
1328
|
+
}, [resizePanel]);
|
|
1329
|
+
const startDragging = (0, react.useCallback)((dragHandleId, event) => {
|
|
1330
|
+
const { direction } = committedValuesRef.current;
|
|
1331
|
+
const { layout } = eagerValuesRef.current;
|
|
1332
|
+
if (!panelGroupElementRef.current) return;
|
|
1333
|
+
const handleElement = getResizeHandleElement(dragHandleId, panelGroupElementRef.current);
|
|
1334
|
+
assert(handleElement, `Drag handle element not found for id "${dragHandleId}"`);
|
|
1335
|
+
const initialCursorPosition = getResizeEventCursorPosition(direction, event);
|
|
1336
|
+
setDragState({
|
|
1337
|
+
dragHandleId,
|
|
1338
|
+
dragHandleRect: handleElement.getBoundingClientRect(),
|
|
1339
|
+
initialCursorPosition,
|
|
1340
|
+
initialLayout: layout
|
|
1341
|
+
});
|
|
1342
|
+
}, []);
|
|
1343
|
+
const stopDragging = (0, react.useCallback)(() => {
|
|
1344
|
+
setDragState(null);
|
|
1345
|
+
}, []);
|
|
1346
|
+
const unregisterPanel = (0, react.useCallback)((panelData) => {
|
|
1347
|
+
const { panelDataArray } = eagerValuesRef.current;
|
|
1348
|
+
const index = findPanelDataIndex(panelDataArray, panelData);
|
|
1349
|
+
if (index >= 0) {
|
|
1350
|
+
panelDataArray.splice(index, 1);
|
|
1351
|
+
delete panelIdToLastNotifiedSizeMapRef.current[panelData.id];
|
|
1352
|
+
eagerValuesRef.current.panelDataArrayChanged = true;
|
|
1353
|
+
forceUpdate();
|
|
1354
|
+
}
|
|
1355
|
+
}, [forceUpdate]);
|
|
1356
|
+
const context = (0, react.useMemo)(() => ({
|
|
1357
|
+
collapsePanel,
|
|
1358
|
+
direction,
|
|
1359
|
+
dragState,
|
|
1360
|
+
expandPanel,
|
|
1361
|
+
getPanelSize,
|
|
1362
|
+
getPanelStyle,
|
|
1363
|
+
groupId,
|
|
1364
|
+
isPanelCollapsed,
|
|
1365
|
+
isPanelExpanded,
|
|
1366
|
+
reevaluatePanelConstraints,
|
|
1367
|
+
registerPanel,
|
|
1368
|
+
registerResizeHandle,
|
|
1369
|
+
resizePanel,
|
|
1370
|
+
startDragging,
|
|
1371
|
+
stopDragging,
|
|
1372
|
+
unregisterPanel,
|
|
1373
|
+
panelGroupElement: panelGroupElementRef.current
|
|
1374
|
+
}), [
|
|
1375
|
+
collapsePanel,
|
|
1376
|
+
dragState,
|
|
1377
|
+
direction,
|
|
1378
|
+
expandPanel,
|
|
1379
|
+
getPanelSize,
|
|
1380
|
+
getPanelStyle,
|
|
1381
|
+
groupId,
|
|
1382
|
+
isPanelCollapsed,
|
|
1383
|
+
isPanelExpanded,
|
|
1384
|
+
reevaluatePanelConstraints,
|
|
1385
|
+
registerPanel,
|
|
1386
|
+
registerResizeHandle,
|
|
1387
|
+
resizePanel,
|
|
1388
|
+
startDragging,
|
|
1389
|
+
stopDragging,
|
|
1390
|
+
unregisterPanel
|
|
1391
|
+
]);
|
|
1392
|
+
const style = {
|
|
1393
|
+
display: "flex",
|
|
1394
|
+
flexDirection: direction === "horizontal" ? "row" : "column",
|
|
1395
|
+
height: "100%",
|
|
1396
|
+
overflow: "hidden",
|
|
1397
|
+
width: "100%"
|
|
1398
|
+
};
|
|
1399
|
+
return (0, react.createElement)(PanelGroupContext.Provider, { value: context }, (0, react.createElement)(Type, {
|
|
1400
|
+
...rest,
|
|
1401
|
+
children,
|
|
1402
|
+
className: classNameFromProps,
|
|
1403
|
+
id: idFromProps,
|
|
1404
|
+
ref: panelGroupElementRef,
|
|
1405
|
+
style: {
|
|
1406
|
+
...style,
|
|
1407
|
+
...styleFromProps
|
|
1408
|
+
},
|
|
1409
|
+
[DATA_ATTRIBUTES.group]: "",
|
|
1410
|
+
[DATA_ATTRIBUTES.groupDirection]: direction,
|
|
1411
|
+
[DATA_ATTRIBUTES.groupId]: groupId
|
|
1412
|
+
}));
|
|
1413
|
+
}
|
|
1414
|
+
var PanelGroup = (0, react.forwardRef)((props, ref) => (0, react.createElement)(PanelGroupWithForwardedRef, {
|
|
1415
|
+
...props,
|
|
1416
|
+
forwardedRef: ref
|
|
1417
|
+
}));
|
|
1418
|
+
PanelGroupWithForwardedRef.displayName = "PanelGroup";
|
|
1419
|
+
PanelGroup.displayName = "forwardRef(PanelGroup)";
|
|
1420
|
+
function findPanelDataIndex(panelDataArray, panelData) {
|
|
1421
|
+
return panelDataArray.findIndex((prevPanelData) => prevPanelData === panelData || prevPanelData.id === panelData.id);
|
|
1422
|
+
}
|
|
1423
|
+
function panelDataHelper(panelDataArray, panelData, layout) {
|
|
1424
|
+
const panelIndex = findPanelDataIndex(panelDataArray, panelData);
|
|
1425
|
+
const pivotIndices = panelIndex === panelDataArray.length - 1 ? [panelIndex - 1, panelIndex] : [panelIndex, panelIndex + 1];
|
|
1426
|
+
const panelSize = layout[panelIndex];
|
|
1427
|
+
return {
|
|
1428
|
+
...panelData.constraints,
|
|
1429
|
+
panelSize,
|
|
1430
|
+
pivotIndices
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
function useWindowSplitterResizeHandlerBehavior({ disabled, handleId, resizeHandler, panelGroupElement }) {
|
|
1434
|
+
(0, react.useEffect)(() => {
|
|
1435
|
+
if (disabled || resizeHandler == null || panelGroupElement == null) return;
|
|
1436
|
+
const handleElement = getResizeHandleElement(handleId, panelGroupElement);
|
|
1437
|
+
if (handleElement == null) return;
|
|
1438
|
+
const onKeyDown = (event) => {
|
|
1439
|
+
if (event.defaultPrevented) return;
|
|
1440
|
+
switch (event.key) {
|
|
1441
|
+
case "ArrowDown":
|
|
1442
|
+
case "ArrowLeft":
|
|
1443
|
+
case "ArrowRight":
|
|
1444
|
+
case "ArrowUp":
|
|
1445
|
+
case "End":
|
|
1446
|
+
case "Home":
|
|
1447
|
+
event.preventDefault();
|
|
1448
|
+
resizeHandler(event);
|
|
1449
|
+
break;
|
|
1450
|
+
case "F6": {
|
|
1451
|
+
event.preventDefault();
|
|
1452
|
+
const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
|
|
1453
|
+
assert(groupId, `No group element found for id "${groupId}"`);
|
|
1454
|
+
const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
|
|
1455
|
+
const index = getResizeHandleElementIndex(groupId, handleId, panelGroupElement);
|
|
1456
|
+
assert(index !== null, `No resize element found for id "${handleId}"`);
|
|
1457
|
+
handles[event.shiftKey ? index > 0 ? index - 1 : handles.length - 1 : index + 1 < handles.length ? index + 1 : 0].focus();
|
|
1458
|
+
break;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1462
|
+
handleElement.addEventListener("keydown", onKeyDown);
|
|
1463
|
+
return () => {
|
|
1464
|
+
handleElement.removeEventListener("keydown", onKeyDown);
|
|
1465
|
+
};
|
|
1466
|
+
}, [
|
|
1467
|
+
panelGroupElement,
|
|
1468
|
+
disabled,
|
|
1469
|
+
handleId,
|
|
1470
|
+
resizeHandler
|
|
1471
|
+
]);
|
|
1472
|
+
}
|
|
1473
|
+
function PanelResizeHandle({ children = null, className: classNameFromProps = "", disabled = false, hitAreaMargins, id: idFromProps, onBlur, onClick, onDragging, onFocus, onPointerDown, onPointerUp, style: styleFromProps = {}, tabIndex = 0, tagName: Type = "div", ...rest }) {
|
|
1474
|
+
var _hitAreaMargins$coars, _hitAreaMargins$fine;
|
|
1475
|
+
const elementRef = (0, react.useRef)(null);
|
|
1476
|
+
const callbacksRef = (0, react.useRef)({
|
|
1477
|
+
onClick,
|
|
1478
|
+
onDragging,
|
|
1479
|
+
onPointerDown,
|
|
1480
|
+
onPointerUp
|
|
1481
|
+
});
|
|
1482
|
+
(0, react.useEffect)(() => {
|
|
1483
|
+
callbacksRef.current.onClick = onClick;
|
|
1484
|
+
callbacksRef.current.onDragging = onDragging;
|
|
1485
|
+
callbacksRef.current.onPointerDown = onPointerDown;
|
|
1486
|
+
callbacksRef.current.onPointerUp = onPointerUp;
|
|
1487
|
+
});
|
|
1488
|
+
const panelGroupContext = (0, react.useContext)(PanelGroupContext);
|
|
1489
|
+
if (panelGroupContext === null) throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);
|
|
1490
|
+
const { direction, groupId, registerResizeHandle: registerResizeHandleWithParentGroup, startDragging, stopDragging, panelGroupElement } = panelGroupContext;
|
|
1491
|
+
const resizeHandleId = useUniqueId(idFromProps);
|
|
1492
|
+
const [state, setState] = (0, react.useState)("inactive");
|
|
1493
|
+
const [isFocused, setIsFocused] = (0, react.useState)(false);
|
|
1494
|
+
const [resizeHandler, setResizeHandler] = (0, react.useState)(null);
|
|
1495
|
+
const committedValuesRef = (0, react.useRef)({ state });
|
|
1496
|
+
useIsomorphicLayoutEffect(() => {
|
|
1497
|
+
committedValuesRef.current.state = state;
|
|
1498
|
+
});
|
|
1499
|
+
(0, react.useEffect)(() => {
|
|
1500
|
+
if (disabled) setResizeHandler(null);
|
|
1501
|
+
else {
|
|
1502
|
+
const resizeHandler = registerResizeHandleWithParentGroup(resizeHandleId);
|
|
1503
|
+
setResizeHandler(() => resizeHandler);
|
|
1504
|
+
}
|
|
1505
|
+
}, [
|
|
1506
|
+
disabled,
|
|
1507
|
+
resizeHandleId,
|
|
1508
|
+
registerResizeHandleWithParentGroup
|
|
1509
|
+
]);
|
|
1510
|
+
const coarseHitAreaMargins = (_hitAreaMargins$coars = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.coarse) !== null && _hitAreaMargins$coars !== void 0 ? _hitAreaMargins$coars : 15;
|
|
1511
|
+
const fineHitAreaMargins = (_hitAreaMargins$fine = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.fine) !== null && _hitAreaMargins$fine !== void 0 ? _hitAreaMargins$fine : 5;
|
|
1512
|
+
(0, react.useEffect)(() => {
|
|
1513
|
+
if (disabled || resizeHandler == null) return;
|
|
1514
|
+
const element = elementRef.current;
|
|
1515
|
+
assert(element, "Element ref not attached");
|
|
1516
|
+
let didMove = false;
|
|
1517
|
+
const setResizeHandlerState = (action, isActive, event) => {
|
|
1518
|
+
if (!isActive) {
|
|
1519
|
+
setState("inactive");
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
switch (action) {
|
|
1523
|
+
case "down": {
|
|
1524
|
+
setState("drag");
|
|
1525
|
+
didMove = false;
|
|
1526
|
+
assert(event, "Expected event to be defined for \"down\" action");
|
|
1527
|
+
startDragging(resizeHandleId, event);
|
|
1528
|
+
const { onDragging, onPointerDown } = callbacksRef.current;
|
|
1529
|
+
onDragging === null || onDragging === void 0 || onDragging(true);
|
|
1530
|
+
onPointerDown === null || onPointerDown === void 0 || onPointerDown();
|
|
1531
|
+
break;
|
|
1532
|
+
}
|
|
1533
|
+
case "move": {
|
|
1534
|
+
const { state } = committedValuesRef.current;
|
|
1535
|
+
didMove = true;
|
|
1536
|
+
if (state !== "drag") setState("hover");
|
|
1537
|
+
assert(event, "Expected event to be defined for \"move\" action");
|
|
1538
|
+
resizeHandler(event);
|
|
1539
|
+
break;
|
|
1540
|
+
}
|
|
1541
|
+
case "up": {
|
|
1542
|
+
setState("hover");
|
|
1543
|
+
stopDragging();
|
|
1544
|
+
const { onClick, onDragging, onPointerUp } = callbacksRef.current;
|
|
1545
|
+
onDragging === null || onDragging === void 0 || onDragging(false);
|
|
1546
|
+
onPointerUp === null || onPointerUp === void 0 || onPointerUp();
|
|
1547
|
+
if (!didMove) onClick === null || onClick === void 0 || onClick();
|
|
1548
|
+
break;
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
return registerResizeHandle(resizeHandleId, element, direction, {
|
|
1553
|
+
coarse: coarseHitAreaMargins,
|
|
1554
|
+
fine: fineHitAreaMargins
|
|
1555
|
+
}, setResizeHandlerState);
|
|
1556
|
+
}, [
|
|
1557
|
+
coarseHitAreaMargins,
|
|
1558
|
+
direction,
|
|
1559
|
+
disabled,
|
|
1560
|
+
fineHitAreaMargins,
|
|
1561
|
+
registerResizeHandleWithParentGroup,
|
|
1562
|
+
resizeHandleId,
|
|
1563
|
+
resizeHandler,
|
|
1564
|
+
startDragging,
|
|
1565
|
+
stopDragging
|
|
1566
|
+
]);
|
|
1567
|
+
useWindowSplitterResizeHandlerBehavior({
|
|
1568
|
+
disabled,
|
|
1569
|
+
handleId: resizeHandleId,
|
|
1570
|
+
resizeHandler,
|
|
1571
|
+
panelGroupElement
|
|
1572
|
+
});
|
|
1573
|
+
const style = {
|
|
1574
|
+
touchAction: "none",
|
|
1575
|
+
userSelect: "none"
|
|
1576
|
+
};
|
|
1577
|
+
return (0, react.createElement)(Type, {
|
|
1578
|
+
...rest,
|
|
1579
|
+
children,
|
|
1580
|
+
className: classNameFromProps,
|
|
1581
|
+
id: idFromProps,
|
|
1582
|
+
onBlur: () => {
|
|
1583
|
+
setIsFocused(false);
|
|
1584
|
+
onBlur === null || onBlur === void 0 || onBlur();
|
|
1585
|
+
},
|
|
1586
|
+
onFocus: () => {
|
|
1587
|
+
setIsFocused(true);
|
|
1588
|
+
onFocus === null || onFocus === void 0 || onFocus();
|
|
1589
|
+
},
|
|
1590
|
+
ref: elementRef,
|
|
1591
|
+
role: "separator",
|
|
1592
|
+
style: {
|
|
1593
|
+
...style,
|
|
1594
|
+
...styleFromProps
|
|
1595
|
+
},
|
|
1596
|
+
tabIndex,
|
|
1597
|
+
[DATA_ATTRIBUTES.groupDirection]: direction,
|
|
1598
|
+
[DATA_ATTRIBUTES.groupId]: groupId,
|
|
1599
|
+
[DATA_ATTRIBUTES.resizeHandle]: "",
|
|
1600
|
+
[DATA_ATTRIBUTES.resizeHandleActive]: state === "drag" ? "pointer" : isFocused ? "keyboard" : void 0,
|
|
1601
|
+
[DATA_ATTRIBUTES.resizeHandleEnabled]: !disabled,
|
|
1602
|
+
[DATA_ATTRIBUTES.resizeHandleId]: resizeHandleId,
|
|
1603
|
+
[DATA_ATTRIBUTES.resizeHandleState]: state
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
PanelResizeHandle.displayName = "PanelResizeHandle";
|
|
1607
|
+
exports.DATA_ATTRIBUTES = DATA_ATTRIBUTES;
|
|
1608
|
+
exports.Panel = Panel;
|
|
1609
|
+
exports.PanelGroup = PanelGroup;
|
|
1610
|
+
exports.PanelResizeHandle = PanelResizeHandle;
|
|
1611
|
+
exports.assert = assert;
|
|
1612
|
+
exports.getPanelGroupElement = getPanelGroupElement;
|
|
1613
|
+
exports.getResizeHandleElement = getResizeHandleElement;
|
|
1614
|
+
exports.getResizeHandleElementIndex = getResizeHandleElementIndex;
|
|
1615
|
+
exports.getResizeHandleElementsForGroup = getResizeHandleElementsForGroup;
|
|
1616
|
+
exports.getResizeHandlePanelIds = getResizeHandlePanelIds;
|
|
1617
|
+
exports.intersects = intersects;
|