@parallelworks/ui 0.50.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -5
- package/dist/ai/components/ModelSelector.js +1 -1
- package/dist/ai/components/agent/AgentMessageParts.js +3 -3
- package/dist/components/Callout.js +3 -7
- package/dist/components/CreateModal.js +1 -1
- package/dist/components/DescriptionList.d.ts +31 -17
- package/dist/components/DescriptionList.js +83 -31
- package/dist/components/Field.js +1 -1
- package/dist/components/MenuEntries.d.ts +39 -12
- package/dist/components/MenuEntries.js +24 -8
- package/dist/components/Meter.js +3 -3
- package/dist/components/PageHeader.js +1 -1
- package/dist/components/Provider.d.ts +2 -0
- package/dist/components/Provider.js +1 -0
- package/dist/components/RequiredMark.js +1 -1
- package/dist/components/RunStatusIcon.js +2 -2
- package/dist/components/StatusIcons.js +2 -2
- package/dist/components/ThemeEditor.js +6 -6
- package/dist/components/Toast.js +2 -2
- package/dist/components/buttonClasses.js +1 -1
- package/dist/components/tone.d.ts +5 -2
- package/dist/components/tone.js +15 -6
- package/dist/form/Wizard/WizardNavigation.js +1 -1
- package/dist/form/Wizard/WizardStepIndicator.js +1 -1
- package/dist/graph/DependencyGraph.js +1 -1
- package/dist/graph/GraphEditor.js +1 -1
- package/dist/graph/GraphEditorDialogs.js +1 -1
- package/dist/graph/ProblemsButton.js +2 -2
- package/dist/graph/ShortcutsButton.js +1 -1
- package/dist/graph/editorChrome.js +1 -1
- package/dist/graph/fieldProblems.js +1 -1
- package/dist/graph/stepWith.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/list/ActionToolbar.d.ts +2 -2
- package/dist/list/ActionToolbar.js +6 -3
- package/dist/list/ListPage.js +4 -2
- package/dist/list/ListViewControls.js +1 -1
- package/dist/list/rowMenu.d.ts +2 -2
- package/dist/logviewer/LogViewer.js +1 -1
- package/dist/styles/theme.css +24 -10
- package/dist/styles.css +1 -1
- package/dist/theme/derive.d.ts +1 -1
- package/dist/theme/derive.js +46 -21
- package/dist/theme/fit.js +10 -4
- package/package.json +1 -1
package/dist/theme/derive.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CodeStyle, type Scheme } from './model.js';
|
|
2
|
-
export declare const THEME_TOKENS: readonly ['--theme-app-bg', '--theme-panel-bg', '--theme-panel-hover', '--theme-muted-panel-bg', '--theme-hover', '--theme-input-bg', '--theme-input-disabled-bg', '--theme-app', '--theme-muted-text-color', '--theme-placeholder', '--theme-link', '--theme-border', '--theme-border-strong', '--theme-accent', '--theme-accent-text', '--theme-accent-hover', '--theme-accent-subtle', '--theme-focus', '--theme-focus-ring', '--theme-success', '--theme-success-muted', '--theme-error', '--theme-error-muted', '--theme-warning', '--theme-warning-muted', '--theme-info', '--theme-info-muted', '--theme-favorite', '--theme-favorite-muted', '--theme-shadow-sm', '--theme-shadow', '--theme-shadow-lg', '--theme-shadow-xl', '--theme-sidebar-bg', '--theme-sidebar-text', '--theme-sidebar-hover', '--theme-sidebar-active-bg', '--theme-sidebar-active-text', '--theme-code-bg', '--theme-code-text', '--theme-code-comment', '--theme-code-keyword', '--theme-code-string', '--theme-code-number', '--theme-code-function', '--theme-code-type', '--theme-code-property', '--theme-ansi-black', '--theme-ansi-red', '--theme-ansi-green', '--theme-ansi-yellow', '--theme-ansi-blue', '--theme-ansi-magenta', '--theme-ansi-cyan', '--theme-ansi-white'];
|
|
2
|
+
export declare const THEME_TOKENS: readonly ['--theme-app-bg', '--theme-panel-bg', '--theme-panel-hover', '--theme-muted-panel-bg', '--theme-hover', '--theme-input-bg', '--theme-input-disabled-bg', '--theme-app', '--theme-muted-text-color', '--theme-placeholder', '--theme-link', '--theme-border', '--theme-border-strong', '--theme-accent', '--theme-accent-text', '--theme-accent-hover', '--theme-accent-subtle', '--theme-focus', '--theme-focus-ring', '--theme-success', '--theme-success-text', '--theme-success-solid', '--theme-success-muted', '--theme-error', '--theme-error-text', '--theme-error-solid', '--theme-error-muted', '--theme-warning', '--theme-warning-text', '--theme-warning-solid', '--theme-warning-muted', '--theme-info', '--theme-info-text', '--theme-info-solid', '--theme-info-muted', '--theme-favorite', '--theme-favorite-text', '--theme-favorite-solid', '--theme-favorite-muted', '--theme-shadow-sm', '--theme-shadow', '--theme-shadow-lg', '--theme-shadow-xl', '--theme-sidebar-bg', '--theme-sidebar-text', '--theme-sidebar-hover', '--theme-sidebar-active-bg', '--theme-sidebar-active-text', '--theme-code-bg', '--theme-code-text', '--theme-code-comment', '--theme-code-keyword', '--theme-code-string', '--theme-code-number', '--theme-code-function', '--theme-code-type', '--theme-code-property', '--theme-ansi-black', '--theme-ansi-red', '--theme-ansi-green', '--theme-ansi-yellow', '--theme-ansi-blue', '--theme-ansi-magenta', '--theme-ansi-cyan', '--theme-ansi-white'];
|
|
3
3
|
export type ThemeToken = (typeof THEME_TOKENS)[number];
|
|
4
4
|
export type ThemeVariables = Record<ThemeToken, string>;
|
|
5
5
|
/** The tokens the sidebar owns. A host's chrome may supply its own fallbacks, so the stylesheet gives them no defaults. */
|
package/dist/theme/derive.js
CHANGED
|
@@ -23,14 +23,24 @@ var THEME_TOKENS = [
|
|
|
23
23
|
"--theme-focus",
|
|
24
24
|
"--theme-focus-ring",
|
|
25
25
|
"--theme-success",
|
|
26
|
+
"--theme-success-text",
|
|
27
|
+
"--theme-success-solid",
|
|
26
28
|
"--theme-success-muted",
|
|
27
29
|
"--theme-error",
|
|
30
|
+
"--theme-error-text",
|
|
31
|
+
"--theme-error-solid",
|
|
28
32
|
"--theme-error-muted",
|
|
29
33
|
"--theme-warning",
|
|
34
|
+
"--theme-warning-text",
|
|
35
|
+
"--theme-warning-solid",
|
|
30
36
|
"--theme-warning-muted",
|
|
31
37
|
"--theme-info",
|
|
38
|
+
"--theme-info-text",
|
|
39
|
+
"--theme-info-solid",
|
|
32
40
|
"--theme-info-muted",
|
|
33
41
|
"--theme-favorite",
|
|
42
|
+
"--theme-favorite-text",
|
|
43
|
+
"--theme-favorite-solid",
|
|
34
44
|
"--theme-favorite-muted",
|
|
35
45
|
"--theme-shadow-sm",
|
|
36
46
|
"--theme-shadow",
|
|
@@ -131,7 +141,7 @@ function targets(k) {
|
|
|
131
141
|
50,
|
|
132
142
|
65
|
|
133
143
|
]),
|
|
134
|
-
|
|
144
|
+
graphic: { wcag: byContrast(k, [
|
|
135
145
|
3,
|
|
136
146
|
3,
|
|
137
147
|
4.5
|
|
@@ -141,9 +151,14 @@ function targets(k) {
|
|
|
141
151
|
2.2,
|
|
142
152
|
3
|
|
143
153
|
]) },
|
|
144
|
-
|
|
154
|
+
label: { wcag: 4.5 }
|
|
145
155
|
};
|
|
146
156
|
}
|
|
157
|
+
var WHITE = {
|
|
158
|
+
l: 1,
|
|
159
|
+
c: 0,
|
|
160
|
+
h: 0
|
|
161
|
+
};
|
|
147
162
|
var STATUS = {
|
|
148
163
|
success: 150,
|
|
149
164
|
error: 27,
|
|
@@ -217,7 +232,7 @@ function build(scheme, options) {
|
|
|
217
232
|
const t = targets(k);
|
|
218
233
|
const paints = {};
|
|
219
234
|
const checks = [];
|
|
220
|
-
const hexOf = (d) => typeof d === "string" ? toHex(paints[d].color) : compositeHex(paints[d.fill], paints[d.over]);
|
|
235
|
+
const hexOf = (d) => typeof d === "string" ? toHex(paints[d].color) : "fixed" in d ? toHex(d.fixed) : compositeHex(paints[d.fill], paints[d.over]);
|
|
221
236
|
const set = (token, color, alpha) => {
|
|
222
237
|
paints[token] = alpha === void 0 ? { color } : {
|
|
223
238
|
color,
|
|
@@ -287,7 +302,7 @@ function build(scheme, options) {
|
|
|
287
302
|
"--theme-app-bg",
|
|
288
303
|
"--theme-panel-bg",
|
|
289
304
|
"--theme-input-bg"
|
|
290
|
-
], t.
|
|
305
|
+
], t.graphic), dark ? .35 : .25);
|
|
291
306
|
solved("--theme-border-strong", border, [
|
|
292
307
|
"--theme-app-bg",
|
|
293
308
|
"--theme-panel-bg",
|
|
@@ -303,18 +318,21 @@ function build(scheme, options) {
|
|
|
303
318
|
l: white ? 1 : 0,
|
|
304
319
|
c: 0,
|
|
305
320
|
h: 0
|
|
306
|
-
}, ["--theme-accent", "--theme-accent-hover"], t.
|
|
321
|
+
}, ["--theme-accent", "--theme-accent-hover"], t.label);
|
|
307
322
|
const mutedAlpha = dark ? .15 : .1;
|
|
323
|
+
const statusOn = [
|
|
324
|
+
"--theme-app-bg",
|
|
325
|
+
"--theme-panel-bg",
|
|
326
|
+
"--theme-panel-hover",
|
|
327
|
+
"--theme-muted-panel-bg",
|
|
328
|
+
"--theme-hover",
|
|
329
|
+
"--theme-input-bg"
|
|
330
|
+
];
|
|
308
331
|
for (const [name, hue] of Object.entries(STATUS)) {
|
|
309
332
|
const token = `--theme-${name}`;
|
|
310
333
|
const muted = `--theme-${name}-muted`;
|
|
311
|
-
const plain = [
|
|
312
|
-
"--theme-app-bg",
|
|
313
|
-
"--theme-panel-bg",
|
|
314
|
-
"--theme-muted-panel-bg"
|
|
315
|
-
];
|
|
316
334
|
const on = [
|
|
317
|
-
...
|
|
335
|
+
...statusOn,
|
|
318
336
|
{
|
|
319
337
|
fill: muted,
|
|
320
338
|
over: "--theme-app-bg"
|
|
@@ -324,18 +342,24 @@ function build(scheme, options) {
|
|
|
324
342
|
over: "--theme-panel-bg"
|
|
325
343
|
}
|
|
326
344
|
];
|
|
327
|
-
let
|
|
328
|
-
l: dark ? .
|
|
329
|
-
c: .
|
|
345
|
+
let vivid = solve({
|
|
346
|
+
l: dark ? .7 : .66,
|
|
347
|
+
c: .2,
|
|
330
348
|
h: hue
|
|
331
|
-
},
|
|
349
|
+
}, statusOn.map(hexOf), t.graphic);
|
|
332
350
|
for (let round = 0; round < 6; round++) {
|
|
333
|
-
set(muted,
|
|
334
|
-
const next = solve(
|
|
335
|
-
if (next ===
|
|
336
|
-
|
|
351
|
+
set(muted, vivid, mutedAlpha);
|
|
352
|
+
const next = solve(vivid, on.map(hexOf), t.graphic);
|
|
353
|
+
if (next === vivid) break;
|
|
354
|
+
vivid = next;
|
|
337
355
|
}
|
|
338
|
-
keep(token,
|
|
356
|
+
keep(token, vivid, on, t.graphic);
|
|
357
|
+
solved(`--theme-${name}-text`, {
|
|
358
|
+
l: dark ? .75 : .55,
|
|
359
|
+
c: .17,
|
|
360
|
+
h: hue
|
|
361
|
+
}, on, t.secondary);
|
|
362
|
+
solved(`--theme-${name}-solid`, vivid, [{ fixed: WHITE }], t.label);
|
|
339
363
|
}
|
|
340
364
|
const sidebarBase = scheme.sidebar?.base ? oklch(scheme.sidebar.base) : neutral(dark ? Math.max(.08, base.l - .035 * s) : base.l - .035 * s);
|
|
341
365
|
const sidebarAccent = scheme.sidebar?.accent ? oklch(scheme.sidebar.accent) : accent;
|
|
@@ -431,6 +455,7 @@ function p3Overrides(paints, checks) {
|
|
|
431
455
|
const show = (token) => shown(paints[token].color, gamutOf(token));
|
|
432
456
|
const backdrop = (d) => {
|
|
433
457
|
if (typeof d === "string") return show(d);
|
|
458
|
+
if ("fixed" in d) return shown(d.fixed, "srgb");
|
|
434
459
|
const fill = paints[d.fill];
|
|
435
460
|
return over(show(d.fill), fill.alpha ?? 1, rendered(paints[d.over].color, gamutOf(d.over)));
|
|
436
461
|
};
|
|
@@ -443,7 +468,7 @@ function p3Overrides(paints, checks) {
|
|
|
443
468
|
changed = true;
|
|
444
469
|
if (passes(check)) continue;
|
|
445
470
|
}
|
|
446
|
-
for (const d of check.on) for (const token of typeof d === "string" ? [d] : [d.fill, d.over]) changed = wide.delete(token) || changed;
|
|
471
|
+
for (const d of check.on) for (const token of typeof d === "string" ? [d] : "fixed" in d ? [] : [d.fill, d.over]) changed = wide.delete(token) || changed;
|
|
447
472
|
}
|
|
448
473
|
if (!changed) break;
|
|
449
474
|
}
|
package/dist/theme/fit.js
CHANGED
|
@@ -19,10 +19,16 @@ var FLOORS = {
|
|
|
19
19
|
"--theme-placeholder": ["--theme-input-bg", 3],
|
|
20
20
|
"--theme-focus": ["--theme-app-bg", 3],
|
|
21
21
|
"--theme-accent-text": ["--theme-accent", 4.5],
|
|
22
|
-
"--theme-success": ["--theme-app-bg",
|
|
23
|
-
"--theme-
|
|
24
|
-
"--theme-
|
|
25
|
-
"--theme-
|
|
22
|
+
"--theme-success": ["--theme-app-bg", 3],
|
|
23
|
+
"--theme-success-text": ["--theme-app-bg", 4.5],
|
|
24
|
+
"--theme-error": ["--theme-app-bg", 3],
|
|
25
|
+
"--theme-error-text": ["--theme-app-bg", 4.5],
|
|
26
|
+
"--theme-warning": ["--theme-app-bg", 3],
|
|
27
|
+
"--theme-warning-text": ["--theme-app-bg", 4.5],
|
|
28
|
+
"--theme-info": ["--theme-app-bg", 3],
|
|
29
|
+
"--theme-info-text": ["--theme-app-bg", 4.5],
|
|
30
|
+
"--theme-favorite": ["--theme-app-bg", 3],
|
|
31
|
+
"--theme-favorite-text": ["--theme-app-bg", 4.5],
|
|
26
32
|
"--theme-sidebar-text": ["--theme-sidebar-bg", 4.5],
|
|
27
33
|
"--theme-sidebar-active-text": ["--theme-sidebar-active-bg", 4.5],
|
|
28
34
|
"--theme-code-text": ["--theme-code-bg", 4.5],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "React UI components: a theme contract, icons, brand logos, primitives, lists, forms, a job graph, a code editor, a log viewer, a file explorer and an AI chat, each on its own subpath",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|