@prismicio/types-internal 4.0.0-pr.6.7b0b0be → 4.0.0-pr.6.bbcafda

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 (138) hide show
  1. package/dist/content/codec/link.js +8 -8
  2. package/dist/content/codec/link.js.map +1 -1
  3. package/dist/content/codec/richText.js +2 -2
  4. package/dist/content/codec/richText.js.map +1 -1
  5. package/dist/content/document.d.ts +2 -3019
  6. package/dist/content/document.d.ts.map +1 -1
  7. package/dist/content/field.d.ts +1 -30
  8. package/dist/content/field.d.ts.map +1 -1
  9. package/dist/content/field.js.map +1 -1
  10. package/dist/content/group.d.ts +2 -1
  11. package/dist/content/group.d.ts.map +1 -1
  12. package/dist/content/group.js.map +1 -1
  13. package/dist/content/legacy/boolean.d.ts +1 -0
  14. package/dist/content/legacy/embed.d.ts +1 -0
  15. package/dist/content/legacy/empty.d.ts +1 -0
  16. package/dist/content/legacy/field.d.ts +1 -0
  17. package/dist/content/legacy/geopoint.d.ts +1 -0
  18. package/dist/content/legacy/group.d.ts +9 -0
  19. package/dist/content/legacy/group.d.ts.map +1 -0
  20. package/dist/content/legacy/group.js.map +1 -1
  21. package/dist/content/legacy/integrationField.d.ts +1 -0
  22. package/dist/content/legacy/link.d.ts +41 -0
  23. package/dist/content/legacy/link.d.ts.map +1 -0
  24. package/dist/content/legacy/link.js.map +1 -1
  25. package/dist/content/legacy/nestable.d.ts +1 -0
  26. package/dist/content/legacy/nestable.js.map +1 -1
  27. package/dist/content/legacy/repeatable.d.ts +1 -0
  28. package/dist/content/legacy/richText.d.ts +109 -0
  29. package/dist/content/legacy/richText.d.ts.map +1 -0
  30. package/dist/content/legacy/richText.js +3 -3
  31. package/dist/content/legacy/richText.js.map +1 -1
  32. package/dist/content/legacy/separator.d.ts +1 -0
  33. package/dist/content/legacy/slice.js.map +1 -1
  34. package/dist/content/legacy/table.d.ts +1 -0
  35. package/dist/content/link.d.ts +74 -99
  36. package/dist/content/link.d.ts.map +1 -1
  37. package/dist/content/link.js +2 -2
  38. package/dist/content/link.js.map +1 -1
  39. package/dist/content/nestable.d.ts +13 -749
  40. package/dist/content/nestable.d.ts.map +1 -1
  41. package/dist/content/nestable.js.map +1 -1
  42. package/dist/content/repeatable.d.ts +3 -98
  43. package/dist/content/repeatable.d.ts.map +1 -1
  44. package/dist/content/richText.d.ts +81 -131
  45. package/dist/content/richText.d.ts.map +1 -1
  46. package/dist/content/richText.js +5 -4
  47. package/dist/content/richText.js.map +1 -1
  48. package/dist/content/slice.d.ts +6 -4509
  49. package/dist/content/slice.d.ts.map +1 -1
  50. package/dist/content/slice.js.map +1 -1
  51. package/dist/content/slices.d.ts +8 -6765
  52. package/dist/content/slices.d.ts.map +1 -1
  53. package/dist/content/table.d.ts +2 -134
  54. package/dist/content/table.d.ts.map +1 -1
  55. package/dist/content/widget.d.ts +5 -3020
  56. package/dist/content/widget.d.ts.map +1 -1
  57. package/dist/content/widget.js.map +1 -1
  58. package/dist/helpers/customTypeModel.d.ts +1 -1
  59. package/dist/helpers/documentContent.d.ts +3 -9
  60. package/dist/helpers/documentContent.d.ts.map +1 -1
  61. package/dist/helpers/documentContent.js +3 -3
  62. package/dist/helpers/documentContent.js.map +1 -1
  63. package/dist/helpers/traverseContent.d.ts +10 -11
  64. package/dist/helpers/traverseContent.d.ts.map +1 -1
  65. package/dist/helpers/traverseContent.js.map +1 -1
  66. package/dist/helpers/traverseContentWithModel.d.ts +10 -11
  67. package/dist/helpers/traverseContentWithModel.d.ts.map +1 -1
  68. package/dist/helpers/traverseContentWithModel.js.map +1 -1
  69. package/dist/index.d.ts +25 -25
  70. package/dist/io-ts.d.ts +3380 -70926
  71. package/dist/io-ts.d.ts.map +1 -1
  72. package/dist/io-ts.js +125 -122
  73. package/dist/io-ts.js.map +1 -1
  74. package/dist/model/customType.d.ts +3 -3329
  75. package/dist/model/customType.d.ts.map +1 -1
  76. package/dist/model/group.d.ts +391 -392
  77. package/dist/model/group.d.ts.map +1 -1
  78. package/dist/model/group.js.map +1 -1
  79. package/dist/model/image.d.ts +4 -4
  80. package/dist/model/image.js.map +1 -1
  81. package/dist/model/link.d.ts +18 -18
  82. package/dist/model/link.d.ts.map +1 -1
  83. package/dist/model/link.js +7 -7
  84. package/dist/model/link.js.map +1 -1
  85. package/dist/model/nestable.d.ts +17 -178
  86. package/dist/model/nestable.d.ts.map +1 -1
  87. package/dist/model/nestable.js.map +1 -1
  88. package/dist/model/richText.d.ts +3 -7
  89. package/dist/model/richText.d.ts.map +1 -1
  90. package/dist/model/richText.js.map +1 -1
  91. package/dist/model/section.d.ts +3 -3329
  92. package/dist/model/section.d.ts.map +1 -1
  93. package/dist/model/select.d.ts +1 -1
  94. package/dist/model/select.js +1 -1
  95. package/dist/model/select.js.map +1 -1
  96. package/dist/model/slice.d.ts +861 -3800
  97. package/dist/model/slice.d.ts.map +1 -1
  98. package/dist/model/slice.js +7 -2
  99. package/dist/model/slice.js.map +1 -1
  100. package/dist/model/slices.d.ts +3 -2195
  101. package/dist/model/slices.d.ts.map +1 -1
  102. package/dist/model/widget.d.ts +6 -3331
  103. package/dist/model/widget.d.ts.map +1 -1
  104. package/dist/model/widget.js.map +1 -1
  105. package/dist/zod4.d.ts +1345 -34797
  106. package/dist/zod4.d.ts.map +1 -1
  107. package/dist/zod4.js +125 -122
  108. package/dist/zod4.js.map +1 -1
  109. package/package.json +3 -2
  110. package/src/content/codec/link.ts +8 -8
  111. package/src/content/codec/richText.ts +10 -6
  112. package/src/content/field.ts +9 -2
  113. package/src/content/group.ts +5 -2
  114. package/src/content/legacy/group.ts +10 -4
  115. package/src/content/legacy/link.ts +32 -9
  116. package/src/content/legacy/nestable.ts +26 -2
  117. package/src/content/legacy/richText.ts +40 -7
  118. package/src/content/legacy/slice.ts +2 -2
  119. package/src/content/legacy/widget.ts +6 -2
  120. package/src/content/link.ts +32 -9
  121. package/src/content/nestable.ts +40 -2
  122. package/src/content/richText.ts +31 -9
  123. package/src/content/slice.ts +2 -2
  124. package/src/content/widget.ts +6 -2
  125. package/src/helpers/documentContent.ts +12 -15
  126. package/src/helpers/traverseContent.ts +12 -19
  127. package/src/helpers/traverseContentWithModel.ts +10 -16
  128. package/src/index.ts +3 -2
  129. package/src/io-ts.ts +166 -140
  130. package/src/model/group.ts +4 -1
  131. package/src/model/image.ts +1 -1
  132. package/src/model/link.ts +39 -45
  133. package/src/model/nestable.ts +33 -1
  134. package/src/model/richText.ts +2 -2
  135. package/src/model/select.ts +2 -2
  136. package/src/model/slice.ts +36 -9
  137. package/src/model/widget.ts +8 -4
  138. package/src/zod4.ts +166 -140
