@mistriwork/kit 1.0.0-rc.57 → 1.0.0-rc.59

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 (158) hide show
  1. package/dist/client/app.js +14 -2
  2. package/dist/client/audience.d.ts +1 -0
  3. package/dist/client/audience.js +10 -0
  4. package/dist/client/brandLook.css +49 -1
  5. package/dist/client/components/AppColumnMenuPopups.js +41 -11
  6. package/dist/client/components/AppList.d.ts +3 -1
  7. package/dist/client/components/AppList.js +77 -15
  8. package/dist/client/components/CardsList.js +14 -1
  9. package/dist/client/components/Chart.css +4 -0
  10. package/dist/client/components/Chart.d.ts +4 -4
  11. package/dist/client/components/Chart.js +30 -9
  12. package/dist/client/components/Content.js +3 -1
  13. package/dist/client/components/DateField.css +1 -1
  14. package/dist/client/components/DateField.js +1 -0
  15. package/dist/client/components/DefinedFields.js +2 -2
  16. package/dist/client/components/Diagram.css +82 -0
  17. package/dist/client/components/Diagram.d.ts +1 -0
  18. package/dist/client/components/Diagram.js +1 -0
  19. package/dist/client/components/Dressed.js +1 -1
  20. package/dist/client/components/Editable.js +7 -3
  21. package/dist/client/components/Export.js +1 -1
  22. package/dist/client/components/FilterBoxes.js +2 -2
  23. package/dist/client/components/FilterRail.css +1 -1
  24. package/dist/client/components/FilterRail.js +6 -4
  25. package/dist/client/components/Gallery.css +171 -0
  26. package/dist/client/components/Gallery.d.ts +1 -0
  27. package/dist/client/components/Gallery.js +1 -0
  28. package/dist/client/components/Grid.d.ts +2 -1
  29. package/dist/client/components/Grid.js +78 -24
  30. package/dist/client/components/GridCellEditor.js +4 -2
  31. package/dist/client/components/GridSelection.d.ts +4 -1
  32. package/dist/client/components/GridSelection.js +20 -3
  33. package/dist/client/components/LandingSurface.css +2 -2
  34. package/dist/client/components/LayoutBuilder.css +225 -0
  35. package/dist/client/components/LayoutBuilder.d.ts +1 -0
  36. package/dist/client/components/LayoutBuilder.js +1 -0
  37. package/dist/client/components/ListColumns.d.ts +12 -0
  38. package/dist/client/components/ListColumns.js +61 -0
  39. package/dist/client/components/ListFilterBar.css +39 -14
  40. package/dist/client/components/ListFilterBar.js +39 -23
  41. package/dist/client/components/MultiStepForm.css +22 -22
  42. package/dist/client/components/NewRecord.js +120 -104
  43. package/dist/client/components/Notes.css +9 -0
  44. package/dist/client/components/Notes.d.ts +6 -2
  45. package/dist/client/components/Notes.js +10 -6
  46. package/dist/client/components/OverflowMenu.js +16 -11
  47. package/dist/client/components/PageFields.js +19 -4
  48. package/dist/client/components/PageRelated.d.ts +8 -1
  49. package/dist/client/components/PageRelated.js +46 -33
  50. package/dist/client/components/PageSections.js +18 -5
  51. package/dist/client/components/Palette.js +1 -1
  52. package/dist/client/components/Prefs.d.ts +10 -0
  53. package/dist/client/components/Prefs.js +33 -23
  54. package/dist/client/components/PresentationSwitch.js +4 -0
  55. package/dist/client/components/Prompt.js +4 -4
  56. package/dist/client/components/RecordGone.js +4 -4
  57. package/dist/client/components/RecordPicker.js +24 -6
  58. package/dist/client/components/RecordSummaries.js +31 -5
  59. package/dist/client/components/RecordTrailNav.js +4 -0
  60. package/dist/client/components/RichTextEditor.css +2 -2
  61. package/dist/client/components/RichTextEditor.js +18 -19
  62. package/dist/client/components/Rooms.js +22 -4
  63. package/dist/client/components/SectionPeriod.css +1 -1
  64. package/dist/client/components/SetFieldDialog.js +1 -1
  65. package/dist/client/components/Sidebar.js +8 -5
  66. package/dist/client/components/SuggestBox.js +2 -2
  67. package/dist/client/components/TableRoom.d.ts +5 -1
  68. package/dist/client/components/TableRoom.js +29 -10
  69. package/dist/client/components/TableView.js +1 -1
  70. package/dist/client/components/ThMenu.js +26 -15
  71. package/dist/client/components/Tour.css +96 -0
  72. package/dist/client/components/Tour.d.ts +1 -0
  73. package/dist/client/components/Tour.js +1 -0
  74. package/dist/client/components/TreePicker.css +1 -1
  75. package/dist/client/components/TreePicker.js +27 -20
  76. package/dist/client/components/Value.js +4 -1
  77. package/dist/client/components/WorkflowStatus.js +8 -4
  78. package/dist/client/components/appListModel.d.ts +4 -0
  79. package/dist/client/components/appRooms.d.ts +2 -0
  80. package/dist/client/components/appRooms.js +2 -0
  81. package/dist/client/components/boardNew.d.ts +5 -0
  82. package/dist/client/components/boardNew.js +5 -0
  83. package/dist/client/components/conditionWords.d.ts +10 -0
  84. package/dist/client/components/conditionWords.js +20 -0
  85. package/dist/client/components/dashboardModel.d.ts +8 -0
  86. package/dist/client/components/dashboardModel.js +28 -1
  87. package/dist/client/components/editInteraction.d.ts +1 -1
  88. package/dist/client/components/editInteraction.js +1 -1
  89. package/dist/client/components/gridSizing.d.ts +14 -20
  90. package/dist/client/components/gridSizing.js +147 -108
  91. package/dist/client/components/pageContext.d.ts +3 -2
  92. package/dist/client/components/pageModel.d.ts +2 -0
  93. package/dist/client/components/pickerStaleness.d.ts +11 -1
  94. package/dist/client/components/pickerStaleness.js +12 -2
  95. package/dist/client/components/rowTitle.d.ts +2 -0
  96. package/dist/client/components/rowTitle.js +10 -0
  97. package/dist/client/components/textMeasure.js +72 -3
  98. package/dist/client/components/useConditionWords.d.ts +5 -0
  99. package/dist/client/components/useConditionWords.js +3 -1
  100. package/dist/client/components/useGridKeyboard.js +5 -0
  101. package/dist/client/components/valueModel.d.ts +1 -0
  102. package/dist/client/components/valueModel.js +39 -4
  103. package/dist/client/composer.css +2 -2
  104. package/dist/client/copy/es.js +3 -3
  105. package/dist/client/copy/filters/components/ListFilterBar.d.ts +1 -0
  106. package/dist/client/copy/filters/components/ListFilterBar.js +1 -0
  107. package/dist/client/copy/forms/components/DateField.d.ts +2 -0
  108. package/dist/client/copy/forms/components/DateField.js +2 -0
  109. package/dist/client/copy/forms/components/NewRecord.d.ts +8 -0
  110. package/dist/client/copy/forms/components/NewRecord.js +2 -0
  111. package/dist/client/copy/lists/components/AppList.d.ts +2 -0
  112. package/dist/client/copy/lists/components/AppList.js +2 -0
  113. package/dist/client/copy/lists/components/GridSelection.d.ts +1 -0
  114. package/dist/client/copy/lists/components/GridSelection.js +1 -0
  115. package/dist/client/copy/lists/components/ListColumns.d.ts +5 -0
  116. package/dist/client/copy/lists/components/ListColumns.js +7 -0
  117. package/dist/client/copy/lists/components/TableRoom.d.ts +3 -1
  118. package/dist/client/copy/lists/components/TableRoom.js +3 -1
  119. package/dist/client/copy/record/components/PageHistory.d.ts +2 -2
  120. package/dist/client/copy/record/components/PageHistory.js +4 -2
  121. package/dist/client/copy/record/components/WorkflowStatus.d.ts +1 -0
  122. package/dist/client/copy/record/components/WorkflowStatus.js +1 -0
  123. package/dist/client/copy/shell/components/MobileNavDrawer.d.ts +1 -0
  124. package/dist/client/copy/shell/components/MobileNavDrawer.js +2 -0
  125. package/dist/client/customThemes.css +3 -3
  126. package/dist/client/dom.js +5 -5
  127. package/dist/client/features.css +216 -356
  128. package/dist/client/fonts/Manrope-OFL.txt +93 -0
  129. package/dist/client/fonts/faces.css +10 -1
  130. package/dist/client/fonts/manrope-latin.woff2 +0 -0
  131. package/dist/client/formControls.css +4 -4
  132. package/dist/client/help.css +2 -2
  133. package/dist/client/ledgerLook.css +28 -0
  134. package/dist/client/locale.d.ts +2 -10
  135. package/dist/client/locale.js +0 -0
  136. package/dist/client/lumenLook.css +295 -105
  137. package/dist/client/manropeFace.css +32 -0
  138. package/dist/client/messages.d.ts +3 -3
  139. package/dist/client/messages.js +3 -3
  140. package/dist/client/page.css +98 -354
  141. package/dist/client/palette.js +31 -6
  142. package/dist/client/partsLook.css +60 -60
  143. package/dist/client/sageLook.css +101 -32
  144. package/dist/client/shellHost.d.ts +2 -2
  145. package/dist/client/shellHost.js +2 -2
  146. package/dist/client/shellMode.d.ts +9 -0
  147. package/dist/client/shellMode.js +2 -0
  148. package/dist/client/structure.css +281 -201
  149. package/dist/client/style.css +75 -224
  150. package/dist/client/themeFamilies.css +471 -66
  151. package/dist/client/tilesLook.css +502 -0
  152. package/dist/client/visualTheme.js +5 -2
  153. package/dist/client/visualThemes.css +38 -34
  154. package/dist/client/workbenchLook.css +12 -12
  155. package/dist/client/workshopLook.css +3 -8
  156. package/dist/vite.d.ts +1 -20
  157. package/dist/vite.js +33 -3
  158. package/package.json +8 -7
