@mistriwork/kit 1.0.0-rc.16 → 1.0.0-rc.18

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 (110) hide show
  1. package/dist/client/components/AppList.js +16 -6
  2. package/dist/client/components/CardsList.js +7 -1
  3. package/dist/client/components/Chart.css +5 -0
  4. package/dist/client/components/Chart.d.ts +17 -2
  5. package/dist/client/components/Chart.js +83 -22
  6. package/dist/client/components/ChartFigure.d.ts +3 -1
  7. package/dist/client/components/ChartFigure.js +14 -8
  8. package/dist/client/components/Content.js +3 -1
  9. package/dist/client/components/DashHead.d.ts +6 -0
  10. package/dist/client/components/DashHead.js +20 -0
  11. package/dist/client/components/Editable.js +1 -1
  12. package/dist/client/components/Export.js +8 -4
  13. package/dist/client/components/Grid.js +54 -6
  14. package/dist/client/components/JsonPreview.css +29 -0
  15. package/dist/client/components/JsonPreview.js +1 -1
  16. package/dist/client/components/JsonView.css +201 -62
  17. package/dist/client/components/JsonView.d.ts +43 -1
  18. package/dist/client/components/JsonView.js +320 -55
  19. package/dist/client/components/LayoutSwitch.d.ts +9 -0
  20. package/dist/client/components/LayoutSwitch.js +61 -0
  21. package/dist/client/components/ListEmpty.css +3 -0
  22. package/dist/client/components/LiveNotices.css +3 -0
  23. package/dist/client/components/NewRecord.d.ts +0 -2
  24. package/dist/client/components/NewRecord.js +61 -17
  25. package/dist/client/components/PageFields.js +23 -4
  26. package/dist/client/components/PageHead.js +28 -7
  27. package/dist/client/components/PageRelated.d.ts +28 -0
  28. package/dist/client/components/PageRelated.js +50 -3
  29. package/dist/client/components/PageSectionBox.d.ts +5 -1
  30. package/dist/client/components/PageSectionBox.js +5 -3
  31. package/dist/client/components/PageSections.js +26 -13
  32. package/dist/client/components/PageSkeleton.css +2 -0
  33. package/dist/client/components/PageSkeleton.js +11 -3
  34. package/dist/client/components/Palette.js +108 -10
  35. package/dist/client/components/RecordPicker.d.ts +2 -0
  36. package/dist/client/components/RecordPicker.js +34 -8
  37. package/dist/client/components/RecordSummaries.js +6 -1
  38. package/dist/client/components/Rooms.js +2 -2
  39. package/dist/client/components/SecondLine.d.ts +15 -0
  40. package/dist/client/components/SecondLine.js +18 -0
  41. package/dist/client/components/TableRoom.js +15 -5
  42. package/dist/client/components/TableView.d.ts +2 -0
  43. package/dist/client/components/Value.d.ts +1 -0
  44. package/dist/client/components/Value.js +7 -9
  45. package/dist/client/components/appListModel.d.ts +4 -0
  46. package/dist/client/components/appRooms.d.ts +2 -0
  47. package/dist/client/components/appRooms.js +2 -0
  48. package/dist/client/components/dashboardModel.d.ts +5 -0
  49. package/dist/client/components/directoryModel.d.ts +25 -0
  50. package/dist/client/components/directoryModel.js +88 -0
  51. package/dist/client/components/gridSizing.d.ts +3 -0
  52. package/dist/client/components/gridSizing.js +6 -2
  53. package/dist/client/components/jsonTree.d.ts +54 -0
  54. package/dist/client/components/jsonTree.js +190 -0
  55. package/dist/client/components/listSubtitles.d.ts +1 -0
  56. package/dist/client/components/listSubtitles.js +7 -0
  57. package/dist/client/components/newMenuModel.d.ts +14 -6
  58. package/dist/client/components/newMenuModel.js +37 -5
  59. package/dist/client/components/newRecordModel.d.ts +24 -2
  60. package/dist/client/components/newRecordModel.js +47 -4
  61. package/dist/client/components/pageContext.d.ts +2 -0
  62. package/dist/client/components/pageModel.d.ts +2 -0
  63. package/dist/client/components/sidebarModel.js +7 -3
  64. package/dist/client/components/textMeasure.d.ts +2 -0
  65. package/dist/client/components/textMeasure.js +16 -2
  66. package/dist/client/composedReads.js +3 -1
  67. package/dist/client/copy/lists/components/AppList.d.ts +1 -0
  68. package/dist/client/copy/lists/components/AppList.js +1 -0
  69. package/dist/client/copy/lists/components/LayoutSwitch.d.ts +4 -0
  70. package/dist/client/copy/lists/components/LayoutSwitch.js +6 -0
  71. package/dist/client/copy/record/components/JsonView.d.ts +22 -0
  72. package/dist/client/copy/record/components/JsonView.js +19 -0
  73. package/dist/client/copy/record/components/PageHead.d.ts +1 -0
  74. package/dist/client/copy/record/components/PageHead.js +2 -0
  75. package/dist/client/copy/shell/components/Palette.d.ts +11 -0
  76. package/dist/client/copy/shell/components/Palette.js +14 -0
  77. package/dist/client/copy/shell/components/TopNav.d.ts +2 -1
  78. package/dist/client/copy/shell/components/TopNav.js +4 -2
  79. package/dist/client/copy/shell/components/directoryModel.d.ts +4 -0
  80. package/dist/client/copy/shell/components/directoryModel.js +6 -0
  81. package/dist/client/copy/shell/components/sidebarModel.d.ts +1 -0
  82. package/dist/client/copy/shell/components/sidebarModel.js +1 -0
  83. package/dist/client/copy/workbench/components/Export.d.ts +3 -2
  84. package/dist/client/copy/workbench/components/Export.js +3 -2
  85. package/dist/client/core.d.ts +3 -3
  86. package/dist/client/core.js +6 -7
  87. package/dist/client/export.d.ts +5 -4
  88. package/dist/client/export.js +40 -19
  89. package/dist/client/features.css +67 -7
  90. package/dist/client/index.html +2 -1
  91. package/dist/client/insert.js +1 -8
  92. package/dist/client/locale.d.ts +7 -0
  93. package/dist/client/locale.js +0 -0
  94. package/dist/client/lumenLook.css +9 -12
  95. package/dist/client/page.css +63 -15
  96. package/dist/client/palette.d.ts +3 -1
  97. package/dist/client/palette.js +19 -4
  98. package/dist/client/paletteRecents.d.ts +25 -0
  99. package/dist/client/paletteRecents.js +64 -0
  100. package/dist/client/partsLook.css +6 -3
  101. package/dist/client/sageLook.css +5 -3
  102. package/dist/client/shellMode.d.ts +8 -0
  103. package/dist/client/shellMode.js +1 -0
  104. package/dist/client/structure.css +201 -1
  105. package/dist/client/style.css +59 -10
  106. package/dist/client/themeFamilies.css +37 -0
  107. package/dist/client/visualThemes.css +12 -0
  108. package/dist/client/workbenchLook.css +415 -0
  109. package/dist/client/workshopLook.css +48 -25
  110. package/package.json +4 -3
