@prismicio/types-internal 4.0.0-pr.6.eb53f11 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/content/document.d.ts +2 -3019
  2. package/dist/content/document.d.ts.map +1 -1
  3. package/dist/content/field.d.ts +1 -30
  4. package/dist/content/field.d.ts.map +1 -1
  5. package/dist/content/field.js.map +1 -1
  6. package/dist/content/group.d.ts +2 -1
  7. package/dist/content/group.d.ts.map +1 -1
  8. package/dist/content/group.js.map +1 -1
  9. package/dist/content/legacy/group.d.ts +9 -0
  10. package/dist/content/legacy/group.d.ts.map +1 -0
  11. package/dist/content/legacy/group.js.map +1 -1
  12. package/dist/content/legacy/link.d.ts +41 -0
  13. package/dist/content/legacy/link.d.ts.map +1 -0
  14. package/dist/content/legacy/link.js.map +1 -1
  15. package/dist/content/legacy/nestable.js.map +1 -1
  16. package/dist/content/legacy/repeatable.js +2 -8
  17. package/dist/content/legacy/repeatable.js.map +1 -1
  18. package/dist/content/legacy/richText.d.ts +109 -0
  19. package/dist/content/legacy/richText.d.ts.map +1 -0
  20. package/dist/content/legacy/richText.js.map +1 -1
  21. package/dist/content/legacy/slice.js +2 -3
  22. package/dist/content/legacy/slice.js.map +1 -1
  23. package/dist/content/link.d.ts +74 -99
  24. package/dist/content/link.d.ts.map +1 -1
  25. package/dist/content/link.js +2 -2
  26. package/dist/content/link.js.map +1 -1
  27. package/dist/content/nestable.d.ts +13 -749
  28. package/dist/content/nestable.d.ts.map +1 -1
  29. package/dist/content/nestable.js +1 -0
  30. package/dist/content/nestable.js.map +1 -1
  31. package/dist/content/repeatable.d.ts +3 -98
  32. package/dist/content/repeatable.d.ts.map +1 -1
  33. package/dist/content/richText.d.ts +20 -248
  34. package/dist/content/richText.d.ts.map +1 -1
  35. package/dist/content/richText.js.map +1 -1
  36. package/dist/content/slice.d.ts +6 -4509
  37. package/dist/content/slice.d.ts.map +1 -1
  38. package/dist/content/slice.js.map +1 -1
  39. package/dist/content/slices.d.ts +8 -6765
  40. package/dist/content/slices.d.ts.map +1 -1
  41. package/dist/content/table.d.ts +2 -134
  42. package/dist/content/table.d.ts.map +1 -1
  43. package/dist/content/widget.d.ts +5 -3020
  44. package/dist/content/widget.d.ts.map +1 -1
  45. package/dist/content/widget.js.map +1 -1
  46. package/dist/helpers/contentPath.js +1 -1
  47. package/dist/helpers/customTypeModel.d.ts +1 -1
  48. package/dist/helpers/customTypeModel.js +1 -1
  49. package/dist/helpers/documentContent.d.ts +3 -2
  50. package/dist/helpers/documentContent.d.ts.map +1 -1
  51. package/dist/helpers/documentContent.js +14 -1
  52. package/dist/helpers/documentContent.js.map +1 -1
  53. package/dist/helpers/sliceContent.d.ts +12 -0
  54. package/dist/helpers/sliceContent.d.ts.map +1 -0
  55. package/dist/helpers/sliceContent.js +60 -0
  56. package/dist/helpers/sliceContent.js.map +1 -0
  57. package/dist/helpers/traverseContent.d.ts +15 -16
  58. package/dist/helpers/traverseContent.d.ts.map +1 -1
  59. package/dist/helpers/traverseContent.js +51 -19
  60. package/dist/helpers/traverseContent.js.map +1 -1
  61. package/dist/helpers/traverseContentWithModel.d.ts +14 -15
  62. package/dist/helpers/traverseContentWithModel.d.ts.map +1 -1
  63. package/dist/helpers/traverseContentWithModel.js +61 -35
  64. package/dist/helpers/traverseContentWithModel.js.map +1 -1
  65. package/dist/index.d.ts +25 -24
  66. package/dist/index.js +3 -1
  67. package/dist/io-ts.d.ts +3048 -71012
  68. package/dist/io-ts.d.ts.map +1 -1
  69. package/dist/io-ts.js +125 -124
  70. package/dist/io-ts.js.map +1 -1
  71. package/dist/model/customType.d.ts +3 -3329
  72. package/dist/model/customType.d.ts.map +1 -1
  73. package/dist/model/group.d.ts +375 -376
  74. package/dist/model/group.d.ts.map +1 -1
  75. package/dist/model/group.js.map +1 -1
  76. package/dist/model/image.d.ts +4 -4
  77. package/dist/model/image.js.map +1 -1
  78. package/dist/model/link.d.ts +2 -2
  79. package/dist/model/link.js.map +1 -1
  80. package/dist/model/nestable.d.ts +17 -178
  81. package/dist/model/nestable.d.ts.map +1 -1
  82. package/dist/model/nestable.js +3 -3
  83. package/dist/model/nestable.js.map +1 -1
  84. package/dist/model/richText.d.ts +3 -7
  85. package/dist/model/richText.d.ts.map +1 -1
  86. package/dist/model/richText.js +4 -3
  87. package/dist/model/richText.js.map +1 -1
  88. package/dist/model/section.d.ts +3 -3329
  89. package/dist/model/section.d.ts.map +1 -1
  90. package/dist/model/select.d.ts +1 -1
  91. package/dist/model/select.js +1 -1
  92. package/dist/model/select.js.map +1 -1
  93. package/dist/model/slice.d.ts +781 -3720
  94. package/dist/model/slice.d.ts.map +1 -1
  95. package/dist/model/slice.js +7 -2
  96. package/dist/model/slice.js.map +1 -1
  97. package/dist/model/slices.d.ts +3 -2195
  98. package/dist/model/slices.d.ts.map +1 -1
  99. package/dist/model/table.d.ts +2 -1
  100. package/dist/model/table.d.ts.map +1 -1
  101. package/dist/model/table.js +9 -7
  102. package/dist/model/table.js.map +1 -1
  103. package/dist/model/widget.d.ts +6 -3331
  104. package/dist/model/widget.d.ts.map +1 -1
  105. package/dist/model/widget.js.map +1 -1
  106. package/dist/zod4.d.ts +1332 -34960
  107. package/dist/zod4.d.ts.map +1 -1
  108. package/dist/zod4.js +125 -124
  109. package/dist/zod4.js.map +1 -1
  110. package/package.json +3 -2
  111. package/src/content/field.ts +9 -2
  112. package/src/content/group.ts +5 -2
  113. package/src/content/legacy/group.ts +12 -4
  114. package/src/content/legacy/link.ts +32 -9
  115. package/src/content/legacy/nestable.ts +26 -2
  116. package/src/content/legacy/repeatable.ts +3 -16
  117. package/src/content/legacy/richText.ts +37 -5
  118. package/src/content/legacy/slice.ts +8 -7
  119. package/src/content/legacy/widget.ts +6 -2
  120. package/src/content/link.ts +32 -9
  121. package/src/content/nestable.ts +42 -2
  122. package/src/content/richText.ts +19 -7
  123. package/src/content/slice.ts +2 -2
  124. package/src/content/widget.ts +6 -2
  125. package/src/helpers/documentContent.ts +32 -1
  126. package/src/helpers/sliceContent.ts +86 -0
  127. package/src/helpers/traverseContent.ts +93 -32
  128. package/src/helpers/traverseContentWithModel.ts +73 -48
  129. package/src/index.ts +4 -1
  130. package/src/io-ts.ts +164 -144
  131. package/src/model/group.ts +4 -1
  132. package/src/model/image.ts +1 -1
  133. package/src/model/link.ts +1 -1
  134. package/src/model/nestable.ts +33 -1
  135. package/src/model/richText.ts +2 -2
  136. package/src/model/select.ts +2 -2
  137. package/src/model/slice.ts +36 -9
  138. package/src/model/table.ts +11 -2
  139. package/src/model/widget.ts +8 -4
  140. package/src/zod4.ts +164 -144
  141. package/dist/content/legacy/image.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"nestable.d.ts","names":[],"sources":["../../src/content/nestable.ts"],"mappings":";;;cA0Ba,qBAAA,EAAqB,CAAA,CAAA,YAAA,WAAA,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBtB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA"}
