@valbuild/shared 0.140.0 → 0.141.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/CHANGELOG.md CHANGED
@@ -1,5 +1,83 @@
1
1
  # @valbuild/shared
2
2
 
3
+ ## 0.141.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#802](https://github.com/valbuild/val/pull/802) [`199e214`](https://github.com/valbuild/val/commit/199e21471d98806fb34c579cb876560078c928b9) Thanks [@freekh](https://github.com/freekh)! - New: `files: { remote: true }` in `val.config.ts` stores every image, file and video on Val's remote content host.
8
+
9
+ ```ts
10
+ const { s, c, val, config } = initVal({
11
+ project: "myorg/myproject",
12
+ files: { remote: true },
13
+ });
14
+ ```
15
+
16
+ With it, `s.image()`, `s.file()`, `s.video()`, `s.imageset()`, `s.fileset()`, `s.videoset()` and `s.richtext({ img: true })` behave as though `.remote()` had been written on them. Images already in the project are reported as `image:upload-remote` until they are uploaded; `npx val validate --fix` does that.
17
+
18
+ **Required in the Val app.** A project running there (`VAL_ENV=app`) refuses to start without it, with an error that says what to add, and `val publish` refuses before it builds.
19
+
20
+ **Breaking:** `files.directory` has been removed from `val.config.ts`. Local files that have no `dir` of their own are stored in `/public/val`, which was the default.
21
+
22
+ - [#779](https://github.com/valbuild/val/pull/779) [`ba3f330`](https://github.com/valbuild/val/commit/ba3f3300a3dd8649e154097cdfca3b64db209d89) Thanks [@freekh](https://github.com/freekh)! - New: `s.video()`, for mp4/WebM files and HLS streams.
23
+
24
+ ```ts
25
+ const schema = s.object({
26
+ intro: s.video({ stream: { type: "hls" } }),
27
+ });
28
+ ```
29
+
30
+ - **Upload and play in the Studio.** A video field shows a player, the file's size and length, and progress while it uploads.
31
+ - **HLS streaming without a video service.** With `stream: { type: "hls" }`, the Studio converts an upload to an HLS stream in the editor's browser before it uploads it. It makes one H.264 rendition per height (1080p, 720p and 480p by default, and never larger than the upload) and stores them as a folder of files next to your other uploads. Nothing is installed in your app for this: the converter ships inside the Studio and is only downloaded when someone uploads to a streaming field. A browser that can't convert (no WebCodecs, or a non-https address) uploads the original file and says so.
32
+ - **Poster:** pause on a frame and choose "Use current frame". The frame is saved as an image, and `posterTime` records where it was taken.
33
+ - **Start and end:** play part of a video without cutting the file.
34
+ - **Focal point:** marks what must stay in frame when the page crops the video.
35
+ - **Description:** text for people who can't see the video.
36
+ - **Captions:** one WebVTT file per language. `.srt` files are converted on upload.
37
+ - **`<ValVideo>`** in `@valbuild/next` and `@valbuild/tanstack` renders all of the above and is click-to-edit. For HLS in browsers that can't play it natively, pass `hls={() => import("hls.js")}`. It is only loaded when it's needed.
38
+ - **Rename** a video in the Studio. An HLS stream is renamed as a whole: every playlist and segment moves to the new folder.
39
+ - `npx val validate --fix` fills in `mimeType`, `width`, `height` and `duration` for a hand-written `.mp4`, `.mov`, `.webm`, `.mkv` or HLS video, on disk or on Val Remote. A remote video is not downloaded: only its headers are read, usually in one to three small requests.
40
+ - `.remote()` works for videos. `npx val validate --fix` moves a video to Val Remote, or back into the project, together with its poster, captions and every file of an HLS stream.
41
+
42
+ A video value always has a `mimeType`: it is how a page knows whether it has an `.mp4` or an `.m3u8`.
43
+
44
+ New: `s.videoset()`, a collection of videos, like `s.imageset()` for images.
45
+
46
+ ```ts
47
+ const videosVal = c.define(
48
+ "/content/videos.val.ts",
49
+ s.videoset({ dir: "/public/val/videos", stream: { type: "hls" } }),
50
+ {},
51
+ );
52
+ const schema = s.object({ intro: s.video(videosVal) });
53
+ ```
54
+
55
+ - **Upload once, set it up once, use anywhere.** A set's entry holds what is true of the file (its type, size and length) and, as defaults, a description, poster, start and end, focal point and captions. A field that picks from the set (`s.video(videosVal)`) gets all of those, and can override any of them on its own. For example, the same clip can open one page at 0:02 and every other page where the set says.
56
+ - **Media in the Studio.** A set is listed under Media and opens as a gallery of videos, with each video's poster as its thumbnail. Hovering a video previews it, and the selected video plays in a real player (HLS streams too) beside the poster, times, focal point and captions you edit for it. You can upload into the set (with `stream`, uploads become HLS streams, and each upload gets a poster), rename a video, and delete a video that nothing uses. Renaming a video updates every field that uses it. An HLS stream is one entry, and renaming or deleting it moves or removes all of its files.
57
+ - **Picking.** A set-backed field picks from the set, or uploads into it. Each value the set provides is marked "From gallery · Override", and once overridden, "Overridden · Use gallery's".
58
+ - `useVal` and `fetchVal` fill in what the set holds (`mimeType`, `width`, `height`, `duration`, and every default the field does not override), so `<ValVideo>` works the same either way.
59
+ - `.remote()` works for sets. `npx val validate --fix` fills in missing metadata for an entry, adds untracked videos found in the set's directory, and moves a set's videos to Val Remote.
60
+
61
+ Image and file galleries use the same new gallery layout: a grid or list of entries, with the selected one open in a panel beside it.
62
+
63
+ - An `s.imageset()` entry can hold a default focal point, as well as its description. An `s.image(galleryVal)` field shows both, and can override either.
64
+ - Fixed: outside draft mode, `useVal` and `fetchVal` now fill a gallery-backed image or file from its gallery (dimensions, mime type, description). Before, a published page got only the `path`.
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [[`199e214`](https://github.com/valbuild/val/commit/199e21471d98806fb34c579cb876560078c928b9), [`ba3f330`](https://github.com/valbuild/val/commit/ba3f3300a3dd8649e154097cdfca3b64db209d89)]:
69
+ - @valbuild/core@0.141.0
70
+
71
+ ## 0.140.2
72
+
73
+ ### Patch Changes
74
+
75
+ - [#792](https://github.com/valbuild/val/pull/792) [`df1e5f5`](https://github.com/valbuild/val/commit/df1e5f5f94391f25c71839cc476a51198b90db4d) Thanks [@freekh](https://github.com/freekh)! - The Publish button no longer turns green while a publish is still running, in any tab or on any device. Before, the changes being published still counted as unpublished until the publish went live. So from about 64% on the progress, Publish lit up over them again: in the tab that pressed it, in every other open Studio, and on another device.
76
+
77
+ The button now reads "Publishing" for those changes until the publish is live, and you can press it again only for changes made since. If a publish fails, its changes become publishable again straight away.
78
+
79
+ Val Build's content service now reports which changes a running publish holds, and the Studio reads that from `/stat` and the live connection. A content service that doesn't report it keeps the previous behaviour, except in the tab that pressed Publish.
80
+
3
81
  ## 0.140.0
4
82
 
5
83
  ### Minor Changes
@@ -412,6 +412,7 @@ export declare const Api: {
412
412
  sourcesSha: z.ZodString;
413
413
  patches: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
414
414
  appliedPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
415
+ publishingPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
415
416
  headCommitSha: z.ZodOptional<z.ZodString>;
416
417
  removed: z.ZodOptional<z.ZodArray<z.ZodObject<{
417
418
  patchId: z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>;
@@ -421,7 +422,7 @@ export declare const Api: {
421
422
  project: z.ZodOptional<z.ZodString>;
422
423
  root: z.ZodOptional<z.ZodString>;
423
424
  files: z.ZodOptional<z.ZodObject<{
424
- directory: z.ZodString;
425
+ remote: z.ZodOptional<z.ZodBoolean>;
425
426
  }, z.core.$strip>>;
426
427
  gitCommit: z.ZodOptional<z.ZodString>;
427
428
  gitBranch: z.ZodOptional<z.ZodString>;
@@ -445,6 +446,7 @@ export declare const Api: {
445
446
  commitSha: z.ZodOptional<z.ZodString>;
446
447
  patches: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
447
448
  appliedPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
449
+ publishingPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
448
450
  headCommitSha: z.ZodOptional<z.ZodString>;
449
451
  headPatchId: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
450
452
  headVersion: z.ZodOptional<z.ZodNumber>;
@@ -476,7 +478,7 @@ export declare const Api: {
476
478
  project: z.ZodOptional<z.ZodString>;
477
479
  root: z.ZodOptional<z.ZodString>;
478
480
  files: z.ZodOptional<z.ZodObject<{
479
- directory: z.ZodString;
481
+ remote: z.ZodOptional<z.ZodBoolean>;
480
482
  }, z.core.$strip>>;
481
483
  gitCommit: z.ZodOptional<z.ZodString>;
482
484
  gitBranch: z.ZodOptional<z.ZodString>;
@@ -1088,7 +1090,7 @@ export declare const Api: {
1088
1090
  message: z.ZodString;
1089
1091
  value: z.ZodOptional<z.ZodUnknown>;
1090
1092
  fatal: z.ZodOptional<z.ZodBoolean>;
1091
- fixes: z.ZodOptional<z.ZodArray<z.ZodType<"image:add-metadata" | "image:check-metadata" | "image:upload-remote" | "image:download-remote" | "image:check-remote" | "images:check-remote" | "images:upload-remote" | "file:add-metadata" | "file:check-metadata" | "file:upload-remote" | "file:download-remote" | "file:check-remote" | "files:check-remote" | "files:upload-remote" | "keyof:check-keys" | "router:check-route" | "locale:check-locale" | "images:check-unique-folder" | "files:check-unique-folder" | "images:check-all-files" | "files:check-all-files" | "jsonValues:extract-entry" | "record:fill-keys" | "external:upload" | "view:check-module", unknown, z.core.$ZodTypeInternals<"image:add-metadata" | "image:check-metadata" | "image:upload-remote" | "image:download-remote" | "image:check-remote" | "images:check-remote" | "images:upload-remote" | "file:add-metadata" | "file:check-metadata" | "file:upload-remote" | "file:download-remote" | "file:check-remote" | "files:check-remote" | "files:upload-remote" | "keyof:check-keys" | "router:check-route" | "locale:check-locale" | "images:check-unique-folder" | "files:check-unique-folder" | "images:check-all-files" | "files:check-all-files" | "jsonValues:extract-entry" | "record:fill-keys" | "external:upload" | "view:check-module", unknown>>>>;
1093
+ fixes: z.ZodOptional<z.ZodArray<z.ZodType<"image:add-metadata" | "image:check-metadata" | "image:upload-remote" | "image:download-remote" | "image:check-remote" | "images:check-remote" | "images:upload-remote" | "file:add-metadata" | "file:check-metadata" | "file:upload-remote" | "file:download-remote" | "file:check-remote" | "files:check-remote" | "files:upload-remote" | "video:add-metadata" | "video:upload-remote" | "video:download-remote" | "videos:add-metadata" | "videos:check-remote" | "videos:upload-remote" | "keyof:check-keys" | "router:check-route" | "locale:check-locale" | "images:check-unique-folder" | "files:check-unique-folder" | "images:check-all-files" | "files:check-all-files" | "videos:check-unique-folder" | "videos:check-all-files" | "jsonValues:extract-entry" | "record:fill-keys" | "external:upload" | "view:check-module", unknown, z.core.$ZodTypeInternals<"image:add-metadata" | "image:check-metadata" | "image:upload-remote" | "image:download-remote" | "image:check-remote" | "images:check-remote" | "images:upload-remote" | "file:add-metadata" | "file:check-metadata" | "file:upload-remote" | "file:download-remote" | "file:check-remote" | "files:check-remote" | "files:upload-remote" | "video:add-metadata" | "video:upload-remote" | "video:download-remote" | "videos:add-metadata" | "videos:check-remote" | "videos:upload-remote" | "keyof:check-keys" | "router:check-route" | "locale:check-locale" | "images:check-unique-folder" | "files:check-unique-folder" | "images:check-all-files" | "files:check-all-files" | "videos:check-unique-folder" | "videos:check-all-files" | "jsonValues:extract-entry" | "record:fill-keys" | "external:upload" | "view:check-module", unknown>>>>;
1092
1094
  }, z.core.$strip>>>>;
1093
1095
  }, z.core.$strip>>;
1094
1096
  }, z.core.$strip>;
@@ -1666,6 +1668,9 @@ export declare const Api: {
1666
1668
  })[]>>>;
1667
1669
  remote: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>>>;
1668
1670
  };
1671
+ headers: {
1672
+ range: z.ZodOptional<z.ZodString>;
1673
+ };
1669
1674
  };
1670
1675
  res: z.ZodUnion<readonly [z.ZodObject<{
1671
1676
  status: z.ZodLiteral<401>;
@@ -1680,6 +1685,14 @@ export declare const Api: {
1680
1685
  }, z.core.$strip>, z.ZodObject<{
1681
1686
  status: z.ZodLiteral<200>;
1682
1687
  body: z.ZodCustom<import("node:stream/web").ReadableStream<unknown>, import("node:stream/web").ReadableStream<unknown>>;
1688
+ }, z.core.$strip>, z.ZodObject<{
1689
+ status: z.ZodLiteral<206>;
1690
+ body: z.ZodCustom<import("node:stream/web").ReadableStream<unknown>, import("node:stream/web").ReadableStream<unknown>>;
1691
+ }, z.core.$strip>, z.ZodObject<{
1692
+ status: z.ZodLiteral<416>;
1693
+ json: z.ZodObject<{
1694
+ message: z.ZodString;
1695
+ }, z.core.$strip>;
1683
1696
  }, z.core.$strip>]>;
1684
1697
  };
1685
1698
  };
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { type SerializedSchema as SerializedSchemaT, type SerializedStringSchema as SerializedStringSchemaT, type SerializedLiteralSchema as SerializedLiteralSchemaT, type SerializedBooleanSchema as SerializedBooleanSchemaT, type SerializedNumberSchema as SerializedNumberSchemaT, type SerializedObjectSchema as SerializedObjectSchemaT, type SerializedArraySchema as SerializedArraySchemaT, type SerializedDiscriminatedUnionSchema as SerializedDiscriminatedUnionSchemaT, type SerializedEnumSchema as SerializedEnumSchemaT, type SerializedRichTextSchema as SerializedRichTextSchemaT, type SerializedRichTextOptions as SerializedRichTextOptionsT, type SerializedRecordSchema as SerializedRecordSchemaT, type SerializedKeyOfSchema as SerializedKeyOfSchemaT, type SerializedLocaleSchema as SerializedLocaleSchemaT, type SerializedRouteSchema as SerializedRouteSchemaT, type SerializedFileSchema as SerializedFileSchemaT, type SerializedDateSchema as SerializedDateSchemaT, type SerializedDateTimeSchema as SerializedDateTimeSchemaT, type SerializedColorSchema as SerializedColorSchemaT, type SerializedCodeSchema as SerializedCodeSchemaT, type SerializedImageSchema as SerializedImageSchemaT, type SerializedSettingsSchema as SerializedSettingsSchemaT } from "@valbuild/core";
2
+ import { type SerializedSchema as SerializedSchemaT, type SerializedStringSchema as SerializedStringSchemaT, type SerializedLiteralSchema as SerializedLiteralSchemaT, type SerializedBooleanSchema as SerializedBooleanSchemaT, type SerializedNumberSchema as SerializedNumberSchemaT, type SerializedObjectSchema as SerializedObjectSchemaT, type SerializedArraySchema as SerializedArraySchemaT, type SerializedDiscriminatedUnionSchema as SerializedDiscriminatedUnionSchemaT, type SerializedEnumSchema as SerializedEnumSchemaT, type SerializedRichTextSchema as SerializedRichTextSchemaT, type SerializedRichTextOptions as SerializedRichTextOptionsT, type SerializedRecordSchema as SerializedRecordSchemaT, type SerializedKeyOfSchema as SerializedKeyOfSchemaT, type SerializedLocaleSchema as SerializedLocaleSchemaT, type SerializedRouteSchema as SerializedRouteSchemaT, type SerializedFileSchema as SerializedFileSchemaT, type SerializedDateSchema as SerializedDateSchemaT, type SerializedDateTimeSchema as SerializedDateTimeSchemaT, type SerializedColorSchema as SerializedColorSchemaT, type SerializedCodeSchema as SerializedCodeSchemaT, type SerializedImageSchema as SerializedImageSchemaT, type SerializedVideoSchema as SerializedVideoSchemaT, type SerializedSettingsSchema as SerializedSettingsSchemaT } from "@valbuild/core";
3
3
  export declare const SerializedStringSchema: z.ZodType<SerializedStringSchemaT>;
4
4
  export declare const SerializedLiteralSchema: z.ZodType<SerializedLiteralSchemaT>;
5
5
  export declare const SerializedBooleanSchema: z.ZodType<SerializedBooleanSchemaT>;
@@ -33,6 +33,21 @@ export declare const FileOptions: z.ZodObject<{
33
33
  accept: z.ZodOptional<z.ZodString>;
34
34
  }, z.core.$strip>;
35
35
  export declare const SerializedFileSchema: z.ZodType<SerializedFileSchemaT>;
36
+ export declare const VideoStreamOption: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
37
+ type: z.ZodLiteral<"hls">;
38
+ renditions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
39
+ segmentDuration: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strip>]>;
41
+ export declare const VideoOptions: z.ZodObject<{
42
+ dir: z.ZodOptional<z.ZodString>;
43
+ accept: z.ZodOptional<z.ZodString>;
44
+ stream: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
45
+ type: z.ZodLiteral<"hls">;
46
+ renditions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
47
+ segmentDuration: z.ZodOptional<z.ZodNumber>;
48
+ }, z.core.$strip>]>>;
49
+ }, z.core.$strip>;
50
+ export declare const SerializedVideoSchema: z.ZodType<SerializedVideoSchemaT>;
36
51
  export declare const DateOptions: z.ZodObject<{
37
52
  from: z.ZodOptional<z.ZodString>;
38
53
  to: z.ZodOptional<z.ZodString>;
@@ -1165,13 +1165,16 @@ var SerializedRecordSchema = zod.z.lazy(function () {
1165
1165
  type: zod.z.literal("record"),
1166
1166
  item: SerializedSchema,
1167
1167
  opt: zod.z["boolean"](),
1168
- // Optional gallery marker for files/images
1169
- mediaType: zod.z.union([zod.z.literal("files"), zod.z.literal("images")]).optional(),
1168
+ // Optional gallery marker for files/images/videos
1169
+ mediaType: zod.z.union([zod.z.literal("files"), zod.z.literal("images"), zod.z.literal("videos")]).optional(),
1170
1170
  // Optional legacy gallery metadata
1171
1171
  accept: zod.z.string().optional(),
1172
1172
  dir: zod.z.string().optional(),
1173
1173
  remote: zod.z["boolean"]().optional(),
1174
1174
  encode: ImageEncodeOption.optional(),
1175
+ // A videoset's: see `VideoStreamOption` below for why it is spelled
1176
+ // out rather than passed through.
1177
+ stream: VideoStreamOption.optional(),
1175
1178
  alt: SerializedSchema.optional(),
1176
1179
  moduleMetadata: zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.any())).optional()
1177
1180
  })).passthrough());
