@mistriwork/kit 1.0.0-rc.42 → 1.0.0-rc.43
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/barlowFace.css +66 -0
- package/dist/client/components/NewRecord.js +15 -14
- package/dist/client/components/RecordSummaries.d.ts +6 -0
- package/dist/client/components/RecordSummaries.js +13 -0
- package/dist/client/components/dashboardModel.d.ts +6 -2
- package/dist/client/components/dashboardModel.js +27 -12
- package/dist/client/components/valueModel.js +49 -20
- package/dist/client/copy/forms/components/NewRecord.d.ts +0 -1
- package/dist/client/copy/forms/components/NewRecord.js +0 -1
- package/dist/client/fonts/faces.css +2 -2
- package/dist/client/interFace.css +61 -0
- package/dist/client/lumenLook.css +1 -59
- package/dist/client/structure.css +25 -1
- package/dist/client/style.css +3 -0
- package/dist/client/themeFamilies.css +1 -1
- package/dist/client/visualTheme.js +3 -0
- package/dist/client/workshopLook.css +2 -64
- package/dist/shared/uiTokens.js +5 -1
- package/dist/vite.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* Barlow, Workshop's face and any theme's that names it first (themeRecipes.ts recipeAttributes): a sheet of its own,
|
|
2
|
+
as interFace.css is Lumen's, so a theme set in Barlow does not fetch the whole of Workshop's look for the
|
|
3
|
+
declaration, nor wear a rule of it that is not scoped to a recipe. A stack that begins with the face brings this sheet, as Workshop's does. */
|
|
4
|
+
/* Barlow, a grotesk cut from road and workshop signage (SIL Open Font
|
|
5
|
+
License; its text in fonts/Barlow-OFL.txt and dist/client/fonts/): the
|
|
6
|
+
regular and semibold for the interface, data and labels, the semi-condensed
|
|
7
|
+
bold for titles, figures and the App's name. Declared here so only a
|
|
8
|
+
page wearing Workshop, or a stack that names Barlow, asks for it; the server preloads the regular and the
|
|
9
|
+
condensed bold beside it (server/clientSurface.ts, lookPreloads).
|
|
10
|
+
`swap`, as Lumen's Inter: the page is held until this sheet is in, and the
|
|
11
|
+
fallback below is cut to Barlow's measure, so the swap barely moves a line. */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: Barlow;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
font-display: swap;
|
|
17
|
+
src: url('./fonts/barlow-400.woff2') format('woff2');
|
|
18
|
+
}
|
|
19
|
+
@font-face {
|
|
20
|
+
font-family: Barlow;
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
font-display: swap;
|
|
24
|
+
src: url('./fonts/barlow-600.woff2') format('woff2');
|
|
25
|
+
}
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: 'Barlow Semi Condensed';
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
font-display: swap;
|
|
31
|
+
src: url('./fonts/barlow-semi-condensed-700.woff2') format('woff2');
|
|
32
|
+
}
|
|
33
|
+
/* The faces that stand in until Barlow arrives: Arial (Liberation Sans, its
|
|
34
|
+
metric twin, on Linux) scaled to Barlow's width and given Barlow's ascent and
|
|
35
|
+
descent (1.0 and 0.2 of the em, no line gap), as Lumen cuts Arial to Inter's.
|
|
36
|
+
Measured in Chromium over a line of interface text with its figures:
|
|
37
|
+
Barlow's regular is 92.3% of Arial's, its semibold 89.5% of Arial Bold's,
|
|
38
|
+
and the semi-condensed bold 82.1% of Arial Bold's. An override is said of
|
|
39
|
+
the adjusted size, so each is Barlow's ratio over the face's size-adjust. */
|
|
40
|
+
@font-face {
|
|
41
|
+
font-family: 'Barlow Fallback';
|
|
42
|
+
font-weight: 100 500;
|
|
43
|
+
src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Helvetica');
|
|
44
|
+
size-adjust: 92.3%;
|
|
45
|
+
ascent-override: 108.34%;
|
|
46
|
+
descent-override: 21.67%;
|
|
47
|
+
line-gap-override: 0%;
|
|
48
|
+
}
|
|
49
|
+
@font-face {
|
|
50
|
+
font-family: 'Barlow Fallback';
|
|
51
|
+
font-weight: 600 900;
|
|
52
|
+
src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Helvetica Bold');
|
|
53
|
+
size-adjust: 89.5%;
|
|
54
|
+
ascent-override: 111.73%;
|
|
55
|
+
descent-override: 22.35%;
|
|
56
|
+
line-gap-override: 0%;
|
|
57
|
+
}
|
|
58
|
+
@font-face {
|
|
59
|
+
font-family: 'Barlow Semi Condensed Fallback';
|
|
60
|
+
font-weight: 100 900;
|
|
61
|
+
src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Helvetica Bold');
|
|
62
|
+
size-adjust: 82.1%;
|
|
63
|
+
ascent-override: 121.8%;
|
|
64
|
+
descent-override: 24.36%;
|
|
65
|
+
line-gap-override: 0%;
|
|
66
|
+
}
|
|
@@ -33,7 +33,8 @@ import { ConfirmDialog } from './Prompt.js';
|
|
|
33
33
|
import { useForm } from '@tanstack/react-form';
|
|
34
34
|
import { columnKind, isFlagColumn, primaryKey } from '@mistriwork/engine/shared/schema.js';
|
|
35
35
|
import { humanName, vocabularyWord } from '@mistriwork/engine/shared/model.js';
|
|
36
|
-
import {
|
|
36
|
+
import { recordNoun } from '@mistriwork/engine/shared/appNoun.js';
|
|
37
|
+
import { inferredFormDefaults, literalDefault } from '@mistriwork/engine/shared/formValues.js';
|
|
37
38
|
import { sessionIdentity } from '../sessionIdentity.js';
|
|
38
39
|
import { Dropdown, readsAsName } from './Dropdown.js';
|
|
39
40
|
import { RecordPicker } from './RecordPicker.js';
|
|
@@ -605,27 +606,25 @@ export function PlatformControl({ column, app, required, assigned, spoken, targe
|
|
|
605
606
|
}
|
|
606
607
|
register(node);
|
|
607
608
|
};
|
|
608
|
-
/* The default as the database spells it in the workbench — `'open'`,
|
|
609
|
-
`CURRENT_TIMESTAMP` — and as a person would in an app: quotes off,
|
|
610
|
-
capitalised, no arrow to a table name. */
|
|
611
|
-
const plainDefault = String(column.default ?? '').replace(/^'(.*)'$/, '$1');
|
|
612
609
|
const allowed = column.allowed;
|
|
613
610
|
/* A stored word as the App says it everywhere else: its `values`, else the vocabulary's words. */
|
|
614
611
|
const word = (stored) => (app ? (wordFor(rule, stored) ?? vocabularyWord(stored)) : stored);
|
|
612
|
+
/* The default as the database spells it in the workbench — `'open'`, `CURRENT_TIMESTAMP` — and in an App only a
|
|
613
|
+
plain value, said as the column says it: an expression (a clock, a sequence) or a default the server keeps
|
|
614
|
+
private is the database's to fill, and a field has nothing useful to say about it (a field report). */
|
|
615
|
+
const literal = app ? literalDefault(column.default) : undefined;
|
|
615
616
|
const hint = explicitNull
|
|
616
617
|
? app
|
|
617
618
|
? say('common.noValue')
|
|
618
619
|
: 'null'
|
|
619
620
|
: column.identity || column.name === assigned
|
|
620
621
|
? say('assignedByTheDatabase')
|
|
621
|
-
:
|
|
622
|
-
?
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
: column.hasDefault === true
|
|
628
|
-
? say('defaultSuppliedByTheDatabase')
|
|
622
|
+
: literal !== undefined
|
|
623
|
+
? say('defaultValue', { value: allowed?.includes(literal) ? word(literal) : (wordFor(rule, literal) ?? literal) })
|
|
624
|
+
: column.default !== undefined || column.hasDefault === true
|
|
625
|
+
? app
|
|
626
|
+
? ''
|
|
627
|
+
: `default: ${column.default ?? ''}`
|
|
629
628
|
: column.references
|
|
630
629
|
? `→ ${column.references.table}`
|
|
631
630
|
: '';
|
|
@@ -749,7 +748,9 @@ const TAB_STOPS = 'a[href], button:not(:disabled), input:not(:disabled):not([typ
|
|
|
749
748
|
/** The form's heading, the way both frames say it. */
|
|
750
749
|
function newRecordTitle(table, app) {
|
|
751
750
|
return say('newThing', {
|
|
752
|
-
|
|
751
|
+
/* The resource's noun, as the list's New button says it ("New order", not "New purchase_orders"): the form is
|
|
752
|
+
headed by the word the button that opened it wore. */
|
|
753
|
+
thing: app ? recordNoun(resourceOf(shell().app(), table.id)?.noun, table.name) : table.name,
|
|
753
754
|
});
|
|
754
755
|
}
|
|
755
756
|
/** What the database and this App's machine fill on a new record of `table`, unasked (form.ts, platformWritten). */
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list read as summaries: a title and up to four facts a row, the dress a narrow screen and a related list wear in
|
|
3
|
+
* place of the grid. This module owns which columns say what: the facts a question already fixes are left out
|
|
4
|
+
* (`fixedColumns`), the title a row's link takes when the row names nothing itself (`linkTitleColumn`), and whether the
|
|
5
|
+
* table has more to say than the summaries do (`tableSaysMore`).
|
|
6
|
+
*/
|
|
1
7
|
import { type ReactNode } from 'react';
|
|
2
8
|
import { type TableMeta } from '@mistriwork/engine/shared/schema.js';
|
|
3
9
|
import type { TrailList } from '../recordTrail.js';
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A list read as summaries: a title and up to four facts a row, the dress a narrow screen and a related list wear in
|
|
4
|
+
* place of the grid. This module owns which columns say what: the facts a question already fixes are left out
|
|
5
|
+
* (`fixedColumns`), the title a row's link takes when the row names nothing itself (`linkTitleColumn`), and whether the
|
|
6
|
+
* table has more to say than the summaries do (`tableSaysMore`).
|
|
7
|
+
*/
|
|
2
8
|
import { Fragment } from 'react';
|
|
3
9
|
import { useMessageLanguage } from './useMessageLanguage.js';
|
|
4
10
|
import { columnLabel, keyOf, labelPath, openRecord, recordLabel, rowLabel, state } from '../core.js';
|
|
@@ -79,6 +85,13 @@ function shownValue(row, name, referenceLabels) {
|
|
|
79
85
|
*/
|
|
80
86
|
function labelColumns(table) {
|
|
81
87
|
const template = recordLabel(table);
|
|
88
|
+
/* A column that names the record (`recordLabel: 'kind'`) is its own label, even where a display rule says its codes as
|
|
89
|
+
words and the catalog computes the name (the title is "Identity", the stored code "identity"): the fact under the
|
|
90
|
+
title would say the same word again, and the raw-value comparison below could not tell. */
|
|
91
|
+
if (typeof template === 'string' && template !== '' && !isLabelTemplate(template)) {
|
|
92
|
+
const column = template;
|
|
93
|
+
return column.includes('.') ? [column, column.split('.')[0]] : [column];
|
|
94
|
+
}
|
|
82
95
|
const parsed = isLabelTemplate(template) ? parseLabelTemplate(template) : undefined;
|
|
83
96
|
if (!parsed || 'problem' in parsed)
|
|
84
97
|
return [];
|
|
@@ -49,11 +49,13 @@ export interface Section {
|
|
|
49
49
|
comparePeriod?: boolean;
|
|
50
50
|
better?: 'up' | 'down';
|
|
51
51
|
spark?: boolean;
|
|
52
|
+
/** metric, breakdown, chart and matrix: the measure counts a currency's minor units (cents), said in its major unit. */
|
|
53
|
+
minor?: true;
|
|
52
54
|
/** metric: how its figure is said, and the word after it, where its measure has no column's rule to say it. */
|
|
53
55
|
format?: FigureFormat;
|
|
54
56
|
unit?: string;
|
|
55
57
|
/** metric: money said exact, to the currency's minor digits at any size (the default), or compact from a thousand. */
|
|
56
|
-
figure?: 'exact' | 'compact';
|
|
58
|
+
figure?: 'exact' | 'compact' | 'whole';
|
|
57
59
|
shape?: string;
|
|
58
60
|
/** funnel: the stages a row reaches in order (shared/funnel.ts). */
|
|
59
61
|
stages?: import('@mistriwork/engine/shared/funnel.js').FunnelStage[];
|
|
@@ -204,7 +206,9 @@ export declare function sayer(section: Section, measured?: unknown, { card, whol
|
|
|
204
206
|
* average or a ratio to a headline's precision; then the unit. A dashboard's
|
|
205
207
|
* metric and a record page's say a figure the same way.
|
|
206
208
|
*/
|
|
207
|
-
export declare function figureSayer(rule: DisplayRule | null, unit?: string, compactFrom?: number
|
|
209
|
+
export declare function figureSayer(rule: DisplayRule | null, unit?: string, compactFrom?: number,
|
|
210
|
+
/** `false`: money to the currency's major unit, no minor digits (a metric's `figure: 'whole'`). */
|
|
211
|
+
cents?: boolean): (value: unknown) => string;
|
|
208
212
|
export { breakdownText, sectionPeriod, windowed };
|
|
209
213
|
/** The section's whole query, as the list page would take it. */
|
|
210
214
|
export declare function fullQuery(section: Section): string;
|
|
@@ -59,13 +59,21 @@ export function figure(value) {
|
|
|
59
59
|
* subtracts keeps its first term's dress.
|
|
60
60
|
*/
|
|
61
61
|
function measureRule(section) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const m = /^(?:sum|avg|min|max|median)\s+([A-Za-z0-9_.]+)/i.exec(section.measure ?? '');
|
|
63
|
+
const column = m && section.table ? columnDisplay(section.table, m[1]) : null;
|
|
64
|
+
/* The author's word for the figure stands over the column's: "avg resolution_met * 100" is a share. Money said so,
|
|
65
|
+
or counted in cents (`minor`), still keeps how the column counts it and in what currency: a cents column whose
|
|
66
|
+
display is a component has no money rule to read, and its sum said "$412,380" was a hundred times too large
|
|
67
|
+
(a field report). */
|
|
68
|
+
if (section.format || section.minor) {
|
|
69
|
+
if (section.format && section.format !== 'money')
|
|
70
|
+
return { format: section.format };
|
|
71
|
+
const minor = section.minor || column?.minor;
|
|
72
|
+
return { format: 'money', ...(minor ? { minor: true } : {}), ...(column?.currency ? { currency: column.currency } : {}) };
|
|
73
|
+
}
|
|
65
74
|
if (/\s[*/]\s/.test(section.measure ?? ''))
|
|
66
75
|
return null;
|
|
67
|
-
const
|
|
68
|
-
const rule = m && section.table ? columnDisplay(section.table, m[1]) : null;
|
|
76
|
+
const rule = column;
|
|
69
77
|
/* A query kept to one currency says its figures in it. */
|
|
70
78
|
const path = rule?.format === 'money' ? currencyPath(rule, m[1]) : undefined;
|
|
71
79
|
const pinned = path ? pinnedCurrency(section.query, path) : undefined;
|
|
@@ -136,14 +144,16 @@ export function legendSayer(section, figures) {
|
|
|
136
144
|
/** How a section says a figure: in its measure's dress, else as a number. */
|
|
137
145
|
export function sayer(section, measured,
|
|
138
146
|
/* A metric card's own figure, its change and its goal: money exact, or compact from a thousand (CARD_COMPACT) where
|
|
139
|
-
the metric says `figure: 'compact'`; `whole`, exact at any size, for the card's title; `compact`, a legend's
|
|
147
|
+
the metric says `figure: 'compact'`, or whole, to the major unit, where it says `figure: 'whole'`; `whole`, exact at any size, for the card's title; `compact`, a legend's
|
|
140
148
|
figures compact from a thousand. */
|
|
141
149
|
{ card = false, whole = false, compact = false } = {}) {
|
|
142
150
|
const rule = measureRule(section);
|
|
143
151
|
/* Figures in one currency, read apart per currency: its change and its goal are said in it too. */
|
|
144
152
|
const one = measured instanceof CurrencyFigures && measured.figures.length === 1 ? measured.figures[0][0] : undefined;
|
|
145
153
|
const dress = one && rule ? { ...rule, currency: one } : rule;
|
|
146
|
-
const said = figureSayer(dress, section.unit, whole ? EXACT : compact ? CARD_COMPACT : card ? (section.figure === 'compact' ? CARD_COMPACT : EXACT) : COMPACT_FROM
|
|
154
|
+
const said = figureSayer(dress, section.unit, whole ? EXACT : compact ? CARD_COMPACT : card ? (section.figure === 'compact' ? CARD_COMPACT : EXACT) : COMPACT_FROM,
|
|
155
|
+
/* `figure: 'whole'` rounds a card's money to the major unit: a six-figure sum with cents wrapped in a quarter-width card. */
|
|
156
|
+
card && !whole && section.figure === 'whole' ? false : undefined);
|
|
147
157
|
/* Figures said side by side, in one form: where every one is a thousand or more, money drops its cents, so
|
|
148
158
|
"$67,713.40" never stands beside "$17,970" in one breakdown; else every figure says cents if one has some. */
|
|
149
159
|
const among = (values) => {
|
|
@@ -152,9 +162,12 @@ export function sayer(section, measured,
|
|
|
152
162
|
const minor = dress.minor ? 10 ** currencyDigits(dress.currency || defaultCurrency()) : 1;
|
|
153
163
|
const majors = values.filter((v) => v !== null && v !== undefined && v !== '').map((v) => Number(v) / minor);
|
|
154
164
|
const large = majors.length > 0 && majors.every((n) => Math.abs(n) >= 1000);
|
|
155
|
-
/*
|
|
156
|
-
|
|
157
|
-
const
|
|
165
|
+
/* Where one figure reaches a hundred thousand every one goes compact from a thousand, as a legend's do: "$412.4K"
|
|
166
|
+
beside "$27,300.00" read as two formats in one breakdown, and grade said so (a field report). */
|
|
167
|
+
const compact = majors.some((n) => Number.isFinite(n) && Math.abs(n) >= COMPACT_FROM);
|
|
168
|
+
/* Cents for every figure where one has some and none is large or compact; else none. */
|
|
169
|
+
const cents = !large && !compact && majors.some((n) => Number.isFinite(n) && Math.round(n * 100) % 100 !== 0);
|
|
170
|
+
const one = (v) => dressedFigure(dress, v, cents, compact ? CARD_COMPACT : COMPACT_FROM) ?? said(v);
|
|
158
171
|
return section.unit ? (v) => withUnit(one(v), section.unit) : one;
|
|
159
172
|
};
|
|
160
173
|
return Object.assign(said, { tick: tickSayer(dress, section.unit), among });
|
|
@@ -191,8 +204,10 @@ function tickSayer(rule, unit) {
|
|
|
191
204
|
* average or a ratio to a headline's precision; then the unit. A dashboard's
|
|
192
205
|
* metric and a record page's say a figure the same way.
|
|
193
206
|
*/
|
|
194
|
-
export function figureSayer(rule, unit, compactFrom = COMPACT_FROM
|
|
195
|
-
|
|
207
|
+
export function figureSayer(rule, unit, compactFrom = COMPACT_FROM,
|
|
208
|
+
/** `false`: money to the currency's major unit, no minor digits (a metric's `figure: 'whole'`). */
|
|
209
|
+
cents) {
|
|
210
|
+
const said = (v) => dressedFigure(rule, v, cents, compactFrom) ?? sharedFigure(rule, v) ?? durationFigure(rule, v) ?? measuredFraction(v) ?? figure(v);
|
|
196
211
|
return unit ? (v) => withUnit(said(v), unit) : said;
|
|
197
212
|
}
|
|
198
213
|
/** A share said as one: 78.261 is "78.3%". */
|
|
@@ -332,7 +332,7 @@ export function dressFor(rule, value) {
|
|
|
332
332
|
kind: 'tone',
|
|
333
333
|
tone,
|
|
334
334
|
text,
|
|
335
|
-
label: figure ?? wordFor(rule, text) ?? vocabularyWord(text),
|
|
335
|
+
label: figure ?? wordFor(rule, text) ?? tonedDay(rule, value, text) ?? vocabularyWord(text),
|
|
336
336
|
...(icon ? { icon } : {}),
|
|
337
337
|
...(figure !== null ? { figure: true } : {}),
|
|
338
338
|
};
|
|
@@ -382,22 +382,61 @@ export function dressFor(rule, value) {
|
|
|
382
382
|
return { kind: 'items', items, text: items.join(', ') };
|
|
383
383
|
}
|
|
384
384
|
if (rule.format === 'relative') {
|
|
385
|
-
const said =
|
|
386
|
-
/* Said from today only while it is near: "2 weeks ago" on a ledger hides the date an accountant needs, and
|
|
387
|
-
"6 months ago" is never what a due date is for. Past about two weeks the date is the text and the relative
|
|
388
|
-
phrase its tooltip. */
|
|
385
|
+
const said = relativeSaid(rule, text);
|
|
389
386
|
const days = daysFromToday(text);
|
|
390
387
|
/* Passed while its row is still open: drawn in the warning tone, however it is said. */
|
|
391
388
|
const overdue = rule.open === true && days !== null && days < 0 ? { overdue: true } : {};
|
|
392
|
-
if (said && days !== null && (rule.absolute || Math.abs(days) > NEAR_DAYS))
|
|
393
|
-
return { kind: 'relative', text: formatDate(text), title: said, ...overdue };
|
|
394
389
|
if (said)
|
|
395
|
-
return { kind: 'relative',
|
|
390
|
+
return { kind: 'relative', ...said, ...overdue };
|
|
396
391
|
}
|
|
397
392
|
if (rule.avatar && text.trim())
|
|
398
393
|
return { kind: 'avatar', text, initials: initialsOf(text), hue: hueOf(text) };
|
|
399
394
|
return null;
|
|
400
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* A relative day in words: from today while it is near, since "2 weeks ago" on a ledger hides the date an accountant
|
|
398
|
+
* needs and "6 months ago" is never what a due date is for. Past about two weeks the date is the text and the
|
|
399
|
+
* relative phrase its tooltip.
|
|
400
|
+
*/
|
|
401
|
+
function relativeSaid(rule, text) {
|
|
402
|
+
const said = formatRelativeDay(text);
|
|
403
|
+
if (!said)
|
|
404
|
+
return null;
|
|
405
|
+
const days = daysFromToday(text);
|
|
406
|
+
return days !== null && (rule.absolute || Math.abs(days) > NEAR_DAYS)
|
|
407
|
+
? { text: formatDate(text), title: said }
|
|
408
|
+
: { text: said, title: text };
|
|
409
|
+
}
|
|
410
|
+
const ISO_DAY = /^\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}(?::?\d{2})?)?)?$/;
|
|
411
|
+
/**
|
|
412
|
+
* A toned day says what it would say untoned: its tone is the pill it wears, not a reason to draw the stored ISO day.
|
|
413
|
+
* A `relative` rule says it from today while near; no format says it as a date column does (daySaid). A field report
|
|
414
|
+
* found the tone dropped both. Undefined for a value that is no day.
|
|
415
|
+
*/
|
|
416
|
+
function tonedDay(rule, value, text) {
|
|
417
|
+
if (typeof value !== 'string' || !ISO_DAY.test(text.trim()))
|
|
418
|
+
return undefined;
|
|
419
|
+
if (rule.format === 'relative')
|
|
420
|
+
return relativeSaid(rule, text.trim())?.text;
|
|
421
|
+
if (rule.format !== undefined)
|
|
422
|
+
return undefined;
|
|
423
|
+
const said = daySaid(text.trim()).text;
|
|
424
|
+
return said === text ? undefined : said;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* A stored day or moment in the reader's words, as a date column says it: Postgres hands back an ISO wire format,
|
|
428
|
+
* precise and unreadable. A midnight is the day it is, the original kept in the title; a midnight with a zone is an
|
|
429
|
+
* instant, not a day, as the grid reads it (columns.js). An App says a near day from today, the rest as the date,
|
|
430
|
+
* and the whole of it on hover, as its grid does.
|
|
431
|
+
*/
|
|
432
|
+
function daySaid(text) {
|
|
433
|
+
const midnight = /[ T]00:00(:00(\.0+)?)?$/.test(text);
|
|
434
|
+
const near = shellBody().classList.contains('app-mode') ? sayNearDay(text, !midnight) : null;
|
|
435
|
+
if (near)
|
|
436
|
+
return { text: near.text, title: near.title };
|
|
437
|
+
const shown = midnight ? formatDate(text) : formatDateTime(text);
|
|
438
|
+
return { text: shown, title: shown === text ? undefined : text };
|
|
439
|
+
}
|
|
401
440
|
const HEX = /^#[0-9a-f]{6}$|^#[0-9a-f]{3}$/i;
|
|
402
441
|
const CLOCK = /^(\d{1,2}):(\d{2})(?::\d{2}(?:\.\d+)?)?$/;
|
|
403
442
|
const MONTH = /^(\d{4})-(\d{2})(?:-\d{2})?/;
|
|
@@ -520,18 +559,8 @@ export function sayValue(col, value) {
|
|
|
520
559
|
: formatNumber(n, { maximumFractionDigits: 6, useGrouping: !YEAR_NAME.test((col?.name ?? '').split('.').pop() ?? '') });
|
|
521
560
|
return { kind: 'number', text: shown, title: shown === text ? undefined : text };
|
|
522
561
|
}
|
|
523
|
-
if (plan.kind === 'date' || /date|time/.test(type))
|
|
524
|
-
|
|
525
|
-
in the reader's words, a midnight as the day it is, the original kept
|
|
526
|
-
in the title. A midnight with a zone is an instant, not a day, as the grid reads it (columns.js). */
|
|
527
|
-
const midnight = /[ T]00:00(:00(\.0+)?)?$/.test(text);
|
|
528
|
-
/* An App says a near day from today, the rest as the date, and the whole of it on hover, as its grid does. */
|
|
529
|
-
const near = shellBody().classList.contains('app-mode') ? sayNearDay(text, !midnight) : null;
|
|
530
|
-
if (near)
|
|
531
|
-
return { kind: 'date', text: near.text, title: near.title };
|
|
532
|
-
const shown = midnight ? formatDate(text) : formatDateTime(text);
|
|
533
|
-
return { kind: 'date', text: shown, title: shown === text ? undefined : text };
|
|
534
|
-
}
|
|
562
|
+
if (plan.kind === 'date' || /date|time/.test(type))
|
|
563
|
+
return { kind: 'date', ...daySaid(text) };
|
|
535
564
|
/* Long text gets its own block; a value with a space is prose, one
|
|
536
565
|
without is a token. */
|
|
537
566
|
/* An unbroken run of key or ciphertext characters — base64, hex, a token
|
|
@@ -14,7 +14,6 @@ export declare const say: import("../../../messages.js").RoomMessage<{
|
|
|
14
14
|
readonly cannotAddThisRecord: "Cannot add this record. Required fields hidden by this form need valid defaults or visible controls: {map}.";
|
|
15
15
|
readonly assignedByTheDatabase: "assigned by the database";
|
|
16
16
|
readonly defaultValue: "Default: {value}";
|
|
17
|
-
readonly defaultSuppliedByTheDatabase: "Default supplied by the database";
|
|
18
17
|
readonly one: " (one of {allowed})";
|
|
19
18
|
readonly newThing: "New {thing}";
|
|
20
19
|
readonly discardNewRecord: "Discard new record?";
|
|
@@ -16,7 +16,6 @@ export const say = defineMessages({
|
|
|
16
16
|
cannotAddThisRecord: 'Cannot add this record. Required fields hidden by this form need valid defaults or visible controls: {map}.',
|
|
17
17
|
assignedByTheDatabase: 'assigned by the database',
|
|
18
18
|
defaultValue: 'Default: {value}',
|
|
19
|
-
defaultSuppliedByTheDatabase: 'Default supplied by the database',
|
|
20
19
|
one: ' (one of {allowed})',
|
|
21
20
|
newThing: 'New {thing}',
|
|
22
21
|
discardNewRecord: 'Discard new record?',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Semi Condensed, IBM Plex Mono or Inter in a stack, as Workshop, Ledger and Lumen do. Each is under the SIL Open Font
|
|
4
4
|
License, whose text travels beside it (the *-OFL.txt files here; the kit's Vite preset copies them into the build).
|
|
5
5
|
A rule costs nothing until a line is drawn in its family, so importing this sheet fetches no font a page does not
|
|
6
|
-
set. The
|
|
6
|
+
set. The kit's own face sheets (barlowFace.css, interFace.css, ledgerLook.css) keep their own rules and their cut
|
|
7
7
|
fallbacks, so a page wearing a kit look never loads this one. `swap`, as theirs: a host holds its page until its
|
|
8
8
|
look's sheet is in (visualTheme.ts registerHostLooks), so the face is mostly there by the first paint. */
|
|
9
9
|
@font-face {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
font-display: swap;
|
|
42
42
|
src: url('./ibm-plex-mono-500.woff2') format('woff2');
|
|
43
43
|
}
|
|
44
|
-
/* Latin, variable from 100 to 900, its `tnum` cut to the ten figures (
|
|
44
|
+
/* Latin, variable from 100 to 900, its `tnum` cut to the ten figures (interFace.css says why). */
|
|
45
45
|
@font-face {
|
|
46
46
|
font-family: Inter;
|
|
47
47
|
font-style: normal;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* Inter, Lumen's face and any theme's that names it first (themeRecipes.ts recipeAttributes): a sheet of its own so
|
|
2
|
+
a theme that sets its interface in Inter does not fetch the whole of Lumen's look for the declaration, nor wear a
|
|
3
|
+
rule of Lumen's that is not scoped to a recipe. A stack that begins with the face brings this sheet, as Lumen's does. The server preloads the
|
|
4
|
+
file beside it (server/clientSurface.ts, SHEET_FACES, lookPreloads). */
|
|
5
|
+
/* Lumen's face, shipped with it rather than hoped for: named and not
|
|
6
|
+
fetched, Inter drew only where it was installed, and elsewhere the system
|
|
7
|
+
sans stood in (DejaVu Sans on most Linux, wider, so a Lumen screen set
|
|
8
|
+
differently on every machine). Inter's variable face, its Latin subset
|
|
9
|
+
(48 KB, weights 100 to 900 in one file; SIL Open Font License, its text in
|
|
10
|
+
fonts/Inter-OFL.txt and dist/client/fonts/), declared here so only a page
|
|
11
|
+
wearing Lumen, or a stack that names Inter, asks for it. `swap`, not `optional`: the page
|
|
12
|
+
is held until this sheet is in and the face is fetched beside it, so a
|
|
13
|
+
first visit mostly reveals in Inter already, and where it does not the
|
|
14
|
+
fallback below is cut to Inter's measure, so the swap moves almost nothing.
|
|
15
|
+
`optional` would keep a slow first visit in the fallback for the whole
|
|
16
|
+
page, and the next page in Inter: the same screen set two ways.
|
|
17
|
+
One change from Inter as released: its `tnum` turns the ten figures
|
|
18
|
+
tabular and also the hyphen, comma, period, colon, the brackets, the
|
|
19
|
+
operators and the space, each set a figure wide. Text under
|
|
20
|
+
`tabular-nums` (a document, a record's values) then read "Sign - ins",
|
|
21
|
+
"SR - 1". The file's `tnum` lookup is cut to the ten figures (fontTools:
|
|
22
|
+
the GSUB lookup `tnum` names keeps zero to nine), as the system faces the
|
|
23
|
+
other looks wear already have it; e2e/tabular-figures.spec.ts holds it. */
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: Inter;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 100 900;
|
|
28
|
+
font-display: swap;
|
|
29
|
+
src: url('./fonts/inter-latin.woff2') format('woff2');
|
|
30
|
+
unicode-range:
|
|
31
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
|
|
32
|
+
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
33
|
+
}
|
|
34
|
+
/* The face that stands in until Inter arrives, and past its Latin range:
|
|
35
|
+
Arial (Liberation Sans, its metric twin, on Linux), scaled to Inter's width
|
|
36
|
+
and given Inter's ascent and descent (1984 and 494 of 2048 units, no line
|
|
37
|
+
gap), so the swap barely rewraps a line and never moves a baseline. The
|
|
38
|
+
widths are measured in Chromium over a line of interface text with its
|
|
39
|
+
figures: Inter's regular is 106.1% of Arial's, and its 600 and 700 are
|
|
40
|
+
101.1% and 102.1% of Arial Bold's, so the heavier weights take Arial's own
|
|
41
|
+
bold at 101.6% rather than a regular thickened and widened. An override is
|
|
42
|
+
said of the adjusted size, so each is Inter's ratio over the face's
|
|
43
|
+
size-adjust. */
|
|
44
|
+
@font-face {
|
|
45
|
+
font-family: 'Inter Fallback';
|
|
46
|
+
font-weight: 100 500;
|
|
47
|
+
src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Helvetica');
|
|
48
|
+
size-adjust: 106.1%;
|
|
49
|
+
ascent-override: 91.3%;
|
|
50
|
+
descent-override: 22.73%;
|
|
51
|
+
line-gap-override: 0%;
|
|
52
|
+
}
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: 'Inter Fallback';
|
|
55
|
+
font-weight: 600 900;
|
|
56
|
+
src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Helvetica Bold');
|
|
57
|
+
size-adjust: 101.6%;
|
|
58
|
+
ascent-override: 95.35%;
|
|
59
|
+
descent-override: 23.74%;
|
|
60
|
+
line-gap-override: 0%;
|
|
61
|
+
}
|
|
@@ -5,65 +5,7 @@
|
|
|
5
5
|
lookSheetReady) — rather than carried in the first stylesheet that the
|
|
6
6
|
Workbench, the public pages and every other look share
|
|
7
7
|
(scripts/bundle-budget.mjs). Lumen is the default an App wears, so most
|
|
8
|
-
Apps fetch it; a page in Mono or Sage, or none, does not. */
|
|
9
|
-
/* Lumen's face, shipped with it rather than hoped for: named and not
|
|
10
|
-
fetched, Inter drew only where it was installed, and elsewhere the system
|
|
11
|
-
sans stood in (DejaVu Sans on most Linux, wider, so a Lumen screen set
|
|
12
|
-
differently on every machine). Inter's variable face, its Latin subset
|
|
13
|
-
(48 KB, weights 100 to 900 in one file; SIL Open Font License, its text in
|
|
14
|
-
fonts/Inter-OFL.txt and dist/client/fonts/), declared here so only a page
|
|
15
|
-
wearing Lumen asks for it; the server preloads it beside this sheet
|
|
16
|
-
(server/clientSurface.ts, lookPreloads). `swap`, not `optional`: the page
|
|
17
|
-
is held until this sheet is in and the face is fetched beside it, so a
|
|
18
|
-
first visit mostly reveals in Inter already, and where it does not the
|
|
19
|
-
fallback below is cut to Inter's measure, so the swap moves almost nothing.
|
|
20
|
-
`optional` would keep a slow first visit in the fallback for the whole
|
|
21
|
-
page, and the next page in Inter: the same screen set two ways.
|
|
22
|
-
One change from Inter as released: its `tnum` turns the ten figures
|
|
23
|
-
tabular and also the hyphen, comma, period, colon, the brackets, the
|
|
24
|
-
operators and the space, each set a figure wide. Text under
|
|
25
|
-
`tabular-nums` (a document, a record's values) then read "Sign - ins",
|
|
26
|
-
"SR - 1". The file's `tnum` lookup is cut to the ten figures (fontTools:
|
|
27
|
-
the GSUB lookup `tnum` names keeps zero to nine), as the system faces the
|
|
28
|
-
other looks wear already have it; e2e/tabular-figures.spec.ts holds it. */
|
|
29
|
-
@font-face {
|
|
30
|
-
font-family: Inter;
|
|
31
|
-
font-style: normal;
|
|
32
|
-
font-weight: 100 900;
|
|
33
|
-
font-display: swap;
|
|
34
|
-
src: url('./fonts/inter-latin.woff2') format('woff2');
|
|
35
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
36
|
-
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
37
|
-
}
|
|
38
|
-
/* The face that stands in until Inter arrives, and past its Latin range:
|
|
39
|
-
Arial (Liberation Sans, its metric twin, on Linux), scaled to Inter's width
|
|
40
|
-
and given Inter's ascent and descent (1984 and 494 of 2048 units, no line
|
|
41
|
-
gap), so the swap barely rewraps a line and never moves a baseline. The
|
|
42
|
-
widths are measured in Chromium over a line of interface text with its
|
|
43
|
-
figures: Inter's regular is 106.1% of Arial's, and its 600 and 700 are
|
|
44
|
-
101.1% and 102.1% of Arial Bold's, so the heavier weights take Arial's own
|
|
45
|
-
bold at 101.6% rather than a regular thickened and widened. An override is
|
|
46
|
-
said of the adjusted size, so each is Inter's ratio over the face's
|
|
47
|
-
size-adjust. */
|
|
48
|
-
@font-face {
|
|
49
|
-
font-family: 'Inter Fallback';
|
|
50
|
-
font-weight: 100 500;
|
|
51
|
-
src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Helvetica');
|
|
52
|
-
size-adjust: 106.1%;
|
|
53
|
-
ascent-override: 91.3%;
|
|
54
|
-
descent-override: 22.73%;
|
|
55
|
-
line-gap-override: 0%;
|
|
56
|
-
}
|
|
57
|
-
@font-face {
|
|
58
|
-
font-family: 'Inter Fallback';
|
|
59
|
-
font-weight: 600 900;
|
|
60
|
-
src:
|
|
61
|
-
local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Helvetica Bold');
|
|
62
|
-
size-adjust: 101.6%;
|
|
63
|
-
ascent-override: 95.35%;
|
|
64
|
-
descent-override: 23.74%;
|
|
65
|
-
line-gap-override: 0%;
|
|
66
|
-
}
|
|
8
|
+
Apps fetch it; a page in Mono or Sage, or none, does not. Its face (Inter) is a sheet of its own, interFace.css. */
|
|
67
9
|
@layer look {
|
|
68
10
|
/* Lumen: flat, calm and modern, with its character in details. A faintly warm shell around white working
|
|
69
11
|
surfaces; lists, sections and field groups open on the ground under hairlines, and elevation only on what
|
|
@@ -1211,6 +1211,19 @@
|
|
|
1211
1211
|
.free-page-body.is-own > .page-section {
|
|
1212
1212
|
padding-top: 0;
|
|
1213
1213
|
}
|
|
1214
|
+
/* The first part of a free-form page that has a head stands one gap under it (--page-head-gap), as a list's controls
|
|
1215
|
+
do. It was the head's own margin, the body's (the sidebar shell's rule below) and the section's, three spaces said
|
|
1216
|
+
one on another: 62px under the head against a list's 27. */
|
|
1217
|
+
.dash-head:has(+ .free-page-body:not(.is-own)) {
|
|
1218
|
+
margin-bottom: 0;
|
|
1219
|
+
}
|
|
1220
|
+
.free-page-body:not(.is-own, .is-bare),
|
|
1221
|
+
body.app-sidebar-shell #content > .applist-head:first-child + .free-page-body:not(.is-own, .is-bare) {
|
|
1222
|
+
padding-top: var(--page-head-gap);
|
|
1223
|
+
}
|
|
1224
|
+
.free-page-body:not(.is-own, .is-bare) > .page-section:first-child {
|
|
1225
|
+
padding-top: 0;
|
|
1226
|
+
}
|
|
1214
1227
|
/* A section's page-row basis (100%) is a width in a row and would be a height in a column. */
|
|
1215
1228
|
.dash-area > .page-section {
|
|
1216
1229
|
flex: 0 0 auto;
|
|
@@ -1493,6 +1506,17 @@
|
|
|
1493
1506
|
background: color-mix(in srgb, var(--ink) 14%, transparent);
|
|
1494
1507
|
}
|
|
1495
1508
|
}
|
|
1509
|
+
/* The foot is as wide as the menu (240px): the picker takes its row and the buttons stand under it, each as wide as
|
|
1510
|
+
its words, not three boxes in one row that ran past the menu's edge (a field report, 330/360). */
|
|
1511
|
+
body.app-sidebar-shell .sidebar-account .tenant-control-host {
|
|
1512
|
+
display: flex;
|
|
1513
|
+
max-width: 100%;
|
|
1514
|
+
min-width: 0;
|
|
1515
|
+
}
|
|
1516
|
+
body.app-sidebar-shell .sidebar-account .tenant-control-inner,
|
|
1517
|
+
body.app-sidebar-shell .sidebar-account .tenant-control-inner .tenant-control-trigger {
|
|
1518
|
+
max-width: 100%;
|
|
1519
|
+
}
|
|
1496
1520
|
body.app-sidebar-shell .sidebar-account + #sidebar-app-footer .sidebar-identity {
|
|
1497
1521
|
padding-top: var(--space-3);
|
|
1498
1522
|
}
|
|
@@ -1547,7 +1571,7 @@
|
|
|
1547
1571
|
border-bottom: 1px solid var(--line);
|
|
1548
1572
|
}
|
|
1549
1573
|
body.app-sidebar-shell #content > .applist-host:first-child > .applist-head + .applist-controls {
|
|
1550
|
-
padding-top: var(--
|
|
1574
|
+
padding-top: var(--page-head-gap);
|
|
1551
1575
|
}
|
|
1552
1576
|
body.app-sidebar-shell #content > .applist-head:first-child + * {
|
|
1553
1577
|
padding-top: var(--space-4);
|
package/dist/client/style.css
CHANGED
|
@@ -1698,6 +1698,9 @@ button.danger { background: var(--status-critical); color: var(--surface); borde
|
|
|
1698
1698
|
}
|
|
1699
1699
|
body.app-mode .record-summary dl > div { position: relative; block-size: var(--summary-line); align-items: center; overflow: hidden; }
|
|
1700
1700
|
body.app-mode .record-summary dl > div[data-empty] { display: none; }
|
|
1701
|
+
/* A fact is one line, cut at its end with an ellipsis: a long value wrapped inside the line box and, centred in it,
|
|
1702
|
+
showed its middle two lines over the card's rule (a field report). The whole value is a click away, in the record. */
|
|
1703
|
+
body.app-mode .record-summary dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1701
1704
|
body.app-mode .record-summary dt {
|
|
1702
1705
|
position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden;
|
|
1703
1706
|
clip-path: inset(50%); white-space: nowrap; border: 0;
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
/* Figures that stand in columns or beside each other are tabular in every look: a table's cells and heads, a
|
|
177
177
|
metric, a change, a chart's axis and legend, a record's values. Proportional figures set "1,111" narrower
|
|
178
178
|
than "8,888", and a column of amounts did not align. The faces the looks wear turn only their ten figures
|
|
179
|
-
tabular (
|
|
179
|
+
tabular (interFace.css, the shipped Inter), so words under it set as they did. */
|
|
180
180
|
/* A menu count of work past its date (counts: 'work', sidebarModel.ts) is the one said in the danger's ink. */
|
|
181
181
|
:root[data-theme-style] #table-list .rows.is-overdue { color: var(--status-critical); }
|
|
182
182
|
:root[data-theme-style] :is(td, th, .home-card-value, .dash-delta, .chart-tick, .chart-legend, .chart-tip-card, .pbd-count, .page-field > dd, .page-fact, .matrix-cell) { font-variant-numeric: tabular-nums; }
|
|
@@ -244,6 +244,9 @@ export function validVisualTheme(value) {
|
|
|
244
244
|
const LOOK_SHEETS = {
|
|
245
245
|
workshop: () => import('./workshopLook.css'),
|
|
246
246
|
lumen: () => import('./lumenLook.css'),
|
|
247
|
+
/* The faces the kit ships, each apart from its look (themeRecipes.ts KIT_FACE_SHEETS). */
|
|
248
|
+
inter: () => import('./interFace.css'),
|
|
249
|
+
barlow: () => import('./barlowFace.css'),
|
|
247
250
|
sage: () => import('./sageLook.css'),
|
|
248
251
|
ledger: () => import('./ledgerLook.css'),
|
|
249
252
|
brand: () => import('./brandLook.css'),
|
|
@@ -1,70 +1,8 @@
|
|
|
1
1
|
/* Workshop, the look an App wears when it names none (themeLooks.ts): fetched
|
|
2
2
|
when a worn theme picks one of its recipes (keyed buttons, the slot menu, solid filters), as Lumen's sheet
|
|
3
3
|
is, and so not in the first stylesheet the Workbench and every other look
|
|
4
|
-
share. Its other recipes are in Lumen's, the brand sheet and the surfaces'.
|
|
5
|
-
|
|
6
|
-
License; its text in fonts/Barlow-OFL.txt and dist/client/fonts/): the
|
|
7
|
-
regular and semibold for the interface, data and labels, the semi-condensed
|
|
8
|
-
bold for titles, figures and the App's name. Declared here so only a
|
|
9
|
-
page wearing Workshop asks for it; the server preloads the regular and the
|
|
10
|
-
condensed bold beside this sheet (server/clientSurface.ts, lookPreloads).
|
|
11
|
-
`swap`, as Lumen's Inter: the page is held until this sheet is in, and the
|
|
12
|
-
fallback below is cut to Barlow's measure, so the swap barely moves a line. */
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: Barlow;
|
|
15
|
-
font-style: normal;
|
|
16
|
-
font-weight: 400;
|
|
17
|
-
font-display: swap;
|
|
18
|
-
src: url('./fonts/barlow-400.woff2') format('woff2');
|
|
19
|
-
}
|
|
20
|
-
@font-face {
|
|
21
|
-
font-family: Barlow;
|
|
22
|
-
font-style: normal;
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
font-display: swap;
|
|
25
|
-
src: url('./fonts/barlow-600.woff2') format('woff2');
|
|
26
|
-
}
|
|
27
|
-
@font-face {
|
|
28
|
-
font-family: 'Barlow Semi Condensed';
|
|
29
|
-
font-style: normal;
|
|
30
|
-
font-weight: 700;
|
|
31
|
-
font-display: swap;
|
|
32
|
-
src: url('./fonts/barlow-semi-condensed-700.woff2') format('woff2');
|
|
33
|
-
}
|
|
34
|
-
/* The faces that stand in until Barlow arrives: Arial (Liberation Sans, its
|
|
35
|
-
metric twin, on Linux) scaled to Barlow's width and given Barlow's ascent and
|
|
36
|
-
descent (1.0 and 0.2 of the em, no line gap), as Lumen cuts Arial to Inter's.
|
|
37
|
-
Measured in Chromium over a line of interface text with its figures:
|
|
38
|
-
Barlow's regular is 92.3% of Arial's, its semibold 89.5% of Arial Bold's,
|
|
39
|
-
and the semi-condensed bold 82.1% of Arial Bold's. An override is said of
|
|
40
|
-
the adjusted size, so each is Barlow's ratio over the face's size-adjust. */
|
|
41
|
-
@font-face {
|
|
42
|
-
font-family: 'Barlow Fallback';
|
|
43
|
-
font-weight: 100 500;
|
|
44
|
-
src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Helvetica');
|
|
45
|
-
size-adjust: 92.3%;
|
|
46
|
-
ascent-override: 108.34%;
|
|
47
|
-
descent-override: 21.67%;
|
|
48
|
-
line-gap-override: 0%;
|
|
49
|
-
}
|
|
50
|
-
@font-face {
|
|
51
|
-
font-family: 'Barlow Fallback';
|
|
52
|
-
font-weight: 600 900;
|
|
53
|
-
src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Helvetica Bold');
|
|
54
|
-
size-adjust: 89.5%;
|
|
55
|
-
ascent-override: 111.73%;
|
|
56
|
-
descent-override: 22.35%;
|
|
57
|
-
line-gap-override: 0%;
|
|
58
|
-
}
|
|
59
|
-
@font-face {
|
|
60
|
-
font-family: 'Barlow Semi Condensed Fallback';
|
|
61
|
-
font-weight: 100 900;
|
|
62
|
-
src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Helvetica Bold');
|
|
63
|
-
size-adjust: 82.1%;
|
|
64
|
-
ascent-override: 121.8%;
|
|
65
|
-
descent-override: 24.36%;
|
|
66
|
-
line-gap-override: 0%;
|
|
67
|
-
}
|
|
4
|
+
share. Its other recipes are in Lumen's, the brand sheet and the surfaces'. Its face (Barlow) is a sheet of its own,
|
|
5
|
+
barlowFace.css. */
|
|
68
6
|
@layer look {
|
|
69
7
|
/* Keyed buttons: the primary verb is a hazard key, the accent edged in the ink; a secondary key is edged in the
|
|
70
8
|
ink too, so every key on a page reads as hardware.
|
package/dist/shared/uiTokens.js
CHANGED
|
@@ -26,10 +26,13 @@ const SHEET_TOKENS = [
|
|
|
26
26
|
'--space-6',
|
|
27
27
|
'--space-7',
|
|
28
28
|
'--space-8',
|
|
29
|
+
'--space-1h',
|
|
29
30
|
'--space-2h',
|
|
30
31
|
'--space-3h',
|
|
31
32
|
'--space-4h',
|
|
33
|
+
'--control-h',
|
|
32
34
|
'--section-seam',
|
|
35
|
+
'--page-head-gap',
|
|
33
36
|
'--page-measure',
|
|
34
37
|
'--room-inset',
|
|
35
38
|
'--row-h',
|
|
@@ -135,7 +138,8 @@ export function nearestToken(name) {
|
|
|
135
138
|
if (Object.hasOwn(RENAMED_TOKENS, name))
|
|
136
139
|
return RENAMED_TOKENS[name];
|
|
137
140
|
const bare = name.replace(/^--/, '').toLowerCase();
|
|
138
|
-
|
|
141
|
+
/* Own keys only: `--constructor` is not a word another system uses, whatever Object.prototype holds. */
|
|
142
|
+
const said = Object.hasOwn(WORDS, bare) ? WORDS[bare] : undefined;
|
|
139
143
|
if (said)
|
|
140
144
|
return said;
|
|
141
145
|
let best;
|
package/dist/vite.js
CHANGED
|
@@ -538,7 +538,7 @@ export function kitClientConfig({ workspace, main, clients = [], build, plugins
|
|
|
538
538
|
},
|
|
539
539
|
/* A script names the files it loads (a lazy chunk's stylesheet, its preloads) relative to itself, not from the
|
|
540
540
|
root: a server behind a reverse proxy under a path (`--base-path /tools`, shared/mount.ts) is at /tools/assets/,
|
|
541
|
-
and the page the server sends says so in its own tags. A stylesheet names its face (
|
|
541
|
+
and the page the server sends says so in its own tags. A stylesheet names its face (interFace.css) beside
|
|
542
542
|
itself the same way. The pages keep `/assets/`, which the server rewrites. */
|
|
543
543
|
experimental: { renderBuiltUrl: (_file, { hostType }) => (hostType === 'js' || hostType === 'css' ? { relative: true } : undefined) },
|
|
544
544
|
build: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mistriwork/kit",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.43",
|
|
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.
|
|
87
|
-
"@mistriwork/ui": "1.0.0-rc.
|
|
86
|
+
"@mistriwork/engine": "1.0.0-rc.43",
|
|
87
|
+
"@mistriwork/ui": "1.0.0-rc.43",
|
|
88
88
|
"intl-messageformat": "12.1.2",
|
|
89
89
|
"qrcode-generator": "^2.0.4"
|
|
90
90
|
},
|