@fifthbell/brokaw 0.1.68 → 0.1.70
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/README.md +1 -1
- package/dist/cronkite-manifest.d.ts +205 -69
- package/dist/cronkite-manifest.js +288 -111
- package/dist/cronkite-manifest.json +1024 -125
- package/dist/instagram-image-template.d.ts +0 -1
- package/dist/instagram-image-template.js +0 -4
- package/dist/layouts.d.ts +1 -1
- package/dist/live-program-page/index.html +2 -2
- package/dist/live-program-page/live-program-manifest.json +6 -6
- package/dist/live-program-page/live-program.v0.1.70.css +3 -0
- package/dist/manifest-validation.d.ts +2 -2
- package/dist/manifest-validation.js +12 -16
- package/dist/outlet-config.d.ts +0 -1
- package/dist/outlet-config.js +0 -1
- package/dist/renderer.browser.js +12 -0
- package/dist/renderer.core.js +42 -258
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +1 -1
- package/dist/schemas/canonical-document.schema.json +30 -10
- package/dist/schemas/cronkite-manifest.schema.json +84 -450
- package/dist/schemas/social-image-input.schema.json +14 -0
- package/dist/search-copy.d.ts +65 -0
- package/dist/search-copy.js +65 -0
- package/dist/types/canonical-document-schema.generated.d.ts +48 -4
- package/dist/types/canonical-document-schema.generated.js +48 -4
- package/dist/types/canonical-document.generated.d.ts +14 -0
- package/dist/types/cronkite-manifest.generated.d.ts +101 -297
- package/package.json +2 -2
- package/src/partial-deps.json +221 -50
- package/src/styles/compiled.css +1 -1
- package/src/templates/partials/blocks/tiktok.hbs +1 -1
- package/src/templates/partials/blocks/x.hbs +4 -4
- package/src/templates/partials/components/article-main.hbs +1 -1
- package/src/templates/partials/components/body-block.hbs +31 -0
- package/src/templates/partials/components/breaking-news/live-updates-column.hbs +2 -2
- package/src/templates/partials/components/breaking-news.hbs +6 -8
- package/src/templates/partials/components/editorial-hero.hbs +2 -2
- package/src/templates/partials/components/home/landing.hbs +1 -1
- package/src/templates/partials/components/home/main.hbs +4 -1
- package/src/templates/partials/components/live-story/main.hbs +8 -18
- package/src/templates/partials/components/not-found/main.hbs +4 -4
- package/src/templates/partials/components/search/main.hbs +25 -15
- package/src/templates/partials/components/snack-meta-image-row.hbs +21 -0
- package/src/templates/partials/components/snack-meta-inline.hbs +43 -0
- package/src/templates/partials/components/snack-top-story.hbs +1 -0
- package/src/templates/partials/components/snack.hbs +3 -61
- package/src/templates/partials/components/spotlight-hero-slides.hbs +1 -0
- package/src/templates/partials/components/spotlight-hero.hbs +2 -2
- package/src/templates/partials/components/standalone-main.hbs +1 -1
- package/src/templates/partials/shell/doc-start-404.hbs +2 -4
- package/src/templates/partials/shell/doc-start-standard.hbs +9 -11
- package/src/templates/partials/shell/rum-loader.hbs +77 -0
- package/src/templates/templates/instagram-image.hbs +0 -2
- package/dist/live-program-page/live-program.v0.1.68.css +0 -3
- /package/dist/live-program-page/{live-program.v0.1.68.js → live-program.v0.1.70.js} +0 -0
|
@@ -1,339 +1,143 @@
|
|
|
1
1
|
/** Generated from the normative JSON Schema. Do not edit by hand. */
|
|
2
2
|
/**
|
|
3
|
-
* This interface was referenced by `
|
|
4
|
-
* via the `definition` "
|
|
3
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
4
|
+
* via the `definition` "safePath".
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
export type LanguageTag = string;
|
|
14
|
-
/**
|
|
15
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
16
|
-
* via the `definition` "safePrefix".
|
|
17
|
-
*/
|
|
18
|
-
export type SafePrefix = string;
|
|
6
|
+
export type SafePath = string;
|
|
7
|
+
export interface CronkiteDeclarativeTemplateManifest {
|
|
8
|
+
package: string;
|
|
9
|
+
version: string;
|
|
10
|
+
templateRendering: TemplateRendering;
|
|
11
|
+
}
|
|
19
12
|
/**
|
|
20
|
-
* This interface was referenced by `
|
|
21
|
-
* via the `definition` "
|
|
13
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
14
|
+
* via the `definition` "templateRendering".
|
|
22
15
|
*/
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Required public route, optionally with one {language} token. No omission default.
|
|
30
|
-
*/
|
|
31
|
-
route: string;
|
|
32
|
-
/**
|
|
33
|
-
* Required safe relative object key, optionally with one {language} token. No omission default.
|
|
34
|
-
*/
|
|
35
|
-
key: string;
|
|
36
|
-
/**
|
|
37
|
-
* Required Cache-Control field value. No omission default.
|
|
38
|
-
*/
|
|
39
|
-
cacheControl: string;
|
|
40
|
-
/**
|
|
41
|
-
* Required switch controlling language expansion. No omission default.
|
|
42
|
-
*/
|
|
43
|
-
perLanguage: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Required language-to-copy map. No omission default.
|
|
46
|
-
*/
|
|
47
|
-
copy: {
|
|
48
|
-
[k: string]: Copy;
|
|
16
|
+
export interface TemplateRendering {
|
|
17
|
+
contract: "cronkite.templates";
|
|
18
|
+
contractVersion: 1;
|
|
19
|
+
partials: {
|
|
20
|
+
[k: string]: TemplateReference;
|
|
49
21
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
width?: never;
|
|
63
|
-
height?: never;
|
|
64
|
-
[k: string]: unknown;
|
|
65
|
-
} | {
|
|
66
|
-
engine?: "handlebars";
|
|
67
|
-
outputMode: "files";
|
|
68
|
-
export: unknown;
|
|
69
|
-
entry?: never;
|
|
70
|
-
compositionId?: never;
|
|
71
|
-
contentType?: never;
|
|
72
|
-
width?: never;
|
|
73
|
-
height?: never;
|
|
74
|
-
key?: never;
|
|
75
|
-
[k: string]: unknown;
|
|
76
|
-
} | {
|
|
77
|
-
engine?: "html-raster";
|
|
78
|
-
outputMode?: "single";
|
|
79
|
-
contentType: string;
|
|
80
|
-
export: unknown;
|
|
81
|
-
width: unknown;
|
|
82
|
-
height: unknown;
|
|
83
|
-
entry?: never;
|
|
84
|
-
compositionId?: never;
|
|
85
|
-
[k: string]: unknown;
|
|
86
|
-
} | {
|
|
87
|
-
engine?: "remotion";
|
|
88
|
-
outputMode?: "single";
|
|
89
|
-
contentType: string;
|
|
90
|
-
entry: unknown;
|
|
91
|
-
compositionId: unknown;
|
|
92
|
-
export?: never;
|
|
93
|
-
width?: never;
|
|
94
|
-
height?: never;
|
|
95
|
-
[k: string]: unknown;
|
|
96
|
-
}) & {
|
|
97
|
-
/**
|
|
98
|
-
* Required bounded CPS rendering engine. No omission default.
|
|
99
|
-
*/
|
|
100
|
-
engine: "handlebars" | "html-raster" | "remotion";
|
|
101
|
-
/**
|
|
102
|
-
* Function export required by handlebars and html-raster. No omission default.
|
|
103
|
-
*/
|
|
104
|
-
export?: string;
|
|
105
|
-
/**
|
|
106
|
-
* Packed package entry required by remotion. No omission default.
|
|
107
|
-
*/
|
|
108
|
-
entry?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Composition selector required by remotion. No omission default.
|
|
111
|
-
*/
|
|
112
|
-
compositionId?: string;
|
|
113
|
-
/**
|
|
114
|
-
* Optional result mode; files uses the FileEntry array ABI.
|
|
115
|
-
*/
|
|
116
|
-
outputMode?: "single" | "files";
|
|
117
|
-
/**
|
|
118
|
-
* Optional request-derived or CLS-version-derived lifecycle.
|
|
119
|
-
*/
|
|
120
|
-
lifecycle?: "request" | "basement";
|
|
121
|
-
/**
|
|
122
|
-
* Media type required for a single output and forbidden for a file set.
|
|
123
|
-
*/
|
|
124
|
-
contentType?: string;
|
|
125
|
-
/**
|
|
126
|
-
* Positive pixel width required by html-raster.
|
|
127
|
-
*/
|
|
128
|
-
width?: number;
|
|
129
|
-
/**
|
|
130
|
-
* Positive pixel height required by html-raster.
|
|
131
|
-
*/
|
|
132
|
-
height?: number;
|
|
133
|
-
/**
|
|
134
|
-
* Output key required only for a basement single output.
|
|
135
|
-
*/
|
|
136
|
-
key?: string;
|
|
137
|
-
/**
|
|
138
|
-
* Optional packed draft-2020-12 input-schema path.
|
|
139
|
-
*/
|
|
140
|
-
inputSchema?: string;
|
|
141
|
-
resources?: Resources;
|
|
142
|
-
contract?: OpaqueContract;
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
146
|
-
* via the `definition` "resource".
|
|
147
|
-
*/
|
|
148
|
-
export type Resource = {
|
|
149
|
-
/**
|
|
150
|
-
* Required CMS-owned resource key, optionally with one {language} token.
|
|
151
|
-
*/
|
|
152
|
-
key: string;
|
|
153
|
-
/**
|
|
154
|
-
* Required packed draft-2020-12 JSON Schema path.
|
|
155
|
-
*/
|
|
156
|
-
schema: string;
|
|
157
|
-
/**
|
|
158
|
-
* Required resource media type.
|
|
159
|
-
*/
|
|
160
|
-
contentType: string;
|
|
161
|
-
/**
|
|
162
|
-
* Optional language-expansion switch.
|
|
163
|
-
*/
|
|
164
|
-
perLanguage?: boolean;
|
|
165
|
-
};
|
|
166
|
-
/**
|
|
167
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
168
|
-
* via the `definition` "safeKey".
|
|
169
|
-
*/
|
|
170
|
-
export type SafeKey = string;
|
|
171
|
-
/**
|
|
172
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
173
|
-
* via the `definition` "javascriptIdentifier".
|
|
174
|
-
*/
|
|
175
|
-
export type JavascriptIdentifier = string;
|
|
176
|
-
/**
|
|
177
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
178
|
-
* via the `definition` "safeKeyWithLanguage".
|
|
179
|
-
*/
|
|
180
|
-
export type SafeKeyWithLanguage = string;
|
|
181
|
-
/**
|
|
182
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
183
|
-
* via the `definition` "siteRouteWithLanguage".
|
|
184
|
-
*/
|
|
185
|
-
export type SiteRouteWithLanguage = string;
|
|
186
|
-
/**
|
|
187
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
188
|
-
* via the `definition` "packageEntry".
|
|
189
|
-
*/
|
|
190
|
-
export type PackageEntry = string;
|
|
22
|
+
helperConfig: HelperConfig;
|
|
23
|
+
embedRegistry: {
|
|
24
|
+
[k: string]: Embed;
|
|
25
|
+
};
|
|
26
|
+
renderables: {
|
|
27
|
+
[k: string]: Renderable;
|
|
28
|
+
};
|
|
29
|
+
staticAssets: {
|
|
30
|
+
[k: string]: StaticAsset;
|
|
31
|
+
};
|
|
32
|
+
systemPages: SystemPage[];
|
|
33
|
+
}
|
|
191
34
|
/**
|
|
192
|
-
* This interface was referenced by `
|
|
193
|
-
* via the `definition` "
|
|
35
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
36
|
+
* via the `definition` "templateReference".
|
|
37
|
+
*
|
|
38
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
39
|
+
* via the `definition` "partial".
|
|
194
40
|
*/
|
|
195
|
-
export
|
|
41
|
+
export interface TemplateReference {
|
|
42
|
+
entry: SafePath;
|
|
43
|
+
partials: string[];
|
|
44
|
+
}
|
|
196
45
|
/**
|
|
197
|
-
*
|
|
46
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
47
|
+
* via the `definition` "helperConfig".
|
|
198
48
|
*/
|
|
199
|
-
export interface
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
*/
|
|
203
|
-
contract: "cronkite.cls";
|
|
49
|
+
export interface HelperConfig {
|
|
50
|
+
siteName: string;
|
|
51
|
+
defaultLanguage: string;
|
|
204
52
|
/**
|
|
205
|
-
* Required manifest contract version. No omission default.
|
|
206
|
-
*/
|
|
207
|
-
contractVersion: 1;
|
|
208
|
-
/**
|
|
209
|
-
* Required npm package name without a version. No omission default.
|
|
210
|
-
*/
|
|
211
|
-
package: string;
|
|
212
|
-
/**
|
|
213
|
-
* Required exact SemVer package version. No omission default.
|
|
214
|
-
*/
|
|
215
|
-
version: string;
|
|
216
|
-
/**
|
|
217
|
-
* Required authoritative set of page layouts. No omission default.
|
|
218
|
-
*
|
|
219
|
-
* @minItems 1
|
|
220
|
-
*/
|
|
221
|
-
layouts: [Name, ...Name[]];
|
|
222
|
-
/**
|
|
223
|
-
* Required supported BCP 47 language tags. No omission default.
|
|
224
|
-
*
|
|
225
53
|
* @minItems 1
|
|
226
54
|
*/
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
[k: string]:
|
|
233
|
-
};
|
|
234
|
-
routing?: Routing;
|
|
235
|
-
/**
|
|
236
|
-
* Optional system-generated pages. Expanded route/key uniqueness is a semantic validation rule.
|
|
237
|
-
*/
|
|
238
|
-
systemPages?: SystemPage[];
|
|
239
|
-
/**
|
|
240
|
-
* Optional explicit page or asset renderables in the same namespace as layouts.
|
|
241
|
-
*/
|
|
242
|
-
renderables?: {
|
|
243
|
-
[k: string]: Renderable;
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Optional package file capabilities recognized by contract version 1.
|
|
247
|
-
*/
|
|
248
|
-
capabilities?: {
|
|
249
|
-
fonts?: Capability;
|
|
250
|
-
assets?: Capability;
|
|
55
|
+
supportedLanguages: [string, ...string[]];
|
|
56
|
+
prefixDefaultLocale: boolean;
|
|
57
|
+
dateLocale: string;
|
|
58
|
+
timeZone: string;
|
|
59
|
+
homepageTitles: {
|
|
60
|
+
[k: string]: string;
|
|
251
61
|
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
*/
|
|
255
|
-
writeOrdering?: {
|
|
256
|
-
[k: string]: WriteOrderingRule;
|
|
62
|
+
layoutTitleFallbacks: {
|
|
63
|
+
[k: string]: string;
|
|
257
64
|
};
|
|
65
|
+
titleSeparator: string;
|
|
66
|
+
defaultSocialImageUrl: string | null;
|
|
258
67
|
}
|
|
259
68
|
/**
|
|
260
|
-
*
|
|
69
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
70
|
+
* via the `definition` "embed".
|
|
261
71
|
*/
|
|
262
|
-
export interface
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Optional safe relative root-route object key.
|
|
269
|
-
*/
|
|
270
|
-
rootKey?: string;
|
|
72
|
+
export interface Embed {
|
|
73
|
+
urlTemplate: string;
|
|
74
|
+
parameters: {
|
|
75
|
+
[k: string]: EmbedParameter;
|
|
76
|
+
};
|
|
271
77
|
}
|
|
272
78
|
/**
|
|
273
|
-
* This interface was referenced by `
|
|
274
|
-
* via the `definition` "
|
|
79
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
80
|
+
* via the `definition` "embedParameter".
|
|
275
81
|
*/
|
|
276
|
-
export interface
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
*/
|
|
280
|
-
title: string;
|
|
82
|
+
export interface EmbedParameter {
|
|
83
|
+
type: "string" | "integer";
|
|
84
|
+
pattern?: string;
|
|
281
85
|
/**
|
|
282
|
-
*
|
|
86
|
+
* @minItems 1
|
|
283
87
|
*/
|
|
284
|
-
|
|
88
|
+
enum?: [unknown, ...unknown[]];
|
|
89
|
+
default?: string | number;
|
|
90
|
+
minimum?: number;
|
|
91
|
+
maximum?: number;
|
|
285
92
|
}
|
|
286
93
|
/**
|
|
287
|
-
* This interface was referenced by `
|
|
288
|
-
* via the `definition` "
|
|
94
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
95
|
+
* via the `definition` "renderable".
|
|
289
96
|
*/
|
|
290
|
-
export interface
|
|
291
|
-
|
|
97
|
+
export interface Renderable {
|
|
98
|
+
template: TemplateReference;
|
|
99
|
+
inputSchema: SafePath;
|
|
100
|
+
contentType: string;
|
|
101
|
+
raster?: Raster;
|
|
292
102
|
}
|
|
293
103
|
/**
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
* This interface was referenced by `CronkiteCLSManifest`'s JSON-Schema
|
|
297
|
-
* via the `definition` "opaqueContract".
|
|
104
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
105
|
+
* via the `definition` "raster".
|
|
298
106
|
*/
|
|
299
|
-
export interface
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
107
|
+
export interface Raster {
|
|
108
|
+
format: "png" | "jpeg" | "webp";
|
|
109
|
+
width: number;
|
|
110
|
+
height: number;
|
|
303
111
|
}
|
|
304
112
|
/**
|
|
305
|
-
* This interface was referenced by `
|
|
306
|
-
* via the `definition` "
|
|
113
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
114
|
+
* via the `definition` "staticAsset".
|
|
307
115
|
*/
|
|
308
|
-
export interface
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
export: string;
|
|
116
|
+
export interface StaticAsset {
|
|
117
|
+
source: SafePath;
|
|
118
|
+
contentType: string;
|
|
119
|
+
cacheControl: string;
|
|
313
120
|
}
|
|
314
121
|
/**
|
|
315
|
-
* This interface was referenced by `
|
|
316
|
-
* via the `definition` "
|
|
122
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
123
|
+
* via the `definition` "systemPage".
|
|
317
124
|
*/
|
|
318
|
-
export interface
|
|
125
|
+
export interface SystemPage {
|
|
126
|
+
renderable: string;
|
|
127
|
+
contentType: string;
|
|
128
|
+
cacheControl: string;
|
|
319
129
|
/**
|
|
320
|
-
* Required ordered final-write keys. No omission default.
|
|
321
|
-
*
|
|
322
130
|
* @minItems 1
|
|
323
131
|
*/
|
|
324
|
-
|
|
132
|
+
variants: [SystemVariant, ...SystemVariant[]];
|
|
325
133
|
}
|
|
326
134
|
/**
|
|
327
|
-
* This interface was referenced by `
|
|
328
|
-
* via the `definition` "
|
|
135
|
+
* This interface was referenced by `CronkiteDeclarativeTemplateManifest`'s JSON-Schema
|
|
136
|
+
* via the `definition` "systemVariant".
|
|
329
137
|
*/
|
|
330
|
-
export interface
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Optional safe relative root-route object key.
|
|
337
|
-
*/
|
|
338
|
-
rootKey?: string;
|
|
138
|
+
export interface SystemVariant {
|
|
139
|
+
key: SafePath;
|
|
140
|
+
document: {
|
|
141
|
+
[k: string]: unknown;
|
|
142
|
+
};
|
|
339
143
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fifthbell/brokaw",
|
|
3
3
|
"description": "Server-side Handlebars renderer and templates for fifthbell pages.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.70",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "fifthbell",
|
|
7
7
|
"repository": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"test": "npm run test:unit",
|
|
62
62
|
"pretest:unit": "npm run generate:contract-types && npm run build:css && npm run build:live-program",
|
|
63
63
|
"test:unit": "vitest run --project unit",
|
|
64
|
-
"verify:packed-
|
|
64
|
+
"verify:packed-contract": "npm run build && node scripts/verify-packed-contract.mjs"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"ajv": "^8.20.0",
|