@sheetxl/studio-mui 0.8.0-beta.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +17 -7
- package/browser/esm/{B57WM1X24rsvTF_o.mjs → 2dGXbxSvPxpMpoQB.mjs} +2 -2
- package/browser/esm/AKfq7wiKunwYv5Co.mjs +87 -0
- package/browser/esm/{DyNZEBlugP-x15kP.mjs → B16SyYhTCohin7vO.mjs} +4 -4
- package/browser/esm/B4qh8uSPezvUgs_C.mjs +414 -0
- package/browser/esm/BGR0Hv_mjOPfYxiD.mjs +975 -0
- package/browser/esm/{DR95Rgl8ItgWla8V.mjs → BVbTWo0j5ttMcIWs.mjs} +3 -3
- package/browser/esm/BctMjTuii_LaWmHJ.mjs +119 -0
- package/browser/esm/{CH7ZfljN7ru0Y9Wg.mjs → Bf-pwjpYBKNwL4f8.mjs} +4 -4
- package/browser/esm/Bh7XfTPJIFjaL6fa.mjs +13 -0
- package/browser/esm/BjH_mK6445rm6PL1.mjs +94 -0
- package/browser/esm/BqJSEK805PP8lILC.mjs +197 -0
- package/browser/esm/BrIWEn7tabhEreBm.mjs +973 -0
- package/browser/esm/{D88iVsgfDG9k-qf_.mjs → BsFK55lPALVUu31_.mjs} +5 -5
- package/browser/esm/{3L04oqyfyjRxhmzg.mjs → C0PinnqWu_JwK9l_.mjs} +33 -31
- package/browser/esm/C1KcphZVjVAE638t.mjs +415 -0
- package/browser/esm/{C36WT3I3aIR8y7I6.mjs → C3V7EwPHHPx9aEkE.mjs} +47 -48
- package/browser/esm/CCAPeyEqlStPrh6B.mjs +294 -0
- package/browser/esm/CF2Az5oBVjAigMRt.mjs +68 -0
- package/browser/esm/CIqEqDyl8JZRMblX.mjs +225 -0
- package/browser/esm/CJERhz_1u40JkHfH.mjs +235 -0
- package/browser/esm/CNtF9Fix0G6BEVEl.mjs +424 -0
- package/browser/esm/{D7HOLngE_1FYF6y6.mjs → CWP52da2iNOs3Qtz.mjs} +82 -94
- package/browser/esm/CWpF_0HjYiRiddX6.mjs +31 -0
- package/browser/esm/CbedwfwBLBaagGD-.mjs +360 -0
- package/browser/esm/{DNhLiDpvz3lAR190.mjs → Cc9tcBSYzJIv-dZw.mjs} +156 -109
- package/browser/esm/CcPLziOAdWTbG7xx.mjs +141 -0
- package/browser/esm/CdRnGw_9tvkn9d9o.mjs +335 -0
- package/browser/esm/{BWAIbfQZ6h5xVLdB.mjs → CgLDSZ8XvBqAB-Y2.mjs} +20 -18
- package/browser/esm/CgZLR7ijzsUoawf8.mjs +1281 -0
- package/browser/esm/Cn6OsV-MbO0rIM-o.mjs +442 -0
- package/browser/esm/{0Rpk1T56LoSnDrmq.mjs → CnDnNU6GGzM05K8w.mjs} +4 -4
- package/browser/esm/CnVHQ6i6a8VCMsn1.mjs +106 -0
- package/browser/esm/D06He-Tw4moPdM5f.mjs +103 -0
- package/browser/esm/D9lQwTAJ9RO60ovS.mjs +72 -0
- package/browser/esm/{D3BwGfI_IEjay0dA.mjs → D9xw1YuRJUjPMaqA.mjs} +2 -2
- package/browser/esm/DBr6lCvWLLwnzSGy.mjs +386 -0
- package/browser/esm/DEdHwT-2JZO9HyZN.mjs +14 -0
- package/browser/esm/DH4SdW-02-I8082_.mjs +14 -0
- package/browser/esm/DHbnrUh5rdi62fgO.mjs +516 -0
- package/browser/esm/DJRKcOT0Xv-1r0OP.mjs +161 -0
- package/browser/esm/DPycoTH_4RNdK2hu.mjs +252 -0
- package/browser/esm/{CpTqhDZotYaKGbLl.mjs → DXQTN_6-MvPivCrz.mjs} +8 -6
- package/browser/esm/DaNVYYZLCql8_n0i.mjs +831 -0
- package/browser/esm/Dakiv-oEU8ty2ILI.mjs +77 -0
- package/browser/esm/DfCd-MxLjE3gZ5jl.mjs +392 -0
- package/browser/esm/DhZqt49Ue-lveZv3.mjs +2692 -0
- package/browser/esm/DkxgFV6jJb6pO6lM.mjs +490 -0
- package/browser/esm/{B_PhUn6yySwXt2wo.mjs → QKDgV7kur90Bzexo.mjs} +14 -13
- package/browser/esm/R8q92QTpUT-sB4Nq.mjs +8547 -0
- package/browser/esm/RaV_j7qhH97TUb6P.mjs +1550 -0
- package/browser/esm/S-MJsifSUY334In9.mjs +8 -0
- package/browser/esm/UW74C3TpyGhFEOFO.mjs +267 -0
- package/browser/esm/W-jkQJTDojDSK93k.mjs +242 -0
- package/browser/esm/czz-Du13p5saoAex.mjs +318 -0
- package/browser/esm/{DErAKw-lIK3RY8m-.mjs → ilgUW6eI60262DJU.mjs} +2 -2
- package/browser/esm/index.mjs +1910 -289
- package/browser/esm/kbx_7Y2kVGMGIWtW.mjs +633 -0
- package/browser/esm/vCWRBUPIH8HXlYjO.mjs +94 -0
- package/browser/esm/w0DasqEtSJvoQVk2.mjs +517 -0
- package/browser/esm/w5dY32V2IxkbDBsT.mjs +225 -0
- package/licenses/dependencies.txt +113 -366
- package/node/esm/7GlVS1uyKRUAAjw9.mjs +1831 -0
- package/node/esm/B0mjDApnDOWo9UGr.mjs +412 -0
- package/node/esm/B19kx8jtLWU7WYCa.mjs +142 -0
- package/node/esm/BAFf7hg6qgFyQDW8.mjs +73 -0
- package/node/esm/BDdBcx7cNTM1hIXu.mjs +972 -0
- package/node/esm/BGBolrjPvNncjS1h.mjs +94 -0
- package/node/esm/BI3dFg_vx1Vgxgps.mjs +516 -0
- package/node/esm/BO19LMEPFqVsK1xu.mjs +267 -0
- package/node/esm/BSrtVTtNqcTg8QKK.mjs +68 -0
- package/node/esm/BcLccq7CvZiJXCDZ.mjs +319 -0
- package/node/esm/BeZ1ZY1UJepW8u1f.mjs +118 -0
- package/node/esm/BkLwJxkD4pyrume5.mjs +425 -0
- package/node/esm/{YKY4d8_Ckc8nPQqI.mjs → Bl_AT6xOKzBqc3PT.mjs} +10 -10
- package/node/esm/{DQtpY5kX99aMHygs.mjs → Bqah1dCUEhmRmY3c.mjs} +2 -2
- package/node/esm/Bv5awmbwVUdl4rma.mjs +106 -0
- package/node/esm/C3mSFWiCu7iONlk6.mjs +638 -0
- package/node/esm/CAJhvJU0gj93fPWl.mjs +141 -0
- package/node/esm/CJobW3iRAQ5vHeQr.mjs +14 -0
- package/node/esm/{BbXHuDHRHOW_6Sbs.mjs → CSJTM9SCqIDkHlpm.mjs} +21 -21
- package/node/esm/CUnv4ewRTvuP0si8.mjs +1276 -0
- package/node/esm/CWnezGEPuX9UeJ8E.mjs +385 -0
- package/node/esm/{Cul_Vgip2OE8yFBQ.mjs → CarjiReyjevcMdlI.mjs} +190 -141
- package/node/esm/CoG2fq6dYCvhC5yu.mjs +224 -0
- package/node/esm/Cpegk2BA6FOrOkZ0.mjs +77 -0
- package/node/esm/Cq1V2i0dRTWnoU1K.mjs +94 -0
- package/node/esm/{Ccrq9TNkiiSHKw-m.mjs → CyPtKWjud-Y-Pvq8.mjs} +2 -2
- package/node/esm/DEVN1ZPedFq8Bnui.mjs +197 -0
- package/node/esm/{BlD3bHo8AAxK7O1j.mjs → DFUPAGKlHT2-8dyC.mjs} +33 -31
- package/node/esm/DMxfzW-UQdMaV-Gx.mjs +975 -0
- package/node/esm/DWbMD1KaT8mlCUfO.mjs +519 -0
- package/node/esm/{DifZAchLTKOmWpkv.mjs → DffuRwJI_5oVtzZb.mjs} +23 -23
- package/node/esm/Dg9rTwnydI2UVmGG.mjs +242 -0
- package/node/esm/{BTI9exTFHEYzVjw9.mjs → DmQMejdH1-aYq99z.mjs} +70 -71
- package/node/esm/{CbpkRpNbQYYOJbxH.mjs → DvSoGqy_51YQZzYM.mjs} +84 -96
- package/node/esm/DzTvKGqU1I9m-_qd.mjs +391 -0
- package/node/esm/{Dvvg1Yo2e7OGd8sv.mjs → PKRuDgaA8RrsqSNn.mjs} +29 -29
- package/node/esm/{v0BFuYjhq2G8zDRe.mjs → POUGgaN5BmOnEPPl.mjs} +2 -2
- package/node/esm/WqxW6Up5_6oeJrSr.mjs +489 -0
- package/node/esm/ehyFZGpXZSmR7Q7-.mjs +294 -0
- package/node/esm/index.mjs +9829 -8837
- package/package.json +16 -19
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/groups.cmd.json +61 -10
- package/resources/locales/de/ui.msg.json +273 -15
- package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
- package/resources/locales/en/groups.cmd.json +71 -11
- package/resources/locales/en/ui.msg.json +278 -15
- package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
- package/types/src/anomalies/AnomaliesCommands.d.ts +8 -0
- package/types/src/anomalies/AnomaliesMessages.d.ts +30 -0
- package/types/src/anomalies/AnomaliesPlugin.d.ts +12 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/_source.d.ts +7 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/border/BorderTemplateIcon.d.ts +6 -1
- package/types/src/chart/ChartFormatPanel.d.ts +20 -0
- package/types/src/chart/ChartPlugin.d.ts +6 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/ColorCommandButton.d.ts +5 -0
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
- package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
- package/types/src/command/index.d.ts +2 -0
- package/types/src/comments/CommentCard.d.ts +2 -2
- package/types/src/comments/CommentsPlugin.d.ts +1 -1
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +1 -1
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +3 -3
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
- package/types/src/conditions/CombinatorOption.d.ts +7 -0
- package/types/src/conditions/ConditionEditor.d.ts +55 -3
- package/types/src/conditions/ConditionUtils.d.ts +34 -6
- package/types/src/conditions/ExpressionOption.d.ts +6 -0
- package/types/src/conditions/MembershipOption.d.ts +67 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/ScalarOption.d.ts +5 -4
- package/types/src/conditions/SelectorSelect.d.ts +16 -7
- package/types/src/conditions/index.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +2 -2
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -5
- package/types/src/dataValidation/DataValidationIcon.d.ts +1 -1
- package/types/src/dataValidation/DataValidationPlugin.d.ts +1 -1
- package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
- package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
- package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
- package/types/src/dialog/SparklineEditDialog.d.ts +10 -0
- package/types/src/dialog/SparklineNewDialog.d.ts +23 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
- package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +1 -1
- package/types/src/fill/GradientEditor.d.ts +15 -13
- package/types/src/fill/GradientStopsBar.d.ts +43 -0
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/fill/index.d.ts +1 -0
- package/types/src/filter/ColumnMenu.d.ts +31 -1
- package/types/src/filter/PivotMenu.d.ts +31 -0
- package/types/src/filter/index.d.ts +1 -1
- package/types/src/form/FormulaField.d.ts +4 -4
- package/types/src/form/InputField.d.ts +5 -5
- package/types/src/format/BorderPreview.d.ts +11 -4
- package/types/src/format/FillPanel.d.ts +42 -2
- package/types/src/format/FormatPanelParts.d.ts +3 -1
- package/types/src/format/FormatPlugin.d.ts +1 -6
- package/types/src/format/LinePanel.d.ts +53 -0
- package/types/src/format/LinePreviews.d.ts +71 -0
- package/types/src/format/index.d.ts +1 -0
- package/types/src/format/useFormatSelection.d.ts +6 -6
- package/types/src/formulaBar/IFormulaBar.d.ts +32 -3
- package/types/src/formulaBar/MobileFormulaBar.d.ts +42 -0
- package/types/src/formulaBar/MobileInputToolbar.d.ts +43 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/formulaBar/useFormulaBarSession.d.ts +68 -0
- package/types/src/index.d.ts +19 -6
- package/types/src/itemsPanel/ItemCard.d.ts +50 -7
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
- package/types/src/itemsPanel/index.d.ts +1 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/named/NamedPlugin.d.ts +1 -1
- package/types/src/picture/PicturePlugin.d.ts +6 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/pivot/PivotChipMenu.d.ts +10 -0
- package/types/src/pivot/PivotPlugin.d.ts +3 -0
- package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
- package/types/src/pivot/PivotTableHeader.d.ts +12 -0
- package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
- package/types/src/pivot/_pivotSource.d.ts +7 -0
- package/types/src/presence/PresenceOverlay.d.ts +14 -0
- package/types/src/presence/PresencePlugin.d.ts +31 -0
- package/types/src/presence/PresenceStrip.d.ts +22 -0
- package/types/src/presence/PresenceTaskPane.d.ts +13 -0
- package/types/src/presence/Timeline.d.ts +29 -0
- package/types/src/presence/index.d.ts +5 -0
- package/types/src/protection/ProtectedCellsPanel.d.ts +3 -3
- package/types/src/protection/ProtectionPlugin.d.ts +1 -1
- package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
- package/types/src/protection/index.d.ts +1 -1
- package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
- package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
- package/types/src/shape/ShapePlugin.d.ts +8 -0
- package/types/src/shape/index.d.ts +3 -0
- package/types/src/slicer/InsertSlicerCommandButton.d.ts +13 -0
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +12 -0
- package/types/src/slicer/SlicerPlugin.d.ts +6 -0
- package/types/src/slicer/index.d.ts +3 -0
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/StudioProps.d.ts +62 -27
- package/types/src/studio/formulaBarPlacement.d.ts +35 -0
- package/types/src/studio/useStudioApp.d.ts +25 -24
- package/types/src/table/TablePlugin.d.ts +1 -1
- package/types/src/table/_drawStyleSwatch.d.ts +25 -0
- package/types/src/template/TemplateDialog.d.ts +1 -1
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/template/TemplateSearchField.d.ts +17 -1
- package/types/src/template/categoryColor.d.ts +8 -0
- package/types/src/template/useTemplateCatalog.d.ts +2 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/theme/ThemeUtils.d.ts +8 -27
- package/types/src/toolbar/WorkbookToolbars.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +44 -16
- package/types/src/workbook/OutlineButtons.d.ts +11 -0
- package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/cjs/2tG9HJLr-WjsOCP3.cjs +0 -1
- package/browser/cjs/3RXtLkq7wTAV6y_e.cjs +0 -1
- package/browser/cjs/3k_KqDFr-AybPztc.cjs +0 -5
- package/browser/cjs/4_Zy3pR6YXkzISoK.cjs +0 -1
- package/browser/cjs/BD50lsTki7wvzb5g.cjs +0 -1
- package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +0 -1
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
- package/browser/cjs/Bc-YisjBtD56vBAW.cjs +0 -1
- package/browser/cjs/BcBrhEv9acaTxPkO.cjs +0 -13
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/ByIUHPOa02D7XbdC.cjs +0 -1
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
- package/browser/cjs/CkroJ2FmfFvk6Eyv.cjs +0 -1
- package/browser/cjs/Clzu4HOXk3QSlzUD.cjs +0 -8
- package/browser/cjs/CzJvR12QCQb-0Rtn.cjs +0 -1
- package/browser/cjs/D-Yo5aV9STT5KH4G.cjs +0 -1
- package/browser/cjs/DwkiLFWUtLC8ZcIQ.cjs +0 -1
- package/browser/cjs/HuPFsmz7kyZVo3c7.cjs +0 -1
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
- package/browser/cjs/M0_dvdYwhikqP9kg.cjs +0 -2
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -2
- package/browser/esm/7gisHVXYgcPxWH8-.mjs +0 -223
- package/browser/esm/B7k8enrhC2Rvqhn1.mjs +0 -152
- package/browser/esm/BK4OEmeaw-kC-vAN.mjs +0 -5355
- package/browser/esm/DvYZOxsaTNeBKuFq.mjs +0 -411
- package/browser/esm/DzWcb3yuPXS0E4_P.mjs +0 -236
- package/browser/esm/WftYXVWvPKx99H0H.mjs +0 -115
- package/browser/esm/eoNyVUe5ZEpHwJ7k.mjs +0 -52
- package/browser/esm/hFLn30a6N1fEy7fz.mjs +0 -13582
- package/browser/esm/jkFhDHWwKoyTSSDL.mjs +0 -1150
- package/node/esm/CpteKzMPi39jxmYL.mjs +0 -236
- package/node/esm/DA2gosTk8L-FUVI5.mjs +0 -4503
- package/node/esm/DP23-d6_VRFro0_D.mjs +0 -415
- package/node/esm/lH1iFsECniBRMubb.mjs +0 -115
- package/types/src/conditions/DateTimeOption.d.ts +0 -43
- package/types/src/conditions/ListSourceOption.d.ts +0 -31
- package/types/src/filter/FilterList.d.ts +0 -31
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
2
2
|
import { WindowChromeOptions, WorkbookLoadEvent } from '@sheetxl/react';
|
|
3
|
+
import { StudioProps } from './StudioProps';
|
|
3
4
|
/**
|
|
4
5
|
* What the studio should open. An {@link IWorkbook} / `Promise` / {@link IWorkbookIO.ReadOptions} /
|
|
5
6
|
* source string. When omitted, the `?source` (and `?title`) URL query is used, else a blank
|
|
6
|
-
* workbook is created.
|
|
7
|
+
* workbook is created. A `#fragment` after a `?source` names where that workbook opens: a sheet
|
|
8
|
+
* (`#Charts`), cells (`#Charts!B4`) or a defined name.
|
|
7
9
|
*/
|
|
8
10
|
export type StudioAppSource = IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions | string;
|
|
9
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Options for {@link useStudioApp}: the app's own (what to open, the startup dialog, the window chrome)
|
|
13
|
+
* plus **any `Studio` prop**, passed through to the returned props — so the hook's result is the whole
|
|
14
|
+
* `<Studio>` spread. `workbook` is spelled {@link StudioAppOptions.source} here, since the app's source
|
|
15
|
+
* may also be a string.
|
|
16
|
+
*/
|
|
17
|
+
export interface StudioAppOptions extends WindowChromeOptions, Omit<StudioProps, 'workbook'> {
|
|
10
18
|
/**
|
|
11
|
-
* What to open. If omitted, the `?source` / `?title` URL query is read
|
|
12
|
-
* created. See {@link StudioAppSource}.
|
|
19
|
+
* What to open. If omitted, the `?source` / `?title` URL query is read (with a `#fragment` for
|
|
20
|
+
* the sheet or cells to open at), else a blank workbook is created. See {@link StudioAppSource}.
|
|
13
21
|
*/
|
|
14
22
|
source?: StudioAppSource;
|
|
15
23
|
/**
|
|
@@ -25,33 +33,26 @@ export interface StudioAppOptions extends WindowChromeOptions {
|
|
|
25
33
|
*/
|
|
26
34
|
templatePath?: string;
|
|
27
35
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
36
|
+
* How the studio makes room for the virtual keyboard. See {@link StudioProps.virtualKeyboard}.
|
|
37
|
+
* @defaultValue `'resize'`: the app owns the window, so the studio shrinks to the part of the screen
|
|
38
|
+
* the keyboard leaves
|
|
39
|
+
*/
|
|
40
|
+
virtualKeyboard?: StudioProps['virtualKeyboard'];
|
|
41
|
+
/**
|
|
42
|
+
* The app's own `onWorkbookLoad` handler, run after the startup dialog. (The hook also chains your
|
|
43
|
+
* `onWorkbookChange` / `onDirtyChange`, which it needs for the window chrome.)
|
|
30
44
|
*/
|
|
31
45
|
onWorkbookLoad?: (event: WorkbookLoadEvent) => void | Promise<void>;
|
|
32
46
|
}
|
|
33
|
-
/**
|
|
34
|
-
* The props {@link useStudioApp} returns for spreading onto `<Studio>`.
|
|
35
|
-
*/
|
|
36
|
-
export interface StudioAppProps {
|
|
37
|
-
/** The studio's value object — pass straight to `<Studio workbook={…} />`. */
|
|
38
|
-
workbook?: IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions;
|
|
39
|
-
/** Tracks the studio's live workbook (so the window chrome follows in-app opens). */
|
|
40
|
-
onWorkbookChange: (workbook: IWorkbook | null) => void;
|
|
41
|
-
/** Tracks the unsaved-changes flag (drives the title marker + close prompt). */
|
|
42
|
-
onDirtyChange: (isDirty: boolean) => void;
|
|
43
|
-
/** Shows the startup dialog ({@link StudioAppOptions.startWith}), then runs the app's own handler. */
|
|
44
|
-
onWorkbookLoad: (event: WorkbookLoadEvent) => void | Promise<void>;
|
|
45
|
-
}
|
|
46
47
|
/**
|
|
47
48
|
* Single-call setup for a single-per-window **Studio** app: resolves what to open (an explicit
|
|
48
49
|
* {@link StudioAppOptions.source}, the `?source` URL query, or a blank workbook) and manages the
|
|
49
50
|
* window chrome — document/tab title (with an unsaved `●` marker), an unsaved-changes close prompt,
|
|
50
51
|
* and a browser keyboard guard.
|
|
51
52
|
*
|
|
52
|
-
* @returns
|
|
53
|
-
* `onWorkbookChange` / `onDirtyChange` callbacks the studio fires as
|
|
54
|
-
* so the chrome follows.
|
|
53
|
+
* @returns the `<Studio>` props: every `Studio` prop given in `options`, plus `workbook` (the value to
|
|
54
|
+
* open) and the `onWorkbookChange` / `onDirtyChange` / `onWorkbookLoad` callbacks the studio fires as
|
|
55
|
+
* it opens/replaces workbooks, so the chrome follows (yours are chained after the hook's).
|
|
55
56
|
*
|
|
56
57
|
* @remarks
|
|
57
58
|
* Studio owns the workbook lifecycle (resolve, Open/replace, save, dirty tracking) and reports the
|
|
@@ -62,9 +63,9 @@ export interface StudioAppProps {
|
|
|
62
63
|
*
|
|
63
64
|
* @example
|
|
64
65
|
* ```tsx
|
|
65
|
-
* const studioApp = useStudioApp(); // reads ?source, else a blank workbook
|
|
66
|
+
* const studioApp = useStudioApp({ startWith: 'welcome', propsWorkbook: { … } }); // reads ?source, else a blank workbook
|
|
66
67
|
* return <Studio {...studioApp} />;
|
|
67
68
|
* ```
|
|
68
69
|
*/
|
|
69
|
-
export declare const useStudioApp: (options?: StudioAppOptions) =>
|
|
70
|
+
export declare const useStudioApp: (options?: StudioAppOptions) => StudioProps;
|
|
70
71
|
//# sourceMappingURL=useStudioApp.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const TablePlugin: () => void;
|
|
1
|
+
export declare const TablePlugin: () => (() => void);
|
|
2
2
|
//# sourceMappingURL=TablePlugin.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ICellStyle } from '@sheetxl/sdk';
|
|
2
|
+
/** The grid of cells a style swatch draws, and the size of each. */
|
|
3
|
+
export interface StyleSwatchGrid {
|
|
4
|
+
rows: number;
|
|
5
|
+
columns: number;
|
|
6
|
+
/** A cell's width in pixels, its right line included. */
|
|
7
|
+
cellWidth: number;
|
|
8
|
+
/** A cell's height in pixels, its bottom line included. */
|
|
9
|
+
cellHeight: number;
|
|
10
|
+
}
|
|
11
|
+
/** A swatch's size in pixels: neighboring cells share a line. */
|
|
12
|
+
export declare const swatchSizeOf: (grid: StyleSwatchGrid) => {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Draws a table or pivot table style swatch, each cell's fill, outer lines and a stroke for its
|
|
18
|
+
* text, and returns it as a CSS `url(...)` of a data URL; `null` when the canvas has no context.
|
|
19
|
+
*
|
|
20
|
+
* @param styleAt The style a cell shows, from the swatch's top-left.
|
|
21
|
+
* @param gridFill An opaque color for cells with no fill (a canvas fill cannot take a `var()`).
|
|
22
|
+
* @param hasText Whether a cell shows text; absent, every cell does.
|
|
23
|
+
*/
|
|
24
|
+
export declare const drawStyleSwatch: (canvas: HTMLCanvasElement, grid: StyleSwatchGrid, styleAt: (rowIndex: number, colIndex: number) => ICellStyle, darkMode: boolean, gridFill: string, hasText?: (rowIndex: number, colIndex: number) => boolean) => string | null;
|
|
25
|
+
//# sourceMappingURL=_drawStyleSwatch.d.ts.map
|
|
@@ -12,7 +12,7 @@ export interface TemplateDialogProps extends InternalWindowProps {
|
|
|
12
12
|
onShowAtStartupChange?: (show: boolean) => void;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* "Choose a template": the template gallery with a search
|
|
15
|
+
* "Choose a template": the template gallery with a search that can be limited to categories.
|
|
16
16
|
*/
|
|
17
17
|
declare const TemplateDialog: React.FC<TemplateDialogProps>;
|
|
18
18
|
export default TemplateDialog;
|
|
@@ -14,7 +14,7 @@ export interface TemplatePanelProps extends Omit<React.HTMLAttributes<HTMLDivEle
|
|
|
14
14
|
*/
|
|
15
15
|
groupBy?: (entry: TemplateEntry) => string;
|
|
16
16
|
/** Render a tile in place of the default one. */
|
|
17
|
-
renderTile?: (
|
|
17
|
+
renderTile?: (props: TemplateTileRenderProps) => React.ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* The smallest tile width, in pixels.
|
|
20
20
|
* @defaultValue 180
|
|
@@ -35,6 +35,10 @@ export interface TemplatePanelProps extends Omit<React.HTMLAttributes<HTMLDivEle
|
|
|
35
35
|
sx?: SxProps<Theme>;
|
|
36
36
|
}
|
|
37
37
|
/** What the panel hands a tile. */
|
|
38
|
+
/** What {@link TemplatePanelProps.renderTile} is handed. */
|
|
39
|
+
export interface TemplateTileRenderProps extends TemplateTileProps {
|
|
40
|
+
entry: TemplateEntry;
|
|
41
|
+
}
|
|
38
42
|
export interface TemplateTileProps {
|
|
39
43
|
category?: TemplateCategory;
|
|
40
44
|
onSelect: () => void;
|
|
@@ -3,11 +3,27 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
import { TemplateCategory, TemplateEntry } from './useTemplateCatalog';
|
|
4
4
|
/** Whether an entry matches a search: its title, description, tags or category title. */
|
|
5
5
|
export declare const matchesTemplateQuery: (entry: TemplateEntry, query: string, category?: TemplateCategory) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* The gallery filter for a search: entries in any of `categoryIds` (all categories when empty) that
|
|
8
|
+
* match `query`. `undefined` when nothing is filtered.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useTemplateFilter: (categories: readonly TemplateCategory[], query: string, categoryIds: readonly string[]) => ((entry: TemplateEntry) => boolean) | undefined;
|
|
6
11
|
export interface TemplateSearchFieldProps {
|
|
7
12
|
value: string;
|
|
8
13
|
onChange: (value: string) => void;
|
|
14
|
+
/** The categories offered as filters. With fewer than two, the field is a plain search. */
|
|
15
|
+
categories?: readonly TemplateCategory[];
|
|
16
|
+
/** The ids of the categories the search is limited to. Empty is every category. */
|
|
17
|
+
categoryIds?: readonly string[];
|
|
18
|
+
onCategoryIdsChange?: (categoryIds: string[]) => void;
|
|
9
19
|
sx?: SxProps<Theme>;
|
|
10
20
|
}
|
|
11
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The template search box. Same shape as the task panes' search fields.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Given categories, the search icon opens a list of them. A chosen category shows as a chip in the
|
|
26
|
+
* field and limits the search to it; with several chosen, an entry in any of them is shown.
|
|
27
|
+
*/
|
|
12
28
|
export declare const TemplateSearchField: (props: TemplateSearchFieldProps) => React.ReactElement;
|
|
13
29
|
//# sourceMappingURL=TemplateSearchField.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Theme } from '@mui/system';
|
|
2
|
+
import { TemplateCategory } from './useTemplateCatalog';
|
|
3
|
+
/** The category's color and the black or white that reads on it, for the theme in use. */
|
|
4
|
+
export declare const resolveCategoryColor: (category: TemplateCategory | undefined, theme: Theme) => {
|
|
5
|
+
fill: string;
|
|
6
|
+
text: string;
|
|
7
|
+
} | null;
|
|
8
|
+
//# sourceMappingURL=categoryColor.d.ts.map
|
|
@@ -12,6 +12,8 @@ export interface TemplateCategory {
|
|
|
12
12
|
title: string;
|
|
13
13
|
description?: string;
|
|
14
14
|
icon?: string;
|
|
15
|
+
/** A CSS color for the light theme. The dark theme shows it inverted. */
|
|
16
|
+
color?: string;
|
|
15
17
|
}
|
|
16
18
|
/** One template in a catalog. */
|
|
17
19
|
export interface TemplateEntry {
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { IThemeCollection, ITheme } from '@sheetxl/sdk';
|
|
3
3
|
import { PopupButtonType, ExhibitPopupIconButtonProps } from '@sheetxl/utils-mui';
|
|
4
4
|
import { ThemeSelectPanelProps } from './ThemeSelectPanel';
|
|
5
|
-
export interface ThemeSelectPopupButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "
|
|
5
|
+
export interface ThemeSelectPopupButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "renderPopupPanel"> {
|
|
6
6
|
themes: IThemeCollection;
|
|
7
7
|
selectedTheme?: ITheme;
|
|
8
8
|
onSelectTheme?: (docTheme: ITheme) => void;
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import { Theme, ThemeOptions } from '@mui/material';
|
|
2
|
-
import { TokenTheme
|
|
3
|
-
|
|
4
|
-
export type ExplicitSurface = 'app' | 'header' | 'grid';
|
|
5
|
-
/**
|
|
6
|
-
* Explicit token values a HOST supplies, addressed by **cell** — `(surface × mode)`, not just token. So a
|
|
7
|
-
* host says "the header paper is `editorGroupHeader.tabsBackground`" without any new token name entering
|
|
8
|
-
* the vocabulary; the expressiveness comes from the matrix that already exists (THEMING-DESIGN §8).
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* { dark: { app: { 'color-base-200': '#1f1f1f' }, header: { 'color-base-100': '#181818' } } }
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* The escape hatch out of the math below. Every derived value here (the gridline, the header hover) is an
|
|
16
|
-
* *elevation* calculation: it assumes "raised" means "lighter", which is the Material idea. A host with a
|
|
17
|
-
* FLAT design language (VS Code, Fluent) has its own named surfaces that do not follow that curve at all,
|
|
18
|
-
* and mapping them onto the five MUI palette slots the adapter reads throws all of them away. So each
|
|
19
|
-
* derivation is a FALLBACK: an explicitly supplied token wins, and only what the host leaves unset is
|
|
20
|
-
* computed.
|
|
21
|
-
*/
|
|
22
|
-
export type ExplicitTokens = Partial<Record<ThemeMode, Partial<Record<ExplicitSurface, Partial<TokenTheme>>>>>;
|
|
2
|
+
import { TokenTheme } from '@sheetxl/utils-react';
|
|
3
|
+
import { ExplicitTokens } from '@sheetxl/react';
|
|
23
4
|
/**
|
|
24
5
|
* The MUI→Theme adapter: maps a MUI {@link Theme} onto the framework-neutral flat {@link TokenTheme}
|
|
25
6
|
* token set (utils-react) — one mode's worth of `--sxl-*` values. {@link createStudioThemeCSS} compiles the
|
|
@@ -31,8 +12,8 @@ export type ExplicitTokens = Partial<Record<ThemeMode, Partial<Record<ExplicitSu
|
|
|
31
12
|
*/
|
|
32
13
|
export declare const createThemeFromMUITheme: (muiTheme: Theme, explicit?: ExplicitTokens) => TokenTheme;
|
|
33
14
|
/**
|
|
34
|
-
* The **inverse** adapter (`sxl → mui`): map a partial {@link TokenTheme} (
|
|
35
|
-
*
|
|
15
|
+
* The **inverse** adapter (`sxl → mui`): map a partial {@link TokenTheme} (the host's `app`
|
|
16
|
+
* tokens) onto the MUI palette/geometry slots the forward {@link createThemeFromMUITheme} reads. Studio
|
|
36
17
|
* merges the result INTO its `createExhibitTheme` input, so a token override flows `sxl → mui → sxl`: the MUI
|
|
37
18
|
* chrome (buttons / slider / tabs) follows it as well as the grid — no "half-themed" mixed bag. Only the mapped
|
|
38
19
|
* subset (colors, radius, fonts) crosses; non-color MUI config (components / spacing) is untouched. Partial in,
|
|
@@ -48,10 +29,10 @@ export declare const tokensToMuiOptions: (tokens?: Partial<TokenTheme>) => Theme
|
|
|
48
29
|
*
|
|
49
30
|
* `explicit` is the host's own token values ({@link ExplicitTokens}), addressed per `(surface × mode)` cell.
|
|
50
31
|
* Each cell is merged into the surface it names AND consulted by that surface's derivations, so a host color
|
|
51
|
-
* participates in the math instead of being computed over. This is emitted in `sxl-app
|
|
52
|
-
* `sxl-overrides
|
|
53
|
-
*
|
|
54
|
-
*
|
|
32
|
+
* participates in the math instead of being computed over. This is emitted in `sxl-app`, not
|
|
33
|
+
* `sxl-overrides`, which is why it can be surface-aware: an override-layer rule keyed on `[mode]` alone
|
|
34
|
+
* outranks (by layer, not specificity) the `[mode][surface="header"]` rules below, so it would flatten every
|
|
35
|
+
* surface at once.
|
|
55
36
|
*/
|
|
56
37
|
export declare const createStudioThemeCSS: (lightTheme: Theme, darkTheme: Theme, scope?: string, explicit?: ExplicitTokens) => string;
|
|
57
38
|
//# sourceMappingURL=ThemeUtils.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
3
|
import { PaperProps, ToolbarProps } from '@mui/material';
|
|
4
4
|
/**
|
|
5
|
-
* Fallback tab list used only when the {@link
|
|
5
|
+
* Fallback tab list used only when the {@link WORKBOOK_TOOLBARS_KEY} strip panel is not registered (a bare
|
|
6
6
|
* host that never called `registerWorkbookCommandGroups`). Normally the strip's members ARE the config.
|
|
7
7
|
*/
|
|
8
8
|
export declare const DefaultWorkbookToolbars: readonly string[];
|
|
@@ -41,6 +41,6 @@ export interface WorkbookToolbarsProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
41
41
|
*/
|
|
42
42
|
sx?: SxProps;
|
|
43
43
|
}
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const defaultRenderToolbar: (props: WorkbookToolbarsProps) => React.ReactElement;
|
|
45
45
|
export declare const WorkbookToolbars: React.NamedExoticComponent<WorkbookToolbarsProps & React.RefAttributes<HTMLElement>>;
|
|
46
46
|
//# sourceMappingURL=WorkbookToolbars.d.ts.map
|
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WorksheetElementProps, SheetTabProps, CommentCardRenderProps, HyperlinkCardRenderProps, TableToolbarRenderProps, PivotToolbarRenderProps, OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
|
+
import { TooltipRenderProps } from '@sheetxl/grid-react';
|
|
3
4
|
import { AnimatedLoadingPanelProps, StackTraceErrorPanelProps } from '@sheetxl/utils-mui';
|
|
4
5
|
import { FormulaBarProps } from '../formulaBar';
|
|
5
|
-
import { ColumnMenuProps } from '../filter';
|
|
6
|
+
import { ColumnMenuProps, PivotMenuProps } from '../filter';
|
|
6
7
|
import { StatusBarProps } from '../statusBar';
|
|
7
8
|
import { MovableContextMenuProps } from '../movable';
|
|
8
9
|
import { SheetsAllMenuProps, SheetTabMenuProps } from '../sheet';
|
|
9
10
|
import { WorkbookStripProps } from './WorkbookStrip';
|
|
10
11
|
import { WorkbookContextMenuProps } from './WorkbookContextMenu';
|
|
11
12
|
import { FillMenuProps } from './FillMenu';
|
|
13
|
+
/**
|
|
14
|
+
* The bubble of the grid's tooltips (a resize readout, a drag's destination, a range tip) in MUI's
|
|
15
|
+
* `Tooltip` look, so they match the toolbar's.
|
|
16
|
+
*/
|
|
17
|
+
export declare const defaultRenderTooltip: (props: TooltipRenderProps) => React.ReactNode;
|
|
12
18
|
/** The card of a threaded comment as it floats beside its cell. */
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
19
|
+
export declare const defaultRenderCommentCard: (props: CommentCardRenderProps) => React.ReactElement;
|
|
20
|
+
export declare const defaultRenderHyperlinkCard: (props: HyperlinkCardRenderProps) => React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* The toolbar at a hovered table's corner: the toolbar's own table split button — the quick press edits
|
|
23
|
+
* the table, the dropdown is the style gallery.
|
|
24
|
+
*/
|
|
25
|
+
export declare const TableToolbar: React.FC<TableToolbarRenderProps>;
|
|
26
|
+
export declare const defaultRenderTableToolbar: (props: TableToolbarRenderProps) => React.ReactElement;
|
|
27
|
+
/**
|
|
28
|
+
* The toolbar at a hovered pivot table's corner, as the {@link TableToolbar table's}: the quick press
|
|
29
|
+
* edits the pivot table, the dropdown is the pivot style gallery.
|
|
30
|
+
*/
|
|
31
|
+
export declare const PivotToolbar: React.FC<PivotToolbarRenderProps>;
|
|
32
|
+
export declare const defaultRenderPivotToolbar: (props: PivotToolbarRenderProps) => React.ReactElement;
|
|
33
|
+
/** The collapse / expand button of a row or column group, in the outline gutter. */
|
|
34
|
+
export declare const defaultRenderOutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
35
|
+
/** A level button `1`..`n` of the outline. */
|
|
36
|
+
export declare const defaultRenderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
37
|
+
export declare const defaultRenderMovableMenu: (props: MovableContextMenuProps) => React.ReactElement;
|
|
38
|
+
export declare const defaultRenderFillMenu: (props: FillMenuProps) => React.ReactElement;
|
|
39
|
+
export declare const defaultRenderContextMenu: (props: WorkbookContextMenuProps) => React.ReactElement;
|
|
40
|
+
export declare const defaultRenderColumnMenu: (props: ColumnMenuProps) => React.ReactElement;
|
|
41
|
+
export declare const defaultRenderPivotMenu: (props: PivotMenuProps) => React.ReactElement;
|
|
42
|
+
/**
|
|
43
|
+
* The formula bar for the studio's placement: the desktop bar above the grid, the mobile host when
|
|
44
|
+
* the bar sits at the bottom.
|
|
45
|
+
*/
|
|
46
|
+
export declare const defaultRenderFormulaBar: (props: FormulaBarProps) => React.ReactElement;
|
|
47
|
+
export declare const defaultRenderWorkbookLoading: (props: AnimatedLoadingPanelProps) => React.ReactElement;
|
|
48
|
+
export declare const defaultRenderWorkbookError: (props: StackTraceErrorPanelProps) => React.ReactElement;
|
|
49
|
+
export declare const defaultRenderWorksheet: (props: WorksheetElementProps) => React.ReactElement;
|
|
50
|
+
export declare const defaultRenderStatusBar: (props: StatusBarProps) => React.ReactElement;
|
|
51
|
+
export declare const defaultRenderTabs: (props: WorkbookStripProps) => React.ReactElement;
|
|
52
|
+
export declare const defaultRenderSheetTabMenu: (props: SheetTabMenuProps) => React.ReactElement;
|
|
53
|
+
export declare const defaultRenderSheetsAll: (props: SheetsAllMenuProps) => React.ReactElement;
|
|
54
|
+
export declare const defaultRenderSheetTab: (props: SheetTabProps) => React.ReactElement;
|
|
27
55
|
//# sourceMappingURL=DefaultRenderers.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
|
+
/**
|
|
4
|
+
* The studio's collapse / expand button for a row or column group.
|
|
5
|
+
*/
|
|
6
|
+
export declare const OutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
7
|
+
/**
|
|
8
|
+
* The studio's level button `1`..`n`: the collapse button's hover, in the corner knob's colors.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=OutlineButtons.d.ts.map
|
|
@@ -9,5 +9,9 @@ export interface WorkbookContextMenuProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
floatReference: FloatReference;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The grid's context menu. It acts on the selected worksheet's selection, so it shows nothing while
|
|
14
|
+
* the active tab is a sheet of another kind.
|
|
15
|
+
*/
|
|
12
16
|
export declare const WorkbookContextMenu: React.FC<WorkbookContextMenuProps>;
|
|
13
17
|
//# sourceMappingURL=WorkbookContextMenu.d.ts.map
|
|
@@ -3,10 +3,11 @@ import { WorkbookElementProps, IWorkbookElement } from '@sheetxl/react';
|
|
|
3
3
|
* The MUI workbook element.
|
|
4
4
|
*
|
|
5
5
|
* A thin wrapper around the chromeless `WorkbookElement` from `@sheetxl/react`: it supplies the grid's
|
|
6
|
-
* own MUI popups (tabs, context/column/movable menus, comment cards, loading) via the render
|
|
7
|
-
*
|
|
8
|
-
* the
|
|
9
|
-
*
|
|
6
|
+
* own MUI popups (tabs, context/column/movable menus, comment cards, loading, tooltips) via the render
|
|
7
|
+
* slots. A slot left `undefined` gets the MUI default; `null` turns it off. Theming flows through the
|
|
8
|
+
* injected `--sxl-*` token matrix (from the studio root) — no theme bridge is needed here; the grid
|
|
9
|
+
* self-sources its light/dark scheme from the shared appearance preference. The surrounding chrome
|
|
10
|
+
* (toolbar, formula bar, status bar) is composed by the Studio layer, not here.
|
|
10
11
|
*/
|
|
11
12
|
export declare const WorkbookElement: import('react').NamedExoticComponent<Omit<WorkbookElementProps, "ref"> & import('react').RefAttributes<IWorkbookElement>>;
|
|
12
13
|
//# sourceMappingURL=WorkbookElement.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { RenderSlotFn } from '@sheetxl/utils-react';
|
|
2
3
|
import { WorkbookStripProps as ReactWorkbookStripProps, WorkbookStripRef, SheetTabProps } from '@sheetxl/react';
|
|
3
4
|
import { SheetsAllMenuProps, SheetTabMenuProps } from '../sheet';
|
|
4
5
|
/**
|
|
@@ -11,27 +12,27 @@ export interface WorkbookStripProps extends Omit<ReactWorkbookStripProps, 'rende
|
|
|
11
12
|
/**
|
|
12
13
|
* Allow for customizations on the per-tab context menu.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
propsSheetTabMenu?: Partial<SheetTabMenuProps>;
|
|
15
16
|
/**
|
|
16
|
-
* Render
|
|
17
|
+
* Render the per-tab context menu. `null` for none.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
renderSheetTabMenu?: RenderSlotFn<SheetTabMenuProps> | null;
|
|
19
20
|
/**
|
|
20
21
|
* Allow for customizations on the "all sheets" menu.
|
|
21
22
|
*/
|
|
22
23
|
propsSheetsAll?: SheetsAllMenuProps;
|
|
23
24
|
/**
|
|
24
|
-
* Render
|
|
25
|
+
* Render the "all sheets" menu.
|
|
25
26
|
*/
|
|
26
|
-
renderSheetsAll?:
|
|
27
|
+
renderSheetsAll?: RenderSlotFn<SheetsAllMenuProps>;
|
|
27
28
|
/**
|
|
28
29
|
* Allow for customizations on sheet tabs.
|
|
29
30
|
*/
|
|
30
31
|
propsSheetTab?: Partial<SheetTabProps>;
|
|
31
32
|
/**
|
|
32
|
-
* Render custom sheet tabs. Defaults to the MUI ripple tab ({@link
|
|
33
|
+
* Render custom sheet tabs. Defaults to the MUI ripple tab ({@link defaultRenderSheetTab}).
|
|
33
34
|
*/
|
|
34
|
-
renderSheetTab?:
|
|
35
|
+
renderSheetTab?: RenderSlotFn<SheetTabProps>;
|
|
35
36
|
}
|
|
36
37
|
export declare const WorkbookStrip: React.NamedExoticComponent<WorkbookStripProps & React.RefAttributes<WorkbookStripRef>>;
|
|
37
38
|
//# sourceMappingURL=WorkbookStrip.d.ts.map
|
|
@@ -4,5 +4,5 @@ export * from './DocumentTitle';
|
|
|
4
4
|
export * from './WorkbookContextMenu';
|
|
5
5
|
export * from './FillMenu';
|
|
6
6
|
export * from './WorkbookStrip';
|
|
7
|
-
export
|
|
7
|
+
export * from './DefaultRenderers';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./Bo9Kx3L_XQkGPBJ5.cjs"),t=require("./4_Zy3pR6YXkzISoK.cjs");let n=require("@sheetxl/sdk"),r=require("@sheetxl/react"),i=require("@sheetxl/utils-react"),a=require("react");a=e.n(a,1);let o=require("@sheetxl/utils-mui"),s=require("react/jsx-runtime"),c=require("@mui/material");var l=`@container welcome (max-width: 500px)`,u=e=>{let{icon:t,label:n,onClick:r}=e;return(0,s.jsx)(c.Button,{variant:`text`,color:`inherit`,onClick:r,startIcon:(0,s.jsx)(i.DynamicIcon,{iconKey:t}),sx:{justifyContent:`flex-start`,textTransform:`none`,fontWeight:`normal`,paddingX:1.5},children:n})};exports.default=e=>{let{title:d,templatePath:f,logo:p,onBlank:m,onOpenFromDevice:h,onOpenFromWeb:g,onSelectTemplate:_,showAtStartup:v,onShowAtStartupChange:y,sx:b,...x}=e,S=(0,i.useTranslator)(),C=t.n({path:f}),[w,T]=(0,a.useState)(``),E=(0,a.useMemo)(()=>{if(!w.trim())return;let e=new Map(C.categories.map(e=>[e.id,e]));return n=>t.i(n,w,e.get(n.category))},[w,C.categories]),[D,O]=(0,a.useState)(v),k=(0,a.useCallback)(e=>{O(e),y?.(e)},[y]);return(0,s.jsx)(o.InternalWindow,{isModal:!0,sx:{width:`960px`,...b},title:d??S(`dialog.welcome.title`),...x,children:(0,s.jsx)(c.DialogContent,{dividers:!0,sx:{display:`flex`,padding:0,maxHeight:`calc(100vh - 96px)`,containerType:`inline-size`,containerName:`welcome`},children:(0,s.jsxs)(c.Box,{sx:{display:`flex`,flex:`1 1 auto`,minHeight:0,minWidth:0,[l]:{flexDirection:`column`,flex:`0 0 100%`}},children:[(0,s.jsxs)(c.Box,{component:`nav`,sx:{display:`flex`,flexDirection:`column`,gap:.5,width:`220px`,flex:`none`,padding:2,backgroundColor:`var(--sxl-color-base-200)`,borderRight:e=>`1px solid ${e.palette.divider}`,[l]:{display:`contents`}},children:[(0,s.jsx)(c.Box,{sx:{display:`flex`,alignItems:`center`,gap:1,paddingX:1.5,paddingBottom:2,[l]:{order:1,padding:2,paddingBottom:1}},children:p??(0,s.jsx)(c.Link,{href:`https://www.sheetxl.com`,target:`_blank`,rel:`noopener noreferrer`,sx:{display:`flex`},children:(0,s.jsx)(r.LogoTextNoPaddingIcon,{role:`img`,"aria-label":`SheetXL`,style:{width:`120px`,height:`33px`}})})}),(0,s.jsxs)(c.Box,{sx:{display:`flex`,flexDirection:`column`,gap:.5,[l]:{order:2,paddingX:1}},children:[(0,s.jsx)(u,{icon:`FileNew`,label:S(`dialog.welcome.blank`),onClick:m}),h?(0,s.jsx)(u,{icon:`FileOpen`,label:S(`dialog.welcome.openFromDevice`),onClick:h}):null,g?(0,s.jsx)(u,{icon:`FileOpen`,label:S(`dialog.welcome.openFromWeb`),onClick:g}):null]}),(0,s.jsx)(c.Box,{sx:{flex:`1 1 auto`,[l]:{display:`none`}}}),(0,s.jsx)(c.Divider,{sx:{marginBottom:1,[l]:{display:`none`}}}),(0,s.jsxs)(c.Box,{sx:{display:`flex`,flexDirection:`column`,gap:.5,paddingX:1.5,[l]:{order:6,flexDirection:`row`,flexWrap:`wrap`,columnGap:2,paddingX:3,paddingY:1.5,borderTop:e=>`1px solid ${e.palette.divider}`}},children:[(0,s.jsx)(c.Link,{variant:`caption`,href:`https://www.sheetxl.com/docs`,target:`_blank`,rel:`noopener noreferrer`,children:S(`dialog.welcome.docs`)}),(0,s.jsx)(c.Link,{variant:`caption`,href:`https://github.com/sheetxl/templates-workbook`,target:`_blank`,rel:`noopener noreferrer`,children:S(`dialog.welcome.addTemplate`)}),(0,s.jsx)(c.Typography,{variant:`caption`,sx:{color:`text.secondary`},children:S(`dialog.welcome.version`,{version:n.VERSION})})]})]}),(0,s.jsxs)(c.Box,{sx:{flex:`1 1 auto`,minWidth:0,display:`flex`,flexDirection:`column`,[l]:{display:`contents`}},children:[(0,s.jsxs)(c.Box,{sx:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,columnGap:2,rowGap:1,paddingX:3,paddingTop:2,paddingBottom:2,[l]:{order:3}},children:[(0,s.jsx)(c.Typography,{variant:`subtitle1`,component:`h2`,sx:{whiteSpace:`nowrap`},children:S(`dialog.welcome.templates`)}),(0,s.jsx)(t.r,{value:w,onChange:T,sx:{flex:`0 1 240px`,minWidth:`180px`,marginLeft:`auto`,[l]:{flex:`1 1 100%`,marginLeft:0}}})]}),(0,s.jsx)(t.a,{catalog:C,onSelect:_,filter:E,emptyLabel:E?S(`template.noMatches`):void 0,visibleRows:2,sx:{flex:`1 1 auto`,overflow:`auto`,paddingX:2,paddingBottom:2,[l]:{order:4,flex:`0 1 auto`}}}),D===void 0?null:(0,s.jsx)(c.Box,{sx:{flex:`none`,paddingX:3,paddingY:.5,borderTop:e=>`1px solid ${e.palette.divider}`,[l]:{order:5}},children:(0,s.jsx)(c.FormControlLabel,{control:(0,s.jsx)(c.Checkbox,{size:`small`,checked:D,onChange:e=>k(e.target.checked)}),label:(0,s.jsx)(c.Typography,{variant:`body2`,children:S(`template.showAtStartup`)})})})]})]})})})},exports.prefetchCatalog=e=>{t.t(e).catch(()=>{})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./ByIUHPOa02D7XbdC.cjs"),t=require("./BD50lsTki7wvzb5g.cjs");let n=require("@sheetxl/react"),r=require("@sheetxl/utils-react"),i=require("react"),a=require("@sheetxl/utils-mui"),o=require("react/jsx-runtime"),s=require("@mui/material");var c=[`Ok`,`Cancel`],l=(0,i.memo)(l=>{let{initialValue:u=null,context:d,onOption:f,onValidateOption:p,onDone:m,onInput:h,options:g=c,defaultOption:_=g?.[0],cancelOption:v=`Cancel`,sx:y,...b}=l,x=(0,r.useTranslator)(),S=(0,i.useMemo)(()=>d?.().getNames().findValidName(`Range1`),[]),C=(0,i.useMemo)(()=>{if(!u)return!0},[]),[w,T]=(0,i.useState)({displayText:u?.getName()??S,errorText:null}),[E,D]=(0,i.useState)(()=>({displayValue:u?.getRanges?.()??d?.()?.selection()??null,errorText:null})),[O,k]=(0,i.useState)(!1),A=(0,n.useReferenceMode)().getMode()?.mode===`point`,j=(0,i.useCallback)(async e=>!w.errorText&&!E.errorText,[]),M=(0,r.useCallbackRef)((e,t,n)=>{if(!t){let e=w?.displayText??``,t=(r=E?.displayValue??null)==null?null:typeof r==`string`?r:r.isICellRanges?r.toString():r.getExpression(),n=null;if(C||!u)t&&(n=d?.()?.getNames().addFormula(e,t,!1)??null);else{let r=u;r.setExpression&&u.doBatch(()=>{u.setName(e),t&&r.setExpression(t)},x(`op.editNamedItem`,{name:e})),n=u}n&&(n.select(),h?.(n))}var r;f?.(e,t,n),m?.()},[d,w,E,m,f,_,v,h]),N=(0,r.useCallbackRef)(e=>{let t=null;try{d?.().getNames().validateName(e)}catch(e){let n=e?.message;t=n&&x(n)}T({displayText:e,errorText:t})},[]),P=(0,r.useCallbackRef)(e=>{u&&u.getName().toLowerCase()===e.toLowerCase()||d?.().getNames().validateName(e)},[d,u]),F=(0,i.useCallback)(e=>{D({displayValue:e??null,errorText:null})},[]);return(0,o.jsx)(a.OptionsDialog,{title:x(C?`namedRange.titleDefine`:`namedRange.titleEdit`),options:g,onOption:M,onValidateOption:j,defaultOption:_,cancelOption:v,autoFocusSel:`.autoFocus`,suspendModal:A,sx:{width:`460px`,...y},...b,children:(0,o.jsxs)(s.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:`flex`,flexDirection:`column`},children:[(0,o.jsx)(t.t,{sx:{paddingTop:e=>e.spacing(1.5)},formName:`name`,defaultInput:S,value:w.displayText,onChangeInput:N,onValidate:P,onFocus:e=>{O||e.target?.select(),k(!0)}}),(0,o.jsx)(e.n,{grammar:`reference`,formName:`range`,value:E.displayValue,onChangeInput:F,pickAs:`absolute`,allowMulti:!0,onFocus:e=>{O||e.target?.select(),k(!0)}})]})})});exports.NamedReferenceDialog=l,exports.default=l;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const e=require("./Bo9Kx3L_XQkGPBJ5.cjs"),t=require("./CPcBvw4ZPwHVTUZF.cjs");let n=require("react");n=e.n(n,1);let r=require("react/jsx-runtime"),i=require("@mui/material"),a=require("react-dom");var o=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function s(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function c(e){return`nodeType`in e}function l(e){var t;return e?s(e)?e:c(e)&&(t=e.ownerDocument?.defaultView)!=null?t:window:window}function u(e){let{Document:t}=l(e);return e instanceof t}function d(e){return!s(e)&&e instanceof l(e).HTMLElement}function f(e){return e instanceof l(e).SVGElement}function p(e){return e?s(e)?e.document:c(e)?u(e)?e:d(e)||f(e)?e.ownerDocument:document:document:document}var m=o?n.useLayoutEffect:n.useEffect;function h(e){let t=(0,n.useRef)(e);return m(()=>{t.current=e}),(0,n.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function g(e,t){t===void 0&&(t=[e]);let r=(0,n.useRef)(e);return m(()=>{r.current!==e&&(r.current=e)},t),r}function _(e,t){let r=(0,n.useRef)();return(0,n.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...t])}function v(e){let t=h(e),r=(0,n.useRef)(null);return[r,(0,n.useCallback)(e=>{e!==r.current&&t?.(e,r.current),r.current=e},[])]}function y(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}var b={};function x(e,t){return(0,n.useMemo)(()=>{if(t)return t;let n=b[e]==null?0:b[e]+1;return b[e]=n,e+`-`+n},[e,t])}function S(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var C=S(1),w=S(-1);function T(e){if(!e)return!1;let{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function E(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=l(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return`clientX`in e&&`clientY`in e}(e)?{x:e.clientX,y:e.clientY}:null}var D=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[D.Translate.toString(e),D.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),O=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function k(e){return e.matches(O)?e:e.querySelector(O)}var A={display:`none`};function ee(e){let{id:t,value:r}=e;return n.default.createElement(`div`,{id:t,style:A},r)}function te(e){let{id:t,announcement:r,ariaLiveType:i=`assertive`}=e;return n.default.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":i,"aria-atomic":!0},r)}var ne=(0,n.createContext)(null),j,M={draggable:`
|
|
2
|
-
To pick up a draggable item, press the space bar.
|
|
3
|
-
While dragging, use the arrow keys to move the item.
|
|
4
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
-
`},N={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function re(e){let{announcements:t=N,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=M}=e,{announce:s,announcement:c}=function(){let[e,t]=(0,n.useState)(``);return{announce:(0,n.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}(),l=x(`DndLiveRegion`),[u,d]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{d(!0)},[]),function(e){let t=(0,n.useContext)(ne);(0,n.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}((0,n.useMemo)(()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&s(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;s(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;s(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;s(t.onDragCancel({active:n,over:r}))}}),[s,t])),!u)return null;let f=n.default.createElement(n.default.Fragment,null,n.default.createElement(ee,{id:i,value:o.draggable}),n.default.createElement(te,{id:l,announcement:c}));return r?(0,a.createPortal)(f,r):f}function ie(){}function ae(e,t){return(0,n.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(j||={});var P=Object.freeze({x:0,y:0});function F(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function oe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function I(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function se(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}var ce=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=se(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=F(se(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(oe)};function L(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s;return Number((i/(n+r-i)).toFixed(4))}return 0}var le=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=L(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(I)};function ue(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:P}function R(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var de=R(1),z,B={ignoreTransform:!1};function fe(e,t){t===void 0&&(t=B);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=l(e).getComputedStyle(e);t&&(n=function(e,t,n){let r=function(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function pe(e){return fe(e,{ignoreTransform:!0})}function me(e,t){let n=[];return e?function r(i){if(t!=null&&n.length>=t||!i)return n;if(u(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!d(i)||f(i)||n.includes(i))return n;let a=l(e).getComputedStyle(i);return i!==e&&function(e,t){t===void 0&&(t=l(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}(i,a)&&n.push(i),function(e,t){return t===void 0&&(t=l(e).getComputedStyle(e)),t.position===`fixed`}(i,a)?n:r(i.parentNode)}(e):n}function he(e){let[t]=me(e,1);return t??null}function ge(e){return o&&e?s(e)?e:c(e)?u(e)||e===p(e).scrollingElement?window:d(e)?e:null:null:null}function V(e){return s(e)?e.scrollX:e.scrollLeft}function _e(e){return s(e)?e.scrollY:e.scrollTop}function ve(e){return{x:V(e),y:_e(e)}}function ye(e){return!(!o||!e)&&e===document.scrollingElement}function be(e){let t={x:0,y:0},n=ye(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(z||={});var xe={x:.2,y:.2};function H(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=xe);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=be(e),p={x:0,y:0},m={x:0,y:0},h=t.height*i.y,g=t.width*i.x;return!l&&a<=t.top+h?(p.y=z.Backward,m.y=r*Math.abs((t.top+h-a)/h)):!u&&c>=t.bottom-h&&(p.y=z.Forward,m.y=r*Math.abs((t.bottom-h-c)/h)),!f&&s>=t.right-g?(p.x=z.Forward,m.x=r*Math.abs((t.right-g-s)/g)):!d&&o<=t.left+g&&(p.x=z.Backward,m.x=r*Math.abs((t.left+g-o)/g)),{direction:p,speed:m}}function Se(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Ce(e){return e.reduce((e,t)=>C(e,ve(t)),P)}var U,W,G=[[`x`,[`left`,`right`],function(e){return e.reduce((e,t)=>e+V(t),0)}],[`y`,[`top`,`bottom`],function(e){return e.reduce((e,t)=>e+_e(t),0)}]],we=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=me(t),r=Ce(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of G)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},K=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function q(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}function Te(e){e.preventDefault()}function Ee(e){e.stopPropagation()}(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(U||={}),function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`}(W||={});var De={start:[W.Space,W.Enter],cancel:[W.Esc],end:[W.Space,W.Enter,W.Tab]},Oe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case W.Right:return{...n,x:n.x+25};case W.Left:return{...n,x:n.x-25};case W.Down:return{...n,y:n.y+25};case W.Up:return{...n,y:n.y-25}}},J=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new K(p(t)),this.windowListeners=new K(l(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(U.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(t===void 0&&(t=fe),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);he(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}(n),t(P)}handleKeyDown(e){if(T(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=De,coordinateGetter:a=Oe,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s))return void this.handleEnd(e);if(i.cancel.includes(s))return void this.handleCancel(e);let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:P;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=w(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=be(n),p=Se(n),m={x:Math.min(i===W.Right?p.right-p.width/2:p.right,Math.max(i===W.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===W.Down?p.bottom-p.height/2:p.bottom,Math.max(i===W.Down?p.top:p.top+p.height/2,u.y))},h=i===W.Right&&!s||i===W.Left&&!c,g=i===W.Down&&!l||i===W.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===W.Right&&e<=d.x||i===W.Left&&e>=f.x;if(a&&!t.y)return void n.scrollTo({left:e,behavior:o});r.x=a?n.scrollLeft-e:i===W.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===W.Down&&e<=d.y||i===W.Up&&e>=f.y;if(a&&!t.x)return void n.scrollTo({top:e,behavior:o});r.y=a?n.scrollTop-e:i===W.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,C(w(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};function ke(e){return!!(e&&`distance`in e)}function Ae(e){return!!(e&&`delay`in e)}J.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=De,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];var je=class{constructor(e,t,n){n===void 0&&(n=function(e){let{EventTarget:t}=l(e);return e instanceof t?e:p(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=p(i),this.documentListeners=new K(this.document),this.listeners=new K(n),this.windowListeners=new K(l(i)),this.initialCoordinates=E(r)??P,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.DragStart,Te),this.windowListeners.add(U.VisibilityChange,this.handleCancel),this.windowListeners.add(U.ContextMenu,Te),this.documentListeners.add(U.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ae(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(ke(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(U.Click,Ee,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(U.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=E(e)??P,s=w(n,o);if(!t&&a){if(ke(a)){if(a.tolerance!=null&&q(s,a.tolerance))return this.handleCancel();if(q(s,a.distance))return this.handleStart()}return Ae(a)&&q(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===W.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Me={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},Ne=class extends je{constructor(e){let{event:t}=e,n=p(t.target);super(e,Me,n)}};Ne.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||n.button!==0)&&(r?.({event:n}),!0)}}];var Pe,Y={move:{name:`mousemove`},end:{name:`mouseup`}};(function(e){e[e.RightClick=2]=`RightClick`})(Pe||={});var X=class extends je{constructor(e){super(e,Y,p(e.event.target))}};X.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Pe.RightClick&&(r?.({event:n}),!0)}}];var Z,Fe,Q={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Ie=class extends je{constructor(e){super(e,Q)}static setup(){return window.addEventListener(Q.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Q.move.name,e)};function e(){}}};function Le(e){let{acceleration:t,activator:r=Z.Pointer,canScroll:i,draggingRect:a,enabled:o,interval:s=5,order:c=Fe.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e,m=function(e){let{delta:t,disabled:n}=e,r=y(t);return _(e=>{if(n||!r||!e)return Be;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[z.Backward]:e.x[z.Backward]||i.x===-1,[z.Forward]:e.x[z.Forward]||i.x===1},y:{[z.Backward]:e.y[z.Backward]||i.y===-1,[z.Forward]:e.y[z.Forward]||i.y===1}}},[n,t,r])}({delta:f,disabled:!o}),[h,g]=function(){let e=(0,n.useRef)(null);return[(0,n.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,n.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}(),v=(0,n.useRef)({x:0,y:0}),b=(0,n.useRef)({x:0,y:0}),x=(0,n.useMemo)(()=>{switch(r){case Z.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Z.DraggableRect:return a}},[r,a,l]),S=(0,n.useRef)(null),C=(0,n.useCallback)(()=>{let e=S.current;if(!e)return;let t=v.current.x*b.current.x,n=v.current.y*b.current.y;e.scrollBy(t,n)},[]),w=(0,n.useMemo)(()=>c===Fe.TreeOrder?[...u].reverse():u,[c,u]);(0,n.useEffect)(()=>{if(o&&u.length&&x){for(let e of w){if(!1===i?.(e))continue;let n=u.indexOf(e),r=d[n];if(!r)continue;let{direction:a,speed:o}=H(e,r,x,t,p);for(let e of[`x`,`y`])m[e][a[e]]||(o[e]=0,a[e]=0);if(o.x>0||o.y>0)return g(),S.current=e,h(C,s),v.current=o,void(b.current=a)}v.current={x:0,y:0},b.current={x:0,y:0},g()}else g()},[t,C,i,g,o,s,JSON.stringify(x),JSON.stringify(m),h,u,w,d,JSON.stringify(p)])}Ie.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return!(i.length>1)&&(r?.({event:n}),!0)}}],function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`}(Z||={}),function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`}(Fe||={});var Re,ze,Be={x:{[z.Backward]:!1,[z.Forward]:!1},y:{[z.Backward]:!1,[z.Forward]:!1}};(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Re||={}),function(e){e.Optimized=`optimized`}(ze||={});var Ve=new Map;function He(e,t){return _(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Ue(e){let{callback:t,disabled:r}=e,i=h(t),a=(0,n.useMemo)(()=>{if(r||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(i)},[r]);return(0,n.useEffect)(()=>()=>a?.disconnect(),[a]),a}function We(e){return new we(fe(e),e)}function Ge(e,t,r){t===void 0&&(t=We);let[i,a]=(0,n.useState)(null);function o(){a(n=>{if(!e)return null;if(!1===e.isConnected)return n??r??null;let i=t(e);return JSON.stringify(n)===JSON.stringify(i)?n:i})}let s=function(e){let{callback:t,disabled:r}=e,i=h(t),a=(0,n.useMemo)(()=>{if(r||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(i)},[i,r]);return(0,n.useEffect)(()=>()=>a?.disconnect(),[a]),a}({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=Ue({callback:o});return m(()=>{o(),e?(c?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),s?.disconnect())},[e]),i}var Ke=[];function qe(e,t){t===void 0&&(t=[]);let r=(0,n.useRef)(null);return(0,n.useEffect)(()=>{r.current=null},t),(0,n.useEffect)(()=>{let t=e!==P;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?w(e,r.current):P}function Je(e){return(0,n.useMemo)(()=>e?function(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}var Ye=[];function Xe(e){let{measure:t}=e,[r,i]=(0,n.useState)(null),a=Ue({callback:(0,n.useCallback)(e=>{for(let{target:n}of e)if(d(n)){i(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[o,s]=v((0,n.useCallback)(e=>{let n=function(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return d(t)?t:e}(e);a?.disconnect(),n&&a?.observe(n),i(n?t(n):null)},[t,a]));return(0,n.useMemo)(()=>({nodeRef:o,rect:r,setRef:s}),[r,o,s])}var Ze=[{sensor:Ne,options:{}},{sensor:J,options:{}}],Qe={current:{}},$e={draggable:{measure:pe},droppable:{measure:pe,strategy:Re.WhileDragging,frequency:ze.Optimized},dragOverlay:{measure:fe}},$=class extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},et={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new $,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ie},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:$e,measureDroppableContainers:ie,windowRect:null,measuringScheduled:!1},tt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:ie,draggableNodes:new Map,over:null,measureDroppableContainers:ie},nt=(0,n.createContext)(tt),rt=(0,n.createContext)(et);function it(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new $}}}function at(e,t){switch(t.type){case j.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case j.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case j.DragEnd:case j.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case j.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new $(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case j.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new $(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case j.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new $(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function ot(e){let{disabled:t}=e,{active:r,activatorEvent:i,draggableNodes:a}=(0,n.useContext)(nt),o=y(i),s=y(r?.id);return(0,n.useEffect)(()=>{if(!t&&!i&&o&&s!=null){if(!T(o)||document.activeElement===o.target)return;let e=a.get(s);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=k(e);if(t){t.focus();break}}})}},[i,t,a,s,o]),null}var st,ct=(0,n.createContext)({...P,scaleX:1,scaleY:1});(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(st||={});var lt=(0,n.memo)(function(e){let{id:t,accessibility:r,autoScroll:i=!0,children:s,sensors:c=Ze,collisionDetection:u=le,measuring:d,modifiers:f,...p}=e,[h,v]=(0,n.useReducer)(at,void 0,it),[y,b]=function(){let[e]=(0,n.useState)(()=>new Set),t=(0,n.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,n.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}(),[S,w]=(0,n.useState)(st.Uninitialized),T=S===st.Initialized,{draggable:{active:D,nodes:O,translate:k},droppable:{containers:A}}=h,ee=D==null?null:O.get(D),te=(0,n.useRef)({initial:null,translated:null}),M=(0,n.useMemo)(()=>D==null?null:{id:D,data:ee?.data??Qe,rect:te},[D,ee]),N=(0,n.useRef)(null),[ie,ae]=(0,n.useState)(null),[F,oe]=(0,n.useState)(null),I=g(p,Object.values(p)),se=x(`DndDescribedBy`,t),ce=(0,n.useMemo)(()=>A.getEnabled(),[A]),L=(R=d,(0,n.useMemo)(()=>({draggable:{...$e.draggable,...R?.draggable},droppable:{...$e.droppable,...R?.droppable},dragOverlay:{...$e.dragOverlay,...R?.dragOverlay}}),[R?.draggable,R?.droppable,R?.dragOverlay]));var R;let{droppableRects:z,measureDroppableContainers:B,measuringScheduled:pe}=function(e,t){let{dragging:r,dependencies:i,config:a}=t,[o,s]=(0,n.useState)(null),{frequency:c,measure:l,strategy:u}=a,d=(0,n.useRef)(e),f=function(){switch(u){case Re.Always:return!1;case Re.BeforeDragging:return r;default:return!r}}(),p=g(f),m=(0,n.useCallback)(function(e){e===void 0&&(e=[]),p.current||s(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),h=(0,n.useRef)(null),v=_(t=>{if(f&&!r)return Ve;if(!t||t===Ve||d.current!==e||o!=null){let t=new Map;for(let n of e){if(!n)continue;if(o&&o.length>0&&!o.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new we(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,o,r,f,l]);return(0,n.useEffect)(()=>{d.current=e},[e]),(0,n.useEffect)(()=>{f||m()},[r,f]),(0,n.useEffect)(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),(0,n.useEffect)(()=>{f||typeof c!=`number`||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},c))},[c,f,m,...i]),{droppableRects:v,measureDroppableContainers:m,measuringScheduled:o!=null}}(ce,{dragging:T,dependencies:[k.x,k.y],config:L.droppable}),V=function(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return _(e=>t==null?null:r??e??null,[r,t])}(O,D),_e=(0,n.useMemo)(()=>F?E(F):null,[F]),be=function(){let e=!1===ie?.autoScrollEnabled,t=typeof i==`object`?!1===i.enabled:!1===i,n=T&&!e&&!t;return typeof i==`object`?{...i,enabled:n}:{enabled:n}}(),xe=function(e,t){return He(e,t)}(V,L.draggable.measure);(function(e){let{activeNode:t,measure:r,initialRect:i,config:a=!0}=e,o=(0,n.useRef)(!1),{x:s,y:c}=typeof a==`boolean`?{x:a,y:a}:a;m(()=>{if(!s&&!c||!t)return void(o.current=!1);if(o.current||!i)return;let e=t?.node.current;if(!e||!1===e.isConnected)return;let n=ue(r(e),i);if(s||(n.x=0),c||(n.y=0),o.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){let t=he(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,s,c,i,r])})({activeNode:D==null?null:O.get(D),config:be.layoutShiftCompensation,initialRect:xe,measure:L.draggable.measure});let H=Ge(V,L.draggable.measure,xe),Se=Ge(V?V.parentElement:null),U=(0,n.useRef)({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:z,draggableNodes:O,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),W=A.getNodeFor(U.current.over?.id),G=Xe({measure:L.dragOverlay.measure}),K=G.nodeRef.current??V,q=T?G.rect??H:null,Te=!!(G.nodeRef.current&&G.rect),Ee=ue(De=Te?null:H,He(De));var De;let Oe=Je(K?l(K):null),J=function(e){let t=(0,n.useRef)(e),r=_(n=>e?n&&n!==Ke&&e&&t.current&&e.parentNode===t.current.parentNode?n:me(e):Ke,[e]);return(0,n.useEffect)(()=>{t.current=e},[e]),r}(T?W??V:null),ke=function(e,t){t===void 0&&(t=fe);let[r]=e,i=Je(r?l(r):null),[a,o]=(0,n.useState)(Ye);function s(){o(()=>e.length?e.map(e=>ye(e)?i:new we(t(e),e)):Ye)}let c=Ue({callback:s});return m(()=>{c?.disconnect(),s(),e.forEach(e=>c?.observe(e))},[e]),a}(J),Ae=function(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(f,{transform:{x:k.x-Ee.x,y:k.y-Ee.y,scaleX:1,scaleY:1},activatorEvent:F,active:M,activeNodeRect:H,containerNodeRect:Se,draggingNodeRect:q,over:U.current.over,overlayNodeRect:G.rect,scrollableAncestors:J,scrollableAncestorRects:ke,windowRect:Oe}),je=_e?C(_e,k):null,Me=function(e){let[t,r]=(0,n.useState)(null),i=(0,n.useRef)(e),a=(0,n.useCallback)(e=>{let t=ge(e.target);t&&r(e=>e?(e.set(t,ve(t)),new Map(e)):null)},[]);return(0,n.useEffect)(()=>{let t=i.current;if(e!==t){n(t);let o=e.map(e=>{let t=ge(e);return t?(t.addEventListener(`scroll`,a,{passive:!0}),[t,ve(t)]):null}).filter(e=>e!=null);r(o.length?new Map(o):null),i.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{ge(e)?.removeEventListener(`scroll`,a)})}},[a,e]),(0,n.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>C(e,t),P):Ce(e):P,[e,t])}(J),Ne=qe(Me),Pe=qe(Me,[H]),Y=C(Ae,Ne),X=q?de(q,Ae):null,Z=M&&X?u({active:M,collisionRect:X,droppableRects:z,droppableContainers:ce,pointerCoordinates:je}):null,Fe=function(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}(Z,`id`),[Q,Ie]=(0,n.useState)(null),ze=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Te?Ae:C(Ae,Pe),Q?.rect??null,H),Be=(0,n.useRef)(null),We=(0,n.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(N.current==null)return;let i=O.get(N.current);if(!i)return;let o=e.nativeEvent,s=new n({active:N.current,activeNode:i,event:o,options:r,context:U,onAbort(e){if(!O.get(e))return;let{onDragAbort:t}=I.current,n={id:e};t?.(n),y({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!O.get(e))return;let{onDragPending:i}=I.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),y({type:`onDragPending`,event:a})},onStart(e){let t=N.current;if(t==null)return;let n=O.get(t);if(!n)return;let{onDragStart:r}=I.current,i={activatorEvent:o,active:{id:t,data:n.data,rect:te}};(0,a.unstable_batchedUpdates)(()=>{r?.(i),w(st.Initializing),v({type:j.DragStart,initialCoordinates:e,active:t}),y({type:`onDragStart`,event:i}),ae(Be.current),oe(o)})},onMove(e){v({type:j.DragMove,coordinates:e})},onEnd:c(j.DragEnd),onCancel:c(j.DragCancel)});function c(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=U.current,s=null;if(t&&i){let{cancelDrop:a}=I.current;s={activatorEvent:o,active:t,collisions:n,delta:i,over:r},e===j.DragEnd&&typeof a==`function`&&await Promise.resolve(a(s))&&(e=j.DragCancel)}N.current=null,(0,a.unstable_batchedUpdates)(()=>{v({type:e}),w(st.Uninitialized),Ie(null),ae(null),oe(null),Be.current=null;let t=e===j.DragEnd?`onDragEnd`:`onDragCancel`;if(s){let e=I.current[t];e?.(s),y({type:t,event:s})}})}}Be.current=s},[O]),$=function(e,t){return(0,n.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,(0,n.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=O.get(r);if(N.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};!0===e(n,t.options,o)&&(i.dndKit={capturedBy:t.sensor},N.current=r,We(n,t))},[O,We]));(function(e){(0,n.useEffect)(()=>{if(!o)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))})(c),m(()=>{H&&S===st.Initializing&&w(st.Initialized)},[H,S]),(0,n.useEffect)(()=>{let{onDragMove:e}=I.current,{active:t,activatorEvent:n,collisions:r,over:i}=U.current;if(!t||!n)return;let o={active:t,activatorEvent:n,collisions:r,delta:{x:Y.x,y:Y.y},over:i};(0,a.unstable_batchedUpdates)(()=>{e?.(o),y({type:`onDragMove`,event:o})})},[Y.x,Y.y]),(0,n.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=U.current;if(!e||N.current==null||!t||!i)return;let{onDragOver:o}=I.current,s=r.get(Fe),c=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:c};(0,a.unstable_batchedUpdates)(()=>{Ie(c),o?.(l),y({type:`onDragOver`,event:l})})},[Fe]),m(()=>{U.current={activatorEvent:F,active:M,activeNode:V,collisionRect:X,collisions:Z,droppableRects:z,draggableNodes:O,draggingNode:K,draggingNodeRect:q,droppableContainers:A,over:Q,scrollableAncestors:J,scrollAdjustedTranslate:Y},te.current={initial:q,translated:X}},[M,V,Z,X,O,K,q,z,A,Q,J,Y]),Le({...be,delta:k,draggingRect:X,pointerCoordinates:je,scrollableAncestors:J,scrollableAncestorRects:ke});let et=(0,n.useMemo)(()=>({active:M,activeNode:V,activeNodeRect:H,activatorEvent:F,collisions:Z,containerNodeRect:Se,dragOverlay:G,draggableNodes:O,droppableContainers:A,droppableRects:z,over:Q,measureDroppableContainers:B,scrollableAncestors:J,scrollableAncestorRects:ke,measuringConfiguration:L,measuringScheduled:pe,windowRect:Oe}),[M,V,H,F,Z,Se,G,O,A,z,Q,B,J,ke,L,pe,Oe]),tt=(0,n.useMemo)(()=>({activatorEvent:F,activators:$,active:M,activeNodeRect:H,ariaDescribedById:{draggable:se},dispatch:v,draggableNodes:O,over:Q,measureDroppableContainers:B}),[F,$,M,H,v,se,O,Q,B]);return n.default.createElement(ne.Provider,{value:b},n.default.createElement(nt.Provider,{value:tt},n.default.createElement(rt.Provider,{value:et},n.default.createElement(ct.Provider,{value:ze},s)),n.default.createElement(ot,{disabled:!1===r?.restoreFocus})),n.default.createElement(re,{...r,hiddenTextDescribedById:se}))}),ut=(0,n.createContext)(null),dt=`button`;function ft(e){let{id:t,data:r,disabled:i=!1,attributes:a}=e,o=x(`Draggable`),{activators:s,activatorEvent:c,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=(0,n.useContext)(nt),{role:h=dt,roleDescription:_=`draggable`,tabIndex:y=0}=a??{},b=l?.id===t,S=(0,n.useContext)(b?ct:ut),[C,w]=v(),[T,E]=v(),D=function(e,t){return(0,n.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}(s,t),O=g(r);return m(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:T,data:O}),()=>{let e=f.get(t);e&&e.key===o&&f.delete(t)}),[f,t]),{active:l,activatorEvent:c,activeNodeRect:u,attributes:(0,n.useMemo)(()=>({role:h,tabIndex:y,"aria-disabled":i,"aria-pressed":!(!b||h!==dt)||void 0,"aria-roledescription":_,"aria-describedby":d.draggable}),[i,h,y,b,_,d.draggable]),isDragging:b,listeners:i?void 0:D,node:C,over:p,setNodeRef:w,setActivatorNodeRef:E,transform:S}}var pt={timeout:25},mt=e=>{let{transform:t}=e;return{...t,x:0}};function ht(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function gt(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function _t(e){return e!==null&&e>=0}var vt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=ht(t,r,n),o=t[i],s=a[i];return s&&o?{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}:null},yt={scaleX:1,scaleY:1},bt=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...yt}:null}let s=function(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...yt}:r<t&&r>=a?{x:0,y:o.height+s,...yt}:{x:0,y:0,...yt}},xt=`Sortable`,St=n.default.createContext({activeIndex:-1,containerId:xt,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:vt,disabled:{draggable:!1,droppable:!1}});function Ct(e){let{children:t,id:r,items:i,strategy:a=vt,disabled:o=!1}=e,{active:s,dragOverlay:c,droppableRects:l,over:u,measureDroppableContainers:d}=(0,n.useContext)(rt),f=x(xt,r),p=c.rect!==null,h=(0,n.useMemo)(()=>i.map(e=>typeof e==`object`&&`id`in e?e.id:e),[i]),g=s!=null,_=s?h.indexOf(s.id):-1,v=u?h.indexOf(u.id):-1,y=(0,n.useRef)(h),b=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(h,y.current),S=v!==-1&&_===-1||b,C=function(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}(o);m(()=>{b&&g&&d(h)},[b,h,g,d]),(0,n.useEffect)(()=>{y.current=h},[h]);let w=(0,n.useMemo)(()=>({activeIndex:_,containerId:f,disabled:C,disableTransforms:S,items:h,overIndex:v,useDragOverlay:p,sortedRects:gt(h,l),strategy:a}),[_,f,C.draggable,C.droppable,S,h,v,l,p,a]);return n.default.createElement(St.Provider,{value:w},t)}var wt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return ht(n,r,i).indexOf(t)},Tt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!(!l||!r)&&(s===a||i!==o)&&(!!n||o!==i&&t===c)},Et={duration:200,easing:`ease`},Dt=`transform`,Ot=D.Transition.toString({property:Dt,duration:0,easing:`linear`}),kt={roleDescription:`sortable`};function At(e){let{animateLayoutChanges:t=Tt,attributes:r,disabled:i,data:a,getNewIndex:o=wt,id:s,strategy:c,resizeObserverConfig:l,transition:u=Et}=e,{items:d,containerId:f,activeIndex:p,disabled:h,disableTransforms:_,sortedRects:y,overIndex:b,useDragOverlay:S,strategy:C}=(0,n.useContext)(St),w=function(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}(i,h),E=d.indexOf(s),O=(0,n.useMemo)(()=>({sortable:{containerId:f,index:E,items:d},...a}),[f,a,E,d]),k=(0,n.useMemo)(()=>d.slice(d.indexOf(s)),[d,s]),{rect:A,node:ee,isOver:te,setNodeRef:ne}=function(e){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:a}=e,o=x(`Droppable`),{active:s,dispatch:c,over:l,measureDroppableContainers:u}=(0,n.useContext)(nt),d=(0,n.useRef)({disabled:r}),f=(0,n.useRef)(!1),p=(0,n.useRef)(null),m=(0,n.useRef)(null),{disabled:h,updateMeasurementsFor:_,timeout:y}={...pt,...a},b=g(_??i),S=Ue({callback:(0,n.useCallback)(()=>{f.current?(m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),m.current=null},y)):f.current=!0},[y]),disabled:h||!s}),[C,w]=v((0,n.useCallback)((e,t)=>{S&&(t&&(S.unobserve(t),f.current=!1),e&&S.observe(e))},[S])),T=g(t);return(0,n.useEffect)(()=>{S&&C.current&&(S.disconnect(),f.current=!1,S.observe(C.current))},[C,S]),(0,n.useEffect)(()=>(c({type:j.RegisterDroppable,element:{id:i,key:o,disabled:r,node:C,rect:p,data:T}}),()=>c({type:j.UnregisterDroppable,key:o,id:i})),[i]),(0,n.useEffect)(()=>{r!==d.current.disabled&&(c({type:j.SetDroppableDisabled,id:i,key:o,disabled:r}),d.current.disabled=r)},[i,o,r,c]),{active:s,rect:p,isOver:l?.id===i,node:C,over:l,setNodeRef:w}}({id:s,data:O,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...l}}),{active:M,activatorEvent:N,activeNodeRect:re,attributes:ie,setNodeRef:ae,listeners:P,isDragging:F,over:oe,setActivatorNodeRef:I,transform:se}=ft({id:s,data:O,attributes:{...kt,...r},disabled:w.draggable}),ce=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(ne,ae),L=!!M,le=L&&!_&&_t(p)&&_t(b),ue=!S&&F,R=le?(ue&&le?se:null)??(c??C)({rects:y,activeNodeRect:re,activeIndex:p,overIndex:b,index:E}):null,de=_t(p)&&_t(b)?o({id:s,items:d,activeIndex:p,overIndex:b}):E,z=M?.id,B=(0,n.useRef)({activeId:z,items:d,newIndex:de,containerId:f}),pe=d!==B.current.items,me=t({active:M,containerId:f,isDragging:F,isSorting:L,id:s,index:E,items:d,newIndex:B.current.newIndex,previousItems:B.current.items,previousContainerId:B.current.containerId,transition:u,wasDragging:B.current.activeId!=null}),he=function(e){let{disabled:t,index:r,node:i,rect:a}=e,[o,s]=(0,n.useState)(null),c=(0,n.useRef)(r);return m(()=>{if(!t&&r!==c.current&&i.current){let e=a.current;if(e){let t=fe(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}r!==c.current&&(c.current=r)},[t,r,i,a]),(0,n.useEffect)(()=>{o&&s(null)},[o]),o}({disabled:!me,index:E,node:ee,rect:A});return(0,n.useEffect)(()=>{L&&B.current.newIndex!==de&&(B.current.newIndex=de),f!==B.current.containerId&&(B.current.containerId=f),d!==B.current.items&&(B.current.items=d)},[L,de,f,d]),(0,n.useEffect)(()=>{if(z===B.current.activeId)return;if(z!=null&&B.current.activeId==null)return void(B.current.activeId=z);let e=setTimeout(()=>{B.current.activeId=z},50);return()=>clearTimeout(e)},[z]),{active:M,activeIndex:p,attributes:ie,data:O,rect:A,index:E,newIndex:de,items:d,isOver:te,isSorting:L,isDragging:F,listeners:P,node:ee,overIndex:b,over:oe,setNodeRef:ce,setActivatorNodeRef:I,setDroppableNodeRef:ne,setDraggableNodeRef:ae,transform:he??R,transition:function(){if(he||pe&&B.current.newIndex===E)return Ot;if(!(ue&&!T(N)||!u)&&(L||me))return D.Transition.toString({...u,property:Dt})}()}}W.Down,W.Right,W.Up,W.Left;var jt=`data-sxl-flip`,Mt=(0,n.memo)(e=>{let{ids:t,onMove:i,scrollRef:a,children:o}=e,s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.useMemo)(()=>[...t].filter(e=>e!=null),[...t])}(ae(X,{activationConstraint:{distance:6}}),ae(Ie,{activationConstraint:{delay:200,tolerance:6}})),c=(0,n.useRef)(null);return(0,r.jsx)(lt,{sensors:s,collisionDetection:ce,modifiers:(0,n.useMemo)(()=>[mt,({draggingNodeRect:e,transform:t})=>{let n=c.current;return e&&n?e.top+t.y<n.top?{...t,y:n.top-e.top}:e.bottom+t.y>n.bottom?{...t,y:n.bottom-e.bottom}:t:t}],[]),onDragStart:()=>{c.current=(e=>{if(!e)return null;let t=e.querySelectorAll(`[${jt}]`);if(t.length===0)return null;let n=1/0,r=-1/0;for(let e=0;e<t.length;e++){let i=t[e].getBoundingClientRect();i.top<n&&(n=i.top),i.bottom>r&&(r=i.bottom)}return{top:n,bottom:r}})(a.current)},onDragCancel:()=>{c.current=null},autoScroll:{canScroll:e=>{if(e===document.scrollingElement||e===document.documentElement||e===document.body)return!1;let t=a.current;return!!t&&(e===t||e.contains(t))}},onDragEnd:e=>{c.current=null;let{active:n,over:r}=e;if(!r||n.id===r.id)return;let a=t.indexOf(String(n.id)),o=t.indexOf(String(r.id));a!==-1&&o!==-1&&a!==o&&i(a,o)},children:(0,r.jsx)(Ct,{items:t,strategy:bt,children:o})})});function Nt(e,t,r){let i=(0,n.useRef)(new Map);m(()=>{if(!t||!e.current)return void(i.current=new Map);let n=i.current,a=new Map,o=[],s=e.current.querySelectorAll(`[${jt}]`);for(let e=0;e<s.length;e++){let t=s[e],r=t.getAttribute(jt),i=t.offsetTop;a.set(r,i);let c=n.get(r);c!==void 0&&c!==i&&o.push({element:t,delta:c-i})}if(i.current=a,o.length!==0)if(r.current)r.current=!1;else{for(let{element:e,delta:t}of o)e.style.transition=`none`,e.style.transform=`translateY(${t}px)`;e.current.offsetHeight;for(let{element:e}of o)e.style.transition=`transform 200ms ease`,e.style.transform=``,e.addEventListener(`transitionend`,function t(){e.style.transition=``,e.removeEventListener(`transitionend`,t)})}})}Mt.displayName=`SortableCards`;var Pt=(0,n.memo)(e=>{let{id:a,disabled:o,children:s}=e,{setNodeRef:c,transform:l,transition:u,isDragging:d,listeners:f}=At({id:a,disabled:o});return(0,r.jsx)(i.Box,{ref:c,...(0,n.useMemo)(()=>{if(!f)return f;let e={};for(let[t,n]of Object.entries(f))e[t]=(e,...t)=>{(e?.target)?.closest?.(`button, input, textarea, select, a[href], [contenteditable="true"], [role="combobox"]`)||n(e,...t)};return e},[f]),[jt]:a,className:t.t(`sxl-sortable-card`,{"sxl-dragging":d,"sxl-drag-disabled":o}),sx:{flex:`0 0 auto`,borderRadius:e=>e.spacing(1.25),boxShadow:d?6:void 0,...o?null:{cursor:d?`grabbing`:`grab`,"&:active":{cursor:`grabbing`}},...d?{"& *":{cursor:`grabbing !important`},backgroundColor:e=>e.palette.background.paper}:null},style:{transform:D.Translate.toString(l),transition:u,touchAction:`manipulation`,...d?{position:`relative`,zIndex:1}:null},children:s})});Pt.displayName=`SortableCard`,Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Pt}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./Bo9Kx3L_XQkGPBJ5.cjs"),t=require("./CPcBvw4ZPwHVTUZF.cjs");let n=require("@sheetxl/sdk"),r=require("@sheetxl/react"),i=require("@sheetxl/utils-react"),a=require("react");a=e.n(a,1);let o=require("@sheetxl/utils-mui"),s=require("react/jsx-runtime"),c=require("@mui/material"),l=require("@sheetxl/utils");var u=`8 / 5`,d=e=>{let{entry:t}=e,n=((0,r.useGridColorScheme)()===`dark`?t.thumbnailDarkUrl:void 0)??t.thumbnailUrl;return(0,s.jsx)(f,{src:n},n)},f=e=>{let{src:t}=e,[n,r]=(0,a.useState)(t?`loading`:`failed`);return(0,s.jsx)(c.Box,{className:`template-thumbnail`,sx:{position:`relative`,width:`100%`,aspectRatio:u,overflow:`hidden`,borderRadius:1,border:e=>`1px solid ${e.palette.divider}`,background:e=>e.palette.background.paper,transition:`border-color 150ms, box-shadow 150ms`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:n===`failed`?(0,s.jsx)(i.DynamicIcon,{iconKey:`FileNew`,style:{fontSize:`2.5rem`,opacity:.4}}):(0,s.jsx)(`img`,{src:t,alt:``,loading:`lazy`,draggable:!1,onLoad:()=>r(`loaded`),onError:()=>r(`failed`),style:{width:`100%`,height:`100%`,objectFit:`cover`,objectPosition:`top left`,opacity:+(n===`loaded`),transition:`opacity 150ms ease-out`}})})},p=e=>{let{entry:t,category:n,onSelect:r}=e;return(0,s.jsxs)(c.ButtonBase,{className:`template-tile`,disableRipple:!0,onClick:r,"aria-label":n?`${t.title}, ${n.title}`:t.title,title:t.description,sx:{display:`flex`,flexDirection:`column`,alignItems:`stretch`,textAlign:`left`,gap:.75,padding:1,borderRadius:1,"&:hover .template-thumbnail, &.Mui-focusVisible .template-thumbnail":{borderColor:e=>e.palette.primary.main,boxShadow:3},"&.Mui-focusVisible":{outline:e=>`2px solid ${e.palette.primary.main}`,outlineOffset:`-2px`}},children:[(0,s.jsx)(d,{entry:t}),(0,s.jsxs)(c.Box,{sx:{minWidth:0},children:[(0,s.jsx)(c.Typography,{variant:`subtitle2`,component:`div`,noWrap:!0,children:t.title}),n?(0,s.jsx)(c.Typography,{variant:`caption`,component:`div`,noWrap:!0,sx:{color:`text.secondary`},children:n.title}):null]})]})},m=()=>(0,s.jsxs)(c.Box,{sx:{padding:1,display:`flex`,flexDirection:`column`,gap:.75},children:[(0,s.jsx)(c.Skeleton,{variant:`rectangular`,sx:{width:`100%`,height:`auto`,aspectRatio:u,borderRadius:1}}),(0,s.jsx)(c.Skeleton,{variant:`text`,width:`60%`}),(0,s.jsx)(c.Skeleton,{variant:`text`,width:`35%`})]}),h=(0,a.memo)((0,a.forwardRef)((e,n)=>{let{catalog:r,onSelect:o,filter:l,groupBy:u,renderTile:d,tileMinWidth:f=180,emptyLabel:h,visibleRows:g,sx:_=i.ReactUtils.EmptyCssProperties,style:v,className:y,onKeyDown:b,...x}=e,S=(0,i.useTranslator)(),C=(0,a.useRef)(null),[w,T]=(0,a.useState)(0),E=(0,a.useRef)(null);E.current=()=>{let e=C.current?.querySelector(`.template-grid`)?.firstElementChild,t=(e?.offsetHeight?e:e?.firstElementChild)?.getBoundingClientRect().height;t&&T(t)},(0,a.useLayoutEffect)(()=>{g&&E.current?.()}),(0,a.useEffect)(()=>{let e=C.current;if(!g||!e)return;let t=new ResizeObserver(()=>E.current?.());return t.observe(e),()=>t.disconnect()},[g]);let D=(0,a.useMemo)(()=>new Map(r.categories.map(e=>[e.id,e])),[r.categories]),O=(0,a.useMemo)(()=>{let e=l?r.entries.filter(l):r.entries;if(!u)return[{key:null,entries:e}];let t=new Map;for(let e of r.categories)t.set(e.id,[]);for(let n of e){let e=u(n),r=t.get(e);r||t.set(e,r=[]),r.push(n)}return[...t].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,title:D.get(e)?.title??e,entries:t}))},[r.entries,r.categories,D,l,u]),k={display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(${f}px, 1fr))`,gap:`8px`},A;return A=r.status===`loading`?(0,s.jsx)(c.Box,{className:`template-grid`,sx:k,"aria-busy":`true`,"aria-label":S(`template.loading`),children:Array.from({length:6},(e,t)=>(0,s.jsx)(m,{},t))}):r.status===`error`?(0,s.jsxs)(c.Box,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1,padding:4,textAlign:`center`},children:[(0,s.jsx)(c.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:S(`template.loadFailed`)}),(0,s.jsx)(c.Button,{variant:`outlined`,size:`small`,onClick:r.retry,children:S(`template.retry`)})]}):O.every(e=>e.entries.length===0)?(0,s.jsx)(c.Typography,{variant:`body2`,sx:{color:`text.secondary`,padding:4,textAlign:`center`},children:h??S(`template.empty`)}):O.map(e=>(0,s.jsxs)(c.Box,{role:`group`,"aria-label":e.title,children:[e.title?(0,s.jsx)(c.Typography,{variant:`overline`,component:`div`,sx:{color:`text.secondary`,paddingX:1},children:e.title}):null,(0,s.jsx)(c.Box,{className:`template-grid`,sx:k,children:e.entries.map(e=>{let t={category:D.get(e.category),onSelect:()=>o?.(e)};return d?(0,s.jsx)(c.Box,{sx:{display:`contents`},children:d(e,t)},e.id):(0,s.jsx)(p,{entry:e,...t},e.id)})})]},e.key??``)),(0,s.jsx)(c.Box,{ref:n,className:t.t(y,`template-panel`),sx:_,style:g&&w?{boxSizing:`content-box`,scrollbarGutter:`stable`,height:`${Math.ceil(g*w+8*(g-1))}px`,minHeight:`${Math.ceil(w)}px`,...v}:v,...x,children:(0,s.jsx)(c.Box,{ref:C,onKeyDown:e=>{if(b?.(e),e.defaultPrevented)return;let t=C.current;if(!t)return;let n=Array.from(t.querySelectorAll(`.template-tile`)),r=n.indexOf(document.activeElement);if(r<0)return;let i=n[r].offsetTop,a=n.findIndex(e=>e.offsetTop===i&&e.parentElement===n[r].parentElement),o=0;for(;n[a+o]?.offsetTop===i;)o++;let s=r;switch(e.key){case`ArrowRight`:s=r+1;break;case`ArrowLeft`:s=r-1;break;case`ArrowDown`:s=r+Math.max(1,o);break;case`ArrowUp`:s=r-Math.max(1,o);break;case`Home`:s=0;break;case`End`:s=n.length-1;break;default:return}s=Math.max(0,Math.min(n.length-1,s)),e.preventDefault(),n[s].focus()},children:A})})}));h.displayName=`TemplatePanel`;var g=(e,t,n)=>{let r=t.trim().toLowerCase();return!r||[e.title,e.description,n?.title,...e.tags??[]].some(e=>e?.toLowerCase().includes(r))},_=e=>{let{value:t,onChange:n,sx:r}=e,a=(0,i.useTranslator)();return(0,s.jsx)(c.TextField,{size:`small`,value:t,placeholder:a(`template.search`),onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Escape`&&t&&(e.stopPropagation(),n(``))},sx:r,slotProps:{input:{sx:{backgroundColor:`background.paper`},startAdornment:(0,s.jsx)(c.InputAdornment,{position:`start`,children:(0,s.jsx)(i.DynamicIcon,{iconKey:`Find`})}),endAdornment:t?(0,s.jsx)(c.InputAdornment,{position:`end`,children:(0,s.jsx)(o.ExhibitIconButton,{"aria-label":a(`template.clearSearch`),propsTooltip:{label:a(`template.clearSearch`)},onMouseDown:e=>{e.button===0&&e.preventDefault()},onClick:()=>n(``),icon:(0,s.jsx)(i.DynamicIcon,{iconKey:`Close`}),size:`small`})}):void 0},htmlInput:{spellCheck:!1,autoComplete:`off`,"aria-label":a(`template.search`)}}})},v=/^\d+\.\d+\.\d+-([0-9A-Za-z-]+)/.exec(n.VERSION)?.[1],y=`https://unpkg.com/@sheetxl/templates-workbook${v?`@${v}`:``}/dist`,b=`templates-workbook`,x=e=>e.replace(/\.[^/.]+$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).trim().replace(/\b\w/g,e=>e.toUpperCase()),S=(e,t)=>{let n=`${e}${e.endsWith(`/`)?``:`/`}${b}/${t}`;return typeof document>`u`?n:new URL(n,document.baseURI).href},C=e=>typeof e==`string`&&e?e:void 0,w=new Map,T=(e=y)=>{let t=w.get(e);return t||(t=(async()=>{let t=(await(0,l.listResources)(`templates`,b,e)).find(e=>e.meta?.schema!==void 0);if(!t)throw Error(`No template catalog found at '${e}'.`);return Math.floor(Number(t.meta?.schema))===1?((e,t)=>{let n=Array.isArray(e.meta?.categories)?e.meta.categories:[],r=[],i=new Set;for(let e of n){let t=C(e?.id);t&&!i.has(t)&&(i.add(t),r.push({id:t,title:C(e.title)??x(t),description:C(e.description),icon:C(e.icon)}))}let a=[];for(let n of e.entries){let e=n.path,o=e.split(`/`);if(o.length!==2||!/\.(?:xlsx|sxl|csv)$/i.test(e))continue;let s=C(n.category)??o[0];i.has(s)||(i.add(s),r.push({id:s,title:x(s)}));let c=C(n.thumbnail),l=C(n.thumbnailDark);a.push({id:e,title:C(n.title)??x(o[1]),category:s,description:C(n.description),tags:Array.isArray(n.tags)?n.tags.filter(e=>typeof e==`string`):void 0,thumbnailUrl:c?S(t,c):void 0,thumbnailDarkUrl:l?S(t,l):void 0,sourceUrl:S(t,e)})}return{categories:r,entries:a}})(t,e):(console.warn(`Template catalog at '${e}' has schema ${t.meta?.schema}; expected 1.`),{categories:[],entries:[]})})(),w.set(e,t),t.catch(()=>{w.delete(e)})),t},E=(e={})=>{let{path:t=y}=e,[n,r]=(0,a.useState)(0),[i,o]=(0,a.useState)({status:`loading`,categories:[],entries:[]});return(0,a.useEffect)(()=>{let e=!1;return o(e=>e.status===`loading`?e:{status:`loading`,categories:[],entries:[]}),T(t).then(t=>{e||o({status:`ready`,...t})},t=>{e||o({status:`error`,categories:[],entries:[],error:t})}),()=>{e=!0}},[t,n]),{...i,retry:(0,a.useCallback)(()=>{r(e=>e+1)},[])}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return T}});
|