@mistriwork/kit 1.0.0-rc.63 → 1.0.0-rc.65

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.
@@ -735,10 +735,11 @@ export async function boot(me, landingAt, installed) {
735
735
  whenPagesChange(() => void registerPages());
736
736
  initSidebarToggle();
737
737
  // Only remount navigation on a breakpoint crossing; record editors keep their owner.
738
- chrome.compactNavigation?.addEventListener('change', () => {
739
- if (!businessRetired && sessionIdentity().mode !== 'locked')
740
- renderTableList($('table-filter').value);
741
- });
738
+ for (const band of [chrome.compactNavigation, chrome.tabletNavigation])
739
+ band?.addEventListener('change', () => {
740
+ if (!businessRetired && sessionIdentity().mode !== 'locked')
741
+ renderTableList($('table-filter').value);
742
+ });
742
743
  // The theme bench moved the menu (themeBench.ts): the shell is drawn again around the same room.
743
744
  chrome.whenMenuMoves?.(() => {
744
745
  if (!businessRetired && sessionIdentity().mode !== 'locked')
@@ -0,0 +1,6 @@
1
+ export declare function AiMark({ quiet, className }: {
2
+ quiet?: boolean;
3
+ className?: string;
4
+ }): import("react").JSX.Element;
5
+ /** The App's word for AI, for copy that names it in a sentence ("Proposed by AI"). */
6
+ export declare function aiWord(): string;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The one mark for something a model made or proposed: a small glyph and the App's word for it (`ai: { label }` on
4
+ * the App, "AI" when absent), in `--ai`. Every built-in AI surface draws this — the review queue, a record's
5
+ * proposal line, history, an unconfirmed field — and an App's own components draw the same one
6
+ * (`@mistriwork/mistri/ui`), so a reader learns one sign rather than six labels.
7
+ *
8
+ * The glyph is drawn here, not taken from the icon set: the chrome's icons travel in the first page's bundle, and
9
+ * this one is needed only where a proposal is. Its rule is a few lines of features.css, so nothing waits on a sheet.
10
+ * `quiet` drops the word, for a cell where the word would crowd the value; the word is still there for a screen reader.
11
+ */
12
+ import { shell } from '../shellMode.js';
13
+ import { say } from '../copy/shell/components/AiMark.js';
14
+ export function AiMark({ quiet = false, className }) {
15
+ const label = shell().app()?.ai?.label ?? say('ai');
16
+ return (_jsxs("span", { className: className ? `ai-mark ${className}` : 'ai-mark', "data-quiet": quiet ? '' : undefined, children: [_jsxs("svg", { className: "ai-mark-glyph", viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: [_jsx("path", { d: "M8 1.5c.5 3.2 1.8 4.5 5 5-3.2.5-4.5 1.8-5 5-.5-3.2-1.8-4.5-5-5 3.2-.5 4.5-1.8 5-5Z" }), _jsx("path", { d: "M13 10.5c.2 1.2.8 1.8 2 2-1.2.2-1.8.8-2 2-.2-1.2-.8-1.8-2-2 1.2-.2 1.8-.8 2-2Z" })] }), _jsx("span", { className: quiet ? 'visually-hidden' : 'ai-mark-word', children: label })] }));
17
+ }
18
+ /** The App's word for AI, for copy that names it in a sentence ("Proposed by AI"). */
19
+ export function aiWord() {
20
+ return shell().app()?.ai?.label ?? say('ai');
21
+ }
@@ -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) }), spec.facts?.some((name) => present(row, name)) ? (_jsx("p", { className: "cards-summary", children: spec.facts.filter((name) => present(row, name)).map((name) => fact(row, name, 'cards-summary-item')) })) : null, spec.lines?.length ? (_jsx("dl", { className: "cards-facts", children: spec.lines.map((name) => (_jsxs("div", { className: "cards-fact", children: [_jsx("dt", { children: caption(name) }), _jsx("dd", { children: saidWithSecond(row, name) })] }, name))) })) : null] }), spec.footer?.length ? (_jsx("p", { className: "cards-foot", children: spec.footer.some((name) => present(row, name))
200
- ? spec.footer.filter((name) => present(row, name)).map((name) => fact(row, name, 'cards-foot-item'))
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
  }
@@ -25,7 +25,7 @@ import { currentEntry, paintVersion, renderCrumbs, roomVersion } from '../core.j
25
25
  import { shell } from '../shellMode.js';
26
26
  import { syncHash } from '../url.js';
27
27
  import { appListFor } from './appListModel.js';
28
- import { ASSISTANT_PAGE, DIRECTORY_PAGE, INBOX_PAGE, SETTINGS_PAGE, dashPageId, dashViewKey, formViewKey, homeRoom } from './appRooms.js';
28
+ import { ASSISTANT_PAGE, DIRECTORY_PAGE, INBOX_PAGE, REVIEW_PAGE, SETTINGS_PAGE, dashPageId, dashViewKey, formViewKey, homeRoom, } from './appRooms.js';
29
29
  import { onDemand } from './onDemand.js';
30
30
  import { crumbBarShown, Crumbs } from './Crumbs.js';
31
31
  import { LoadErrorNote, NothingGranted, WorkbenchLanding } from './Landing.js';
@@ -168,6 +168,8 @@ function Room({ entry }) {
168
168
  return rooms.Directory ? _jsx(rooms.Directory, {}) : null;
169
169
  if (shell().inApp() && page.pageId === SETTINGS_PAGE)
170
170
  return rooms.Settings ? _jsx(rooms.Settings, { section: page.tab }) : null;
171
+ if (shell().inApp() && page.pageId === REVIEW_PAGE)
172
+ return rooms.Review ? _jsx(rooms.Review, {}) : null;
171
173
  return _jsx(PageRoom, { entry: page });
172
174
  }
173
175
  return _jsx(RowRoom, { entry: entry });
@@ -29,10 +29,10 @@ export function GridSelection({ table, rows, actions, interactive, editable = []
29
29
  the column says what it is. Its name says what "all" takes — the rows
30
30
  loaded here, as before — in the resource's own word where it has one. */
31
31
  const noun = resourceOf(shell().app(), table.id)?.noun?.many ?? 'rows';
32
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid-select-bar", children: _jsx("div", { className: "grid-select-float", children: bar }) }), keyed.length > 0 && (_jsx(RowHeadDecoration, { children: _jsx("input", { type: "checkbox", className: "row-select", "aria-label": say('selectAll', { noun }), checked: every, ref: (box) => {
33
- if (box)
34
- box.indeterminate = partly;
35
- }, onChange: () => change(every ? [] : keyed.map((record) => record.id)) }) })), group &&
32
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid-select-bar", children: _jsx("div", { className: "grid-select-float", children: bar }) }), keyed.length > 0 && (_jsx(RowHeadDecoration, { children: _jsx("label", { className: "row-select-hit", children: _jsx("input", { type: "checkbox", className: "row-select", "aria-label": say('selectAll', { noun }), checked: every, ref: (box) => {
33
+ if (box)
34
+ box.indeterminate = partly;
35
+ }, onChange: () => change(every ? [] : keyed.map((record) => record.id)) }) }) })), group &&
36
36
  [
37
37
  ...keyed.reduce((groups, record) => {
38
38
  const host = groupHostKey(record.row[group.column]);
@@ -66,5 +66,7 @@ function RowBox({ checked, indeterminate = false, ...props }) {
66
66
  row.setAttribute('data-chosen', '');
67
67
  return () => row.removeAttribute('data-chosen');
68
68
  }, [checked]);
69
- return _jsx("input", { ref: box, type: "checkbox", className: "row-select", checked: checked, ...props });
69
+ /* In its label, which a coarse pointer pads to a finger's 44px (features.css): a checkbox cannot be padded itself.
70
+ A tap on that padding is the box's, never the row's, so it does not open the record. */
71
+ return (_jsx("label", { className: "row-select-hit", onClick: (event) => event.stopPropagation(), children: _jsx("input", { ref: box, type: "checkbox", className: "row-select", checked: checked, ...props }) }));
70
72
  }
@@ -233,5 +233,5 @@ export function PageView(props) {
233
233
  onGone,
234
234
  recordName: entry.label,
235
235
  ...(host ? { onActionDone: host.onActionDone } : {}),
236
- }, children: _jsxs(ProblemScopeProvider, { children: [props.preview ? (_jsxs("div", { className: "page-head", children: [_jsx("h2", { className: "page-title", children: page.name }), _jsx("div", { className: "root-bar", children: _jsx("h1", { className: "root-current", children: entry.label ?? (entry.key ? rootLabel(entry.key) : '') }) })] })) : props.bare ? null : (_jsx(ErrorBoundary, { children: _jsx(PageHead, { ...props, actions: gone ? undefined : headActions, gone: gone, onPending: onPending, title: titleEditor && titleEditor.index === titleOwner ? titleEditor.render : undefined, header: header, onSectionLabel: onSectionLabel, onTitleEditor: onTitleEditor, titleOwner: titleOwner }) })), gone && entry.key ? (_jsx(PageLayout, { children: _jsx(RecordGone, { base: base, spoken: spoken(base.name), className: "page-gone" }) })) : entry.key ? (showcase !== undefined ? (_jsx(PageLayout, { layout: layout, panel: panel, aside: hasAside ? sectionsOf('aside') : undefined, below: sectionsOf(hasAside ? 'main' : undefined, (index) => index !== showcase), children: sectionsOf(hasAside ? 'main' : undefined, (index) => index === showcase) })) : (_jsx(PageLayout, { layout: layout, leads: leads, aside: hasAside ? sectionsOf('aside') : undefined, children: sectionsOf(hasAside ? 'main' : undefined) }))) : (_jsx(PageLayout, { children: chooser })), host && _jsx("span", { hidden: true, ref: relatedAnchor }), related?.props && related.surface === surface && (_jsx(NewRecordDialog, { ...related.props, retainUncertain: true, onUnresolvedChange: related.changed }))] }) }));
236
+ }, children: _jsxs(ProblemScopeProvider, { children: [props.preview ? (_jsxs("div", { className: "page-head", children: [_jsx("h2", { className: "page-title", children: page.name }), _jsx("div", { className: "root-bar", children: _jsx("h1", { className: "root-current", children: entry.label ?? (entry.key ? rootLabel(entry.key) : '') }) })] })) : props.bare ? null : (_jsx(ErrorBoundary, { children: _jsx(PageHead, { ...props, actions: gone ? undefined : headActions, gone: gone, onPending: onPending, title: titleEditor && titleEditor.index === titleOwner ? titleEditor.render : undefined, header: header, onSectionLabel: onSectionLabel, onTitleEditor: onTitleEditor, titleOwner: titleOwner }) })), !props.preview && !props.bare && !gone && adornment?.notice ? _jsx(ErrorBoundary, { children: adornment.notice }) : null, gone && entry.key ? (_jsx(PageLayout, { children: _jsx(RecordGone, { base: base, spoken: spoken(base.name), className: "page-gone" }) })) : entry.key ? (showcase !== undefined ? (_jsx(PageLayout, { layout: layout, panel: panel, aside: hasAside ? sectionsOf('aside') : undefined, below: sectionsOf(hasAside ? 'main' : undefined, (index) => index !== showcase), children: sectionsOf(hasAside ? 'main' : undefined, (index) => index === showcase) })) : (_jsx(PageLayout, { layout: layout, leads: leads, aside: hasAside ? sectionsOf('aside') : undefined, children: sectionsOf(hasAside ? 'main' : undefined) }))) : (_jsx(PageLayout, { children: chooser })), host && _jsx("span", { hidden: true, ref: relatedAnchor }), related?.props && related.surface === surface && (_jsx(NewRecordDialog, { ...related.props, retainUncertain: true, onUnresolvedChange: related.changed }))] }) }));
237
237
  }
