@sheetxl/react 0.8.0-beta.16 → 0.8.0-beta.18

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.
Files changed (91) hide show
  1. package/browser/esm/{DD8k94MkULtCDCqI.mjs → 3cI2Pl36MTdJwiRb.mjs} +3 -3
  2. package/browser/esm/{1nN0NNMaAIsgiI3e.mjs → 68UAeYtcR5vNUi7B.mjs} +2 -2
  3. package/browser/esm/B4xuC6B9qgSP0RLB.mjs +14092 -0
  4. package/browser/esm/BFTnNTWyDV8Tp0b3.mjs +9560 -0
  5. package/browser/esm/{C8xSJkoMQ48a6FUE.mjs → BZ7wS4DMuK-Ja1PK.mjs} +1 -1
  6. package/browser/esm/{MmP_sX1FvMvViZZD.mjs → BcXp1o2gLGZELmri.mjs} +2 -2
  7. package/browser/esm/{Z5bFuSFQeh75HMWA.mjs → C0hKnoaENmUoL-z2.mjs} +5 -5
  8. package/browser/esm/{DL8bI9YEl5Otd-ih.mjs → CH-ZkDyLeYYfuWs-.mjs} +1 -1
  9. package/browser/esm/{hjwXRlBRxr2wVnGG.mjs → CKkDsvwbMHj8qNkT.mjs} +1 -1
  10. package/browser/esm/{C1C6etLFfhuqi99X.mjs → CpVFyFe90rLBAlOg.mjs} +1 -1
  11. package/browser/esm/Cuj2BAFNMP_v-leq.mjs +78 -0
  12. package/browser/esm/{BMlHmy5KHq4fpX89.mjs → D31c0jLWUiR_PbJx.mjs} +1 -1
  13. package/browser/esm/{DGAgjGwo1pLorNXf.mjs → DA2jE0248M94__xq.mjs} +1 -1
  14. package/browser/esm/{CttfqXbX8QGBlLUy.mjs → DCTRODeK8qZe23Qi.mjs} +6 -6
  15. package/browser/esm/{DK2-0QyEDqx8d0XH.mjs → DJcMX3VDXMFffxMB.mjs} +4 -4
  16. package/browser/esm/{ep5bfXSko9E1UYpO.mjs → DJoM2pxo9ngKG7wz.mjs} +1 -1
  17. package/browser/esm/{D4UxXbJprFoh8e8r.mjs → DQ_Jv9q6nhkN6guI.mjs} +1 -1
  18. package/browser/esm/{dAnrqhgO4VFyrocf.mjs → DfcSTBeSndcnaDmd.mjs} +1 -1
  19. package/browser/esm/{UiFSvM9Z6y0t72hV.mjs → DwBel0Adpgih98Bx.mjs} +6 -6
  20. package/browser/esm/{xnubiISd6zDiHAww.mjs → GW6aAFystRCaCV82.mjs} +1 -1
  21. package/browser/esm/{D2ttaxNfmCgJPpIL.mjs → UHmh1sM5QVfLE8k9.mjs} +1 -1
  22. package/browser/esm/chart.mjs +3 -3
  23. package/browser/esm/control.mjs +2 -2
  24. package/browser/esm/{CKxfHbnDDNWdSgCa.mjs → e1CVc488qLwKV4pf.mjs} +1 -1
  25. package/browser/esm/{BDR2ekvOkyo3laAm.mjs → gUl_AJjdjUikWSiV.mjs} +3 -3
  26. package/browser/esm/group.mjs +3 -3
  27. package/browser/esm/index.mjs +6485 -5618
  28. package/browser/esm/note.mjs +4 -4
  29. package/browser/esm/picture.mjs +2 -2
  30. package/browser/esm/{Ce1bW8Vmpp1o5nH7.mjs → r9VdX3klACo84akj.mjs} +3 -3
  31. package/browser/esm/shape.mjs +2 -2
  32. package/browser/esm/slicer.mjs +4 -4
  33. package/browser/esm/{BuI1QOZfQOLRxv4Q.mjs → ug2NMfIbkfZBiXkg.mjs} +1 -1
  34. package/licenses/dependencies.txt +347 -347
  35. package/node/esm/{CczY1geYlm7dZykP.mjs → B13bwVa149r4BtWR.mjs} +1 -1
  36. package/node/esm/{gbWplmokh3BEFa8d.mjs → B2gKyoNGnDrUyDZa.mjs} +1 -1
  37. package/node/esm/{CeDLAkScaM4r3aRY.mjs → B5ptbGVfEUGVwTc3.mjs} +1 -1
  38. package/node/esm/{DF1hQLrsJatoimsP.mjs → BGRzGNFgu0S7f4A_.mjs} +1 -1
  39. package/node/esm/{CZ4oenvKO_nsgqT3.mjs → BXHdgvfoAY-kTa3t.mjs} +1 -1
  40. package/node/esm/{CW9MYVxiw-BHoWOv.mjs → BYAZYjNlopMmpCr-.mjs} +1 -1
  41. package/node/esm/{DBdfrbP95AgBwjj2.mjs → Bqd6WwH3hhxhjMZI.mjs} +2 -2
  42. package/node/esm/{CQyoYz8uAb2rwRgR.mjs → C7pT3AVfm5NnonRZ.mjs} +1 -1
  43. package/node/esm/{OB-WWDXKQNnQq71Y.mjs → CUDgrjO1Bl_f_GgH.mjs} +1 -1
  44. package/node/esm/CW627g627m7kngw1.mjs +80 -0
  45. package/node/esm/{stixLaWCsDf8jtRL.mjs → CYRvHuhsdtu0Thlx.mjs} +1 -1
  46. package/node/esm/{BShOuK0OXwR9NSdj.mjs → D0SQwn9pOERRK_k-.mjs} +4 -4
  47. package/node/esm/{Cxg42ySbHoSgZz4m.mjs → DHnWKZ7s67r7e_g8.mjs} +1 -1
  48. package/node/esm/{BvtqxTJsH9qrs0oo.mjs → DPjECbRSqcAbRjOb.mjs} +1 -1
  49. package/node/esm/{CaqQCNAPYBQPStW6.mjs → Dcj2cVM7hHbgjgJH.mjs} +2 -2
  50. package/node/esm/{RfipyLtZiGFsXmFH.mjs → Dq6uRVLQnUa-nPqs.mjs} +2 -2
  51. package/node/esm/{D1kwQ7kj4CIEHF6o.mjs → DqQ8kJ6VG-8kThfG.mjs} +1 -1
  52. package/node/esm/{BZxcC1cfoQJEQCbW.mjs → IeiL1efbWNC4BbBi.mjs} +1 -1
  53. package/node/esm/{DYHX-Y0Lgclu8imk.mjs → OPx-m4H3bEnQEa5_.mjs} +2 -2
  54. package/node/esm/{DNioL3BfDain0oLO.mjs → X0rgdl5M_Oz_b0LN.mjs} +1 -1
  55. package/node/esm/chart.mjs +2 -2
  56. package/node/esm/control.mjs +2 -2
  57. package/node/esm/group.mjs +3 -3
  58. package/node/esm/index.mjs +6444 -5567
  59. package/node/esm/note.mjs +4 -4
  60. package/node/esm/{B6FEw5vtIODLY_8C.mjs → oAwOguzSpeebACWB.mjs} +5 -5
  61. package/node/esm/picture.mjs +5 -5
  62. package/node/esm/shape.mjs +6 -6
  63. package/node/esm/slicer.mjs +4 -4
  64. package/package.json +7 -7
  65. package/resources/contents.json +6 -0
  66. package/resources/locales/contents.json +14 -0
  67. package/resources/locales/de/sheet.cmd.json +41 -0
  68. package/resources/locales/de/sparkline.cmd.json +301 -0
  69. package/resources/locales/de/table.cmd.json +4 -1
  70. package/resources/locales/de/ui.msg.json +1 -0
  71. package/resources/locales/en/sheet.cmd.json +41 -0
  72. package/resources/locales/en/sparkline.cmd.json +301 -0
  73. package/resources/locales/en/table.cmd.json +4 -1
  74. package/resources/locales/en/ui.msg.json +1 -0
  75. package/types/src/border/useBorders.d.ts +20 -1
  76. package/types/src/editor/VirtualKeyboardLayer.d.ts +2 -1
  77. package/types/src/frame/CommandContext.d.ts +16 -1
  78. package/types/src/layer/BorderLayer.d.ts +3 -0
  79. package/types/src/layer/SheetGridLineLayer.d.ts +18 -6
  80. package/types/src/layer/SheetSparklineCommandLayer.d.ts +14 -0
  81. package/types/src/layer/SparklineLayer.d.ts +32 -0
  82. package/types/src/layer/_sheetBorders.d.ts +6 -0
  83. package/types/src/layer/index.d.ts +2 -0
  84. package/types/src/layer/useSheetVisibleCells.d.ts +3 -4
  85. package/types/src/sparkline/PictureCache.d.ts +37 -0
  86. package/types/src/sparkline/SparklineCommands.d.ts +23 -0
  87. package/types/src/sparkline/SparklinePictures.d.ts +7 -0
  88. package/types/src/sparkline/paint/_drawing.d.ts +24 -0
  89. package/types/src/sparkline/paint/echarts.d.ts +8 -0
  90. package/types/src/sparkline/paint/index.d.ts +8 -0
  91. package/browser/esm/Bt2sBBEyKZJu0p0G.mjs +0 -23561
