@prismicio/types-internal 4.0.0 → 4.1.0-canary.18ae460

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 (117) hide show
  1. package/README.md +5 -5
  2. package/dist/content/boolean.d.ts.map +1 -1
  3. package/dist/content/boolean.js.map +1 -1
  4. package/dist/content/codec/link.js.map +1 -1
  5. package/dist/content/codec/nestable.js +4 -4
  6. package/dist/content/field.d.ts.map +1 -1
  7. package/dist/content/field.js +1 -1
  8. package/dist/content/field.js.map +1 -1
  9. package/dist/content/group.d.ts.map +1 -1
  10. package/dist/content/group.js.map +1 -1
  11. package/dist/content/image.d.ts +3 -1
  12. package/dist/content/image.d.ts.map +1 -1
  13. package/dist/content/image.js +3 -3
  14. package/dist/content/image.js.map +1 -1
  15. package/dist/content/legacy/boolean.d.ts +1 -0
  16. package/dist/content/legacy/embed.d.ts +1 -0
  17. package/dist/content/legacy/empty.d.ts +1 -0
  18. package/dist/content/legacy/field.d.ts +1 -0
  19. package/dist/content/legacy/geopoint.d.ts +1 -0
  20. package/dist/content/legacy/image.d.ts +28 -0
  21. package/dist/content/legacy/image.d.ts.map +1 -0
  22. package/dist/content/legacy/image.js +3 -3
  23. package/dist/content/legacy/image.js.map +1 -1
  24. package/dist/content/legacy/integrationField.d.ts +1 -0
  25. package/dist/content/legacy/link.d.ts +10 -10
  26. package/dist/content/legacy/link.js +23 -23
  27. package/dist/content/legacy/link.js.map +1 -1
  28. package/dist/content/legacy/nestable.d.ts +1 -0
  29. package/dist/content/legacy/nestable.js +1 -1
  30. package/dist/content/legacy/repeatable.d.ts +1 -0
  31. package/dist/content/legacy/richText.d.ts +9 -8
  32. package/dist/content/legacy/richText.d.ts.map +1 -1
  33. package/dist/content/legacy/richText.js +5 -5
  34. package/dist/content/legacy/richText.js.map +1 -1
  35. package/dist/content/legacy/separator.d.ts +1 -0
  36. package/dist/content/legacy/table.d.ts +1 -0
  37. package/dist/content/link.d.ts +62 -85
  38. package/dist/content/link.d.ts.map +1 -1
  39. package/dist/content/link.js +30 -27
  40. package/dist/content/link.js.map +1 -1
  41. package/dist/content/nestable.d.ts.map +1 -1
  42. package/dist/content/nestable.js +4 -4
  43. package/dist/content/nestable.js.map +1 -1
  44. package/dist/content/repeatable.d.ts +4 -69
  45. package/dist/content/repeatable.d.ts.map +1 -1
  46. package/dist/content/richText.d.ts +13 -13
  47. package/dist/content/richText.d.ts.map +1 -1
  48. package/dist/content/richText.js +9 -9
  49. package/dist/content/richText.js.map +1 -1
  50. package/dist/helpers/customTypeModel.d.ts +2 -1
  51. package/dist/helpers/customTypeModel.d.ts.map +1 -1
  52. package/dist/helpers/customTypeModel.js +30 -0
  53. package/dist/helpers/customTypeModel.js.map +1 -1
  54. package/dist/helpers/imageContent.d.ts +33 -0
  55. package/dist/helpers/imageContent.d.ts.map +1 -0
  56. package/dist/helpers/imageContent.js +55 -0
  57. package/dist/helpers/imageContent.js.map +1 -0
  58. package/dist/helpers/traverseContent.d.ts +4 -4
  59. package/dist/helpers/traverseContent.d.ts.map +1 -1
  60. package/dist/helpers/traverseContent.js +5 -3
  61. package/dist/helpers/traverseContent.js.map +1 -1
  62. package/dist/helpers/traverseContentWithModel.d.ts +4 -4
  63. package/dist/helpers/traverseContentWithModel.js +1 -1
  64. package/dist/helpers/withDefaultContent.d.ts +21 -0
  65. package/dist/helpers/withDefaultContent.d.ts.map +1 -0
  66. package/dist/helpers/withDefaultContent.js +120 -0
  67. package/dist/helpers/withDefaultContent.js.map +1 -0
  68. package/dist/index.d.ts +25 -22
  69. package/dist/index.js +6 -1
  70. package/dist/io-ts.d.ts +1156 -727
  71. package/dist/io-ts.d.ts.map +1 -1
  72. package/dist/io-ts.js +11 -7
  73. package/dist/io-ts.js.map +1 -1
  74. package/dist/model/richText.d.ts +20 -1
  75. package/dist/model/richText.d.ts.map +1 -1
  76. package/dist/model/richText.js +3 -3
  77. package/dist/model/richText.js.map +1 -1
  78. package/dist/model/slice.d.ts +1251 -643
  79. package/dist/model/slice.d.ts.map +1 -1
  80. package/dist/model/slice.js +4 -4
  81. package/dist/model/slice.js.map +1 -1
  82. package/dist/model/table.js +5 -5
  83. package/dist/model/table.js.map +1 -1
  84. package/dist/model/widget.d.ts +1 -3
  85. package/dist/model/widget.d.ts.map +1 -1
  86. package/dist/model/widget.js +5 -2
  87. package/dist/model/widget.js.map +1 -1
  88. package/dist/zod4.d.ts +2392 -1873
  89. package/dist/zod4.d.ts.map +1 -1
  90. package/dist/zod4.js +11 -7
  91. package/dist/zod4.js.map +1 -1
  92. package/package.json +19 -12
  93. package/src/content/boolean.ts +0 -13
  94. package/src/content/codec/link.ts +12 -12
  95. package/src/content/field.ts +0 -14
  96. package/src/content/group.ts +1 -54
  97. package/src/content/image.ts +3 -91
  98. package/src/content/legacy/image.ts +4 -4
  99. package/src/content/legacy/link.ts +46 -46
  100. package/src/content/legacy/richText.ts +18 -16
  101. package/src/content/link.ts +100 -89
  102. package/src/content/nestable.ts +1 -20
  103. package/src/content/richText.ts +23 -17
  104. package/src/helpers/customTypeModel.ts +44 -0
  105. package/src/helpers/imageContent.ts +84 -0
  106. package/src/helpers/traverseContent.ts +4 -1
  107. package/src/helpers/withDefaultContent.ts +180 -0
  108. package/src/index.ts +18 -5
  109. package/src/io-ts.ts +14 -2
  110. package/src/model/diff/sharedSlice.ts +2 -2
  111. package/src/model/diff/variation.ts +7 -7
  112. package/src/model/richText.ts +5 -2
  113. package/src/model/slice.ts +6 -8
  114. package/src/model/table.ts +5 -5
  115. package/src/model/widget.ts +6 -2
  116. package/src/zod4.ts +14 -2
  117. package/src/content/withDefaultValues.ts +0 -114
@@ -1 +1 @@
1
- {"version":3,"file":"io-ts.d.ts","names":[],"sources":["../src/io-ts.ts"],"mappings":";;;;;;;;;;;;;;;cA2Ia,WAAA,EAAW,CAAA,CAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACX,WAAA,EAAW,CAAA,CAAA,IAAA;;;;;;;;;;;;;;;;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;;;;;;;cACxB,uBAAA,EAAuB,CAAA,CAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;cACvB,uBAAA,EAAuB,CAAA,CAAA,IAAA,CAAqC,iBAAA,EAArC,iBAAA;AAAA,cACvB,wBAAA,EAAwB,CAAA,CAAA,IAAA,CAAsC,kBAAA,EAAtC,kBAAA;AAAA,cACxB,wBAAA,EAAwB,CAAA,CAAA,IAAA,CAAA,MAAA,SAAsC,iBAAA,GAAtC,MAAA,SAAA,iBAAA;AAAA,cACxB,yBAAA,EAAyB,CAAA,CAAA,IAAA,CAAA,MAAA,SAAuC,kBAAA,GAAvC,MAAA,SAAA,kBAAA;AAAA,cACzB,2BAAA,EAA2B,CAAA,CAAA,IAAA;;;sCAAyC,iBAAA;;;;;;;;;;;;cACpE,qBAAA,EAAqB,CAAA,CAAA,IAAA;;;sCAAmC,kBAAA"}
package/dist/io-ts.js CHANGED
@@ -1,18 +1,18 @@
1
+ import { EmbedContentSchema as EmbedContentSchema$1 } from "./content/embed.js";
2
+ import { ImageContentSchema as ImageContentSchema$1, ImageContentViewSchema as ImageContentViewSchema$1 } from "./content/image.js";
3
+ import { NonEmptyStringSchema as NonEmptyStringSchema$1 } from "./common/nonEmptyString.js";
4
+ import { EmptyLinkContentSchema as EmptyLinkContentSchema$1, FilledLinkContentSchema as FilledLinkContentSchema$1, LinkContentSchema as LinkContentSchema$1 } from "./content/link.js";
5
+ import { RichTextContentBlockSchema as RichTextContentBlockSchema$1, RichTextContentSchema as RichTextContentSchema$1, RichTextContentSpanSchema as RichTextContentSpanSchema$1 } from "./content/richText.js";
1
6
  import { ImageModelSchema as ImageModelSchema$1 } from "./model/image.js";
2
7
  import { RichTextModelSchema as RichTextModelSchema$1 } from "./model/richText.js";
3
8
  import { TableModelSchema as TableModelSchema$1 } from "./model/table.js";
4
9
  import { WidgetKeySchema as WidgetKeySchema$1 } from "./common/widgetKey.js";
5
10
  import { BooleanContentSchema as BooleanContentSchema$1 } from "./content/boolean.js";
6
- import { EmbedContentSchema as EmbedContentSchema$1 } from "./content/embed.js";
7
11
  import { EmptyContentSchema as EmptyContentSchema$1 } from "./content/empty.js";
8
12
  import { ColorContentSchema as ColorContentSchema$1, DateContentSchema as DateContentSchema$1, FieldContentSchema as FieldContentSchema$1, NumberContentSchema as NumberContentSchema$1, RangeContentSchema as RangeContentSchema$1, SelectContentSchema as SelectContentSchema$1, TextContentSchema as TextContentSchema$1, TimestampContentSchema as TimestampContentSchema$1 } from "./content/field.js";
9
13
  import { GeoPointContentSchema as GeoPointContentSchema$1 } from "./content/geopoint.js";
10
- import { ImageContentSchema as ImageContentSchema$1 } from "./content/image.js";
11
14
  import { IntegrationFieldContentSchema as IntegrationFieldContentSchema$1 } from "./content/integrationField.js";
