@sheetpane/mcp 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/ERRORS.md +270 -1
- package/dist/custom-elements.json +292 -27
- package/dist/plugins.json +6 -0
- package/dist/tools.d.ts +10 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +110 -47
- package/dist/tools.js.map +1 -1
- package/package.json +7 -6
|
@@ -112,6 +112,49 @@
|
|
|
112
112
|
},
|
|
113
113
|
"default": "'on'",
|
|
114
114
|
"fieldName": "flagging"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "ref",
|
|
118
|
+
"description": "The cell or range selected once a file is read, scrolled into view: `B4`, `Data!B4`, `'Q3 data'!B4:D8`; setting it later selects it then. One that names no cell is warned (SP-3019) and the sheet opens at A1. React, Vue and Solid keep `ref` for their own refs — set it with `setAttribute`.",
|
|
119
|
+
"type": {
|
|
120
|
+
"text": "string"
|
|
121
|
+
},
|
|
122
|
+
"fieldName": "ref"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "link",
|
|
126
|
+
"description": "`none` (the default) or `hash`: the selection is kept in the URL fragment as `#sheetpane=<pane>:<Sheet>!<ref>`, read when a file is read and on back and forward, and *Copy link* joins the cell menu. The rest of the fragment is the host's and is kept as it was.",
|
|
127
|
+
"type": {
|
|
128
|
+
"text": "'none' | 'hash'"
|
|
129
|
+
},
|
|
130
|
+
"default": "'none'",
|
|
131
|
+
"fieldName": "link"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "results",
|
|
135
|
+
"description": "`summary` (the default), `marks` or `off`: how `pass` and `skipped` results show, pane-wide (W-50).",
|
|
136
|
+
"type": {
|
|
137
|
+
"text": "'summary' | 'marks' | 'off'"
|
|
138
|
+
},
|
|
139
|
+
"default": "'summary'",
|
|
140
|
+
"fieldName": "results"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "layers",
|
|
144
|
+
"description": "Space-separated review layers to show (W-51); none shows every layer. Shared by the pane's elements.",
|
|
145
|
+
"type": {
|
|
146
|
+
"text": "string"
|
|
147
|
+
},
|
|
148
|
+
"fieldName": "layers"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "protection",
|
|
152
|
+
"description": "`honour` (the default) or `ignore`: whether a protected sheet's locked cells refuse edits and a protected structure keeps its sheets, pane-wide (W-62). `ignore` is the host's decision; the file is unchanged.",
|
|
153
|
+
"type": {
|
|
154
|
+
"text": "'honour' | 'ignore'"
|
|
155
|
+
},
|
|
156
|
+
"default": "'honour'",
|
|
157
|
+
"fieldName": "protection"
|
|
115
158
|
}
|
|
116
159
|
],
|
|
117
160
|
"members": [
|
|
@@ -142,6 +185,15 @@
|
|
|
142
185
|
},
|
|
143
186
|
"description": "The types offered in the Flag issue form; an empty list falls back to `DEFAULT_ERROR_TYPES`."
|
|
144
187
|
},
|
|
188
|
+
{
|
|
189
|
+
"kind": "field",
|
|
190
|
+
"name": "renderDetail",
|
|
191
|
+
"privacy": "public",
|
|
192
|
+
"type": {
|
|
193
|
+
"text": "RenderDetail | undefined"
|
|
194
|
+
},
|
|
195
|
+
"description": "The host's extra detail for an error (W-68): called with a copy of the error when its card opens in the sheet, and\ndrawn after the message in a `part=\"detail\"` region. A string is text, never HTML; a Node is the host's own. Called\nagain only when the error changes (its `meta` included) or this is replaced; a throw is logged as SP-3017. Set it on\neach element that should show it — `<sheetpane-errors>` has its own."
|
|
196
|
+
},
|
|
145
197
|
{
|
|
146
198
|
"kind": "field",
|
|
147
199
|
"name": "file",
|
|
@@ -151,6 +203,17 @@
|
|
|
151
203
|
},
|
|
152
204
|
"description": "Loads a file, like `load()`; `null` does nothing."
|
|
153
205
|
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "field",
|
|
208
|
+
"name": "layers",
|
|
209
|
+
"privacy": "public",
|
|
210
|
+
"type": {
|
|
211
|
+
"text": "string[]"
|
|
212
|
+
},
|
|
213
|
+
"description": "The review layers shown (W-51) — the pane's, shared with `<sheetpane-errors>`: every layer until the `layers`\nattribute or the switch names some. Setting it sets the attribute; `null` or `[]` shows every layer.",
|
|
214
|
+
"attribute": "layers",
|
|
215
|
+
"reflects": true
|
|
216
|
+
},
|
|
154
217
|
{
|
|
155
218
|
"kind": "field",
|
|
156
219
|
"name": "mode",
|
|
@@ -193,6 +256,28 @@
|
|
|
193
256
|
"attribute": "flagging",
|
|
194
257
|
"reflects": true
|
|
195
258
|
},
|
|
259
|
+
{
|
|
260
|
+
"kind": "field",
|
|
261
|
+
"name": "results",
|
|
262
|
+
"privacy": "public",
|
|
263
|
+
"type": {
|
|
264
|
+
"text": "ResultsLevel"
|
|
265
|
+
},
|
|
266
|
+
"description": "The pane's results level (W-50): `summary` (the default), `marks` or `off`; setting it sets the `results` attribute.",
|
|
267
|
+
"attribute": "results",
|
|
268
|
+
"reflects": true
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"kind": "field",
|
|
272
|
+
"name": "protection",
|
|
273
|
+
"privacy": "public",
|
|
274
|
+
"type": {
|
|
275
|
+
"text": "ProtectionMode"
|
|
276
|
+
},
|
|
277
|
+
"description": "The pane's protection mode (W-62): `honour` (the default) keeps the file's protection; `ignore` is the host's decision. Setting it sets the `protection` attribute.",
|
|
278
|
+
"attribute": "protection",
|
|
279
|
+
"reflects": true
|
|
280
|
+
},
|
|
196
281
|
{
|
|
197
282
|
"kind": "field",
|
|
198
283
|
"name": "columns",
|
|
@@ -253,6 +338,28 @@
|
|
|
253
338
|
"attribute": "src",
|
|
254
339
|
"reflects": true
|
|
255
340
|
},
|
|
341
|
+
{
|
|
342
|
+
"kind": "field",
|
|
343
|
+
"name": "ref",
|
|
344
|
+
"privacy": "public",
|
|
345
|
+
"type": {
|
|
346
|
+
"text": "string | null"
|
|
347
|
+
},
|
|
348
|
+
"description": "The `ref` attribute: the cell or range selected once a file is read (W-66); `null`, `undefined` or `''` removes it.",
|
|
349
|
+
"attribute": "ref",
|
|
350
|
+
"reflects": true
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"kind": "field",
|
|
354
|
+
"name": "link",
|
|
355
|
+
"privacy": "public",
|
|
356
|
+
"type": {
|
|
357
|
+
"text": "'none' | 'hash'"
|
|
358
|
+
},
|
|
359
|
+
"description": "`none` (the default) or `hash`: the selection kept in the URL fragment, and *Copy link* in the cell menu (W-66).",
|
|
360
|
+
"attribute": "link",
|
|
361
|
+
"reflects": true
|
|
362
|
+
},
|
|
256
363
|
{
|
|
257
364
|
"kind": "method",
|
|
258
365
|
"name": "load",
|
|
@@ -283,7 +390,7 @@
|
|
|
283
390
|
"kind": "method",
|
|
284
391
|
"name": "export",
|
|
285
392
|
"privacy": "public",
|
|
286
|
-
"description": "Every change applied; the upload untouched. Also dispatches `sheetpane-export
|
|
393
|
+
"description": "Every change applied; the upload untouched. Also dispatches `sheetpane-export`, with the blob's SHA-256 (W-65).",
|
|
287
394
|
"parameters": [
|
|
288
395
|
{
|
|
289
396
|
"name": "options",
|
|
@@ -335,7 +442,16 @@
|
|
|
335
442
|
"kind": "method",
|
|
336
443
|
"name": "getErrors",
|
|
337
444
|
"privacy": "public",
|
|
338
|
-
"description": "A copy of the pane's errors, to save a review.",
|
|
445
|
+
"description": "A copy of the pane's errors, to save a review; `{ layer }` gives one layer's (W-51).",
|
|
446
|
+
"parameters": [
|
|
447
|
+
{
|
|
448
|
+
"name": "o",
|
|
449
|
+
"optional": true,
|
|
450
|
+
"type": {
|
|
451
|
+
"text": "{ layer?: string }"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
],
|
|
339
455
|
"return": {
|
|
340
456
|
"type": {
|
|
341
457
|
"text": "SheetpaneError[]"
|
|
@@ -346,12 +462,19 @@
|
|
|
346
462
|
"kind": "method",
|
|
347
463
|
"name": "setErrors",
|
|
348
464
|
"privacy": "public",
|
|
349
|
-
"description": "Restores a saved review
|
|
465
|
+
"description": "Restores a saved review — a list or the `sheetpane-errors` envelope — clearing the undo stack; `{ layer }` replaces that layer only (W-51).",
|
|
350
466
|
"parameters": [
|
|
351
467
|
{
|
|
352
468
|
"name": "list",
|
|
353
469
|
"type": {
|
|
354
|
-
"text": "SheetpaneError[]"
|
|
470
|
+
"text": "SheetpaneError[] | ErrorsEnvelope"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"name": "o",
|
|
475
|
+
"optional": true,
|
|
476
|
+
"type": {
|
|
477
|
+
"text": "{ layer?: string }"
|
|
355
478
|
}
|
|
356
479
|
}
|
|
357
480
|
],
|
|
@@ -361,6 +484,43 @@
|
|
|
361
484
|
}
|
|
362
485
|
}
|
|
363
486
|
},
|
|
487
|
+
{
|
|
488
|
+
"kind": "method",
|
|
489
|
+
"name": "highlight",
|
|
490
|
+
"privacy": "public",
|
|
491
|
+
"description": "Outlines cells from outside without selecting them (W-56): a pass-through outline on the overlay —\nnot a change, not undone, not in the download, and the selection stays where it is. Each call\nreplaces the last; the outline goes on a sheet switch unless `pinned`, and with a new file. A range\nthat is not A1 (`B3`, `B3:D8`, `Data!B3`, `'Q3 data'!B3:D8`) or names a sheet the workbook lacks is\nskipped. A view setting of this element, like zoom.\n@param ranges - One range or several; an object gives one its own sheet or tone.\n@param options - `tone`, `label` (said once by the status line), `sheet`, `pinned`, `reveal`.\n@returns How many ranges are outlined; 0 before a file is loaded.",
|
|
492
|
+
"parameters": [
|
|
493
|
+
{
|
|
494
|
+
"name": "ranges",
|
|
495
|
+
"type": {
|
|
496
|
+
"text": "HighlightRange | readonly HighlightRange[]"
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "options",
|
|
501
|
+
"optional": true,
|
|
502
|
+
"type": {
|
|
503
|
+
"text": "HighlightOptions"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"return": {
|
|
508
|
+
"type": {
|
|
509
|
+
"text": "number"
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"kind": "method",
|
|
515
|
+
"name": "clearHighlight",
|
|
516
|
+
"privacy": "public",
|
|
517
|
+
"description": "Removes the outline `highlight()` drew (W-56).",
|
|
518
|
+
"return": {
|
|
519
|
+
"type": {
|
|
520
|
+
"text": "void"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
364
524
|
{
|
|
365
525
|
"kind": "method",
|
|
366
526
|
"name": "undo",
|
|
@@ -504,23 +664,30 @@
|
|
|
504
664
|
{
|
|
505
665
|
"name": "sheetpane-load",
|
|
506
666
|
"type": {
|
|
507
|
-
"text": "CustomEvent<{ status: 'ready'; name: string; kind: 'xlsx' | 'csv'; sheets: string[]; readMs: number } | { status: 'error'; code: string; spCode: SpCode; message: string; name: string; detail?: string }>"
|
|
667
|
+
"text": "CustomEvent<{ status: 'ready'; name: string; kind: 'xlsx' | 'csv'; sheets: string[]; readMs: number; sha256: string | undefined } | { status: 'error'; code: string; spCode: SpCode; message: string; name: string; detail?: string }>"
|
|
508
668
|
},
|
|
509
|
-
"description": "`{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`."
|
|
669
|
+
"description": "`{ status: 'ready', name, kind, sheets, readMs, sha256 }` when a file is read (`sha256`: the file's SHA-256, W-65), or the refusal `{ status: 'error', code, spCode, message, name, detail? }`."
|
|
510
670
|
},
|
|
511
671
|
{
|
|
512
672
|
"name": "sheetpane-change",
|
|
513
673
|
"type": {
|
|
514
|
-
"text": "CustomEvent<{ sheet: string; ref: string; kind: ChangeKind; was: unknown; now: unknown }>"
|
|
674
|
+
"text": "CustomEvent<{ sheet: string; ref: string; kind: ChangeKind; was: unknown; now: unknown; op?: 'insertRows' | 'deleteRows' | 'insertCols' | 'deleteCols'; at?: number; count?: number }>"
|
|
515
675
|
},
|
|
516
|
-
"description": "`{ sheet, ref, kind, was, now }` for each change, undo and redo included
|
|
676
|
+
"description": "`{ sheet, ref, kind, was, now, op?, at?, count? }` for each change, undo and redo included; rows or columns inserted or deleted (W-52) are one event, `kind: 'structure'`, with `op`, `at` (0-based) and `count`."
|
|
517
677
|
},
|
|
518
678
|
{
|
|
519
679
|
"name": "sheetpane-errors",
|
|
520
680
|
"type": {
|
|
521
|
-
"text": "CustomEvent<{ errors: SheetpaneError[]; plugins: string[] }>"
|
|
681
|
+
"text": "CustomEvent<{ v: 2; errors: SheetpaneError[]; plugins: string[]; layers: string[]; changed: string[] }>"
|
|
522
682
|
},
|
|
523
|
-
"description": "`{ errors, plugins }` when the pane's errors change."
|
|
683
|
+
"description": "`{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed."
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "sheetpane-layers",
|
|
687
|
+
"type": {
|
|
688
|
+
"text": "CustomEvent<{ visible: string[]; layers: string[] }>"
|
|
689
|
+
},
|
|
690
|
+
"description": "`{ visible, layers }` when the visible review layers change (W-51)."
|
|
524
691
|
},
|
|
525
692
|
{
|
|
526
693
|
"name": "sheetpane-select",
|
|
@@ -543,6 +710,13 @@
|
|
|
543
710
|
},
|
|
544
711
|
"description": "`{ sheet, axis, indexes, px, via }` when a column width or row height is set by a drag, a fit, the header menu or a reset — on release, never during a drag (W-47)."
|
|
545
712
|
},
|
|
713
|
+
{
|
|
714
|
+
"name": "sheetpane-hover",
|
|
715
|
+
"type": {
|
|
716
|
+
"text": "CustomEvent<{ sheet: string; ref: string; column: { index: number; letter: string; header: string } } | null>"
|
|
717
|
+
},
|
|
718
|
+
"description": "`{ sheet, ref, column }` when a mouse or pen pointer moves onto another cell (a merge's top-left), at most once per frame, or `null` when it leaves the cells; never for a finger (W-56)."
|
|
719
|
+
},
|
|
546
720
|
{
|
|
547
721
|
"name": "sheetpane-sheet",
|
|
548
722
|
"type": {
|
|
@@ -567,9 +741,9 @@
|
|
|
567
741
|
{
|
|
568
742
|
"name": "sheetpane-editstart",
|
|
569
743
|
"type": {
|
|
570
|
-
"text": "CustomEvent<{ sheet: string; ref: string; column: { index: number; letter: string; header: string }; value: unknown }>"
|
|
744
|
+
"text": "CustomEvent<{ sheet: string; ref: string; column: { index: number; letter: string; header: string }; value: unknown; richText?: true }>"
|
|
571
745
|
},
|
|
572
|
-
"description": "`{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only."
|
|
746
|
+
"description": "`{ sheet, ref, column, value, richText?: true }` before a cell edit starts (`richText: true` on a rich-text cell, whose edit saves plain text — W-53); cancellable — the cell stays read-only."
|
|
573
747
|
},
|
|
574
748
|
{
|
|
575
749
|
"name": "sheetpane-input",
|
|
@@ -588,16 +762,16 @@
|
|
|
588
762
|
{
|
|
589
763
|
"name": "sheetpane-editcancel",
|
|
590
764
|
"type": {
|
|
591
|
-
"text": "CustomEvent<{ sheet: string; ref: string } | { sheet: string; ref: string; reason: 'blocked'; code: 'SP-6003'; message: string }>"
|
|
765
|
+
"text": "CustomEvent<{ sheet: string; ref: string } | { sheet: string; ref: string; reason: 'blocked'; code: 'SP-6003'; message: string } | { sheet: string; ref: string; reason: 'locked'; code: 'SP-3026'; message: string }>"
|
|
592
766
|
},
|
|
593
|
-
"description": "`{ sheet, ref }` when Esc restores a draft,
|
|
767
|
+
"description": "`{ sheet, ref }` when Esc restores a draft, `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it, or `{ sheet, ref, reason: 'locked', code: 'SP-3026', message }` when the cell is locked on a protected sheet (W-62)."
|
|
594
768
|
},
|
|
595
769
|
{
|
|
596
770
|
"name": "sheetpane-export",
|
|
597
771
|
"type": {
|
|
598
|
-
"text": "CustomEvent<{ blob: Blob; kind: 'xlsx' | 'csv'; name: string; guarded: string[] | false; format: 'xlsx' | 'csv'; converted: boolean; original?: boolean }>"
|
|
772
|
+
"text": "CustomEvent<{ blob: Blob; kind: 'xlsx' | 'csv'; name: string; guarded: string[] | false; format: 'xlsx' | 'csv'; converted: boolean; sha256: string | undefined; original?: boolean }>"
|
|
599
773
|
},
|
|
600
|
-
"description": "`{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing."
|
|
774
|
+
"description": "`{ blob, kind, name, guarded, format, converted, sha256, original? }` on `export()` and Download (`sha256`: the blob's SHA-256, W-65); cancellable — the Download control then saves nothing."
|
|
601
775
|
},
|
|
602
776
|
{
|
|
603
777
|
"name": "sheetpane-close",
|
|
@@ -637,6 +811,10 @@
|
|
|
637
811
|
{
|
|
638
812
|
"name": "dialog",
|
|
639
813
|
"description": "The modal `<dialog>` the root moves into when `display=\"popup\"`."
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "detail",
|
|
817
|
+
"description": "The host's region in the error card, after the message: what `renderDetail` returns (W-68)."
|
|
640
818
|
}
|
|
641
819
|
],
|
|
642
820
|
"cssProperties": [
|
|
@@ -712,7 +890,7 @@
|
|
|
712
890
|
},
|
|
713
891
|
{
|
|
714
892
|
"name": "--sp-pass",
|
|
715
|
-
"description": "Resolved, passing. Dark theme: `#86B399`.",
|
|
893
|
+
"description": "Resolved, passing; the ✓ result mark. Dark theme: `#86B399`.",
|
|
716
894
|
"default": "#16703E"
|
|
717
895
|
},
|
|
718
896
|
{
|
|
@@ -720,6 +898,11 @@
|
|
|
720
898
|
"description": "Resolved, passing — the tint. Dark theme: `#163225`.",
|
|
721
899
|
"default": "#E6F2EA"
|
|
722
900
|
},
|
|
901
|
+
{
|
|
902
|
+
"name": "--sp-skip",
|
|
903
|
+
"description": "Not checked: the — result mark (W-50). Dark theme: `#A1A1A1`.",
|
|
904
|
+
"default": "#63666E"
|
|
905
|
+
},
|
|
723
906
|
{
|
|
724
907
|
"name": "--sp-fail",
|
|
725
908
|
"description": "Errors. Dark theme: `#D2827B`.",
|
|
@@ -866,7 +1049,7 @@
|
|
|
866
1049
|
},
|
|
867
1050
|
{
|
|
868
1051
|
"name": "readonly",
|
|
869
|
-
"description": "Hides the form, Resolve, Delete, Undo and Redo (a sign-off screen).",
|
|
1052
|
+
"description": "Hides the form, Resolve, Accept…, Delete, Undo and Redo (a sign-off screen).",
|
|
870
1053
|
"type": {
|
|
871
1054
|
"text": "boolean"
|
|
872
1055
|
},
|
|
@@ -874,7 +1057,7 @@
|
|
|
874
1057
|
},
|
|
875
1058
|
{
|
|
876
1059
|
"name": "author",
|
|
877
|
-
"description": "Written into the errors this element's user adds.",
|
|
1060
|
+
"description": "Written into the errors this element's user adds, and as who accepted one (W-69).",
|
|
878
1061
|
"type": {
|
|
879
1062
|
"text": "string"
|
|
880
1063
|
}
|
|
@@ -894,6 +1077,23 @@
|
|
|
894
1077
|
},
|
|
895
1078
|
"default": "'light'",
|
|
896
1079
|
"fieldName": "theme"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"name": "results",
|
|
1083
|
+
"description": "`summary` (the default), `marks` or `off`: how `pass` and `skipped` results show, pane-wide (W-50).",
|
|
1084
|
+
"type": {
|
|
1085
|
+
"text": "'summary' | 'marks' | 'off'"
|
|
1086
|
+
},
|
|
1087
|
+
"default": "'summary'",
|
|
1088
|
+
"fieldName": "results"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"name": "layers",
|
|
1092
|
+
"description": "Space-separated review layers to show (W-51); none shows every layer. Shared by the pane's elements; with two or more layers the header shows a switch.",
|
|
1093
|
+
"type": {
|
|
1094
|
+
"text": "string"
|
|
1095
|
+
},
|
|
1096
|
+
"fieldName": "layers"
|
|
897
1097
|
}
|
|
898
1098
|
],
|
|
899
1099
|
"members": [
|
|
@@ -946,11 +1146,60 @@
|
|
|
946
1146
|
"attribute": "theme",
|
|
947
1147
|
"reflects": true
|
|
948
1148
|
},
|
|
1149
|
+
{
|
|
1150
|
+
"kind": "field",
|
|
1151
|
+
"name": "renderDetail",
|
|
1152
|
+
"privacy": "public",
|
|
1153
|
+
"type": {
|
|
1154
|
+
"text": "RenderDetail | undefined"
|
|
1155
|
+
},
|
|
1156
|
+
"description": "The host's extra detail for an error (W-68): called with a copy of the error when its row is opened, and drawn after\nthe message in a `part=\"detail\"` region. A string is text, never HTML; a Node is the host's own. Called again only when\nthe error changes (its `meta` included) or this is replaced; a throw is logged as SP-3017. Set it on each element\nthat should show it — the sheet's error card has its own."
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
"kind": "field",
|
|
1160
|
+
"name": "results",
|
|
1161
|
+
"privacy": "public",
|
|
1162
|
+
"type": {
|
|
1163
|
+
"text": "ResultsLevel"
|
|
1164
|
+
},
|
|
1165
|
+
"description": "The pane's results level (W-50): `summary` (the default), `marks` or `off`; setting it sets the `results` attribute.",
|
|
1166
|
+
"attribute": "results",
|
|
1167
|
+
"reflects": true
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"kind": "field",
|
|
1171
|
+
"name": "layers",
|
|
1172
|
+
"privacy": "public",
|
|
1173
|
+
"type": {
|
|
1174
|
+
"text": "string[]"
|
|
1175
|
+
},
|
|
1176
|
+
"description": "The review layers shown (W-51) — the pane's, shared with `<sheetpane-excel>`: every layer until the `layers`\nattribute or the switch names some. Setting it sets the attribute; `null` or `[]` shows every layer.",
|
|
1177
|
+
"attribute": "layers",
|
|
1178
|
+
"reflects": true
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"kind": "field",
|
|
1182
|
+
"name": "layerNames",
|
|
1183
|
+
"privacy": "public",
|
|
1184
|
+
"type": {
|
|
1185
|
+
"text": "Readonly<Record<string, string>>"
|
|
1186
|
+
},
|
|
1187
|
+
"description": "What the switch and the rows call each layer (W-51), e.g. `{ pdf: 'PDF check' }`; a layer not named here shows its name (`review` as *Review*)."
|
|
1188
|
+
},
|
|
949
1189
|
{
|
|
950
1190
|
"kind": "method",
|
|
951
1191
|
"name": "getErrors",
|
|
952
1192
|
"privacy": "public",
|
|
953
|
-
"description": "A copy of the pane's errors, to save a review.",
|
|
1193
|
+
"description": "A copy of the pane's errors, to save a review; `{ layer }` gives one layer's (W-51).",
|
|
1194
|
+
"parameters": [
|
|
1195
|
+
{
|
|
1196
|
+
"name": "o",
|
|
1197
|
+
"optional": true,
|
|
1198
|
+
"type": {
|
|
1199
|
+
"text": "{ layer?: string }"
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
],
|
|
954
1203
|
"return": {
|
|
955
1204
|
"type": {
|
|
956
1205
|
"text": "SheetpaneError[]"
|
|
@@ -961,19 +1210,19 @@
|
|
|
961
1210
|
"kind": "method",
|
|
962
1211
|
"name": "setErrors",
|
|
963
1212
|
"privacy": "public",
|
|
964
|
-
"description": "Restores a saved review. `plugins` (from the saved
|
|
1213
|
+
"description": "Restores a saved review — a list, or the `sheetpane-errors` envelope with its layers — or, with `layer`, replaces that\nlayer only (W-51). `plugins` (from the saved envelope; read from it when it is passed whole) shows a notice when it\ndiffers from this pane's set.",
|
|
965
1214
|
"parameters": [
|
|
966
1215
|
{
|
|
967
1216
|
"name": "list",
|
|
968
1217
|
"type": {
|
|
969
|
-
"text": "SheetpaneError[]"
|
|
1218
|
+
"text": "SheetpaneError[] | ErrorsEnvelope"
|
|
970
1219
|
}
|
|
971
1220
|
},
|
|
972
1221
|
{
|
|
973
1222
|
"name": "o",
|
|
974
1223
|
"optional": true,
|
|
975
1224
|
"type": {
|
|
976
|
-
"text": "{ plugins?: string[] }"
|
|
1225
|
+
"text": "{ plugins?: string[]; layer?: string }"
|
|
977
1226
|
}
|
|
978
1227
|
}
|
|
979
1228
|
],
|
|
@@ -999,9 +1248,16 @@
|
|
|
999
1248
|
{
|
|
1000
1249
|
"name": "sheetpane-errors",
|
|
1001
1250
|
"type": {
|
|
1002
|
-
"text": "CustomEvent<{ errors: SheetpaneError[]; plugins: string[] }>"
|
|
1251
|
+
"text": "CustomEvent<{ v: 2; errors: SheetpaneError[]; plugins: string[]; layers: string[]; changed: string[] }>"
|
|
1252
|
+
},
|
|
1253
|
+
"description": "`{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed."
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "sheetpane-layers",
|
|
1257
|
+
"type": {
|
|
1258
|
+
"text": "CustomEvent<{ visible: string[]; layers: string[] }>"
|
|
1003
1259
|
},
|
|
1004
|
-
"description": "`{
|
|
1260
|
+
"description": "`{ visible, layers }` when the visible review layers change — the switch or the `layers` attribute (W-51)."
|
|
1005
1261
|
},
|
|
1006
1262
|
{
|
|
1007
1263
|
"name": "sheetpane-change",
|
|
@@ -1029,7 +1285,7 @@
|
|
|
1029
1285
|
"type": {
|
|
1030
1286
|
"text": "CustomEvent<{ error: SheetpaneError }>"
|
|
1031
1287
|
},
|
|
1032
|
-
"description": "`{ error }` on Show in sheet, so the host can switch tab or open the pop-up."
|
|
1288
|
+
"description": "`{ error }` on Show in sheet, so the host can switch tab or open the pop-up — for a whole-sheet error too (its tab is opened); never for a workbook-level one (W-55); for a result group's Show ▸, its first entry (W-50)."
|
|
1033
1289
|
}
|
|
1034
1290
|
],
|
|
1035
1291
|
"slots": [],
|
|
@@ -1037,6 +1293,10 @@
|
|
|
1037
1293
|
{
|
|
1038
1294
|
"name": "root",
|
|
1039
1295
|
"description": "The panel's frame: the header, the form, the filters and the list."
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
"name": "detail",
|
|
1299
|
+
"description": "The host's region in an open row, after the message: what `renderDetail` returns (W-68)."
|
|
1040
1300
|
}
|
|
1041
1301
|
],
|
|
1042
1302
|
"cssProperties": [
|
|
@@ -1112,7 +1372,7 @@
|
|
|
1112
1372
|
},
|
|
1113
1373
|
{
|
|
1114
1374
|
"name": "--sp-pass",
|
|
1115
|
-
"description": "Resolved, passing. Dark theme: `#86B399`.",
|
|
1375
|
+
"description": "Resolved, passing; the ✓ result mark. Dark theme: `#86B399`.",
|
|
1116
1376
|
"default": "#16703E"
|
|
1117
1377
|
},
|
|
1118
1378
|
{
|
|
@@ -1120,6 +1380,11 @@
|
|
|
1120
1380
|
"description": "Resolved, passing — the tint. Dark theme: `#163225`.",
|
|
1121
1381
|
"default": "#E6F2EA"
|
|
1122
1382
|
},
|
|
1383
|
+
{
|
|
1384
|
+
"name": "--sp-skip",
|
|
1385
|
+
"description": "Not checked: the — result mark (W-50). Dark theme: `#A1A1A1`.",
|
|
1386
|
+
"default": "#63666E"
|
|
1387
|
+
},
|
|
1123
1388
|
{
|
|
1124
1389
|
"name": "--sp-fail",
|
|
1125
1390
|
"description": "Errors. Dark theme: `#D2827B`.",
|
package/dist/plugins.json
CHANGED
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
"description": "Comments and notes for sheetpane — the file's notes and threaded comments read into the error pane; every sheetpane error written back as a threaded comment on export.",
|
|
12
12
|
"record": "records/0112_COMMENTS.md"
|
|
13
13
|
},
|
|
14
|
+
{
|
|
15
|
+
"id": "compare",
|
|
16
|
+
"package": "@sheetpane/compare",
|
|
17
|
+
"description": "What changed between two versions of a workbook, for sheetpane — a headless diffWorkbooks (sheets, rows by key or alignment, cells by value, text and formula) and a grid plugin that tints the changes, sums them up and steps through them.",
|
|
18
|
+
"record": "records/0124_COMPARE.md"
|
|
19
|
+
},
|
|
14
20
|
{
|
|
15
21
|
"id": "condfmt",
|
|
16
22
|
"package": "@sheetpane/condfmt",
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ImportedSheet, type ImportedWorkbook } from '@sheetpane/import';
|
|
2
|
+
import { type DiffOptions } from '@sheetpane/compare';
|
|
2
3
|
/** A tool as `tools/list` shows it, plus the function that answers it. */
|
|
3
4
|
export interface Tool {
|
|
4
5
|
name: string;
|
|
@@ -23,8 +24,16 @@ export declare function guessHeaderRow(s: ImportedSheet): number;
|
|
|
23
24
|
export declare function inspectWorkbook(path: string): Promise<Record<string, unknown>>;
|
|
24
25
|
/** A rules file drafted from a sheet's headers and inferred types — always a draft to review. */
|
|
25
26
|
export declare function draftRules(path: string, sheet?: string): Promise<Record<string, unknown>>;
|
|
26
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* A rules file checked the way the grid checks it and, given a workbook, checked against it by the
|
|
29
|
+
* pane's own `check()` (W-54, no third copy): the notes about the workbook (a sheet or title the
|
|
30
|
+
* rules name that it lacks, a duplicate title) and the cells that fail.
|
|
31
|
+
*/
|
|
27
32
|
export declare function checkRules(json: unknown, path?: string): Promise<Record<string, unknown>>;
|
|
33
|
+
/** What changed between two workbooks — @sheetpane/compare's diffWorkbooks — with rows 1-based and at most `limit` rows and cells listed per sheet. */
|
|
34
|
+
export declare function diffReport(base: string, path: string, o?: DiffOptions & {
|
|
35
|
+
limit?: number;
|
|
36
|
+
}): Promise<Record<string, unknown>>;
|
|
28
37
|
/** The docs entry for an SP code: title, severity, meaning, likely cause, fix and link. */
|
|
29
38
|
export declare function explainCode(code: string): Record<string, unknown>;
|
|
30
39
|
/** The skills whose names and descriptions share the most words with the task — no model. */
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AASA,OAAO,EAAyB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AASA,OAAO,EAAyB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErG,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMlF,0EAA0E;AAC1E,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IAAG,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;AAkC5F,iGAAiG;AACjG,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAG1E;AAyBD,qIAAqI;AACrI,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAQvD;AA4CD,kGAAkG;AAClG,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8BpF;AAID,iGAAiG;AACjG,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA6B/F;AAKD;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAwB/F;AAMD,uJAAuJ;AACvJ,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,GAAE,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8BvI;AAYD,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBjE;AAoBD,6FAA6F;AAC7F,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgB/D;AAMD,uDAAuD;AACvD,eAAO,MAAM,KAAK,EAAE,IAAI,EAqEvB,CAAC;AAEF,2FAA2F;AAC3F,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAS/F"}
|