@mistriwork/engine 1.0.0-rc.58 → 1.0.0-rc.59

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.
@@ -1,4 +1,5 @@
1
- import { LOOK_PALETTES, paletteColors } from './lookPalettes.js';
1
+ import { LOOK_PALETTES, paletteAccent, paletteColors, rehued, sameHue } from './lookPalettes.js';
2
+ import { familyRecipes, recipeParts } from './themeRecipeFamilies.js';
2
3
  /** The system's own interface face on every machine; nothing is fetched and
3
4
  nothing is bundled. A look's identity is its type roles: size, weight and tracking. */
4
5
  const SANS = 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif';
@@ -7,6 +8,10 @@ const HELVETICA = '"Helvetica Neue", Helvetica, Arial, ui-sans-serif, sans-serif
7
8
  fetched only by a page set in it, never in the first paint; then Arial
8
9
  cut to Inter's measure while it arrives (docs/design.md, Faces). */
9
10
  export const INTER = `Inter, "Inter Fallback", ${SANS}`;
11
+ /** Lumen's heading face: Manrope, for titles, section heads, the App's name and a strip's figures; shipped as a sheet
12
+ of its own (manropeFace.css), fetched only by a page whose headings lead with it, with Arial Bold cut to its measure
13
+ while it arrives. One line to change the look's heading face: `heading:` in Lumen's `font` below. */
14
+ const MANROPE = `Manrope, "Manrope Fallback", ${INTER}`;
10
15
  /** Workshop's faces: Barlow for the interface and data, its semi-condensed bold for titles and labels, shipped with
11
16
  a sheet of their own (barlowFace.css) and fetched only by a page set in them; each with Arial cut to its measure
12
17
  while it arrives. */
@@ -17,8 +22,37 @@ const BARLOW_CONDENSED = `"Barlow Semi Condensed", "Barlow Semi Condensed Fallba
17
22
  const PLEX_MONO = `'IBM Plex Mono', ui-monospace, Menlo, monospace`;
18
23
  /** A data column's figures in every built-in look (`fonts.figures`, drawn as `--figures`, themeFamilies.css): Plex Mono, with
19
24
  the fallback cut to its measure while it arrives. A theme that names a data face and no figures face draws its figures
20
- in that face, so each built-in that names a data face says this one, and its figures stay as they were. */
25
+ in that face, so each built-in that names a data face says this one, and its figures stay as they were. Bloom is
26
+ the exception, on purpose: it leaves this out, and its figures are its sans (its spec says why). */
21
27
  const FIGURES = `'IBM Plex Mono', 'IBM Plex Mono Fallback', ui-monospace, Menlo, monospace`;
28
+ /** Atelier's titles and figures: whichever book serif the machine has. Nothing is shipped for it: a printed page's
29
+ face is the reader's own, and a title in Georgia is still that page. */
30
+ const BOOK_SERIF = `"Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif`;
31
+ /** Graphite's labels: the machine's monospace, as an instrument's engraving is whatever the maker cut. */
32
+ const SYSTEM_MONO = `ui-monospace, "SF Mono", Menlo, Consolas, monospace`;
33
+ /** The variant as a look of its own: where it says nothing the flagship's shape, type, pace and recipes stand, merged
34
+ as themeBuild.ts merges a theme over its base (a corner, a face and a role's properties one by one; a family the
35
+ variant says over the flagship's parts, a part it says over its own family). `extends` could not say Mono or Sage
36
+ this way: a theme cannot say a base's type role or rule width back to the platform's, so each would wear its
37
+ flagship's title, heading and section sizes. Ledger says every role it differs in, and so can. */
38
+ function variantOf(base, { over: _over, ...own }) {
39
+ const roles = { ...base.type?.roles };
40
+ for (const [role, said] of Object.entries(own.type?.roles ?? {}))
41
+ roles[role] = { ...roles[role], ...said };
42
+ const face = (font) => typeof font === 'string' ? { ui: font, data: font, heading: font } : font;
43
+ const shape = { ...base.shape, ...own.shape };
44
+ for (const key of ['radius', 'border', 'height'])
45
+ if (base.shape?.[key] || own.shape?.[key])
46
+ Object.assign(shape, { [key]: { ...base.shape?.[key], ...own.shape?.[key] } });
47
+ return {
48
+ ...base,
49
+ ...own,
50
+ shape,
51
+ type: { ...base.type, ...own.type, font: { ...face(base.type?.font), ...face(own.type?.font) }, roles },
52
+ ...(base.surface || own.surface ? { surface: { ...base.surface, ...own.surface } } : {}),
53
+ recipes: { ...familyRecipes(base.recipes), ...recipeParts(base.recipes), ...familyRecipes(own.recipes), ...recipeParts(own.recipes) },
54
+ };
55
+ }
22
56
  /** Spec colors over spec colors: a group (`nav`, `status`, `rules`) role by role, a series whole. */
