@lets-ship/brand-dna 2.0.0 → 3.1.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.
- package/catalog/fonts/bricolage-grotesque-latin-700-normal.woff2 +0 -0
- package/catalog/fonts/figtree-latin-400-normal.woff2 +0 -0
- package/catalog/fonts/figtree-latin-600-normal.woff2 +0 -0
- package/catalog/fonts/gabarito-latin-700-normal.woff2 +0 -0
- package/catalog/fonts/gloock-latin-400-normal.woff2 +0 -0
- package/catalog/fonts/hanken-grotesk-latin-400-normal.woff2 +0 -0
- package/catalog/fonts/hanken-grotesk-latin-600-normal.woff2 +0 -0
- package/catalog/fonts/mulish-latin-400-normal.woff2 +0 -0
- package/catalog/fonts/mulish-latin-600-normal.woff2 +0 -0
- package/catalog/fonts/schibsted-grotesk-latin-400-normal.woff2 +0 -0
- package/catalog/fonts/schibsted-grotesk-latin-600-normal.woff2 +0 -0
- package/catalog/fonts/schibsted-grotesk-latin-700-normal.woff2 +0 -0
- package/catalog/fonts/source-sans-3-latin-400-normal.woff2 +0 -0
- package/catalog/fonts/source-sans-3-latin-600-normal.woff2 +0 -0
- package/catalog/fonts/young-serif-latin-400-normal.woff2 +0 -0
- package/catalog/fonts.lock.json +165 -0
- package/dist/core/color/pairs.d.ts.map +1 -1
- package/dist/core/color/pairs.js +5 -0
- package/dist/core/color/pairs.js.map +1 -1
- package/dist/core/compile/design-language.d.ts +10 -0
- package/dist/core/compile/design-language.d.ts.map +1 -0
- package/dist/core/compile/design-language.js +74 -0
- package/dist/core/compile/design-language.js.map +1 -0
- package/dist/core/compile/design-md.d.ts.map +1 -1
- package/dist/core/compile/design-md.js +8 -2
- package/dist/core/compile/design-md.js.map +1 -1
- package/dist/core/compile/patterns.d.ts +8 -0
- package/dist/core/compile/patterns.d.ts.map +1 -1
- package/dist/core/compile/patterns.js +14 -3
- package/dist/core/compile/patterns.js.map +1 -1
- package/dist/core/compile/site-design.d.ts +32 -0
- package/dist/core/compile/site-design.d.ts.map +1 -0
- package/dist/core/compile/site-design.js +256 -0
- package/dist/core/compile/site-design.js.map +1 -0
- package/dist/core/compile/site-emphasis.d.ts +46 -0
- package/dist/core/compile/site-emphasis.d.ts.map +1 -0
- package/dist/core/compile/site-emphasis.js +64 -0
- package/dist/core/compile/site-emphasis.js.map +1 -0
- package/dist/core/compile/site-theme-rules.d.ts +9 -2
- package/dist/core/compile/site-theme-rules.d.ts.map +1 -1
- package/dist/core/compile/site-theme-rules.js +86 -2
- package/dist/core/compile/site-theme-rules.js.map +1 -1
- package/dist/core/compile/site-theme-values.d.ts +11 -1
- package/dist/core/compile/site-theme-values.d.ts.map +1 -1
- package/dist/core/compile/site-theme-values.js +39 -5
- package/dist/core/compile/site-theme-values.js.map +1 -1
- package/dist/core/compile/site-theme.d.ts.map +1 -1
- package/dist/core/compile/site-theme.js +16 -4
- package/dist/core/compile/site-theme.js.map +1 -1
- package/dist/core/compile/skill.d.ts.map +1 -1
- package/dist/core/compile/skill.js +8 -0
- package/dist/core/compile/skill.js.map +1 -1
- package/dist/core/lint/catalog.d.ts +1 -1
- package/dist/core/lint/catalog.d.ts.map +1 -1
- package/dist/core/lint/catalog.js +13 -1
- package/dist/core/lint/catalog.js.map +1 -1
- package/dist/core/lint/rules/design.d.ts +27 -0
- package/dist/core/lint/rules/design.d.ts.map +1 -0
- package/dist/core/lint/rules/design.js +234 -0
- package/dist/core/lint/rules/design.js.map +1 -0
- package/dist/core/lint/rules/refs.d.ts.map +1 -1
- package/dist/core/lint/rules/refs.js +3 -0
- package/dist/core/lint/rules/refs.js.map +1 -1
- package/dist/core/lint/rules/type.js +1 -1
- package/dist/core/lint/rules/type.js.map +1 -1
- package/dist/core/presets/base.dna.json +307 -21
- package/dist/core/presets/design.d.ts +16 -0
- package/dist/core/presets/design.d.ts.map +1 -0
- package/dist/core/presets/design.js +86 -0
- package/dist/core/presets/design.js.map +1 -0
- package/dist/core/presets/presets.d.ts +1 -1
- package/dist/core/presets/presets.d.ts.map +1 -1
- package/dist/core/presets/presets.js +18 -11
- package/dist/core/presets/presets.js.map +1 -1
- package/dist/core/presets/specs.d.ts +330 -16
- package/dist/core/presets/specs.d.ts.map +1 -1
- package/dist/core/presets/specs.js +162 -12
- package/dist/core/presets/specs.js.map +1 -1
- package/dist/core/site/colours.d.ts +3 -3
- package/dist/core/site/colours.d.ts.map +1 -1
- package/dist/core/site/colours.js +13 -5
- package/dist/core/site/colours.js.map +1 -1
- package/dist/schema/channel-spec.d.ts +5 -5
- package/dist/schema/design.d.ts +258 -0
- package/dist/schema/design.d.ts.map +1 -0
- package/dist/schema/design.js +132 -0
- package/dist/schema/design.js.map +1 -0
- package/dist/schema/dna.d.ts +324 -4
- package/dist/schema/dna.d.ts.map +1 -1
- package/dist/schema/dna.js +16 -0
- package/dist/schema/dna.js.map +1 -1
- package/dist/schema/gen.d.ts +6 -1
- package/dist/schema/gen.d.ts.map +1 -1
- package/dist/schema/pattern.d.ts +80 -0
- package/dist/schema/pattern.d.ts.map +1 -1
- package/dist/schema/skeleton.d.ts +81 -8
- package/dist/schema/skeleton.d.ts.map +1 -1
- package/dist/schema/tokens.d.ts +45 -2
- package/dist/schema/tokens.d.ts.map +1 -1
- package/dist/schema/tokens.js +16 -0
- package/dist/schema/tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,73 @@
|
|
|
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
|
+
/** The defaults the design skills agree on, which every look avoids. */
|
|
7
|
+
const AVOID = [
|
|
8
|
+
"three identical cards in a row for content that is not a set of equals",
|
|
9
|
+
"centred text in every section",
|
|
10
|
+
"a small capitals label above every heading",
|
|
11
|
+
"an icon in a tinted square on every item",
|
|
12
|
+
];
|
|
1
13
|
export const PRESETS = {
|
|
2
14
|
harbor: {
|
|
3
15
|
label: "Harbor",
|
|
4
16
|
primary: "#2c6bbb",
|
|
5
17
|
accent: "#f2c14e",
|
|
6
|
-
display: { family: "
|
|
7
|
-
body: "
|
|
18
|
+
display: { family: "Bricolage Grotesque", weight: 700 },
|
|
19
|
+
body: "Hanken Grotesk",
|
|
8
20
|
mono: "JetBrains Mono",
|
|
9
21
|
radiusPx: { sm: 4, md: 8, lg: 16 },
|
|
10
22
|
mark: "circle",
|
|
23
|
+
type: { bodyPx: 17, ratio: 1.25, displayXlPx: 88, trackingEm: -0.035, leading: 0.96 },
|
|
24
|
+
design: {
|
|
25
|
+
direction: "Plain-spoken and close by: big, confident headlines, real places, hours and prices, and one warm yellow mark per screen.",
|
|
26
|
+
tone: { contrast: 4, density: 2, ornament: 2, motion: 2 },
|
|
27
|
+
avoid: AVOID,
|
|
28
|
+
align: "start",
|
|
29
|
+
split: [7, 5],
|
|
30
|
+
density: "airy",
|
|
31
|
+
measure: { body: 64, lead: 36 },
|
|
32
|
+
tones: ["base", "tint", "inverse"],
|
|
33
|
+
maxInverse: 1,
|
|
34
|
+
strategy: "restrained",
|
|
35
|
+
containers: { list: "rule", media: "bleed", quote: "plain" },
|
|
36
|
+
emphasis: { style: "marker", role: "accent" },
|
|
37
|
+
accent: ["marker", "rule", "numerals", "cta-inverse"],
|
|
38
|
+
media: { aspects: ["4:5", "3:2"], duotone: false, radius: "lg" },
|
|
39
|
+
numerals: "tabular",
|
|
40
|
+
reveal: "rise",
|
|
41
|
+
},
|
|
11
42
|
},
|
|
12
43
|
fern: {
|
|
13
44
|
label: "Fern",
|
|
14
45
|
primary: "#3c7b56",
|
|
15
46
|
accent: "#f4b183",
|
|
16
|
-
display: { family: "
|
|
17
|
-
body: "
|
|
47
|
+
display: { family: "Young Serif", weight: 400 },
|
|
48
|
+
body: "Source Sans 3",
|
|
18
49
|
mono: "IBM Plex Mono",
|
|
19
50
|
radiusPx: { sm: 6, md: 10, lg: 18 },
|
|
20
51
|
mark: "square",
|
|
52
|
+
type: { bodyPx: 18, ratio: 1.2, displayXlPx: 76, trackingEm: -0.015, leading: 1.04 },
|
|
53
|
+
design: {
|
|
54
|
+
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.",
|
|
55
|
+
tone: { contrast: 2, density: 1, ornament: 2, motion: 1 },
|
|
56
|
+
avoid: [...AVOID, "dark bands"],
|
|
57
|
+
align: "start",
|
|
58
|
+
split: [6, 5],
|
|
59
|
+
density: "airy",
|
|
60
|
+
measure: { body: 62, lead: 34 },
|
|
61
|
+
tones: ["base", "tint", "brand"],
|
|
62
|
+
maxInverse: 0,
|
|
63
|
+
strategy: "restrained",
|
|
64
|
+
containers: { list: "plain", media: "plain", quote: "rule" },
|
|
65
|
+
emphasis: { style: "none", role: "primary" },
|
|
66
|
+
accent: ["rule", "badge"],
|
|
67
|
+
media: { aspects: ["3:4", "4:3"], duotone: false, radius: "md" },
|
|
68
|
+
numerals: "proportional",
|
|
69
|
+
reveal: "fade",
|
|
70
|
+
},
|
|
21
71
|
},
|
|
22
72
|
ember: {
|
|
23
73
|
label: "Ember",
|
|
@@ -28,36 +78,114 @@ export const PRESETS = {
|
|
|
28
78
|
mono: "JetBrains Mono",
|
|
29
79
|
radiusPx: { sm: 2, md: 4, lg: 8 },
|
|
30
80
|
mark: "diamond",
|
|
81
|
+
type: { bodyPx: 18, ratio: 1.25, displayXlPx: 72, trackingEm: -0.01, leading: 1.08 },
|
|
82
|
+
design: {
|
|
83
|
+
direction: "Warm and editorial: long serif headlines, a printed feel, and quotes that carry the page.",
|
|
84
|
+
tone: { contrast: 3, density: 2, ornament: 3, motion: 1 },
|
|
85
|
+
avoid: AVOID,
|
|
86
|
+
align: "start",
|
|
87
|
+
split: [7, 5],
|
|
88
|
+
density: "regular",
|
|
89
|
+
measure: { body: 66, lead: 40 },
|
|
90
|
+
tones: ["base", "tint", "brand"],
|
|
91
|
+
maxInverse: 0,
|
|
92
|
+
texture: ["brand"],
|
|
93
|
+
strategy: "restrained",
|
|
94
|
+
containers: { list: "rule", media: "plain", quote: "plain" },
|
|
95
|
+
emphasis: { style: "marker", role: "accent" },
|
|
96
|
+
accent: ["marker", "badge"],
|
|
97
|
+
media: { aspects: ["3:2", "4:5"], duotone: false, radius: "sm" },
|
|
98
|
+
numerals: "oldstyle",
|
|
99
|
+
reveal: "fade",
|
|
100
|
+
},
|
|
31
101
|
},
|
|
32
102
|
slate: {
|
|
33
103
|
label: "Slate",
|
|
34
104
|
primary: "#5e6d83",
|
|
35
105
|
accent: "#8fd3f4",
|
|
36
|
-
display: { family: "
|
|
37
|
-
body: "
|
|
106
|
+
display: { family: "Schibsted Grotesk", weight: 700 },
|
|
107
|
+
body: "Schibsted Grotesk",
|
|
38
108
|
mono: "IBM Plex Mono",
|
|
39
109
|
radiusPx: { sm: 0, md: 2, lg: 4 },
|
|
40
110
|
mark: "bars",
|
|
111
|
+
type: { bodyPx: 16, ratio: 1.25, displayXlPx: 72, trackingEm: -0.025, leading: 1.0 },
|
|
112
|
+
design: {
|
|
113
|
+
direction: "Exact and quiet: a grid you can feel, square edges, thin rules and numbers that line up.",
|
|
114
|
+
tone: { contrast: 5, density: 4, ornament: 1, motion: 1 },
|
|
115
|
+
avoid: [...AVOID, "soft shadows", "rounded pills"],
|
|
116
|
+
align: "start",
|
|
117
|
+
split: [8, 4],
|
|
118
|
+
density: "compact",
|
|
119
|
+
measure: { body: 70, lead: 44 },
|
|
120
|
+
tones: ["base", "tint", "inverse"],
|
|
121
|
+
maxInverse: 1,
|
|
122
|
+
strategy: "restrained",
|
|
123
|
+
containers: { list: "rule", media: "frame", quote: "rule" },
|
|
124
|
+
emphasis: { style: "underline", role: "primary" },
|
|
125
|
+
accent: ["numerals", "cta-inverse"],
|
|
126
|
+
media: { aspects: ["16:9", "1:1"], duotone: true, radius: "sm" },
|
|
127
|
+
numerals: "tabular",
|
|
128
|
+
reveal: "none",
|
|
129
|
+
},
|
|
41
130
|
},
|
|
42
131
|
plum: {
|
|
43
132
|
label: "Plum",
|
|
44
|
-
primary: "#
|
|
45
|
-
accent: "#
|
|
46
|
-
display: { family: "
|
|
47
|
-
body: "
|
|
133
|
+
primary: "#9b3a7a",
|
|
134
|
+
accent: "#a7e8d0",
|
|
135
|
+
display: { family: "Gabarito", weight: 700 },
|
|
136
|
+
body: "Figtree",
|
|
48
137
|
mono: "JetBrains Mono",
|
|
49
138
|
radiusPx: { sm: 8, md: 14, lg: 24 },
|
|
50
139
|
mark: "ring",
|
|
140
|
+
type: { bodyPx: 17, ratio: 1.25, displayXlPx: 84, trackingEm: -0.03, leading: 0.98 },
|
|
141
|
+
design: {
|
|
142
|
+
direction: "Bright and friendly: round shapes, bold rounded headlines and colour bands that carry the page.",
|
|
143
|
+
tone: { contrast: 3, density: 3, ornament: 4, motion: 3 },
|
|
144
|
+
avoid: AVOID,
|
|
145
|
+
align: "start",
|
|
146
|
+
split: [6, 5],
|
|
147
|
+
density: "regular",
|
|
148
|
+
measure: { body: 60, lead: 34 },
|
|
149
|
+
tones: ["base", "tint", "brand", "inverse"],
|
|
150
|
+
maxInverse: 1,
|
|
151
|
+
texture: ["brand", "inverse"],
|
|
152
|
+
strategy: "restrained",
|
|
153
|
+
containers: { list: "card", media: "plain", quote: "card" },
|
|
154
|
+
emphasis: { style: "marker", role: "accent" },
|
|
155
|
+
accent: ["marker", "badge", "cta-inverse"],
|
|
156
|
+
media: { aspects: ["1:1", "4:3"], duotone: false, radius: "lg" },
|
|
157
|
+
numerals: "proportional",
|
|
158
|
+
reveal: "rise",
|
|
159
|
+
},
|
|
51
160
|
},
|
|
52
161
|
sand: {
|
|
53
162
|
label: "Sand",
|
|
54
163
|
primary: "#8d6136",
|
|
55
164
|
accent: "#9fd6cf",
|
|
56
|
-
display: { family: "
|
|
57
|
-
body: "
|
|
165
|
+
display: { family: "Gloock", weight: 400 },
|
|
166
|
+
body: "Mulish",
|
|
58
167
|
mono: "IBM Plex Mono",
|
|
59
168
|
radiusPx: { sm: 4, md: 8, lg: 12 },
|
|
60
169
|
mark: "triangle",
|
|
170
|
+
type: { bodyPx: 17, ratio: 1.25, displayXlPx: 84, trackingEm: -0.02, leading: 1.02 },
|
|
171
|
+
design: {
|
|
172
|
+
direction: "Crafted and unhurried: a high-contrast serif, natural tones and pictures given room to breathe.",
|
|
173
|
+
tone: { contrast: 3, density: 1, ornament: 2, motion: 1 },
|
|
174
|
+
avoid: AVOID,
|
|
175
|
+
align: "start",
|
|
176
|
+
split: [7, 5],
|
|
177
|
+
density: "airy",
|
|
178
|
+
measure: { body: 64, lead: 36 },
|
|
179
|
+
tones: ["base", "tint", "inverse"],
|
|
180
|
+
maxInverse: 1,
|
|
181
|
+
strategy: "restrained",
|
|
182
|
+
containers: { list: "rule", media: "bleed", quote: "plain" },
|
|
183
|
+
emphasis: { style: "none", role: "primary" },
|
|
184
|
+
accent: ["rule", "numerals"],
|
|
185
|
+
media: { aspects: ["4:5", "3:2"], duotone: false, radius: "md" },
|
|
186
|
+
numerals: "proportional",
|
|
187
|
+
reveal: "fade",
|
|
188
|
+
},
|
|
61
189
|
},
|
|
62
190
|
};
|
|
63
191
|
export const PRESET_IDS = Object.keys(PRESETS);
|
|
@@ -67,4 +195,26 @@ export const PRESET_IDS = Object.keys(PRESETS);
|
|
|
67
195
|
* a preset, so the API, the CLI and agents can still start a site from any of the six.
|
|
68
196
|
*/
|
|
69
197
|
export const BRAND_KIT_IDS = ["harbor", "fern", "slate"];
|
|
198
|
+
/** The generic family each catalog face falls back to, so a stack never ends in the wrong kind. */
|
|
199
|
+
export const CATALOG_GENERIC = {
|
|
200
|
+
"Bricolage Grotesque": "sans-serif",
|
|
201
|
+
Figtree: "sans-serif",
|
|
202
|
+
Fraunces: "serif",
|
|
203
|
+
Gabarito: "sans-serif",
|
|
204
|
+
Gloock: "serif",
|
|
205
|
+
"Hanken Grotesk": "sans-serif",
|
|
206
|
+
"IBM Plex Mono": "monospace",
|
|
207
|
+
"IBM Plex Sans": "sans-serif",
|
|
208
|
+
Inter: "sans-serif",
|
|
209
|
+
"JetBrains Mono": "monospace",
|
|
210
|
+
Merriweather: "serif",
|
|
211
|
+
"Merriweather Sans": "sans-serif",
|
|
212
|
+
Mulish: "sans-serif",
|
|
213
|
+
"Open Sans": "sans-serif",
|
|
214
|
+
"Schibsted Grotesk": "sans-serif",
|
|
215
|
+
"Source Sans 3": "sans-serif",
|
|
216
|
+
"Space Grotesk": "sans-serif",
|
|
217
|
+
"Work Sans": "sans-serif",
|
|
218
|
+
"Young Serif": "serif",
|
|
219
|
+
};
|
|
70
220
|
//# sourceMappingURL=specs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs.js","sourceRoot":"","sources":["../../../src/core/presets/specs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"specs.js","sourceRoot":"","sources":["../../../src/core/presets/specs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkEH,wEAAwE;AACxE,MAAM,KAAK,GAAG;IACb,wEAAwE;IACxE,+BAA+B;IAC/B,4CAA4C;IAC5C,0CAA0C;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,MAAM,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,EAAE;QACvD,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QAClC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;QACrF,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
|
/**
|
|
3
|
-
* Every colour of the DNA, as lower-case #rrggbb: the roles in both modes,
|
|
4
|
-
*
|
|
5
|
-
* only colours a built site may use.
|
|
3
|
+
* Every colour of the DNA, as lower-case #rrggbb: the roles in both modes, the headline emphasis
|
|
4
|
+
* the theme solves from them, and each colour the tokens hold (the palette steps and the shadow
|
|
5
|
+
* colours the site theme declares). These are the only colours a built site may use.
|
|
6
6
|
*/
|
|
7
7
|
export declare function dnaColours(dna: Dna): Set<string>;
|
|
8
8
|
//# sourceMappingURL=colours.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colours.d.ts","sourceRoot":"","sources":["../../../src/core/site/colours.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"colours.d.ts","sourceRoot":"","sources":["../../../src/core/site/colours.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAiC/C;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAQhD"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { COLOR_ROLES } from "../../schema/tokens.js";
|
|
2
|
-
import { oklchToHex } from "../color/color.js";
|
|
2
|
+
import { oklchToHex, parseColor } from "../color/color.js";
|
|
3
3
|
import { roleHex } from "../compile/shared.js";
|
|
4
|
+
import { emphasisSurfaceDecls } from "../compile/site-emphasis.js";
|
|
5
|
+
import { roleDecls } from "../compile/site-theme-values.js";
|
|
4
6
|
import { indexTokens } from "../tokens/resolve.js";
|
|
5
7
|
const isOklch = (value) => typeof value === "object" &&
|
|
6
8
|
value !== null &&
|
|
@@ -16,16 +18,22 @@ function tokenColours(node) {
|
|
|
16
18
|
return [];
|
|
17
19
|
return Object.values(node).flatMap(tokenColours);
|
|
18
20
|
}
|
|
21
|
+
/** The headline emphasis the site theme solves from the roles of one mode (site-emphasis.ts). */
|
|
22
|
+
function emphasisColours(dna, roles) {
|
|
23
|
+
return emphasisSurfaceDecls(dna, roles).flatMap(([, value]) => [...value.matchAll(/oklch\([^)]+\)/g)].map((m) => oklchToHex(parseColor(m[0]))));
|
|
24
|
+
}
|
|
19
25
|
/**
|
|
20
|
-
* Every colour of the DNA, as lower-case #rrggbb: the roles in both modes,
|
|
21
|
-
*
|
|
22
|
-
* only colours a built site may use.
|
|
26
|
+
* Every colour of the DNA, as lower-case #rrggbb: the roles in both modes, the headline emphasis
|
|
27
|
+
* the theme solves from them, and each colour the tokens hold (the palette steps and the shadow
|
|
28
|
+
* colours the site theme declares). These are the only colours a built site may use.
|
|
23
29
|
*/
|
|
24
30
|
export function dnaColours(dna) {
|
|
25
31
|
const index = indexTokens(dna.tokens);
|
|
26
32
|
const modes = ["light", "dark"];
|
|
27
33
|
const roles = modes.flatMap((mode) => COLOR_ROLES.map((role) => roleHex(index, dna, role, mode)));
|
|
28
|
-
|
|
34
|
+
// The theme solves the emphasis from its own role values, fallbacks included, so read the same.
|
|
35
|
+
const emphasis = modes.flatMap((mode) => emphasisColours(dna, new Map(roleDecls(index, dna, mode))));
|
|
36
|
+
const all = [...roles.filter((hex) => Boolean(hex)), ...emphasis, ...tokenColours(dna.tokens)];
|
|
29
37
|
return new Set(all.map((hex) => hex.toLowerCase()));
|
|
30
38
|
}
|
|
31
39
|
//# sourceMappingURL=colours.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colours.js","sourceRoot":"","sources":["../../../src/core/site/colours.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"colours.js","sourceRoot":"","sources":["../../../src/core/site/colours.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,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C,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC/E,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAQ;IAClC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;IACzC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAClG,gGAAgG;IAChG,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,MAAM,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9G,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -208,9 +208,9 @@ export declare const ImageReq: z.ZodObject<{
|
|
|
208
208
|
}, z.core.$strict>>;
|
|
209
209
|
alpha: z.ZodOptional<z.ZodObject<{
|
|
210
210
|
value: z.ZodEnum<{
|
|
211
|
+
allowed: "allowed";
|
|
211
212
|
required: "required";
|
|
212
213
|
forbidden: "forbidden";
|
|
213
|
-
allowed: "allowed";
|
|
214
214
|
}>;
|
|
215
215
|
level: z.ZodEnum<{
|
|
216
216
|
hard: "hard";
|
|
@@ -797,9 +797,9 @@ export declare const Slot: z.ZodObject<{
|
|
|
797
797
|
}, z.core.$strict>>;
|
|
798
798
|
alpha: z.ZodOptional<z.ZodObject<{
|
|
799
799
|
value: z.ZodEnum<{
|
|
800
|
+
allowed: "allowed";
|
|
800
801
|
required: "required";
|
|
801
802
|
forbidden: "forbidden";
|
|
802
|
-
allowed: "allowed";
|
|
803
803
|
}>;
|
|
804
804
|
level: z.ZodEnum<{
|
|
805
805
|
hard: "hard";
|
|
@@ -1385,9 +1385,9 @@ export declare const ChannelSpec: z.ZodObject<{
|
|
|
1385
1385
|
}, z.core.$strict>>;
|
|
1386
1386
|
alpha: z.ZodOptional<z.ZodObject<{
|
|
1387
1387
|
value: z.ZodEnum<{
|
|
1388
|
+
allowed: "allowed";
|
|
1388
1389
|
required: "required";
|
|
1389
1390
|
forbidden: "forbidden";
|
|
1390
|
-
allowed: "allowed";
|
|
1391
1391
|
}>;
|
|
1392
1392
|
level: z.ZodEnum<{
|
|
1393
1393
|
hard: "hard";
|
|
@@ -1998,9 +1998,9 @@ export declare const SlotOverlay: z.ZodObject<{
|
|
|
1998
1998
|
}, z.core.$strict>>>;
|
|
1999
1999
|
alpha: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2000
2000
|
value: z.ZodEnum<{
|
|
2001
|
+
allowed: "allowed";
|
|
2001
2002
|
required: "required";
|
|
2002
2003
|
forbidden: "forbidden";
|
|
2003
|
-
allowed: "allowed";
|
|
2004
2004
|
}>;
|
|
2005
2005
|
level: z.ZodEnum<{
|
|
2006
2006
|
hard: "hard";
|
|
@@ -2564,9 +2564,9 @@ export declare const PublisherOverlay: z.ZodObject<{
|
|
|
2564
2564
|
}, z.core.$strict>>>;
|
|
2565
2565
|
alpha: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2566
2566
|
value: z.ZodEnum<{
|
|
2567
|
+
allowed: "allowed";
|
|
2567
2568
|
required: "required";
|
|
2568
2569
|
forbidden: "forbidden";
|
|
2569
|
-
allowed: "allowed";
|
|
2570
2570
|
}>;
|
|
2571
2571
|
level: z.ZodEnum<{
|
|
2572
2572
|
hard: "hard";
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The design language of a brand: the decisions a design studio makes on top of the tokens.
|
|
3
|
+
* The tokens say which colours, faces and sizes exist; these primitives say how a page uses
|
|
4
|
+
* them: how dense it is, how sections alternate, how content is separated, how a headline
|
|
5
|
+
* marks its key words, how media sits on the page and how controls behave. The site theme
|
|
6
|
+
* compiles each one into theme-contract variables, so a template follows the brand without a
|
|
7
|
+
* brand fact in its code (SHIP Sites D25, D27).
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
/** The background of one section. `base` is the page; the others set a section apart. */
|
|
11
|
+
export declare const SECTION_TONES: readonly ["base", "tint", "inverse", "brand"];
|
|
12
|
+
export declare const SectionTone: z.ZodEnum<{
|
|
13
|
+
base: "base";
|
|
14
|
+
tint: "tint";
|
|
15
|
+
inverse: "inverse";
|
|
16
|
+
brand: "brand";
|
|
17
|
+
}>;
|
|
18
|
+
export type SectionTone = z.infer<typeof SectionTone>;
|
|
19
|
+
/** How bold the brand looks, in the same 1 to 5 form as `voice.tone`. */
|
|
20
|
+
export declare const VisualTone: z.ZodObject<{
|
|
21
|
+
contrast: z.ZodNumber;
|
|
22
|
+
density: z.ZodNumber;
|
|
23
|
+
ornament: z.ZodNumber;
|
|
24
|
+
motion: z.ZodNumber;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
/** The point of view of the look, for agents and reviewers to judge a page against. */
|
|
27
|
+
export declare const Visual: z.ZodObject<{
|
|
28
|
+
direction: z.ZodString;
|
|
29
|
+
tone: z.ZodObject<{
|
|
30
|
+
contrast: z.ZodNumber;
|
|
31
|
+
density: z.ZodNumber;
|
|
32
|
+
ornament: z.ZodNumber;
|
|
33
|
+
motion: z.ZodNumber;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
avoid: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
/** Space between sections, by density. A brand's `space.section-*` tokens override a step. */
|
|
38
|
+
export declare const DENSITIES: readonly ["compact", "regular", "airy"];
|
|
39
|
+
/** The band tones a texture may sit on. The page itself stays plain, so text on it reads first. */
|
|
40
|
+
export declare const TEXTURE_TONES: readonly ["tint", "inverse", "brand"];
|
|
41
|
+
/**
|
|
42
|
+
* One of the DNA's patterns on some band tones, as a quiet texture under the content. The site
|
|
43
|
+
* draws the pattern's shapes in the band's own text colour, so it suits every band in both modes.
|
|
44
|
+
*/
|
|
45
|
+
export declare const Texture: z.ZodObject<{
|
|
46
|
+
pattern: z.ZodString;
|
|
47
|
+
tones: z.ZodArray<z.ZodEnum<{
|
|
48
|
+
tint: "tint";
|
|
49
|
+
inverse: "inverse";
|
|
50
|
+
brand: "brand";
|
|
51
|
+
}>>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
/**
|
|
54
|
+
* How much of a page the brand's colours cover, after impeccable's four colour strategies:
|
|
55
|
+
* restrained (accents on a neutral page), committed (one brand colour carries the page), full
|
|
56
|
+
* (several brand colours share it) and drenched (the brand colour is the page).
|
|
57
|
+
*/
|
|
58
|
+
export declare const COLOUR_STRATEGIES: readonly ["restrained", "committed", "full", "drenched"];
|
|
59
|
+
export declare const ColourStrategy: z.ZodEnum<{
|
|
60
|
+
restrained: "restrained";
|
|
61
|
+
committed: "committed";
|
|
62
|
+
full: "full";
|
|
63
|
+
drenched: "drenched";
|
|
64
|
+
}>;
|
|
65
|
+
/** The most of a page, in percent of `colorPolicy.usage`, the brand roles cover per strategy. */
|
|
66
|
+
export declare const STRATEGY_MAX_PERCENT: Readonly<Record<(typeof COLOUR_STRATEGIES)[number], number>>;
|
|
67
|
+
/** The roles whose share of a page a colour strategy counts: the brand's colours, not its neutrals. */
|
|
68
|
+
export declare const BRAND_COLOUR_ROLES: readonly ["primary", "accent", "surface-brand"];
|
|
69
|
+
export declare const Composition: z.ZodObject<{
|
|
70
|
+
align: z.ZodEnum<{
|
|
71
|
+
start: "start";
|
|
72
|
+
center: "center";
|
|
73
|
+
}>;
|
|
74
|
+
split: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
75
|
+
measure: z.ZodObject<{
|
|
76
|
+
body: z.ZodNumber;
|
|
77
|
+
lead: z.ZodNumber;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
density: z.ZodEnum<{
|
|
80
|
+
compact: "compact";
|
|
81
|
+
regular: "regular";
|
|
82
|
+
airy: "airy";
|
|
83
|
+
}>;
|
|
84
|
+
tones: z.ZodObject<{
|
|
85
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
86
|
+
base: "base";
|
|
87
|
+
tint: "tint";
|
|
88
|
+
inverse: "inverse";
|
|
89
|
+
brand: "brand";
|
|
90
|
+
}>>;
|
|
91
|
+
maxInverse: z.ZodNumber;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
texture: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
pattern: z.ZodString;
|
|
95
|
+
tones: z.ZodArray<z.ZodEnum<{
|
|
96
|
+
tint: "tint";
|
|
97
|
+
inverse: "inverse";
|
|
98
|
+
brand: "brand";
|
|
99
|
+
}>>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
/**
|
|
103
|
+
* How the brand separates things. `card` boxes an item with a fill, a border and a radius;
|
|
104
|
+
* `rule` sets items apart with a line; `plain` uses space alone. Media: `frame` puts a picture
|
|
105
|
+
* in a box, `plain` shows it with the media radius, `bleed` also lets it run to the page edge.
|
|
106
|
+
*/
|
|
107
|
+
export declare const Containers: z.ZodObject<{
|
|
108
|
+
list: z.ZodEnum<{
|
|
109
|
+
card: "card";
|
|
110
|
+
rule: "rule";
|
|
111
|
+
plain: "plain";
|
|
112
|
+
}>;
|
|
113
|
+
media: z.ZodEnum<{
|
|
114
|
+
plain: "plain";
|
|
115
|
+
frame: "frame";
|
|
116
|
+
bleed: "bleed";
|
|
117
|
+
}>;
|
|
118
|
+
quote: z.ZodEnum<{
|
|
119
|
+
card: "card";
|
|
120
|
+
rule: "rule";
|
|
121
|
+
plain: "plain";
|
|
122
|
+
}>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
/** How a headline marks its key words, and the colour role it marks them with. */
|
|
125
|
+
export declare const Emphasis: z.ZodObject<{
|
|
126
|
+
style: z.ZodEnum<{
|
|
127
|
+
italic: "italic";
|
|
128
|
+
none: "none";
|
|
129
|
+
colour: "colour";
|
|
130
|
+
marker: "marker";
|
|
131
|
+
underline: "underline";
|
|
132
|
+
}>;
|
|
133
|
+
role: z.ZodEnum<{
|
|
134
|
+
success: "success";
|
|
135
|
+
primary: "primary";
|
|
136
|
+
"on-primary": "on-primary";
|
|
137
|
+
secondary: "secondary";
|
|
138
|
+
"on-secondary": "on-secondary";
|
|
139
|
+
accent: "accent";
|
|
140
|
+
"on-accent": "on-accent";
|
|
141
|
+
surface: "surface";
|
|
142
|
+
"surface-alt": "surface-alt";
|
|
143
|
+
"on-surface": "on-surface";
|
|
144
|
+
"surface-tint": "surface-tint";
|
|
145
|
+
"surface-inverse": "surface-inverse";
|
|
146
|
+
"on-surface-inverse": "on-surface-inverse";
|
|
147
|
+
"surface-brand": "surface-brand";
|
|
148
|
+
"on-surface-brand": "on-surface-brand";
|
|
149
|
+
muted: "muted";
|
|
150
|
+
border: "border";
|
|
151
|
+
warning: "warning";
|
|
152
|
+
danger: "danger";
|
|
153
|
+
}>;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
/** The places the accent colour may appear. Anything else stays in the brand's other roles. */
|
|
156
|
+
export declare const ACCENT_USES: readonly ["marker", "rule", "numerals", "cta-inverse", "badge"];
|
|
157
|
+
export declare const AccentPolicy: z.ZodObject<{
|
|
158
|
+
uses: z.ZodArray<z.ZodEnum<{
|
|
159
|
+
rule: "rule";
|
|
160
|
+
marker: "marker";
|
|
161
|
+
numerals: "numerals";
|
|
162
|
+
"cta-inverse": "cta-inverse";
|
|
163
|
+
badge: "badge";
|
|
164
|
+
}>>;
|
|
165
|
+
maxPerScreen: z.ZodNumber;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
/** Buttons and other controls: their heights, the focus ring and the hover change. */
|
|
168
|
+
export declare const Controls: z.ZodObject<{
|
|
169
|
+
size: z.ZodObject<{
|
|
170
|
+
sm: z.ZodObject<{
|
|
171
|
+
value: z.ZodNumber;
|
|
172
|
+
unit: z.ZodEnum<{
|
|
173
|
+
px: "px";
|
|
174
|
+
rem: "rem";
|
|
175
|
+
}>;
|
|
176
|
+
}, z.core.$strict>;
|
|
177
|
+
md: z.ZodObject<{
|
|
178
|
+
value: z.ZodNumber;
|
|
179
|
+
unit: z.ZodEnum<{
|
|
180
|
+
px: "px";
|
|
181
|
+
rem: "rem";
|
|
182
|
+
}>;
|
|
183
|
+
}, z.core.$strict>;
|
|
184
|
+
lg: z.ZodObject<{
|
|
185
|
+
value: z.ZodNumber;
|
|
186
|
+
unit: z.ZodEnum<{
|
|
187
|
+
px: "px";
|
|
188
|
+
rem: "rem";
|
|
189
|
+
}>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
focus: z.ZodObject<{
|
|
193
|
+
role: z.ZodEnum<{
|
|
194
|
+
success: "success";
|
|
195
|
+
primary: "primary";
|
|
196
|
+
"on-primary": "on-primary";
|
|
197
|
+
secondary: "secondary";
|
|
198
|
+
"on-secondary": "on-secondary";
|
|
199
|
+
accent: "accent";
|
|
200
|
+
"on-accent": "on-accent";
|
|
201
|
+
surface: "surface";
|
|
202
|
+
"surface-alt": "surface-alt";
|
|
203
|
+
"on-surface": "on-surface";
|
|
204
|
+
"surface-tint": "surface-tint";
|
|
205
|
+
"surface-inverse": "surface-inverse";
|
|
206
|
+
"on-surface-inverse": "on-surface-inverse";
|
|
207
|
+
"surface-brand": "surface-brand";
|
|
208
|
+
"on-surface-brand": "on-surface-brand";
|
|
209
|
+
muted: "muted";
|
|
210
|
+
border: "border";
|
|
211
|
+
warning: "warning";
|
|
212
|
+
danger: "danger";
|
|
213
|
+
}>;
|
|
214
|
+
width: z.ZodObject<{
|
|
215
|
+
value: z.ZodNumber;
|
|
216
|
+
unit: z.ZodEnum<{
|
|
217
|
+
px: "px";
|
|
218
|
+
rem: "rem";
|
|
219
|
+
}>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
offset: z.ZodObject<{
|
|
222
|
+
value: z.ZodNumber;
|
|
223
|
+
unit: z.ZodEnum<{
|
|
224
|
+
px: "px";
|
|
225
|
+
rem: "rem";
|
|
226
|
+
}>;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
hover: z.ZodObject<{
|
|
230
|
+
mix: z.ZodNumber;
|
|
231
|
+
}, z.core.$strict>;
|
|
232
|
+
}, z.core.$strict>;
|
|
233
|
+
/** Typographic details: the figures and the quote marks. */
|
|
234
|
+
export declare const Details: z.ZodObject<{
|
|
235
|
+
numerals: z.ZodEnum<{
|
|
236
|
+
tabular: "tabular";
|
|
237
|
+
proportional: "proportional";
|
|
238
|
+
oldstyle: "oldstyle";
|
|
239
|
+
}>;
|
|
240
|
+
hangingPunctuation: z.ZodBoolean;
|
|
241
|
+
}, z.core.$strict>;
|
|
242
|
+
/** How media looks on a site: the shapes a picture may take and its colour treatment. */
|
|
243
|
+
export declare const MediaTreatment: z.ZodObject<{
|
|
244
|
+
aspects: z.ZodArray<z.ZodString>;
|
|
245
|
+
duotone: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
shadow: z.ZodString;
|
|
247
|
+
highlight: z.ZodString;
|
|
248
|
+
}, z.core.$strict>>;
|
|
249
|
+
radius: z.ZodString;
|
|
250
|
+
}, z.core.$strict>;
|
|
251
|
+
/** The reveal of the opening section when a page loads. `none` keeps every page still. */
|
|
252
|
+
export declare const PAGE_REVEALS: readonly ["none", "fade", "rise"];
|
|
253
|
+
export declare const PageReveal: z.ZodEnum<{
|
|
254
|
+
none: "none";
|
|
255
|
+
fade: "fade";
|
|
256
|
+
rise: "rise";
|
|
257
|
+
}>;
|
|
258
|
+
//# sourceMappingURL=design.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../src/schema/design.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yFAAyF;AACzF,eAAO,MAAM,aAAa,+CAAgD,CAAC;AAC3E,eAAO,MAAM,WAAW;;;;;EAAwB,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,yEAAyE;AACzE,eAAO,MAAM,UAAU;;;;;kBASrB,CAAC;AAEH,uFAAuF;AACvF,eAAO,MAAM,MAAM;;;;;;;;;kBAMjB,CAAC;AAEH,8FAA8F;AAC9F,eAAO,MAAM,SAAS,yCAA0C,CAAC;AAEjE,mGAAmG;AACnG,eAAO,MAAM,aAAa,uCAAwC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;kBAIlB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,0DAA2D,CAAC;AAC1F,eAAO,MAAM,cAAc;;;;;EAA4B,CAAC;AAExD,iGAAiG;AACjG,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAK7F,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,kBAAkB,iDAAkD,CAAC;AAElF,eAAO,MAAM,WAAW;;;;;;;;;;;;;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