@mistriwork/kit 1.0.0-rc.17 → 1.0.0-rc.19

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 (102) hide show
  1. package/dist/client/components/AppList.js +16 -6
  2. package/dist/client/components/Chart.css +5 -0
  3. package/dist/client/components/Chart.d.ts +17 -2
  4. package/dist/client/components/Chart.js +83 -22
  5. package/dist/client/components/ChartFigure.d.ts +3 -1
  6. package/dist/client/components/ChartFigure.js +14 -8
  7. package/dist/client/components/Content.js +3 -1
  8. package/dist/client/components/DashHead.d.ts +6 -0
  9. package/dist/client/components/DashHead.js +20 -0
  10. package/dist/client/components/Editable.js +1 -1
  11. package/dist/client/components/Grid.js +33 -4
  12. package/dist/client/components/JsonPreview.css +29 -0
  13. package/dist/client/components/JsonPreview.js +1 -1
  14. package/dist/client/components/JsonView.css +201 -62
  15. package/dist/client/components/JsonView.d.ts +43 -1
  16. package/dist/client/components/JsonView.js +320 -55
  17. package/dist/client/components/LayoutSwitch.d.ts +9 -0
  18. package/dist/client/components/LayoutSwitch.js +61 -0
  19. package/dist/client/components/ListEmpty.css +3 -0
  20. package/dist/client/components/ListFilterBar.js +1 -1
  21. package/dist/client/components/LiveNotices.css +3 -0
  22. package/dist/client/components/NewRecord.d.ts +0 -2
  23. package/dist/client/components/NewRecord.js +61 -17
  24. package/dist/client/components/PageFields.js +22 -3
  25. package/dist/client/components/PageHead.js +26 -6
  26. package/dist/client/components/PageRelated.d.ts +28 -0
  27. package/dist/client/components/PageRelated.js +50 -3
  28. package/dist/client/components/PageSectionBox.d.ts +5 -1
  29. package/dist/client/components/PageSectionBox.js +5 -3
  30. package/dist/client/components/PageSections.js +26 -13
  31. package/dist/client/components/PageSkeleton.css +2 -0
  32. package/dist/client/components/PageSkeleton.js +11 -3
  33. package/dist/client/components/Palette.js +108 -10
  34. package/dist/client/components/RecordPicker.d.ts +2 -0
  35. package/dist/client/components/RecordPicker.js +34 -8
  36. package/dist/client/components/RecordSummaries.js +6 -1
  37. package/dist/client/components/Rooms.js +2 -2
  38. package/dist/client/components/TableRoom.js +15 -5
  39. package/dist/client/components/TableView.d.ts +2 -0
  40. package/dist/client/components/Value.js +1 -1
  41. package/dist/client/components/appListModel.d.ts +4 -0
  42. package/dist/client/components/appRooms.d.ts +2 -0
  43. package/dist/client/components/appRooms.js +2 -0
  44. package/dist/client/components/dashboardModel.d.ts +5 -0
  45. package/dist/client/components/directoryModel.d.ts +25 -0
  46. package/dist/client/components/directoryModel.js +88 -0
  47. package/dist/client/components/gridSizing.d.ts +3 -0
  48. package/dist/client/components/gridSizing.js +6 -2
  49. package/dist/client/components/jsonTree.d.ts +54 -0
  50. package/dist/client/components/jsonTree.js +190 -0
  51. package/dist/client/components/listSubtitles.d.ts +1 -0
  52. package/dist/client/components/listSubtitles.js +7 -0
  53. package/dist/client/components/newMenuModel.d.ts +14 -6
  54. package/dist/client/components/newMenuModel.js +37 -5
  55. package/dist/client/components/newRecordModel.d.ts +24 -2
  56. package/dist/client/components/newRecordModel.js +47 -4
  57. package/dist/client/components/pageContext.d.ts +2 -0
  58. package/dist/client/components/pageModel.d.ts +2 -0
  59. package/dist/client/components/sidebarModel.js +7 -3
  60. package/dist/client/composedReads.js +3 -1
  61. package/dist/client/copy/filters/components/ListFilterBar.d.ts +1 -1
  62. package/dist/client/copy/filters/components/ListFilterBar.js +2 -1
  63. package/dist/client/copy/lists/components/AppList.d.ts +1 -0
  64. package/dist/client/copy/lists/components/AppList.js +1 -0
  65. package/dist/client/copy/lists/components/LayoutSwitch.d.ts +4 -0
  66. package/dist/client/copy/lists/components/LayoutSwitch.js +6 -0
  67. package/dist/client/copy/record/components/JsonView.d.ts +22 -0
  68. package/dist/client/copy/record/components/JsonView.js +19 -0
  69. package/dist/client/copy/record/components/PageHead.d.ts +1 -0
  70. package/dist/client/copy/record/components/PageHead.js +2 -0
  71. package/dist/client/copy/shell/components/Palette.d.ts +11 -0
  72. package/dist/client/copy/shell/components/Palette.js +14 -0
  73. package/dist/client/copy/shell/components/TopNav.d.ts +2 -1
  74. package/dist/client/copy/shell/components/TopNav.js +4 -2
  75. package/dist/client/copy/shell/components/directoryModel.d.ts +4 -0
  76. package/dist/client/copy/shell/components/directoryModel.js +6 -0
  77. package/dist/client/copy/shell/components/sidebarModel.d.ts +1 -0
  78. package/dist/client/copy/shell/components/sidebarModel.js +1 -0
  79. package/dist/client/core.d.ts +3 -3
  80. package/dist/client/core.js +6 -7
  81. package/dist/client/features.css +67 -7
  82. package/dist/client/index.html +2 -1
  83. package/dist/client/insert.js +1 -8
  84. package/dist/client/locale.d.ts +7 -0
  85. package/dist/client/locale.js +0 -0
  86. package/dist/client/lumenLook.css +12 -13
  87. package/dist/client/page.css +56 -15
  88. package/dist/client/palette.d.ts +3 -1
  89. package/dist/client/palette.js +19 -4
  90. package/dist/client/paletteRecents.d.ts +25 -0
  91. package/dist/client/paletteRecents.js +64 -0
  92. package/dist/client/partsLook.css +32 -3
  93. package/dist/client/sageLook.css +5 -3
  94. package/dist/client/shellMode.d.ts +2 -0
  95. package/dist/client/shellMode.js +1 -0
  96. package/dist/client/structure.css +201 -1
  97. package/dist/client/style.css +59 -10
  98. package/dist/client/themeFamilies.css +37 -0
  99. package/dist/client/visualThemes.css +12 -0
  100. package/dist/client/workbenchLook.css +420 -0
  101. package/dist/client/workshopLook.css +48 -25
  102. package/package.json +4 -3