@@ -1,3 +1,9 @@
1
+ /**
2
+ * The New form's rules, apart from its drawing (NewRecord.tsx, DefinedFields.tsx, PageRelated.tsx): which columns it
3
+ * asks and in what groups, which a condition hides, what each starts at (a declared default, today or now, a flag's
4
+ * start), the control each field gets, how an earlier pick narrows a later one, whether it opens as a drawer or a page,
5
+ * and what is missing or changed before the values are written.
6
+ */
1
7
  import { type ColumnMeta, type TableMeta } from '@mistriwork/engine/shared/schema.js';
2
8
  import type { AppForm } from '@mistriwork/engine/shared/servedApp.js';
3
9
  import { type FormScalar } from '@mistriwork/engine/shared/formValues.js';
@@ -12,9 +18,14 @@ interface FormGroup {
12
18
  /** Unknown draft dependencies stay visible so an incomplete form never hides
13
19
  * the control needed to resolve its own condition. */
14
20
  export declare function isFormFieldVisible(form: FormCuration | undefined, column: ColumnMeta, values: Readonly<Record<string, FormScalar | string>>, table: TableMeta): boolean;
15
- export declare function formColumns(table: TableMeta, form: FormCuration | undefined, app: boolean): ColumnMeta[];
21
+ /**
22
+ * The columns a New form asks, in order. `written` is what the database and the App's machine fill without being
23
+ * asked (platformWritten in form.ts): left out where the form names its fields by the schema, kept where the App's
24
+ * form names one itself (in `show`, a step or a group), since a declared field is the author's to ask.
25
+ */
26
+ export declare function formColumns(table: TableMeta, form: FormCuration | undefined, app: boolean, written?: ReadonlySet<string>): ColumnMeta[];
16
27
  /** Grouped fields retain authored order; ungrouped fields follow in form order. */
17
- export declare function formGroups(table: TableMeta, form: FormCuration | undefined, app: boolean): FormGroup[];
28
+ export declare function formGroups(table: TableMeta, form: FormCuration | undefined, app: boolean, written?: ReadonlySet<string>): FormGroup[];
18
29
  export declare function presetValue(column: ColumnMeta, defaults: Record<string, unknown>): string;
19
30
  /** Returning to a displayed preset is clean, except when clearing means omission. */
20
31
  export declare function hasFormChanges(columns: ColumnMeta[], values: Record<string, string>, defaults: Record<string, unknown>, edited: ReadonlySet<string>): boolean;
@@ -30,6 +41,9 @@ export declare function missingFields(columns: ColumnMeta[], values: Record<stri
30
41
  /** Where the New form is drawn: what it says, else a drawer for a short form and a page for a long or stepped one. */
31
42
  export declare function formFrame(form: FormCuration | undefined, fieldCount: number): 'drawer' | 'page';
32
43
  export type FieldInput = 'text' | 'textarea' | 'richText' | 'number' | 'money' | 'radios' | 'listbox' | 'switch' | 'flag' | 'date' | 'datetime' | 'reference';
44
+ /** A choice declared as cards, up to this many words and none described, is a row of picks instead: five stacked cards
45
+ took 270px to say five words (docs/design.md, Forms). A card that carries a description keeps its card. */
46
+ export declare const SEGMENTED_WORDS = 5;
33
47
  /**
34
48
  * The input an App's New form draws a column as, from the column and how the
35
49
  * App dresses it. `hasStart` is whether the field starts with a value (a form
@@ -48,6 +62,14 @@ export declare function fieldInput(column: ColumnMeta, options: {
48
62
  export declare function clockDefault(word: 'today' | 'now', column: ColumnMeta, now: Date, timeZone?: string): string;
49
63
  /** The choices a narrowed reference offers, in the query language: `project_id = 4`; undefined while a field it reads is empty. */
50
64
  export declare function narrowingCondition(where: Readonly<Record<string, string>> | undefined, values: Readonly<Record<string, unknown>>): string | undefined;
65
+ /**
66
+ * The pickers a form narrows by an earlier pick where the App's form says nothing (`fields.<column>.where`): a
67
+ * reference whose table points at the table of a required reference asked before it, by exactly one column, offers
68
+ * only the records under that pick — a job's site among the chosen customer's sites, never every customer's. An
69
+ * optional earlier pick narrows nothing, since a picker waiting on a field that may stay empty would wait for good.
70
+ * The narrowing is the picker's, as a declared one is: the server still takes any record the reader may name.
71
+ */
72
+ export declare function inferredNarrowing(columns: readonly ColumnMeta[], target: (tableId: string) => TableMeta | undefined): Record<string, Record<string, string>>;
51
73
  /**
52
74
  * Where a flag's switch starts: the form's default, else the database's when
53
75
  * it is a plain true or false, else off for a flag that must be answered. A
@@ -1,3 +1,9 @@
1
+ /**
2
+ * The New form's rules, apart from its drawing (NewRecord.tsx, DefinedFields.tsx, PageRelated.tsx): which columns it
3
+ * asks and in what groups, which a condition hides, what each starts at (a declared default, today or now, a flag's
4
+ * start), the control each field gets, how an earlier pick narrows a later one, whether it opens as a drawer or a page,
5
+ * and what is missing or changed before the values are written.
6
+ */
1
7
  import { coerceForColumn, columnKind, isFlagColumn } from '@mistriwork/engine/shared/schema.js';
2
8
  import { autoKey, formShownFields, isRequired } from '@mistriwork/engine/shared/form.js';
3
9
  import { evaluateFormCondition, typedValue } from '@mistriwork/engine/shared/formValues.js';
@@ -37,15 +43,23 @@ function editableColumns(table, app) {
37
43
  // A machine's column starts in its first state and then moves only by its verbs.
38
44
  return table.columns.filter((c) => c.writable !== false && c.changesBy !== 'actions' && c.identity !== 'always' && !(app && c.identity) && c.name !== assigned);
39
45
  }
40
- export function formColumns(table, form, app) {
46
+ /**
47
+ * The columns a New form asks, in order. `written` is what the database and the App's machine fill without being
48
+ * asked (platformWritten in form.ts): left out where the form names its fields by the schema, kept where the App's
49
+ * form names one itself (in `show`, a step or a group), since a declared field is the author's to ask.
50
+ */
51
+ export function formColumns(table, form, app, written) {
41
52
  const shown = formShownFields(form);
42
- const columns = shown ? [...new Set(shown)].flatMap((name) => table.columns.find((c) => c.name === name) ?? []) : table.columns;
53
+ const named = new Set(form?.groups?.flatMap((group) => group.fields) ?? []);
54
+ const columns = shown
55
+ ? [...new Set(shown)].flatMap((name) => table.columns.find((c) => c.name === name) ?? [])
56
+ : table.columns.filter((c) => !written?.has(c.name) || named.has(c.name));
43
57
  const editable = new Set(editableColumns(table, app));
44
58
  return columns.filter((c) => editable.has(c));
45
59
  }
46
60
  /** Grouped fields retain authored order; ungrouped fields follow in form order. */
47
- export function formGroups(table, form, app) {
48
- const columns = formColumns(table, form, app);
61
+ export function formGroups(table, form, app, written) {
62
+ const columns = formColumns(table, form, app, written);
49
63
  if (!form?.groups?.length)
50
64
  return [{ label: '', columns }];
51
65
  const byName = new Map(columns.map((column) => [column.name, column]));
@@ -134,6 +148,9 @@ export function formFrame(form, fieldCount) {
134
148
  const PROSE = /^(?:description|notes?|body|bio|biography|comments?|summary|details|message|instructions|remarks|content|about)$|_(?:notes?|description|details|comments?|summary)$/i;
135
149
  /** Radios show every word at once; past this many the listbox is shorter. The command form's rule. */
136
150
  const RADIO_WORDS = 4;
151
+ /** A choice declared as cards, up to this many words and none described, is a row of picks instead: five stacked cards
152
+ took 270px to say five words (docs/design.md, Forms). A card that carries a description keeps its card. */
153
+ export const SEGMENTED_WORDS = 5;
137
154
  /** The declared length of a text column, when its type says one: `varchar(500)` → 500. */
138
155
  function declaredLength(column) {
139
156
  const match = /\(\s*(\d+)\s*\)/.exec(column.type);
@@ -204,6 +221,32 @@ export function narrowingCondition(where, values) {
204
221
  }
205
222
  return clauses.join(' and ');
206
223
  }
224
+ /**
225
+ * The pickers a form narrows by an earlier pick where the App's form says nothing (`fields.<column>.where`): a
226
+ * reference whose table points at the table of a required reference asked before it, by exactly one column, offers
227
+ * only the records under that pick — a job's site among the chosen customer's sites, never every customer's. An
228
+ * optional earlier pick narrows nothing, since a picker waiting on a field that may stay empty would wait for good.
229
+ * The narrowing is the picker's, as a declared one is: the server still takes any record the reader may name.
230
+ */
231
+ export function inferredNarrowing(columns, target) {
232
+ const narrowed = {};
233
+ columns.forEach((later, at) => {
234
+ const into = later.references ? target(later.references.table) : undefined;
235
+ if (!into)
236
+ return;
237
+ for (const earlier of columns.slice(0, at)) {
238
+ const up = earlier.references;
239
+ if (!up || earlier.nullable !== false || up.table === later.references.table)
240
+ continue;
241
+ const via = into.columns.filter((column) => column.references?.table === up.table && column.references.column === up.column);
242
+ if (via.length !== 1)
243
+ continue;
244
+ narrowed[later.name] = { [via[0].name]: earlier.name };
245
+ return;
246
+ }
247
+ });
248
+ return narrowed;
249
+ }
207
250
  /**
208
251
  * Where a flag's switch starts: the form's default, else the database's when
209
252
  * it is a plain true or false, else off for a flag that must be answered. A
@@ -144,6 +144,8 @@ export interface SlotProps {
144
144
  onTitleEditor?: (index: number, render: (() => ReactNode) | undefined) => void;
145
145
  /** An empty related list said in one line with its neighbours: it draws its Add alone (PageEmptyRun.tsx). */
146
146
  collapsed?: boolean;
147
+ /** A related list alone on an inferred page: it says its count beside its heading, as a tab would. */
148
+ counted?: boolean;
147
149
  }
148
150
  /**
149
151
  * How this reader's rows are named, as a record page's reads are built from
@@ -82,6 +82,8 @@ export interface PageSection {
82
82
  /** A record header's status column, fact words, filled verb and destructive verbs (shared/pageModel.ts). */
83
83
  status?: string;
84
84
  factLabels?: Record<string, import('@mistriwork/engine/shared/appCards.js').FactLabel>;
85
+ /** An inferred header's spans: a start fact's end column, said with it as one range (shared/pageModel.ts, PageFields.spans). */
86
+ spans?: Record<string, string>;
85
87
  primary?: string;
86
88
  destructive?: string[];
87
89
  headerActions?: string[];
@@ -23,7 +23,7 @@ import { currentEntry, state, tableView, walkVersion } from '../core.js';
23
23
  import { shell } from '../shellMode.js';
24
24
  import { appListFor, appListQuery, currentNavIndex } from './appListModel.js';
25
25
  import { menuCount } from '@mistriwork/engine/shared/menuCounts.js';
26
- import { ASSISTANT_PAGE, appMenu, dashViewKey, formViewKey, hasRooms, homeRoom, isAssistantRoom, isListRoom, } from './appRooms.js';
26
+ import { ASSISTANT_PAGE, DIRECTORY_PAGE, appMenu, dashViewKey, formViewKey, hasRooms, homeRoom, isAssistantRoom, isListRoom, } from './appRooms.js';
27
27
  import { isServedForm as isFormView } from '@mistriwork/engine/shared/servedApp.js';
28
28
  import { shownFavorites } from './favoriteNav.js';
29
29
  import { formatApprox, formatNumber } from '../locale.js';
@@ -125,6 +125,10 @@ export function sidebarItems(filterText) {
125
125
  .filter(foot)
126
126
  .flatMap((node, k) => walk([node], 0, false).map((item, at) => at === 0 ? { ...item, footOrder: 2 * k + 2, anchored: true } : { ...item, footOrder: 2 * k + 1 }));
127
127
  items.push(...walk(menu.filter((node) => !foot(node)), 0, false));
128
+ /* A menu past a dozen places ends in its Directory (Directory.tsx): every one of them, found by typing. Not
129
+ while the menu's own filter is in use, which is the same search in a smaller box. */
130
+ if (app.directory && !needle)
131
+ items.push({ kind: 'form', view: DIRECTORY_PAGE, label: say('allPages'), icon: app.directory.icon, page: DIRECTORY_PAGE });
128
132
  if (footer.length)
129
133
  items.push({ kind: 'gap' }, ...footer);
130
134
  if (!matches && needle)
@@ -287,8 +291,8 @@ export function currentDashView() {
287
291
  /** Which form row is lit, by its view key: the one on the walk, or the signed-in form served as this visitor's home. */
288
292
  export function currentFormView() {
289
293
  const here = currentEntry();
290
- if (here?.kind === 'page' && here.pageId === ASSISTANT_PAGE)
291
- return ASSISTANT_PAGE;
294
+ if (here?.kind === 'page' && (here.pageId === ASSISTANT_PAGE || here.pageId === DIRECTORY_PAGE))
295
+ return here.pageId;
292
296
  const onWalk = here?.kind === 'page' ? formViewKey(here.pageId) : undefined;
293
297
  if (onWalk !== undefined)
294
298
  return onWalk;
@@ -1,2 +1,4 @@
1
1
  import type { TextMeasure } from './gridSizing.js';
2
+ /** Whether `font` is set in faces that are loaded (or that no `@font-face` declares: a system face). */
3
+ export declare function fontLoaded(font: string): boolean;
2
4
  export declare function textMeasure(font: string): TextMeasure | undefined;
@@ -1,7 +1,19 @@
1
1
  /** Text widths in one font, from a shared canvas; `undefined` where there is
2
2
  no 2D context (the component tests), which falls back to counting. */
3
3
  let measuringContext;
4
+ /* Only measures of a face that is here: a canvas measures a face still on its way in the fallback's metrics, and that
5
+ number kept for the page's life sized every column from the wrong font, so a table's columns came out differently
6
+ from one load to the next, by whether the webfont beat the first measure. */
4
7
  const measures = new Map();
8
+ /** Whether `font` is set in faces that are loaded (or that no `@font-face` declares: a system face). */
9
+ export function fontLoaded(font) {
10
+ try {
11
+ return globalThis.document?.fonts?.check(font) ?? true;
12
+ }
13
+ catch {
14
+ return true;
15
+ }
16
+ }
5
17
  export function textMeasure(font) {
6
18
  if (measuringContext === undefined) {
7
19
  try {
@@ -14,7 +26,8 @@ export function textMeasure(font) {
14
26
  const context = measuringContext;
15
27
  if (!context)
16
28
  return undefined;
17
- const known = measures.get(font);
29
+ const loaded = fontLoaded(font);
30
+ const known = loaded ? measures.get(font) : undefined;
18
31
  if (known)
19
32
  return known;
20
33
  const cache = new Map();
@@ -30,6 +43,7 @@ export function textMeasure(font) {
30
43
  cache.set(text, width);
31
44
  return width;
32
45
  };
33
- measures.set(font, measure);
46
+ if (loaded)
47
+ measures.set(font, measure);
34
48
  return measure;
35
49
  }
@@ -114,7 +114,9 @@ function forgetComposed() {
114
114
  /* A record's own read no longer waits for a compose begun before the write: it could not answer it. */
115
115
  pending.clear();
116
116
  }
117
- const COMPOSABLE = new Set(['/api/view/run', '/api/run', '/api/breakdown', '/api/record-history']);
117
+ /* `/api/counts` is an inferred page's related tabs (PageRelated.tsx, useRelatedCounts): asked by the server with the
118
+ body the client builds, so the strip's counts arrive with the page and add no request of their own. */
119
+ const COMPOSABLE = new Set(['/api/view/run', '/api/run', '/api/breakdown', '/api/record-history', '/api/counts']);
118
120
  /** Whether a compose kept, or on its way, could answer this request: asked before waiting on one, so any other request goes out in the same moment it always did. */
119
121
  export function mayBeComposed(path) {
120
122
  return COMPOSABLE.has(path) && (held.length > 0 || pending.size > 0);
@@ -25,4 +25,5 @@ export declare const say: import("../../../messages.js").RoomMessage<{
25
25
  readonly match: "{gridTotal} match";
26
26
  readonly captionFilters: "{caption} filters";
27
27
  readonly everything: "Everything";
28
+ readonly layout: "Show {caption} as";
28
29
  }>;
@@ -27,4 +27,5 @@ export const say = defineMessages({
27
27
  match: '{gridTotal} match',
28
28
  captionFilters: '{caption} filters',
29
29
  everything: 'Everything',
30
+ layout: 'Show {caption} as',
30
31
  });
@@ -0,0 +1,4 @@
1
+ export declare const say: import("../../../messages.js").RoomMessage<{
2
+ readonly asList: "List";
3
+ readonly asBoard: "Board";
4
+ }>;
@@ -0,0 +1,6 @@
1
+ /** What LayoutSwitch says, in the lists and grid room (packages/kit/src/client/messages.ts says how the catalog is split). */
2
+ import { defineMessages } from '../../../messages.js';
3
+ export const say = defineMessages({
4
+ asList: 'List',
5
+ asBoard: 'Board',
6
+ });
@@ -1,10 +1,32 @@
1
1
  export declare const say: import("../../../messages.js").RoomMessage<{
2
+ readonly document: "JSON document";
3
+ readonly view: "View";
4
+ readonly tree: "Tree";
2
5
  readonly raw: "Raw";
3
6
  readonly rawJson: "Raw JSON";
7
+ readonly wrap: "Wrap";
8
+ readonly wrapLines: "Wrap long lines";
9
+ readonly expandAll: "Expand all";
10
+ readonly collapseAll: "Collapse all";
11
+ readonly filter: "Filter";
12
+ readonly filterKeysAndValues: "Filter keys and values";
13
+ readonly matches: {
14
+ readonly one: "{count} match";
15
+ readonly other: "{count} matches";
16
+ };
17
+ readonly noMatches: "No matches";
4
18
  readonly copied: "Copied";
5
19
  readonly copyRefused: "Copy refused";
6
20
  readonly copy: "Copy";
21
+ readonly copyValue: "Copy value";
22
+ readonly copyPath: "Copy path";
23
+ readonly copyValueOf: "Copy value of {path}";
24
+ readonly copyPathOf: "Copy path {path}";
7
25
  readonly copiedTheJson: "Copied the JSON.";
26
+ readonly copiedValueOf: "Copied the value of {path}.";
27
+ readonly copiedPath: "Copied the path {path}.";
28
+ readonly row: "Row {n}";
29
+ readonly rowRest: "Row {n}, the rest";
8
30
  readonly notShown: "{total} not shown";
9
31
  readonly showMore: "Show {next} more";
10
32
  readonly moreFolded: "+{count} more";
@@ -1,12 +1,31 @@
1
1
  /** What JsonView says, in the record page 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
+ document: 'JSON document',
5
+ view: 'View',
6
+ tree: 'Tree',
4
7
  raw: 'Raw',
5
8
  rawJson: 'Raw JSON',
9
+ wrap: 'Wrap',
10
+ wrapLines: 'Wrap long lines',
11
+ expandAll: 'Expand all',
12
+ collapseAll: 'Collapse all',
13
+ filter: 'Filter',
14
+ filterKeysAndValues: 'Filter keys and values',
15
+ matches: { one: '{count} match', other: '{count} matches' },
16
+ noMatches: 'No matches',
6
17
  copied: 'Copied',
7
18
  copyRefused: 'Copy refused',
8
19
  copy: 'Copy',
20
+ copyValue: 'Copy value',
21
+ copyPath: 'Copy path',
22
+ copyValueOf: 'Copy value of {path}',
23
+ copyPathOf: 'Copy path {path}',
9
24
  copiedTheJson: 'Copied the JSON.',
25
+ copiedValueOf: 'Copied the value of {path}.',
26
+ copiedPath: 'Copied the path {path}.',
27
+ row: 'Row {n}',
28
+ rowRest: 'Row {n}, the rest',
10
29
  notShown: '{total} not shown',
11
30
  showMore: 'Show {next} more',
12
31
  moreFolded: '+{count} more',
@@ -5,4 +5,5 @@ export declare const say: import("../../../messages.js").RoomMessage<{
5
5
  readonly thisPageBelongsToTheFile: "This page belongs to the file it came from — editing it starts your own copy";
6
6
  readonly layout: "Layout";
7
7
  readonly copyLayout: "Copy layout";
8
+ readonly when: "When";
8
9
  }>;
@@ -7,4 +7,6 @@ export const say = defineMessages({
7
7
  thisPageBelongsToTheFile: 'This page belongs to the file it came from — editing it starts your own copy',
8
8
  layout: 'Layout',
9
9
  copyLayout: 'Copy layout',
10
+ /* The caption of a fact said as a range, from its start to its end (pageAnatomy.ts, spanOf). */
11
+ when: 'When',
10
12
  });
@@ -12,4 +12,15 @@ export declare const say: import("../../../messages.js").RoomMessage<{
12
12
  readonly kindRecord: "record";
13
13
  readonly kindSql: "sql";
14
14
  readonly kindDatabase: "database";
15
+ readonly kindCreate: "create";
16
+ readonly kindDetail: "{kind} · {detail}";
17
+ readonly groupRecent: "Recent";
18
+ readonly groupPages: "Pages";
19
+ readonly groupCreate: "Create";
20
+ readonly groupCommands: "Commands";
21
+ readonly groupRecords: "Records";
22
+ readonly hintMove: "move";
23
+ readonly hintOpen: "open";
24
+ readonly hintClose: "close";
25
+ readonly keyEscape: "esc";
15
26
  }>;
@@ -15,4 +15,18 @@ export const say = defineMessages({
15
15
  kindRecord: 'record',
16
16
  kindSql: 'sql',
17
17
  kindDatabase: 'database',
18
+ kindCreate: 'create',
19
+ /* An App's row says what it opens in its line, first: "Page · Leasing". */
20
+ kindDetail: '{kind} · {detail}',
21
+ /* An App's palette sorts what it finds under these, in this order; a heading is a quiet label, not a badge. */
22
+ groupRecent: 'Recent',
23
+ groupPages: 'Pages',
24
+ groupCreate: 'Create',
25
+ groupCommands: 'Commands',
26
+ groupRecords: 'Records',
27
+ /* The footer's key hints: the keys are marks, these are what each does. */
28
+ hintMove: 'move',
29
+ hintOpen: 'open',
30
+ hintClose: 'close',
31
+ keyEscape: 'esc',
18
32
  });
@@ -1,4 +1,5 @@
1
1
  export declare const say: import("../../../messages.js").RoomMessage<{
2
- readonly searchK: "Search (⌘K)";
2
+ readonly searchK: "Search ⌘K";
3
3
  readonly search: "Search…";
4
+ readonly allPages: "All pages";
4
5
  }>;
@@ -1,12 +1,14 @@
1
1
  /** What TopNav says, in the shell 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
- searchK: 'Search (⌘K)',
4
+ searchK: 'Search ⌘K',
5
5
  search: 'Search…',
6
+ allPages: 'All pages',
6
7
  }, {
7
8
  /* The words a visitor sees in the shell; the rest are said in English. */
8
9
  es: {
9
- searchK: 'Buscar (⌘K)',
10
+ searchK: 'Buscar ⌘K',
10
11
  search: 'Buscar…',
12
+ allPages: 'Todas las páginas',
11
13
  },
12
14
  });
@@ -0,0 +1,4 @@
1
+ export declare const say: import("../../../messages.js").RoomMessage<{
2
+ readonly more: "More";
3
+ readonly new: "New";
4
+ }>;
@@ -0,0 +1,6 @@
1
+ /** What directoryModel says, in the shell room (packages/kit/src/client/messages.ts says how the catalog is split). */
2
+ import { defineMessages } from '../../../messages.js';
3
+ export const say = defineMessages({
4
+ more: 'More',
5
+ new: 'New',
6
+ });
@@ -1,3 +1,4 @@
1
1
  export declare const say: import("../../../messages.js").RoomMessage<{
2
2
  readonly noMatches: "No matches.";
3
+ readonly allPages: "All pages";
3
4
  }>;
@@ -2,4 +2,5 @@
2
2
  import { defineMessages } from '../../../messages.js';
3
3
  export const say = defineMessages({
4
4
  noMatches: 'No matches.',
5
+ allPages: 'All pages',
5
6
  });
@@ -5,7 +5,7 @@ export declare const say: import("../../../messages.js").RoomMessage<{
5
5
  readonly one: "this page ({count} row)";
6
6
  readonly other: "this page ({count} rows)";
7
7
  };
8
- readonly allMatchingRows: "all matching rows ({capped})";
8
+ readonly allMatchingRows: "all matching rows ({count})";
9
9
  readonly downloadThisResult: "Download this result";
10
10
  readonly export: "Export";
11
11
  readonly chooseColumns: "Choose columns…";
@@ -13,7 +13,8 @@ export declare const say: import("../../../messages.js").RoomMessage<{
13
13
  readonly agent: "Agent";
14
14
  readonly theQueryTheShape: "The query, the shape and how to run it over MCP — not the rows";
15
15
  readonly copyThisPosition: "Copy this position";
16
- readonly cappedAtRowsTheSame: "Capped at {max} rows — the same ceiling every read in this tool has. Narrow the query to export the rest.";
16
+ readonly streamedPastTheCap: "Every matching row is written, read in batches as it downloads.";
17
+ readonly stoppedAtTheCap: "This file stops at {max} rows: a support visit records each read whole, so its export is one read, not a stream.";
17
18
  readonly pickAtLeastOne: "Pick at least one column to export.";
18
19
  readonly columnsToExport: "Columns to export";
19
20
  readonly tickedColumnsAreWritten: "Ticked columns are written in the order the table declares them. Choosing a column that is not on screen re-runs the query to fetch it.";
@@ -4,7 +4,7 @@ export const say = defineMessages({
4
4
  none: 'None',
5
5
  thatQueryNoLonger: 'That query no longer returns rows.',
6
6
  thisPageRows: { one: 'this page ({count} row)', other: 'this page ({count} rows)' },
7
- allMatchingRows: 'all matching rows ({capped})',
7
+ allMatchingRows: 'all matching rows ({count})',
8
8
  downloadThisResult: 'Download this result',
9
9
  export: 'Export',
10
10
  chooseColumns: 'Choose columns…',
@@ -12,7 +12,8 @@ export const say = defineMessages({
12
12
  agent: 'Agent',
13
13
  theQueryTheShape: 'The query, the shape and how to run it over MCP — not the rows',
14
14
  copyThisPosition: 'Copy this position',
15
- cappedAtRowsTheSame: 'Capped at {max} rows — the same ceiling every read in this tool has. Narrow the query to export the rest.',
15
+ streamedPastTheCap: 'Every matching row is written, read in batches as it downloads.',
16
+ stoppedAtTheCap: 'This file stops at {max} rows: a support visit records each read whole, so its export is one read, not a stream.',
16
17
  pickAtLeastOne: 'Pick at least one column to export.',
17
18
  columnsToExport: 'Columns to export',
18
19
  tickedColumnsAreWritten: 'Ticked columns are written in the order the table declares them. Choosing a column that is not on screen re-runs the query to fetch it.',
@@ -39,9 +39,9 @@ export declare const state: {
39
39
  /**
40
40
  * How many rows a page actually holds, which the reader chooses.
41
41
  *
42
- * `PAGE_SIZE` stays the default and stays equal to the server's
43
- * `DEFAULT_LIMIT` — twenty is right for a first look, and the first look is
44
- * what most browsing is. It was also the *only* size, which turned a
42
+ * `PAGE_SIZE` stays the default and stays equal to the size the server reads
43
+ * a list's first page at (`LIST_PAGE_SIZE`) — enough for a first look without
44
+ * paging, and the first look is what most browsing is. It was also the *only* size, which turned a
45
45
  * sixty-thousand-row table into three thousand clicks: a table you could read
46
46
  * the front of and nothing else.
47
47
  *
@@ -9,7 +9,7 @@
9
9
  * without reaching into the renderer.
10
10
  */
11
11
  import { flushSync } from 'react-dom';
12
- import { DEFAULT_LIMIT } from '@mistriwork/engine/shared/reads.js';
12
+ import { LIST_PAGE_SIZE } from '@mistriwork/engine/shared/reads.js';
13
13
  import { PAGE_HEADER } from '@mistriwork/engine/shared/pageRoutes.js';
14
14
  import { quoteValue } from '@mistriwork/engine/shared/query.js';
15
15
  import { connectionGeneration } from './connectionTransition.js';
@@ -56,15 +56,14 @@ export function $(id) {
56
56
  export const state = { schema: null, stack: [], page: 0, canWrite: false, navMode: 'replace' };
57
57
  /* A record page's composed answers (composedHook.ts) go to this connection when a request names none. */
58
58
  setComposedConnection(() => state.activeConnection ?? null);
59
- /* The server's DEFAULT_LIMIT. Small on purpose: the first page of a
60
- browse should be instant, and paging is one click. */
61
- const PAGE_SIZE = DEFAULT_LIMIT;
59
+ /* The server's first-paint size (LIST_PAGE_SIZE): the list's first page is read before the browser's window is known. */
60
+ const PAGE_SIZE = LIST_PAGE_SIZE;
62
61
  /**
63
62
  * How many rows a page actually holds, which the reader chooses.
64
63
  *
65
- * `PAGE_SIZE` stays the default and stays equal to the server's
66
- * `DEFAULT_LIMIT` — twenty is right for a first look, and the first look is
67
- * what most browsing is. It was also the *only* size, which turned a
64
+ * `PAGE_SIZE` stays the default and stays equal to the size the server reads
65
+ * a list's first page at (`LIST_PAGE_SIZE`) — enough for a first look without
66
+ * paging, and the first look is what most browsing is. It was also the *only* size, which turned a
68
67
  * sixty-thousand-row table into three thousand clicks: a table you could read
69
68
  * the front of and nothing else.
70
69
  *
@@ -45,10 +45,11 @@ export declare function saveExport(kind: any, table: any, columns: any, rows: an
45
45
  /**
46
46
  * All matching rows, as a file the server streams (`POST /api/export`):
47
47
  * read in batches and written as each arrives, so neither side holds the
48
- * whole result as objects and nothing is counted. False where the server
49
- * does not offer it — a tenant host, a row-policy App (its replies wait for
50
- * the policy to settle, which a stream cannot) — and the caller exports
51
- * through `/api/run` as before.
48
+ * whole result as objects and nothing is counted. A tenant's file is asked
49
+ * on its lease (the shell's `tenant.exportFile`); a row-policy App's is read
50
+ * through the policy like its list. False where the server does not offer
51
+ * it — a support visit, whose every read is ledgered whole — and the caller
52
+ * exports through `/api/run` as before.
52
53
  *
53
54
  * @param {'csv' | 'json'} kind
54
55
  * @param {string} table