arethesis 0.1.5 → 0.2.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 (78) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -3
  3. package/dist/arethesis.js +84 -9
  4. package/dist/arethesis.js.map +1 -1
  5. package/dist/components.js +2340 -136
  6. package/dist/components.js.map +1 -1
  7. package/dist/core/arethesis.d.ts +1 -1
  8. package/dist/{arethesis-jPH9QdQE.js → fuzzy-Dnlbxdby.js} +731 -324
  9. package/dist/fuzzy-Dnlbxdby.js.map +1 -0
  10. package/dist/index.d.ts +8 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/kit/cell-editor.d.ts +47 -0
  13. package/dist/kit/cell-editor.d.ts.map +1 -0
  14. package/dist/kit/chart.d.ts +55 -0
  15. package/dist/kit/chart.d.ts.map +1 -0
  16. package/dist/kit/command-palette.d.ts +52 -0
  17. package/dist/kit/command-palette.d.ts.map +1 -0
  18. package/dist/kit/data-table.d.ts +6 -1
  19. package/dist/kit/data-table.d.ts.map +1 -1
  20. package/dist/kit/index.d.ts +18 -1
  21. package/dist/kit/index.d.ts.map +1 -1
  22. package/dist/kit/markdown/highlight.d.ts +29 -0
  23. package/dist/kit/markdown/highlight.d.ts.map +1 -0
  24. package/dist/kit/markdown/render.d.ts +31 -0
  25. package/dist/kit/markdown/render.d.ts.map +1 -0
  26. package/dist/kit/markdown-editor.d.ts +52 -0
  27. package/dist/kit/markdown-editor.d.ts.map +1 -0
  28. package/dist/kit/sheet/formula.d.ts +106 -0
  29. package/dist/kit/sheet/formula.d.ts.map +1 -0
  30. package/dist/kit/sheet/model.d.ts +28 -0
  31. package/dist/kit/sheet/model.d.ts.map +1 -0
  32. package/dist/kit/sheet/sheet.d.ts +45 -0
  33. package/dist/kit/sheet/sheet.d.ts.map +1 -0
  34. package/dist/kit/theme-boot.generated.d.ts +2 -0
  35. package/dist/kit/theme-boot.generated.d.ts.map +1 -1
  36. package/dist/kit/theme.d.ts +5 -3
  37. package/dist/kit/theme.d.ts.map +1 -1
  38. package/dist/mixins/editable.d.ts.map +1 -1
  39. package/dist/mixins/grid-navigation.d.ts.map +1 -1
  40. package/dist/mixins/index.d.ts +2 -0
  41. package/dist/mixins/index.d.ts.map +1 -1
  42. package/dist/mixins/listbox.d.ts +19 -0
  43. package/dist/mixins/listbox.d.ts.map +1 -0
  44. package/dist/realtime/collab/anchors.d.ts +10 -0
  45. package/dist/realtime/collab/anchors.d.ts.map +1 -0
  46. package/dist/realtime/collab/collab-session.d.ts +46 -1
  47. package/dist/realtime/collab/collab-session.d.ts.map +1 -1
  48. package/dist/realtime/collab/cursor-overlay.d.ts +10 -0
  49. package/dist/realtime/collab/cursor-overlay.d.ts.map +1 -1
  50. package/dist/realtime/collab/textarea-adapter.d.ts +13 -0
  51. package/dist/realtime/collab/textarea-adapter.d.ts.map +1 -1
  52. package/dist/realtime/collab/undo-manager.d.ts +44 -0
  53. package/dist/realtime/collab/undo-manager.d.ts.map +1 -0
  54. package/dist/realtime/ot/client.d.ts +1 -1
  55. package/dist/realtime/ot/client.d.ts.map +1 -1
  56. package/dist/realtime/ot/server.d.ts +13 -1
  57. package/dist/realtime/ot/server.d.ts.map +1 -1
  58. package/dist/realtime/types.d.ts +29 -1
  59. package/dist/realtime/types.d.ts.map +1 -1
  60. package/dist/theme-polychrome-boot.js +17 -0
  61. package/dist/theme-polychrome.css +310 -0
  62. package/dist/theme.css +312 -1
  63. package/dist/tokens/base.tokens.json +18 -0
  64. package/dist/tokens/dark-high-contrast.tokens.json +11 -0
  65. package/dist/tokens/dark.tokens.json +81 -0
  66. package/dist/tokens/light-high-contrast.tokens.json +11 -0
  67. package/dist/tokens/light.tokens.json +81 -0
  68. package/dist/tokens/polychrome.base.tokens.json +45 -0
  69. package/dist/tokens/polychrome.dark-high-contrast.tokens.json +183 -0
  70. package/dist/tokens/polychrome.dark.tokens.json +321 -0
  71. package/dist/tokens/polychrome.light-high-contrast.tokens.json +115 -0
  72. package/dist/tokens/polychrome.light.tokens.json +418 -0
  73. package/dist/tokens/polychrome.resolver.json +78 -0
  74. package/dist/utils/fuzzy.d.ts +21 -0
  75. package/dist/utils/fuzzy.d.ts.map +1 -0
  76. package/dist/version.d.ts +1 -1
  77. package/package.json +3 -1
  78. package/dist/arethesis-jPH9QdQE.js.map +0 -1