@@ -1205,6 +1208,29 @@ var SerializedFileSchema = zod.z.object(getSitemapTree._objectSpread2(getSitemap
1205
1208
  remote: zod.z["boolean"]().optional(),
1206
1209
  referencedModule: zod.z.string().optional()
1207
1210
  }));
1211
+
1212
+ // `stream` is the one option that changes what an upload BECOMES, so it is
1213
+ // declared field by field: these z.objects strip unknown keys, and a stream
1214
+ // dropped in transit is a Studio that uploads a 2 GB mp4 where an HLS stream
1215
+ // was asked for.
1216
+ var VideoStreamOption = zod.z.union([zod.z.literal(false), zod.z.object({
1217
+ type: zod.z.literal("hls"),
1218
+ renditions: zod.z.array(zod.z.number()).optional(),
1219
+ segmentDuration: zod.z.number().optional()
1220
+ })]);
1221
+ var VideoOptions = zod.z.object({
1222
+ dir: zod.z.string().optional(),
1223
+ accept: zod.z.string().optional(),
1224
+ stream: VideoStreamOption.optional()
1225
+ });
1226
+ var SerializedVideoSchema = zod.z.object(getSitemapTree._objectSpread2(getSitemapTree._objectSpread2({}, commonSchemaFields), {}, {
1227
+ type: zod.z.literal("video"),
1228
+ options: VideoOptions.optional(),
1229
+ opt: zod.z["boolean"](),
1230
+ remote: zod.z["boolean"]().optional(),
1231
+ // The `s.videoset()` a set-backed field picks from.
1232
+ referencedModule: zod.z.string().optional()
1233
+ }));
1208
1234
  var DateOptions = zod.z.object({
1209
1235
  from: zod.z.string().optional(),
1210
1236
  to: zod.z.string().optional()
@@ -1295,7 +1321,7 @@ var SerializedValViewSchema = zod.z.object({
1295
1321
  hidden: zod.z["boolean"]().optional(),
1296
1322
  description: zod.z.string().optional()
1297
1323
  });
1298
- var SerializedSchema = zod.z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedValViewSchema]);
1324
+ var SerializedSchema = zod.z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedVideoSchema, SerializedValViewSchema]);
1299
1325
 