@@ -0,0 +1,301 @@
1
+ {
2
+ "$schema": "../../../utils-react/command-catalog.schema.json",
3
+ "scope": "sparkline",
4
+ "label": "Sparkline",
5
+ "tag": "en",
6
+ "version": 1,
7
+ "commands": {
8
+ "sparklineEditData": {
9
+ "label": "Edit Data",
10
+ "description": "Change the cells the active cell's sparkline group draws in, and the cells it draws.",
11
+ "icon": "NamedRangeEdit",
12
+ "groupLabels": {
13
+ "sparklineOptions": "Edit Group Location & Data…"
14
+ },
15
+ "tags": [
16
+ "mutator"
17
+ ]
18
+ },
19
+ "sparklineTypeLine": {
20
+ "label": "Line",
21
+ "description": "Change the selected sparkline groups to line sparklines.",
22
+ "icon": "SparklineLine",
23
+ "tags": [
24
+ "mutator"
25
+ ]
26
+ },
27
+ "sparklineTypeColumn": {
28
+ "label": "Column",
29
+ "description": "Change the selected sparkline groups to column sparklines.",
30
+ "icon": "SparklineColumn",
31
+ "tags": [
32
+ "mutator"
33
+ ]
34
+ },
35
+ "sparklineTypeWinLoss": {
36
+ "label": "Win/Loss",
37
+ "description": "Change the selected sparkline groups to win/loss sparklines: up for a positive value, down for a negative one.",
38
+ "icon": "SparklineWinLoss",
39
+ "tags": [
40
+ "mutator"
41
+ ]
42
+ },
43
+ "sparklineShowOptions": {
44
+ "label": "Show",
45
+ "description": "Choose which points the sparklines highlight."
46
+ },
47
+ "sparklineHighPointToggle": {
48
+ "label": "Toggle High Point",
49
+ "description": "Highlight the highest point of each sparkline.",
50
+ "groupLabels": {
51
+ "sparklineShowOptions": "High Point"
52
+ },
53
+ "tags": [
54
+ "mutator"
55
+ ]
56
+ },
57
+ "sparklineLowPointToggle": {
58
+ "label": "Toggle Low Point",
59
+ "description": "Highlight the lowest point of each sparkline.",
60
+ "groupLabels": {
61
+ "sparklineShowOptions": "Low Point"
62
+ },
63
+ "tags": [
64
+ "mutator"
65
+ ]
66
+ },
67
+ "sparklineNegativePointsToggle": {
68
+ "label": "Toggle Negative Points",
69
+ "description": "Highlight the negative points of each sparkline.",
70
+ "groupLabels": {
71
+ "sparklineShowOptions": "Negative Points"
72
+ },
73
+ "tags": [
74
+ "mutator"
75
+ ]
76
+ },
77
+ "sparklineFirstPointToggle": {
78
+ "label": "Toggle First Point",
79
+ "description": "Highlight the first point of each sparkline.",
80
+ "groupLabels": {
81
+ "sparklineShowOptions": "First Point"
82
+ },
83
+ "tags": [
84
+ "mutator"
85
+ ]
86
+ },
87
+ "sparklineLastPointToggle": {
88
+ "label": "Toggle Last Point",
89
+ "description": "Highlight the last point of each sparkline.",
90
+ "groupLabels": {
91
+ "sparklineShowOptions": "Last Point"
92
+ },
93
+ "tags": [
94
+ "mutator"
95
+ ]
96
+ },
97
+ "sparklineMarkersToggle": {
98
+ "label": "Toggle Markers",
99
+ "description": "Show a marker on every point of a line sparkline.",
100
+ "groupLabels": {
101
+ "sparklineShowOptions": "Markers"
102
+ },
103
+ "tags": [
104
+ "mutator"
105
+ ]
106
+ },
107
+ "sparklineColorSeries": {
108
+ "label": "Sparkline Color",
109
+ "description": "Color the line or columns of the selected sparkline groups.",
110
+ "icon": "stroke.colored",
111
+ "tags": [
112
+ "mutator"
113
+ ]
114
+ },
115
+ "sparklineColorNegative": {
116
+ "label": "Negative Points Color",
117
+ "description": "Color the negative points of the selected sparkline groups.",
118
+ "icon": "fill.colored",
119
+ "groupLabels": {
120
+ "sparklineMarkerColorOptions": "Negative Points"
121
+ },
122
+ "tags": [
123
+ "mutator"
124
+ ]
125
+ },
126
+ "sparklineColorMarkers": {
127
+ "label": "Markers Color",
128
+ "description": "Color the markers of the selected line sparkline groups.",
129
+ "icon": "fill.colored",
130
+ "groupLabels": {
131
+ "sparklineMarkerColorOptions": "Markers"
132
+ },
133
+ "tags": [
134
+ "mutator"
135
+ ]
136
+ },
137
+ "sparklineColorHigh": {
138
+ "label": "High Point Color",
139
+ "description": "Color the highest point of each sparkline.",
140
+ "icon": "fill.colored",
141
+ "groupLabels": {
142
+ "sparklineMarkerColorOptions": "High Point"
143
+ },
144
+ "tags": [
145
+ "mutator"
146
+ ]
147
+ },
148
+ "sparklineColorLow": {
149
+ "label": "Low Point Color",
150
+ "description": "Color the lowest point of each sparkline.",
151
+ "icon": "fill.colored",
152
+ "groupLabels": {
153
+ "sparklineMarkerColorOptions": "Low Point"
154
+ },
155
+ "tags": [
156
+ "mutator"
157
+ ]
158
+ },
159
+ "sparklineColorFirst": {
160
+ "label": "First Point Color",
161
+ "description": "Color the first point of each sparkline.",
162
+ "icon": "fill.colored",
163
+ "groupLabels": {
164
+ "sparklineMarkerColorOptions": "First Point"
165
+ },
166
+ "tags": [
167
+ "mutator"
168
+ ]
169
+ },
170
+ "sparklineColorLast": {
171
+ "label": "Last Point Color",
172
+ "description": "Color the last point of each sparkline.",
173
+ "icon": "fill.colored",
174
+ "groupLabels": {
175
+ "sparklineMarkerColorOptions": "Last Point"
176
+ },
177
+ "tags": [
178
+ "mutator"
179
+ ]
180
+ },
181
+ "sparklineColorAxis": {
182
+ "label": "Axis Color",
183
+ "description": "Color the horizontal axis of the selected sparkline groups.",
184
+ "icon": "stroke.colored",
185
+ "tags": [
186
+ "mutator"
187
+ ]
188
+ },
189
+ "sparklineAxisOptions": {
190
+ "label": "Axis",
191
+ "description": "Change the axes, the scaling and how empty and hidden cells are drawn."
192
+ },
193
+ "sparklineAxisToggle": {
194
+ "label": "Toggle Axis",
195
+ "description": "Draw a horizontal axis at zero when zero is within the range.",
196
+ "groupLabels": {
197
+ "sparklineAxisOptions": "Show Axis"
198
+ },
199
+ "tags": [
200
+ "mutator"
201
+ ]
202
+ },
203
+ "sparklineRightToLeftToggle": {
204
+ "label": "Toggle Right-to-Left",
205
+ "description": "Draw the points from right to left.",
206
+ "groupLabels": {
207
+ "sparklineAxisOptions": "Plot Data Right-to-Left"
208
+ },
209
+ "tags": [
210
+ "mutator"
211
+ ]
212
+ },
213
+ "sparklineSameMinToggle": {
214
+ "label": "Toggle Same Minimum",
215
+ "description": "Scale every sparkline of the group to the group's lowest value.",
216
+ "groupLabels": {
217
+ "sparklineAxisOptions": "Same Minimum for All Sparklines"
218
+ },
219
+ "tags": [
220
+ "mutator"
221
+ ]
222
+ },
223
+ "sparklineSameMaxToggle": {
224
+ "label": "Toggle Same Maximum",
225
+ "description": "Scale every sparkline of the group to the group's highest value.",
226
+ "groupLabels": {
227
+ "sparklineAxisOptions": "Same Maximum for All Sparklines"
228
+ },
229
+ "tags": [
230
+ "mutator"
231
+ ]
232
+ },
233
+ "sparklineEmptyCellsGap": {
234
+ "label": "Show Empty Cells as Gaps",
235
+ "description": "Leave a gap where a cell is empty.",
236
+ "groupLabels": {
237
+ "sparklineAxisOptions": "Empty Cells as Gaps"
238
+ },
239
+ "tags": [
240
+ "mutator"
241
+ ]
242
+ },
243
+ "sparklineEmptyCellsZero": {
244
+ "label": "Show Empty Cells as Zero",
245
+ "description": "Draw an empty cell as zero.",
246
+ "groupLabels": {
247
+ "sparklineAxisOptions": "Empty Cells as Zero"
248
+ },
249
+ "tags": [
250
+ "mutator"
251
+ ]
252
+ },
253
+ "sparklineEmptyCellsSpan": {
254
+ "label": "Connect Over Empty Cells",
255
+ "description": "Draw the line straight across an empty cell.",
256
+ "groupLabels": {
257
+ "sparklineAxisOptions": "Connect Data Points with Line"
258
+ },
259
+ "tags": [
260
+ "mutator"
261
+ ]
262
+ },
263
+ "sparklineShowHiddenToggle": {
264
+ "label": "Toggle Hidden Data",
265
+ "description": "Draw the values of hidden rows and columns.",
266
+ "groupLabels": {
267
+ "sparklineAxisOptions": "Show Data in Hidden Rows and Columns"
268
+ },
269
+ "tags": [
270
+ "mutator"
271
+ ]
272
+ },
273
+ "sparklineClearOptions": {
274
+ "label": "Clear",
275
+ "description": "Clear the selected sparklines.",
276
+ "icon": "ClearAll"
277
+ },
278
+ "sparklineClear": {
279
+ "label": "Clear Selected Sparklines",
280
+ "description": "Remove the sparklines from the selected cells. The cells' values stay.",
281
+ "groupLabels": {
282
+ "sparklineClearOptions": "Clear Selected Sparklines"
283
+ },
284
+ "icon": "ClearAll",
285
+ "tags": [
286
+ "mutator"
287
+ ]
288
+ },
289
+ "sparklineClearGroups": {
290
+ "label": "Clear Selected Sparkline Groups",
291
+ "description": "Remove every sparkline of the groups the selection touches.",
292
+ "groupLabels": {
293
+ "sparklineClearOptions": "Clear Selected Sparkline Groups"
294
+ },
295
+ "icon": "ClearAll",
296
+ "tags": [
297
+ "mutator"
298
+ ]
299
+ }
300
+ }
301
+ }
@@ -15,7 +15,10 @@
15
15
  },
