@heyramzi/review 0.0.0-stage → 1.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.
- package/LICENSE +21 -0
- package/dist/node/client/http.d.ts +18 -0
- package/dist/node/client/http.js +79 -0
- package/dist/node/core/draft.d.ts +36 -0
- package/dist/node/core/draft.js +75 -0
- package/dist/node/core/enums.d.ts +13 -0
- package/dist/node/core/enums.js +28 -0
- package/dist/node/core/notes.d.ts +34 -0
- package/dist/node/core/notes.js +57 -0
- package/dist/node/core/openscreen.d.ts +63 -0
- package/dist/node/core/openscreen.js +97 -0
- package/dist/node/core/render-words.d.ts +8 -0
- package/dist/node/core/render-words.js +12 -0
- package/dist/node/core/types.d.ts +434 -0
- package/dist/node/core/types.js +2 -0
- package/dist/node/diagrams/figure.d.ts +20 -0
- package/dist/node/diagrams/figure.js +27 -0
- package/dist/node/diagrams/placeholder.d.ts +21 -0
- package/dist/node/diagrams/placeholder.js +42 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.js +3 -0
- package/dist/node/mount.d.ts +49 -0
- package/dist/node/mount.js +63 -0
- package/dist/node/server/brand.d.ts +29 -0
- package/dist/node/server/brand.js +144 -0
- package/dist/node/server/errors.d.ts +5 -0
- package/dist/node/server/errors.js +9 -0
- package/dist/node/server/guards.d.ts +6 -0
- package/dist/node/server/guards.js +69 -0
- package/dist/node/server/handler.d.ts +14 -0
- package/dist/node/server/handler.js +143 -0
- package/dist/node/server/http.d.ts +33 -0
- package/dist/node/server/http.js +167 -0
- package/dist/node/server/index.d.ts +7 -0
- package/dist/node/server/index.js +6 -0
- package/dist/node/server/notes.d.ts +31 -0
- package/dist/node/server/notes.js +73 -0
- package/dist/node/ui/sprite.d.ts +11 -0
- package/dist/node/ui/sprite.js +56 -0
- package/dist/review.css +2 -0
- package/dist/review.js +18369 -0
- package/package.json +67 -3
- package/src/theme/base.css +346 -0
- package/src/theme/tokens.css +198 -0
- package/README.md +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyramzi/review",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "The one review UI for Editor OS, Shorts OS and any client tool. A Svelte 5 page built to two static files, plus the Node handler that serves it.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/heyramzi/ui.git",
|
|
9
|
+
"directory": "packages/review"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src/theme",
|
|
14
|
+
"package.json"
|
|
15
|
+
],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"imports": {
|
|
18
|
+
"#src/*.js": "./src/*.ts",
|
|
19
|
+
"#src/*.svelte": "./src/*.svelte",
|
|
20
|
+
"#src/*.css": "./src/*.css",
|
|
21
|
+
"#src/*.svg": "./src/*.svg",
|
|
22
|
+
"#dev/*.js": "./dev/*.ts",
|
|
23
|
+
"#scripts/*": "./scripts/*"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/node/index.d.ts",
|
|
28
|
+
"default": "./dist/review.js"
|
|
29
|
+
},
|
|
30
|
+
"./review.css": "./dist/review.css",
|
|
31
|
+
"./tokens.css": "./src/theme/tokens.css",
|
|
32
|
+
"./server": {
|
|
33
|
+
"types": "./dist/node/server/index.d.ts",
|
|
34
|
+
"default": "./dist/node/server/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./types": {
|
|
37
|
+
"types": "./dist/node/core/types.d.ts",
|
|
38
|
+
"default": "./dist/node/core/types.js"
|
|
39
|
+
},
|
|
40
|
+
"./figure": {
|
|
41
|
+
"types": "./dist/node/diagrams/figure.d.ts",
|
|
42
|
+
"default": "./dist/node/diagrams/figure.js"
|
|
43
|
+
},
|
|
44
|
+
"./placeholder": {
|
|
45
|
+
"types": "./dist/node/diagrams/placeholder.d.ts",
|
|
46
|
+
"default": "./dist/node/diagrams/placeholder.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@heyramzi/ui": "2.8.0",
|
|
51
|
+
"@playwright/test": "^1.64.1",
|
|
52
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
53
|
+
"@types/node": "^26.6.5",
|
|
54
|
+
"jsdom": "^30.1.3",
|
|
55
|
+
"react-grab": "latest",
|
|
56
|
+
"svelte": "^5.57.2",
|
|
57
|
+
"svelte-check": "^4.7.7",
|
|
58
|
+
"typescript": "~7.0.2",
|
|
59
|
+
"vite-plus": "^1.3.0",
|
|
60
|
+
"vitest": "^5.0.5"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"dev": "vp dev --port 3321 --strictPort",
|
|
64
|
+
"build": "vp build",
|
|
65
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
66
|
+
"check:tokens": "node scripts/check-tokens.mjs",
|
|
67
|
+
"test": "vp test run",
|
|
68
|
+
"test:e2e": "playwright test"
|
|
69
|
+
}
|
|
6
70
|
}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/* Reset, type and the few shared classes every screen uses. All of it lives under .rv. */
|
|
2
|
+
|
|
3
|
+
.rv {
|
|
4
|
+
font: 400 var(--fs-sm) / 1.5 var(--sans);
|
|
5
|
+
color: var(--text);
|
|
6
|
+
background: var(--ground);
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
text-rendering: optimizeLegibility;
|
|
9
|
+
-webkit-tap-highlight-color: transparent;
|
|
10
|
+
accent-color: var(--accent);
|
|
11
|
+
}
|
|
12
|
+
.rv,
|
|
13
|
+
.rv *,
|
|
14
|
+
.rv *::before,
|
|
15
|
+
.rv *::after {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
.rv :is(h1, h2, h3, p, ul, ol, figure) {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
.rv :is(ul, ol) {
|
|
22
|
+
padding: 0;
|
|
23
|
+
list-style: none;
|
|
24
|
+
}
|
|
25
|
+
.rv button,
|
|
26
|
+
.rv input,
|
|
27
|
+
.rv textarea,
|
|
28
|
+
.rv select {
|
|
29
|
+
font: inherit;
|
|
30
|
+
color: inherit;
|
|
31
|
+
}
|
|
32
|
+
.rv button {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
background: none;
|
|
35
|
+
border: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
text-align: inherit;
|
|
38
|
+
}
|
|
39
|
+
.rv :is(button, [role="button"], a):focus-visible,
|
|
40
|
+
.rv :is(input, textarea, select):focus-visible,
|
|
41
|
+
.rv [tabindex]:focus-visible {
|
|
42
|
+
outline: 2px solid var(--accent);
|
|
43
|
+
outline-offset: 2px;
|
|
44
|
+
}
|
|
45
|
+
.rv ::selection {
|
|
46
|
+
background: color-mix(in oklab, var(--accent) 38%, transparent);
|
|
47
|
+
}
|
|
48
|
+
.rv ::-webkit-scrollbar {
|
|
49
|
+
width: 10px;
|
|
50
|
+
height: 10px;
|
|
51
|
+
}
|
|
52
|
+
.rv ::-webkit-scrollbar-thumb {
|
|
53
|
+
background: var(--line);
|
|
54
|
+
border-radius: var(--radius-lg);
|
|
55
|
+
border: 3px solid transparent;
|
|
56
|
+
background-clip: content-box;
|
|
57
|
+
}
|
|
58
|
+
.rv ::-webkit-scrollbar-thumb:hover {
|
|
59
|
+
background: var(--line-strong);
|
|
60
|
+
background-clip: content-box;
|
|
61
|
+
border: 3px solid transparent;
|
|
62
|
+
}
|
|
63
|
+
.rv {
|
|
64
|
+
scrollbar-color: var(--line) transparent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.rv .sr-only {
|
|
68
|
+
position: absolute;
|
|
69
|
+
width: 1px;
|
|
70
|
+
height: 1px;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
clip-path: inset(50%);
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
.rv .num {
|
|
76
|
+
font-variant-numeric: tabular-nums;
|
|
77
|
+
}
|
|
78
|
+
.rv .ic {
|
|
79
|
+
width: 16px;
|
|
80
|
+
height: 16px;
|
|
81
|
+
flex: none;
|
|
82
|
+
fill: none;
|
|
83
|
+
stroke: currentColor;
|
|
84
|
+
stroke-width: 1.75;
|
|
85
|
+
stroke-linecap: round;
|
|
86
|
+
stroke-linejoin: round;
|
|
87
|
+
}
|
|
88
|
+
.rv .ic.sm {
|
|
89
|
+
width: 14px;
|
|
90
|
+
height: 14px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Tone helpers: a class sets --tone, everything else reads it. */
|
|
94
|
+
.rv .tone-neutral {
|
|
95
|
+
--tone: var(--dim);
|
|
96
|
+
--tone-soft: var(--raised);
|
|
97
|
+
}
|
|
98
|
+
.rv .tone-accent {
|
|
99
|
+
--tone: var(--accent);
|
|
100
|
+
--tone-soft: var(--accent-soft);
|
|
101
|
+
}
|
|
102
|
+
.rv .tone-ok {
|
|
103
|
+
--tone: var(--ok);
|
|
104
|
+
--tone-soft: var(--ok-soft);
|
|
105
|
+
}
|
|
106
|
+
.rv .tone-warn {
|
|
107
|
+
--tone: var(--warn-text);
|
|
108
|
+
--tone-soft: var(--warn-soft);
|
|
109
|
+
}
|
|
110
|
+
.rv .tone-bad {
|
|
111
|
+
--tone: var(--bad);
|
|
112
|
+
--tone-soft: var(--bad-soft);
|
|
113
|
+
}
|
|
114
|
+
.rv .tone-bot {
|
|
115
|
+
--tone: var(--bot);
|
|
116
|
+
--tone-soft: var(--bot-soft);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Buttons. Quiet by default, so a screen of them doesn't shout. */
|
|
120
|
+
.rv .btn {
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
gap: 6px;
|
|
125
|
+
min-height: var(--control);
|
|
126
|
+
padding: 0 10px;
|
|
127
|
+
border: 1px solid transparent;
|
|
128
|
+
border-radius: var(--radius-sm);
|
|
129
|
+
color: var(--dim);
|
|
130
|
+
font-size: var(--fs-xs);
|
|
131
|
+
font-weight: 500;
|
|
132
|
+
line-height: 1;
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
user-select: none;
|
|
135
|
+
transition:
|
|
136
|
+
background-color var(--duration-quick) var(--ease-smooth-out),
|
|
137
|
+
color var(--duration-quick) var(--ease-smooth-out),
|
|
138
|
+
border-color var(--duration-quick) var(--ease-smooth-out),
|
|
139
|
+
transform var(--duration-micro) var(--ease-smooth-out);
|
|
140
|
+
}
|
|
141
|
+
.rv .btn:hover {
|
|
142
|
+
background: var(--hover);
|
|
143
|
+
color: var(--text);
|
|
144
|
+
}
|
|
145
|
+
.rv .btn:active {
|
|
146
|
+
background: var(--press);
|
|
147
|
+
transform: scale(var(--scale-medium));
|
|
148
|
+
}
|
|
149
|
+
.rv .btn:disabled,
|
|
150
|
+
.rv .btn[aria-disabled="true"] {
|
|
151
|
+
color: var(--faint);
|
|
152
|
+
cursor: not-allowed;
|
|
153
|
+
}
|
|
154
|
+
/* WHY: still hoverable so its data-tip can say why. Faded by colour, since opacity would fade the tip too. */
|
|
155
|
+
.rv .btn:is(:disabled, [aria-disabled="true"]):is(:hover, :active) {
|
|
156
|
+
background: transparent;
|
|
157
|
+
color: var(--faint);
|
|
158
|
+
transform: none;
|
|
159
|
+
}
|
|
160
|
+
.rv .btn:is(.solid, .primary):is(:disabled, [aria-disabled="true"]),
|
|
161
|
+
.rv .btn:is(.solid, .primary):is(:disabled, [aria-disabled="true"]):is(:hover, :active) {
|
|
162
|
+
background: var(--raised);
|
|
163
|
+
border-color: var(--line);
|
|
164
|
+
color: var(--faint);
|
|
165
|
+
}
|
|
166
|
+
.rv .btn.solid {
|
|
167
|
+
background: var(--raised);
|
|
168
|
+
border-color: var(--line);
|
|
169
|
+
color: var(--text);
|
|
170
|
+
}
|
|
171
|
+
.rv .btn.solid:hover {
|
|
172
|
+
border-color: var(--line-strong);
|
|
173
|
+
background: color-mix(in oklab, var(--raised) 86%, var(--text));
|
|
174
|
+
}
|
|
175
|
+
.rv .btn.primary {
|
|
176
|
+
background: var(--accent);
|
|
177
|
+
border-color: var(--accent);
|
|
178
|
+
color: var(--on-accent);
|
|
179
|
+
font-weight: 600;
|
|
180
|
+
}
|
|
181
|
+
.rv .btn.primary:hover {
|
|
182
|
+
background: color-mix(in oklab, var(--accent) 86%, var(--text));
|
|
183
|
+
}
|
|
184
|
+
.rv .btn.primary:active {
|
|
185
|
+
background: color-mix(in oklab, var(--accent) 78%, var(--text));
|
|
186
|
+
}
|
|
187
|
+
.rv .btn.icon {
|
|
188
|
+
width: var(--control);
|
|
189
|
+
padding: 0;
|
|
190
|
+
}
|
|
191
|
+
.rv .btn[aria-pressed="true"] {
|
|
192
|
+
color: var(--text);
|
|
193
|
+
background: var(--press);
|
|
194
|
+
}
|
|
195
|
+
.rv .btn.ok {
|
|
196
|
+
color: var(--ok);
|
|
197
|
+
}
|
|
198
|
+
.rv .btn.ok:hover {
|
|
199
|
+
background: var(--ok-soft);
|
|
200
|
+
}
|
|
201
|
+
.rv .btn.bad:hover {
|
|
202
|
+
color: var(--bad);
|
|
203
|
+
background: var(--bad-soft);
|
|
204
|
+
}
|
|
205
|
+
@media (pointer: coarse) {
|
|
206
|
+
.rv .btn {
|
|
207
|
+
min-height: 40px;
|
|
208
|
+
}
|
|
209
|
+
.rv .btn.icon {
|
|
210
|
+
width: 40px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* The key cap. */
|
|
215
|
+
.rv kbd {
|
|
216
|
+
display: inline-grid;
|
|
217
|
+
place-items: center;
|
|
218
|
+
min-width: 18px;
|
|
219
|
+
height: 18px;
|
|
220
|
+
padding: 0 5px;
|
|
221
|
+
border: 1px solid var(--line);
|
|
222
|
+
border-bottom-width: 2px;
|
|
223
|
+
border-radius: var(--radius-xs);
|
|
224
|
+
background: var(--surface);
|
|
225
|
+
color: var(--dim);
|
|
226
|
+
font: 500 var(--fs-xs) / 1 var(--mono);
|
|
227
|
+
}
|
|
228
|
+
/* No keyboard in reach, so a key cap only takes room. */
|
|
229
|
+
@media (hover: none), (pointer: coarse) {
|
|
230
|
+
.rv kbd {
|
|
231
|
+
display: none;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* A small labelled fact: a time, a kind, a count. */
|
|
236
|
+
.rv .chip {
|
|
237
|
+
display: inline-flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
gap: 5px;
|
|
240
|
+
min-height: 22px;
|
|
241
|
+
padding: 0 7px;
|
|
242
|
+
border-radius: var(--radius-sm);
|
|
243
|
+
background: var(--raised);
|
|
244
|
+
color: var(--dim);
|
|
245
|
+
font-size: var(--fs-xs);
|
|
246
|
+
font-weight: 500;
|
|
247
|
+
line-height: 1;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
}
|
|
250
|
+
.rv .chip.tinted {
|
|
251
|
+
background: var(--tone-soft);
|
|
252
|
+
color: var(--tone);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Tooltip, on the transitions-dev tooltip tokens. Pure CSS: a data-tip on anything. */
|
|
256
|
+
.rv [data-tip] {
|
|
257
|
+
position: relative;
|
|
258
|
+
}
|
|
259
|
+
.rv [data-tip]::after {
|
|
260
|
+
content: attr(data-tip);
|
|
261
|
+
position: absolute;
|
|
262
|
+
z-index: 40;
|
|
263
|
+
top: calc(100% + 8px);
|
|
264
|
+
left: 50%;
|
|
265
|
+
translate: -50% 0;
|
|
266
|
+
width: max-content;
|
|
267
|
+
max-width: 260px;
|
|
268
|
+
padding: 7px 10px;
|
|
269
|
+
border-radius: var(--radius-sm);
|
|
270
|
+
background: color-mix(in oklab, var(--raised) 92%, var(--text));
|
|
271
|
+
box-shadow: var(--shadow-pop);
|
|
272
|
+
color: var(--text);
|
|
273
|
+
font: 500 var(--fs-xs) / 1.4 var(--sans);
|
|
274
|
+
text-align: left;
|
|
275
|
+
text-wrap: pretty;
|
|
276
|
+
white-space: normal;
|
|
277
|
+
pointer-events: none;
|
|
278
|
+
opacity: 0;
|
|
279
|
+
scale: var(--tt-scale);
|
|
280
|
+
transform-origin: top center;
|
|
281
|
+
transition:
|
|
282
|
+
opacity var(--tt-out-dur) var(--ease-out),
|
|
283
|
+
scale var(--tt-out-dur) var(--ease-out);
|
|
284
|
+
}
|
|
285
|
+
.rv [data-tip][data-tip-end]::after {
|
|
286
|
+
left: auto;
|
|
287
|
+
right: 0;
|
|
288
|
+
translate: 0 0;
|
|
289
|
+
transform-origin: top right;
|
|
290
|
+
}
|
|
291
|
+
.rv [data-tip]:hover::after,
|
|
292
|
+
.rv [data-tip]:focus-visible::after {
|
|
293
|
+
opacity: 1;
|
|
294
|
+
scale: 1;
|
|
295
|
+
transition:
|
|
296
|
+
opacity var(--tt-in-dur) var(--ease-out) var(--tt-delay),
|
|
297
|
+
scale var(--tt-in-dur) var(--ease-out) var(--tt-delay);
|
|
298
|
+
}
|
|
299
|
+
@media (hover: none) {
|
|
300
|
+
.rv [data-tip]::after {
|
|
301
|
+
display: none;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* Skeletons pulse instead of shimmering across text they can't yet say. */
|
|
306
|
+
.rv .skel {
|
|
307
|
+
background: var(--raised);
|
|
308
|
+
border-radius: var(--radius-sm);
|
|
309
|
+
animation: rv-pulse var(--pulse-dur) var(--ease-in-out) infinite alternate;
|
|
310
|
+
}
|
|
311
|
+
@keyframes rv-pulse {
|
|
312
|
+
from {
|
|
313
|
+
opacity: 1;
|
|
314
|
+
}
|
|
315
|
+
to {
|
|
316
|
+
opacity: 0.5;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* A number or word that changed: the old one is gone, the new one slides and un-blurs in. */
|
|
321
|
+
@keyframes rv-swap {
|
|
322
|
+
from {
|
|
323
|
+
opacity: 0;
|
|
324
|
+
transform: translateY(var(--text-swap-translate-y));
|
|
325
|
+
filter: blur(var(--text-swap-blur));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@media (prefers-reduced-motion: reduce) {
|
|
330
|
+
.rv .skel {
|
|
331
|
+
animation: none;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* The theme switch paints the new theme as a circle (see hooks/theme.svelte.ts); the browser's own cross-fade would fight it. */
|
|
336
|
+
::view-transition-old(root),
|
|
337
|
+
::view-transition-new(root) {
|
|
338
|
+
animation: none;
|
|
339
|
+
mix-blend-mode: normal;
|
|
340
|
+
}
|
|
341
|
+
::view-transition-old(root) {
|
|
342
|
+
z-index: 1;
|
|
343
|
+
}
|
|
344
|
+
::view-transition-new(root) {
|
|
345
|
+
z-index: 2;
|
|
346
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The only file that may hold a colour, a radius or a duration, all under :where() so a host
|
|
3
|
+
* stylesheet overrides any of them just by setting the name.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:where(:root) {
|
|
7
|
+
color-scheme: dark;
|
|
8
|
+
|
|
9
|
+
/* Set here, not on .rv, so a brand's own --on-accent on :root reaches the buttons. */
|
|
10
|
+
--on-accent: oklch(0.12 0.04 258);
|
|
11
|
+
--ground: oklch(0.12 0.04 258);
|
|
12
|
+
--surface: oklch(0.16 0.045 260);
|
|
13
|
+
--raised: oklch(0.205 0.05 262);
|
|
14
|
+
--line: oklch(0.27 0.055 264);
|
|
15
|
+
--line-soft: oklch(0.22 0.05 262);
|
|
16
|
+
|
|
17
|
+
--text: oklch(0.97 0.01 55);
|
|
18
|
+
--dim: oklch(0.76 0.02 262);
|
|
19
|
+
--faint: oklch(0.63 0.02 262);
|
|
20
|
+
|
|
21
|
+
--accent: oklch(0.68 0.16 272);
|
|
22
|
+
--bot: oklch(0.72 0.12 305);
|
|
23
|
+
/* The GrokBot face from the old Shorts room (github.com/zhulin025/LaoA-GrokBot, MIT), and the colours it cycles while thinking. */
|
|
24
|
+
--bot-think-a: #4f7cf6;
|
|
25
|
+
--bot-think-b: #d15cf0;
|
|
26
|
+
--ok: oklch(0.72 0.16 150);
|
|
27
|
+
--warn: oklch(0.8 0.13 75);
|
|
28
|
+
/* Warn as text. Light darkens it; keep --warn for dots and fills. */
|
|
29
|
+
--warn-text: var(--warn);
|
|
30
|
+
--bad: oklch(0.65 0.19 25);
|
|
31
|
+
|
|
32
|
+
/* The cover over the video frame stays dark with light text in both themes, like a player's. */
|
|
33
|
+
--cover-scrim-low: oklch(0 0 0 / 0.84);
|
|
34
|
+
--cover-scrim-mid: oklch(0 0 0 / 0.5);
|
|
35
|
+
--cover-scrim-top: oklch(0 0 0 / 0.4);
|
|
36
|
+
--cover-band: oklch(0.14 0.012 262);
|
|
37
|
+
--cover-text: oklch(1 0 0);
|
|
38
|
+
--cover-track: oklch(1 0 0 / 0.22);
|
|
39
|
+
--cover-fill: oklch(0.68 0.16 272);
|
|
40
|
+
|
|
41
|
+
/* The layout diagram is a fixed dark scene of a presenter at a desk, so it doesn't follow the theme. */
|
|
42
|
+
--scene-canvas: #0b0b0c;
|
|
43
|
+
--scene-room-top: #34363c;
|
|
44
|
+
--scene-room-bottom: #1a1b1f;
|
|
45
|
+
--scene-glow: #ffffff;
|
|
46
|
+
--scene-skin-top: #b9bcc4;
|
|
47
|
+
--scene-skin-bottom: #8c9099;
|
|
48
|
+
--scene-shirt: #565a64;
|
|
49
|
+
--scene-neck: #9a9ea7;
|
|
50
|
+
--scene-shadow: #000000;
|
|
51
|
+
--scene-collar: #484b54;
|
|
52
|
+
--scene-arm: #4a4e57;
|
|
53
|
+
--scene-screen: #181b22;
|
|
54
|
+
--scene-screen-bar: #232731;
|
|
55
|
+
--scene-dot: #3d4350;
|
|
56
|
+
--scene-pane: #20242d;
|
|
57
|
+
--scene-line: #2f3542;
|
|
58
|
+
--scene-media: #26232e;
|
|
59
|
+
--scene-media-ink: #4c4659;
|
|
60
|
+
--scene-edge: rgb(255 255 255 / 0.08);
|
|
61
|
+
--scene-grid: rgb(255 255 255 / 0.06);
|
|
62
|
+
--scene-words: #ffffff;
|
|
63
|
+
|
|
64
|
+
--sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
65
|
+
--display: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
66
|
+
--mono: "Space Grotesk", ui-monospace, "SF Mono", Menlo, monospace;
|
|
67
|
+
|
|
68
|
+
/* The one corner knob. Every other radius is a multiple of it. */
|
|
69
|
+
--radius: 10px;
|
|
70
|
+
|
|
71
|
+
/* Motion, on the transitions-dev names. */
|
|
72
|
+
--duration-stagger: 40ms;
|
|
73
|
+
--duration-micro: 80ms;
|
|
74
|
+
--duration-quick: 150ms;
|
|
75
|
+
--duration-fast: 250ms;
|
|
76
|
+
--duration-medium: 280ms;
|
|
77
|
+
--duration-slow: 300ms;
|
|
78
|
+
--duration-overlay: 500ms;
|
|
79
|
+
--duration-loop: 500ms;
|
|
80
|
+
--ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
|
|
81
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
|
|
82
|
+
--ease-out: ease-out;
|
|
83
|
+
--ease-linear: linear;
|
|
84
|
+
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
|
|
85
|
+
--distance-micro: 4px;
|
|
86
|
+
--distance-base: 8px;
|
|
87
|
+
--scale-large: 0.96;
|
|
88
|
+
--scale-medium: 0.97;
|
|
89
|
+
--scale-small: 0.98;
|
|
90
|
+
--scale-tiny: 0.99;
|
|
91
|
+
--blur-small: 2px;
|
|
92
|
+
--blur-medium: 3px;
|
|
93
|
+
--pulse-dur: 1000ms;
|
|
94
|
+
--bot-think-dur: 2400ms;
|
|
95
|
+
--shimmer-dur: 2000ms;
|
|
96
|
+
|
|
97
|
+
--text-swap-dur: var(--duration-quick);
|
|
98
|
+
--text-swap-translate-y: var(--distance-micro);
|
|
99
|
+
--text-swap-blur: var(--blur-small);
|
|
100
|
+
--page-slide-dur: var(--duration-fast);
|
|
101
|
+
--page-slide-distance: var(--distance-base);
|
|
102
|
+
--page-blur: var(--blur-medium);
|
|
103
|
+
--dropdown-open-dur: var(--duration-fast);
|
|
104
|
+
--dropdown-close-dur: var(--duration-quick);
|
|
105
|
+
--dropdown-pre-scale: var(--scale-medium);
|
|
106
|
+
--panel-open-dur: var(--duration-slow);
|
|
107
|
+
--panel-close-dur: var(--duration-medium);
|
|
108
|
+
--tabs-dur: var(--duration-fast);
|
|
109
|
+
--tabs-ease: var(--ease-smooth-out);
|
|
110
|
+
--tt-in-dur: var(--duration-quick);
|
|
111
|
+
--tt-out-dur: 50ms;
|
|
112
|
+
--tt-delay: var(--duration-micro);
|
|
113
|
+
--tt-scale: var(--scale-small);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(:root[data-theme="light"]) {
|
|
117
|
+
color-scheme: light;
|
|
118
|
+
|
|
119
|
+
--on-accent: oklch(0.975 0.006 60);
|
|
120
|
+
--ground: oklch(0.975 0.006 60);
|
|
121
|
+
--surface: oklch(0.995 0.002 60);
|
|
122
|
+
--raised: oklch(0.945 0.008 60);
|
|
123
|
+
--line: oklch(0.86 0.012 260);
|
|
124
|
+
--line-soft: oklch(0.91 0.01 260);
|
|
125
|
+
|
|
126
|
+
--text: oklch(0.2 0.03 262);
|
|
127
|
+
--dim: oklch(0.38 0.025 262);
|
|
128
|
+
--faint: oklch(0.5 0.02 262);
|
|
129
|
+
|
|
130
|
+
--accent: oklch(0.5 0.2 272);
|
|
131
|
+
--bot: oklch(0.52 0.15 305);
|
|
132
|
+
--ok: oklch(0.52 0.14 150);
|
|
133
|
+
--warn: oklch(0.62 0.15 70);
|
|
134
|
+
--warn-text: oklch(0.48 0.11 70);
|
|
135
|
+
--bad: oklch(0.55 0.2 25);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* WHY: one switch for every animation and transition that reads a token. */
|
|
139
|
+
@media (prefers-reduced-motion: reduce) {
|
|
140
|
+
:where(:root) {
|
|
141
|
+
--duration-stagger: 0ms;
|
|
142
|
+
--duration-micro: 0ms;
|
|
143
|
+
--duration-quick: 0ms;
|
|
144
|
+
--duration-fast: 0ms;
|
|
145
|
+
--duration-medium: 0ms;
|
|
146
|
+
--duration-slow: 0ms;
|
|
147
|
+
--duration-overlay: 0ms;
|
|
148
|
+
--duration-loop: 0ms;
|
|
149
|
+
--pulse-dur: 0ms;
|
|
150
|
+
--bot-think-dur: 0ms;
|
|
151
|
+
--shimmer-dur: 0ms;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* The derived tokens live on the page root, so an override anywhere above it is followed. */
|
|
156
|
+
:where(.rv) {
|
|
157
|
+
--radius-xs: calc(var(--radius) * 0.35);
|
|
158
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
159
|
+
--radius-lg: calc(var(--radius) * 1.4);
|
|
160
|
+
--radius-xl: calc(var(--radius) * 2);
|
|
161
|
+
--radius-pill: 999px;
|
|
162
|
+
|
|
163
|
+
--hover: color-mix(in oklab, var(--text) 6%, transparent);
|
|
164
|
+
--press: color-mix(in oklab, var(--text) 11%, transparent);
|
|
165
|
+
--scrim: color-mix(in oklab, var(--ground) 64%, transparent);
|
|
166
|
+
--line-strong: color-mix(in oklab, var(--line) 70%, var(--dim));
|
|
167
|
+
--accent-soft: color-mix(in oklab, var(--accent) 16%, var(--surface));
|
|
168
|
+
--accent-line: color-mix(in oklab, var(--accent) 48%, var(--line));
|
|
169
|
+
--ok-soft: color-mix(in oklab, var(--ok) 15%, var(--surface));
|
|
170
|
+
--warn-soft: color-mix(in oklab, var(--warn) 16%, var(--surface));
|
|
171
|
+
--bad-soft: color-mix(in oklab, var(--bad) 16%, var(--surface));
|
|
172
|
+
--bot-soft: color-mix(in oklab, var(--bot) 15%, var(--surface));
|
|
173
|
+
|
|
174
|
+
/* The @heyramzi/tasks tone names, read by its status dots, mapped onto review's palette. */
|
|
175
|
+
--color-muted-foreground: var(--dim);
|
|
176
|
+
--tone-accent: var(--accent);
|
|
177
|
+
--color-success: var(--ok);
|
|
178
|
+
--color-warning: var(--warn);
|
|
179
|
+
--color-destructive: var(--bad);
|
|
180
|
+
--status-dot-mark: var(--ground);
|
|
181
|
+
|
|
182
|
+
--shadow-pop:
|
|
183
|
+
0 1px 0 color-mix(in oklab, var(--text) 5%, transparent) inset,
|
|
184
|
+
0 12px 32px color-mix(in oklab, var(--ground) 65%, transparent), 0 0 0 1px var(--line);
|
|
185
|
+
--shadow-sheet:
|
|
186
|
+
0 -16px 48px color-mix(in oklab, var(--ground) 70%, transparent), 0 0 0 1px var(--line);
|
|
187
|
+
--shadow-lift: 0 6px 18px color-mix(in oklab, var(--ground) 55%, transparent);
|
|
188
|
+
|
|
189
|
+
--fs-2xs: 0.6875rem;
|
|
190
|
+
--fs-xs: 0.75rem;
|
|
191
|
+
--fs-sm: 0.8125rem;
|
|
192
|
+
--fs-md: 0.875rem;
|
|
193
|
+
--fs-lg: 1rem;
|
|
194
|
+
--fs-xl: 1.25rem;
|
|
195
|
+
/* 32px is the desktop floor for a button; the coarse-pointer rule lifts it to 40px. */
|
|
196
|
+
--control: 32px;
|
|
197
|
+
--gutter: 16px;
|
|
198
|
+
}
|
package/README.md
DELETED