@prismicio/types-internal 4.8.0-pr.39.a4627e7 → 4.8.0-pr.42.c8d7746

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.
@@ -15,7 +15,7 @@ declare const EmbedContentSchema: z.ZodMiniObject<{
15
15
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
16
16
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
17
17
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
18
- all: z.ZodMiniUnknown;
18
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
19
19
  }, z.core.$strip>;
20
20
  type EmbedContent = z.infer<typeof EmbedContentSchema>;
21
21
  //#endregion
@@ -4,7 +4,7 @@ import { z } from "zod/mini";
4
4
  const EmbedContentType = "EmbedContent";
5
5
  const EmbedContentSchema = z.extend(EmbedLegacySchema, {
6
6
  __TYPE__: z.literal(EmbedContentType),
7
- all: z.unknown()
7
+ all: z.optional(z.unknown())
8
8
  });
9
9
  //#endregion
10
10
  export { EmbedContentSchema, EmbedContentType };
@@ -1 +1 @@
1
- {"version":3,"file":"embed.js","names":[],"sources":["../../src/content/embed.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { EmbedLegacySchema } from \"./legacy/embed\"\n\nexport const EmbedContentType = \"EmbedContent\" as const\n\nexport const EmbedContentSchema = z.extend(EmbedLegacySchema, {\n\t__TYPE__: z.literal(EmbedContentType),\n\tall: z.unknown(),\n})\n\nexport type EmbedContent = z.infer<typeof EmbedContentSchema>\n"],"mappings":";;;AAIA,MAAa,mBAAmB;AAEhC,MAAa,qBAAqB,EAAE,OAAO,mBAAmB;CAC7D,UAAU,EAAE,QAAQ,gBAAgB;CACpC,KAAK,EAAE,QAAQ;AAChB,CAAC"}
1
+ {"version":3,"file":"embed.js","names":[],"sources":["../../src/content/embed.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { EmbedLegacySchema } from \"./legacy/embed\"\n\nexport const EmbedContentType = \"EmbedContent\" as const\n\nexport const EmbedContentSchema = z.extend(EmbedLegacySchema, {\n\t__TYPE__: z.literal(EmbedContentType),\n\tall: z.optional(z.unknown()),\n})\n\nexport type EmbedContent = z.infer<typeof EmbedContentSchema>\n"],"mappings":";;;AAIA,MAAa,mBAAmB;AAEhC,MAAa,qBAAqB,EAAE,OAAO,mBAAmB;CAC7D,UAAU,EAAE,QAAQ,gBAAgB;CACpC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC5B,CAAC"}
@@ -20,8 +20,8 @@ declare const ImageContentSchema: z.ZodMiniObject<{
20
20
  background: z.ZodMiniString<string>;
21
21
  }, z.core.$strip>;
22
22
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
23
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
24
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
23
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
24
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
25
25
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
26
26
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
27
27
  origin: z.ZodMiniObject<{
@@ -41,8 +41,8 @@ declare const ImageContentSchema: z.ZodMiniObject<{
41
41
  background: z.ZodMiniString<string>;
42
42
  }, z.core.$strip>;
43
43
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
44
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
45
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
44
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
45
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
46
46
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
47
47
  }, z.core.$strip>>>;
48
48
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;
@@ -18,8 +18,8 @@ declare const ImageLegacyViewSchema: z.ZodMiniObject<{
18
18
  background: z.ZodMiniString<string>;
19
19
  }, z.core.$strip>;
20
20
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
21
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
22
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
21
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
22
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
23
23
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
24
24
  }, z.core.$strip>;
25
25
  //#endregion
@@ -22,8 +22,8 @@ const ImageLegacyViewSchema = z.object({
22
22
  height: z.number(),
23
23
  edit: EditSchema,
24
24
  url: z.optional(z.string()),
25
- credits: z.optional(NonEmptyStringOrNullSchema),
26
- alt: z.optional(NonEmptyStringOrNullSchema),
25
+ credits: z.optional(z._default(NonEmptyStringOrNullSchema, null)),
26
+ alt: z.optional(z._default(NonEmptyStringOrNullSchema, null)),
27
27
  provider: z.nullish(z.string())
28
28
  });
