@mistriwork/kit 1.0.0-rc.71 → 1.0.0-rc.73

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.
@@ -72,6 +72,7 @@ import { TableRoom } from './TableRoom.js';
72
72
  import { RowOpensContext } from './rowOpens.js';
73
73
  import { RowTitleContext } from './rowTitle.js';
74
74
  import { ListEmpty } from './ListEmpty.js';
75
+ import { useListNavigation } from './listNavigation.js';
75
76
  import { Empty } from './Notes.js';
76
77
  import { Button } from '@mistriwork/ui/Button.js';
77
78
  import { SortMenu } from './SortMenu.js';
@@ -224,6 +225,7 @@ export function AppList({ entry, spec, navigate, embedded = false, newButton, in
224
225
  const filter = useRef(null);
225
226
  const head = useRef(null);
226
227
  const crumbs = useCrumbSlots();
228
+ const openLink = useListNavigation();
227
229
  const ownList = !embedded && !inDashboard;
228
230
  /* The page's own list names itself in the crumb bar where one is drawn over it; where none is (a room reached
229
231
  from the menu, `shell.breadcrumbs`), in its own heading row, whose end holds the same verbs. Either way its
@@ -746,8 +748,12 @@ export function AppList({ entry, spec, navigate, embedded = false, newButton, in
746
748
  apply(view.query);
747
749
  }, children: view.name }, view.name))) })), _jsx(DropItem, { className: "page-actions-item", disabled: !offerSave, title: store === 'account' ? say('keepThisTabIts') : say('keepThisTabItsFilters'), onClick: () => void save(), children: say('saveView') }), yourLit >= 0 && (_jsx(DropItem, { className: "page-actions-item", onClick: () => void rename(yours[yourLit]), children: say('renameView') }))] })) : null;
748
750
  const pageVerbs = !spec.quickAdd && newButton;
751
+ /* The list's way to another room (its view's `link`), first among the head's verbs and there with rows or without:
752
+ the server serves it only to a reader who may open the room (appPayload.ts), as an empty state's action. */
753
+ const headTo = ownList && spec.link ? openLink?.(spec.link.view, 'reset', { tab: spec.link.tab }) : undefined;
754
+ const headLink = headTo && spec.link ? (_jsx("a", { className: "applist-link", ...headTo, children: spec.link.label })) : null;
749
755
  return (_jsxs(_Fragment, { children: [boundNames.map((name) => (_jsx(DefinedBoxes, { column: name, binding: bound[name], per: bound[name].per ? oneValue(conditionTail(refinement, bound[name].per)) : undefined, onBoxes: onDefinedBoxes }, name))), inBar && createPortal(title, crumbs.note), inBar &&
750
- createPortal(_jsxs(_Fragment, { children: [viewsMenu, pageVerbs] }), crumbs.tools), _jsxs("div", { className: `applist-head${inBar ? ' in-crumbs' : ''}`, children: [!inBar && !inDashboard && (_jsxs("div", { className: "applist-head-row", ref: head, children: [title, ownList ? (_jsxs("div", { className: "applist-head-tools", children: [viewsMenu, _jsx("span", { className: "applist-head-slot", ref: listHeadRef }), pageVerbs] })) : (pageVerbs)] })), !beside && !chipsInBar && _jsx("div", { className: "applist-chips", children: chipList })] }), summary, _jsxs("div", { className: "applist-controls", role: "group", "aria-label": say('listControls', { caption }), children: [(tabs.length > 1 || yours.length > 0) && (_jsxs("div", { className: "tabs folds", ref: tabStrip, children: [_jsxs("div", { className: "tabs-row", role: "tablist", children: [tabs.map((tab, i) => (_jsxs("button", { type: "button", role: "tab", className: "tab", "aria-selected": i === litTab && yourLit === -1, onClick: () => pickTab(i), ...foldMark(i), children: [_jsx("span", { children: tab.label }), _jsx(TabCount, { counted: countOf(i) })] }, tab.label))), yours.length > 0 && (_jsxs("span", { className: "tab-group", ...foldMark(tabs.length), "aria-hidden": "true", children: [tabs.length > 1 && _jsx("span", { className: "tab-divider" }), _jsx("span", { className: "tab-group-label", children: store === 'account' ? say('myViews') : say('savedViews') })] })), yours.map((f, i) => (_jsxs("span", { className: "tab-wrap", role: "presentation", ...foldMark(savedAt + i), children: [_jsxs("button", { type: "button", role: "tab", className: "tab tab-yours", "aria-selected": i === yourLit, title: `${viewWords(f.query) || say('everything')} — ${store === 'account' ? say('yourView') : say('aSavedView')}`, onClick: () => {
756
+ createPortal(_jsxs(_Fragment, { children: [headLink, viewsMenu, pageVerbs] }), crumbs.tools), _jsxs("div", { className: `applist-head${inBar ? ' in-crumbs' : ''}`, children: [!inBar && !inDashboard && (_jsxs("div", { className: "applist-head-row", ref: head, children: [title, ownList ? (_jsxs("div", { className: "applist-head-tools", children: [headLink, viewsMenu, _jsx("span", { className: "applist-head-slot", ref: listHeadRef }), pageVerbs] })) : (pageVerbs)] })), !beside && !chipsInBar && _jsx("div", { className: "applist-chips", children: chipList })] }), summary, _jsxs("div", { className: "applist-controls", role: "group", "aria-label": say('listControls', { caption }), children: [(tabs.length > 1 || yours.length > 0) && (_jsxs("div", { className: "tabs folds", ref: tabStrip, children: [_jsxs("div", { className: "tabs-row", role: "tablist", children: [tabs.map((tab, i) => (_jsxs("button", { type: "button", role: "tab", className: "tab", "aria-selected": i === litTab && yourLit === -1, onClick: () => pickTab(i), ...foldMark(i), children: [_jsx("span", { children: tab.label }), _jsx(TabCount, { counted: countOf(i) })] }, tab.label))), yours.length > 0 && (_jsxs("span", { className: "tab-group", ...foldMark(tabs.length), "aria-hidden": "true", children: [tabs.length > 1 && _jsx("span", { className: "tab-divider" }), _jsx("span", { className: "tab-group-label", children: store === 'account' ? say('myViews') : say('savedViews') })] })), yours.map((f, i) => (_jsxs("span", { className: "tab-wrap", role: "presentation", ...foldMark(savedAt + i), children: [_jsxs("button", { type: "button", role: "tab", className: "tab tab-yours", "aria-selected": i === yourLit, title: `${viewWords(f.query) || say('everything')} — ${store === 'account' ? say('yourView') : say('aSavedView')}`, onClick: () => {
751
757
  if (i !== yourLit) {
752
758
  state.page = 0;
753
759
  apply(f.query);
@@ -12,6 +12,8 @@ export interface ListSpec {
12
12
  /** How the rows are drawn; a `split` is the list/detail workspace. */
13
13
  presentation?: AppListPresentation;
14
14
  empty?: import('@mistriwork/engine/shared/listPresentations.js').AppListEmpty;
15
+ /** A link at the list's head to another room, served only where the reader may open it. */
16
+ link?: import('@mistriwork/engine/shared/listPresentations.js').AppListLink;
15
17
  quickAdd?: true;
16
18
  /** The view carries a Favorites star. */
17
19
  favorite?: true;
@@ -2046,13 +2046,15 @@ body.app-mode th .pk { display: none; }
2046
2046
  /* A list's summary (`summary` on its view): a dashboard's strip of figures between the list's name and its tabs, on
2047
2047
  the room's own edge. */
2048
2048
  .applist-host > .list-summary { margin: var(--space-3) var(--room-inset) 0; }
2049
- /* A page's verbs are one family at the head's end, in one order: Views, Export, Import, then New (AppList.tsx).
2049
+ /* A page's verbs are one family at the head's end, in one order: the list's link to another room (its view's `link`,
2050
+ a quiet link, not a verb), Views, Export, Import, then New (AppList.tsx).
2050
2051
  Each of the first three is a mark and its word; on a phone the mark stands for the word (structure.css). Under a
2051
2052
  bar the rows draw Export after the others, so the order is said here. */
2052
2053
  .applist-head-slot { display: contents; }
2053
2054
  .crumb-tools > :is(.applist-import, .applist-new) { order: 1; }
2054
2055
  .app-mode :is(.crumb-tools, .applist-head-tools) :is(.export-summary, .applist-import) { display: inline-flex; align-items: center; gap: var(--space-2h); }
2055
2056
  :is(.applist-verb-mark, .applist-import-mark) { flex: none; }
2057
+ :is(.crumb-tools, .applist-head-tools) .applist-link { font-size: var(--text-sm); white-space: nowrap; }
2056
2058
  .applist-count {
2057
2059
  padding: 1px var(--space-3); border-radius: 999px; background: var(--raised);
2058
2060
  font: 500 var(--text-sm)/1.5 var(--sans); color: var(--ink-muted); font-variant-numeric: tabular-nums;
@@ -2401,9 +2401,11 @@
2401
2401
  }
2402
2402
  }
2403
2403
  /* An article: one column at a reading measure, the head's words on the same measure and the same content edge
2404
- as the crumb, not centred. A band header (`data-look-header`) still paints the pane's width behind it. */
2404
+ as the crumb, not centred. The head itself takes the measure, not only each of its parts: a record's head is a grid
2405
+ of the name and its verbs, and with only the parts held the verbs' column ran on to the pane's edge, past the
2406
+ fields' card. A band header (`data-look-header`) still paints the pane's width behind it: its band is an outset. */
2405
2407
  .page-body[data-layout='article'],
2406
- .page-head[data-layout='article'] > * {
2408
+ .page-head[data-layout='article'] {
2407
2409
  max-width: var(--page-measure);
2408
2410
  }
2409
2411
 
@@ -1392,8 +1392,14 @@
1392
1392
  room for it, so a long run of tabs folds before it and never runs under it. */
1393
1393
  @media (min-width: 761px) {
1394
1394
  .page-tabpanel > .page-section > .page-section-bar {
1395
+ --bar-pull: calc(var(--control-h) + var(--space-3) + var(--space-2) + var(--space-2));
1395
1396
  width: fit-content;
1396
- margin-block-start: calc(-1 * (var(--control-h) + var(--space-3) + var(--space-2) + var(--space-2)));
1397
+ margin-block-start: calc(-1 * var(--bar-pull));
1398
+ /* The pull above drags whatever follows the bar up with it, so the bar must be as tall as the pull (less the
1399
+ 3px the table's own head-room gives back, which is what the keyed look's 47px bar is). A look whose Add is
1400
+ shorter (Lumen's raised buttons make a 38px bar) otherwise left the list under it starting above the strip's
1401
+ foot, and an empty list's note, with no header row to hide behind, drew over the tabs. */
1402
+ min-height: calc(var(--bar-pull) - var(--space-1h));
1397
1403
  margin-inline-start: auto;
1398
1404
  /* Drawn over the strip it is pulled into: the strip is positioned (its fold and marker), so a static bar under
1399
1405
  it painted below it and the strip took the click. */
@@ -165,9 +165,9 @@
165
165
  :root[data-visual-theme] .tn-popitem { min-height: 34px; font-family: var(--sans); }
166
166
 
167
167
  :root[data-visual-theme] .app-mode .content { background: var(--surface); }
168
- /* The look's roomier pane, unless the App set its own gutter; a content-width
168
+ /* The look's roomier pane, unless the App set its own gutter or the page is bare (features.css); a content-width
169
169
  header is told, so its brand still lines up with the content edge. */
170
- :root[data-visual-theme] body.app-topnav:not(.app-custom-gutter) .content { padding-inline: var(--space-6); }
170
+ :root[data-visual-theme] body.app-topnav:not(.app-custom-gutter, .page-bare) .content { padding-inline: var(--space-6); }
171
171
  :root[data-visual-theme] body.app-topnav:not(.app-custom-gutter) .topbar[data-header-width="content"] { --app-shell-outer-gutter: 24px; }
172
172
  /* Sticky chrome must paint the page ground: transparency lets scrolled filters
173
173
  and rows show through. Keep it above the list's sticky headers and facets.
@@ -354,8 +354,8 @@
354
354
  @media (max-width: 700px) {
355
355
  /* One phone gutter for every App, whichever menu it wears: beside the
356
356
  room's own inset, a side-menu App's 22px left Thread 40px short of each
357
- edge where Compass lost 20. */
358
- :root[data-visual-theme] body.app-mode:not(.app-custom-gutter) .content { padding-inline: var(--space-2); }
357
+ edge where Compass lost 20. A bare page keeps none: it owns the window (features.css). */
358
+ :root[data-visual-theme] body.app-mode:not(.app-custom-gutter, .page-bare) .content { padding-inline: var(--space-2); }
359
359
  :root[data-visual-theme] body.app-topnav:not(.app-custom-gutter) .topbar[data-header-width="content"] { --app-shell-outer-gutter: 4px; }
360
360
  :root[data-visual-theme] body.app-topnav .topbar { padding-block: var(--space-2); }
361
361
  :root[data-visual-theme] body.app-topnav .topbar:not([data-header-width="content"]) { padding-inline: var(--space-5); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mistriwork/kit",
3
- "version": "1.0.0-rc.71",
3
+ "version": "1.0.0-rc.73",
4
4
  "description": "The shared React client both shells are drawn with: the walk and the address, Grid, Value, the record page, lists, filters and charts.",
5
5
  "homepage": "https://mistriwork.dev",
6
6
  "bugs": {
@@ -85,8 +85,8 @@
85
85
  "./package.json": "./package.json"
86
86
  },
87
87
  "dependencies": {
88
- "@mistriwork/engine": "1.0.0-rc.71",
89
- "@mistriwork/ui": "1.0.0-rc.71",
88
+ "@mistriwork/engine": "1.0.0-rc.73",
89
+ "@mistriwork/ui": "1.0.0-rc.73",
90
90
  "intl-messageformat": "12.1.2",
91
91
  "qrcode-generator": "^2.0.4"
92
92
  },