@mistriwork/kit 1.0.0-rc.17 → 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/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/Grid.js +33 -4
- 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 +22 -3
- package/dist/client/components/PageHead.js +26 -6
- 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/TableRoom.js +15 -5
- package/dist/client/components/TableView.d.ts +2 -0
- package/dist/client/components/Value.js +1 -1
- 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/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/core.d.ts +3 -3
- package/dist/client/core.js +6 -7
- 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 +56 -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 +2 -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
|
@@ -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;
|
|
@@ -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(--
|
|
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
|
}
|
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 {};
|
|
@@ -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);
|
package/dist/client/sageLook.css
CHANGED
|
@@ -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
|
|
47
|
-
|
|
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;
|
package/dist/client/shellMode.js
CHANGED
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
) {
|
|
30
30
|
background: var(--nav-current);
|
|
31
31
|
color: var(--nav-on-current, var(--nav-ink));
|
|
32
|
-
|
|
32
|
+
/* The block replaces a look's own mark, but not one the look draws beside any block (`--nav-current-mark`, the
|
|
33
|
+
slot's marker in workshopLook.css), so a theme may tint the current entry and keep the accent's slot, as
|
|
34
|
+
Workshop does. */
|
|
35
|
+
box-shadow: var(--nav-current-mark, none);
|
|
33
36
|
}
|
|
34
37
|
:root[data-nav-current] .app-mode .topbar :is(.tn-item[aria-current='true'], .tn-group.active > .tn-group-button)::after {
|
|
35
38
|
background: transparent;
|
|
@@ -634,6 +637,34 @@
|
|
|
634
637
|
border-bottom: 0;
|
|
635
638
|
}
|
|
636
639
|
}
|
|
640
|
+
/* The inferred record's form (pageAnatomy.ts, inferredSections): the classic form a person works in all day.
|
|
641
|
+
Caption beside value, the caption right-aligned on one track so every value in a column starts on one line;
|
|
642
|
+
two columns where each has 18rem, else one. 18rem is what the main column beside the side menu and the aside
|
|
643
|
+
gives each of two at 1280 (627px): at 21rem that desk drew one column of seven short fields. The track is 8rem,
|
|
644
|
+
or 30% of a narrow column, so a value keeps about 12rem there: at 38% a booked time and an email address broke
|
|
645
|
+
onto a second line. A longer caption wraps under itself rather than taking the value's room. No rule under each row, the shared edge is the order. A value wraps
|
|
646
|
+
and is never cut short; long text spans both columns. A phone keeps the rail's rows (above). */
|
|
647
|
+
@media (min-width: 761px) {
|
|
648
|
+
dl.page-properties.page-classic {
|
|
649
|
+
grid-template-columns: repeat(
|
|
650
|
+
auto-fill,
|
|
651
|
+
minmax(min(100%, max(18rem, (100% - (var(--page-properties-columns, 1) - 1) * 32px) / var(--page-properties-columns, 1))), 1fr)
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
dl.page-properties.page-classic > .page-field,
|
|
655
|
+
dl.page-properties.page-classic > .page-field-wide {
|
|
656
|
+
grid-template-columns: min(8rem, 30%) minmax(0, 1fr);
|
|
657
|
+
gap: var(--space-4);
|
|
658
|
+
padding: var(--space-1h) 0;
|
|
659
|
+
border-bottom: 0;
|
|
660
|
+
}
|
|
661
|
+
dl.page-properties.page-classic > .page-field > dt {
|
|
662
|
+
text-align: end;
|
|
663
|
+
}
|
|
664
|
+
dl.page-properties.page-classic > .page-field-wide {
|
|
665
|
+
grid-column: 1 / -1;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
637
668
|
/* The aside's fields: one column beside the record, back into columns when it stacks under it. */
|
|
638
669
|
@media (min-width: 1101px) {
|
|
639
670
|
.page-aside .page-fields .page-field-grid {
|
|
@@ -1309,3 +1340,172 @@
|
|
|
1309
1340
|
.page-tabpanel > .page-section > .page-section-bar {
|
|
1310
1341
|
justify-content: flex-end;
|
|
1311
1342
|
}
|
|
1343
|
+
|
|
1344
|
+
/* The bar in the sidebar (`ui.shell.header: 'sidebar'`, the default; docs/design.md, the shell): a side-placed App
|
|
1345
|
+
draws no band across the window. The sidebar runs the window's height — its head the App's mark and name with New
|
|
1346
|
+
beside them, the search under them; its foot the bell and the account over the workspace and Collapse — and each
|
|
1347
|
+
room's own head row is the content's first line. The header element itself stands in the sidebar
|
|
1348
|
+
(packages/mistri/src/client/sidebarShell.js), still `.topbar`, so a theme's bar recipe dresses the head. Only at a
|
|
1349
|
+
desk and signed in: a phone's drawer, the top placement and public pages keep the bar, and the class is not set
|
|
1350
|
+
there. */
|
|
1351
|
+
@layer structure {
|
|
1352
|
+
body.app-sidebar-shell:not(.sidebar-hidden) .layout > .sidebar,
|
|
1353
|
+
body.app-sidebar-shell:not(.sidebar-hidden) .layout > .sidebar[data-density] {
|
|
1354
|
+
width: 240px;
|
|
1355
|
+
}
|
|
1356
|
+
body.app-sidebar-shell .sidebar > .topbar {
|
|
1357
|
+
display: grid;
|
|
1358
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1359
|
+
grid-template-rows: 48px auto;
|
|
1360
|
+
grid-template-areas: 'brand new' 'search search';
|
|
1361
|
+
align-items: center;
|
|
1362
|
+
gap: 0 var(--space-2);
|
|
1363
|
+
padding: 0 var(--space-3) var(--space-3);
|
|
1364
|
+
flex: none;
|
|
1365
|
+
/* The bar's own height and inset (style.css, a look's) were a band's. */
|
|
1366
|
+
min-height: 0;
|
|
1367
|
+
height: auto;
|
|
1368
|
+
}
|
|
1369
|
+
body.app-sidebar-shell .sidebar > .topbar > .brand {
|
|
1370
|
+
grid-area: brand;
|
|
1371
|
+
min-width: 0;
|
|
1372
|
+
margin: 0;
|
|
1373
|
+
padding: var(--space-2);
|
|
1374
|
+
justify-self: start;
|
|
1375
|
+
max-width: 100%;
|
|
1376
|
+
}
|
|
1377
|
+
body.app-sidebar-shell .sidebar > .topbar .brand-name {
|
|
1378
|
+
min-width: 0;
|
|
1379
|
+
overflow: hidden;
|
|
1380
|
+
text-overflow: ellipsis;
|
|
1381
|
+
white-space: nowrap;
|
|
1382
|
+
}
|
|
1383
|
+
body.app-sidebar-shell .sidebar > .topbar > #new-menu-host {
|
|
1384
|
+
grid-area: new;
|
|
1385
|
+
display: flex;
|
|
1386
|
+
}
|
|
1387
|
+
/* New is the head's quiet plus, a 28px square: a bordered "+ New" was the one box among marks (as on a phone). */
|
|
1388
|
+
body.app-sidebar-shell .sidebar > .topbar .new-menu-trigger {
|
|
1389
|
+
width: 28px;
|
|
1390
|
+
min-width: 28px;
|
|
1391
|
+
height: 28px;
|
|
1392
|
+
min-height: 28px;
|
|
1393
|
+
padding: 0;
|
|
1394
|
+
justify-content: center;
|
|
1395
|
+
border-color: transparent;
|
|
1396
|
+
background: transparent;
|
|
1397
|
+
box-shadow: none;
|
|
1398
|
+
}
|
|
1399
|
+
@media (hover: hover) {
|
|
1400
|
+
body.app-sidebar-shell .sidebar > .topbar .new-menu-trigger:hover {
|
|
1401
|
+
background: var(--raised);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
body.app-sidebar-shell .sidebar > .topbar .new-menu-words {
|
|
1405
|
+
display: none;
|
|
1406
|
+
}
|
|
1407
|
+
body.app-sidebar-shell .sidebar > .topbar .new-menu-mark {
|
|
1408
|
+
display: inline;
|
|
1409
|
+
font: 300 calc(22px * var(--type-k)) / 1 var(--sans); /* off-scale: a glyph sized as a mark in its 28px square, not text */
|
|
1410
|
+
color: var(--nav-muted, var(--ink-muted));
|
|
1411
|
+
}
|
|
1412
|
+
body.app-sidebar-shell .sidebar > .topbar > #search-button {
|
|
1413
|
+
grid-area: search;
|
|
1414
|
+
width: 100%;
|
|
1415
|
+
min-width: 0;
|
|
1416
|
+
height: 32px;
|
|
1417
|
+
min-height: 0;
|
|
1418
|
+
box-sizing: border-box;
|
|
1419
|
+
margin: 0;
|
|
1420
|
+
/* In the menu the search is a field on the menu's ground, as the menu's filter is (visualThemes.css): the bar's
|
|
1421
|
+
field takes the page's surface, and the menu's inks there (nav.muted on white under a dark nav) read 1.9:1.
|
|
1422
|
+
Tokens rather than a background, so whatever field a look or an author's parts draw stands on the nav. */
|
|
1423
|
+
--surface: var(--nav-ground, var(--ground));
|
|
1424
|
+
--line: color-mix(in srgb, var(--nav-ink, var(--ink)) 45%, var(--nav-ground, var(--ground)));
|
|
1425
|
+
}
|
|
1426
|
+
/* The foot: the bar's keys (the bell and the account, an authoring badge, the assistant's door) on one row over the
|
|
1427
|
+
workspace's identity and Collapse. */
|
|
1428
|
+
body.app-sidebar-shell .sidebar-account {
|
|
1429
|
+
flex: none;
|
|
1430
|
+
padding: var(--space-2h) var(--space-3);
|
|
1431
|
+
border-top: 1px solid var(--line);
|
|
1432
|
+
}
|
|
1433
|
+
body.app-sidebar-shell .sidebar-account > .topbar-actions {
|
|
1434
|
+
display: flex;
|
|
1435
|
+
flex-wrap: wrap;
|
|
1436
|
+
align-items: center;
|
|
1437
|
+
gap: var(--space-2);
|
|
1438
|
+
margin: 0;
|
|
1439
|
+
min-width: 0;
|
|
1440
|
+
}
|
|
1441
|
+
body.app-sidebar-shell .sidebar-account .account-with-inbox {
|
|
1442
|
+
display: flex;
|
|
1443
|
+
align-items: center;
|
|
1444
|
+
gap: var(--space-2);
|
|
1445
|
+
}
|
|
1446
|
+
body.app-sidebar-shell .sidebar-account button.account {
|
|
1447
|
+
color: var(--ink);
|
|
1448
|
+
}
|
|
1449
|
+
body.app-sidebar-shell .sidebar-account :is(.inbox-trigger, .icon-button) {
|
|
1450
|
+
color: var(--ink-muted);
|
|
1451
|
+
}
|
|
1452
|
+
body.app-sidebar-shell .sidebar-account + #sidebar-app-footer .sidebar-identity {
|
|
1453
|
+
padding-top: var(--space-3);
|
|
1454
|
+
}
|
|
1455
|
+
/* Folded to the rail: the head and the foot stand in one column of marks — the App's mark, New, the search's
|
|
1456
|
+
magnifier; the bell and the avatar. */
|
|
1457
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar > .topbar {
|
|
1458
|
+
grid-template-columns: 1fr;
|
|
1459
|
+
grid-template-rows: 48px auto auto;
|
|
1460
|
+
grid-template-areas: 'brand' 'new' 'search';
|
|
1461
|
+
justify-items: center;
|
|
1462
|
+
row-gap: var(--space-2);
|
|
1463
|
+
padding-inline: var(--space-2);
|
|
1464
|
+
}
|
|
1465
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar > .topbar > .brand {
|
|
1466
|
+
justify-self: center;
|
|
1467
|
+
}
|
|
1468
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar > .topbar .brand-name {
|
|
1469
|
+
display: none;
|
|
1470
|
+
}
|
|
1471
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar > .topbar > #search-button {
|
|
1472
|
+
width: 32px;
|
|
1473
|
+
justify-content: center;
|
|
1474
|
+
padding: 0;
|
|
1475
|
+
}
|
|
1476
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar > .topbar > #search-button :is(.tn-search-hint, .tn-search-key) {
|
|
1477
|
+
display: none;
|
|
1478
|
+
}
|
|
1479
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar-account {
|
|
1480
|
+
padding-inline: var(--space-2);
|
|
1481
|
+
}
|
|
1482
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar-account :is(.topbar-actions, .account-with-inbox) {
|
|
1483
|
+
flex-direction: column;
|
|
1484
|
+
justify-content: center;
|
|
1485
|
+
}
|
|
1486
|
+
body.app-sidebar-shell.sidebar-hidden .sidebar-account .account-caret {
|
|
1487
|
+
display: none;
|
|
1488
|
+
}
|
|
1489
|
+
/* Each room's head row is the content's first line: the trail's bar, a list's or a dashboard's title and verbs —
|
|
1490
|
+
52px at least, on a hairline, where the band stood over them. */
|
|
1491
|
+
body.app-sidebar-shell #content > .crumbs-host:first-child > .crumbs,
|
|
1492
|
+
body.app-sidebar-shell #content > .applist-host:first-child > .applist-head,
|
|
1493
|
+
body.app-sidebar-shell #content > .applist-head:first-child {
|
|
1494
|
+
min-height: 52px;
|
|
1495
|
+
box-sizing: border-box;
|
|
1496
|
+
/* The content pane is a column that scrolls: a floor in place of `auto` let a tall room shrink its head to it. */
|
|
1497
|
+
flex-shrink: 0;
|
|
1498
|
+
}
|
|
1499
|
+
body.app-sidebar-shell #content > .applist-host:first-child > .applist-head,
|
|
1500
|
+
body.app-sidebar-shell #content > .applist-head:first-child {
|
|
1501
|
+
margin-top: 0;
|
|
1502
|
+
padding-block: var(--space-3h);
|
|
1503
|
+
border-bottom: 1px solid var(--line);
|
|
1504
|
+
}
|
|
1505
|
+
body.app-sidebar-shell #content > .applist-host:first-child > .applist-head + .applist-controls {
|
|
1506
|
+
padding-top: var(--space-3);
|
|
1507
|
+
}
|
|
1508
|
+
body.app-sidebar-shell #content > .applist-head:first-child + * {
|
|
1509
|
+
padding-top: var(--space-4);
|
|
1510
|
+
}
|
|
1511
|
+
}
|