12
- import { NonEmptyStringSchema as NonEmptyStringSchema$1 } from "./common/nonEmptyString.js";
13
- import { LinkContentSchema as LinkContentSchema$1 } from "./content/link.js";
14
15
  import { RepeatableContentSchema as RepeatableContentSchema$1 } from "./content/repeatable.js";
15
- import { RichTextContentBlockSchema as RichTextContentBlockSchema$1, RichTextContentSchema as RichTextContentSchema$1, RichTextContentSpanSchema as RichTextContentSpanSchema$1 } from "./content/richText.js";
16
16
  import { SeparatorContentSchema as SeparatorContentSchema$1 } from "./content/separator.js";
17
17
  import { TableContentSchema as TableContentSchema$1 } from "./content/table.js";
18
18
  import { NestableContentSchema as NestableContentSchema$1 } from "./content/nestable.js";
@@ -56,7 +56,7 @@ import { TextModelSchema as TextModelSchema$1 } from "./model/text.js";
56
56
  import { TimestampModelSchema as TimestampModelSchema$1 } from "./model/timestamp.js";
57
57
  import { NestableModelSchema as NestableModelSchema$1 } from "./model/nestable.js";
58
58
  import { GroupModelSchema as GroupModelSchema$1, NestedGroupModelSchema as NestedGroupModelSchema$1 } from "./model/group.js";
59
- import { CompositeSliceModelSchema as CompositeSliceModelSchema$1, DynamicSliceModelSchema as DynamicSliceModelSchema$1, LegacySliceModelSchema as LegacySliceModelSchema$1, SharedSliceModelSchema as SharedSliceModelSchema$1, SharedSliceRefModelSchema as SharedSliceRefModelSchema$1, SliceContentModelSchema as SliceContentModelSchema$1, StaticSliceModelSchema as StaticSliceModelSchema$1 } from "./model/slice.js";
59
+ import { CompositeSliceModelSchema as CompositeSliceModelSchema$1, DynamicSliceModelSchema as DynamicSliceModelSchema$1, LegacySliceModelSchema as LegacySliceModelSchema$1, SharedSliceModelSchema as SharedSliceModelSchema$1, SharedSliceModelVariationSchema as SharedSliceModelVariationSchema$1, SharedSliceRefModelSchema as SharedSliceRefModelSchema$1, SliceContentModelSchema as SliceContentModelSchema$1, StaticSliceModelSchema as StaticSliceModelSchema$1 } from "./model/slice.js";
60
60
  import { DynamicSlicesModelSchema as DynamicSlicesModelSchema$1, StaticSlicesModelSchema as StaticSlicesModelSchema$1 } from "./model/slices.js";
61
61
  import { UIDModelSchema as UIDModelSchema$1 } from "./model/uid.js";
62
62
  import { DynamicWidgetModelSchema as DynamicWidgetModelSchema$1, StaticWidgetModelSchema as StaticWidgetModelSchema$1 } from "./model/widget.js";
@@ -77,6 +77,8 @@ const ColorContentSchema = toIOTS(ColorContentSchema$1);
77
77
  const DateContentSchema = toIOTS(DateContentSchema$1);
78
78
  const EmptyContentSchema = toIOTS(EmptyContentSchema$1);
79
79
  const GeoPointContentSchema = toIOTS(GeoPointContentSchema$1);
80
+ const FilledLinkContentSchema = toIOTS(FilledLinkContentSchema$1);
81
+ const EmptyLinkContentSchema = toIOTS(EmptyLinkContentSchema$1);
80
82
  const LinkContentSchema = toIOTS(LinkContentSchema$1);
81
83
  const NumberContentSchema = toIOTS(NumberContentSchema$1);
82
84
  const RangeContentSchema = toIOTS(RangeContentSchema$1);
@@ -89,6 +91,7 @@ const FieldContentSchema = toIOTS(FieldContentSchema$1);
89
91
  const UIDContentSchema = toIOTS(UIDContentSchema$1);
90
92
  const IntegrationFieldContentSchema = toIOTS(IntegrationFieldContentSchema$1);
91
93
  const EmbedContentSchema = toIOTS(EmbedContentSchema$1);
94
+ const ImageContentViewSchema = toIOTS(ImageContentViewSchema$1);
92
95
  const ImageContentSchema = toIOTS(ImageContentSchema$1);
93
96
  const RichTextContentSchema = toIOTS(RichTextContentSchema$1);
94
97
  const RichTextContentBlockSchema = toIOTS(RichTextContentBlockSchema$1);
@@ -159,6 +162,7 @@ const TimestampModelSchema = toIOTS(TimestampModelSchema$1);
159
162
  const UIDModelSchema = toIOTS(UIDModelSchema$1);
160
163
  const GroupModelSchema = toIOTS(GroupModelSchema$1);
161
164
  const NestedGroupModelSchema = toIOTS(NestedGroupModelSchema$1);
165
+ const SharedSliceModelVariationSchema = toIOTS(SharedSliceModelVariationSchema$1);
162
166
  const SharedSliceRefModelSchema = toIOTS(SharedSliceRefModelSchema$1);
163
167
  const CompositeSliceModelSchema = toIOTS(CompositeSliceModelSchema$1);
164
168
  const LegacySliceModelSchema = toIOTS(LegacySliceModelSchema$1);
@@ -215,6 +219,6 @@ function formatIssue(issue, input) {
215
219
  return issue.message;
216
220
  }
217
221
  //#endregion
218
- export { AssetSchema, BooleanContentSchema, BooleanLegacy, BooleanModelSchema, ColorContentSchema, ColorLegacy, ColorModelSchema, CompositeSliceContentSchema, CompositeSliceItemContentSchema, CompositeSliceLegacy, CompositeSliceModelSchema, CustomTypeModelSchema, DateContentSchema, DateLegacy, DateModelSchema, DocumentContentSchema, DocumentLegacy, DynamicSectionModelSchema, DynamicSliceModelSchema, DynamicSlicesModelSchema, DynamicWidgetModelSchema, EmbedContentSchema, EmbedLegacy, EmbedModelSchema, EmbedSchema, EmptyContentSchema, EmptyLegacy, FieldContentSchema, GeoPointContentSchema, GeoPointLegacy, GeoPointModelSchema, GroupContentSchema, GroupItemContentSchema, GroupItemLegacy, GroupLegacy, GroupModelSchema, HexaColorCodeSchema, ImageContentSchema, ImageLegacy, ImageModelSchema, IntegrationFieldContentSchema, IntegrationFieldLegacy, IntegrationFieldModelSchema, LegacySliceContentSchema, LegacySliceItemContentSchema, LegacySliceLegacy, LegacySliceModelSchema, LinkContentSchema, LinkLegacy, LinkModelSchema, NestableContentSchema, NestableLegacy, NestableModelSchema, NestedGroupModelSchema, NonEmptyStringSchema, NumberContentSchema, NumberLegacy, NumberModelSchema, RangeContentSchema, RangeLegacy, RangeModelSchema, RepeatableContentSchema, RepeatableLegacy, RichTextContentBlockSchema, RichTextContentSchema, RichTextContentSpanSchema, RichTextLegacy, RichTextModelSchema, SelectContentSchema, SelectLegacy, SelectModelSchema, SeparatorContentSchema, SeparatorLegacy, SeparatorModelSchema, SharedSliceContentSchema, SharedSliceItemContentSchema, SharedSliceLegacy, SharedSliceModelSchema, SharedSliceRefModelSchema, SliceContentModelSchema, SliceContentSchema, SliceItemContentSchema, SliceItemLegacy, SliceLegacy, SlicesContentSchema, SlicesLegacy, StaticCustomTypeModelSchema, StaticSectionModelSchema, StaticSliceModelSchema, StaticSlicesModelSchema, StaticWidgetModelSchema, TableContentSchema, TableLegacy, TableModelSchema, TextContentSchema, TextLegacy, TextModelSchema, TimestampContentSchema, TimestampLegacy, TimestampModelSchema, UIDContentSchema, UIDLegacy, UIDModelSchema, WidgetContentSchema, WidgetKeySchema, WidgetLegacy };
222
+ export { AssetSchema, BooleanContentSchema, BooleanLegacy, BooleanModelSchema, ColorContentSchema, ColorLegacy, ColorModelSchema, CompositeSliceContentSchema, CompositeSliceItemContentSchema, CompositeSliceLegacy, CompositeSliceModelSchema, CustomTypeModelSchema, DateContentSchema, DateLegacy, DateModelSchema, DocumentContentSchema, DocumentLegacy, DynamicSectionModelSchema, DynamicSliceModelSchema, DynamicSlicesModelSchema, DynamicWidgetModelSchema, EmbedContentSchema, EmbedLegacy, EmbedModelSchema, EmbedSchema, EmptyContentSchema, EmptyLegacy, EmptyLinkContentSchema, FieldContentSchema, FilledLinkContentSchema, GeoPointContentSchema, GeoPointLegacy, GeoPointModelSchema, GroupContentSchema, GroupItemContentSchema, GroupItemLegacy, GroupLegacy, GroupModelSchema, HexaColorCodeSchema, ImageContentSchema, ImageContentViewSchema, ImageLegacy, ImageModelSchema, IntegrationFieldContentSchema, IntegrationFieldLegacy, IntegrationFieldModelSchema, LegacySliceContentSchema, LegacySliceItemContentSchema, LegacySliceLegacy, LegacySliceModelSchema, LinkContentSchema, LinkLegacy, LinkModelSchema, NestableContentSchema, NestableLegacy, NestableModelSchema, NestedGroupModelSchema, NonEmptyStringSchema, NumberContentSchema, NumberLegacy, NumberModelSchema, RangeContentSchema, RangeLegacy, RangeModelSchema, RepeatableContentSchema, RepeatableLegacy, RichTextContentBlockSchema, RichTextContentSchema, RichTextContentSpanSchema, RichTextLegacy, RichTextModelSchema, SelectContentSchema, SelectLegacy, SelectModelSchema, SeparatorContentSchema, SeparatorLegacy, SeparatorModelSchema, SharedSliceContentSchema, SharedSliceItemContentSchema, SharedSliceLegacy, SharedSliceModelSchema, SharedSliceModelVariationSchema, SharedSliceRefModelSchema, SliceContentModelSchema, SliceContentSchema, SliceItemContentSchema, SliceItemLegacy, SliceLegacy, SlicesContentSchema, SlicesLegacy, StaticCustomTypeModelSchema, StaticSectionModelSchema, StaticSliceModelSchema, StaticSlicesModelSchema, StaticWidgetModelSchema, TableContentSchema, TableLegacy, TableModelSchema, TextContentSchema, TextLegacy, TextModelSchema, TimestampContentSchema, TimestampLegacy, TimestampModelSchema, UIDContentSchema, UIDLegacy, UIDModelSchema, WidgetContentSchema, WidgetKeySchema, WidgetLegacy };
219
223
 
