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

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.
Files changed (33) hide show
  1. package/dist/client/components/AppList.js +6 -3
  2. package/dist/client/components/Crumbs.js +8 -4
  3. package/dist/client/components/DashHead.js +2 -1
  4. package/dist/client/components/DateField.js +3 -3
  5. package/dist/client/components/Grid.js +32 -7
  6. package/dist/client/components/NewRecord.js +3 -3
  7. package/dist/client/components/Notes.css +10 -0
  8. package/dist/client/components/PageHeading.d.ts +21 -0
  9. package/dist/client/components/PageHeading.js +6 -0
  10. package/dist/client/components/PageRoom.d.ts +15 -0
  11. package/dist/client/components/PageRoom.js +10 -1
  12. package/dist/client/components/Palette.js +9 -4
  13. package/dist/client/components/appListModel.d.ts +10 -0
  14. package/dist/client/components/appListModel.js +20 -1
  15. package/dist/client/components/gridArrange.d.ts +4 -3
  16. package/dist/client/components/gridArrange.js +8 -6
  17. package/dist/client/components/gridSizing.d.ts +9 -1
  18. package/dist/client/components/gridSizing.js +21 -2
  19. package/dist/client/components/valueModel.js +1 -1
  20. package/dist/client/copy/forms/components/DateField.d.ts +3 -3
  21. package/dist/client/copy/forms/components/DateField.js +3 -3
  22. package/dist/client/copy/forms/components/NewRecord.d.ts +0 -1
  23. package/dist/client/copy/forms/components/NewRecord.js +0 -1
  24. package/dist/client/core.js +2 -1
  25. package/dist/client/dayLabel.d.ts +8 -0
  26. package/dist/client/dayLabel.js +18 -0
  27. package/dist/client/features.css +15 -4
  28. package/dist/client/page.css +4 -0
  29. package/dist/client/structure.css +1 -1
  30. package/dist/client/style.css +20 -5
  31. package/dist/client/visualThemes.css +0 -2
  32. package/dist/shared/uiTokens.js +1 -0
  33. package/package.json +4 -3
@@ -42,7 +42,7 @@ import { pluralOf, recordNoun } from '@mistriwork/engine/shared/appNoun.js';
42
42
  import { primaryKey } from '@mistriwork/engine/shared/schema.js';
43
43
  import { findTable } from '../core.js';
44
44
  import { sameReads } from '../liveReads.js';
45
- import { appListQuery, litTabFor, residueOf, searchColumn, shownTabs, visibleQuestion, wholeQuery, subtitleColumns, editedReferences, listReferenceNames, } from './appListModel.js';
45
+ import { appListQuery, litTabFor, tabPinnedColumns, residueOf, searchColumn, shownTabs, visibleQuestion, wholeQuery, subtitleColumns, editedReferences, listReferenceNames, } from './appListModel.js';
46
46
  import { boxTail, boxesFor } from './FilterBoxes.js';
47
47
  import { onDemand } from './onDemand.js';
48
48
  import { useGridGroups } from './useGridGroups.js';