@@ -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"}
@@ -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]\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;AAED,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,141 +1,91 @@
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 RichTextContentSchema: z.ZodMiniObject<{
5
- __TYPE__: z.ZodMiniLiteral<"StructuredTextContent">;
6
- value: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
7
- 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">]>;
8
- content: z.ZodMiniObject<{
9
- text: z.ZodMiniString<string>;
10
- spans: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniTransform<({
11
- type: "label";
12
- start: number;
13
- end: number;
14
- data: string;
15
- } | {
16
- type: "list-item" | "strong" | "em";
17
- start: number;
18
- end: number;
19
- } | {
20
- type: "hyperlink";
21
- start: number;
22
- end: number;
23
- data: {
24
- kind: "image";
25
- id: string;
26
- url: string;
27
- height: string;
28
- width: string;
29
- size: string;
30
- name: string;
31
- __TYPE__: "ImageLink";
32
- date?: string | null | undefined;
33
- } | {
34
- kind: "file";
35
- id: string;
36
- url: string;
37
- name: string;
38
- size: string;
39
- __TYPE__: "FileLink";
40
- date?: string | null | undefined;
41
- } | {
42
- kind: "document";
43
- id: string;
44
- __TYPE__: "DocumentLink";
45
- } | {
46
- kind: "web";
47
- url: string;
48
- __TYPE__: "ExternalLink";
49
- target?: string | null | undefined;
50
- preview?: {
51
- title?: string | undefined;
52
- } | null | undefined;
53
- };
54
- })[], unknown[]>>>;
55
- }, z.core.$strip>;
56
- label: z.ZodMiniOptional<z.ZodMiniString<string>>;
57
- direction: z.ZodMiniOptional<z.ZodMiniString<string>>;
58
- }, z.core.$strip>, z.ZodMiniObject<{
59
- type: z.ZodMiniLiteral<"image">;
60
- data: z.ZodMiniObject<{
61
- origin: z.ZodMiniObject<{
62
- id: z.ZodMiniString<string>;
63
- url: z.ZodMiniString<string>;
64
- width: z.ZodMiniNumber<number>;
65
- height: z.ZodMiniNumber<number>;
66
- }, z.core.$strip>;
6
+ type RichTextContentSpan = Span<FilledLinkValueContent>;
7
+ declare const TextBlockValueSchema: z.ZodMiniObject<{
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">]>;
9
+ content: z.ZodMiniObject<{
10
+ text: z.ZodMiniString<string>;
11
+ spans: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniTransform<({
12
+ type: "label";
13
+ start: number;
14
+ end: number;
15
+ data: string;
16
+ } | {
17
+ type: "strong" | "em" | "list-item";
18
+ start: number;
19
+ end: number;
20
+ } | {
21
+ type: "hyperlink";
22
+ start: number;
23
+ end: number;
24
+ data: FilledLinkValueContent;
25
+ })[], unknown[]>>>;
26
+ }, z.core.$strip>;
27
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
28
+ direction: z.ZodMiniOptional<z.ZodMiniString<string>>;
29
+ }, z.core.$strip>;
30
+ type TextBlockValue = z.infer<typeof TextBlockValueSchema>;
31
+ declare const ImageBlockValueSchema: z.ZodMiniObject<{
32
+ type: z.ZodMiniLiteral<"image">;
33
+ data: z.ZodMiniObject<{
34
+ origin: z.ZodMiniObject<{
35
+ id: z.ZodMiniString<string>;
36
+ url: z.ZodMiniString<string>;
67
37
  width: z.ZodMiniNumber<number>;
68
38
  height: z.ZodMiniNumber<number>;
69
- edit: z.ZodMiniObject<{
70
- zoom: z.ZodMiniNumber<number>;
71
- crop: z.ZodMiniObject<{
72
- x: z.ZodMiniNumber<number>;
73
- y: z.ZodMiniNumber<number>;
74
- }, z.core.$strip>;
75
- background: z.ZodMiniString<string>;
76
- }, z.core.$strip>;
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>>>;
80
- provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
81
- linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
82
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
83
- id: z.ZodMiniString<string>;
84
- url: z.ZodMiniString<string>;
85
- height: z.ZodMiniString<string>;
86
- width: z.ZodMiniString<string>;
87
- size: z.ZodMiniString<string>;
88
- name: z.ZodMiniString<string>;
89
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
90
- __TYPE__: z.ZodMiniLiteral<"ImageLink">;
91
- }, z.core.$strict>, z.ZodMiniObject<{
92
- kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
93
- id: z.ZodMiniString<string>;
94
- url: z.ZodMiniString<string>;
95
- name: z.ZodMiniString<string>;
96
- size: z.ZodMiniTransform<string, unknown>;
97
- date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
98
- __TYPE__: z.ZodMiniLiteral<"FileLink">;
99
- }, z.core.$strict>, z.ZodMiniObject<{
100
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
101
- id: z.ZodMiniString<string>;
102
- __TYPE__: z.ZodMiniLiteral<"DocumentLink">;
103
- }, z.core.$strict>, z.ZodMiniObject<{
104
- kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
105
- url: z.ZodMiniString<string>;
106
- target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
107
- preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
108
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
109
- }, z.core.$strict>>>;
110
- __TYPE__: z.ZodMiniLiteral<"ExternalLink">;
111
- }, z.core.$strict>]>>>;
112
39
  }, z.core.$strip>;
113
- label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
114
- direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
115
- }, z.core.$strip>, z.ZodMiniObject<{
116
- type: z.ZodMiniLiteral<"embed">;
117
- data: z.ZodMiniObject<{
118
- embed_url: z.ZodMiniString<string>;
119
- type: z.ZodMiniString<string>;
120
- version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>>>;
121
- title: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
122
- author_name: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
123
- author_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
124
- provider_name: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
125
- provider_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
126
- cache_age: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>>>;
127
- thumbnail_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
128
- thumbnail_width: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
129
- thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
130
- html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
131
- __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
132
- all: z.ZodMiniUnknown;
40
+ width: z.ZodMiniNumber<number>;
41
+ height: z.ZodMiniNumber<number>;
42
+ edit: z.ZodMiniObject<{
43
+ zoom: z.ZodMiniNumber<number>;
44
+ crop: z.ZodMiniObject<{
45
+ x: z.ZodMiniNumber<number>;
46
+ y: z.ZodMiniNumber<number>;
47
+ }, z.core.$strip>;
48
+ background: z.ZodMiniString<string>;
133
49
  }, z.core.$strip>;
134
- label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
135
- direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
136
- }, z.core.$strip>]>>;
50
+ url: z.ZodMiniOptional<z.ZodMiniString<string>>;
51
+ credits: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
52
+ alt: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>, z.ZodMiniTransform<string | null, string | null | undefined>>>;
53
+ provider: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
54
+ linkTo: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniType<FilledLinkValueContent, unknown, z.core.$ZodTypeInternals<FilledLinkValueContent, unknown>>>>;
55
+ }, z.core.$strip>;
56
+ label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
57
+ direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
58
+ }, z.core.$strip>;
59
+ type ImageBlockValue = z.infer<typeof ImageBlockValueSchema>;
60
+ declare const EmbedBlockValueSchema: z.ZodMiniObject<{
61
+ type: z.ZodMiniLiteral<"embed">;
62
+ data: z.ZodMiniObject<{
63
+ embed_url: z.ZodMiniString<string>;
64
+ type: z.ZodMiniString<string>;
65
+ version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>>>;
66
+ title: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
67
+ author_name: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
68
+ author_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
69
+ provider_name: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
70
+ provider_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
71
+ cache_age: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>>>;
72
+ thumbnail_url: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
73
+ thumbnail_width: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
74
+ thumbnail_height: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
75
+ html: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
76
+ __TYPE__: z.ZodMiniLiteral<"EmbedContent">;
77
+ all: z.ZodMiniUnknown;
78
+ }, z.core.$strip>;
79
+ label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
80
+ direction: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
137
81
  }, z.core.$strip>;
