@sheetpane/grid 0.0.0-stage → 0.1.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.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +429 -2
  3. package/custom-elements.json +1246 -0
  4. package/dist/errors/element.d.ts +108 -0
  5. package/dist/errors/element.d.ts.map +1 -0
  6. package/dist/errors/element.js +456 -0
  7. package/dist/errors/element.js.map +1 -0
  8. package/dist/errors/index.d.ts +2 -0
  9. package/dist/errors/index.d.ts.map +1 -0
  10. package/dist/errors/index.js +3 -0
  11. package/dist/errors/index.js.map +1 -0
  12. package/dist/excel/element.d.ts +434 -0
  13. package/dist/excel/element.d.ts.map +1 -0
  14. package/dist/excel/element.js +3382 -0
  15. package/dist/excel/element.js.map +1 -0
  16. package/dist/excel/geometry.d.ts +81 -0
  17. package/dist/excel/geometry.d.ts.map +1 -0
  18. package/dist/excel/geometry.js +137 -0
  19. package/dist/excel/geometry.js.map +1 -0
  20. package/dist/excel/index.d.ts +2 -0
  21. package/dist/excel/index.d.ts.map +1 -0
  22. package/dist/excel/index.js +3 -0
  23. package/dist/excel/index.js.map +1 -0
  24. package/dist/excel/selection.d.ts +103 -0
  25. package/dist/excel/selection.d.ts.map +1 -0
  26. package/dist/excel/selection.js +189 -0
  27. package/dist/excel/selection.js.map +1 -0
  28. package/dist/excel/styles.d.ts +3 -0
  29. package/dist/excel/styles.d.ts.map +1 -0
  30. package/dist/excel/styles.js +206 -0
  31. package/dist/excel/styles.js.map +1 -0
  32. package/dist/frameworks/elements.d.ts +136 -0
  33. package/dist/frameworks/jsx.d.ts +64 -0
  34. package/dist/frameworks/jsx.js +2 -0
  35. package/dist/frameworks/solid.d.ts +133 -0
  36. package/dist/frameworks/solid.js +2 -0
  37. package/dist/frameworks/svelte.d.ts +102 -0
  38. package/dist/frameworks/svelte.js +2 -0
  39. package/dist/frameworks/vue.d.ts +69 -0
  40. package/dist/frameworks/vue.js +2 -0
  41. package/dist/index.d.ts +23 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +25 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/llms-full.txt +8028 -0
  46. package/dist/llms.txt +111 -0
  47. package/dist/pane/index.d.ts +2 -0
  48. package/dist/pane/index.d.ts.map +1 -0
  49. package/dist/pane/index.js +3 -0
  50. package/dist/pane/index.js.map +1 -0
  51. package/dist/pane/registry.d.ts +33 -0
  52. package/dist/pane/registry.d.ts.map +1 -0
  53. package/dist/pane/registry.js +73 -0
  54. package/dist/pane/registry.js.map +1 -0
  55. package/dist/pane/rules.d.ts +231 -0
  56. package/dist/pane/rules.d.ts.map +1 -0
  57. package/dist/pane/rules.js +792 -0
  58. package/dist/pane/rules.js.map +1 -0
  59. package/dist/pane/store.d.ts +385 -0
  60. package/dist/pane/store.d.ts.map +1 -0
  61. package/dist/pane/store.js +1028 -0
  62. package/dist/pane/store.js.map +1 -0
  63. package/dist/pane/types.d.ts +130 -0
  64. package/dist/pane/types.d.ts.map +1 -0
  65. package/dist/pane/types.js +22 -0
  66. package/dist/pane/types.js.map +1 -0
  67. package/dist/plugins/host.d.ts +56 -0
  68. package/dist/plugins/host.d.ts.map +1 -0
  69. package/dist/plugins/host.js +124 -0
  70. package/dist/plugins/host.js.map +1 -0
  71. package/dist/plugins/types.d.ts +159 -0
  72. package/dist/plugins/types.d.ts.map +1 -0
  73. package/dist/plugins/types.js +12 -0
  74. package/dist/plugins/types.js.map +1 -0
  75. package/dist/rules.schema.json +52 -0
  76. package/dist/shared/dom.d.ts +23 -0
  77. package/dist/shared/dom.d.ts.map +1 -0
  78. package/dist/shared/dom.js +32 -0
  79. package/dist/shared/dom.js.map +1 -0
  80. package/dist/skills-bin.d.ts +3 -0
  81. package/dist/skills-bin.d.ts.map +1 -0
  82. package/dist/skills-bin.js +9 -0
  83. package/dist/skills-bin.js.map +1 -0
  84. package/dist/style.css +3 -0
  85. package/dist/tokens.d.ts +49 -0
  86. package/dist/tokens.d.ts.map +1 -0
  87. package/dist/tokens.js +43 -0
  88. package/dist/tokens.js.map +1 -0
  89. package/dist/vscode.css-custom-data.json +365 -0
  90. package/dist/vscode.html-custom-data.json +218 -0
  91. package/dist/web-types.json +914 -0
  92. package/package.json +72 -3