Binary file
@@ -200,7 +200,9 @@
200
200
  }
201
201
  :root[data-look-avatar='round'] .sidebar-identity-mark {
202
202
  border-radius: 50%;
203
- background: var(--accent-soft);
203
+ /* The menu's accent on a 12% tint of itself, so the mark keeps its contrast on any menu ground; the round
204
+ check in theme.ts models exactly this pair. */
205
+ background: color-mix(in srgb, var(--current-ink) 12%, transparent);
204
206
  color: var(--current-ink);
205
207
  }
206
208
  /* The topbar's own items when the menu is a bar. */
@@ -358,16 +360,9 @@
358
360
  :root[data-look-section='card'] .page-section-title .dash-section-icon {
359
361
  color: var(--ink-muted);
360
362
  }
361
- /* "View all" in the accent's link ink, with its arrow. */
363
+ /* "View all" in the muted ink with its arrow (features.css), a step smaller in a card. */
362
364
  :root[data-look-section='card'] .dash-open {
363
- color: var(--link);
364
- font-weight: 600;
365
365
  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
366
  }
372
367
 
373
368
  /* A stat card: its mark in a tinted circle, the label beside it, the figure
@@ -962,14 +957,16 @@
962
957
  :root[data-look-buttons='raised'] .applist-search-input:focus {
963
958
  background: var(--surface);
964
959
  }
965
- :root[data-look-buttons='raised'] .applist-add {
960
+ /* `filters: 'quiet'`: a filter not yet asked for has no edge until a pointer is over it. Its own recipe, worn by
961
+ Lumen beside its raised buttons, so a theme may pick either without the other. */
962
+ :root[data-look-filters='quiet'] .applist-add {
966
963
  height: 30px;
967
964
  padding: 0 var(--space-3);
968
965
  border: 1px solid transparent;
969
966
  color: var(--ink-muted);
970
967
  font-weight: 500;
971
968
  }