1300
1326
  var ValCommit = zod.z.object({
1301
1327
  commitSha: zod.z.string(),
@@ -1476,12 +1502,12 @@ var ValConfig = zod.z.object({
1476
1502
  project: zod.z.string().optional(),
1477
1503
  root: zod.z.string().optional(),
1478
1504
  files: zod.z.object({
1479
- directory: zod.z.string() // TODO: validate that it is prefixed by /public/
1505
+ remote: zod.z["boolean"]().optional()
1480
1506
  }).optional(),
1481
1507
  gitCommit: zod.z.string().optional(),
1482
1508
  gitBranch: zod.z.string().optional()
1483
1509
  });
1484
- var ValidationFixZ = zod.z.union([zod.z.literal("image:add-metadata"), zod.z.literal("image:check-metadata"), zod.z.literal("image:check-remote"), zod.z.literal("image:upload-remote"), zod.z.literal("image:download-remote"), zod.z.literal("images:check-remote"), zod.z.literal("images:upload-remote"), zod.z.literal("file:add-metadata"), zod.z.literal("file:check-metadata"), zod.z.literal("file:check-remote"), zod.z.literal("file:upload-remote"), zod.z.literal("file:download-remote"), zod.z.literal("files:check-remote"), zod.z.literal("files:upload-remote"), zod.z.literal("keyof:check-keys"), zod.z.literal("router:check-route"), zod.z.literal("locale:check-locale"), zod.z.literal("record:fill-keys"), zod.z.literal("images:check-unique-folder"), zod.z.literal("files:check-unique-folder"), zod.z.literal("images:check-all-files"), zod.z.literal("files:check-all-files"), zod.z.literal("jsonValues:extract-entry"), zod.z.literal("view:check-module")]);
1510
+ var ValidationFixZ = zod.z.union([zod.z.literal("image:add-metadata"), zod.z.literal("image:check-metadata"), zod.z.literal("image:check-remote"), zod.z.literal("image:upload-remote"), zod.z.literal("image:download-remote"), zod.z.literal("images:check-remote"), zod.z.literal("images:upload-remote"), zod.z.literal("file:add-metadata"), zod.z.literal("video:add-metadata"), zod.z.literal("video:upload-remote"), zod.z.literal("video:download-remote"), zod.z.literal("videos:add-metadata"), zod.z.literal("videos:check-remote"), zod.z.literal("videos:upload-remote"), zod.z.literal("file:check-metadata"), zod.z.literal("file:check-remote"), zod.z.literal("file:upload-remote"), zod.z.literal("file:download-remote"), zod.z.literal("files:check-remote"), zod.z.literal("files:upload-remote"), zod.z.literal("keyof:check-keys"), zod.z.literal("router:check-route"), zod.z.literal("locale:check-locale"), zod.z.literal("record:fill-keys"), zod.z.literal("images:check-unique-folder"), zod.z.literal("files:check-unique-folder"), zod.z.literal("images:check-all-files"), zod.z.literal("files:check-all-files"), zod.z.literal("videos:check-unique-folder"), zod.z.literal("videos:check-all-files"), zod.z.literal("jsonValues:extract-entry"), zod.z.literal("view:check-module")]);
1485
1511
  var ValidationError = zod.z.object({
1486
1512
  message: zod.z.string(),
1487
1513
  value: zod.z.unknown().optional(),
@@ -1944,6 +1970,12 @@ var Api = {
1944
1970
  * client that ignores this behaves exactly as it did before.
1945
1971
  */
1946
1972
  appliedPatches: zod.z.array(PatchId).optional(),
1973
+ /*
1974
+ * Of `patches`, the ones a publish that is still running holds.
1975
+ * The Studio does not offer Publish over these. Whole on every
1976
+ * answer: a job that ends without sealing gives them back.
1977
+ */
1978
+ publishingPatches: zod.z.array(PatchId).optional(),
1947
1979
  /**
1948
1980
  * The newest commit, which is the PUBLISH head.
1949
1981
  *
@@ -2034,6 +2066,12 @@ var Api = {
2034
2066
  * client that ignores this behaves exactly as it did before.
2035
2067
  */
2036
2068
  appliedPatches: zod.z.array(PatchId).optional(),
2069
+ /*
2070
+ * Of `patches`, the ones a publish that is still running holds.
2071
+ * The Studio does not offer Publish over these. Whole on every
2072
+ * answer: a job that ends without sealing gives them back.
2073
+ */
2074
+ publishingPatches: zod.z.array(PatchId).optional(),
2037
2075
  /**
2038
2076
  * The newest commit, which is the PUBLISH head.
2039
2077
  *
@@ -3182,11 +3220,23 @@ var Api = {
3182
3220
  return arg[0];
3183
3221
  }).optional(),
3184
3222
  remote: onlyOneStringQueryParam.optional()
3223
+ },
3224
+ // A `<video>` seeks with byte ranges, Safari will not play one from a
3225
+ // server that ignores them, and HLS segments that are byte ranges of
3226
+ // one file are fetched no other way.
3227
+ headers: {
3228
+ range: zod.z.string().optional()
3185
3229
  }
3186
3230
  },
3187
3231
  res: zod.z.union([unauthorizedResponse, notFoundResponse, zod.z.object({
3188
3232
  status: zod.z.literal(200),
3189
3233
  body: zod.z["instanceof"](ReadableStream)
3234
+ }), zod.z.object({
3235
+ status: zod.z.literal(206),
3236
+ body: zod.z["instanceof"](ReadableStream)
3237
+ }), zod.z.object({
3238
+ status: zod.z.literal(416),
3239
+ json: GenericError
3190
3240
  })])
3191
3241
  }
3192
3242
  },
@@ -5310,7 +5360,7 @@ function emptyOf(schema, context) {
5310
5360
  // language nobody chose, which is the thing this whole feature exists to
5311
5361
  // make visible.
5312
5362
  return (_context$selectedLoca = context === null || context === void 0 ? void 0 : context.selectedLocale) !== null && _context$selectedLoca !== void 0 ? _context$selectedLoca : "";
5313
- } else if (schema.type === "file" || schema.type === "image") {
5363
+ } else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
5314
5364
  return null; // returning null is the only thing we can do, however, it means that the patches cannot be applied yet since that might fail
5315
5365
  } else if (schema.type === "literal") {
5316
5366
  return schema.value;
@@ -5520,6 +5570,14 @@ function checkGallerySchema(moduleSchema) {
5520
5570
  if (moduleSchema.type === "record" && moduleSchema.mediaType === "images") {
5521
5571
  return null;
5522
5572
  }
5573
+ if (moduleSchema.type === "record" && moduleSchema.mediaType === "videos") {
5574
+ // Said outright rather than as "not an images gallery": a set of videos
5575
+ // looks like a gallery from here, and the tool can do nothing with one.
5576
+ return {
5577
+ kind: "error",
5578
+ message: "Module is a video set (s.videoset()), not an images gallery. Videos cannot be added or removed by this tool: upload them in Val Studio."
5579
+ };
5580
+ }
5523
5581
  if (moduleSchema.type === "image") {
5524
5582
  return {
5525
5583
  kind: "wrong-tool",
@@ -5614,17 +5672,32 @@ var GALLERY_REDIRECT = {
5614
5672
  reason: "Destination is a media gallery (s.imageset() / s.fileset()). Gallery entries are keyed by file path and carry a file on disk, so they cannot be created with a plain patch. Use add_session_image_to_gallery."
5615
5673
  };
5616
5674
 
5617
- /** An `s.imageset()` / `s.fileset()` record: a gallery, not an ordinary record. */
5675
+ /**
5676
+ * A video set's entries are keyed by a file too, and a stream's by a
5677
+ * directory of them — and there is no tool to send them to: a video is
5678
+ * uploaded (and, for a stream, transcoded) in the Studio.
5679
+ */
5680
+ var VIDEOSET_REFUSAL = {
5681
+ kind: "error",
5682
+ message: "Destination is a video set (s.videoset()). Its entries are keyed by file path and carry video files, so they cannot be created with a plain patch, and no tool here uploads a video: add it in Val Studio."
5683
+ };
5684
+
5685
+ /** An `s.imageset()` / `s.fileset()` / `s.videoset()` record: a gallery, not an ordinary record. */
5618
5686
  function isGallery(schema) {
5619
5687
  return schema.type === "record" && schema.mediaType !== undefined;
5620
5688
  }
5689
+
5690
+ /** Where to send someone whose destination is (in) the gallery `schema`. */
5691
+ function galleryRedirect(schema) {
5692
+ return schema.type === "record" && schema.mediaType === "videos" ? VIDEOSET_REFUSAL : GALLERY_REDIRECT;
5693
+ }
5621
5694
  function decideOp(moduleSchema, destinationPath) {
5622
5695
  // The DESTINATION itself, checked before its parent: `["gallery"]` resolves
5623
5696
  // its parent to the enclosing object and would otherwise look like an
5624
5697
  // ordinary `replace` that overwrites a whole gallery.
5625
5698
  var destination = resolveSerializedSchemaAtPath(moduleSchema, destinationPath);
5626
5699
  if (destination.kind === "gallery-traversed") {
5627
- return GALLERY_REDIRECT;
5700
+ return galleryRedirect(destination.schema);
5628
5701
  }
5629
5702
  if (destination.kind === "richtext") {
5630
5703
  return {
@@ -5635,7 +5708,7 @@ function decideOp(moduleSchema, destinationPath) {
5635
5708
  }
5636
5709
  if (destination.kind === "leaf") {
5637
5710
  if (isGallery(destination.schema)) {
5638
- return GALLERY_REDIRECT;
5711
+ return galleryRedirect(destination.schema);
5639
5712
  }
5640
5713
  // A richtext value the path lands exactly ON resolves as a leaf, not as
5641
5714
  // `kind: "richtext"` (which only fires when the walk continues INTO it).
@@ -5672,7 +5745,7 @@ function decideOp(moduleSchema, destinationPath) {
5672
5745
  // destination is a gallery entry; `isGallery` catches the case where the
5673
5746
  // parent IS the gallery and the destination is a new entry key in it.
5674
5747
  if (parent.kind === "gallery-traversed" || isGallery(parent.schema)) {
5675
- return GALLERY_REDIRECT;
5748
+ return galleryRedirect(parent.schema);
5676
5749
  }
5677
5750
  var schema = parent.schema;
5678
5751
  if (schema.type === "array" || schema.type === "record") {
@@ -5993,6 +6066,14 @@ function isSkippableFixCode(fix) {
5993
6066
  case "file:check-remote":
5994
6067
  case "files:check-remote":
5995
6068
  case "files:upload-remote":
6069
+ case "video:add-metadata": // the Studio writes it on upload; --fix for the rest
6070
+ case "video:upload-remote":
6071
+ case "video:download-remote":
6072
+ case "videos:add-metadata": // as `video:add-metadata`, for a set's entry
6073
+ case "videos:check-remote":
6074
+ case "videos:upload-remote":
6075
+ case "videos:check-unique-folder":
6076
+ case "videos:check-all-files":
5996
6077
  case "images:check-unique-folder":
5997
6078
  case "files:check-unique-folder":
5998
6079
  case "images:check-all-files":
@@ -6317,8 +6398,8 @@ function traverseSchemaSource(source, schema, path, callback) {
6317
6398
  return;
6318
6399
  }
6319
6400
 
6320
- // Handle file/image
6321
- if (schema.type === "file" || schema.type === "image") {
6401
+ // Handle file/image/video
6402
+ if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
6322
6403
  if (source && getSitemapTree._typeof(source) === "object" && "path" in source && typeof source.path === "string") {
6323
6404
  callback({
6324
6405
  source: source,
@@ -6665,8 +6746,8 @@ function indexModule(searchIndex, moduleFilePath, source, schema) {
6665
6746
  // Use first 50 chars as label
6666
6747
  label = searchText.substring(0, 50) || "richtext";
6667
6748
  }
6668
- // Handle file/image
6669
- else if (schema.type === "file" || schema.type === "image") {
6749
+ // Handle file/image/video
6750
+ else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
6670
6751
  if (source !== null && getSitemapTree._typeof(source) === "object" && "path" in source && typeof source.path === "string") {
6671
6752
  // The label is the bare filename - the folder is shown separately in
6672
6753
  // the UI - but both are searchable.
@@ -7840,6 +7921,7 @@ exports.SerializedSchema = SerializedSchema;
7840
7921
  exports.SerializedSettingsSchema = SerializedSettingsSchema;
7841
7922
  exports.SerializedStringSchema = SerializedStringSchema;
7842
7923
  exports.SerializedValViewSchema = SerializedValViewSchema;
7924
+ exports.SerializedVideoSchema = SerializedVideoSchema;
7843
7925
  exports.SharedValConfig = SharedValConfig;
7844
7926
  exports.VAL_ENABLE_COOKIE_NAME = VAL_ENABLE_COOKIE_NAME;
7845
7927
  exports.VAL_GREEN_RAMP = VAL_GREEN_RAMP;
@@ -7848,6 +7930,8 @@ exports.VAL_STATE_COOKIE = VAL_STATE_COOKIE;
7848
7930
  exports.VAL_STUDIO_HEADER = VAL_STUDIO_HEADER;
7849
7931
  exports.ValCommit = ValCommit;
7850
7932
  exports.ValDeployment = ValDeployment;
7933
+ exports.VideoOptions = VideoOptions;
7934
+ exports.VideoStreamOption = VideoStreamOption;
7851
7935
  exports.accentRamp = accentRamp;
7852
7936
  exports.buildDuplicatePatch = buildDuplicatePatch;
7853
7937
  exports.buildEmptyAtPathPatch = buildEmptyAtPathPatch;
@@ -1165,13 +1165,16 @@ var SerializedRecordSchema = zod.z.lazy(function () {
1165
1165
  type: zod.z.literal("record"),
1166
1166
  item: SerializedSchema,
1167
1167
  opt: zod.z["boolean"](),
1168
- // Optional gallery marker for files/images
1169
- mediaType: zod.z.union([zod.z.literal("files"), zod.z.literal("images")]).optional(),
1168
+ // Optional gallery marker for files/images/videos
1169
+ mediaType: zod.z.union([zod.z.literal("files"), zod.z.literal("images"), zod.z.literal("videos")]).optional(),
1170
1170
  // Optional legacy gallery metadata
1171
1171
  accept: zod.z.string().optional(),
1172
1172
  dir: zod.z.string().optional(),
1173
1173
  remote: zod.z["boolean"]().optional(),
1174
1174
  encode: ImageEncodeOption.optional(),
1175
+ // A videoset's: see `VideoStreamOption` below for why it is spelled
1176
+ // out rather than passed through.
1177
+ stream: VideoStreamOption.optional(),
1175
1178
  alt: SerializedSchema.optional(),
1176
1179
  moduleMetadata: zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.any())).optional()
1177
1180
  })).passthrough());
@@ -1205,6 +1208,29 @@ var SerializedFileSchema = zod.z.object(getSitemapTree._objectSpread2(getSitemap
1205
1208
  remote: zod.z["boolean"]().optional(),
1206
1209
  referencedModule: zod.z.string().optional()
1207
1210
  }));
1211
+
1212
+ // `stream` is the one option that changes what an upload BECOMES, so it is
1213
+ // declared field by field: these z.objects strip unknown keys, and a stream
1214
+ // dropped in transit is a Studio that uploads a 2 GB mp4 where an HLS stream
1215
+ // was asked for.
1216
+ var VideoStreamOption = zod.z.union([zod.z.literal(false), zod.z.object({
1217
+ type: zod.z.literal("hls"),
1218
+ renditions: zod.z.array(zod.z.number()).optional(),
1219
+ segmentDuration: zod.z.number().optional()
1220
+ })]);
1221
+ var VideoOptions = zod.z.object({
1222
+ dir: zod.z.string().optional(),
1223
+ accept: zod.z.string().optional(),
1224
+ stream: VideoStreamOption.optional()
1225
+ });
1226
+ var SerializedVideoSchema = zod.z.object(getSitemapTree._objectSpread2(getSitemapTree._objectSpread2({}, commonSchemaFields), {}, {
1227
+ type: zod.z.literal("video"),
1228
+ options: VideoOptions.optional(),
1229
+ opt: zod.z["boolean"](),
1230
+ remote: zod.z["boolean"]().optional(),
1231
+ // The `s.videoset()` a set-backed field picks from.
1232
+ referencedModule: zod.z.string().optional()
1233
+ }));
1208
1234
  var DateOptions = zod.z.object({
1209
1235
  from: zod.z.string().optional(),
1210
1236
  to: zod.z.string().optional()
@@ -1295,7 +1321,7 @@ var SerializedValViewSchema = zod.z.object({
1295
1321
  hidden: zod.z["boolean"]().optional(),
1296
1322
  description: zod.z.string().optional()
1297
1323
  });
1298
- var SerializedSchema = zod.z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedValViewSchema]);
1324
+ var SerializedSchema = zod.z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedVideoSchema, SerializedValViewSchema]);
1299
1325
 
1300
1326
  var ValCommit = zod.z.object({
1301
1327
  commitSha: zod.z.string(),
@@ -1476,12 +1502,12 @@ var ValConfig = zod.z.object({
1476
1502
  project: zod.z.string().optional(),
1477
1503
  root: zod.z.string().optional(),
1478
1504
  files: zod.z.object({
1479
- directory: zod.z.string() // TODO: validate that it is prefixed by /public/
1505
+ remote: zod.z["boolean"]().optional()
1480
1506
  }).optional(),
1481
1507
  gitCommit: zod.z.string().optional(),
1482
1508
  gitBranch: zod.z.string().optional()
1483
1509
  });
1484
- var ValidationFixZ = zod.z.union([zod.z.literal("image:add-metadata"), zod.z.literal("image:check-metadata"), zod.z.literal("image:check-remote"), zod.z.literal("image:upload-remote"), zod.z.literal("image:download-remote"), zod.z.literal("images:check-remote"), zod.z.literal("images:upload-remote"), zod.z.literal("file:add-metadata"), zod.z.literal("file:check-metadata"), zod.z.literal("file:check-remote"), zod.z.literal("file:upload-remote"), zod.z.literal("file:download-remote"), zod.z.literal("files:check-remote"), zod.z.literal("files:upload-remote"), zod.z.literal("keyof:check-keys"), zod.z.literal("router:check-route"), zod.z.literal("locale:check-locale"), zod.z.literal("record:fill-keys"), zod.z.literal("images:check-unique-folder"), zod.z.literal("files:check-unique-folder"), zod.z.literal("images:check-all-files"), zod.z.literal("files:check-all-files"), zod.z.literal("jsonValues:extract-entry"), zod.z.literal("view:check-module")]);
1510
+ var ValidationFixZ = zod.z.union([zod.z.literal("image:add-metadata"), zod.z.literal("image:check-metadata"), zod.z.literal("image:check-remote"), zod.z.literal("image:upload-remote"), zod.z.literal("image:download-remote"), zod.z.literal("images:check-remote"), zod.z.literal("images:upload-remote"), zod.z.literal("file:add-metadata"), zod.z.literal("video:add-metadata"), zod.z.literal("video:upload-remote"), zod.z.literal("video:download-remote"), zod.z.literal("videos:add-metadata"), zod.z.literal("videos:check-remote"), zod.z.literal("videos:upload-remote"), zod.z.literal("file:check-metadata"), zod.z.literal("file:check-remote"), zod.z.literal("file:upload-remote"), zod.z.literal("file:download-remote"), zod.z.literal("files:check-remote"), zod.z.literal("files:upload-remote"), zod.z.literal("keyof:check-keys"), zod.z.literal("router:check-route"), zod.z.literal("locale:check-locale"), zod.z.literal("record:fill-keys"), zod.z.literal("images:check-unique-folder"), zod.z.literal("files:check-unique-folder"), zod.z.literal("images:check-all-files"), zod.z.literal("files:check-all-files"), zod.z.literal("videos:check-unique-folder"), zod.z.literal("videos:check-all-files"), zod.z.literal("jsonValues:extract-entry"), zod.z.literal("view:check-module")]);
1485
1511
  var ValidationError = zod.z.object({
1486
1512
  message: zod.z.string(),
1487
1513
  value: zod.z.unknown().optional(),
@@ -1944,6 +1970,12 @@ var Api = {
1944
1970
  * client that ignores this behaves exactly as it did before.
1945
1971
  */
1946
1972
  appliedPatches: zod.z.array(PatchId).optional(),
1973
+ /*
1974
+ * Of `patches`, the ones a publish that is still running holds.
1975
+ * The Studio does not offer Publish over these. Whole on every
1976
+ * answer: a job that ends without sealing gives them back.
1977
+ */
1978
+ publishingPatches: zod.z.array(PatchId).optional(),
1947
1979
  /**
1948
1980
  * The newest commit, which is the PUBLISH head.
1949
1981
  *
@@ -2034,6 +2066,12 @@ var Api = {
2034
2066
  * client that ignores this behaves exactly as it did before.
2035
2067
  */
2036
2068
  appliedPatches: zod.z.array(PatchId).optional(),
2069
+ /*
2070
+ * Of `patches`, the ones a publish that is still running holds.
2071
+ * The Studio does not offer Publish over these. Whole on every
2072
+ * answer: a job that ends without sealing gives them back.
2073
+ */
2074
+ publishingPatches: zod.z.array(PatchId).optional(),
2037
2075
  /**
2038
2076
  * The newest commit, which is the PUBLISH head.
2039
2077
  *
@@ -3182,11 +3220,23 @@ var Api = {
3182
3220
  return arg[0];
3183
3221
  }).optional(),
3184
3222
  remote: onlyOneStringQueryParam.optional()
3223
+ },
3224
+ // A `<video>` seeks with byte ranges, Safari will not play one from a
3225
+ // server that ignores them, and HLS segments that are byte ranges of
3226
+ // one file are fetched no other way.
3227
+ headers: {
3228
+ range: zod.z.string().optional()
3185
3229
  }
3186
3230
  },
3187
3231
  res: zod.z.union([unauthorizedResponse, notFoundResponse, zod.z.object({
3188
3232
  status: zod.z.literal(200),
3189
3233
  body: zod.z["instanceof"](ReadableStream)
3234
+ }), zod.z.object({
3235
+ status: zod.z.literal(206),
3236
+ body: zod.z["instanceof"](ReadableStream)
3237
+ }), zod.z.object({
3238
+ status: zod.z.literal(416),
3239
+ json: GenericError
3190
3240
  })])
3191
3241
  }
3192
3242
  },
@@ -5310,7 +5360,7 @@ function emptyOf(schema, context) {
5310
5360
  // language nobody chose, which is the thing this whole feature exists to
5311
5361
  // make visible.
5312
5362
  return (_context$selectedLoca = context === null || context === void 0 ? void 0 : context.selectedLocale) !== null && _context$selectedLoca !== void 0 ? _context$selectedLoca : "";
5313
- } else if (schema.type === "file" || schema.type === "image") {
5363
+ } else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
5314
5364
  return null; // returning null is the only thing we can do, however, it means that the patches cannot be applied yet since that might fail
5315
5365
  } else if (schema.type === "literal") {
5316
5366
  return schema.value;
@@ -5520,6 +5570,14 @@ function checkGallerySchema(moduleSchema) {
5520
5570
  if (moduleSchema.type === "record" && moduleSchema.mediaType === "images") {
5521
5571
  return null;
5522
5572
  }
5573
+ if (moduleSchema.type === "record" && moduleSchema.mediaType === "videos") {
5574
+ // Said outright rather than as "not an images gallery": a set of videos
5575
+ // looks like a gallery from here, and the tool can do nothing with one.
5576
+ return {
5577
+ kind: "error",
5578
+ message: "Module is a video set (s.videoset()), not an images gallery. Videos cannot be added or removed by this tool: upload them in Val Studio."
5579
+ };
5580
+ }
5523
5581
  if (moduleSchema.type === "image") {
5524
5582
  return {
5525
5583
  kind: "wrong-tool",
@@ -5614,17 +5672,32 @@ var GALLERY_REDIRECT = {
5614
5672
  reason: "Destination is a media gallery (s.imageset() / s.fileset()). Gallery entries are keyed by file path and carry a file on disk, so they cannot be created with a plain patch. Use add_session_image_to_gallery."
5615
5673
  };
5616
5674
 
5617
- /** An `s.imageset()` / `s.fileset()` record: a gallery, not an ordinary record. */
5675
+ /**
5676
+ * A video set's entries are keyed by a file too, and a stream's by a
5677
+ * directory of them — and there is no tool to send them to: a video is
5678
+ * uploaded (and, for a stream, transcoded) in the Studio.
5679
+ */
5680
+ var VIDEOSET_REFUSAL = {
5681
+ kind: "error",
5682
+ message: "Destination is a video set (s.videoset()). Its entries are keyed by file path and carry video files, so they cannot be created with a plain patch, and no tool here uploads a video: add it in Val Studio."
5683
+ };
5684
+
5685
+ /** An `s.imageset()` / `s.fileset()` / `s.videoset()` record: a gallery, not an ordinary record. */
5618
5686
  function isGallery(schema) {
5619
5687
  return schema.type === "record" && schema.mediaType !== undefined;
5620
5688
  }
5689
+
5690
+ /** Where to send someone whose destination is (in) the gallery `schema`. */
5691
+ function galleryRedirect(schema) {
5692
+ return schema.type === "record" && schema.mediaType === "videos" ? VIDEOSET_REFUSAL : GALLERY_REDIRECT;
5693
+ }
5621
5694
  function decideOp(moduleSchema, destinationPath) {
5622
5695
  // The DESTINATION itself, checked before its parent: `["gallery"]` resolves
5623
5696
  // its parent to the enclosing object and would otherwise look like an
5624
5697
  // ordinary `replace` that overwrites a whole gallery.
5625
5698
  var destination = resolveSerializedSchemaAtPath(moduleSchema, destinationPath);
5626
5699
  if (destination.kind === "gallery-traversed") {
5627
- return GALLERY_REDIRECT;
5700
+ return galleryRedirect(destination.schema);
5628
5701
  }
5629
5702
  if (destination.kind === "richtext") {
5630
5703
  return {
@@ -5635,7 +5708,7 @@ function decideOp(moduleSchema, destinationPath) {
5635
5708
  }
5636
5709
  if (destination.kind === "leaf") {
5637
5710
  if (isGallery(destination.schema)) {
5638
- return GALLERY_REDIRECT;
5711
+ return galleryRedirect(destination.schema);
5639
5712
  }
5640
5713
  // A richtext value the path lands exactly ON resolves as a leaf, not as
5641
5714
  // `kind: "richtext"` (which only fires when the walk continues INTO it).
@@ -5672,7 +5745,7 @@ function decideOp(moduleSchema, destinationPath) {
5672
5745
  // destination is a gallery entry; `isGallery` catches the case where the
5673
5746
  // parent IS the gallery and the destination is a new entry key in it.
5674
5747
  if (parent.kind === "gallery-traversed" || isGallery(parent.schema)) {
5675
- return GALLERY_REDIRECT;
5748
+ return galleryRedirect(parent.schema);
5676
5749
  }
5677
5750
  var schema = parent.schema;
5678
5751
  if (schema.type === "array" || schema.type === "record") {
@@ -5993,6 +6066,14 @@ function isSkippableFixCode(fix) {
5993
6066
  case "file:check-remote":
5994
6067
  case "files:check-remote":
5995
6068
  case "files:upload-remote":
6069
+ case "video:add-metadata": // the Studio writes it on upload; --fix for the rest
6070
+ case "video:upload-remote":
6071
+ case "video:download-remote":
6072
+ case "videos:add-metadata": // as `video:add-metadata`, for a set's entry
6073
+ case "videos:check-remote":
6074
+ case "videos:upload-remote":
6075
+ case "videos:check-unique-folder":
6076
+ case "videos:check-all-files":
5996
6077
  case "images:check-unique-folder":
5997
6078
  case "files:check-unique-folder":
5998
6079
  case "images:check-all-files":
@@ -6317,8 +6398,8 @@ function traverseSchemaSource(source, schema, path, callback) {
6317
6398
  return;
6318
6399
  }
6319
6400
 
6320
- // Handle file/image
6321
- if (schema.type === "file" || schema.type === "image") {
6401
+ // Handle file/image/video
6402
+ if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
6322
6403
  if (source && getSitemapTree._typeof(source) === "object" && "path" in source && typeof source.path === "string") {
6323
6404
  callback({
6324
6405
  source: source,
@@ -6665,8 +6746,8 @@ function indexModule(searchIndex, moduleFilePath, source, schema) {
6665
6746
  // Use first 50 chars as label
6666
6747
  label = searchText.substring(0, 50) || "richtext";
6667
6748
  }
6668
- // Handle file/image
6669
- else if (schema.type === "file" || schema.type === "image") {
6749
+ // Handle file/image/video
6750
+ else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
6670
6751
  if (source !== null && getSitemapTree._typeof(source) === "object" && "path" in source && typeof source.path === "string") {
6671
6752
  // The label is the bare filename - the folder is shown separately in
6672
6753
  // the UI - but both are searchable.
@@ -7840,6 +7921,7 @@ exports.SerializedSchema = SerializedSchema;
7840
7921
  exports.SerializedSettingsSchema = SerializedSettingsSchema;
7841
7922
  exports.SerializedStringSchema = SerializedStringSchema;
7842
7923
  exports.SerializedValViewSchema = SerializedValViewSchema;
7924
+ exports.SerializedVideoSchema = SerializedVideoSchema;
7843
7925
  exports.SharedValConfig = SharedValConfig;
7844
7926
  exports.VAL_ENABLE_COOKIE_NAME = VAL_ENABLE_COOKIE_NAME;
7845
7927
  exports.VAL_GREEN_RAMP = VAL_GREEN_RAMP;
@@ -7848,6 +7930,8 @@ exports.VAL_STATE_COOKIE = VAL_STATE_COOKIE;
7848
7930
  exports.VAL_STUDIO_HEADER = VAL_STUDIO_HEADER;
7849
7931
  exports.ValCommit = ValCommit;
7850
7932
  exports.ValDeployment = ValDeployment;
7933
+ exports.VideoOptions = VideoOptions;
7934
+ exports.VideoStreamOption = VideoStreamOption;
7851
7935
  exports.accentRamp = accentRamp;
7852
7936
  exports.buildDuplicatePatch = buildDuplicatePatch;
7853
7937
  exports.buildEmptyAtPathPatch = buildEmptyAtPathPatch;
@@ -1158,13 +1158,16 @@ var SerializedRecordSchema = z.lazy(function () {
1158
1158
  type: z.literal("record"),
1159
1159
  item: SerializedSchema,
1160
1160
  opt: z["boolean"](),
1161
- // Optional gallery marker for files/images
1162
- mediaType: z.union([z.literal("files"), z.literal("images")]).optional(),
1161
+ // Optional gallery marker for files/images/videos
1162
+ mediaType: z.union([z.literal("files"), z.literal("images"), z.literal("videos")]).optional(),
1163
1163
  // Optional legacy gallery metadata
1164
1164
  accept: z.string().optional(),
1165
1165
  dir: z.string().optional(),
1166
1166
  remote: z["boolean"]().optional(),
1167
1167
  encode: ImageEncodeOption.optional(),
1168
+ // A videoset's: see `VideoStreamOption` below for why it is spelled
1169
+ // out rather than passed through.
1170
+ stream: VideoStreamOption.optional(),
1168
1171
  alt: SerializedSchema.optional(),
1169
1172
  moduleMetadata: z.record(z.string(), z.record(z.string(), z.any())).optional()
1170
1173
  })).passthrough());
@@ -1198,6 +1201,29 @@ var SerializedFileSchema = z.object(_objectSpread2(_objectSpread2({}, commonSche
1198
1201
  remote: z["boolean"]().optional(),
1199
1202
  referencedModule: z.string().optional()
1200
1203
  }));
1204
+
1205
+ // `stream` is the one option that changes what an upload BECOMES, so it is
1206
+ // declared field by field: these z.objects strip unknown keys, and a stream
1207
+ // dropped in transit is a Studio that uploads a 2 GB mp4 where an HLS stream
1208
+ // was asked for.
1209
+ var VideoStreamOption = z.union([z.literal(false), z.object({
1210
+ type: z.literal("hls"),
1211
+ renditions: z.array(z.number()).optional(),
1212
+ segmentDuration: z.number().optional()
1213
+ })]);
1214
+ var VideoOptions = z.object({
1215
+ dir: z.string().optional(),
1216
+ accept: z.string().optional(),
1217
+ stream: VideoStreamOption.optional()
1218
+ });
1219
+ var SerializedVideoSchema = z.object(_objectSpread2(_objectSpread2({}, commonSchemaFields), {}, {
1220
+ type: z.literal("video"),
1221
+ options: VideoOptions.optional(),
1222
+ opt: z["boolean"](),
1223
+ remote: z["boolean"]().optional(),
1224
+ // The `s.videoset()` a set-backed field picks from.
1225
+ referencedModule: z.string().optional()
1226
+ }));
1201
1227
  var DateOptions = z.object({
1202
1228
  from: z.string().optional(),
1203
1229
  to: z.string().optional()
@@ -1288,7 +1314,7 @@ var SerializedValViewSchema = z.object({
1288
1314
  hidden: z["boolean"]().optional(),
1289
1315
  description: z.string().optional()
1290
1316
  });
1291
- var SerializedSchema = z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedValViewSchema]);
1317
+ var SerializedSchema = z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedVideoSchema, SerializedValViewSchema]);
1292
1318
 
1293
1319
  var ValCommit = z.object({
1294
1320
  commitSha: z.string(),
@@ -1469,12 +1495,12 @@ var ValConfig = z.object({
1469
1495
  project: z.string().optional(),
1470
1496
  root: z.string().optional(),
1471
1497
  files: z.object({
1472
- directory: z.string() // TODO: validate that it is prefixed by /public/
1498
+ remote: z["boolean"]().optional()
1473
1499
  }).optional(),
1474
1500
  gitCommit: z.string().optional(),
1475
1501
  gitBranch: z.string().optional()
1476
1502
  });
1477
- var ValidationFixZ = z.union([z.literal("image:add-metadata"), z.literal("image:check-metadata"), z.literal("image:check-remote"), z.literal("image:upload-remote"), z.literal("image:download-remote"), z.literal("images:check-remote"), z.literal("images:upload-remote"), z.literal("file:add-metadata"), z.literal("file:check-metadata"), z.literal("file:check-remote"), z.literal("file:upload-remote"), z.literal("file:download-remote"), z.literal("files:check-remote"), z.literal("files:upload-remote"), z.literal("keyof:check-keys"), z.literal("router:check-route"), z.literal("locale:check-locale"), z.literal("record:fill-keys"), z.literal("images:check-unique-folder"), z.literal("files:check-unique-folder"), z.literal("images:check-all-files"), z.literal("files:check-all-files"), z.literal("jsonValues:extract-entry"), z.literal("view:check-module")]);
1503
+ var ValidationFixZ = z.union([z.literal("image:add-metadata"), z.literal("image:check-metadata"), z.literal("image:check-remote"), z.literal("image:upload-remote"), z.literal("image:download-remote"), z.literal("images:check-remote"), z.literal("images:upload-remote"), z.literal("file:add-metadata"), z.literal("video:add-metadata"), z.literal("video:upload-remote"), z.literal("video:download-remote"), z.literal("videos:add-metadata"), z.literal("videos:check-remote"), z.literal("videos:upload-remote"), z.literal("file:check-metadata"), z.literal("file:check-remote"), z.literal("file:upload-remote"), z.literal("file:download-remote"), z.literal("files:check-remote"), z.literal("files:upload-remote"), z.literal("keyof:check-keys"), z.literal("router:check-route"), z.literal("locale:check-locale"), z.literal("record:fill-keys"), z.literal("images:check-unique-folder"), z.literal("files:check-unique-folder"), z.literal("images:check-all-files"), z.literal("files:check-all-files"), z.literal("videos:check-unique-folder"), z.literal("videos:check-all-files"), z.literal("jsonValues:extract-entry"), z.literal("view:check-module")]);
1478
1504
  var ValidationError = z.object({
1479
1505
  message: z.string(),
1480
1506
  value: z.unknown().optional(),
@@ -1937,6 +1963,12 @@ var Api = {
1937
1963
  * client that ignores this behaves exactly as it did before.
1938
1964
  */
1939
1965
  appliedPatches: z.array(PatchId).optional(),
1966
+ /*
1967
+ * Of `patches`, the ones a publish that is still running holds.
1968
+ * The Studio does not offer Publish over these. Whole on every
1969
+ * answer: a job that ends without sealing gives them back.
1970
+ */
1971
+ publishingPatches: z.array(PatchId).optional(),
1940
1972
  /**
1941
1973
  * The newest commit, which is the PUBLISH head.
1942
1974
  *
@@ -2027,6 +2059,12 @@ var Api = {
2027
2059
  * client that ignores this behaves exactly as it did before.
2028
2060
  */
2029
2061
  appliedPatches: z.array(PatchId).optional(),
2062
+ /*
2063
+ * Of `patches`, the ones a publish that is still running holds.
2064
+ * The Studio does not offer Publish over these. Whole on every
2065
+ * answer: a job that ends without sealing gives them back.
2066
+ */
2067
+ publishingPatches: z.array(PatchId).optional(),
2030
2068
  /**
2031
2069
  * The newest commit, which is the PUBLISH head.
2032
2070
  *
@@ -3175,11 +3213,23 @@ var Api = {
3175
3213
  return arg[0];
3176
3214
  }).optional(),
3177
3215
  remote: onlyOneStringQueryParam.optional()
3216
+ },
3217
+ // A `<video>` seeks with byte ranges, Safari will not play one from a
3218
+ // server that ignores them, and HLS segments that are byte ranges of
3219
+ // one file are fetched no other way.
3220
+ headers: {
3221
+ range: z.string().optional()
3178
3222
  }
3179
3223
  },
3180
3224
  res: z.union([unauthorizedResponse, notFoundResponse, z.object({
3181
3225
  status: z.literal(200),
3182
3226
  body: z["instanceof"](ReadableStream)
3227
+ }), z.object({
3228
+ status: z.literal(206),
3229
+ body: z["instanceof"](ReadableStream)
3230
+ }), z.object({
3231
+ status: z.literal(416),
3232
+ json: GenericError
3183
3233
  })])
3184
3234
  }
3185
3235
  },
@@ -5303,7 +5353,7 @@ function emptyOf(schema, context) {
5303
5353
  // language nobody chose, which is the thing this whole feature exists to
5304
5354
  // make visible.
5305
5355
  return (_context$selectedLoca = context === null || context === void 0 ? void 0 : context.selectedLocale) !== null && _context$selectedLoca !== void 0 ? _context$selectedLoca : "";
5306
- } else if (schema.type === "file" || schema.type === "image") {
5356
+ } else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
5307
5357
  return null; // returning null is the only thing we can do, however, it means that the patches cannot be applied yet since that might fail
5308
5358
  } else if (schema.type === "literal") {
5309
5359
  return schema.value;
@@ -5513,6 +5563,14 @@ function checkGallerySchema(moduleSchema) {
5513
5563
  if (moduleSchema.type === "record" && moduleSchema.mediaType === "images") {
5514
5564
  return null;
5515
5565
  }
5566
+ if (moduleSchema.type === "record" && moduleSchema.mediaType === "videos") {
5567
+ // Said outright rather than as "not an images gallery": a set of videos
5568
+ // looks like a gallery from here, and the tool can do nothing with one.
5569
+ return {
5570
+ kind: "error",
5571
+ message: "Module is a video set (s.videoset()), not an images gallery. Videos cannot be added or removed by this tool: upload them in Val Studio."
5572
+ };
5573
+ }
5516
5574
  if (moduleSchema.type === "image") {
5517
5575
  return {
5518
5576
  kind: "wrong-tool",
@@ -5607,17 +5665,32 @@ var GALLERY_REDIRECT = {
5607
5665
  reason: "Destination is a media gallery (s.imageset() / s.fileset()). Gallery entries are keyed by file path and carry a file on disk, so they cannot be created with a plain patch. Use add_session_image_to_gallery."
5608
5666
  };
5609
5667
 
5610
- /** An `s.imageset()` / `s.fileset()` record: a gallery, not an ordinary record. */
5668
+ /**
5669
+ * A video set's entries are keyed by a file too, and a stream's by a
5670
+ * directory of them — and there is no tool to send them to: a video is
5671
+ * uploaded (and, for a stream, transcoded) in the Studio.
5672
+ */
5673
+ var VIDEOSET_REFUSAL = {
5674
+ kind: "error",
5675
+ message: "Destination is a video set (s.videoset()). Its entries are keyed by file path and carry video files, so they cannot be created with a plain patch, and no tool here uploads a video: add it in Val Studio."
5676
+ };
5677
+
5678
+ /** An `s.imageset()` / `s.fileset()` / `s.videoset()` record: a gallery, not an ordinary record. */
5611
5679
  function isGallery(schema) {
5612
5680
  return schema.type === "record" && schema.mediaType !== undefined;
5613
5681
  }
5682
+
5683
+ /** Where to send someone whose destination is (in) the gallery `schema`. */
5684
+ function galleryRedirect(schema) {
5685
+ return schema.type === "record" && schema.mediaType === "videos" ? VIDEOSET_REFUSAL : GALLERY_REDIRECT;
5686
+ }
5614
5687
  function decideOp(moduleSchema, destinationPath) {
5615
5688
  // The DESTINATION itself, checked before its parent: `["gallery"]` resolves
5616
5689
  // its parent to the enclosing object and would otherwise look like an
5617
5690
  // ordinary `replace` that overwrites a whole gallery.
5618
5691
  var destination = resolveSerializedSchemaAtPath(moduleSchema, destinationPath);
5619
5692
  if (destination.kind === "gallery-traversed") {
5620
- return GALLERY_REDIRECT;
5693
+ return galleryRedirect(destination.schema);
5621
5694
  }
5622
5695
  if (destination.kind === "richtext") {
5623
5696
  return {
@@ -5628,7 +5701,7 @@ function decideOp(moduleSchema, destinationPath) {
5628
5701
  }
5629
5702
  if (destination.kind === "leaf") {
5630
5703
  if (isGallery(destination.schema)) {
5631
- return GALLERY_REDIRECT;
5704
+ return galleryRedirect(destination.schema);
5632
5705
  }
5633
5706
  // A richtext value the path lands exactly ON resolves as a leaf, not as
5634
5707
  // `kind: "richtext"` (which only fires when the walk continues INTO it).
@@ -5665,7 +5738,7 @@ function decideOp(moduleSchema, destinationPath) {
5665
5738
  // destination is a gallery entry; `isGallery` catches the case where the
5666
5739
  // parent IS the gallery and the destination is a new entry key in it.
5667
5740
  if (parent.kind === "gallery-traversed" || isGallery(parent.schema)) {
5668
- return GALLERY_REDIRECT;
5741
+ return galleryRedirect(parent.schema);
5669
5742
  }
5670
5743
  var schema = parent.schema;
5671
5744
  if (schema.type === "array" || schema.type === "record") {
@@ -5986,6 +6059,14 @@ function isSkippableFixCode(fix) {
5986
6059
  case "file:check-remote":
5987
6060
  case "files:check-remote":
5988
6061
  case "files:upload-remote":
6062
+ case "video:add-metadata": // the Studio writes it on upload; --fix for the rest
6063
+ case "video:upload-remote":
6064
+ case "video:download-remote":
6065
+ case "videos:add-metadata": // as `video:add-metadata`, for a set's entry
6066
+ case "videos:check-remote":
6067
+ case "videos:upload-remote":
6068
+ case "videos:check-unique-folder":
6069
+ case "videos:check-all-files":
5989
6070
  case "images:check-unique-folder":
5990
6071
  case "files:check-unique-folder":
5991
6072
  case "images:check-all-files":
@@ -6310,8 +6391,8 @@ function traverseSchemaSource(source, schema, path, callback) {
6310
6391
  return;
6311
6392
  }
6312
6393
 
6313
- // Handle file/image
6314
- if (schema.type === "file" || schema.type === "image") {
6394
+ // Handle file/image/video
6395
+ if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
6315
6396
  if (source && _typeof(source) === "object" && "path" in source && typeof source.path === "string") {
6316
6397
  callback({
6317
6398
  source: source,
@@ -6658,8 +6739,8 @@ function indexModule(searchIndex, moduleFilePath, source, schema) {
6658
6739
  // Use first 50 chars as label
6659
6740
  label = searchText.substring(0, 50) || "richtext";
6660
6741
  }
6661
- // Handle file/image
6662
- else if (schema.type === "file" || schema.type === "image") {
6742
+ // Handle file/image/video
6743
+ else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
6663
6744
  if (source !== null && _typeof(source) === "object" && "path" in source && typeof source.path === "string") {
6664
6745
  // The label is the bare filename - the folder is shown separately in
6665
6746
  // the UI - but both are searchable.
@@ -7749,4 +7830,4 @@ function parse(schema, body, call) {
7749
7830
  return parsed.data;
7750
7831
  }
7751
7832
 
7752
- export { AA_LARGE, AA_TEXT, Api, BRAND_CONTRAST_PAIRS, BinaryFileRef, CodeOptions, ColorOptions, DEFAULT_ERROR_MESSAGE, DateOptions, ENCODE_DEFAULTS, ENCODE_MIME_TYPE_OF, FileOptions, HistoricalCommit, HistoricalModule, HistoricalPatchSet, HistoryError, ImageEncodeOption, ImageOptions, JSONValue, JSON_ENTRIES_BATCH_MAX, ModuleComparison, NEVER_ENCODED, ParentRef$1 as ParentRef, Patch, PatchBlock, PatchGroup, PatchId, PatchJSON, PublishProtocolError, RAMP_STEPS, RemirrorBr, RemirrorBulletList, RemirrorHeading, RemirrorImage, RemirrorJSON, RemirrorLinkMark, RemirrorListItem, RemirrorOrderedList, RemirrorParagraph, RemirrorText, RemirrorTextMark, RestoreVerdict, RichTextOptions, SCHEMA_SOURCE_FIXES, SerializedArraySchema, SerializedBooleanSchema, SerializedCodeSchema, SerializedColorSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedFileSchema, SerializedImageSchema, SerializedKeyOfSchema, SerializedLiteralSchema, SerializedLocaleSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedRecordSchema, SerializedRichTextSchema, SerializedRouteSchema, SerializedSchema, SerializedSettingsSchema, SerializedStringSchema, SerializedValViewSchema, SharedValConfig, VAL_ENABLE_COOKIE_NAME, VAL_GREEN_RAMP, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, VAL_STUDIO_HEADER, ValCommit, ValDeployment, accentRamp, buildDuplicatePatch, buildEmptyAtPathPatch, buildFileRefValue, buildImageGalleryPatch, buildRemoveImageGalleryEntryPatch, buildSearchIndex, chainHeadOf, checkCompatibility, chooseEncoded, concatModulePath, contrastRatio, createRegExpFromPattern, createSearchIndex, createValClient, declaredLocales, describeContainerAtPath, emptyOf, explainIncompatible, filterBlockingValidationErrors, filterRoutesByPatterns, findSimilar, fitWithin, flattenRichText, getErrorMessageFromUnknownJson, getFilenameFromRef, getInlineImgInfo, getKeyOfRecordAt, getRefParts, getRoutesOf, getRoutesWithModulePaths, getSourceAt, indexModule, isMimeTypeAccepted, isRemoteSchema, isSchemaSourceFixError, isSkippedSource, keyOfRecordPath, levenshtein, localeAt, memoizePerRequest, newestCommitSha, parseArtifacts, parseBuildTarget, parseCancel, parseDeclare, parseDiscard, parseJob, parseNewestCiRun, parsePress, parseProblems, parseProjectSource, parsePromote, parsePublishToken, parseRenew, parseRequestStatus, parseStatus, parseUpdateTarget, parseVerify, partitionValidationErrors, performSearch, relativeLuminance, remirrorToRichTextSource, removeModule, resolveEncodeSettings, resolvePairGround, resolveSchemaSourceFixForError, resolveSchemaSourceFixes, resolveSerializedSchemaAtPath, richTextToRemirror, safeParsePatch, sourcePathOfChild, themeCustomProperties, toolNames, traverseSchemaSource, urlOf, validateRoutePatterns, withExtension };
7833
+ export { AA_LARGE, AA_TEXT, Api, BRAND_CONTRAST_PAIRS, BinaryFileRef, CodeOptions, ColorOptions, DEFAULT_ERROR_MESSAGE, DateOptions, ENCODE_DEFAULTS, ENCODE_MIME_TYPE_OF, FileOptions, HistoricalCommit, HistoricalModule, HistoricalPatchSet, HistoryError, ImageEncodeOption, ImageOptions, JSONValue, JSON_ENTRIES_BATCH_MAX, ModuleComparison, NEVER_ENCODED, ParentRef$1 as ParentRef, Patch, PatchBlock, PatchGroup, PatchId, PatchJSON, PublishProtocolError, RAMP_STEPS, RemirrorBr, RemirrorBulletList, RemirrorHeading, RemirrorImage, RemirrorJSON, RemirrorLinkMark, RemirrorListItem, RemirrorOrderedList, RemirrorParagraph, RemirrorText, RemirrorTextMark, RestoreVerdict, RichTextOptions, SCHEMA_SOURCE_FIXES, SerializedArraySchema, SerializedBooleanSchema, SerializedCodeSchema, SerializedColorSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedFileSchema, SerializedImageSchema, SerializedKeyOfSchema, SerializedLiteralSchema, SerializedLocaleSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedRecordSchema, SerializedRichTextSchema, SerializedRouteSchema, SerializedSchema, SerializedSettingsSchema, SerializedStringSchema, SerializedValViewSchema, SerializedVideoSchema, SharedValConfig, VAL_ENABLE_COOKIE_NAME, VAL_GREEN_RAMP, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, VAL_STUDIO_HEADER, ValCommit, ValDeployment, VideoOptions, VideoStreamOption, accentRamp, buildDuplicatePatch, buildEmptyAtPathPatch, buildFileRefValue, buildImageGalleryPatch, buildRemoveImageGalleryEntryPatch, buildSearchIndex, chainHeadOf, checkCompatibility, chooseEncoded, concatModulePath, contrastRatio, createRegExpFromPattern, createSearchIndex, createValClient, declaredLocales, describeContainerAtPath, emptyOf, explainIncompatible, filterBlockingValidationErrors, filterRoutesByPatterns, findSimilar, fitWithin, flattenRichText, getErrorMessageFromUnknownJson, getFilenameFromRef, getInlineImgInfo, getKeyOfRecordAt, getRefParts, getRoutesOf, getRoutesWithModulePaths, getSourceAt, indexModule, isMimeTypeAccepted, isRemoteSchema, isSchemaSourceFixError, isSkippedSource, keyOfRecordPath, levenshtein, localeAt, memoizePerRequest, newestCommitSha, parseArtifacts, parseBuildTarget, parseCancel, parseDeclare, parseDiscard, parseJob, parseNewestCiRun, parsePress, parseProblems, parseProjectSource, parsePromote, parsePublishToken, parseRenew, parseRequestStatus, parseStatus, parseUpdateTarget, parseVerify, partitionValidationErrors, performSearch, relativeLuminance, remirrorToRichTextSource, removeModule, resolveEncodeSettings, resolvePairGround, resolveSchemaSourceFixForError, resolveSchemaSourceFixes, resolveSerializedSchemaAtPath, richTextToRemirror, safeParsePatch, sourcePathOfChild, themeCustomProperties, toolNames, traverseSchemaSource, urlOf, validateRoutePatterns, withExtension };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/shared",
3
- "version": "0.140.0",
3
+ "version": "0.141.0",
4
4
  "private": false,
5
5
  "description": "Val shared types and utilities",
6
6
  "repository": {
@@ -37,7 +37,7 @@
37
37
  "flexsearch": "^0.8.212",
38
38
  "zod": "^4.4.3",
39
39
  "zod-validation-error": "^5.0.0",
40
- "@valbuild/core": "0.139.1"
40
+ "@valbuild/core": "0.141.0"
41
41
  },
42
42
  "files": [
43
43
  "CHANGELOG.md",