@@ -36,6 +36,11 @@ export interface HistoryEntry {
36
36
  via: 'app' | 'workbench' | 'agent' | 'api' | 'form' | 'system';
37
37
  action?: string;
38
38
  /** The writer's name when they wrote; never an email. */ by?: string;
39
+ /** Who made the write when no one typed it: a model's decision, or a job (by its id when it has one). */
40
+ maker?: 'ai' | 'job';
41
+ job?: string;
42
+ /** The write carried out a proposal a person approved: `by` is the approver. */
43
+ proposed?: true;
39
44
  fields: HistoryField[];
40
45
  }
41
46
  /** A read through the page's connection, as `usePageApi` makes one. */
@@ -54,7 +59,7 @@ interface HistoryProps {
54
59
  }
55
60
  /** Who made a write, as a person reads it: their name when they wrote, else the door it came through.
56
61
  Never an address: the server sends none, and a name that reads as one is not said either. */
57
- export declare function whoWrote(entry: Pick<HistoryEntry, 'by' | 'via'>): string;
62
+ export declare function whoWrote(entry: Pick<HistoryEntry, 'by' | 'via' | 'maker' | 'job' | 'proposed'>): string;
58
63
  /** What a write did, in a word: the action or command by its label, else what any write is. */
59
64
  export declare const whatWrote: (entry: Pick<HistoryEntry, 'action' | 'kind'>) => string;
