@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +20 -0
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +1 -0
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +1 -0
- package/browser/cjs/B_WyRpeiesnEiNP4.cjs +11 -0
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +2 -0
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +2 -0
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
- package/browser/cjs/ByIEqNsvj52sihT9.cjs +5 -0
- package/browser/cjs/C3moehR3VOd0LnmM.cjs +1 -0
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +1 -0
- package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +1 -0
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +1 -0
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +1 -0
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +1 -0
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +1 -0
- package/browser/cjs/DBJLJGiCGXesx5n6.cjs +1 -0
- package/browser/cjs/DLScL5AOXhHu9O9H.cjs +7 -0
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +1 -0
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +1 -0
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +1 -0
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +1 -0
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +1 -0
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +1 -0
- package/browser/cjs/index.cjs +2 -7
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +1 -0
- package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +1 -0
- package/browser/esm/BFnJuOSao7TjbB-2.mjs +1150 -0
- package/browser/esm/BGngIqHYTFzsezh-.mjs +105 -0
- package/browser/esm/BH0fLaa4Vfda2U-T.mjs +155 -0
- package/browser/esm/BKadOi_4tf3UqilJ.mjs +8878 -0
- package/browser/esm/BNhUUeacBwGsPLBQ.mjs +42 -0
- package/browser/esm/BkP8c-zrLAqdNL5E.mjs +82 -0
- package/browser/esm/BlykPulAqes3JMee.mjs +1376 -0
- package/browser/esm/Bt_J_RX2M5EfualB.mjs +217 -0
- package/browser/esm/CIvpm_sHFmNjZQ7A.mjs +52 -0
- package/browser/esm/Cwku0NEsbyq9Q_RE.mjs +129 -0
- package/browser/esm/D4-E6nt8hrlNPIFy.mjs +5391 -0
- package/browser/esm/D5kzg7IfEtrExqiB.mjs +47 -0
- package/browser/esm/DLG0lDeb0t2L5dW4.mjs +468 -0
- package/browser/esm/DN5ACcUVdZeTSdLP.mjs +411 -0
- package/browser/esm/DP50mI7SOk1spPHv.mjs +516 -0
- package/browser/esm/DfZkO9tkYUlBUgXw.mjs +508 -0
- package/browser/esm/DhSHhyt16cHMvS_1.mjs +612 -0
- package/browser/esm/DxEzstNhMkJ0uzic.mjs +191 -0
- package/browser/esm/DxurARMNTQF7_rno.mjs +99 -0
- package/browser/esm/EK3JudzGAPbSIzUc.mjs +2207 -0
- package/browser/esm/Lds8JbV0rmFse8IO.mjs +113 -0
- package/browser/esm/gdfNDmwpOOPidxVx.mjs +20 -0
- package/browser/esm/gr4KpbaVpVfm8KOB.mjs +219 -0
- package/browser/esm/index.mjs +152 -91
- package/licenses/dependencies.txt +137 -627
- package/node/esm/-xXP4QK8hYGcJeug.mjs +509 -0
- package/node/esm/BVNe-px0vKah_sh2.mjs +516 -0
- package/node/esm/CLqRv2FWsGMrPoB0.mjs +47 -0
- package/node/esm/CSaiKMpmmQJY2xtl.mjs +113 -0
- package/node/esm/CTVMIjaQZQtJ05F8.mjs +129 -0
- package/node/esm/CWDr4rcpYux8bSQk.mjs +82 -0
- package/node/esm/CgDlduchq8t6DdhF.mjs +190 -0
- package/node/esm/Ck1Im-zWbwJqZNU1.mjs +470 -0
- package/node/esm/Ctakr7TocM8RykpC.mjs +679 -0
- package/node/esm/DMhU1sS3kX-Im83k.mjs +106 -0
- package/node/esm/Dh2MI-_NSwxjrRP8.mjs +99 -0
- package/node/esm/ED4g6Bsz9syAhAW3.mjs +155 -0
- package/node/esm/VuLRDpv46Yib6fpp.mjs +4536 -0
- package/node/esm/index.mjs +10603 -2832
- package/package.json +27 -27
- package/resources/contents.json +30 -0
- package/resources/locales/contents.json +44 -0
- package/resources/locales/de/groups.cmd.json +219 -0
- package/resources/locales/de/studio.cmd.json +159 -0
- package/resources/locales/de/ui.msg.json +507 -0
- package/resources/locales/en/groups.cmd.json +219 -0
- package/resources/locales/en/studio.cmd.json +159 -0
- package/resources/locales/en/ui.msg.json +508 -0
- package/types/index.d.ts +2 -1761
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +131 -0
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +29 -0
- package/types/src/anchorItems/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +30 -0
- package/types/src/border/BorderStylePopupButton.d.ts +40 -0
- package/types/src/border/index.d.ts +3 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +10 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/color/Alpha.d.ts +36 -0
- package/types/src/color/Checkboard.d.ts +11 -0
- package/types/src/color/CheckboardUtils.d.ts +3 -0
- package/types/src/color/ColorButton.d.ts +21 -0
- package/types/src/color/ColorButtonList.d.ts +17 -0
- package/types/src/color/ColorPanel.d.ts +71 -0
- package/types/src/color/ColorPopupButton.d.ts +29 -0
- package/types/src/color/CustomColorPanel.d.ts +16 -0
- package/types/src/color/EditableInput.d.ts +22 -0
- package/types/src/color/Hue.d.ts +29 -0
- package/types/src/color/Saturation.d.ts +45 -0
- package/types/src/color/SketchFields.d.ts +9 -0
- package/types/src/color/Swatch.d.ts +16 -0
- package/types/src/color/Types.d.ts +11 -0
- package/types/src/color/_Utils.d.ts +4 -0
- package/types/src/color/index.d.ts +7 -0
- package/types/src/command/AccountingStyleCommandButton.d.ts +18 -0
- package/types/src/command/AppearanceCommandButton.d.ts +3 -0
- package/types/src/command/BorderCommandButton.d.ts +20 -0
- package/types/src/command/ColorCommandButton.d.ts +23 -0
- package/types/src/command/DocThemeCommandButton.d.ts +19 -0
- package/types/src/command/FileCommandButton.d.ts +8 -0
- package/types/src/command/FontFamilyCommandButton.d.ts +9 -0
- package/types/src/command/FontSizeCommandButton.d.ts +21 -0
- package/types/src/command/InsertFunctionCommandPopupButton.d.ts +9 -0
- package/types/src/command/InsertFunctionSumCommandPopupButton.d.ts +8 -0
- package/types/src/command/LanguageCommandButton.d.ts +19 -0
- package/types/src/command/LocaleCommandButton.d.ts +17 -0
- package/types/src/command/NumberFormatCommandButton.d.ts +6 -0
- package/types/src/command/PasteCommandButton.d.ts +14 -0
- package/types/src/command/PresetCellStylesCommandButton.d.ts +11 -0
- package/types/src/command/PresetTableStylesCommandButton.d.ts +12 -0
- package/types/src/command/RegisterCatalog.d.ts +3 -0
- package/types/src/command/SheetCommandGroups.d.ts +10 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +9 -0
- package/types/src/command/StudioCommandGroups.d.ts +11 -0
- package/types/src/command/TextEffectsCommandButton.d.ts +6 -0
- package/types/src/command/TextRotateGroupButton.d.ts +14 -0
- package/types/src/command/UndoRedoCommandButton.d.ts +14 -0
- package/types/src/command/WalkingCopyCommandButton.d.ts +6 -0
- package/types/src/command/WorkbookCommandGroups.d.ts +11 -0
- package/types/src/command/index.d.ts +23 -0
- package/types/src/conditionalFormat/ColorScaleRulePanel.d.ts +18 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsPanel.d.ts +23 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsTaskPane.d.ts +4 -0
- package/types/src/conditionalFormat/ConditionalFormatEditorPanel.d.ts +20 -0
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +2 -0
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +32 -0
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +34 -0
- package/types/src/conditionalFormat/ConditionalFormatTitle.d.ts +10 -0
- package/types/src/conditionalFormat/DataBarRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/PresetChip.d.ts +30 -0
- package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +20 -0
- package/types/src/conditionalFormat/RulePreview.d.ts +23 -0
- package/types/src/conditionalFormat/RuleSection.d.ts +20 -0
- package/types/src/conditionalFormat/ScaleMiniGrid.d.ts +59 -0
- package/types/src/conditionalFormat/ScaleStopRow.d.ts +34 -0
- package/types/src/conditionalFormat/index.d.ts +3 -0
- package/types/src/conditionalFormat/previewColor.d.ts +50 -0
- package/types/src/conditions/AverageOption.d.ts +25 -0
- package/types/src/conditions/BetweenOption.d.ts +25 -0
- package/types/src/conditions/BooleanOption.d.ts +24 -0
- package/types/src/conditions/CombinatorOption.d.ts +41 -0
- package/types/src/conditions/ConditionEditor.d.ts +57 -0
- package/types/src/conditions/ConditionUtils.d.ts +83 -0
- package/types/src/conditions/DateTimeOption.d.ts +43 -0
- package/types/src/conditions/ExpressionOption.d.ts +26 -0
- package/types/src/conditions/InSetOption.d.ts +37 -0
- package/types/src/conditions/NumberOption.d.ts +24 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +55 -0
- package/types/src/conditions/OperatorSelect.d.ts +35 -0
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +39 -0
- package/types/src/conditions/ScalarOption.d.ts +29 -0
- package/types/src/conditions/SelectorSelect.d.ts +43 -0
- package/types/src/conditions/StringOption.d.ts +24 -0
- package/types/src/conditions/TimePeriodOption.d.ts +25 -0
- package/types/src/conditions/TopNOption.d.ts +25 -0
- package/types/src/conditions/index.d.ts +13 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +16 -0
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -0
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +12 -0
- package/types/src/dataValidation/DataValidationPlugin.d.ts +2 -0
- package/types/src/dataValidation/index.d.ts +2 -0
- package/types/src/debug/DebugUtils.d.ts +4 -0
- package/types/src/debug/index.d.ts +2 -0
- package/types/src/dialog/CommentsDialog.d.ts +11 -0
- package/types/src/dialog/FindReplaceWindow.d.ts +13 -0
- package/types/src/dialog/HyperlinkDialog.d.ts +28 -0
- package/types/src/dialog/InsertFunctionDialog.d.ts +25 -0
- package/types/src/dialog/NamedReferenceDialog.d.ts +17 -0
- package/types/src/dialog/NumberFormatDialog.d.ts +12 -0
- package/types/src/dialog/ResizeHeaderDialog.d.ts +15 -0
- package/types/src/dialog/ShortcutKeysDialog.d.ts +9 -0
- package/types/src/dialog/ShortcutKeysPanel.d.ts +28 -0
- package/types/src/dialog/SortDialog.d.ts +9 -0
- package/types/src/dialog/TableNewDialog.d.ts +14 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +13 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/filter/ColumnMenu.d.ts +13 -0
- package/types/src/filter/FilterList.d.ts +28 -0
- package/types/src/filter/index.d.ts +3 -0
- package/types/src/form/FormulaField.d.ts +221 -0
- package/types/src/form/InputField.d.ts +89 -0
- package/types/src/form/index.d.ts +3 -0
- package/types/src/formulaBar/FormulaBar.d.ts +8 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +51 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/function/FunctionArgumentsPanel.d.ts +57 -0
- package/types/src/function/FunctionSearchPanel.d.ts +35 -0
- package/types/src/function/InsertFunctionWizard.d.ts +79 -0
- package/types/src/function/index.d.ts +4 -0
- package/types/src/function/paneMetrics.d.ts +33 -0
- package/types/src/index.d.ts +21 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +21 -0
- package/types/src/itemsPanel/ItemCard.d.ts +57 -0
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +215 -0
- package/types/src/itemsPanel/ItemsPanel.d.ts +45 -0
- package/types/src/itemsPanel/SortableCards.d.ts +67 -0
- package/types/src/itemsPanel/index.d.ts +6 -0
- package/types/src/movable/MovableContextMenu.d.ts +13 -0
- package/types/src/movable/index.d.ts +2 -0
- package/types/src/named/INamedCollectionEditor.d.ts +37 -0
- package/types/src/named/NamedCollectionEditor.d.ts +7 -0
- package/types/src/named/NamedDetailsPanel.d.ts +11 -0
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -0
- package/types/src/named/NamedDraft.d.ts +68 -0
- package/types/src/named/NamedEditorPanel.d.ts +19 -0
- package/types/src/named/NamedPlugin.d.ts +2 -0
- package/types/src/named/index.d.ts +8 -0
- package/types/src/numberFormat/NumberFormatPanel.d.ts +29 -0
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +12 -0
- package/types/src/numberFormat/index.d.ts +8 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +20 -0
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +3 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +27 -0
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +2 -0
- package/types/src/protectedRange/index.d.ts +2 -0
- package/types/src/protection/WorkbookProtectionDialog.d.ts +23 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +51 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/sheet/SheetTabMenu.d.ts +21 -0
- package/types/src/sheet/SheetsAllMenu.d.ts +16 -0
- package/types/src/sheet/index.d.ts +3 -0
- package/types/src/statusBar/NumberStats.d.ts +27 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +11 -0
- package/types/src/statusBar/StatusBar.d.ts +35 -0
- package/types/src/statusBar/index.d.ts +4 -0
- package/types/src/studio/CommandsWrapper.d.ts +36 -0
- package/types/src/studio/DefaultLogo.d.ts +3 -0
- package/types/src/studio/EagerStudio.d.ts +5 -0
- package/types/src/studio/Studio.d.ts +26 -0
- package/types/src/studio/StudioCommandProvider.d.ts +26 -0
- package/types/src/studio/StudioCommands.d.ts +115 -0
- package/types/src/studio/StudioNotifierProvider.d.ts +10 -0
- package/types/src/studio/StudioProps.d.ts +372 -0
- package/types/src/studio/StudioSplitPane.d.ts +60 -0
- package/types/src/studio/StudioTaskPaneArea.d.ts +8 -0
- package/types/src/studio/StudioToolbar.d.ts +37 -0
- package/types/src/studio/index.d.ts +4 -0
- package/types/src/studio/useStudioApp.d.ts +51 -0
- package/types/src/table/TableDetailsPanel.d.ts +17 -0
- package/types/src/table/TableDetailsTaskPane.d.ts +3 -0
- package/types/src/table/TablePlugin.d.ts +2 -0
- package/types/src/table/TableStyleCanvasPreview.d.ts +21 -0
- package/types/src/table/TableStyleOptionsPanel.d.ts +38 -0
- package/types/src/table/TableStylePreview.d.ts +43 -0
- package/types/src/table/index.d.ts +7 -0
- package/types/src/theme/ThemeSelectButton.d.ts +23 -0
- package/types/src/theme/ThemeSelectPanel.d.ts +17 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +24 -0
- package/types/src/theme/ThemeUtils.d.ts +57 -0
- package/types/src/theme/index.d.ts +5 -0
- package/types/src/toast/ToastError.d.ts +10 -0
- package/types/src/toast/index.d.ts +2 -0
- package/types/src/toolbar/WorkbookToolbars.d.ts +46 -0
- package/types/src/toolbar/index.d.ts +2 -0
- package/types/src/workbook/DefaultRenderers.d.ts +23 -0
- package/types/src/workbook/DocumentTitle.d.ts +69 -0
- package/types/src/workbook/WorkbookContextMenu.d.ts +13 -0
- package/types/src/workbook/WorkbookElement.d.ts +12 -0
- package/types/src/workbook/WorkbookStrip.d.ts +37 -0
- package/types/src/workbook/index.d.ts +7 -0
- package/browser/cjs/0DtrpXkQQehBmvSv.cjs +0 -6
- package/browser/cjs/6C3ia2nz4Zm-AdMZ.cjs +0 -7
- package/browser/cjs/BR_EGEaHisRrXAtK.cjs +0 -6
- package/browser/cjs/B_v_M4TiavtofChs.cjs +0 -42
- package/browser/cjs/C17p-h_nw582H7WD.cjs +0 -20
- package/browser/cjs/CInmVysdoHEvvW9h.cjs +0 -6
- package/browser/cjs/CMvQZPQsE7MuTMy_.cjs +0 -6
- package/browser/cjs/CkNt54AXVfJjIWja.cjs +0 -6
- package/browser/cjs/CtRvyhDzQxsk7dkI.cjs +0 -6
- package/browser/cjs/DN9cQ4_4ERQvzKn6.cjs +0 -6
- package/browser/cjs/DUTuBWUNF-w3Fxtb.cjs +0 -6
- package/browser/cjs/pTzEs1wlZj5Bb6xc.cjs +0 -18
- package/browser/esm/8ZnwcsRrGO3Nlw9Y.mjs +0 -54
- package/browser/esm/BFZ4oCbQukelEVLI.mjs +0 -53
- package/browser/esm/BP3nTf4-SLftsj61.mjs +0 -640
- package/browser/esm/BSMkBkXBQgZhX1xk.mjs +0 -2159
- package/browser/esm/CPLIJbynjEkwF2T0.mjs +0 -4533
- package/browser/esm/CuC13VFjBYFE7kub.mjs +0 -155
- package/browser/esm/Cw3i8T1tVnm8o6eB.mjs +0 -46
- package/browser/esm/D6E8W2KK4dGVRQO_.mjs +0 -25
- package/browser/esm/D8xc3AM9QHEqmpb9.mjs +0 -50
- package/browser/esm/DA_bEpA5kkn89fmW.mjs +0 -2411
- package/browser/esm/DVqOr-7nEXA7IjKJ.mjs +0 -26
- package/browser/esm/VAUOzclLs-dR9nt_.mjs +0 -50
- package/node/assets/style.css +0 -1
- package/node/esm/B9dvpdCD_p2q8aNP.mjs +0 -156
- package/node/esm/BBxZemzbmUkoOYdq.mjs +0 -46
- package/node/esm/BDdkV45Cf7BLs5jE.mjs +0 -25
- package/node/esm/BoX8OuVRgUNgw0Wb.mjs +0 -91
- package/node/esm/CPbwVoL6mq66TtTR.mjs +0 -53
- package/node/esm/DMd6h1vz-USluank.mjs +0 -88
- package/node/esm/DYgtaT_soTbSP8M9.mjs +0 -52
- package/node/esm/DxDGSRoOYlWydiwL.mjs +0 -57
- package/node/esm/OMgXBbHk-VRNKAop.mjs +0 -26
- package/node/esm/bGXLfLFngllNb8U1.mjs +0 -50
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
2
|
+
import { ErrorPanelProps, LoadingPanelProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { SxProps } from '@mui/system';
|
|
4
|
+
import { Theme, ThemeOptions, PaperProps } from '@mui/material';
|
|
5
|
+
import { TaskPaneAreaProps, ITaskPaneAreaElement, IWorkbookElement, WorkbookElementProps, WorkbookLoadEvent, SheetEditable } from '@sheetxl/react';
|
|
6
|
+
import { ExplicitTokens } from '../theme/ThemeUtils';
|
|
7
|
+
import { DocumentTitleProps } from '../workbook';
|
|
8
|
+
import { WorkbookToolbarsProps } from '../toolbar';
|
|
9
|
+
import { FormulaBarProps, IFormulaBarElement } from '../formulaBar';
|
|
10
|
+
import { StatusBarProps } from '../statusBar';
|
|
11
|
+
/**
|
|
12
|
+
* Properties for the Studio component.
|
|
13
|
+
*/
|
|
14
|
+
export interface StudioProps extends Omit<PaperProps, 'autoFocus' | 'ref'> {
|
|
15
|
+
/**
|
|
16
|
+
* The workbook for the studio — a live {@link IWorkbook}, a `Promise` for one, or
|
|
17
|
+
* {@link IWorkbookIO.ReadOptions} the studio reads.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* The workbook is the studio's value object: it carries its own identity — the
|
|
21
|
+
* {@link IWorkbookIO.Origin | origin} (virtual file handle) and display name — so there is no
|
|
22
|
+
* separate document wrapper to thread. The studio adds only session state (the dirty tracker).
|
|
23
|
+
*
|
|
24
|
+
* @see
|
|
25
|
+
* * {@link IWorkbook}
|
|
26
|
+
* * {@link IWorkbookIO.ReadOptions}
|
|
27
|
+
*/
|
|
28
|
+
workbook?: IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions;
|
|
29
|
+
/**
|
|
30
|
+
* Called when the studio's live workbook changes — e.g. when a workbook is opened (replacing the
|
|
31
|
+
* current one) via the Studio's own file commands or drag-and-drop, or on unmount (`null`).
|
|
32
|
+
*
|
|
33
|
+
* @param workbook - The current workbook (carrying its origin + display name), or `null`.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* The Studio owns Open/replace internally, so a host that manages window-level chrome (tab title,
|
|
37
|
+
* `beforeunload`, see {@link @sheetxl/studio-mui!useStudioApp}) must observe *this* workbook rather
|
|
38
|
+
* than the one it resolved initially — otherwise the title/dirty guard stay bound to the first
|
|
39
|
+
* workbook after an in-app open. Pair with {@link StudioProps.onDirtyChange} for the unsaved flag.
|
|
40
|
+
*/
|
|
41
|
+
onWorkbookChange?: (workbook: IWorkbook | null) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Called if the document (a promise / read options) fails to resolve.
|
|
44
|
+
*
|
|
45
|
+
* @param error The error
|
|
46
|
+
*/
|
|
47
|
+
onDocumentError?: (error: any) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Customizations for the default error panel shown when the {@link StudioProps.document} fails to
|
|
50
|
+
* resolve. Use {@link StudioProps.renderDocumentError} to replace the panel entirely.
|
|
51
|
+
*/
|
|
52
|
+
propsDocumentError?: Partial<ErrorPanelProps>;
|
|
53
|
+
/**
|
|
54
|
+
* Replace the error panel shown when the {@link StudioProps.document} fails to resolve (or cannot be
|
|
55
|
+
* rendered).
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* The failure is also reported programmatically via {@link StudioProps.onDocumentError}.
|
|
59
|
+
*
|
|
60
|
+
* @defaultValue StackTraceErrorPanel
|
|
61
|
+
*/
|
|
62
|
+
renderDocumentError?: (props: ErrorPanelProps) => React.ReactElement;
|
|
63
|
+
/**
|
|
64
|
+
* Customizations for the default loading panel shown while the {@link StudioProps.document} resolves
|
|
65
|
+
* (and the grid first paints). Use {@link StudioProps.renderDocumentLoading} to replace it entirely.
|
|
66
|
+
*/
|
|
67
|
+
propsDocumentLoading?: Partial<LoadingPanelProps>;
|
|
68
|
+
/**
|
|
69
|
+
* Replace the loading panel shown while the {@link StudioProps.document} resolves / the grid paints.
|
|
70
|
+
*/
|
|
71
|
+
renderDocumentLoading?: (props: LoadingPanelProps) => React.ReactElement;
|
|
72
|
+
/**
|
|
73
|
+
* Customizations forwarded to the underlying (chromeless) workbook grid.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* The studio composes its chrome (toolbar / formula bar / status bar / menus) *around* the grid
|
|
77
|
+
* and forwards these to it. Grid-level concerns (sheet, tabs, context menus, scrollbars, etc.)
|
|
78
|
+
* live here rather than flat on {@link StudioProps} — the same containment pattern
|
|
79
|
+
* {@link WorkbookElementProps} uses for `propsSheet`.
|
|
80
|
+
*/
|
|
81
|
+
propsWorkbook?: Partial<WorkbookElementProps>;
|
|
82
|
+
/**
|
|
83
|
+
* Callback for when the workbook grid first renders. Useful for hiding/showing loading panels.
|
|
84
|
+
*/
|
|
85
|
+
onWorkbookLoad?: (event: WorkbookLoadEvent) => void | Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Allow for customizations on TaskPaneArea.
|
|
88
|
+
*/
|
|
89
|
+
propsTaskPaneArea?: Partial<TaskPaneAreaProps>;
|
|
90
|
+
/**
|
|
91
|
+
* Render TaskPaneArea.
|
|
92
|
+
*
|
|
93
|
+
* @param props The properties for the TaskPaneArea.
|
|
94
|
+
* @returns A React Element representing the TaskPaneArea.
|
|
95
|
+
*/
|
|
96
|
+
renderTaskPaneArea?: (props: TaskPaneAreaProps) => React.ReactElement<ITaskPaneAreaElement>;
|
|
97
|
+
/**
|
|
98
|
+
* Allow for a side of the taskpane.
|
|
99
|
+
*
|
|
100
|
+
* @defaultValue 'right'
|
|
101
|
+
*/
|
|
102
|
+
taskPaneSide?: 'left' | 'right';
|
|
103
|
+
/**
|
|
104
|
+
* Custom logo.
|
|
105
|
+
*/
|
|
106
|
+
logo?: React.ReactNode;
|
|
107
|
+
/**
|
|
108
|
+
* Called when the workbook's unsaved-changes (dirty) state changes.
|
|
109
|
+
*
|
|
110
|
+
* @param isDirty `true` when there are unsaved changes since the last save (or the workbook was
|
|
111
|
+
* created), `false` when saved or undone back to the saved state.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* Use this to drive a host's "unsaved" affordances — a `beforeunload` close prompt, a tab marker,
|
|
115
|
+
* etc. (see the studio example). Save state is computed from the transaction store, so undoing
|
|
116
|
+
* back to the saved point reports clean again.
|
|
117
|
+
*/
|
|
118
|
+
onDirtyChange?: (isDirty: boolean) => void;
|
|
119
|
+
/**
|
|
120
|
+
* Additional document-title (title bar) properties.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* If onTitleChange or title is provided then the prop versions are ignored
|
|
124
|
+
*/
|
|
125
|
+
propsDocumentTitle?: DocumentTitleProps;
|
|
126
|
+
/**
|
|
127
|
+
* Indicate if the formula bar should be showing.
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue Workbook view model (but can be overridden).
|
|
130
|
+
*/
|
|
131
|
+
showFormulaBar?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Customizations for the formula bar.
|
|
134
|
+
*/
|
|
135
|
+
propsFormulaBar?: Partial<FormulaBarProps>;
|
|
136
|
+
/**
|
|
137
|
+
* Render a custom formula bar (replaces the default).
|
|
138
|
+
*/
|
|
139
|
+
renderFormulaBar?: (props: FormulaBarProps) => React.ReactElement;
|
|
140
|
+
/**
|
|
141
|
+
* The shared cell editor. Supply a stable {@link SheetEditable} to drive the grid and
|
|
142
|
+
* formula bar through one instance (free two-way sync); omit to let the studio auto-create one.
|
|
143
|
+
*/
|
|
144
|
+
editable?: SheetEditable;
|
|
145
|
+
/**
|
|
146
|
+
* Shows the status bar.
|
|
147
|
+
*
|
|
148
|
+
* @defaultValue Workbook view model (but can be overridden).
|
|
149
|
+
*/
|
|
150
|
+
showStatusBar?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Customizations for the status bar.
|
|
153
|
+
*/
|
|
154
|
+
propsStatusBar?: Partial<StatusBarProps>;
|
|
155
|
+
/**
|
|
156
|
+
* Render a custom status bar (replaces the default).
|
|
157
|
+
*/
|
|
158
|
+
renderStatusBar?: (props: StatusBarProps) => React.ReactElement;
|
|
159
|
+
/**
|
|
160
|
+
* Customizations for the toolbar.
|
|
161
|
+
*/
|
|
162
|
+
propsToolbar?: Partial<WorkbookToolbarsProps>;
|
|
163
|
+
/**
|
|
164
|
+
* Render a custom toolbar (replaces the default studio toolbar).
|
|
165
|
+
*/
|
|
166
|
+
renderToolbar?: (props: WorkbookToolbarsProps) => React.ReactElement;
|
|
167
|
+
/**
|
|
168
|
+
* Slot rendered at the top-left of the toolbar (after the logo, before the title).
|
|
169
|
+
*
|
|
170
|
+
* @remarks
|
|
171
|
+
* Application-level toolbar chrome the studio no longer hardcodes — e.g. a file menu. Inject a
|
|
172
|
+
* {@link @sheetxl/studio-mui!StandaloneFileCommandButton} for the standalone file menu (open / save
|
|
173
|
+
* / import / export); command availability is still governed by the active {@link WorkbookIO}
|
|
174
|
+
* backing store's `canRead` / `canWrite`.
|
|
175
|
+
*/
|
|
176
|
+
topLeft?: React.ReactNode;
|
|
177
|
+
/**
|
|
178
|
+
* Slot rendered at the top-right of the toolbar — e.g. an appearance (light/dark) menu. Inject an
|
|
179
|
+
* {@link @sheetxl/studio-mui!AppearanceCommandButton} for the default appearance menu.
|
|
180
|
+
*/
|
|
181
|
+
topRight?: React.ReactNode;
|
|
182
|
+
/**
|
|
183
|
+
* MUI theme customization (`ThemeOptions`) merged into Studio's built-in light and dark themes — shared
|
|
184
|
+
* config (e.g. `typography`) plus **per-mode** overrides via MUI's native `colorSchemes: { light, dark }`
|
|
185
|
+
* (the modern replacement for the former `lightTheme`/`darkTheme` props):
|
|
186
|
+
*
|
|
187
|
+
* ```ts
|
|
188
|
+
* muiTheme={{
|
|
189
|
+
* typography: { fontFamily: '…' }, // both modes
|
|
190
|
+
* colorSchemes: {
|
|
191
|
+
* light: { palette: { primary: { main: '#6d28d9' } } }, // light only
|
|
192
|
+
* dark: { palette: { primary: { main: '#a78bfa' } } }, // dark only
|
|
193
|
+
* },
|
|
194
|
+
* }}
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* @remarks
|
|
198
|
+
* This is *config*, not state. Light/dark **mode** and the dark-grid/dark-image toggles are self-managed by
|
|
199
|
+
* Studio as persisted preferences (see {@link @sheetxl/react!ThemeStateKey}), driven by the surrounding
|
|
200
|
+
* `PersistenceStateProvider` — not by props. A wrapping `TokenThemeProvider` layers token overrides on top.
|
|
201
|
+
*/
|
|
202
|
+
muiTheme?: ThemeOptions;
|
|
203
|
+
/**
|
|
204
|
+
* Explicit `--sxl-*` token values — the host's own colors, stated rather than derived. Addressed by
|
|
205
|
+
* **cell**: a `(surface × mode)` pair, so a host can name the header paper without a new token existing:
|
|
206
|
+
*
|
|
207
|
+
* ```ts
|
|
208
|
+
* tokens={{
|
|
209
|
+
* dark: {
|
|
210
|
+
* app: {
|
|
211
|
+
* 'color-base-200': '#1f1f1f', // the chrome/desktop surface
|
|
212
|
+
* 'color-input': '#313131', // the formula bar / name box field
|
|
213
|
+
* 'color-input-border': '#3c3c3c',
|
|
214
|
+
* },
|
|
215
|
+
* header: { 'color-base-100': '#181818' }, // the row/column header paper
|
|
216
|
+
* },
|
|
217
|
+
* }}
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* Use this — not {@link muiTheme} — for anything the MUI palette has no slot for. Studio derives what you
|
|
222
|
+
* leave unset (gridlines, the header hover step) from the five palette slots by *elevation* math, which
|
|
223
|
+
* assumes "raised" means "lighter". A flat design language (VS Code, Fluent) names those surfaces outright
|
|
224
|
+
* and does not follow that curve, so stating them here makes the derivation stand down for exactly those
|
|
225
|
+
* cells and keeps deriving only the rest.
|
|
226
|
+
*
|
|
227
|
+
* The surfaces are `app` (the default cell everything inherits), `header` (row/column headers) and `grid`
|
|
228
|
+
* (the cell body). These are emitted with Studio's own `sxl-app` layer, so they stay **surface-aware**. A
|
|
229
|
+
* wrapping `TokenThemeProvider` remains the right doorway for a client *brand* override, but it emits into
|
|
230
|
+
* `sxl-overrides`, which — being a higher layer — applies across every surface at once.
|
|
231
|
+
*/
|
|
232
|
+
tokens?: ExplicitTokens;
|
|
233
|
+
/**
|
|
234
|
+
* Also apply the MUI `CssBaseline` when theming.
|
|
235
|
+
*
|
|
236
|
+
* @defaultValue false
|
|
237
|
+
*/
|
|
238
|
+
cssBaseline?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Autofocus on load. If loading multiple workbooks or using an a secondary component this
|
|
241
|
+
* should be set to false.
|
|
242
|
+
*
|
|
243
|
+
* @defaultValue false
|
|
244
|
+
*/
|
|
245
|
+
autoFocus?: boolean | FocusOptions;
|
|
246
|
+
/**
|
|
247
|
+
* Set the license key via a property
|
|
248
|
+
* @remarks
|
|
249
|
+
* This will only be used the first time.
|
|
250
|
+
*/
|
|
251
|
+
licenseKey?: string;
|
|
252
|
+
/**
|
|
253
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
254
|
+
*/
|
|
255
|
+
sx?: SxProps<Theme>;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* The workbook-resolution lifecycle state, as read from {@link IStudioAttributes.getWorkbookState}.
|
|
259
|
+
*
|
|
260
|
+
* @remarks
|
|
261
|
+
* This is the *resolution* layer — turning a source ({@link StudioProps.workbook} given as read
|
|
262
|
+
* options / a promise) into an {@link IWorkbook}. `error` is also surfaced via
|
|
263
|
+
* {@link StudioProps.onDocumentError} and the error panel. The grid's first-paint is a separate,
|
|
264
|
+
* later event ({@link StudioProps.onWorkbookLoad}).
|
|
265
|
+
*/
|
|
266
|
+
export type WorkbookLoadState = {
|
|
267
|
+
status: 'loading';
|
|
268
|
+
} | {
|
|
269
|
+
status: 'loaded';
|
|
270
|
+
workbook: IWorkbook;
|
|
271
|
+
} | {
|
|
272
|
+
status: 'error';
|
|
273
|
+
error: unknown;
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* Studio-specific attributes beyond HTMLDivElement.
|
|
277
|
+
*
|
|
278
|
+
* @remarks
|
|
279
|
+
* The Studio is the *chrome* layer (toolbar, formula bar, status bar, theming, file menu) that
|
|
280
|
+
* surrounds a workbook grid. It is a distinct DOM element that *contains* an
|
|
281
|
+
* {@link IWorkbookElement} rather than being one — reach the chrome-free grid via
|
|
282
|
+
* {@link IStudioAttributes.getWorkbookElement}.
|
|
283
|
+
*/
|
|
284
|
+
export interface IStudioAttributes {
|
|
285
|
+
/**
|
|
286
|
+
* For runtime type checking.
|
|
287
|
+
*/
|
|
288
|
+
isStudioElement: () => true;
|
|
289
|
+
/**
|
|
290
|
+
* Retrieve the chrome-free workbook grid element contained by this studio.
|
|
291
|
+
*
|
|
292
|
+
* @remarks
|
|
293
|
+
* `undefined`/`null` until the workbook has resolved and rendered (e.g. while a loading or error
|
|
294
|
+
* panel is shown).
|
|
295
|
+
*/
|
|
296
|
+
getWorkbookElement: () => IWorkbookElement | null;
|
|
297
|
+
/**
|
|
298
|
+
* The studio's live workbook — carrying its origin and display name — or `null` while loading /
|
|
299
|
+
* on error / before a workbook is set. The same instance pushed via
|
|
300
|
+
* {@link StudioProps.onWorkbookChange}, but readable on demand.
|
|
301
|
+
*/
|
|
302
|
+
getWorkbook: () => IWorkbook | null;
|
|
303
|
+
/**
|
|
304
|
+
* The authoritative unsaved-changes state of the live workbook.
|
|
305
|
+
*
|
|
306
|
+
* @remarks
|
|
307
|
+
* A synchronous, on-demand read (unlike {@link StudioProps.onDirtyChange}) — e.g. for a host (a
|
|
308
|
+
* VS Code extension) to re-check dirty immediately after an async save, where a concurrent edit
|
|
309
|
+
* may have re-dirtied the workbook between encode and write.
|
|
310
|
+
*/
|
|
311
|
+
isDirty: () => boolean;
|
|
312
|
+
/**
|
|
313
|
+
* The shared cell editor, or `null` if none. The same instance the grid and formula
|
|
314
|
+
* bar drive. Delegates to the workbook element's `getEditable()`.
|
|
315
|
+
*/
|
|
316
|
+
getEditable: () => SheetEditable | null;
|
|
317
|
+
/**
|
|
318
|
+
* Retrieve the studio's formula bar element, if a formula bar is shown.
|
|
319
|
+
*
|
|
320
|
+
* @remarks
|
|
321
|
+
* The formula bar is studio chrome (the chromeless {@link IWorkbookElement} grid does not have
|
|
322
|
+
* one), so this lives on the studio handle.
|
|
323
|
+
*/
|
|
324
|
+
getFormulaBarElement: () => IFormulaBarElement | null;
|
|
325
|
+
/**
|
|
326
|
+
* Move focus into the studio.
|
|
327
|
+
*
|
|
328
|
+
* @remarks
|
|
329
|
+
* A generic focus affordance that delegates to the contained
|
|
330
|
+
* {@link IWorkbookElement}'s `focus()` (which focuses the active sheet). Declared here (rather than
|
|
331
|
+
* relying on the inherited `HTMLDivElement.focus`) so the delegating behavior is part of the
|
|
332
|
+
* studio contract.
|
|
333
|
+
*
|
|
334
|
+
* Signature mirrors `HTMLElement.focus` so {@link IStudioElement} can extend both.
|
|
335
|
+
*/
|
|
336
|
+
focus(options?: FocusOptions): void;
|
|
337
|
+
/**
|
|
338
|
+
* The "load promise": resolves with the {@link IWorkbook} once it has loaded, rejects if the
|
|
339
|
+
* load fails.
|
|
340
|
+
*
|
|
341
|
+
* @remarks
|
|
342
|
+
* Lets a host await the outcome of the {@link StudioProps.workbook} resolution (a promise /
|
|
343
|
+
* read options) without wiring {@link StudioProps.onWorkbookChange} + {@link StudioProps.onDocumentError}.
|
|
344
|
+
* Re-armed on each new load (and on {@link IStudioAttributes.retry}); after a load has settled it
|
|
345
|
+
* returns the settled promise. Resolves on workbook load — not the grid's first paint
|
|
346
|
+
* ({@link StudioProps.onWorkbookLoad}).
|
|
347
|
+
*/
|
|
348
|
+
whenReady(): Promise<IWorkbook>;
|
|
349
|
+
/**
|
|
350
|
+
* A synchronous read of the current workbook-resolution {@link WorkbookLoadState}.
|
|
351
|
+
*/
|
|
352
|
+
getWorkbookState(): WorkbookLoadState;
|
|
353
|
+
/**
|
|
354
|
+
* Re-attempt resolving the current {@link StudioProps.document}.
|
|
355
|
+
*
|
|
356
|
+
* @remarks
|
|
357
|
+
* For programmatic recovery (e.g. a host "reload" action) so an error state isn't terminal —
|
|
358
|
+
* without changing the `workbook` prop identity. The default error panel does NOT surface this (an
|
|
359
|
+
* invalid file stays invalid, so a retry button would be misleading); a custom UI may call it.
|
|
360
|
+
*/
|
|
361
|
+
retry(): void;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Type returned via the Studio's ref property.
|
|
365
|
+
*
|
|
366
|
+
* @remarks
|
|
367
|
+
* The studio root is its own DOM element that *contains* a workbook grid; it does not extend
|
|
368
|
+
* {@link IWorkbookElement}. See {@link IStudioAttributes}.
|
|
369
|
+
*/
|
|
370
|
+
export interface IStudioElement extends HTMLDivElement, IStudioAttributes {
|
|
371
|
+
}
|
|
372
|
+
//# sourceMappingURL=StudioProps.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Whether the split is a horizontal (`row`) or vertical (`column`) divider. */
|
|
3
|
+
export type SplitPaneOrientation = 'row' | 'column';
|
|
4
|
+
/** Which side the task pane sits on. `before` = `taskSide: 'left'`, `after` = `taskSide: 'right'`. */
|
|
5
|
+
export type SplitPaneSide = 'before' | 'after';
|
|
6
|
+
/**
|
|
7
|
+
* A layout slot key, `${orientation}:${side}` (e.g. `'row:after'`). The resized position is meaningfully
|
|
8
|
+
* different per slot (a horizontal drag isn't a vertical drag, a left pane isn't a right pane), so persisted
|
|
9
|
+
* positions are stored as a map keyed by this. New slots populate lazily as they are used.
|
|
10
|
+
*/
|
|
11
|
+
export type SplitPaneLayoutKey = `${SplitPaneOrientation}:${SplitPaneSide}`;
|
|
12
|
+
/** Context describing which layout slot a position change belongs to. */
|
|
13
|
+
export interface SplitPaneLayout {
|
|
14
|
+
orientation: SplitPaneOrientation;
|
|
15
|
+
side: SplitPaneSide;
|
|
16
|
+
key: SplitPaneLayoutKey;
|
|
17
|
+
}
|
|
18
|
+
export interface StudioSplitPaneProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
mainElement?: React.ReactElement;
|
|
20
|
+
sidebarElement?: React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* The split position. Either a single value (percent as a `number` or `'40%'`, pixels as `'280px'`) applied
|
|
23
|
+
* to whatever layout is active, or a map keyed by {@link SplitPaneLayoutKey} of per-slot percents. Slots
|
|
24
|
+
* missing from the map (or an omitted `position`) fall back to `'40%'`.
|
|
25
|
+
*
|
|
26
|
+
* @remarks When {@link persistKey} is set this acts as the SEED: a slot the user has already resized reads
|
|
27
|
+
* from the persisted map, and any slot they haven't yet resized falls back to this (so `position` wins on
|
|
28
|
+
* first load).
|
|
29
|
+
*/
|
|
30
|
+
position?: number | string | Partial<Record<SplitPaneLayoutKey, number>>;
|
|
31
|
+
/**
|
|
32
|
+
* When set, the split position is self-managed and persisted under this key (via `usePersistenceState`
|
|
33
|
+
* against the surrounding persistence store) as a per-slot map. The resized position of each layout slot
|
|
34
|
+
* (horizontal vs vertical split, and eventually before/after side) is remembered independently. Any slot
|
|
35
|
+
* not yet resized is seeded from {@link position}; {@link onPositionChange} still fires if provided.
|
|
36
|
+
*/
|
|
37
|
+
persistKey?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Fired when the user finishes dragging the resizer (not during drag). The second argument identifies the
|
|
40
|
+
* active layout slot so a caller persisting a per-slot map knows which entry to update.
|
|
41
|
+
*/
|
|
42
|
+
onPositionChange?: (position: {
|
|
43
|
+
pixels: number;
|
|
44
|
+
percent: number;
|
|
45
|
+
}, layout: SplitPaneLayout) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the layout should be right to left. This will flip the order of the panes and the direction of the split.
|
|
48
|
+
*
|
|
49
|
+
* @defaultValue 'left'
|
|
50
|
+
*/
|
|
51
|
+
taskSide?: 'left' | 'right';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Wraps a Workbook element and a taskPane into a split pane.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* This adds a split pane to support the task pane alongside the workbook.
|
|
58
|
+
*/
|
|
59
|
+
export declare const StudioSplitPane: React.NamedExoticComponent<StudioSplitPaneProps & React.RefAttributes<HTMLDivElement>>;
|
|
60
|
+
//# sourceMappingURL=StudioSplitPane.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { TaskPaneAreaProps, ITaskPaneAreaElement } from '@sheetxl/react';
|
|
4
|
+
export interface StudioTaskPaneAreaProps extends TaskPaneAreaProps {
|
|
5
|
+
model?: IWorkbook;
|
|
6
|
+
}
|
|
7
|
+
export declare const StudioTaskPaneArea: React.ForwardRefExoticComponent<Omit<StudioTaskPaneAreaProps, "ref"> & React.RefAttributes<ITaskPaneAreaElement>>;
|
|
8
|
+
//# sourceMappingURL=StudioTaskPaneArea.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbookElement } from '@sheetxl/react';
|
|
3
|
+
import { WorkbookToolbarsProps } from '../toolbar';
|
|
4
|
+
export interface StudioToolbarProps extends WorkbookToolbarsProps {
|
|
5
|
+
/**
|
|
6
|
+
* The active workbook — application chrome (e.g. the centered `DocumentTitle` built by the studio)
|
|
7
|
+
* reads it; the toolbar strip itself no longer needs it.
|
|
8
|
+
*/
|
|
9
|
+
workbook?: IWorkbookElement | null;
|
|
10
|
+
/**
|
|
11
|
+
* optional logo to display in the toolbar
|
|
12
|
+
*/
|
|
13
|
+
logo?: React.ReactNode;
|
|
14
|
+
mainElement?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Slot rendered at the start of the toolbar (after the logo, before the title).
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Application-level chrome the studio no longer hardcodes — e.g. a file menu. The studio example
|
|
20
|
+
* injects a {@link StandaloneFileCommandButton} here.
|
|
21
|
+
*/
|
|
22
|
+
startElement?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Slot rendered at the end of the toolbar.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Application-level chrome — e.g. an appearance (light/dark) menu. The studio example injects an
|
|
28
|
+
* {@link AppearanceCommandButton} here.
|
|
29
|
+
*/
|
|
30
|
+
endElement?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Wrap the workbooks toolbar with application level items: a logo, a centered title (`mainElement`),
|
|
34
|
+
* and injectable {@link StudioToolbarProps.startElement} / {@link StudioToolbarProps.endElement} slots.
|
|
35
|
+
*/
|
|
36
|
+
export declare const StudioToolbar: React.NamedExoticComponent<StudioToolbarProps & React.RefAttributes<any>>;
|
|
37
|
+
//# sourceMappingURL=StudioToolbar.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
2
|
+
import { WindowChromeOptions } from '@sheetxl/react';
|
|
3
|
+
/**
|
|
4
|
+
* What the studio should open. An {@link IWorkbook} / `Promise` / {@link IWorkbookIO.ReadOptions} /
|
|
5
|
+
* source string. When omitted, the `?source` (and `?title`) URL query is used, else a blank
|
|
6
|
+
* workbook is created.
|
|
7
|
+
*/
|
|
8
|
+
export type StudioAppSource = IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions | string;
|
|
9
|
+
export interface StudioAppOptions extends WindowChromeOptions {
|
|
10
|
+
/**
|
|
11
|
+
* What to open. If omitted, the `?source` / `?title` URL query is read, else a blank workbook is
|
|
12
|
+
* created. See {@link StudioAppSource}.
|
|
13
|
+
*/
|
|
14
|
+
source?: StudioAppSource;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The props {@link useStudioApp} returns for spreading onto `<Studio>`.
|
|
18
|
+
*/
|
|
19
|
+
export interface StudioAppProps {
|
|
20
|
+
/** The studio's value object — pass straight to `<Studio workbook={…} />`. */
|
|
21
|
+
workbook?: IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions;
|
|
22
|
+
/** Tracks the studio's live workbook (so the window chrome follows in-app opens). */
|
|
23
|
+
onWorkbookChange: (workbook: IWorkbook | null) => void;
|
|
24
|
+
/** Tracks the unsaved-changes flag (drives the title marker + close prompt). */
|
|
25
|
+
onDirtyChange: (isDirty: boolean) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Single-call setup for a single-per-window **Studio** app: resolves what to open (an explicit
|
|
29
|
+
* {@link StudioAppOptions.source}, the `?source` URL query, or a blank workbook) and manages the
|
|
30
|
+
* window chrome — document/tab title (with an unsaved `●` marker), an unsaved-changes close prompt,
|
|
31
|
+
* and a browser keyboard guard.
|
|
32
|
+
*
|
|
33
|
+
* @returns props to spread onto `<Studio>` — `workbook` (the value to open) plus the
|
|
34
|
+
* `onWorkbookChange` / `onDirtyChange` callbacks the studio fires as it opens/replaces workbooks,
|
|
35
|
+
* so the chrome follows.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Studio owns the workbook lifecycle (resolve, Open/replace, save, dirty tracking) and reports the
|
|
39
|
+
* live workbook + dirty flag via the callbacks; this hook holds them only to drive the window
|
|
40
|
+
* chrome (the workbook itself carries its name/origin). For apps that own the whole window — NOT
|
|
41
|
+
* for embedding `Studio` as a widget (which must not touch the window title / `beforeunload` of
|
|
42
|
+
* its host).
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* const studioApp = useStudioApp(); // reads ?source, else a blank workbook
|
|
47
|
+
* return <Studio {...studioApp} />;
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare const useStudioApp: (options?: StudioAppOptions) => StudioAppProps;
|
|
51
|
+
//# sourceMappingURL=useStudioApp.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITable, IStyleCollection, INamedCollection } from '@sheetxl/sdk';
|
|
3
|
+
export interface TableDetailsPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
table: ITable;
|
|
5
|
+
getStyles: () => IStyleCollection;
|
|
6
|
+
/**
|
|
7
|
+
* Need so that we can add the table to the names.
|
|
8
|
+
*/
|
|
9
|
+
getNames: () => INamedCollection;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* TODO
|
|
13
|
+
* - save last searches (up/down arrow to navigate) (in preferences/workbook?)
|
|
14
|
+
* - later add indexing so we can do real-time search and count
|
|
15
|
+
*/
|
|
16
|
+
export declare const TableDetailsPanel: React.NamedExoticComponent<TableDetailsPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
//# sourceMappingURL=TableDetailsPanel.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITable, IStyleCollection, ITableStyle } from '@sheetxl/sdk';
|
|
3
|
+
export interface TableStyleCanvasPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
table: ITable;
|
|
5
|
+
tableStyle: ITableStyle;
|
|
6
|
+
styles: IStyleCollection;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* If provided then this context will be used.
|
|
10
|
+
*/
|
|
11
|
+
canvas?: HTMLCanvasElement;
|
|
12
|
+
/**
|
|
13
|
+
* Reference to the element.
|
|
14
|
+
*/
|
|
15
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This is a way to canvas based TableStylePreview. It has a simple rendering but is lightweight.
|
|
19
|
+
*/
|
|
20
|
+
export declare const TableStyleCanvasPreview: React.NamedExoticComponent<Omit<TableStyleCanvasPreviewProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
//# sourceMappingURL=TableStyleCanvasPreview.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { Theme } from '@mui/material';
|
|
4
|
+
import { ITableStyle } from '@sheetxl/sdk';
|
|
5
|
+
/**
|
|
6
|
+
* This is a panel that is used to configure options for a table.
|
|
7
|
+
*/
|
|
8
|
+
export interface TableStyleOptionsPanelProps extends React.HTMLAttributes<HTMLElement> {
|
|
9
|
+
/**
|
|
10
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
11
|
+
*/
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
13
|
+
styleOptions: ITableStyle.StyleOptions;
|
|
14
|
+
showHeaderRow?: boolean;
|
|
15
|
+
showTotalRow?: boolean;
|
|
16
|
+
showButton?: boolean;
|
|
17
|
+
onStyleOptionsChange?: (options: ITableStyle.StyleOptions) => void;
|
|
18
|
+
onShowHeaderRowChange?: (showHeaderRow: boolean) => void;
|
|
19
|
+
onShowTotalRowChange?: (showTotalRow: boolean) => void;
|
|
20
|
+
onShowButtonChange?: (showButton: boolean) => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface TableStyleOptionsAttributes {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Type returned via ref property
|
|
27
|
+
*/
|
|
28
|
+
export interface TableStyleOptionsElement extends TableStyleOptionsAttributes, HTMLElement {
|
|
29
|
+
}
|
|
30
|
+
export type TableStyleOptionsAttribute = {
|
|
31
|
+
ref?: React.Ref<TableStyleOptionsElement>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Shows options with tables.
|
|
35
|
+
* TODO - We will later also have the options as commands.
|
|
36
|
+
*/
|
|
37
|
+
export declare const TableStyleOptionsPanel: React.NamedExoticComponent<TableStyleOptionsPanelProps & React.RefAttributes<TableStyleOptionsElement>>;
|
|
38
|
+
//# sourceMappingURL=TableStyleOptionsPanel.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
import { ITable, ITableStyle, IStyleCollection } from '@sheetxl/sdk';
|
|
4
|
+
export interface TableStylePreviewProps extends BoxProps {
|
|
5
|
+
/** Required */
|
|
6
|
+
styles: IStyleCollection;
|
|
7
|
+
/**
|
|
8
|
+
* The table to render. If not provided then then a default table will be used.
|
|
9
|
+
*/
|
|
10
|
+
table?: ITable;
|
|
11
|
+
/**
|
|
12
|
+
* Allows for table Style to be overwritten.
|
|
13
|
+
*/
|
|
14
|
+
tableStyle?: ITableStyle;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If `true` then the border will be forced to be thin.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Useful for small thumbnails and mimics Excel.
|
|
21
|
+
*/
|
|
22
|
+
forceThinBorder?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* if `true` then listers will be added to track table changes.
|
|
25
|
+
*/
|
|
26
|
+
isLive?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Change the default width of the rendered table.
|
|
29
|
+
* @defaultValue `10`
|
|
30
|
+
*/
|
|
31
|
+
cellHeight?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Component for rendering tableStyle previews.
|
|
35
|
+
* This uses an html table and the TableStyle renderer.
|
|
36
|
+
*
|
|
37
|
+
* It has the ability to render borders and fills
|
|
38
|
+
* with the their styles.
|
|
39
|
+
* @remarks
|
|
40
|
+
* This is intended to be used for the table options pane but is currently not in use.
|
|
41
|
+
*/
|
|
42
|
+
export declare const TableStylePreview: React.NamedExoticComponent<Omit<TableStylePreviewProps, "ref"> & React.RefAttributes<unknown>>;
|
|
43
|
+
//# sourceMappingURL=TableStylePreview.d.ts.map
|