1
+ {"version":3,"file":"nestable.d.ts","names":[],"sources":["../../src/content/nestable.ts"],"mappings":";;;;;;;;;;;;;;;KAmEY,eAAA,GACT,YAAA,GACA,cAAA,GACA,YAAA,GACA,WAAA,GACA,YAAA,GACA,eAAA,GACA,YAAA,GACA,uBAAA,GACA,WAAA,GACA,aAAA,GACA,YAAA,GACA,iBAAA,GACA,eAAA,GACA,aAAA,GACA,gBAAA,GACA,YAAA,GACA,WAAA,GACA,gBAAA"}
@@ -46,6 +46,7 @@ const NestableContentTypes = [
46
46
  SeparatorContentType,
47
47
  TableContentType
48
48
  ];
49
+ /** @internal */
49
50
  function isNestableContent(content) {
50
51
  return NestableContentTypes.includes(content.__TYPE__);
51
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nestable.js","names":[],"sources":["../../src/content/nestable.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport type { NestableModel } from \"../model/nestable\"\nimport { BooleanContentDefaultValue, BooleanContentSchema, BooleanContentType } from \"./boolean\"\nimport { EmbedContentSchema, EmbedContentType } from \"./embed\"\nimport { EmptyContentSchema, EmptyContentType } from \"./empty\"\nimport {\n\tColorContentSchema,\n\tDateContentSchema,\n\tFieldContentType,\n\tNumberContentSchema,\n\tRangeContentSchema,\n\tSelectContentDefaultValue,\n\tSelectContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n} from \"./field\"\nimport { GeoPointContentSchema, GeoPointContentType } from \"./geopoint\"\nimport { ImageContentSchema, ImageContentType } from \"./image\"\nimport { IntegrationFieldContentSchema, IntegrationFieldContentType } from \"./integrationField\"\nimport { LinkContentSchema, LinkContentType } from \"./link\"\nimport { RepeatableContentSchema, RepeatableContentType } from \"./repeatable\"\nimport { RichTextContentSchema, RichTextContentType } from \"./richText\"\nimport { SeparatorContentSchema, SeparatorContentType } from \"./separator\"\nimport { TableContentSchema, TableContentType } from \"./table\"\n\nexport const NestableContentSchema = z.union([\n\tEmptyContentSchema,\n\tBooleanContentSchema,\n\tColorContentSchema,\n\tDateContentSchema,\n\tEmbedContentSchema,\n\tGeoPointContentSchema,\n\tImageContentSchema,\n\tIntegrationFieldContentSchema,\n\tLinkContentSchema,\n\tNumberContentSchema,\n\tRangeContentSchema,\n\tRepeatableContentSchema,\n\tRichTextContentSchema,\n\tSelectContentSchema,\n\tSeparatorContentSchema,\n\tTableContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n])\n\nexport type NestableContent = z.infer<typeof NestableContentSchema>\n\nconst NestableContentTypes = [\n\tEmptyContentType,\n\tBooleanContentType,\n\tEmbedContentType,\n\tFieldContentType,\n\tGeoPointContentType,\n\tImageContentType,\n\tIntegrationFieldContentType,\n\tLinkContentType,\n\tRepeatableContentType,\n\tRichTextContentType,\n\tSeparatorContentType,\n\tTableContentType,\n]\ntype NestableContentType = (typeof NestableContentTypes)[number]\nexport function isNestableContent(content: {\n\t__TYPE__: string\n}): content is { __TYPE__: NestableContentType } {\n\treturn (NestableContentTypes as string[]).includes(content.__TYPE__)\n}\n\n/**\n * Returns the default value for a nestable widget based on its configuration.\n * Currently only Boolean and Select fields have default values.\n */\nexport const NestableContentDefaultValue = (\n\twidgetDef: NestableModel,\n): NestableContent | undefined => {\n\tswitch (widgetDef.type) {\n\t\tcase \"Boolean\":\n\t\t\treturn BooleanContentDefaultValue(widgetDef)\n\t\tcase \"Select\":\n\t\t\treturn SelectContentDefaultValue(widgetDef)\n\t\tdefault:\n\t\t\treturn undefined\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAa,wBAAwB,EAAE,MAAM;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AAIF,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAED,SAAgB,kBAAkB,SAEe;AAChD,QAAQ,qBAAkC,SAAS,QAAQ,SAAS"}
1
+ {"version":3,"file":"nestable.js","names":[],"sources":["../../src/content/nestable.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport type { NestableModel } from \"../model/nestable\"\nimport type { BooleanContent } from \"./boolean\"\nimport { BooleanContentDefaultValue, BooleanContentSchema, BooleanContentType } from \"./boolean\"\nimport type { EmbedContent } from \"./embed\"\nimport { EmbedContentSchema, EmbedContentType } from \"./embed\"\nimport type { EmptyContent } from \"./empty\"\nimport { EmptyContentSchema, EmptyContentType } from \"./empty\"\nimport type {\n\tColorContent,\n\tDateContent,\n\tNumberContent,\n\tRangeContent,\n\tSelectContent,\n\tTextContent,\n\tTimestampContent,\n} from \"./field\"\nimport {\n\tColorContentSchema,\n\tDateContentSchema,\n\tFieldContentType,\n\tNumberContentSchema,\n\tRangeContentSchema,\n\tSelectContentDefaultValue,\n\tSelectContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n} from \"./field\"\nimport type { GeoPointContent } from \"./geopoint\"\nimport { GeoPointContentSchema, GeoPointContentType } from \"./geopoint\"\nimport type { ImageContent } from \"./image\"\nimport { ImageContentSchema, ImageContentType } from \"./image\"\nimport type { IntegrationFieldContent } from \"./integrationField\"\nimport { IntegrationFieldContentSchema, IntegrationFieldContentType } from \"./integrationField\"\nimport type { LinkContent } from \"./link\"\nimport { LinkContentSchema, LinkContentType } from \"./link\"\nimport type { RepeatableContent } from \"./repeatable\"\nimport { RepeatableContentSchema, RepeatableContentType } from \"./repeatable\"\nimport type { RichTextContent } from \"./richText\"\nimport { RichTextContentSchema, RichTextContentType } from \"./richText\"\nimport type { SeparatorContent } from \"./separator\"\nimport { SeparatorContentSchema, SeparatorContentType } from \"./separator\"\nimport type { TableContent } from \"./table\"\nimport { TableContentSchema, TableContentType } from \"./table\"\n\nexport const NestableContentSchema: z.ZodMiniType<NestableContent> = z.union([\n\tEmptyContentSchema,\n\tBooleanContentSchema,\n\tColorContentSchema,\n\tDateContentSchema,\n\tEmbedContentSchema,\n\tGeoPointContentSchema,\n\tImageContentSchema,\n\tIntegrationFieldContentSchema,\n\tLinkContentSchema,\n\tNumberContentSchema,\n\tRangeContentSchema,\n\tRepeatableContentSchema,\n\tRichTextContentSchema,\n\tSelectContentSchema,\n\tSeparatorContentSchema,\n\tTableContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n])\n\nexport type NestableContent =\n\t| EmptyContent\n\t| BooleanContent\n\t| ColorContent\n\t| DateContent\n\t| EmbedContent\n\t| GeoPointContent\n\t| ImageContent\n\t| IntegrationFieldContent\n\t| LinkContent\n\t| NumberContent\n\t| RangeContent\n\t| RepeatableContent\n\t| RichTextContent\n\t| SelectContent\n\t| SeparatorContent\n\t| TableContent\n\t| TextContent\n\t| TimestampContent\n\nconst NestableContentTypes = [\n\tEmptyContentType,\n\tBooleanContentType,\n\tEmbedContentType,\n\tFieldContentType,\n\tGeoPointContentType,\n\tImageContentType,\n\tIntegrationFieldContentType,\n\tLinkContentType,\n\tRepeatableContentType,\n\tRichTextContentType,\n\tSeparatorContentType,\n\tTableContentType,\n]\ntype NestableContentType = (typeof NestableContentTypes)[number]\n\n/** @internal */\nexport function isNestableContent(content: {\n\t__TYPE__: string\n}): content is { __TYPE__: NestableContentType } {\n\treturn (NestableContentTypes as string[]).includes(content.__TYPE__)\n}\n\n/**\n * Returns the default value for a nestable widget based on its configuration.\n * Currently only Boolean and Select fields have default values.\n */\nexport const NestableContentDefaultValue = (\n\twidgetDef: NestableModel,\n): NestableContent | undefined => {\n\tswitch (widgetDef.type) {\n\t\tcase \"Boolean\":\n\t\t\treturn BooleanContentDefaultValue(widgetDef)\n\t\tcase \"Select\":\n\t\t\treturn SelectContentDefaultValue(widgetDef)\n\t\tdefault:\n\t\t\treturn undefined\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AA8CA,MAAa,wBAAwD,EAAE,MAAM;CAC5E;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AAsBF,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAID,SAAgB,kBAAkB,SAEe;AAChD,QAAQ,qBAAkC,SAAS,QAAQ,SAAS"}
@@ -1,3 +1,4 @@
1
+ import { LinkValueContent } from "./link.js";
1
2
  import { z } from "zod/mini";
2
3
 
3
4
  //#region src/content/repeatable.d.ts
@@ -14,55 +15,7 @@ declare const RepeatableContentSchema: z.ZodMiniObject<{
14
15
  }, Record<string, unknown>>>, z.ZodMiniObject<{
15
16
  text: z.ZodMiniOptional<z.ZodMiniString<string>>;
16
17
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
17
- value: z.ZodMiniUnion<readonly [z.ZodMiniUnion<readonly [z.ZodMiniObject<{
18
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
19
- id: z.ZodMiniString<string>;
20
- url: z.ZodMiniString<string>;
21
- height: z.ZodMiniString<string>;
22
- width: z.ZodMiniString<string>;
23
- size: z.ZodMiniString<string>;
24
- name: z.ZodMiniString<string>;
25
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
26
- __TYPE__: z.ZodMiniLiteral<"ImageLink">;
27
- }, z.core.$strict>, z.ZodMiniObject<{
28
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
29
- id: z.ZodMiniString<string>;
30
- url: z.ZodMiniString<string>;
31
- name: z.ZodMiniString<string>;
32
- size: z.ZodMiniTransform<string, unknown>;
33
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
34
- __TYPE__: z.ZodMiniLiteral<"FileLink">;
35
- }, z.core.$strict>, z.ZodMiniObject<{
36
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
37
- id: z.ZodMiniString<string>;
38
- __TYPE__: z.ZodMiniLiteral<"DocumentLink">;
39
- }, z.core.$strict>, z.ZodMiniObject<{
40
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
41
- url: z.ZodMiniString<string>;
42
- target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
43
- preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
44
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
45
- }, z.core.$strict>>>;
46
- __TYPE__: z.ZodMiniLiteral<"ExternalLink">;
47
- }, z.core.$strict>]>, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
48
- kind: z.ZodMiniLiteral<"image">;
49
- __TYPE__: z.ZodMiniLiteral<"ImageLink">;
50
- }, z.core.$strict>, z.ZodMiniObject<{
51
- kind: z.ZodMiniLiteral<"file">;
52
- __TYPE__: z.ZodMiniLiteral<"FileLink">;
53
- }, z.core.$strict>, z.ZodMiniObject<{
54
- kind: z.ZodMiniLiteral<"media">;
55
- __TYPE__: z.ZodMiniLiteral<"MediaLink">;
56
- }, z.core.$strict>, z.ZodMiniObject<{
57
- kind: z.ZodMiniLiteral<"document">;
58
- __TYPE__: z.ZodMiniLiteral<"DocumentLink">;
59
- }, z.core.$strict>, z.ZodMiniObject<{
60
- kind: z.ZodMiniLiteral<"web">;
61
- __TYPE__: z.ZodMiniLiteral<"ExternalLink">;
62
- }, z.core.$strict>, z.ZodMiniObject<{
63
- kind: z.ZodMiniTransform<"any", unknown>;
64
- __TYPE__: z.ZodMiniLiteral<"AnyLink">;
65
- }, z.core.$strict>]>]>;
18
+ value: z.ZodMiniType<LinkValueContent, Record<string, unknown>>;
66
19
  }, z.core.$strip>>, z.ZodMiniTransform<{
67
20
  kind: "image";
68
21
  id: string;
@@ -132,55 +85,7 @@ declare const RepeatableContentSchema: z.ZodMiniObject<{
132
85
  variant?: string | undefined;
133
86
  text?: string | undefined;
134
87
  }, {
135
- value: {
136
- kind: "image";
137
- id: string;
138
- url: string;
139
- height: string;
140
- width: string;
141
- size: string;
142
- name: string;
143
- __TYPE__: "ImageLink";
144
- date?: string | null | undefined;
145
- } | {
146
- kind: "file";
147
- id: string;
148
- url: string;
149
- name: string;
150
- size: string;
151
- __TYPE__: "FileLink";
152
- date?: string | null | undefined;
153
- } | {
154
- kind: "document";
155
- id: string;
156
- __TYPE__: "DocumentLink";
157
- } | {
158
- kind: "web";
159
- url: string;
160
- __TYPE__: "ExternalLink";
161
- target?: string | null | undefined;
162
- preview?: {
163
- title?: string | undefined;
164
- } | null | undefined;
165
- } | {
166
- kind: "image";
167
- __TYPE__: "ImageLink";
168
- } | {
169
- kind: "file";
170
- __TYPE__: "FileLink";
171
- } | {
172
- kind: "media";
173
- __TYPE__: "MediaLink";
174
- } | {
175
- kind: "document";
176
- __TYPE__: "DocumentLink";
177
- } | {
178
- kind: "web";
179
- __TYPE__: "ExternalLink";
180
- } | {
181
- kind: "any";
182
- __TYPE__: "AnyLink";
183
- };
88
+ value: LinkValueContent;
184
89
  text?: string | undefined;
185
90
  variant?: string | undefined;
186
91
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"repeatable.d.ts","names":[],"sources":["../../src/content/repeatable.ts"],"mappings":";;;cAMa,uBAAA,EAAuB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA"}
1
+ {"version":3,"file":"repeatable.d.ts","names":[],"sources":["../../src/content/repeatable.ts"],"mappings":";;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA"}
@@ -1,53 +1,10 @@
1
+ import { FilledLinkValueContent } from "./link.js";
2
+ import { Span } from "./legacy/richText.js";
1
3
  import { z } from "zod/mini";
2
4
 
3
5
  //#region src/content/richText.d.ts
4
- declare const RichTextContentSpanSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
5
- type: z.ZodMiniLiteral<"hyperlink">;
6
- start: z.ZodMiniNumber<number>;
7
- end: z.ZodMiniNumber<number>;
8
- data: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
9
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
10
- id: z.ZodMiniString<string>;
11
- url: z.ZodMiniString<string>;
12
- height: z.ZodMiniString<string>;
13
- width: z.ZodMiniString<string>;
14
- size: z.ZodMiniString<string>;
15
- name: z.ZodMiniString<string>;
16
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
17
- __TYPE__: z.ZodMiniLiteral<"ImageLink">;
18
- }, z.core.$strict>, z.ZodMiniObject<{
19
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
20
- id: z.ZodMiniString<string>;
21
- url: z.ZodMiniString<string>;
22
- name: z.ZodMiniString<string>;
23
- size: z.ZodMiniTransform<string, unknown>;
24
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
25
- __TYPE__: z.ZodMiniLiteral<"FileLink">;
26
- }, z.core.$strict>, z.ZodMiniObject<{
27
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
28
- id: z.ZodMiniString<string>;
29
- __TYPE__: z.ZodMiniLiteral<"DocumentLink">;
30
- }, z.core.$strict>, z.ZodMiniObject<{
31
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
32
- url: z.ZodMiniString<string>;
33
- target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
34
- preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
35
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
36
- }, z.core.$strict>>>;
37
- __TYPE__: z.ZodMiniLiteral<"ExternalLink">;
38
- }, z.core.$strict>]>;
39
- }, z.core.$strip>, z.ZodMiniObject<{
40
- type: z.ZodMiniLiteral<"label">;
41
- start: z.ZodMiniNumber<number>;
42
- end: z.ZodMiniNumber<number>;
43
- data: z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<string, unknown>>;
44
- }, z.core.$strip>, z.ZodMiniObject<{
45
- type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"strong">, z.ZodMiniLiteral<"em">, z.ZodMiniLiteral<"list-item">]>;
46
- start: z.ZodMiniNumber<number>;
47
- end: z.ZodMiniNumber<number>;
48
- }, z.core.$strip>]>;
49
- type RichTextContentSpan = z.infer<typeof RichTextContentSpanSchema>;
50
- declare const RichTextContentBlockSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
6
+ type RichTextContentSpan = Span<FilledLinkValueContent>;
7
+ declare const TextBlockValueSchema: z.ZodMiniObject<{
51
8
  type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"paragraph">, z.ZodMiniLiteral<"heading1">, z.ZodMiniLiteral<"heading2">, z.ZodMiniLiteral<"heading3">, z.ZodMiniLiteral<"heading4">, z.ZodMiniLiteral<"heading5">, z.ZodMiniLiteral<"heading6">, z.ZodMiniLiteral<"preformatted">, z.ZodMiniLiteral<"o-list-item">, z.ZodMiniLiteral<"list-item">]>;
