@parallelworks/ui 0.56.0 → 0.58.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 +36 -13
- package/dist/access/PrincipalPicker.js +2 -1
- package/dist/ai/ai.css +38 -0
- package/dist/components/Avatar.d.ts +5 -1
- package/dist/components/Avatar.js +4 -2
- package/dist/components/Markdown.d.ts +3 -0
- package/dist/components/Markdown.js +2 -1
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/MarkdownImpl.js +5 -3
- package/dist/components/Provider.d.ts +10 -0
- package/dist/components/Provider.js +9 -0
- package/dist/components/Table.d.ts +7 -5
- package/dist/components/Table.js +6 -2
- package/dist/components/ThemeEditor.js +1 -1
- package/dist/components/category.d.ts +9 -0
- package/dist/components/category.js +30 -0
- package/dist/components/fieldBox.js +3 -3
- package/dist/components/httpsImages.d.ts +12 -0
- package/dist/components/httpsImages.js +27 -0
- package/dist/components/stickyTop.d.ts +10 -0
- package/dist/components/stickyTop.js +88 -0
- package/dist/file-explorer/FileExplorer.js +21 -15
- package/dist/graph/DependencyGraph.d.ts +14 -1
- package/dist/graph/DependencyGraph.js +169 -77
- package/dist/graph/JobSummary.js +13 -3
- package/dist/graph/StepSummary.d.ts +4 -0
- package/dist/graph/StepSummary.js +31 -0
- package/dist/graph/index.d.ts +1 -0
- package/dist/graph/index.js +2 -1
- package/dist/graph/types.d.ts +3 -0
- package/dist/graph/util.d.ts +1 -1
- package/dist/icons.d.ts +3 -0
- package/dist/icons.js +23 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/logviewer/LogViewer.js +3 -3
- package/dist/styles/theme.css +17 -0
- package/dist/styles.css +1 -1
- package/dist/theme/derive.d.ts +2 -1
- package/dist/theme/derive.js +52 -1
- package/package.json +1 -1
package/dist/theme/derive.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CodeStyle, type Mode, 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-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'];
|
|
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-field', '--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', '--theme-category-1', '--theme-category-1-text', '--theme-category-2', '--theme-category-2-text', '--theme-category-3', '--theme-category-3-text', '--theme-category-4', '--theme-category-4-text', '--theme-category-5', '--theme-category-5-text', '--theme-category-6', '--theme-category-6-text', '--theme-category-7', '--theme-category-7-text', '--theme-category-8', '--theme-category-8-text'];
|
|
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. */
|
|
@@ -19,6 +19,7 @@ export interface DeriveOptions {
|
|
|
19
19
|
export declare const PLACEHOLDER_ON: ThemeToken[];
|
|
20
20
|
/** The surfaces a control's edge sits on: the page, panels, and the control's own fill. */
|
|
21
21
|
export declare const CONTROL_ON: ThemeToken[];
|
|
22
|
+
export declare const CATEGORY_COUNT = 8;
|
|
22
23
|
/** Every token as sRGB, plus display-p3 overrides that keep every contrast the sRGB output meets. */
|
|
23
24
|
export declare function generateTheme(scheme: Scheme, options?: DeriveOptions): GeneratedTheme;
|
|
24
25
|
/** Every `--theme-*` token for a scheme, in sRGB. */
|
package/dist/theme/derive.js
CHANGED
|
@@ -15,6 +15,7 @@ var THEME_TOKENS = [
|
|
|
15
15
|
"--theme-placeholder",
|
|
16
16
|
"--theme-link",
|
|
17
17
|
"--theme-border",
|
|
18
|
+
"--theme-border-field",
|
|
18
19
|
"--theme-border-strong",
|
|
19
20
|
"--theme-accent",
|
|
20
21
|
"--theme-accent-text",
|
|
@@ -67,7 +68,23 @@ var THEME_TOKENS = [
|
|
|
67
68
|
"--theme-ansi-blue",
|
|
68
69
|
"--theme-ansi-magenta",
|
|
69
70
|
"--theme-ansi-cyan",
|
|
70
|
-
"--theme-ansi-white"
|
|
71
|
+
"--theme-ansi-white",
|
|
72
|
+
"--theme-category-1",
|
|
73
|
+
"--theme-category-1-text",
|
|
74
|
+
"--theme-category-2",
|
|
75
|
+
"--theme-category-2-text",
|
|
76
|
+
"--theme-category-3",
|
|
77
|
+
"--theme-category-3-text",
|
|
78
|
+
"--theme-category-4",
|
|
79
|
+
"--theme-category-4-text",
|
|
80
|
+
"--theme-category-5",
|
|
81
|
+
"--theme-category-5-text",
|
|
82
|
+
"--theme-category-6",
|
|
83
|
+
"--theme-category-6-text",
|
|
84
|
+
"--theme-category-7",
|
|
85
|
+
"--theme-category-7-text",
|
|
86
|
+
"--theme-category-8",
|
|
87
|
+
"--theme-category-8-text"
|
|
71
88
|
];
|
|
72
89
|
/** The tokens the sidebar owns. A host's chrome may supply its own fallbacks, so the stylesheet gives them no defaults. */
|
|
73
90
|
var SIDEBAR_TOKENS = THEME_TOKENS.filter((t) => t.startsWith("--theme-sidebar-"));
|
|
@@ -153,6 +170,11 @@ function targets(k) {
|
|
|
153
170
|
3,
|
|
154
171
|
4.5
|
|
155
172
|
]) },
|
|
173
|
+
field: { wcag: byContrast(k, [
|
|
174
|
+
1.3,
|
|
175
|
+
1.5,
|
|
176
|
+
3
|
|
177
|
+
]) },
|
|
156
178
|
label: { wcag: 4.5 }
|
|
157
179
|
};
|
|
158
180
|
}
|
|
@@ -189,6 +211,11 @@ var SYNTAX = {
|
|
|
189
211
|
type: 195,
|
|
190
212
|
property: 240
|
|
191
213
|
};
|
|
214
|
+
var CATEGORY_START = 20;
|
|
215
|
+
var CATEGORY_CHROMA = {
|
|
216
|
+
light: .055,
|
|
217
|
+
dark: .06
|
|
218
|
+
};
|
|
192
219
|
var CODE_CHROMA = {
|
|
193
220
|
balanced: .13,
|
|
194
221
|
vivid: .19,
|
|
@@ -319,6 +346,7 @@ function build(scheme, options) {
|
|
|
319
346
|
];
|
|
320
347
|
set("--theme-focus-ring", solved("--theme-focus", accent, focusOn, meets(toHex(accent), focusOn.map(hexOf), t.graphic) ? t.graphic : { wcag: t.secondary.wcag }), dark ? .35 : .25);
|
|
321
348
|
solved("--theme-border-strong", border, CONTROL_ON, t.graphic);
|
|
349
|
+
solved("--theme-border-field", border, CONTROL_ON, t.field);
|
|
322
350
|
set("--theme-accent", accent);
|
|
323
351
|
const white = contrastRatio("#ffffff", toHex(accent)) >= 4.5;
|
|
324
352
|
set("--theme-accent-hover", {
|
|
@@ -431,6 +459,29 @@ function build(scheme, options) {
|
|
|
431
459
|
}, codeOn, t.secondary);
|
|
432
460
|
keep("--theme-ansi-black", dark ? comment : codeText, codeOn, t.secondary);
|
|
433
461
|
keep("--theme-ansi-white", dark ? codeText : comment, codeOn, t.secondary);
|
|
462
|
+
const categoryL = (dark ? clamp(base.l + .14, .36, .46) : clamp(base.l - .07, .86, .9)) - dir * byContrast(k, [
|
|
463
|
+
0,
|
|
464
|
+
0,
|
|
465
|
+
.03
|
|
466
|
+
]);
|
|
467
|
+
for (let i = 0; i < 8; i++) {
|
|
468
|
+
const h = (CATEGORY_START + 45 * i) % 360;
|
|
469
|
+
const token = `--theme-category-${i + 1}`;
|
|
470
|
+
set(token, {
|
|
471
|
+
l: categoryL,
|
|
472
|
+
c: CATEGORY_CHROMA[dark ? "dark" : "light"],
|
|
473
|
+
h
|
|
474
|
+
});
|
|
475
|
+
solved(`--theme-category-${i + 1}-text`, dark ? {
|
|
476
|
+
l: .9,
|
|
477
|
+
c: .05,
|
|
478
|
+
h
|
|
479
|
+
} : {
|
|
480
|
+
l: .42,
|
|
481
|
+
c: .08,
|
|
482
|
+
h
|
|
483
|
+
}, [token], t.secondary);
|
|
484
|
+
}
|
|
434
485
|
const shade = dark ? .35 : .07;
|
|
435
486
|
const a = (v) => Number((v * b).toFixed(3));
|
|
436
487
|
const shadows = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.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": {
|