@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.
- package/dist/client/components/AppList.js +16 -6
- package/dist/client/components/CardsList.js +7 -1
- package/dist/client/components/Chart.css +5 -0
- package/dist/client/components/Chart.d.ts +17 -2
- package/dist/client/components/Chart.js +83 -22
- package/dist/client/components/ChartFigure.d.ts +3 -1
- package/dist/client/components/ChartFigure.js +14 -8
- package/dist/client/components/Content.js +3 -1
- package/dist/client/components/DashHead.d.ts +6 -0
- package/dist/client/components/DashHead.js +20 -0
- package/dist/client/components/Editable.js +1 -1
- package/dist/client/components/Export.js +8 -4
- package/dist/client/components/Grid.js +54 -6
- package/dist/client/components/JsonPreview.css +29 -0
- package/dist/client/components/JsonPreview.js +1 -1
- package/dist/client/components/JsonView.css +201 -62
- package/dist/client/components/JsonView.d.ts +43 -1
- package/dist/client/components/JsonView.js +320 -55
- package/dist/client/components/LayoutSwitch.d.ts +9 -0
- package/dist/client/components/LayoutSwitch.js +61 -0
- package/dist/client/components/ListEmpty.css +3 -0
- package/dist/client/components/LiveNotices.css +3 -0
- package/dist/client/components/NewRecord.d.ts +0 -2
- package/dist/client/components/NewRecord.js +61 -17
- package/dist/client/components/PageFields.js +23 -4
- package/dist/client/components/PageHead.js +28 -7
- package/dist/client/components/PageRelated.d.ts +28 -0
- package/dist/client/components/PageRelated.js +50 -3
- package/dist/client/components/PageSectionBox.d.ts +5 -1
- package/dist/client/components/PageSectionBox.js +5 -3
- package/dist/client/components/PageSections.js +26 -13
- package/dist/client/components/PageSkeleton.css +2 -0
- package/dist/client/components/PageSkeleton.js +11 -3
- package/dist/client/components/Palette.js +108 -10
- package/dist/client/components/RecordPicker.d.ts +2 -0
- package/dist/client/components/RecordPicker.js +34 -8
- package/dist/client/components/RecordSummaries.js +6 -1
- package/dist/client/components/Rooms.js +2 -2
- package/dist/client/components/SecondLine.d.ts +15 -0
- package/dist/client/components/SecondLine.js +18 -0
- package/dist/client/components/TableRoom.js +15 -5
- package/dist/client/components/TableView.d.ts +2 -0
- package/dist/client/components/Value.d.ts +1 -0
- package/dist/client/components/Value.js +7 -9
- package/dist/client/components/appListModel.d.ts +4 -0
- package/dist/client/components/appRooms.d.ts +2 -0
- package/dist/client/components/appRooms.js +2 -0
- package/dist/client/components/dashboardModel.d.ts +5 -0
- package/dist/client/components/directoryModel.d.ts +25 -0
- package/dist/client/components/directoryModel.js +88 -0
- package/dist/client/components/gridSizing.d.ts +3 -0
- package/dist/client/components/gridSizing.js +6 -2
- package/dist/client/components/jsonTree.d.ts +54 -0
- package/dist/client/components/jsonTree.js +190 -0
- package/dist/client/components/listSubtitles.d.ts +1 -0
- package/dist/client/components/listSubtitles.js +7 -0
- package/dist/client/components/newMenuModel.d.ts +14 -6
- package/dist/client/components/newMenuModel.js +37 -5
- package/dist/client/components/newRecordModel.d.ts +24 -2
- package/dist/client/components/newRecordModel.js +47 -4
- package/dist/client/components/pageContext.d.ts +2 -0
- package/dist/client/components/pageModel.d.ts +2 -0
- package/dist/client/components/sidebarModel.js +7 -3
- package/dist/client/components/textMeasure.d.ts +2 -0
- package/dist/client/components/textMeasure.js +16 -2
- package/dist/client/composedReads.js +3 -1
- package/dist/client/copy/lists/components/AppList.d.ts +1 -0
- package/dist/client/copy/lists/components/AppList.js +1 -0
- package/dist/client/copy/lists/components/LayoutSwitch.d.ts +4 -0
- package/dist/client/copy/lists/components/LayoutSwitch.js +6 -0
- package/dist/client/copy/record/components/JsonView.d.ts +22 -0
- package/dist/client/copy/record/components/JsonView.js +19 -0
- package/dist/client/copy/record/components/PageHead.d.ts +1 -0
- package/dist/client/copy/record/components/PageHead.js +2 -0
- package/dist/client/copy/shell/components/Palette.d.ts +11 -0
- package/dist/client/copy/shell/components/Palette.js +14 -0
- package/dist/client/copy/shell/components/TopNav.d.ts +2 -1
- package/dist/client/copy/shell/components/TopNav.js +4 -2
- package/dist/client/copy/shell/components/directoryModel.d.ts +4 -0
- package/dist/client/copy/shell/components/directoryModel.js +6 -0
- package/dist/client/copy/shell/components/sidebarModel.d.ts +1 -0
- package/dist/client/copy/shell/components/sidebarModel.js +1 -0
- package/dist/client/copy/workbench/components/Export.d.ts +3 -2
- package/dist/client/copy/workbench/components/Export.js +3 -2
- package/dist/client/core.d.ts +3 -3
- package/dist/client/core.js +6 -7
- package/dist/client/export.d.ts +5 -4
- package/dist/client/export.js +40 -19
- package/dist/client/features.css +67 -7
- package/dist/client/index.html +2 -1
- package/dist/client/insert.js +1 -8
- package/dist/client/locale.d.ts +7 -0
- package/dist/client/locale.js +0 -0
- package/dist/client/lumenLook.css +9 -12
- package/dist/client/page.css +63 -15
- package/dist/client/palette.d.ts +3 -1
- package/dist/client/palette.js +19 -4
- package/dist/client/paletteRecents.d.ts +25 -0
- package/dist/client/paletteRecents.js +64 -0
- package/dist/client/partsLook.css +6 -3
- package/dist/client/sageLook.css +5 -3
- package/dist/client/shellMode.d.ts +8 -0
- package/dist/client/shellMode.js +1 -0
- package/dist/client/structure.css +201 -1
- package/dist/client/style.css +59 -10
- package/dist/client/themeFamilies.css +37 -0
- package/dist/client/visualThemes.css +12 -0
- package/dist/client/workbenchLook.css +415 -0
- package/dist/client/workshopLook.css +48 -25
- package/package.json +4 -3
package/dist/client/export.js
CHANGED
|
@@ -22,11 +22,11 @@ import { scopeApiRequest } from './requestIdentity.js';
|
|
|
22
22
|
import { captureSessionIdentity } from './sessionIdentity.js';
|
|
23
23
|
import { say } from './copy/workbench/export.js';
|
|
24
24
|
import { portalRoot } from './shellHost.js';
|
|
25
|
+
import { shell } from './shellMode.js';
|
|
25
26
|
import { fetchServer } from './transport.js';
|
|
26
27
|
export { csvField };
|
|
27
|
-
/* Mirrors MAX_LIMIT in packages/engine/src/shared/reads.ts
|
|
28
|
-
|
|
29
|
-
rows "all matching" can actually mean. */
|
|
28
|
+
/* Mirrors MAX_LIMIT in packages/engine/src/shared/reads.ts: the most one `/api/run` reads, which is all an export
|
|
29
|
+
holds only where the server cannot stream the file (streamExport below); a streamed file has no ceiling. */
|
|
30
30
|
export const EXPORT_MAX_ROWS = MAX_LIMIT;
|
|
31
31
|
/** A CSV document: a header row of column names, then one row per record. */
|
|
32
32
|
export function toCsv(columns, rows) {
|
|
@@ -172,10 +172,11 @@ export function saveExport(kind, table, columns, rows) {
|
|
|
172
172
|
/**
|
|
173
173
|
* All matching rows, as a file the server streams (`POST /api/export`):
|
|
174
174
|
* read in batches and written as each arrives, so neither side holds the
|
|
175
|
-
* whole result as objects and nothing is counted.
|
|
176
|
-
*
|
|
177
|
-
* the policy
|
|
178
|
-
*
|
|
175
|
+
* whole result as objects and nothing is counted. A tenant's file is asked
|
|
176
|
+
* on its lease (the shell's `tenant.exportFile`); a row-policy App's is read
|
|
177
|
+
* through the policy like its list. False where the server does not offer
|
|
178
|
+
* it — a support visit, whose every read is ledgered whole — and the caller
|
|
179
|
+
* exports through `/api/run` as before.
|
|
179
180
|
*
|
|
180
181
|
* @param {'csv' | 'json'} kind
|
|
181
182
|
* @param {string} table
|
|
@@ -185,19 +186,9 @@ export function saveExport(kind, table, columns, rows) {
|
|
|
185
186
|
*/
|
|
186
187
|
export async function streamExport(kind, table, q, columns) {
|
|
187
188
|
const identity = captureSessionIdentity();
|
|
188
|
-
|
|
189
|
+
const res = identity.tenantRequired ? await onLease(kind, q, columns) : await ordinary(identity, kind, q, columns);
|
|
190
|
+
if (!res)
|
|
189
191
|
return false;
|
|
190
|
-
const { url, payload } = scopeApiRequest('/api/export', { q, format: kind, columns }, state.activeConnection);
|
|
191
|
-
const res = await fetchServer(url, {
|
|
192
|
-
method: 'POST',
|
|
193
|
-
credentials: 'same-origin',
|
|
194
|
-
cache: 'no-store',
|
|
195
|
-
headers: {
|
|
196
|
-
'content-type': 'application/json',
|
|
197
|
-
...(identity.mode === 'authenticated' ? { 'x-mistri-account': identity.accountId } : {}),
|
|
198
|
-
},
|
|
199
|
-
body: JSON.stringify(payload),
|
|
200
|
-
});
|
|
201
192
|
/* The file is the one answer with a disposition; anything else is JSON
|
|
202
193
|
saying why not — a refusal to fall back from, or the query's error. */
|
|
203
194
|
if (res.ok && res.headers.get('content-disposition')) {
|
|
@@ -215,3 +206,33 @@ export async function streamExport(kind, table, q, columns) {
|
|
|
215
206
|
const said = await res.json().catch(() => null);
|
|
216
207
|
throw new Error(said?.errors?.[0]?.message ?? said?.error ?? say('theExportCouldNotBeRead'));
|
|
217
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* @param {ReturnType<typeof captureSessionIdentity>} identity
|
|
211
|
+
* @param {'csv' | 'json'} kind
|
|
212
|
+
* @param {string} q
|
|
213
|
+
* @param {string[]} columns
|
|
214
|
+
*/
|
|
215
|
+
function ordinary(identity, kind, q, columns) {
|
|
216
|
+
const { url, payload } = scopeApiRequest('/api/export', { q, format: kind, columns }, state.activeConnection);
|
|
217
|
+
return fetchServer(url, {
|
|
218
|
+
method: 'POST',
|
|
219
|
+
credentials: 'same-origin',
|
|
220
|
+
cache: 'no-store',
|
|
221
|
+
headers: {
|
|
222
|
+
'content-type': 'application/json',
|
|
223
|
+
...(identity.mode === 'authenticated' ? { 'x-mistri-account': identity.accountId } : {}),
|
|
224
|
+
},
|
|
225
|
+
body: JSON.stringify(payload),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* The file on the tenant's lease, or undefined where the shell sends none (tenantTransport.ts `tenantExport`).
|
|
230
|
+
*
|
|
231
|
+
* @param {'csv' | 'json'} kind
|
|
232
|
+
* @param {string} q
|
|
233
|
+
* @param {string[]} columns
|
|
234
|
+
*/
|
|
235
|
+
async function onLease(kind, q, columns) {
|
|
236
|
+
const exportFile = shell().tenant?.exportFile;
|
|
237
|
+
return exportFile ? await exportFile({ q, format: kind, columns }) : undefined;
|
|
238
|
+
}
|
package/dist/client/features.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@import './components/FilterRail.css';
|
|
8
8
|
@import './components/DateField.css';
|
|
9
9
|
@import './components/ListFilterBar.css';
|
|
10
|
-
@import './components/
|
|
10
|
+
@import './components/JsonPreview.css';
|
|
11
11
|
@import './components/ListEmpty.css';
|
|
12
12
|
@import './components/Notes.css';
|
|
13
13
|
/* The tool's own rules: the first layer (style.css names the order). */
|
|
@@ -445,6 +445,12 @@ body.app-mode .page-edit { font-family: var(--sans); }
|
|
|
445
445
|
.tab .tab-count { display: inline-grid; margin-left: var(--space-2h); color: var(--ink-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
|
|
446
446
|
.tab .tab-count::before, .tab .tab-count > span { grid-area: 1 / 1; }
|
|
447
447
|
.tab .tab-count::before { content: '00' / ''; visibility: hidden; }
|
|
448
|
+
/* A record's related tabs count the same way (an inferred page, PageRelated.tsx), in the tab's own small type, and
|
|
449
|
+
so does a related list alone, beside its heading. */
|
|
450
|
+
:is(.page-tab, .page-section-head) .tab-count { display: inline-grid; margin-left: var(--space-2h); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
|
|
451
|
+
:is(.page-tab, .page-section-head) .tab-count::before, :is(.page-tab, .page-section-head) .tab-count > span { grid-area: 1 / 1; }
|
|
452
|
+
:is(.page-tab, .page-section-head) .tab-count::before { content: '00' / ''; visibility: hidden; }
|
|
453
|
+
.page-tab[aria-selected="true"] .tab-count { color: inherit; }
|
|
448
454
|
/* The count takes the tab's ink whole: faded, it was 3.3:1 on a filled tab. */
|
|
449
455
|
.tab[aria-selected="true"] .tab-count { color: inherit; }
|
|
450
456
|
/* Quick filters: the list's key vocabularies as one-click conditions. */
|
|
@@ -799,6 +805,10 @@ body.first-run #db-label {
|
|
|
799
805
|
.dash-head .dash-description { padding: 0; margin: var(--space-2h) 0 0; max-width: 70ch; font-size: var(--text-md); line-height: 1.5; }
|
|
800
806
|
/* Filter controls already separate the heading from the dashboard body. */
|
|
801
807
|
.dash-head:has(+ div .dash-controls) { margin-bottom: 0; }
|
|
808
|
+
/* `head: 'compact'`: the title at a list's size on one line with its star, and the body close under it — a working
|
|
809
|
+
page whose own controls are its intro. Same gutters as the full head, so switching the form moves nothing sideways. */
|
|
810
|
+
.dash-head-compact { align-items: center; gap: var(--space-2h); width: 100%; margin-bottom: var(--space-3); }
|
|
811
|
+
.dash-head-compact .applist-title { margin: 0; }
|
|
802
812
|
.dash-strip { border: none; padding: 0; }
|
|
803
813
|
/* The refresh staging ground: rendered for real (fetches and chart
|
|
804
814
|
measurement need layout) but out of sight and out of the page's flow. */
|
|
@@ -835,6 +845,11 @@ body.first-run #db-label {
|
|
|
835
845
|
card's width (Chart.tsx, Sparkline), its stroke and dot keeping their size. */
|
|
836
846
|
.spark-host { display: block; align-self: stretch; margin-top: var(--space-3); height: 28px; width: 100%; min-width: 0; }
|
|
837
847
|
.spark { width: 100%; height: 28px; display: block; }
|
|
848
|
+
/* A run with fewer than four periods above zero is thin bars over a baseline, kept short: stretched across a wide card
|
|
849
|
+
they read as a chart of nothing (Chart.tsx, Sparkline). */
|
|
850
|
+
.spark-sparse { max-width: 160px; }
|
|
851
|
+
.spark-bar { fill: none; stroke: var(--spark-ink, var(--accent)); stroke-width: 3; stroke-linecap: butt; opacity: 0.75; }
|
|
852
|
+
.spark-base { fill: none; stroke: var(--line); stroke-width: 1; }
|
|
838
853
|
.spark-stroke { fill: none; stroke: var(--spark-ink, var(--accent)); stroke-width: 1.5; opacity: 0.75; }
|
|
839
854
|
/* The last point: a round cap on a zero-length stroke, round however far the spark stretches. */
|
|
840
855
|
.spark-dot { fill: none; stroke: var(--spark-ink, var(--accent)); stroke-width: 5; stroke-linecap: round; }
|
|
@@ -856,8 +871,12 @@ body.first-run #db-label {
|
|
|
856
871
|
class, so the outline could change and the page not: each look still sets
|
|
857
872
|
the type over this. */
|
|
858
873
|
.page-section-title { margin-block: 1em; font-size: 1.17em; font-weight: bold; }
|
|
859
|
-
|
|
860
|
-
|
|
874
|
+
/* "View all" is a way on, not a thing to read: muted ink with its arrow, and the underline and the ink only under the
|
|
875
|
+
pointer. A bold underlined link in link ink was the loudest word on a section whose rows were the point. */
|
|
876
|
+
button.ghost.dash-open { margin-left: auto; padding: var(--space-2) 0; border: 0; background: none; box-shadow: none; color: var(--ink-muted); font-size: var(--text-base); font-weight: 500; text-decoration: none; text-underline-offset: 3px; white-space: nowrap; }
|
|
877
|
+
/* The arrow is drawn, not said: the button's name stays "View all" (alt text after the slash). */
|
|
878
|
+
button.ghost.dash-open::after { content: ' →' / ''; }
|
|
879
|
+
button.ghost.dash-open:hover { color: var(--ink); background: none; text-decoration: underline; }
|
|
861
880
|
.dash-count { font-size: var(--text-sm); color: var(--ink-muted); font-family: var(--mono); }
|
|
862
881
|
/* Inside a card the grid's own stat row (count, timing, Export) was a
|
|
863
882
|
second strip of chrome between the title and the rows; the count worth
|
|
@@ -1217,6 +1236,8 @@ body.app-mode .sidebar[data-density="comfortable"] #table-list button { min-heig
|
|
|
1217
1236
|
body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-icon { width: var(--icon-ui); height: var(--icon-ui); }
|
|
1218
1237
|
body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-label { text-align: start; }
|
|
1219
1238
|
body.app-mode .sidebar[data-density="comfortable"] #table-list li.nav-group { margin-top: var(--space-5); }
|
|
1239
|
+
/* All pages closes the menu (sidebarModel.ts) after the last group: a heading's gap above it, so it does not read as that group's last room. */
|
|
1240
|
+
#table-list li:has(> [data-form="app:directory"]) { margin-top: var(--space-3h); }
|
|
1220
1241
|
/* A group's fold is its heading, not a room: the comfortable row above reached
|
|
1221
1242
|
it too, and a nested group was a 13px, 46px row beside 10px headings. */
|
|
1222
1243
|
body.app-mode .sidebar[data-density="comfortable"] #table-list li.nav-group .nav-group-fold { font: inherit; }
|
|
@@ -1400,9 +1421,6 @@ body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-dot { width:
|
|
|
1400
1421
|
.tn-all { margin-left: var(--space-2h); color: var(--ink-subtle); font-size: var(--text-sm); }
|
|
1401
1422
|
.tn-all:hover { color: var(--ink-muted); }
|
|
1402
1423
|
|
|
1403
|
-
/* A record hit in the palette: the row the words found. */
|
|
1404
|
-
.palette-kind.kind-record { color: var(--accent-ink); }
|
|
1405
|
-
|
|
1406
1424
|
/* Motion, by the doctrine in docs/design.md: popovers enter with a
|
|
1407
1425
|
160ms ease-out settle from their origin; leaving is instant; reduced
|
|
1408
1426
|
motion silences it (the peek card's @starting-style pattern). */
|
|
@@ -1453,6 +1471,16 @@ body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-dot { width:
|
|
|
1453
1471
|
margin: 0; font: 600 var(--text-md) var(--mono); letter-spacing: -0.01em;
|
|
1454
1472
|
flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
1455
1473
|
}
|
|
1474
|
+
/* The title of a form is the list's title step, not the 13px of a label under it (docs/design.md, Forms): the New
|
|
1475
|
+
drawer's and the dialogs that ask for fields (a record's New, a command, a field set over many) in an App; the
|
|
1476
|
+
Workbench's dialog keeps its own. It names what the form makes, so it wraps rather than being cut. */
|
|
1477
|
+
.newpanel .peekpanel-title {
|
|
1478
|
+
font: var(--heading-weight, 600) var(--type-list-title) / 1.2 var(--heading-font, var(--sans)); letter-spacing: var(--track-title);
|
|
1479
|
+
white-space: normal; overflow-wrap: anywhere;
|
|
1480
|
+
}
|
|
1481
|
+
body.app-mode .confirm:is(.insert-dialog, .command-form, .set-field-dialog) > h2 {
|
|
1482
|
+
font: var(--heading-weight, 600) var(--type-list-title) / 1.2 var(--heading-font, var(--sans)); letter-spacing: var(--track-title);
|
|
1483
|
+
}
|
|
1456
1484
|
.peekpanel-open { flex: none; font-size: var(--text-sm); color: var(--ink-muted); }
|
|
1457
1485
|
.peekpanel-open:hover { color: var(--ink); }
|
|
1458
1486
|
.peekpanel-close {
|
|
@@ -1671,6 +1699,11 @@ body.app-mode .sidebar[data-density="comfortable"] #table-list .nav-dot { width:
|
|
|
1671
1699
|
.picker-option.chosen .picker-option-label::before { content: '✓ '; }
|
|
1672
1700
|
.picker-option-detail { color: var(--ink-muted); font-size: var(--text-xs); }
|
|
1673
1701
|
.picker-option-label, .picker-option-detail { min-width: 0; overflow-wrap: anywhere; }
|
|
1702
|
+
/* A choice's second line (referenceSubline.ts): under its name, in the muted ink, where it tells two of one name apart. */
|
|
1703
|
+
.picker-option-name { display: grid; min-width: 0; }
|
|
1704
|
+
.picker-option-sub { min-width: 0; overflow-wrap: anywhere; color: var(--ink-muted); font-size: var(--text-sm); }
|
|
1705
|
+
/* motion-ok: the second line takes its option's tint, which the option's own :hover above sets wherever it is drawn */
|
|
1706
|
+
.picker-option.active .picker-option-sub, .picker-option:hover .picker-option-sub { color: inherit; }
|
|
1674
1707
|
.picker-empty { padding: var(--space-2h) var(--space-3); color: var(--ink-muted); font-size: var(--text-sm); }
|
|
1675
1708
|
.picker-chips { display: contents; }
|
|
1676
1709
|
.picker-chip { display: inline-flex; align-items: center; gap: var(--space-2); padding: 1px var(--space-2) 1px var(--space-3); border-radius: 999px;
|
|
@@ -1714,6 +1747,15 @@ body.app-mode .insert-field .req { color: var(--status-critical); font-size: var
|
|
|
1714
1747
|
dialog keeps the schema's label-beside-value. */
|
|
1715
1748
|
.insert-form-app .insert-fields { gap: var(--field-gap); padding-right: 0; }
|
|
1716
1749
|
.insert-form-app .insert-group-fields { gap: calc(var(--space-6) - var(--space-2)); }
|
|
1750
|
+
/* Fields are laid on a grid of 200px-or-wider cells: a field takes the whole row, and a short answer (a count, an
|
|
1751
|
+
amount, a day, a time — `data-kind`, which Field and the New form's field set from the data) takes one cell, so
|
|
1752
|
+
consecutive short answers share a row and wrap at narrow widths, one to a row where two cells do not fit (the
|
|
1753
|
+
`min(…, 100%)` keeps a 320px page at one column and no sideways scroll). Decided from the data kinds in order,
|
|
1754
|
+
never measured, so no answer moves another (docs/design.md, Forms). An author's own row (`.form-columns`) is one
|
|
1755
|
+
whole-row item and keeps its own columns. */
|
|
1756
|
+
:is(.insert-form-app .insert-group-fields, .command-fields) { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); column-gap: var(--space-5); align-items: start; }
|
|
1757
|
+
:is(.insert-form-app .insert-group-fields, .command-fields) > * { grid-column: 1 / -1; min-width: 0; }
|
|
1758
|
+
:is(.insert-form-app .insert-group-fields, .command-fields) > [data-kind] { grid-column: auto; }
|
|
1717
1759
|
.insert-form-app .insert-field { grid-template-columns: minmax(0, 1fr); gap: var(--space-2h); align-items: stretch; }
|
|
1718
1760
|
/* The label sits in a row with its optional word, so the row's label is named as well as a bare one: `> :is(label,
|
|
1719
1761
|
.form-field-label-row > label)` matched only the bare one, and the muted 12px Workbench rule drew the rest. */
|
|
@@ -1811,6 +1853,10 @@ body.signed-out .brand-db,
|
|
|
1811
1853
|
body.signed-out .conn-picker,
|
|
1812
1854
|
body.signed-out .topbar-actions,
|
|
1813
1855
|
body.signed-out #explain-pane { display: none; }
|
|
1856
|
+
/* The sign-in door draws no bar at all: the App's mark stands over its card (SignIn.tsx, appBrand.css), so the first
|
|
1857
|
+
thing on the screen is the card, centered, and not a header with nothing else in it. An OAuth consent screen keeps
|
|
1858
|
+
its bar. `!important` so a shell layout's own display for the bar (topnav, rail) cannot bring it back. */
|
|
1859
|
+
body.signin-door .topbar { display: none !important; }
|
|
1814
1860
|
body.signed-out .brand { min-width: 0; max-width: 100%; pointer-events: none; }
|
|
1815
1861
|
body.signed-out .brand-mark { flex-shrink: 0; }
|
|
1816
1862
|
body.signed-out .brand-name { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
|
|
@@ -1912,7 +1958,10 @@ body.session-locked > :not(#session-lock) { display: none !important; }
|
|
|
1912
1958
|
|
|
1913
1959
|
/* Totals: one footer row, each sum over everything the list's conditions
|
|
1914
1960
|
match, set apart from the rows by a rule rather than a colour. */
|
|
1915
|
-
|
|
1961
|
+
/* A sum is the one figure that is never cut (docs/design.md): the column is sized by it (gridSizing.ts), and where a
|
|
1962
|
+
font that arrived late or a narrower weight still leaves it short it spills into the cell's padding rather than
|
|
1963
|
+
draw "$102,795....". */
|
|
1964
|
+
.grid-totals td { font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0; background: var(--surface); overflow: visible; text-overflow: clip; }
|
|
1916
1965
|
.grid-totals-label { font-weight: 500; color: var(--ink-muted); }
|
|
1917
1966
|
.grid-totals-pending { color: var(--ink-subtle); }
|
|
1918
1967
|
|
|
@@ -2006,6 +2055,17 @@ body.app-mode th .pk { display: none; }
|
|
|
2006
2055
|
/* The view's verbs remain one group at the end of the same scrolling row. */
|
|
2007
2056
|
.applist-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: var(--space-2); flex: none; }
|
|
2008
2057
|
.applist-actions:empty { display: none; }
|
|
2058
|
+
/* Rows or a board (LayoutSwitch.tsx): a segmented pair of marks, the phone's Records/Table switch drawn at every width. */
|
|
2059
|
+
.list-layout { display: inline-flex; }
|
|
2060
|
+
.list-layout-seg {
|
|
2061
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
2062
|
+
min-width: 34px; min-height: 30px; padding: 0 var(--space-2);
|
|
2063
|
+
border: 1px solid var(--line-control); background: transparent; color: var(--ink-muted);
|
|
2064
|
+
}
|
|
2065
|
+
.list-layout-seg:first-child { border-radius: var(--radius-item) 0 0 var(--radius-item); }
|
|
2066
|
+
.list-layout-seg:last-child { border-radius: 0 var(--radius-item) var(--radius-item) 0; margin-inline-start: -1px; }
|
|
2067
|
+
.list-layout-seg[aria-pressed="true"] { background: var(--raised); color: var(--accent-ink); border-color: var(--accent); position: relative; }
|
|
2068
|
+
.list-layout-seg:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 1px; }
|
|
2009
2069
|
/* Where the rail folds into its sheet, the strip's one row scrolls and the
|
|
2010
2070
|
verbs sit at its end — so Filters, which is now the only way to reach the
|
|
2011
2071
|
facets at all, was off the right edge behind a horizontal scroll nobody
|
package/dist/client/index.html
CHANGED
|
@@ -190,7 +190,8 @@
|
|
|
190
190
|
id="search-button"
|
|
191
191
|
class="icon-button"
|
|
192
192
|
title="Go to a table, view or database (⌘K)"
|
|
193
|
-
aria-label="Search"
|
|
193
|
+
aria-label="Search ⌘K"
|
|
194
|
+
aria-keyshortcuts="Meta+K Control+K"
|
|
194
195
|
>
|
|
195
196
|
<!-- In an App the button is the search box (app.js adds .tn-search):
|
|
196
197
|
a mark, a word and the key. A bare "⌘K" was a shortcut with no
|
package/dist/client/insert.js
CHANGED
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
import { ownedBy } from './requestIdentity.js';
|
|
15
15
|
import { createElement } from 'react';
|
|
16
16
|
import { allowMutationExit, api, columnDisplay, columnLabel, currentEntry, el, findTable, go, humanName, openRecord, prefersPages, rowLabel, state, toast, whenConnectionChanges, writeAllowed, } from './core.js';
|
|
17
|
-
// The App through the bridge: appnav.js would pull the page's whole tangle of imports in here (uiBridge.ts).
|
|
18
|
-
import { pageBridge } from './uiBridge.js';
|
|
19
17
|
import { syncHash } from './url.js';
|
|
20
18
|
import { mount, unmount } from './components/mount.js';
|
|
21
19
|
import { onDemand } from './components/onDemand.js';
|
|
@@ -200,12 +198,7 @@ export function formProps(table, form, host, close, onAdded, options = {}) {
|
|
|
200
198
|
},
|
|
201
199
|
target: (id) => findTable(id),
|
|
202
200
|
/* How the App dresses each column: a vocabulary's words, money's currency. */
|
|
203
|
-
...(app
|
|
204
|
-
? {
|
|
205
|
-
display: (column) => columnDisplay(table.id, column.name),
|
|
206
|
-
appName: /** @type {{ name?: string } | null} */ (pageBridge.activeApp())?.name,
|
|
207
|
-
}
|
|
208
|
-
: {}),
|
|
201
|
+
...(app ? { display: (column) => columnDisplay(table.id, column.name) } : {}),
|
|
209
202
|
insert: (values, extra) => {
|
|
210
203
|
if (!connection || !current())
|
|
211
204
|
throw new InsertRefusal(say('theConnectionOrView'));
|
package/dist/client/locale.d.ts
CHANGED
|
@@ -85,6 +85,13 @@ export declare function formatDate(value: string | number | Date, options?: Intl
|
|
|
85
85
|
* said in the reader's own zone.
|
|
86
86
|
*/
|
|
87
87
|
export declare function formatDateTime(value: string | number | Date, options?: Intl.DateTimeFormatOptions): string;
|
|
88
|
+
/**
|
|
89
|
+
* Two stored moments as one range, the end saying only what the start did not: "Sep 13, 2026, 2:00 – 4:00 PM" on
|
|
90
|
+
* one day, "Sep 13, 2026, 2:00 PM – Sep 14, 2026, 9:00 AM" across two, "Mar 4 – 6, 2026" for days. Each is read as
|
|
91
|
+
* formatDateTime reads it; null where either is no date, they are said in different zones, or the end is before
|
|
92
|
+
* the start (a range that runs backwards is two facts, not one).
|
|
93
|
+
*/
|
|
94
|
+
export declare function formatSpan(start: string, end: string): string | null;
|
|
88
95
|
/**
|
|
89
96
|
* A stored day or moment said absolutely, the same words on any day and for any reader (`format: 'date'` and
|
|
90
97
|
* `'datetime'`, and every date on a document's paper). A date alone is its calendar day and never shifts, whatever
|
package/dist/client/locale.js
CHANGED
|
Binary file
|
|
@@ -358,16 +358,9 @@
|
|
|
358
358
|
:root[data-look-section='card'] .page-section-title .dash-section-icon {
|
|
359
359
|
color: var(--ink-muted);
|
|
360
360
|
}
|
|
361
|
-
/* "View all" in the
|
|
361
|
+
/* "View all" in the muted ink with its arrow (features.css), a step smaller in a card. */
|
|
362
362
|
:root[data-look-section='card'] .dash-open {
|
|
363
|
-
color: var(--link);
|
|
364
|
-
font-weight: 600;
|
|
365
363
|
font-size: var(--text-sm);
|
|
366
|
-
text-decoration: none;
|
|
367
|
-
}
|
|
368
|
-
:root[data-look-section='card'] .dash-open:hover {
|
|
369
|
-
text-decoration: underline;
|
|
370
|
-
text-underline-offset: 3px;
|
|
371
364
|
}
|
|
372
365
|
|
|
373
366
|
/* A stat card: its mark in a tinted circle, the label beside it, the figure
|
|
@@ -962,14 +955,16 @@
|
|
|
962
955
|
:root[data-look-buttons='raised'] .applist-search-input:focus {
|
|
963
956
|
background: var(--surface);
|
|
964
957
|
}
|
|
965
|
-
:
|
|
958
|
+
/* `filters: 'quiet'`: a filter not yet asked for has no edge until a pointer is over it. Its own recipe, worn by
|
|
959
|
+
Lumen beside its raised buttons, so a theme may pick either without the other. */
|
|
960
|
+
:root[data-look-filters='quiet'] .applist-add {
|
|
966
961
|
height: 30px;
|
|
967
962
|
padding: 0 var(--space-3);
|
|
968
963
|
border: 1px solid transparent;
|
|
969
964
|
color: var(--ink-muted);
|
|
970
965
|
font-weight: 500;
|
|
971
966
|
}
|
|
972
|
-
:root[data-look-
|
|
967
|
+
:root[data-look-filters='quiet'] .applist-add:is(:hover, [aria-expanded='true']) {
|
|
973
968
|
border-color: transparent;
|
|
974
969
|
background: var(--raised);
|
|
975
970
|
color: var(--ink);
|
|
@@ -1705,12 +1700,14 @@
|
|
|
1705
1700
|
/* ---------- Meaning, quiet ---------- */
|
|
1706
1701
|
/* A status is a dot and its word, the word in the ink: only the dot is coloured, so "Collected" and "Waiting
|
|
1707
1702
|
on parts" weigh the same until one needs a hand. What asks for attention (warn, bad) says its word in its
|
|
1708
|
-
colour too; a neutral value's dot is grey and its word keeps the cell's weight, so the column scans.
|
|
1703
|
+
colour too; a neutral value's dot is grey and its word keeps the cell's weight, so the column scans. Every
|
|
1704
|
+
look that draws a dot now says this in a cell and a field (themeFamilies.css); `quiet` says it everywhere
|
|
1705
|
+
a tone is drawn, with the smaller dot. */
|
|
1709
1706
|
html:root[data-look-status='quiet'] .tone:not(.record-tag, .tone-neutral) {
|
|
1710
1707
|
--tone-dot: var(--status-info);
|
|
1711
1708
|
gap: 7px;
|
|
1712
1709
|
color: var(--ink);
|
|
1713
|
-
font-weight:
|
|
1710
|
+
font-weight: 400;
|
|
1714
1711
|
}
|
|
1715
1712
|
html:root[data-look-status='quiet'] .tone.tone-neutral:not(.record-tag) {
|
|
1716
1713
|
--tone-dot: color-mix(in srgb, var(--ink-subtle) 50%, var(--surface));
|
package/dist/client/page.css
CHANGED
|
@@ -650,11 +650,37 @@
|
|
|
650
650
|
.page-head.has-record .page-head-top {
|
|
651
651
|
margin-bottom: var(--space-2);
|
|
652
652
|
}
|
|
653
|
-
/* The
|
|
653
|
+
/* The head does not sit on the trail's rule above it: a step of the title's size (20px, four fifths), so the
|
|
654
654
|
two read as two things. A room that draws the head without a trail over it (a dialog) takes it back. */
|
|
655
655
|
.page-head.has-record {
|
|
656
656
|
margin-top: var(--space-5);
|
|
657
657
|
}
|
|
658
|
+
/* Under an App's trail the kind is heard and not seen (PageHead.tsx): the trail already says where the record is,
|
|
659
|
+
so its row keeps no height and the name leads the head. Static, so the head is one height from its first paint. */
|
|
660
|
+
.page-head.has-trail > .page-head-top {
|
|
661
|
+
margin-bottom: 0;
|
|
662
|
+
}
|
|
663
|
+
/* An inferred page's line under the name (PageHead.tsx): the name column's second line, as a list draws it under a
|
|
664
|
+
name, in the muted ink and the facts' size, in the name's column. It wraps rather than cutting an address short. */
|
|
665
|
+
.page-head.has-record > .page-head-subtitle {
|
|
666
|
+
grid-column: 1;
|
|
667
|
+
min-width: 0;
|
|
668
|
+
margin: var(--space-1) 0 0;
|
|
669
|
+
font: 400 var(--text-md) / 1.4 var(--sans);
|
|
670
|
+
color: var(--ink-muted);
|
|
671
|
+
overflow-wrap: anywhere;
|
|
672
|
+
}
|
|
673
|
+
.page-head-subtitle :is(a, .value-link, .ref-jump) {
|
|
674
|
+
color: inherit;
|
|
675
|
+
text-decoration: none;
|
|
676
|
+
}
|
|
677
|
+
@media (hover: hover) {
|
|
678
|
+
.page-head-subtitle :is(a, .value-link, .ref-jump):hover {
|
|
679
|
+
color: var(--link);
|
|
680
|
+
text-decoration: underline;
|
|
681
|
+
text-underline-offset: 3px;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
658
684
|
.page-group-empty {
|
|
659
685
|
margin: var(--space-2) 0 0;
|
|
660
686
|
font: var(--text-base) var(--mono);
|
|
@@ -831,12 +857,18 @@
|
|
|
831
857
|
.page-head-more > .page-head-facts {
|
|
832
858
|
margin-top: var(--space-3);
|
|
833
859
|
}
|
|
860
|
+
/* The caption is a line of its own and the value the next, with what the host adorns it with (a decision's
|
|
861
|
+
suggestion, decisionAdornment.tsx) beside the value on that line: stacked under it as a third, a suggestion
|
|
862
|
+
that came after the head painted grew it a line and moved the whole page down. */
|
|
834
863
|
.page-head-facts > .page-fact:has(> .page-fact-caption) {
|
|
835
|
-
flex-
|
|
836
|
-
align-items:
|
|
837
|
-
gap: var(--space-1);
|
|
864
|
+
flex-flow: row wrap;
|
|
865
|
+
align-items: baseline;
|
|
866
|
+
gap: var(--space-1) var(--space-3);
|
|
838
867
|
min-width: 0;
|
|
839
868
|
}
|
|
869
|
+
.page-head-facts > .page-fact > .page-fact-caption {
|
|
870
|
+
flex-basis: 100%;
|
|
871
|
+
}
|
|
840
872
|
.page-fact-caption {
|
|
841
873
|
font: 500 var(--text-sm)/1.4 var(--sans);
|
|
842
874
|
color: var(--ink-muted);
|
|
@@ -859,7 +891,7 @@
|
|
|
859
891
|
flex-basis: 100%;
|
|
860
892
|
margin-inline-start: 0;
|
|
861
893
|
}
|
|
862
|
-
.page-head.has-record > :is(.page-head-facts, .page-head-more) {
|
|
894
|
+
.page-head.has-record > :is(.page-head-subtitle, .page-head-facts, .page-head-more) {
|
|
863
895
|
grid-column: 1 / -1;
|
|
864
896
|
order: -1;
|
|
865
897
|
}
|
|
@@ -891,7 +923,7 @@
|
|
|
891
923
|
flex-basis: 100%;
|
|
892
924
|
margin-inline-start: 0;
|
|
893
925
|
}
|
|
894
|
-
.page-head.has-record > :is(.page-head-facts, .page-head-more) {
|
|
926
|
+
.page-head.has-record > :is(.page-head-subtitle, .page-head-facts, .page-head-more) {
|
|
895
927
|
grid-column: 1 / -1;
|
|
896
928
|
order: -1;
|
|
897
929
|
}
|
|
@@ -1976,9 +2008,6 @@
|
|
|
1976
2008
|
flex-direction: column;
|
|
1977
2009
|
gap: var(--space-2h);
|
|
1978
2010
|
}
|
|
1979
|
-
.timeline-composer.is-note .timeline-input {
|
|
1980
|
-
background: color-mix(in srgb, var(--status-warning) 8%, var(--surface));
|
|
1981
|
-
}
|
|
1982
2011
|
/* A small segmented control: the pressed segment is filled, and the note segment wears the warning tint the
|
|
1983
2012
|
box takes in note mode, so which of the two a send goes out as is never a guess (a note sent as a reply
|
|
1984
2013
|
reaches the resident). */
|
|
@@ -2014,11 +2043,7 @@
|
|
|
2014
2043
|
.timeline-mode.is-note[aria-pressed='true'] {
|
|
2015
2044
|
background: color-mix(in srgb, var(--status-warning) 16%, var(--surface));
|
|
2016
2045
|
}
|
|
2017
|
-
/* The
|
|
2018
|
-
ground in dark mode. */
|
|
2019
|
-
.timeline-input {
|
|
2020
|
-
min-height: 4.5rem;
|
|
2021
|
-
}
|
|
2046
|
+
/* The box the words, the toolbar and Send share is TimelineComposer.css (the mistri package draws the composer). */
|
|
2022
2047
|
.timeline-composer-foot {
|
|
2023
2048
|
display: flex;
|
|
2024
2049
|
justify-content: flex-end;
|
|
@@ -3038,6 +3063,13 @@
|
|
|
3038
3063
|
outline: var(--focus-width) solid var(--focus);
|
|
3039
3064
|
outline-offset: -2px;
|
|
3040
3065
|
}
|
|
3066
|
+
/* The title's second line (its column's `subtitle`): another column of the record, said quietly and close under it. */
|
|
3067
|
+
.cards-subtitle {
|
|
3068
|
+
margin: calc(var(--space-1) - var(--space-2h)) 0 0;
|
|
3069
|
+
font: 400 var(--text-sm)/1.35 var(--sans);
|
|
3070
|
+
color: var(--ink-muted);
|
|
3071
|
+
overflow-wrap: anywhere;
|
|
3072
|
+
}
|
|
3041
3073
|
.cards-description {
|
|
3042
3074
|
margin: 0;
|
|
3043
3075
|
color: var(--ink-muted);
|
|
@@ -3284,7 +3316,20 @@
|
|
|
3284
3316
|
white-space: nowrap;
|
|
3285
3317
|
vertical-align: middle;
|
|
3286
3318
|
}
|
|
3319
|
+
/* A chip keeps its own width: a flex item may shrink, and a `.tone` clips its label, so a chip in a narrow cell was
|
|
3320
|
+
squeezed to "accessib" and the fit below, which measures the chips, read them narrower than they are and kept
|
|
3321
|
+
too many. Only a lone chip wider than the cell (`data-lone`) is allowed to give way, with its ellipsis. */
|
|
3322
|
+
.tags-cell-list > .record-tag {
|
|
3323
|
+
flex: none;
|
|
3324
|
+
max-width: none;
|
|
3325
|
+
}
|
|
3326
|
+
.tags-cell-list[data-lone] > .record-tag {
|
|
3327
|
+
flex: 0 1 auto;
|
|
3328
|
+
min-width: 0;
|
|
3329
|
+
max-width: 100%;
|
|
3330
|
+
}
|
|
3287
3331
|
.tags-cell-more {
|
|
3332
|
+
flex: none;
|
|
3288
3333
|
color: var(--ink-muted);
|
|
3289
3334
|
font-size: var(--text-sm);
|
|
3290
3335
|
}
|
|
@@ -3746,8 +3791,10 @@
|
|
|
3746
3791
|
text-decoration: underline;
|
|
3747
3792
|
text-underline-offset: 3px;
|
|
3748
3793
|
}
|
|
3794
|
+
/* "View home →" is a way on, as a section's "View all" is (features.css): muted, its arrow always, the ink and the
|
|
3795
|
+
underline under the pointer. */
|
|
3749
3796
|
button.ref-jump.page-card-more {
|
|
3750
|
-
color: var(--
|
|
3797
|
+
color: var(--ink-muted);
|
|
3751
3798
|
font: 500 var(--text-base) var(--sans);
|
|
3752
3799
|
}
|
|
3753
3800
|
button.ref-jump.page-card-more::after {
|
|
@@ -3755,6 +3802,7 @@
|
|
|
3755
3802
|
}
|
|
3756
3803
|
button.ref-jump.page-card-more:hover {
|
|
3757
3804
|
background: none;
|
|
3805
|
+
color: var(--ink);
|
|
3758
3806
|
text-decoration: underline;
|
|
3759
3807
|
text-underline-offset: 3px;
|
|
3760
3808
|
}
|
package/dist/client/palette.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ export type PaletteItem = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
search: string;
|
|
5
5
|
detail?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
room?: string;
|
|
6
8
|
run: () => unknown;
|
|
7
9
|
};
|
|
8
|
-
/** @typedef {{ kind: string, label: string, search: string, detail?: string, run: () => unknown }} PaletteItem */
|
|
10
|
+
/** @typedef {{ kind: string, label: string, search: string, detail?: string, icon?: string, room?: string, run: () => unknown }} PaletteItem */
|
|
9
11
|
/**
|
|
10
12
|
* @param {'places' | 'databases'} where @param {() => PaletteItem[]} source
|
|
11
13
|
* @public the database browser's (scripts/boundary/entries.json, "host")
|
package/dist/client/palette.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { createElement } from 'react';
|
|
21
21
|
import { message, subscribeMessages } from './messages.js';
|
|
22
|
-
import { $, el, findTable, go, pageView, state, tableView, svgEl } from './core.js';
|
|
22
|
+
import { $, currentEntry, el, findTable, go, pageView, state, subscribeWalk, tableView, svgEl } from './core.js';
|
|
23
23
|
import { allSavedFilters } from './views.js';
|
|
24
24
|
import { historyFor } from './history.js';
|
|
25
25
|
import { detailOf, menuItems, menuMode } from './menu.js';
|
|
@@ -31,6 +31,7 @@ import { appMenu, appRooms, isListRoom, roomPageId } from './components/appRooms
|
|
|
31
31
|
import { navigationPaths } from './components/navigationTree.js';
|
|
32
32
|
import { plural } from './locale.js';
|
|
33
33
|
import { say } from './copy/shell/palette.js';
|
|
34
|
+
import { noteVisit } from './paletteRecents.js';
|
|
34
35
|
import { addHostListener, portalRoot, shellBody, shellQuery } from './shellHost.js';
|
|
35
36
|
/**
|
|
36
37
|
* What a shell adds to the palette beyond the kit's own: places among the
|
|
@@ -40,7 +41,7 @@ import { addHostListener, portalRoot, shellBody, shellQuery } from './shellHost.
|
|
|
40
41
|
* @type {{ places: Array<() => PaletteItem[]>, databases: Array<() => PaletteItem[]> }}
|
|
41
42
|
*/
|
|
42
43
|
const sources = { places: [], databases: [] };
|
|
43
|
-
/** @typedef {{ kind: string, label: string, search: string, detail?: string, run: () => unknown }} PaletteItem */
|
|
44
|
+
/** @typedef {{ kind: string, label: string, search: string, detail?: string, icon?: string, room?: string, run: () => unknown }} PaletteItem */
|
|
44
45
|
/**
|
|
45
46
|
* @param {'places' | 'databases'} where @param {() => PaletteItem[]} source
|
|
46
47
|
* @public the database browser's (scripts/boundary/entries.json, "host")
|
|
@@ -65,6 +66,9 @@ export function entries() {
|
|
|
65
66
|
label: entry.label,
|
|
66
67
|
search: `${entry.label} ${groups.join(' ')}`,
|
|
67
68
|
detail: groups.length ? groups.join(' / ') : undefined,
|
|
69
|
+
/* The room's own mark, and its key, which the Recent group finds it by (paletteRecents.ts). */
|
|
70
|
+
icon: entry.icon,
|
|
71
|
+
room: entry.id,
|
|
68
72
|
run: () => go(isListRoom(entry)
|
|
69
73
|
? { ...tableView(entry.table, appListQuery(entry)), view: entry.id }
|
|
70
74
|
: pageView(/** @type {string} */ (roomPageId(entry)), undefined, undefined, entry.label), 'reset'),
|
|
@@ -183,6 +187,11 @@ function closePalette() {
|
|
|
183
187
|
* query bar, which is where the hands usually are.
|
|
184
188
|
*/
|
|
185
189
|
export function initPalette() {
|
|
190
|
+
/* Where an App's reader has been, for the palette's Recent group: noted on every tick of the walk, in memory only. */
|
|
191
|
+
subscribeWalk(() => {
|
|
192
|
+
if (shell().inApp())
|
|
193
|
+
noteVisit(currentEntry());
|
|
194
|
+
});
|
|
186
195
|
addHostListener(document, 'keydown', (e) => {
|
|
187
196
|
if (e.key !== 'k' || !(e.metaKey || e.ctrlKey))
|
|
188
197
|
return;
|
|
@@ -275,8 +284,14 @@ export function initSidebarToggle() {
|
|
|
275
284
|
back: it takes the reveal's words and direction. */
|
|
276
285
|
const rail = shellBody().classList.contains('app-nav-rail');
|
|
277
286
|
const back = next && rail;
|
|
278
|
-
|
|
279
|
-
|
|
287
|
+
/* An App's button is named by what it folds, the menu, and its name starts with the word it shows
|
|
288
|
+
("Collapse"; WCAG 2.5.3, label in name). Made of the words the catalog has, "Collapse menu" / "Contraer menú",
|
|
289
|
+
so no language pays for two more. The Workbench's hides its table list and shows no word. */
|
|
290
|
+
const menuWord = message('navigation.menu').toLocaleLowerCase();
|
|
291
|
+
const appName = `${back ? message('navigation.expand') : message('navigation.collapse')} ${menuWord}`;
|
|
292
|
+
collapse.setAttribute('aria-label', inApp ? appName : back ? say('showTheTableList') : say('hideTheTableList'));
|
|
293
|
+
collapse.title = inApp ? `${appName} (⌘B)` : back ? say('showTheTableListB') : say('hideTheTableListB');
|
|
294
|
+
reveal.setAttribute('aria-label', inApp ? `${message('navigation.expand')} ${menuWord}` : say('showTheTableList'));
|
|
280
295
|
collapse.replaceChildren(chevrons(back ? 'right' : 'left'), ...(inApp ? [el('span', { class: 'sidebar-collapse-label' }, [message('navigation.collapse')])] : []));
|
|
281
296
|
collapse.setAttribute('aria-expanded', String(!next));
|
|
282
297
|
reveal.setAttribute('aria-expanded', String(!next));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** What the walk's entry says about where it stands; only what a visit reads. */
|
|
2
|
+
interface WalkEntry {
|
|
3
|
+
kind?: string;
|
|
4
|
+
view?: unknown;
|
|
5
|
+
pageId?: unknown;
|
|
6
|
+
table?: unknown;
|
|
7
|
+
key?: unknown;
|
|
8
|
+
label?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type Visit = {
|
|
11
|
+
id: string;
|
|
12
|
+
room: string;
|
|
13
|
+
} | {
|
|
14
|
+
id: string;
|
|
15
|
+
table: string;
|
|
16
|
+
key: Record<string, unknown>;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
/** Note where the walk now stands. Called on every tick of the walk, so a repeat is cheap and moves nothing. */
|
|
20
|
+
export declare function noteVisit(entry: WalkEntry | undefined): void;
|
|
21
|
+
/** The visits before this one, newest first: where you were, which is not where you are. */
|
|
22
|
+
export declare function recentVisits(): Visit[];
|
|
23
|
+
/** Forget everything (the session changed hands, or a test starts over). */
|
|
24
|
+
export declare function forgetVisits(): void;
|
|
25
|
+
export {};
|