@lets-ship/brand-dna 1.1.0 → 3.0.0

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.
Files changed (102) hide show
  1. package/catalog/fonts/bricolage-grotesque-latin-700-normal.woff2 +0 -0
  2. package/catalog/fonts/figtree-latin-400-normal.woff2 +0 -0
  3. package/catalog/fonts/figtree-latin-600-normal.woff2 +0 -0
  4. package/catalog/fonts/gabarito-latin-700-normal.woff2 +0 -0
  5. package/catalog/fonts/gloock-latin-400-normal.woff2 +0 -0
  6. package/catalog/fonts/hanken-grotesk-latin-400-normal.woff2 +0 -0
  7. package/catalog/fonts/hanken-grotesk-latin-600-normal.woff2 +0 -0
  8. package/catalog/fonts/mulish-latin-400-normal.woff2 +0 -0
  9. package/catalog/fonts/mulish-latin-600-normal.woff2 +0 -0
  10. package/catalog/fonts/schibsted-grotesk-latin-400-normal.woff2 +0 -0
  11. package/catalog/fonts/schibsted-grotesk-latin-600-normal.woff2 +0 -0
  12. package/catalog/fonts/schibsted-grotesk-latin-700-normal.woff2 +0 -0
  13. package/catalog/fonts/source-sans-3-latin-400-normal.woff2 +0 -0
  14. package/catalog/fonts/source-sans-3-latin-600-normal.woff2 +0 -0
  15. package/catalog/fonts/young-serif-latin-400-normal.woff2 +0 -0
  16. package/catalog/fonts.lock.json +165 -0
  17. package/dist/core/color/pairs.d.ts.map +1 -1
  18. package/dist/core/color/pairs.js +5 -0
  19. package/dist/core/color/pairs.js.map +1 -1
  20. package/dist/core/compile/design-language.d.ts +10 -0
  21. package/dist/core/compile/design-language.d.ts.map +1 -0
  22. package/dist/core/compile/design-language.js +74 -0
  23. package/dist/core/compile/design-language.js.map +1 -0
  24. package/dist/core/compile/design-md.d.ts.map +1 -1
  25. package/dist/core/compile/design-md.js +8 -2
  26. package/dist/core/compile/design-md.js.map +1 -1
  27. package/dist/core/compile/patterns.d.ts +8 -0
  28. package/dist/core/compile/patterns.d.ts.map +1 -1
  29. package/dist/core/compile/patterns.js +14 -3
  30. package/dist/core/compile/patterns.js.map +1 -1
  31. package/dist/core/compile/site-design.d.ts +32 -0
  32. package/dist/core/compile/site-design.d.ts.map +1 -0
  33. package/dist/core/compile/site-design.js +243 -0
  34. package/dist/core/compile/site-design.js.map +1 -0
  35. package/dist/core/compile/site-emphasis.d.ts +46 -0
  36. package/dist/core/compile/site-emphasis.d.ts.map +1 -0
  37. package/dist/core/compile/site-emphasis.js +64 -0
  38. package/dist/core/compile/site-emphasis.js.map +1 -0
  39. package/dist/core/compile/site-theme-rules.d.ts +9 -2
  40. package/dist/core/compile/site-theme-rules.d.ts.map +1 -1
  41. package/dist/core/compile/site-theme-rules.js +83 -2
  42. package/dist/core/compile/site-theme-rules.js.map +1 -1
  43. package/dist/core/compile/site-theme-values.d.ts +11 -1
  44. package/dist/core/compile/site-theme-values.d.ts.map +1 -1
  45. package/dist/core/compile/site-theme-values.js +39 -5
  46. package/dist/core/compile/site-theme-values.js.map +1 -1
  47. package/dist/core/compile/site-theme.d.ts.map +1 -1
  48. package/dist/core/compile/site-theme.js +16 -4
  49. package/dist/core/compile/site-theme.js.map +1 -1
  50. package/dist/core/compile/skill.d.ts.map +1 -1
  51. package/dist/core/compile/skill.js +8 -0
  52. package/dist/core/compile/skill.js.map +1 -1
  53. package/dist/core/lint/catalog.d.ts +1 -1
  54. package/dist/core/lint/catalog.d.ts.map +1 -1
  55. package/dist/core/lint/catalog.js +13 -1
  56. package/dist/core/lint/catalog.js.map +1 -1
  57. package/dist/core/lint/rules/design.d.ts +27 -0
  58. package/dist/core/lint/rules/design.d.ts.map +1 -0
  59. package/dist/core/lint/rules/design.js +234 -0
  60. package/dist/core/lint/rules/design.js.map +1 -0
  61. package/dist/core/lint/rules/refs.d.ts.map +1 -1
  62. package/dist/core/lint/rules/refs.js +3 -0
  63. package/dist/core/lint/rules/refs.js.map +1 -1
  64. package/dist/core/lint/rules/type.js +1 -1
  65. package/dist/core/lint/rules/type.js.map +1 -1
  66. package/dist/core/presets/base.dna.json +307 -21
  67. package/dist/core/presets/design.d.ts +16 -0
  68. package/dist/core/presets/design.d.ts.map +1 -0
  69. package/dist/core/presets/design.js +86 -0
  70. package/dist/core/presets/design.js.map +1 -0
  71. package/dist/core/presets/presets.d.ts +9 -2
  72. package/dist/core/presets/presets.d.ts.map +1 -1
  73. package/dist/core/presets/presets.js +52 -15
  74. package/dist/core/presets/presets.js.map +1 -1
  75. package/dist/core/presets/specs.d.ts +330 -16
  76. package/dist/core/presets/specs.d.ts.map +1 -1
  77. package/dist/core/presets/specs.js +162 -12
  78. package/dist/core/presets/specs.js.map +1 -1
  79. package/dist/core/site/colours.d.ts +3 -3
  80. package/dist/core/site/colours.d.ts.map +1 -1
  81. package/dist/core/site/colours.js +13 -5
  82. package/dist/core/site/colours.js.map +1 -1
  83. package/dist/schema/channel-spec.d.ts +5 -5
  84. package/dist/schema/design.d.ts +258 -0
  85. package/dist/schema/design.d.ts.map +1 -0
  86. package/dist/schema/design.js +132 -0
  87. package/dist/schema/design.js.map +1 -0
  88. package/dist/schema/dna.d.ts +324 -4
  89. package/dist/schema/dna.d.ts.map +1 -1
  90. package/dist/schema/dna.js +16 -0
  91. package/dist/schema/dna.js.map +1 -1
  92. package/dist/schema/gen.d.ts +6 -1
  93. package/dist/schema/gen.d.ts.map +1 -1
  94. package/dist/schema/pattern.d.ts +80 -0
  95. package/dist/schema/pattern.d.ts.map +1 -1
  96. package/dist/schema/skeleton.d.ts +81 -8
  97. package/dist/schema/skeleton.d.ts.map +1 -1
  98. package/dist/schema/tokens.d.ts +45 -2
  99. package/dist/schema/tokens.d.ts.map +1 -1
  100. package/dist/schema/tokens.js +16 -0
  101. package/dist/schema/tokens.js.map +1 -1
  102. package/package.json +1 -1