60
65
  /** The record's own change history, newest first, with "Show earlier changes" while the store holds more. */
@@ -9,12 +9,24 @@ import { LABEL_SEGMENT } from '@mistriwork/engine/shared/recordLabel.js';
9
9
  import { Empty } from './Notes.js';
10
10
  import { Value } from './Value.js';
11
11
  import { say } from '../copy/record/components/PageHistory.js';
12
+ import { AiMark, aiWord } from './AiMark.js';
12
13
  import { pageBridge } from '../uiBridge.js';
13
14
  /* The machine of the record's resource, when it has one: its state's words, and its column leads a change. */
14
15
  const machineOf = (tableId) => pageBridge.activeApp()?.resources?.[tableId]?.machine;
15
16
  /** Who made a write, as a person reads it: their name when they wrote, else the door it came through.
16
17
  Never an address: the server sends none, and a name that reads as one is not said either. */
17
18
  export function whoWrote(entry) {
19
+ /* A proposal carried out names both hands, the model's and the approver's; a write no person approved names its
20
+ maker, so a model's change never reads as the person whose session it ran under. */
21
+ if (entry.proposed)
22
+ return say('proposedBy', { ai: aiWord(), by: writer(entry) });
23
+ if (entry.maker === 'ai')
24
+ return say('madeByAi', { ai: aiWord() });
25
+ if (entry.maker === 'job')
26
+ return entry.job ? say('madeByJob', { job: entry.job }) : say('madeByAJob');
27
+ return writer(entry);
28
+ }
29
+ function writer(entry) {
18
30
  if (entry.by && !/[^\s@]+@[^\s@]+\.[^\s@]+/.test(entry.by))
19
31
  return entry.by;
20
32
  switch (entry.via) {
@@ -131,7 +143,7 @@ export function RecordHistory({ section, base, recordKey, api, preview, frame, l
131
143
  function HistoryItem({ entry, base, names }) {
132
144
  const when = new Date(entry.at);
133
145
  const said = Number.isNaN(when.getTime()) ? entry.at : formatDateTime(when);
134
- return (_jsxs("li", { className: "history-entry", children: [_jsxs("div", { className: "history-head", children: [_jsx("span", { className: "history-by", children: whoWrote(entry) }), _jsx("span", { className: "history-what", children: whatWrote(entry) }), _jsx("time", { className: "history-when", dateTime: entry.at, title: entry.at, children: said })] }), entry.fields.length > 0 && (_jsx("dl", { className: "history-fields", children: [...entry.fields]
146
+ return (_jsxs("li", { className: "history-entry", children: [_jsxs("div", { className: "history-head", children: [_jsxs("span", { className: "history-by", children: [(entry.proposed || entry.maker === 'ai') && (_jsxs(_Fragment, { children: [_jsx(AiMark, { quiet: true }), ' '] })), whoWrote(entry)] }), _jsx("span", { className: "history-what", children: whatWrote(entry) }), _jsx("time", { className: "history-when", dateTime: entry.at, title: entry.at, children: said })] }), entry.fields.length > 0 && (_jsx("dl", { className: "history-fields", children: [...entry.fields]
135
147
  .sort((a, b) => Number(b.column === machineOf(base.id)?.column) - Number(a.column === machineOf(base.id)?.column))
136
148
  .map((field) => (_jsx(HistoryFieldRow, { field: field, kind: entry.kind, base: base, names: names?.get(field.column) }, field.column))) }))] }));
137
149
  }
@@ -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 are not here: the database answers those
35
- a few at a time (`MOST.records`). */
36
- const MOST_TYPED = { recent: MOST.recent, pages: 60, create: 20, commands: 20, records: MOST.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, 3).then((found) => {
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, MOST.records) });
190
+ setRecords({ term, items: interleaved(hits, MOST_TYPED.records) });
188
191
  });
189
192
  }, prefill && query === prefill ? 0 : 180);
190
193
  return () => clearTimeout(timer);
@@ -65,6 +65,8 @@ export declare const ASSISTANT_PAGE = "app:assistant";
65
65
  export declare const DIRECTORY_PAGE = "app:directory";
66
66
  /** The page id the reader's settings ride (SettingsRoom.tsx): their profile and their preferences, at `/{app}/settings`. */
67
67
  export declare const SETTINGS_PAGE = "app:settings";
68
+ /** For review (`/{app}/review`): proposals this reader may approve and values no person has confirmed. */
69
+ export declare const REVIEW_PAGE = "app:review";
68
70
  /** Whether a room is the assistant's page. */
69
71
  export declare const isAssistantRoom: (room: object) => room is AssistantRoom;
70
72
  /** Whether a room is one of the App's lists: neither a dashboard, a form nor the assistant's page. */
@@ -26,6 +26,8 @@ export const ASSISTANT_PAGE = 'app:assistant';
26
26
  export const DIRECTORY_PAGE = 'app:directory';
27
27
  /** The page id the reader's settings ride (SettingsRoom.tsx): their profile and their preferences, at `/{app}/settings`. */
28
28
  export const SETTINGS_PAGE = 'app:settings';
29
+ /** For review (`/{app}/review`): proposals this reader may approve and values no person has confirmed. */
30
+ export const REVIEW_PAGE = 'app:review';
29
31
  /** Whether a room is the assistant's page. */
30
32
  export const isAssistantRoom = (room) => Object.hasOwn(room, 'assistant');
31
33
  /** Whether a room is one of the App's lists: neither a dashboard, a form nor the assistant's page. */
@@ -1,7 +1,8 @@
1
1
  export declare function useMediaQuery(query: string): boolean;
2
2
  /** A phone: where a record's actions fold into one menu rather than wrap. */
3
3
  export declare const PHONE_QUERY = "(max-width: 600px)";
4
- /** Where a list's records stand in for its grid: style.css's `@media (max-width: 760px)`, which shows them. */
4
+ /** Where a list's records stand in for its grid: the phone band (packages/ui/src/internal/ruler.ts), which style.css's
5
+ `@media (max-width: 760px)` shows them at. */
5
6
  export declare const RECORDS_QUERY = "(max-width: 760px)";
6
7
  /** Where a filter rail has no room to stand beside the rows. The rail is
7
8
  12-15rem and a card grid wants 520px before it draws a second column, so
@@ -4,6 +4,7 @@
4
4
  * share, so a breakpoint is asked of the browser the same way everywhere.
5
5
  */
6
6
  import { useSyncExternalStore } from 'react';
7
+ import { PHONE_QUERY as PHONE_BAND } from '@mistriwork/ui/internal/ruler.js';
7
8
  const watched = new Map();
8
9
  function watch(query) {
9
10
  let entry = watched.get(query);
@@ -36,8 +37,9 @@ export function useMediaQuery(query) {
36
37
  }
37
38
  /** A phone: where a record's actions fold into one menu rather than wrap. */
38
39
  export const PHONE_QUERY = '(max-width: 600px)';
39
- /** Where a list's records stand in for its grid: style.css's `@media (max-width: 760px)`, which shows them. */
40
- export const RECORDS_QUERY = '(max-width: 760px)';
40
+ /** Where a list's records stand in for its grid: the phone band (packages/ui/src/internal/ruler.ts), which style.css's
41
+ `@media (max-width: 760px)` shows them at. */
42
+ export const RECORDS_QUERY = PHONE_BAND;
41
43
  /** Where a filter rail has no room to stand beside the rows. The rail is
42
44
  12-15rem and a card grid wants 520px before it draws a second column, so
43
45
  under about 860px the two together leave the rows a single narrow column —
@@ -5,6 +5,10 @@ export declare const say: import("../../../messages.js").RoomMessage<{
5
5
  readonly theApi: "The API";
6
6
  readonly theSystem: "The system";
7
7
  readonly someone: "Someone";
8
+ readonly proposedBy: "Proposed by {ai} · approved by {by}";
9
+ readonly madeByAi: "Made by {ai}";
10
+ readonly madeByJob: "Made by job {job}";
11
+ readonly madeByAJob: "Made by a job";
8
12
  readonly created: "Created";
9
13
  readonly edited: "Edited";
10
14
  readonly changesToThisRecord: "Changes to this record appear here.";
@@ -7,6 +7,10 @@ export const say = defineMessages({
7
7
  theApi: 'The API',
8
8
  theSystem: 'The system',
9
9
  someone: 'Someone',
10
+ proposedBy: 'Proposed by {ai} · approved by {by}',
11
+ madeByAi: 'Made by {ai}',
12
+ madeByJob: 'Made by job {job}',
13
+ madeByAJob: 'Made by a job',
10
14
  created: 'Created',
11
15
  edited: 'Edited',
12
16
  changesToThisRecord: 'Changes to this record appear here.',
@@ -0,0 +1,3 @@
1
+ export declare const say: import("../../../messages.js").RoomMessage<{
2
+ readonly ai: "AI";
3
+ }>;
@@ -0,0 +1,5 @@
1
+ /** What AiMark says, in the shell room (packages/kit/src/client/messages.ts says how the catalog is split). */
2
+ import { defineMessages } from '../../../messages.js';
3
+ export const say = defineMessages({
4
+ ai: 'AI',
5
+ });
@@ -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); }
@@ -1430,6 +1430,33 @@ body.app-mode .confirm:is(.insert-dialog, .command-form, .set-field-dialog) > h2
1430
1430
  background: color-mix(in srgb, var(--raised) 60%, var(--surface));
1431
1431
  }
1432
1432
  }
1433
+ /* A long command form (formFrame, as New's: past eight fields) is a drawer on the window's right edge, over the page
1434
+ it was started from, which stays where it is: an overlay takes no room from the page, so nothing under it moves.
1435
+ Its foot is the band above (sticky in the box), its body the box's own scroll. A phone's, and the 641-760 band
1436
+ where a 34rem drawer would leave a sliver of page, fills the screen. Enters on the drawer's own curve, under
1437
+ reduced motion at once; leaving is at once (Motion doctrine 2, 14). */
1438
+ [data-slot='dialog-content'][data-kind='modal'].command-drawer {
1439
+ position: fixed; inset: 0 0 0 auto; margin: 0; transform: none;
1440
+ width: min(560px, calc(100vw - 48px)); height: 100dvh; max-height: none;
1441
+ border-width: 0 0 0 1px; border-radius: 0; box-shadow: var(--shadow-panel);
1442
+ }
1443
+ @media (max-width: 760px) {
1444
+ [data-slot='dialog-content'][data-kind='modal'].command-drawer { inset: 0; width: 100%; border-width: 0; }
1445
+ }
1446
+ @media (prefers-reduced-motion: no-preference) {
1447
+ [data-slot='dialog-content'][data-kind='modal'].command-drawer {
1448
+ transition: transform var(--t-panel) var(--ease-drawer), opacity var(--t-panel) var(--ease-drawer);
1449
+ @starting-style { transform: translateX(2rem); opacity: 0; }
1450
+ }
1451
+ }
1452
+ /* The evidence slot: beside the form from 900px, under it (ruled off) below that. Present, the drawer is wide enough
1453
+ for both columns; absent, none of this is drawn. */
1454
+ .command-aside { min-width: 0; margin-top: var(--space-6); padding-top: var(--space-4h); border-top: 1px solid var(--line); }
1455
+ @media (min-width: 900px) {
1456
+ [data-slot='dialog-content'][data-kind='modal'].command-drawer.command-drawer-wide { width: min(960px, calc(100vw - 48px)); }
1457
+ .command-drawer-wide .command-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); column-gap: var(--space-6); align-items: start; }
1458
+ .command-drawer-wide .command-aside { margin-top: 0; padding-top: 0; border-top: 0; }
1459
+ }
1433
1460
  .peekpanel-open { flex: none; font-size: var(--text-sm); color: var(--ink-muted); }
1434
1461
  .peekpanel-open:hover { color: var(--ink); }
1435
1462
  /* A 28px square with the cross at a size it is seen at: at the text's 16px in the faint ink it was the smallest
@@ -1585,6 +1612,10 @@ body.app-mode .confirm:is(.insert-dialog, .command-form, .set-field-dialog) > h2
1585
1612
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-muted);
1586
1613
  font: var(--text-sm) var(--mono); padding: var(--space-1) var(--space-3h); white-space: nowrap;
1587
1614
  }
1615
+ /* The one AI mark (AiMark.tsx): the glyph at the text's cap height and the App's word, in --ai, at the size of the text
1616
+ it stands in, so a row's mark is a row's height. */
1617
+ .ai-mark { display: inline-flex; align-items: center; gap: .25em; color: var(--ai); font-weight: 500; white-space: nowrap; }
1618
+ .ai-mark-glyph { width: .9em; height: .9em; flex: none; fill: currentColor; }
1588
1619
 
1589
1620
  /* ---------- the record picker ---------- */
1590
1621
 
@@ -1949,6 +1980,12 @@ body.session-locked > :not(#session-lock) { display: none !important; }
1949
1980
  The attribute is named twice to keep the weight the :has() rule had over a hovered row's tint. */
1950
1981
  .table-wrap tbody tr[data-chosen][data-chosen] > td { background: var(--accent-soft); }
1951
1982
  .row-host .row-select { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
1983
+ /* The box's label (GridSelection.tsx) is laid out as nothing under a fine pointer. Under a finger it pads the 15px box
1984
+ to a 44px target without moving it, as the checklist's does (structure.css): a checkbox cannot be padded itself. */
1985
+ .row-select-hit { display: contents; }
1986
+ @media (pointer: coarse) {
1987
+ .row-select-hit { display: inline-flex; vertical-align: middle; padding: 14.5px; margin: -14.5px; cursor: pointer; } /* off-scale: (44px − the 15px box) / 2, a target's geometry */
1988
+ }
1952
1989
  /* Select all sat against the first column's sort button, a finger's 24px
1953
1990
  round it 0.4px short of clear (WCAG 2.5.8, which a 15px box meets by its
1954
1991
  spacing): the sort button reaches back over the column's edge. The box
@@ -123,6 +123,25 @@
123
123
  border-left: 1px solid var(--line);
124
124
  padding-left: var(--space-6);
125
125
  }
126
+ /* A tablet (761–1100px, the ruler's band, @mistriwork/ui/internal/ruler) keeps a record's side column at 280px
127
+ beside the main one, as a desk does: stacked, the record's state and its history went a screen under the
128
+ work. An archetype and a dashboard place their own regions and still stack there (below). */
129
+ @media (min-width: 761px) and (max-width: 1100px) {
130
+ .page-layout:where(:not([data-layout], .dashboard-layout)) {
131
+ grid-template-columns: minmax(0, 1fr) 280px;
132
+ }
133
+ .page-layout:where(:not([data-layout], .dashboard-layout)) > .page-aside {
134
+ align-self: stretch;
135
+ align-content: flex-start;
136
+ }
137
+ .page-layout:where(:not([data-layout], .dashboard-layout)) .page-aside .page-section {
138
+ flex-basis: 100%;
139
+ margin-inline: 0;
140
+ }
141
+ :where(.page-layout:not([data-layout], .dashboard-layout)) .page-aside .page-metric-row {
142
+ flex-direction: column;
143
+ }
144
+ }
126
145
  @media (min-width: 1101px) {
127
146
  /* The aside's rule runs the length of the page it stands beside: stopping
128
147
  at its last field, it read as a short box rather than a column. */
@@ -146,7 +165,7 @@
146
165
  drawing a hairline of its own a row under the last field's (two rules, a
147
166
  gap apart, where one was meant). A headline or a card is a box, and a line
148
167
  of facts draws no rule: those stay as they are. */
149
- @media (max-width: 1100px) {
168
+ @media (max-width: 760px) {
150
169
  .page-layout {
151
170
  grid-template-columns: minmax(0, 1fr);
152
171
  gap: var(--page-row-gap, var(--section-seam));
@@ -160,6 +179,22 @@
160
179
  padding-top: var(--space-3h);
161
180
  }
162
181
  }
182
+ /* The same stacking at a tablet for the pages that place their own regions; the selectors keep the weight the
183
+ phone's have. */
184
+ @media (min-width: 761px) and (max-width: 1100px) {
185
+ .page-layout:where([data-layout], .dashboard-layout) {
186
+ grid-template-columns: minmax(0, 1fr);
187
+ gap: var(--page-row-gap, var(--section-seam));
188
+ }
189
+ :where(.page-layout[data-layout], .dashboard-layout) > .page-aside {
190
+ border-left: 0;
191
+ padding-left: 0;
192
+ }
193
+ :where(.page-layout[data-layout], .dashboard-layout) > .page-aside > .page-section:first-child:not(:has(.page-headline, > .page-facts), .page-card-section) {
194
+ border-top-style: solid;
195
+ padding-top: var(--space-3h);
196
+ }
197
+ }
163
198
 
164
199
  /* A section's own table brings its bottom padding, which lands on top of the
165
200
  row gap and makes the space under a list visibly bigger than the space
@@ -281,6 +316,32 @@
281
316
  padding-top: 0;
282
317
  }
283
318
  }
319
+ /* A dashboard at a tablet (761–1100px, the ruler's band) is two to a row: its halves, thirds and two-thirds each
320
+ take half, rather than a phone's one column under 900px or a desk's three thirds in 760px. An offset is no
321
+ placement in two columns. The second of a leading pair draws no rule, as a shared row's does; a third of three
322
+ now starts a row of its own and takes the rule back. */
323
+ @media (min-width: 761px) and (max-width: 1100px) {
324
+ .dash-body:not(.page-aside, .dash-laid) > .page-section:is(.width-half, .width-third, .width-two-thirds) {
325
+ flex-basis: calc(50% - 16px);
326
+ }
327
+ .dash-body:not(.page-aside, .dash-laid) > .page-section[class*='offset-'] {
328
+ margin-left: 0;
329
+ margin-right: 0;
330
+ }
331
+ .dash-body:not(.page-aside, .dash-laid)
332
+ > .page-section:first-child:is(.width-half, .width-third, .width-two-thirds)
333
+ + .page-section:is(.width-half, .width-third, .width-two-thirds) {
334
+ border-top: none;
335
+ padding-top: 0;
336
+ }
337
+ .dash-body:not(.page-aside, .dash-laid)
338
+ > .page-section:first-child.width-third
339
+ + .page-section.width-third
340
+ + .page-section.width-third {
341
+ border-top: 1px solid var(--line);
342
+ padding-top: var(--space-3h);
343
+ }
344
+ }
284
345
 
285
346
  /* A section heading carries a tab's weight and none of its furniture.
286
347
 
@@ -2815,6 +2876,9 @@
2815
2876
  -webkit-line-clamp: 3;
2816
2877
  line-clamp: 3;
2817
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;
2818
2882
  }
2819
2883
  .cards-value {
2820
2884
  margin: 0;
@@ -2973,6 +3037,22 @@
2973
3037
  .attachments-name:hover {
2974
3038
  text-decoration: underline;
2975
3039
  }
3040
+ /* Under a finger the name is a 44px target across its text, drawn no taller: the reach hangs off the text column,
3041
+ since the name clips its own overflow for the ellipsis and would clip a reach of its own with it. */
3042
+ @media (pointer: coarse) {
3043
+ .attachments-text {
3044
+ position: relative;
3045
+ }
3046
+ .attachments-name::after {
3047
+ content: '';
3048
+ position: absolute;
3049
+ left: 0;
3050
+ right: 0;
3051
+ top: 50%;
3052
+ height: max(100%, 44px);
3053
+ transform: translateY(-50%);
3054
+ }
3055
+ }
2976
3056
  .attachments-actions {
2977
3057
  flex: none;
2978
3058
  display: inline-flex;
@@ -3079,6 +3159,30 @@
3079
3159
  font: inherit;
3080
3160
  line-height: 1;
3081
3161
  }
3162
+ /* Under a finger the × takes a 44px reach without growing the chip, as a list chip's does (structure.css). A tone
3163
+ clips what overflows it, the reach with it, so a removable chip's label carries the ellipsis instead. */
3164
+ @media (pointer: coarse) {
3165
+ .record-tag:has(> .record-tag-remove) {
3166
+ overflow: visible;
3167
+ }
3168
+ .record-tag:has(> .record-tag-remove) > span {
3169
+ min-width: 0;
3170
+ overflow: hidden;
3171
+ text-overflow: ellipsis;
3172
+ }
3173
+ .record-tag-remove {
3174
+ position: relative;
3175
+ }
3176
+ .record-tag-remove::after {
3177
+ content: '';
3178
+ position: absolute;
3179
+ left: 50%;
3180
+ top: 50%;
3181
+ width: max(100%, 44px);
3182
+ height: max(100%, 44px);
3183
+ transform: translate(-50%, -50%);
3184
+ }
3185
+ }
3082
3186
  .record-tags-add {
3083
3187
  padding: var(--space-1) var(--space-3);
3084
3188
  min-height: 0;
@@ -3590,7 +3694,7 @@
3590
3694
  flex column: its items fill the width however little they hold (a shut
3591
3695
  accordion), and a section's row-wrap flex-basis means nothing here
3592
3696
  instead of becoming a height. */
3593
- @media (max-width: 1100px) {
3697
+ @media (max-width: 760px) {
3594
3698
  /* Which layouts these are is said by the page (`data-leads`, Page.tsx), not asked with
3595
3699
  `:has(> .page-aside :is(.page-headline, .page-card-section))`: a :has() over the whole layout restyled every
3596
3700
  section on the page each time an element came or went in it (test/built-client-vitals.mjs). The attribute
@@ -18,6 +18,7 @@
18
18
  * it below something that merely contains the same letters.
19
19
  */
20
20
  import { createElement } from 'react';
21
+ import { TABLET_QUERY } from '@mistriwork/ui/internal/ruler.js';
21
22
  import { message, subscribeMessages } from './messages.js';
22
23
  import { $, currentEntry, el, findTable, go, pageView, state, subscribeWalk, tableView, svgEl } from './core.js';
23
24
  import { allSavedFilters } from './views.js';
@@ -237,6 +238,12 @@ export function initSidebarToggle() {
237
238
  let appMode = shellBody().classList.contains('app-mode');
238
239
  let compactOpen = false;
239
240
  const narrowWorkbench = () => compact.matches && !appMode;
241
+ /* On a tablet an App's menu stands folded to its icon rail (docs/design.md, Mobile): the room keeps the width, and
242
+ the rail's names come on hover and focus. Opening it there is for the visit, never remembered: the desk's
243
+ preference is the one stored, and a tablet's window must not overwrite it. */
244
+ const tablet = window.matchMedia(TABLET_QUERY);
245
+ let tabletOpen = false;
246
+ const tabletRail = () => tablet.matches && appMode && shellBody().classList.contains('app-nav-rail');
240
247
  const remember = (next) => {
241
248
  try {
242
249
  window.localStorage?.setItem(SIDEBAR_KEY, next ? '1' : '0');
@@ -298,7 +305,7 @@ export function initSidebarToggle() {
298
305
  onclick: () => apply(false),
299
306
  }, [chevrons('right'), el('span', { class: 'sidebar-reveal-label' }, [say('common.tables2')])]);
300
307
  function renderToggle() {
301
- const next = narrowWorkbench() ? !compactOpen : desktopHidden;
308
+ const next = narrowWorkbench() ? !compactOpen : tabletRail() ? !tabletOpen : desktopHidden;
302
309
  shellBody().classList.toggle('sidebar-hidden', next);
303
310
  const inApp = shellBody().classList.contains('app-mode');
304
311
  const wasFocused = document.activeElement === collapse;
@@ -346,6 +353,8 @@ export function initSidebarToggle() {
346
353
  function apply(next) {
347
354
  if (narrowWorkbench())
348
355
  compactOpen = !next;
356
+ else if (tabletRail())
357
+ tabletOpen = !next;
349
358
  else {
350
359
  desktopHidden = next;
351
360
  remember(next);
@@ -372,6 +381,10 @@ export function initSidebarToggle() {
372
381
  compactOpen = false;
373
382
  renderToggle();
374
383
  });
384
+ tablet.addEventListener('change', () => {
385
+ tabletOpen = false;
386
+ renderToggle();
387
+ });
375
388
  // App/Workbench switches reuse the shell. Responsive disclosure state is
376
389
  // temporary and must never replace the user's desktop sidebar preference.
377
390
  // An App that asks for the rail (app.js sets `app-nav-rail`) changes what
@@ -385,7 +398,7 @@ export function initSidebarToggle() {
385
398
  if (next === appMode && nextRail === railMode && nextBar === barMode)
386
399
  return;
387
400
  if (next !== appMode)
388
- compactOpen = false;
401
+ compactOpen = tabletOpen = false;
389
402
  appMode = next;
390
403
  railMode = nextRail;
391
404
  barMode = nextBar;
@@ -219,6 +219,8 @@ interface AppRoomSlots {
219
219
  Settings: ComponentType<{
220
220
  section?: string;
221
221
  }> | null;
222
+ /** What waits for the reader's review (ReviewRoom.tsx): AI-made proposals and unconfirmed writes, at `/{app}/review`. */
223
+ Review: ComponentType<Record<string, never>> | null;
222
224
  /** A free-form page (FreePage.tsx), where a dashboard entry names one. */
223
225
  Page: ComponentType<{
224
226
  entry?: PageEntry;
@@ -324,10 +326,12 @@ interface RecordSlots {
324
326
  useCellMarks?: (table: TableMeta | undefined, rows: ReadonlyArray<Record<string, unknown>>) => ((row: Record<string, unknown>, column: string, form?: 'cell' | 'summary') => ReactNode | undefined) | undefined;
325
327
  /** What a record page draws at its own fields (pageContext.ts `FieldAdornment`), and whether that is still being
326
328
  asked; `onLanded` re-reads the record after one wrote to it. A hook: read in render, by every record page, routed
327
- or in a dialog. */
329
+ or in a dialog. `notice` is one line drawn under the record's head (what waits on the record as a whole, such
330
+ as an AI proposal). */
328
331
  useFieldAdornment?: (connection: string, table: string, key: Readonly<Record<string, unknown>> | undefined, onLanded: () => void) => {
329
332
  adorn?: FieldAdornment;
330
333
  held: readonly string[];
334
+ notice?: ReactNode;
331
335
  };
332
336
  }
333
337
  /** A command run on one record: its outcome, a refusal already said where it was refused. */
@@ -47,6 +47,7 @@ const WORKBENCH = Object.freeze({
47
47
  Assistant: null,
48
48
  Directory: null,
49
49
  Settings: null,
50
+ Review: null,
50
51
  Page: null,
51
52
  SplitRecord: null,
52
53
  Document: null,
@@ -87,6 +87,8 @@ export interface ShellChrome {
87
87
  settings?(): Array<Record<string, unknown>>;
88
88
  /** The width at which an App's side menu becomes a phone's drawer; the menu is drawn again when it is crossed. */
89
89
  compactNavigation?: MediaQueryList;
90
+ /** The width at which an App's side menu stands as its icon rail (a tablet's); the menu is drawn again when it is crossed. */
91
+ tabletNavigation?: MediaQueryList;
90
92
  /** The theme bench moved the menu (themeBench.ts): the kit draws the shell again around the same room. */
91
93
  whenMenuMoves?(listener: () => void): unknown;
92
94
  /** Follow the App's source on disk, where the server watches it. */
@@ -680,6 +680,12 @@
680
680
  grid-template-columns: minmax(0, 1fr);
681
681
  }
682
682
  }
683
+ /* A tablet keeps a record's side column (page.css), and its fields stay one to a line in it. */
684
+ @media (min-width: 761px) and (max-width: 1100px) {
685
+ :where(.page-layout:not([data-layout], .dashboard-layout)) .page-aside .page-fields .page-field-grid {
686
+ grid-template-columns: minmax(0, 1fr);
687
+ }
688
+ }
683
689
  @container record-host (max-width: 1100px) {
684
690
  .page-aside .page-fields .page-field-grid {
685
691
  grid-template-columns: var(--page-field-columns, repeat(auto-fit, minmax(min(100%, var(--page-field-min, 16rem)), 1fr)));
@@ -878,17 +884,15 @@
878
884
  .command-choices {
879
885
  row-gap: 0;
880
886
  }
881
- /* A phone list's filter row the same way: its search is a field, so it draws at 44px, and the Filters and sort
882
- beside it at its height, the row alike as it is at 40px without a finger (ListFilterBar.css). A breakdown's rows
887
+ /* A list's filter row the same way, a tablet's as a phone's: its search is a field, so it draws at 44px, and the
888
+ Filters and sort beside it at its height (ListFilterBar.css). A breakdown's rows
883
889
  that open their group are rows under a finger, as a list's are (--row-h), 44px with no gap between them: a hit
884
890
  area drawn past a 28px row reached into its neighbor's, 5px away. A field report's grade found the search 40px
885
891
  and the rows 28px on every page that had them. */
886
- @media (max-width: 600px) {
887
- .applist-search-input,
888
- .applist-sheet-open,
889
- .applist-sort [data-slot='select-trigger'] {
890
- min-height: 44px;
891
- }
892
+ .applist-search-input,
893
+ .applist-sheet-open,
894
+ .applist-sort [data-slot='select-trigger'] {
895
+ min-height: 44px;
892
896
  }
893
897
  .page-breakdown-rows:has(> .pbd-drill) {
894
898
  row-gap: 0;
@@ -1523,6 +1527,36 @@
1523
1527
  height: 32px;
1524
1528
  margin-inline: calc(-1 * var(--space-3)) 0;
1525
1529
  }
1530
+ /* Under a thumb (a tablet folds the menu to the rail) every mark in the rail is a 44px target — a row 44px tall,
1531
+ a reach the rail's width rather than a wider mark — and the menu's toggle takes a 44px reach round its square.
1532
+ `::before` on a room, since a highlighted one's `::after` is its Enter hint. */
1533
+ @media (pointer: coarse) {
1534
+ body.app-nav-rail.sidebar-hidden .sidebar:not(.mobile-nav-sidebar) :is(#table-list button:not(.nav-group-fold), #table-list a.app-nav-target) {
1535
+ position: relative;
1536
+ min-height: 44px;
1537
+ }
1538
+ body.app-nav-rail.sidebar-hidden .sidebar:not(.mobile-nav-sidebar) :is(#table-list button:not(.nav-group-fold), #table-list a.app-nav-target)::before {
1539
+ content: '';
1540
+ position: absolute;
1541
+ top: 0;
1542
+ bottom: 0;
1543
+ left: 50%;
1544
+ width: max(100%, 44px);
1545
+ transform: translateX(-50%);
1546
+ }
1547
+ .pane-bar > .sidebar-collapse {
1548
+ position: relative;
1549
+ }
1550
+ .pane-bar > .sidebar-collapse::after {
1551
+ content: '';
1552
+ position: absolute;
1553
+ left: 50%;
1554
+ top: 50%;
1555
+ width: max(100%, 44px);
1556
+ height: max(100%, 44px);
1557
+ transform: translate(-50%, -50%);
1558
+ }
1559
+ }
1526
1560
  body.app-sidebar-shell .pane-bar > #search-button {
1527
1561
  flex: 0 1 20rem;
1528
1562
  min-width: 8rem;
@@ -1046,7 +1046,14 @@ th:focus-within .th-move { opacity: 1; }
1046
1046
  .th-resizer::before { opacity: 1; }
1047
1047
  }
1048
1048
  @media (pointer: coarse) {
1049
- .th-move { position: relative; }
1049
+ /* A head's sort and its caret take the same finger's reach: the caret, later in the head, is drawn over the sort,
1050
+ so where the two reaches meet the tap is the caret's, the one control with no other way in. */
1051
+ .th-move, .th-sort, .th-filter { position: relative; }
1052
+ .th-sort::after, .th-filter::after {
1053
+ content: ''; position: absolute; left: 50%; top: 50%;
1054
+ width: max(100%, 44px); height: max(100%, 44px);
1055
+ transform: translate(-50%, -50%);
1056
+ }
1050
1057
  .th-move::after {
1051
1058
  content: ''; position: absolute; left: 50%; top: 50%;
1052
1059
  width: max(100%, 44px); height: max(100%, 44px);
@@ -1186,6 +1186,27 @@ html:root[data-theme-style][data-look-tabs='pill'] :is(.tab, :where(body.app-mod
1186
1186
  }
1187
1187
  }
1188
1188
  @layer structure {
1189
+ /* `recipes.pane: 'edge'`: the room runs to the window's right and bottom edges, so no band of the menu's ground
1190
+ frames it. The one line left is between the menu and the room; the bar keeps its rule over the room. A raised
1191
+ look's lift (lumenLook.css) belongs to a pane that stands on something, so it goes with the inset. In the
1192
+ structure layer, over the pane it undoes (structure.css), and said here, where the menu's test looks for it. */
1193
+ :root[data-look-pane='edge'] body.app-sidebar-shell .layout > .pane-bar {
1194
+ margin: 0;
1195
+ border: 0;
1196
+ border-left: 1px solid var(--line);
1197
+ border-radius: 0;
1198
+ }
1199
+ :root[data-look-pane='edge'] body.app-sidebar-shell .layout > .content {
1200
+ margin: 0;
1201
+ border: 0;
1202
+ border-left: 1px solid var(--line);
1203
+ border-top: var(--pane-rule, 1px solid var(--line));
1204
+ border-radius: 0;
1205
+ box-shadow: none;
1206
+ }
1207
+ :root[data-look-pane='edge'] body.app-sidebar-shell.page-bare .layout > .content {
1208
+ border: 0;
1209
+ }
1189
1210
  /* The figures of a row stand on one line and a trend stands beside its figure, in every look that sets the label
1190
1211
  over the figure (said here and not in structure.css: a rule that names a treatment lives where the menu's test
1191
1212
  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.63",
3
+ "version": "1.0.0-rc.65",
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.63",
89
- "@mistriwork/ui": "1.0.0-rc.63",
88
+ "@mistriwork/engine": "1.0.0-rc.65",
89
+ "@mistriwork/ui": "1.0.0-rc.65",
90
90
  "intl-messageformat": "12.1.2",
91
91
  "qrcode-generator": "^2.0.4"
92
92
  },