138
- 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
+ };
139
89
  //#endregion
140
- export { RichTextContent };
90
+ export { RichTextContent, RichTextContentBlock, RichTextContentSpan };
141
91
  //# sourceMappingURL=richText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/content/richText.ts"],"mappings":";;;cA0Ba,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,13 +1,14 @@
1
1
  import { EmbedContentSchema } from "./embed.js";
2
2
  import { ImageViewContentSchema } from "./image.js";
3
3
  import { FilledLinkValueContentSchema } from "./link.js";
4
- import { getEmbedBlockSchema, getImageBlockSchema, getTextBlockSchema } from "./legacy/richText.js";
4
+ import { getEmbedBlockSchema, getImageBlockSchema, getSpanSchema, getTextBlockSchema } from "./legacy/richText.js";
5
5
  import { z } from "zod/mini";
6
6
  //#region src/content/richText.ts
7
+ const RichTextContentSpanSchema = getSpanSchema(FilledLinkValueContentSchema);
7
8
  const TextBlockValueSchema = getTextBlockSchema(FilledLinkValueContentSchema);
8
9
  const ImageBlockValueSchema = getImageBlockSchema(ImageViewContentSchema, FilledLinkValueContentSchema);
9
10
  const EmbedBlockValueSchema = getEmbedBlockSchema(EmbedContentSchema);