52
9
  content: z.ZodMiniObject<{
53
10
  text: z.ZodMiniString<string>;
@@ -57,49 +14,21 @@ declare const RichTextContentBlockSchema: z.ZodMiniUnion<readonly [z.ZodMiniObje
57
14
  end: number;
58
15
  data: string;
59
16
  } | {
60
- type: "list-item" | "strong" | "em";
17
+ type: "strong" | "em" | "list-item";
61
18
  start: number;
62
19
  end: number;
63
20
  } | {
64
21
  type: "hyperlink";
65
22
  start: number;
66
23
  end: number;
67
- data: {
68
- kind: "image";
69
- id: string;
70
- url: string;
71
- height: string;
72
- width: string;
73
- size: string;
74
- name: string;
75
- __TYPE__: "ImageLink";
76
- date?: string | null | undefined;
77
- } | {
78
- kind: "file";
79
- id: string;
80
- url: string;
81
- name: string;
82
- size: string;
83
- __TYPE__: "FileLink";
84
- date?: string | null | undefined;
85
- } | {
86
- kind: "document";
87
- id: string;
88
- __TYPE__: "DocumentLink";
89
- } | {
90
- kind: "web";
91
- url: string;
92
- __TYPE__: "ExternalLink";
93
- target?: string | null | undefined;
94
- preview?: {
95
- title?: string | undefined;
96
- } | null | undefined;
97
- };
24
+ data: FilledLinkValueContent;
98
25
  })[], unknown[]>>>;
