adjacent-core 0.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.
@@ -0,0 +1,124 @@
1
+ function compact(value) {
2
+ return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
3
+ }
4
+ function resolveImages(images) {
5
+ return images?.map((image) => compact({
6
+ purpose: image.purpose?.join(" "),
7
+ sizes: image.sizes,
8
+ src: image.src,
9
+ type: image.type,
10
+ }));
11
+ }
12
+ function resolveScreenshots(screenshots) {
13
+ return screenshots?.map((screenshot) => compact({
14
+ form_factor: screenshot.formFactor,
15
+ label: screenshot.label,
16
+ platform: screenshot.platform,
17
+ sizes: screenshot.sizes,
18
+ src: screenshot.src,
19
+ type: screenshot.type,
20
+ }));
21
+ }
22
+ function resolveWidgets(widgets) {
23
+ return widgets?.map((widget) => compact({
24
+ backgrounds: resolveImages(widget.backgrounds),
25
+ data: widget.data,
26
+ description: widget.description,
27
+ icons: resolveImages(widget.icons),
28
+ ms_ac_template: widget.msAcTemplate,
29
+ multiple: widget.multiple,
30
+ name: widget.name,
31
+ screenshots: resolveScreenshots(widget.screenshots),
32
+ short_name: widget.shortName,
33
+ tag: widget.tag,
34
+ type: widget.type,
35
+ update: widget.update,
36
+ }));
37
+ }
38
+ function resolveLocalized(localized, key) {
39
+ if (!localized)
40
+ return undefined;
41
+ const entries = Object.entries(localized).flatMap(([locale, value]) => {
42
+ const text = value[key];
43
+ return text ? [[locale, text]] : [];
44
+ });
45
+ return entries.length > 0 ? Object.fromEntries(entries) : undefined;
46
+ }
47
+ /**
48
+ * The key the Android wrapper settings travel under. Unknown members are
49
+ * ignored by browsers, so the manifest stays valid while the CLI can read
50
+ * values it must never import from `app.config.ts`.
51
+ */
52
+ export const ANDROID_MANIFEST_KEY = "adjacent_android";
53
+ function resolveAndroid(config) {
54
+ const wrapper = {
55
+ ...config.android,
56
+ // The browser's dark chrome colour is the wrapper's too unless the wrapper
57
+ // was given one, so declaring it twice is not required to get both.
58
+ themeColorDark: config.android?.themeColorDark ?? config.appearance?.themeColorDark,
59
+ };
60
+ const entries = Object.entries(wrapper).filter(([, value]) => value !== undefined);
61
+ return entries.length > 0 ? Object.fromEntries(entries) : undefined;
62
+ }
63
+ export function resolveManifest(config) {
64
+ const advanced = config.manifest;
65
+ const icons = resolveImages(advanced?.icons) ??
66
+ [
67
+ { purpose: "any", sizes: "192x192", src: "/web-app-manifest-192x192.png", type: "image/png" },
68
+ { purpose: "any", sizes: "512x512", src: "/web-app-manifest-512x512.png", type: "image/png" },
69
+ { purpose: "maskable", sizes: "192x192", src: "/web-app-manifest-maskable-192x192.png", type: "image/png" },
70
+ { purpose: "maskable", sizes: "512x512", src: "/web-app-manifest-maskable-512x512.png", type: "image/png" },
71
+ ];
72
+ return compact({
73
+ [ANDROID_MANIFEST_KEY]: resolveAndroid(config),
74
+ background_color: config.appearance?.backgroundColor ?? "#ffffff",
75
+ categories: advanced?.categories,
76
+ description: config.app.description,
77
+ description_localized: resolveLocalized(advanced?.localized, "description"),
78
+ display: config.appearance?.display ?? "standalone",
79
+ dir: config.app.dir,
80
+ display_override: advanced?.displayOverride,
81
+ edge_side_panel: advanced?.edgeSidePanel
82
+ ? compact({ preferred_width: advanced.edgeSidePanel.preferredWidth })
83
+ : undefined,
84
+ file_handlers: advanced?.fileHandlers?.map((handler) => compact({
85
+ accept: handler.accept,
86
+ action: handler.action,
87
+ icons: resolveImages(handler.icons),
88
+ launch_type: handler.launchType,
89
+ })),
90
+ iarc_rating_id: advanced?.iarcRatingId,
91
+ icons,
92
+ id: config.app.id ?? config.navigation?.startUrl ?? "/",
93
+ lang: config.app.lang,
94
+ launch_handler: advanced?.launchHandler
95
+ ? { client_mode: advanced.launchHandler.clientMode }
96
+ : undefined,
97
+ name: config.app.name,
98
+ name_localized: resolveLocalized(advanced?.localized, "name"),
99
+ note_taking: advanced?.noteTaking
100
+ ? { new_note_url: advanced.noteTaking.newNoteUrl }
101
+ : undefined,
102
+ orientation: config.appearance?.orientation,
103
+ prefer_related_applications: advanced?.preferRelatedApplications,
104
+ protocol_handlers: advanced?.protocolHandlers,
105
+ related_applications: advanced?.relatedApplications,
106
+ scope: config.navigation?.scope ?? "/",
107
+ scope_extensions: advanced?.scopeExtensions,
108
+ screenshots: resolveScreenshots(advanced?.screenshots),
109
+ share_target: advanced?.shareTarget,
110
+ short_name: config.app.shortName ?? config.app.name,
111
+ short_name_localized: resolveLocalized(advanced?.localized, "shortName"),
112
+ shortcuts: advanced?.shortcuts?.map((shortcut) => compact({
113
+ description: shortcut.description,
114
+ icons: resolveImages(shortcut.icons),
115
+ name: shortcut.name,
116
+ short_name: shortcut.shortName,
117
+ url: shortcut.url,
118
+ })),
119
+ start_url: config.navigation?.startUrl ?? "/",
120
+ theme_color: config.appearance?.themeColor ?? "#ffffff",
121
+ widgets: resolveWidgets(advanced?.widgets),
122
+ });
123
+ }
124
+ //# sourceMappingURL=resolve-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-manifest.js","sourceRoot":"","sources":["../../src/manifest/resolve-manifest.ts"],"names":[],"mappings":"AAkBA,SAAS,OAAO,CAAoC,KAAQ;IAC1D,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAC5D,CAAC;AACT,CAAC;AAED,SAAS,aAAa,CACpB,MAA4C;IAE5C,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAC3B,OAAO,CAAC;QACN,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC;QACjC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC,CACH,CAAC;AACJ,CA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C,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,UAAU,EAAE,QAAQ,CAAC,SAAS;YAC9B,GAAG,EAAE,QAAQ,CAAC,GAAG;SAClB,CAAC,CACH;QACD,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,IAAI,GAAG;QAC7C,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,IAAI,SAAS;QACvD,OAAO,EAAE,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC3C,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,355 @@
1
+ import { z } from "zod";
2
+ declare const ImageResourceSchema: z.ZodObject<{
3
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
4
+ any: "any";
5
+ maskable: "maskable";
6
+ monochrome: "monochrome";
7
+ }>>>;
8
+ sizes: z.ZodOptional<z.ZodString>;
9
+ src: z.ZodString;
10
+ type: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strict>;
12
+ declare const ScreenshotSchema: z.ZodObject<{
13
+ type: z.ZodOptional<z.ZodString>;
14
+ sizes: z.ZodOptional<z.ZodString>;
15
+ src: z.ZodString;
16
+ formFactor: z.ZodOptional<z.ZodEnum<{
17
+ narrow: "narrow";
18
+ wide: "wide";
19
+ }>>;
20
+ label: z.ZodOptional<z.ZodString>;
21
+ platform: z.ZodOptional<z.ZodEnum<{
22
+ android: "android";
23
+ chrome_web_store: "chrome_web_store";
24
+ chromeos: "chromeos";
25
+ ios: "ios";
26
+ ipados: "ipados";
27
+ itunes: "itunes";
28
+ kaios: "kaios";
29
+ macos: "macos";
30
+ "microsoft-inbox": "microsoft-inbox";
31
+ "microsoft-store": "microsoft-store";
32
+ play: "play";
33
+ windows: "windows";
34
+ xbox: "xbox";
35
+ }>>;
36
+ }, z.core.$strict>;
37
+ /**
38
+ * A widget for a host that has a widget surface, which today means the Windows
39
+ * Widgets Board. Every member is required because a widget missing any of them
40
+ * is installed and then never renders, which is worth catching at build rather
41
+ * than discovering on a dashboard.
42
+ */
43
+ declare const WidgetSchema: z.ZodObject<{
44
+ backgrounds: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
46
+ any: "any";
47
+ maskable: "maskable";
48
+ monochrome: "monochrome";
49
+ }>>>;
50
+ sizes: z.ZodOptional<z.ZodString>;
51
+ src: z.ZodString;
52
+ type: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strict>>>;
54
+ data: z.ZodString;
55
+ description: z.ZodString;
56
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
58
+ any: "any";
59
+ maskable: "maskable";
60
+ monochrome: "monochrome";
61
+ }>>>;
62
+ sizes: z.ZodOptional<z.ZodString>;
63
+ src: z.ZodString;
64
+ type: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strict>>>;
66
+ msAcTemplate: z.ZodString;
67
+ multiple: z.ZodOptional<z.ZodBoolean>;
68
+ name: z.ZodString;
69
+ screenshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
+ type: z.ZodOptional<z.ZodString>;
71
+ sizes: z.ZodOptional<z.ZodString>;
72
+ src: z.ZodString;
73
+ formFactor: z.ZodOptional<z.ZodEnum<{
74
+ narrow: "narrow";
75
+ wide: "wide";
76
+ }>>;
77
+ label: z.ZodOptional<z.ZodString>;
78
+ platform: z.ZodOptional<z.ZodEnum<{
79
+ android: "android";
80
+ chrome_web_store: "chrome_web_store";
81
+ chromeos: "chromeos";
82
+ ios: "ios";
83
+ ipados: "ipados";
84
+ itunes: "itunes";
85
+ kaios: "kaios";
86
+ macos: "macos";
87
+ "microsoft-inbox": "microsoft-inbox";
88
+ "microsoft-store": "microsoft-store";
89
+ play: "play";
90
+ windows: "windows";
91
+ xbox: "xbox";
92
+ }>>;
93
+ }, z.core.$strict>>>;
94
+ shortName: z.ZodOptional<z.ZodString>;
95
+ tag: z.ZodString;
96
+ type: z.ZodOptional<z.ZodString>;
97
+ update: z.ZodOptional<z.ZodNumber>;
98
+ }, z.core.$strict>;
99
+ declare const ShortcutSchema: z.ZodObject<{
100
+ description: z.ZodOptional<z.ZodString>;
101
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
103
+ any: "any";
104
+ maskable: "maskable";
105
+ monochrome: "monochrome";
106
+ }>>>;
107
+ sizes: z.ZodOptional<z.ZodString>;
108
+ src: z.ZodString;
109
+ type: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strict>>>;
111
+ name: z.ZodString;
112
+ shortName: z.ZodOptional<z.ZodString>;
113
+ url: z.ZodString;
114
+ }, z.core.$strict>;
115
+ declare const ShareTargetSchema: z.ZodObject<{
116
+ action: z.ZodString;
117
+ enctype: z.ZodOptional<z.ZodEnum<{
118
+ "application/x-www-form-urlencoded": "application/x-www-form-urlencoded";
119
+ "multipart/form-data": "multipart/form-data";
120
+ }>>;
121
+ method: z.ZodOptional<z.ZodEnum<{
122
+ GET: "GET";
123
+ POST: "POST";
124
+ }>>;
125
+ params: z.ZodObject<{
126
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
127
+ accept: z.ZodArray<z.ZodString>;
128
+ name: z.ZodString;
129
+ }, z.core.$strict>>>;
130
+ text: z.ZodOptional<z.ZodString>;
131
+ title: z.ZodOptional<z.ZodString>;
132
+ url: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strict>;
134
+ }, z.core.$strict>;
135
+ declare const FileHandlerSchema: z.ZodObject<{
136
+ accept: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
137
+ action: z.ZodString;
138
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
139
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
140
+ any: "any";
141
+ maskable: "maskable";
142
+ monochrome: "monochrome";
143
+ }>>>;
144
+ sizes: z.ZodOptional<z.ZodString>;
145
+ src: z.ZodString;
146
+ type: z.ZodOptional<z.ZodString>;
147
+ }, z.core.$strict>>>;
148
+ launchType: z.ZodOptional<z.ZodEnum<{
149
+ "multiple-clients": "multiple-clients";
150
+ "single-client": "single-client";
151
+ }>>;
152
+ }, z.core.$strict>;
153
+ export declare const ManifestConfigSchema: z.ZodObject<{
154
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
155
+ displayOverride: z.ZodOptional<z.ZodArray<z.ZodEnum<{
156
+ browser: "browser";
157
+ fullscreen: "fullscreen";
158
+ "minimal-ui": "minimal-ui";
159
+ standalone: "standalone";
160
+ tabbed: "tabbed";
161
+ "window-controls-overlay": "window-controls-overlay";
162
+ }>>>;
163
+ edgeSidePanel: z.ZodOptional<z.ZodObject<{
164
+ preferredWidth: z.ZodOptional<z.ZodNumber>;
165
+ }, z.core.$strict>>;
166
+ fileHandlers: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
+ accept: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
168
+ action: z.ZodString;
169
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
170
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
171
+ any: "any";
172
+ maskable: "maskable";
173
+ monochrome: "monochrome";
174
+ }>>>;
175
+ sizes: z.ZodOptional<z.ZodString>;
176
+ src: z.ZodString;
177
+ type: z.ZodOptional<z.ZodString>;
178
+ }, z.core.$strict>>>;
179
+ launchType: z.ZodOptional<z.ZodEnum<{
180
+ "multiple-clients": "multiple-clients";
181
+ "single-client": "single-client";
182
+ }>>;
183
+ }, z.core.$strict>>>;
184
+ iarcRatingId: z.ZodOptional<z.ZodString>;
185
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
186
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
187
+ any: "any";
188
+ maskable: "maskable";
189
+ monochrome: "monochrome";
190
+ }>>>;
191
+ sizes: z.ZodOptional<z.ZodString>;
192
+ src: z.ZodString;
193
+ type: z.ZodOptional<z.ZodString>;
194
+ }, z.core.$strict>>>;
195
+ launchHandler: z.ZodOptional<z.ZodObject<{
196
+ clientMode: z.ZodUnion<readonly [z.ZodEnum<{
197
+ auto: "auto";
198
+ "focus-existing": "focus-existing";
199
+ "navigate-existing": "navigate-existing";
200
+ "navigate-new": "navigate-new";
201
+ }>, z.ZodArray<z.ZodEnum<{
202
+ auto: "auto";
203
+ "focus-existing": "focus-existing";
204
+ "navigate-existing": "navigate-existing";
205
+ "navigate-new": "navigate-new";
206
+ }>>]>;
207
+ }, z.core.$strict>>;
208
+ localized: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
209
+ description: z.ZodOptional<z.ZodString>;
210
+ name: z.ZodOptional<z.ZodString>;
211
+ shortName: z.ZodOptional<z.ZodString>;
212
+ }, z.core.$strict>>>;
213
+ noteTaking: z.ZodOptional<z.ZodObject<{
214
+ newNoteUrl: z.ZodString;
215
+ }, z.core.$strict>>;
216
+ preferRelatedApplications: z.ZodOptional<z.ZodBoolean>;
217
+ protocolHandlers: z.ZodOptional<z.ZodArray<z.ZodObject<{
218
+ protocol: z.ZodString;
219
+ url: z.ZodString;
220
+ }, z.core.$strict>>>;
221
+ relatedApplications: z.ZodOptional<z.ZodArray<z.ZodObject<{
222
+ id: z.ZodOptional<z.ZodString>;
223
+ platform: z.ZodString;
224
+ url: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strict>>>;
226
+ scopeExtensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
227
+ origin: z.ZodString;
228
+ }, z.core.$strict>>>;
229
+ screenshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
230
+ type: z.ZodOptional<z.ZodString>;
231
+ sizes: z.ZodOptional<z.ZodString>;
232
+ src: z.ZodString;
233
+ formFactor: z.ZodOptional<z.ZodEnum<{
234
+ narrow: "narrow";
235
+ wide: "wide";
236
+ }>>;
237
+ label: z.ZodOptional<z.ZodString>;
238
+ platform: z.ZodOptional<z.ZodEnum<{
239
+ android: "android";
240
+ chrome_web_store: "chrome_web_store";
241
+ chromeos: "chromeos";
242
+ ios: "ios";
243
+ ipados: "ipados";
244
+ itunes: "itunes";
245
+ kaios: "kaios";
246
+ macos: "macos";
247
+ "microsoft-inbox": "microsoft-inbox";
248
+ "microsoft-store": "microsoft-store";
249
+ play: "play";
250
+ windows: "windows";
251
+ xbox: "xbox";
252
+ }>>;
253
+ }, z.core.$strict>>>;
254
+ shareTarget: z.ZodOptional<z.ZodObject<{
255
+ action: z.ZodString;
256
+ enctype: z.ZodOptional<z.ZodEnum<{
257
+ "application/x-www-form-urlencoded": "application/x-www-form-urlencoded";
258
+ "multipart/form-data": "multipart/form-data";
259
+ }>>;
260
+ method: z.ZodOptional<z.ZodEnum<{
261
+ GET: "GET";
262
+ POST: "POST";
263
+ }>>;
264
+ params: z.ZodObject<{
265
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
266
+ accept: z.ZodArray<z.ZodString>;
267
+ name: z.ZodString;
268
+ }, z.core.$strict>>>;
269
+ text: z.ZodOptional<z.ZodString>;
270
+ title: z.ZodOptional<z.ZodString>;
271
+ url: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strict>;
273
+ }, z.core.$strict>>;
274
+ shortcuts: z.ZodOptional<z.ZodArray<z.ZodObject<{
275
+ description: z.ZodOptional<z.ZodString>;
276
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
278
+ any: "any";
279
+ maskable: "maskable";
280
+ monochrome: "monochrome";
281
+ }>>>;
282
+ sizes: z.ZodOptional<z.ZodString>;
283
+ src: z.ZodString;
284
+ type: z.ZodOptional<z.ZodString>;
285
+ }, z.core.$strict>>>;
286
+ name: z.ZodString;
287
+ shortName: z.ZodOptional<z.ZodString>;
288
+ url: z.ZodString;
289
+ }, z.core.$strict>>>;
290
+ widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
291
+ backgrounds: z.ZodOptional<z.ZodArray<z.ZodObject<{
292
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
293
+ any: "any";
294
+ maskable: "maskable";
295
+ monochrome: "monochrome";
296
+ }>>>;
297
+ sizes: z.ZodOptional<z.ZodString>;
298
+ src: z.ZodString;
299
+ type: z.ZodOptional<z.ZodString>;
300
+ }, z.core.$strict>>>;
301
+ data: z.ZodString;
302
+ description: z.ZodString;
303
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
+ purpose: z.ZodOptional<z.ZodArray<z.ZodEnum<{
305
+ any: "any";
306
+ maskable: "maskable";
307
+ monochrome: "monochrome";
308
+ }>>>;
309
+ sizes: z.ZodOptional<z.ZodString>;
310
+ src: z.ZodString;
311
+ type: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strict>>>;
313
+ msAcTemplate: z.ZodString;
314
+ multiple: z.ZodOptional<z.ZodBoolean>;
315
+ name: z.ZodString;
316
+ screenshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
317
+ type: z.ZodOptional<z.ZodString>;
318
+ sizes: z.ZodOptional<z.ZodString>;
319
+ src: z.ZodString;
320
+ formFactor: z.ZodOptional<z.ZodEnum<{
321
+ narrow: "narrow";
322
+ wide: "wide";
323
+ }>>;
324
+ label: z.ZodOptional<z.ZodString>;
325
+ platform: z.ZodOptional<z.ZodEnum<{
326
+ android: "android";
327
+ chrome_web_store: "chrome_web_store";
328
+ chromeos: "chromeos";
329
+ ios: "ios";
330
+ ipados: "ipados";
331
+ itunes: "itunes";
332
+ kaios: "kaios";
333
+ macos: "macos";
334
+ "microsoft-inbox": "microsoft-inbox";
335
+ "microsoft-store": "microsoft-store";
336
+ play: "play";
337
+ windows: "windows";
338
+ xbox: "xbox";
339
+ }>>;
340
+ }, z.core.$strict>>>;
341
+ shortName: z.ZodOptional<z.ZodString>;
342
+ tag: z.ZodString;
343
+ type: z.ZodOptional<z.ZodString>;
344
+ update: z.ZodOptional<z.ZodNumber>;
345
+ }, z.core.$strict>>>;
346
+ }, z.core.$strict>;
347
+ export type FileHandler = z.infer<typeof FileHandlerSchema>;
348
+ export type ImageResource = z.infer<typeof ImageResourceSchema>;
349
+ export type ManifestConfig = z.infer<typeof ManifestConfigSchema>;
350
+ export type ManifestShortcut = z.infer<typeof ShortcutSchema>;
351
+ export type Screenshot = z.infer<typeof ScreenshotSchema>;
352
+ export type ShareTarget = z.infer<typeof ShareTargetSchema>;
353
+ export type ManifestWidget = z.infer<typeof WidgetSchema>;
354
+ export {};
355
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/manifest/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,mBAAmB;;;;;;;;;kBAKvB,CAAC;AAEH,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;kBAoBpB,CAAC;AAEH;;;;;GAKG;AACH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmBhB,CAAC;AAEH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;kBAMlB,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;kBAiBrB,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;kBAMrB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgE/B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -0,0 +1,141 @@
1
+ import { z } from "zod";
2
+ const ImageResourceSchema = z.strictObject({
3
+ purpose: z.array(z.enum(["any", "maskable", "monochrome"])).optional(),
4
+ sizes: z.string().min(1).optional(),
5
+ src: z.string().min(1),
6
+ type: z.string().min(1).optional(),
7
+ });
8
+ const ScreenshotSchema = ImageResourceSchema.omit({ purpose: true }).extend({
9
+ formFactor: z.enum(["narrow", "wide"]).optional(),
10
+ label: z.string().min(1).optional(),
11
+ platform: z
12
+ .enum([
13
+ "android",
14
+ "chrome_web_store",
15
+ "chromeos",
16
+ "ios",
17
+ "ipados",
18
+ "itunes",
19
+ "kaios",
20
+ "macos",
21
+ "microsoft-inbox",
22
+ "microsoft-store",
23
+ "play",
24
+ "windows",
25
+ "xbox",
26
+ ])
27
+ .optional(),
28
+ });
29
+ /**
30
+ * A widget for a host that has a widget surface, which today means the Windows
31
+ * Widgets Board. Every member is required because a widget missing any of them
32
+ * is installed and then never renders, which is worth catching at build rather
33
+ * than discovering on a dashboard.
34
+ */
35
+ const WidgetSchema = z.strictObject({
36
+ backgrounds: z.array(ImageResourceSchema).optional(),
37
+ /** The Adaptive Card payload the host renders the widget's data into. */
38
+ data: z.string().min(1),
39
+ description: z.string().min(1),
40
+ icons: z.array(ImageResourceSchema).optional(),
41
+ /** Windows renders Adaptive Cards, so this is the template it asks for. */
42
+ msAcTemplate: z.string().min(1),
43
+ /** Whether the host may install more than one instance of this widget. */
44
+ multiple: z.boolean().optional(),
45
+ name: z.string().min(1),
46
+ screenshots: z.array(ScreenshotSchema).optional(),
47
+ shortName: z.string().min(1).max(12).optional(),
48
+ /** Identifies the widget to the service worker that updates it. */
49
+ tag: z.string().min(1),
50
+ /** MIME type of what `data` returns. */
51
+ type: z.string().min(1).optional(),
52
+ /** How often the host may ask for fresh data, in seconds. */
53
+ update: z.number().int().positive().optional(),
54
+ });
55
+ const ShortcutSchema = z.strictObject({
56
+ description: z.string().min(1).optional(),
57
+ icons: z.array(ImageResourceSchema).optional(),
58
+ name: z.string().min(1),
59
+ shortName: z.string().min(1).optional(),
60
+ url: z.string().min(1),
61
+ });
62
+ const ShareTargetSchema = z.strictObject({
63
+ action: z.string().min(1),
64
+ enctype: z.enum(["application/x-www-form-urlencoded", "multipart/form-data"]).optional(),
65
+ method: z.enum(["GET", "POST"]).optional(),
66
+ params: z.strictObject({
67
+ files: z
68
+ .array(z.strictObject({
69
+ accept: z.array(z.string().min(1)),
70
+ name: z.string().min(1),
71
+ }))
72
+ .optional(),
73
+ text: z.string().min(1).optional(),
74
+ title: z.string().min(1).optional(),
75
+ url: z.string().min(1).optional(),
76
+ }),
77
+ });
78
+ const FileHandlerSchema = z.strictObject({
79
+ accept: z.record(z.string().min(1), z.array(z.string().min(1))),
80
+ action: z.string().min(1),
81
+ /** Shown beside the file type where an OS offers to open one with this app. */
82
+ icons: z.array(ImageResourceSchema).optional(),
83
+ launchType: z.enum(["multiple-clients", "single-client"]).optional(),
84
+ });
85
+ export const ManifestConfigSchema = z.strictObject({
86
+ categories: z.array(z.string().min(1)).optional(),
87
+ displayOverride: z
88
+ .array(z.enum([
89
+ "browser",
90
+ "fullscreen",
91
+ "minimal-ui",
92
+ "standalone",
93
+ "tabbed",
94
+ "window-controls-overlay",
95
+ ]))
96
+ .optional(),
97
+ /** How wide the application prefers to be in a browser side panel. */
98
+ edgeSidePanel: z
99
+ .strictObject({ preferredWidth: z.number().int().positive().optional() })
100
+ .optional(),
101
+ fileHandlers: z.array(FileHandlerSchema).optional(),
102
+ /** The age rating a store shows, from an IARC questionnaire. */
103
+ iarcRatingId: z.string().min(1).optional(),
104
+ icons: z.array(ImageResourceSchema).optional(),
105
+ launchHandler: z
106
+ .strictObject({
107
+ clientMode: z.union([
108
+ z.enum(["auto", "focus-existing", "navigate-existing", "navigate-new"]),
109
+ z.array(z.enum(["auto", "focus-existing", "navigate-existing", "navigate-new"])),
110
+ ]),
111
+ })
112
+ .optional(),
113
+ localized: z
114
+ .record(z.string().min(1), z.strictObject({
115
+ description: z.string().min(1).optional(),
116
+ name: z.string().min(1).optional(),
117
+ shortName: z.string().min(1).optional(),
118
+ }))
119
+ .optional(),
120
+ noteTaking: z.strictObject({ newNoteUrl: z.string().min(1) }).optional(),
121
+ preferRelatedApplications: z.boolean().optional(),
122
+ protocolHandlers: z
123
+ .array(z.strictObject({
124
+ protocol: z.string().min(1),
125
+ url: z.string().min(1),
126
+ }))
127
+ .optional(),
128
+ relatedApplications: z
129
+ .array(z.strictObject({
130
+ id: z.string().min(1).optional(),
131
+ platform: z.string().min(1),
132
+ url: z.string().min(1).optional(),
133
+ }))
134
+ .optional(),
135
+ scopeExtensions: z.array(z.strictObject({ origin: z.string().min(1) })).optional(),
136
+ screenshots: z.array(ScreenshotSchema).optional(),
137
+ shareTarget: ShareTargetSchema.optional(),
138
+ shortcuts: z.array(ShortcutSchema).optional(),
139
+ widgets: z.array(WidgetSchema).optional(),
140
+ });
141
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/manifest/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,mBAAmB,GA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