package/dist/theme.css CHANGED
@@ -18,6 +18,8 @@
18
18
  :root {
19
19
  --ar-font: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
20
20
  --ar-font-mono: ui-monospace, 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
21
+ --ar-font-display: ui-serif, 'Georgia', 'Times New Roman', serif;
22
+ --ar-font-serif: ui-serif, 'Georgia', 'Times New Roman', serif;
21
23
  --ar-radius: 10px;
22
24
  --ar-radius-sm: 6px;
23
25
  --ar-space: 1rem;
@@ -27,6 +29,7 @@
27
29
  --ar-border: #dcdfe8;
28
30
  --ar-text: #161a23;
29
31
  --ar-text-muted: #5b6275;
32
+ --ar-accent-2: #be185d;
30
33
  --ar-accent: #4f46e5;
31
34
  --ar-accent-hover: #4338ca;
32
35
  --ar-accent-soft: #eef0ff;
@@ -39,6 +42,12 @@
39
42
  --ar-success-text: #ffffff;
40
43
  --ar-warning: #a35200;
41
44
  --ar-warning-soft: #fff4e5;
45
+ --ar-chart-1: #4f46e5;
46
+ --ar-chart-2: #db2777;
47
+ --ar-chart-3: #c27803;
48
+ --ar-chart-4: #0d9488;
49
+ --ar-chart-5: #7c3aed;
50
+ --ar-chart-6: #4d7c0f;
42
51
  --ar-shadow: 0 1px 2px 0 rgb(16 24 40 / 0.06), 0 4px 16px 0 rgb(16 24 40 / 0.08);
43
52
  --ar-shadow-lg: 0 12px 40px 0 rgb(16 24 40 / 0.18);
44
53
  color-scheme: light;
@@ -52,6 +61,7 @@
52
61
  --ar-border: #2c3140;
53
62
  --ar-text: #e8eaf1;
54
63
  --ar-text-muted: #9aa2b5;
64
+ --ar-accent-2: #f472b6;
55
65
  --ar-accent: #8b84ff;
56
66
  --ar-accent-hover: #a29dff;
57
67
  --ar-accent-soft: #24233f;
@@ -64,6 +74,12 @@
64
74
  --ar-success-text: #0f1117;
65
75
  --ar-warning: #ffb44d;
66
76
  --ar-warning-soft: #33260f;
77
+ --ar-chart-1: #6878f0;
78
+ --ar-chart-2: #e04a7c;
79
+ --ar-chart-3: #b98b16;
80
+ --ar-chart-4: #0fa08f;
81
+ --ar-chart-5: #a07ae8;
82
+ --ar-chart-6: #5e9620;
67
83
  --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
68
84
  --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
69
85
  color-scheme: dark;
@@ -77,6 +93,7 @@
77
93
  --ar-border: #2c3140;
78
94
  --ar-text: #e8eaf1;
79
95
  --ar-text-muted: #9aa2b5;
96
+ --ar-accent-2: #f472b6;
80
97
  --ar-accent: #8b84ff;
81
98
  --ar-accent-hover: #a29dff;
82
99
  --ar-accent-soft: #24233f;
@@ -89,6 +106,12 @@
89
106
  --ar-success-text: #0f1117;
90
107
  --ar-warning: #ffb44d;
91
108
  --ar-warning-soft: #33260f;
109
+ --ar-chart-1: #6878f0;
110
+ --ar-chart-2: #e04a7c;
111
+ --ar-chart-3: #b98b16;
112
+ --ar-chart-4: #0fa08f;
113
+ --ar-chart-5: #a07ae8;
114
+ --ar-chart-6: #5e9620;
92
115
  --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
93
116
  --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
94
117
  color-scheme: dark;
@@ -102,6 +125,7 @@
102
125
  --ar-border: #6b7280;
103
126
  --ar-text: #000000;
104
127
  --ar-text-muted: #2f3542;
128
+ --ar-accent-2: #8a1043;
105
129
  --ar-accent: #3525b8;
106
130
  --ar-accent-hover: #2a1d96;
107
131
  --ar-accent-soft: #e4e6ff;
@@ -114,6 +138,12 @@
114
138
  --ar-success-text: #ffffff;
115
139
  --ar-warning: #6f3800;
116
140
  --ar-warning-soft: #fff4e5;
141
+ --ar-chart-1: #4f46e5;
142
+ --ar-chart-2: #db2777;
143
+ --ar-chart-3: #c27803;
144
+ --ar-chart-4: #0d9488;
145
+ --ar-chart-5: #7c3aed;
146
+ --ar-chart-6: #4d7c0f;
117
147
  --ar-shadow: 0 1px 2px 0 rgb(16 24 40 / 0.06), 0 4px 16px 0 rgb(16 24 40 / 0.08);
118
148
  --ar-shadow-lg: 0 12px 40px 0 rgb(16 24 40 / 0.18);
119
149
  color-scheme: light;
@@ -127,6 +157,7 @@
127
157
  --ar-border: #6b7280;
128
158
  --ar-text: #000000;
129
159
  --ar-text-muted: #2f3542;
160
+ --ar-accent-2: #8a1043;
130
161
  --ar-accent: #3525b8;
131
162
  --ar-accent-hover: #2a1d96;
132
163
  --ar-accent-soft: #e4e6ff;
@@ -139,6 +170,12 @@
139
170
  --ar-success-text: #ffffff;
140
171
  --ar-warning: #6f3800;
141
172
  --ar-warning-soft: #fff4e5;
173
+ --ar-chart-1: #4f46e5;
174
+ --ar-chart-2: #db2777;
175
+ --ar-chart-3: #c27803;
176
+ --ar-chart-4: #0d9488;
177
+ --ar-chart-5: #7c3aed;
178
+ --ar-chart-6: #4d7c0f;
142
179
  --ar-shadow: 0 1px 2px 0 rgb(16 24 40 / 0.06), 0 4px 16px 0 rgb(16 24 40 / 0.08);
143
180
  --ar-shadow-lg: 0 12px 40px 0 rgb(16 24 40 / 0.18);
144
181
  color-scheme: light;
@@ -152,6 +189,7 @@
152
189
  --ar-border: #9aa2b5;
153
190
  --ar-text: #ffffff;
154
191
  --ar-text-muted: #d3d8e3;
192
+ --ar-accent-2: #ffb3d9;
155
193
  --ar-accent: #b8b3ff;
156
194
  --ar-accent-hover: #cfcbff;
157
195
  --ar-accent-soft: #24233f;
@@ -164,6 +202,12 @@
164
202
  --ar-success-text: #000000;
165
203
  --ar-warning: #ffcf85;
166
204
  --ar-warning-soft: #33260f;
205
+ --ar-chart-1: #6878f0;
206
+ --ar-chart-2: #e04a7c;
207
+ --ar-chart-3: #b98b16;
208
+ --ar-chart-4: #0fa08f;
209
+ --ar-chart-5: #a07ae8;
210
+ --ar-chart-6: #5e9620;
167
211
  --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
168
212
  --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
169
213
  color-scheme: dark;
@@ -178,6 +222,7 @@
178
222
  --ar-border: #9aa2b5;
179
223
  --ar-text: #ffffff;
180
224
  --ar-text-muted: #d3d8e3;
225
+ --ar-accent-2: #ffb3d9;
181
226
  --ar-accent: #b8b3ff;
182
227
  --ar-accent-hover: #cfcbff;
183
228
  --ar-accent-soft: #24233f;
@@ -190,6 +235,12 @@
190
235
  --ar-success-text: #000000;
191
236
  --ar-warning: #ffcf85;
192
237
  --ar-warning-soft: #33260f;
238
+ --ar-chart-1: #6878f0;
239
+ --ar-chart-2: #e04a7c;
240
+ --ar-chart-3: #b98b16;
241
+ --ar-chart-4: #0fa08f;
242
+ --ar-chart-5: #a07ae8;
243
+ --ar-chart-6: #5e9620;
193
244
  --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
194
245
  --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
195
246
  color-scheme: dark;
@@ -204,6 +255,7 @@
204
255
  --ar-border: #9aa2b5;
205
256
  --ar-text: #ffffff;
206
257
  --ar-text-muted: #d3d8e3;
258
+ --ar-accent-2: #ffb3d9;
207
259
  --ar-accent: #b8b3ff;
208
260
  --ar-accent-hover: #cfcbff;
209
261
  --ar-accent-soft: #24233f;
@@ -216,6 +268,12 @@
216
268
  --ar-success-text: #000000;
217
269
  --ar-warning: #ffcf85;
218
270
  --ar-warning-soft: #33260f;
271
+ --ar-chart-1: #6878f0;
272
+ --ar-chart-2: #e04a7c;
273
+ --ar-chart-3: #b98b16;
274
+ --ar-chart-4: #0fa08f;
275
+ --ar-chart-5: #a07ae8;
276
+ --ar-chart-6: #5e9620;
219
277
  --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
220
278
  --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
221
279
  color-scheme: dark;
@@ -229,6 +287,7 @@
229
287
  --ar-border: #9aa2b5;
230
288
  --ar-text: #ffffff;
231
289
  --ar-text-muted: #d3d8e3;
290
+ --ar-accent-2: #ffb3d9;
232
291
  --ar-accent: #b8b3ff;
233
292
  --ar-accent-hover: #cfcbff;
234
293
  --ar-accent-soft: #24233f;
@@ -241,6 +300,12 @@
241
300
  --ar-success-text: #000000;
242
301
  --ar-warning: #ffcf85;
243
302
  --ar-warning-soft: #33260f;
303
+ --ar-chart-1: #6878f0;
304
+ --ar-chart-2: #e04a7c;
305
+ --ar-chart-3: #b98b16;
306
+ --ar-chart-4: #0fa08f;
307
+ --ar-chart-5: #a07ae8;
308
+ --ar-chart-6: #5e9620;
244
309
  --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
245
310
  --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
246
311
  color-scheme: dark;
@@ -348,7 +413,7 @@ a-data-table { display: block; font-family: var(--ar-font); color: var(--ar-text
348
413
  overflow: hidden;
349
414
  box-shadow: var(--ar-shadow);
350
415
  }
351
- .ar-table__scroll { max-height: var(--ar-table-height, 32rem); overflow: auto; }
416
+ .ar-table__scroll { position: relative; max-height: var(--ar-table-height, 32rem); overflow: auto; }
352
417
  .ar-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; table-layout: fixed; }
353
418
  .ar-table thead th {
354
419
  position: sticky;
@@ -418,6 +483,40 @@ a-data-table { display: block; font-family: var(--ar-font); color: var(--ar-text
418
483
  .editable-error { color: var(--ar-danger); font-size: 0.8em; white-space: normal; }
419
484
  .is-saving { opacity: 0.7; }
420
485
 
486
+ /* ── Cell editor and listbox ────────────────────────────────────────────── */
487
+
488
+ /* Floats over the cell being edited, so the table never shifts. */
489
+ .ar-cell-editor { position: absolute; z-index: 5; display: flex; }
490
+ .ar-cell-editor__input {
491
+ flex: 1; min-width: 0; height: 100%; box-sizing: border-box; margin: 0;
492
+ padding: 0 calc(0.75rem - 2px); font: inherit; color: var(--ar-text); text-align: inherit;
493
+ background: var(--ar-bg); border: 2px solid var(--ar-accent); border-radius: 2px; outline: none;
494
+ box-shadow: var(--ar-shadow-lg);
495
+ }
496
+ .ar-cell-editor[data-mode='enter'] .ar-cell-editor__input { caret-color: var(--ar-accent); }
497
+ .ar-cell-editor.is-invalid .ar-cell-editor__input { border-color: var(--ar-danger); }
498
+ .ar-cell-editor__error {
499
+ position: absolute; top: calc(100% + 4px); left: 0; z-index: 1; max-width: 22rem; width: max-content;
500
+ padding: 0.35rem 0.6rem; border-radius: var(--ar-radius-sm); background: var(--ar-danger); color: var(--ar-danger-text);
501
+ font-size: 0.82rem; font-weight: 600; box-shadow: var(--ar-shadow-lg); white-space: normal;
502
+ }
503
+ .ar-cell-editor__error::before { content: ''; position: absolute; bottom: 100%; left: 0.8rem; border: 5px solid transparent; border-bottom-color: var(--ar-danger); }
504
+ .ar-cell-editor__error[hidden] { display: none; }
505
+
506
+ .ar-listbox__button { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; cursor: pointer; user-select: none; }
507
+ .ar-listbox__button::after { content: ''; flex: none; width: 0.45rem; height: 0.45rem; margin-top: -0.2rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0.7; }
508
+ .ar-listbox__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
509
+ .ar-listbox {
510
+ position: absolute; top: calc(100% + 4px); left: 0; z-index: 10; min-width: 100%; max-height: 16rem; overflow: auto;
511
+ margin: 0; padding: 0.25rem; list-style: none; background: var(--ar-bg); border: 1px solid var(--ar-border);
512
+ border-radius: var(--ar-radius-sm); box-shadow: var(--ar-shadow-lg);
513
+ }
514
+ .ar-listbox[hidden] { display: none; }
515
+ .ar-listbox__option { padding: 0.4rem 0.6rem 0.4rem 1.6rem; border-radius: 4px; cursor: pointer; position: relative; white-space: nowrap; }
516
+ .ar-listbox__option.is-active { background: var(--ar-accent-soft); color: var(--ar-text); outline: 1px solid var(--ar-accent); outline-offset: -1px; }
517
+ .ar-listbox__option[aria-selected='true']::before { content: '✓'; position: absolute; left: 0.5rem; color: var(--ar-accent); font-weight: 700; }
518
+ .ar-listbox__option[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
519
+
421
520
  /* ── Resizable ─────────────────────────────────────────────────────────── */
422
521
 
423
522
  .resize-handle { position: absolute; z-index: 2; touch-action: none; }
@@ -677,6 +776,218 @@ a-list { display: block; }
677
776
  transform: translateY(-2px);
678
777
  }
679
778
 
779
+ .collab-selection { border-radius: 2px; }
780
+
781
+ /* ── Command palette ───────────────────────────────────────────────────── */
782
+
783
+ .ar-palette {
784
+ width: min(40rem, calc(100vw - 2rem)); max-height: min(34rem, calc(100vh - 6rem)); margin: 12vh auto auto; padding: 0;
785
+ border: 1px solid var(--ar-border); border-radius: var(--ar-radius); background: var(--ar-bg); color: var(--ar-text);
786
+ box-shadow: var(--ar-shadow-lg); overflow: hidden; font-family: var(--ar-font);
787
+ }
788
+ .ar-palette[open] { display: flex; flex-direction: column; }
789
+ .ar-palette::backdrop { background: color-mix(in srgb, var(--ar-text) 35%, transparent); backdrop-filter: blur(2px); }
790
+ .ar-palette__search { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--ar-border); }
791
+ .ar-palette__icon { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: var(--ar-text-muted); stroke-width: 1.8; stroke-linecap: round; }
792
+ .ar-palette__input:focus, .ar-palette__input:focus-visible { outline: none; box-shadow: none; }
793
+ .ar-palette__search:focus-within { box-shadow: inset 0 -2px 0 var(--ar-accent); }
794
+ .ar-palette__input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ar-text); font: inherit; font-size: 1.05rem; }
795
+ .ar-palette__esc, .ar-palette__shortcut, .ar-palette__help kbd { font: 0.72rem var(--ar-font-mono); padding: 0.1rem 0.35rem; border: 1px solid var(--ar-border); border-bottom-width: 2px; border-radius: 4px; color: var(--ar-text-muted); background: var(--ar-surface); }
796
+ .ar-palette__list { flex: 1; overflow: auto; padding: 0.35rem; overscroll-behavior: contain; }
797
+ .ar-palette__list[data-empty]::before { content: 'Nothing matches. Try fewer letters.'; display: block; padding: 1.5rem 1rem; color: var(--ar-text-muted); text-align: center; }
798
+ .ar-palette__heading { padding: 0.55rem 0.65rem 0.25rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ar-text-muted); }
799
+ .ar-palette__option { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.65rem; border-radius: var(--ar-radius-sm); cursor: pointer; }
800
+ .ar-palette__option[aria-selected='true'] { background: var(--ar-accent-soft); box-shadow: inset 3px 0 0 var(--ar-accent); }
801
+ .ar-palette__glyph { width: 1.6rem; flex: none; text-align: center; color: var(--ar-text-muted); }
802
+ .ar-palette__text { display: grid; flex: 1; min-width: 0; }
803
+ .ar-palette__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
804
+ .ar-palette__title mark { background: none; color: var(--ar-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
805
+ .ar-palette__subtitle { font-size: 0.8rem; color: var(--ar-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
806
+ .ar-palette__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: -1px; }
807
+ .ar-palette__help { display: flex; gap: 1rem; margin: 0; padding: 0.5rem 1rem; border-top: 1px solid var(--ar-border); font-size: 0.75rem; color: var(--ar-text-muted); background: var(--ar-surface); }
808
+ .ar-palette__help span { display: inline-flex; gap: 0.25rem; align-items: center; }
809
+
810
+ /* ── Sheet ─────────────────────────────────────────────────────────────── */
811
+
812
+ .ar-sheet { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ar-border); border-radius: var(--ar-radius); background: var(--ar-bg); overflow: hidden; }
813
+ .ar-sheet__bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--ar-border); background: var(--ar-surface); }
814
+ .ar-sheet__name { min-width: 5.5rem; padding: 0.25rem 0.5rem; font: 600 0.85rem var(--ar-font-mono); border: 1px solid var(--ar-border); border-radius: var(--ar-radius-sm); background: var(--ar-bg); text-align: center; }
815
+ .ar-sheet__fx { font-style: italic; color: var(--ar-text-muted); font-weight: 700; }
816
+ .ar-sheet__formula { flex: 1; min-width: 0; padding: 0.3rem 0.5rem; font: 0.9rem var(--ar-font-mono); border: 1px solid var(--ar-border); border-radius: var(--ar-radius-sm); background: var(--ar-bg); color: var(--ar-text); }
817
+ .ar-sheet__formula:focus { outline: none; border-color: var(--ar-accent); box-shadow: var(--ar-focus); }
818
+ .ar-sheet__scroll { position: relative; overflow: auto; height: var(--ar-sheet-height, 28rem); overscroll-behavior: contain; }
819
+ .ar-sheet__table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 0.9rem; font-variant-numeric: tabular-nums; outline: none; }
820
+ .ar-sheet__table:focus-visible .is-active { box-shadow: inset 0 0 0 2px var(--ar-accent), var(--ar-focus); }
821
+ .ar-sheet__table thead th { position: sticky; top: 0; z-index: 2; height: 28px; padding: 0 0.5rem; background: var(--ar-surface); color: var(--ar-text-muted); font-weight: 600; font-size: 0.78rem; border-bottom: 1px solid var(--ar-border); border-right: 1px solid var(--ar-border); }
822
+ .ar-sheet__table thead th.is-selected, .ar-sheet__rowhead.is-selected { background: var(--ar-accent-soft); color: var(--ar-accent); }
823
+ .ar-sheet__corner { left: 0; z-index: 3 !important; width: 3rem; min-width: 3rem; }
824
+ .ar-sheet__rowhead { position: sticky; left: 0; z-index: 1; width: 3rem; min-width: 3rem; height: 32px; box-sizing: border-box; padding: 0 0.4rem; text-align: right; background: var(--ar-surface); color: var(--ar-text-muted); font-weight: 600; font-size: 0.78rem; border-right: 1px solid var(--ar-border); border-bottom: 1px solid var(--ar-border); }
825
+ .ar-sheet td { height: 32px; box-sizing: border-box; padding: 0 0.5rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-right: 1px solid color-mix(in srgb, var(--ar-border) 70%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--ar-border) 70%, transparent); cursor: cell; }
826
+ .ar-sheet td[data-kind='number'], .ar-sheet td[data-kind='bool'] { text-align: right; }
827
+ .ar-sheet td[data-kind='error'] { color: var(--ar-danger); font-weight: 700; text-align: center; }
828
+ .ar-sheet td[aria-selected='true'] { background: color-mix(in srgb, var(--ar-accent) 12%, transparent); }
829
+ .ar-sheet td.is-active { box-shadow: inset 0 0 0 2px var(--ar-accent); }
830
+ .ar-sheet td[aria-readonly='true'] { font-weight: 700; background: var(--ar-surface); }
831
+ .ar-sheet td.is-remote { animation: ar-sheet-remote 1.5s ease-out; position: relative; }
832
+ .ar-sheet td.is-remote::after { content: attr(data-by); position: absolute; top: 1px; right: 2px; font-size: 0.62rem; font-weight: 700; color: var(--ar-accent-2, var(--ar-accent)); }
833
+ @keyframes ar-sheet-remote { from { background: color-mix(in srgb, var(--ar-accent-2, var(--ar-warning)) 35%, transparent); } }
834
+ .ar-sheet__spacer td, .ar-sheet__spacer { border: 0; padding: 0; }
835
+
836
+ /* ── Chart ─────────────────────────────────────────────────────────────── */
837
+
838
+ .ar-chart { display: block; min-width: 0; font-family: var(--ar-font); }
839
+ .ar-chart__legend { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-bottom: 0.4rem; }
840
+ .ar-chart--spark .ar-chart__legend { display: none; }
841
+ .ar-chart__key {
842
+ display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.5rem; border: 1px solid transparent; border-radius: 999px;
843
+ background: none; color: var(--ar-text); font: 0.82rem var(--ar-font); cursor: pointer;
844
+ }
845
+ .ar-chart__key:hover { background: var(--ar-surface); }
846
+ .ar-chart__key[data-key][aria-pressed='false'] { color: var(--ar-text-muted); text-decoration: line-through; }
847
+ .ar-chart__key[aria-pressed='false'] .ar-chart__swatch { opacity: 0.35; }
848
+ .ar-chart__key:focus-visible { outline: none; box-shadow: var(--ar-focus); }
849
+ .ar-chart__table-toggle { margin-left: auto; border-color: var(--ar-border); color: var(--ar-text-muted); }
850
+ .ar-chart__table-toggle[aria-pressed='true'] { background: var(--ar-accent-soft); color: var(--ar-accent); text-decoration: none; }
851
+ .ar-chart__swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; flex: none; }
852
+ .ar-chart__plot { position: relative; width: 100%; }
853
+ .ar-chart__plot:focus-visible { outline: none; box-shadow: var(--ar-focus); border-radius: var(--ar-radius-sm); }
854
+ .ar-chart__plot svg { display: block; overflow: visible; }
855
+ .ar-chart__grid { stroke: var(--ar-border); stroke-width: 1; shape-rendering: crispEdges; }
856
+ .ar-chart__grid.is-zero { stroke: var(--ar-text-muted); }
857
+ .ar-chart__tick { fill: var(--ar-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
858
+ .ar-chart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
859
+ .ar-chart__area { opacity: 0.12; }
860
+ .ar-chart__dot { stroke: var(--ar-bg); stroke-width: 2; }
861
+ .ar-chart__crosshair { stroke: var(--ar-text-muted); stroke-width: 1; shape-rendering: crispEdges; }
862
+ .ar-chart__band { fill: var(--ar-text); opacity: 0.06; }
863
+ .ar-chart__tooltip {
864
+ position: absolute; z-index: 2; min-width: 9rem; padding: 0.5rem 0.65rem; pointer-events: none;
865
+ background: var(--ar-bg); border: 1px solid var(--ar-border); border-radius: var(--ar-radius-sm); box-shadow: var(--ar-shadow-lg); font-size: 0.82rem;
866
+ }
867
+ .ar-chart__tooltip[hidden] { display: none; }
868
+ .ar-chart__tip-title { margin: 0 0 0.3rem; color: var(--ar-text-muted); font-variant-numeric: tabular-nums; }
869
+ .ar-chart__tooltip dl { display: grid; grid-template-columns: auto auto; gap: 0.15rem 0.9rem; margin: 0; }
870
+ .ar-chart__tooltip dt { display: flex; align-items: center; gap: 0.35rem; color: var(--ar-text-muted); }
871
+ .ar-chart__tooltip dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; grid-row: auto; }
872
+ .ar-chart__tooltip dt { order: 0; }
873
+ .ar-chart__table:not(.ar-visually-hidden) { width: 100%; margin-top: 0.75rem; border-collapse: collapse; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
874
+ .ar-chart__table:not(.ar-visually-hidden) caption { text-align: left; font-weight: 600; padding-bottom: 0.3rem; }
875
+ .ar-chart__table:not(.ar-visually-hidden) th, .ar-chart__table:not(.ar-visually-hidden) td { padding: 0.25rem 0.5rem; border-bottom: 1px solid var(--ar-border); text-align: right; }
876
+ .ar-chart__table:not(.ar-visually-hidden) th[scope='row'], .ar-chart__table:not(.ar-visually-hidden) thead th:first-child { text-align: left; font-weight: 500; }
877
+ @media (forced-colors: active) {
878
+ .ar-chart__line, .ar-chart__bar, .ar-chart__dot { forced-color-adjust: none; }
879
+ }
880
+
881
+ /* ── Markdown editor ───────────────────────────────────────────────────── */
882
+
883
+ .ar-md {
884
+ --ar-md-font: 0.95rem/1.7 var(--ar-font-mono);
885
+ --ar-md-pad: 1rem 1.25rem 2rem;
886
+ --ar-md-height: 32rem;
887
+ display: flex; flex-direction: column; min-width: 0;
888
+ border: 1px solid var(--ar-border); border-radius: var(--ar-radius); background: var(--ar-bg); overflow: hidden;
889
+ }
890
+ .ar-md:focus-within { border-color: var(--ar-accent); }
891
+ .ar-md__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--ar-border); background: var(--ar-surface); }
892
+ .ar-md__button {
893
+ display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 0.4rem;
894
+ border: 0; border-radius: var(--ar-radius-sm); background: transparent; color: var(--ar-text); font: 0.95rem var(--ar-font); cursor: pointer;
895
+ }
896
+ .ar-md__button svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
897
+ .ar-md__button circle { fill: currentColor; stroke: none; }
898
+ .ar-md__button--text { font-size: 0.82rem; font-weight: 600; padding: 0 0.6rem; }
899
+ .ar-md__button:hover { background: var(--ar-surface-2); }
900
+ .ar-md__button[aria-pressed='true'] { background: var(--ar-accent-soft); color: var(--ar-accent); }
901
+ .ar-md__button:focus-visible { outline: none; box-shadow: var(--ar-focus); }
902
+ .ar-md__sep { width: 1px; height: 1.25rem; margin: 0 0.3rem; background: var(--ar-border); }
903
+ .ar-md__spacer { flex: 1; }
904
+ .ar-md__layout { display: inline-flex; gap: 2px; }
905
+
906
+ .ar-md__find { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--ar-border); background: var(--ar-surface); }
907
+ .ar-md__find[hidden] { display: none; }
908
+ .ar-md__find-input { flex: 1 1 10rem; min-width: 0; padding: 0.35em 0.6em; font: inherit; font-size: 0.88rem; border: 1px solid var(--ar-border); border-radius: var(--ar-radius-sm); background: var(--ar-bg); color: var(--ar-text); }
909
+ .ar-md__find-input:focus { outline: none; border-color: var(--ar-accent); box-shadow: var(--ar-focus); }
910
+ .ar-md__check { display: inline-flex; gap: 0.3rem; align-items: center; font-size: 0.82rem; color: var(--ar-text-muted); }
911
+ .ar-md__check input { accent-color: var(--ar-accent); }
912
+ .ar-md__find-status { font-size: 0.8rem; color: var(--ar-text-muted); min-width: 5.5rem; font-variant-numeric: tabular-nums; }
913
+ .ar-md__find-actions { display: inline-flex; gap: 2px; }
914
+
915
+ .ar-md__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: var(--ar-md-height); min-height: 12rem; }
916
+ .ar-md__body[data-layout='write'], .ar-md__body[data-layout='preview'] { grid-template-columns: minmax(0, 1fr); }
917
+ @media (max-width: 760px) { .ar-md__body[data-layout='split'] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr; } }
918
+ .ar-md__source { position: relative; display: flex; overflow: auto; overscroll-behavior: contain; }
919
+ .ar-md__source[hidden], .ar-md__preview[hidden] { display: none; }
920
+ .ar-md__gutter {
921
+ position: relative; flex: none; width: 3rem; min-height: 100%; font: var(--ar-md-font); font-size: 0.78rem;
922
+ color: var(--ar-text-muted); background: var(--ar-surface); border-right: 1px solid var(--ar-border); user-select: none;
923
+ }
924
+ .ar-md__gutter span { position: absolute; right: 0.6rem; line-height: calc(0.95rem * 1.7); font-variant-numeric: tabular-nums; }
925
+ .ar-md__gutter span.is-current { color: var(--ar-text); font-weight: 700; }
926
+ .ar-md__stack { position: relative; flex: 1; min-width: 0; }
927
+ /* The layers and the textarea must lay text out identically. */
928
+ .ar-md__layer, .ar-md__input {
929
+ font: var(--ar-md-font); padding: var(--ar-md-pad); margin: 0; border: 0;
930
+ white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4; letter-spacing: 0;
931
+ }
932
+ .ar-md__highlight { position: relative; color: var(--ar-text); min-height: 100%; }
933
+ .ar-md__marks { position: absolute; inset: 0; color: transparent; }
934
+ .ar-md__input {
935
+ position: absolute; inset: 0; width: 100%; min-height: 100%; display: block; resize: none; overflow: hidden;
936
+ background: transparent; color: transparent; caret-color: var(--ar-text); outline: none;
937
+ }
938
+ .ar-md__input::selection { background: color-mix(in srgb, var(--ar-accent) 30%, transparent); color: transparent; }
939
+ .ar-md__line { min-height: 1lh; }
940
+ .ar-md__line.is-current { background: color-mix(in srgb, var(--ar-accent) 6%, transparent); margin: 0 -1.25rem; padding: 0 1.25rem; }
941
+ .ar-md__mark { background: color-mix(in srgb, var(--mark, var(--ar-warning)) 22%, transparent); border-bottom: 2px solid var(--mark, var(--ar-warning)); }
942
+ .ar-md__mark.is-active { background: color-mix(in srgb, var(--mark, var(--ar-warning)) 40%, transparent); }
943
+ .ar-md__match { background: color-mix(in srgb, var(--ar-warning) 30%, transparent); border-radius: 2px; }
944
+ .ar-md__match.is-current { background: color-mix(in srgb, var(--ar-warning) 65%, transparent); outline: 1px solid var(--ar-warning); }
945
+
946
+ /* Syntax colors: hues from the theme, so every palette and contrast mode stays readable. */
947
+ .md-punct { color: var(--ar-text-muted); }
948
+ .md-h { color: var(--ar-accent); font-weight: 700; }
949
+ .md-strong { font-weight: 700; }
950
+ .md-em { color: var(--ar-accent-2, var(--ar-accent)); }
951
+ .md-del { color: var(--ar-text-muted); text-decoration: line-through; }
952
+ .md-code, .md-codeblock { color: var(--ar-success); }
953
+ .md-fence, .md-lang { color: var(--ar-text-muted); }
954
+ .md-link { color: var(--ar-accent); }
955
+ .md-url { color: var(--ar-text-muted); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
956
+ .md-quote { color: var(--ar-text-muted); }
957
+ .md-list, .md-task { color: var(--ar-accent-2, var(--ar-accent)); font-weight: 700; }
958
+ .md-task.is-done { color: var(--ar-success); }
959
+ .md-hr { color: var(--ar-text-muted); }
960
+
961
+ .ar-md__preview { overflow: auto; padding: 1rem 1.5rem 2rem; border-left: 1px solid var(--ar-border); overscroll-behavior: contain; }
962
+ .ar-md__body[data-layout='preview'] .ar-md__preview { border-left: 0; }
963
+ @media (max-width: 760px) { .ar-md__body[data-layout='split'] .ar-md__preview { border-left: 0; border-top: 1px solid var(--ar-border); } }
964
+ .ar-md__preview:focus-visible { outline: none; box-shadow: inset var(--ar-focus); }
965
+
966
+ /* Rendered Markdown (also usable on its own: class="ar-prose"). */
967
+ .ar-prose { line-height: 1.65; font-family: var(--ar-font-serif, var(--ar-font)); font-size: 1.05rem; }
968
+ .ar-prose > :first-child { margin-top: 0; }
969
+ .ar-prose h1, .ar-prose h2, .ar-prose h3, .ar-prose h4 { font-family: var(--ar-font-display, var(--ar-font)); line-height: 1.25; margin: 1.4em 0 0.5em; }
970
+ .ar-prose h1 { font-size: 1.7rem; }
971
+ .ar-prose h2 { font-size: 1.35rem; padding-bottom: 0.2em; border-bottom: 1px solid var(--ar-border); }
972
+ .ar-prose h3 { font-size: 1.12rem; }
973
+ .ar-prose p, .ar-prose ul, .ar-prose ol, .ar-prose blockquote, .ar-prose pre, .ar-prose table { margin: 0 0 0.9em; }
974
+ .ar-prose ul, .ar-prose ol { padding-left: 1.5em; }
975
+ .ar-prose li > ul, .ar-prose li > ol { margin: 0.2em 0 0; }
976
+ .ar-prose .md-tasks { list-style: none; padding-left: 0.2em; }
977
+ .ar-prose .md-check { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.5em; vertical-align: -0.1em; border: 1.5px solid var(--ar-text-muted); border-radius: 3px; }
978
+ .ar-prose .md-check.is-checked { background: var(--ar-success); border-color: var(--ar-success); box-shadow: inset 0 0 0 2px var(--ar-bg); }
979
+ .ar-prose blockquote { padding: 0.2em 1em; border-left: 3px solid var(--ar-accent-2, var(--ar-accent)); color: var(--ar-text-muted); font-style: italic; }
980
+ .ar-prose code { font: 0.86em var(--ar-font-mono); background: var(--ar-surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
981
+ .ar-prose pre { background: var(--ar-surface); border: 1px solid var(--ar-border); padding: 0.8em 1em; border-radius: var(--ar-radius-sm); overflow: auto; }
982
+ .ar-prose pre code { background: none; padding: 0; font-size: 0.85rem; }
983
+ .ar-prose hr { border: 0; border-top: 1px solid var(--ar-border); margin: 1.5em 0; }
984
+ .ar-prose img { max-width: 100%; }
985
+ .ar-prose table { border-collapse: collapse; font-family: var(--ar-font); font-size: 0.92rem; }
986
+ .ar-prose th, .ar-prose td { border: 1px solid var(--ar-border); padding: 0.35em 0.7em; text-align: left; }
987
+ .ar-prose th { background: var(--ar-surface); }
988
+ .ar-prose .md-align-center { text-align: center; }
989
+ .ar-prose .md-align-right { text-align: right; font-variant-numeric: tabular-nums; }
990
+
680
991
  @media (prefers-reduced-motion: reduce) {
681
992
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
682
993
  }
@@ -23,6 +23,24 @@
23
23
  "monospace"
24
24
  ],
25
25
  "$description": "Code and tabular figures."
26
+ },
27
+ "display": {
28
+ "$value": [
29
+ "ui-serif",
30
+ "Georgia",
31
+ "Times New Roman",
32
+ "serif"
33
+ ],
34
+ "$description": "Display headings."
35
+ },
36
+ "serif": {
37
+ "$value": [
38
+ "ui-serif",
39
+ "Georgia",
40
+ "Times New Roman",
41
+ "serif"
42
+ ],
43
+ "$description": "Long-form reading text and quotations."
26
44
  }
27
45
  },