@@ -2,5 +2,5 @@
2
2
  @mistriwork/ui's (packages/ui/src/primitives.css). */
3
3
  @layer base {
4
4
  /* A calendar is a popup like the others (docs/design.md, Shape); the database browser keeps the flat, rounder one it had. */
5
- :where(:root:not([data-visual-theme])) .date-field-popup { border-radius: var(--radius-lg); box-shadow: none; }
5
+ :where(:root:not([data-visual-theme])) [data-slot='popover-content'][data-kind='calendar'] { border-radius: var(--radius-lg); box-shadow: none; }
6
6
  }
@@ -21,6 +21,7 @@ const words = () => ({
21
21
  nextMonth: say('nextMonth'),
22
22
  clear: say('common.clear'),
23
23
  today: say('common.today'),
24
+ time: (label) => (label ? say('timeFor', { label }) : say('time')),
24
25
  });
25
26
  /** A date field, or a date and a wall-clock time. No input is parsed as an instant or shifted by a timezone. */
26
27
  export function DateField(props) {
@@ -144,10 +144,10 @@ export function DefinedInputs({ column, binding, per, value, onChange, errors, c
144
144
  multiline: field.type === 'textarea',
145
145
  money: field.type === 'money',
146
146
  });
147
- return (_jsxs("div", { className: `insert-field form-field${error ? ' missing is-invalid' : ''}`, children: [_jsxs("label", { className: "form-field-label", children: [field.label, field.required && _jsx("span", { className: "req", children: "*" })] }), field.type === 'choices' ? (_jsx("div", { className: "command-choices insert-choices", role: "group", "aria-label": field.label, children: field.options.map((option) => {
147
+ return (_jsxs("div", { "data-slot": "field", "data-invalid": error ? '' : undefined, className: `insert-field${error ? ' missing' : ''}`, children: [_jsxs("label", { "data-slot": "field-label", children: [field.label, field.required && _jsx("span", { className: "req", children: "*" })] }), field.type === 'choices' ? (_jsx("div", { className: "command-choices insert-choices", role: "group", "aria-label": field.label, children: field.options.map((option) => {
148
148
  const chosen = text.split(',').map((item) => item.trim());
149
149
  return (_jsxs("label", { className: "command-choice", children: [_jsx("input", { type: "checkbox", checked: chosen.includes(option), onChange: (event) => set(field, field.options.filter((item) => (item === option ? event.target.checked : chosen.includes(item))).join(', ')) }), option] }, option));
150
- }) })) : (_jsx(Control, { column: meta, app: true, required: field.required, assigned: null, spoken: field.label, target: () => undefined, value: text, kind: kind, onChange: (next) => set(field, next), register: () => { }, explicitNull: false, errorId: error ? errorId : undefined, helpId: helpId })), field.help && (_jsx("p", { id: helpId, className: "form-field-hint", children: field.help })), _jsx("span", { id: errorId, className: "insert-missing", "aria-live": "polite", hidden: !error, children: error })] }, field.key));
150
+ }) })) : (_jsx(Control, { column: meta, app: true, required: field.required, assigned: null, spoken: field.label, target: () => undefined, value: text, kind: kind, onChange: (next) => set(field, next), register: () => { }, explicitNull: false, errorId: error ? errorId : undefined, helpId: helpId })), field.help && (_jsx("p", { id: helpId, "data-slot": "field-description", children: field.help })), _jsx("span", { id: errorId, className: "insert-missing", "aria-live": "polite", hidden: !error, children: error })] }, field.key));
151
151
  }) }));