@@ -1,11 +1,13 @@
1
1
  import { Dna as DnaSchema } from "../../schema/dna.js";
2
- import { markSvg } from "../assets/mark.js";
2
+ import { MARK_SHAPES, markSvg } from "../assets/mark.js";
3
3
  import { sha256 } from "../canonical/hash.js";
4
4
  import { parseColor, toDtcg } from "../color/color.js";
5
5
  import { derive } from "../derive/derive.js";
6
6
  import BASE_DNA from "./base.dna.json" with { type: "json" };
7
- import { PRESET_IDS, PRESETS } from "./specs.js";
8
- export { BRAND_KIT_IDS, PRESET_IDS, PRESETS } from "./specs.js";
7
+ import { applyDesign, applyTypeScale } from "./design.js";
8
+ import { CATALOG_GENERIC, PRESET_IDS, PRESETS } from "./specs.js";
9
+ export { MARK_SHAPES } from "../assets/mark.js";
10
+ export { BRAND_KIT_IDS, CATALOG_GENERIC, PRESET_IDS, PRESETS, } from "./specs.js";
9
11
  const USER = { $extensions: { dna: { provenance: { method: "user" } } } };
10
12
  const ID = /^[a-z0-9][a-z0-9_-]*$/;
11
13
  const encoder = new TextEncoder();
