@mistriwork/engine 1.0.0-rc.58 → 1.0.0-rc.60
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/server/clientHttp.js +2 -2
- package/dist/server/clientSurface.js +1 -0
- package/dist/server/seed/seed.js +14 -0
- package/dist/shared/builtInThemes.js +473 -18
- package/dist/shared/lookPalettes.d.ts +13 -10
- package/dist/shared/lookPalettes.js +95 -1
- package/dist/shared/model.js +10 -0
- package/dist/shared/page.js +1 -0
- package/dist/shared/pageAnatomy.d.ts +12 -0
- package/dist/shared/pageAnatomy.js +47 -2
- package/dist/shared/pageConfig.js +29 -1
- package/dist/shared/pageModel.d.ts +7 -0
- package/dist/shared/recordReads.js +19 -4
- package/dist/shared/relatedCreate.js +5 -3
- package/dist/shared/servedApp.d.ts +5 -0
- package/dist/shared/servedApp.js +3 -0
- package/dist/shared/themeLooks.js +370 -55
- package/dist/shared/themePresets.d.ts +0 -2
- package/dist/shared/themePresets.js +0 -4
- package/dist/shared/themeRecipeFamilies.d.ts +92 -0
- package/dist/shared/themeRecipeFamilies.js +60 -0
- package/dist/shared/themeRecipeWords.d.ts +15 -13
- package/dist/shared/themeRecipeWords.js +16 -14
- package/dist/shared/themeRecipes.d.ts +19 -10
- package/dist/shared/themeRecipes.js +37 -27
- package/dist/shared/themeTokens.d.ts +1 -1
- package/dist/shared/themeTokens.js +1 -1
- package/package.json +2 -1
- package/schema/theme.d.ts +37 -12
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The recipe families: two words a theme may say in `recipes`, each choosing several parts at once.
|
|
3
|
+
*
|
|
4
|
+
* The menu (themeRecipes.ts) is one choice a part, twenty-four of them, and a page is drawn by several parts side by
|
|
5
|
+
* side: a record's field groups beside its tables, a dashboard's stats over its sections. Chosen one by one they
|
|
6
|
+
* disagree easily, a panel beside a block left open on the page. A family is the choice made once: `blocks` says how
|
|
7
|
+
* a page's blocks are held, `current` how the current one of several is shown, and each names the value of every
|
|
8
|
+
* part it covers, values that are drawn together in a built-in look and so are known to agree.
|
|
9
|
+
*
|
|
10
|
+
* A family sets a part's DEFAULT. What a theme says of a part itself wins over its family, and a family the theme
|
|
11
|
+
* says wins over the parts of the look it extends. Families are resolved when a theme is built (themeBuild.ts); a
|
|
12
|
+
* compiled theme carries the parts only, so the first paint, which sets one attribute a part, knows nothing of them
|
|
13
|
+
* and this module stays out of it.
|
|
14
|
+
*/
|
|
15
|
+
import type { ThemeRecipeFamilies, ThemeRecipes } from '../../schema/theme.js';
|
|
16
|
+
export declare const RECIPE_FAMILIES: {
|
|
17
|
+
readonly blocks: {
|
|
18
|
+
readonly open: {
|
|
19
|
+
readonly section: 'open';
|
|
20
|
+
readonly fields: 'open';
|
|
21
|
+
readonly stat: 'divided';
|
|
22
|
+
readonly table: 'open';
|
|
23
|
+
readonly steps: 'strip';
|
|
24
|
+
};
|
|
25
|
+
readonly ruled: {
|
|
26
|
+
readonly section: 'open';
|
|
27
|
+
readonly fields: 'rail';
|
|
28
|
+
readonly stat: 'ruled';
|
|
29
|
+
readonly table: 'hairline';
|
|
30
|
+
readonly steps: 'strip';
|
|
31
|
+
};
|
|
32
|
+
readonly card: {
|
|
33
|
+
readonly section: 'card';
|
|
34
|
+
readonly fields: 'card';
|
|
35
|
+
readonly stat: 'panel';
|
|
36
|
+
readonly table: 'card';
|
|
37
|
+
readonly steps: 'flat';
|
|
38
|
+
};
|
|
39
|
+
readonly panel: {
|
|
40
|
+
readonly section: 'panel';
|
|
41
|
+
readonly fields: 'panel';
|
|
42
|
+
readonly stat: 'panel';
|
|
43
|
+
readonly table: 'hairline';
|
|
44
|
+
readonly steps: 'flat';
|
|
45
|
+
};
|
|
46
|
+
readonly tile: {
|
|
47
|
+
readonly section: 'panel';
|
|
48
|
+
readonly fields: 'panel';
|
|
49
|
+
readonly stat: 'bento';
|
|
50
|
+
readonly table: 'rows';
|
|
51
|
+
readonly steps: 'tinted';
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
readonly current: {
|
|
55
|
+
readonly tint: {
|
|
56
|
+
readonly nav: 'tint';
|
|
57
|
+
readonly tabs: 'tint';
|
|
58
|
+
readonly windows: 'tint';
|
|
59
|
+
};
|
|
60
|
+
readonly inverted: {
|
|
61
|
+
readonly nav: 'inverted';
|
|
62
|
+
readonly tabs: 'inverted';
|
|
63
|
+
readonly windows: 'segmented';
|
|
64
|
+
};
|
|
65
|
+
readonly underline: {
|
|
66
|
+
readonly nav: 'underline';
|
|
67
|
+
readonly tabs: 'underline';
|
|
68
|
+
readonly windows: 'tint';
|
|
69
|
+
};
|
|
70
|
+
readonly pill: {
|
|
71
|
+
readonly nav: 'pill';
|
|
72
|
+
readonly tabs: 'pill';
|
|
73
|
+
readonly windows: 'lifted';
|
|
74
|
+
};
|
|
75
|
+
readonly lifted: {
|
|
76
|
+
readonly nav: 'tint';
|
|
77
|
+
readonly tabs: 'lifted';
|
|
78
|
+
readonly windows: 'lifted';
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare const RECIPE_FAMILY_NAMES: (keyof ThemeRecipeFamilies)[];
|
|
83
|
+
/** Each family's values said in a sentence, for the schema and the reference: what the page looks like, not the parts. */
|
|
84
|
+
export declare const RECIPE_FAMILY_WORDS: {
|
|
85
|
+
readonly [Family in keyof ThemeRecipeFamilies]-?: Readonly<Record<NonNullable<ThemeRecipeFamilies[Family]>, string>>;
|
|
86
|
+
};
|
|
87
|
+
/** One family's values said, in order: the schema's description of the family. */
|
|
88
|
+
export declare function familyDescription(family: keyof ThemeRecipeFamilies): string;
|
|
89
|
+
/** The parts a theme's families pick, `blocks` then `current`: no part is in both. Empty where it says neither. */
|
|
90
|
+
export declare function familyRecipes(recipes: (ThemeRecipes & ThemeRecipeFamilies) | undefined): ThemeRecipes;
|
|
91
|
+
/** A theme's recipes without its families: the parts it says itself. */
|
|
92
|
+
export declare function recipeParts(recipes: (ThemeRecipes & ThemeRecipeFamilies) | undefined): ThemeRecipes;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export const RECIPE_FAMILIES = {
|
|
2
|
+
/* How a block is held. Each row is a built-in look's own pairing: `open` is Workshop's, `ruled` Atelier's, `card`
|
|
3
|
+
Graphite's (its steps apart), `panel` Sage's and `tile` Bloom's. */
|
|
4
|
+
blocks: {
|
|
5
|
+
open: { section: 'open', fields: 'open', stat: 'divided', table: 'open', steps: 'strip' },
|
|
6
|
+
ruled: { section: 'open', fields: 'rail', stat: 'ruled', table: 'hairline', steps: 'strip' },
|
|
7
|
+
card: { section: 'card', fields: 'card', stat: 'panel', table: 'card', steps: 'flat' },
|
|
8
|
+
panel: { section: 'panel', fields: 'panel', stat: 'panel', table: 'hairline', steps: 'flat' },
|
|
9
|
+
tile: { section: 'panel', fields: 'panel', stat: 'bento', table: 'rows', steps: 'tinted' },
|
|
10
|
+
},
|
|
11
|
+
/* How the current one is shown. `inverted` is Mono's pairing, `tint` Sage's (its menu apart), `pill` Bloom's and
|
|
12
|
+
Lumen's (a menu apart, a record's tabs apart). An underlined menu entry is the top bar's; beside the page the
|
|
13
|
+
menu keeps its tint, so `underline` leaves no menu unmarked. */
|
|
14
|
+
current: {
|
|
15
|
+
tint: { nav: 'tint', tabs: 'tint', windows: 'tint' },
|
|
16
|
+
inverted: { nav: 'inverted', tabs: 'inverted', windows: 'segmented' },
|
|
17
|
+
underline: { nav: 'underline', tabs: 'underline', windows: 'tint' },
|
|
18
|
+
pill: { nav: 'pill', tabs: 'pill', windows: 'lifted' },
|
|
19
|
+
lifted: { nav: 'tint', tabs: 'lifted', windows: 'lifted' },
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export const RECIPE_FAMILY_NAMES = Object.keys(RECIPE_FAMILIES);
|
|
23
|
+
/** Each family's values said in a sentence, for the schema and the reference: what the page looks like, not the parts. */
|
|
24
|
+
export const RECIPE_FAMILY_WORDS = {
|
|
25
|
+
blocks: {
|
|
26
|
+
open: 'Every block stands open on the page: sections and tables under a rule, and the stats in one ruled strip, the only box.',
|
|
27
|
+
ruled: 'A printed page: blocks open under rules, each stat under a rule of its own, a record’s side groups captioned between hairlines.',
|
|
28
|
+
card: 'Every block is a card with a hairline and the card shadow: sections, field groups, stats and tables.',
|
|
29
|
+
panel: 'Every block is a panel on the surface with a hairline: sections, field groups and stats; a table stays open inside its panel.',
|
|
30
|
+
tile: 'Every block is a soft tile: stats as tiles with a large figure, a list as one tile with its rows ruled apart, steps tinted with their tone.',
|
|
31
|
+
},
|
|
32
|
+
current: {
|
|
33
|
+
tint: 'The current entry, tab and window each sit on a soft tint of the accent.',
|
|
34
|
+
inverted: 'The current entry and tab are inverted to the ink, and the chosen window is a filled segment: square, high-contrast.',
|
|
35
|
+
underline: 'The current tab, and the current entry in a top bar, are underlined in the accent with no fill; a chosen window sits on a tint.',
|
|
36
|
+
pill: 'The current entry and tab are pills, and the chosen window is a raised key on a tray.',
|
|
37
|
+
lifted: 'The tabs and the windows stand in sunken tracks, the chosen one a raised key lifted out; the menu’s entry sits on a tint.',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
/** One family's values said, in order: the schema's description of the family. */
|
|
41
|
+
export function familyDescription(family) {
|
|
42
|
+
return Object.entries(RECIPE_FAMILY_WORDS[family])
|
|
43
|
+
.map(([value, words]) => `\`${value}\`: ${words}`)
|
|
44
|
+
.join(' ');
|
|
45
|
+
}
|
|
46
|
+
/** The parts a theme's families pick, `blocks` then `current`: no part is in both. Empty where it says neither. */
|
|
47
|
+
export function familyRecipes(recipes) {
|
|
48
|
+
const picked = {};
|
|
49
|
+
for (const family of RECIPE_FAMILY_NAMES) {
|
|
50
|
+
const value = recipes?.[family];
|
|
51
|
+
if (value !== undefined)
|
|
52
|
+
Object.assign(picked, RECIPE_FAMILIES[family][value]);
|
|
53
|
+
}
|
|
54
|
+
return picked;
|
|
55
|
+
}
|
|
56
|
+
/** A theme's recipes without its families: the parts it says itself. */
|
|
57
|
+
export function recipeParts(recipes) {
|
|
58
|
+
const { blocks: _blocks, current: _current, ...parts } = recipes ?? {};
|
|
59
|
+
return parts;
|
|
60
|
+
}
|
|
@@ -19,6 +19,7 @@ export declare const RECIPE_WORDS: {
|
|
|
19
19
|
readonly pill: 'Every row is a rounded pill with room around it; the current one is filled in the accent’s tint, its word in the accent.';
|
|
20
20
|
readonly quiet: 'The current entry is barely shaded in the menu’s ink, with no accent at all: the calmest mark.';
|
|
21
21
|
readonly slot: 'The current entry is an ink block, as inverted, with a 3px marker of the menu’s accent beside it, like a tool’s slot on a pegboard.';
|
|
22
|
+
readonly float: 'The side menu is a card of its own, standing off the window’s edge with rounded corners; the current entry is a pill in the accent’s tint.';
|
|
22
23
|
};
|
|
23
24
|
readonly bar: {
|
|
24
25
|
readonly plain: 'The top bar is the menu’s ground with a hairline under it.';
|
|
@@ -28,16 +29,17 @@ export declare const RECIPE_WORDS: {
|
|
|
28
29
|
readonly soft: 'The top bar is a panel in the surface color with a hairline under it, apart from the menu beside it.';
|
|
29
30
|
};
|
|
30
31
|
readonly tabs: {
|
|
31
|
-
readonly pill: 'The chosen tab is a
|
|
32
|
+
readonly pill: 'The chosen tab is a soft pill in the ink with an edge of its own; the others are plain words.';
|
|
32
33
|
readonly inverted: 'The chosen tab is inverted, the ink as its ground: square, high-contrast.';
|
|
33
34
|
readonly underline: 'The tabs stand on a hairline, wide apart, the chosen one underlined in the accent with no fill.';
|
|
34
35
|
readonly rule: 'The chosen tab is underlined by a 2px rule in the link color with no fill, the tabs packed as written.';
|
|
35
|
-
readonly
|
|
36
|
+
readonly tint: 'The chosen tab sits on a soft tint of the accent in the ink, wider apart, with no underline.';
|
|
37
|
+
readonly lifted: 'The tabs stand in a sunken track; the chosen one is a raised key lifted out of it, with no underline.';
|
|
36
38
|
};
|
|
37
39
|
readonly windows: {
|
|
38
40
|
readonly segmented: 'The period picker is a segmented control, the chosen period filled.';
|
|
39
41
|
readonly lifted: 'The period picker is a sunken tray, the chosen period a raised white key on it.';
|
|
40
|
-
readonly
|
|
42
|
+
readonly tint: 'The period picker has no tray; the chosen period sits on a soft tint of the accent.';
|
|
41
43
|
};
|
|
42
44
|
readonly stat: {
|
|
43
45
|
readonly plain: 'A stat is a figure and its label with no frame.';
|
|
@@ -46,7 +48,8 @@ export declare const RECIPE_WORDS: {
|
|
|
46
48
|
readonly ruled: 'Each stat stands open under a 2px rule in the ink, with no card or shadow, like a printed page.';
|
|
47
49
|
readonly icon: 'Each stat is a card with its icon in a round tint of a chart color above the label, and a large bold figure.';
|
|
48
50
|
readonly panel: 'Each stat is a panel on the surface with a hairline and the look’s card shadow.';
|
|
49
|
-
readonly divided: 'The stats share one strip,
|
|
51
|
+
readonly divided: 'The stats share one strip, a hairline round it and one between its figures, with no card to each: the quietest arrangement.';
|
|
52
|
+
readonly bento: 'Each stat is a soft tile of its own in the raised ground, with no edge and a large figure: the roundest arrangement.';
|
|
50
53
|
};
|
|
51
54
|
readonly section: {
|
|
52
55
|
readonly open: 'A dashboard section stands open on the page under its rule.';
|
|
@@ -66,6 +69,7 @@ export declare const RECIPE_WORDS: {
|
|
|
66
69
|
readonly card: 'The table is a card: muted 12px heads on a hairline, faint row rules and taller rows.';
|
|
67
70
|
readonly quiet: 'The table is a card of quiet rows, a work queue’s open button folded to a chevron at the row’s end.';
|
|
68
71
|
readonly banded: 'As open, but every other row lies on the band color (colors.band, or the raised ground), each ink measured on it.';
|
|
72
|
+
readonly rows: 'The list is one soft tile on the page’s ground: rows ruled apart by hairlines, the head plain words inside it, the tile’s corners its own.';
|
|
69
73
|
};
|
|
70
74
|
readonly status: {
|
|
71
75
|
readonly dot: 'A status word in its tone with a dot before it.';
|
|
@@ -75,8 +79,8 @@ export declare const RECIPE_WORDS: {
|
|
|
75
79
|
};
|
|
76
80
|
readonly board: {
|
|
77
81
|
readonly ruled: 'A board’s lanes are outlined by a hairline; its cards lie flat on them.';
|
|
78
|
-
readonly soft: '
|
|
79
|
-
readonly strip: 'Each lane is headed by a strip tinted with its tone, its cards white
|
|
82
|
+
readonly soft: 'Each lane is a quiet tray that holds its head and its cards, each card a sheet on it under the look’s card shadow.';
|
|
83
|
+
readonly strip: 'Each lane is headed by a strip tinted with its tone, its cards white under it; a card with a category wears its color as a stripe.';
|
|
80
84
|
};
|
|
81
85
|
readonly chart: {
|
|
82
86
|
readonly plain: 'A chart is its lines or bars on a light grid.';
|
|
@@ -92,6 +96,7 @@ export declare const RECIPE_WORDS: {
|
|
|
92
96
|
readonly links: {
|
|
93
97
|
readonly plain: 'A link to another record is in the link color without an underline.';
|
|
94
98
|
readonly underline: 'A link to another record is underlined, so it reads as one without color.';
|
|
99
|
+
readonly name: 'A row’s name is underlined, as an index’s entry is, and what the row or a record’s facts refer to reads as text; the line that goes on to another record keeps its underline.';
|
|
95
100
|
};
|
|
96
101
|
readonly rules: {
|
|
97
102
|
readonly ink: 'A record’s sections are announced by a 2px rule in the ink.';
|
|
@@ -104,8 +109,9 @@ export declare const RECIPE_WORDS: {
|
|
|
104
109
|
readonly round: 'A record’s avatar is 44px and round, and the menu’s and the account’s marks are round too.';
|
|
105
110
|
};
|
|
106
111
|
readonly workflow: {
|
|
107
|
-
readonly markers: 'A workflow is
|
|
112
|
+
readonly markers: 'A workflow whose steps are an order is numbered marks joined by a rule, the label under each; a set of states with no order is a track of thin segments.';
|
|
108
113
|
readonly pills: 'A workflow is a row of pills with a dot each: a step walked in the good tint, the current one in the accent’s.';
|
|
114
|
+
readonly segments: 'A workflow is one bar cut into segments, a word in each: the steps walked on a tint in the ink, the current one on the accent’s tint, those ahead muted.';
|
|
109
115
|
};
|
|
110
116
|
readonly banner: {
|
|
111
117
|
readonly tint: 'A dashboard’s banner note is a box tinted with the accent.';
|
|
@@ -128,18 +134,14 @@ export declare const RECIPE_WORDS: {
|
|
|
128
134
|
readonly hero: 'A band, with the record’s avatar large beside its title (above it on a phone); a record without one, and a list, draw the band.';
|
|
129
135
|
};
|
|
130
136
|
readonly filters: {
|
|
131
|
-
readonly
|
|
132
|
-
readonly
|
|
137
|
+
readonly solid: 'A list’s filter not yet asked for is its name before a caret on a solid edge: a key, as the search beside it is.';
|
|
138
|
+
readonly dashed: 'The same key on a dashed hairline. No built-in look wears it: to people meeting a list it read as a place left empty.';
|
|
133
139
|
readonly quiet: 'A list’s filter not yet asked for has no edge, its name in the muted ink, until a pointer is over it: then it sits on the raised ground.';
|
|
134
140
|
};
|
|
135
141
|
readonly required: {
|
|
136
142
|
readonly star: 'A required field wears a red star after its label; an optional one wears nothing.';
|
|
137
143
|
readonly 'optional-word': 'A required field wears nothing and an optional one says “(optional)” after its label, quietly; the form’s own words, in the reader’s language.';
|
|
138
144
|
};
|
|
139
|
-
readonly checkbox: {
|
|
140
|
-
readonly native: 'A checkbox is the browser’s own, in the accent.';
|
|
141
|
-
readonly drawn: 'A checkbox is drawn: a square in the field’s fill with the control’s edge and corner, the accent with a check when on.';
|
|
142
|
-
};
|
|
143
145
|
readonly formStep: {
|
|
144
146
|
readonly plain: 'A multi-step form’s step header is its title over its lead, with nothing between it and the fields.';
|
|
145
147
|
readonly ruled: 'A multi-step form’s step header ends in a hairline, which parts it from the fields under it.';
|
|
@@ -7,6 +7,7 @@ export const RECIPE_WORDS = {
|
|
|
7
7
|
pill: 'Every row is a rounded pill with room around it; the current one is filled in the accent’s tint, its word in the accent.',
|
|
8
8
|
quiet: 'The current entry is barely shaded in the menu’s ink, with no accent at all: the calmest mark.',
|
|
9
9
|
slot: 'The current entry is an ink block, as inverted, with a 3px marker of the menu’s accent beside it, like a tool’s slot on a pegboard.',
|
|
10
|
+
float: 'The side menu is a card of its own, standing off the window’s edge with rounded corners; the current entry is a pill in the accent’s tint.',
|
|
10
11
|
},
|
|
11
12
|
bar: {
|
|
12
13
|
plain: 'The top bar is the menu’s ground with a hairline under it.',
|
|
@@ -16,16 +17,17 @@ export const RECIPE_WORDS = {
|
|
|
16
17
|
soft: 'The top bar is a panel in the surface color with a hairline under it, apart from the menu beside it.',
|
|
17
18
|
},
|
|
18
19
|
tabs: {
|
|
19
|
-
pill: 'The chosen tab is a
|
|
20
|
+
pill: 'The chosen tab is a soft pill in the ink with an edge of its own; the others are plain words.',
|
|
20
21
|
inverted: 'The chosen tab is inverted, the ink as its ground: square, high-contrast.',
|
|
21
22
|
underline: 'The tabs stand on a hairline, wide apart, the chosen one underlined in the accent with no fill.',
|
|
22
23
|
rule: 'The chosen tab is underlined by a 2px rule in the link color with no fill, the tabs packed as written.',
|
|
23
|
-
|
|
24
|
+
tint: 'The chosen tab sits on a soft tint of the accent in the ink, wider apart, with no underline.',
|
|
25
|
+
lifted: 'The tabs stand in a sunken track; the chosen one is a raised key lifted out of it, with no underline.',
|
|
24
26
|
},
|
|
25
27
|
windows: {
|
|
26
28
|
segmented: 'The period picker is a segmented control, the chosen period filled.',
|
|
27
29
|
lifted: 'The period picker is a sunken tray, the chosen period a raised white key on it.',
|
|
28
|
-
|
|
30
|
+
tint: 'The period picker has no tray; the chosen period sits on a soft tint of the accent.',
|
|
29
31
|
},
|
|
30
32
|
stat: {
|
|
31
33
|
plain: 'A stat is a figure and its label with no frame.',
|
|
@@ -34,7 +36,8 @@ export const RECIPE_WORDS = {
|
|
|
34
36
|
ruled: 'Each stat stands open under a 2px rule in the ink, with no card or shadow, like a printed page.',
|
|
35
37
|
icon: 'Each stat is a card with its icon in a round tint of a chart color above the label, and a large bold figure.',
|
|
36
38
|
panel: 'Each stat is a panel on the surface with a hairline and the look’s card shadow.',
|
|
37
|
-
divided: 'The stats share one strip,
|
|
39
|
+
divided: 'The stats share one strip, a hairline round it and one between its figures, with no card to each: the quietest arrangement.',
|
|
40
|
+
bento: 'Each stat is a soft tile of its own in the raised ground, with no edge and a large figure: the roundest arrangement.',
|
|
38
41
|
},
|
|
39
42
|
section: {
|
|
40
43
|
open: 'A dashboard section stands open on the page under its rule.',
|
|
@@ -54,6 +57,7 @@ export const RECIPE_WORDS = {
|
|
|
54
57
|
card: 'The table is a card: muted 12px heads on a hairline, faint row rules and taller rows.',
|
|
55
58
|
quiet: 'The table is a card of quiet rows, a work queue’s open button folded to a chevron at the row’s end.',
|
|
56
59
|
banded: 'As open, but every other row lies on the band color (colors.band, or the raised ground), each ink measured on it.',
|
|
60
|
+
rows: 'The list is one soft tile on the page’s ground: rows ruled apart by hairlines, the head plain words inside it, the tile’s corners its own.',
|
|
57
61
|
},
|
|
58
62
|
status: {
|
|
59
63
|
dot: 'A status word in its tone with a dot before it.',
|
|
@@ -63,8 +67,8 @@ export const RECIPE_WORDS = {
|
|
|
63
67
|
},
|
|
64
68
|
board: {
|
|
65
69
|
ruled: 'A board’s lanes are outlined by a hairline; its cards lie flat on them.',
|
|
66
|
-
soft: '
|
|
67
|
-
strip: 'Each lane is headed by a strip tinted with its tone, its cards white
|
|
70
|
+
soft: 'Each lane is a quiet tray that holds its head and its cards, each card a sheet on it under the look’s card shadow.',
|
|
71
|
+
strip: 'Each lane is headed by a strip tinted with its tone, its cards white under it; a card with a category wears its color as a stripe.',
|
|
68
72
|
},
|
|
69
73
|
chart: {
|
|
70
74
|
plain: 'A chart is its lines or bars on a light grid.',
|
|
@@ -80,6 +84,7 @@ export const RECIPE_WORDS = {
|
|
|
80
84
|
links: {
|
|
81
85
|
plain: 'A link to another record is in the link color without an underline.',
|
|
82
86
|
underline: 'A link to another record is underlined, so it reads as one without color.',
|
|
87
|
+
name: 'A row’s name is underlined, as an index’s entry is, and what the row or a record’s facts refer to reads as text; the line that goes on to another record keeps its underline.',
|
|
83
88
|
},
|
|
84
89
|
rules: {
|
|
85
90
|
ink: 'A record’s sections are announced by a 2px rule in the ink.',
|
|
@@ -92,8 +97,9 @@ export const RECIPE_WORDS = {
|
|
|
92
97
|
round: 'A record’s avatar is 44px and round, and the menu’s and the account’s marks are round too.',
|
|
93
98
|
},
|
|
94
99
|
workflow: {
|
|
95
|
-
markers: 'A workflow is
|
|
100
|
+
markers: 'A workflow whose steps are an order is numbered marks joined by a rule, the label under each; a set of states with no order is a track of thin segments.',
|
|
96
101
|
pills: 'A workflow is a row of pills with a dot each: a step walked in the good tint, the current one in the accent’s.',
|
|
102
|
+
segments: 'A workflow is one bar cut into segments, a word in each: the steps walked on a tint in the ink, the current one on the accent’s tint, those ahead muted.',
|
|
97
103
|
},
|
|
98
104
|
banner: {
|
|
99
105
|
tint: 'A dashboard’s banner note is a box tinted with the accent.',
|
|
@@ -116,18 +122,14 @@ export const RECIPE_WORDS = {
|
|
|
116
122
|
hero: 'A band, with the record’s avatar large beside its title (above it on a phone); a record without one, and a list, draw the band.',
|
|
117
123
|
},
|
|
118
124
|
filters: {
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
solid: 'A list’s filter not yet asked for is its name before a caret on a solid edge: a key, as the search beside it is.',
|
|
126
|
+
dashed: 'The same key on a dashed hairline. No built-in look wears it: to people meeting a list it read as a place left empty.',
|
|
121
127
|
quiet: 'A list’s filter not yet asked for has no edge, its name in the muted ink, until a pointer is over it: then it sits on the raised ground.',
|
|
122
128
|
},
|
|
123
129
|
required: {
|
|
124
130
|
star: 'A required field wears a red star after its label; an optional one wears nothing.',
|
|
125
131
|
'optional-word': 'A required field wears nothing and an optional one says “(optional)” after its label, quietly; the form’s own words, in the reader’s language.',
|
|
126
132
|
},
|
|
127
|
-
checkbox: {
|
|
128
|
-
native: 'A checkbox is the browser’s own, in the accent.',
|
|
129
|
-
drawn: 'A checkbox is drawn: a square in the field’s fill with the control’s edge and corner, the accent with a check when on.',
|
|
130
|
-
},
|
|
131
133
|
formStep: {
|
|
132
134
|
plain: 'A multi-step form’s step header is its title over its lead, with nothing between it and the fields.',
|
|
133
135
|
ruled: 'A multi-step form’s step header ends in a hairline, which parts it from the fields under it.',
|
|
@@ -155,7 +157,7 @@ export const TYPE_WORDS = {
|
|
|
155
157
|
section: 'A section’s title on a record and a dashboard: its face, case and features; a dashboard’s section title also takes a size (12px to 20px), tracking and weight.',
|
|
156
158
|
body: 'Prose, fields and the interface, at the base size: its leading (1.35 to 1.8) and features.',
|
|
157
159
|
label: 'A column’s head, a stat’s label and a record’s tabs, at the base size: their face, size (11px to 14px), tracking, weight (400 to 700), case and features; upper sets them a step smaller unless a size is said.',
|
|
158
|
-
data: 'A table’s cells and a record’s values, in the data face at the base size: their features, tabular figures kept, and its reach: every value, or figures only (figures, keys and dates
|
|
160
|
+
data: 'A table’s cells and a record’s values, in the data face at the base size: their features, tabular figures kept, and its reach: every value, or figures only (figures, keys and dates). A record header’s facts keep the head’s face, their figures tabular.',
|
|
159
161
|
figure: 'A stat’s figure: its face, size (18px to 40px), tracking, weight and features, tabular figures kept.',
|
|
160
162
|
nav: 'The menu’s entries in the bar, at the base size: their face, tracking, weight (400 to 600) and case; upper sets them a step smaller.',
|
|
161
163
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* a module of its own: a module a first-paint file imports is in the first
|
|
6
6
|
* paint whole.
|
|
7
7
|
*/
|
|
8
|
-
import type { ThemeDefinition, ThemeDensity, ThemePart, ThemePartStyle, ThemeRecipes, ThemeTypeDefinition
|
|
8
|
+
import type { ThemeDefinition, ThemeDensity, ThemePart, ThemePartStyle, ThemeRecipes, ThemeTypeDefinition } from '../../schema/theme.js';
|
|
9
9
|
/**
|
|
10
10
|
* Every part a theme may dress and the treatments it may pick, and the sheet
|
|
11
11
|
* its rules live in: `null` is the first stylesheet (themeFamilies.css,
|
|
@@ -26,6 +26,7 @@ export declare const RECIPE_MENU: {
|
|
|
26
26
|
readonly pill: 'lumen';
|
|
27
27
|
readonly quiet: 'sage';
|
|
28
28
|
readonly slot: 'workshop';
|
|
29
|
+
readonly float: 'tiles';
|
|
29
30
|
};
|
|
30
31
|
readonly bar: {
|
|
31
32
|
readonly plain: null;
|
|
@@ -39,21 +40,23 @@ export declare const RECIPE_MENU: {
|
|
|
39
40
|
readonly inverted: null;
|
|
40
41
|
readonly underline: 'lumen';
|
|
41
42
|
readonly rule: 'brand';
|
|
42
|
-
readonly
|
|
43
|
+
readonly tint: 'sage';
|
|
44
|
+
readonly lifted: 'tiles';
|
|
43
45
|
};
|
|
44
46
|
readonly windows: {
|
|
45
47
|
readonly segmented: null;
|
|
46
48
|
readonly lifted: 'lumen';
|
|
47
|
-
readonly
|
|
49
|
+
readonly tint: 'sage';
|
|
48
50
|
};
|
|
49
51
|
readonly stat: {
|
|
50
|
-
readonly plain:
|
|
52
|
+
readonly plain: 'brand';
|
|
51
53
|
readonly framed: null;
|
|
52
54
|
readonly topline: 'brand';
|
|
53
55
|
readonly ruled: 'brand';
|
|
54
56
|
readonly icon: 'lumen';
|
|
55
57
|
readonly panel: 'sage';
|
|
56
58
|
readonly divided: 'lumen';
|
|
59
|
+
readonly bento: 'tiles';
|
|
57
60
|
};
|
|
58
61
|
readonly section: {
|
|
59
62
|
readonly open: null;
|
|
@@ -73,6 +76,7 @@ export declare const RECIPE_MENU: {
|
|
|
73
76
|
readonly card: 'lumen';
|
|
74
77
|
readonly quiet: 'lumen';
|
|
75
78
|
readonly banded: 'brand';
|
|
79
|
+
readonly rows: 'tiles';
|
|
76
80
|
};
|
|
77
81
|
readonly status: {
|
|
78
82
|
readonly dot: null;
|
|
@@ -99,6 +103,7 @@ export declare const RECIPE_MENU: {
|
|
|
99
103
|
readonly links: {
|
|
100
104
|
readonly plain: null;
|
|
101
105
|
readonly underline: null;
|
|
106
|
+
readonly name: null;
|
|
102
107
|
};
|
|
103
108
|
readonly rules: {
|
|
104
109
|
readonly ink: null;
|
|
@@ -113,6 +118,7 @@ export declare const RECIPE_MENU: {
|
|
|
113
118
|
readonly workflow: {
|
|
114
119
|
readonly markers: null;
|
|
115
120
|
readonly pills: 'lumen';
|
|
121
|
+
readonly segments: 'tiles';
|
|
116
122
|
};
|
|
117
123
|
readonly banner: {
|
|
118
124
|
readonly tint: null;
|
|
@@ -135,18 +141,14 @@ export declare const RECIPE_MENU: {
|
|
|
135
141
|
readonly hero: null;
|
|
136
142
|
};
|
|
137
143
|
readonly filters: {
|
|
144
|
+
readonly solid: null;
|
|
138
145
|
readonly dashed: null;
|
|
139
|
-
readonly solid: 'workshop';
|
|
140
146
|
readonly quiet: 'lumen';
|
|
141
147
|
};
|
|
142
148
|
readonly required: {
|
|
143
149
|
readonly star: null;
|
|
144
150
|
readonly 'optional-word': null;
|
|
145
151
|
};
|
|
146
|
-
readonly checkbox: {
|
|
147
|
-
readonly native: null;
|
|
148
|
-
readonly drawn: null;
|
|
149
|
-
};
|
|
150
152
|
readonly formStep: {
|
|
151
153
|
readonly plain: null;
|
|
152
154
|
readonly ruled: null;
|
|
@@ -158,6 +160,13 @@ export declare const RECIPE_MENU: {
|
|
|
158
160
|
};
|
|
159
161
|
/** Recipe parts renamed before 1.0, refused with the new name: "head" is a table's column heads (`rules.head`). */
|
|
160
162
|
export declare const RECIPES_RENAMED: Readonly<Record<string, string>>;
|
|
163
|
+
/** Recipe values renamed before 1.0, refused with the new one. One word for one drawing across the parts: what sits on
|
|
164
|
+
a tint of the accent is `tint` wherever it is (the menu's entry always was), and a key lifted out of a track is
|
|
165
|
+
`lifted` on a record's tabs as on a dashboard's windows. */
|
|
166
|
+
export declare const RECIPE_VALUES_RENAMED: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
167
|
+
/** Recipe parts taken off the menu before 1.0, refused with why. No rule has read `checkbox` since the controls moved
|
|
168
|
+
to UI SDK, which draws the box itself: the part chose between two words and nothing else. */
|
|
169
|
+
export declare const RECIPES_REMOVED: Readonly<Record<string, string>>;
|
|
161
170
|
/** Shape rides the same attributes (`data-look-elevation`); type rides its own (`data-type-<role>`, themeType.ts). */
|
|
162
171
|
export declare const ELEVATIONS: {
|
|
163
172
|
readonly hairline: null;
|
|
@@ -198,7 +207,7 @@ export type ResolvedRecipes = {
|
|
|
198
207
|
/** Every part at its first value: the plain structure a theme that extends nothing starts from. */
|
|
199
208
|
export declare const DEFAULT_RECIPES: ResolvedRecipes;
|
|
200
209
|
/** The attributes a worn theme sets on the root, and the look sheets they need. */
|
|
201
|
-
export declare function recipeAttributes(theme: ThemeDefinition
|
|
210
|
+
export declare function recipeAttributes(theme: ThemeDefinition): {
|
|
202
211
|
attributes: Record<string, string>;
|
|
203
212
|
sheets: string[];
|
|
204
213
|
};
|
|
@@ -10,38 +10,50 @@
|
|
|
10
10
|
* its sheet.
|
|
11
11
|
*/
|
|
12
12
|
export const RECIPE_MENU = {
|
|
13
|
-
nav: { tint: null, inverted: null, wash: 'brand', underline: 'brand', pill: 'lumen', quiet: 'sage', slot: 'workshop' },
|
|
13
|
+
nav: { tint: null, inverted: null, wash: 'brand', underline: 'brand', pill: 'lumen', quiet: 'sage', slot: 'workshop', float: 'tiles' },
|
|
14
14
|
bar: { plain: null, ruled: null, dark: 'brand', airy: 'lumen', soft: 'sage' },
|
|
15
|
-
tabs: { pill: null, inverted: null, underline: 'lumen', rule: 'brand',
|
|
16
|
-
windows: { segmented: null, lifted: 'lumen',
|
|
17
|
-
stat: { plain:
|
|
15
|
+
tabs: { pill: null, inverted: null, underline: 'lumen', rule: 'brand', tint: 'sage', lifted: 'tiles' },
|
|
16
|
+
windows: { segmented: null, lifted: 'lumen', tint: 'sage' },
|
|
17
|
+
stat: { plain: 'brand', framed: null, topline: 'brand', ruled: 'brand', icon: 'lumen', panel: 'sage', divided: 'lumen', bento: 'tiles' },
|
|
18
18
|
section: { open: null, card: 'lumen', panel: 'sage' },
|
|
19
19
|
fields: { open: null, panel: 'sage', card: 'lumen', rail: 'lumen' },
|
|
20
|
-
table: { open: null, tinted: 'brand', hairline: 'sage', card: 'lumen', quiet: 'lumen', banded: 'brand' },
|
|
20
|
+
table: { open: null, tinted: 'brand', hairline: 'sage', card: 'lumen', quiet: 'lumen', banded: 'brand', rows: 'tiles' },
|
|
21
21
|
status: { dot: null, pill: 'sage', 'pill-dot': 'lumen', quiet: 'lumen' },
|
|
22
22
|
board: { ruled: null, soft: 'sage', strip: 'lumen' },
|
|
23
23
|
chart: { plain: null, wash: 'sage', gradient: 'lumen', line: 'lumen' },
|
|
24
24
|
buttons: { accent: null, raised: 'lumen', keyed: 'workshop' },
|
|
25
|
-
links: { plain: null, underline: null },
|
|
25
|
+
links: { plain: null, underline: null, name: null },
|
|
26
26
|
rules: { ink: null, hairline: null, double: 'ledger' },
|
|
27
27
|
avatar: { plain: null, large: 'sage', round: 'lumen' },
|
|
28
|
-
workflow: { markers: null, pills: 'lumen' },
|
|
28
|
+
workflow: { markers: null, pills: 'lumen', segments: 'tiles' },
|
|
29
29
|
banner: { tint: null, gradient: 'lumen', plain: 'lumen' },
|
|
30
30
|
steps: { flat: null, tinted: 'lumen', strip: 'lumen' },
|
|
31
31
|
lanes: { tint: null, tag: 'brand', plain: 'brand' },
|
|
32
32
|
header: { plain: null, band: null, hero: null },
|
|
33
33
|
/* A list's filter not yet asked for: its own part, so a theme may keep its keyed or raised buttons and still pick the
|
|
34
34
|
adders' edge (Workshop keys them solid; Lumen's are quiet, as its raised buttons were). */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
/* `solid` first: it is the default, drawn by the filter bar's own sheet. A dashed edge read as a place left empty. */
|
|
36
|
+
filters: { solid: null, dashed: null, quiet: 'lumen' },
|
|
37
|
+
/* The three below are a form's: their rules are in @mistriwork/ui's controls.css, which arrives with the first
|
|
38
|
+
control a page draws, so no first stylesheet carries them and the menu names no sheet of a look. */
|
|
38
39
|
required: { star: null, 'optional-word': null },
|
|
39
|
-
checkbox: { native: null, drawn: null },
|
|
40
40
|
formStep: { plain: null, ruled: null },
|
|
41
41
|
actionBar: { plain: null, raised: null },
|
|
42
42
|
};
|
|
43
43
|
/** Recipe parts renamed before 1.0, refused with the new name: "head" is a table's column heads (`rules.head`). */
|
|
44
44
|
export const RECIPES_RENAMED = { head: 'header' };
|
|
45
|
+
/** Recipe values renamed before 1.0, refused with the new one. One word for one drawing across the parts: what sits on
|
|
46
|
+
a tint of the accent is `tint` wherever it is (the menu's entry always was), and a key lifted out of a track is
|
|
47
|
+
`lifted` on a record's tabs as on a dashboard's windows. */
|
|
48
|
+
export const RECIPE_VALUES_RENAMED = {
|
|
49
|
+
tabs: { chosen: 'tint', segment: 'lifted' },
|
|
50
|
+
windows: { chosen: 'tint' },
|
|
51
|
+
};
|
|
52
|
+
/** Recipe parts taken off the menu before 1.0, refused with why. No rule has read `checkbox` since the controls moved
|
|
53
|
+
to UI SDK, which draws the box itself: the part chose between two words and nothing else. */
|
|
54
|
+
export const RECIPES_REMOVED = {
|
|
55
|
+
checkbox: 'it chose nothing: @mistriwork/ui draws a checkbox itself, filled in the accent when ticked. Delete the line',
|
|
56
|
+
};
|
|
45
57
|
/** Shape rides the same attributes (`data-look-elevation`); type rides its own (`data-type-<role>`, themeType.ts). */
|
|
46
58
|
export const ELEVATIONS = { hairline: null, flat: null, soft: 'sage', raised: 'lumen' };
|
|
47
59
|
export const DENSITIES = ['compact', 'comfortable', 'spacious'];
|
|
@@ -61,9 +73,14 @@ export const DEFAULT_RECIPES = Object.fromEntries(RECIPE_PARTS.map((part) => [pa
|
|
|
61
73
|
/** The sheet that declares each face the kit ships for an interface, by the family a stack begins with: a sheet of its
|
|
62
74
|
own (interFace.css, barlowFace.css), apart from the look it was made for, so a theme set in the face fetches its
|
|
63
75
|
declaration and not the whole of that look's rules. */
|
|
64
|
-
const KIT_FACE_SHEETS = {
|
|
76
|
+
const KIT_FACE_SHEETS = {
|
|
77
|
+
Inter: 'inter',
|
|
78
|
+
Barlow: 'barlow',
|
|
79
|
+
'Barlow Semi Condensed': 'barlow',
|
|
80
|
+
Manrope: 'manrope',
|
|
81
|
+
};
|
|
65
82
|
/** The attributes a worn theme sets on the root, and the look sheets they need. */
|
|
66
|
-
export function recipeAttributes(theme
|
|
83
|
+
export function recipeAttributes(theme) {
|
|
67
84
|
const recipes = { ...DEFAULT_RECIPES, ...theme.recipes };
|
|
68
85
|
const attributes = {};
|
|
69
86
|
const sheets = new Set();
|
|
@@ -99,7 +116,7 @@ export function recipeAttributes(theme, lookNav) {
|
|
|
99
116
|
sheets.add(face);
|
|
100
117
|
}
|
|
101
118
|
Object.assign(attributes, typeAttributes(theme.type));
|
|
102
|
-
const side = sideNavWords(theme.type
|
|
119
|
+
const side = sideNavWords(theme.type);
|
|
103
120
|
if (side.length)
|
|
104
121
|
attributes['data-type-nav-side'] = side.join(' ');
|
|
105
122
|
const bar = barGround(theme, recipes.bar);
|
|
@@ -179,21 +196,14 @@ function roleWords(name, role) {
|
|
|
179
196
|
return words;
|
|
180
197
|
}
|
|
181
198
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
* bring the look's capitals down the side.
|
|
199
|
+
* `data-type-nav-side`: the nav role down the side menu. The menu's entries are one thing wherever the menu stands, so
|
|
200
|
+
* the side wears what the bar does, a look's own role included (Mono's mono capitals). It was the theme's own words
|
|
201
|
+
* alone, from when the role first reached the side and a look's menu was to stay as it had been; a look then read one
|
|
202
|
+
* way under a top menu and another beside a side one.
|
|
187
203
|
*/
|
|
188
|
-
function sideNavWords(type
|
|
204
|
+
function sideNavWords(type) {
|
|
189
205
|
const role = type?.roles?.nav;
|
|
190
|
-
|
|
191
|
-
return [];
|
|
192
|
-
const own = {};
|
|
193
|
-
for (const [key, value] of Object.entries(role))
|
|
194
|
-
if (JSON.stringify(value) !== JSON.stringify(lookNav?.[key]))
|
|
195
|
-
own[key] = value;
|
|
196
|
-
return roleWords('nav', own);
|
|
206
|
+
return role ? roleWords('nav', role) : [];
|
|
197
207
|
}
|
|
198
208
|
/**
|
|
199
209
|
* The published parts a theme may dress one by one (themeParts.ts says what each may take and how it is worn). Here,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const THEME_BASES: readonly ['workshop', 'lumen', 'mono', 'sage', 'ledger'];
|
|
1
|
+
export declare const THEME_BASES: readonly ['workshop', 'lumen', 'mono', 'sage', 'ledger', 'atelier', 'graphite', 'bloom'];
|
|
2
2
|
/** Each role as the custom property it is worn as: its spec path, hyphenated (`nav.ground` is `--nav-ground`, `chart[0]` is `--chart-1`). */
|
|
3
3
|
export declare const PALETTE_TOKENS: {
|
|
4
4
|
readonly ground: '--ground';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const THEME_BASES = ['workshop', 'lumen', 'mono', 'sage', 'ledger'];
|
|
1
|
+
export const THEME_BASES = ['workshop', 'lumen', 'mono', 'sage', 'ledger', 'atelier', 'graphite', 'bloom'];
|
|
2
2
|
/** Each role as the custom property it is worn as: its spec path, hyphenated (`nav.ground` is `--nav-ground`, `chart[0]` is `--chart-1`). */
|
|
3
3
|
export const PALETTE_TOKENS = {
|
|
4
4
|
ground: '--ground',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mistriwork/engine",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.60",
|
|
4
4
|
"description": "The engine both products stand on: the adapters (SQLite, Postgres), the catalog, the query language, keyset pages, the HTTP kit and the shared rules. No React.",
|
|
5
5
|
"homepage": "https://mistriwork.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -260,6 +260,7 @@
|
|
|
260
260
|
"./shared/themeParts.js": "./dist/shared/themeParts.js",
|
|
261
261
|
"./shared/themePartsCheck.js": "./dist/shared/themePartsCheck.js",
|
|
262
262
|
"./shared/themePresets.js": "./dist/shared/themePresets.js",
|
|
263
|
+
"./shared/themeRecipeFamilies.js": "./dist/shared/themeRecipeFamilies.js",
|
|
263
264
|
"./shared/themeRecipes.js": "./dist/shared/themeRecipes.js",
|
|
264
265
|
"./shared/themeResolve.js": "./dist/shared/themeResolve.js",
|
|
265
266
|
"./shared/themeTokens.js": "./dist/shared/themeTokens.js",
|