28
46
  "radius": {
@@ -105,6 +105,17 @@
105
105
  ],
106
106
  "hex": "#000000"
107
107
  }
108
+ },
109
+ "2": {
110
+ "$value": {
111
+ "colorSpace": "srgb",
112
+ "components": [
113
+ 1.0,
114
+ 0.702,
115
+ 0.851
116
+ ],
117
+ "hex": "#ffb3d9"
118
+ }
108
119
  }
109
120
  },
110
121
  "danger": {
@@ -126,6 +126,18 @@
126
126
  "hex": "#0f1117"
127
127
  },
128
128
  "$description": "Text on an accent background."
129
+ },
130
+ "2": {
131
+ "$value": {
132
+ "colorSpace": "srgb",
133
+ "components": [
134
+ 0.9569,
135
+ 0.4471,
136
+ 0.7137
137
+ ],
138
+ "hex": "#f472b6"
139
+ },
140
+ "$description": "Secondary accent: decorative highlights, second data series and emphasis."
129
141
  }
130
142
  },
131
143
  "danger": {
@@ -229,6 +241,75 @@
229
241
  },
230
242
  "$description": "Background for warnings."
231
243
  }
244
+ },
245
+ "chart": {
246
+ "$description": "Categorical colors for data series, in a fixed order (validated for color-vision deficiency, adjacent pairs). Assign them in order and keep each series on its color.",
247
+ "1": {
248
+ "$value": {
249
+ "colorSpace": "srgb",
250
+ "components": [
251
+ 0.4078,
252
+ 0.4706,
253
+ 0.9412
254
+ ],
255
+ "hex": "#6878f0"
256
+ }
257
+ },
258
+ "2": {
259
+ "$value": {
260
+ "colorSpace": "srgb",
261
+ "components": [
262
+ 0.8784,
263
+ 0.2902,
264
+ 0.4863
265
+ ],
266
+ "hex": "#e04a7c"
267
+ }
268
+ },
269
+ "3": {
270
+ "$value": {
271
+ "colorSpace": "srgb",
272
+ "components": [
273
+ 0.7255,
274
+ 0.5451,
275
+ 0.0863
276
+ ],
277
+ "hex": "#b98b16"
278
+ }
279
+ },
280
+ "4": {
281
+ "$value": {
282
+ "colorSpace": "srgb",
283
+ "components": [
284
+ 0.0588,
285
+ 0.6275,
286
+ 0.5608
287
+ ],
288
+ "hex": "#0fa08f"
289
+ }
290
+ },
291
+ "5": {
292
+ "$value": {
293
+ "colorSpace": "srgb",
294
+ "components": [
295
+ 0.6275,
296
+ 0.4784,
297
+ 0.9098
298
+ ],
299
+ "hex": "#a07ae8"
300
+ }
301
+ },
302
+ "6": {
303
+ "$value": {
304
+ "colorSpace": "srgb",
305
+ "components": [
306
+ 0.3686,
307
+ 0.5882,
308
+ 0.1255
309
+ ],
310
+ "hex": "#5e9620"
311
+ }
312
+ }
232
313
  }
233
314
  },
234
315
  "shadow": {
@@ -70,6 +70,17 @@
70
70
  ],
71
71
  "hex": "#e4e6ff"
72
72
  }
73
+ },
74
+ "2": {
75
+ "$value": {
76
+ "colorSpace": "srgb",
77
+ "components": [
78
+ 0.5412,
79
+ 0.0627,
80
+ 0.2627
81
+ ],
82
+ "hex": "#8a1043"
83
+ }
73
84
  }
74
85
  },
75
86
  "danger": {