@@ -27,8 +29,8 @@ function substitute(node, values) {
27
29
  return Object.fromEntries(Object.entries(node).map(([key, value]) => [key, substitute(value, values)]));
28
30
  return node;
29
31
  }
30
- function fill(template, preset, brand) {
31
- return substitute(template, { ID: brand.id, NAME: brand.name, PRESET: preset });
32
+ function fill(template, origin, brand) {
33
+ return substitute(template, { ID: brand.id, NAME: brand.name, PRESET: origin });
32
34
  }
33
35
  function seed(hex) {
34
36
  return { $type: "color", $value: toDtcg(parseColor(hex)), ...USER };
@@ -46,17 +48,21 @@ function fontEntry(family, lock) {
46
48
  substituteFor: null,
47
49
  };
48
50
  }
51
+ /** A catalog face with the generic families of its kind after it. */
52
+ function stack(family) {
53
+ const generic = CATALOG_GENERIC[family];
54
+ if (!generic)
55
+ throw new PresetError(`${family} has no generic family in CATALOG_GENERIC; add it with the font`);
56
+ const ui = generic === "monospace" ? "ui-monospace" : generic === "serif" ? "ui-serif" : "ui-sans-serif";
57
+ return [family, ui, generic];
58
+ }
49
59
  function applyType(dna, spec) {
50
60
  const t = dna.tokens;
51
- t.font.display.$value = [spec.display.family, "ui-sans-serif", "sans-serif"];
52
- t.font.body.$value = [spec.body, "ui-sans-serif", "sans-serif"];
61
+ t.font.display.$value = stack(spec.display.family);
62
+ t.font.body.$value = stack(spec.body);
53
63
  if (t.font.mono)
54
- t.font.mono.$value = [spec.mono, "ui-monospace", "monospace"];
55
- for (const role of ["display", "h1", "h2", "h3"]) {
56
- const token = t.typography[role];
57
- if (token && typeof token.$value === "object")
58
- token.$value.fontWeight = spec.display.weight;
59
- }
64
+ t.font.mono.$value = stack(spec.mono);
65
+ applyTypeScale(dna, spec);
60
66
  }
61
67
  function applyShape(dna, spec) {
62
68
  for (const step of ["sm", "md", "lg"]) {
@@ -70,19 +76,50 @@ export async function presetBrand(preset, brand, lock) {
70
76
  const spec = PRESETS[preset];
71
77
  if (!spec)
72
78
  throw new PresetError(`unknown preset ${String(preset)}; pick one of ${PRESET_IDS.join(", ")}`);
79
+ return specBrand(spec, preset, brand, lock);
80
+ }
81
+ const HEX = /^#[0-9a-f]{6}$/i;
82
+ /** A look that is not one of the six presets: each field checked, so a bad one names itself. */
83
+ function checkSpec(spec, lock) {
84
+ for (const field of ["primary", "accent"]) {
85
+ if (!HEX.test(spec[field]))
86
+ throw new PresetError(`${field} ${spec[field]} is not a #rrggbb colour`);
87
+ }
88
+ const weights = lock.filter((f) => f.family === spec.display.family).map((f) => f.weight);
89
+ if (!weights.includes(spec.display.weight))
90
+ throw new PresetError(`the catalog has no ${spec.display.family} at weight ${spec.display.weight}; it has ${weights.join(", ") || "none"}`);
91
+ for (const [step, px] of Object.entries(spec.radiusPx)) {
92
+ if (!Number.isInteger(px) || px < 0)
93
+ throw new PresetError(`radius ${step} ${px} is not a whole number of px`);
94
+ }
95
+ if (!MARK_SHAPES.includes(spec.mark))
96
+ throw new PresetError(`mark ${spec.mark} is not one of ${MARK_SHAPES.join(", ")}`);
97
+ }
98
+ /**
99
+ * The DNA of a look built from its own spec, for one brand: the same path as a preset, so a
100
+ * custom look in a preview is the DNA a site would get. `origin` names the look in the DNA's
101
+ * source, as `preset://<origin>`.
102
+ */
103
+ export async function customBrand(spec, brand, lock) {
104
+ checkSpec(spec, lock);
105
+ return specBrand(spec, "custom", brand, lock);
106
+ }
107
+ async function specBrand(spec, origin, brand, lock) {
73
108
  if (!ID.test(brand.id))
74
109
  throw new PresetError(`brand id ${brand.id} is not a lowercase id`);
75
110
  if (brand.name.trim() === "")
76
111
  throw new PresetError("the brand name is empty");
77
- const dna = fill(BASE_DNA, preset, brand);
112
+ const dna = fill(BASE_DNA, origin, brand);
78
113
  const palette = dna.tokens.color.palette;
79
114
  if (palette.brand)
80
115
  palette.brand["600"] = seed(spec.primary);
81
116
  if (palette.accent)
82
117
  palette.accent["300"] = seed(spec.accent);
118
+ // The fonts first, so a family outside the catalog is named as that before anything reads it.
119
+ dna.fonts = [...new Set([spec.display.family, spec.body, spec.mono])].map((family) => fontEntry(family, lock));
83
120
  applyType(dna, spec);
84
121
  applyShape(dna, spec);
85
- dna.fonts = [...new Set([spec.display.family, spec.body, spec.mono])].map((family) => fontEntry(family, lock));
122
+ applyDesign(dna, spec);
86
123
  const mark = encoder.encode(markSvg(spec.mark, spec.primary));
87
124
  const hash = await sha256(mark);
88
125
  const primary = dna.logo.variants[0];
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../src/core/presets/presets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAY,GAAG,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,QAAQ,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAkC,MAAM,YAAY,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAiB,M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C;IAC/G,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACrB,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtB,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACrC,IAAI,OAAO;QAAE,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC"}
@@ -1,5 +1,49 @@
1
- /** The six preset looks of SHIP Sites (D22): colour seeds, a type pair, a radius scale and a mark. */
1
+ /**
2
+ * The six preset looks of SHIP Sites (D22): colour seeds, a type pair, a type scale, a radius
3
+ * scale, a mark and a design language. Each look differs in how its pages are composed, not
4
+ * only in its colours: density, splits, containers, emphasis and media come from the look.
5
+ */
6
+ import type { z } from "zod";
7
+ import type { ACCENT_USES, COLOUR_STRATEGIES, Containers, Emphasis, PAGE_REVEALS, TEXTURE_TONES, VisualTone } from "../../schema/design.js";
2
8
  import type { MarkShape } from "../assets/mark.js";
9
+ /** How the type roles are sized: the body size, the ratio between steps and the largest headline. */
10
+ export type PresetType = {
11
+ readonly bodyPx: number;
12
+ readonly ratio: number;
13
+ /** The size of the `display-xl` role on a wide screen. */
14
+ readonly displayXlPx: number;
15
+ /** The tracking of `display-xl`, in em; smaller headings take a share of it. */
16
+ readonly trackingEm: number;
17
+ /** The line height of `display-xl`; smaller headings open up from it. */
18
+ readonly leading: number;
19
+ };
20
+ export type PresetDesign = {
21
+ readonly direction: string;
22
+ readonly tone: z.infer<typeof VisualTone>;
23
+ readonly avoid: readonly string[];
24
+ readonly align: "start" | "center";
25
+ readonly split: readonly [number, number];
26
+ readonly density: "compact" | "regular" | "airy";
27
+ readonly measure: {
28
+ readonly body: number;
29
+ readonly lead: number;
30
+ };
31
+ readonly tones: readonly ("base" | "tint" | "inverse" | "brand")[];
32
+ readonly maxInverse: number;
33
+ /** The band tones that carry the base DNA's dot grid; only a decorative look has any. */
34
+ readonly texture?: readonly (typeof TEXTURE_TONES)[number][];
35
+ readonly strategy?: (typeof COLOUR_STRATEGIES)[number];
36
+ readonly containers: z.infer<typeof Containers>;
37
+ readonly emphasis: z.infer<typeof Emphasis>;
38
+ readonly accent: readonly (typeof ACCENT_USES)[number][];
39
+ readonly media: {
40
+ readonly aspects: readonly string[];
41
+ readonly duotone: boolean;
42
+ readonly radius: "sm" | "md" | "lg";
43
+ };
44
+ readonly numerals: "tabular" | "proportional" | "oldstyle";
45
+ readonly reveal: (typeof PAGE_REVEALS)[number];
46
+ };
3
47
  export type PresetSpec = {
4
48
  readonly label: string;
5
49
  /** The primary seed, placed at brand.600: dark enough for light text on it. */
@@ -18,6 +62,8 @@ export type PresetSpec = {
18
62
  readonly lg: number;
19
63
  };
20
64
  readonly mark: MarkShape;
65
+ readonly type: PresetType;
66
+ readonly design: PresetDesign;
21
67
  };
22
68
  export declare const PRESETS: {
23
69
  readonly harbor: {
@@ -25,10 +71,10 @@ export declare const PRESETS: {
25
71
  readonly primary: "#2c6bbb";
26
72
  readonly accent: "#f2c14e";
27
73
  readonly display: {
28
- readonly family: "Space Grotesk";
74
+ readonly family: "Bricolage Grotesque";
29
75
  readonly weight: 700;
30
76
  };
31
- readonly body: "Inter";
77
+ readonly body: "Hanken Grotesk";
32
78
  readonly mono: "JetBrains Mono";
33
79
  readonly radiusPx: {
34
80
  readonly sm: 4;
@@ -36,16 +82,60 @@ export declare const PRESETS: {
36
82
  readonly lg: 16;
37
83
  };
38
84
  readonly mark: "circle";
85
+ readonly type: {
86
+ readonly bodyPx: 17;
87
+ readonly ratio: 1.25;
88
+ readonly displayXlPx: 88;
89
+ readonly trackingEm: -0.035;
90
+ readonly leading: 0.96;
91
+ };
92
+ readonly design: {
93
+ readonly direction: "Plain-spoken and close by: big, confident headlines, real places, hours and prices, and one warm yellow mark per screen.";
94
+ readonly tone: {
95
+ readonly contrast: 4;
96
+ readonly density: 2;
97
+ readonly ornament: 2;
98
+ readonly motion: 2;
99
+ };
100
+ readonly avoid: string[];
101
+ readonly align: "start";
102
+ readonly split: readonly [7, 5];
103
+ readonly density: "airy";
104
+ readonly measure: {
105
+ readonly body: 64;
106
+ readonly lead: 36;
107
+ };
108
+ readonly tones: readonly ["base", "tint", "inverse"];
109
+ readonly maxInverse: 1;
110
+ readonly strategy: "restrained";
111
+ readonly containers: {
112
+ readonly list: "rule";
113
+ readonly media: "bleed";
114
+ readonly quote: "plain";
115
+ };
116
+ readonly emphasis: {
117
+ readonly style: "marker";
118
+ readonly role: "accent";
119
+ };
120
+ readonly accent: readonly ["marker", "rule", "numerals", "cta-inverse"];
121
+ readonly media: {
122
+ readonly aspects: readonly ["4:5", "3:2"];
123
+ readonly duotone: false;
124
+ readonly radius: "lg";
125
+ };
126
+ readonly numerals: "tabular";
127
+ readonly reveal: "rise";
128
+ };
39
129
  };
40
130
  readonly fern: {
41
131
  readonly label: "Fern";
42
132
  readonly primary: "#3c7b56";
43
133
  readonly accent: "#f4b183";
44
134
  readonly display: {
45
- readonly family: "Fraunces";
46
- readonly weight: 600;
135
+ readonly family: "Young Serif";
136
+ readonly weight: 400;
47
137
  };
48
- readonly body: "Work Sans";
138
+ readonly body: "Source Sans 3";
49
139
  readonly mono: "IBM Plex Mono";
50
140
  readonly radiusPx: {
51
141
  readonly sm: 6;
@@ -53,6 +143,50 @@ export declare const PRESETS: {
53
143
  readonly lg: 18;
54
144
  };
55
145
  readonly mark: "square";
146
+ readonly type: {
147
+ readonly bodyPx: 18;
148
+ readonly ratio: 1.2;
149
+ readonly displayXlPx: 76;
150
+ readonly trackingEm: -0.015;
151
+ readonly leading: 1.04;
152
+ };
153
+ readonly design: {
154
+ readonly direction: "Calm and grown, like a good shop on a quiet street: a serif voice, generous space and soft tints in place of hard boxes.";
155
+ readonly tone: {
156
+ readonly contrast: 2;
157
+ readonly density: 1;
158
+ readonly ornament: 2;
159
+ readonly motion: 1;
160
+ };
161
+ readonly avoid: readonly [...string[], "dark bands"];
162
+ readonly align: "start";
163
+ readonly split: readonly [6, 5];
164
+ readonly density: "airy";
165
+ readonly measure: {
166
+ readonly body: 62;
167
+ readonly lead: 34;
168
+ };
169
+ readonly tones: readonly ["base", "tint", "brand"];
170
+ readonly maxInverse: 0;
171
+ readonly strategy: "restrained";
172
+ readonly containers: {
173
+ readonly list: "plain";
174
+ readonly media: "plain";
175
+ readonly quote: "rule";
176
+ };
177
+ readonly emphasis: {
178
+ readonly style: "none";
179
+ readonly role: "primary";
180
+ };
181
+ readonly accent: readonly ["rule", "badge"];
182
+ readonly media: {
183
+ readonly aspects: readonly ["3:4", "4:3"];
184
+ readonly duotone: false;
185
+ readonly radius: "md";
186
+ };
187
+ readonly numerals: "proportional";
188
+ readonly reveal: "fade";
189
+ };
56
190
  };
57
191
  readonly ember: {
58
192
  readonly label: "Ember";
@@ -70,16 +204,61 @@ export declare const PRESETS: {
70
204
  readonly lg: 8;
71
205
  };
72
206
  readonly mark: "diamond";
207
+ readonly type: {
208
+ readonly bodyPx: 18;
209
+ readonly ratio: 1.25;
210
+ readonly displayXlPx: 72;
211
+ readonly trackingEm: -0.01;
212
+ readonly leading: 1.08;
213
+ };
214
+ readonly design: {
215
+ readonly direction: "Warm and editorial: long serif headlines, a printed feel, and quotes that carry the page.";
216
+ readonly tone: {
217
+ readonly contrast: 3;
218
+ readonly density: 2;
219
+ readonly ornament: 3;
220
+ readonly motion: 1;
221
+ };
222
+ readonly avoid: string[];
223
+ readonly align: "start";
224
+ readonly split: readonly [7, 5];
225
+ readonly density: "regular";
226
+ readonly measure: {
227
+ readonly body: 66;
228
+ readonly lead: 40;
229
+ };
230
+ readonly tones: readonly ["base", "tint", "brand"];
231
+ readonly maxInverse: 0;
232
+ readonly texture: readonly ["brand"];
233
+ readonly strategy: "restrained";
234
+ readonly containers: {
235
+ readonly list: "rule";
236
+ readonly media: "plain";
237
+ readonly quote: "plain";
238
+ };
239
+ readonly emphasis: {
240
+ readonly style: "marker";
241
+ readonly role: "accent";
242
+ };
243
+ readonly accent: readonly ["marker", "badge"];
244
+ readonly media: {
245
+ readonly aspects: readonly ["3:2", "4:5"];
246
+ readonly duotone: false;
247
+ readonly radius: "sm";
248
+ };
249
+ readonly numerals: "oldstyle";
250
+ readonly reveal: "fade";
251
+ };
73
252
  };
74
253
  readonly slate: {
75
254
  readonly label: "Slate";
76
255
  readonly primary: "#5e6d83";
77
256
  readonly accent: "#8fd3f4";
78
257
  readonly display: {
79
- readonly family: "IBM Plex Sans";
258
+ readonly family: "Schibsted Grotesk";
80
259
  readonly weight: 700;
81
260
  };
82
- readonly body: "IBM Plex Sans";
261
+ readonly body: "Schibsted Grotesk";
83
262
  readonly mono: "IBM Plex Mono";
84
263
  readonly radiusPx: {
85
264
  readonly sm: 0;
@@ -87,16 +266,60 @@ export declare const PRESETS: {
87
266
  readonly lg: 4;
88
267
  };
89
268
  readonly mark: "bars";
269
+ readonly type: {
270
+ readonly bodyPx: 16;
271
+ readonly ratio: 1.25;
272
+ readonly displayXlPx: 72;
273
+ readonly trackingEm: -0.025;
274
+ readonly leading: 1;
275
+ };
276
+ readonly design: {
277
+ readonly direction: "Exact and quiet: a grid you can feel, square edges, thin rules and numbers that line up.";
278
+ readonly tone: {
279
+ readonly contrast: 5;
280
+ readonly density: 4;
281
+ readonly ornament: 1;
282
+ readonly motion: 1;
283
+ };
284
+ readonly avoid: readonly [...string[], "soft shadows", "rounded pills"];
285
+ readonly align: "start";
286
+ readonly split: readonly [8, 4];
287
+ readonly density: "compact";
288
+ readonly measure: {
289
+ readonly body: 70;
290
+ readonly lead: 44;
291
+ };
292
+ readonly tones: readonly ["base", "tint", "inverse"];
293
+ readonly maxInverse: 1;
294
+ readonly strategy: "restrained";
295
+ readonly containers: {
296
+ readonly list: "rule";
297
+ readonly media: "frame";
298
+ readonly quote: "rule";
299
+ };
300
+ readonly emphasis: {
301
+ readonly style: "underline";
302
+ readonly role: "primary";
303
+ };
304
+ readonly accent: readonly ["numerals", "cta-inverse"];
305
+ readonly media: {
306
+ readonly aspects: readonly ["16:9", "1:1"];
307
+ readonly duotone: true;
308
+ readonly radius: "sm";
309
+ };
310
+ readonly numerals: "tabular";
311
+ readonly reveal: "none";
312
+ };
90
313
  };
91
314
  readonly plum: {
92
315
  readonly label: "Plum";
93
- readonly primary: "#734ad3";
94
- readonly accent: "#f5a3c7";
316
+ readonly primary: "#9b3a7a";
317
+ readonly accent: "#a7e8d0";
95
318
  readonly display: {
96
- readonly family: "Work Sans";
97
- readonly weight: 600;
319
+ readonly family: "Gabarito";
320
+ readonly weight: 700;
98
321
  };
99
- readonly body: "Inter";
322
+ readonly body: "Figtree";
100
323
  readonly mono: "JetBrains Mono";
101
324
  readonly radiusPx: {
102
325
  readonly sm: 8;
@@ -104,16 +327,61 @@ export declare const PRESETS: {
104
327
  readonly lg: 24;
105
328
  };
106
329
  readonly mark: "ring";
330
+ readonly type: {
331
+ readonly bodyPx: 17;
332
+ readonly ratio: 1.25;
333
+ readonly displayXlPx: 84;
334
+ readonly trackingEm: -0.03;
335
+ readonly leading: 0.98;
336
+ };
337
+ readonly design: {
338
+ readonly direction: "Bright and friendly: round shapes, bold rounded headlines and colour bands that carry the page.";
339
+ readonly tone: {
340
+ readonly contrast: 3;
341
+ readonly density: 3;
342
+ readonly ornament: 4;
343
+ readonly motion: 3;
344
+ };
345
+ readonly avoid: string[];
346
+ readonly align: "start";
347
+ readonly split: readonly [6, 5];
348
+ readonly density: "regular";
349
+ readonly measure: {
350
+ readonly body: 60;
351
+ readonly lead: 34;
352
+ };
353
+ readonly tones: readonly ["base", "tint", "brand", "inverse"];
354
+ readonly maxInverse: 1;
355
+ readonly texture: readonly ["brand", "inverse"];
356
+ readonly strategy: "restrained";
357
+ readonly containers: {
358
+ readonly list: "card";
359
+ readonly media: "plain";
360
+ readonly quote: "card";
361
+ };
362
+ readonly emphasis: {
363
+ readonly style: "marker";
364
+ readonly role: "accent";
365
+ };
366
+ readonly accent: readonly ["marker", "badge", "cta-inverse"];
367
+ readonly media: {
368
+ readonly aspects: readonly ["1:1", "4:3"];
369
+ readonly duotone: false;
370
+ readonly radius: "lg";
371
+ };
372
+ readonly numerals: "proportional";
373
+ readonly reveal: "rise";
374
+ };
107
375
  };
108
376
  readonly sand: {
109
377
  readonly label: "Sand";
110
378
  readonly primary: "#8d6136";
111
379
  readonly accent: "#9fd6cf";
112
380
  readonly display: {
113
- readonly family: "Fraunces";
114
- readonly weight: 600;
381
+ readonly family: "Gloock";
382
+ readonly weight: 400;
115
383
  };
116
- readonly body: "Open Sans";
384
+ readonly body: "Mulish";
117
385
  readonly mono: "IBM Plex Mono";
118
386
  readonly radiusPx: {
119
387
  readonly sm: 4;
@@ -121,6 +389,50 @@ export declare const PRESETS: {
121
389
  readonly lg: 12;
122
390
  };
123
391
  readonly mark: "triangle";
392
+ readonly type: {
393
+ readonly bodyPx: 17;
394
+ readonly ratio: 1.25;
395
+ readonly displayXlPx: 84;
396
+ readonly trackingEm: -0.02;
397
+ readonly leading: 1.02;
398
+ };
399
+ readonly design: {
400
+ readonly direction: "Crafted and unhurried: a high-contrast serif, natural tones and pictures given room to breathe.";
401
+ readonly tone: {
402
+ readonly contrast: 3;
403
+ readonly density: 1;
404
+ readonly ornament: 2;
405
+ readonly motion: 1;
406
+ };
407
+ readonly avoid: string[];
408
+ readonly align: "start";
409
+ readonly split: readonly [7, 5];
410
+ readonly density: "airy";
411
+ readonly measure: {
412
+ readonly body: 64;
413
+ readonly lead: 36;
414
+ };
415
+ readonly tones: readonly ["base", "tint", "inverse"];
416
+ readonly maxInverse: 1;
417
+ readonly strategy: "restrained";
418
+ readonly containers: {
419
+ readonly list: "rule";
420
+ readonly media: "bleed";
421
+ readonly quote: "plain";
422
+ };
423
+ readonly emphasis: {
424
+ readonly style: "none";
425
+ readonly role: "primary";
426
+ };
427
+ readonly accent: readonly ["rule", "numerals"];
428
+ readonly media: {
429
+ readonly aspects: readonly ["4:5", "3:2"];
430
+ readonly duotone: false;
431
+ readonly radius: "md";
432
+ };
433
+ readonly numerals: "proportional";
434
+ readonly reveal: "fade";
435
+ };
124
436
  };
125
437
  };
126
438
  export type PresetId = keyof typeof PRESETS;
@@ -131,4 +443,6 @@ export declare const PRESET_IDS: PresetId[];
131
443
  * a preset, so the API, the CLI and agents can still start a site from any of the six.
132
444
  */
133
445
  export declare const BRAND_KIT_IDS: readonly PresetId[];
446
+ /** The generic family each catalog face falls back to, so a stack never ends in the wrong kind. */
447
+ export declare const CATALOG_GENERIC: Readonly<Record<string, "serif" | "sans-serif" | "monospace">>;
134
448
  //# sourceMappingURL=specs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../src/core/presets/specs.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,QAAQ,CAAC,IAAI,EAAE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