99
26
  }, z.core.$strip>;
100
27
  label: z.ZodMiniOptional<z.ZodMiniString<string>>;
101
28
  direction: z.ZodMiniOptional<z.ZodMiniString<string>>;
102
- }, z.core.$strip>, z.ZodMiniObject<{
29
+ }, z.core.$strip>;
30
+ type TextBlockValue = z.infer<typeof TextBlockValueSchema>;
31
+ declare const ImageBlockValueSchema: z.ZodMiniObject<{
103
32
  type: z.ZodMiniLiteral<"image">;
104
33
  data: z.ZodMiniObject<{
105
34
  origin: z.ZodMiniObject<{
@@ -122,41 +51,13 @@ declare const RichTextContentBlockSchema: z.ZodMiniUnion<readonly [z.ZodMiniObje
122
51
  credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
123
52
  alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
124
53
  provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
125
- linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
126
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
127
- id: z.ZodMiniString<string>;
128
- url: z.ZodMiniString<string>;
129
- height: z.ZodMiniString<string>;
130
- width: z.ZodMiniString<string>;
131
- size: z.ZodMiniString<string>;
132
- name: z.ZodMiniString<string>;
133
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
134
- __TYPE__: z.ZodMiniLiteral<"ImageLink">;
135
- }, z.core.$strict>, z.ZodMiniObject<{
136
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
137
- id: z.ZodMiniString<string>;
138
- url: z.ZodMiniString<string>;
139
- name: z.ZodMiniString<string>;
140
- size: z.ZodMiniTransform<string, unknown>;
141
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
142
- __TYPE__: z.ZodMiniLiteral<"FileLink">;
143
- }, z.core.$strict>, z.ZodMiniObject<{
144
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
145
- id: z.ZodMiniString<string>;
146
- __TYPE__: z.ZodMiniLiteral<"DocumentLink">;
147
- }, z.core.$strict>, z.ZodMiniObject<{
148
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
149
- url: z.ZodMiniString<string>;
150
- target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
151
- preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
152
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
153
- }, z.core.$strict>>>;
154
- __TYPE__: z.ZodMiniLiteral<"ExternalLink">;
155
- }, z.core.$strict>]>>>;
54
+ linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniType<FilledLinkValueContent, unknown, z.core.$ZodTypeInternals<FilledLinkValueContent, unknown>>>>;
156
55
  }, z.core.$strip>;
