@mistriwork/kit 1.0.0-rc.64 → 1.0.0-rc.66
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/components/CardsList.js +9 -3
- package/dist/client/components/MultiStepForm.css +4 -3
- package/dist/client/components/NewRecord.js +3 -2
- package/dist/client/components/Palette.js +8 -5
- package/dist/client/features.css +3 -3
- package/dist/client/lumenLook.css +1 -0
- package/dist/client/page.css +3 -0
- package/dist/client/sageLook.css +1 -0
- package/dist/client/themeFamilies.css +89 -0
- package/dist/vite.d.ts +10 -0
- package/dist/vite.js +13 -3
- package/package.json +3 -3
|
@@ -145,6 +145,12 @@ export function CardsList({ table, rows, spec, interactive = true, recordNavigat
|
|
|
145
145
|
const caption = (name) => columnLabel(table.id, name) ?? humanName(name.split('.').pop() ?? name);
|
|
146
146
|
const present = (row, name) => row[name] !== null && row[name] !== undefined && row[name] !== '';
|
|
147
147
|
const canOpen = interactive || recordNavigation;
|
|
148
|
+
/* The title is the record's label, and a column that is the title is not said again under it: the card leaves its own
|
|
149
|
+
name out of its figure, summary, lines and foot (a phone's summaries do the same, RecordSummaries.tsx). */
|
|
150
|
+
const apart = (names) => names?.filter((name) => name !== spec.primary);
|
|
151
|
+
const summary = apart(spec.facts);
|
|
152
|
+
const lines = apart(spec.lines);
|
|
153
|
+
const footer = apart(spec.footer);
|
|
148
154
|
/* A fact as a card says it, on its line under the figure or along the foot: its value, and its own word after it
|
|
149
155
|
("1 owner") or before it ("Born …") as its caption for everyone; without one, the caption only assistive
|
|
150
156
|
technology hears. */
|
|
@@ -186,7 +192,7 @@ export function CardsList({ table, rows, spec, interactive = true, recordNavigat
|
|
|
186
192
|
const tile = spec.media === 'icon';
|
|
187
193
|
const hasMedia = image !== undefined || avatar;
|
|
188
194
|
/* The summary as words, masked where its rule says: the whole of it rides the title attribute, since three lines may not hold it. */
|
|
189
|
-
const description = spec.description && present(row, spec.description)
|
|
195
|
+
const description = spec.description && spec.description !== spec.primary && present(row, spec.description)
|
|
190
196
|
? (maskedText(columnDisplay(table.id, spec.description), row[spec.description]) ??
|
|
191
197
|
String(row[spec.description]))
|
|
192
198
|
: undefined;
|
|
@@ -196,8 +202,8 @@ export function CardsList({ table, rows, spec, interactive = true, recordNavigat
|
|
|
196
202
|
? { name: dressed.icon, label: dressed.label, tone: dressed.kind === 'tone' ? dressed.tone : undefined }
|
|
197
203
|
: null;
|
|
198
204
|
const badge = spec.badge && row[spec.badge] != null && row[spec.badge] !== '' ? (_jsx("span", { className: "cards-badge", children: said(row, spec.badge) })) : null;
|
|
199
|
-
return (_jsx("li", { className: "cards-item", ...(win.windowed ? { 'data-index': win.lineOf(index), ref: win.measure } : {}), ...(id ? ordering.item(id) : {}), onKeyDown: id ? (event) => ordering.keyDown(event, id) : undefined, children: _jsxs("article", { className: `cards-card${hasMedia ? ' has-media' : ''}${avatar ? ' cards-profile' : ''}${changedRows.has(row) ? ` row-changed-${changedRows.get(row)}` : ''}`, children: [hasMedia && _jsx(CardPicture, { src: src, avatar: avatar, title: title, first: index < FIRST_ROW }), id && ordering.menu(id), _jsxs("div", { className: "cards-body", children: [tile && (_jsx("span", { className: `cards-tile${mark?.tone ? ` tone-${mark.tone}` : ''}`, children: mark && _jsx(Icon, { name: mark.name, label: mark.label, size: 22 }) })), _jsxs("h3", { className: "cards-title", children: [mark && !tile && _jsx(Icon, { name: mark.name, label: mark.label, className: "cards-icon" }), canOpen && key ? (_jsx("button", { type: "button", className: "cards-open", "data-order-focus": "", "aria-keyshortcuts": ordering.shortcuts, "data-opens": opensRecord(table.id, key), onClick: () => void openRecord(table.id, key, title, 'push', { records, list }), children: title })) : (_jsx("span", { children: title }))] }), titleSecond !== undefined && _jsx("p", { className: "cards-subtitle", children: titleSecond }), description !== undefined && (_jsx("p", { className: "cards-description", title: description, children: description })), (!hasMedia || avatar) && badge, spec.value && row[spec.value] != null && _jsx("p", { className: "cards-value", children: saidWithSecond(row, spec.value) }),
|
|
200
|
-
?
|
|
205
|
+
return (_jsx("li", { className: "cards-item", ...(win.windowed ? { 'data-index': win.lineOf(index), ref: win.measure } : {}), ...(id ? ordering.item(id) : {}), onKeyDown: id ? (event) => ordering.keyDown(event, id) : undefined, children: _jsxs("article", { className: `cards-card${hasMedia ? ' has-media' : ''}${avatar ? ' cards-profile' : ''}${changedRows.has(row) ? ` row-changed-${changedRows.get(row)}` : ''}`, children: [hasMedia && _jsx(CardPicture, { src: src, avatar: avatar, title: title, first: index < FIRST_ROW }), id && ordering.menu(id), _jsxs("div", { className: "cards-body", children: [tile && (_jsx("span", { className: `cards-tile${mark?.tone ? ` tone-${mark.tone}` : ''}`, children: mark && _jsx(Icon, { name: mark.name, label: mark.label, size: 22 }) })), _jsxs("h3", { className: "cards-title", children: [mark && !tile && _jsx(Icon, { name: mark.name, label: mark.label, className: "cards-icon" }), canOpen && key ? (_jsx("button", { type: "button", className: "cards-open", "data-order-focus": "", "aria-keyshortcuts": ordering.shortcuts, "data-opens": opensRecord(table.id, key), onClick: () => void openRecord(table.id, key, title, 'push', { records, list }), children: title })) : (_jsx("span", { children: title }))] }), titleSecond !== undefined && _jsx("p", { className: "cards-subtitle", children: titleSecond }), description !== undefined && (_jsx("p", { className: "cards-description", title: description, children: description })), (!hasMedia || avatar) && badge, spec.value && spec.value !== spec.primary && row[spec.value] != null && (_jsx("p", { className: "cards-value", children: saidWithSecond(row, spec.value) })), summary?.some((name) => present(row, name)) ? (_jsx("p", { className: "cards-summary", children: summary.filter((name) => present(row, name)).map((name) => fact(row, name, 'cards-summary-item')) })) : null, lines?.length ? (_jsx("dl", { className: "cards-facts", children: lines.map((name) => (_jsxs("div", { className: "cards-fact", children: [_jsx("dt", { children: caption(name) }), _jsx("dd", { children: saidWithSecond(row, name) })] }, name))) })) : null] }), footer?.length ? (_jsx("p", { className: "cards-foot", children: footer.some((name) => present(row, name))
|
|
206
|
+
? footer.filter((name) => present(row, name)).map((name) => fact(row, name, 'cards-foot-item'))
|
|
201
207
|
: '\u00a0' })) : null, hasMedia && !avatar && badge] }) }, key ? JSON.stringify(key) : index));
|
|
202
208
|
}), win.after > 0 && _jsx("li", { className: "cards-spacer", "aria-hidden": "true", style: { height: `${win.after}px` } })] }), ordering.live] }));
|
|
203
209
|
}
|
|
@@ -63,12 +63,13 @@
|
|
|
63
63
|
.multi-step-form[data-style='intake'] [data-slot='input'][data-hidden] { letter-spacing: 0.12em; }
|
|
64
64
|
|
|
65
65
|
/* The actions: Back a quiet word, the primary the one filled thing on the page, in the theme's primary-action color
|
|
66
|
-
(formDress.css). No rule over them.
|
|
66
|
+
(formDress.css). No rule over them. Their ground is the form's (--form-ground, which a look that draws the form
|
|
67
|
+
as a panel or a card sets): on the page's own, a look whose page is tinted drew a grey band across the panel. */
|
|
67
68
|
.intake-actions {
|
|
68
69
|
margin-inline: 0;
|
|
69
70
|
padding: var(--space-4) 0 max(var(--space-4), env(safe-area-inset-bottom));
|
|
70
71
|
border-top: 0;
|
|
71
|
-
background: var(--ground);
|
|
72
|
+
background: var(--form-ground, var(--ground));
|
|
72
73
|
align-items: center;
|
|
73
74
|
}
|
|
74
75
|
.intake-actions [data-slot='button'] { min-height: var(--control-h); }
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
.intake-actions { margin-top: auto; }
|
|
92
93
|
.intake-actions::before {
|
|
93
94
|
content: ''; position: absolute; inset-inline: 0; bottom: 100%; height: var(--space-5);
|
|
94
|
-
background: linear-gradient(to bottom, transparent, var(--ground)); pointer-events: none;
|
|
95
|
+
background: linear-gradient(to bottom, transparent, var(--form-ground, var(--ground))); pointer-events: none;
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -43,7 +43,7 @@ import { DateField } from './DateField.js';
|
|
|
43
43
|
import { isPickerDate } from '@mistriwork/ui/internal/datePickerModel.js';
|
|
44
44
|
import { appNow, formatClockZone, formatLocale, formatTimezone } from '../locale.js';
|
|
45
45
|
import { InputSlot, columnInput } from './inputRenderers.js';
|
|
46
|
-
import { autoKey, enteredNow, isRequired, platformWritten } from '@mistriwork/engine/shared/form.js';
|
|
46
|
+
import { appAssignedKey, autoKey, enteredNow, isRequired, platformWritten } from '@mistriwork/engine/shared/form.js';
|
|
47
47
|
import { columnTextRule, textRuleBreak } from '@mistriwork/engine/shared/textRules.js';
|
|
48
48
|
import { shell } from '../shellMode.js';
|
|
49
49
|
import { resourceOf } from './appRooms.js';
|
|
@@ -104,7 +104,8 @@ function NewRecordFormAsking({ words, ...props }) {
|
|
|
104
104
|
}
|
|
105
105
|
function NewRecordFormBody({ table, form, app, label: columnLabel, target, insert, onAdded, onCancel, onPendingChange, onDiscardChange, onUnresolvedChange, compact = false, retainUncertain = compact, display, frame = app ? 'drawer' : 'dialog', }) {
|
|
106
106
|
useMessageLanguage();
|
|
107
|
-
|
|
107
|
+
/* An App's store fills a single text key nothing in the catalog fills (filledKey), so its form does not demand one. */
|
|
108
|
+
const assigned = app ? appAssignedKey(table) : autoKey(table);
|
|
108
109
|
const written = app ? newFormWritten(table) : undefined;
|
|
109
110
|
/* A display-only vocabulary is chosen from in an App's form (withDisplayChoices). */
|
|
110
111
|
const choosing = (column) => app ? withDisplayChoices(column, display?.(column), [form?.defaults?.[column.name], literalDefault(column.default)]) : column;
|
|
@@ -31,9 +31,12 @@ const MOST = { recent: 4, pages: 8, create: 5, commands: 4, records: 9 };
|
|
|
31
31
|
const FIRST_PAGES = 5;
|
|
32
32
|
/** Once a word is typed the list is what it names, not a shortlist: every page the word matches stays reachable, the
|
|
33
33
|
cap only keeps a one-letter term from drawing a screenful. (The shortlist above capped a typed App at eight pages,
|
|
34
|
-
and the ninth named by the word could not be reached by any word.) Records
|
|
35
|
-
a
|
|
36
|
-
const MOST_TYPED = { recent: MOST.recent, pages: 60, create: 20, commands: 20, records:
|
|
34
|
+
and the ninth named by the word could not be reached by any word.) Records too: nine across every list hid the
|
|
35
|
+
tenth row a word named in a list of one, so the database is asked for what fills twenty, the lists sharing it. */
|
|
36
|
+
const MOST_TYPED = { recent: MOST.recent, pages: 60, create: 20, commands: 20, records: 20 };
|
|
37
|
+
/** Rows asked of each list: the typed records' room shared among them, never fewer than three, so one list fills it and
|
|
38
|
+
eight lists still each say what they hold. */
|
|
39
|
+
const perList = (lists) => Math.max(3, Math.ceil(MOST_TYPED.records / Math.max(1, lists)));
|
|
37
40
|
const groupOf = (item) => item.kind === 'page' ? 'pages' : item.kind === 'create' ? 'create' : item.kind === 'record' ? 'records' : 'commands';
|
|
38
41
|
function groupWord(group) {
|
|
39
42
|
switch (group) {
|
|
@@ -173,7 +176,7 @@ export function Palette({ prefill = '', onClose }) {
|
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
178
|
const timer = setTimeout(() => {
|
|
176
|
-
void findAcross(tables, term,
|
|
179
|
+
void findAcross(tables, term, perList(tables.length)).then((found) => {
|
|
177
180
|
if (mine !== recordToken.current)
|
|
178
181
|
return;
|
|
179
182
|
const hits = found.map((own, at) => own.map((each) => ({
|
|
@@ -184,7 +187,7 @@ export function Palette({ prefill = '', onClose }) {
|
|
|
184
187
|
icon: tables[at].room.icon,
|
|
185
188
|
run: each.open,
|
|
186
189
|
})));
|
|
187
|
-
setRecords({ term, items: interleaved(hits,
|
|
190
|
+
setRecords({ term, items: interleaved(hits, MOST_TYPED.records) });
|
|
188
191
|
});
|
|
189
192
|
}, prefill && query === prefill ? 0 : 180);
|
|
190
193
|
return () => clearTimeout(timer);
|
package/dist/client/features.css
CHANGED
|
@@ -916,7 +916,7 @@ td.dressed { white-space: nowrap; }
|
|
|
916
916
|
td.has-more { white-space: normal; }
|
|
917
917
|
/* The name over its folded columns takes a second line rather than an ellipsis: a folded row is two lines already,
|
|
918
918
|
and "Redgate Analytics Holdi…" stood cut over a detail line that wrapped whole beneath it (G187). */
|
|
919
|
-
td.has-more .cell-main { white-space: normal; text-overflow: clip; }
|
|
919
|
+
td.has-more .cell-main { white-space: normal; text-overflow: clip; flex: none; }
|
|
920
920
|
.cell-more { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font: 400 var(--text-xs)/1.35 var(--sans); color: var(--ink-muted); }
|
|
921
921
|
.cell-more-item { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-2); min-width: 0; }
|
|
922
922
|
.cell-more-head { color: var(--ink-subtle); }
|
|
@@ -1305,14 +1305,14 @@ body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-dot { width:
|
|
|
1305
1305
|
max-height: var(--available-height);
|
|
1306
1306
|
overflow-y: auto; overscroll-behavior: contain;
|
|
1307
1307
|
background: var(--surface); border: 1px solid var(--line-strong);
|
|
1308
|
-
border-radius: var(--radius);
|
|
1308
|
+
border-radius: var(--radius-pop, var(--radius));
|
|
1309
1309
|
box-shadow: var(--shadow-pop);
|
|
1310
1310
|
display: flex; flex-direction: column;
|
|
1311
1311
|
}
|
|
1312
1312
|
/* display:flex outranks the UA's [hidden] rule — say it ourselves. */
|
|
1313
1313
|
.tn-pop[hidden] { display: none; }
|
|
1314
1314
|
.tn-popitem {
|
|
1315
|
-
background: none; border: none; border-radius: var(--radius);
|
|
1315
|
+
background: none; border: none; border-radius: var(--radius-item, var(--radius));
|
|
1316
1316
|
font: var(--text-base) var(--mono); color: var(--ink);
|
|
1317
1317
|
padding: var(--space-2h) var(--space-3); text-align: left; white-space: normal; overflow-wrap: anywhere;
|
|
1318
1318
|
}
|
|
@@ -1326,6 +1326,7 @@
|
|
|
1326
1326
|
/* A form is a white card too: a drawer's body, a page form. */
|
|
1327
1327
|
:root[data-look-fields='card'] .form-page {
|
|
1328
1328
|
background: var(--surface);
|
|
1329
|
+
--form-ground: var(--surface);
|
|
1329
1330
|
border: var(--panel-border-width, 1px) solid var(--line);
|
|
1330
1331
|
border-radius: var(--radius-lg);
|
|
1331
1332
|
box-shadow: var(--shadow-card);
|
package/dist/client/page.css
CHANGED
|
@@ -2876,6 +2876,9 @@
|
|
|
2876
2876
|
-webkit-line-clamp: 3;
|
|
2877
2877
|
line-clamp: 3;
|
|
2878
2878
|
overflow: hidden;
|
|
2879
|
+
/* Whole lines inside the card, never shrunk by the column it stands in: a flex item that clips (overflow) may
|
|
2880
|
+
shrink below its content, and the third line was cut through the middle over the card's rule. */
|
|
2881
|
+
flex: none;
|
|
2879
2882
|
}
|
|
2880
2883
|
.cards-value {
|
|
2881
2884
|
margin: 0;
|
package/dist/client/sageLook.css
CHANGED
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
page not held, beside panels (`fields: 'card'` has always drawn the form as its card). */
|
|
101
101
|
:root[data-look-fields='panel'] .form-page {
|
|
102
102
|
background: var(--surface);
|
|
103
|
+
--form-ground: var(--surface);
|
|
103
104
|
border: var(--panel-border-width, 1px) solid var(--line);
|
|
104
105
|
border-radius: var(--radius-lg);
|
|
105
106
|
box-shadow: none;
|
|
@@ -231,6 +231,74 @@
|
|
|
231
231
|
is, it read as a second primary over every list and on every record. */
|
|
232
232
|
html:root[data-theme-style][data-look-tabs='pill'] :is(.tab, :where(body.app-mode) .page-tab)[aria-selected='true'] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
|
|
233
233
|
:root[data-theme-style] .tab .tab-count { font-size: var(--text-sm); line-height: 1; }
|
|
234
|
+
/* A two-or-three-way switch (a Segmented, a list's Rows/Board, the phone's Records/Table, Tree/Raw) is one drawing in every
|
|
235
|
+
look: a tray on the raised ground with a hairline, and the chosen one inside it. The tray's corner is the item's plus
|
|
236
|
+
what stands between them (padding and the hairline), so the two curves share a centre: a pill in a pill under round
|
|
237
|
+
controls, and 0 in 0 under square ones (the min() holds a square item's tray square). Its height is the toolbar
|
|
238
|
+
control's, so it stands level with the search and the filters beside it; a finger's 44px (kit.css) still outgrows it.
|
|
239
|
+
Never a `--line-control` edge: that is a field's, and a switch framed like a text field read as one. How the chosen
|
|
240
|
+
one shows is the look's `current` recipe, as the dashboard's windows are (`data-look-windows`): a filled segment
|
|
241
|
+
(the base), a lifted key (`lifted`) or a tint (`tint`). */
|
|
242
|
+
:root[data-theme-style] :is(.kit-segmented, .list-layout, .record-presentation, .json-modes) {
|
|
243
|
+
--seg-pad: var(--space-1h);
|
|
244
|
+
--seg-item-radius: var(--control-radius, var(--radius));
|
|
245
|
+
box-sizing: border-box; align-items: stretch; gap: var(--space-1); padding: var(--seg-pad);
|
|
246
|
+
border: 1px solid var(--line); background: var(--raised);
|
|
247
|
+
border-radius: min(calc(var(--seg-item-radius) + var(--seg-pad) + 1px), calc(var(--seg-item-radius) * 1000));
|
|
248
|
+
}
|
|
249
|
+
:root[data-theme-style] :is(.kit-segmented:not(.kit-segmented-compact), .list-layout, .record-presentation) { min-height: var(--control-h-sm); }
|
|
250
|
+
:root[data-theme-style] .record-presentation { width: fit-content; }
|
|
251
|
+
html:root[data-theme-style] .record-presentation { margin-inline-start: auto; }
|
|
252
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode) { margin: 0; border: 0; border-radius: var(--seg-item-radius); }
|
|
253
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):not([aria-checked='true'], [aria-pressed='true']) { background: transparent; color: var(--ink-muted); }
|
|
254
|
+
@media (min-width: 761px) and (pointer: fine) {
|
|
255
|
+
:root[data-theme-style] :is(.kit-segmented, .list-layout) > :is(.kit-segment, .list-layout-seg) { min-height: 0; }
|
|
256
|
+
}
|
|
257
|
+
@media (hover: hover) {
|
|
258
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):hover:not([aria-checked='true'], [aria-pressed='true']) { color: var(--ink); }
|
|
259
|
+
}
|
|
260
|
+
:root[data-theme-style] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):focus-visible { outline: var(--focus-width, 2px) solid var(--focus); outline-offset: -2px; }
|
|
261
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
262
|
+
:root[data-theme-style] :is(.list-layout-seg, .presentation-seg, .json-mode) { transition: color var(--t-hover, 120ms) ease, background-color var(--t-hover, 120ms) ease; }
|
|
263
|
+
}
|
|
264
|
+
/* The base: the chosen segment filled, in the accent, or in the ink where the look inverts its current one (Mono). */
|
|
265
|
+
:root[data-theme-style]:not([data-look-windows='lifted'], [data-look-windows='tint']) :is(.list-layout-seg, .presentation-seg, .json-mode):is([aria-pressed='true']) { background: var(--accent); color: var(--on-accent); }
|
|
266
|
+
:root[data-theme-style][data-look-tabs='inverted']:not([data-look-windows='lifted'], [data-look-windows='tint']) :is(.list-layout-seg, .presentation-seg, .json-mode)[aria-pressed='true'] { background: var(--ink); color: var(--surface); }
|
|
267
|
+
/* Lifted: the chosen one is a white key out of the tray, in the ink, with the control's hairline of shadow and no fill in the accent. */
|
|
268
|
+
:root[data-theme-style][data-look-windows='lifted'] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) {
|
|
269
|
+
--kit-segment-fill: var(--ink); --kit-segment-ink: var(--raised);
|
|
270
|
+
background: var(--surface); color: var(--ink); box-shadow: var(--shadow-control);
|
|
271
|
+
}
|
|
272
|
+
/* In the dark a lifted chip is lit, not shaded: --surface sits below --raised there, so the chosen one would sink. */
|
|
273
|
+
@media (prefers-color-scheme: dark) {
|
|
274
|
+
:root[data-theme-style][data-look-windows='lifted']:not([data-theme='light']) :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) { background: color-mix(in oklab, var(--raised) 86%, var(--ink)); }
|
|
275
|
+
}
|
|
276
|
+
:root[data-theme-style][data-look-windows='lifted'][data-theme='dark'] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) { background: color-mix(in oklab, var(--raised) 86%, var(--ink)); }
|
|
277
|
+
/* Tint: no tray, the chosen one a soft wash of the accent, as the dashboard's windows are. */
|
|
278
|
+
:root[data-theme-style][data-look-windows='tint'] :is(.kit-segmented, .list-layout, .record-presentation, .json-modes) { background: transparent; border-color: transparent; }
|
|
279
|
+
:root[data-theme-style][data-look-windows='tint'] :is(.kit-segment, .list-layout-seg, .presentation-seg, .json-mode):is([aria-checked='true'], [aria-pressed='true']) {
|
|
280
|
+
--kit-segment-fill: var(--ink); --kit-segment-ink: var(--surface);
|
|
281
|
+
background: var(--chosen, var(--accent-soft)); color: var(--ink);
|
|
282
|
+
}
|
|
283
|
+
/* A toolbar's controls stand at one height: the dashboard's window, its filters and a chart's series pick, a list's
|
|
284
|
+
Filters toggle beside its Columns. Each had its own (a literal 32, the field's 34, a literal 28, a toggle sized by its
|
|
285
|
+
padding to 27), so a row of them was ragged by up to six pixels. The compact size is the token a bar's control takes
|
|
286
|
+
(@mistriwork/ui tokens.css); a finger's 44px (the coarse-pointer rule on a Select trigger) still outgrows it. */
|
|
287
|
+
:root[data-theme-style] :is(.dash-window-button, .dash-picks [data-slot='select-trigger'], .dash-period [data-slot='select-trigger'], .chart-series-pick, .applist-toggle) { box-sizing: border-box; height: var(--control-h-sm); min-height: var(--control-h-sm); }
|
|
288
|
+
:root[data-theme-style] .applist-toggle { display: inline-flex; align-items: center; }
|
|
289
|
+
@media (pointer: coarse), (max-width: 40rem) { :root[data-theme-style] :is(.dash-picks, .dash-period) [data-slot='select-trigger'] { min-height: calc(44px / var(--density-zoom, 1)); } }
|
|
290
|
+
/* A facet's date is a field in a narrow rail, the text box's height beside it: the form's 36px on its inner box stood two
|
|
291
|
+
pixels over the 34px one under the same label. */
|
|
292
|
+
:root[data-theme-style] .facet-input [data-slot='input'] { min-height: var(--control-h); }
|
|
293
|
+
/* Round controls: what opens from a pill is a card of the same family, not the house's 8px box with 5px rows. The popup
|
|
294
|
+
takes the round step (a menu rounder than 16px loses its first row's corner) and a row is the popup's corner less the
|
|
295
|
+
padding between them, so the two curves share a centre (as the switch's tray and its keys, above). Square and sharp looks
|
|
296
|
+
set no --control-radius and keep --radius-pop and --radius-item as they were. */
|
|
297
|
+
:root[data-control-radius][data-visual-theme] body { --radius-pop: 16px; }
|
|
298
|
+
:root[data-control-radius][data-visual-theme] :is([data-slot='menu-content'], [data-slot='select-content'], [data-slot='autocomplete-content'], .page-actions-popup, .th-menu, .account-menu-popup, .export-menu, .picker-popup) { --radius-item: calc(var(--radius-pop) - var(--space-2)); }
|
|
299
|
+
:root[data-control-radius][data-visual-theme] .tn-pop { --radius-item: calc(var(--radius-pop) - var(--space-2h)); }
|
|
300
|
+
/* A keycap and a brand mark inside a pill are pills: a corner of the box's own on a pill's end read as a square in a curve. */
|
|
301
|
+
:root[data-control-radius] :is(.tn-search-key, #home-button .brand-mark.brand-mark--logo) { border-radius: var(--control-radius); }
|
|
234
302
|
:root[data-theme-style] button.ghost:not(.fav-star, .dash-open, .account, .live-act, .pager *) { border-color: var(--line); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-control); }
|
|
235
303
|
:root[data-theme-style] button.ghost:not(.fav-star, .dash-open, .account, .live-act, .pager *):hover:not(:disabled) { background: var(--raised); }
|
|
236
304
|
/* A secondary Button that is a toggle says it is on: the ink's edge on the tinted ground, in every look. */
|
|
@@ -1186,6 +1254,27 @@ html:root[data-theme-style][data-look-tabs='pill'] :is(.tab, :where(body.app-mod
|
|
|
1186
1254
|
}
|
|
1187
1255
|
}
|
|
1188
1256
|
@layer structure {
|
|
1257
|
+
/* `recipes.pane: 'edge'`: the room runs to the window's right and bottom edges, so no band of the menu's ground
|
|
1258
|
+
frames it. The one line left is between the menu and the room; the bar keeps its rule over the room. A raised
|
|
1259
|
+
look's lift (lumenLook.css) belongs to a pane that stands on something, so it goes with the inset. In the
|
|
1260
|
+
structure layer, over the pane it undoes (structure.css), and said here, where the menu's test looks for it. */
|
|
1261
|
+
:root[data-look-pane='edge'] body.app-sidebar-shell .layout > .pane-bar {
|
|
1262
|
+
margin: 0;
|
|
1263
|
+
border: 0;
|
|
1264
|
+
border-left: 1px solid var(--line);
|
|
1265
|
+
border-radius: 0;
|
|
1266
|
+
}
|
|
1267
|
+
:root[data-look-pane='edge'] body.app-sidebar-shell .layout > .content {
|
|
1268
|
+
margin: 0;
|
|
1269
|
+
border: 0;
|
|
1270
|
+
border-left: 1px solid var(--line);
|
|
1271
|
+
border-top: var(--pane-rule, 1px solid var(--line));
|
|
1272
|
+
border-radius: 0;
|
|
1273
|
+
box-shadow: none;
|
|
1274
|
+
}
|
|
1275
|
+
:root[data-look-pane='edge'] body.app-sidebar-shell.page-bare .layout > .content {
|
|
1276
|
+
border: 0;
|
|
1277
|
+
}
|
|
1189
1278
|
/* The figures of a row stand on one line and a trend stands beside its figure, in every look that sets the label
|
|
1190
1279
|
over the figure (said here and not in structure.css: a rule that names a treatment lives where the menu's test
|
|
1191
1280
|
looks for it). Under the figure, the trend made its tile a line taller than the rest and the row as tall as
|
package/dist/vite.d.ts
CHANGED
|
@@ -59,6 +59,16 @@ interface Surfaces {
|
|
|
59
59
|
surfaces: Readonly<Record<string, readonly string[]>>;
|
|
60
60
|
/** Pairs of surfaces whose shared modules are the entry's. */
|
|
61
61
|
sharedWithEntry?: readonly (readonly [string, string])[];
|
|
62
|
+
/**
|
|
63
|
+
* Parts of their own that some surfaces draw on their first page and the rest only on demand, by name: what the
|
|
64
|
+
* roots reach that the entry does not hold and that no surface outside `with` reaches statically. Without it, the
|
|
65
|
+
* first surface to reach such a module claims it, and every other surface's part fetched on demand that uses it
|
|
66
|
+
* imports that whole surface's chunk.
|
|
67
|
+
*/
|
|
68
|
+
parts?: Readonly<Record<string, {
|
|
69
|
+
readonly roots: readonly string[];
|
|
70
|
+
readonly with: readonly string[];
|
|
71
|
+
}>>;
|
|
62
72
|
}
|
|
63
73
|
/**
|
|
64
74
|
* The maps keep our own sources and drop the libraries'.
|
package/dist/vite.js
CHANGED
|
@@ -89,7 +89,11 @@ export function noDevtoolsClient() {
|
|
|
89
89
|
* which every App page runs before anything else;
|
|
90
90
|
* surfaces in the order given, each takes what it reaches that no earlier part has (`surfaces`), except what two
|
|
91
91
|
* of them both reach where the product says that is the entry's (`sharedWithEntry`): an App's shell
|
|
92
|
-
* and its public pages, both first pages, so neither fetches a third chunk they share
|
|
92
|
+
* and its public pages, both first pages, so neither fetches a third chunk they share;
|
|
93
|
+
* parts named pieces some surfaces draw on their first page and the others only on demand (`parts`): what
|
|
94
|
+
* their roots reach that no surface outside `with` reaches statically. Before them the first surface
|
|
95
|
+
* to reach such a module took it, and the other surface's part fetched on demand imported that whole
|
|
96
|
+
* surface's chunk to use it (an App's form room took the public pages along).
|
|
93
97
|
*
|
|
94
98
|
* Reachability is read once, from the finished module graph, over static imports only: a part loaded on demand
|
|
95
99
|
* (components/onDemand.tsx) stays a chunk of its own, as it always was. The server names a path's surface in the page
|
|
@@ -105,7 +109,7 @@ export function noDevtoolsClient() {
|
|
|
105
109
|
*/
|
|
106
110
|
const BARRELS = [/\/node_modules\/@ui-sdk\/core\/dist\/(?:renderer|index)\.js$/];
|
|
107
111
|
const barrel = (id) => BARRELS.some((one) => one.test(id));
|
|
108
|
-
function surfaces({ index = [], surfaces: parts, sharedWithEntry = [] }) {
|
|
112
|
+
function surfaces({ index = [], surfaces: parts, sharedWithEntry = [], parts: shared = {} }) {
|
|
109
113
|
const names = Object.keys(parts);
|
|
110
114
|
const home = new Map();
|
|
111
115
|
const plugin = {
|
|
@@ -141,6 +145,12 @@ function surfaces({ index = [], surfaces: parts, sharedWithEntry = [] }) {
|
|
|
141
145
|
for (const id of from.get(a))
|
|
142
146
|
if (from.get(b).has(id))
|
|
143
147
|
home.set(id, 'index');
|
|
148
|
+
for (const [name, part] of Object.entries(shared)) {
|
|
149
|
+
const others = names.filter((surface) => !part.with.includes(surface)).map((surface) => from.get(surface));
|
|
150
|
+
for (const id of reach(rooted(name, part.roots), entry))
|
|
151
|
+
if (!home.has(id) && !others.some((surface) => surface.has(id)))
|
|
152
|
+
home.set(id, name);
|
|
153
|
+
}
|
|
144
154
|
for (const name of names)
|
|
145
155
|
for (const id of from.get(name))
|
|
146
156
|
if (!home.has(id))
|
|
@@ -149,7 +159,7 @@ function surfaces({ index = [], surfaces: parts, sharedWithEntry = [] }) {
|
|
|
149
159
|
};
|
|
150
160
|
/* Highest first: a group takes its modules' dependencies with it unless a group before it has them, so the entry's
|
|
151
161
|
are claimed before any surface's. */
|
|
152
|
-
const order = ['index', ...names];
|
|
162
|
+
const order = ['index', ...Object.keys(shared), ...names];
|
|
153
163
|
const groups = order.map((name, i) => ({ name, priority: order.length - i, test: (id) => home.get(id) === name }));
|
|
154
164
|
return { plugin, groups };
|
|
155
165
|
}
|
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.66",
|
|
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": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"./package.json": "./package.json"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@mistriwork/engine": "1.0.0-rc.
|
|
89
|
-
"@mistriwork/ui": "1.0.0-rc.
|
|
88
|
+
"@mistriwork/engine": "1.0.0-rc.66",
|
|
89
|
+
"@mistriwork/ui": "1.0.0-rc.66",
|
|
90
90
|
"intl-messageformat": "12.1.2",
|
|
91
91
|
"qrcode-generator": "^2.0.4"
|
|
92
92
|
},
|