@monoflake/sdk 0.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.
- package/LICENSE +22 -0
- package/dist/artifacts/src/anchors.d.ts +34 -0
- package/dist/artifacts/src/anchors.js +64 -0
- package/dist/artifacts/src/api.d.ts +14 -0
- package/dist/artifacts/src/api.js +20 -0
- package/dist/artifacts/src/batch.d.ts +105 -0
- package/dist/artifacts/src/batch.js +81 -0
- package/dist/artifacts/src/engagement.d.ts +61 -0
- package/dist/artifacts/src/engagement.js +67 -0
- package/dist/artifacts/src/feed.d.ts +42 -0
- package/dist/artifacts/src/feed.js +89 -0
- package/dist/artifacts/src/index.d.ts +4224 -0
- package/dist/artifacts/src/index.js +219 -0
- package/dist/artifacts/src/picture.d.ts +116 -0
- package/dist/artifacts/src/picture.js +161 -0
- package/dist/artifacts/src/resource.d.ts +1391 -0
- package/dist/artifacts/src/resource.js +477 -0
- package/dist/artifacts/src/schema.d.ts +5 -0
- package/dist/artifacts/src/schema.js +18 -0
- package/dist/artifacts/src/types.d.ts +396 -0
- package/dist/artifacts/src/types.js +0 -0
- package/dist/cache/src/index.d.ts +67 -0
- package/dist/cache/src/index.js +58 -0
- package/dist/imgsrc/src/index.d.ts +16 -0
- package/dist/imgsrc/src/index.js +89 -0
- package/dist/limits/src/bucket.d.ts +28 -0
- package/dist/limits/src/bucket.js +23 -0
- package/dist/limits/src/index.d.ts +29 -0
- package/dist/limits/src/index.js +62 -0
- package/dist/limits/src/key.d.ts +37 -0
- package/dist/limits/src/key.js +64 -0
- package/dist/robots/src/index.d.ts +98 -0
- package/dist/robots/src/index.js +196 -0
- package/dist/security/src/agents.d.ts +10 -0
- package/dist/security/src/agents.js +95 -0
- package/dist/security/src/index.d.ts +12 -0
- package/dist/security/src/index.js +37 -0
- package/dist/src/index.d.ts +218 -0
- package/dist/src/index.js +219 -0
- package/dist/store/src/index.d.ts +92 -0
- package/dist/store/src/index.js +264 -0
- package/dist/symlink/src/index.d.ts +24 -0
- package/dist/symlink/src/index.js +89 -0
- package/package.json +85 -0
|
@@ -0,0 +1,1391 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
//#region artifacts/src/resource.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The envelope's own version, which moves only when one of its five keys moves.
|
|
5
|
+
*
|
|
6
|
+
* Adding a type, adding a layer or changing what a layer holds touches none of those names, so
|
|
7
|
+
* none of them is a 6. A version that rose for reasons unrelated to what a reader parses would
|
|
8
|
+
* teach the reader to ignore it. See spec/architecture/resource.md, "The record".
|
|
9
|
+
*/
|
|
10
|
+
export declare const RESOURCE_VERSION = 5;
|
|
11
|
+
/**
|
|
12
|
+
* A resource id: five characters of lowercase base36.
|
|
13
|
+
*
|
|
14
|
+
* The other id entirely -- `HASH_PATTERN` above identifies a run of bytes, this identifies a
|
|
15
|
+
* thing, and nothing converts one into the other. Five is chosen for the address space and for a
|
|
16
|
+
* human reading article source, not for a birthday bound: collisions are not a probability here
|
|
17
|
+
* because allocation checks the register first. See spec/architecture/resource.md, "Two ids".
|
|
18
|
+
*/
|
|
19
|
+
export declare const RESOURCE_PATTERN: RegExp;
|
|
20
|
+
export declare function isResourceId(value: string): boolean;
|
|
21
|
+
/** A rid as every schema here spells one, beside `hash`, which is the other id. */
|
|
22
|
+
declare const rid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
23
|
+
export type ResourceId = v.InferOutput<typeof rid>;
|
|
24
|
+
/**
|
|
25
|
+
* What a resource is derived from, including bytes nobody can fetch.
|
|
26
|
+
*
|
|
27
|
+
* A list, because re-scanning a subject adds an origin to the resource rather than making a
|
|
28
|
+
* second one. The originals are never published; the cid is kept so the next import of the same
|
|
29
|
+
* file is recognised and skipped. See spec/architecture/resource.md, "`source` and `origin`".
|
|
30
|
+
*/
|
|
31
|
+
export declare const MediaLayerSchema: v.ObjectSchema<{
|
|
32
|
+
readonly version: v.NumberSchema<undefined>;
|
|
33
|
+
readonly origin: v.ArraySchema<v.ObjectSchema<{
|
|
34
|
+
readonly blake3: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
35
|
+
readonly mime: v.StringSchema<undefined>;
|
|
36
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
37
|
+
}, undefined>, undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
/** The mimes that serve any size, named once so no caller has to repeat the condition. */
|
|
40
|
+
export declare const SCALABLE_MIMES: Set<string>;
|
|
41
|
+
/**
|
|
42
|
+
* One published encoding of a picture.
|
|
43
|
+
*
|
|
44
|
+
* `resolution` is absent on a vector for the same reason the layer's is: there are no pixels to
|
|
45
|
+
* report, and a caller that asks and receives nothing has its answer. `quality` is the normalised
|
|
46
|
+
* encoder setting, kept because re-deriving has to reproduce what was published.
|
|
47
|
+
*/
|
|
48
|
+
export declare const ImageVariantSchema: v.ObjectSchema<{
|
|
49
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
50
|
+
readonly mime: v.StringSchema<undefined>;
|
|
51
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
52
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
53
|
+
readonly width: v.NumberSchema<undefined>;
|
|
54
|
+
readonly height: v.NumberSchema<undefined>;
|
|
55
|
+
}, undefined>, undefined>;
|
|
56
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* Two facts about a picture, and only one of them is universal.
|
|
60
|
+
*
|
|
61
|
+
* `dimension` is the intrinsic box -- an SVG's `viewBox`, a bitmap's pixels -- and is what layout
|
|
62
|
+
* is computed from. `resolution` is actual pixels and bitmaps only: **absent is the answer**, so
|
|
63
|
+
* a vector needs no second field saying it is one. The variants bind here because this is the
|
|
64
|
+
* first layer at which content is a fact. See spec/architecture/resource.md, "four steps".
|
|
65
|
+
*/
|
|
66
|
+
export declare const ImageLayerSchema: v.ObjectSchema<{
|
|
67
|
+
readonly version: v.NumberSchema<undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Base64 thumbhash: the compact canonical placeholder, and what `placeholder` decodes from.
|
|
70
|
+
*
|
|
71
|
+
* Optional, because a picture is not the only thing this layer describes. An icon binds two
|
|
72
|
+
* files under `icon` and has no single picture to stand in for -- **absent is the answer**
|
|
73
|
+
* there, exactly as it is for `resolution`, and a placeholder invented for one of the two
|
|
74
|
+
* tones would be painted under the other.
|
|
75
|
+
*/
|
|
76
|
+
readonly thumbhash: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
77
|
+
/**
|
|
78
|
+
* The same placeholder decoded, as a `data:image/webp` URI a page paints directly.
|
|
79
|
+
*
|
|
80
|
+
* Carried rather than derived where it is wanted, and the reason is not size: this record is
|
|
81
|
+
* read by a **universal** load, and the decode is a WebP codec reached through `node:fs`,
|
|
82
|
+
* which no browser bundle may contain. One decode at import serves both halves. Measured at
|
|
83
|
+
* 167 characters median here, about 8% of a photograph's record. Additive, so the layer
|
|
84
|
+
* keeps its version -- see the parsing table in spec/architecture/resource.md.
|
|
85
|
+
*/
|
|
86
|
+
readonly placeholder: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
87
|
+
readonly dimension: v.ObjectSchema<{
|
|
88
|
+
readonly width: v.NumberSchema<undefined>;
|
|
89
|
+
readonly height: v.NumberSchema<undefined>;
|
|
90
|
+
readonly aspect: v.StringSchema<undefined>;
|
|
91
|
+
}, undefined>;
|
|
92
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
93
|
+
readonly width: v.NumberSchema<undefined>;
|
|
94
|
+
readonly height: v.NumberSchema<undefined>;
|
|
95
|
+
}, undefined>, undefined>;
|
|
96
|
+
readonly variants: v.ArraySchema<v.ObjectSchema<{
|
|
97
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
98
|
+
readonly mime: v.StringSchema<undefined>;
|
|
99
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
100
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
101
|
+
readonly width: v.NumberSchema<undefined>;
|
|
102
|
+
readonly height: v.NumberSchema<undefined>;
|
|
103
|
+
}, undefined>, undefined>;
|
|
104
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
105
|
+
}, undefined>, undefined>;
|
|
106
|
+
}, undefined>;
|
|
107
|
+
/** A camera pointed at the world, which is the whole of what this layer brings. */
|
|
108
|
+
export declare const PhotoLayerSchema: v.ObjectSchema<{
|
|
109
|
+
readonly version: v.NumberSchema<undefined>;
|
|
110
|
+
readonly captured: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
111
|
+
readonly camera: v.OptionalSchema<v.ObjectSchema<{
|
|
112
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
113
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
114
|
+
}, undefined>, undefined>;
|
|
115
|
+
readonly lens: v.OptionalSchema<v.ObjectSchema<{
|
|
116
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
117
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
118
|
+
readonly focal_length: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
119
|
+
readonly focal_length_35mm: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
120
|
+
readonly f_number: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
121
|
+
}, undefined>, undefined>;
|
|
122
|
+
readonly exposure: v.OptionalSchema<v.ObjectSchema<{
|
|
123
|
+
readonly time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
124
|
+
readonly iso: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
125
|
+
readonly bias_ev: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
126
|
+
readonly mode: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
127
|
+
readonly program: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
128
|
+
readonly metering: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
129
|
+
readonly white_balance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
130
|
+
readonly flash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
131
|
+
}, undefined>, undefined>;
|
|
132
|
+
readonly location: v.OptionalSchema<v.ObjectSchema<{
|
|
133
|
+
readonly latitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
134
|
+
readonly longitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
135
|
+
readonly altitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
136
|
+
readonly accuracy: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
137
|
+
readonly direction: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
138
|
+
}, undefined>, undefined>;
|
|
139
|
+
readonly address: v.OptionalSchema<v.ObjectSchema<{
|
|
140
|
+
readonly continent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
141
|
+
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
142
|
+
readonly country_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
143
|
+
readonly region: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
144
|
+
readonly subregion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
145
|
+
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
146
|
+
readonly district: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
147
|
+
readonly postal_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
148
|
+
readonly timezone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
149
|
+
}, undefined>, undefined>;
|
|
150
|
+
readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
151
|
+
readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
152
|
+
/** Read and honoured on the way in: ignoring it turns every derived image. */
|
|
153
|
+
readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
154
|
+
}, undefined>;
|
|
155
|
+
/**
|
|
156
|
+
* A capture of a screen, which is what a picture with no camera turns out to be.
|
|
157
|
+
*
|
|
158
|
+
* The scale is what earns this its own layer: a screenshot is taken at a device pixel ratio, and
|
|
159
|
+
* without it nothing can say whether a 2560px capture is a wide screen or a retina one. The rest
|
|
160
|
+
* is the same account a photograph carries -- ten records here hold `color_space` and `software`,
|
|
161
|
+
* and a layer with no home for them would drop them on the way past.
|
|
162
|
+
*/
|
|
163
|
+
export declare const ScreenshotLayerSchema: v.ObjectSchema<{
|
|
164
|
+
readonly version: v.NumberSchema<undefined>;
|
|
165
|
+
readonly captured: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
166
|
+
readonly camera: v.OptionalSchema<v.ObjectSchema<{
|
|
167
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
168
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
169
|
+
}, undefined>, undefined>;
|
|
170
|
+
readonly lens: v.OptionalSchema<v.ObjectSchema<{
|
|
171
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
172
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
173
|
+
readonly focal_length: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
174
|
+
readonly focal_length_35mm: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
175
|
+
readonly f_number: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
176
|
+
}, undefined>, undefined>;
|
|
177
|
+
readonly exposure: v.OptionalSchema<v.ObjectSchema<{
|
|
178
|
+
readonly time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
179
|
+
readonly iso: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
180
|
+
readonly bias_ev: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
181
|
+
readonly mode: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
182
|
+
readonly program: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
183
|
+
readonly metering: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
184
|
+
readonly white_balance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
185
|
+
readonly flash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
186
|
+
}, undefined>, undefined>;
|
|
187
|
+
readonly location: v.OptionalSchema<v.ObjectSchema<{
|
|
188
|
+
readonly latitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
189
|
+
readonly longitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
190
|
+
readonly altitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
191
|
+
readonly accuracy: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
192
|
+
readonly direction: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
193
|
+
}, undefined>, undefined>;
|
|
194
|
+
readonly address: v.OptionalSchema<v.ObjectSchema<{
|
|
195
|
+
readonly continent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
196
|
+
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
197
|
+
readonly country_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
198
|
+
readonly region: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
199
|
+
readonly subregion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
200
|
+
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
201
|
+
readonly district: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
202
|
+
readonly postal_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
203
|
+
readonly timezone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
204
|
+
}, undefined>, undefined>;
|
|
205
|
+
readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
206
|
+
readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
207
|
+
/** Read and honoured on the way in: ignoring it turns every derived image. */
|
|
208
|
+
readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
209
|
+
readonly scale: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
210
|
+
}, undefined>;
|
|
211
|
+
/**
|
|
212
|
+
* A still cut from a clip, pointing back at what it was cut from.
|
|
213
|
+
*
|
|
214
|
+
* The clip's `cover` points here and this points there, and that is not a cycle to remove:
|
|
215
|
+
* replacing the cover leaves this a frame of that clip. See spec/architecture/resource.md,
|
|
216
|
+
* "References resolve lazily".
|
|
217
|
+
*/
|
|
218
|
+
export declare const FrameLayerSchema: v.ObjectSchema<{
|
|
219
|
+
readonly version: v.NumberSchema<undefined>;
|
|
220
|
+
readonly source: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
221
|
+
/** Seconds into the clip, which is the one thing the picture itself cannot say. */
|
|
222
|
+
readonly at: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
223
|
+
}, undefined>;
|
|
224
|
+
/** Which shade an icon is drawn for. Closed, and the axis this layer exists to carry. */
|
|
225
|
+
export declare const TONES: readonly ['light', 'dark'];
|
|
226
|
+
export type Tone = (typeof TONES)[number];
|
|
227
|
+
/**
|
|
228
|
+
* Another site's mark: one resource per domain, one file per tone.
|
|
229
|
+
*
|
|
230
|
+
* Light and dark are two pictures, not two encodings of one, so they bind here and not in
|
|
231
|
+
* `image.variants`. Each is described as an image variant is; what differs is the axis. A site
|
|
232
|
+
* with one mark carries one key, and absence is the answer as it is for `resolution`. See
|
|
233
|
+
* spec/architecture/resource.md, "Content binds at the layer that has it".
|
|
234
|
+
*/
|
|
235
|
+
export declare const IconLayerSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
236
|
+
readonly version: v.NumberSchema<undefined>;
|
|
237
|
+
readonly domain: v.StringSchema<undefined>;
|
|
238
|
+
readonly tones: v.ObjectSchema<{
|
|
239
|
+
readonly light: v.OptionalSchema<v.ObjectSchema<{
|
|
240
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
241
|
+
readonly mime: v.StringSchema<undefined>;
|
|
242
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
243
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
244
|
+
readonly width: v.NumberSchema<undefined>;
|
|
245
|
+
readonly height: v.NumberSchema<undefined>;
|
|
246
|
+
}, undefined>, undefined>;
|
|
247
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
248
|
+
}, undefined>, undefined>;
|
|
249
|
+
readonly dark: v.OptionalSchema<v.ObjectSchema<{
|
|
250
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
251
|
+
readonly mime: v.StringSchema<undefined>;
|
|
252
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
253
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
254
|
+
readonly width: v.NumberSchema<undefined>;
|
|
255
|
+
readonly height: v.NumberSchema<undefined>;
|
|
256
|
+
}, undefined>, undefined>;
|
|
257
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
258
|
+
}, undefined>, undefined>;
|
|
259
|
+
}, undefined>;
|
|
260
|
+
}, undefined>, v.CheckAction<{
|
|
261
|
+
version: number;
|
|
262
|
+
domain: string;
|
|
263
|
+
tones: {
|
|
264
|
+
light?: {
|
|
265
|
+
content: string;
|
|
266
|
+
mime: string;
|
|
267
|
+
bytes: number;
|
|
268
|
+
resolution?: {
|
|
269
|
+
width: number;
|
|
270
|
+
height: number;
|
|
271
|
+
} | undefined;
|
|
272
|
+
quality?: number | undefined;
|
|
273
|
+
} | undefined;
|
|
274
|
+
dark?: {
|
|
275
|
+
content: string;
|
|
276
|
+
mime: string;
|
|
277
|
+
bytes: number;
|
|
278
|
+
resolution?: {
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
} | undefined;
|
|
282
|
+
quality?: number | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
};
|
|
285
|
+
}, "an icon names no file for any tone">]>;
|
|
286
|
+
/**
|
|
287
|
+
* This site's own mark: one thing, six files.
|
|
288
|
+
*
|
|
289
|
+
* A map under fixed names rather than a variant list, because each of these is asked for by name
|
|
290
|
+
* -- a favicon, a touch icon, a BIMI mark -- and never by size. See
|
|
291
|
+
* spec/architecture/delivery.md, "A name is resolved, never stored".
|
|
292
|
+
*/
|
|
293
|
+
export declare const MarkLayerSchema: v.ObjectSchema<{
|
|
294
|
+
readonly version: v.NumberSchema<undefined>;
|
|
295
|
+
readonly files: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
296
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
297
|
+
readonly mime: v.StringSchema<undefined>;
|
|
298
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
299
|
+
}, undefined>, undefined>;
|
|
300
|
+
}, undefined>;
|
|
301
|
+
/**
|
|
302
|
+
* A moving picture: what the source was, what was published of it, and what is read over it.
|
|
303
|
+
*
|
|
304
|
+
* The source numbers are kept because a rung is a re-encode and none of them can be read back off
|
|
305
|
+
* one. `codec` is the full RFC 6381 string and names every track, since that is what a browser
|
|
306
|
+
* reads to decide whether it can play the file at all. See web's
|
|
307
|
+
* spec/architecture/video/pipeline.md.
|
|
308
|
+
*/
|
|
309
|
+
export declare const VideoLayerSchema: v.ObjectSchema<{
|
|
310
|
+
readonly version: v.NumberSchema<undefined>;
|
|
311
|
+
readonly source: v.ObjectSchema<{
|
|
312
|
+
readonly mime: v.StringSchema<undefined>;
|
|
313
|
+
readonly width: v.NumberSchema<undefined>;
|
|
314
|
+
readonly height: v.NumberSchema<undefined>;
|
|
315
|
+
readonly aspect: v.StringSchema<undefined>;
|
|
316
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
317
|
+
readonly duration: v.NumberSchema<undefined>;
|
|
318
|
+
readonly frame_rate: v.NumberSchema<undefined>;
|
|
319
|
+
readonly frames: v.NumberSchema<undefined>;
|
|
320
|
+
readonly audio: v.BooleanSchema<undefined>;
|
|
321
|
+
readonly loudness: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
322
|
+
readonly peak: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
323
|
+
}, undefined>;
|
|
324
|
+
/** The poster frame, which is a resource of its own because it is referred to from two places. */
|
|
325
|
+
readonly cover: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
326
|
+
readonly variants: v.ArraySchema<v.ObjectSchema<{
|
|
327
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
328
|
+
readonly mime: v.StringSchema<undefined>;
|
|
329
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
330
|
+
readonly resolution: v.ObjectSchema<{
|
|
331
|
+
readonly width: v.NumberSchema<undefined>;
|
|
332
|
+
readonly height: v.NumberSchema<undefined>;
|
|
333
|
+
}, undefined>;
|
|
334
|
+
readonly codec: v.StringSchema<undefined>;
|
|
335
|
+
}, undefined>, undefined>;
|
|
336
|
+
readonly tracks: v.ArraySchema<v.ObjectSchema<{
|
|
337
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
338
|
+
readonly mime: v.StringSchema<undefined>;
|
|
339
|
+
readonly language: v.StringSchema<undefined>;
|
|
340
|
+
readonly kind: v.PicklistSchema<["captions", "subtitles", "descriptions"], undefined>;
|
|
341
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
342
|
+
}, undefined>, undefined>;
|
|
343
|
+
}, undefined>;
|
|
344
|
+
/**
|
|
345
|
+
* A clip, which is a video cut from a longer one.
|
|
346
|
+
*
|
|
347
|
+
* The excerpt is what the layer brings: seconds into the original, which no derived file records
|
|
348
|
+
* and which is the difference between a clip and the thing it came out of.
|
|
349
|
+
*/
|
|
350
|
+
export declare const ClipLayerSchema: v.ObjectSchema<{
|
|
351
|
+
readonly version: v.NumberSchema<undefined>;
|
|
352
|
+
readonly excerpt: v.OptionalSchema<v.ObjectSchema<{
|
|
353
|
+
readonly from: v.NumberSchema<undefined>;
|
|
354
|
+
readonly to: v.NumberSchema<undefined>;
|
|
355
|
+
}, undefined>, undefined>;
|
|
356
|
+
}, undefined>;
|
|
357
|
+
/**
|
|
358
|
+
* Written prose: one source, and the views compiled out of it.
|
|
359
|
+
*
|
|
360
|
+
* The nine locale bodies are what the document is made of rather than nine things, so they bind
|
|
361
|
+
* here and none of them has a rid. `slug` is the identity and the address is the root's to say.
|
|
362
|
+
* See spec/architecture/resource.md, "The catalogue".
|
|
363
|
+
*/
|
|
364
|
+
export declare const DocumentLayerSchema: v.ObjectSchema<{
|
|
365
|
+
readonly version: v.NumberSchema<undefined>;
|
|
366
|
+
readonly slug: v.StringSchema<undefined>;
|
|
367
|
+
readonly source: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
368
|
+
readonly locales: Omit<v.ObjectSchema<Record<"de" | "en" | "es" | "fr" | "ja" | "ko" | "mw" | "tw" | "zh", v.ObjectSchema<{
|
|
369
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
370
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
371
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
372
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
373
|
+
}, undefined>>, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
|
|
374
|
+
readonly entries: {
|
|
375
|
+
de: v.OptionalSchema<v.ObjectSchema<{
|
|
376
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
377
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
378
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
379
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
380
|
+
}, undefined>, undefined>;
|
|
381
|
+
en: v.OptionalSchema<v.ObjectSchema<{
|
|
382
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
383
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
384
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
385
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
386
|
+
}, undefined>, undefined>;
|
|
387
|
+
es: v.OptionalSchema<v.ObjectSchema<{
|
|
388
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
389
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
390
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
391
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
392
|
+
}, undefined>, undefined>;
|
|
393
|
+
fr: v.OptionalSchema<v.ObjectSchema<{
|
|
394
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
395
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
396
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
397
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
398
|
+
}, undefined>, undefined>;
|
|
399
|
+
ja: v.OptionalSchema<v.ObjectSchema<{
|
|
400
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
401
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
402
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
403
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
404
|
+
}, undefined>, undefined>;
|
|
405
|
+
ko: v.OptionalSchema<v.ObjectSchema<{
|
|
406
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
407
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
408
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
409
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
410
|
+
}, undefined>, undefined>;
|
|
411
|
+
mw: v.OptionalSchema<v.ObjectSchema<{
|
|
412
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
413
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
414
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
415
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
416
|
+
}, undefined>, undefined>;
|
|
417
|
+
tw: v.OptionalSchema<v.ObjectSchema<{
|
|
418
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
419
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
420
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
421
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
422
|
+
}, undefined>, undefined>;
|
|
423
|
+
zh: v.OptionalSchema<v.ObjectSchema<{
|
|
424
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
425
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
426
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
427
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
428
|
+
}, undefined>, undefined>;
|
|
429
|
+
};
|
|
430
|
+
readonly "~standard": v.StandardProps<{
|
|
431
|
+
de?: {
|
|
432
|
+
content: string;
|
|
433
|
+
card?: string | undefined;
|
|
434
|
+
translated: boolean;
|
|
435
|
+
} | undefined;
|
|
436
|
+
en?: {
|
|
437
|
+
content: string;
|
|
438
|
+
card?: string | undefined;
|
|
439
|
+
translated: boolean;
|
|
440
|
+
} | undefined;
|
|
441
|
+
es?: {
|
|
442
|
+
content: string;
|
|
443
|
+
card?: string | undefined;
|
|
444
|
+
translated: boolean;
|
|
445
|
+
} | undefined;
|
|
446
|
+
fr?: {
|
|
447
|
+
content: string;
|
|
448
|
+
card?: string | undefined;
|
|
449
|
+
translated: boolean;
|
|
450
|
+
} | undefined;
|
|
451
|
+
ja?: {
|
|
452
|
+
content: string;
|
|
453
|
+
card?: string | undefined;
|
|
454
|
+
translated: boolean;
|
|
455
|
+
} | undefined;
|
|
456
|
+
ko?: {
|
|
457
|
+
content: string;
|
|
458
|
+
card?: string | undefined;
|
|
459
|
+
translated: boolean;
|
|
460
|
+
} | undefined;
|
|
461
|
+
mw?: {
|
|
462
|
+
content: string;
|
|
463
|
+
card?: string | undefined;
|
|
464
|
+
translated: boolean;
|
|
465
|
+
} | undefined;
|
|
466
|
+
tw?: {
|
|
467
|
+
content: string;
|
|
468
|
+
card?: string | undefined;
|
|
469
|
+
translated: boolean;
|
|
470
|
+
} | undefined;
|
|
471
|
+
zh?: {
|
|
472
|
+
content: string;
|
|
473
|
+
card?: string | undefined;
|
|
474
|
+
translated: boolean;
|
|
475
|
+
} | undefined;
|
|
476
|
+
}, {
|
|
477
|
+
de?: {
|
|
478
|
+
content: string;
|
|
479
|
+
card?: string | undefined;
|
|
480
|
+
translated: boolean;
|
|
481
|
+
} | undefined;
|
|
482
|
+
en?: {
|
|
483
|
+
content: string;
|
|
484
|
+
card?: string | undefined;
|
|
485
|
+
translated: boolean;
|
|
486
|
+
} | undefined;
|
|
487
|
+
es?: {
|
|
488
|
+
content: string;
|
|
489
|
+
card?: string | undefined;
|
|
490
|
+
translated: boolean;
|
|
491
|
+
} | undefined;
|
|
492
|
+
fr?: {
|
|
493
|
+
content: string;
|
|
494
|
+
card?: string | undefined;
|
|
495
|
+
translated: boolean;
|
|
496
|
+
} | undefined;
|
|
497
|
+
ja?: {
|
|
498
|
+
content: string;
|
|
499
|
+
card?: string | undefined;
|
|
500
|
+
translated: boolean;
|
|
501
|
+
} | undefined;
|
|
502
|
+
ko?: {
|
|
503
|
+
content: string;
|
|
504
|
+
card?: string | undefined;
|
|
505
|
+
translated: boolean;
|
|
506
|
+
} | undefined;
|
|
507
|
+
mw?: {
|
|
508
|
+
content: string;
|
|
509
|
+
card?: string | undefined;
|
|
510
|
+
translated: boolean;
|
|
511
|
+
} | undefined;
|
|
512
|
+
tw?: {
|
|
513
|
+
content: string;
|
|
514
|
+
card?: string | undefined;
|
|
515
|
+
translated: boolean;
|
|
516
|
+
} | undefined;
|
|
517
|
+
zh?: {
|
|
518
|
+
content: string;
|
|
519
|
+
card?: string | undefined;
|
|
520
|
+
translated: boolean;
|
|
521
|
+
} | undefined;
|
|
522
|
+
}>;
|
|
523
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
524
|
+
de?: {
|
|
525
|
+
content: string;
|
|
526
|
+
card?: string | undefined;
|
|
527
|
+
translated: boolean;
|
|
528
|
+
} | undefined;
|
|
529
|
+
en?: {
|
|
530
|
+
content: string;
|
|
531
|
+
card?: string | undefined;
|
|
532
|
+
translated: boolean;
|
|
533
|
+
} | undefined;
|
|
534
|
+
es?: {
|
|
535
|
+
content: string;
|
|
536
|
+
card?: string | undefined;
|
|
537
|
+
translated: boolean;
|
|
538
|
+
} | undefined;
|
|
539
|
+
fr?: {
|
|
540
|
+
content: string;
|
|
541
|
+
card?: string | undefined;
|
|
542
|
+
translated: boolean;
|
|
543
|
+
} | undefined;
|
|
544
|
+
ja?: {
|
|
545
|
+
content: string;
|
|
546
|
+
card?: string | undefined;
|
|
547
|
+
translated: boolean;
|
|
548
|
+
} | undefined;
|
|
549
|
+
ko?: {
|
|
550
|
+
content: string;
|
|
551
|
+
card?: string | undefined;
|
|
552
|
+
translated: boolean;
|
|
553
|
+
} | undefined;
|
|
554
|
+
mw?: {
|
|
555
|
+
content: string;
|
|
556
|
+
card?: string | undefined;
|
|
557
|
+
translated: boolean;
|
|
558
|
+
} | undefined;
|
|
559
|
+
tw?: {
|
|
560
|
+
content: string;
|
|
561
|
+
card?: string | undefined;
|
|
562
|
+
translated: boolean;
|
|
563
|
+
} | undefined;
|
|
564
|
+
zh?: {
|
|
565
|
+
content: string;
|
|
566
|
+
card?: string | undefined;
|
|
567
|
+
translated: boolean;
|
|
568
|
+
} | undefined;
|
|
569
|
+
}, v.BooleanIssue | v.ObjectIssue | v.RegexIssue<string> | v.StringIssue>;
|
|
570
|
+
readonly "~types"?: {
|
|
571
|
+
readonly input: {
|
|
572
|
+
de?: {
|
|
573
|
+
content: string;
|
|
574
|
+
card?: string | undefined;
|
|
575
|
+
translated: boolean;
|
|
576
|
+
} | undefined;
|
|
577
|
+
en?: {
|
|
578
|
+
content: string;
|
|
579
|
+
card?: string | undefined;
|
|
580
|
+
translated: boolean;
|
|
581
|
+
} | undefined;
|
|
582
|
+
es?: {
|
|
583
|
+
content: string;
|
|
584
|
+
card?: string | undefined;
|
|
585
|
+
translated: boolean;
|
|
586
|
+
} | undefined;
|
|
587
|
+
fr?: {
|
|
588
|
+
content: string;
|
|
589
|
+
card?: string | undefined;
|
|
590
|
+
translated: boolean;
|
|
591
|
+
} | undefined;
|
|
592
|
+
ja?: {
|
|
593
|
+
content: string;
|
|
594
|
+
card?: string | undefined;
|
|
595
|
+
translated: boolean;
|
|
596
|
+
} | undefined;
|
|
597
|
+
ko?: {
|
|
598
|
+
content: string;
|
|
599
|
+
card?: string | undefined;
|
|
600
|
+
translated: boolean;
|
|
601
|
+
} | undefined;
|
|
602
|
+
mw?: {
|
|
603
|
+
content: string;
|
|
604
|
+
card?: string | undefined;
|
|
605
|
+
translated: boolean;
|
|
606
|
+
} | undefined;
|
|
607
|
+
tw?: {
|
|
608
|
+
content: string;
|
|
609
|
+
card?: string | undefined;
|
|
610
|
+
translated: boolean;
|
|
611
|
+
} | undefined;
|
|
612
|
+
zh?: {
|
|
613
|
+
content: string;
|
|
614
|
+
card?: string | undefined;
|
|
615
|
+
translated: boolean;
|
|
616
|
+
} | undefined;
|
|
617
|
+
};
|
|
618
|
+
readonly output: {
|
|
619
|
+
de?: {
|
|
620
|
+
content: string;
|
|
621
|
+
card?: string | undefined;
|
|
622
|
+
translated: boolean;
|
|
623
|
+
} | undefined;
|
|
624
|
+
en?: {
|
|
625
|
+
content: string;
|
|
626
|
+
card?: string | undefined;
|
|
627
|
+
translated: boolean;
|
|
628
|
+
} | undefined;
|
|
629
|
+
es?: {
|
|
630
|
+
content: string;
|
|
631
|
+
card?: string | undefined;
|
|
632
|
+
translated: boolean;
|
|
633
|
+
} | undefined;
|
|
634
|
+
fr?: {
|
|
635
|
+
content: string;
|
|
636
|
+
card?: string | undefined;
|
|
637
|
+
translated: boolean;
|
|
638
|
+
} | undefined;
|
|
639
|
+
ja?: {
|
|
640
|
+
content: string;
|
|
641
|
+
card?: string | undefined;
|
|
642
|
+
translated: boolean;
|
|
643
|
+
} | undefined;
|
|
644
|
+
ko?: {
|
|
645
|
+
content: string;
|
|
646
|
+
card?: string | undefined;
|
|
647
|
+
translated: boolean;
|
|
648
|
+
} | undefined;
|
|
649
|
+
mw?: {
|
|
650
|
+
content: string;
|
|
651
|
+
card?: string | undefined;
|
|
652
|
+
translated: boolean;
|
|
653
|
+
} | undefined;
|
|
654
|
+
tw?: {
|
|
655
|
+
content: string;
|
|
656
|
+
card?: string | undefined;
|
|
657
|
+
translated: boolean;
|
|
658
|
+
} | undefined;
|
|
659
|
+
zh?: {
|
|
660
|
+
content: string;
|
|
661
|
+
card?: string | undefined;
|
|
662
|
+
translated: boolean;
|
|
663
|
+
} | undefined;
|
|
664
|
+
};
|
|
665
|
+
readonly issue: v.BooleanIssue | v.ObjectIssue | v.RegexIssue<string> | v.StringIssue;
|
|
666
|
+
} | undefined;
|
|
667
|
+
};
|
|
668
|
+
}, undefined>;
|
|
669
|
+
/** An article: the document, plus the two things a page without a date does not carry. */
|
|
670
|
+
export declare const ArticleLayerSchema: v.ObjectSchema<{
|
|
671
|
+
readonly version: v.NumberSchema<undefined>;
|
|
672
|
+
readonly dates: v.ObjectSchema<{
|
|
673
|
+
readonly created: v.StringSchema<undefined>;
|
|
674
|
+
readonly published: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
675
|
+
readonly lastmod: v.StringSchema<undefined>;
|
|
676
|
+
}, undefined>;
|
|
677
|
+
readonly tags: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
678
|
+
}, undefined>;
|
|
679
|
+
/**
|
|
680
|
+
* The attribution text, which is the one document nobody writes.
|
|
681
|
+
*
|
|
682
|
+
* Rewritten whenever the dependency tree moves, so when it was last derived is the fact that
|
|
683
|
+
* distinguishes it from prose someone sat down and wrote.
|
|
684
|
+
*/
|
|
685
|
+
export declare const NoticeLayerSchema: v.ObjectSchema<{
|
|
686
|
+
readonly version: v.NumberSchema<undefined>;
|
|
687
|
+
readonly generated: v.StringSchema<undefined>;
|
|
688
|
+
}, undefined>;
|
|
689
|
+
/**
|
|
690
|
+
* The register a `type` segment selects a parser from, and the highest version each build reads.
|
|
691
|
+
*
|
|
692
|
+
* The version is held beside the schema rather than inside it: a layer numbered above what is
|
|
693
|
+
* here is a shape from a newer producer, and the answer is to stop at that segment rather than to
|
|
694
|
+
* fail the whole record. See spec/architecture/resource.md, "Parsing is optimistic".
|
|
695
|
+
*/
|
|
696
|
+
export declare const LAYERS: {
|
|
697
|
+
readonly media: {
|
|
698
|
+
readonly version: 1;
|
|
699
|
+
readonly schema: v.ObjectSchema<{
|
|
700
|
+
readonly version: v.NumberSchema<undefined>;
|
|
701
|
+
readonly origin: v.ArraySchema<v.ObjectSchema<{
|
|
702
|
+
readonly blake3: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
703
|
+
readonly mime: v.StringSchema<undefined>;
|
|
704
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
705
|
+
}, undefined>, undefined>;
|
|
706
|
+
}, undefined>;
|
|
707
|
+
};
|
|
708
|
+
readonly image: {
|
|
709
|
+
readonly version: 1;
|
|
710
|
+
readonly schema: v.ObjectSchema<{
|
|
711
|
+
readonly version: v.NumberSchema<undefined>;
|
|
712
|
+
/**
|
|
713
|
+
* Base64 thumbhash: the compact canonical placeholder, and what `placeholder` decodes from.
|
|
714
|
+
*
|
|
715
|
+
* Optional, because a picture is not the only thing this layer describes. An icon binds two
|
|
716
|
+
* files under `icon` and has no single picture to stand in for -- **absent is the answer**
|
|
717
|
+
* there, exactly as it is for `resolution`, and a placeholder invented for one of the two
|
|
718
|
+
* tones would be painted under the other.
|
|
719
|
+
*/
|
|
720
|
+
readonly thumbhash: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
721
|
+
/**
|
|
722
|
+
* The same placeholder decoded, as a `data:image/webp` URI a page paints directly.
|
|
723
|
+
*
|
|
724
|
+
* Carried rather than derived where it is wanted, and the reason is not size: this record is
|
|
725
|
+
* read by a **universal** load, and the decode is a WebP codec reached through `node:fs`,
|
|
726
|
+
* which no browser bundle may contain. One decode at import serves both halves. Measured at
|
|
727
|
+
* 167 characters median here, about 8% of a photograph's record. Additive, so the layer
|
|
728
|
+
* keeps its version -- see the parsing table in spec/architecture/resource.md.
|
|
729
|
+
*/
|
|
730
|
+
readonly placeholder: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
731
|
+
readonly dimension: v.ObjectSchema<{
|
|
732
|
+
readonly width: v.NumberSchema<undefined>;
|
|
733
|
+
readonly height: v.NumberSchema<undefined>;
|
|
734
|
+
readonly aspect: v.StringSchema<undefined>;
|
|
735
|
+
}, undefined>;
|
|
736
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
737
|
+
readonly width: v.NumberSchema<undefined>;
|
|
738
|
+
readonly height: v.NumberSchema<undefined>;
|
|
739
|
+
}, undefined>, undefined>;
|
|
740
|
+
readonly variants: v.ArraySchema<v.ObjectSchema<{
|
|
741
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
742
|
+
readonly mime: v.StringSchema<undefined>;
|
|
743
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
744
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
745
|
+
readonly width: v.NumberSchema<undefined>;
|
|
746
|
+
readonly height: v.NumberSchema<undefined>;
|
|
747
|
+
}, undefined>, undefined>;
|
|
748
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
749
|
+
}, undefined>, undefined>;
|
|
750
|
+
}, undefined>;
|
|
751
|
+
};
|
|
752
|
+
readonly photo: {
|
|
753
|
+
readonly version: 1;
|
|
754
|
+
readonly schema: v.ObjectSchema<{
|
|
755
|
+
readonly version: v.NumberSchema<undefined>;
|
|
756
|
+
readonly captured: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
757
|
+
readonly camera: v.OptionalSchema<v.ObjectSchema<{
|
|
758
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
759
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
760
|
+
}, undefined>, undefined>;
|
|
761
|
+
readonly lens: v.OptionalSchema<v.ObjectSchema<{
|
|
762
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
763
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
764
|
+
readonly focal_length: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
765
|
+
readonly focal_length_35mm: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
766
|
+
readonly f_number: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
767
|
+
}, undefined>, undefined>;
|
|
768
|
+
readonly exposure: v.OptionalSchema<v.ObjectSchema<{
|
|
769
|
+
readonly time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
770
|
+
readonly iso: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
771
|
+
readonly bias_ev: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
772
|
+
readonly mode: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
773
|
+
readonly program: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
774
|
+
readonly metering: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
775
|
+
readonly white_balance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
776
|
+
readonly flash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
777
|
+
}, undefined>, undefined>;
|
|
778
|
+
readonly location: v.OptionalSchema<v.ObjectSchema<{
|
|
779
|
+
readonly latitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
780
|
+
readonly longitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
781
|
+
readonly altitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
782
|
+
readonly accuracy: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
783
|
+
readonly direction: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
784
|
+
}, undefined>, undefined>;
|
|
785
|
+
readonly address: v.OptionalSchema<v.ObjectSchema<{
|
|
786
|
+
readonly continent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
787
|
+
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
788
|
+
readonly country_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
789
|
+
readonly region: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
790
|
+
readonly subregion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
791
|
+
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
792
|
+
readonly district: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
793
|
+
readonly postal_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
794
|
+
readonly timezone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
795
|
+
}, undefined>, undefined>;
|
|
796
|
+
readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
797
|
+
readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
798
|
+
/** Read and honoured on the way in: ignoring it turns every derived image. */
|
|
799
|
+
readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
800
|
+
}, undefined>;
|
|
801
|
+
};
|
|
802
|
+
readonly screenshot: {
|
|
803
|
+
readonly version: 1;
|
|
804
|
+
readonly schema: v.ObjectSchema<{
|
|
805
|
+
readonly version: v.NumberSchema<undefined>;
|
|
806
|
+
readonly captured: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
807
|
+
readonly camera: v.OptionalSchema<v.ObjectSchema<{
|
|
808
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
809
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
810
|
+
}, undefined>, undefined>;
|
|
811
|
+
readonly lens: v.OptionalSchema<v.ObjectSchema<{
|
|
812
|
+
readonly model: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
813
|
+
readonly manufacturer: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
814
|
+
readonly focal_length: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
815
|
+
readonly focal_length_35mm: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
816
|
+
readonly f_number: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
817
|
+
}, undefined>, undefined>;
|
|
818
|
+
readonly exposure: v.OptionalSchema<v.ObjectSchema<{
|
|
819
|
+
readonly time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
820
|
+
readonly iso: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
821
|
+
readonly bias_ev: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
822
|
+
readonly mode: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
823
|
+
readonly program: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
824
|
+
readonly metering: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
825
|
+
readonly white_balance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
826
|
+
readonly flash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
827
|
+
}, undefined>, undefined>;
|
|
828
|
+
readonly location: v.OptionalSchema<v.ObjectSchema<{
|
|
829
|
+
readonly latitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
830
|
+
readonly longitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
831
|
+
readonly altitude: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
832
|
+
readonly accuracy: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
833
|
+
readonly direction: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
834
|
+
}, undefined>, undefined>;
|
|
835
|
+
readonly address: v.OptionalSchema<v.ObjectSchema<{
|
|
836
|
+
readonly continent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
837
|
+
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
838
|
+
readonly country_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
839
|
+
readonly region: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
840
|
+
readonly subregion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
841
|
+
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
842
|
+
readonly district: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
843
|
+
readonly postal_code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
844
|
+
readonly timezone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
845
|
+
}, undefined>, undefined>;
|
|
846
|
+
readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
847
|
+
readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
848
|
+
/** Read and honoured on the way in: ignoring it turns every derived image. */
|
|
849
|
+
readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
850
|
+
readonly scale: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
851
|
+
}, undefined>;
|
|
852
|
+
};
|
|
853
|
+
readonly frame: {
|
|
854
|
+
readonly version: 1;
|
|
855
|
+
readonly schema: v.ObjectSchema<{
|
|
856
|
+
readonly version: v.NumberSchema<undefined>;
|
|
857
|
+
readonly source: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
858
|
+
/** Seconds into the clip, which is the one thing the picture itself cannot say. */
|
|
859
|
+
readonly at: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
860
|
+
}, undefined>;
|
|
861
|
+
};
|
|
862
|
+
readonly icon: {
|
|
863
|
+
readonly version: 1;
|
|
864
|
+
readonly schema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
865
|
+
readonly version: v.NumberSchema<undefined>;
|
|
866
|
+
readonly domain: v.StringSchema<undefined>;
|
|
867
|
+
readonly tones: v.ObjectSchema<{
|
|
868
|
+
readonly light: v.OptionalSchema<v.ObjectSchema<{
|
|
869
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
870
|
+
readonly mime: v.StringSchema<undefined>;
|
|
871
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
872
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
873
|
+
readonly width: v.NumberSchema<undefined>;
|
|
874
|
+
readonly height: v.NumberSchema<undefined>;
|
|
875
|
+
}, undefined>, undefined>;
|
|
876
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
877
|
+
}, undefined>, undefined>;
|
|
878
|
+
readonly dark: v.OptionalSchema<v.ObjectSchema<{
|
|
879
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
880
|
+
readonly mime: v.StringSchema<undefined>;
|
|
881
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
882
|
+
readonly resolution: v.OptionalSchema<v.ObjectSchema<{
|
|
883
|
+
readonly width: v.NumberSchema<undefined>;
|
|
884
|
+
readonly height: v.NumberSchema<undefined>;
|
|
885
|
+
}, undefined>, undefined>;
|
|
886
|
+
readonly quality: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
887
|
+
}, undefined>, undefined>;
|
|
888
|
+
}, undefined>;
|
|
889
|
+
}, undefined>, v.CheckAction<{
|
|
890
|
+
version: number;
|
|
891
|
+
domain: string;
|
|
892
|
+
tones: {
|
|
893
|
+
light?: {
|
|
894
|
+
content: string;
|
|
895
|
+
mime: string;
|
|
896
|
+
bytes: number;
|
|
897
|
+
resolution?: {
|
|
898
|
+
width: number;
|
|
899
|
+
height: number;
|
|
900
|
+
} | undefined;
|
|
901
|
+
quality?: number | undefined;
|
|
902
|
+
} | undefined;
|
|
903
|
+
dark?: {
|
|
904
|
+
content: string;
|
|
905
|
+
mime: string;
|
|
906
|
+
bytes: number;
|
|
907
|
+
resolution?: {
|
|
908
|
+
width: number;
|
|
909
|
+
height: number;
|
|
910
|
+
} | undefined;
|
|
911
|
+
quality?: number | undefined;
|
|
912
|
+
} | undefined;
|
|
913
|
+
};
|
|
914
|
+
}, "an icon names no file for any tone">]>;
|
|
915
|
+
};
|
|
916
|
+
readonly mark: {
|
|
917
|
+
readonly version: 1;
|
|
918
|
+
readonly schema: v.ObjectSchema<{
|
|
919
|
+
readonly version: v.NumberSchema<undefined>;
|
|
920
|
+
readonly files: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
921
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
922
|
+
readonly mime: v.StringSchema<undefined>;
|
|
923
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
924
|
+
}, undefined>, undefined>;
|
|
925
|
+
}, undefined>;
|
|
926
|
+
};
|
|
927
|
+
readonly video: {
|
|
928
|
+
readonly version: 1;
|
|
929
|
+
readonly schema: v.ObjectSchema<{
|
|
930
|
+
readonly version: v.NumberSchema<undefined>;
|
|
931
|
+
readonly source: v.ObjectSchema<{
|
|
932
|
+
readonly mime: v.StringSchema<undefined>;
|
|
933
|
+
readonly width: v.NumberSchema<undefined>;
|
|
934
|
+
readonly height: v.NumberSchema<undefined>;
|
|
935
|
+
readonly aspect: v.StringSchema<undefined>;
|
|
936
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
937
|
+
readonly duration: v.NumberSchema<undefined>;
|
|
938
|
+
readonly frame_rate: v.NumberSchema<undefined>;
|
|
939
|
+
readonly frames: v.NumberSchema<undefined>;
|
|
940
|
+
readonly audio: v.BooleanSchema<undefined>;
|
|
941
|
+
readonly loudness: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
942
|
+
readonly peak: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
943
|
+
}, undefined>;
|
|
944
|
+
/** The poster frame, which is a resource of its own because it is referred to from two places. */
|
|
945
|
+
readonly cover: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
946
|
+
readonly variants: v.ArraySchema<v.ObjectSchema<{
|
|
947
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
948
|
+
readonly mime: v.StringSchema<undefined>;
|
|
949
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
950
|
+
readonly resolution: v.ObjectSchema<{
|
|
951
|
+
readonly width: v.NumberSchema<undefined>;
|
|
952
|
+
readonly height: v.NumberSchema<undefined>;
|
|
953
|
+
}, undefined>;
|
|
954
|
+
readonly codec: v.StringSchema<undefined>;
|
|
955
|
+
}, undefined>, undefined>;
|
|
956
|
+
readonly tracks: v.ArraySchema<v.ObjectSchema<{
|
|
957
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
958
|
+
readonly mime: v.StringSchema<undefined>;
|
|
959
|
+
readonly language: v.StringSchema<undefined>;
|
|
960
|
+
readonly kind: v.PicklistSchema<["captions", "subtitles", "descriptions"], undefined>;
|
|
961
|
+
readonly bytes: v.NumberSchema<undefined>;
|
|
962
|
+
}, undefined>, undefined>;
|
|
963
|
+
}, undefined>;
|
|
964
|
+
};
|
|
965
|
+
readonly clip: {
|
|
966
|
+
readonly version: 1;
|
|
967
|
+
readonly schema: v.ObjectSchema<{
|
|
968
|
+
readonly version: v.NumberSchema<undefined>;
|
|
969
|
+
readonly excerpt: v.OptionalSchema<v.ObjectSchema<{
|
|
970
|
+
readonly from: v.NumberSchema<undefined>;
|
|
971
|
+
readonly to: v.NumberSchema<undefined>;
|
|
972
|
+
}, undefined>, undefined>;
|
|
973
|
+
}, undefined>;
|
|
974
|
+
};
|
|
975
|
+
readonly document: {
|
|
976
|
+
readonly version: 1;
|
|
977
|
+
readonly schema: v.ObjectSchema<{
|
|
978
|
+
readonly version: v.NumberSchema<undefined>;
|
|
979
|
+
readonly slug: v.StringSchema<undefined>;
|
|
980
|
+
readonly source: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
981
|
+
readonly locales: Omit<v.ObjectSchema<Record<"de" | "en" | "es" | "fr" | "ja" | "ko" | "mw" | "tw" | "zh", v.ObjectSchema<{
|
|
982
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
983
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
984
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
985
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
986
|
+
}, undefined>>, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
|
|
987
|
+
readonly entries: {
|
|
988
|
+
de: v.OptionalSchema<v.ObjectSchema<{
|
|
989
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
990
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
991
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
992
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
993
|
+
}, undefined>, undefined>;
|
|
994
|
+
en: v.OptionalSchema<v.ObjectSchema<{
|
|
995
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
996
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
997
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
998
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
999
|
+
}, undefined>, undefined>;
|
|
1000
|
+
es: v.OptionalSchema<v.ObjectSchema<{
|
|
1001
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1002
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1003
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1004
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1005
|
+
}, undefined>, undefined>;
|
|
1006
|
+
fr: v.OptionalSchema<v.ObjectSchema<{
|
|
1007
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1008
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1009
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1010
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1011
|
+
}, undefined>, undefined>;
|
|
1012
|
+
ja: v.OptionalSchema<v.ObjectSchema<{
|
|
1013
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1014
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1015
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1016
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1017
|
+
}, undefined>, undefined>;
|
|
1018
|
+
ko: v.OptionalSchema<v.ObjectSchema<{
|
|
1019
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1020
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1021
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1022
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1023
|
+
}, undefined>, undefined>;
|
|
1024
|
+
mw: v.OptionalSchema<v.ObjectSchema<{
|
|
1025
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1026
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1027
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1028
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1029
|
+
}, undefined>, undefined>;
|
|
1030
|
+
tw: v.OptionalSchema<v.ObjectSchema<{
|
|
1031
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1032
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1033
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1034
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1035
|
+
}, undefined>, undefined>;
|
|
1036
|
+
zh: v.OptionalSchema<v.ObjectSchema<{
|
|
1037
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1038
|
+
readonly card: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1039
|
+
/** False when this locale is showing the source as a safe fallback. */
|
|
1040
|
+
readonly translated: v.BooleanSchema<undefined>;
|
|
1041
|
+
}, undefined>, undefined>;
|
|
1042
|
+
};
|
|
1043
|
+
readonly "~standard": v.StandardProps<{
|
|
1044
|
+
de?: {
|
|
1045
|
+
content: string;
|
|
1046
|
+
card?: string | undefined;
|
|
1047
|
+
translated: boolean;
|
|
1048
|
+
} | undefined;
|
|
1049
|
+
en?: {
|
|
1050
|
+
content: string;
|
|
1051
|
+
card?: string | undefined;
|
|
1052
|
+
translated: boolean;
|
|
1053
|
+
} | undefined;
|
|
1054
|
+
es?: {
|
|
1055
|
+
content: string;
|
|
1056
|
+
card?: string | undefined;
|
|
1057
|
+
translated: boolean;
|
|
1058
|
+
} | undefined;
|
|
1059
|
+
fr?: {
|
|
1060
|
+
content: string;
|
|
1061
|
+
card?: string | undefined;
|
|
1062
|
+
translated: boolean;
|
|
1063
|
+
} | undefined;
|
|
1064
|
+
ja?: {
|
|
1065
|
+
content: string;
|
|
1066
|
+
card?: string | undefined;
|
|
1067
|
+
translated: boolean;
|
|
1068
|
+
} | undefined;
|
|
1069
|
+
ko?: {
|
|
1070
|
+
content: string;
|
|
1071
|
+
card?: string | undefined;
|
|
1072
|
+
translated: boolean;
|
|
1073
|
+
} | undefined;
|
|
1074
|
+
mw?: {
|
|
1075
|
+
content: string;
|
|
1076
|
+
card?: string | undefined;
|
|
1077
|
+
translated: boolean;
|
|
1078
|
+
} | undefined;
|
|
1079
|
+
tw?: {
|
|
1080
|
+
content: string;
|
|
1081
|
+
card?: string | undefined;
|
|
1082
|
+
translated: boolean;
|
|
1083
|
+
} | undefined;
|
|
1084
|
+
zh?: {
|
|
1085
|
+
content: string;
|
|
1086
|
+
card?: string | undefined;
|
|
1087
|
+
translated: boolean;
|
|
1088
|
+
} | undefined;
|
|
1089
|
+
}, {
|
|
1090
|
+
de?: {
|
|
1091
|
+
content: string;
|
|
1092
|
+
card?: string | undefined;
|
|
1093
|
+
translated: boolean;
|
|
1094
|
+
} | undefined;
|
|
1095
|
+
en?: {
|
|
1096
|
+
content: string;
|
|
1097
|
+
card?: string | undefined;
|
|
1098
|
+
translated: boolean;
|
|
1099
|
+
} | undefined;
|
|
1100
|
+
es?: {
|
|
1101
|
+
content: string;
|
|
1102
|
+
card?: string | undefined;
|
|
1103
|
+
translated: boolean;
|
|
1104
|
+
} | undefined;
|
|
1105
|
+
fr?: {
|
|
1106
|
+
content: string;
|
|
1107
|
+
card?: string | undefined;
|
|
1108
|
+
translated: boolean;
|
|
1109
|
+
} | undefined;
|
|
1110
|
+
ja?: {
|
|
1111
|
+
content: string;
|
|
1112
|
+
card?: string | undefined;
|
|
1113
|
+
translated: boolean;
|
|
1114
|
+
} | undefined;
|
|
1115
|
+
ko?: {
|
|
1116
|
+
content: string;
|
|
1117
|
+
card?: string | undefined;
|
|
1118
|
+
translated: boolean;
|
|
1119
|
+
} | undefined;
|
|
1120
|
+
mw?: {
|
|
1121
|
+
content: string;
|
|
1122
|
+
card?: string | undefined;
|
|
1123
|
+
translated: boolean;
|
|
1124
|
+
} | undefined;
|
|
1125
|
+
tw?: {
|
|
1126
|
+
content: string;
|
|
1127
|
+
card?: string | undefined;
|
|
1128
|
+
translated: boolean;
|
|
1129
|
+
} | undefined;
|
|
1130
|
+
zh?: {
|
|
1131
|
+
content: string;
|
|
1132
|
+
card?: string | undefined;
|
|
1133
|
+
translated: boolean;
|
|
1134
|
+
} | undefined;
|
|
1135
|
+
}>;
|
|
1136
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
1137
|
+
de?: {
|
|
1138
|
+
content: string;
|
|
1139
|
+
card?: string | undefined;
|
|
1140
|
+
translated: boolean;
|
|
1141
|
+
} | undefined;
|
|
1142
|
+
en?: {
|
|
1143
|
+
content: string;
|
|
1144
|
+
card?: string | undefined;
|
|
1145
|
+
translated: boolean;
|
|
1146
|
+
} | undefined;
|
|
1147
|
+
es?: {
|
|
1148
|
+
content: string;
|
|
1149
|
+
card?: string | undefined;
|
|
1150
|
+
translated: boolean;
|
|
1151
|
+
} | undefined;
|
|
1152
|
+
fr?: {
|
|
1153
|
+
content: string;
|
|
1154
|
+
card?: string | undefined;
|
|
1155
|
+
translated: boolean;
|
|
1156
|
+
} | undefined;
|
|
1157
|
+
ja?: {
|
|
1158
|
+
content: string;
|
|
1159
|
+
card?: string | undefined;
|
|
1160
|
+
translated: boolean;
|
|
1161
|
+
} | undefined;
|
|
1162
|
+
ko?: {
|
|
1163
|
+
content: string;
|
|
1164
|
+
card?: string | undefined;
|
|
1165
|
+
translated: boolean;
|
|
1166
|
+
} | undefined;
|
|
1167
|
+
mw?: {
|
|
1168
|
+
content: string;
|
|
1169
|
+
card?: string | undefined;
|
|
1170
|
+
translated: boolean;
|
|
1171
|
+
} | undefined;
|
|
1172
|
+
tw?: {
|
|
1173
|
+
content: string;
|
|
1174
|
+
card?: string | undefined;
|
|
1175
|
+
translated: boolean;
|
|
1176
|
+
} | undefined;
|
|
1177
|
+
zh?: {
|
|
1178
|
+
content: string;
|
|
1179
|
+
card?: string | undefined;
|
|
1180
|
+
translated: boolean;
|
|
1181
|
+
} | undefined;
|
|
1182
|
+
}, v.BooleanIssue | v.ObjectIssue | v.RegexIssue<string> | v.StringIssue>;
|
|
1183
|
+
readonly "~types"?: {
|
|
1184
|
+
readonly input: {
|
|
1185
|
+
de?: {
|
|
1186
|
+
content: string;
|
|
1187
|
+
card?: string | undefined;
|
|
1188
|
+
translated: boolean;
|
|
1189
|
+
} | undefined;
|
|
1190
|
+
en?: {
|
|
1191
|
+
content: string;
|
|
1192
|
+
card?: string | undefined;
|
|
1193
|
+
translated: boolean;
|
|
1194
|
+
} | undefined;
|
|
1195
|
+
es?: {
|
|
1196
|
+
content: string;
|
|
1197
|
+
card?: string | undefined;
|
|
1198
|
+
translated: boolean;
|
|
1199
|
+
} | undefined;
|
|
1200
|
+
fr?: {
|
|
1201
|
+
content: string;
|
|
1202
|
+
card?: string | undefined;
|
|
1203
|
+
translated: boolean;
|
|
1204
|
+
} | undefined;
|
|
1205
|
+
ja?: {
|
|
1206
|
+
content: string;
|
|
1207
|
+
card?: string | undefined;
|
|
1208
|
+
translated: boolean;
|
|
1209
|
+
} | undefined;
|
|
1210
|
+
ko?: {
|
|
1211
|
+
content: string;
|
|
1212
|
+
card?: string | undefined;
|
|
1213
|
+
translated: boolean;
|
|
1214
|
+
} | undefined;
|
|
1215
|
+
mw?: {
|
|
1216
|
+
content: string;
|
|
1217
|
+
card?: string | undefined;
|
|
1218
|
+
translated: boolean;
|
|
1219
|
+
} | undefined;
|
|
1220
|
+
tw?: {
|
|
1221
|
+
content: string;
|
|
1222
|
+
card?: string | undefined;
|
|
1223
|
+
translated: boolean;
|
|
1224
|
+
} | undefined;
|
|
1225
|
+
zh?: {
|
|
1226
|
+
content: string;
|
|
1227
|
+
card?: string | undefined;
|
|
1228
|
+
translated: boolean;
|
|
1229
|
+
} | undefined;
|
|
1230
|
+
};
|
|
1231
|
+
readonly output: {
|
|
1232
|
+
de?: {
|
|
1233
|
+
content: string;
|
|
1234
|
+
card?: string | undefined;
|
|
1235
|
+
translated: boolean;
|
|
1236
|
+
} | undefined;
|
|
1237
|
+
en?: {
|
|
1238
|
+
content: string;
|
|
1239
|
+
card?: string | undefined;
|
|
1240
|
+
translated: boolean;
|
|
1241
|
+
} | undefined;
|
|
1242
|
+
es?: {
|
|
1243
|
+
content: string;
|
|
1244
|
+
card?: string | undefined;
|
|
1245
|
+
translated: boolean;
|
|
1246
|
+
} | undefined;
|
|
1247
|
+
fr?: {
|
|
1248
|
+
content: string;
|
|
1249
|
+
card?: string | undefined;
|
|
1250
|
+
translated: boolean;
|
|
1251
|
+
} | undefined;
|
|
1252
|
+
ja?: {
|
|
1253
|
+
content: string;
|
|
1254
|
+
card?: string | undefined;
|
|
1255
|
+
translated: boolean;
|
|
1256
|
+
} | undefined;
|
|
1257
|
+
ko?: {
|
|
1258
|
+
content: string;
|
|
1259
|
+
card?: string | undefined;
|
|
1260
|
+
translated: boolean;
|
|
1261
|
+
} | undefined;
|
|
1262
|
+
mw?: {
|
|
1263
|
+
content: string;
|
|
1264
|
+
card?: string | undefined;
|
|
1265
|
+
translated: boolean;
|
|
1266
|
+
} | undefined;
|
|
1267
|
+
tw?: {
|
|
1268
|
+
content: string;
|
|
1269
|
+
card?: string | undefined;
|
|
1270
|
+
translated: boolean;
|
|
1271
|
+
} | undefined;
|
|
1272
|
+
zh?: {
|
|
1273
|
+
content: string;
|
|
1274
|
+
card?: string | undefined;
|
|
1275
|
+
translated: boolean;
|
|
1276
|
+
} | undefined;
|
|
1277
|
+
};
|
|
1278
|
+
readonly issue: v.BooleanIssue | v.ObjectIssue | v.RegexIssue<string> | v.StringIssue;
|
|
1279
|
+
} | undefined;
|
|
1280
|
+
};
|
|
1281
|
+
}, undefined>;
|
|
1282
|
+
};
|
|
1283
|
+
readonly article: {
|
|
1284
|
+
readonly version: 1;
|
|
1285
|
+
readonly schema: v.ObjectSchema<{
|
|
1286
|
+
readonly version: v.NumberSchema<undefined>;
|
|
1287
|
+
readonly dates: v.ObjectSchema<{
|
|
1288
|
+
readonly created: v.StringSchema<undefined>;
|
|
1289
|
+
readonly published: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1290
|
+
readonly lastmod: v.StringSchema<undefined>;
|
|
1291
|
+
}, undefined>;
|
|
1292
|
+
readonly tags: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1293
|
+
}, undefined>;
|
|
1294
|
+
};
|
|
1295
|
+
readonly notice: {
|
|
1296
|
+
readonly version: 1;
|
|
1297
|
+
readonly schema: v.ObjectSchema<{
|
|
1298
|
+
readonly version: v.NumberSchema<undefined>;
|
|
1299
|
+
readonly generated: v.StringSchema<undefined>;
|
|
1300
|
+
}, undefined>;
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
export type LayerName = keyof typeof LAYERS;
|
|
1304
|
+
export type LayerOf<N extends LayerName> = v.InferOutput<(typeof LAYERS)[N]['schema']>;
|
|
1305
|
+
export type MediaLayer = v.InferOutput<typeof MediaLayerSchema>;
|
|
1306
|
+
export type ImageLayer = v.InferOutput<typeof ImageLayerSchema>;
|
|
1307
|
+
export type ImageVariant = v.InferOutput<typeof ImageVariantSchema>;
|
|
1308
|
+
export type PhotoLayer = v.InferOutput<typeof PhotoLayerSchema>;
|
|
1309
|
+
export type ScreenshotLayer = v.InferOutput<typeof ScreenshotLayerSchema>;
|
|
1310
|
+
export type FrameLayer = v.InferOutput<typeof FrameLayerSchema>;
|
|
1311
|
+
export type IconLayer = v.InferOutput<typeof IconLayerSchema>;
|
|
1312
|
+
export type MarkLayer = v.InferOutput<typeof MarkLayerSchema>;
|
|
1313
|
+
export type VideoLayer = v.InferOutput<typeof VideoLayerSchema>;
|
|
1314
|
+
export type ClipLayer = v.InferOutput<typeof ClipLayerSchema>;
|
|
1315
|
+
export type DocumentLayer = v.InferOutput<typeof DocumentLayerSchema>;
|
|
1316
|
+
export type ArticleLayer = v.InferOutput<typeof ArticleLayerSchema>;
|
|
1317
|
+
export type NoticeLayer = v.InferOutput<typeof NoticeLayerSchema>;
|
|
1318
|
+
export declare function isLayerName(value: string): value is LayerName;
|
|
1319
|
+
/**
|
|
1320
|
+
* What a bare resource id means, written as a scheme rather than as an address.
|
|
1321
|
+
*
|
|
1322
|
+
* An absolute URL here would bake a hostname into every record, so changing one would mean
|
|
1323
|
+
* rewriting all of them. A scheme is expanded by whoever answers, from `@monoflake/sdk`, which is
|
|
1324
|
+
* the one place a hostname is declared. `services/libs/fonts` already does this with `__CDN_URL__`.
|
|
1325
|
+
*/
|
|
1326
|
+
export declare const CANONICAL_PATTERN: RegExp;
|
|
1327
|
+
/**
|
|
1328
|
+
* Six fields and a container, which is the whole record.
|
|
1329
|
+
*
|
|
1330
|
+
* `layers` is read loosely here on purpose: the envelope's job is to find the layers and say how
|
|
1331
|
+
* old each one is, and which schema a layer is then read under is its segment's to decide. A
|
|
1332
|
+
* strict object at this level would strip every field the register is about to ask for.
|
|
1333
|
+
*/
|
|
1334
|
+
export declare const ResourceSchema: v.ObjectSchema<{
|
|
1335
|
+
readonly version: v.LiteralSchema<5, undefined>;
|
|
1336
|
+
readonly resource: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1337
|
+
readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1338
|
+
readonly created: v.StringSchema<undefined>;
|
|
1339
|
+
readonly updated: v.StringSchema<undefined>;
|
|
1340
|
+
readonly canonical: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1341
|
+
readonly layers: v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
|
|
1342
|
+
readonly version: v.NumberSchema<undefined>;
|
|
1343
|
+
}, undefined>, undefined>;
|
|
1344
|
+
}, undefined>;
|
|
1345
|
+
export type Resource = v.InferOutput<typeof ResourceSchema>;
|
|
1346
|
+
/**
|
|
1347
|
+
* A canonical scheme expanded against the hosts this deployment knows.
|
|
1348
|
+
*
|
|
1349
|
+
* `cid:` names an object and `slug:` names an article, and neither carries a hostname -- which is
|
|
1350
|
+
* what lets a domain move without a record being touched. A slug needs no lookup: the site
|
|
1351
|
+
* resolves a bare name to the article's real path itself.
|
|
1352
|
+
*/
|
|
1353
|
+
export declare function expandCanonical(canonical: string, hosts: {
|
|
1354
|
+
cdn: string;
|
|
1355
|
+
site: string;
|
|
1356
|
+
}): string | undefined;
|
|
1357
|
+
/** The segments of a type, in the order they narrow. `media.image.photo` is three claims. */
|
|
1358
|
+
export declare function parseType(type: string): string[];
|
|
1359
|
+
/**
|
|
1360
|
+
* A record as this build understands it, which may be less than the record declares.
|
|
1361
|
+
*
|
|
1362
|
+
* `segments` is what parsed rather than what was claimed, so a consumer asking whether it got
|
|
1363
|
+
* what it needed asks that list and not `type`.
|
|
1364
|
+
*/
|
|
1365
|
+
export type ParsedResource = {
|
|
1366
|
+
resource: ResourceId;
|
|
1367
|
+
type: string;
|
|
1368
|
+
created: string;
|
|
1369
|
+
updated: string;
|
|
1370
|
+
segments: LayerName[];
|
|
1371
|
+
layers: { [N in LayerName]?: LayerOf<N>; };
|
|
1372
|
+
};
|
|
1373
|
+
/**
|
|
1374
|
+
* Read a record for as much of it as this build knows, and stop rather than fall over.
|
|
1375
|
+
*
|
|
1376
|
+
* Both sides of a change are pushed together and the only skew is minutes, which does not justify
|
|
1377
|
+
* a compatibility contract -- it justifies not falling over. So an unknown segment or a layer
|
|
1378
|
+
* numbered too high ends the chain and keeps what came before it. See
|
|
1379
|
+
* spec/architecture/resource.md, "Parsing is optimistic, not compatible".
|
|
1380
|
+
*/
|
|
1381
|
+
export declare function parseResource(value: unknown): ParsedResource;
|
|
1382
|
+
/**
|
|
1383
|
+
* The layer a caller cannot proceed without, or an error naming what it got instead.
|
|
1384
|
+
*
|
|
1385
|
+
* The one strict reading in the file, and the difference is worth stating: everything above is "I
|
|
1386
|
+
* do not know about this", which is survivable, and this is "this is not the thing you asked
|
|
1387
|
+
* for", which is not. Answering it with a blank is how a missing image becomes a missing image
|
|
1388
|
+
* nobody reports. See spec/architecture/resource.md, "Parsing is optimistic, not compatible".
|
|
1389
|
+
*/
|
|
1390
|
+
export declare function requireSegment<N extends LayerName>(resource: ParsedResource, segment: N): LayerOf<N>;
|
|
1391
|
+
//#endregion
|