29
29
  const ImageLegacySchema = z.extend(ImageLegacyViewSchema, { thumbnails: z.optional(z.record(z.string(), ImageLegacyViewSchema)) });
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","names":[],"sources":["../../../src/content/legacy/image.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst OriginSchema = z.object({\n\tid: z.string(),\n\turl: z.string(),\n\twidth: z.number(),\n\theight: z.number(),\n})\n\nconst CropSchema = z.object({\n\tx: z.number(),\n\ty: z.number(),\n})\n\nconst EditSchema = z.object({\n\tzoom: z.number(),\n\tcrop: CropSchema,\n\tbackground: z.string(),\n})\n\nconst NonEmptyStringOrNullSchema = z.pipe(\n\tz.nullish(z.string()),\n\tz.transform((value) => (typeof value === \"string\" && value.length > 0 ? value : null)),\n)\n\nexport const ImageLegacyViewSchema = z.object({\n\torigin: OriginSchema,\n\twidth: z.number(),\n\theight: z.number(),\n\tedit: EditSchema,\n\turl: z.optional(z.string()),\n\tcredits: z.optional(NonEmptyStringOrNullSchema),\n\talt: z.optional(NonEmptyStringOrNullSchema),\n\tprovider: z.nullish(z.string()),\n})\n\nexport type ImageLegacyView = z.infer<typeof ImageLegacyViewSchema>\n\nexport const ImageLegacySchema = z.extend(ImageLegacyViewSchema, {\n\tthumbnails: z.optional(z.record(z.string(), ImageLegacyViewSchema)),\n})\n\nexport type ImageLegacy = z.infer<typeof ImageLegacySchema>\n"],"mappings":";;AAEA,MAAM,eAAe,EAAE,OAAO;CAC7B,IAAI,EAAE,OAAO;CACb,KAAK,EAAE,OAAO;CACd,OAAO,EAAE,OAAO;CAChB,QAAQ,EAAE,OAAO;AAClB,CAAC;AAED,MAAM,aAAa,EAAE,OAAO;CAC3B,GAAG,EAAE,OAAO;CACZ,GAAG,EAAE,OAAO;AACb,CAAC;AAED,MAAM,aAAa,EAAE,OAAO;CAC3B,MAAM,EAAE,OAAO;CACf,MAAM;CACN,YAAY,EAAE,OAAO;AACtB,CAAC;AAED,MAAM,6BAA6B,EAAE,KACpC,EAAE,QAAQ,EAAE,OAAO,CAAC,GACpB,EAAE,WAAW,UAAW,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,QAAQ,IAAK,CACtF;AAEA,MAAa,wBAAwB,EAAE,OAAO;CAC7C,QAAQ;CACR,OAAO,EAAE,OAAO;CAChB,QAAQ,EAAE,OAAO;CACjB,MAAM;CACN,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC;CAC1B,SAAS,EAAE,SAAS,0BAA0B;CAC9C,KAAK,EAAE,SAAS,0BAA0B;CAC1C,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;AAC/B,CAAC;AAID,MAAa,oBAAoB,EAAE,OAAO,uBAAuB,EAChE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,qBAAqB,CAAC,EACnE,CAAC"}
1
+ {"version":3,"file":"image.js","names":[],"sources":["../../../src/content/legacy/image.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst OriginSchema = z.object({\n\tid: z.string(),\n\turl: z.string(),\n\twidth: z.number(),\n\theight: z.number(),\n})\n\nconst CropSchema = z.object({\n\tx: z.number(),\n\ty: z.number(),\n})\n\nconst EditSchema = z.object({\n\tzoom: z.number(),\n\tcrop: CropSchema,\n\tbackground: z.string(),\n})\n\nconst NonEmptyStringOrNullSchema = z.pipe(\n\tz.nullish(z.string()),\n\tz.transform((value) => (typeof value === \"string\" && value.length > 0 ? value : null)),\n)\n\nexport const ImageLegacyViewSchema = z.object({\n\torigin: OriginSchema,\n\twidth: z.number(),\n\theight: z.number(),\n\tedit: EditSchema,\n\turl: z.optional(z.string()),\n\tcredits: z.optional(z._default(NonEmptyStringOrNullSchema, null)),\n\talt: z.optional(z._default(NonEmptyStringOrNullSchema, null)),\n\tprovider: z.nullish(z.string()),\n})\n\nexport type ImageLegacyView = z.infer<typeof ImageLegacyViewSchema>\n\nexport const ImageLegacySchema = z.extend(ImageLegacyViewSchema, {\n\tthumbnails: z.optional(z.record(z.string(), ImageLegacyViewSchema)),\n})\n\nexport type ImageLegacy = z.infer<typeof ImageLegacySchema>\n"],"mappings":";;AAEA,MAAM,eAAe,EAAE,OAAO;CAC7B,IAAI,EAAE,OAAO;CACb,KAAK,EAAE,OAAO;CACd,OAAO,EAAE,OAAO;CAChB,QAAQ,EAAE,OAAO;AAClB,CAAC;AAED,MAAM,aAAa,EAAE,OAAO;CAC3B,GAAG,EAAE,OAAO;CACZ,GAAG,EAAE,OAAO;AACb,CAAC;AAED,MAAM,aAAa,EAAE,OAAO;CAC3B,MAAM,EAAE,OAAO;CACf,MAAM;CACN,YAAY,EAAE,OAAO;AACtB,CAAC;AAED,MAAM,6BAA6B,EAAE,KACpC,EAAE,QAAQ,EAAE,OAAO,CAAC,GACpB,EAAE,WAAW,UAAW,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,QAAQ,IAAK,CACtF;AAEA,MAAa,wBAAwB,EAAE,OAAO;CAC7C,QAAQ;CACR,OAAO,EAAE,OAAO;CAChB,QAAQ,EAAE,OAAO;CACjB,MAAM;CACN,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC;CAC1B,SAAS,EAAE,SAAS,EAAE,SAAS,4BAA4B,IAAI,CAAC;CAChE,KAAK,EAAE,SAAS,EAAE,SAAS,4BAA4B,IAAI,CAAC;CAC5D,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;AAC/B,CAAC;AAID,MAAa,oBAAoB,EAAE,OAAO,uBAAuB,EAChE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,qBAAqB,CAAC,EACnE,CAAC"}
@@ -34,7 +34,7 @@ declare const LabelSpanSchema: z.ZodMiniObject<{
34
34
  type: z.ZodMiniLiteral<"label">;
35
35
  start: z.ZodMiniNumber<number>;
36
36
  end: z.ZodMiniNumber<number>;
37
- data: z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<string, unknown>>;
37
+ data: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniUnknown>, z.ZodMiniTransform<string, unknown>>;
38
38
  }, z.core.$strip>;
39
39
  type LabelSpan = z.infer<typeof LabelSpanSchema>;
40
40
  declare const BasicSpanSchema: z.ZodMiniObject<{
@@ -88,8 +88,8 @@ declare const ImageBlockLegacySchema: z.ZodMiniObject<{
88
88
  background: z.ZodMiniString<string>;
89
89
  }, z.core.$strip>;
90
90
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
91
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
92
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
91
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
92
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
93
93
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
94
94
  linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniType<FilledLinkLegacyValue, unknown, z.core.$ZodTypeInternals<FilledLinkLegacyValue, unknown>>>>;
95
95
  }, z.core.$strip>;
@@ -30,7 +30,7 @@ const LabelSpanSchema = z.object({
30
30
  type: z.literal("label"),
31
31
  start: z.number(),
32
32
  end: z.number(),
33
- data: z.pipe(z.unknown(), z.transform((value) => typeof value === "string" && value.length > 0 ? value : ""))
33
+ data: z.pipe(z.optional(z.unknown()), z.transform((value) => typeof value === "string" && value.length > 0 ? value : ""))
34
34
  });
35
35
  const BasicSpanSchema = z.object({
36
36
  type: z.union([
@@ -1 +1 @@
1
- {"version":3,"file":"richText.js","names":[],"sources":["../../../src/content/legacy/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\n// It's important to only import the types here to\n// avoid runtime circular dependencies!\nimport type { EmbedContentSchema } from \"../embed\"\nimport type { ImageContentViewSchema } from \"../image\"\nimport type { FilledLinkContentValue, FilledLinkContentValueSchema } from \"../link\"\nimport { EmbedLegacyLooseSchema } from \"./embed\"\nimport { ImageLegacyViewSchema } from \"./image\"\nimport { FilledLinkLegacyValueSchema } from \"./link\"\nimport type { FilledLinkLegacyValue } from \"./link\"\n\nexport const RichTextNodeType = {\n\theading1: \"heading1\",\n\theading2: \"heading2\",\n\theading3: \"heading3\",\n\theading4: \"heading4\",\n\theading5: \"heading5\",\n\theading6: \"heading6\",\n\tparagraph: \"paragraph\",\n\tpreformatted: \"preformatted\",\n\toListItem: \"o-list-item\",\n\tlistItem: \"list-item\",\n\timage: \"image\",\n\tembed: \"embed\",\n\thyperlink: \"hyperlink\",\n\tstrong: \"strong\",\n\tem: \"em\",\n} as const\n\nexport type RichTextNodeTypes = (typeof RichTextNodeType)[keyof typeof RichTextNodeType]\n\n// Spans\ntype HyperlinkSpan<TData extends FilledLinkLegacyValue | FilledLinkContentValue> = {\n\ttype: typeof RichTextNodeType.hyperlink\n\tstart: number\n\tend: number\n\tdata: TData\n}\n\nconst getHyperlinkSpanSchema = <\n\tTData extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.hyperlink),\n\t\tstart: z.number(),\n\t\tend: z.number(),\n\t\tdata,\n\t})\n\nconst LabelSpanSchema = z.object({\n\ttype: z.literal(\"label\"),\n\tstart: z.number(),\n\tend: z.number(),\n\tdata: z.pipe(\n\t\tz.unknown(),\n\t\tz.transform((value) => (typeof value === \"string\" && value.length > 0 ? value : \"\")),\n\t),\n})\ntype LabelSpan = z.infer<typeof LabelSpanSchema>\n\nconst BasicSpanSchema = z.object({\n\ttype: z.union([\n\t\tz.literal(RichTextNodeType.strong),\n\t\tz.literal(RichTextNodeType.em),\n\t\tz.literal(\"list-item\"), // legacy case\n\t]),\n\tstart: z.number(),\n\tend: z.number(),\n})\ntype BasicSpan = z.infer<typeof BasicSpanSchema>\n\nexport type Span<TLink extends FilledLinkLegacyValue | FilledLinkContentValue> =\n\t| HyperlinkSpan<TLink>\n\t| LabelSpan\n\t| BasicSpan\n\nexport type RichTextLegacySpan = Span<FilledLinkLegacyValue>\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getSpanSchema = <\n\tTLinkSchema extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tlinkSchema: TLinkSchema,\n) =>\n\tz.discriminatedUnion(\"type\", [\n\t\tgetHyperlinkSpanSchema(linkSchema),\n\t\tLabelSpanSchema,\n\t\tBasicSpanSchema,\n\t])\n\n// Text blocks\nconst TextBlockTypeSchema = z.union([\n\tz.literal(RichTextNodeType.paragraph),\n\tz.literal(RichTextNodeType.heading1),\n\tz.literal(RichTextNodeType.heading2),\n\tz.literal(RichTextNodeType.heading3),\n\tz.literal(RichTextNodeType.heading4),\n\tz.literal(RichTextNodeType.heading5),\n\tz.literal(RichTextNodeType.heading6),\n\tz.literal(RichTextNodeType.preformatted),\n\tz.literal(RichTextNodeType.oListItem),\n\tz.literal(RichTextNodeType.listItem),\n])\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getTextBlockSchema = <\n\tTLinkSchema extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tlinkSchema: TLinkSchema,\n) =>\n\tz.object({\n\t\ttype: TextBlockTypeSchema,\n\t\tcontent: z.object({\n\t\t\ttext: z.string(),\n\t\t\tspans: z.optional(\n\t\t\t\tz.pipe(\n\t\t\t\t\tz.array(z.unknown()),\n\t\t\t\t\tz.transform((spans) => {\n\t\t\t\t\t\tconst spanSchema = getSpanSchema(linkSchema)\n\n\t\t\t\t\t\t// Filter out invalid spans and order them by start position\n\t\t\t\t\t\treturn spans\n\t\t\t\t\t\t\t.flatMap((maybeSpan) => {\n\t\t\t\t\t\t\t\tconst parsed = spanSchema.safeParse(maybeSpan)\n\t\t\t\t\t\t\t\treturn parsed.success ? [parsed.data] : []\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.sort((a, b) => a.start - b.start)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t),\n\t\t}),\n\t\tlabel: z.optional(z.string()),\n\t\tdirection: z.optional(z.string()),\n\t})\n\nconst TextBlockLegacySchema = getTextBlockSchema(FilledLinkLegacyValueSchema)\n\ntype TextBlockLegacy = z.infer<typeof TextBlockLegacySchema>\n\n// Image block\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getImageBlockSchema = <\n\tTData extends typeof ImageLegacyViewSchema | typeof ImageContentViewSchema,\n\tTLinkTo extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tdata: TData,\n\tlinkTo: TLinkTo,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.image),\n\t\tdata: z.extend(data, { linkTo: z.nullish(linkTo) }),\n\t\tlabel: z.nullish(z.string()),\n\t\tdirection: z.nullish(z.string()),\n\t})\n\nconst ImageBlockLegacySchema = getImageBlockSchema(\n\tImageLegacyViewSchema,\n\tFilledLinkLegacyValueSchema,\n)\n\ntype ImageBlockLegacy = z.infer<typeof ImageBlockLegacySchema>\n\n// Embed block\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getEmbedBlockSchema = <\n\tTData extends typeof EmbedLegacyLooseSchema | typeof EmbedContentSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.embed),\n\t\tdata,\n\t\tlabel: z.nullish(z.string()),\n\t\tdirection: z.nullish(z.string()),\n\t})\n\nconst EmbedBlockLegacySchema = getEmbedBlockSchema(EmbedLegacyLooseSchema)\n\ntype EmbedBlockLegacy = z.infer<typeof EmbedBlockLegacySchema>\n\n// Blocks\nexport const RichTextLegacyBlockSchema: z.ZodMiniType<RichTextLegacyBlock> = z.discriminatedUnion(\n\t\"type\",\n\t[TextBlockLegacySchema, ImageBlockLegacySchema, EmbedBlockLegacySchema],\n)\n\nexport type RichTextLegacyBlock = TextBlockLegacy | ImageBlockLegacy | EmbedBlockLegacy\n\nexport const RichTextLegacySchema = z.array(RichTextLegacyBlockSchema)\n\nexport type RichTextLegacy = z.infer<typeof RichTextLegacySchema>\n"],"mappings":";;;;;AAYA,MAAa,mBAAmB;CAC/B,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,WAAW;CACX,cAAc;CACd,WAAW;CACX,UAAU;CACV,OAAO;CACP,OAAO;CACP,WAAW;CACX,QAAQ;CACR,IAAI;AACL;AAYA,MAAM,0BAGL,SAEA,EAAE,OAAO;CACR,MAAM,EAAE,QAAQ,iBAAiB,SAAS;CAC1C,OAAO,EAAE,OAAO;CAChB,KAAK,EAAE,OAAO;CACd;AACD,CAAC;AAEF,MAAM,kBAAkB,EAAE,OAAO;CAChC,MAAM,EAAE,QAAQ,OAAO;CACvB,OAAO,EAAE,OAAO;CAChB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,EAAE,KAAK;EACnC,CAAC,CACF,CACD;CACD,CAAC;CACD,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;CAC5B,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC;AACjC,CAAC;AAEF,MAAM,wBAAwB,mBAAmB,2BAA2B;AAO5E,MAAa,uBAIZ,MACA,WAEA,EAAE,OAAO;CACR,MAAM,EAAE,QAAQ,iBAAiB,KAAK;CACtC,MAAM,EAAE,OAAO,MAAM,EAAE,QAAQ,EAAE,QAAQ,MAAM,EAAE,CAAC;CAClD,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC3B,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC;AAChC,CAAC;AAEF,MAAM,yBAAyB,oBAC9B,uBACA,2BACD;AAMA,MAAa,uBAGZ,SAEA,EAAE,OAAO;CACR,MAAM,EAAE,QAAQ,iBAAiB,KAAK;CACtC;CACA,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC3B,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC;AAChC,CAAC;AAEF,MAAM,yBAAyB,oBAAoB,sBAAsB;AAKzE,MAAa,4BAAgE,EAAE,mBAC9E,QACA;CAAC;CAAuB;CAAwB;AAAsB,CACvE;AAIA,MAAa,uBAAuB,EAAE,MAAM,yBAAyB"}
1
+ {"version":3,"file":"richText.js","names":[],"sources":["../../../src/content/legacy/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\n// It's important to only import the types here to\n// avoid runtime circular dependencies!\nimport type { EmbedContentSchema } from \"../embed\"\nimport type { ImageContentViewSchema } from \"../image\"\nimport type { FilledLinkContentValue, FilledLinkContentValueSchema } from \"../link\"\nimport { EmbedLegacyLooseSchema } from \"./embed\"\nimport { ImageLegacyViewSchema } from \"./image\"\nimport { FilledLinkLegacyValueSchema } from \"./link\"\nimport type { FilledLinkLegacyValue } from \"./link\"\n\nexport const RichTextNodeType = {\n\theading1: \"heading1\",\n\theading2: \"heading2\",\n\theading3: \"heading3\",\n\theading4: \"heading4\",\n\theading5: \"heading5\",\n\theading6: \"heading6\",\n\tparagraph: \"paragraph\",\n\tpreformatted: \"preformatted\",\n\toListItem: \"o-list-item\",\n\tlistItem: \"list-item\",\n\timage: \"image\",\n\tembed: \"embed\",\n\thyperlink: \"hyperlink\",\n\tstrong: \"strong\",\n\tem: \"em\",\n} as const\n\nexport type RichTextNodeTypes = (typeof RichTextNodeType)[keyof typeof RichTextNodeType]\n\n// Spans\ntype HyperlinkSpan<TData extends FilledLinkLegacyValue | FilledLinkContentValue> = {\n\ttype: typeof RichTextNodeType.hyperlink\n\tstart: number\n\tend: number\n\tdata: TData\n}\n\nconst getHyperlinkSpanSchema = <\n\tTData extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.hyperlink),\n\t\tstart: z.number(),\n\t\tend: z.number(),\n\t\tdata,\n\t})\n\nconst LabelSpanSchema = z.object({\n\ttype: z.literal(\"label\"),\n\tstart: z.number(),\n\tend: z.number(),\n\tdata: z.pipe(\n\t\tz.optional(z.unknown()),\n\t\tz.transform((value) => (typeof value === \"string\" && value.length > 0 ? value : \"\")),\n\t),\n})\ntype LabelSpan = z.infer<typeof LabelSpanSchema>\n\nconst BasicSpanSchema = z.object({\n\ttype: z.union([\n\t\tz.literal(RichTextNodeType.strong),\n\t\tz.literal(RichTextNodeType.em),\n\t\tz.literal(\"list-item\"), // legacy case\n\t]),\n\tstart: z.number(),\n\tend: z.number(),\n})\ntype BasicSpan = z.infer<typeof BasicSpanSchema>\n\nexport type Span<TLink extends FilledLinkLegacyValue | FilledLinkContentValue> =\n\t| HyperlinkSpan<TLink>\n\t| LabelSpan\n\t| BasicSpan\n\nexport type RichTextLegacySpan = Span<FilledLinkLegacyValue>\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getSpanSchema = <\n\tTLinkSchema extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tlinkSchema: TLinkSchema,\n) =>\n\tz.discriminatedUnion(\"type\", [\n\t\tgetHyperlinkSpanSchema(linkSchema),\n\t\tLabelSpanSchema,\n\t\tBasicSpanSchema,\n\t])\n\n// Text blocks\nconst TextBlockTypeSchema = z.union([\n\tz.literal(RichTextNodeType.paragraph),\n\tz.literal(RichTextNodeType.heading1),\n\tz.literal(RichTextNodeType.heading2),\n\tz.literal(RichTextNodeType.heading3),\n\tz.literal(RichTextNodeType.heading4),\n\tz.literal(RichTextNodeType.heading5),\n\tz.literal(RichTextNodeType.heading6),\n\tz.literal(RichTextNodeType.preformatted),\n\tz.literal(RichTextNodeType.oListItem),\n\tz.literal(RichTextNodeType.listItem),\n])\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getTextBlockSchema = <\n\tTLinkSchema extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tlinkSchema: TLinkSchema,\n) =>\n\tz.object({\n\t\ttype: TextBlockTypeSchema,\n\t\tcontent: z.object({\n\t\t\ttext: z.string(),\n\t\t\tspans: z.optional(\n\t\t\t\tz.pipe(\n\t\t\t\t\tz.array(z.unknown()),\n\t\t\t\t\tz.transform((spans) => {\n\t\t\t\t\t\tconst spanSchema = getSpanSchema(linkSchema)\n\n\t\t\t\t\t\t// Filter out invalid spans and order them by start position\n\t\t\t\t\t\treturn spans\n\t\t\t\t\t\t\t.flatMap((maybeSpan) => {\n\t\t\t\t\t\t\t\tconst parsed = spanSchema.safeParse(maybeSpan)\n\t\t\t\t\t\t\t\treturn parsed.success ? [parsed.data] : []\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.sort((a, b) => a.start - b.start)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t),\n\t\t}),\n\t\tlabel: z.optional(z.string()),\n\t\tdirection: z.optional(z.string()),\n\t})\n\nconst TextBlockLegacySchema = getTextBlockSchema(FilledLinkLegacyValueSchema)\n\ntype TextBlockLegacy = z.infer<typeof TextBlockLegacySchema>\n\n// Image block\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getImageBlockSchema = <\n\tTData extends typeof ImageLegacyViewSchema | typeof ImageContentViewSchema,\n\tTLinkTo extends typeof FilledLinkLegacyValueSchema | typeof FilledLinkContentValueSchema,\n>(\n\tdata: TData,\n\tlinkTo: TLinkTo,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.image),\n\t\tdata: z.extend(data, { linkTo: z.nullish(linkTo) }),\n\t\tlabel: z.nullish(z.string()),\n\t\tdirection: z.nullish(z.string()),\n\t})\n\nconst ImageBlockLegacySchema = getImageBlockSchema(\n\tImageLegacyViewSchema,\n\tFilledLinkLegacyValueSchema,\n)\n\ntype ImageBlockLegacy = z.infer<typeof ImageBlockLegacySchema>\n\n// Embed block\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getEmbedBlockSchema = <\n\tTData extends typeof EmbedLegacyLooseSchema | typeof EmbedContentSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.embed),\n\t\tdata,\n\t\tlabel: z.nullish(z.string()),\n\t\tdirection: z.nullish(z.string()),\n\t})\n\nconst EmbedBlockLegacySchema = getEmbedBlockSchema(EmbedLegacyLooseSchema)\n\ntype EmbedBlockLegacy = z.infer<typeof EmbedBlockLegacySchema>\n\n// Blocks\nexport const RichTextLegacyBlockSchema: z.ZodMiniType<RichTextLegacyBlock> = z.discriminatedUnion(\n\t\"type\",\n\t[TextBlockLegacySchema, ImageBlockLegacySchema, EmbedBlockLegacySchema],\n)\n\nexport type RichTextLegacyBlock = TextBlockLegacy | ImageBlockLegacy | EmbedBlockLegacy\n\nexport const RichTextLegacySchema = z.array(RichTextLegacyBlockSchema)\n\nexport type RichTextLegacy = z.infer<typeof RichTextLegacySchema>\n"],"mappings":";;;;;AAYA,MAAa,mBAAmB;CAC/B,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UA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odMiniObject<{
47
47
  background: z.ZodMiniString<string>;
48
48
  }, z.core.$strip>;
49
49
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
50
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
51
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
50
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
51
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
52
52
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
53
53
  linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniType<FilledLinkContentValue, unknown, z.core.$ZodTypeInternals<FilledLinkContentValue, unknown>>>>;
54
54
  }, z.core.$strip>;
@@ -73,7 +73,7 @@ declare const RichTextContentEmbedBlockSchema: z.ZodMiniObject<{
73
73
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
74
74
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
75
75
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
76
- all: z.ZodMiniUnknown;
76
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
77
77
  }, z.core.$strip>;
78
78
  label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
79
79
  direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
@@ -24,7 +24,7 @@ declare const LegacySliceContentSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniDi
24
24
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
25
25
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
26
26
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
27
- all: z.ZodMiniUnknown;
27
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
28
28
  }, z.core.$strip>, z.ZodMiniObject<{
29
29
  position: z.ZodMiniObject<{
30
30
  lat: z.ZodMiniNumber<number>;
@@ -49,8 +49,8 @@ declare const LegacySliceContentSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniDi
49
49
  background: z.ZodMiniString<string>;
50
50
  }, z.core.$strip>;
51
51
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
52
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
53
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
52
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
53
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
54
54
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
55
55
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
56
56
  origin: z.ZodMiniObject<{
@@ -70,8 +70,8 @@ declare const LegacySliceContentSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniDi
70
70
  background: z.ZodMiniString<string>;
71
71
  }, z.core.$strip>;
72
72
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
73
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
74
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
73
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
74
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
75
75
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
76
76
  }, z.core.$strip>>>;
77
77
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;
@@ -196,7 +196,7 @@ declare const CompositeSliceContentSchema: z.ZodMiniObject<{
196
196
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
197
197
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
198
198
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
199
- all: z.ZodMiniUnknown;
199
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
200
200
  }, z.core.$strip>, z.ZodMiniObject<{
201
201
  position: z.ZodMiniObject<{
202
202
  lat: z.ZodMiniNumber<number>;
@@ -221,8 +221,8 @@ declare const CompositeSliceContentSchema: z.ZodMiniObject<{
221
221
  background: z.ZodMiniString<string>;
222
222
  }, z.core.$strip>;
223
223
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
224
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
225
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
224
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
225
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
226
226
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
227
227
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
228
228
  origin: z.ZodMiniObject<{
@@ -242,8 +242,8 @@ declare const CompositeSliceContentSchema: z.ZodMiniObject<{
242
242
  background: z.ZodMiniString<string>;
243
243
  }, z.core.$strip>;
244
244
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
245
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
246
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
245
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
246
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
247
247
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
248
248
  }, z.core.$strip>>>;
249
249
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;
@@ -368,7 +368,7 @@ declare const SharedSliceContentSchema: z.ZodMiniObject<{
368
368
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
369
369
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
370
370
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
371
- all: z.ZodMiniUnknown;
371
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
372
372
  }, z.core.$strip>, z.ZodMiniObject<{
373
373
  position: z.ZodMiniObject<{
374
374
  lat: z.ZodMiniNumber<number>;
@@ -393,8 +393,8 @@ declare const SharedSliceContentSchema: z.ZodMiniObject<{
393
393
  background: z.ZodMiniString<string>;
394
394
  }, z.core.$strip>;
395
395
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
396
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
397
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
396
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
397
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
398
398
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
399
399
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
400
400
  origin: z.ZodMiniObject<{
@@ -414,8 +414,8 @@ declare const SharedSliceContentSchema: z.ZodMiniObject<{
414
414
  background: z.ZodMiniString<string>;
415
415
  }, z.core.$strip>;
416
416
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
417
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
418
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
417
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
418
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
419
419
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
420
420
  }, z.core.$strip>>>;
421
421
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;
@@ -29,7 +29,7 @@ declare const LegacySliceItemContentSchema: z.ZodMiniObject<{
29
29
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
30
30
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
31
31
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
32
- all: z.ZodMiniUnknown;
32
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
33
33
  }, z.core.$strip>, z.ZodMiniObject<{
34
34
  position: z.ZodMiniObject<{
35
35
  lat: z.ZodMiniNumber<number>;
@@ -54,8 +54,8 @@ declare const LegacySliceItemContentSchema: z.ZodMiniObject<{
54
54
  background: z.ZodMiniString<string>;
55
55
  }, z.core.$strip>;
56
56
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
57
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
58
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
57
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
58
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
59
59
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
60
60
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
61
61
  origin: z.ZodMiniObject<{
@@ -75,8 +75,8 @@ declare const LegacySliceItemContentSchema: z.ZodMiniObject<{
75
75
  background: z.ZodMiniString<string>;
76
76
  }, z.core.$strip>;
77
77
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
78
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
79
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
78
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
79
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
80
80
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
81
81
  }, z.core.$strip>>>;
82
82
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;
@@ -206,7 +206,7 @@ declare const CompositeSliceItemContentSchema: z.ZodMiniObject<{
206
206
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
207
207
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
208
208
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
209
- all: z.ZodMiniUnknown;
209
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
210
210
  }, z.core.$strip>, z.ZodMiniObject<{
211
211
  position: z.ZodMiniObject<{
212
212
  lat: z.ZodMiniNumber<number>;
@@ -231,8 +231,8 @@ declare const CompositeSliceItemContentSchema: z.ZodMiniObject<{
231
231
  background: z.ZodMiniString<string>;
232
232
  }, z.core.$strip>;
233
233
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
234
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
235
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
234
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
235
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
236
236
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
237
237
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
238
238
  origin: z.ZodMiniObject<{
@@ -252,8 +252,8 @@ declare const CompositeSliceItemContentSchema: z.ZodMiniObject<{
252
252
  background: z.ZodMiniString<string>;
253
253
  }, z.core.$strip>;
254
254
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
255
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
256
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
255
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
256
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
257
257
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
258
258
  }, z.core.$strip>>>;
259
259
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;
@@ -383,7 +383,7 @@ declare const SharedSliceItemContentSchema: z.ZodMiniObject<{
383
383
  thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
384
384
  html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
385
385
  __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
386
- all: z.ZodMiniUnknown;
386
+ all: z.ZodMiniOptional<z.ZodMiniUnknown>;
387
387
  }, z.core.$strip>, z.ZodMiniObject<{
388
388
  position: z.ZodMiniObject<{
389
389
  lat: z.ZodMiniNumber<number>;
@@ -408,8 +408,8 @@ declare const SharedSliceItemContentSchema: z.ZodMiniObject<{
408
408
  background: z.ZodMiniString<string>;
409
409
  }, z.core.$strip>;
410
410
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
411
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
412
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
411
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
412
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
413
413
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
414
414
  thumbnails: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
415
415
  origin: z.ZodMiniObject<{
@@ -429,8 +429,8 @@ declare const SharedSliceItemContentSchema: z.ZodMiniObject<{
429
429
  background: z.ZodMiniString<string>;
430
430
  }, z.core.$strip>;
431
431
  url: z.ZodMiniOptional<z.ZodMiniString<string>>;
432
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
433
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
432
+ credits: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
433
+ alt: z.ZodMiniOptional<z.ZodMiniDefault<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>>;
434
434
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
435
435
  }, z.core.$strip>>>;
436
436
  __TYPE__: z.ZodMiniLiteral<"ImageContent">;