@sheetxl/react 0.8.0-beta.17 → 0.8.0-beta.19
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/{9YeNE9FbgAbj-kFJ.mjs → 0i5npOCRbbj7n8AX.mjs} +1 -1
- package/browser/esm/{BxmM4_1EU7z1fS8J.mjs → 6KVLDn6fk3Lwk3W0.mjs} +6 -6
- package/browser/esm/{B7yfrZvX62qlpS-V.mjs → BFBIk0dXMPBtSHGB.mjs} +1 -1
- package/browser/esm/{-mdWrNwKPMBQbhpW.mjs → BMZ6O7J3XnUMlQJ5.mjs} +2 -2
- package/browser/esm/{B9r44M1lVTxnLqBb.mjs → BMl3t5nAS8wea8ia.mjs} +1 -1
- package/browser/esm/{B0tm14veV7VbqCXF.mjs → BR8he3r4FlfNbM5Y.mjs} +1 -1
- package/browser/esm/{NUXuZQHZmiYexulZ.mjs → BWCG8Jc6oF3jzfFk.mjs} +5 -5
- package/browser/esm/{BzLeA0HlYOPeNbAo.mjs → B_PNL36bd0h74iJo.mjs} +4 -4
- package/browser/esm/{CmDfYf-7BEMQKyqH.mjs → BcTcL2e5NjgL1j-k.mjs} +1 -1
- package/browser/esm/{Dm5_yXkbckf2odQK.mjs → BiyB416KncWj7-2t.mjs} +3 -3
- package/browser/esm/BpEap6qV7SAhbiMg.mjs +78 -0
- package/browser/esm/{Ip8RHzHhXWuXTW8Z.mjs → By-Xfu2c6LLIWg-G.mjs} +6 -6
- package/browser/esm/{DQ7lWEbxzkSksQvK.mjs → C8CBCqCUydGXhIco.mjs} +2 -2
- package/browser/esm/{qmxmy7tirF1as3Xs.mjs → CEIulpO2M6bY6Hgq.mjs} +1 -1
- package/browser/esm/{Z57bAJBcfLMsZG74.mjs → CJxA4mQkgsRg8ejK.mjs} +3 -3
- package/browser/esm/{DmIj68EaqzbpmhGu.mjs → CSsytd3vgnhi7AMm.mjs} +1 -1
- package/browser/esm/CTFVB5vQl5dFo1zd.mjs +14092 -0
- package/browser/esm/{CWZ7Dx5SBWu4aU9Z.mjs → C_OaCmryR0Nc4vfH.mjs} +1 -1
- package/browser/esm/{CYEzd5w4p9LRScYN.mjs → D7Kvnl4-FdEGuadk.mjs} +1 -1
- package/browser/esm/{BeVkpREgRD5DVvqq.mjs → DOuAxKNRVl3p4oUg.mjs} +1 -1
- package/browser/esm/{B1rrVGz1PwKbTLA2.mjs → DZT2k-wAR3bBFQhh.mjs} +1 -1
- package/browser/esm/{CNv5ABj97zChkI-j.mjs → Dce_lDRjVEpn-4Gj.mjs} +1 -1
- package/browser/esm/DrYGRymc8k3JZBZu.mjs +9560 -0
- package/browser/esm/{E7Yhe921O7ju1JLF.mjs → cKu0KgwuR2qIeUnu.mjs} +1 -1
- package/browser/esm/chart.mjs +3 -3
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +5741 -3965
- package/browser/esm/note.mjs +4 -4
- package/browser/esm/picture.mjs +2 -2
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +4 -4
- package/browser/esm/{DcFFrmHW4tX2q1az.mjs → wr_Q6qSI16PKN4hz.mjs} +3 -3
- package/licenses/dependencies.txt +347 -347
- package/node/esm/{C8lBxk7g8FU777JZ.mjs → 365x7ulQ-64LrEAY.mjs} +2 -2
- package/node/esm/{DrGBVKfXN46SccPc.mjs → 5NC4KAa0mRhqju4E.mjs} +1 -1
- package/node/esm/{D4wcZkeFJ9g3E1Wx.mjs → 7F9gtINd9IcYvclT.mjs} +1 -1
- package/node/esm/{D6T6RsUdqj-dsOrE.mjs → 9PkyqxxZGq4LpuXf.mjs} +1 -1
- package/node/esm/{BPEE8SA9ZAebcfZs.mjs → B7NgL3l0XJbyq9CG.mjs} +1 -1
- package/node/esm/{roCYJ0G69HBpAkf3.mjs → BdEX-Y0ROOf8zRce.mjs} +4 -4
- package/node/esm/{B-M8LEF1gQC4VTti.mjs → C9l2nKVgsffhreTD.mjs} +1 -1
- package/node/esm/CAbud00Api3zYMB0.mjs +80 -0
- package/node/esm/{CXe6zO8r3qcKa8eD.mjs → CRM_BM8JnHgH5kni.mjs} +1 -1
- package/node/esm/{DSA6_IsV7Vneo5Za.mjs → C_E-6lqeDHYSKGcS.mjs} +5 -5
- package/node/esm/{Cp8J0CabzCF6tfAx.mjs → CyNcgbrqDcBpNJ-N.mjs} +2 -2
- package/node/esm/{SRhq2ObYt2tWPLDG.mjs → D2fA8lJO1ZAm7rTz.mjs} +1 -1
- package/node/esm/{DQ7xw--8XAi5NYEh.mjs → D5tl-HceFOKuhUPG.mjs} +2 -2
- package/node/esm/{DdXBknb60h6u7ljS.mjs → D7jDl04btyfWjg7U.mjs} +1 -1
- package/node/esm/{BXwXN7P_JyLZbQ1F.mjs → D8MLM0vKRTMxDGC6.mjs} +1 -1
- package/node/esm/{BzAvJXwmJZ2aBZff.mjs → DQkjdt-an36XKGvV.mjs} +1 -1
- package/node/esm/{BN9TsBId0PUOF3YQ.mjs → Dg4ph4wH0DWRbx7E.mjs} +1 -1
- package/node/esm/{D1o8P8Vu5yBBWDkw.mjs → Dx0Dz6NG76-IKZ1i.mjs} +2 -2
- package/node/esm/{BLyZ6mSICbKNrNXK.mjs → UbxFnWpUxT3TQSUA.mjs} +1 -1
- package/node/esm/chart.mjs +2 -2
- package/node/esm/control.mjs +2 -2
- package/node/esm/{arYXYwcOVpS7tQUp.mjs → gqpfUtQ8Q1y4j0w3.mjs} +1 -1
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +8700 -6907
- package/node/esm/note.mjs +4 -4
- package/node/esm/picture.mjs +5 -5
- package/node/esm/shape.mjs +6 -6
- package/node/esm/{DOmvQX0Ox-3oN9aN.mjs → skitA3Vys5WjKQnm.mjs} +1 -1
- package/node/esm/slicer.mjs +4 -4
- package/package.json +7 -7
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/pivot.cmd.json +1 -1
- package/resources/locales/de/sheet.cmd.json +46 -5
- package/resources/locales/de/sparkline.cmd.json +301 -0
- package/resources/locales/de/ui.msg.json +37 -0
- package/resources/locales/de/workbook.cmd.json +0 -5
- package/resources/locales/en/pivot.cmd.json +1 -1
- package/resources/locales/en/sheet.cmd.json +46 -5
- package/resources/locales/en/sparkline.cmd.json +301 -0
- package/resources/locales/en/ui.msg.json +37 -0
- package/resources/locales/en/workbook.cmd.json +0 -5
- package/types/src/annotation/RangeAnnotationLayer.d.ts +110 -0
- package/types/src/annotation/RangeAnnotationTag.d.ts +23 -0
- package/types/src/annotation/RangeAnnotations.d.ts +67 -6
- package/types/src/annotation/index.d.ts +2 -0
- package/types/src/editor/VirtualKeyboardLayer.d.ts +2 -1
- package/types/src/frame/CommandContext.d.ts +16 -1
- package/types/src/index.d.ts +3 -3
- package/types/src/layer/CommentCardLayer.d.ts +1 -1
- package/types/src/layer/SheetLayers.d.ts +57 -1
- package/types/src/layer/SheetSparklineCommandLayer.d.ts +14 -0
- package/types/src/layer/SparklineLayer.d.ts +32 -0
- package/types/src/layer/index.d.ts +2 -1
- package/types/src/movable/MovableCommandGroups.d.ts +0 -18
- package/types/src/pivot/PivotTablePane.d.ts +0 -2
- package/types/src/presence/PresenceCommands.d.ts +35 -0
- package/types/src/presence/PresenceHost.d.ts +58 -0
- package/types/src/presence/PresenceMessages.d.ts +42 -0
- package/types/src/presence/PresenceStore.d.ts +165 -0
- package/types/src/presence/PresenceTypes.d.ts +78 -0
- package/types/src/presence/index.d.ts +7 -0
- package/types/src/presence/usePresence.d.ts +20 -0
- package/types/src/sparkline/PictureCache.d.ts +37 -0
- package/types/src/sparkline/SparklineCommands.d.ts +23 -0
- package/types/src/sparkline/SparklinePictures.d.ts +7 -0
- package/types/src/sparkline/paint/_drawing.d.ts +24 -0
- package/types/src/sparkline/paint/echarts.d.ts +8 -0
- package/types/src/sparkline/paint/index.d.ts +8 -0
- package/types/src/taskPane/CellControlPane.d.ts +0 -2
- package/types/src/taskPane/MovablePane.d.ts +0 -2
- package/types/src/taskPane/TaskPaneFrame.d.ts +4 -4
- package/types/src/taskPane/TaskPaneKeys.d.ts +38 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts +32 -12
- package/types/src/taskPane/_paneReasons.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/theme/ThemeState.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/workbook/IWorkbookElement.d.ts +3 -1
- package/types/src/workbook/WorkbookCommands.d.ts +6 -1
- package/browser/esm/CWwumtsC8-1gwMAu.mjs +0 -23561
- package/types/src/layer/RangeAnnotationLayer.d.ts +0 -71
|
@@ -51,8 +51,9 @@ export interface AddRangeAnnotationsOptions {
|
|
|
51
51
|
/** Who is adding (an agent session). Carried onto each annotation as `source`. */
|
|
52
52
|
source?: string;
|
|
53
53
|
/**
|
|
54
|
-
* Drop the
|
|
55
|
-
* next call).
|
|
54
|
+
* Drop the existing annotations of this intent from the same {@link source} first (a cursor that is
|
|
55
|
+
* replaced by the next call). Annotations from other sources stay; a write with no source replaces
|
|
56
|
+
* only others with no source. @defaultValue `true` for `working`, else `false`
|
|
56
57
|
*/
|
|
57
58
|
replace?: boolean;
|
|
58
59
|
}
|
|
@@ -66,14 +67,61 @@ export interface RangeAnnotationState {
|
|
|
66
67
|
current: RangeAnnotation | null;
|
|
67
68
|
/** 1-based position of {@link current} in {@link navigable}; `0` for none. */
|
|
68
69
|
position: number;
|
|
70
|
+
/**
|
|
71
|
+
* The annotation under the pointer — on the grid or in a list that shows the same annotations — or
|
|
72
|
+
* `null`. Both views read it, so pointing at one side lights the other. Transient; never a
|
|
73
|
+
* `stale` annotation.
|
|
74
|
+
*/
|
|
75
|
+
hovered: RangeAnnotation | null;
|
|
69
76
|
/** Bumps on every change. */
|
|
70
77
|
version: number;
|
|
71
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* What changed, handed to {@link addRangeAnnotationListener} listeners. One event per change.
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* A writer that has to hear how the user dealt with its annotations reads `dismissed` and `cleared`
|
|
84
|
+
* rather than wrapping every way of dismissing: the tag, a list, a command and a clear all arrive the
|
|
85
|
+
* same way. Each event carries the annotations as they were when it happened.
|
|
86
|
+
*/
|
|
87
|
+
export type RangeAnnotationEvent =
|
|
88
|
+
/** One call's walk. `replaced` is what its `replace` dropped first (empty when it dropped nothing). */
|
|
89
|
+
{
|
|
90
|
+
type: 'added';
|
|
91
|
+
annotations: readonly RangeAnnotation[];
|
|
92
|
+
replaced: readonly RangeAnnotation[];
|
|
93
|
+
}
|
|
94
|
+
/** One annotation, through {@link dismissRangeAnnotation}. */
|
|
95
|
+
| {
|
|
96
|
+
type: 'dismissed';
|
|
97
|
+
annotation: RangeAnnotation;
|
|
98
|
+
}
|
|
99
|
+
/** Those removed by one {@link clearRangeAnnotations}. */
|
|
100
|
+
| {
|
|
101
|
+
type: 'cleared';
|
|
102
|
+
annotations: readonly RangeAnnotation[];
|
|
103
|
+
}
|
|
104
|
+
/** The navigator moved: the new current annotation, or `null` when the cursor was cleared. */
|
|
105
|
+
| {
|
|
106
|
+
type: 'current';
|
|
107
|
+
annotation: RangeAnnotation | null;
|
|
108
|
+
}
|
|
109
|
+
/** The annotation under the pointer, or `null`. */
|
|
110
|
+
| {
|
|
111
|
+
type: 'hovered';
|
|
112
|
+
annotation: RangeAnnotation | null;
|
|
113
|
+
}
|
|
114
|
+
/** An annotation's cells moved, or it went stale or came back. */
|
|
115
|
+
| {
|
|
116
|
+
type: 'moved';
|
|
117
|
+
annotation: RangeAnnotation;
|
|
118
|
+
};
|
|
72
119
|
/** Whether the navigator walks this intent. */
|
|
73
120
|
export declare const isWalkedIntent: (intent: RangeAnnotationIntent) => boolean;
|
|
74
121
|
/**
|
|
75
122
|
* Annotate ranges: one call = one **walk**, in the caller's order. The annotations follow their cells
|
|
76
|
-
* through edits and stay until dismissed (a `working` cursor is replaced by the next `working` call
|
|
123
|
+
* through edits and stay until dismissed (a `working` cursor is replaced by the next `working` call
|
|
124
|
+
* from the same source).
|
|
77
125
|
*
|
|
78
126
|
* @returns The annotations created, in order (empty for a clear).
|
|
79
127
|
*/
|
|
@@ -100,9 +148,19 @@ export declare const clearRangeAnnotations: (workbook: IWorkbook, filter?: {
|
|
|
100
148
|
export declare const revealRangeAnnotation: (workbook: IWorkbook, id: string) => Promise<void>;
|
|
101
149
|
/**
|
|
102
150
|
* Make an annotation the navigator's current one and reveal it. A stale, `working` or unknown id does
|
|
103
|
-
* nothing. `null` clears the cursor
|
|
151
|
+
* nothing. `null` clears the cursor; {@link nextRangeAnnotation} and {@link prevRangeAnnotation} then walk on
|
|
152
|
+
* from the annotation that was current.
|
|
104
153
|
*/
|
|
105
154
|
export declare const goToRangeAnnotation: (workbook: IWorkbook, id: string | null) => void;
|
|
155
|
+
/**
|
|
156
|
+
* Mark an annotation as the one under the pointer, or `null` for none. Views that show the same
|
|
157
|
+
* annotations (the grid's tags, a host's list) read {@link RangeAnnotationState.hovered} so that
|
|
158
|
+
* pointing at one lights the other. A pointer leaving should pass the id it entered with through
|
|
159
|
+
* {@link unhoverRangeAnnotation}, so a leave that arrives after the next enter does not clear it.
|
|
160
|
+
*/
|
|
161
|
+
export declare const hoverRangeAnnotation: (workbook: IWorkbook, id: string | null) => void;
|
|
162
|
+
/** Clear the hover, but only while `id` is still the hovered one. */
|
|
163
|
+
export declare const unhoverRangeAnnotation: (workbook: IWorkbook, id: string) => void;
|
|
106
164
|
/**
|
|
107
165
|
* Move to the next walked annotation (wrapping) and reveal it.
|
|
108
166
|
*
|
|
@@ -112,8 +170,11 @@ export declare const goToRangeAnnotation: (workbook: IWorkbook, id: string | nul
|
|
|
112
170
|
export declare const nextRangeAnnotation: (workbook: IWorkbook, fromId?: string) => void;
|
|
113
171
|
/** Move to the previous walked annotation (wrapping) and reveal it. See {@link nextRangeAnnotation}. */
|
|
114
172
|
export declare const prevRangeAnnotation: (workbook: IWorkbook, fromId?: string) => void;
|
|
115
|
-
/**
|
|
116
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Listen for the workbook's annotations changing: once per change, told what changed. The returned
|
|
175
|
+
* function stops listening.
|
|
176
|
+
*/
|
|
177
|
+
export declare const addRangeAnnotationListener: (workbook: IWorkbook, listener: (event: RangeAnnotationEvent) => void) => (() => void);
|
|
117
178
|
/** {@link getRangeAnnotationState}, kept current. `null` workbook ⇒ the empty state. */
|
|
118
179
|
export declare const useRangeAnnotations: (workbook: IWorkbook | null) => RangeAnnotationState;
|
|
119
180
|
//# sourceMappingURL=RangeAnnotations.d.ts.map
|
|
@@ -35,7 +35,8 @@ export interface VirtualKeyboardLayerProps {
|
|
|
35
35
|
* focuses the pane, raising the keyboard.
|
|
36
36
|
* - **Done.** Taking a way out of the edit from chrome (the status bar's ✓ / ✕, see `exitEditMode`)
|
|
37
37
|
* leaves keyboard mode before the edit ends, so the focus returning to the grid lowers it.
|
|
38
|
-
* - **The active cell stays in view.** When the keyboard takes room from the grid,
|
|
38
|
+
* - **The active cell stays in view.** When the keyboard takes room from the grid, or a
|
|
39
|
+
* `KeyboardAccessory` (the formula bar riding the keyboard) settles over the active cell, the cell is
|
|
39
40
|
* scrolled back into view (unless the store's `disableScrollIntoView`).
|
|
40
41
|
*
|
|
41
42
|
* Mount it directly above the start layer, so a key typed into the input reaches the start layer's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRange, ICell, ICellRanges, ICellRange, IColor, ITable, INamedCollection, IStyleCollection, ICellStyle, IBorders, ITheme, IThemeCollection, IFunction, IFunctionCollection, IWorkbook, ISlicer, IChart, IPivotTable } from '@sheetxl/sdk';
|
|
1
|
+
import { IRange, ICell, ICellRanges, ICellRange, IColor, ITable, INamedCollection, IStyleCollection, ICellStyle, IBorders, ITheme, IThemeCollection, IFunction, IFunctionCollection, IWorkbook, ISlicer, IChart, IPivotTable, ISparklineGroup } from '@sheetxl/sdk';
|
|
2
2
|
import { PivotFieldsModel } from '../pivot/PivotFieldsModel';
|
|
3
3
|
/**
|
|
4
4
|
* For providing Adjustable Color Commands additional rendering capabilities.
|
|
@@ -134,6 +134,21 @@ export interface NewTable {
|
|
|
134
134
|
/** The table's name. When omitted the next free default name is used. */
|
|
135
135
|
name?: string;
|
|
136
136
|
}
|
|
137
|
+
/** What the Create Sparklines dialog makes, as `ICellRange.setSparkline` takes it. */
|
|
138
|
+
export interface NewSparklines {
|
|
139
|
+
/** The cells the sparklines draw: one area, on any sheet. */
|
|
140
|
+
data: ICellRanges | null;
|
|
141
|
+
/** The cells they draw in: one cell, or one row or one column of cells. */
|
|
142
|
+
location: ICellRanges | null;
|
|
143
|
+
type: ISparklineGroup.Type;
|
|
144
|
+
}
|
|
145
|
+
/** What the Edit Sparklines dialog changes, as `ISparklineGroup.setRanges` takes it. */
|
|
146
|
+
export interface EditSparklines {
|
|
147
|
+
/** The cells the sparklines draw: one or more areas, as `ISparklineGroup.getData` spells them. */
|
|
148
|
+
data: ICellRanges | string | null;
|
|
149
|
+
/** The cells they draw in: one or more areas, each a cell, a row or a column of cells. */
|
|
150
|
+
location: ICellRanges | null;
|
|
151
|
+
}
|
|
137
152
|
/** What the New PivotTable dialog makes, as `IPivotTableCollection.add` takes it. */
|
|
138
153
|
export interface NewPivotTable {
|
|
139
154
|
/** The cells to summarize: one range, or a table's or defined name's name. */
|
package/types/src/index.d.ts
CHANGED
|
@@ -5,12 +5,13 @@ export * from './editor';
|
|
|
5
5
|
export * from './selection';
|
|
6
6
|
export * from './border';
|
|
7
7
|
export * from './sheet';
|
|
8
|
+
export * from './annotation';
|
|
9
|
+
export * from './presence';
|
|
8
10
|
export * from './picture';
|
|
9
11
|
export * from './slicer';
|
|
10
12
|
export * from './shape';
|
|
11
13
|
export * from './chart';
|
|
12
14
|
export * from './comment';
|
|
13
|
-
export * from './annotation';
|
|
14
15
|
export * from './richText';
|
|
15
16
|
export * from './movable';
|
|
16
17
|
export * from './form';
|
|
@@ -18,8 +19,7 @@ export * from './editableLabel';
|
|
|
18
19
|
export * from './tabStrip';
|
|
19
20
|
export * from './icons';
|
|
20
21
|
export * from './layer/ConditionalIcons';
|
|
21
|
-
export { SheetLayers, useGridSurface, type SheetLayersProps, type SheetLayersFilter, type SheetSurface } from './layer/SheetLayers';
|
|
22
|
-
export * from './layer/RangeAnnotationLayer';
|
|
22
|
+
export { SheetLayers, DefaultSheetLayersRegistry, useGridSurface, type SheetLayersProps, type SheetLayersFilter, type SheetSurface, type SheetLayersEntry, type ISheetLayersRegistry } from './layer/SheetLayers';
|
|
23
23
|
export * from './layer/CellInsertLayer';
|
|
24
24
|
export * from './layer/HyperlinkLayer';
|
|
25
25
|
export type { RangeToolbarRenderProps } from './layer/RangeToolbar';
|
|
@@ -17,7 +17,7 @@ export interface CommentCardLayerProps extends Omit<LayerProps, 'children'> {
|
|
|
17
17
|
/**
|
|
18
18
|
* The task pane that lists the sheet's threads. While it is the active pane the cards are shown
|
|
19
19
|
* there and this layer shows none.
|
|
20
|
-
* @defaultValue
|
|
20
|
+
* @defaultValue {@link TaskPaneKey.Comments}
|
|
21
21
|
*/
|
|
22
22
|
paneKey?: string;
|
|
23
23
|
/** Gap (px) between the cell's right edge and the card. @defaultValue 18 */
|
|
@@ -63,11 +63,66 @@ export declare class SheetLayersRegistry {
|
|
|
63
63
|
private _version;
|
|
64
64
|
set(id: string, entry: Entry): void;
|
|
65
65
|
delete(id: string): void;
|
|
66
|
+
get(id: string): Entry | undefined;
|
|
66
67
|
subscribe: (listener: () => void) => (() => void);
|
|
67
68
|
getVersion: () => number;
|
|
68
69
|
entries(): IterableIterator<[string, Entry]>;
|
|
69
70
|
private _changed;
|
|
70
71
|
}
|
|
72
|
+
/** Layers a plugin adds to sheets, through {@link DefaultSheetLayersRegistry}. */
|
|
73
|
+
export interface SheetLayersEntry {
|
|
74
|
+
/** Identifies the entry, for {@link ISheetLayersRegistry.unregister}. Case-insensitive. */
|
|
75
|
+
key: string;
|
|
76
|
+
/**
|
|
77
|
+
* The layers: one grid child or an array of them, each rooted in a `Layer` and each with its own
|
|
78
|
+
* `key`, as in a sheet's `layers`.
|
|
79
|
+
*/
|
|
80
|
+
layers: React.ReactNode;
|
|
81
|
+
/** The sheets whose surfaces get the layers. Omitted, every sheet's do. */
|
|
82
|
+
sheets?: SheetLayersFilter;
|
|
83
|
+
/**
|
|
84
|
+
* The surfaces the layers are rendered on. A layer on more than one reads which it is on with
|
|
85
|
+
* {@link useGridSurface}.
|
|
86
|
+
*
|
|
87
|
+
* @defaultValue 'cells'
|
|
88
|
+
*/
|
|
89
|
+
surface?: SheetSurface | readonly SheetSurface[] | 'all';
|
|
90
|
+
}
|
|
91
|
+
/** Adds layers to every sheet of every workbook element. */
|
|
92
|
+
export interface ISheetLayersRegistry {
|
|
93
|
+
/**
|
|
94
|
+
* Add layers to every sheet surface the entry names, for as long as it is registered.
|
|
95
|
+
*
|
|
96
|
+
* @param entry The layers, and where they go.
|
|
97
|
+
* @param replace Whether to replace an entry with the same key. Without it, a second entry with the
|
|
98
|
+
* same key throws. @defaultValue false
|
|
99
|
+
* @returns A function that removes this registration. It does nothing once the key is unregistered
|
|
100
|
+
* or registered again by someone else.
|
|
101
|
+
*/
|
|
102
|
+
register(entry: SheetLayersEntry, replace?: boolean): () => void;
|
|
103
|
+
/**
|
|
104
|
+
* Remove an entry's layers from every sheet.
|
|
105
|
+
*
|
|
106
|
+
* @param key The entry's key.
|
|
107
|
+
* @returns Whether the entry was registered.
|
|
108
|
+
*/
|
|
109
|
+
unregister(key: string): boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The layers plugins add to sheets. Every sheet surface, in every workbook or sheet element, renders
|
|
113
|
+
* the registered layers that match it:
|
|
114
|
+
*
|
|
115
|
+
* ```tsx
|
|
116
|
+
* DefaultSheetLayersRegistry.register({ key: 'focus-cell', layers: <FocusCellLayer key="focus-cell" /> });
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
* A surface stacks its built-in layers, then the element's `layers`, then the registered layers in
|
|
121
|
+
* registration order, then those declared with {@link SheetLayers}. A layer's `zIndex` overrides that
|
|
122
|
+
* order. A registered layer is mounted on every sheet it matches, on each pane, so it renders an empty
|
|
123
|
+
* `Layer` while it has nothing to show.
|
|
124
|
+
*/
|
|
125
|
+
export declare const DefaultSheetLayersRegistry: ISheetLayersRegistry;
|
|
71
126
|
/**
|
|
72
127
|
* The registry the {@link SheetLayers} under an element register with: the one of a scope above it, or
|
|
73
128
|
* its own. A workbook element resolves one around both its children and its sheet, and the sheet
|
|
@@ -104,7 +159,8 @@ export declare const SheetLayersScope: React.Provider<SheetLayersRegistry | null
|
|
|
104
159
|
*/
|
|
105
160
|
export declare const SheetLayers: React.FC<SheetLayersProps>;
|
|
106
161
|
/**
|
|
107
|
-
* The layers
|
|
162
|
+
* The layers added to one surface of a sheet, flattened into one list of grid children: those
|
|
163
|
+
* registered with {@link DefaultSheetLayersRegistry}, then those declared with {@link SheetLayers}.
|
|
108
164
|
*
|
|
109
165
|
* @internal
|
|
110
166
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
|
+
export interface SheetSparklineCommandLayerProps extends LayerProps {
|
|
5
|
+
sheet: IWorksheet;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* **Command-only layer for the `sparkline` scope**: no visuals (the pictures are
|
|
9
|
+
* `SparklineLayer`'s); it joins the pane's z-chain to contribute
|
|
10
|
+
* {@link contributeSparklineCommands Excel's Sparkline tab} while the active cell has a sparkline,
|
|
11
|
+
* as `SheetTableCommandLayer` does for tables.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SheetSparklineCommandLayer: import('react').MemoExoticComponent<(props: SheetSparklineCommandLayerProps) => ReactElement>;
|
|
14
|
+
//# sourceMappingURL=SheetSparklineCommandLayer.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
|
+
export interface SparklineLayerProps extends LayerProps {
|
|
5
|
+
/** Class for the layer (devtools identification). */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Style for the tiles' host box. */
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
/** The sheet whose sparklines are drawn. */
|
|
10
|
+
sheet: IWorksheet;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the grid is dark: the pictures' colors are drawn as the cells draw theirs there.
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue false
|
|
15
|
+
*/
|
|
16
|
+
darkMode?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The sheet's **sparklines**: each group's picture in each of its cells (DESIGN-SPARKLINES §3).
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* A layer of its own, not a cell content renderer: a sparkline's cell is usually empty, and the
|
|
23
|
+
* cell layer visits only cells with content. It mounts above the cells, as Excel draws the picture
|
|
24
|
+
* over the cell's value, and takes no pointer events.
|
|
25
|
+
*
|
|
26
|
+
* The tiles hold one view per visible sparkline and are rebuilt only when the groups change (one
|
|
27
|
+
* added, removed, or moved). A value the picture reads changing is the view's own business: it
|
|
28
|
+
* listens to its group's `onLayoutChange` and asks for a new picture, so an edit repaints the
|
|
29
|
+
* pictures without rebuilding a tile.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SparklineLayer: React.MemoExoticComponent<(props: SparklineLayerProps) => React.JSX.Element | null>;
|
|
32
|
+
//# sourceMappingURL=SparklineLayer.d.ts.map
|
|
@@ -18,11 +18,13 @@ export * from './SheetMovableLayer';
|
|
|
18
18
|
export * from './TableLayer';
|
|
19
19
|
export * from './TableToolbar';
|
|
20
20
|
export * from './SheetTableCommandLayer';
|
|
21
|
+
export * from './SheetSparklineCommandLayer';
|
|
21
22
|
export * from './SheetPivotCommandLayer';
|
|
22
23
|
export * from './SpillLayer';
|
|
23
24
|
export * from './ConditionalIcons';
|
|
24
25
|
export * from './ConditionalBarLayer';
|
|
25
26
|
export * from './ConditionalIconsLayer';
|
|
27
|
+
export * from './SparklineLayer';
|
|
26
28
|
export * from './ValidationIndicatorLayer';
|
|
27
29
|
export * from './ValidationDropdownLayer';
|
|
28
30
|
export * from './ValidationPromptLayer';
|
|
@@ -31,7 +33,6 @@ export * from './CircularIndicatorLayer';
|
|
|
31
33
|
export * from './CellIndicatorLayer';
|
|
32
34
|
export * from './CommentsLayer';
|
|
33
35
|
export * from './CommentCardLayer';
|
|
34
|
-
export * from './RangeAnnotationLayer';
|
|
35
36
|
export * from './SheetLayers';
|
|
36
37
|
export * from './CellInsertLayer';
|
|
37
38
|
export * from './ProtectionLayer';
|
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { Command } from '@sheetxl/utils-react';
|
|
2
2
|
/** The key of a kind's ribbon tab: what a kind's own `toolbar` and the default tab are registered as. */
|
|
3
3
|
export declare const movableToolbarKey: (type: string) => string;
|
|
4
|
-
/**
|
|
5
|
-
* Adds a button to a kind's ribbon tab, whether the kind brings its own tab or has the default one:
|
|
6
|
-
* the contribution point for whatever adds to a kind it does not own, as a host adds its own widgets
|
|
7
|
-
* to a built-in kind.
|
|
8
|
-
*
|
|
9
|
-
* @param type The content type.
|
|
10
|
-
* @param entry The button: a command key to run (`defaultKey`), or a `render` of its own.
|
|
11
|
-
* @param placement Where in the tab. `{ order: -1, divider: 'after' }` puts it first, set apart.
|
|
12
|
-
* @returns A function that removes it.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* registerMovableToolbarEntry('shape', { key: 'shapeGlow', defaultKey: 'formatShapeGlow' }, { order: -1 });
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare function registerMovableToolbarEntry(type: string, entry: Command.CommandButtonEntry & {
|
|
20
|
-
key: string;
|
|
21
|
-
}, placement?: Command.Placement): () => void;
|
|
22
4
|
/**
|
|
23
5
|
* The tab a kind of movable content gets when its module brings none: the drawing groups and the
|
|
24
6
|
* format pane, labeled with the kind's name (`IContent.getTypeDescription()`) unless the catalog
|
|
@@ -2,8 +2,6 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { IPivotTable } from '@sheetxl/sdk';
|
|
3
3
|
import { TaskPaneProps } from '../taskPane/ITaskPane';
|
|
4
4
|
import { PivotFieldsProps } from './PivotFields';
|
|
5
|
-
/** The key the PivotTable Fields pane is registered under. */
|
|
6
|
-
export declare const PIVOT_TABLE_PANE_KEY = "pivotTableFields";
|
|
7
5
|
/** What the PivotTable Fields pane can be asked to show (`activateTaskPane(key, { args })`). */
|
|
8
6
|
export interface PivotTablePaneArgs {
|
|
9
7
|
/** The table to show; absent, the one the selection is in. */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { CommandContributionComponentProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { WorkbookCommandContributorData } from '../workbook/WorkbookCommandContributor';
|
|
4
|
+
import { PresenceStore } from './PresenceStore';
|
|
5
|
+
/** The registered key of the presence task pane. */
|
|
6
|
+
export declare const PRESENCE_PANE_KEY = "agent";
|
|
7
|
+
/** The agent's icon key: the base pack's, the glyph Studio marks the agent's changes with too. */
|
|
8
|
+
export declare const PRESENCE_ICON = "Agent";
|
|
9
|
+
/** Keep-open for the strip's navigator. A placeholder glyph in presence's own icon pack. */
|
|
10
|
+
export declare const PRESENCE_PIN_ICON = "plugin-agent:Pin";
|
|
11
|
+
/** The keys of the presence commands, in the `workbook` scope. */
|
|
12
|
+
export declare const PresenceCommandKeys: {
|
|
13
|
+
readonly showPane: "showAgentPane";
|
|
14
|
+
readonly clearFindings: "clearAgentFindings";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Register presence's icon pack and the chrome (label, description, icon) of its commands.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* The commands live in the `workbook` scope under their own source, the way scripting injects
|
|
21
|
+
* `showScriptEditor`: the chrome is seeded here and the behavior is contributed per workbook by
|
|
22
|
+
* {@link createPresenceCommands}. Icon packs stay registered (see `DefaultIconService.register`), and
|
|
23
|
+
* the catalog is replaced, not stacked, when registered again.
|
|
24
|
+
*/
|
|
25
|
+
export declare function registerPresenceCommandChrome(): void;
|
|
26
|
+
/**
|
|
27
|
+
* The per-workbook behavior of the presence commands, bound to `store`. Register with
|
|
28
|
+
* `Command.DefaultCommandRegistry.registerDynamic('workbook', …)`.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* `showAgentPane` is stateful (its state is whether the pane is open), so a quick button on it reads
|
|
32
|
+
* as a toggle.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createPresenceCommands(store: PresenceStore): ComponentType<CommandContributionComponentProps<WorkbookCommandContributorData>>;
|
|
35
|
+
//# sourceMappingURL=PresenceCommands.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { RangeAnnotationInput } from '../annotation';
|
|
2
|
+
import { PresenceIntent, PresencePrompt, PresencePromptAnswer } from './PresenceTypes';
|
|
3
|
+
/**
|
|
4
|
+
* What the agent side pushes at the view.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* `highlight` ranges arrive already resolved and sheet-qualified: the host is where an unresolvable
|
|
8
|
+
* address is reported back to the agent, so nothing unresolvable reaches the store.
|
|
9
|
+
*/
|
|
10
|
+
export type PresenceHostEvent = {
|
|
11
|
+
type: 'highlight';
|
|
12
|
+
sessionId: string;
|
|
13
|
+
ranges: RangeAnnotationInput[];
|
|
14
|
+
intent: PresenceIntent;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'prompt';
|
|
17
|
+
sessionId: string;
|
|
18
|
+
prompt: PresencePrompt;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'prompt.cancel';
|
|
21
|
+
promptId: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'status';
|
|
24
|
+
connected: boolean;
|
|
25
|
+
activity?: {
|
|
26
|
+
label: string;
|
|
27
|
+
};
|
|
28
|
+
meter?: number;
|
|
29
|
+
}
|
|
30
|
+
/** The history epoch moved under this session (a reload): drop everything held for it. */
|
|
31
|
+
| {
|
|
32
|
+
type: 'reset';
|
|
33
|
+
sessionId: string;
|
|
34
|
+
};
|
|
35
|
+
/** What the user did that the agent may want to hear about on its next tool result. */
|
|
36
|
+
export type PresenceUserEvent = {
|
|
37
|
+
type: 'finding.dismissed';
|
|
38
|
+
id: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'finding.dismissedAll';
|
|
41
|
+
intent: PresenceIntent;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The one seam between presence and whatever carries the agent's traffic.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Presence knows nothing about the transport. A host that relays MCP tool calls into the page
|
|
48
|
+
* implements this; so would one that runs the agent in-process.
|
|
49
|
+
*/
|
|
50
|
+
export interface PresenceHost {
|
|
51
|
+
/** Everything the agent side pushes at the view. Returns the unsubscribe. */
|
|
52
|
+
subscribe(listener: (event: PresenceHostEvent) => void): () => void;
|
|
53
|
+
/** Deliver the user's answer to a prompt. */
|
|
54
|
+
answerPrompt(promptId: string, answer: PresencePromptAnswer): void;
|
|
55
|
+
/** User-side events the agent may want on its next tool result. Optional. */
|
|
56
|
+
notify?(event: PresenceUserEvent): void;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=PresenceHost.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The keys of presence's strings, for `t()`. The English text is in the package's catalog
|
|
3
|
+
* (`presence.msg.json`); a host re-words or translates any of them with a language pack.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PresenceMessages: {
|
|
6
|
+
readonly paneTitle: string;
|
|
7
|
+
readonly findingsOpen: string;
|
|
8
|
+
readonly needsAttention: string;
|
|
9
|
+
readonly working: string;
|
|
10
|
+
readonly position: string;
|
|
11
|
+
readonly previous: string;
|
|
12
|
+
readonly next: string;
|
|
13
|
+
readonly goToCurrent: string;
|
|
14
|
+
readonly dismiss: string;
|
|
15
|
+
readonly dismissAll: string;
|
|
16
|
+
readonly tabReview: string;
|
|
17
|
+
readonly waitingOnYou: string;
|
|
18
|
+
readonly tabHistory: string;
|
|
19
|
+
readonly historyNone: string;
|
|
20
|
+
readonly historySearch: string;
|
|
21
|
+
readonly historyClearSearch: string;
|
|
22
|
+
readonly historyNoMatches: string;
|
|
23
|
+
readonly historyKindFinding: string;
|
|
24
|
+
readonly historyKindQuestion: string;
|
|
25
|
+
readonly historyKindChange: string;
|
|
26
|
+
readonly sectionFindings: string;
|
|
27
|
+
readonly findingsNone: string;
|
|
28
|
+
readonly findingsStale: string;
|
|
29
|
+
readonly changesUntitled: string;
|
|
30
|
+
readonly promptTitle: string;
|
|
31
|
+
readonly promptOther: string;
|
|
32
|
+
readonly promptSubmit: string;
|
|
33
|
+
readonly promptAcknowledge: string;
|
|
34
|
+
readonly promptSubmitAll: string;
|
|
35
|
+
readonly promptStepTab: string;
|
|
36
|
+
readonly promptOtherPlaceholder: string;
|
|
37
|
+
readonly pin: string;
|
|
38
|
+
readonly unpin: string;
|
|
39
|
+
readonly promptGoto: string;
|
|
40
|
+
readonly meter: string;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=PresenceMessages.d.ts.map
|