157
56
  label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
158
57
  direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
159
- }, z.core.$strip>, z.ZodMiniObject<{
58
+ }, z.core.$strip>;
59
+ type ImageBlockValue = z.infer<typeof ImageBlockValueSchema>;
60
+ declare const EmbedBlockValueSchema: z.ZodMiniObject<{
160
61
  type: z.ZodMiniLiteral<"embed">;
161
62
  data: z.ZodMiniObject<{
162
63
  embed_url: z.ZodMiniString<string>;
@@ -177,143 +78,14 @@ declare const RichTextContentBlockSchema: z.ZodMiniUnion<readonly [z.ZodMiniObje
177
78
  }, z.core.$strip>;
178
79
  label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
179
80
  direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
180
- }, z.core.$strip>]>;
181
- type RichTextContentBlock = z.infer<typeof RichTextContentBlockSchema>;
182
- declare const RichTextContentSchema: z.ZodMiniObject<{
183
- __TYPE__: z.ZodMiniLiteral<"StructuredTextContent">;
184
- value: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
185
- type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"paragraph">, z.ZodMiniLiteral<"heading1">, z.ZodMiniLiteral<"heading2">, z.ZodMiniLiteral<"heading3">, z.ZodMiniLiteral<"heading4">, z.ZodMiniLiteral<"heading5">, z.ZodMiniLiteral<"heading6">, z.ZodMiniLiteral<"preformatted">, z.ZodMiniLiteral<"o-list-item">, z.ZodMiniLiteral<"list-item">]>;
186
- content: z.ZodMiniObject<{
187
- text: z.ZodMiniString<string>;
188
- spans: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniTransform<({
189
- type: "label";
190
- start: number;
191
- end: number;
192
- data: string;
193
- } | {
194
- type: "list-item" | "strong" | "em";
195
- start: number;
196
- end: number;
197
- } | {
198
- type: "hyperlink";
199
- start: number;
200
- end: number;
201
- data: {
202
- kind: "image";
203
- id: string;
204
- url: string;
205
- height: string;
206
- width: string;
207
- size: string;
208
- name: string;
209
- __TYPE__: "ImageLink";
210
- date?: string | null | undefined;
211
- } | {
212
- kind: "file";
213
- id: string;
214
- url: string;
215
- name: string;
216
- size: string;
217
- __TYPE__: "FileLink";
218
- date?: string | null | undefined;
219
- } | {
220
- kind: "document";
221
- id: string;
222
- __TYPE__: "DocumentLink";
223
- } | {
224
- kind: "web";
225
- url: string;
226
- __TYPE__: "ExternalLink";
227
- target?: string | null | undefined;
228
- preview?: {
229
- title?: string | undefined;
230
- } | null | undefined;
231
- };
232
- })[], unknown[]>>>;
233
- }, z.core.$strip>;
234
- label: z.ZodMiniOptional<z.ZodMiniString<string>>;
235
- direction: z.ZodMiniOptional<z.ZodMiniString<string>>;
236
- }, z.core.$strip>, z.ZodMiniObject<{
237
- type: z.ZodMiniLiteral<"image">;
238
- data: z.ZodMiniObject<{
239
- origin: z.ZodMiniObject<{
240
- id: z.ZodMiniString<string>;
241
- url: z.ZodMiniString<string>;
242
- width: z.ZodMiniNumber<number>;
243
- height: z.ZodMiniNumber<number>;
244
- }, z.core.$strip>;
245
- width: z.ZodMiniNumber<number>;
246
- height: z.ZodMiniNumber<number>;
247
- edit: z.ZodMiniObject<{
248
- zoom: z.ZodMiniNumber<number>;
249
- crop: z.ZodMiniObject<{
250
- x: z.ZodMiniNumber<number>;
251
- y: z.ZodMiniNumber<number>;
252
- }, z.core.$strip>;
253
- background: z.ZodMiniString<string>;
254
- }, z.core.$strip>;
255
- url: z.ZodMiniOptional<z.ZodMiniString<string>>;
256
- credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
257
- alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
258
- provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
259
- linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
260
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
261
- id: z.ZodMiniString<string>;
262
- url: z.ZodMiniString<string>;
263
- height: z.ZodMiniString<string>;
264
- width: z.ZodMiniString<string>;
265
- size: z.ZodMiniString<string>;
266
- name: z.ZodMiniString<string>;
267
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
268
- __TYPE__: z.ZodMiniLiteral<"ImageLink">;
269
- }, z.core.$strict>, z.ZodMiniObject<{
270
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
271
- id: z.ZodMiniString<string>;
272
- url: z.ZodMiniString<string>;
273
- name: z.ZodMiniString<string>;
274
- size: z.ZodMiniTransform<string, unknown>;
275
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
276
- __TYPE__: z.ZodMiniLiteral<"FileLink">;
277
- }, z.core.$strict>, z.ZodMiniObject<{
278
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
279
- id: z.ZodMiniString<string>;
280
- __TYPE__: z.ZodMiniLiteral<"DocumentLink">;
281
- }, z.core.$strict>, z.ZodMiniObject<{
282
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
283
- url: z.ZodMiniString<string>;
284
- target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
285
- preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
286
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
287
- }, z.core.$strict>>>;
288
- __TYPE__: z.ZodMiniLiteral<"ExternalLink">;
289
- }, z.core.$strict>]>>>;
290
- }, z.core.$strip>;
291
- label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
292
- direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
293
- }, z.core.$strip>, z.ZodMiniObject<{
294
- type: z.ZodMiniLiteral<"embed">;
295
- data: z.ZodMiniObject<{
296
- embed_url: z.ZodMiniString<string>;
297
- type: z.ZodMiniString<string>;
298
- version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>>>;
299
- title: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
300
- author_name: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
301
- author_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
302
- provider_name: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
303
- provider_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
304
- cache_age: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>>>;
305
- thumbnail_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
306
- thumbnail_width: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
307
- thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
308
- html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
309
- __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
310
- all: z.ZodMiniUnknown;
311
- }, z.core.$strip>;
312
- label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
313
- direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
314
- }, z.core.$strip>]>>;
315
81
  }, z.core.$strip>;