23
57
  function overColors(base, top) {
24
58
  return {
@@ -31,9 +65,23 @@ function overColors(base, top) {
31
65
  }
32
66
  /** A look with every palette: its own colors are its default palette's, and each palette is the same hue as it is in
33
67
  every other look (scripts/theme-presets.mjs keeps only what a palette changes). */
34
- function withPalettes(look) {
68
+ function withPalettes({ tinted, ...look }) {
35
69
  const series = (mode) => (look.colors[mode].chart ?? []).filter((color) => typeof color === 'string');
36
- const worn = (id, mode) => overColors(look.colors[mode], paletteColors(look.id, LOOK_PALETTES.find((palette) => palette.id === id), mode, series(mode)));
70
+ const named = (id) => LOOK_PALETTES.find((palette) => palette.id === id);
71
+ /* A tinted look's colours are written in one palette's hue; under any other they turn to that one's. */
72
+ const own = (id, mode) => tinted && id !== tinted
73
+ ? rehued(look.colors[mode], paletteAccent(look.id, named(id), mode), paletteAccent(look.id, named(tinted), mode))
74
+ : look.colors[mode];
75
+ const worn = (id, mode) => {
76
+ const colors = overColors(own(id, mode), paletteColors(look.id, named(id), mode, series(mode)));
77
+ /* A tinted look says what is merely so in its hue (lookPalettes.ts, Bloom). Under a green palette that hue is
78
+ the colour of what went well, and a step that is new stood beside one that is done in one tint: there the
79
+ look's own colour for it stands, so the two still read apart. */
80
+ const lookStatus = look.colors[mode].status;
81
+ if (tinted && colors.status?.info && colors.status.good && lookStatus?.info && sameHue(colors.status.info, colors.status.good))
82
+ return { ...colors, status: { ...colors.status, info: lookStatus.info } };
83
+ return colors;
84
+ };
37
85
  return {
38
86
  ...look,
39
87
  colors: { light: worn(look.defaultPalette, 'light'), dark: worn(look.defaultPalette, 'dark') },
@@ -45,7 +93,7 @@ function withPalettes(look) {
45
93
  })),
46
94
  };
47
95
  }
48
- /** The built-in looks: Workshop, the default an App wears, then Lumen, Mono, Sage and Ledger.
96
+ /** The built-in looks: Workshop, the default an App wears, then Lumen, Mono, Sage, Ledger, Atelier, Graphite and Bloom.
49
97
  Each is written as an App would write its own (`defineTheme`,
50
98
  packages/engine/schema/theme.d.ts): colours by purpose, a shape, a type and a pick from the
51
99
  recipe menu (themeBuild.ts), and built by the same `buildTheme` an App's
@@ -68,8 +116,9 @@ function withPalettes(look) {
68
116
  Each wears every palette in lookPalettes.ts; its own colors are its
69
117
  default palette's (Workshop's Safety orange, Lumen's Cobalt, Mono's and
70
118
  Sage's Ink, which is each one's own ink, Ledger's Emerald, drawn in the
71
- book's own deep green). */
72
- const HOUSE = [
119
+ book's own deep green, Atelier's Safety orange at its rust depth,
120
+ Graphite's Teal), but Bloom, which is written in Violet and worn in Slate (`tinted`, below). */
121
+ const WRITTEN = [
73
122
  {
74
123
  // The desk as a workbench, ported from a field report's theme, and
75
124
  // refreshed in rc.18 so the work sits on white: the warm paper and its
@@ -183,27 +232,19 @@ const HOUSE = [
183
232
  density: 'compact',
184
233
  rhythm: 'house',
185
234
  recipes: {
235
+ // Everything open on the white sheet: one divided strip of figures, not a 2px ink rule over each.
236
+ blocks: 'open',
237
+ // The current one is a block of the ink: the window filled, the menu's entry with its slot beside it, and a
238
+ // record's tabs apart, on a rule in the hue.
239
+ current: 'inverted',
186
240
  nav: 'slot',
187
- bar: 'ruled',
188
241
  tabs: 'rule',
189
- windows: 'segmented',
190
- // One divided strip of figures, not a 2px ink rule over each.
191
- stat: 'divided',
192
- section: 'open',
193
- fields: 'open',
194
- table: 'open',
195
- status: 'dot',
196
- board: 'ruled',
197
- chart: 'plain',
242
+ bar: 'ruled',
198
243
  buttons: 'keyed',
199
244
  // A filter not yet asked for is a key on a solid edge, as the search beside it is, not a dashed place.
200
245
  filters: 'solid',
201
- links: 'plain',
202
246
  rules: 'hairline',
203
- avatar: 'plain',
204
- workflow: 'markers',
205
247
  banner: 'plain',
206
- steps: 'strip',
207
248
  lanes: 'tag',
208
249
  // The paper under a page's head: the frame reaches the title, tabs and filters, and the rows start on white.
209
250
  header: 'band',
@@ -293,23 +334,25 @@ const HOUSE = [
293
334
  /* The page's name anchors it: 28px, tight; a list's name a step under, and a section's heading 16px, so the
294
335
  page reads title, section, row at a glance. On a flat page the type is the hierarchy the boxes used to be. */
295
336
  type: {
296
- font: { ui: INTER, data: INTER, heading: INTER, figures: FIGURES },
337
+ font: { ui: INTER, data: INTER, heading: MANROPE, figures: FIGURES },
297
338
  roles: {
298
- title: { size: '28px', weight: 600, tracking: '-0.02em' },
299
- heading: { size: '24px', tracking: '-0.018em' },
339
+ /* Manrope draws lighter than Inter at a given weight: a title at 600 read as a line of text, so the heading
340
+ roles stand a step heavier than they did in Inter, to the presence they had. */
341
+ title: { size: '28px', weight: 700, tracking: '-0.02em' },
342
+ heading: { size: '24px', weight: 700, tracking: '-0.018em' },
300
343
  section: { size: '16px', weight: 600, tracking: '-0.01em' },
301
344
  },
302
345
  },
303
346
  density: 'compact',
304
347
  recipes: {
305
- nav: 'pill',
306
- bar: 'airy',
307
- tabs: 'underline',
308
- windows: 'lifted',
309
- stat: 'divided',
310
- section: 'open',
348
+ // Open on the white surface, with two of its own: a record's fields in a property rail, a table of quiet rows.
349
+ blocks: 'open',
311
350
  fields: 'rail',
312
351
  table: 'quiet',
352
+ // Pills in the menu and a raised key on the windows' tray; a record's tabs apart, underlined on a hairline.
353
+ current: 'pill',
354
+ tabs: 'underline',
355
+ bar: 'airy',
313
356
  status: 'quiet',
314
357
  board: 'strip',
315
358
  chart: 'line',
@@ -317,9 +360,7 @@ const HOUSE = [
317
360
  filters: 'quiet',
318
361
  rules: 'hairline',
319
362
  avatar: 'round',
320
- workflow: 'markers',
321
363
  banner: 'plain',
322
- steps: 'strip',
323
364
  },
324
365
  },
325
366
  {
@@ -397,7 +438,9 @@ const HOUSE = [
397
438
  /* Compact, as Lumen: these looks' comfortable cut zooms by 1.12, and a wide list (Lintel's rent roll at a 1280px
398
439
  desk) then overflowed sideways. A reader's own density still wins. */
399
440
  density: 'compact',
400
- recipes: { nav: 'inverted', bar: 'ruled', tabs: 'inverted', stat: 'framed', links: 'underline' },
441
+ /* Open, and the current one inverted wherever it is; a figure framed in the ink, and a breakdown's steps as the
442
+ hairline cards the plain structure draws. */
443
+ recipes: { blocks: 'open', current: 'inverted', stat: 'framed', steps: 'flat', bar: 'ruled', links: 'underline' },
401
444
  },
402
445
  {
403
446
  // A soft workspace, recreated as it is from a reference the maintainer
@@ -470,15 +513,16 @@ const HOUSE = [
470
513
  type: { font: { ui: SANS, data: SANS, heading: SANS, figures: FIGURES }, roles: { title: { weight: 600 } } },
471
514
  // Compact, as Mono and Lumen: see Mono's density.
472
515
  density: 'compact',
516
+ // Airy between its panels: a page read by the person it is about wants room round each thing, where a desk's
517
+ // look packs them. The rows keep the compact density.
518
+ rhythm: 'airy',
473
519
  recipes: {
520
+ // White panels on the cream page, whatever is in them.
521
+ blocks: 'panel',
522
+ // What is chosen sits on the warm tint; the menu's entry is quieter still, shaded in its ink.
523
+ current: 'tint',
474
524
  nav: 'quiet',
475
525
  bar: 'soft',
476
- tabs: 'chosen',
477
- windows: 'chosen',
478
- stat: 'panel',
479
- section: 'panel',
480
- fields: 'panel',
481
- table: 'hairline',
482
526
  status: 'pill',
483
527
  board: 'soft',
484
528
  chart: 'wash',
@@ -501,6 +545,9 @@ const HOUSE = [
501
545
  // the same green is lifted to a mint that reads on it. A palette moves the
502
546
  // hue the reader's marks are drawn in (accent, links, the ring, the rules,
503
547
  // the first series) and leaves the paper and the cover the book's own.
548
+ // Written over Lumen, as the report's theme was: Lumen's Inter for prose and titles, its hairline rule and its
549
+ // compact cut stand, and the book says its own corners, its monospace, its paper and where its blocks differ.
550
+ over: 'lumen',
504
551
  id: 'ledger',
505
552
  label: 'Ledger',
506
553
  defaultPalette: 'emerald',
@@ -561,13 +608,13 @@ const HOUSE = [
561
608
  shape: {
562
609
  radius: { control: '2px', field: '0px', pill: '2px', panel: '0px' },
563
610
  elevation: 'flat',
564
- border: { panel: '1px', rule: '1px' },
611
+ border: { panel: '1px' },
565
612
  },
566
613
  type: {
567
- font: { ui: INTER, data: PLEX_MONO, heading: INTER, figures: FIGURES },
614
+ font: { data: PLEX_MONO },
568
615
  roles: {
569
- title: { size: '26px', weight: 600, tracking: '-0.01em' },
570
- heading: { size: '20px', weight: 600, tracking: '-0.018em' },
616
+ title: { size: '26px', tracking: '-0.01em' },
617
+ heading: { size: '20px', weight: 600 },
571
618
  section: { face: 'data', size: '12px', weight: 500, case: 'upper', tracking: '0.08em' },
572
619
  label: { face: 'data', weight: 500, case: 'upper', tracking: '0.04em' },
573
620
  data: { features: ['tnum', 'zero'] },
@@ -576,29 +623,297 @@ const HOUSE = [
576
623
  },
577
624
  },
578
625
  surface: { ground: { kind: 'grid' } },
579
- density: 'compact',
626
+ // Tight between its boxes: a bookkeeper's page holds more rows of figures to the screen than a reader's does.
627
+ rhythm: 'tight',
580
628
  recipes: {
629
+ // Ruled boxes on the paper; the figures apart, one divided strip, and a breakdown's steps one strip too.
630
+ blocks: 'panel',
631
+ stat: 'divided',
632
+ // A ledger's rows are banded, every other one on the raised ground, so an amount is followed across a wide page.
633
+ table: 'banded',
634
+ steps: 'strip',
635
+ // The current one inverted, as a filled window is; the cover's entry on a wash of the gilt, tabs on a rule.
636
+ current: 'inverted',
581
637
  nav: 'wash',
582
- bar: 'dark',
583
638
  tabs: 'rule',
584
- windows: 'segmented',
585
- stat: 'divided',
586
- section: 'panel',
587
- fields: 'panel',
588
- table: 'hairline',
589
- status: 'quiet',
639
+ bar: 'dark',
590
640
  board: 'ruled',
591
641
  chart: 'plain',
592
642
  buttons: 'accent',
593
- links: 'plain',
594
643
  rules: 'double',
595
644
  avatar: 'plain',
596
- workflow: 'markers',
645
+ lanes: 'plain',
646
+ filters: 'solid',
647
+ },
648
+ },
649
+ {
650
+ // A printed page. Warm paper, the machine's book serif for a page's name, its headings and a figure, a section
651
+ // named in small tracked capitals over a rule in the ink, a column's heads in the same capitals, and white
652
+ // space where another look would draw a box: nothing is a card, nothing floats, a table is its rows. The one
653
+ // hue is a printer's second colour, rust unless a palette says another, and it reaches links (underlined, as on
654
+ // paper), the current tab's rule, the ring, the first series and the wash under what is chosen; the paper is
655
+ // the look's under every palette, and the one primary button is the ink wherever it stands. For what is read
656
+ // more than it is worked: a client's portal, a report, a catalogue. No face is shipped: the serif is whichever
657
+ // book face the machine has, and the page and its tables are set in its interface face. Its air is its large
658
+ // title, its open sections and the airy rhythm: a page's blocks stand a quarter further apart, as a printed
659
+ // page's do.
660
+ id: 'atelier',
661
+ label: 'Atelier',
662
+ defaultPalette: 'safety',
663
+ colors: {
664
+ light: {
665
+ ground: '#f6f3ee',
666
+ surface: '#fffdf8',
667
+ raised: '#f0ece4',
668
+ ink: '#1d1a16',
669
+ inkMuted: '#57514a',
670
+ inkSubtle: '#6a6359',
671
+ line: '#e4dfd4',
672
+ lineStrong: '#aba391',
673
+ lineControl: '#8a8372',
674
+ primary: '#1d1a16',
675
+ onPrimary: '#fffdf8',
676
+ status: { good: '#2c6a46', warning: '#855600', critical: '#b3261e', info: '#2b5fa8' },
677
+ /* The menu is the page's own margin: the paper, with no edge of its own colour. Its current entry is
678
+ shaded, not coloured: the one hue is the links' and a figure's in trouble. */
679
+ nav: { ground: '#f6f3ee', ink: '#1d1a16', muted: '#57514a', line: '#e4dfd4', current: '#e9e4da', onCurrent: '#1d1a16' },
680
+ chart: ['#b4472a', '#2b5fa8', '#2c6a46', '#8a6d1f', '#7b4a8c', '#2f7f86', '#a3510b', '#8a8578'],
681
+ },
682
+ dark: {
683
+ ground: '#141210',
684
+ surface: '#1b1815',
685
+ raised: '#25211d',
686
+ ink: '#f1ece4',
687
+ inkMuted: '#b8b0a4',
688
+ inkSubtle: '#9a9286',
689
+ line: '#2e2a25',
690
+ lineStrong: '#5a544b',
691
+ lineControl: '#7f786d',
692
+ primary: '#f1ece4',
693
+ onPrimary: '#141210',
694
+ status: { good: '#6fc08f', warning: '#e0b055', critical: '#f08a80', info: '#86b4f0' },
695
+ nav: { ground: '#141210', ink: '#f1ece4', muted: '#b8b0a4', line: '#2e2a25', current: '#25211d', onCurrent: '#f1ece4' },
696
+ chart: ['#e2896b', '#86b4f0', '#6fc08f', '#d8b65c', '#c79ad6', '#6fc7cf', '#d99a5b', '#8c887f'],
697
+ },
698
+ },
699
+ shape: { radius: { control: '4px', field: '4px', pill: '4px', panel: '6px' }, elevation: 'flat' },
700
+ type: {
701
+ /* No figures face: a date, a phone number and an amount in a table are set in the text's own face, their
702
+ digits lining and a column wide (themeFamilies.css), as a printed table's are. The serif is the title's
703
+ and the large figure's. */
704
+ font: { ui: SANS, data: SANS, heading: BOOK_SERIF },
705
+ roles: {
706
+ title: { face: 'heading', size: '30px', weight: 400, tracking: '-0.01em' },
707
+ // A list's name is a chapter's: the serif, a step under the page's own title.
708
+ heading: { face: 'heading', size: '26px', weight: 400, tracking: '-0.01em' },
709
+ // A section's name is a small tracked line over a rule, as a chapter's running head is.
710
+ section: { face: 'ui', size: '12px', weight: 600, case: 'upper', tracking: '0.09em' },
711
+ // A column's head and a figure's label are written as a sentence is, quiet: the section's line is the one
712
+ // set in capitals, and a page of capital heads over capital labels read as a form, not a printed page.
713
+ figure: { face: 'heading', size: '34px', weight: 400, tracking: '-0.01em', features: ['lnum'] },
714
+ },
715
+ },
716
+ // Compact, as the other looks: see Mono's density. The rhythm is the page's air, not the rows'.
717
+ density: 'compact',
718
+ rhythm: 'airy',
719
+ recipes: {
720
+ // A printed page: blocks open under rules, a record's side groups captioned between hairlines. A figure is
721
+ // open with no rule of its own (four ink rules over four figures were the heaviest thing on a list), and a
722
+ // table is open on the paper, its head row over the one rule in the ink.
723
+ blocks: 'ruled',
724
+ stat: 'plain',
725
+ table: 'open',
726
+ // What is chosen sits on a tint; the menu's entry shaded in its ink, a record's tabs on a rule.
727
+ current: 'tint',
728
+ nav: 'quiet',
729
+ tabs: 'rule',
730
+ status: 'quiet',
731
+ chart: 'line',
732
+ // A row is opened by its name, underlined as an index's entry is; what it refers to reads as text.
733
+ links: 'name',
597
734
  banner: 'plain',
598
- steps: 'strip',
599
735
  lanes: 'plain',
600
- header: 'plain',
736
+ // No band behind a page's head: a title large on the paper, as a dashboard's greeting already is.
737
+ filters: 'quiet',
738
+ required: 'optional-word',
739
+ formStep: 'ruled',
740
+ },
741
+ },
742
+ {
743
+ // An instrument. Cool greys under a white page, a near-black menu beside it by day and by night, labels and
744
+ // section names in tracked monospace capitals, tabs in a sunken track with the chosen one lifted out of it,
745
+ // rows that tint under the pointer and statuses as dotted pills. One signal colour, cyan unless a palette says
746
+ // another: on the page at the depth that reads as text, on the dark menu at its bright night depth. Tight and
747
+ // compact, for people who are in it all day: operations, finance, support. The monospace is the machine's own,
748
+ // and it is for labels and readings (a dashboard's figures, a record's leading ones): a table's dates, amounts
749
+ // and counts are the sans with digits a column wide, so a row is read in one face. Its greys are its own under
750
+ // every palette, and its one primary is the ink.
751
+ id: 'graphite',
752
+ label: 'Graphite',
753
+ defaultPalette: 'teal',
754
+ colors: {
755
+ light: {
756
+ ground: '#f1f3f5',
757
+ surface: '#ffffff',
758
+ raised: '#eceef1',
759
+ ink: '#0f1216',
760
+ inkMuted: '#474e58',
761
+ inkSubtle: '#5c646f',
762
+ line: '#e1e4e8',
763
+ lineStrong: '#9aa1ab',
764
+ lineControl: '#78808c',
765
+ primary: '#0f1216',
766
+ onPrimary: '#ffffff',
767
+ status: { good: '#16714a', warning: '#8a5700', critical: '#bb2a2a', info: '#2459b8' },
768
+ nav: { ground: '#0f1216', ink: '#e6e9ee', muted: '#a3abb7', line: '#232830', current: '#1c222b', onCurrent: '#ffffff' },
769
+ /* Hairlines throughout, as Lumen: the cards carry the structure, not a rule in the ink. */
770
+ rules: { section: '#e1e4e8', head: '#e1e4e8' },
771
+ chart: ['#0e8fb0', '#9a6cf7', '#0e9a6c', '#d97706', '#e0428a', '#2557e0', '#a3510b', '#94a3b8'],
772
+ },
773
+ dark: {
774
+ ground: '#0b0d10',
775
+ surface: '#111418',
776
+ raised: '#191d23',
777
+ ink: '#eef1f5',
778
+ inkMuted: '#aab2be',
779
+ inkSubtle: '#8c95a2',
780
+ line: '#232830',
781
+ lineStrong: '#4a525e',
782
+ lineControl: '#727b88',
783
+ primary: '#eef1f5',
784
+ onPrimary: '#0b0d10',
785
+ status: { good: '#5fcf98', warning: '#e2b04e', critical: '#ff8a80', info: '#8ab4ff' },
786
+ nav: { ground: '#07090b', ink: '#e6e9ee', muted: '#a3abb7', line: '#1c2128', current: '#171c23', onCurrent: '#ffffff' },
787
+ rules: { section: '#232830', head: '#232830' },
788
+ chart: ['#1597b9', '#9a78ec', '#12a678', '#c88317', '#e0559b', '#3559e6', '#d26b3b', '#6b7694'],
789
+ },
790
+ },
791
+ shape: { radius: { control: '6px', field: '6px', pill: '4px', panel: '8px' }, elevation: 'hairline', border: { rule: '1px' } },
792
+ type: {
793
+ font: { ui: SANS, data: SANS, heading: SANS, code: SYSTEM_MONO },
794
+ roles: {
795
+ title: { weight: 600, tracking: '-0.015em' },
796
+ section: { face: 'code', size: '12px', weight: 600, case: 'upper', tracking: '0.06em' },
797
+ // Tracked a little, not much: a column's head is a label too, and at 0.06em seven of them took the room a
798
+ // phone number needs to stay on one line.
799
+ label: { face: 'code', size: '11px', weight: 500, case: 'upper', tracking: '0.06em' },
800
+ data: { features: ['tnum'] },
801
+ figure: { face: 'code', weight: 500, tracking: '-0.02em', features: ['tnum', 'zero'] },
802
+ },
803
+ },
804
+ density: 'compact',
805
+ rhythm: 'tight',
806
+ recipes: {
807
+ // Everything a hairline card: a figure like the sections under it (framed in the ink it outweighed them), a
808
+ // list with its rows tinting under the pointer. A breakdown's steps apart, one strip of figures.
809
+ blocks: 'card',
810
+ steps: 'strip',
811
+ // A record's tabs are keys lifted out of a track; the menu's entry a slot, the window a filled segment.
812
+ current: 'lifted',
813
+ nav: 'slot',
814
+ windows: 'segmented',
815
+ // The bar is the menu's ground, near-black by day: its search and its keys are drawn on it, not as the page's.
816
+ bar: 'dark',
817
+ status: 'pill-dot',
818
+ board: 'strip',
819
+ chart: 'gradient',
820
+ rules: 'hairline',
821
+ workflow: 'pills',
822
+ banner: 'plain',
823
+ lanes: 'tag',
824
+ filters: 'solid',
825
+ formStep: 'ruled',
826
+ },
827
+ },
828
+ {
829
+ // Soft and round. A ground in the palette's faintest tint with everything on it a white tile: the menu a card
830
+ // standing off the window's edge, a dashboard's figures as tiles with a large figure, a list one tile with its
831
+ // rows ruled apart, sections as panels under a soft shadow. Buttons and tabs are pills and the primary one is
832
+ // the hue itself: a slate grey until a palette says another. Friendly, for a product people meet now and then:
833
+ // bookings, a members' area, onboarding.
834
+ id: 'bloom',
835
+ label: 'Bloom',
836
+ /* Worn grey until a hue is picked: the shape is the look, and a lavender page under an App whose brand is
837
+ another colour read as the look's choice, not the App's. The colours below are written in Violet, which is
838
+ one pick away: the lavender page, the lilac hairlines and the plum ink are violet's, and under Emerald they
839
+ are emerald's. */
840
+ defaultPalette: 'slate',
841
+ tinted: 'violet',
842
+ colors: {
843
+ light: {
844
+ ground: '#f4f1fb',
845
+ surface: '#ffffff',
846
+ /* A field is a white tile too, on the tinted page as on a panel. */
847
+ field: '#ffffff',
848
+ raised: '#f1edf9',
849
+ ink: '#1c1730',
850
+ inkMuted: '#544c6e',
851
+ inkSubtle: '#665e82',
852
+ line: '#e6e0f2',
853
+ lineStrong: '#b3a8cc',
854
+ /* A field's edge at the least a control's may be (3:1 on the tint and on a raised tile): beside pills and
855
+ soft tiles a darker line made every field the heaviest thing on its form. */
856
+ lineControl: '#8a7fa8',
857
+ status: { good: '#1c7550', warning: '#875600', critical: '#c0263b', info: '#2f62c9' },
858
+ /* The menu is a white card on the tinted page. */
859
+ nav: { ground: '#ffffff', ink: '#1c1730', muted: '#544c6e', line: '#e6e0f2' },
860
+ /* Hairlines throughout: a tile's edge is its shape, and a rule in the ink across one would cut it. */
861
+ rules: { section: '#e6e0f2', head: '#e6e0f2' },
862
+ chart: ['#9a6cf7', '#0e9a6c', '#d97706', '#e0428a', '#0e8fb0', '#2557e0', '#a3510b', '#94a3b8'],
863
+ },
864
+ dark: {
865
+ ground: '#110e1c',
866
+ surface: '#191527',
867
+ field: '#191527',
868
+ raised: '#221d33',
869
+ ink: '#f0ecfb',
870
+ inkMuted: '#b9b0d2',
871
+ inkSubtle: '#9a91b6',
872
+ line: '#2c2640',
873
+ lineStrong: '#584d7a',
874
+ lineControl: '#8176a3',
875
+ status: { good: '#6fd0a0', warning: '#e6b458', critical: '#ff8f9d', info: '#8fb5ff' },
876
+ nav: { ground: '#191527', ink: '#f0ecfb', muted: '#b9b0d2', line: '#2c2640' },
877
+ rules: { section: '#2c2640', head: '#2c2640' },
878
+ chart: ['#9a78ec', '#12a678', '#c88317', '#e0559b', '#1597b9', '#3559e6', '#d26b3b', '#6b7694'],
879
+ },
880
+ },
881
+ shape: { radius: { control: 'round', field: '12px', pill: 'round', panel: '20px' }, elevation: 'soft', border: { rule: '1px' } },
882
+ type: {
883
+ /* No figures face of its own: a date, a phone number and an amount are set in the look's sans, their digits
884
+ a column wide (themeFamilies.css). A monospace column is an instrument's, and nothing here is one. */
885
+ font: { ui: SANS, data: SANS, heading: SANS },
886
+ roles: {
887
+ // A page names itself large: the greeting on a dashboard is the one generous line on it.
888
+ title: { size: '30px', weight: 700, tracking: '-0.02em' },
889
+ section: { size: '16px', weight: 600, tracking: '-0.01em' },
890
+ figure: { size: '32px', weight: 700, tracking: '-0.03em' },
891
+ },
892
+ },
893
+ // Compact, as the other looks: see Mono's density. Airy between its tiles: soft boxes with generous corners
894
+ // crowd one another at the house's gaps, and the page is one people meet now and then, not work in all day.
895
+ density: 'compact',
896
+ rhythm: 'airy',
897
+ recipes: {
898
+ // Everything a soft tile: figures, a list (one tile, its rows ruled apart), a breakdown's steps.
899
+ blocks: 'tile',
900
+ // Pills, and a raised key on the windows' tray; the menu itself a card standing off the window's edge.
901
+ current: 'pill',
902
+ nav: 'float',
903
+ bar: 'soft',
904
+ status: 'pill',
905
+ board: 'soft',
906
+ chart: 'wash',
907
+ rules: 'hairline',
908
+ avatar: 'round',
909
+ workflow: 'segments',
910
+ banner: 'gradient',
911
+ filters: 'solid',
912
+ // A form's actions stand on a raised bar, as every other block here is lifted off the tint.
913
+ actionBar: 'raised',
601
914
  },
602
915
  },
603
916
  ];
917
+ /** Each look whole: a variant over the flagship it names, which is written before it. */
918
+ const HOUSE = WRITTEN.map((look) => 'over' in look ? variantOf(WRITTEN.find((flagship) => flagship.id === look.over), look) : look);
604
919
  export const LOOKS = HOUSE.map(withPalettes);
@@ -11,8 +11,6 @@ export declare function themePreset(id: string | undefined): ThemeDefinition | u
11
11
  export declare function themeModes(theme: Pick<ThemeDefinition, 'scheme'>): readonly ('light' | 'dark')[];
12
12
  /** A theme's `scheme`, read the one way for an App's theme (themeSpec.ts) and a tenant's or host's (theme.ts parseThemes). */
13
13
  export declare function parseScheme(raw: unknown, where: string): ThemeDefinition['scheme'];
14
- /** The nav role its base look sets, which a theme wears on the bar only until it sets the role itself (recipeAttributes). */
15
- export declare function lookNavRole(theme: ThemeDefinition): import("../../schema/theme.js").ThemeTypeRoleDefinition | undefined;
16
14
  /** Inherit roles from a data-backed base, then overlay the author's explicit values. */
17
15
  export declare function inheritThemePreset(theme: ThemeDefinition): ThemeDefinition;
18
16
  /** Resolve structure first, then theme colors, then a named color variation.
@@ -39,10 +39,6 @@ function overlayPalette(base, over) {
39
39
  delete merged.onPrimary;
40
40
  return merged;
41
41
  }
42
- /** The nav role its base look sets, which a theme wears on the bar only until it sets the role itself (recipeAttributes). */
43
- export function lookNavRole(theme) {
44
- return themePreset(theme.base)?.type?.roles?.nav;
45
- }
46
42
  /** Inherit roles from a data-backed base, then overlay the author's explicit values. */
47
43
  export function inheritThemePreset(theme) {
48
44
  const base = themePreset(theme.base);