@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.11
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/browser/esm/{CYoUd5KIl7W3AsxH.mjs → 1-LEUre9ZLG0OYYB.mjs} +24 -23
- package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → B26QVfjer2oY2ewK.mjs} +1 -1
- package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → BQYS2Yf-EAV_tBLr.mjs} +1 -1
- package/browser/esm/BegvsXeRs7e-9t8k.mjs +8 -0
- package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → Bos4Rkp8UTF7QXUB.mjs} +1 -1
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → C1pc9F4Rt2C5FKUo.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → CPnnESfZz2jjJd82.mjs} +1 -1
- package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → ClAtIfYbsUPA073B.mjs} +1 -1
- package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → D2u6THGErqw64KQI.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → DMdsMPT0fWBbTkNn.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DS66lAIM-9M-YoZQ.mjs} +5 -8
- package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → Dnh1kpz3v1JKtRD_.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → cQ6xdPFkEcuDlNTN.mjs} +1 -1
- package/browser/esm/chart.mjs +32 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +6590 -4824
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +2 -2
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
- package/licenses/dependencies.txt +313 -1
- package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → BMVK5plvmBOAIlxP.mjs} +1 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → BaRfst1euuhquupX.mjs} +1 -1
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → Be9c1GwQkPo8Piuh.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → BiaDWnN3tT7neoRL.mjs} +1 -1
- package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → C_SNx7TlFEcwbYjx.mjs} +1 -1
- package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
- package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → D_pCpfdQowV_4Aje.mjs} +23 -22
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → DgGEHydEjD7nfsDB.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → Dj5FM7_-YWhCtCCt.mjs} +1 -1
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → DxQZmb-j4NLUO9Af.mjs} +1 -1
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → JiQGhLkoL8CJpVvA.mjs} +1 -1
- package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
- package/node/esm/chart.mjs +32 -52
- package/node/esm/control.mjs +2 -2
- package/node/esm/{C_ANM4feA1xV-pri.mjs → gpD-9LDW92phhoma.mjs} +1 -1
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +9005 -7225
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +2 -2
- package/node/esm/shape.mjs +292 -340
- package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
- package/node/esm/slicer.mjs +15 -15
- package/node/esm/{D3YXHeOyFp00Xk3m.mjs → umljAT66yb3_rURh.mjs} +53 -56
- package/package.json +8 -6
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/sheet.cmd.json +11 -0
- package/resources/locales/de/table.cmd.json +1 -1
- package/resources/locales/de/ui.msg.json +12 -0
- package/resources/locales/de/workbook.cmd.json +5 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +11 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +12 -0
- package/resources/locales/en/workbook.cmd.json +5 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +74 -1
- package/types/src/cell/FormulaCellRenderer.d.ts +5 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +2 -2
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +10 -2
- package/types/src/chart/ChartElement.d.ts +111 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -0
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +46 -0
- package/types/src/chart/paint/echarts.d.ts +30 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +132 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +31 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/index.d.ts +1 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +2 -2
- package/types/src/editor/validationAlert.d.ts +3 -3
- package/types/src/frame/CommandContext.d.ts +7 -7
- package/types/src/index.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +2 -2
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
- package/types/src/layer/CommentCardLayer.d.ts +2 -2
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/GridFreezeLayer.d.ts +2 -2
- package/types/src/layer/HyperlinkLayer.d.ts +3 -3
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +3 -3
- package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
- package/types/src/layer/ResizeIndicator.d.ts +2 -2
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +4 -4
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
- package/types/src/layer/SheetLayers.d.ts +115 -0
- package/types/src/layer/SheetMovableLayer.d.ts +2 -2
- package/types/src/layer/SheetOutlineLayer.d.ts +2 -2
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +2 -2
- package/types/src/layer/TableToolbar.d.ts +3 -3
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +5 -4
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +2 -0
- package/types/src/layer/useFreezeDrag.d.ts +2 -2
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +2 -2
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/MovableCommands.d.ts +2 -2
- package/types/src/movable/MovableRenderers.d.ts +3 -3
- package/types/src/movable/index.d.ts +1 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +2 -2
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
- package/types/src/sheet/ISheetHeaderElement.d.ts +1 -1
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +46 -13
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +2 -2
- package/types/src/sheet/SheetCommands.d.ts +2 -2
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +4 -4
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +3 -3
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +2 -2
- package/types/src/sheet/circularReferences.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +3 -2
- package/types/src/workbook/IWorkbookElement.d.ts +27 -5
- package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
- package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export * from './PresetChartTypeDescriptors';
|
|
2
|
+
export { ChartPaintKinds, type ChartPaintKind } from './paint/kinds/ChartPaintKind';
|
|
3
|
+
export { ChartElement, nextSelected, type ChartElementProps, type ChartElementAttributes, type ChartElementPress, type IChartElement } from './ChartElement';
|
|
2
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IFill, IStroke, IText } from '@sheetxl/sdk';
|
|
2
|
+
/** A pattern preset's tile, row by row; `null` for a name that is not one of Excel's. */
|
|
3
|
+
export declare const patternTile: (preset: string | undefined) => boolean[][] | null;
|
|
4
|
+
/**
|
|
5
|
+
* What ECharts colors a shape with for `fill`: a CSS color, a gradient, or a repeated tile.
|
|
6
|
+
*
|
|
7
|
+
* @param none What draws no fill: `'transparent'` for a series, `'none'` for a `graphic` element.
|
|
8
|
+
*/
|
|
9
|
+
export declare const paintOf: (fill: IFill.JSON | null | undefined, none?: string) => any;
|
|
10
|
+
/** One color for `fill`, where ECharts takes no more (a tooltip's swatch): a gradient's first stop, a pattern's foreground. */
|
|
11
|
+
export declare const colorOf: (fill: IFill.JSON | null | undefined) => string | null;
|
|
12
|
+
/** A line's width in px. */
|
|
13
|
+
export declare const widthOf: (stroke: IStroke.JSON | null | undefined) => number;
|
|
14
|
+
/** A line's dash in px; `undefined` for a solid line. */
|
|
15
|
+
export declare const dashOf: (stroke: IStroke.JSON) => number[] | undefined;
|
|
16
|
+
/** A run's typeface. */
|
|
17
|
+
export declare const familyOf: (run: IText.RunPropertiesJSON) => string;
|
|
18
|
+
export declare const isBold: (run: IText.RunPropertiesJSON) => boolean;
|
|
19
|
+
export declare const isItalic: (run: IText.RunPropertiesJSON) => boolean;
|
|
20
|
+
/** A run's size in px. */
|
|
21
|
+
export declare const sizeOf: (run: IText.RunPropertiesJSON) => number;
|
|
22
|
+
/** What a run's text is filled with, as ECharts colors text. */
|
|
23
|
+
export declare const textPaintOf: (run: IText.RunPropertiesJSON) => any;
|
|
24
|
+
//# sourceMappingURL=_fills.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ChartLayout, IFill, IStroke, IText } from '@sheetxl/sdk';
|
|
2
|
+
type Font = IText.RunPropertiesJSON;
|
|
3
|
+
type MarkerLayout = ChartLayout.MarkerLayout;
|
|
4
|
+
type Stroke = IStroke.JSON;
|
|
5
|
+
/**
|
|
6
|
+
* What every painter of a layout shares: fonts, strokes and markers as ECharts states them, and
|
|
7
|
+
* the `graphic` elements for text boxes, lines and up/down bars. Echarts is never imported here:
|
|
8
|
+
* these are plain objects an option carries.
|
|
9
|
+
*/
|
|
10
|
+
export declare const fontStyle: (font: Font) => Record<string, unknown>;
|
|
11
|
+
/** A run as a canvas font: `italic bold 13.33px Calibri`. */
|
|
12
|
+
export declare const fontOf: (font: Font, size?: number) => string;
|
|
13
|
+
/** A stroke as a `graphic` element's style states it. */
|
|
14
|
+
export declare const strokeStyle: (stroke: Stroke | null | undefined) => Record<string, unknown>;
|
|
15
|
+
/** A stroke as a series' `lineStyle` states it. */
|
|
16
|
+
export declare const lineStyle: (stroke: Stroke | null | undefined) => Record<string, unknown>;
|
|
17
|
+
/** Lines across a unit square: Excel's x, star and plus, drawn in the marker's outline color. */
|
|
18
|
+
export declare const MARKER_LINES: Readonly<Record<string, readonly [number, number, number, number][]>>;
|
|
19
|
+
/**
|
|
20
|
+
* How ECharts draws a marker of the layout's: its symbol, box and offset from the point. A marker's
|
|
21
|
+
* size is its box (measured, `probe-chart-markers.ps1`): a dash is that wide and a fifth of it tall,
|
|
22
|
+
* a dot half as wide, from the point to the right. A circle, square, dash and dot keep their outline
|
|
23
|
+
* inside the box, along a dot's height but not its width; the other symbols center it on the box.
|
|
24
|
+
* An x, star or plus is its lines; its fill, a square of the size with no outline, is
|
|
25
|
+
* {@link markerFill}'s.
|
|
26
|
+
*/
|
|
27
|
+
export declare const markerSymbol: (marker: MarkerLayout) => {
|
|
28
|
+
symbol: string;
|
|
29
|
+
symbolSize: number | [number, number];
|
|
30
|
+
symbolOffset?: [number, number];
|
|
31
|
+
};
|
|
32
|
+
/** The square under a filled x, star or plus, as Excel draws it; `null` for any other marker. */
|
|
33
|
+
export declare const markerFill: (marker: MarkerLayout | null) => IFill.JSON | null;
|
|
34
|
+
/** A marker of the layout's centered on (`cx`, `cy`), as `graphic` elements (a legend key's). */
|
|
35
|
+
export declare const markerGraphic: (marker: MarkerLayout, cx: number, cy: number, z: number) => any[];
|
|
36
|
+
/**
|
|
37
|
+
* A text box of the layout (an axis title, a data label) as `graphic` elements: its box, where it
|
|
38
|
+
* has a fill or a line, and its text centered in it, turned about the box's center.
|
|
39
|
+
*/
|
|
40
|
+
export declare const textGraphic: (text: ChartLayout.TextLayout, fill: IFill.JSON | null, border: Stroke | null, lineHeight?: number) => any[];
|
|
41
|
+
/** A group's lines (high-low, drop, series lines) as `graphic` lines over its series (z 3). */
|
|
42
|
+
export declare const linesGraphic: (lines: ChartLayout.LinesLayout | undefined) => any[];
|
|
43
|
+
/** A group's up/down bars as `graphic` rects over its series (z 3), as Excel draws them. */
|
|
44
|
+
export declare const upDownBarsGraphic: (upDown: ChartLayout.UpDownBarsLayout | undefined) => any[];
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=_graphics.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChartLayout } from '@sheetxl/sdk';
|
|
2
|
+
import { TranslateOptions } from './toEChartsOption';
|
|
3
|
+
import * as echarts from 'echarts/core';
|
|
4
|
+
/** Registers the renderer and the components, once. The series types come with the kinds. */
|
|
5
|
+
export declare function ensureRegistered(): void;
|
|
6
|
+
export type EChartsInstance = echarts.ECharts;
|
|
7
|
+
/**
|
|
8
|
+
* An ECharts instance with no DOM, sized at the layout, with the layout set. The caller
|
|
9
|
+
* disposes it. For tests that read ECharts' geometry; `renderChartToSVG` is the product.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createHeadlessChart(layout: ChartLayout, options?: TranslateOptions): EChartsInstance;
|
|
12
|
+
/**
|
|
13
|
+
* Paints the layout headless, as an SVG document string of the layout's size.
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderChartToSVG(layout: ChartLayout, options?: TranslateOptions): string;
|
|
16
|
+
/**
|
|
17
|
+
* A chart painted into an element. What is drawn is the layout's alone: a host that wants to know
|
|
18
|
+
* what is under the pointer asks the chart (`IChart.getElementAt`) with the layout it painted.
|
|
19
|
+
*/
|
|
20
|
+
export interface MountedChart {
|
|
21
|
+
/** Paints a new layout; a new size resizes the instance first. */
|
|
22
|
+
update(layout: ChartLayout): void;
|
|
23
|
+
dispose(): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Paints the layout into `host`, sized at the layout's px. The host is not measured: the frame
|
|
27
|
+
* scales it (DESIGN-CHART §5 "Size and zoom").
|
|
28
|
+
*/
|
|
29
|
+
export declare function mountChart(host: HTMLElement, layout: ChartLayout, options?: TranslateOptions): MountedChart;
|
|
30
|
+
//# sourceMappingURL=echarts.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { toEChartsOption, type TranslateOptions } from './toEChartsOption';
|
|
2
|
+
export { ChartPaintKinds, type ChartPaintKind } from './kinds/ChartPaintKind';
|
|
3
|
+
export type { MountedChart, EChartsInstance } from './echarts';
|
|
4
|
+
/** What the painter module exports. */
|
|
5
|
+
export type ChartPaintModule = typeof import('./echarts');
|
|
6
|
+
/**
|
|
7
|
+
* The painter. It carries ECharts, so nothing imports it statically: it loads the first time a
|
|
8
|
+
* chart is painted or rendered to SVG, or earlier when `LazyModules.prefetch` warms the lazy
|
|
9
|
+
* modules (DESIGN-CHART §7).
|
|
10
|
+
*/
|
|
11
|
+
export declare const ChartPaint: import('@sheetxl/utils').LazyModule<typeof import("./echarts")>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { ChartLayout, IFill, IStroke } from '@sheetxl/sdk';
|
|
2
|
+
import { Bounds } from '@sheetxl/utils';
|
|
3
|
+
/**
|
|
4
|
+
* How a kind of chart group is painted: the ECharts series and `graphic` elements for a group of
|
|
5
|
+
* the kind's layout, and the key its series show in the legend. The built-in kinds register
|
|
6
|
+
* through {@link ChartPaintKinds} the way a host's kind does; a custom group
|
|
7
|
+
* (`ChartLayout.CustomGroupLayout`) is painted by the kind registered under `custom:<its kind>`.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* The painter translates the layout and decides nothing (DESIGN-CHART §2): a kind reads where the
|
|
11
|
+
* layout put things, in px, and says how ECharts draws them. It is given the shared vocabulary as
|
|
12
|
+
* a {@link ChartPaintKind.Context}: fills and strokes as ECharts states them, markers, text boxes,
|
|
13
|
+
* and for a group on axes the grid indexes and how a series' data is placed on them.
|
|
14
|
+
*
|
|
15
|
+
* @beta
|
|
16
|
+
*/
|
|
17
|
+
export interface ChartPaintKind {
|
|
18
|
+
/** The layout group types the kind paints: `'bar'`, `'line'`..., or `custom:<kind>` for a custom group. */
|
|
19
|
+
readonly types: readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* The ECharts pieces the kind's series need (`echarts/charts`, `echarts/components`), registered
|
|
22
|
+
* with `echarts.use` before a chart with a group of the kind is first painted. A kind drawn as
|
|
23
|
+
* `graphic` elements alone needs none.
|
|
24
|
+
*/
|
|
25
|
+
modules?(): readonly unknown[];
|
|
26
|
+
/**
|
|
27
|
+
* Whether the kind's series sit on the grid's axes.
|
|
28
|
+
* @defaultValue the group names two axes
|
|
29
|
+
*/
|
|
30
|
+
readonly grid?: boolean;
|
|
31
|
+
/** Whether the group's categories run up a vertical axis (horizontal bars), which the grid is told. */
|
|
32
|
+
horizontal?(group: ChartLayout.GroupLayout): boolean;
|
|
33
|
+
/** The ECharts series for a group. */
|
|
34
|
+
series?(group: ChartLayout.GroupLayout, context: ChartPaintKind.Context): any[];
|
|
35
|
+
/** The `graphic` elements for a group, drawn with its series: a radar's spokes, an of-pie's bar. */
|
|
36
|
+
graphic?(group: ChartLayout.GroupLayout, context: ChartPaintKind.Context): any[];
|
|
37
|
+
/**
|
|
38
|
+
* The key a legend entry for one of the group's series shows, as `graphic` elements in `key`:
|
|
39
|
+
* a line's line and marker, a slice's colors. `undefined` for the default, a swatch of the
|
|
40
|
+
* series' fill and line.
|
|
41
|
+
*/
|
|
42
|
+
legendKey?(entry: ChartLayout.LegendEntryLayout, series: ChartLayout.SeriesLayout, group: ChartLayout.GroupLayout, key: Bounds, context: ChartPaintKind.Context): any[] | undefined;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace ChartPaintKind {
|
|
45
|
+
/** A group on the grid's axes: where its series go and how their data is placed. */
|
|
46
|
+
interface Cartesian {
|
|
47
|
+
xAxisIndex: number;
|
|
48
|
+
yAxisIndex: number;
|
|
49
|
+
/** Whether the value axis is logarithmic: nothing is drawn at zero or below. */
|
|
50
|
+
isLog: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* A series' data as ECharts places it: by category index, or on a date axis as `[slot, value]`
|
|
53
|
+
* pairs; a log axis's zero and negative values dropped.
|
|
54
|
+
*/
|
|
55
|
+
placed(series: ChartLayout.SeriesLayout, data: any[]): any[];
|
|
56
|
+
/** What every ECharts series of the group states: its id and name, axes, data and no emphasis. */
|
|
57
|
+
base(series: ChartLayout.SeriesLayout): Record<string, any>;
|
|
58
|
+
}
|
|
59
|
+
/** What a kind is given to paint a group. */
|
|
60
|
+
interface Context {
|
|
61
|
+
readonly layout: ChartLayout;
|
|
62
|
+
axisOf(id: number): ChartLayout.AxisLayout | undefined;
|
|
63
|
+
/** The grid a group's axes are on. */
|
|
64
|
+
cartesian(group: {
|
|
65
|
+
axisIds: number[];
|
|
66
|
+
}): Cartesian;
|
|
67
|
+
/** A fill as ECharts paints it; `none` for no fill. */
|
|
68
|
+
paint(fill: IFill.JSON | null | undefined, none?: string): any;
|
|
69
|
+
/** A stroke as a `graphic` element's style states it. */
|
|
70
|
+
stroke(stroke: IStroke.JSON | null | undefined): Record<string, unknown>;
|
|
71
|
+
/** A stroke as a series' `lineStyle` states it. */
|
|
72
|
+
line(stroke: IStroke.JSON | null | undefined): Record<string, unknown>;
|
|
73
|
+
/** A stroke's width in px, 0 for none. */
|
|
74
|
+
width(stroke: IStroke.JSON | null | undefined): number;
|
|
75
|
+
/** A series drawn as a line with its markers, straight or smooth, broken or not at a blank. */
|
|
76
|
+
lineSeries(series: ChartLayout.SeriesLayout, smooth: boolean, spanBlanks?: boolean): Record<string, any>;
|
|
77
|
+
/** `drawn` with, beneath it, the squares under the series' filled x, star or plus markers. */
|
|
78
|
+
withMarkerFills(series: ChartLayout.SeriesLayout, drawn: any): any[];
|
|
79
|
+
readonly marker: {
|
|
80
|
+
/** How ECharts draws a marker: its symbol, box and offset. */
|
|
81
|
+
symbol(marker: ChartLayout.MarkerLayout): {
|
|
82
|
+
symbol: string;
|
|
83
|
+
symbolSize: number | [number, number];
|
|
84
|
+
symbolOffset?: [number, number];
|
|
85
|
+
};
|
|
86
|
+
/** The square under a filled x, star or plus; `null` for any other marker. */
|
|
87
|
+
fill(marker: ChartLayout.MarkerLayout | null): IFill.JSON | null;
|
|
88
|
+
/** A marker centered on a point, as `graphic` elements. */
|
|
89
|
+
graphic(marker: ChartLayout.MarkerLayout, cx: number, cy: number, z: number): any[];
|
|
90
|
+
};
|
|
91
|
+
/** A text box of the layout as `graphic` elements. */
|
|
92
|
+
text(text: ChartLayout.TextLayout, fill: IFill.JSON | null, border: IStroke.JSON | null, lineHeight?: number): any[];
|
|
93
|
+
/** A group's lines (high-low, drop, series lines) as `graphic` lines. */
|
|
94
|
+
lines(lines: ChartLayout.LinesLayout | undefined): any[];
|
|
95
|
+
/** A group's up/down bars as `graphic` rects. */
|
|
96
|
+
upDownBars(bars: ChartLayout.UpDownBarsLayout | undefined): any[];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The painters of chart groups, by layout group type: the built-ins, and any a host registers.
|
|
101
|
+
*
|
|
102
|
+
* @remarks
|
|
103
|
+
* The built-ins register when a layout is first translated, so before that {@link get} answers
|
|
104
|
+
* `undefined` for `'bar'`; a host's kind registered under a built-in type keeps its place when they
|
|
105
|
+
* do. A registration is a call, never a side effect of an import.
|
|
106
|
+
*
|
|
107
|
+
* @beta
|
|
108
|
+
*/
|
|
109
|
+
export declare namespace ChartPaintKinds {
|
|
110
|
+
/**
|
|
111
|
+
* Registers a kind under each of its types, replacing any earlier registration of them.
|
|
112
|
+
*
|
|
113
|
+
* @returns A function that removes the registration.
|
|
114
|
+
*/
|
|
115
|
+
function register(kind: ChartPaintKind): () => void;
|
|
116
|
+
/** The kind registered under a layout group type, or `undefined`. */
|
|
117
|
+
function get(type: string): ChartPaintKind | undefined;
|
|
118
|
+
function has(type: string): boolean;
|
|
119
|
+
/** The registered types. */
|
|
120
|
+
function getTypes(): string[];
|
|
121
|
+
/** The type a layout group is registered under: its type, or `custom:<kind>` for a custom group. */
|
|
122
|
+
function typeOf(group: ChartLayout.GroupLayout): string;
|
|
123
|
+
/** The kind that paints `group`, or `undefined` when none is registered for it. */
|
|
124
|
+
function of(group: ChartLayout.GroupLayout): ChartPaintKind | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Registers the painter's own kinds, once, under the types no host has taken. The translation
|
|
127
|
+
* calls it before its first use.
|
|
128
|
+
* @hidden
|
|
129
|
+
*/
|
|
130
|
+
function registerBuiltIns(builtInKinds: (register: (kind: ChartPaintKind) => () => void) => void): void;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=ChartPaintKind.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartLayout } from '@sheetxl/sdk';
|
|
2
|
+
import { Bounds } from '@sheetxl/utils';
|
|
3
|
+
import { ChartPaintKind } from './ChartPaintKind';
|
|
4
|
+
/**
|
|
5
|
+
* A line key: the series' line across the key, with its marker on the middle when it has one
|
|
6
|
+
* (Excel's picture of a scatter's legend; a marker-only series shows the marker alone).
|
|
7
|
+
*/
|
|
8
|
+
export declare const lineLegendKey: (series: ChartLayout.SeriesLayout, key: Bounds, context: ChartPaintKind.Context) => any[];
|
|
9
|
+
export declare const LinePaint: ChartPaintKind;
|
|
10
|
+
//# sourceMappingURL=_Line.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChartLayout } from '@sheetxl/sdk';
|
|
2
|
+
import { Bounds, Point } from '@sheetxl/utils';
|
|
3
|
+
import { ChartPaintKind } from './ChartPaintKind';
|
|
4
|
+
type SliceLayout = ChartLayout.SliceLayout;
|
|
5
|
+
/** A slice and the name its tooltip gives it. */
|
|
6
|
+
export interface NamedSlice {
|
|
7
|
+
slice: SliceLayout;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Slices that go round a pie at `center` as ECharts pies, its ring from `inner` to `outer`. Each
|
|
12
|
+
* slice's value is its span in degrees, so ECharts' share of 360 puts every edge where the layout
|
|
13
|
+
* did. An exploded slice has a center of its own, which a pie series cannot give one slice, so it
|
|
14
|
+
* is drawn by a pie of its own at that center, the rest of that pie's ring left transparent.
|
|
15
|
+
*/
|
|
16
|
+
export declare const piesOf: (id: string, name: string, center: Point, inner: number, outer: number, slices: NamedSlice[], context: ChartPaintKind.Context) => any[];
|
|
17
|
+
/** A swatch of a fill and a line in the key, as a legend entry for one point shows its colors. */
|
|
18
|
+
export declare const swatchKey: (fill: ChartLayout.SliceLayout["fill"] | undefined, stroke: ChartLayout.SliceLayout["stroke"] | null | undefined, key: Bounds, context: ChartPaintKind.Context) => any[];
|
|
19
|
+
export declare const PiePaint: ChartPaintKind;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=_Pie.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartPaintKind } from './ChartPaintKind';
|
|
2
|
+
/**
|
|
3
|
+
* A region map, painted as its layout's placeholder: the label in the plot saying the type is not
|
|
4
|
+
* drawn, and nothing else of the group. A host may register a painter of its own under the type.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PlaceholderPaint: ChartPaintKind;
|
|
7
|
+
//# sourceMappingURL=_Placeholder.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChartPaintKind } from './ChartPaintKind';
|
|
2
|
+
/**
|
|
3
|
+
* Registers the painters the package ships, through the same door a host's kind comes in by.
|
|
4
|
+
* Called by the translation before its first use.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The built-ins name no ECharts modules of their own: `echarts.ts`, the lazy painter, brings the
|
|
8
|
+
* series types they use when it registers ECharts' pieces, so this module and the kinds stay free
|
|
9
|
+
* of ECharts and the package index stays light (DESIGN-CHART §7).
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerBuiltInPaintKinds(register: (kind: ChartPaintKind) => () => void): void;
|
|
12
|
+
//# sourceMappingURL=_builtIns.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EChartsCoreOption } from 'echarts/core';
|
|
2
|
+
import { ChartLayout } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* How the layout is translated.
|
|
5
|
+
*/
|
|
6
|
+
export interface TranslateOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the chart answers the pointer: tooltips. Off when rendering headless.
|
|
9
|
+
* @defaultValue true
|
|
10
|
+
*/
|
|
11
|
+
interactive?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* How the legend is drawn: by ECharts' `legend` component placed at the layout's rect, which
|
|
14
|
+
* flows the entries itself, or as `graphic` elements at exactly the layout's entry rects.
|
|
15
|
+
* @defaultValue 'graphic'
|
|
16
|
+
*/
|
|
17
|
+
legend?: 'native' | 'graphic';
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Translates a {@link ChartLayout} to an ECharts option.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* A translation table and nothing else (DESIGN-CHART §2): the grid is the plot rect in px with
|
|
24
|
+
* `containLabel:false`; value axes get `min`, `max` and `interval` and a formatter that answers
|
|
25
|
+
* the layout's strings; bars get `barWidth` in px and `barGap` from the overlap; every DrawingML
|
|
26
|
+
* axis is an ECharts axis, a deleted one with `show:false`. Nothing is left for ECharts to decide.
|
|
27
|
+
*/
|
|
28
|
+
export declare function toEChartsOption(layout: ChartLayout, options?: TranslateOptions): EChartsCoreOption;
|
|
29
|
+
/** A concrete color for ECharts: it parses colors, so a CSS variable would not do. */
|
|
30
|
+
export declare const isConcreteColor: (color: string) => boolean;
|
|
31
|
+
//# sourceMappingURL=toEChartsOption.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditModeHandler, ReferenceableClipboard, RemoveListener } from '@sheetxl/utils';
|
|
2
|
-
import { ICellRange,
|
|
2
|
+
import { ICellRange, IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
4
4
|
export interface SheetPasteOptions extends ReferenceableClipboard.PasteOptions, ICellRange.CopyOptions {
|
|
5
5
|
}
|
|
@@ -57,11 +57,11 @@ export interface ContributeClipboardCommandsOptions {
|
|
|
57
57
|
*
|
|
58
58
|
* **Standalone:** this module owns *everything* about its commands — definitions, behavior, enablement
|
|
59
59
|
* (protection-disable), and the marquee view — with **no dependency on SheetCommands** (it reads only the
|
|
60
|
-
* generic `
|
|
60
|
+
* generic `IWorksheet` model). It's the shape a third-party clipboard would take: sheet knows nothing about it.
|
|
61
61
|
*/
|
|
62
62
|
/** The single `data` bundle {@link contributeClipboardCommands} takes (the `DynamicCommandContributor` shape). */
|
|
63
63
|
export interface ClipboardCommandData extends ContributeClipboardCommandsOptions {
|
|
64
|
-
sheet:
|
|
64
|
+
sheet: IWorksheet;
|
|
65
65
|
}
|
|
66
66
|
export declare function contributeClipboardCommands(contribution: Command.CommandContribution, data: ClipboardCommandData): RemoveListener;
|
|
67
67
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
4
|
export interface SheetClipboardLayerProps extends LayerProps {
|
|
5
|
-
sheet:
|
|
5
|
+
sheet: IWorksheet;
|
|
6
6
|
/** Class for the marquee visuals (devtools identification). */
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CellCoords } from '@sheetxl/utils';
|
|
2
|
-
import { IComment,
|
|
2
|
+
import { IComment, IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
/**
|
|
4
4
|
* What a comments task pane is asked to open on — `activateTaskPane('comments', { args })`.
|
|
5
5
|
*/
|
|
@@ -18,7 +18,7 @@ export interface CommentsPaneArgs {
|
|
|
18
18
|
*/
|
|
19
19
|
export interface CommentCardRenderProps {
|
|
20
20
|
/** The sheet the card's cell is on. */
|
|
21
|
-
sheet:
|
|
21
|
+
sheet: IWorksheet;
|
|
22
22
|
/** The cell the card belongs to. */
|
|
23
23
|
coords: CellCoords;
|
|
24
24
|
/** The thread on the cell, or `null` for a draft: a comment that has not been posted. */
|
|
@@ -60,25 +60,25 @@ export interface RequestCommentCardOptions {
|
|
|
60
60
|
* request is {@link clearCommentCard | cleared}, which the layer drawing it does when the selection
|
|
61
61
|
* leaves the cell. A draft writes nothing until it is posted.
|
|
62
62
|
*/
|
|
63
|
-
export declare const requestCommentCard: (sheet:
|
|
63
|
+
export declare const requestCommentCard: (sheet: IWorksheet, coords: CellCoords, options?: RequestCommentCardOptions) => void;
|
|
64
64
|
/**
|
|
65
65
|
* Takes back a {@link requestCommentCard | request}; a draft that was not posted is dropped.
|
|
66
66
|
*/
|
|
67
|
-
export declare const clearCommentCard: (sheet:
|
|
67
|
+
export declare const clearCommentCard: (sheet: IWorksheet) => void;
|
|
68
68
|
/**
|
|
69
69
|
* The cell whose card is asked for on the sheet, or `null` for none.
|
|
70
70
|
*/
|
|
71
|
-
export declare const getCommentCardRequest: (sheet:
|
|
71
|
+
export declare const getCommentCardRequest: (sheet: IWorksheet) => CommentCardRequest | null;
|
|
72
72
|
/**
|
|
73
73
|
* Whether anything draws the sheet's comment cards. A command falls back to the comments task pane
|
|
74
74
|
* when nothing does.
|
|
75
75
|
*/
|
|
76
|
-
export declare const hasCommentCard: (sheet:
|
|
76
|
+
export declare const hasCommentCard: (sheet: IWorksheet) => boolean;
|
|
77
77
|
/**
|
|
78
78
|
* Listens for the sheet's card request changing. Whatever draws the cards listens; the returned
|
|
79
79
|
* function stops listening.
|
|
80
80
|
*/
|
|
81
|
-
export declare const addCommentCardListener: (sheet:
|
|
81
|
+
export declare const addCommentCardListener: (sheet: IWorksheet, listener: () => void) => (() => void);
|
|
82
82
|
/**
|
|
83
83
|
* The cell a draft is open on: a requested card whose cell has no comment yet. `null` for none.
|
|
84
84
|
*
|
|
@@ -86,9 +86,9 @@ export declare const addCommentCardListener: (sheet: ISheet, listener: () => voi
|
|
|
86
86
|
* For what marks the cell while its comment is being written. Following this does not count as
|
|
87
87
|
* drawing the cards, so {@link hasCommentCard} is unchanged by it.
|
|
88
88
|
*/
|
|
89
|
-
export declare const useCommentDraftCell: (sheet:
|
|
89
|
+
export declare const useCommentDraftCell: (sheet: IWorksheet) => CommentCardRequest | null;
|
|
90
90
|
/**
|
|
91
91
|
* {@link getCommentCardRequest}, kept current.
|
|
92
92
|
*/
|
|
93
|
-
export declare const useCommentCardRequest: (sheet:
|
|
93
|
+
export declare const useCommentCardRequest: (sheet: IWorksheet) => CommentCardRequest | null;
|
|
94
94
|
//# sourceMappingURL=CommentCardRequest.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IComment,
|
|
1
|
+
import { IComment, IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Options for {@link useSheetComments}.
|
|
4
4
|
*/
|
|
@@ -24,5 +24,5 @@ export interface UseSheetCommentsOptions {
|
|
|
24
24
|
* return <ul>{open.map((comment) => <li key={comment.getId()}>{comment.getContent()}</li>)}</ul>;
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export declare const useSheetComments: (sheet:
|
|
27
|
+
export declare const useSheetComments: (sheet: IWorksheet | null, options?: UseSheetCommentsOptions) => IComment[];
|
|
28
28
|
//# sourceMappingURL=useSheetComments.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
export type WorksheetProviderProps = {
|
|
4
|
+
sheet: IWorksheet | null;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Provides a sheet to descendants.
|
|
9
|
+
*
|
|
10
|
+
* Notes:
|
|
11
|
+
* - Prefer passing the sheet object as a stable reference from the host.
|
|
12
|
+
*/
|
|
13
|
+
export declare function WorksheetProvider(props: WorksheetProviderProps): React.JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Hook consumers call to access the current sheet.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useWorksheet(): IWorksheet | null;
|
|
18
|
+
//# sourceMappingURL=WorksheetContext.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command } from '@sheetxl/utils-react';
|
|
4
4
|
import { IEditable, EditorMode, EditorTextSelection } from '@sheetxl/grid-react';
|
|
5
5
|
/**
|
|
@@ -52,7 +52,7 @@ export declare function insertEditText(editable: IEditable<any, any, any>, text:
|
|
|
52
52
|
/** The single `data` bundle {@link contributeInsertCommands} takes (the `DynamicCommandContributor` shape). */
|
|
53
53
|
export interface InsertCommandData {
|
|
54
54
|
editable: IEditable<any, any, any>;
|
|
55
|
-
sheet:
|
|
55
|
+
sheet: IWorksheet;
|
|
56
56
|
/** `'startEdit'` begins an edit (the sheet's version when NOT editing); `'caret'` inserts at the focused editor's caret. */
|
|
57
57
|
flavor: InsertFlavor;
|
|
58
58
|
}
|
|
@@ -86,7 +86,7 @@ export declare function contributeWhileEditingCommands(contribution: Command.Com
|
|
|
86
86
|
/** The single `data` bundle {@link contributeEditorCommands} takes (the `DynamicCommandContributor` shape). */
|
|
87
87
|
export interface EditorCommandData {
|
|
88
88
|
editable: IEditable<any, any, any>;
|
|
89
|
-
sheet:
|
|
89
|
+
sheet: IWorksheet;
|
|
90
90
|
/**
|
|
91
91
|
* Contribute the edit-session commands only while an edit is **active** (a session exists). An idle editor
|
|
92
92
|
* owns no F4 / no caret overrides, so they cede to `redo` / the sheet's begin-edit flavor. The host passes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { EditorAlignment, VirtualDivProps } from '@sheetxl/grid-react';
|
|
4
4
|
import { SheetEditable } from './SheetEditable';
|
|
5
5
|
/**
|
|
@@ -14,7 +14,7 @@ export interface SheetCellEditorLayerProps extends VirtualDivProps {
|
|
|
14
14
|
*/
|
|
15
15
|
zIndex?: number;
|
|
16
16
|
/** The sheet — its selection drives the input's leave-key nav, its active cell the edit-session commands. */
|
|
17
|
-
sheet:
|
|
17
|
+
sheet: IWorksheet;
|
|
18
18
|
/** The editable (UI model) — anchor + the single current edit. Shared with peers (the formula bar). */
|
|
19
19
|
editable: SheetEditable;
|
|
20
20
|
/**
|