10
- const BlockValueSchema = z.union([
11
+ const RichTextContentBlockSchema = z.union([
11
12
  TextBlockValueSchema,
12
13
  ImageBlockValueSchema,
13
14
  EmbedBlockValueSchema
@@ -15,9 +16,9 @@ const BlockValueSchema = z.union([
15
16
  const RichTextContentType = "StructuredTextContent";
16
17
  const RichTextContentSchema = z.object({
17
18
  __TYPE__: z.literal(RichTextContentType),
18
- value: z.array(BlockValueSchema)
19
+ value: z.array(RichTextContentBlockSchema)
19
20
  });
20
21
  //#endregion
21
- export { RichTextContentSchema, RichTextContentType };
22
+ export { RichTextContentBlockSchema, RichTextContentSchema, RichTextContentSpanSchema, RichTextContentType };
22
23
 
23
24
  //# sourceMappingURL=richText.js.map
@@ -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 { getEmbedBlockSchema, getImageBlockSchema, getTextBlockSchema } from \"./legacy/richText\"\nimport { FilledLinkValueContentSchema } from \"./link\"\n\nconst TextBlockValueSchema = getTextBlockSchema(FilledLinkValueContentSchema)\nconst ImageBlockValueSchema = getImageBlockSchema(\n\tImageViewContentSchema,\n\tFilledLinkValueContentSchema,\n)\nconst EmbedBlockValueSchema = getEmbedBlockSchema(EmbedContentSchema)\n\n// Blocks\nconst BlockValueSchema = z.union([\n\tTextBlockValueSchema,\n\tImageBlockValueSchema,\n\tEmbedBlockValueSchema,\n])\n\n// Used by content/richText\nexport type BlockValue = z.infer<typeof BlockValueSchema>\n\nexport const RichTextContentType = \"StructuredTextContent\" as const\n\nexport const RichTextContentSchema = z.object({\n\t__TYPE__: z.literal(RichTextContentType),\n\tvalue: z.array(BlockValueSchema),\n})\n\nexport type RichTextContent = z.infer<typeof RichTextContentSchema>\n"],"mappings":";;;;;;AAOA,MAAM,uBAAuB,mBAAmB,6BAA6B;AAC7E,MAAM,wBAAwB,oBAC7B,wBACA,6BACA;AACD,MAAM,wBAAwB,oBAAoB,mBAAmB;AAGrE,MAAM,mBAAmB,EAAE,MAAM;CAChC;CACA;CACA;CACA,CAAC;AAKF,MAAa,sBAAsB;AAEnC,MAAa,wBAAwB,EAAE,OAAO;CAC7C,UAAU,EAAE,QAAQ,oBAAoB;CACxC,OAAO,EAAE,MAAM,iBAAiB;CAChC,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"}