@@ -0,0 +1,206 @@
1
+ // The sheet's shadow-root styles: the Proof look from the design boards, as
2
+ // `--sp-*` tokens. No font family anywhere (SR-LAW-5): the host's font is
3
+ // inherited through the shadow root; every control is `font: inherit`.
4
+ import { TOKENS_CSS } from '../tokens.js';
5
+ export const BASE_CSS = `${TOKENS_CSS}
6
+ :host{display:block;position:relative;color:var(--sp-ink);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
7
+ :host([hidden]){display:none}
8
+ [hidden]{display:none !important}
9
+ *{box-sizing:border-box}
10
+ button,input,select,textarea{font:inherit;color:inherit}
11
+ .vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
12
+ .btn{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--sp-line-strong);background:var(--sp-surface);color:var(--sp-ink);border-radius:var(--sp-r);font-size:12px;font-weight:500;white-space:nowrap;cursor:pointer}
13
+ .btn:hover{border-color:var(--sp-ink-3)}
14
+ .btn[disabled]{opacity:.45;cursor:not-allowed}
15
+ .btn svg{width:15px;height:15px;flex:none}
16
+ .btn-p{background:var(--sp-accent);border-color:var(--sp-accent);color:var(--sp-on-solid)}
17
+ .btn-p:hover{background:var(--sp-accent-ink);border-color:var(--sp-accent-ink)}
18
+ .btn-g{background:transparent;border-color:transparent;color:var(--sp-ink-2)}
19
+ .btn-g:hover{background:var(--sp-sunken);color:var(--sp-ink)}
20
+ .btn-d{color:var(--sp-fail)}
21
+ .btn-i{width:28px;padding:0;justify-content:center}
22
+ .seg{display:inline-flex;background:var(--sp-sunken);border-radius:var(--sp-r);padding:2px;gap:2px}
23
+ .seg>button{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border:0;background:transparent;border-radius:var(--sp-r-sm);color:var(--sp-ink-2);font-size:13px;font-weight:500;cursor:pointer}
24
+ .seg>button[aria-pressed=true]{background:var(--sp-surface);color:var(--sp-ink);box-shadow:0 1px 2px rgba(22,23,26,.10)}
25
+ .seg svg{width:15px;height:15px}
26
+ .chip{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:500;background:var(--sp-sunken);color:var(--sp-ink-2);white-space:nowrap}
27
+ .chip-fail{background:var(--sp-fail-soft);color:var(--sp-fail)}
28
+ .chip-warn{background:var(--sp-warn-soft);color:var(--sp-warn)}
29
+ .chip-info{background:var(--sp-accent-soft);color:var(--sp-accent-ink)}
30
+ .chip-pass{background:var(--sp-pass-soft);color:var(--sp-pass)}
31
+ .input{height:28px;border:1px solid var(--sp-line-strong);border-radius:var(--sp-r);padding:0 8px;background:var(--sp-surface);min-width:0;font-size:13px}
32
+ .input:focus{outline:2px solid var(--sp-accent);outline-offset:-1px;border-color:var(--sp-accent)}
33
+ textarea.input{height:auto;min-height:56px;padding:6px 8px;resize:vertical;width:100%;line-height:1.45}
34
+ .num{font-variant-numeric:tabular-nums}
35
+ .xs{font-size:12px}.faint{color:var(--sp-ink-3)}.muted{color:var(--sp-ink-2)}
36
+ .g{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--sp-r-sm);font-size:10px;font-weight:700;color:var(--sp-on-solid);flex:none}
37
+ .g-error{background:var(--sp-fail)}.g-warning{background:var(--sp-warn)}.g-note{background:var(--sp-accent)}.g-pass{background:var(--sp-pass)}
38
+ `;
39
+ export const EXCEL_CSS = `${BASE_CSS}
40
+ .sp{display:flex;flex-direction:column;height:100%;min-height:320px;background:var(--sp-surface);border:1px solid var(--sp-line);border-radius:var(--sp-r-lg);overflow:hidden}
41
+ :host([display=popup]) .sp{border:0;border-radius:var(--sp-r-xl)}
42
+ dialog{padding:0;border:0;border-radius:var(--sp-r-xl);width:min(1240px,calc(100vw - 48px));height:min(760px,calc(100vh - 48px));max-width:none;max-height:none;box-shadow:var(--sp-shadow-lg);background:var(--sp-surface);color:inherit;font:inherit}
43
+ dialog::backdrop{background:rgba(22,23,26,.42)}
44
+ .bar{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid var(--sp-line);flex-wrap:wrap}
45
+ .bar .ico{width:18px;height:18px;color:var(--sp-ink-3);flex:none}
46
+ .fname{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;min-width:40px;flex:0 1 auto}
47
+ .counts{display:inline-flex;gap:4px}
48
+ .spacer{flex:1}
49
+ .find{position:relative;display:inline-flex;align-items:center}
50
+ .find svg{position:absolute;left:8px;width:14px;height:14px;color:var(--sp-ink-3);pointer-events:none}
51
+ .find input{padding-left:28px;width:112px}
52
+ .zoom{width:70px;padding:0 2px}
53
+ .find .cnt{font-size:11px;color:var(--sp-ink-3);margin-left:6px;min-width:44px}
54
+ .input.cell[aria-invalid]{outline:2px solid var(--sp-fail);outline-offset:-1px}
55
+ .ptext{display:inline-flex;align-items:center;height:24px;padding:0 8px;border:1px dashed var(--sp-line-strong);border-radius:var(--sp-r-sm);color:var(--sp-ink-2);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40ch;font-variant-numeric:tabular-nums}
56
+ .fx{display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--sp-line);min-height:41px;font-size:13px;flex-wrap:wrap}
57
+ .fx .ref{font-weight:600;min-width:52px;color:var(--sp-ink-2);font-variant-numeric:tabular-nums}
58
+ .fx .val{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
59
+ .fx input.cell{flex:1;max-width:460px;border-color:var(--sp-accent)}
60
+ .tag{font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--sp-ink-3);border:1px solid var(--sp-line-strong);border-radius:4px;padding:3px 5px}
61
+ .frow{display:flex;align-items:center;gap:4px;padding:4px 10px;border-bottom:1px solid var(--sp-line);flex-wrap:wrap;background:var(--sp-ground)}
62
+ .frow .sep{width:1px;height:20px;background:var(--sp-line-strong);margin:0 4px}
63
+ .frow button[aria-pressed=true]{background:var(--sp-accent-soft);border-color:var(--sp-accent)}
64
+ .body{flex:1;min-height:0;display:flex;position:relative}
65
+ .scroller{flex:1;min-width:0;overflow:auto;position:relative;background:var(--sp-cell)}
66
+ .grid{outline:none}
67
+ .scroller:has(.grid:focus-visible){box-shadow:inset 0 0 0 2px var(--sp-accent)}
68
+ .sheet{position:relative}
69
+ .hrow{position:sticky;top:0;z-index:5;display:flex;background:var(--sp-head)}
70
+ .row{position:absolute;left:0;display:flex}
71
+ .frozen{position:sticky;z-index:3;display:flex;background:var(--sp-cell)}
72
+ .rh,.corner{position:sticky;left:0;z-index:2;flex:none;display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:0 6px;background:var(--sp-head);border-right:1px solid var(--sp-line);border-bottom:1px solid var(--sp-grid);color:var(--sp-ink-3);font-size:.85em;font-variant-numeric:tabular-nums}
73
+ .corner{z-index:6}
74
+ .ch{position:absolute;top:0;display:flex;align-items:center;justify-content:center;background:var(--sp-head);border-right:1px solid var(--sp-grid);border-bottom:1px solid var(--sp-line);color:var(--sp-ink-3);font-size:.85em;font-weight:500}
75
+ .ch.fz,.c.fz{position:sticky;z-index:2;top:auto}
76
+ .c{position:absolute;top:0;padding:0 .6em;border-right:1px solid var(--sp-grid);border-bottom:1px solid var(--sp-grid);overflow:hidden;background:var(--sp-cell);cursor:cell;font-size:var(--sp-cell-font-size,.93em);display:flex;flex-direction:column;justify-content:center;white-space:nowrap}
77
+ .c>.v{position:relative;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:inherit;text-align:inherit;min-width:0}
78
+ .c.fz{background:var(--sp-cell)}
79
+ .c.n{text-align:right;font-variant-numeric:tabular-nums}
80
+ .c.merge{text-align:center;font-weight:600;background:var(--sp-head);z-index:1}
81
+ /* state tints sit above a file's own fill (a decorate background), never instead of it */
82
+ .c.hit::before,.c.m-error::before,.c.m-warning::before,.c.m-note::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.6}
83
+ /* the selection layer (W-46): one fill, one border, the active cell's ring — never per cell */
84
+ .sellayer{position:absolute;inset:0;display:grid;pointer-events:none}
85
+ .sellayer>*{grid-area:1/1;align-self:start;justify-self:start;box-sizing:border-box;pointer-events:none}
86
+ .sf{background:var(--sp-accent-soft);opacity:.6}
87
+ .sb,.sa,.sc{border:0 solid var(--sp-accent)}
88
+ .sc{border-style:dashed}
89
+ .sband{box-sizing:border-box;pointer-events:none}
90
+ .sh{width:24px;height:24px;display:grid;place-items:center;pointer-events:auto!important;touch-action:none;cursor:grab}
91
+ .sh::after{content:"";width:12px;height:12px;border-radius:50%;background:var(--sp-cell);border:2px solid var(--sp-accent);box-sizing:border-box}
92
+ .ch.on,.rh.on{background:var(--sp-accent-soft);color:var(--sp-accent-ink)}
93
+ .ch.on{box-shadow:inset 0 -2px 0 var(--sp-accent)}
94
+ .rh.on{box-shadow:inset -2px 0 0 var(--sp-accent)}
95
+ .ch,.rh,.corner{cursor:default;user-select:none}
96
+ /* header edges resize (W-47): an 8 px zone across each boundary, a 2 px accent line on hover */
97
+ .ch .rz{position:absolute;top:0;bottom:0;width:4px;cursor:col-resize;z-index:1;touch-action:none}
98
+ .ch .rzs{left:0}.ch .rze{right:0}
99
+ .ch .rzs:hover{box-shadow:inset 2px 0 0 var(--sp-accent)}.ch .rze:hover{box-shadow:inset -2px 0 0 var(--sp-accent)}
100
+ .rh .rz{position:absolute;left:0;right:0;height:4px;cursor:row-resize;z-index:1;touch-action:none}
101
+ .rh .rzs{top:0}.rh .rze{bottom:0}
102
+ .rh .rzs:hover{box-shadow:inset 0 2px 0 var(--sp-accent)}.rh .rze:hover{box-shadow:inset 0 -2px 0 var(--sp-accent)}
103
+ @media (pointer:coarse){.ch.on .rze,.rh.on .rze{background:var(--sp-accent);opacity:.5;width:24px;margin-right:-10px}.rh.on .rze{width:auto;height:24px;margin:0 0 -10px}}
104
+ .rzguide{position:absolute;background:var(--sp-accent);pointer-events:none!important;z-index:5}
105
+ .rztip{position:absolute;padding:2px 6px;border-radius:4px;background:var(--sp-ink);color:var(--sp-cell);font-size:12px;white-space:nowrap;pointer-events:none!important;z-index:5}
106
+ .szpop .field input{width:100%}
107
+ .c.hit::before{background:var(--sp-hit);opacity:.85}
108
+ .c.hit.cur::before{background:var(--sp-hit-current)}
109
+ .c.chg::after{content:"";position:absolute;top:0;right:0;z-index:2;border-style:solid;border-width:0 7px 7px 0;border-color:transparent var(--sp-changed) transparent transparent;filter:drop-shadow(0 0 1px var(--sp-cell))}
110
+ .c.m-error{box-shadow:inset 0 0 0 1.5px var(--sp-fail)}.c.m-error::before{background:var(--sp-fail-soft)}
111
+ .c.m-warning{box-shadow:inset 0 0 0 1.5px var(--sp-warn)}.c.m-warning::before{background:var(--sp-warn-soft)}
112
+ .c.m-note{box-shadow:inset 0 0 0 1.5px var(--sp-accent)}.c.m-note::before{background:var(--sp-accent-soft)}
113
+ .c.m-pass{box-shadow:inset 0 0 0 1.5px var(--sp-pass)}
114
+ .c.stale>.v{color:var(--sp-ink-3);font-style:italic}
115
+ .c.stale>.v::before{content:"≈ ";color:var(--sp-warn);font-style:normal}
116
+ .c.derived>.v{color:var(--sp-accent-ink)}
117
+ .c .mk{position:absolute;z-index:2;right:2px;top:50%;transform:translateY(-50%);border:0;background:transparent;padding:0 2px;cursor:pointer;color:var(--sp-ink-3)}
118
+ .overlay{position:absolute;inset:0;pointer-events:none;z-index:4}
119
+ .overlay>*{pointer-events:auto}
120
+ .pin{position:absolute;min-width:18px;height:18px;padding:0 4px;border-radius:9px;border:0;font-size:10px;font-weight:700;line-height:18px;color:var(--sp-on-solid);text-align:center;box-shadow:0 0 0 2px var(--sp-cell),0 1px 4px rgba(22,23,26,.3);cursor:pointer;font-variant-numeric:tabular-nums}
121
+ .pin.error{background:var(--sp-fail)}.pin.warning{background:var(--sp-warn)}.pin.note{background:var(--sp-accent)}.pin.resolved{background:var(--sp-pass)}
122
+ .pin.on{box-shadow:0 0 0 2px var(--sp-cell),0 0 0 4px var(--sp-ink)}
123
+ .pin.square{border-radius:3px;min-width:16px;height:16px;line-height:16px;padding:0 2px}
124
+ .pin.pending{background:var(--sp-cell);color:var(--sp-accent);box-shadow:0 0 0 1.5px var(--sp-accent)}
125
+ .badge{position:absolute;font-size:11px;padding:2px 6px;border-radius:4px;background:var(--sp-sunken);color:var(--sp-ink-2);border:1px dashed var(--sp-line-strong);white-space:nowrap}
126
+ .olay{position:absolute;overflow:hidden}
127
+ .fx{container-type:inline-size}
128
+ .dock{display:inline-flex;align-items:center;gap:4px;margin-left:auto}
129
+ .dock[hidden]{display:none}
130
+ .dock .plug{display:inline-flex;gap:2px}
131
+ .dock .kbd,.ctxmenu .kbd,.moremenu .kbd{margin-left:6px;font-size:10px;color:var(--sp-ink-3);border:1px solid var(--sp-line);border-radius:3px;padding:0 4px}
132
+ .morewrap{position:relative;display:inline-flex}
133
+ .moremenu{position:absolute;top:calc(100% + 4px);right:0;z-index:9;min-width:180px;padding:4px}
134
+ .ctxmenu{position:absolute;z-index:9;min-width:190px;padding:4px}
135
+ .mi{display:flex;align-items:center;justify-content:space-between;width:100%;height:30px;padding:0 10px;border:0;border-radius:var(--sp-r-sm);background:transparent;color:var(--sp-ink);font:inherit;font-size:13px;text-align:left;cursor:pointer}
136
+ .mi:hover,.mi:focus-visible{background:var(--sp-sunken);outline:none}
137
+ .mi[disabled]{color:var(--sp-ink-3);cursor:default}
138
+ /* plugin buttons stay in the bar while it is wide, and fold into ⋯ before Flag issue moves */
139
+ .moremenu .fold{display:none}
140
+ @container (max-width: 720px){.dock .plug{display:none}.moremenu .fold{display:flex}}
141
+ .warn-t{color:var(--sp-warn)}
142
+ .export .badge-n{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--sp-sunken);color:var(--sp-ink);font-size:11px;font-weight:700;line-height:18px;text-align:center}
143
+ .split{position:relative;display:inline-flex}
144
+ .split>.export{border-top-right-radius:0;border-bottom-right-radius:0}
145
+ .split>.dlmore{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;width:26px;padding:0}
146
+ .dlmenu{position:absolute;top:calc(100% + 4px);right:0;z-index:12;min-width:250px;padding:4px}
147
+ .mnote{display:block;padding:0 10px 6px;font-size:11px;color:var(--sp-ink-3)}
148
+ .msep{height:1px;margin:4px 6px;background:var(--sp-line)}
149
+ .export .badge-n[hidden]{display:none}
150
+ .kbd{display:inline-block;font-size:11px;padding:2px 5px;border:1px solid rgba(255,255,255,.35);border-radius:4px}
151
+ .card{position:absolute;background:var(--sp-surface);border:1px solid var(--sp-line);border-radius:var(--sp-r-lg);box-shadow:var(--sp-shadow);z-index:8;overflow:hidden;display:flex;flex-direction:column}
152
+ .card .hd{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--sp-line)}
153
+ .card .hd .t{font-weight:600;font-size:13px}
154
+ .card .bd{padding:10px 12px;display:flex;flex-direction:column;gap:10px}
155
+ .card .ft{display:flex;gap:6px;padding:8px 10px;border-top:1px solid var(--sp-line);background:var(--sp-ground);align-items:center}
156
+ .fe{display:grid;grid-template-columns:76px 1fr;gap:6px 10px;align-items:baseline;margin:0}
157
+ .fe dt{font-size:10px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--sp-ink-3)}
158
+ .fe dd{margin:0;font-size:13px;min-width:0;overflow-wrap:anywhere}
159
+ .found{color:var(--sp-fail);text-decoration:line-through;background:var(--sp-fail-soft);padding:1px 4px;border-radius:3px}
160
+ .want{color:var(--sp-pass);background:var(--sp-pass-soft);padding:1px 4px;border-radius:3px}
161
+ .field{display:flex;flex-direction:column;gap:4px}
162
+ .field>span{font-size:12px;font-weight:500;color:var(--sp-ink-2)}
163
+ .tabs{display:flex;gap:2px;padding:0 8px;border-top:1px solid var(--sp-line);background:var(--sp-ground);overflow-x:auto}
164
+ .tab{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:0;border-top:2px solid transparent;background:transparent;color:var(--sp-ink-2);font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap}
165
+ .tab[aria-selected=true]{background:var(--sp-surface);color:var(--sp-ink);border-top-color:var(--sp-accent)}
166
+ .tab.hid{border:1px dashed var(--sp-line-strong);border-bottom:0;color:var(--sp-ink-2)}
167
+ .tab.hidbtn{color:var(--sp-ink-3)}
168
+ .hidmenuslot{position:relative;height:0}
169
+ .tabmenu{position:absolute;bottom:0;z-index:20;min-width:200px;padding:4px;display:flex;flex-direction:column}
170
+ .hidmenu{position:absolute;bottom:0;right:8px;z-index:20;min-width:220px;padding:4px;display:flex;flex-direction:column}
171
+ .hidbar{display:flex;align-items:center;gap:8px;padding:4px 12px;border-bottom:1px solid var(--sp-line);background:var(--sp-warn-soft);color:var(--sp-ink);font-size:13px}
172
+ .hidbar[hidden]{display:none}
173
+ /* hidden rows and columns (W-49): a marker pair on the boundary, a double line through the cells, hatch when shown */
174
+ .hidlayer{position:absolute;inset:0;display:grid;pointer-events:none}
175
+ .hidlayer>*{grid-area:1/1;align-self:start;justify-self:start;box-sizing:border-box}
176
+ .hline{position:relative;z-index:1;pointer-events:none}
177
+ .hline.hv{width:4px;border-left:1px solid var(--sp-line-strong);border-right:1px solid var(--sp-line-strong)}
178
+ .hline.hh{height:4px;border-top:1px solid var(--sp-line-strong);border-bottom:1px solid var(--sp-line-strong)}
179
+ .hmk{display:inline-flex;align-items:center;gap:2px;height:18px;padding:0 3px;border:1px solid var(--sp-line-strong);border-radius:4px;background:var(--sp-surface);color:var(--sp-ink-3);font-size:10px;line-height:1;cursor:pointer;z-index:3;pointer-events:auto}
180
+ .hmk.hmc{z-index:6}
181
+ .tablist{display:flex;gap:2px}
182
+ /* outline groups (W-49): brackets and +/− in the gutter, level buttons in the corner */
183
+ .obtn{width:14px;height:14px;padding:0;display:inline-grid;place-items:center;border:1px solid var(--sp-line-strong);border-radius:3px;background:var(--sp-surface);color:var(--sp-ink-2);font-size:11px;line-height:1;cursor:pointer;z-index:4;pointer-events:auto}
184
+ .obtn.olvl{width:16px;height:16px}
185
+ .obr{z-index:4;pointer-events:none;box-sizing:border-box}
186
+ .obr-r{width:4px;border-left:2px solid var(--sp-ink-3);border-bottom:2px solid var(--sp-ink-3)}
187
+ .obr-c{height:4px;border-top:2px solid var(--sp-ink-3);border-right:2px solid var(--sp-ink-3)}
188
+ @media (pointer:coarse){.obtn{width:24px;height:24px}}
189
+ .hmk .g{font-size:10px}
190
+ @media (pointer:coarse){.hmk{min-width:24px;min-height:24px;justify-content:center}}
191
+ .ch.rev,.rh.rev{background-image:repeating-linear-gradient(135deg,transparent 0 4px,var(--sp-line) 4px 5px)}
192
+ .c.rev{background-image:repeating-linear-gradient(135deg,transparent 0 6px,var(--sp-grid) 6px 7px)}
193
+ .tab .cnt{font-size:10px;font-weight:700;padding:1px 5px;border-radius:999px;background:var(--sp-fail-soft);color:var(--sp-fail)}
194
+ .status{display:flex;align-items:center;gap:14px;padding:5px 12px;border-top:1px solid var(--sp-line);background:var(--sp-head);font-size:12px;color:var(--sp-ink-3);flex-wrap:wrap;font-variant-numeric:tabular-nums}
195
+ .state{flex:1;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--sp-ground)}
196
+ .drop{width:min(560px,100%);border:1.5px dashed var(--sp-line-strong);border-radius:var(--sp-r-lg);background:var(--sp-surface);padding:28px 20px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
197
+ .drop.over{border-color:var(--sp-accent);background:var(--sp-accent-soft)}
198
+ .drop .link{color:var(--sp-accent);text-decoration:underline;background:none;border:0;padding:0;cursor:pointer}
199
+ .drop .row{display:flex;gap:6px;width:100%}
200
+ .drop .row .input{flex:1}
201
+ .msg{width:min(520px,100%);display:flex;gap:12px;padding:16px;border-radius:var(--sp-r-lg);border:1px solid;align-items:flex-start;background:var(--sp-surface)}
202
+ .msg.fail{border-color:var(--sp-fail);background:var(--sp-fail-soft)}
203
+ .msg.warn{border-color:var(--sp-warn);background:var(--sp-warn-soft)}
204
+ .msg .t{font-weight:600}
205
+ `;
206
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/excel/styles.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,0EAA0E;AAC1E,uEAAuE;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCpC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKnC,CAAC"}
@@ -0,0 +1,136 @@
1
+ // Generated by scripts/build-manifest.mjs from custom-elements.json (W-37) — do not edit; run the grid build.
2
+ import type { ChangeKind, Mode, SheetpaneError, SheetpaneErrors, SheetpaneExcel, SpCode } from '../index.js';
3
+
4
+ /** The events `<sheetpane-excel>` dispatches, by name; each bubbles and is composed. */
5
+ export interface SheetpaneExcelEventMap {
6
+ /** `{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
7
+ 'sheetpane-load': CustomEvent<{ status: 'ready'; name: string; kind: 'xlsx' | 'csv'; sheets: string[]; readMs: number } | { status: 'error'; code: string; spCode: SpCode; message: string; name: string; detail?: string }>;
8
+ /** `{ sheet, ref, kind, was, now }` for each change, undo and redo included. */
9
+ 'sheetpane-change': CustomEvent<{ sheet: string; ref: string; kind: ChangeKind; was: unknown; now: unknown }>;
10
+ /** `{ errors, plugins }` when the pane's errors change. */
11
+ 'sheetpane-errors': CustomEvent<{ errors: SheetpaneError[]; plugins: string[] }>;
12
+ /** `{ sheet, ref, range, column, value }` when the selection settles — `range` (`B3:D8`) when more than one cell is selected; a drag fires once, on release. */
13
+ 'sheetpane-select': CustomEvent<{ sheet: string; ref: string; range: string | undefined; column: { index: number; letter: string; header: string }; value: unknown }>;
14
+ /** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
15
+ 'sheetpane-visibility': CustomEvent<{ sheet: string; axis: 'row' | 'col' | 'sheet'; indexes: number[]; hidden: boolean; via: 'menu' | 'key' | 'marker' | 'reveal' }>;
16
+ /** `{ 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). */
17
+ 'sheetpane-resize': CustomEvent<{ sheet: string; axis: 'col' | 'row'; indexes: number[]; px: number | number[]; via: 'drag' | 'fit' | 'menu' | 'reset' }>;
18
+ /** `{ sheet }` when the selection moves to another sheet. */
19
+ 'sheetpane-sheet': CustomEvent<{ sheet: string }>;
20
+ /** `{ mode }` when the pane switches between View and Edit. */
21
+ 'sheetpane-mode': CustomEvent<{ mode: Mode }>;
22
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
23
+ 'sheetpane-history': CustomEvent<{ reason: 'undo' | 'redo' | 'cleared'; canUndo: boolean; canRedo: boolean }>;
24
+ /** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
25
+ 'sheetpane-editstart': CustomEvent<{ sheet: string; ref: string; column: { index: number; letter: string; header: string }; value: unknown }>;
26
+ /** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
27
+ 'sheetpane-input': CustomEvent<{ sheet: string; ref: string; column: { index: number; letter: string; header: string }; draft: string; was: unknown }>;
28
+ /** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
29
+ 'sheetpane-beforechange': CustomEvent<{ sheet: string; ref: string; column: { index: number; letter: string; header: string }; was: unknown; now: unknown }>;
30
+ /** `{ sheet, ref }` when Esc restores a draft, or `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it. */
31
+ 'sheetpane-editcancel': CustomEvent<{ sheet: string; ref: string } | { sheet: string; ref: string; reason: 'blocked'; code: 'SP-6003'; message: string }>;
32
+ /** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
33
+ 'sheetpane-export': CustomEvent<{ blob: Blob; kind: 'xlsx' | 'csv'; name: string; guarded: string[] | false; format: 'xlsx' | 'csv'; converted: boolean; original?: boolean }>;
34
+ /** `{}` when the pop-up closes. */
35
+ 'sheetpane-close': CustomEvent<Record<string, never>>;
36
+ }
37
+
38
+ /** The attributes `<sheetpane-excel>` reads, as markup writes them. */
39
+ export interface SheetpaneExcelAttributes {
40
+ /** The pane id shared with other elements; none gives the element its own store. */
41
+ pane?: string | undefined;
42
+ /** A URL (read with a GET; nothing is sent), a data URL or base64. */
43
+ src?: string | undefined;
44
+ /** `view` (the default) or `edit`. */
45
+ mode?: 'view' | 'edit' | undefined;
46
+ /** `tab` (the default) or `popup` (a modal dialog, shown by `open`). */
47
+ display?: 'tab' | 'popup' | undefined;
48
+ /** Shows the pop-up. */
49
+ open?: boolean | undefined;
50
+ /** Written into the errors this element's user flags. */
51
+ author?: string | undefined;
52
+ /** Space-separated registered plugin ids; fixed per pane. */
53
+ plugins?: string | undefined;
54
+ /** `light` (the default), `dark` or `auto`. */
55
+ theme?: 'light' | 'dark' | 'auto' | undefined;
56
+ /** The 1-based row holding column titles (default 1). */
57
+ 'header-row'?: number | `${number}` | undefined;
58
+ /** `flag` (the default) or `block`: what a failing column rule does. */
59
+ 'on-invalid'?: 'flag' | 'block' | undefined;
60
+ /** A URL to a rules file (read with a GET). */
61
+ 'rules-src'?: string | undefined;
62
+ /** `on` (the default) or `off`: no Flag issue anywhere. */
63
+ flagging?: 'on' | 'off' | undefined;
64
+ }
65
+
66
+ /** The properties a framework may set on `<sheetpane-excel>`, typed as the element declares them. */
67
+ export interface SheetpaneExcelProperties {
68
+ /** The pane's store; assigning one replaces the `pane` lookup and applies this element's `mode` to it. */
69
+ workbook?: SheetpaneExcel['workbook'] | undefined;
70
+ /** A copy of the pane's errors; assigning restores a saved review, like `setErrors()`. */
71
+ errors?: SheetpaneExcel['errors'] | undefined;
72
+ /** The types offered in the Flag issue form; an empty list falls back to `DEFAULT_ERROR_TYPES`. */
73
+ errorTypes?: SheetpaneExcel['errorTypes'] | undefined;
74
+ /** Loads a file, like `load()`; `null` does nothing. */
75
+ file?: SheetpaneExcel['file'] | undefined;
76
+ /** The pane's mode, `view` or `edit`; setting it sets the `mode` attribute. */
77
+ mode?: SheetpaneExcel['mode'] | undefined;
78
+ /** `light` (the default), `dark`, or `auto` (follows `prefers-color-scheme`) — colour only; the file's own colours never change (W-29). */
79
+ theme?: SheetpaneExcel['theme'] | undefined;
80
+ /** A rules file (W-33) as an object: `{ version: 1, sheets: { "*": …, "Accounts": { headerRow, columns, cells } } }`. Also `rules-src`. */
81
+ rules?: SheetpaneExcel['rules'] | undefined;
82
+ /** `flagging="off"`: no Flag issue anywhere, no composer, no callout card — the errors panel is the one place errors are read. */
83
+ flagging?: SheetpaneExcel['flagging'] | undefined;
84
+ /** Rules by column title, as plain JSON (`required`, `type`, `min`, `max`, `minLength`, `maxLength`, `pattern`, `oneOf`, `unique`, `message`, `severity`, `onInvalid`). */
85
+ columns?: SheetpaneExcel['columns'] | undefined;
86
+ /** `validate(ctx, signal)`, sync or async: `null`, or `{ severity, message, expected? }`. */
87
+ validate?: SheetpaneExcel['validate'] | undefined;
88
+ /** Whether the pop-up is shown (the `open` attribute). */
89
+ open?: SheetpaneExcel['open'] | undefined;
90
+ /** The column widths and row heights a user set, px at 100 % zoom: `{ [sheet]: { cols: { B: 120 }, rows: { 4: 40 } } }` (columns by letter, rows by number). A view setting like zoom — not a change, not undone, not in the download; a new file clears it. Set it to restore what a host saved from `sheetpane-resize` (W-47). */
91
+ sizes?: SheetpaneExcel['sizes'] | undefined;
92
+ /** The `src` attribute; `null`, `undefined` or `''` removes it. */
93
+ src?: SheetpaneExcel['src'] | undefined;
94
+ }
95
+
96
+ /** The events `<sheetpane-errors>` dispatches, by name; each bubbles and is composed. */
97
+ export interface SheetpaneErrorsEventMap {
98
+ /** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
99
+ 'sheetpane-errors': CustomEvent<{ errors: SheetpaneError[]; plugins: string[] }>;
100
+ /** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
101
+ 'sheetpane-change': CustomEvent<{ sheet: string; ref: string; kind: ChangeKind; was: unknown; now: unknown }>;
102
+ /** `{ sheet, ref }` when picking a row selects its cell. */
103
+ 'sheetpane-select': CustomEvent<{ sheet: string; ref: string }>;
104
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
105
+ 'sheetpane-history': CustomEvent<{ reason: 'undo' | 'redo' | 'cleared'; canUndo: boolean; canRedo: boolean }>;
106
+ /** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
107
+ 'sheetpane-reveal': CustomEvent<{ error: SheetpaneError }>;
108
+ }
109
+
110
+ /** The attributes `<sheetpane-errors>` reads, as markup writes them. */
111
+ export interface SheetpaneErrorsAttributes {
112
+ /** The pane id shared with the sheet; none gives the element its own store. */
113
+ pane?: string | undefined;
114
+ /** Hides the form, Resolve, Delete, Undo and Redo (a sign-off screen). */
115
+ readonly?: boolean | undefined;
116
+ /** Written into the errors this element's user adds. */
117
+ author?: string | undefined;
118
+ /** Space-separated registered plugin ids; fixed per pane. */
119
+ plugins?: string | undefined;
120
+ /** `light` (the default), `dark` or `auto`. */
121
+ theme?: 'light' | 'dark' | 'auto' | undefined;
122
+ }
123
+
124
+ /** The properties a framework may set on `<sheetpane-errors>`, typed as the element declares them. */
125
+ export interface SheetpaneErrorsProperties {
126
+ /** The pane's store; assigning one replaces the `pane` lookup. */
127
+ workbook?: SheetpaneErrors['workbook'] | undefined;
128
+ /** A copy of the pane's errors; assigning restores a saved review, like `setErrors()`. */
129
+ errors?: SheetpaneErrors['errors'] | undefined;
130
+ /** The types offered in the form; an empty list falls back to `DEFAULT_ERROR_TYPES`. */
131
+ errorTypes?: SheetpaneErrors['errorTypes'] | undefined;
132
+ /** Whether the list is read-only (the `readonly` attribute). */
133
+ readOnly?: SheetpaneErrors['readOnly'] | undefined;
134
+ /** `light` (the default), `dark` or `auto` — the same tokens as the sheet (W-29). */
135
+ theme?: SheetpaneErrors['theme'] | undefined;
136
+ }
@@ -0,0 +1,64 @@
1
+ // Generated by scripts/build-manifest.mjs from custom-elements.json (W-37) — do not edit; run the grid build.
2
+ // React 19: `import type {} from '@sheetpane/grid/jsx';` once, e.g. in a .d.ts of the app.
3
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react';
4
+ import type { SheetpaneErrors, SheetpaneExcel } from '../index.js';
5
+ import type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
6
+
7
+ export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
8
+
9
+ /** `<sheetpane-excel>` in React 19 JSX: attributes, properties and `onsheetpane-…` event props (React 19 sets properties and listens to custom events). */
10
+ export type SheetpaneExcelReactProps = SheetpaneExcelAttributes & SheetpaneExcelProperties & {
11
+ /** `{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
12
+ 'onsheetpane-load'?: ((event: SheetpaneExcelEventMap['sheetpane-load']) => void) | undefined;
13
+ /** `{ sheet, ref, kind, was, now }` for each change, undo and redo included. */
14
+ 'onsheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change']) => void) | undefined;
15
+ /** `{ errors, plugins }` when the pane's errors change. */
16
+ 'onsheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors']) => void) | undefined;
17
+ /** `{ sheet, ref, range, column, value }` when the selection settles — `range` (`B3:D8`) when more than one cell is selected; a drag fires once, on release. */
18
+ 'onsheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select']) => void) | undefined;
19
+ /** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
20
+ 'onsheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility']) => void) | undefined;
21
+ /** `{ 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). */
22
+ 'onsheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize']) => void) | undefined;
23
+ /** `{ sheet }` when the selection moves to another sheet. */
24
+ 'onsheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet']) => void) | undefined;
25
+ /** `{ mode }` when the pane switches between View and Edit. */
26
+ 'onsheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode']) => void) | undefined;
27
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
28
+ 'onsheetpane-history'?: ((event: SheetpaneExcelEventMap['sheetpane-history']) => void) | undefined;
29
+ /** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
30
+ 'onsheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart']) => void) | undefined;
31
+ /** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
32
+ 'onsheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input']) => void) | undefined;
33
+ /** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
34
+ 'onsheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange']) => void) | undefined;
35
+ /** `{ sheet, ref }` when Esc restores a draft, or `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it. */
36
+ 'onsheetpane-editcancel'?: ((event: SheetpaneExcelEventMap['sheetpane-editcancel']) => void) | undefined;
37
+ /** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
38
+ 'onsheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export']) => void) | undefined;
39
+ /** `{}` when the pop-up closes. */
40
+ 'onsheetpane-close'?: ((event: SheetpaneExcelEventMap['sheetpane-close']) => void) | undefined;
41
+ };
42
+
43
+ /** `<sheetpane-errors>` in React 19 JSX: attributes, properties and `onsheetpane-…` event props (React 19 sets properties and listens to custom events). */
44
+ export type SheetpaneErrorsReactProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
45
+ /** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
46
+ 'onsheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors']) => void) | undefined;
47
+ /** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
48
+ 'onsheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change']) => void) | undefined;
49
+ /** `{ sheet, ref }` when picking a row selects its cell. */
50
+ 'onsheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select']) => void) | undefined;
51
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
52
+ 'onsheetpane-history'?: ((event: SheetpaneErrorsEventMap['sheetpane-history']) => void) | undefined;
53
+ /** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
54
+ 'onsheetpane-reveal'?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal']) => void) | undefined;
55
+ };
56
+
57
+ declare module 'react' {
58
+ namespace JSX {
59
+ interface IntrinsicElements {
60
+ 'sheetpane-excel': DetailedHTMLProps<HTMLAttributes<SheetpaneExcel>, SheetpaneExcel> & SheetpaneExcelReactProps;
61
+ 'sheetpane-errors': DetailedHTMLProps<HTMLAttributes<SheetpaneErrors>, SheetpaneErrors> & SheetpaneErrorsReactProps;
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,2 @@
1
+ // Types only: see the .d.ts beside this file (W-37).
2
+ export {};
@@ -0,0 +1,133 @@
1
+ // Generated by scripts/build-manifest.mjs from custom-elements.json (W-37) — do not edit; run the grid build.
2
+ // Solid: `import type {} from '@sheetpane/grid/solid';` once, e.g. in src/env.d.ts.
3
+ import type { SheetpaneErrors, SheetpaneExcel } from '../index.js';
4
+ import type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
5
+
6
+ export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
7
+
8
+ /** `<sheetpane-excel>` in Solid JSX: attributes (also as `attr:…`), properties (also as `prop:…`) and `on:sheetpane-…` listeners. Solid sets a custom element's props as properties, so write an attribute with no property (`pane`, `header-row`) as `attr:…`. */
9
+ export type SheetpaneExcelSolidProps = SheetpaneExcelAttributes & SheetpaneExcelProperties & {
10
+ /** The pane id shared with other elements; none gives the element its own store. */
11
+ 'attr:pane'?: string | undefined;
12
+ /** A URL (read with a GET; nothing is sent), a data URL or base64. */
13
+ 'attr:src'?: string | undefined;
14
+ /** `view` (the default) or `edit`. */
15
+ 'attr:mode'?: 'view' | 'edit' | undefined;
16
+ /** `tab` (the default) or `popup` (a modal dialog, shown by `open`). */
17
+ 'attr:display'?: 'tab' | 'popup' | undefined;
18
+ /** Shows the pop-up. */
19
+ 'attr:open'?: boolean | undefined;
20
+ /** Written into the errors this element's user flags. */
21
+ 'attr:author'?: string | undefined;
22
+ /** Space-separated registered plugin ids; fixed per pane. */
23
+ 'attr:plugins'?: string | undefined;
24
+ /** `light` (the default), `dark` or `auto`. */
25
+ 'attr:theme'?: 'light' | 'dark' | 'auto' | undefined;
26
+ /** The 1-based row holding column titles (default 1). */
27
+ 'attr:header-row'?: number | `${number}` | undefined;
28
+ /** `flag` (the default) or `block`: what a failing column rule does. */
29
+ 'attr:on-invalid'?: 'flag' | 'block' | undefined;
30
+ /** A URL to a rules file (read with a GET). */
31
+ 'attr:rules-src'?: string | undefined;
32
+ /** `on` (the default) or `off`: no Flag issue anywhere. */
33
+ 'attr:flagging'?: 'on' | 'off' | undefined;
34
+ /** The pane's store; assigning one replaces the `pane` lookup and applies this element's `mode` to it. */
35
+ 'prop:workbook'?: SheetpaneExcel['workbook'] | undefined;
36
+ /** A copy of the pane's errors; assigning restores a saved review, like `setErrors()`. */
37
+ 'prop:errors'?: SheetpaneExcel['errors'] | undefined;
38
+ /** The types offered in the Flag issue form; an empty list falls back to `DEFAULT_ERROR_TYPES`. */
39
+ 'prop:errorTypes'?: SheetpaneExcel['errorTypes'] | undefined;
40
+ /** Loads a file, like `load()`; `null` does nothing. */
41
+ 'prop:file'?: SheetpaneExcel['file'] | undefined;
42
+ /** The pane's mode, `view` or `edit`; setting it sets the `mode` attribute. */
43
+ 'prop:mode'?: SheetpaneExcel['mode'] | undefined;
44
+ /** `light` (the default), `dark`, or `auto` (follows `prefers-color-scheme`) — colour only; the file's own colours never change (W-29). */
45
+ 'prop:theme'?: SheetpaneExcel['theme'] | undefined;
46
+ /** A rules file (W-33) as an object: `{ version: 1, sheets: { "*": …, "Accounts": { headerRow, columns, cells } } }`. Also `rules-src`. */
47
+ 'prop:rules'?: SheetpaneExcel['rules'] | undefined;
48
+ /** `flagging="off"`: no Flag issue anywhere, no composer, no callout card — the errors panel is the one place errors are read. */
49
+ 'prop:flagging'?: SheetpaneExcel['flagging'] | undefined;
50
+ /** Rules by column title, as plain JSON (`required`, `type`, `min`, `max`, `minLength`, `maxLength`, `pattern`, `oneOf`, `unique`, `message`, `severity`, `onInvalid`). */
51
+ 'prop:columns'?: SheetpaneExcel['columns'] | undefined;
52
+ /** `validate(ctx, signal)`, sync or async: `null`, or `{ severity, message, expected? }`. */
53
+ 'prop:validate'?: SheetpaneExcel['validate'] | undefined;
54
+ /** Whether the pop-up is shown (the `open` attribute). */
55
+ 'prop:open'?: SheetpaneExcel['open'] | undefined;
56
+ /** The column widths and row heights a user set, px at 100 % zoom: `{ [sheet]: { cols: { B: 120 }, rows: { 4: 40 } } }` (columns by letter, rows by number). A view setting like zoom — not a change, not undone, not in the download; a new file clears it. Set it to restore what a host saved from `sheetpane-resize` (W-47). */
57
+ 'prop:sizes'?: SheetpaneExcel['sizes'] | undefined;
58
+ /** The `src` attribute; `null`, `undefined` or `''` removes it. */
59
+ 'prop:src'?: SheetpaneExcel['src'] | undefined;
60
+ /** `{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
61
+ 'on:sheetpane-load'?: ((event: SheetpaneExcelEventMap['sheetpane-load']) => void) | undefined;
62
+ /** `{ sheet, ref, kind, was, now }` for each change, undo and redo included. */
63
+ 'on:sheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change']) => void) | undefined;
64
+ /** `{ errors, plugins }` when the pane's errors change. */
65
+ 'on:sheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors']) => void) | undefined;
66
+ /** `{ sheet, ref, range, column, value }` when the selection settles — `range` (`B3:D8`) when more than one cell is selected; a drag fires once, on release. */
67
+ 'on:sheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select']) => void) | undefined;
68
+ /** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
69
+ 'on:sheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility']) => void) | undefined;
70
+ /** `{ 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). */
71
+ 'on:sheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize']) => void) | undefined;
72
+ /** `{ sheet }` when the selection moves to another sheet. */
73
+ 'on:sheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet']) => void) | undefined;
74
+ /** `{ mode }` when the pane switches between View and Edit. */
75
+ 'on:sheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode']) => void) | undefined;
76
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
77
+ 'on:sheetpane-history'?: ((event: SheetpaneExcelEventMap['sheetpane-history']) => void) | undefined;
78
+ /** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
79
+ 'on:sheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart']) => void) | undefined;
80
+ /** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
81
+ 'on:sheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input']) => void) | undefined;
82
+ /** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
83
+ 'on:sheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange']) => void) | undefined;
84
+ /** `{ sheet, ref }` when Esc restores a draft, or `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it. */
85
+ 'on:sheetpane-editcancel'?: ((event: SheetpaneExcelEventMap['sheetpane-editcancel']) => void) | undefined;
86
+ /** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
87
+ 'on:sheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export']) => void) | undefined;
88
+ /** `{}` when the pop-up closes. */
89
+ 'on:sheetpane-close'?: ((event: SheetpaneExcelEventMap['sheetpane-close']) => void) | undefined;
90
+ };
91
+
92
+ /** `<sheetpane-errors>` in Solid JSX: attributes (also as `attr:…`), properties (also as `prop:…`) and `on:sheetpane-…` listeners. Solid sets a custom element's props as properties, so write an attribute with no property (`pane`, `header-row`) as `attr:…`. */
93
+ export type SheetpaneErrorsSolidProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
94
+ /** The pane id shared with the sheet; none gives the element its own store. */
95
+ 'attr:pane'?: string | undefined;
96
+ /** Hides the form, Resolve, Delete, Undo and Redo (a sign-off screen). */
97
+ 'attr:readonly'?: boolean | undefined;
98
+ /** Written into the errors this element's user adds. */
99
+ 'attr:author'?: string | undefined;
100
+ /** Space-separated registered plugin ids; fixed per pane. */
101
+ 'attr:plugins'?: string | undefined;
102
+ /** `light` (the default), `dark` or `auto`. */
103
+ 'attr:theme'?: 'light' | 'dark' | 'auto' | undefined;
104
+ /** The pane's store; assigning one replaces the `pane` lookup. */
105
+ 'prop:workbook'?: SheetpaneErrors['workbook'] | undefined;
106
+ /** A copy of the pane's errors; assigning restores a saved review, like `setErrors()`. */
107
+ 'prop:errors'?: SheetpaneErrors['errors'] | undefined;
108
+ /** The types offered in the form; an empty list falls back to `DEFAULT_ERROR_TYPES`. */
109
+ 'prop:errorTypes'?: SheetpaneErrors['errorTypes'] | undefined;
110
+ /** Whether the list is read-only (the `readonly` attribute). */
111
+ 'prop:readOnly'?: SheetpaneErrors['readOnly'] | undefined;
112
+ /** `light` (the default), `dark` or `auto` — the same tokens as the sheet (W-29). */
113
+ 'prop:theme'?: SheetpaneErrors['theme'] | undefined;
114
+ /** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
115
+ 'on:sheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors']) => void) | undefined;
116
+ /** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
117
+ 'on:sheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change']) => void) | undefined;
118
+ /** `{ sheet, ref }` when picking a row selects its cell. */
119
+ 'on:sheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select']) => void) | undefined;
120
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
121
+ 'on:sheetpane-history'?: ((event: SheetpaneErrorsEventMap['sheetpane-history']) => void) | undefined;
122
+ /** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
123
+ 'on:sheetpane-reveal'?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal']) => void) | undefined;
124
+ };
125
+
126
+ declare module 'solid-js' {
127
+ namespace JSX {
128
+ interface IntrinsicElements {
129
+ 'sheetpane-excel': HTMLAttributes<SheetpaneExcel> & SheetpaneExcelSolidProps;
130
+ 'sheetpane-errors': HTMLAttributes<SheetpaneErrors> & SheetpaneErrorsSolidProps;
131
+ }
132
+ }
133
+ }
@@ -0,0 +1,2 @@
1
+ // Types only: see the .d.ts beside this file (W-37).
2
+ export {};