316
- type RichTextContent = z.infer<typeof RichTextContentSchema>;
82
+ type EmbedBlockValue = z.infer<typeof EmbedBlockValueSchema>;
83
+ type RichTextContentBlock = TextBlockValue | ImageBlockValue | EmbedBlockValue;
84
+ declare const RichTextContentType: "StructuredTextContent";
85
+ type RichTextContent = {
86
+ __TYPE__: typeof RichTextContentType;
87
+ value: RichTextContentBlock[];
88
+ };
317
89
  //#endregion
318
90
  export { RichTextContent, RichTextContentBlock, RichTextContentSpan };
319
91
  //# sourceMappingURL=richText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/content/richText.ts"],"mappings":";;;cAaa,yBAAA,EAAyB,CAAA,CAAA,YAAA,WAAA,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,cAUpC,0BAAA,EAA0B,CAAA,CAAA,YAAA,WAAA,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAO3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,cAIrC,qBAAA,EAAqB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKtB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA"}
1
+ {"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/content/richText.ts"],"mappings":";;;;;KAeY,mBAAA,GAAsB,IAAA,CAAK,sBAAA;AAAA,cAOjC,oBAAA,EAAoB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;KACrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAE/B,qBAAA,EAAqB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAItB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,cAEhC,qBAAA,EAAqB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;KACtB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,KAS1B,oBAAA,GAAuB,cAAA,GAAiB,eAAA,GAAkB,eAAA;AAAA,cAEzD,mBAAA;AAAA,KAED,eAAA;EACX,QAAA,SAAiB,mBAAA;EACjB,KAAA,EAAO,oBAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"richText.js","names":[],"sources":["../../src/content/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { EmbedContentSchema } from \"./embed\"\nimport { ImageViewContentSchema } from \"./image\"\nimport {\n\tgetEmbedBlockSchema,\n\tgetImageBlockSchema,\n\tgetSpanSchema,\n\tgetTextBlockSchema,\n} from \"./legacy/richText\"\nimport { FilledLinkValueContentSchema } from \"./link\"\n\n// Spans\nexport const RichTextContentSpanSchema = getSpanSchema(FilledLinkValueContentSchema)\n\nexport type RichTextContentSpan = z.infer<typeof RichTextContentSpanSchema>\n\n// Blocks\nconst TextBlockValueSchema = getTextBlockSchema(FilledLinkValueContentSchema)\nconst ImageBlockValueSchema = getImageBlockSchema(\n\tImageViewContentSchema,\n\tFilledLinkValueContentSchema,\n)\nconst EmbedBlockValueSchema = getEmbedBlockSchema(EmbedContentSchema)\n\nexport const RichTextContentBlockSchema = z.union([\n\tTextBlockValueSchema,\n\tImageBlockValueSchema,\n\tEmbedBlockValueSchema,\n])\n\n// Used by content/codec/richText\nexport type RichTextContentBlock = z.infer<typeof RichTextContentBlockSchema>\n\nexport const RichTextContentType = \"StructuredTextContent\" as const\n\nexport const RichTextContentSchema = z.object({\n\t__TYPE__: z.literal(RichTextContentType),\n\tvalue: z.array(RichTextContentBlockSchema),\n})\n\nexport type RichTextContent = z.infer<typeof RichTextContentSchema>\n"],"mappings":";;;;;;AAaA,MAAa,4BAA4B,cAAc,6BAA6B;AAKpF,MAAM,uBAAuB,mBAAmB,6BAA6B;AAC7E,MAAM,wBAAwB,oBAC7B,wBACA,6BACA;AACD,MAAM,wBAAwB,oBAAoB,mBAAmB;AAErE,MAAa,6BAA6B,EAAE,MAAM;CACjD;CACA;CACA;CACA,CAAC;AAKF,MAAa,sBAAsB;AAEnC,MAAa,wBAAwB,EAAE,OAAO;CAC7C,UAAU,EAAE,QAAQ,oBAAoB;CACxC,OAAO,EAAE,MAAM,2BAA2B;CAC1C,CAAC"}
1
+ {"version":3,"file":"richText.js","names":[],"sources":["../../src/content/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { EmbedContentSchema } from \"./embed\"\nimport { ImageViewContentSchema } from \"./image\"\nimport {\n\tgetEmbedBlockSchema,\n\tgetImageBlockSchema,\n\tgetSpanSchema,\n\tgetTextBlockSchema,\n} from \"./legacy/richText\"\nimport type { Span } from \"./legacy/richText\"\nimport type { FilledLinkValueContent } from \"./link\"\nimport { FilledLinkValueContentSchema } from \"./link\"\n\n// Spans\nexport type RichTextContentSpan = Span<FilledLinkValueContent>\n\nexport const RichTextContentSpanSchema: z.ZodMiniType<RichTextContentSpan> = getSpanSchema(\n\tFilledLinkValueContentSchema,\n)\n\n// Blocks\nconst TextBlockValueSchema = getTextBlockSchema(FilledLinkValueContentSchema)\ntype TextBlockValue = z.infer<typeof TextBlockValueSchema>\n\nconst ImageBlockValueSchema = getImageBlockSchema(\n\tImageViewContentSchema,\n\tFilledLinkValueContentSchema,\n)\ntype ImageBlockValue = z.infer<typeof ImageBlockValueSchema>\n\nconst EmbedBlockValueSchema = getEmbedBlockSchema(EmbedContentSchema)\ntype EmbedBlockValue = z.infer<typeof EmbedBlockValueSchema>\n\nexport const RichTextContentBlockSchema: z.ZodMiniType<RichTextContentBlock> = z.union([\n\tTextBlockValueSchema,\n\tImageBlockValueSchema,\n\tEmbedBlockValueSchema,\n])\n\n// Used by content/codec/richText\nexport type RichTextContentBlock = TextBlockValue | ImageBlockValue | EmbedBlockValue\n\nexport const RichTextContentType = \"StructuredTextContent\" as const\n\nexport type RichTextContent = {\n\t__TYPE__: typeof RichTextContentType\n\tvalue: RichTextContentBlock[]\n}\n\nexport const RichTextContentSchema: z.ZodMiniType<RichTextContent> = z.object({\n\t__TYPE__: z.literal(RichTextContentType),\n\tvalue: z.array(RichTextContentBlockSchema),\n})\n"],"mappings":";;;;;;AAiBA,MAAa,4BAAgE,cAC5E,6BACA;AAGD,MAAM,uBAAuB,mBAAmB,6BAA6B;AAG7E,MAAM,wBAAwB,oBAC7B,wBACA,6BACA;AAGD,MAAM,wBAAwB,oBAAoB,mBAAmB;AAGrE,MAAa,6BAAkE,EAAE,MAAM;CACtF;CACA;CACA;CACA,CAAC;AAKF,MAAa,sBAAsB;AAOnC,MAAa,wBAAwD,EAAE,OAAO;CAC7E,UAAU,EAAE,QAAQ,oBAAoB;CACxC,OAAO,EAAE,MAAM,2BAA2B;CAC1C,CAAC"}