220
224
  //# sourceMappingURL=io-ts.js.map
package/dist/io-ts.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"io-ts.js","names":["rawAssetSchema","rawEmbedSchema","rawHexaColorCodeSchema","rawNonEmptyStringSchema","rawWidgetKeySchema","rawBooleanContentSchema","rawColorContentSchema","rawDateContentSchema","rawEmptyContentSchema","rawGeoPointContentSchema","rawLinkContentSchema","rawNumberContentSchema","rawRangeContentSchema","rawSelectContentSchema","rawSeparatorContentSchema","rawSharedSliceContentSchema","rawTextContentSchema","rawTimestampContentSchema","rawFieldContentSchema","rawUIDContentSchema","rawIntegrationFieldContentSchema","rawEmbedContentSchema","rawImageContentSchema","rawRichTextContentSchema","rawRichTextContentBlockSchema","rawRichTextContentSpanSchema","rawTableContentSchema","rawRepeatableContentSchema","rawNestableContentSchema","rawGroupContentSchema","rawGroupItemContentSchema","rawCompositeSliceContentSchema","rawLegacySliceContentSchema","rawSliceContentSchema","rawLegacySliceItemContentSchema","rawCompositeSliceItemContentSchema","rawSharedSliceItemContentSchema","rawSliceItemContentSchema","rawSlicesContentSchema","rawWidgetContentSchema","rawDocumentContentSchema","rawBooleanModelSchema","rawColorModelSchema","rawDateModelSchema","rawEmbedModelSchema","rawGeoPointModelSchema","rawImageModelSchema","rawIntegrationFieldModelSchema","rawLinkModelSchema","rawNestableModelSchema","rawNumberModelSchema","rawRangeModelSchema","rawRichTextModelSchema","rawSelectModelSchema","rawSeparatorModelSchema","rawSharedSliceModelSchema","rawTableModelSchema","rawTextModelSchema","rawTimestampModelSchema","rawUIDModelSchema","rawGroupModelSchema","rawNestedGroupModelSchema","rawSharedSliceRefModelSchema","rawCompositeSliceModelSchema","rawLegacySliceModelSchema","rawDynamicSliceModelSchema","rawStaticSliceModelSchema","rawSliceContentModelSchema","rawDynamicSlicesModelSchema","rawStaticSlicesModelSchema","rawStaticWidgetModelSchema","rawDynamicWidgetModelSchema","rawStaticSectionModelSchema","rawDynamicSectionModelSchema","rawStaticCustomTypeModelSchema","rawCustomTypeModelSchema"],"sources":["../src/io-ts.ts"],"sourcesContent":["import * as t from \"io-ts\"\nimport type { ZodMiniType } from \"zod/mini\"\n\n// Common\nimport { AssetSchema as rawAssetSchema } from \"./common/asset\"\nimport { EmbedSchema as rawEmbedSchema } from \"./common/embed\"\nimport { HexaColorCodeSchema as rawHexaColorCodeSchema } from \"./common/hexaColorCode\"\nimport { NonEmptyStringSchema as rawNonEmptyStringSchema } from \"./common/nonEmptyString\"\nimport { WidgetKeySchema as rawWidgetKeySchema } from \"./common/widgetKey\"\n// Content\nimport { BooleanContentSchema as rawBooleanContentSchema } from \"./content/boolean\"\nimport { BooleanLegacyCodec } from \"./content/codec/boolean\"\nimport { DocumentLegacyCodec } from \"./content/codec/document\"\nimport { EmbedLegacyCodec } from \"./content/codec/embed\"\nimport { EmptyLegacyCodec } from \"./content/codec/empty\"\nimport {\n\tColorLegacyCodec,\n\tDateLegacyCodec,\n\tNumberLegacyCodec,\n\tRangeLegacyCodec,\n\tSelectLegacyCodec,\n\tTextLegacyCodec,\n\tTimestampLegacyCodec,\n} from \"./content/codec/field\"\nimport { GeoPointLegacyCodec } from \"./content/codec/geopoint\"\nimport { GroupItemLegacyCodec, GroupLegacyCodec } from \"./content/codec/group\"\nimport { ImageLegacyCodec } from \"./content/codec/image\"\nimport { IntegrationFieldLegacyCodec } from \"./content/codec/integrationField\"\nimport type { LegacyCodec } from \"./content/codec/legacyContentCtx\"\nimport { LinkLegacyCodec } from \"./content/codec/link\"\nimport { NestableLegacyCodec } from \"./content/codec/nestable\"\nimport { RepeatableLegacyCodec } from \"./content/codec/repeatable\"\nimport { RichTextLegacyCodec } from \"./content/codec/richText\"\nimport { SeparatorLegacyCodec } from \"./content/codec/separator\"\nimport {\n\tCompositeSliceLegacyCodec,\n\tSharedSliceLegacyCodec,\n\tLegacySliceLegacyCodec,\n\tSliceLegacyCodec,\n} from \"./content/codec/slice\"\nimport { SliceItemLegacyCodec, SlicesLegacyCodec } from \"./content/codec/slices\"\nimport { TableLegacyCodec } from \"./content/codec/table\"\nimport { UIDLegacyCodec } from \"./content/codec/uid\"\nimport { WidgetLegacyCodec } from \"./content/codec/widget\"\nimport { DocumentContentSchema as rawDocumentContentSchema } from \"./content/document\"\nimport { EmbedContentSchema as rawEmbedContentSchema } from \"./content/embed\"\nimport { EmptyContentSchema as rawEmptyContentSchema } from \"./content/empty\"\nimport {\n\tColorContentSchema as rawColorContentSchema,\n\tDateContentSchema as rawDateContentSchema,\n\tNumberContentSchema as rawNumberContentSchema,\n\tRangeContentSchema as rawRangeContentSchema,\n\tSelectContentSchema as rawSelectContentSchema,\n\tTextContentSchema as rawTextContentSchema,\n\tTimestampContentSchema as rawTimestampContentSchema,\n\tFieldContentSchema as rawFieldContentSchema,\n} from \"./content/field\"\nimport { GeoPointContentSchema as rawGeoPointContentSchema } from \"./content/geopoint\"\nimport {\n\tGroupContentSchema as rawGroupContentSchema,\n\tGroupItemContentSchema as rawGroupItemContentSchema,\n} from \"./content/group\"\nimport { ImageContentSchema as rawImageContentSchema } from \"./content/image\"\nimport { IntegrationFieldContentSchema as rawIntegrationFieldContentSchema } from \"./content/integrationField\"\nimport { LinkContentSchema as rawLinkContentSchema } from \"./content/link\"\nimport { NestableContentSchema as rawNestableContentSchema } from \"./content/nestable\"\nimport { RepeatableContentSchema as rawRepeatableContentSchema } from \"./content/repeatable\"\nimport {\n\tRichTextContentSchema as rawRichTextContentSchema,\n\tRichTextContentBlockSchema as rawRichTextContentBlockSchema,\n\tRichTextContentSpanSchema as rawRichTextContentSpanSchema,\n} from \"./content/richText\"\nimport { SeparatorContentSchema as rawSeparatorContentSchema } from \"./content/separator\"\nimport {\n\tLegacySliceContentSchema as rawLegacySliceContentSchema,\n\tCompositeSliceContentSchema as rawCompositeSliceContentSchema,\n\tSharedSliceContentSchema as rawSharedSliceContentSchema,\n\tSliceContentSchema as rawSliceContentSchema,\n} from \"./content/slice\"\nimport {\n\tLegacySliceItemContentSchema as rawLegacySliceItemContentSchema,\n\tCompositeSliceItemContentSchema as rawCompositeSliceItemContentSchema,\n\tSharedSliceItemContentSchema as rawSharedSliceItemContentSchema,\n\tSliceItemContentSchema as rawSliceItemContentSchema,\n\tSlicesContentSchema as rawSlicesContentSchema,\n} from \"./content/slices\"\nimport { TableContentSchema as rawTableContentSchema } from \"./content/table\"\nimport { UIDContentSchema as rawUIDContentSchema } from \"./content/uid\"\nimport { WidgetContentSchema as rawWidgetContentSchema } from \"./content/widget\"\n// Model\nimport { BooleanModelSchema as rawBooleanModelSchema } from \"./model/boolean\"\nimport { ColorModelSchema as rawColorModelSchema } from \"./model/color\"\nimport {\n\tStaticCustomTypeModelSchema as rawStaticCustomTypeModelSchema,\n\tCustomTypeModelSchema as rawCustomTypeModelSchema,\n} from \"./model/customType\"\nimport { DateModelSchema as rawDateModelSchema } from \"./model/date\"\nimport { EmbedModelSchema as rawEmbedModelSchema } from \"./model/embed\"\nimport { GeoPointModelSchema as rawGeoPointModelSchema } from \"./model/geopoint\"\nimport {\n\tGroupModelSchema as rawGroupModelSchema,\n\tNestedGroupModelSchema as rawNestedGroupModelSchema,\n} from \"./model/group\"\nimport { ImageModelSchema as rawImageModelSchema } from \"./model/image\"\nimport { IntegrationFieldModelSchema as rawIntegrationFieldModelSchema } from \"./model/integrationField\"\nimport { LinkModelSchema as rawLinkModelSchema } from \"./model/link\"\nimport { NestableModelSchema as rawNestableModelSchema } from \"./model/nestable\"\nimport { NumberModelSchema as rawNumberModelSchema } from \"./model/number\"\nimport { RangeModelSchema as rawRangeModelSchema } from \"./model/range\"\nimport { RichTextModelSchema as rawRichTextModelSchema } from \"./model/richText\"\nimport {\n\tStaticSectionModelSchema as rawStaticSectionModelSchema,\n\tDynamicSectionModelSchema as rawDynamicSectionModelSchema,\n} from \"./model/section\"\nimport { SelectModelSchema as rawSelectModelSchema } from \"./model/select\"\nimport { SeparatorModelSchema as rawSeparatorModelSchema } from \"./model/separator\"\nimport {\n\tLegacySliceModelSchema as rawLegacySliceModelSchema,\n\tCompositeSliceModelSchema as rawCompositeSliceModelSchema,\n\tSharedSliceModelSchema as rawSharedSliceModelSchema,\n\tSharedSliceRefModelSchema as rawSharedSliceRefModelSchema,\n\tStaticSliceModelSchema as rawStaticSliceModelSchema,\n\tDynamicSliceModelSchema as rawDynamicSliceModelSchema,\n\tSliceContentModelSchema as rawSliceContentModelSchema,\n} from \"./model/slice\"\nimport {\n\tDynamicSlicesModelSchema as rawDynamicSlicesModelSchema,\n\tStaticSlicesModelSchema as rawStaticSlicesModelSchema,\n} from \"./model/slices\"\nimport { TableModelSchema as rawTableModelSchema } from \"./model/table\"\nimport { TextModelSchema as rawTextModelSchema } from \"./model/text\"\nimport { TimestampModelSchema as rawTimestampModelSchema } from \"./model/timestamp\"\nimport { UIDModelSchema as rawUIDModelSchema } from \"./model/uid\"\nimport {\n\tStaticWidgetModelSchema as rawStaticWidgetModelSchema,\n\tDynamicWidgetModelSchema as rawDynamicWidgetModelSchema,\n} from \"./model/widget\"\n\n// Common\nexport const AssetSchema = toIOTS(rawAssetSchema)\nexport const EmbedSchema = toIOTS(rawEmbedSchema)\nexport const HexaColorCodeSchema = toIOTS(rawHexaColorCodeSchema)\nexport const NonEmptyStringSchema = toIOTS(rawNonEmptyStringSchema)\nexport const WidgetKeySchema = toIOTS(rawWidgetKeySchema)\n\n// Content\nexport const BooleanContentSchema = toIOTS(rawBooleanContentSchema)\nexport const ColorContentSchema = toIOTS(rawColorContentSchema)\nexport const DateContentSchema = toIOTS(rawDateContentSchema)\nexport const EmptyContentSchema = toIOTS(rawEmptyContentSchema)\nexport const GeoPointContentSchema = toIOTS(rawGeoPointContentSchema)\nexport const LinkContentSchema = toIOTS(rawLinkContentSchema)\nexport const NumberContentSchema = toIOTS(rawNumberContentSchema)\nexport const RangeContentSchema = toIOTS(rawRangeContentSchema)\nexport const SelectContentSchema = toIOTS(rawSelectContentSchema)\nexport const SeparatorContentSchema = toIOTS(rawSeparatorContentSchema)\nexport const SharedSliceContentSchema = toIOTS(rawSharedSliceContentSchema)\nexport const TextContentSchema = toIOTS(rawTextContentSchema)\nexport const TimestampContentSchema = toIOTS(rawTimestampContentSchema)\nexport const FieldContentSchema = toIOTS(rawFieldContentSchema)\nexport const UIDContentSchema = toIOTS(rawUIDContentSchema)\nexport const IntegrationFieldContentSchema = toIOTS(rawIntegrationFieldContentSchema)\nexport const EmbedContentSchema = toIOTS(rawEmbedContentSchema)\nexport const ImageContentSchema = toIOTS(rawImageContentSchema)\nexport const RichTextContentSchema = toIOTS(rawRichTextContentSchema)\nexport const RichTextContentBlockSchema = toIOTS(rawRichTextContentBlockSchema)\nexport const RichTextContentSpanSchema = toIOTS(rawRichTextContentSpanSchema)\nexport const TableContentSchema = toIOTS(rawTableContentSchema)\nexport const RepeatableContentSchema = toIOTS(rawRepeatableContentSchema)\nexport const NestableContentSchema = toIOTS(rawNestableContentSchema)\nexport const GroupContentSchema = toIOTS(rawGroupContentSchema)\nexport const GroupItemContentSchema = toIOTS(rawGroupItemContentSchema)\nexport const CompositeSliceContentSchema = toIOTS(rawCompositeSliceContentSchema)\nexport const LegacySliceContentSchema = toIOTS(rawLegacySliceContentSchema)\nexport const SliceContentSchema = toIOTS(rawSliceContentSchema)\nexport const LegacySliceItemContentSchema = toIOTS(rawLegacySliceItemContentSchema)\nexport const CompositeSliceItemContentSchema = toIOTS(rawCompositeSliceItemContentSchema)\nexport const SharedSliceItemContentSchema = toIOTS(rawSharedSliceItemContentSchema)\nexport const SliceItemContentSchema = toIOTS(rawSliceItemContentSchema)\nexport const SlicesContentSchema = toIOTS(rawSlicesContentSchema)\nexport const WidgetContentSchema = toIOTS(rawWidgetContentSchema)\nexport const DocumentContentSchema = toIOTS(rawDocumentContentSchema)\n\n// Content legacy\nexport const BooleanLegacy = toIOTSCodec(BooleanLegacyCodec)\nexport const EmptyLegacy = toIOTSCodec(EmptyLegacyCodec)\nexport const TextLegacy = toIOTSCodec(TextLegacyCodec)\nexport const ColorLegacy = toIOTSCodec(ColorLegacyCodec)\nexport const DateLegacy = toIOTSCodec(DateLegacyCodec)\nexport const TimestampLegacy = toIOTSCodec(TimestampLegacyCodec)\nexport const NumberLegacy = toIOTSCodec(NumberLegacyCodec)\nexport const RangeLegacy = toIOTSCodec(RangeLegacyCodec)\nexport const SelectLegacy = toIOTSCodec(SelectLegacyCodec)\nexport const GeoPointLegacy = toIOTSCodec(GeoPointLegacyCodec)\nexport const EmbedLegacy = toIOTSCodec(EmbedLegacyCodec)\nexport const ImageLegacy = toIOTSCodec(ImageLegacyCodec)\nexport const LinkLegacy = toIOTSCodec(LinkLegacyCodec)\nexport const RepeatableLegacy = toIOTSCodec(RepeatableLegacyCodec)\nexport const RichTextLegacy = toIOTSCodec(RichTextLegacyCodec)\nexport const SeparatorLegacy = toIOTSCodec(SeparatorLegacyCodec)\nexport const IntegrationFieldLegacy = toIOTSCodec(IntegrationFieldLegacyCodec)\nexport const TableLegacy = toIOTSCodec(TableLegacyCodec)\nexport const NestableLegacy = toIOTSCodec(NestableLegacyCodec)\nexport const UIDLegacy = toIOTSCodec(UIDLegacyCodec)\nexport const GroupItemLegacy = toIOTSCodec(GroupItemLegacyCodec)\nexport const GroupLegacy = toIOTSCodec(GroupLegacyCodec)\nexport const LegacySliceLegacy = toIOTSCodec(LegacySliceLegacyCodec)\nexport const CompositeSliceLegacy = toIOTSCodec(CompositeSliceLegacyCodec)\nexport const SharedSliceLegacy = toIOTSCodec(SharedSliceLegacyCodec)\nexport const SliceLegacy = toIOTSCodec(SliceLegacyCodec)\nexport const SliceItemLegacy = toIOTSCodec(SliceItemLegacyCodec)\nexport const SlicesLegacy = toIOTSCodec(SlicesLegacyCodec)\nexport const WidgetLegacy = toIOTSCodec(WidgetLegacyCodec)\nexport const DocumentLegacy = toIOTSCodec(DocumentLegacyCodec)\n\n// Model\nexport const BooleanModelSchema = toIOTS(rawBooleanModelSchema)\nexport const ColorModelSchema = toIOTS(rawColorModelSchema)\nexport const DateModelSchema = toIOTS(rawDateModelSchema)\nexport const EmbedModelSchema = toIOTS(rawEmbedModelSchema)\nexport const GeoPointModelSchema = toIOTS(rawGeoPointModelSchema)\nexport const ImageModelSchema = toIOTS(rawImageModelSchema)\nexport const IntegrationFieldModelSchema = toIOTS(rawIntegrationFieldModelSchema)\nexport const LinkModelSchema = toIOTS(rawLinkModelSchema)\nexport const NestableModelSchema = toIOTS(rawNestableModelSchema)\nexport const NumberModelSchema = toIOTS(rawNumberModelSchema)\nexport const RangeModelSchema = toIOTS(rawRangeModelSchema)\nexport const RichTextModelSchema = toIOTS(rawRichTextModelSchema)\nexport const SelectModelSchema = toIOTS(rawSelectModelSchema)\nexport const SeparatorModelSchema = toIOTS(rawSeparatorModelSchema)\nexport const SharedSliceModelSchema = toIOTS(rawSharedSliceModelSchema)\nexport const TableModelSchema = toIOTS(rawTableModelSchema)\nexport const TextModelSchema = toIOTS(rawTextModelSchema)\nexport const TimestampModelSchema = toIOTS(rawTimestampModelSchema)\nexport const UIDModelSchema = toIOTS(rawUIDModelSchema)\nexport const GroupModelSchema = toIOTS(rawGroupModelSchema)\nexport const NestedGroupModelSchema = toIOTS(rawNestedGroupModelSchema)\nexport const SharedSliceRefModelSchema = toIOTS(rawSharedSliceRefModelSchema)\nexport const CompositeSliceModelSchema = toIOTS(rawCompositeSliceModelSchema)\nexport const LegacySliceModelSchema = toIOTS(rawLegacySliceModelSchema)\nexport const DynamicSliceModelSchema = toIOTS(rawDynamicSliceModelSchema)\nexport const StaticSliceModelSchema = toIOTS(rawStaticSliceModelSchema)\nexport const SliceContentModelSchema = toIOTS(rawSliceContentModelSchema)\nexport const DynamicSlicesModelSchema = toIOTS(rawDynamicSlicesModelSchema)\nexport const StaticSlicesModelSchema = toIOTS(rawStaticSlicesModelSchema)\nexport const StaticWidgetModelSchema = toIOTS(rawStaticWidgetModelSchema)\nexport const DynamicWidgetModelSchema = toIOTS(rawDynamicWidgetModelSchema)\nexport const StaticSectionModelSchema = toIOTS(rawStaticSectionModelSchema)\nexport const DynamicSectionModelSchema = toIOTS(rawDynamicSectionModelSchema)\nexport const StaticCustomTypeModelSchema = toIOTS(rawStaticCustomTypeModelSchema)\nexport const CustomTypeModelSchema = toIOTS(rawCustomTypeModelSchema)\n\nfunction toIOTS<T>(type: ZodMiniType<T>): t.Type<T> {\n\treturn new t.Type<T>(\n\t\t\"Type\",\n\t\t(input): input is T => type.safeParse(input).success,\n\t\t(input, context) => {\n\t\t\tconst result = type.safeParse(input)\n\t\t\treturn result.success\n\t\t\t\t? t.success(result.data)\n\t\t\t\t: t.failure(\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t)\n\t\t},\n\t\tt.identity,\n\t)\n}\n\nfunction toIOTSCodec<TArgs extends unknown[], A, LegacyRaw, AllowUndefined extends boolean>(\n\tcodecFactory: (...args: TArgs) => LegacyCodec<A, LegacyRaw, AllowUndefined>,\n): (\n\t...args: TArgs\n) => t.Type<A, ReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>, unknown> {\n\treturn (...args: TArgs) => {\n\t\tconst codec = codecFactory(...args)\n\t\treturn new t.Type<\n\t\t\tA,\n\t\t\tReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>,\n\t\t\tunknown\n\t\t>(\n\t\t\tcodec.name,\n\t\t\tcodec.is,\n\t\t\t(input, context) => {\n\t\t\t\tconst result = codec.toContent(input)\n\t\t\t\treturn result.success\n\t\t\t\t\t? t.success(result.data)\n\t\t\t\t\t: t.failure(\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t\t)\n\t\t\t},\n\t\t\tcodec.fromContent,\n\t\t)\n\t}\n}\n\ninterface ZodIssue {\n\tcode: string\n\tmessage: string\n\tpath?: PropertyKey[]\n\texpected?: string\n\tvalues?: unknown[]\n\tkeys?: string[]\n}\n\nfunction resolveValue(input: unknown, path: PropertyKey[]): unknown {\n\tlet current = input\n\tfor (const key of path) {\n\t\tif (current == null || typeof current !== \"object\") return undefined\n\t\tcurrent = (current as Record<PropertyKey, unknown>)[key]\n\t}\n\treturn current\n}\n\nfunction formatValue(value: unknown): string {\n\tif (value === null) return \"null\"\n\tif (value === undefined) return \"undefined\"\n\tif (typeof value === \"string\") return JSON.stringify(value)\n\treturn String(value)\n}\n\nfunction formatIssue(issue: ZodIssue, input: unknown): string {\n\tif (issue.code === \"custom\" && issue.message !== \"Invalid input\") {\n\t\treturn issue.message\n\t}\n\n\tconst value = resolveValue(input, issue.path ?? [])\n\tconst pathStr = issue.path?.length ? issue.path.join(\".\") : undefined\n\n\tif (issue.code === \"invalid_value\" && issue.values) {\n\t\tconst expected = issue.values.map(formatValue).join(\", \")\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${expected}`\n\t}\n\n\tif (issue.code === \"invalid_type\" && issue.expected) {\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${issue.expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${issue.expected}`\n\t}\n\n\tif (issue.code === \"unrecognized_keys\" && issue.keys) {\n\t\treturn `Unrecognized key(s): ${issue.keys.join(\", \")}`\n\t}\n\n\treturn issue.message\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,MAAa,cAAc,OAAOA,cAAe;AACjD,MAAa,cAAc,OAAOC,cAAe;AACjD,MAAa,sBAAsB,OAAOC,sBAAuB;AACjE,MAAa,uBAAuB,OAAOC,uBAAwB;AACnE,MAAa,kBAAkB,OAAOC,kBAAmB;AAGzD,MAAa,uBAAuB,OAAOC,uBAAwB;AACnE,MAAa,qBAAqB,OAAOC,qBAAsB;AAC/D,MAAa,oBAAoB,OAAOC,oBAAqB;AAC7D,MAAa,qBAAqB,OAAOC,qBAAsB;AAC/D,MAAa,wBAAwB,OAAOC,wBAAyB;AACrE,MAAa,oBAAoB,OAAOC,oBAAqB;AAC7D,MAAa,sBAAsB,OAAOC,sBAAuB;AACjE,MAAa,qBAAqB,OAAOC,qBAAsB;AAC/D,MAAa,sBAAsB,OAAOC,sBAAuB;AACjE,MAAa,yBAAyB,OAAOC,yBAA0B;AACvE,MAAa,2BAA2B,OAAOC,2BAA4B;AAC3E,MAAa,oBAAoB,OAAOC,o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":"io-ts.js","names":["rawAssetSchema","rawEmbedSchema","rawHexaColorCodeSchema","rawNonEmptyStringSchema","rawWidgetKeySchema","rawBooleanContentSchema","rawColorContentSchema","rawDateContentSchema","rawEmptyContentSchema","rawGeoPointContentSchema","rawFilledLinkContentSchema","rawEmptyLinkContentSchema","rawLinkContentSchema","rawNumberContentSchema","rawRangeContentSchema","rawSelectContentSchema","rawSeparatorContentSchema","rawSharedSliceContentSchema","rawTextContentSchema","rawTimestampContentSchema","rawFieldContentSchema","rawUIDContentSchema","rawIntegrationFieldContentSchema","rawEmbedContentSchema","rawImageContentViewSchema","rawImageContentSchema","rawRichTextContentSchema","rawRichTextContentBlockSchema","rawRichTextContentSpanSchema","rawTableContentSchema","rawRepeatableContentSchema","rawNestableContentSchema","rawGroupContentSchema","rawGroupItemContentSchema","rawCompositeSliceContentSchema","rawLegacySliceContentSchema","rawSliceContentSchema","rawLegacySliceItemContentSchema","rawCompositeSliceItemContentSchema","rawSharedSliceItemContentSchema","rawSliceItemContentSchema","rawSlicesContentSchema","rawWidgetContentSchema","rawDocumentContentSchema","rawBooleanModelSchema","rawColorModelSchema","rawDateModelSchema","rawEmbedModelSchema","rawGeoPointModelSchema","rawImageModelSchema","rawIntegrationFieldModelSchema","rawLinkModelSchema","rawNestableModelSchema","rawNumberModelSchema","rawRangeModelSchema","rawRichTextModelSchema","rawSelectModelSchema","rawSeparatorModelSchema","rawSharedSliceModelSchema","rawTableModelSchema","rawTextModelSchema","rawTimestampModelSchema","rawUIDModelSchema","rawGroupModelSchema","rawNestedGroupModelSchema","rawSharedSliceModelVariationSchema","rawSharedSliceRefModelSchema","rawCompositeSliceModelSchema","rawLegacySliceModelSchema","rawDynamicSliceModelSchema","rawStaticSliceModelSchema","rawSliceContentModelSchema","rawDynamicSlicesModelSchema","rawStaticSlicesModelSchema","rawStaticWidgetModelSchema","rawDynamicWidgetModelSchema","rawStaticSectionModelSchema","rawDynamicSectionModelSchema","rawStaticCustomTypeModelSchema","rawCustomTypeModelSchema"],"sources":["../src/io-ts.ts"],"sourcesContent":["import * as t from \"io-ts\"\nimport type { ZodMiniType } from \"zod/mini\"\n\n// Common\nimport { AssetSchema as rawAssetSchema } from \"./common/asset\"\nimport { EmbedSchema as rawEmbedSchema } from \"./common/embed\"\nimport { HexaColorCodeSchema as rawHexaColorCodeSchema } from \"./common/hexaColorCode\"\nimport { NonEmptyStringSchema as rawNonEmptyStringSchema } from \"./common/nonEmptyString\"\nimport { WidgetKeySchema as rawWidgetKeySchema } from \"./common/widgetKey\"\n// Content\nimport { BooleanContentSchema as rawBooleanContentSchema } from \"./content/boolean\"\nimport { BooleanLegacyCodec } from \"./content/codec/boolean\"\nimport { DocumentLegacyCodec } from \"./content/codec/document\"\nimport { EmbedLegacyCodec } from \"./content/codec/embed\"\nimport { EmptyLegacyCodec } from \"./content/codec/empty\"\nimport {\n\tColorLegacyCodec,\n\tDateLegacyCodec,\n\tNumberLegacyCodec,\n\tRangeLegacyCodec,\n\tSelectLegacyCodec,\n\tTextLegacyCodec,\n\tTimestampLegacyCodec,\n} from \"./content/codec/field\"\nimport { GeoPointLegacyCodec } from \"./content/codec/geopoint\"\nimport { GroupItemLegacyCodec, GroupLegacyCodec } from \"./content/codec/group\"\nimport { ImageLegacyCodec } from \"./content/codec/image\"\nimport { IntegrationFieldLegacyCodec } from \"./content/codec/integrationField\"\nimport type { LegacyCodec } from \"./content/codec/legacyContentCtx\"\nimport { LinkLegacyCodec } from \"./content/codec/link\"\nimport { NestableLegacyCodec } from \"./content/codec/nestable\"\nimport { RepeatableLegacyCodec } from \"./content/codec/repeatable\"\nimport { RichTextLegacyCodec } from \"./content/codec/richText\"\nimport { SeparatorLegacyCodec } from \"./content/codec/separator\"\nimport {\n\tCompositeSliceLegacyCodec,\n\tSharedSliceLegacyCodec,\n\tLegacySliceLegacyCodec,\n\tSliceLegacyCodec,\n} from \"./content/codec/slice\"\nimport { SliceItemLegacyCodec, SlicesLegacyCodec } from \"./content/codec/slices\"\nimport { TableLegacyCodec } from \"./content/codec/table\"\nimport { UIDLegacyCodec } from \"./content/codec/uid\"\nimport { WidgetLegacyCodec } from \"./content/codec/widget\"\nimport { DocumentContentSchema as rawDocumentContentSchema } from \"./content/document\"\nimport { EmbedContentSchema as rawEmbedContentSchema } from \"./content/embed\"\nimport { EmptyContentSchema as rawEmptyContentSchema } from \"./content/empty\"\nimport {\n\tColorContentSchema as rawColorContentSchema,\n\tDateContentSchema as rawDateContentSchema,\n\tNumberContentSchema as rawNumberContentSchema,\n\tRangeContentSchema as rawRangeContentSchema,\n\tSelectContentSchema as rawSelectContentSchema,\n\tTextContentSchema as rawTextContentSchema,\n\tTimestampContentSchema as rawTimestampContentSchema,\n\tFieldContentSchema as rawFieldContentSchema,\n} from \"./content/field\"\nimport { GeoPointContentSchema as rawGeoPointContentSchema } from \"./content/geopoint\"\nimport {\n\tGroupContentSchema as rawGroupContentSchema,\n\tGroupItemContentSchema as rawGroupItemContentSchema,\n} from \"./content/group\"\nimport {\n\tImageContentSchema as rawImageContentSchema,\n\tImageContentViewSchema as rawImageContentViewSchema,\n} from \"./content/image\"\nimport { IntegrationFieldContentSchema as rawIntegrationFieldContentSchema } from \"./content/integrationField\"\nimport {\n\tEmptyLinkContentSchema as rawEmptyLinkContentSchema,\n\tFilledLinkContentSchema as rawFilledLinkContentSchema,\n\tLinkContentSchema as rawLinkContentSchema,\n} from \"./content/link\"\nimport { NestableContentSchema as rawNestableContentSchema } from \"./content/nestable\"\nimport { RepeatableContentSchema as rawRepeatableContentSchema } from \"./content/repeatable\"\nimport {\n\tRichTextContentSchema as rawRichTextContentSchema,\n\tRichTextContentBlockSchema as rawRichTextContentBlockSchema,\n\tRichTextContentSpanSchema as rawRichTextContentSpanSchema,\n} from \"./content/richText\"\nimport { SeparatorContentSchema as rawSeparatorContentSchema } from \"./content/separator\"\nimport {\n\tLegacySliceContentSchema as rawLegacySliceContentSchema,\n\tCompositeSliceContentSchema as rawCompositeSliceContentSchema,\n\tSharedSliceContentSchema as rawSharedSliceContentSchema,\n\tSliceContentSchema as rawSliceContentSchema,\n} from \"./content/slice\"\nimport {\n\tLegacySliceItemContentSchema as rawLegacySliceItemContentSchema,\n\tCompositeSliceItemContentSchema as rawCompositeSliceItemContentSchema,\n\tSharedSliceItemContentSchema as rawSharedSliceItemContentSchema,\n\tSliceItemContentSchema as rawSliceItemContentSchema,\n\tSlicesContentSchema as rawSlicesContentSchema,\n} from \"./content/slices\"\nimport { TableContentSchema as rawTableContentSchema } from \"./content/table\"\nimport { UIDContentSchema as rawUIDContentSchema } from \"./content/uid\"\nimport { WidgetContentSchema as rawWidgetContentSchema } from \"./content/widget\"\n// Model\nimport { BooleanModelSchema as rawBooleanModelSchema } from \"./model/boolean\"\nimport { ColorModelSchema as rawColorModelSchema } from \"./model/color\"\nimport {\n\tStaticCustomTypeModelSchema as rawStaticCustomTypeModelSchema,\n\tCustomTypeModelSchema as rawCustomTypeModelSchema,\n} from \"./model/customType\"\nimport { DateModelSchema as rawDateModelSchema } from \"./model/date\"\nimport { EmbedModelSchema as rawEmbedModelSchema } from \"./model/embed\"\nimport { GeoPointModelSchema as rawGeoPointModelSchema } from \"./model/geopoint\"\nimport {\n\tGroupModelSchema as rawGroupModelSchema,\n\tNestedGroupModelSchema as rawNestedGroupModelSchema,\n} from \"./model/group\"\nimport { ImageModelSchema as rawImageModelSchema } from \"./model/image\"\nimport { IntegrationFieldModelSchema as rawIntegrationFieldModelSchema } from \"./model/integrationField\"\nimport { LinkModelSchema as rawLinkModelSchema } from \"./model/link\"\nimport { NestableModelSchema as rawNestableModelSchema } from \"./model/nestable\"\nimport { NumberModelSchema as rawNumberModelSchema } from \"./model/number\"\nimport { RangeModelSchema as rawRangeModelSchema } from \"./model/range\"\nimport { RichTextModelSchema as rawRichTextModelSchema } from \"./model/richText\"\nimport {\n\tStaticSectionModelSchema as rawStaticSectionModelSchema,\n\tDynamicSectionModelSchema as rawDynamicSectionModelSchema,\n} from \"./model/section\"\nimport { SelectModelSchema as rawSelectModelSchema } from \"./model/select\"\nimport { SeparatorModelSchema as rawSeparatorModelSchema } from \"./model/separator\"\nimport {\n\tLegacySliceModelSchema as rawLegacySliceModelSchema,\n\tCompositeSliceModelSchema as rawCompositeSliceModelSchema,\n\tSharedSliceModelSchema as rawSharedSliceModelSchema,\n\tSharedSliceModelVariationSchema as rawSharedSliceModelVariationSchema,\n\tSharedSliceRefModelSchema as rawSharedSliceRefModelSchema,\n\tStaticSliceModelSchema as rawStaticSliceModelSchema,\n\tDynamicSliceModelSchema as rawDynamicSliceModelSchema,\n\tSliceContentModelSchema as rawSliceContentModelSchema,\n} from \"./model/slice\"\nimport {\n\tDynamicSlicesModelSchema as rawDynamicSlicesModelSchema,\n\tStaticSlicesModelSchema as rawStaticSlicesModelSchema,\n} from \"./model/slices\"\nimport { TableModelSchema as rawTableModelSchema } from \"./model/table\"\nimport { TextModelSchema as rawTextModelSchema } from \"./model/text\"\nimport { TimestampModelSchema as rawTimestampModelSchema } from \"./model/timestamp\"\nimport { UIDModelSchema as rawUIDModelSchema } from \"./model/uid\"\nimport {\n\tStaticWidgetModelSchema as rawStaticWidgetModelSchema,\n\tDynamicWidgetModelSchema as rawDynamicWidgetModelSchema,\n} from \"./model/widget\"\n\n// Common\nexport const AssetSchema = toIOTS(rawAssetSchema)\nexport const EmbedSchema = toIOTS(rawEmbedSchema)\nexport const HexaColorCodeSchema = toIOTS(rawHexaColorCodeSchema)\nexport const NonEmptyStringSchema = toIOTS(rawNonEmptyStringSchema)\nexport const WidgetKeySchema = toIOTS(rawWidgetKeySchema)\n\n// Content\nexport const BooleanContentSchema = toIOTS(rawBooleanContentSchema)\nexport const ColorContentSchema = toIOTS(rawColorContentSchema)\nexport const DateContentSchema = toIOTS(rawDateContentSchema)\nexport const EmptyContentSchema = toIOTS(rawEmptyContentSchema)\nexport const GeoPointContentSchema = toIOTS(rawGeoPointContentSchema)\nexport const FilledLinkContentSchema = toIOTS(rawFilledLinkContentSchema)\nexport const EmptyLinkContentSchema = toIOTS(rawEmptyLinkContentSchema)\nexport const LinkContentSchema = toIOTS(rawLinkContentSchema)\nexport const NumberContentSchema = toIOTS(rawNumberContentSchema)\nexport const RangeContentSchema = toIOTS(rawRangeContentSchema)\nexport const SelectContentSchema = toIOTS(rawSelectContentSchema)\nexport const SeparatorContentSchema = toIOTS(rawSeparatorContentSchema)\nexport const SharedSliceContentSchema = toIOTS(rawSharedSliceContentSchema)\nexport const TextContentSchema = toIOTS(rawTextContentSchema)\nexport const TimestampContentSchema = toIOTS(rawTimestampContentSchema)\nexport const FieldContentSchema = toIOTS(rawFieldContentSchema)\nexport const UIDContentSchema = toIOTS(rawUIDContentSchema)\nexport const IntegrationFieldContentSchema = toIOTS(rawIntegrationFieldContentSchema)\nexport const EmbedContentSchema = toIOTS(rawEmbedContentSchema)\nexport const ImageContentViewSchema = toIOTS(rawImageContentViewSchema)\nexport const ImageContentSchema = toIOTS(rawImageContentSchema)\nexport const RichTextContentSchema = toIOTS(rawRichTextContentSchema)\nexport const RichTextContentBlockSchema = toIOTS(rawRichTextContentBlockSchema)\nexport const RichTextContentSpanSchema = toIOTS(rawRichTextContentSpanSchema)\nexport const TableContentSchema = toIOTS(rawTableContentSchema)\nexport const RepeatableContentSchema = toIOTS(rawRepeatableContentSchema)\nexport const NestableContentSchema = toIOTS(rawNestableContentSchema)\nexport const GroupContentSchema = toIOTS(rawGroupContentSchema)\nexport const GroupItemContentSchema = toIOTS(rawGroupItemContentSchema)\nexport const CompositeSliceContentSchema = toIOTS(rawCompositeSliceContentSchema)\nexport const LegacySliceContentSchema = toIOTS(rawLegacySliceContentSchema)\nexport const SliceContentSchema = toIOTS(rawSliceContentSchema)\nexport const LegacySliceItemContentSchema = toIOTS(rawLegacySliceItemContentSchema)\nexport const CompositeSliceItemContentSchema = toIOTS(rawCompositeSliceItemContentSchema)\nexport const SharedSliceItemContentSchema = toIOTS(rawSharedSliceItemContentSchema)\nexport const SliceItemContentSchema = toIOTS(rawSliceItemContentSchema)\nexport const SlicesContentSchema = toIOTS(rawSlicesContentSchema)\nexport const WidgetContentSchema = toIOTS(rawWidgetContentSchema)\nexport const DocumentContentSchema = toIOTS(rawDocumentContentSchema)\n\n// Content legacy\nexport const BooleanLegacy = toIOTSCodec(BooleanLegacyCodec)\nexport const EmptyLegacy = toIOTSCodec(EmptyLegacyCodec)\nexport const TextLegacy = toIOTSCodec(TextLegacyCodec)\nexport const ColorLegacy = toIOTSCodec(ColorLegacyCodec)\nexport const DateLegacy = toIOTSCodec(DateLegacyCodec)\nexport const TimestampLegacy = toIOTSCodec(TimestampLegacyCodec)\nexport const NumberLegacy = toIOTSCodec(NumberLegacyCodec)\nexport const RangeLegacy = toIOTSCodec(RangeLegacyCodec)\nexport const SelectLegacy = toIOTSCodec(SelectLegacyCodec)\nexport const GeoPointLegacy = toIOTSCodec(GeoPointLegacyCodec)\nexport const EmbedLegacy = toIOTSCodec(EmbedLegacyCodec)\nexport const ImageLegacy = toIOTSCodec(ImageLegacyCodec)\nexport const LinkLegacy = toIOTSCodec(LinkLegacyCodec)\nexport const RepeatableLegacy = toIOTSCodec(RepeatableLegacyCodec)\nexport const RichTextLegacy = toIOTSCodec(RichTextLegacyCodec)\nexport const SeparatorLegacy = toIOTSCodec(SeparatorLegacyCodec)\nexport const IntegrationFieldLegacy = toIOTSCodec(IntegrationFieldLegacyCodec)\nexport const TableLegacy = toIOTSCodec(TableLegacyCodec)\nexport const NestableLegacy = toIOTSCodec(NestableLegacyCodec)\nexport const UIDLegacy = toIOTSCodec(UIDLegacyCodec)\nexport const GroupItemLegacy = toIOTSCodec(GroupItemLegacyCodec)\nexport const GroupLegacy = toIOTSCodec(GroupLegacyCodec)\nexport const LegacySliceLegacy = toIOTSCodec(LegacySliceLegacyCodec)\nexport const CompositeSliceLegacy = toIOTSCodec(CompositeSliceLegacyCodec)\nexport const SharedSliceLegacy = toIOTSCodec(SharedSliceLegacyCodec)\nexport const SliceLegacy = toIOTSCodec(SliceLegacyCodec)\nexport const SliceItemLegacy = toIOTSCodec(SliceItemLegacyCodec)\nexport const SlicesLegacy = toIOTSCodec(SlicesLegacyCodec)\nexport const WidgetLegacy = toIOTSCodec(WidgetLegacyCodec)\nexport const DocumentLegacy = toIOTSCodec(DocumentLegacyCodec)\n\n// Model\nexport const BooleanModelSchema = toIOTS(rawBooleanModelSchema)\nexport const ColorModelSchema = toIOTS(rawColorModelSchema)\nexport const DateModelSchema = toIOTS(rawDateModelSchema)\nexport const EmbedModelSchema = toIOTS(rawEmbedModelSchema)\nexport const GeoPointModelSchema = toIOTS(rawGeoPointModelSchema)\nexport const ImageModelSchema = toIOTS(rawImageModelSchema)\nexport const IntegrationFieldModelSchema = toIOTS(rawIntegrationFieldModelSchema)\nexport const LinkModelSchema = toIOTS(rawLinkModelSchema)\nexport const NestableModelSchema = toIOTS(rawNestableModelSchema)\nexport const NumberModelSchema = toIOTS(rawNumberModelSchema)\nexport const RangeModelSchema = toIOTS(rawRangeModelSchema)\nexport const RichTextModelSchema = toIOTS(rawRichTextModelSchema)\nexport const SelectModelSchema = toIOTS(rawSelectModelSchema)\nexport const SeparatorModelSchema = toIOTS(rawSeparatorModelSchema)\nexport const SharedSliceModelSchema = toIOTS(rawSharedSliceModelSchema)\nexport const TableModelSchema = toIOTS(rawTableModelSchema)\nexport const TextModelSchema = toIOTS(rawTextModelSchema)\nexport const TimestampModelSchema = toIOTS(rawTimestampModelSchema)\nexport const UIDModelSchema = toIOTS(rawUIDModelSchema)\nexport const GroupModelSchema = toIOTS(rawGroupModelSchema)\nexport const NestedGroupModelSchema = toIOTS(rawNestedGroupModelSchema)\nexport const SharedSliceModelVariationSchema = toIOTS(rawSharedSliceModelVariationSchema)\nexport const SharedSliceRefModelSchema = toIOTS(rawSharedSliceRefModelSchema)\nexport const CompositeSliceModelSchema = toIOTS(rawCompositeSliceModelSchema)\nexport const LegacySliceModelSchema = toIOTS(rawLegacySliceModelSchema)\nexport const DynamicSliceModelSchema = toIOTS(rawDynamicSliceModelSchema)\nexport const StaticSliceModelSchema = toIOTS(rawStaticSliceModelSchema)\nexport const SliceContentModelSchema = toIOTS(rawSliceContentModelSchema)\nexport const DynamicSlicesModelSchema = toIOTS(rawDynamicSlicesModelSchema)\nexport const StaticSlicesModelSchema = toIOTS(rawStaticSlicesModelSchema)\nexport const StaticWidgetModelSchema = toIOTS(rawStaticWidgetModelSchema)\nexport const DynamicWidgetModelSchema = toIOTS(rawDynamicWidgetModelSchema)\nexport const StaticSectionModelSchema = toIOTS(rawStaticSectionModelSchema)\nexport const DynamicSectionModelSchema = toIOTS(rawDynamicSectionModelSchema)\nexport const StaticCustomTypeModelSchema = toIOTS(rawStaticCustomTypeModelSchema)\nexport const CustomTypeModelSchema = toIOTS(rawCustomTypeModelSchema)\n\nfunction toIOTS<T>(type: ZodMiniType<T>): t.Type<T> {\n\treturn new t.Type<T>(\n\t\t\"Type\",\n\t\t(input): input is T => type.safeParse(input).success,\n\t\t(input, context) => {\n\t\t\tconst result = type.safeParse(input)\n\t\t\treturn result.success\n\t\t\t\t? t.success(result.data)\n\t\t\t\t: t.failure(\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t)\n\t\t},\n\t\tt.identity,\n\t)\n}\n\nfunction toIOTSCodec<TArgs extends unknown[], A, LegacyRaw, AllowUndefined extends boolean>(\n\tcodecFactory: (...args: TArgs) => LegacyCodec<A, LegacyRaw, AllowUndefined>,\n): (\n\t...args: TArgs\n) => t.Type<A, ReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>, unknown> {\n\treturn (...args: TArgs) => {\n\t\tconst codec = codecFactory(...args)\n\t\treturn new t.Type<\n\t\t\tA,\n\t\t\tReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>,\n\t\t\tunknown\n\t\t>(\n\t\t\tcodec.name,\n\t\t\tcodec.is,\n\t\t\t(input, context) => {\n\t\t\t\tconst result = codec.toContent(input)\n\t\t\t\treturn result.success\n\t\t\t\t\t? t.success(result.data)\n\t\t\t\t\t: t.failure(\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t\t)\n\t\t\t},\n\t\t\tcodec.fromContent,\n\t\t)\n\t}\n}\n\ninterface ZodIssue {\n\tcode: string\n\tmessage: string\n\tpath?: PropertyKey[]\n\texpected?: string\n\tvalues?: unknown[]\n\tkeys?: string[]\n}\n\nfunction resolveValue(input: unknown, path: PropertyKey[]): unknown {\n\tlet current = input\n\tfor (const key of path) {\n\t\tif (current == null || typeof current !== \"object\") return undefined\n\t\tcurrent = (current as Record<PropertyKey, unknown>)[key]\n\t}\n\treturn current\n}\n\nfunction formatValue(value: unknown): string {\n\tif (value === null) return \"null\"\n\tif (value === undefined) return \"undefined\"\n\tif (typeof value === \"string\") return JSON.stringify(value)\n\treturn String(value)\n}\n\nfunction formatIssue(issue: ZodIssue, input: unknown): string {\n\tif (issue.code === \"custom\" && issue.message !== \"Invalid input\") {\n\t\treturn issue.message\n\t}\n\n\tconst value = resolveValue(input, issue.path ?? [])\n\tconst pathStr = issue.path?.length ? issue.path.join(\".\") : undefined\n\n\tif (issue.code === \"invalid_value\" && issue.values) {\n\t\tconst expected = issue.values.map(formatValue).join(\", \")\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${expected}`\n\t}\n\n\tif (issue.code === \"invalid_type\" && issue.expected) {\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${issue.expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${issue.expected}`\n\t}\n\n\tif (issue.code === \"unrecognized_keys\" && issue.keys) {\n\t\treturn `Unrecognized key(s): ${issue.keys.join(\", \")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Y,OAAwB;AAC5C,KAAI,UAAU,KAAM,QAAO;AAC3B,KAAI,UAAU,KAAA,EAAW,QAAO;AAChC,KAAI,OAAO,UAAU,SAAU,QAAO,KAAK,UAAU,MAAM;AAC3D,QAAO,OAAO,MAAM;;AAGrB,SAAS,YAAY,OAAiB,OAAwB;AAC7D,KAAI,MAAM,SAAS,YAAY,MAAM,YAAY,gBAChD,QAAO,MAAM;CAGd,MAAM,QAAQ,aAAa,OAAO,MAAM,QAAQ,EAAE,CAAC;CACnD,MAAM,UAAU,MAAM,MAAM,SAAS,MAAM,KAAK,KAAK,IAAI,GAAG,KAAA;AAE5D,KAAI,MAAM,SAAS,mBAAmB,MAAM,QAAQ;EACnD,MAAM,WAAW,MAAM,OAAO,IAAI,YAAY,CAAC,KAAK,KAAK;AACzD,SAAO,UACJ,iBAAiB,YAAY,MAAM,CAAC,OAAO,QAAQ,aAAa,aAChE,iBAAiB,YAAY,MAAM,CAAC,aAAa;;AAGrD,KAAI,MAAM,SAAS,kBAAkB,MAAM,SAC1C,QAAO,UACJ,iBAAiB,YAAY,MAAM,CAAC,OAAO,QAAQ,aAAa,MAAM,aACtE,iBAAiB,YAAY,MAAM,CAAC,aAAa,MAAM;AAG3D,KAAI,MAAM,SAAS,uBAAuB,MAAM,KAC/C,QAAO,wBAAwB,MAAM,KAAK,KAAK,KAAK;AAGrD,QAAO,MAAM"}
@@ -1,6 +1,25 @@
1
1
  import { z } from "zod/mini";
2
2
 
3
3
  //#region src/model/richText.d.ts
4
+ declare const RichTextModelNodeType: {
5
+ readonly heading1: "heading1";
6
+ readonly heading2: "heading2";
7
+ readonly heading3: "heading3";
8
+ readonly heading4: "heading4";
9
+ readonly heading5: "heading5";
10
+ readonly heading6: "heading6";
11
+ readonly paragraph: "paragraph";
12
+ readonly preformatted: "preformatted";
13
+ readonly orderedList: "o-list-item";
14
+ readonly list: "list-item";
15
+ readonly image: "image";
16
+ readonly embed: "embed";
17
+ readonly hyperlink: "hyperlink";
18
+ readonly strong: "strong";
19
+ readonly em: "em";
20
+ readonly rtl: "rtl";
21
+ };
22
+ type RichTextModelNodeTypes = (typeof RichTextModelNodeType)[keyof typeof RichTextModelNodeType];
4
23
  declare const RichTextModelSchema: z.ZodMiniObject<{
5
24
  type: z.ZodMiniLiteral<"StructuredText">;
6
25
  fieldset: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
@@ -20,5 +39,5 @@ declare const RichTextModelSchema: z.ZodMiniObject<{
20
39
  }, z.core.$strip>;
21
40
  type RichTextModel = z.infer<typeof RichTextModelSchema>;
22
41
  //#endregion
23
- export { RichTextModel };
42
+ export { RichTextModel, RichTextModelNodeType, RichTextModelNodeTypes };
24
43
  //# sourceMappingURL=richText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/model/richText.ts"],"mappings":";;;cAmGa,mBAAA,EAAmB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;KAMpB,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA"}
1
+ {"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/model/richText.ts"],"mappings":";;;cAQa,qBAAA;EAAA;;;;;;;;;;;;;;;;;KAmBD,sBAAA,WACH,qBAAA,eAAoC,qBAAA;AAAA,cA0EhC,mBAAA,EAAmB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;KAMpB,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA"}
@@ -3,7 +3,7 @@ import { z } from "zod/mini";
3
3
  //#region src/model/richText.ts
4
4
  const RichTextFieldType = "StructuredText";
5
5
  const DEFAULT_OPTION = "paragraph";
6
- const RichTextNodeType = {
6
+ const RichTextModelNodeType = {
7
7
  heading1: "heading1",
8
8
  heading2: "heading2",
9
9
  heading3: "heading3",
@@ -21,7 +21,7 @@ const RichTextNodeType = {
21
21
  em: "em",
22
22
  rtl: "rtl"
23
23
  };
24
- const VALID_NODE_TYPES = Object.values(RichTextNodeType);
24
+ const VALID_NODE_TYPES = Object.values(RichTextModelNodeType);
25
25
  /**
26
26
  * RichTextOptions parses comma-separated node types, filters invalid ones,
27
27
  * and defaults to "paragraph" if empty or null.
@@ -68,6 +68,6 @@ const RichTextModelSchema = z.object({
68
68
  config: z.optional(RichTextConfigSchema)
69
69
  });
70
70
  //#endregion
71
- export { RichTextModelSchema, RichTextNodeType };
71
+ export { RichTextModelNodeType, RichTextModelSchema };
72
72
 
73
73
  //# sourceMappingURL=richText.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"richText.js","names":[],"sources":["../../src/model/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { ImageConstraintSchema } from \"./image\"\n\nexport const RichTextFieldType = \"StructuredText\"\n\nexport const DEFAULT_OPTION = \"paragraph\"\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\torderedList: \"o-list-item\",\n\tlist: \"list-item\",\n\timage: \"image\",\n\tembed: \"embed\",\n\thyperlink: \"hyperlink\",\n\tstrong: \"strong\",\n\tem: \"em\",\n\trtl: \"rtl\",\n} as const\n\nconst VALID_NODE_TYPES = Object.values(RichTextNodeType)\n\n/**\n * RichTextOptions parses comma-separated node types, filters invalid ones,\n * and defaults to \"paragraph\" if empty or null.\n */\nconst RichTextOptionsSchema = z.pipe(\n\tz.union([z.string(), z.null()]),\n\tz.transform((s: string | null) => {\n\t\tif (!s) return DEFAULT_OPTION\n\t\tconst entries = s.split(\",\").map((e: string) => e.trim())\n\t\tconst filtered = entries.filter((e: string) =>\n\t\t\tVALID_NODE_TYPES.includes(e as (typeof VALID_NODE_TYPES)[number]),\n\t\t)\n\t\treturn filtered.length ? filtered.join(\",\") : DEFAULT_OPTION\n\t}),\n)\n\n/**\n * RichTextLabels accepts multiple formats and normalizes to string[]:\n * - null → []\n * - \"label\" → [\"label\"]\n * - [\"a\", \"b\"] → [\"a\", \"b\"]\n * - { \"\": [{name: \"a\"}], \"key\": [{name: \"b\"}] } → [\"a\", \"b\"] (legacy format)\n */\nconst LegacyLabelsFormat = z.record(z.string(), z.array(z.object({ name: z.string() })))\n\nconst RichTextLabelsSchema: z.ZodMiniType<string[]> = z.pipe(\n\tz.union([\n\t\tz.pipe(\n\t\t\tz.null(),\n\t\t\tz.transform(() => [] as string[]),\n\t\t),\n\t\tz.pipe(\n\t\t\tz.string(),\n\t\t\tz.transform((s: string) => [s]),\n\t\t),\n\t\tz.array(z.string()),\n\t\tz.pipe(\n\t\t\tLegacyLabelsFormat,\n\t\t\tz.transform((obj: Record<string, Array<{ name: string }>>) => {\n\t\t\t\tconst entries = Object.entries(obj)\n\t\t\t\tif (!entries.length) return [] as string[]\n\n\t\t\t\t// Handle legacy format with empty key\n\t\t\t\tif (obj[\"\"]) {\n\t\t\t\t\treturn obj[\"\"].map((l: { name: string }) => l.name)\n\t\t\t\t}\n\n\t\t\t\t// Convert all entries to flat array of names\n\t\t\t\treturn entries\n\t\t\t\t\t.reduce<string[]>((acc, [, labelsEntries]) => {\n\t\t\t\t\t\treturn acc.concat(labelsEntries.map((l: { name: string }) => l.name))\n\t\t\t\t\t}, [])\n\t\t\t\t\t.filter(Boolean)\n\t\t\t}),\n\t\t),\n\t]),\n\tz.transform((result: string[]) => result as string[]),\n)\n\nconst RichTextConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tplaceholder: z.optional(z.string()),\n\tuseAsTitle: z.optional(z.boolean()),\n\tsingle: z.optional(RichTextOptionsSchema),\n\tmulti: z.optional(RichTextOptionsSchema),\n\timageConstraint: z.optional(ImageConstraintSchema),\n\tlabels: z.optional(RichTextLabelsSchema),\n\tallowTargetBlank: z.optional(z.boolean()),\n})\n\nexport const RichTextModelSchema = z.object({\n\ttype: z.literal(RichTextFieldType),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.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AE,KAAK;AAIpD,SAAO,QACL,QAAkB,KAAK,GAAG,mBAAmB;AAC7C,UAAO,IAAI,OAAO,cAAc,KAAK,MAAwB,EAAE,KAAK,CAAC;KACnE,EAAE,CAAC,CACL,OAAO,QAAQ;GAChB,CACF;CACD,CAAC,EACF,EAAE,WAAW,WAAqB,OAAmB,CACrD;AAED,MAAM,uBAAuB,EAAE,OAAO;CACrC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;CAC5B,aAAa,EAAE,SAAS,EAAE,QAAQ,CAAC;CACnC,YAAY,EAAE,SAAS,EAAE,SAAS,CAAC;CACnC,QAAQ,EAAE,SAAS,sBAAsB;CACzC,OAAO,EAAE,SAAS,sBAAsB;CACxC,iBAAiB,EAAE,SAAS,sBAAsB;CAClD,QAAQ,EAAE,SAAS,qBAAqB;CACxC,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC;CACzC,CAAC;AAEF,MAAa,sBAAsB,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,kBAAkB;CAClC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC;CAC/B,QAAQ,EAAE,SAAS,qBAAqB;CACxC,CAAC"}
1
+ {"version":3,"file":"richText.js","names":[],"sources":["../../src/model/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { ImageConstraintSchema } from \"./image\"\n\nexport const RichTextFieldType = \"StructuredText\"\n\nexport const DEFAULT_OPTION = \"paragraph\"\n\nexport const RichTextModelNodeType = {\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\torderedList: \"o-list-item\",\n\tlist: \"list-item\",\n\timage: \"image\",\n\tembed: \"embed\",\n\thyperlink: \"hyperlink\",\n\tstrong: \"strong\",\n\tem: \"em\",\n\trtl: \"rtl\",\n} as const\n\nexport type RichTextModelNodeTypes =\n\t(typeof RichTextModelNodeType)[keyof typeof RichTextModelNodeType]\n\nconst VALID_NODE_TYPES = Object.values(RichTextModelNodeType)\n\n/**\n * RichTextOptions parses comma-separated node types, filters invalid ones,\n * and defaults to \"paragraph\" if empty or null.\n */\nconst RichTextOptionsSchema = z.pipe(\n\tz.union([z.string(), z.null()]),\n\tz.transform((s: string | null) => {\n\t\tif (!s) return DEFAULT_OPTION\n\t\tconst entries = s.split(\",\").map((e: string) => e.trim())\n\t\tconst filtered = entries.filter((e: string) =>\n\t\t\tVALID_NODE_TYPES.includes(e as (typeof VALID_NODE_TYPES)[number]),\n\t\t)\n\t\treturn filtered.length ? filtered.join(\",\") : DEFAULT_OPTION\n\t}),\n)\n\n/**\n * RichTextLabels accepts multiple formats and normalizes to string[]:\n * - null → []\n * - \"label\" → [\"label\"]\n * - [\"a\", \"b\"] → [\"a\", \"b\"]\n * - { \"\": [{name: \"a\"}], \"key\": [{name: \"b\"}] } → [\"a\", \"b\"] (legacy format)\n */\nconst LegacyLabelsFormat = z.record(z.string(), z.array(z.object({ name: z.string() })))\n\nconst RichTextLabelsSchema: z.ZodMiniType<string[]> = z.pipe(\n\tz.union([\n\t\tz.pipe(\n\t\t\tz.null(),\n\t\t\tz.transform(() => [] as string[]),\n\t\t),\n\t\tz.pipe(\n\t\t\tz.string(),\n\t\t\tz.transform((s: string) => [s]),\n\t\t),\n\t\tz.array(z.string()),\n\t\tz.pipe(\n\t\t\tLegacyLabelsFormat,\n\t\t\tz.transform((obj: Record<string, Array<{ name: string }>>) => {\n\t\t\t\tconst entries = Object.entries(obj)\n\t\t\t\tif (!entries.length) return [] as string[]\n\n\t\t\t\t// Handle legacy format with empty key\n\t\t\t\tif (obj[\"\"]) {\n\t\t\t\t\treturn obj[\"\"].map((l: { name: string }) => l.name)\n\t\t\t\t}\n\n\t\t\t\t// Convert all entries to flat array of names\n\t\t\t\treturn entries\n\t\t\t\t\t.reduce<string[]>((acc, [, labelsEntries]) => {\n\t\t\t\t\t\treturn acc.concat(labelsEntries.map((l: { name: string }) => l.name))\n\t\t\t\t\t}, [])\n\t\t\t\t\t.filter(Boolean)\n\t\t\t}),\n\t\t),\n\t]),\n\tz.transform((result: string[]) => result as string[]),\n)\n\nconst RichTextConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tplaceholder: z.optional(z.string()),\n\tuseAsTitle: z.optional(z.boolean()),\n\tsingle: z.optional(RichTextOptionsSchema),\n\tmulti: z.optional(RichTextOptionsSchema),\n\timageConstraint: z.optional(ImageConstraintSchema),\n\tlabels: z.optional(RichTextLabelsSchema),\n\tallowTargetBlank: z.optional(z.boolean()),\n})\n\nexport const RichTextModelSchema = z.object({\n\ttype: z.literal(RichTextFieldType),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(RichTextConfigSchema),\n})\n\nexport type RichTextModel = z.infer<typeof RichTextModelSchema>\n"],"mappings":";;;AAIA,MAAa,oBAAoB;AAEjC,MAAa,iBAAiB;AAE9B,MAAa,wBAAwB;CACpC,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,WAAW;CACX,cAAc;CACd,aAAa;CACb,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,QAAQ;CACR,IAAI;CACJ,KAAK;CACL;AAKD,MAAM,mBAAmB,OAAO,OAAO,sBAAsB;;;;;AAM7D,MAAM,wBAAwB,EAAE,KAC/B,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC,EAC/B,EAAE,WAAW,MAAqB;AACjC,KAAI,CAAC,EAAG,QAAO;CAEf,MAAM,WADU,EAAE,MAAM,IAAI,CAAC,KAAK,MAAc,EAAE,MAAM,CAAC,CAChC,QAAQ,MAChC,iBAAiB,SAAS,EAAuC,CACjE;AACD,QAAO,SAAS,SAAS,SAAS,KAAK,IAAI,GAAG;EAC7C,CACF;;;;;;;;AASD,MAAM,qBAAqB,EAAE,OAAO,EAAE,QAAQ,EAAE,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