@mistriwork/kit 1.0.0-rc.29 → 1.0.0-rc.31

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.
@@ -657,7 +657,13 @@ export async function boot(me, landingAt, installed) {
657
657
  showUnopened((await offeredTools?.listConnections()) ?? []);
658
658
  return;
659
659
  }
660
- $('content').replaceChildren(el('p', { class: 'note', text: say('couldNotReadTheSchema', { message: err.message }) }));
660
+ /* An App's page never draws the database browser's chrome around an error (the query bar, the filter, the
661
+ vendor's mark): its own unavailable screen says why, in the App's name. A shell that offers the Workbench's
662
+ tools keeps the note. */
663
+ if (!offeredTools)
664
+ chrome.unavailable(undefined, err.message);
665
+ else
666
+ $('content').replaceChildren(el('p', { class: 'note', text: say('couldNotReadTheSchema', { message: err.message }) }));
661
667
  return;
662
668
  }
663
669
  const content = $('content');
@@ -14,6 +14,10 @@ export function DashHead({ dashboard, star = true, }) {
14
14
  const hidden = dashboard.headingHidden === true || dashboard.head === 'own';
15
15
  const title = dashboard.heading ?? dashboard.label;
16
16
  const favorite = star && dashboard.favorite && dashboard.head !== 'own' && (_jsx(FavoriteStar, { favorite: { kind: 'view', view: dashboard.id, label: dashboard.label }, name: dashboard.label }));
17
+ /* Nothing to see: only the title a screen reader keeps. It stands alone rather than in the head's box, which would
18
+ hold its minimum height and its rule over a page that draws its own head, and the pane starts at the page. */
19
+ if (hidden && !favorite && !(dashboard.description && dashboard.head !== 'own'))
20
+ return _jsx("h1", { className: "applist-title visually-hidden", children: title });
17
21
  if (dashboard.head === 'compact' && !hidden)
18
22
  return (_jsxs("div", { className: "applist-head applist-head-row dash-head-compact", children: [_jsx("h1", { className: "applist-title", children: title }), favorite] }));
19
23
  return (_jsxs("div", { className: "applist-head dash-head", children: [_jsx("h1", { className: `applist-title${hidden ? ' visually-hidden' : ''}`, children: title }), favorite, dashboard.description && dashboard.head !== 'own' && _jsx("p", { className: "note dash-description", children: dashboard.description })] }));
@@ -296,8 +296,10 @@ export function Sections({ page, base, recordKey: key, plans, entry, onLabel, on
296
296
  become a tab strip only where the page says `listTabs: true` (or names
297
297
  tabs). A strip made on its own put two half-width lists in one
298
298
  full-width box. The Workbench's pages, built from the schema or by
299
- drag, keep the strip unless they say `listTabs: false`. */
300
- const autoTabs = inAppPage() ? page.listTabs === true : page.listTabs !== false;
299
+ drag, keep the strip unless they say `listTabs: false`. A record that has a page of the App's as a tab is the other
300
+ case: that tab joins the first strip, so with no word from the page its lists make one, rather than stack above a
301
+ tab standing alone at the bottom. */
302
+ const autoTabs = inAppPage() ? page.listTabs === true || (page.listTabs === undefined && pageTabs.length > 0) : page.listTabs !== false;
301
303
  /* The page an App infers for a record counts its tabs and ends them with the history (pageAnatomy.ts); a page an
302
304
  author wrote is drawn as written. */
303
305
  const inferred = isInferredPage(page, inAppPage());
@@ -343,7 +345,7 @@ export function Sections({ page, base, recordKey: key, plans, entry, onLabel, on
343
345
  return;
344
346
  }
345
347
  run = null;
346
- if (listTabs && autoTabs && listRuns.has(i) && (listRuns.get(i) ?? 0) > 1) {
348
+ if (listTabs && autoTabs && listRuns.has(i) && (listRuns.get(i) ?? 0) >= (pageTabs.length ? 1 : 2)) {
347
349
  if (!strip) {
348
350
  strip = [];
349
351
  laid.push(_jsx(ListTabs, { items: strip, entry: entry, onTab: onTab, draw: draw, scoped: scoped, counting: inferred ? { base, recordKey: key } : undefined, pages: grouped ? undefined : takePageTabs() }, `tabs-${i}`));
@@ -800,10 +800,15 @@ body.first-run #db-label {
800
800
  .dash-body { padding: 0 var(--space-4h) var(--space-4h); }
801
801
  /* A free-form page (definePage) is its component on the page body, in a dashboard's gutters. */
802
802
  .free-page-body { padding: 0 var(--space-4h) 56px; }
803
+ /* The page's own z-indexes stay inside it: a positioned child at `z-index: 9` must not reach over a layer the kit draws
804
+ in a portal (a Popover has no z-index of its own), whatever the page says. */
805
+ .free-page-body { isolation: isolate; }
803
806
  /* A bare page (definePage layout: 'bare'): the room owns the window. The sidebar, its reveal, the bars and the menu leave the
804
807
  flow; the skip link, the pane and its focus are the shell's still. */
805
808
  body.page-bare :is(.topbar, .sidebar, .sidebar-reveal, #topnav, #explain-pane) { display: none; }
806
809
  .free-page-body.is-bare { padding: 0; }
810
+ /* The pane's own gutter goes too: a full-bleed root reaches the window's edges. */
811
+ body.app-mode.page-bare .content { padding-inline: 0; }
807
812
  /* The title shares the body's centered 76rem column — a head pinned to
808
813
  the pane edge over a centered grid read as two different screens. */
809
814
  .dash-head { margin-top: var(--space-2h); margin-bottom: var(--space-6); width: 100%; }
@@ -1186,6 +1186,11 @@
1186
1186
  .dash-area[hidden] {
1187
1187
  display: none;
1188
1188
  }
1189
+ /* A free-form page that draws its own head (`head: false`, or bare) starts at the top of the pane: the gap a head
1190
+ leaves above its section is the page's to make, and no look puts one back. */
1191
+ .free-page-body.is-own > .page-section {
1192
+ padding-top: 0;
1193
+ }
1189
1194
  /* A section's page-row basis (100%) is a width in a row and would be a height in a column. */
1190
1195
  .dash-area > .page-section {
1191
1196
  flex: 0 0 auto;
@@ -23,6 +23,10 @@
23
23
  /* A picture's <source>s (imageWidths.ts imageSources) choose the file; the <img> inside is what is laid out and styled. */
24
24
  picture { display: contents; }
25
25
 
26
+ /* A plain link a free-form page writes (`<a href={useHref().page(…)}>`) is the look's link ink, as the platform's own links
27
+ are, not the browser's blue. In base, so any rule the page or a component brings (a later layer) still wins. */
28
+ .free-page-body a { color: var(--link); }
29
+
26
30
  body {
27
31
  margin: 0;
28
32
  background: var(--ground);
@@ -413,6 +413,13 @@ body.type-mono { --mono: var(--code); --data-face: var(--code); }
413
413
  background: var(--surface); color: var(--ink);
414
414
  border: 1px solid var(--line-control); border-radius: var(--field-radius, var(--radius));
415
415
  }
416
+ /* A finger's 44px, as forms.css asks of every field on a coarse pointer: the rule above sits in a later layer than that
417
+ one and held the box at 36px on a phone (grade's small-target on the kit's own Search and TextField). */
418
+ @media (pointer: coarse) {
419
+ :root[data-visual-theme] :is(.modal, .form-page, .insert-form, .command-field, .insert-field, .signin-form, .front-search-form, .account-profile-field, .confirm, .form-field)
420
+ :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="color"], [type="file"], .picker-input), select, .dd-button, .record-picker-trigger),
421
+ :root[data-visual-theme] .field-control:not(textarea) { min-height: max(36px, calc(44px / var(--density-zoom, 1))); }
422
+ }
416
423
  /* One height whatever the family's own padding said: 7 + 20 + 7 and the edge
417
424
  is 36px, so a text box, a date and a Select stand level in a row (a form
418
425
  page's text box was 36px and its date 41px). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mistriwork/kit",
3
- "version": "1.0.0-rc.29",
3
+ "version": "1.0.0-rc.31",
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": {
@@ -83,8 +83,8 @@
83
83
  "./package.json": "./package.json"
84
84
  },
85
85
  "dependencies": {
86
- "@mistriwork/engine": "1.0.0-rc.29",
87
- "@mistriwork/ui": "1.0.0-rc.29",
86
+ "@mistriwork/engine": "1.0.0-rc.31",
87
+ "@mistriwork/ui": "1.0.0-rc.31",
88
88
  "intl-messageformat": "12.1.2",
89
89
  "qrcode-generator": "^2.0.4"
90
90
  },