@mistriwork/kit 1.0.0-rc.13 → 1.0.0-rc.15
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/dist/client/app.js +2 -1
- package/dist/client/components/AppList.js +12 -1
- package/dist/client/components/Composer.js +2 -2
- package/dist/client/components/Diagram.js +1 -1
- package/dist/client/components/Dressed.js +3 -0
- package/dist/client/components/Editable.js +3 -2
- package/dist/client/components/ErrorBoundary.js +1 -1
- package/dist/client/components/Grid.d.ts +15 -1
- package/dist/client/components/Grid.js +71 -8
- package/dist/client/components/NewRecord.d.ts +3 -1
- package/dist/client/components/NewRecord.js +16 -5
- package/dist/client/components/PageFlowDiagram.css +1 -1
- package/dist/client/components/PageTimeline.js +18 -4
- package/dist/client/components/RecordSummaries.d.ts +5 -3
- package/dist/client/components/RecordSummaries.js +11 -2
- package/dist/client/components/Summary.js +1 -1
- package/dist/client/components/TableRoom.d.ts +4 -1
- package/dist/client/components/TableRoom.js +10 -5
- package/dist/client/components/TableView.d.ts +4 -2
- package/dist/client/components/TableView.js +3 -3
- package/dist/client/components/TimelineReactions.css +49 -0
- package/dist/client/components/TimelineReactions.d.ts +18 -0
- package/dist/client/components/TimelineReactions.js +58 -0
- package/dist/client/components/TreePicker.css +25 -0
- package/dist/client/components/TreePicker.d.ts +59 -0
- package/dist/client/components/TreePicker.js +407 -0
- package/dist/client/components/Value.js +33 -2
- package/dist/client/components/appListModel.d.ts +2 -0
- package/dist/client/components/chromeIcons.d.ts +1 -0
- package/dist/client/components/chromeIcons.js +1 -0
- package/dist/client/components/gridSizing.d.ts +3 -0
- package/dist/client/components/gridSizing.js +1 -1
- package/dist/client/components/inputRenderers.d.ts +7 -1
- package/dist/client/components/inputRenderers.js +2 -0
- package/dist/client/components/pageModel.d.ts +4 -0
- package/dist/client/components/reactionTally.d.ts +20 -0
- package/dist/client/components/reactionTally.js +46 -0
- package/dist/client/components/useGridGroups.d.ts +11 -0
- package/dist/client/components/useGridGroups.js +70 -0
- package/dist/client/components/useGridKeyboard.d.ts +2 -0
- package/dist/client/components/useGridKeyboard.js +18 -1
- package/dist/client/components/valueModel.d.ts +10 -3
- package/dist/client/components/valueModel.js +21 -1
- package/dist/client/copy/forms/components/TreePicker.d.ts +9 -0
- package/dist/client/copy/forms/components/TreePicker.js +11 -0
- package/dist/client/copy/lists/components/Grid.d.ts +1 -1
- package/dist/client/copy/lists/components/Grid.js +1 -1
- package/dist/client/copy/lists/components/useGridGroups.d.ts +3 -0
- package/dist/client/copy/lists/components/useGridGroups.js +5 -0
- package/dist/client/copy/record/components/TimelineReactions.d.ts +7 -0
- package/dist/client/copy/record/components/TimelineReactions.js +6 -0
- package/dist/client/copy/record/components/Value.d.ts +3 -0
- package/dist/client/copy/record/components/Value.js +3 -0
- package/dist/client/copy/shell/components/ErrorBoundary.d.ts +1 -1
- package/dist/client/copy/shell/components/ErrorBoundary.js +1 -1
- package/dist/client/copy/shell/visualTheme.d.ts +2 -0
- package/dist/client/copy/shell/visualTheme.js +2 -0
- package/dist/client/copy/workbench/components/Composer.d.ts +2 -2
- package/dist/client/copy/workbench/components/Composer.js +2 -2
- package/dist/client/copy/workbench/components/Diagram.d.ts +1 -1
- package/dist/client/copy/workbench/components/Diagram.js +1 -1
- package/dist/client/copy/workbench/components/Summary.d.ts +3 -3
- package/dist/client/copy/workbench/components/Summary.js +3 -3
- package/dist/client/features.css +41 -4
- package/dist/client/fonts/faces.css +53 -0
- package/dist/client/index.html +1 -1
- package/dist/client/page.css +3 -2
- package/dist/client/shellHost.d.ts +1 -1
- package/dist/client/shellHost.js +1 -1
- package/dist/client/structure.css +11 -3
- package/dist/client/style.css +11 -2
- package/dist/client/visualTheme.d.ts +29 -0
- package/dist/client/visualTheme.js +94 -17
- package/dist/client/visualThemes.css +2 -1
- package/package.json +10 -3
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Served, the page is the shell's own, and each of these is exactly the
|
|
9
9
|
* global it names. They are gathered here so that the shell can one day run
|
|
10
10
|
* inside a page that is not its own — a React host's route, with the host's
|
|
11
|
-
* router owning the history, the host's `<title>`, a `.
|
|
11
|
+
* router owning the history, the host's `<title>`, a `.mistri-root` element in
|
|
12
12
|
* place of `<html>` — by changing this module rather than four hundred call
|
|
13
13
|
* sites. test/check-client-host.mjs keeps it the only place: a new
|
|
14
14
|
* `window.history`, `document.title`, `document.documentElement`, `document.body`,
|
package/dist/client/shellHost.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Served, the page is the shell's own, and each of these is exactly the
|
|
9
9
|
* global it names. They are gathered here so that the shell can one day run
|
|
10
10
|
* inside a page that is not its own — a React host's route, with the host's
|
|
11
|
-
* router owning the history, the host's `<title>`, a `.
|
|
11
|
+
* router owning the history, the host's `<title>`, a `.mistri-root` element in
|
|
12
12
|
* place of `<html>` — by changing this module rather than four hundred call
|
|
13
13
|
* sites. test/check-client-host.mjs keeps it the only place: a new
|
|
14
14
|
* `window.history`, `document.title`, `document.documentElement`, `document.body`,
|
|
@@ -485,6 +485,12 @@
|
|
|
485
485
|
height: 20px;
|
|
486
486
|
font-size: var(--text-xs);
|
|
487
487
|
}
|
|
488
|
+
/* A group's head (Grid.tsx GroupHeadRow) is a hairline, not a row a reader opens: no look's row fill or hover tint
|
|
489
|
+
lands on it, here where it outranks them all. */
|
|
490
|
+
.table-wrap tbody tr.grid-group-head,
|
|
491
|
+
.table-wrap tbody tr.grid-group-head > td {
|
|
492
|
+
background: transparent;
|
|
493
|
+
}
|
|
488
494
|
|
|
489
495
|
/* The folded and drill-in menus are used by thumb: their rows keep a 44px target in every look. */
|
|
490
496
|
.topnav .tn-pop.tn-folded-pop .tn-popitem {
|
|
@@ -862,8 +868,8 @@
|
|
|
862
868
|
figure 37px and a plain banner's action 33px: a field report's grade found them on every page. A date's calendar
|
|
863
869
|
button is 30×40 inside its field and a New sheet's Close 23×25: the same grade found them on every form. A record's
|
|
864
870
|
value link (a phone number, an address) is 18px, and the 32px pencil beside a link or a reference that edits it,
|
|
865
|
-
which the same grade found on every lead: their hit areas are cut at their
|
|
866
|
-
never reaches into the next field's. */
|
|
871
|
+
which the same grade found on every lead, and a value's 24px copy button: their hit areas are cut at their
|
|
872
|
+
field's row, below, so a tall one never reaches into the next field's. */
|
|
867
873
|
:where(
|
|
868
874
|
.brand,
|
|
869
875
|
.icon-button,
|
|
@@ -892,6 +898,7 @@
|
|
|
892
898
|
.dashboard-note-action,
|
|
893
899
|
.peekpanel-close,
|
|
894
900
|
.inline-edit-button,
|
|
901
|
+
.value-copy,
|
|
895
902
|
:is(.page-field, .page-card-fact) a.value-link
|
|
896
903
|
) {
|
|
897
904
|
position: relative;
|
|
@@ -927,6 +934,7 @@
|
|
|
927
934
|
.date-field-trigger,
|
|
928
935
|
.peekpanel-close,
|
|
929
936
|
.inline-edit-button,
|
|
937
|
+
.value-copy,
|
|
930
938
|
:is(.page-field, .page-card-fact) a.value-link
|
|
931
939
|
)::before {
|
|
932
940
|
content: '';
|
|
@@ -937,7 +945,7 @@
|
|
|
937
945
|
height: max(100%, 44px);
|
|
938
946
|
transform: translate(-50%, -50%);
|
|
939
947
|
}
|
|
940
|
-
:is(.page-field, .page-card-fact):has(a.value-link, .inline-edit-button) {
|
|
948
|
+
:is(.page-field, .page-card-fact):has(a.value-link, .inline-edit-button, .value-copy) {
|
|
941
949
|
clip-path: inset(0 -100vmax);
|
|
942
950
|
}
|
|
943
951
|
/* A folding section's heading draws its chevron on ::before, so its hit area is the ::after. A gantt bar is
|
package/dist/client/style.css
CHANGED
|
@@ -1214,8 +1214,8 @@ td .ref { color: var(--link); text-decoration: underline; text-decoration-style:
|
|
|
1214
1214
|
font: inherit; line-height: 1.4;
|
|
1215
1215
|
}
|
|
1216
1216
|
.step-control > :not(:first-child) { border-inline-start: 1px solid var(--line); }
|
|
1217
|
-
.step-control .
|
|
1218
|
-
.step-control:dir(rtl) .
|
|
1217
|
+
.step-control .mistri-icon, .crumb-back .mistri-icon { flex: none; }
|
|
1218
|
+
.step-control:dir(rtl) .mistri-icon, .crumb-back:dir(rtl) .mistri-icon { transform: scaleX(-1); }
|
|
1219
1219
|
.step-label { min-inline-size: 0; overflow-wrap: anywhere; }
|
|
1220
1220
|
.step-position {
|
|
1221
1221
|
display: flex; align-items: center; justify-content: center;
|
|
@@ -1633,6 +1633,15 @@ button.danger { background: var(--status-critical); color: var(--surface); borde
|
|
|
1633
1633
|
a phone's screen. */
|
|
1634
1634
|
.record-summary { padding: var(--space-3h) 0 var(--space-4); border-top: 1px solid var(--line); }
|
|
1635
1635
|
.record-summary:last-child { border-bottom: 1px solid var(--line); }
|
|
1636
|
+
/* A grouped list's head on a phone (RecordSummaries.tsx): the value, its count and subtotals on one wrapping line,
|
|
1637
|
+
over a stronger rule than a summary's — a hairline row as the grid's head is, not a box. */
|
|
1638
|
+
.record-summary-group {
|
|
1639
|
+
display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3);
|
|
1640
|
+
padding: var(--space-3) 0 var(--space-2); border-top: 1px solid var(--line-strong);
|
|
1641
|
+
}
|
|
1642
|
+
.record-summary-group-name { font: 600 var(--text-md)/1.45 var(--sans); color: var(--ink); }
|
|
1643
|
+
.record-summary-group-count { font: var(--text-xs) var(--mono); color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
|
|
1644
|
+
.record-summary-group-sum { font: var(--text-sm)/1.45 var(--sans); color: var(--ink-muted); }
|
|
1636
1645
|
.record-summary.is-navigable { cursor: pointer; }
|
|
1637
1646
|
.record-summary.is-navigable:active { background: var(--raised); }
|
|
1638
1647
|
.record-summary-title { display: block; width: 100%; min-height: 32px; padding: var(--space-1h) 0; border: 0; border-radius: 0; background: none; text-align: left; font: 600 calc(15px * var(--type-k))/1.45 var(--sans); letter-spacing: 0; color: var(--ink); overflow-wrap: anywhere; }
|
|
@@ -7,12 +7,41 @@ export declare const VISUAL_THEME_REGISTRY_EVENT = "mistri:visual-theme-registry
|
|
|
7
7
|
/** The look inside an App when neither the reader nor the App names one.
|
|
8
8
|
Workbench instead defaults to its native tokens in style.css. */
|
|
9
9
|
export declare const DEFAULT_VISUAL_THEME = "workshop";
|
|
10
|
+
/**
|
|
11
|
+
* A look a host product declares for its own screens (the database browser's Workbench): its own stylesheet, worn
|
|
12
|
+
* over the native tokens rather than over a kit look. The reader picks it in Preferences beside the native default and
|
|
13
|
+
* the built-in looks; it persists as the Workbench's other picks do (`WORKBENCH_VISUAL_THEME_KEY`, which the startup
|
|
14
|
+
* veil's signature already reads, so its first paint is cached apart from every other look's), and while it is worn
|
|
15
|
+
* the root carries `data-host-look="<id>"` and no kit look attribute. Every rule in its sheet keys on that attribute,
|
|
16
|
+
* so a sheet left on the page after the reader picks another look draws nothing. An App's screens never offer one: an
|
|
17
|
+
* App is dressed by its own theme.
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface HostLook {
|
|
21
|
+
/** Lowercase letters, digits and dashes, starting with a letter: the attribute's value and what is stored. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** What Preferences calls it, in the host's words. */
|
|
24
|
+
label: string;
|
|
25
|
+
/** Its stylesheet: an address the page links, or a module that loads it (`() => import('./looks/blueprint.css')`). */
|
|
26
|
+
sheet: string | (() => Promise<unknown>);
|
|
27
|
+
/** Up to three colors the picker shows beside its name. */
|
|
28
|
+
swatches?: readonly string[];
|
|
29
|
+
}
|
|
10
30
|
/** The built-in looks, then the App's own themes. */
|
|
11
31
|
export declare function visualThemeOptions(): Array<{
|
|
12
32
|
value: string;
|
|
13
33
|
label: string;
|
|
14
34
|
swatches: readonly string[];
|
|
15
35
|
}>;
|
|
36
|
+
/** The host look worn, or undefined: the native default, a kit look, or an App's screen. @public */
|
|
37
|
+
export declare function hostLookChoice(): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The looks a host product offers on its own screens (`HostLook`), called once from its main before its shell boots:
|
|
40
|
+
* the stored pick is read again, since the page's look was worn before the main ran (shellStart.js), and a pick of a
|
|
41
|
+
* look the host no longer declares falls back to the native default for this page and stays stored.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare function registerHostLooks(looks: readonly HostLook[]): void;
|
|
16
45
|
/** The look in force: the reader's pick, else the App's preset, else Workshop. */
|
|
17
46
|
export declare function visualThemeChoice(): string;
|
|
18
47
|
/** The theme the App itself wears, where this screen is an App's and the reader may pick another: what the picker marks and what a reset returns to. */
|
|
@@ -31,6 +31,10 @@ let palettePreferences = new Map();
|
|
|
31
31
|
let inApp = false;
|
|
32
32
|
let locked = false;
|
|
33
33
|
let isolated = false;
|
|
34
|
+
/** The attribute a worn host look sets on the root. */
|
|
35
|
+
const HOST_LOOK_ATTRIBUTE = 'data-host-look';
|
|
36
|
+
const LOOK_ID = /^[a-z][a-z0-9-]{0,47}$/;
|
|
37
|
+
let hostLooks = [];
|
|
34
38
|
const swatches = (theme) => [theme.light.navGround ?? theme.light.surface, theme.light.accent, theme.light.chart2 ?? theme.light.ink];
|
|
35
39
|
/** The built-in looks, then the App's own themes. */
|
|
36
40
|
export function visualThemeOptions() {
|
|
@@ -41,7 +45,52 @@ export function visualThemeOptions() {
|
|
|
41
45
|
label: theme.label,
|
|
42
46
|
swatches: swatches(effectiveThemeDefinition(theme, paletteChoiceFor(theme))),
|
|
43
47
|
}));
|
|
44
|
-
|
|
48
|
+
if (inApp)
|
|
49
|
+
return themes;
|
|
50
|
+
return [
|
|
51
|
+
{ value: 'default', label: say('workbenchDefault'), swatches: [] },
|
|
52
|
+
...hostLooks.map((look) => ({ value: look.id, label: look.label, swatches: look.swatches?.slice(0, 3) ?? [] })),
|
|
53
|
+
...themes,
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
/** The host look this screen wears, where it wears one. */
|
|
57
|
+
const wornHostLook = () => (inApp ? undefined : hostLooks.find((look) => look.id === workbenchPreferred));
|
|
58
|
+
/** Whether a kit look dresses this screen: always in an App; outside one, only the built-in look its reader picked, never
|
|
59
|
+
the native default or a host look, which are worn over the native tokens. */
|
|
60
|
+
const kitLookWorn = () => inApp || Boolean(workbenchPreferred && themePreset(workbenchPreferred));
|
|
61
|
+
/** The host look worn, or undefined: the native default, a kit look, or an App's screen. @public */
|
|
62
|
+
export function hostLookChoice() {
|
|
63
|
+
return wornHostLook()?.id;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The looks a host product offers on its own screens (`HostLook`), called once from its main before its shell boots:
|
|
67
|
+
* the stored pick is read again, since the page's look was worn before the main ran (shellStart.js), and a pick of a
|
|
68
|
+
* look the host no longer declares falls back to the native default for this page and stays stored.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export function registerHostLooks(looks) {
|
|
72
|
+
const ids = new Set();
|
|
73
|
+
for (const look of looks) {
|
|
74
|
+
if (!LOOK_ID.test(look.id))
|
|
75
|
+
throw new Error(say('hostLookId', { id: look.id }));
|
|
76
|
+
if (look.id === 'default' || themePreset(look.id) || ids.has(look.id))
|
|
77
|
+
throw new Error(say('hostLookTaken', { id: look.id }));
|
|
78
|
+
ids.add(look.id);
|
|
79
|
+
}
|
|
80
|
+
hostLooks = [...looks];
|
|
81
|
+
workbenchPreferred = storedWorkbenchLook();
|
|
82
|
+
apply();
|
|
83
|
+
window.dispatchEvent(new Event(VISUAL_THEME_REGISTRY_EVENT));
|
|
84
|
+
}
|
|
85
|
+
/** The Workbench's stored pick, while it names a built-in look or a host look this page declares. */
|
|
86
|
+
function storedWorkbenchLook() {
|
|
87
|
+
try {
|
|
88
|
+
const value = window.localStorage.getItem(WORKBENCH_VISUAL_THEME_KEY);
|
|
89
|
+
return value && (themePreset(value) || hostLooks.some((look) => look.id === value)) ? value : undefined;
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return undefined; /* Native Workbench needs no storage. */
|
|
93
|
+
}
|
|
45
94
|
}
|
|
46
95
|
const offered = (value) => typeof value === 'string' && visualThemeOptions().some((theme) => theme.value === value);
|
|
47
96
|
/** The look in force: the reader's pick, else the App's preset, else Workshop. */
|
|
@@ -101,7 +150,7 @@ export function resetVisualTheme() {
|
|
|
101
150
|
const ownColorsArePalette = (theme) => themePreset(theme.id) === theme && Boolean(theme.palettes?.some((palette) => palette.id === theme.defaultPalette));
|
|
102
151
|
/** Palette choices belong to their theme, not to an unrelated App using the same slug. */
|
|
103
152
|
export function visualPaletteOptions() {
|
|
104
|
-
if (!
|
|
153
|
+
if (!kitLookWorn())
|
|
105
154
|
return [];
|
|
106
155
|
const theme = selectedThemeBase();
|
|
107
156
|
return [
|
|
@@ -127,7 +176,7 @@ function paletteChoiceFor(theme) {
|
|
|
127
176
|
return offered(fallback) ? fallback : 'default';
|
|
128
177
|
}
|
|
129
178
|
export function visualPaletteChoice() {
|
|
130
|
-
if (!
|
|
179
|
+
if (!kitLookWorn())
|
|
131
180
|
return 'default';
|
|
132
181
|
return paletteChoiceFor(selectedThemeBase());
|
|
133
182
|
}
|
|
@@ -252,6 +301,33 @@ function themeSheet(href) {
|
|
|
252
301
|
}
|
|
253
302
|
return arriving;
|
|
254
303
|
}
|
|
304
|
+
/* A host look's sheet, fetched once: linked where it is an address, imported where it is a module. Like a kit look's,
|
|
305
|
+
one that cannot come leaves the native tokens, which read; it is not worth a failed boot. */
|
|
306
|
+
const hostSheets = new Map();
|
|
307
|
+
function hostSheet(look) {
|
|
308
|
+
let arriving = hostSheets.get(look.id);
|
|
309
|
+
if (!arriving) {
|
|
310
|
+
const failed = (error) => console.error(`The ${look.id} look's sheet did not load.`, error ?? '');
|
|
311
|
+
if (typeof look.sheet === 'function')
|
|
312
|
+
arriving = look.sheet().then(() => undefined, failed);
|
|
313
|
+
else {
|
|
314
|
+
const link = document.createElement('link');
|
|
315
|
+
link.rel = 'stylesheet';
|
|
316
|
+
link.href = look.sheet;
|
|
317
|
+
link.dataset.hostLook = look.id;
|
|
318
|
+
arriving = new Promise((settle) => {
|
|
319
|
+
link.addEventListener('load', () => settle(), { once: true });
|
|
320
|
+
link.addEventListener('error', () => {
|
|
321
|
+
failed();
|
|
322
|
+
settle();
|
|
323
|
+
}, { once: true });
|
|
324
|
+
});
|
|
325
|
+
document.head.append(link);
|
|
326
|
+
}
|
|
327
|
+
hostSheets.set(look.id, arriving);
|
|
328
|
+
}
|
|
329
|
+
return arriving;
|
|
330
|
+
}
|
|
255
331
|
function wearSheets(styles, ...also) {
|
|
256
332
|
const arriving = [...styles.map(sheet), ...also].filter((value) => value !== undefined);
|
|
257
333
|
lookSheet = arriving.length ? Promise.all(arriving).then(() => undefined) : Promise.resolve();
|
|
@@ -281,11 +357,17 @@ const LOOK_ATTRIBUTES = [
|
|
|
281
357
|
];
|
|
282
358
|
function apply() {
|
|
283
359
|
const root = shellRoot();
|
|
284
|
-
/* Native Workbench has no look attributes. Explicit picks use the
|
|
285
|
-
definitions, token owner and sheets as the App looks. */
|
|
286
|
-
|
|
360
|
+
/* Native Workbench has no look attributes, and a host look only its own. Explicit picks of a built-in look use the
|
|
361
|
+
same definitions, token owner and sheets as the App looks. */
|
|
362
|
+
const host = wornHostLook();
|
|
363
|
+
if (host)
|
|
364
|
+
root.setAttribute(HOST_LOOK_ATTRIBUTE, host.id);
|
|
365
|
+
else
|
|
366
|
+
root.removeAttribute(HOST_LOOK_ATTRIBUTE);
|
|
367
|
+
if (!kitLookWorn()) {
|
|
287
368
|
for (const name of LOOK_ATTRIBUTES)
|
|
288
369
|
root.removeAttribute(name);
|
|
370
|
+
wearSheets([], host && hostSheet(host));
|
|
289
371
|
void wearIconWeight(undefined);
|
|
290
372
|
facesStyle?.remove();
|
|
291
373
|
facesStyle = undefined;
|
|
@@ -340,13 +422,7 @@ export function initVisualTheme() {
|
|
|
340
422
|
catch {
|
|
341
423
|
preferred = null; /* The default needs no storage. */
|
|
342
424
|
}
|
|
343
|
-
|
|
344
|
-
const value = window.localStorage.getItem(WORKBENCH_VISUAL_THEME_KEY);
|
|
345
|
-
workbenchPreferred = value && themePreset(value) ? value : undefined;
|
|
346
|
-
}
|
|
347
|
-
catch {
|
|
348
|
-
workbenchPreferred = undefined; /* Native Workbench needs no storage. */
|
|
349
|
-
}
|
|
425
|
+
workbenchPreferred = storedWorkbenchLook();
|
|
350
426
|
customPreferences = new Map();
|
|
351
427
|
try {
|
|
352
428
|
const entries = JSON.parse(window.localStorage.getItem(CUSTOM_THEME_KEY) ?? '[]');
|
|
@@ -456,8 +532,9 @@ export function setVisualTheme(value) {
|
|
|
456
532
|
}
|
|
457
533
|
/** The look's own radius and data face; an App's authored values win over them in appnav. */
|
|
458
534
|
export function visualThemeOverrides() {
|
|
459
|
-
|
|
460
|
-
|
|
535
|
+
/* The native data face: a host look's `--data-face` where it sets one, else the code face (tokens.css). */
|
|
536
|
+
if (!kitLookWorn())
|
|
537
|
+
return { font: 'var(--data-face, var(--code))', square: false };
|
|
461
538
|
const definition = selectedThemeDefinition();
|
|
462
539
|
return {
|
|
463
540
|
...(definition.density ? { density: definition.density } : {}),
|
|
@@ -477,13 +554,13 @@ export function visualThemePalette(dark) {
|
|
|
477
554
|
/** The worn theme's part styles as custom properties, written where the App's accent is (appTheme.js) so a part in
|
|
478
555
|
`accent` is the App's own accent; none outside an App or for a theme without parts. */
|
|
479
556
|
export function customThemePartTokens() {
|
|
480
|
-
if (!
|
|
557
|
+
if (!kitLookWorn())
|
|
481
558
|
return {};
|
|
482
559
|
return partTokens(selectedThemeDefinition().parts);
|
|
483
560
|
}
|
|
484
561
|
/** Values only; appnav remains the sole writer of inline theme tokens. */
|
|
485
562
|
export function customThemeTokens(dark) {
|
|
486
|
-
if (!
|
|
563
|
+
if (!kitLookWorn())
|
|
487
564
|
return {};
|
|
488
565
|
const definition = selectedThemeDefinition();
|
|
489
566
|
const tokens = {};
|
|
@@ -373,7 +373,8 @@
|
|
|
373
373
|
/* Only new preference controls and explicit Mono use unscoped rules. */
|
|
374
374
|
.dd-swatches { display: inline-flex; flex: none; gap: var(--space-1h); margin-right: var(--space-2); }
|
|
375
375
|
.dd-swatches > span { display: block; width: 9px; height: 14px; border: 1px solid #80808050; border-radius: min(2px, var(--radius)); }
|
|
376
|
-
|
|
376
|
+
/* The reader's Mono wins over a host look's data face (tokens.css). */
|
|
377
|
+
body.type-mono { --mono: var(--code); --data-face: var(--code); }
|
|
377
378
|
/* Code surfaces keep the code face; a textarea of prose (a description, a reason) keeps the interface's. */
|
|
378
379
|
:root[data-visual-theme] .app-mode :is(.ddl, .explain, #query, .applist-filter, pre, .sql-input, .composer-text, .agent-json) { font-family: var(--code); }
|
|
379
380
|
/* A list's search box, in the kit with every other field (moved from ListFilterBar.css, which stands in the base). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mistriwork/kit",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.15",
|
|
4
4
|
"description": "The shared React client both shells are drawn with: the walk and the address, Grid, Value, the record page, lists, filters and charts.",
|
|
5
5
|
"homepage": "https://mistriwork.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -42,6 +42,13 @@
|
|
|
42
42
|
"./client/delete.js": "./dist/client/delete.js",
|
|
43
43
|
"./client/density.js": "./dist/client/density.js",
|
|
44
44
|
"./client/draftRecovery.js": "./dist/client/draftRecovery.js",
|
|
45
|
+
"./client/fonts/barlow-400.woff2": "./dist/client/fonts/barlow-400.woff2",
|
|
46
|
+
"./client/fonts/barlow-600.woff2": "./dist/client/fonts/barlow-600.woff2",
|
|
47
|
+
"./client/fonts/barlow-semi-condensed-700.woff2": "./dist/client/fonts/barlow-semi-condensed-700.woff2",
|
|
48
|
+
"./client/fonts/faces.css": "./dist/client/fonts/faces.css",
|
|
49
|
+
"./client/fonts/ibm-plex-mono-400.woff2": "./dist/client/fonts/ibm-plex-mono-400.woff2",
|
|
50
|
+
"./client/fonts/ibm-plex-mono-500.woff2": "./dist/client/fonts/ibm-plex-mono-500.woff2",
|
|
51
|
+
"./client/fonts/inter-latin.woff2": "./dist/client/fonts/inter-latin.woff2",
|
|
45
52
|
"./client/help.js": "./dist/client/help.js",
|
|
46
53
|
"./client/historyToken.js": "./dist/client/historyToken.js",
|
|
47
54
|
"./client/insert.js": "./dist/client/insert.js",
|
|
@@ -75,8 +82,8 @@
|
|
|
75
82
|
"./package.json": "./package.json"
|
|
76
83
|
},
|
|
77
84
|
"dependencies": {
|
|
78
|
-
"@mistriwork/engine": "1.0.0-rc.
|
|
79
|
-
"@mistriwork/ui": "1.0.0-rc.
|
|
85
|
+
"@mistriwork/engine": "1.0.0-rc.15",
|
|
86
|
+
"@mistriwork/ui": "1.0.0-rc.15",
|
|
80
87
|
"intl-messageformat": "12.1.2",
|
|
81
88
|
"qrcode-generator": "^2.0.4"
|
|
82
89
|
},
|