16
16
  "tableStyleOptions": {
17
17
  "label": "Table Style",
18
- "description": "Toggle which structural elements (header, total, banded rows/columns, filter) the table shows."
18
+ "description": "Toggle which structural elements (header, total, banded rows/columns, filter) the table shows.",
19
+ "groupLabels": {
20
+ "tableToolbar": "Style"
21
+ }
19
22
  },
20
23
  "tableTotalRowToggle": {
21
24
  "label": "Toggle Table Total Row",
@@ -292,6 +292,7 @@
292
292
  "reason.sheetProtected": "The sheet is protected.",
293
293
  "reason.singleColumn": "Select a single column.",
294
294
  "reason.sortRange": "Sort requires a single range.",
295
+ "reason.sparklineNotLine": "Markers are drawn on line sparklines only.",
295
296
  "reason.tableAmbiguous": "Select cells within a single table.",
296
297
  "reason.tableBodyRows": "Select rows within the table body.",
297
298
  "referenceInput.cancel": "Cancel",
@@ -140,7 +140,25 @@ export interface UseBorderOptions {
140
140
  * `null` draws none.
141
141
  */
142
142
  normalColumns?: BorderNormalLine | null;
143
+ /**
144
+ * Shared by layers that draw the same cells, so the cells are read into borders once for all of
145
+ * them. Layers share a read when `getVisibleCells` returns the same array and `getBorderAt`,
146
+ * `getMergeAt`, and `defaultColor` are the same.
147
+ */
148
+ cache?: BordersCache;
143
149
  }
150
+ declare const _BordersCacheBrand: unique symbol;
151
+ /**
152
+ * Lets several {@link useBorders} layers share the work of reading their cells into borders. Create
153
+ * one with {@link createBordersCache} and pass it to each layer as {@link UseBorderOptions.cache}.
154
+ */
155
+ export interface BordersCache {
156
+ readonly [_BordersCacheBrand]: true;
157
+ }
158
+ /**
159
+ * A new {@link BordersCache}.
160
+ */
161
+ export declare const createBordersCache: () => BordersCache;
144
162
  export interface UseBorderResults {
145
163
  /**
146
164
  * Draws a pane's borders, or `null` when it has none.
@@ -156,5 +174,6 @@ export interface UseBorderResults {
156
174
  * center of the double it meets, so two doubles open into each other where they cross, tee or
157
175
  * turn a corner. Strokes that are not double are outside the mask and never cut.
158
176
  */
159
- export declare const useBorders: ({ getBorderAt, getMergeAt, rendererBorder, getVisibleCells: propGetVisibleCells, forceThinBorder, defaultColor, mode, normalRows, normalColumns }: UseBorderOptions) => UseBorderResults;
177
+ export declare const useBorders: ({ getBorderAt, getMergeAt, rendererBorder, getVisibleCells: propGetVisibleCells, forceThinBorder, defaultColor, mode, normalRows, normalColumns, cache }: UseBorderOptions) => UseBorderResults;
178
+ export {};
160
179
  //# sourceMappingURL=useBorders.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, the active cell is
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. */
@@ -1,5 +1,6 @@
1
1
  import { IRange, IWorksheet, ICell } from '@sheetxl/sdk';
2
2
  import { LayerProps, IGridPane } from '@sheetxl/grid-react';
3
+ import { BordersCache } from '../border';
3
4
  export interface BorderLayerProps extends LayerProps {
4
5
  /** Class for the borders host box (devtools identification). */
5
6
  className?: string;
@@ -9,6 +10,8 @@ export interface BorderLayerProps extends LayerProps {
9
10
  value?: ICell;
10
11
  range?: IRange.Coords;
11
12
  }[];
13
+ /** Shared with the {@link SheetGridLineLayer} that draws the same cells. */
14
+ bordersCache?: BordersCache;
12
15
  }
13
16
  export declare const BorderLayer: import('react').NamedExoticComponent<BorderLayerProps & import('react').RefAttributes<HTMLDivElement>>;
14
17
  //# sourceMappingURL=BorderLayer.d.ts.map
@@ -1,10 +1,22 @@
1
- import { IWorksheet, IWorksheetView } from '@sheetxl/sdk';
2
- import { LayerProps } from '@sheetxl/grid-react';
1
+ import { ICell, IRange, IWorksheet, IWorksheetView } from '@sheetxl/sdk';
2
+ import { IGridPane, LayerProps } from '@sheetxl/grid-react';
3
+ import { BordersCache } from '../border';
3
4
  export interface SheetGridLineLayerProps extends LayerProps {
4
5
  /** The sheet whose gridlines are rendered. */
5
6
  sheet: IWorksheet;
6
- /** The sheet view — drives styling, per-axis visibility, and which cells are scanned (for merges). */
7
+ /** The sheet view — drives styling and per-axis visibility. */
7
8
  sheetView: IWorksheetView;
9
+ /**
10
+ * The cells in view, shared with the fill and border layers; their borders and their merges and
11
+ * overflow are what the lines break around.
12
+ */
13
+ getVisibleCells: (pane: IGridPane) => {
14
+ cell: ICell.Coords;
15
+ value?: ICell;
16
+ range?: IRange.Coords;
17
+ }[];
18
+ /** Shared with the {@link BorderLayer} that draws the same cells. */
19
+ bordersCache?: BordersCache;
8
20
  }
9
21
  /**
10
22
  * The sheet's gridline layer: the view's gridline wherever no cell border owns the edge, so a
@@ -12,9 +24,9 @@ export interface SheetGridLineLayerProps extends LayerProps {
12
24
  * hides it. An axis whose Normal style has a border draws that border instead, in the
13
25
  * {@link BorderLayer} (it is a border on every cell, and draws above the fills).
14
26
  *
15
- * Self-subscribes to `onStyleChange` (sheet) and `onZoomScaleChange` (view) for the styling and
16
- * per-axis visibility, and to its pane's visible range via {@link useSheetVisibleCells} for the
17
- * merges and borders the lines break around. One per pane.
27
+ * Self-subscribes to `onStyleChange` and `onLayoutChange` (sheet) and `onZoomScaleChange` (view)
28
+ * for the styling, per-axis visibility, and the cells it breaks around, and to data changes in its
29
+ * pane's visible range. One per pane.
18
30
  */
19
31
  export declare const SheetGridLineLayer: import('react').MemoExoticComponent<(props: SheetGridLineLayerProps) => import("react").JSX.Element | null>;
20
32
  //# sourceMappingURL=SheetGridLineLayer.d.ts.map
@@ -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
@@ -0,0 +1,6 @@
1
+ import { IBorders, ICell, IRange } from '@sheetxl/sdk';
2
+ /** The borders a visible cell draws. */
3
+ export declare const getSheetBorderAt: (value: ICell, _index: number) => IBorders;
4
+ /** A merged cell's extrusion is its merge (merged cells never overflow); `null` when not merged. */
5
+ export declare const getSheetMergeAt: (value: ICell, _index: number) => IRange.Coords | null;
6
+ //# sourceMappingURL=_sheetBorders.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';
@@ -8,12 +8,12 @@ export type SheetVisibleCell = {
8
8
  /**
9
9
  * What the scan should treat as "worth rendering". Each layer passes ONLY the flags its own output
10
10
  * depends on — a flag change busts this hook's scan cache + token, so an unused flag would rebuild
11
- * the caller for nothing (e.g. gridlines must not rebuild on a show-zeros toggle).
11
+ * the caller for nothing (e.g. a layer that ignores zeros must not rebuild on a show-zeros toggle).
12
12
  */
13
13
  export interface SheetVisibleCellsOptions {
14
14
  /**
15
15
  * Formula view: formula-only cells render (even valueless), and text-overflow extrusions are
16
- * disabled (formulas never overflow-paint). Affects cells AND gridlines (extrusions break lines).
16
+ * disabled (formulas never overflow-paint). Affects the cells and their extrusions.
17
17
  * @defaultValue false
18
18
  */
19
19
  showFormulas?: boolean;
@@ -53,8 +53,7 @@ export interface SheetVisibleCells {
53
53
  * source flags change (e.g. `useModelSync(sheetView, ['onZoomScaleChange'])` — the view's setters all
54
54
  * funnel through `_notifyAll`, which fires that event). Each caller (one per layer per pane) gets its
55
55
  * OWN cache + subscription — the layers are deliberately decoupled, so a value edit re-renders only the
56
- * layer(s) that asked, never the grid above them. Used by {@link SheetCellLayer} and
57
- * {@link SheetGridLineLayer}.
56
+ * layer(s) that asked, never the grid above them. Used by {@link SheetCellLayer}.
58
57
  */
59
58
  export declare const useSheetVisibleCells: (sheet: IWorksheet, options?: SheetVisibleCellsOptions) => SheetVisibleCells;
60
59
  //# sourceMappingURL=useSheetVisibleCells.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Pictures by key, painted on a queue: one picture for every view that asks for the same key, and
3
+ * the painting spread over slices of time so a screen of new pictures never blocks a frame.
4
+ *
5
+ * @remarks
6
+ * A key states everything the picture depends on (DESIGN-SPARKLINES §3: the layout, so its size,
7
+ * values and concrete colors), so a hit is always right and nothing is invalidated: a view whose
8
+ * input changed asks for another key. The least recently asked are let go past `maxEntries`.
9
+ *
10
+ * The queue is the pool: only views on screen ask, so what is painted first is what is visible.
11
+ */
12
+ export declare class PictureCache<T> {
13
+ private readonly _paint;
14
+ private readonly _maxEntries;
15
+ private readonly _budgetMs;
16
+ private readonly _pictures;
17
+ private readonly _queue;
18
+ private _scheduled;
19
+ /**
20
+ * @param paint Turns an input into a picture (a URL an `<img>` can show).
21
+ * @param options `maxEntries` (default 2000) pictures kept; `budgetMs` (default 8) of painting
22
+ * per slice before yielding.
23
+ */
24
+ constructor(paint: (input: T) => string | Promise<string>, options?: {
25
+ maxEntries?: number;
26
+ budgetMs?: number;
27
+ });
28
+ /** The picture for `key`, painted from `input` when it is not already painted or queued. */
29
+ get(key: string, input: T): Promise<string>;
30
+ /** The picture for `key` when it is already asked for, without painting. */
31
+ peek(key: string): Promise<string> | undefined;
32
+ /** Lets every picture go. */
33
+ clear(): void;
34
+ private _schedule;
35
+ private _drain;
36
+ }
37
+ //# sourceMappingURL=PictureCache.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { RemoveListener, UndoManager } from '@sheetxl/utils';
2
+ import { IWorksheet } from '@sheetxl/sdk';
3
+ import { Command, IReactNotifier } from '@sheetxl/utils-react';
4
+ /** Options for {@link contributeSparklineCommands}. */
5
+ export interface SparklineCommandData {
6
+ sheet: IWorksheet | null;
7
+ /** Busy + error UI for the transactional middleware. */
8
+ notifier?: IReactNotifier;
9
+ /** Undo manager the sheet records into: F4 / redo-as-repeat. */
10
+ manager?: UndoManager;
11
+ }
12
+ /**
13
+ * **Sparkline command behavior**: Excel's Sparkline tab, for the sparklines the selection holds.
14
+ *
15
+ * @remarks
16
+ * The `sparkline` scope, contributed only while the active cell has a sparkline (Excel shows the
17
+ * tab then) and removed otherwise, as the `table` scope is. A command changes every group the
18
+ * selection touches, as Excel's tab does: a type, a marker or an axis is the group's, never one
19
+ * sparkline's. Each click is one undo entry (the transactional middleware). The toggles' `state`
20
+ * is the active cell's group's.
21
+ */
22
+ export declare function contributeSparklineCommands(contribution: Command.CommandContribution, data: SparklineCommandData): RemoveListener;
23
+ //# sourceMappingURL=SparklineCommands.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { SparklineDrawing } from './paint/_drawing';
2
+ export { toDrawing, isBlankDrawing, type SparklineDrawing } from './paint/_drawing';
3
+ /** The key a drawing's picture is cached under: the drawing, which states everything it shows. */
4
+ export declare const sparklinePictureKey: (drawing: SparklineDrawing) => string;
5
+ /** The picture of `drawing`, as a URL an `<img>` shows. */
6
+ export declare const getSparklinePicture: (drawing: SparklineDrawing, key?: string) => Promise<string>;
7
+ //# sourceMappingURL=SparklinePictures.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { IColor, SparklineLayout } from '@sheetxl/sdk';
2
+ type Drawn<T extends {
3
+ color: IColor;
4
+ }> = Omit<T, 'color'> & {
5
+ color: string;
6
+ };
7
+ /**
8
+ * A layout with every color drawn for a mode: what the painter paints and what a picture is cached
9
+ * under, so a light and a dark picture are two pictures.
10
+ */
11
+ export interface SparklineDrawing {
12
+ width: number;
13
+ height: number;
14
+ axis: Drawn<SparklineLayout.Line> | null;
15
+ line: Drawn<SparklineLayout.Polyline> | null;
16
+ columns: Drawn<SparklineLayout.Column>[];
17
+ markers: Drawn<SparklineLayout.Marker>[];
18
+ }
19
+ /** `layout` as a light or a dark grid draws it: each color as the cells there draw theirs. */
20
+ export declare function toDrawing(layout: SparklineLayout, darkMode: boolean): SparklineDrawing;
21
+ /** Whether a drawing shows anything: a sparkline with no number draws nothing and needs no picture. */
22
+ export declare const isBlankDrawing: (drawing: SparklineDrawing) => boolean;
23
+ export {};
24
+ //# sourceMappingURL=_drawing.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { SparklineDrawing } from './_drawing';
2
+ /** The drawing as ECharts graphic elements, in drawing order. */
3
+ export declare function toGraphicElements(drawing: SparklineDrawing): object[];
4
+ /**
5
+ * Paints the drawing headless, as an SVG document string of its size.
6
+ */
7
+ export declare function renderSparklineToSVG(drawing: SparklineDrawing): string;
8
+ //# sourceMappingURL=echarts.d.ts.map