972
- :root[data-look-buttons='raised'] .applist-add:is(:hover, [aria-expanded='true']) {
969
+ :root[data-look-filters='quiet'] .applist-add:is(:hover, [aria-expanded='true']) {
973
970
  border-color: transparent;
974
971
  background: var(--raised);
975
972
  color: var(--ink);
@@ -1705,12 +1702,14 @@
1705
1702
  /* ---------- Meaning, quiet ---------- */
1706
1703
  /* A status is a dot and its word, the word in the ink: only the dot is coloured, so "Collected" and "Waiting
1707
1704
  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. */
1705
+ colour too; a neutral value's dot is grey and its word keeps the cell's weight, so the column scans. Every
1706
+ look that draws a dot now says this in a cell and a field (themeFamilies.css); `quiet` says it everywhere
1707
+ a tone is drawn, with the smaller dot. */
1709
1708
  html:root[data-look-status='quiet'] .tone:not(.record-tag, .tone-neutral) {
1710
1709
  --tone-dot: var(--status-info);
1711
1710
  gap: 7px;
1712
1711
  color: var(--ink);
1713
- font-weight: 500;
1712
+ font-weight: 400;
1714
1713
  }
1715
1714
  html:root[data-look-status='quiet'] .tone.tone-neutral:not(.record-tag) {
1716
1715
  --tone-dot: color-mix(in srgb, var(--ink-subtle) 50%, var(--surface));
@@ -650,11 +650,37 @@
650
650
  .page-head.has-record .page-head-top {
651
651
  margin-bottom: var(--space-2);
652
652
  }
653
- /* The eyebrow does not sit on the trail's rule above it: a step of the title's size (20px, four fifths), so 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-direction: column;
836
- align-items: flex-start;
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 house field (style.css .field-control): bare, it was the browser's own box — flush text, and a grey
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;
@@ -3291,7 +3316,20 @@
3291
3316
  white-space: nowrap;
3292
3317
  vertical-align: middle;
3293
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
+ }
3294
3331
  .tags-cell-more {
3332
+ flex: none;
3295
3333
  color: var(--ink-muted);
3296
3334
  font-size: var(--text-sm);
3297
3335
  }
@@ -3753,8 +3791,10 @@
3753
3791
  text-decoration: underline;
3754
3792
  text-underline-offset: 3px;
3755
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. */
3756
3796
  button.ref-jump.page-card-more {
3757
- color: var(--link);
3797
+ color: var(--ink-muted);
3758
3798
  font: 500 var(--text-base) var(--sans);
3759
3799
  }
3760
3800
  button.ref-jump.page-card-more::after {
@@ -3762,6 +3802,7 @@
3762
3802
  }
3763
3803
  button.ref-jump.page-card-more:hover {
3764
3804
  background: none;
3805
+ color: var(--ink);
3765
3806
  text-decoration: underline;
3766
3807
  text-underline-offset: 3px;
3767
3808
  }
@@ -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")
@@ -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
- collapse.setAttribute('aria-label', back ? say('showTheTableList') : say('hideTheTableList'));
279
- collapse.title = back ? say('showTheTableListB') : say('hideTheTableListB');
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 {};
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Where this person has just been in an App, for the palette's Recent group: the rooms they opened and the records
3
+ * they read, newest first.
4
+ *
5
+ * Kept in memory for the page's life and nowhere else: a record's name is the reader's data, so it is not written to
6
+ * storage and not asked of the server (the palette answers from what the walk already knew), and it is forgotten when
7
+ * the session changes hands (`subscribeSessionIdentity`) as every other private thing the client holds is.
8
+ */
9
+ import { ASSISTANT_ROOM } from '@mistriwork/engine/shared/servedApp.js';
10
+ import { ASSISTANT_PAGE, dashViewKey, formViewKey } from './components/appRooms.js';
11
+ import { subscribeSessionIdentity } from './sessionIdentity.js';
12
+ /** A shortlist, not a log: the palette shows a handful, and the ones it drops for being where you are need spares. */
13
+ const MOST = 8;
14
+ let visits = [];
15
+ let here;
16
+ const isKey = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
17
+ /** One record is one visit however it was reached: a key's values compare as text, as pagemarks.js does (5 and "5"). */
18
+ function recordId(table, key) {
19
+ return `record:${table}:${JSON.stringify(Object.keys(key)
20
+ .sort()
21
+ .map((name) => [name, key[name] == null ? null : String(key[name])]))}`;
22
+ }
23
+ /** The visit a walk entry is, or undefined for one that is no place worth coming back to (a drawer, a page with nothing chosen). */
24
+ function visitOf(entry) {
25
+ if (entry.kind === 'table' && typeof entry.view === 'string')
26
+ return { id: `room:${entry.view}`, room: entry.view };
27
+ if (entry.kind === 'page' && typeof entry.pageId === 'string' && !entry.key) {
28
+ const room = dashViewKey(entry.pageId) ?? formViewKey(entry.pageId) ?? (entry.pageId === ASSISTANT_PAGE ? ASSISTANT_ROOM : undefined);
29
+ return room === undefined ? undefined : { id: `room:${room}`, room };
30
+ }
31
+ /* A record, on its row's entry or on a page rooted at it. Its name may arrive a tick after it (a link carries only the
32
+ key), and a visit with no name is nothing to say in a list, so it is noted once it has one. */
33
+ if ((entry.kind === 'row' || entry.kind === 'page') &&
34
+ typeof entry.table === 'string' &&
35
+ isKey(entry.key) &&
36
+ typeof entry.label === 'string' &&
37
+ entry.label) {
38
+ return { id: recordId(entry.table, entry.key), table: entry.table, key: entry.key, label: entry.label };
39
+ }
40
+ return undefined;
41
+ }
42
+ /** Note where the walk now stands. Called on every tick of the walk, so a repeat is cheap and moves nothing. */
43
+ export function noteVisit(entry) {
44
+ const visit = entry ? visitOf(entry) : undefined;
45
+ here = visit?.id;
46
+ if (!visit)
47
+ return;
48
+ const at = visits.findIndex((seen) => seen.id === visit.id);
49
+ if (at === 0) {
50
+ visits[0] = visit;
51
+ return;
52
+ }
53
+ visits = [visit, ...visits.filter((seen) => seen.id !== visit.id)].slice(0, MOST);
54
+ }
55
+ /** The visits before this one, newest first: where you were, which is not where you are. */
56
+ export function recentVisits() {
57
+ return visits.filter((visit) => visit.id !== here);
58
+ }
59
+ /** Forget everything (the session changed hands, or a test starts over). */
60
+ export function forgetVisits() {
61
+ visits = [];
62
+ here = undefined;
63
+ }
64
+ subscribeSessionIdentity(forgetVisits);
@@ -235,13 +235,16 @@
235
235
  :root[data-parts~="logo:lift"] .app-mode .brand-mark {
236
236
  box-shadow: var(--part-logo-lift);
237
237
  }
238
- :root[data-parts~="logo:face"] .app-mode .brand-mark {
238
+ :root[data-parts~="logo:face"] .app-mode .brand-mark,
239
+ :root[data-parts~="logo:face"] .app-mode .brand-name {
239
240
  font-family: var(--part-logo-face);
240
241
  }
241
- :root[data-parts~="logo:weight"] .app-mode .brand-mark {
242
+ :root[data-parts~="logo:weight"] .app-mode .brand-mark,
243
+ :root[data-parts~="logo:weight"] .app-mode .brand-name {
242
244
  font-weight: var(--part-logo-weight);
243
245
  }
244
- :root[data-parts~="logo:case"] .app-mode .brand-mark {
246
+ :root[data-parts~="logo:case"] .app-mode .brand-mark,
247
+ :root[data-parts~="logo:case"] .app-mode .brand-name {
245
248
  text-transform: var(--part-logo-transform);
246
249
  font-variant-caps: var(--part-logo-caps);
247
250
  letter-spacing: var(--part-logo-tracking);
@@ -950,6 +953,32 @@
950
953
  font-variant-caps: var(--part-avatar-caps);
951
954
  letter-spacing: var(--part-avatar-tracking);
952
955
  }
956
+ :root[data-parts~="identityMark:ground"] .app-mode .sidebar-identity-mark {
957
+ background: var(--part-identityMark-ground);
958
+ }
959
+ :root[data-parts~="identityMark:ink"] .app-mode .sidebar-identity-mark {
960
+ color: var(--part-identityMark-ink);
961
+ }
962
+ :root[data-parts~="identityMark:edge"] .app-mode .sidebar-identity-mark {
963
+ border-color: var(--part-identityMark-edge);
964
+ }
965
+ :root[data-parts~="identityMark:radius"] .app-mode .sidebar-identity-mark {
966
+ border-radius: var(--part-identityMark-radius);
967
+ }
968
+ :root[data-parts~="identityMark:lift"] .app-mode .sidebar-identity-mark {
969
+ box-shadow: var(--part-identityMark-lift);
970
+ }
971
+ :root[data-parts~="identityMark:face"] .app-mode .sidebar-identity-mark {
972
+ font-family: var(--part-identityMark-face);
973
+ }
974
+ :root[data-parts~="identityMark:weight"] .app-mode .sidebar-identity-mark {
975
+ font-weight: var(--part-identityMark-weight);
976
+ }
977
+ :root[data-parts~="identityMark:case"] .app-mode .sidebar-identity-mark {
978
+ text-transform: var(--part-identityMark-transform);
979
+ font-variant-caps: var(--part-identityMark-caps);
980
+ letter-spacing: var(--part-identityMark-tracking);
981
+ }
953
982
  :root[data-parts~="menu:ground"] .app-mode .tn-pop,
954
983
  :root[data-parts~="menu:ground"] .app-mode .th-menu,
955
984
  :root[data-parts~="menu:ground"] .app-mode .page-actions-menu {
@@ -43,15 +43,17 @@
43
43
  }
44
44
  /* A soft bar is a panel on the page, apart from the menu beside it, so it is drawn in the page's own colors: the
45
45
  navigation's dress the menu, wherever the menu is. When the menu is drawn in the bar (placement top) the bar is
46
- the menu, and it wears nav.ground as a side menu does. */
47
- :root[data-look-bar='soft'] body:not(.app-topnav) .topbar {
46
+ the menu, and when the bar stands in the sidebar (sidebarShell.js) it is the menu's head: either way it wears
47
+ nav.ground as a side menu does. Kept a page panel there, the head was a white block in a dark menu with the
48
+ menu's light inks on it (1.1:1). */
49
+ :root[data-look-bar='soft'] body:not(.app-topnav, .app-sidebar-shell) .topbar {
48
50
  --nav-ground: var(--surface);
49
51
  --nav-ink: var(--ink);
50
52
  --nav-muted: var(--ink-muted);
51
53
  --nav-line: var(--line);
52
54
  --nav-accent: var(--accent);
53
55
  }
54
- :root[data-look-bar='soft'] body.app-topnav .topbar {
56
+ :root[data-look-bar='soft'] body:is(.app-topnav, .app-sidebar-shell) .topbar {
55
57
  background: var(--nav-ground);
56
58
  border-bottom-color: var(--nav-line);
57
59
  }
@@ -210,6 +210,8 @@ interface AppRoomSlots {
210
210
  Assistant: ComponentType<{
211
211
  conversation?: string;
212
212
  }> | null;
213
+ /** Every list, page and New of a long menu, with a filter box (Directory.tsx). */
214
+ Directory: ComponentType<Record<string, never>> | null;
213
215
  /** A free-form page (FreePage.tsx), where a dashboard entry names one. */
214
216
  Page: ComponentType<{
215
217
  entry?: PageEntry;
@@ -44,6 +44,7 @@ const WORKBENCH = Object.freeze({
44
44
  Form: null,
45
45
  Inbox: null,
46
46
  Assistant: null,
47
+ Directory: null,
47
48
  Page: null,
48
49
  SplitRecord: null,
49
50
  Document: null,