152
152
  }
153
153
  /* The facet a field is asked with: a choice is a checklist of its options, a
@@ -0,0 +1,82 @@
1
+ /* What dresses the schema and neighbourhood diagrams. These rules match nothing else, so they travel with the component's chunk and are not in
2
+ every first paint (scripts/bundle-budget.mjs); each keeps the layer it stood in. */
3
+ @layer base {
4
+ /* A window onto a drawing larger than the window.
5
+
6
+ Given a height rather than left to size to its content: a viewport that
7
+ grows with its content is not a viewport, and the whole point is that the
8
+ picture can be bigger than the space it is read in. */
9
+ .diagram-viewport {
10
+ position: relative;
11
+ height: min(72vh, 760px);
12
+ border: 1px solid var(--line);
13
+ border-radius: var(--radius-panel);
14
+ background: var(--ground);
15
+ overflow: hidden;
16
+ cursor: grab;
17
+ touch-action: none;
18
+ }
19
+ .diagram-viewport.dragging { cursor: grabbing; }
20
+ .diagram-viewport svg { display: block; }
21
+ .zoom-controls {
22
+ position: absolute; right: 10px; bottom: 10px;
23
+ display: flex; align-items: center; gap: var(--space-2);
24
+ padding: var(--space-2); border-radius: min(7px, var(--radius-pop));
25
+ background: var(--surface); border: 1px solid var(--line);
26
+ box-shadow: var(--shadow-pop);
27
+ }
28
+ .zoom-controls button { padding: var(--space-1) var(--space-3); font-size: var(--text-sm); }
29
+ .zoom-readout {
30
+ min-width: 3.4rem; text-align: center;
31
+ font: var(--text-xs) var(--mono); color: var(--ink-muted);
32
+ font-variant-numeric: tabular-nums;
33
+ }
34
+ .diagram-head {
35
+ display: flex; align-items: center; gap: var(--space-4h); flex-wrap: wrap;
36
+ margin-bottom: var(--space-4);
37
+ }
38
+ .diagram-head .diagram-title { margin: 0; }
39
+ .diagram-focus {
40
+ display: flex; align-items: center; gap: var(--space-2h);
41
+ margin-left: auto; justify-content: flex-end;
42
+ /* wrap-reverse so an overflowing row of chips grows upwards. Plain `wrap`
43
+ would push the field itself onto a second line, which is the same
44
+ moving-target problem in the other axis. */
45
+ flex-wrap: wrap-reverse;
46
+ }
47
+ .diagram-focus .picker { flex: none; }
48
+ .diagram-chip {
49
+ display: inline-flex; align-items: center; gap: var(--space-2h);
50
+ padding: var(--space-2) var(--space-3); border-radius: 999px;
51
+ border: 1px solid var(--accent); background: var(--accent-soft);
52
+ color: var(--accent-ink); font: var(--text-xs) var(--mono); cursor: pointer;
53
+ }
54
+ .diagram-chip .chip-x { opacity: 0.6; }
55
+ .diagram-chip:hover .chip-x { opacity: 1; }
56
+ .diagram-clear { font-size: var(--text-xs); }
57
+ .node-head { cursor: pointer; }
58
+ .node-head-hit { fill: transparent; stroke: none; }
59
+ .node-head:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
60
+ .node-focus .node-head text { fill: var(--accent); }
61
+ .node-head text { font-weight: 600; }
62
+ /* The column list. Quieter than the table name it sits under — it is there to
63
+ be scanned for a name you already have in mind, not read top to bottom. */
64
+ .node-rule { stroke: var(--line); stroke-width: 1; }
65
+ .node-field { font-size: var(--text-xs); fill: var(--ink-muted); }
66
+ .node-field.is-key { fill: var(--ink); }
67
+ .node-field.is-ref { fill: var(--accent); }
68
+ .node-type { font-size: var(--text-xs); fill: var(--ink-subtle); }
69
+ .node-more { cursor: pointer; }
70
+ .node-more-hit { fill: transparent; stroke: none; }
71
+ .node-more text { font-size: var(--text-xs); fill: var(--ink-subtle); }
72
+ .node-more:hover text { fill: var(--accent); }
73
+ .node-more:hover .node-more-hit { fill: var(--accent-soft); }
74
+ .node-more:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 1px; }
75
+ .edge-head { fill: var(--line-strong); }
76
+ .edge-label { font: var(--text-xs) var(--mono); fill: var(--ink-muted); }
77
+ .diagram-legend { margin: var(--space-4) 0 0; font-size: var(--text-xs); color: var(--ink-subtle); font-family: var(--mono); }
78
+ .diagram-legend span { color: var(--ink-muted); }
79
+ .diagram-title { margin: 0 0 var(--space-4h); font: 600 var(--text-lg) var(--mono); letter-spacing: -0.01em; }
80
+ .schema-edges path.dim { opacity: 0.1; }
81
+ .diagram-scope { font-size: var(--text-xs); padding: 1px var(--space-3); }
82
+ }
@@ -1,3 +1,4 @@
1
+ import './Diagram.css';
1
2
  export declare function NeighbourhoodDiagram({ tableId, expandable }: {
2
3
  tableId: string;
3
4
  expandable?: boolean;
@@ -15,6 +15,7 @@ import { SchemaExportControl } from './SchemaExport.js';
15
15
  import { formatNumber } from '../locale.js';
16
16
  import { say } from '../copy/workbench/components/Diagram.js';
17
17
  import { addHostListener, portalRoot, removeHostListener } from '../shellHost.js';
18
+ import './Diagram.css';
18
19
  /* Session state that a repaint must not forget: which nodes the reader has
19
20
  opened, which tables the overview is limited to, and whether they asked for
20
21
  the whole picture despite its density. */
@@ -70,7 +70,7 @@ export const Dressed = memo(function Dressed({ dress, compact = false }) {
70
70
  case 'date':
71
71
  return (_jsx("span", { className: "date-value", title: dress.title, children: dress.text }));
72
72
  case 'relative':
73
- return (_jsx("span", { className: `date-value relative${dress.overdue ? ' overdue' : ''}`, title: dress.title, children: dress.text }));
73
+ return (_jsx("span", { className: `date-value relative${dress.overdue ? ' overdue' : ''}`, title: dress.title, "data-date": dress.date, children: dress.text }));
74
74
  case 'avatar':
75
75
  return _jsx(AvatarText, { text: dress.text, photo: dress.photo });
76
76
  /* The names are the text, for every reader; the discs and the count are what a glance takes in. */
@@ -103,7 +103,7 @@ export function Editable({ table, row, column, recordKey, onSaved, app = false,
103
103
  const control = node instanceof HTMLInputElement
104
104
  ? node
105
105
  : node instanceof HTMLDivElement
106
- ? node.querySelector('input.date-field-input')
106
+ ? node.querySelector('[data-slot="date-field"] > input[data-slot="input"]')
107
107
  : null;
108
108
  return {
109
109
  unresolvedReference: unresolved.current,
@@ -137,7 +137,9 @@ export function Editable({ table, row, column, recordKey, onSaved, app = false,
137
137
  // description token, on the actual focusable control, for both renderers.
138
138
  useLayoutEffect(() => {
139
139
  const node = input.current;
140
- const control = node instanceof HTMLInputElement || node instanceof HTMLSelectElement ? node : node?.querySelector('input, .dd-button');
140
+ const control = node instanceof HTMLInputElement || node instanceof HTMLSelectElement
141
+ ? node
142
+ : node?.querySelector('input, [data-slot="select-trigger"]');
141
143
  if (!control || !error)
142
144
  return;
143
145
  const described = control.getAttribute('aria-describedby')?.split(/\s+/).filter(Boolean) ?? [];
@@ -165,7 +167,9 @@ export function Editable({ table, row, column, recordKey, onSaved, app = false,
165
167
  const node = input.current;
166
168
  if (!error || !node || !takeFieldFocus(table.id, recordKey, column.name))
167
169
  return;
168
- const control = node instanceof HTMLInputElement || node instanceof HTMLSelectElement ? node : node.querySelector('input, .dd-button');
170
+ const control = node instanceof HTMLInputElement || node instanceof HTMLSelectElement
171
+ ? node
172
+ : node.querySelector('input, [data-slot="select-trigger"]');
169
173
  control?.focus();
170
174
  });
171
175
  useLayoutEffect(() => {
@@ -92,7 +92,7 @@ export function ExportControl({ entry, data }) {
92
92
  const pageLabel = say('thisPageRows', { count: pageRows.length });
93
93
  /* Every row: the server streams the file with no ceiling (exportRoute.ts); only its fallback stops at the cap. */
94
94
  const allLabel = say('allMatchingRows', { count: formatNumber(total) });
95
- return (_jsxs(_Fragment, { children: [_jsxs(DropMenu, { className: "export", triggerClassName: "export-summary", triggerTitle: say('downloadThisResult'), label: _jsxs(_Fragment, { children: [_jsx("span", { className: "export-word", children: say('export') }), _jsx("span", { className: "export-more", "aria-hidden": "true", children: "\u22EF" })] }), popupClassName: "export-menu", open: open, onOpenChange: setOpen, children: [_jsx("div", { className: "export-group", children: _jsxs(DropItem, { className: "export-item export-columns-item", onClick: () => setChoosing(true), children: [_jsx("span", { children: say('chooseColumns') }), _jsx("span", { className: "export-count", children: declared.length ? say('selectedOfDeclared', { selected: selected.length, declared: declared.length }) : `${selected.length}` })] }) }), kinds.map((kind) => (_jsxs("div", { className: "export-group", children: [_jsx("span", { className: "export-kind", children: kind.toUpperCase() }), _jsx(DropItem, { className: "export-item", disabled: busy === `${kind}:false`, closeOnClick: false, onClick: () => void deliver(kind, false), children: busy === `${kind}:false` ? say('fetching') : pageLabel }), total > pageRows.length && (_jsx(DropItem, { className: "export-item", disabled: busy === `${kind}:true`, closeOnClick: false, onClick: () => void deliver(kind, true), children: busy === `${kind}:true` ? say('fetching') : allLabel }))] }, kind))), workbench && (_jsxs("div", { className: "export-group", children: [_jsx("span", { className: "export-kind", children: say('agent') }), _jsx(DropItem, { className: "export-item", title: say('theQueryTheShape'), onClick: () => void copyPosition(positionOf(state, entry, { columns: displayed, shown: pageRows.length, total }), toast), children: say('copyThisPosition') })] })), total > EXPORT_MAX_ROWS && _jsx("p", { className: "export-note", children: say('streamedPastTheCap') })] }), choosing && (_jsx(ColumnChooser, { tableId: data.table, displayed: displayed, declared: declared, selected: selected, onClose: () => setChoosing(false), onDone: (picked) => {
95
+ return (_jsxs(_Fragment, { children: [_jsxs(DropMenu, { className: "export", triggerClassName: "export-summary", triggerTitle: say('downloadThisResult'), label: _jsxs(_Fragment, { children: [!workbench && (_jsx("svg", { className: "applist-verb-mark", viewBox: "0 0 16 16", width: "16", height: "16", "aria-hidden": "true", children: _jsx("path", { d: "M8 2.5v8M5 7.5l3 3 3-3M2.5 10v3.5h11V10", fill: "none", stroke: "currentColor", strokeWidth: "1.4" }) })), _jsx("span", { className: "export-word", children: say('export') }), _jsx("span", { className: "export-more", "aria-hidden": "true", children: "\u22EF" })] }), popupClassName: "export-menu", open: open, onOpenChange: setOpen, children: [_jsx("div", { className: "export-group", children: _jsxs(DropItem, { className: "export-item export-columns-item", onClick: () => setChoosing(true), children: [_jsx("span", { children: say('chooseColumns') }), _jsx("span", { className: "export-count", children: declared.length ? say('selectedOfDeclared', { selected: selected.length, declared: declared.length }) : `${selected.length}` })] }) }), kinds.map((kind) => (_jsxs("div", { className: "export-group", children: [_jsx("span", { className: "export-kind", children: kind.toUpperCase() }), _jsx(DropItem, { className: "export-item", disabled: busy === `${kind}:false`, closeOnClick: false, onClick: () => void deliver(kind, false), children: busy === `${kind}:false` ? say('fetching') : pageLabel }), total > pageRows.length && (_jsx(DropItem, { className: "export-item", disabled: busy === `${kind}:true`, closeOnClick: false, onClick: () => void deliver(kind, true), children: busy === `${kind}:true` ? say('fetching') : allLabel }))] }, kind))), workbench && (_jsxs("div", { className: "export-group", children: [_jsx("span", { className: "export-kind", children: say('agent') }), _jsx(DropItem, { className: "export-item", title: say('theQueryTheShape'), onClick: () => void copyPosition(positionOf(state, entry, { columns: displayed, shown: pageRows.length, total }), toast), children: say('copyThisPosition') })] })), total > EXPORT_MAX_ROWS && _jsx("p", { className: "export-note", children: say('streamedPastTheCap') })] }), choosing && (_jsx(ColumnChooser, { tableId: data.table, displayed: displayed, declared: declared, selected: selected, onClose: () => setChoosing(false), onDone: (picked) => {
96
96
  rememberColumns(data.table, picked);
97
97
  tick((n) => n + 1);
98
98
  } }))] }));
@@ -250,14 +250,14 @@ export function RefBox({ box, tail, edit, onEdit, onSubmit, startOpen = false, p
250
250
  setOpen(false);
251
251
  queueMicrotask(onSubmit);
252
252
  };
253
- return (_jsx(_Fragment, { children: _jsx(Typeahead, { text: raw, onText: (next) => onEdit({ raw: next, id: null }), open: open, onOpenChange: setOpen, items: options, itemKey: (item) => String(item.id), itemLabel: (item) => item.label, itemClassName: (_item, highlighted) => `dd-option${highlighted ? ' active' : ''}`, renderItem: (item) => (_jsxs("span", { className: "dd-text", children: [_jsx("span", { className: "dd-label", children: item.label }), appReader ? null : _jsx("span", { className: "dd-detail", children: String(item.id) })] })), onPick: pick, inputProps: {
253
+ return (_jsx(_Fragment, { children: _jsx(Typeahead, { text: raw, onText: (next) => onEdit({ raw: next, id: null }), open: open, onOpenChange: setOpen, items: options, itemKey: (item) => String(item.id), itemLabel: (item) => item.label, itemClassName: () => '', renderItem: (item) => (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "option-label", children: item.label }), appReader ? null : _jsx("span", { "data-slot": "option-detail", children: String(item.id) })] })), onPick: pick, inputProps: {
254
254
  type: 'text',
255
255
  className: 'applist-quick applist-quick-text',
256
256
  'aria-label': say('common.filter2', { label: box.label }),
257
257
  title: chosenId && (!edit || edit.id != null) && !appReader
258
258
  ? `${box.column} = ${chosenId}`
259
259
  : say('typeANameAndPick', { name: target?.name ?? '' }),
260
- }, popupClassName: "dd-popup", listClassName: "dd-list", empty: empty, emptyClassName: "picker-empty", portal: portal }) }));
260
+ }, popupClassName: "", listClassName: "", empty: empty, emptyClassName: "picker-empty", portal: portal }) }));
261
261
  }
262
262
  /**
263
263
  * The workbench's mount: the same boxes over the plain table view. No tabs
@@ -34,7 +34,7 @@
34
34
  /* The rarer conditions: a quiet disclosure under the facet's own control, its
35
35
  box under the choice that asks for text, in line with the choice's words. */
36
36
  .facet-more-conditions > .facet-values { margin-top: var(--space-2h); }
37
- .facet-more-conditions .form-field { margin: var(--space-1) 0 var(--space-2) var(--space-6); }
37
+ .facet-more-conditions [data-slot='field'] { margin: var(--space-1) 0 var(--space-2) var(--space-6); }
38
38
 
39
39
  .facet { position: relative; min-width: 0; margin: 0; padding: var(--space-4) 0; border: 0; border-top: 1px solid var(--line); }
40
40
  /* Floated, a legend is laid out as any child: a rendered legend sits in the
@@ -166,7 +166,7 @@ function MoreConditions({ box, tail, set, onEnter, facet, }) {
166
166
  if (next && next !== tail)
167
167
  set(next);
168
168
  };
169
- return (_jsxs("div", { className: "facet-more-conditions", children: [_jsx("button", { type: "button", className: "facet-more", "aria-expanded": open, "aria-controls": id, onClick: () => setOpen(!open), children: say('moreConditions') }), open && (_jsx("div", { id: id, role: "group", "aria-label": say('moreConditionsOn', { label: box.label }), className: "facet-values", children: offered.map((condition) => (_jsxs(Fragment, { children: [_jsxs("label", { className: "facet-option", children: [_jsx("input", { type: "radio", name: id, "data-value": condition, checked: picked === condition, onChange: () => choose(condition) }), _jsx("span", { className: "facet-option-label", children: MORE_LABELS[condition] })] }), takesText(condition) && picked === condition && (_jsx("div", { className: "form-field form-field-compact", children: _jsx("input", { ref: box$, type: "text", className: "field-control facet-input", "aria-label": MORE_LABELS[condition], "data-value": `${condition}-text`, value: text, placeholder: condition === 'like' ? say('common.patternEGWh') : say('text'), title: condition === 'like' ? say('standsForAnyRun') : undefined, onChange: (e) => setText(e.target.value), onBlur: commit, onKeyDown: (e) => {
169
+ return (_jsxs("div", { className: "facet-more-conditions", children: [_jsx("button", { type: "button", className: "facet-more", "aria-expanded": open, "aria-controls": id, onClick: () => setOpen(!open), children: say('moreConditions') }), open && (_jsx("div", { id: id, role: "group", "aria-label": say('moreConditionsOn', { label: box.label }), className: "facet-values", children: offered.map((condition) => (_jsxs(Fragment, { children: [_jsxs("label", { className: "facet-option", children: [_jsx("input", { type: "radio", name: id, "data-value": condition, checked: picked === condition, onChange: () => choose(condition) }), _jsx("span", { className: "facet-option-label", children: MORE_LABELS[condition] })] }), takesText(condition) && picked === condition && (_jsx("div", { "data-slot": "field", "data-size": "compact", children: _jsx("input", { ref: box$, type: "text", "data-slot": "input", className: "facet-input", "aria-label": MORE_LABELS[condition], "data-value": `${condition}-text`, value: text, placeholder: condition === 'like' ? say('common.patternEGWh') : say('text'), title: condition === 'like' ? say('standsForAnyRun') : undefined, onChange: (e) => setText(e.target.value), onBlur: commit, onKeyDown: (e) => {
170
170
  if (e.key === 'Enter') {
171
171
  e.preventDefault();
172
172
  commit();
@@ -489,7 +489,7 @@ function RangeFacet({ box, tail, table, set, unit, onEnter, more }) {
489
489
  /* Each end is a compact Field, so the rail's boxes are the filter bar's
490
490
  fields in every look. The input is named by the word alone: the symbol
491
491
  and the unit beside it stay out of the label, and "Min$" is not a name. */
492
- const end = (which, value, change) => (_jsx(Field, { size: "compact", className: "facet-range-end", label: which === 'min' ? say('min') : say('max'), children: (control) => (_jsxs("span", { className: "facet-affix", children: [symbol && (_jsx("span", { className: "facet-affix-text", "aria-hidden": "true", children: symbol })), _jsx("input", { ...control, type: "text", inputMode: "decimal", className: "field-control facet-input", "data-value": which, value: value, placeholder: say('common.any'), onChange: (e) => change(e.target.value), onBlur: commit, onKeyDown: onKey }), unit?.unit && (_jsx("span", { className: "facet-affix-text", "aria-hidden": "true", children: unit.unit }))] })) }));
492
+ const end = (which, value, change) => (_jsx(Field, { size: "compact", className: "facet-range-end", label: which === 'min' ? say('min') : say('max'), children: (control) => (_jsxs("span", { className: "facet-affix", children: [symbol && (_jsx("span", { className: "facet-affix-text", "aria-hidden": "true", children: symbol })), _jsx("input", { ...control, type: "text", inputMode: "decimal", "data-slot": "input", className: "facet-input", "data-value": which, value: value, placeholder: say('common.any'), onChange: (e) => change(e.target.value), onBlur: commit, onKeyDown: onKey }), unit?.unit && (_jsx("span", { className: "facet-affix-text", "aria-hidden": "true", children: unit.unit }))] })) }));
493
493
  return (_jsxs(Facet, { box: box, tail: tail, set: set, more: more, children: [tail && !range.min && !range.max && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsxs("div", { className: "facet-range", children: [end('min', min, setMin), end('max', max, setMax)] })] }));
494
494
  }
495
495
  /* Keyed by its tail, so a condition changed elsewhere redraws the box with it. */
@@ -510,7 +510,9 @@ function TextFacet({ box, tail, table, standing, set, onEnter, more }) {
510
510
  const inputProps = {
511
511
  id,
512
512
  type: 'search',
513
- className: 'field-control facet-input',
513
+ /* The text box's own name as a part, for the box drawn here by hand; a suggest box names its own. */
514
+ 'data-slot': 'input',
515
+ className: 'facet-input',
514
516
  'data-value': 'text',
515
517
  placeholder: fuzzy ? say('contains') : say('equals'),
516
518
  title: fuzzy ? say('common.matchesAnywhereInTheValue') : undefined,
@@ -523,7 +525,7 @@ function TextFacet({ box, tail, table, standing, set, onEnter, more }) {
523
525
  }
524
526
  },
525
527
  };
526
- return (_jsxs(Facet, { box: box, tail: tail, set: set, group: false, more: more, children: [_jsx("label", { className: "facet-label", htmlFor: id, children: box.label }), tail && !initial && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsx("div", { className: "form-field form-field-compact", children: suggesting && box.suggest ? (_jsx(SuggestBox, { table: table.id, columns: box.suggest, standing: standing, text: text, onText: setText, onPick: (value) => {
528
+ return (_jsxs(Facet, { box: box, tail: tail, set: set, group: false, more: more, children: [_jsx("label", { className: "facet-label", htmlFor: id, children: box.label }), tail && !initial && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsx("div", { "data-slot": "field", "data-size": "compact", children: suggesting && box.suggest ? (_jsx(SuggestBox, { table: table.id, columns: box.suggest, standing: standing, text: text, onText: setText, onPick: (value) => {
527
529
  commit(value);
528
530
  onEnter?.();
529
531
  }, inputProps: inputProps })) : (_jsx("input", { ...inputProps, value: text, onChange: (e) => setText(e.target.value) })) })] }));
@@ -0,0 +1,171 @@
1
+ /* What dresses a related list drawn as a gallery. These rules match nothing else, so they travel with the component's
2
+ chunk and are not in every first paint (scripts/bundle-budget.mjs); each keeps the layer it stood in. */
3
+ @layer base {
4
+ .gallery-lead {
5
+ position: relative;
6
+ display: block;
7
+ width: 100%;
8
+ padding: 0;
9
+ aspect-ratio: 4 / 3;
10
+ overflow: hidden;
11
+ /* Held short enough that the thumbnails show under it on a laptop screen:
12
+ the height the screen has left under the title, as a 4:3 width. The
13
+ zoom-corrected height, since vh units ignore the density zoom. */
14
+ max-width: min(100%, calc((var(--shell-vh, 100vh) - 400px) * 4 / 3));
15
+ border: 1px solid var(--line);
16
+ border-radius: var(--radius);
17
+ background: var(--raised);
18
+ }
19
+ /* What opens the photo: a button over the frame, stopping at the steps' columns (a step's 40px at 10px from the
20
+ edge, and its hit area's 2px either side) so a step and the photo are side by side, never one over the other. */
21
+ .gallery-open {
22
+ position: absolute;
23
+ inset: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ border-radius: inherit;
27
+ background: transparent;
28
+ cursor: zoom-in;
29
+ }
30
+ .gallery-lead.has-steps > .gallery-open {
31
+ inset: 0 56px;
32
+ }
33
+ .gallery-open:focus-visible {
34
+ outline: none;
35
+ }
36
+ .gallery-lead:has(> .gallery-open:focus-visible) {
37
+ outline: var(--focus-width) solid var(--focus);
38
+ outline-offset: 2px;
39
+ }
40
+ .gallery-lead-image {
41
+ display: block;
42
+ width: 100%;
43
+ height: 100%;
44
+ object-fit: cover;
45
+ }
46
+ .gallery-count {
47
+ position: absolute;
48
+ right: 10px;
49
+ bottom: 10px;
50
+ padding: var(--space-1h) var(--space-3);
51
+ border-radius: 999px;
52
+ background: var(--lightbox-ground);
53
+ color: var(--lightbox-ink);
54
+ font: 500 var(--text-sm) var(--sans);
55
+ font-variant-numeric: tabular-nums;
56
+ }
57
+ /* The lead's previous and next: square, on the photo stage's scrim, at the
58
+ photo's middle. Quiet until the stage is hovered or holds focus where a
59
+ pointer can hover; always there on touch, where nothing hovers. */
60
+ .gallery-stage {
61
+ position: relative;
62
+ min-width: 0;
63
+ }
64
+ .gallery-step {
65
+ position: absolute;
66
+ top: 50%;
67
+ translate: 0 -50%;
68
+ display: grid;
69
+ place-items: center;
70
+ width: 40px;
71
+ height: 40px;
72
+ padding: 0;
73
+ border: 0;
74
+ border-radius: var(--radius);
75
+ background: var(--lightbox-ground);
76
+ color: var(--lightbox-ink);
77
+ cursor: pointer;
78
+ }
79
+ /* On a touch screen a step's 40px takes a 44px hit area, as the chrome's small controls do (structure.css); it
80
+ reaches 2px past the step, short of the photo's button. */
81
+ @media (pointer: coarse) {
82
+ .gallery-step::after {
83
+ content: '';
84
+ position: absolute;
85
+ left: 50%;
86
+ top: 50%;
87
+ width: 44px;
88
+ height: 44px;
89
+ transform: translate(-50%, -50%);
90
+ }
91
+ }
92
+ .gallery-step.is-prev {
93
+ left: 10px;
94
+ }
95
+ .gallery-step.is-next {
96
+ right: 10px;
97
+ }
98
+ .gallery-step:focus-visible {
99
+ outline: var(--focus-width) solid var(--focus);
100
+ outline-offset: 2px;
101
+ }
102
+ @media (hover: hover) {
103
+ .gallery-step {
104
+ opacity: 0;
105
+ }
106
+ .gallery-stage:hover .gallery-step,
107
+ .gallery-stage:focus-within .gallery-step {
108
+ opacity: 1;
109
+ }
110
+ }
111
+ @media (hover: hover) and (prefers-reduced-motion: no-preference) {
112
+ .gallery-step {
113
+ transition: opacity var(--t-hover) var(--ease-out);
114
+ }
115
+ }
116
+ .gallery-caption {
117
+ margin: 0;
118
+ color: var(--ink-muted);
119
+ font-size: var(--text-base);
120
+ }
121
+ .gallery-strip {
122
+ display: flex;
123
+ gap: var(--space-3);
124
+ overflow-x: auto;
125
+ padding: var(--space-1);
126
+ scrollbar-width: thin;
127
+ }
128
+ .gallery-thumb {
129
+ flex: none;
130
+ width: 96px;
131
+ aspect-ratio: 4 / 3;
132
+ padding: 0;
133
+ overflow: hidden;
134
+ cursor: pointer;
135
+ border: 1px solid var(--line);
136
+ border-radius: calc(var(--radius) - 2px);
137
+ background: var(--raised);
138
+ opacity: 0.78;
139
+ transition:
140
+ opacity var(--t-hover) var(--ease-out),
141
+ border-color var(--t-hover) var(--ease-out);
142
+ }
143
+ .gallery-thumb img {
144
+ display: block;
145
+ width: 100%;
146
+ height: 100%;
147
+ object-fit: cover;
148
+ }
149
+ .gallery-thumb:hover {
150
+ opacity: 1;
151
+ }
152
+ .gallery-thumb[aria-current='true'] {
153
+ opacity: 1;
154
+ border-color: var(--accent);
155
+ box-shadow: 0 0 0 1px var(--accent);
156
+ }
157
+ .gallery-thumb:focus-visible {
158
+ outline: var(--focus-width) solid var(--focus);
159
+ outline-offset: 2px;
160
+ }
161
+ @media (max-width: 600px) {
162
+ .gallery-thumb {
163
+ width: 72px;
164
+ }
165
+ }
166
+ @media (prefers-reduced-motion: reduce) {
167
+ .gallery-thumb {
168
+ transition: none;
169
+ }
170
+ }
171
+ }
@@ -1,4 +1,5 @@
1
1
  import type { LightboxImage } from './Lightbox.js';
2
+ import './Gallery.css';
2
3
  /** `thumb` is the strip's smaller copy of `src`, when the file resource keeps one. */
3
4
  export interface GalleryItem extends LightboxImage {
4
5
  id: string;
@@ -19,6 +19,7 @@ import { onDemand } from './onDemand.js';
19
19
  import { Empty } from './Notes.js';
20
20
  import { say } from '../copy/lists/components/Gallery.js';
21
21
  import { imageSources, imageFallbackSet, MEDIA_IMAGE_SIZES } from '@mistriwork/engine/shared/imageWidths.js';
22
+ import './Gallery.css';
22
23
  /* The lightbox draws its own dialog, fetched the first time a photo is opened. */
23
24
  const Lightbox = onDemand(() => import('./Lightbox.js'), 'Lightbox', { quiet: true });
24
25
  const STEPS = { ArrowRight: 1, ArrowLeft: -1 };
@@ -82,6 +82,8 @@ export interface GridGroup {
82
82
  column: string;
83
83
  head: (value: unknown) => GroupHead;
84
84
  }
85
+ /** A group head's host in the row hosts' store: no row's key can spell it (a row's is a JSON array). */
86
+ export declare const groupHostKey: (value: unknown) => string;
85
87
  interface Plan {
86
88
  align: string;
87
89
  kind: string;
@@ -131,7 +133,6 @@ interface CellColumn {
131
133
  photoOwner: string | undefined;
132
134
  pin: number | undefined;
133
135
  edge: boolean;
134
- wraps?: boolean;
135
136
  /** The columns the room could not hold, drawn under this one's value as a detail line (an App's list). */
136
137
  more?: {
137
138
  name: string;