@@ -662,8 +662,11 @@ export function AppList({ entry, spec, navigate, embedded = false, newButton, in
662
662
  unchanged. The search box is this room's state, so each character typed
663
663
  redrew the room and, with it, the whole grid under the box; now a
664
664
  keystroke redraws the box and the chips, and the rows are left alone. */
665
- const hideKey = [...hide, ...leftOut].join('\n');
666
- const keptHide = useMemo(() => [...hide, ...leftOut], [hideKey]); // eslint-disable-line react-hooks/exhaustive-deps
665
+ /* A column the lit tab pins to one value repeats it on every row; the tab says it once. A view with two columns or
666
+ fewer keeps what it has, so the tab never empties the grid. */
667
+ const pinned = litTab >= 0 && (spec.show?.length ?? 0) > 2 ? tabPinnedColumns(spec, tabs[litTab].query ?? '', spec.show) : [];
668
+ const hideKey = [...hide, ...leftOut, ...pinned].join('\n');
669
+ const keptHide = useMemo(() => [...hide, ...leftOut, ...pinned], [hideKey]); // eslint-disable-line react-hooks/exhaustive-deps
667
670
  const totalsKey = totals ? JSON.stringify(totals) : '';
668
671
  const keptTotals = useMemo(() => totals, [totalsKey]); // eslint-disable-line react-hooks/exhaustive-deps
669
672
  const onGridNow = useRef(onGrid);
@@ -118,16 +118,20 @@ export function Crumbs({ onHome }) {
118
118
  const setting = trailSetting();
119
119
  const home = Boolean(setting && setting.home);
120
120
  const previous = stack.length > 1 ? stack[stack.length - 2] : null;
121
- /* A public reader's record page names itself in its heading straight
122
- below: the trail ends at the list it came from, which stays a link. */
121
+ /* An App's record page names itself in its heading straight below, so the trail ends at the list it came from, which
122
+ stays a link: the name stands once, as the title, and not again as the last crumb beside it. The Workbench's record
123
+ has no such heading, and keeps its crumb. */
123
124
  const top = stack[stack.length - 1];
124
- const trail = shell().publicVisitor() && stack.length > 1 && top && (top.kind === 'row' || top.kind === 'page') && top.table
125
+ const trail = (shell().publicVisitor() || shell().inApp()) && stack.length > 1 && top && (top.kind === 'row' || top.kind === 'page') && top.table
125
126
  ? stack.slice(0, -1)
126
127
  : stack;
127
128
  // Each crumb keeps its index in the walk, which is where it goes back to.
128
129
  const shown = trail.map((entry, index) => ({ entry, index })).filter(({ entry, index }) => !sameRoom(entry, trail[index + 1]));
129
130
  return (_jsxs("nav", { className: "crumbs", "aria-label": say('trail'), children: [home && (_jsx("button", { type: "button", className: "crumb-home", ...homeWords(), onClick: onHome, children: _jsxs("svg", { viewBox: "0 0 16 16", width: "17", height: "17", "aria-hidden": "true", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M2 7.2 8 2.4l6 4.8" }), _jsx("path", { d: "M3.4 6.6V13a.6.6 0 0 0 .6.6h8a.6.6 0 0 0 .6-.6V6.6" })] }) })), shown.map(({ entry, index: i }, n) => {
130
131
  const last = i === stack.length - 1;
132
+ /* Where the step stands in what is drawn, for the stylesheet: a short bar cuts the middle steps first and keeps
133
+ the first, where the trail began, and the last, where the reader is. */
134
+ const place = n === 0 ? 'first' : n === shown.length - 1 ? 'last' : 'middle';
131
135
  /* Without the house the first step stands at the start of the bar, with nothing before it to separate. */
132
136
  const first = n === 0 && !home;
133
137
  /* A row crumb names its table when the walk has changed table —
@@ -149,6 +153,6 @@ export function Crumbs({ onHome }) {
149
153
  : '';
150
154
  const ownStep = showsTable && shell().inApp();
151
155
  const content = (_jsxs(_Fragment, { children: [showsTable && !ownStep && (_jsx("span", { className: "crumb-table", title: entry.table, children: tableWord })), nameOf(entry)] }));
152
- return (_jsxs(Fragment, { children: [ownStep && (_jsxs(_Fragment, { children: [!first && _jsx("span", { className: "sep", children: "\u203A" }), _jsx("span", { className: "crumb-table-step", children: tableWord })] })), (!first || ownStep) && _jsx("span", { className: "sep", children: "\u203A" }), last ? (_jsx("span", { className: "current", children: content })) : (_jsx("button", { type: "button", onClick: () => backTo(i), children: content }))] }, i));
156
+ return (_jsxs(Fragment, { children: [ownStep && (_jsxs(_Fragment, { children: [!first && _jsx("span", { className: "sep", children: "\u203A" }), _jsx("span", { className: "crumb-table-step", "data-crumb": place, children: tableWord })] })), (!first || ownStep) && _jsx("span", { className: "sep", children: "\u203A" }), last ? (_jsx("span", { className: "current", "data-crumb": place, children: content })) : (_jsx("button", { type: "button", "data-crumb": place, onClick: () => backTo(i), children: content }))] }, i));
153
157
  }), _jsx("span", { className: "crumb-note", ref: crumbNoteRef }), previous && !shell().publicVisitor() && (_jsxs("button", { type: "button", className: "crumb-back", title: say('back', { previous: nameOf(previous) }), onClick: () => backTo(stack.length - 2), children: [_jsx(Icon, { name: "caret-left", size: 16 }), _jsx("span", { children: say('common.back') })] })), _jsx("div", { className: "crumb-tools", ref: crumbToolsRef })] }));
154
158
  }
@@ -10,6 +10,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  * title, the crumbs and the palette read the label as they always do.
11
11
  */
12
12
  import { FavoriteStar } from './FavoriteStar.js';
13
+ import { PageHeading } from './PageHeading.js';
13
14
  export function DashHead({ dashboard, star = true, }) {
14
15
  const hidden = dashboard.headingHidden === true || dashboard.head === 'own';
15
16
  const title = dashboard.heading ?? dashboard.label;
@@ -20,5 +21,5 @@ export function DashHead({ dashboard, star = true, }) {
20
21
  return _jsx("h1", { className: "applist-title visually-hidden", children: title });
21
22
  if (dashboard.head === 'compact' && !hidden)
22
23
  return (_jsxs("div", { className: "applist-head applist-head-row dash-head-compact", children: [_jsx("h1", { className: "applist-title", children: title }), favorite] }));
23
- return (_jsxs("div", { className: "applist-head dash-head", children: [_jsx("h1", { className: `applist-title${hidden ? ' visually-hidden' : ''}`, children: title }), favorite, dashboard.description && dashboard.head !== 'own' && _jsx("p", { className: "note dash-description", children: dashboard.description })] }));
24
+ return (_jsx(PageHeading, { title: title, hidden: hidden, favorite: favorite, description: dashboard.description && dashboard.head !== 'own' ? dashboard.description : undefined }));
24
25
  }
@@ -9,10 +9,10 @@ import { say } from '../copy/forms/components/DateField.js';
9
9
  import { appWord } from '../messages.js';
10
10
  /* Read when a field draws, so a catalog worn later is the one said. */
11
11
  const words = () => ({
12
- dateTimePattern: appWord('mistri.form.dateTimeHint', say('yyyyMmDdHh')),
13
- enterDateAndTime: say('enterADateAndTime'),
12
+ timePattern: appWord('mistri.form.timeHint', say('hhMm')),
13
+ enterDateAndTime: (format) => say('enterADateAndTime', { format }),
14
14
  enterDate: (format) => say('enterADateInYyyy', { format }),
15
- dateAndTimeFormat: say('dateAndTimeFormat'),
15
+ dateAndTimeFormat: (format) => say('dateAndTimeFormat', { format }),
16
16
  dateFormat: (format) => say('dateFormatIs', { format }),
17
17
  openWithKeys: say('altAndDownArrow'),
18
18
  chooseDate: (label) => (label ? say('chooseDateFor', { label }) : say('chooseDate')),
@@ -55,7 +55,7 @@ import { fontLoaded, textMeasure } from './textMeasure.js';
55
55
  import { presentationColumns } from './columnPresentation.js';
56
56
  import { usePins } from './usePins.js';
57
57
  import { useStickyHead } from './useStickyHead.js';
58
- import { fitGridColumns, keepFitting, tagsThatFit, GRID_EXPANDER_WIDTH, GRID_HEAD_CHAR, GRID_SIZE_SAMPLE, holdFold, GRID_TRAIL_WIDTH, } from './gridSizing.js';
58
+ import { columnFloor, fitGridColumns, keepFitting, tagsThatFit, GRID_EXPANDER_WIDTH, GRID_HEAD_CHAR, GRID_SIZE_SAMPLE, holdFold, GRID_TRAIL_WIDTH, } from './gridSizing.js';
59
59
  import { applyColumnOrder, applyColumnWidths, clampColumnWidth, columnResizeStep, MIN_COLUMN_WIDTH, moveColumn } from './gridArrange.js';
60
60
  import { VISUAL_THEME_EVENT } from '../visualTheme.js';
61
61
  import { JsonPreview } from './JsonPreview.js';
@@ -309,6 +309,19 @@ function numberShown(value, plan) {
309
309
  /* A dress that draws only its words: a meter's bar and a percent's bar or ring are width the words do not
310
310
  measure. (Only a number's or a date's dress is read for this: an avatar or a signature is text's.) */
311
311
  const drawsWords = (dress) => dress.kind !== 'meter' && !('bar' in dress && dress.bar) && !('ring' in dress && dress.ring);
312
+ /* What a bar or a ring draws beside its words: its width and the gap before the words (features.css: .pct-bar
313
+ 52px, a meter's 64px, .pct-ring 16px, gap --space-3). Sized by its words alone, Compass's probability column
314
+ held 88px and cut "100%" to "10…" beside its bar. */
315
+ const BESIDE_GAP = 8;
316
+ const besideWords = (dress) => {
317
+ if (dress.kind === 'meter')
318
+ return 64 + BESIDE_GAP;
319
+ if ('bar' in dress && dress.bar !== undefined)
320
+ return 52 + BESIDE_GAP;
321
+ if ('ring' in dress && dress.ring !== undefined)
322
+ return 16 + BESIDE_GAP;
323
+ return 0;
324
+ };
312
325
  /* A record's tags in a list's cell: as many whole chips as the cell holds
313
326
  (at most TAGS_SHOWN, at least one), then how many more. Clipped by the
314
327
  cell, Thread's issues read "accessibility perfo"; a chip is a word, and a
@@ -759,8 +772,14 @@ export function Grid({ table, data, hide, labels, totals, totalsLabel = say('tot
759
772
  if (row[name] == null)
760
773
  return true;
761
774
  const dress = dressFor(display, row[name]);
762
- return dress ? drawsWords(dress) : plan.kind === 'number' && numberShown(row[name], plan) != null;
775
+ return dress ? drawsWords(dress) || besideWords(dress) > 0 : plan.kind === 'number' && numberShown(row[name], plan) != null;
763
776
  }),
777
+ beside: labelColumn || display?.component
778
+ ? undefined
779
+ : rows.slice(0, GRID_SIZE_SAMPLE).reduce((most, row) => {
780
+ const dress = row[name] == null ? undefined : dressFor(display, row[name]);
781
+ return Math.max(most, dress ? besideWords(dress) : 0);
782
+ }, 0) || undefined,
764
783
  /* A date no rule dresses is drawn as the cell formats it, and sized by that. */
765
784
  drawnDate: plan.kind === 'date' && !labelColumn && !display?.component,
766
785
  status: !labelColumn &&
@@ -834,16 +853,22 @@ export function Grid({ table, data, hide, labels, totals, totalsLabel = say('tot
834
853
  columns untouched — a grid that was never arranged draws exactly as it
835
854
  did. */
836
855
  const hasWidthOverrides = Object.keys(columnWidths).length > 0;
837
- const colWidths = useMemo(() => (hasWidthOverrides ? applyColumnWidths(fit.columns, ordered, columnWidths) : fit.columns), [hasWidthOverrides, fit.columns, ordered, columnWidths]);
856
+ /* What a dragged column may not go under: a date, a figure or a status pill holds its value's width, text keeps its
857
+ ellipsis (gridSizing.ts columnFloor). */
858
+ const floors = useMemo(() => Object.fromEntries(ordered.map((name, index) => [
859
+ name,
860
+ columnFloor(orderedHints[index], headChar, measureOrdered && ((text) => measureOrdered(text, index))),
861
+ ])), [ordered, orderedHints, headChar, measureOrdered]);
862
+ const colWidths = useMemo(() => (hasWidthOverrides ? applyColumnWidths(fit.columns, ordered, columnWidths, floors) : fit.columns), [hasWidthOverrides, fit.columns, ordered, columnWidths, floors]);
838
863
  const useColgroup = sizing === 'fit' || hasWidthOverrides;
839
864
  const tableWidth = hasWidthOverrides
840
865
  ? colWidths.reduce((sum, width) => sum + width, 0) + (slotted ? GRID_EXPANDER_WIDTH : 0) + (trailing ? GRID_TRAIL_WIDTH : 0)
841
866
  : fit.width;
842
867
  const moveColumnBy = useCallback((name, direction) => setColumnOrder((current) => moveColumn(applyColumnOrder(drawn, current), name, direction)), [drawn]);
843
868
  const setColumnWidth = useCallback((name, width) => setColumnWidths((current) => {
844
- const next = clampColumnWidth(width);
869
+ const next = clampColumnWidth(width, floors[name]);
845
870
  return current[name] === next ? current : { ...current, [name]: next };
846
- }), []);
871
+ }), [floors]);
847
872
  const resetColumnWidth = useCallback((name) => setColumnWidths((current) => {
848
873
  if (!(name in current))
849
874
  return current;
@@ -1218,7 +1243,7 @@ export function Grid({ table, data, hide, labels, totals, totalsLabel = say('tot
1218
1243
  const seed = drag.seed;
1219
1244
  drag.seed = null;
1220
1245
  drag.seeded = true;
1221
- setColumnWidths({ ...seed, [name]: clampColumnWidth(width) });
1246
+ setColumnWidths({ ...seed, [name]: clampColumnWidth(width, floors[name]) });
1222
1247
  return;
1223
1248
  }
1224
1249
  setColumnWidth(name, width);
@@ -1256,7 +1281,7 @@ export function Grid({ table, data, hide, labels, totals, totalsLabel = say('tot
1256
1281
  const current = seed?.[name] ?? appliedWidth ?? colWidths[index] ?? 0;
1257
1282
  const width = current + (e.key === 'ArrowRight' ? 1 : -1) * columnResizeStep(e.shiftKey);
1258
1283
  if (seed)
1259
- setColumnWidths({ ...seed, [name]: clampColumnWidth(width) });
1284
+ setColumnWidths({ ...seed, [name]: clampColumnWidth(width, floors[name]) });
1260
1285
  else
1261
1286
  setColumnWidth(name, width);
1262
1287
  }, onDoubleClick: () => resetColumnWidth(name) }))] }, name));
@@ -695,9 +695,9 @@ export function PlatformControl({ column, app, required, assigned, spoken, targe
695
695
  }
696
696
  if (dateOnly(column) || kind === 'datetime') {
697
697
  return (_jsx(DateField, { id: dateId, inputRef: setControl, className: "insert-input", value: value, onChange: onChange, withTime: kind === 'datetime', "aria-invalid": errorId ? true : undefined, "aria-label": app ? spoken : `${column.name} (${column.type})`,
698
- /* A day's box says the locale's pattern, as its hint does and as it reads what is typed (MM/DD/YYYY in
699
- en-US; ISO is read too): the field's own (DateField.tsx). */
700
- placeholder: said || (kind === 'datetime' ? say('yyyyMmDdHh') : undefined), locale: formatLocale(), timezone: formatTimezone(), now: appNow() }));
698
+ /* A day's box, with or without a time, says the locale's pattern, as its hint does and as it reads what is typed
699
+ (MM/DD/YYYY, and HH:MM after it for a moment, in en-US; ISO is read too): the field's own (DateField.tsx). */
700
+ placeholder: said || undefined, locale: formatLocale(), timezone: formatTimezone(), now: appNow() }));
701
701
  }
702
702
  /* Formatted text: the editor, fetched when the form first draws one. A new record has no row yet for a
703
703
  picture to be attached to, so it takes pictures once it is saved and edited. */
@@ -21,6 +21,16 @@
21
21
  .empty-note.is-room > .empty-note-text { color: var(--ink); font-size: var(--text-lg); font-weight: 500; text-wrap: balance; }
22
22
  .empty-note.is-room .empty-note-detail { margin-top: var(--space-1); font-size: var(--text-md); font-weight: 400; }
23
23
  .empty-note.is-room > .empty-note-action { margin-top: var(--space-4); }
24
+ /* An empty place is centered in its room, mark over sentence, where it was
25
+ left on the edge with its mark beside it: off centre in a wide card and
26
+ nowhere in particular on a page. Inside a card it sits flush on the card's
27
+ own edge and draws nothing of its own (no border, ground or shadow a look
28
+ may give a note): the card is the box, not the note in it. */
29
+ .empty-note:not(.is-room, .is-refused) { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: var(--space-1h); margin-inline: auto; text-align: center; }
30
+ .empty-note:not(.is-room, .is-refused) > * { grid-column: 1; grid-row: auto; }
31
+ .empty-note:not(.is-room, .is-refused) > .empty-note-mark { margin-top: 0; }
32
+ .empty-note:not(.is-room, .is-refused) .page-related-create, .empty-note:not(.is-room, .is-refused) .empty-note-action { justify-content: center; }
33
+ :is(.panel, .page-section, .dash-list, [data-slot='card']) :is(.empty-note, .page-empty) { border: 0; border-radius: 0; background: none; box-shadow: none; padding-inline: 0; }
24
34
  .empty-note-text { margin: 0; color: var(--ink-muted); font-size: var(--text-md); line-height: 1.5; }
25
35
  .empty-note-detail { color: var(--ink-muted); }
26
36
  /* An authored title leads in the text ink at the same size: the sentence is what it says, not a heading. */
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The head of a dashboard or a free-form page, as markup: the title, its star, a line of intro, and, when there are
3
+ * any, the page's verbs and a way back. DashHead is the platform's own use of it; a free-form page that draws its own
4
+ * head reaches it through the SDK's `PageHeader`, so both wear the one set of classes and every look and theme
5
+ * dresses them alike (features.css `.dash-head`).
6
+ */
7
+ import type { ReactNode } from 'react';
8
+ export declare function PageHeading({ title, favorite, description, actions, back, hidden, level, }: {
9
+ title: ReactNode;
10
+ /** The Favorites star beside the title. */
11
+ favorite?: ReactNode;
12
+ description?: ReactNode;
13
+ /** The page's verbs, at the head's far end. */
14
+ actions?: ReactNode;
15
+ /** A way back, over the title. */
16
+ back?: ReactNode;
17
+ /** The title stays for a screen reader and is not seen. */
18
+ hidden?: boolean;
19
+ /** A page has one h1, the platform's; a head a page draws itself is an h2. */
20
+ level?: 1 | 2;
21
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function PageHeading({ title, favorite, description, actions, back, hidden = false, level = 1, }) {
3
+ const Title = level === 1 ? 'h1' : 'h2';
4
+ const drawn = actions !== undefined && actions !== null && actions !== false;
5
+ return (_jsxs("div", { className: `applist-head dash-head${drawn ? ' has-actions' : ''}${back ? ' has-back' : ''}`, children: [back ? _jsx("div", { className: "dash-head-back", children: back }) : null, _jsx(Title, { className: `applist-title${hidden ? ' visually-hidden' : ''}`, children: title }), favorite, drawn ? _jsx("div", { className: "applist-head-tools dash-head-actions", children: actions }) : null, description ? _jsx("p", { className: "note dash-description", children: description }) : null] }));
6
+ }
@@ -13,10 +13,25 @@
13
13
  * it, and the callbacks check the entry before touching it.
14
14
  */
15
15
  import { type ReactNode } from 'react';
16
+ import type { TableMeta } from '@mistriwork/engine/shared/schema.js';
16
17
  import { type PageEntry } from './pageModel.js';
18
+ import { type RecordSurfacePage as Def, type RecordSurfaceAlternative as Others } from './recordSurface.js';
17
19
  export declare function PageRoom({ entry }: {
18
20
  entry: PageEntry;
19
21
  }): import("react").JSX.Element;
22
+ /**
23
+ * No record chosen: the list *is* the chooser. The app's list page in app
24
+ * mode — tabs, named filters, chips, the lot — and the plain grid in the
25
+ * workbench; a row click opens this record as a page, because the walk is
26
+ * already in page view and `openRecord` keeps it there.
27
+ */
28
+ export declare function Rootless({ entry, page, base, others, onLayout, }: {
29
+ entry: PageEntry;
30
+ page: Def;
31
+ base: TableMeta;
32
+ others: Others[];
33
+ onLayout: () => void;
34
+ }): import("react").JSX.Element;
20
35
  /**
21
36
  * The record's page as it arrives, shown once it is complete. A section
22
37
  * draws when its own read answers, and the header's verbs when their
@@ -110,7 +110,7 @@ function Known({ entry, page, base, surface, }) {
110
110
  * workbench; a row click opens this record as a page, because the walk is
111
111
  * already in page view and `openRecord` keeps it there.
112
112
  */
113
- function Rootless({ entry, page, base, others, onLayout, }) {
113
+ export function Rootless({ entry, page, base, others, onLayout, }) {
114
114
  useEffect(() => {
115
115
  if (currentEntry() === entry && entry.label !== page.name) {
116
116
  entry.label = page.name;
@@ -118,6 +118,15 @@ function Rootless({ entry, page, base, others, onLayout, }) {
118
118
  }
119
119
  }, [entry, page.name]);
120
120
  const spec = shell().inApp() ? appListFor(base.id) : null;
121
+ /* A page opened with no record is a dead end where its table has a list of its own: the person came for a record,
122
+ and the list is where they are picked, at the one address it has. Replaced, so Back does not return to the empty
123
+ page. Where there is no list the chooser below stays, and says to pick one. */
124
+ useEffect(() => {
125
+ if (spec)
126
+ go(tableView(base.id), 'replace');
127
+ }, [spec, base.id]);
128
+ if (spec)
129
+ return null;
121
130
  return (_jsx(PageView, { entry: entry, page: page, base: base, plans: [], others: others, onLabel: () => { }, onTab: () => { }, onLayout: onLayout, chooser: _jsx(Chooser, { entry: entry, base: base, spec: spec }) }));
122
131
  }
123
132
  function Chooser({ entry, base, spec }) {
@@ -29,6 +29,11 @@ const MOST = { recent: 4, pages: 8, create: 5, commands: 4, records: 9 };
29
29
  first screen. A menu that fits the shortlist (MOST.pages) is shown whole: cut to five, an App of seven lists hid
30
30
  two of them until a word was typed. */
31
31
  const FIRST_PAGES = 5;
32
+ /** Once a word is typed the list is what it names, not a shortlist: every page the word matches stays reachable, the
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 };
32
37
  const groupOf = (item) => item.kind === 'page' ? 'pages' : item.kind === 'create' ? 'create' : item.kind === 'record' ? 'records' : 'commands';
33
38
  function groupWord(group) {
34
39
  switch (group) {
@@ -191,8 +196,8 @@ export function Palette({ prefill = '', onClose }) {
191
196
  .filter(({ points }) => points > 0)
192
197
  .sort((a, b) => b.points - a.points)
193
198
  .map(({ item }) => item);
194
- // Bounded because a palette is a shortlist.
195
- const named = ranked.slice(0, 20);
199
+ // Bounded because a palette is a shortlist, past a typed word's own matches (MOST_TYPED).
200
+ const named = ranked.slice(0, term ? 60 : 20);
196
201
  /* Hits for earlier text keep only the rows this text also names: with
197
202
  nothing named above them, the first is lit and Enter would open a record
198
203
  the box never named. Until the hits answer this text, "nothing matches"
@@ -212,14 +217,14 @@ export function Palette({ prefill = '', onClose }) {
212
217
  ? recent
213
218
  : (group === 'records'
214
219
  ? hits.choices
215
- : ranked.filter((item) => groupOf(item) === group && !(item.room !== undefined && recentRooms.has(item.room)))).slice(0, group === 'pages' && !term && pageCount > MOST.pages ? FIRST_PAGES : MOST[group]),
220
+ : ranked.filter((item) => groupOf(item) === group && !(item.room !== undefined && recentRooms.has(item.room)))).slice(0, group === 'pages' && !term && pageCount > MOST.pages ? FIRST_PAGES : term ? MOST_TYPED[group] : MOST[group]),
216
221
  }))
217
222
  .filter(({ items }) => items.length)
218
223
  .map((entry, at, every) => ({ ...entry, from: every.slice(0, at).reduce((sum, { items }) => sum + items.length, 0) }));
219
224
  /* Record hits ride below the named things: a table you typed exactly still wins the top. */
220
225
  const rows = inApp
221
226
  ? grouped.flatMap(({ group, items }) => items.map((item) => ({ item, group })))
222
- : [...named, ...hits.choices].slice(0, 20).map((item) => ({ item, group: groupOf(item) }));
227
+ : [...named, ...hits.choices].slice(0, term ? 60 : 20).map((item) => ({ item, group: groupOf(item) }));
223
228
  const shown = rows.map(({ item }) => item);
224
229
  const current = shown.length ? ((active % shown.length) + shown.length) % shown.length : 0;
225
230
  const choose = (index) => {
@@ -171,6 +171,16 @@ export declare function wholeQuery(spec: ListSpec, typed: string): string;
171
171
  * group in parens, and `(a or b)` still *is* the "a or b" tab.
172
172
  */
173
173
  export declare function litTabFor(tabs: ListTab[], refinement: string, boxColumns: string[]): number;
174
+ /**
175
+ * The columns a tab's own question fixes to one value: on "To submit" (`status = to_submit`) the status column
176
+ * says the same thing on every row, so the grid leaves it out while that tab is lit. Only an exact single-value
177
+ * equality pins — `in` with two or more values, a range, `!=`, a contains or a relative date do not — and a column
178
+ * that two conditions both speak for is left shown.
179
+ */
180
+ export declare function pinnedColumns(tabQuery: string, columns: string[]): string[];
181
+ /** pinnedColumns for a lit tab of a view: a named tab (`tabs: ['new']`) carries its segment's word, not its
182
+ conditions, so the word is expanded through the table's segments before the columns are read. */
183
+ export declare function tabPinnedColumns(spec: ListSpec, tabQuery: string, columns: string[]): string[];
174
184
  /** The refinement with every box column's conditions taken out. */
175
185
  export declare function residueOf(refinement: string, boxColumns: string[]): string;
176
186
  /** What the New button makes: one of the table's records, by its resource's
@@ -23,7 +23,7 @@ import { referenceProjection } from '@mistriwork/engine/shared/referenceModel.js
23
23
  import { LABEL_SEGMENT } from '@mistriwork/engine/shared/recordLabel.js';
24
24
  import { appListQuery as sharedAppListQuery, editedReferences as sharedEditedReferences, limitClause, listReferenceNames as sharedListReferenceNames, orderClause, referenceNames as sharedReferenceNames, showClause as sharedShowClause, subtitleColumns as sharedSubtitleColumns, withOrder, } from '@mistriwork/engine/shared/listQuestion.js';
25
25
  import { shell } from '../shellMode.js';
26
- import { canonicalize, conditionTail, hasShowClause, squeeze, stripCondition } from '../filterbar.js';
26
+ import { canonicalize, conditionTail, hasShowClause, ownedTails, squeeze, stripCondition } from '../filterbar.js';
27
27
  import { maskQuoted, splitConditions, splitQuery } from '../clauses.js';
28
28
  import { appRooms, isListRoom, offeredBy, resourceOf, viewRoom } from './appRooms.js';
29
29
  import { say } from '../copy/lists/components/appListModel.js';
@@ -377,6 +377,25 @@ export function litTabFor(tabs, refinement, boxColumns) {
377
377
  });
378
378
  return best;
379
379
  }
380
+ /**
381
+ * The columns a tab's own question fixes to one value: on "To submit" (`status = to_submit`) the status column
382
+ * says the same thing on every row, so the grid leaves it out while that tab is lit. Only an exact single-value
383
+ * equality pins — `in` with two or more values, a range, `!=`, a contains or a relative date do not — and a column
384
+ * that two conditions both speak for is left shown.
385
+ */
386
+ export function pinnedColumns(tabQuery, columns) {
387
+ const single = /^=\s*(?:"[^"]*"|'[^']*'|[^\s,"'()]+)$|^in\s*\(\s*(?:"[^"]*"|'[^']*'|[^\s,"'()]+)\s*\)$/i;
388
+ return columns.filter((column) => {
389
+ const tails = ownedTails(tabQuery, column);
390
+ return tails.length === 1 && single.test(tails[0]);
391
+ });
392
+ }
393
+ /** pinnedColumns for a lit tab of a view: a named tab (`tabs: ['new']`) carries its segment's word, not its
394
+ conditions, so the word is expanded through the table's segments before the columns are read. */
395
+ export function tabPinnedColumns(spec, tabQuery, columns) {
396
+ const segments = findTable(spec.table)?.segments;
397
+ return pinnedColumns(unwrapped(expandSegments(tabQuery, segments).text), columns);
398
+ }
380
399
  /** The refinement with every box column's conditions taken out. */
381
400
  export function residueOf(refinement, boxColumns) {
382
401
  return boxColumns.reduce((out, name) => stripCondition(out, name), squeeze(refinement));
@@ -15,8 +15,9 @@
15
15
  export declare const MIN_COLUMN_WIDTH = 48;
16
16
  /** The step an arrow key moves a resizer, larger with Shift held. */
17
17
  export declare function columnResizeStep(shiftKey: boolean): number;
18
- /** A width a column may actually be given: whole pixels, never below its floor. */
19
- export declare function clampColumnWidth(width: number): number;
18
+ /** A width a column may actually be given: whole pixels, never below its floor — the grid's own, or the wider one its
19
+ type asks (gridSizing.ts columnFloor: a date, a figure or a status chip is never dragged under its value). */
20
+ export declare function clampColumnWidth(width: number, floor?: number): number;
20
21
  /**
21
22
  * The columns as drawn, in the reader's order: the order's names first,
22
23
  * in the order's order, then every drawn column the order never named,
@@ -30,4 +31,4 @@ export declare function applyColumnOrder(drawn: readonly string[], order: readon
30
31
  */
31
32
  export declare function moveColumn(order: readonly string[], name: string, direction: 'left' | 'right'): string[];
32
33
  /** The fitted widths, with every width the reader dragged standing in place of its fitted one. */
33
- export declare function applyColumnWidths(fitted: readonly number[], columns: readonly string[], overrides: Readonly<Record<string, number>>): number[];
34
+ export declare function applyColumnWidths(fitted: readonly number[], columns: readonly string[], overrides: Readonly<Record<string, number>>, floors?: Readonly<Record<string, number>>): number[];
@@ -20,11 +20,13 @@ const RESIZE_SHIFT_STEP = 64;
20
20
  export function columnResizeStep(shiftKey) {
21
21
  return shiftKey ? RESIZE_SHIFT_STEP : RESIZE_STEP;
22
22
  }
23
- /** A width a column may actually be given: whole pixels, never below its floor. */
24
- export function clampColumnWidth(width) {
23
+ /** A width a column may actually be given: whole pixels, never below its floor — the grid's own, or the wider one its
24
+ type asks (gridSizing.ts columnFloor: a date, a figure or a status chip is never dragged under its value). */
25
+ export function clampColumnWidth(width, floor = 0) {
26
+ const least = Math.max(MIN_COLUMN_WIDTH, Math.ceil(floor));
25
27
  if (!Number.isFinite(width))
26
- return MIN_COLUMN_WIDTH;
27
- return Math.max(MIN_COLUMN_WIDTH, Math.round(width));
28
+ return least;
29
+ return Math.max(least, Math.round(width));
28
30
  }
29
31
  /**
30
32
  * The columns as drawn, in the reader's order: the order's names first,
@@ -54,9 +56,9 @@ export function moveColumn(order, name, direction) {
54
56
  return next;
55
57
  }
56
58
  /** The fitted widths, with every width the reader dragged standing in place of its fitted one. */
57
- export function applyColumnWidths(fitted, columns, overrides) {
59
+ export function applyColumnWidths(fitted, columns, overrides, floors = {}) {
58
60
  return columns.map((name, index) => {
59
61
  const override = overrides[name];
60
- return override === undefined ? (fitted[index] ?? 0) : clampColumnWidth(override);
62
+ return override === undefined ? (fitted[index] ?? 0) : clampColumnWidth(override, floors[name]);
61
63
  });
62
64
  }
@@ -38,8 +38,10 @@ interface GridColumnSize {
38
38
  avatar?: boolean;
39
39
  /** The row's state (a tone chip, or a vocabulary named status or stage): kept with the name when columns are left out. */
40
40
  status?: boolean;
41
- /** Every value is the words the cell draws ("4 weeks ago", "$22,495"), not a raw value it formats, and nothing beside them (a bar, a ring, an App's own renderer). */
41
+ /** Every value is the words the cell draws ("4 weeks ago", "$22,495"), not a raw value it formats, and nothing beside them but what `beside` counts (a bar, a ring; never an App's own renderer). */
42
42
  dressed?: boolean;
43
+ /** What the cell draws beside its words (a percent's bar or ring, a meter's bar, and the gap): width the words do not measure. */
44
+ beside?: number;
43
45
  /** A date no rule dresses: its values are the words the cell draws ("Aug 22, 2026"), measured in the cell's font. */
44
46
  drawnDate?: boolean;
45
47
  }
@@ -67,6 +69,12 @@ export declare function columnSizeHint(column: GridColumnSize, headChar?: number
67
69
  least: number;
68
70
  head: number;
69
71
  };
72
+ /**
73
+ * The least a reader may drag a column to. Text keeps its ellipsis (no floor of its own); a date, a figure, a yes-or-no
74
+ * and a status chip are cut by no one, so each holds the width its value measures (its minimum, as sized above): a date
75
+ * is never "Aug 22, 20…" and a pill never "In rev…" because a handle was dragged a pixel too far.
76
+ */
77
+ export declare function columnFloor(column: GridColumnSize, headChar?: number, measure?: TextMeasure): number;
70
78
  /**
71
79
  * The columns an embedded grid keeps in its width: a dashboard's list in half
72
80
  * a row cut "Sep 22, 202" behind a scroll bar. Past the width, columns are
@@ -67,7 +67,8 @@ export function columnSizeHint(column, headChar = GRID_HEAD_CHAR, measure, squee
67
67
  /* The total is set in the totals row's semibold, a tenth wider than the cell's own weight. */
68
68
  const totalWidth = measure && column.total ? Math.ceil(measure(column.total) * TOTAL_WEIGHT) : 0;
69
69
  const textWidth = (measure ? Math.max(Math.ceil(widest(column.values)), totalWidth) + (column.chip ? (column.chipExtra ?? CHIP_EXTRA) : 0) : length * 8) +
70
- (column.avatar ? AVATAR_WIDTH : 0);
70
+ (column.avatar ? AVATAR_WIDTH : 0) +
71
+ (column.beside ?? 0);
71
72
  /* A second line asks for room, never lowers the floor: an email under a
72
73
  name wants its width, but a narrow panel still keeps the name's minimum.
73
74
  It is set a size down (12.5px under 14px). */
@@ -107,7 +108,9 @@ export function columnSizeHint(column, headChar = GRID_HEAD_CHAR, measure, squee
107
108
  price, miles and days held 56px each past their figures while the car's
108
109
  name beside them was cut to "2024 Toyota C…". */
109
110
  if (column.kind === 'number') {
110
- const width = measured && (column.chip || column.dressed) ? Math.min(264, textWidth + pad) : Math.min(264, Math.max(88, (length + 4) * 8 + 24));
111
+ const width = measured && (column.chip || column.dressed)
112
+ ? Math.min(264, textWidth + pad)
113
+ : Math.min(264, Math.max(88, (length + 4) * 8 + 24 + (column.beside ?? 0)));
111
114
  return fixed(width);
112
115
  }
113
116
  /* A number set in groups (a telephone number, a card's last digits, a part number of digits) is a number that
@@ -165,6 +168,22 @@ function sizeHints(columns, room, headChar, measure, squeezeName = false, cut =
165
168
  const hints = columns.map((column, index) => columnSizeHint(column, headChar, measure && ((text) => measure(text, index)), squeezeName));
166
169
  return cut ? giveWay(hints, room) : hints;
167
170
  }
171
+ /**
172
+ * The least a reader may drag a column to. Text keeps its ellipsis (no floor of its own); a date, a figure, a yes-or-no
173
+ * and a status chip are cut by no one, so each holds the width its value measures (its minimum, as sized above): a date
174
+ * is never "Aug 22, 20…" and a pill never "In rev…" because a handle was dragged a pixel too far.
175
+ */
176
+ export function columnFloor(column, headChar = GRID_HEAD_CHAR, measure) {
177
+ const whole = column.kind === 'date' ||
178
+ column.kind === 'number' ||
179
+ column.kind === 'boolean' ||
180
+ column.chip ||
181
+ isGroupedNumber((column.values ?? [])
182
+ .slice(0, GRID_SIZE_SAMPLE)
183
+ .filter((value) => value != null)
184
+ .map(String));
185
+ return whole ? columnSizeHint(column, headChar, measure).least : 0;
186
+ }
168
187
  /* Where the minima together run past the room, the heads wider than their columns' values give way first, the
169
188
  last first, and then the secondary text columns, the last first, down to their floors; the name, the chips and
170
189
  the figures never do. Where giving way would not spare the scroll, nothing is cut for it: a phone's table cut a
@@ -17,6 +17,7 @@ import { planColumn } from '../columns.js';
17
17
  import { leadTonePath, subtitlePath } from '@mistriwork/engine/shared/subtitlePath.js';
18
18
  import { say } from '../copy/record/components/valueModel.js';
19
19
  import { shellBody } from '../shellHost.js';
20
+ import { ISO_DAY } from '../dayLabel.js';
20
21
  /**
21
22
  * How a set of dates drawn together is said: one way down a column. A relative date is said from today only where
22
23
  * every value is near (a sentence of days), else every one is its date and the phrase stays its tooltip. Anything
@@ -437,7 +438,6 @@ function relativeSaid(rule, text) {
437
438
  ? { text: formatDate(text), title: said }
438
439
  : { text: said, title: text, date: formatDate(text) };
439
440
  }
440
- const ISO_DAY = /^\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}(?::?\d{2})?)?)?$/;
441
441
  /**
442
442
  * A toned day says what it would say untoned: its tone is the pill it wears, not a reason to draw the stored ISO day.
443
443
  * A `relative` rule says it from today while near; no format says it as a date column does (daySaid). A field report
@@ -1,8 +1,8 @@
1
1
  export declare const say: import("../../../messages.js").RoomMessage<{
2
- readonly enterADateAndTime: "Enter a date and time as YYYY-MM-DD HH:MM within the allowed range.";
2
+ readonly enterADateAndTime: "Enter a date and time as {format} within the allowed range.";
3
3
  readonly enterADateInYyyy: "Enter a date as {format} within the allowed range.";
4
- readonly yyyyMmDdHh: "YYYY-MM-DD HH:MM";
5
- readonly dateAndTimeFormat: "Date and time format: YYYY-MM-DD HH:MM.";
4
+ readonly hhMm: "HH:MM";
5
+ readonly dateAndTimeFormat: "Date and time format: {format}.";
6
6
  readonly dateFormatIs: "Date format: {format}.";
7
7
  readonly altAndDownArrow: "Alt and Down arrow opens the calendar.";
8
8
  readonly chooseDateFor: "Choose date for {label}";
@@ -1,10 +1,10 @@
1
1
  /** What DateField says, in the forms room (packages/kit/src/client/messages.ts says how the catalog is split). */
2
2
  import { defineMessages } from '../../../messages.js';
3
3
  export const say = defineMessages({
4
- enterADateAndTime: 'Enter a date and time as YYYY-MM-DD HH:MM within the allowed range.',
4
+ enterADateAndTime: 'Enter a date and time as {format} within the allowed range.',
5
5
  enterADateInYyyy: 'Enter a date as {format} within the allowed range.',
6
- yyyyMmDdHh: 'YYYY-MM-DD HH:MM',
7
- dateAndTimeFormat: 'Date and time format: YYYY-MM-DD HH:MM.',
6
+ hhMm: 'HH:MM',
7
+ dateAndTimeFormat: 'Date and time format: {format}.',
8
8
  dateFormatIs: 'Date format: {format}.',
9
9
  altAndDownArrow: 'Alt and Down arrow opens the calendar.',
10
10
  chooseDateFor: 'Choose date for {label}',
@@ -1,5 +1,4 @@
1
1
  export declare const say: import("../../../messages.js").RoomMessage<{
2
- readonly yyyyMmDdHh: "YYYY-MM-DD HH:MM";
3
2
  readonly fill: "Fill in {column}.";
4
3
  readonly answersNeedALook: {
5
4
  readonly one: "One answer needs another look.";
@@ -1,7 +1,6 @@
1
1
  /** What NewRecord says, in the forms room (packages/kit/src/client/messages.ts says how the catalog is split). */
2
2
  import { defineMessages } from '../../../messages.js';
3
3
  export const say = defineMessages({
4
- yyyyMmDdHh: 'YYYY-MM-DD HH:MM',
5
4
  fill: 'Fill in {column}.',
6
5
  answersNeedALook: { one: 'One answer needs another look.', other: '{count} answers need another look.' },
7
6
  fieldsNeedFixing: { one: 'One field needs fixing.', other: '{count} fields need fixing.' },
@@ -32,6 +32,7 @@ import { say } from './copy/shell/core.js';
32
32
  import { shellById, shellQuery, shellQueryAll, shellRoot } from './shellHost.js';
33
33
  import { fetchServer } from './transport.js';
34
34
  import { fileReads } from './liveReads.js';
35
+ import { sayDayLabel } from './dayLabel.js';
35
36
  export { andQuery, splitClauseTail } from '@mistriwork/engine/shared/query.js';
36
37
  export { humanName } from '@mistriwork/engine/shared/model.js';
37
38
  /* Building DOM and the popups' keyboard manners live in dom.js; re-exported
@@ -462,7 +463,7 @@ export function rowLabel(table, row) {
462
463
  for (const name of configured ? [labelPath(table)] : [labelPath(table), labelColumn(table)]) {
463
464
  const value = name != null ? row[name] : undefined;
464
465
  if (value !== null && value !== undefined && String(value) !== '')
465
- return String(value);
466
+ return sayDayLabel(value) ?? String(value);
466
467
  }
467
468
  const values = primaryKey(table).map((c) => row[c]);
468
469
  if (configured && values.some((value) => value == null))
@@ -0,0 +1,8 @@
1
+ export declare const ISO_DAY: RegExp;
2
+ /**
3
+ * A day or moment used as a row's name (a crumb, a pill, a title), said as the grid says a date: the reader's locale,
4
+ * never the stored ISO text. Absolute even in an App — a name that read "tomorrow" would not be the name it was
5
+ * yesterday. Undefined for anything that is no day, so a name or an id (a big-int one stays its string) is untouched.
6
+ * Lives outside components/ because the walk (core.js) names rows with it and may not reach into the React half.
7
+ */
8
+ export declare function sayDayLabel(value: unknown): string | undefined;
@@ -0,0 +1,18 @@
1
+ /* How a stored day or moment is named when a row is called by it: the one reading the walk (core.js) and the
2
+ React half share, kept outside components/ so the walk never reaches into it. */
3
+ import { formatDate, formatDateTime } from './locale.js';
4
+ export const ISO_DAY = /^\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}(?::?\d{2})?)?)?$/;
5
+ /**
6
+ * A day or moment used as a row's name (a crumb, a pill, a title), said as the grid says a date: the reader's locale,
7
+ * never the stored ISO text. Absolute even in an App — a name that read "tomorrow" would not be the name it was
8
+ * yesterday. Undefined for anything that is no day, so a name or an id (a big-int one stays its string) is untouched.
9
+ * Lives outside components/ because the walk (core.js) names rows with it and may not reach into the React half.
10
+ */
11
+ export function sayDayLabel(value) {
12
+ if (typeof value !== 'string')
13
+ return undefined;
14
+ const text = value.trim();
15
+ if (!ISO_DAY.test(text))
16
+ return undefined;
17
+ return /[ T]00:00(:00(\.0+)?)?$/.test(text) ? formatDate(text) : formatDateTime(text);
18
+ }
@@ -361,7 +361,7 @@ body.app-mode .page-edit { font-family: var(--sans); }
361
361
 
362
362
  /* A rootless page shows the real list as its chooser; the notice and the
363
363
  list each take the full row of the page's flex host, notice first. */
364
- .page-empty { flex: 1 1 100%; }
364
+ .page-empty { flex: 1 1 100%; text-align: center; }
365
365
  .page-root-list { flex: 1 1 100%; min-width: 0; }
366
366
 
367
367
  /* The diagram, over everything: a schema drawing is the one view that
@@ -381,7 +381,7 @@ body.app-mode .page-edit { font-family: var(--sans); }
381
381
  Everything here hangs on the 14px inset the rest of the page already
382
382
  uses — crumbs, the tab strip, the result head, the pager, the first
383
383
  cell of every row. One left edge, or the page reads as four. */
384
- .applist-head { padding: var(--space-4h) var(--space-4h) 0; }
384
+ .applist-head { padding: var(--page-top) var(--space-4h) 0; }
385
385
  .applist-head-row { display: flex; align-items: baseline; gap: var(--space-4); }
386
386
  .applist-head-row .applist-new { margin-left: auto; font-size: var(--text-sm); }
387
387
  /* Import, quiet, before New: the pair keeps New's place at the row's end. */
@@ -719,10 +719,17 @@ body.page-bare :is(.topbar, .sidebar, .sidebar-reveal, #topnav, #explain-pane) {
719
719
  body.app-mode.page-bare .content { padding-inline: 0; }
720
720
  /* The title shares the body's centered 76rem column — a head pinned to
721
721
  the pane edge over a centered grid read as two different screens. */
722
- .dash-head { margin-top: var(--space-2h); margin-bottom: var(--space-6); width: 100%; }
722
+ .dash-head { margin-top: 0; margin-bottom: var(--space-6); width: 100%; }
723
723
  .dash-head .dash-description { padding: 0; margin: var(--space-2h) 0 0; max-width: 70ch; font-size: var(--text-md); line-height: 1.5; }
724
724
  /* `head: 'compact'`: the title at a list's size on one line with its star, and the body close under it — a working
725
725
  page whose own controls are its intro. Same gutters as the full head, so switching the form moves nothing sideways. */
726
+ /* A head that carries verbs or a way back (PageHeader): the verbs go to the
727
+ far end of the title's line, the intro under both, and the way back is a
728
+ line of its own over the title. */
729
+ .applist-head.dash-head:is(.has-actions, .has-back) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2h); }
730
+ .dash-head.has-back > .dash-head-back { flex-basis: 100%; margin-left: calc(var(--space-2) * -1); }
731
+ .dash-head.has-actions > .dash-head-actions { margin-left: auto; }
732
+ .dash-head:is(.has-actions, .has-back) > .dash-description { flex-basis: 100%; margin: 0; }
726
733
  .dash-head-compact { align-items: center; gap: var(--space-2h); width: 100%; margin-bottom: var(--space-3); }
727
734
  .dash-head-compact .applist-title { margin: 0; }
728
735
  .dash-strip { border: none; padding: 0; }
@@ -1591,6 +1598,10 @@ body.app-mode .confirm:is(.insert-dialog, .command-form, .set-field-dialog) > h2
1591
1598
  .picker-input { flex: 1 1 8rem; min-width: 6rem; height: auto; border: 0; outline: none; background: none; color: var(--ink);
1592
1599
  font: inherit; padding: var(--space-1h) var(--space-1); }
1593
1600
  .picker-input::placeholder { color: var(--ink-subtle); }
1601
+ /* The magnifier of a picker that is a search box (the command form's
1602
+ reference field); the input keeps the row's rule. */
1603
+ .picker-glyph { flex: none; display: inline-flex; align-items: center; color: var(--ink-subtle); }
1604
+ .picker:focus-within > .picker-glyph { color: var(--ink-muted); }
1594
1605
  .picker-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none;
1595
1606
  color: var(--ink-muted); font-size: var(--text-md); line-height: 1; padding: var(--space-1) var(--space-2h); cursor: pointer; border-radius: var(--radius); }
1596
1607
  .picker-clear:hover { color: var(--ink); background: var(--raised); }
@@ -1753,7 +1764,7 @@ div.form-problems button {
1753
1764
  .signin { display: grid; justify-items: center; align-content: start; min-height: 70vh; padding: clamp(32px, 14vh, 140px) var(--space-5) var(--space-8); }
1754
1765
  /* One column at the optical centre (a little above the middle), 22rem wide and drawn in no box: the door is the
1755
1766
  only thing on its screen, so a frame round it framed nothing, and on a phone it never had one. The App's mark,
1756
- the heading — "Sign in to Payday" — the fields and the links share the column's left edge. */
1767
+ the heading — "Payday" — the fields and the links share the column's left edge. */
1757
1768
  .signin-card { width: min(22rem, 100%); box-sizing: border-box; display: grid; gap: var(--space-5); }
1758
1769
  /* off-scale: the door's heading is the one headline on its screen, a display size as a landing's is, over 20px. */
1759
1770
  .signin-title { margin: 0 0 var(--space-2); font: var(--heading-weight, 600) calc(28px * var(--type-k))/1.2 var(--heading-font, var(--sans)); letter-spacing: var(--track-display, -0.022em); overflow-wrap: anywhere; text-wrap: balance; }
@@ -656,6 +656,10 @@
656
656
  /* The head does not sit on the trail's rule above it: a step of the title's size (20px, four fifths), so the
657
657
  two read as two things. A room that draws the head without a trail over it (a dialog) takes it back. */
658
658
  .page-head.has-record {
659
+ margin-top: var(--page-top);
660
+ }
661
+ /* Under a trail it is the trail that stands under the bar, and the head keeps the step it always had below it. */
662
+ .page-head.has-record.has-trail {
659
663
  margin-top: var(--space-5);
660
664
  }
661
665
  /* Under an App's trail the kind is heard and not seen (PageHead.tsx): the trail already says where the record is,
@@ -1646,7 +1646,7 @@
1646
1646
  body.app-sidebar-shell #content > .applist-head:first-child {
1647
1647
  margin-top: 0;
1648
1648
  /* A step of air under the pane's bar: at the row's own 10px a list's title stood against the bar's rule. */
1649
- padding-block: var(--space-5) var(--space-3h);
1649
+ padding-block: var(--page-top) var(--space-3h);
1650
1650
  border-bottom: 1px solid var(--line);
1651
1651
  }
1652
1652
  /* The trail's bar stands on the pane it is in: on the window's ground it was a grey band across a white pane in
@@ -418,6 +418,16 @@ html[data-starting] .content.nav-holding.nav-holding-focusable > :not(.nav-held)
418
418
  color: var(--ink); font-weight: 500;
419
419
  font-family: var(--mono); padding: var(--space-1) var(--space-2);
420
420
  }
421
+ /* A trail with steps between its first and its last stays on one line, and
422
+ gives way from the middle: those steps are cut to an ellipsis first (their
423
+ whole in the browser's hover title is the walk's to give), the first, where
424
+ the trail began, and the last, where the reader is, last of all. Wrapped, a
425
+ deep walk drew a second row of crumbs. The bar's verbs and note keep their size. */
426
+ .crumbs:has(> [data-crumb='middle']) { flex-wrap: nowrap; }
427
+ .crumbs > [data-crumb='middle'] { flex: 0 100 auto; min-width: 3ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
428
+ .crumbs > [data-crumb='first'] { flex: 0 1 auto; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
429
+ .crumbs > [data-crumb='last'] { flex: 0 1 auto; min-width: 6ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
430
+ .crumbs:has(> [data-crumb='middle']) > :is(.sep, .crumb-home, .crumb-back, .crumb-tools, .crumb-note) { flex: none; }
421
431
  /* On a phone a record's name is wider than the bar: wrapped, it left the
422
432
  house and its chevron alone on the first line. It takes the rest of the
423
433
  line and ends in an ellipsis; the page's own heading says it in full. */
@@ -3317,24 +3327,29 @@ tr.expanded > td { border-bottom-color: transparent; background: var(--accent-so
3317
3327
  .tenant-chooser-retry { margin-top: 20px; }
3318
3328
  .tenant-chooser button:disabled, .tenant-chooser-actions button:disabled, .tenant-control-trigger:disabled { cursor: default; opacity: 0.6; }
3319
3329
  .tenant-control { display: inline-flex; min-width: 0; }
3320
- .tenant-control-trigger { display: inline-flex; align-items: center; gap: var(--space-2h); max-width: 16rem; }
3330
+ /* A long name is cut to the bar's room, not to a fixed 16rem that cut
3331
+ ordinary ones; its whole is the button's title. */
3332
+ .tenant-control-trigger { display: inline-flex; align-items: center; gap: var(--space-2h); max-width: min(24rem, 100%); min-width: 0; }
3321
3333
  .tenant-control-trigger > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3322
3334
  .tenant-control-trigger > :last-child { flex: none; }
3335
+ /* The names scroll and the foot stays: a list of many tenants carried the
3336
+ foot off the bottom of the dialog. */
3323
3337
  .tenant-chooser-dialog {
3324
- width: min(36rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
3338
+ width: min(36rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: hidden;
3339
+ display: flex; flex-direction: column;
3325
3340
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
3326
3341
  border-radius: var(--radius); box-shadow: var(--shadow-modal);
3327
3342
  }
3328
3343
  [data-slot='dialog-backdrop'][data-for='tenant-chooser-dialog'] { background: var(--scrim); }
3329
- .tenant-chooser-dialog .tenant-chooser { margin: 0; }
3330
- .tenant-chooser-actions { display: flex; justify-content: flex-end; padding: 0 var(--space-6) var(--space-6); }
3344
+ .tenant-chooser-dialog .tenant-chooser { margin: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
3345
+ .tenant-chooser-actions { display: flex; flex: none; justify-content: flex-end; padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); }
3331
3346
  /* What the bar offers beside the control is the dialog's too, and only on a
3332
3347
  phone, where the bar is the one row design.md gives it and the control is
3333
3348
  the account menu's. */
3334
3349
  .tenant-chooser-elsewhere { display: none; }
3335
3350
  @media (max-width: 700px) {
3336
3351
  .tenant-chooser { margin: 20px auto; padding: 20px var(--space-4h); }
3337
- .tenant-chooser-actions { flex-wrap: wrap; gap: var(--space-3); padding: 0 var(--space-4h) 20px; }
3352
+ .tenant-chooser-actions { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3h) var(--space-4h); }
3338
3353
  .tenant-chooser-elsewhere { display: inline-flex; margin-right: auto; }
3339
3354
  }
3340
3355
  .workspace-opening { margin: 0; padding: 40px var(--space-6); color: var(--ink-muted); }
@@ -176,7 +176,6 @@
176
176
  :root[data-visual-theme] .crumbs { flex: none; min-height: 51px; padding-block: var(--space-3h); background: var(--ground); z-index: 5; isolation: isolate; }
177
177
  :root[data-visual-theme] .app-mode .crumbs > :is(button, .current) { font-family: var(--sans); font-size: var(--text-sm); }
178
178
  :root[data-visual-theme] .app-mode .crumbs .current { font-weight: 600; }
179
- :root[data-visual-theme] .applist-head { padding-top: var(--space-6); }
180
179
  /* A head holding only the hidden heading (a room that draws its own title) takes no room: the heading stays for assistive tech, the band above the room goes. */
181
180
  :root[data-visual-theme] .applist-head.dash-head:has(> .applist-title.visually-hidden:only-child) { margin: 0; padding: 0; min-height: 0; }
182
181
  :root[data-visual-theme] .applist-head-row { align-items: center; }
@@ -361,7 +360,6 @@
361
360
  :root[data-visual-theme] body.app-topnav .topbar { padding-block: var(--space-2); }
362
361
  :root[data-visual-theme] body.app-topnav .topbar:not([data-header-width="content"]) { padding-inline: var(--space-5); }
363
362
  :root[data-visual-theme] .brand-name { font-size: calc(18px * var(--type-k)); }
364
- :root[data-visual-theme] .applist-head { padding-top: var(--space-5); }
365
363
  :root[data-visual-theme] .dash-strip .home-cards { gap: var(--space-4) 20px; }
366
364
  :root[data-visual-theme] .dash-strip .home-card { padding-block: var(--space-4); }
367
365
  :root[data-visual-theme] .home-card-value { font-size: calc(26px * var(--type-k)); }
@@ -33,6 +33,7 @@ const SHEET_TOKENS = [
33
33
  '--control-h',
34
34
  '--section-seam',
35
35
  '--page-head-gap',
36
+ '--page-top',
36
37
  '--page-measure',
37
38
  '--room-inset',
38
39
  '--row-h',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mistriwork/kit",
3
- "version": "1.0.0-rc.62",
3
+ "version": "1.0.0-rc.63",
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": {
@@ -57,6 +57,7 @@
57
57
  "./client/messages.js": "./dist/client/messages.js",
58
58
  "./client/page.js": "./dist/client/page.js",
59
59
  "./client/palette.js": "./dist/client/palette.js",
60
+ "./client/paletteRecents.js": "./dist/client/paletteRecents.js",
60
61
  "./client/peek.js": "./dist/client/peek.js",
61
62
  "./client/peekpanel.js": "./dist/client/peekpanel.js",
62
63
  "./client/prompt.js": "./dist/client/prompt.js",
@@ -84,8 +85,8 @@
84
85
  "./package.json": "./package.json"
85
86
  },
86
87
  "dependencies": {
87
- "@mistriwork/engine": "1.0.0-rc.62",
88
- "@mistriwork/ui": "1.0.0-rc.62",
88
+ "@mistriwork/engine": "1.0.0-rc.63",
89
+ "@mistriwork/ui": "1.0.0-rc.63",
89
90
  "intl-messageformat": "12.1.2",
90
91
  "qrcode-generator": "^2.0.4"
91
92
  },