@prismicio/types-internal 3.17.0 → 4.0.0-canary.4689e2d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -20
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/common/asset.d.ts +22 -0
- package/dist/common/asset.d.ts.map +1 -0
- package/dist/common/asset.js +21 -0
- package/dist/common/asset.js.map +1 -0
- package/dist/common/embed.d.ts +21 -0
- package/dist/common/embed.d.ts.map +1 -0
- package/dist/common/embed.js +20 -0
- package/dist/common/embed.js.map +1 -0
- package/dist/common/hexaColorCode.d.ts +8 -0
- package/dist/common/hexaColorCode.d.ts.map +1 -0
- package/dist/common/hexaColorCode.js +8 -0
- package/dist/common/hexaColorCode.js.map +1 -0
- package/dist/common/nonEmptyString.d.ts +8 -0
- package/dist/common/nonEmptyString.d.ts.map +1 -0
- package/dist/common/nonEmptyString.js +7 -0
- package/dist/common/nonEmptyString.js.map +1 -0
- package/dist/common/widgetKey.d.ts +8 -0
- package/dist/common/widgetKey.d.ts.map +1 -0
- package/dist/common/widgetKey.js +8 -0
- package/dist/common/widgetKey.js.map +1 -0
- package/dist/content/boolean.d.ts +11 -0
- package/dist/content/boolean.d.ts.map +1 -0
- package/dist/content/boolean.js +11 -0
- package/dist/content/boolean.js.map +1 -0
- package/dist/content/codec/boolean.js +31 -0
- package/dist/content/codec/boolean.js.map +1 -0
- package/dist/content/codec/document.js +49 -0
- package/dist/content/codec/document.js.map +1 -0
- package/dist/content/codec/embed.js +42 -0
- package/dist/content/codec/embed.js.map +1 -0
- package/dist/content/codec/empty.js +35 -0
- package/dist/content/codec/empty.js.map +1 -0
- package/dist/content/codec/field.js +41 -0
- package/dist/content/codec/field.js.map +1 -0
- package/dist/content/codec/geopoint.js +32 -0
- package/dist/content/codec/geopoint.js.map +1 -0
- package/dist/content/codec/group.js +127 -0
- package/dist/content/codec/group.js.map +1 -0
- package/dist/content/codec/image.js +44 -0
- package/dist/content/codec/image.js.map +1 -0
- package/dist/content/codec/integrationField.js +31 -0
- package/dist/content/codec/integrationField.js.map +1 -0
- package/dist/content/codec/legacyContentCtx.d.ts +50 -0
- package/dist/content/codec/legacyContentCtx.d.ts.map +1 -0
- package/dist/content/codec/legacyContentCtx.js +68 -0
- package/dist/content/codec/legacyContentCtx.js.map +1 -0
- package/dist/content/codec/link.js +93 -0
- package/dist/content/codec/link.js.map +1 -0
- package/dist/content/codec/nestable.js +91 -0
- package/dist/content/codec/nestable.js.map +1 -0
- package/dist/content/codec/repeatable.js +56 -0
- package/dist/content/codec/repeatable.js.map +1 -0
- package/dist/content/codec/richText.js +87 -0
- package/dist/content/codec/richText.js.map +1 -0
- package/dist/content/codec/separator.js +26 -0
- package/dist/content/codec/separator.js.map +1 -0
- package/dist/content/codec/slice.js +220 -0
- package/dist/content/codec/slice.js.map +1 -0
- package/dist/content/codec/slices.js +106 -0
- package/dist/content/codec/slices.js.map +1 -0
- package/dist/content/codec/table.js +56 -0
- package/dist/content/codec/table.js.map +1 -0
- package/dist/content/codec/uid.js +31 -0
- package/dist/content/codec/uid.js.map +1 -0
- package/dist/content/codec/widget.js +39 -0
- package/dist/content/codec/widget.js.map +1 -0
- package/dist/content/document.d.ts +9 -0
- package/dist/content/document.d.ts.map +1 -0
- package/dist/content/document.js +9 -0
- package/dist/content/document.js.map +1 -0
- package/dist/content/embed.d.ts +24 -0
- package/dist/content/embed.d.ts.map +1 -0
- package/dist/content/embed.js +12 -0
- package/dist/content/embed.js.map +1 -0
- package/dist/content/empty.d.ts +11 -0
- package/dist/content/empty.d.ts.map +1 -0
- package/dist/content/empty.js +11 -0
- package/dist/content/empty.js.map +1 -0
- package/dist/content/field.d.ts +49 -0
- package/dist/content/field.d.ts.map +1 -0
- package/dist/content/field.js +52 -0
- package/dist/content/field.js.map +1 -0
- package/dist/content/geopoint.d.ts +14 -0
- package/dist/content/geopoint.d.ts.map +1 -0
- package/dist/content/geopoint.js +9 -0
- package/dist/content/geopoint.js.map +1 -0
- package/dist/content/group.d.ts +19 -0
- package/dist/content/group.d.ts.map +1 -0
- package/dist/content/group.js +19 -0
- package/dist/content/group.js.map +1 -0
- package/dist/content/image.d.ts +54 -0
- package/dist/content/image.d.ts.map +1 -0
- package/dist/content/image.js +10 -0
- package/dist/content/image.js.map +1 -0
- package/dist/content/integrationField.d.ts +11 -0
- package/dist/content/integrationField.d.ts.map +1 -0
- package/dist/content/integrationField.js +11 -0
- package/dist/content/integrationField.js.map +1 -0
- package/dist/content/legacy/boolean.d.ts +1 -0
- package/dist/content/legacy/boolean.js +7 -0
- package/dist/content/legacy/boolean.js.map +1 -0
- package/dist/content/legacy/document.d.ts +8 -0
- package/dist/content/legacy/document.d.ts.map +1 -0
- package/dist/content/legacy/document.js +15 -0
- package/dist/content/legacy/document.js.map +1 -0
- package/dist/content/legacy/embed.d.ts +1 -0
- package/dist/content/legacy/embed.js +23 -0
- package/dist/content/legacy/embed.js.map +1 -0
- package/dist/content/legacy/empty.d.ts +1 -0
- package/dist/content/legacy/empty.js +7 -0
- package/dist/content/legacy/empty.js.map +1 -0
- package/dist/content/legacy/field.d.ts +1 -0
- package/dist/content/legacy/field.js +7 -0
- package/dist/content/legacy/field.js.map +1 -0
- package/dist/content/legacy/geopoint.d.ts +1 -0
- package/dist/content/legacy/geopoint.js +10 -0
- package/dist/content/legacy/geopoint.js.map +1 -0
- package/dist/content/legacy/group.d.ts +9 -0
- package/dist/content/legacy/group.d.ts.map +1 -0
- package/dist/content/legacy/group.js +10 -0
- package/dist/content/legacy/group.js.map +1 -0
- package/dist/content/legacy/image.d.ts +28 -0
- package/dist/content/legacy/image.d.ts.map +1 -0
- package/dist/content/legacy/image.js +33 -0
- package/dist/content/legacy/image.js.map +1 -0
- package/dist/content/legacy/integrationField.d.ts +1 -0
- package/dist/content/legacy/integrationField.js +7 -0
- package/dist/content/legacy/integrationField.js.map +1 -0
- package/dist/content/legacy/link.d.ts +41 -0
- package/dist/content/legacy/link.d.ts.map +1 -0
- package/dist/content/legacy/link.js +88 -0
- package/dist/content/legacy/link.js.map +1 -0
- package/dist/content/legacy/nestable.d.ts +1 -0
- package/dist/content/legacy/nestable.js +32 -0
- package/dist/content/legacy/nestable.js.map +1 -0
- package/dist/content/legacy/repeatable.d.ts +1 -0
- package/dist/content/legacy/repeatable.js +7 -0
- package/dist/content/legacy/repeatable.js.map +1 -0
- package/dist/content/legacy/richText.d.ts +110 -0
- package/dist/content/legacy/richText.d.ts.map +1 -0
- package/dist/content/legacy/richText.js +100 -0
- package/dist/content/legacy/richText.js.map +1 -0
- package/dist/content/legacy/separator.d.ts +1 -0
- package/dist/content/legacy/separator.js +7 -0
- package/dist/content/legacy/separator.js.map +1 -0
- package/dist/content/legacy/slice.js +22 -0
- package/dist/content/legacy/slice.js.map +1 -0
- package/dist/content/legacy/slices.js +13 -0
- package/dist/content/legacy/slices.js.map +1 -0
- package/dist/content/legacy/table.d.ts +1 -0
- package/dist/content/legacy/table.js +19 -0
- package/dist/content/legacy/table.js.map +1 -0
- package/dist/content/legacy/uid.js +7 -0
- package/dist/content/legacy/uid.js.map +1 -0
- package/dist/content/link.d.ts +140 -0
- package/dist/content/link.d.ts.map +1 -0
- package/dist/content/link.js +53 -0
- package/dist/content/link.js.map +1 -0
- package/dist/content/nestable.d.ts +19 -0
- package/dist/content/nestable.d.ts.map +1 -0
- package/dist/content/nestable.js +56 -0
- package/dist/content/nestable.js.map +1 -0
- package/dist/content/repeatable.d.ts +32 -0
- package/dist/content/repeatable.d.ts.map +1 -0
- package/dist/content/repeatable.js +17 -0
- package/dist/content/repeatable.js.map +1 -0
- package/dist/content/richText.d.ts +91 -0
- package/dist/content/richText.d.ts.map +1 -0
- package/dist/content/richText.js +24 -0
- package/dist/content/richText.js.map +1 -0
- package/dist/content/separator.d.ts +10 -0
- package/dist/content/separator.d.ts.map +1 -0
- package/dist/content/separator.js +8 -0
- package/dist/content/separator.js.map +1 -0
- package/dist/content/slice.d.ts +24 -0
- package/dist/content/slice.d.ts.map +1 -0
- package/dist/content/slice.js +27 -0
- package/dist/content/slice.js.map +1 -0
- package/dist/content/slices.d.ts +56 -0
- package/dist/content/slices.d.ts.map +1 -0
- package/dist/content/slices.js +24 -0
- package/dist/content/slices.js.map +1 -0
- package/dist/content/table.d.ts +21 -0
- package/dist/content/table.d.ts.map +1 -0
- package/dist/content/table.js +13 -0
- package/dist/content/table.js.map +1 -0
- package/dist/content/uid.d.ts +11 -0
- package/dist/content/uid.d.ts.map +1 -0
- package/dist/content/uid.js +11 -0
- package/dist/content/uid.js.map +1 -0
- package/dist/content/widget.d.ts +11 -0
- package/dist/content/widget.d.ts.map +1 -0
- package/dist/content/widget.js +16 -0
- package/dist/content/widget.js.map +1 -0
- package/dist/helpers/contentPath.d.ts +15 -0
- package/dist/helpers/contentPath.d.ts.map +1 -0
- package/dist/helpers/contentPath.js +30 -0
- package/dist/helpers/contentPath.js.map +1 -0
- package/dist/helpers/customTypeModel.d.ts +15 -0
- package/dist/helpers/customTypeModel.d.ts.map +1 -0
- package/dist/helpers/customTypeModel.js +85 -0
- package/dist/helpers/customTypeModel.js.map +1 -0
- package/dist/helpers/documentContent.d.ts +20 -0
- package/dist/helpers/documentContent.d.ts.map +1 -0
- package/dist/helpers/documentContent.js +64 -0
- package/dist/helpers/documentContent.js.map +1 -0
- package/dist/helpers/imageContent.d.ts +33 -0
- package/dist/helpers/imageContent.d.ts.map +1 -0
- package/dist/helpers/imageContent.js +55 -0
- package/dist/helpers/imageContent.js.map +1 -0
- package/dist/helpers/sliceContent.d.ts +12 -0
- package/dist/helpers/sliceContent.d.ts.map +1 -0
- package/dist/helpers/sliceContent.js +60 -0
- package/dist/helpers/sliceContent.js.map +1 -0
- package/dist/helpers/traverseContent.d.ts +84 -0
- package/dist/helpers/traverseContent.d.ts.map +1 -0
- package/dist/helpers/traverseContent.js +376 -0
- package/dist/helpers/traverseContent.js.map +1 -0
- package/dist/helpers/traverseContentWithModel.d.ts +84 -0
- package/dist/helpers/traverseContentWithModel.d.ts.map +1 -0
- package/dist/helpers/traverseContentWithModel.js +388 -0
- package/dist/helpers/traverseContentWithModel.js.map +1 -0
- package/dist/helpers/withDefaultContent.d.ts +21 -0
- package/dist/helpers/withDefaultContent.d.ts.map +1 -0
- package/dist/helpers/withDefaultContent.js +120 -0
- package/dist/helpers/withDefaultContent.js.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +14 -0
- package/dist/io-ts.d.ts +4792 -0
- package/dist/io-ts.d.ts.map +1 -0
- package/dist/io-ts.js +224 -0
- package/dist/io-ts.js.map +1 -0
- package/dist/model/boolean.d.ts +16 -0
- package/dist/model/boolean.d.ts.map +1 -0
- package/dist/model/boolean.js +16 -0
- package/dist/model/boolean.js.map +1 -0
- package/dist/model/color.d.ts +15 -0
- package/dist/model/color.d.ts.map +1 -0
- package/dist/model/color.js +15 -0
- package/dist/model/color.js.map +1 -0
- package/dist/model/customType.d.ts +31 -0
- package/dist/model/customType.d.ts.map +1 -0
- package/dist/model/customType.js +18 -0
- package/dist/model/customType.js.map +1 -0
- package/dist/model/date.d.ts +16 -0
- package/dist/model/date.d.ts.map +1 -0
- package/dist/model/date.js +16 -0
- package/dist/model/date.js.map +1 -0
- package/dist/model/embed.d.ts +16 -0
- package/dist/model/embed.d.ts.map +1 -0
- package/dist/model/embed.js +16 -0
- package/dist/model/embed.js.map +1 -0
- package/dist/model/geopoint.d.ts +14 -0
- package/dist/model/geopoint.d.ts.map +1 -0
- package/dist/model/geopoint.js +12 -0
- package/dist/model/geopoint.js.map +1 -0
- package/dist/model/group.d.ts +567 -0
- package/dist/model/group.d.ts.map +1 -0
- package/dist/model/group.js +23 -0
- package/dist/model/group.js.map +1 -0
- package/dist/model/image.d.ts +24 -0
- package/dist/model/image.d.ts.map +1 -0
- package/dist/model/image.js +41 -0
- package/dist/model/image.js.map +1 -0
- package/dist/model/integrationField.d.ts +16 -0
- package/dist/model/integrationField.d.ts.map +1 -0
- package/dist/model/integrationField.js +16 -0
- package/dist/model/integrationField.js.map +1 -0
- package/dist/model/link.d.ts +48 -0
- package/dist/model/link.d.ts.map +1 -0
- package/dist/model/link.js +94 -0
- package/dist/model/link.js.map +1 -0
- package/dist/model/nestable.d.ts +23 -0
- package/dist/model/nestable.d.ts.map +1 -0
- package/dist/model/nestable.js +40 -0
- package/dist/model/nestable.js.map +1 -0
- package/dist/model/number.d.ts +18 -0
- package/dist/model/number.d.ts.map +1 -0
- package/dist/model/number.js +19 -0
- package/dist/model/number.js.map +1 -0
- package/dist/model/range.d.ts +18 -0
- package/dist/model/range.d.ts.map +1 -0
- package/dist/model/range.js +19 -0
- package/dist/model/range.js.map +1 -0
- package/dist/model/richText.d.ts +43 -0
- package/dist/model/richText.d.ts.map +1 -0
- package/dist/model/richText.js +73 -0
- package/dist/model/richText.js.map +1 -0
- package/dist/model/section.d.ts +11 -0
- package/dist/model/section.d.ts.map +1 -0
- package/dist/model/section.js +10 -0
- package/dist/model/section.js.map +1 -0
- package/dist/model/select.d.ts +17 -0
- package/dist/model/select.d.ts.map +1 -0
- package/dist/model/select.js +22 -0
- package/dist/model/select.js.map +1 -0
- package/dist/model/separator.d.ts +13 -0
- package/dist/model/separator.d.ts.map +1 -0
- package/dist/model/separator.js +11 -0
- package/dist/model/separator.js.map +1 -0
- package/dist/model/slice.d.ts +2084 -0
- package/dist/model/slice.d.ts.map +1 -0
- package/dist/model/slice.js +68 -0
- package/dist/model/slice.js.map +1 -0
- package/dist/model/slices.d.ts +33 -0
- package/dist/model/slices.d.ts.map +1 -0
- package/dist/model/slices.js +29 -0
- package/dist/model/slices.js.map +1 -0
- package/dist/model/table.d.ts +14 -0
- package/dist/model/table.d.ts.map +1 -0
- package/dist/model/table.js +22 -0
- package/dist/model/table.js.map +1 -0
- package/dist/model/text.d.ts +16 -0
- package/dist/model/text.d.ts.map +1 -0
- package/dist/model/text.js +16 -0
- package/dist/model/text.js.map +1 -0
- package/dist/model/timestamp.d.ts +16 -0
- package/dist/model/timestamp.d.ts.map +1 -0
- package/dist/model/timestamp.js +16 -0
- package/dist/model/timestamp.js.map +1 -0
- package/dist/model/uid.d.ts +16 -0
- package/dist/model/uid.d.ts.map +1 -0
- package/dist/model/uid.js +16 -0
- package/dist/model/uid.js.map +1 -0
- package/dist/model/widget.d.ts +58 -0
- package/dist/model/widget.d.ts.map +1 -0
- package/dist/model/widget.js +50 -0
- package/dist/model/widget.js.map +1 -0
- package/dist/zod4.d.ts +2840 -0
- package/dist/zod4.d.ts.map +1 -0
- package/dist/zod4.js +136 -0
- package/dist/zod4.js.map +1 -0
- package/package.json +62 -58
- package/src/common/asset.ts +29 -0
- package/src/common/embed.ts +27 -0
- package/src/common/hexaColorCode.ts +11 -0
- package/src/common/nonEmptyString.ts +9 -0
- package/src/common/widgetKey.ts +11 -0
- package/src/content/boolean.ts +10 -0
- package/src/content/codec/boolean.ts +38 -0
- package/src/content/codec/document.ts +60 -0
- package/src/content/codec/embed.ts +55 -0
- package/src/content/codec/empty.ts +49 -0
- package/src/content/codec/field.ts +96 -0
- package/src/content/codec/geopoint.ts +40 -0
- package/src/content/codec/group.ts +163 -0
- package/src/content/codec/image.ts +50 -0
- package/src/content/codec/integrationField.ts +38 -0
- package/src/content/{LegacyContentCtx.ts → codec/legacyContentCtx.ts} +17 -17
- package/src/content/codec/link.ts +103 -0
- package/src/content/codec/nestable.ts +146 -0
- package/src/content/codec/repeatable.ts +68 -0
- package/src/content/codec/richText.ts +117 -0
- package/src/content/codec/separator.ts +33 -0
- package/src/content/codec/slice.ts +276 -0
- package/src/content/codec/slices.ts +130 -0
- package/src/content/codec/table.ts +65 -0
- package/src/content/codec/uid.ts +36 -0
- package/src/content/codec/widget.ts +58 -0
- package/src/content/document.ts +8 -0
- package/src/content/embed.ts +12 -0
- package/src/content/empty.ts +10 -0
- package/src/content/field.ts +80 -0
- package/src/content/geopoint.ts +11 -0
- package/src/content/group.ts +46 -0
- package/src/content/image.ts +15 -0
- package/src/content/integrationField.ts +10 -0
- package/src/content/legacy/boolean.ts +5 -0
- package/src/content/legacy/document.ts +25 -0
- package/src/content/legacy/embed.ts +23 -0
- package/src/content/legacy/empty.ts +10 -0
- package/src/content/legacy/field.ts +8 -0
- package/src/content/legacy/geopoint.ts +10 -0
- package/src/content/legacy/group.ts +23 -0
- package/src/content/legacy/image.ts +43 -0
- package/src/content/legacy/integrationField.ts +5 -0
- package/src/content/legacy/link.ts +194 -0
- package/src/content/legacy/nestable.ts +55 -0
- package/src/content/legacy/repeatable.ts +7 -0
- package/src/content/legacy/richText.ts +200 -0
- package/src/content/legacy/separator.ts +6 -0
- package/src/content/legacy/slice.ts +38 -0
- package/src/content/legacy/slices.ts +17 -0
- package/src/content/legacy/table.ts +39 -0
- package/src/content/legacy/uid.ts +6 -0
- package/src/content/legacy/widget.ts +19 -0
- package/src/content/link.ts +165 -0
- package/src/content/nestable.ts +107 -0
- package/src/content/repeatable.ts +21 -0
- package/src/content/richText.ts +60 -0
- package/src/content/separator.ts +9 -0
- package/src/content/slice.ts +41 -0
- package/src/content/slices.ts +57 -0
- package/src/content/table.ts +14 -0
- package/src/content/uid.ts +10 -0
- package/src/content/widget.ts +21 -0
- package/src/helpers/contentPath.ts +35 -0
- package/src/helpers/customTypeModel.ts +113 -0
- package/src/helpers/documentContent.ts +108 -0
- package/src/helpers/imageContent.ts +84 -0
- package/src/helpers/sliceContent.ts +86 -0
- package/src/helpers/traverseContent.ts +597 -0
- package/src/helpers/traverseContentWithModel.ts +616 -0
- package/src/helpers/withDefaultContent.ts +180 -0
- package/src/index.ts +136 -0
- package/src/io-ts.ts +363 -0
- package/src/model/boolean.ts +15 -0
- package/src/model/color.ts +14 -0
- package/src/model/customType.ts +26 -0
- package/src/model/date.ts +15 -0
- package/src/model/diff/index.ts +4 -0
- package/src/{customtypes/diff/SharedSlice.ts → model/diff/sharedSlice.ts} +16 -18
- package/src/model/diff/utils.ts +45 -0
- package/src/model/diff/variation.ts +155 -0
- package/src/model/diff/widgets.ts +15 -0
- package/src/model/embed.ts +15 -0
- package/src/model/geopoint.ts +13 -0
- package/src/model/group.ts +39 -0
- package/src/model/image.ts +54 -0
- package/src/model/integrationField.ts +15 -0
- package/src/model/link.ts +141 -0
- package/src/model/nestable.ts +71 -0
- package/src/model/number.ts +26 -0
- package/src/model/range.ts +26 -0
- package/src/model/richText.ts +109 -0
- package/src/model/section.ts +12 -0
- package/src/model/select.ts +30 -0
- package/src/model/separator.ts +12 -0
- package/src/model/slice.ts +131 -0
- package/src/model/slices.ts +54 -0
- package/src/model/table.ts +29 -0
- package/src/model/text.ts +15 -0
- package/src/model/timestamp.ts +15 -0
- package/src/model/uid.ts +15 -0
- package/src/model/widget.ts +67 -0
- package/src/zod4.ts +199 -0
- package/lib/common/Asset.d.ts +0 -16
- package/lib/common/Asset.js +0 -11
- package/lib/common/Embed.d.ts +0 -15
- package/lib/common/Embed.js +0 -10
- package/lib/common/HexaColorCode.d.ts +0 -4
- package/lib/common/HexaColorCode.js +0 -7
- package/lib/common/UUID.d.ts +0 -6
- package/lib/common/UUID.js +0 -8
- package/lib/common/WidgetKey.d.ts +0 -3
- package/lib/common/WidgetKey.js +0 -8
- package/lib/common/index.d.ts +0 -3
- package/lib/common/index.js +0 -6
- package/lib/content/Document.d.ts +0 -11813
- package/lib/content/Document.js +0 -364
- package/lib/content/LegacyContentCtx.d.ts +0 -64
- package/lib/content/LegacyContentCtx.js +0 -130
- package/lib/content/fields/EmptyContent.d.ts +0 -16
- package/lib/content/fields/EmptyContent.js +0 -30
- package/lib/content/fields/GroupContent.d.ts +0 -53
- package/lib/content/fields/GroupContent.js +0 -307
- package/lib/content/fields/UIDContent.d.ts +0 -16
- package/lib/content/fields/UIDContent.js +0 -25
- package/lib/content/fields/WidgetContent.d.ts +0 -11749
- package/lib/content/fields/WidgetContent.js +0 -57
- package/lib/content/fields/index.d.ts +0 -6
- package/lib/content/fields/index.js +0 -9
- package/lib/content/fields/nestable/BooleanContent.d.ts +0 -18
- package/lib/content/fields/nestable/BooleanContent.js +0 -35
- package/lib/content/fields/nestable/EmbedContent.d.ts +0 -78
- package/lib/content/fields/nestable/EmbedContent.js +0 -56
- package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +0 -18
- package/lib/content/fields/nestable/FieldContent/ColorContent.js +0 -35
- package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +0 -18
- package/lib/content/fields/nestable/FieldContent/DateContent.js +0 -35
- package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +0 -18
- package/lib/content/fields/nestable/FieldContent/NumberContent.js +0 -35
- package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +0 -18
- package/lib/content/fields/nestable/FieldContent/RangeContent.js +0 -35
- package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +0 -20
- package/lib/content/fields/nestable/FieldContent/SelectContent.js +0 -46
- package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +0 -18
- package/lib/content/fields/nestable/FieldContent/TextContent.js +0 -35
- package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +0 -18
- package/lib/content/fields/nestable/FieldContent/TimestampContent.js +0 -35
- package/lib/content/fields/nestable/FieldContent/common.d.ts +0 -1
- package/lib/content/fields/nestable/FieldContent/common.js +0 -4
- package/lib/content/fields/nestable/FieldContent/index.d.ts +0 -49
- package/lib/content/fields/nestable/FieldContent/index.js +0 -38
- package/lib/content/fields/nestable/GeoPointContent.d.ts +0 -33
- package/lib/content/fields/nestable/GeoPointContent.js +0 -31
- package/lib/content/fields/nestable/ImageContent.d.ts +0 -252
- package/lib/content/fields/nestable/ImageContent.js +0 -122
- package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +0 -16
- package/lib/content/fields/nestable/IntegrationFieldContent.js +0 -28
- package/lib/content/fields/nestable/LinkContent.d.ts +0 -919
- package/lib/content/fields/nestable/LinkContent.js +0 -399
- package/lib/content/fields/nestable/NestableContent.d.ts +0 -1953
- package/lib/content/fields/nestable/NestableContent.js +0 -167
- package/lib/content/fields/nestable/RepeatableContent.d.ts +0 -182
- package/lib/content/fields/nestable/RepeatableContent.js +0 -146
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +0 -1261
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +0 -170
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +0 -1004
- package/lib/content/fields/nestable/RichTextContent/index.js +0 -28
- package/lib/content/fields/nestable/SeparatorContent.d.ts +0 -13
- package/lib/content/fields/nestable/SeparatorContent.js +0 -22
- package/lib/content/fields/nestable/TableContent.d.ts +0 -776
- package/lib/content/fields/nestable/TableContent.js +0 -167
- package/lib/content/fields/nestable/index.d.ts +0 -12
- package/lib/content/fields/nestable/index.js +0 -15
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +0 -3934
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +0 -195
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +0 -774
- package/lib/content/fields/slices/Slice/RepeatableContent.js +0 -21
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +0 -3937
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +0 -215
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +0 -1962
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +0 -130
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +0 -1952
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.js +0 -30
- package/lib/content/fields/slices/Slice/index.d.ts +0 -6810
- package/lib/content/fields/slices/Slice/index.js +0 -45
- package/lib/content/fields/slices/SliceItem.d.ts +0 -6846
- package/lib/content/fields/slices/SliceItem.js +0 -116
- package/lib/content/fields/slices/SlicesContent.d.ts +0 -9827
- package/lib/content/fields/slices/SlicesContent.js +0 -465
- package/lib/content/fields/slices/index.d.ts +0 -3
- package/lib/content/fields/slices/index.js +0 -6
- package/lib/content/fields/withDefaultValues.d.ts +0 -9
- package/lib/content/fields/withDefaultValues.js +0 -79
- package/lib/content/helpers.d.ts +0 -9
- package/lib/content/helpers.js +0 -22
- package/lib/content/index.d.ts +0 -4
- package/lib/content/index.js +0 -7
- package/lib/content/utils.d.ts +0 -50
- package/lib/content/utils.js +0 -35
- package/lib/customtypes/CustomType.d.ts +0 -3680
- package/lib/customtypes/CustomType.js +0 -184
- package/lib/customtypes/Section.d.ts +0 -3635
- package/lib/customtypes/Section.js +0 -66
- package/lib/customtypes/diff/Changes.d.ts +0 -17
- package/lib/customtypes/diff/Changes.js +0 -9
- package/lib/customtypes/diff/SharedSlice.d.ts +0 -1624
- package/lib/customtypes/diff/SharedSlice.js +0 -55
- package/lib/customtypes/diff/Variation.d.ts +0 -1605
- package/lib/customtypes/diff/Variation.js +0 -113
- package/lib/customtypes/diff/Widgets.d.ts +0 -11
- package/lib/customtypes/diff/Widgets.js +0 -2
- package/lib/customtypes/diff/index.d.ts +0 -4
- package/lib/customtypes/diff/index.js +0 -7
- package/lib/customtypes/index.d.ts +0 -4
- package/lib/customtypes/index.js +0 -7
- package/lib/customtypes/widgets/Group.d.ts +0 -1352
- package/lib/customtypes/widgets/Group.js +0 -92
- package/lib/customtypes/widgets/UID.d.ts +0 -19
- package/lib/customtypes/widgets/UID.js +0 -21
- package/lib/customtypes/widgets/Widget.d.ts +0 -4457
- package/lib/customtypes/widgets/Widget.js +0 -49
- package/lib/customtypes/widgets/index.d.ts +0 -6
- package/lib/customtypes/widgets/index.js +0 -9
- package/lib/customtypes/widgets/nestable/BooleanField.d.ts +0 -20
- package/lib/customtypes/widgets/nestable/BooleanField.js +0 -21
- package/lib/customtypes/widgets/nestable/Color.d.ts +0 -17
- package/lib/customtypes/widgets/nestable/Color.js +0 -20
- package/lib/customtypes/widgets/nestable/Date.d.ts +0 -19
- package/lib/customtypes/widgets/nestable/Date.js +0 -21
- package/lib/customtypes/widgets/nestable/Embed.d.ts +0 -19
- package/lib/customtypes/widgets/nestable/Embed.js +0 -21
- package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +0 -15
- package/lib/customtypes/widgets/nestable/GeoPoint.js +0 -19
- package/lib/customtypes/widgets/nestable/Image.d.ts +0 -44
- package/lib/customtypes/widgets/nestable/Image.js +0 -29
- package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +0 -19
- package/lib/customtypes/widgets/nestable/IntegrationField.js +0 -21
- package/lib/customtypes/widgets/nestable/Link.d.ts +0 -196
- package/lib/customtypes/widgets/nestable/Link.js +0 -167
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +0 -217
- package/lib/customtypes/widgets/nestable/NestableWidget.js +0 -39
- package/lib/customtypes/widgets/nestable/Number.d.ts +0 -23
- package/lib/customtypes/widgets/nestable/Number.js +0 -24
- package/lib/customtypes/widgets/nestable/Range.d.ts +0 -23
- package/lib/customtypes/widgets/nestable/Range.js +0 -24
- package/lib/customtypes/widgets/nestable/RichText.d.ts +0 -73
- package/lib/customtypes/widgets/nestable/RichText.js +0 -131
- package/lib/customtypes/widgets/nestable/Select.d.ts +0 -21
- package/lib/customtypes/widgets/nestable/Select.js +0 -22
- package/lib/customtypes/widgets/nestable/Separator.d.ts +0 -14
- package/lib/customtypes/widgets/nestable/Separator.js +0 -18
- package/lib/customtypes/widgets/nestable/Table.d.ts +0 -21
- package/lib/customtypes/widgets/nestable/Table.js +0 -30
- package/lib/customtypes/widgets/nestable/Text.d.ts +0 -19
- package/lib/customtypes/widgets/nestable/Text.js +0 -21
- package/lib/customtypes/widgets/nestable/Timestamp.d.ts +0 -19
- package/lib/customtypes/widgets/nestable/Timestamp.js +0 -21
- package/lib/customtypes/widgets/nestable/index.d.ts +0 -17
- package/lib/customtypes/widgets/nestable/index.js +0 -20
- package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +0 -7
- package/lib/customtypes/widgets/shared/ImageConstraint.js +0 -31
- package/lib/customtypes/widgets/shared/index.d.ts +0 -1
- package/lib/customtypes/widgets/shared/index.js +0 -8
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +0 -455
- package/lib/customtypes/widgets/slices/CompositeSlice.js +0 -63
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +0 -442
- package/lib/customtypes/widgets/slices/LegacySlice.js +0 -12
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +0 -1807
- package/lib/customtypes/widgets/slices/SharedSlice.js +0 -118
- package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +0 -5
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +0 -9
- package/lib/customtypes/widgets/slices/Slice.d.ts +0 -6
- package/lib/customtypes/widgets/slices/Slice.js +0 -2
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +0 -1259
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.js +0 -10
- package/lib/customtypes/widgets/slices/Slices.d.ts +0 -5917
- package/lib/customtypes/widgets/slices/Slices.js +0 -146
- package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +0 -6
- package/lib/customtypes/widgets/slices/SlicesTypes.js +0 -11
- package/lib/customtypes/widgets/slices/index.d.ts +0 -8
- package/lib/customtypes/widgets/slices/index.js +0 -11
- package/lib/utils/Arrays.d.ts +0 -1
- package/lib/utils/Arrays.js +0 -13
- package/lib/utils/DocumentId.d.ts +0 -2
- package/lib/utils/DocumentId.js +0 -7
- package/lib/utils/Fields.d.ts +0 -6
- package/lib/utils/Fields.js +0 -2
- package/lib/utils/Objects.d.ts +0 -8
- package/lib/utils/Objects.js +0 -42
- package/lib/utils/index.d.ts +0 -4
- package/lib/utils/index.js +0 -8
- package/lib/validators/BasicTypes.d.ts +0 -10
- package/lib/validators/BasicTypes.js +0 -25
- package/lib/validators/DateFromString.d.ts +0 -3
- package/lib/validators/DateFromString.js +0 -11
- package/lib/validators/DateFromStringOrNumber.d.ts +0 -3
- package/lib/validators/DateFromStringOrNumber.js +0 -10
- package/lib/validators/DateFromTsMs.d.ts +0 -3
- package/lib/validators/DateFromTsMs.js +0 -10
- package/lib/validators/DefaultOrElse.d.ts +0 -5
- package/lib/validators/DefaultOrElse.js +0 -21
- package/lib/validators/IntFromNumber.d.ts +0 -5
- package/lib/validators/IntFromNumber.js +0 -14
- package/lib/validators/IntFromPixels.d.ts +0 -8
- package/lib/validators/IntFromPixels.js +0 -24
- package/lib/validators/NonEmptyString.d.ts +0 -3
- package/lib/validators/NonEmptyString.js +0 -6
- package/lib/validators/NonEmptyStringOrNull.d.ts +0 -3
- package/lib/validators/NonEmptyStringOrNull.js +0 -15
- package/lib/validators/NumberOrNull.d.ts +0 -3
- package/lib/validators/NumberOrNull.js +0 -6
- package/lib/validators/NumberRange.d.ts +0 -32
- package/lib/validators/NumberRange.js +0 -40
- package/lib/validators/StringFromBoolean.d.ts +0 -5
- package/lib/validators/StringFromBoolean.js +0 -10
- package/lib/validators/StringFromNumber.d.ts +0 -5
- package/lib/validators/StringFromNumber.js +0 -10
- package/lib/validators/StringOrNull.d.ts +0 -3
- package/lib/validators/StringOrNull.js +0 -6
- package/lib/validators/TrimmedString.d.ts +0 -5
- package/lib/validators/TrimmedString.js +0 -23
- package/lib/validators/function.d.ts +0 -34
- package/lib/validators/function.js +0 -100
- package/lib/validators/index.d.ts +0 -15
- package/lib/validators/index.js +0 -31
- package/src/common/Asset.ts +0 -25
- package/src/common/Embed.ts +0 -22
- package/src/common/HexaColorCode.ts +0 -11
- package/src/common/UUID.ts +0 -19
- package/src/common/WidgetKey.ts +0 -13
- package/src/common/index.ts +0 -3
- package/src/content/Document.ts +0 -539
- package/src/content/fields/EmptyContent.ts +0 -45
- package/src/content/fields/GroupContent.ts +0 -466
- package/src/content/fields/UIDContent.ts +0 -42
- package/src/content/fields/WidgetContent.ts +0 -76
- package/src/content/fields/index.ts +0 -6
- package/src/content/fields/nestable/BooleanContent.ts +0 -52
- package/src/content/fields/nestable/EmbedContent.ts +0 -74
- package/src/content/fields/nestable/FieldContent/ColorContent.ts +0 -49
- package/src/content/fields/nestable/FieldContent/DateContent.ts +0 -49
- package/src/content/fields/nestable/FieldContent/NumberContent.ts +0 -49
- package/src/content/fields/nestable/FieldContent/RangeContent.ts +0 -49
- package/src/content/fields/nestable/FieldContent/SelectContent.ts +0 -60
- package/src/content/fields/nestable/FieldContent/TextContent.ts +0 -49
- package/src/content/fields/nestable/FieldContent/TimestampContent.ts +0 -49
- package/src/content/fields/nestable/FieldContent/common.ts +0 -1
- package/src/content/fields/nestable/FieldContent/index.ts +0 -40
- package/src/content/fields/nestable/GeoPointContent.ts +0 -48
- package/src/content/fields/nestable/ImageContent.ts +0 -196
- package/src/content/fields/nestable/IntegrationFieldContent.ts +0 -51
- package/src/content/fields/nestable/LinkContent.ts +0 -651
- package/src/content/fields/nestable/NestableContent.ts +0 -241
- package/src/content/fields/nestable/RepeatableContent.ts +0 -224
- package/src/content/fields/nestable/RichTextContent/Blocks.ts +0 -238
- package/src/content/fields/nestable/RichTextContent/index.ts +0 -42
- package/src/content/fields/nestable/SeparatorContent.ts +0 -34
- package/src/content/fields/nestable/TableContent.ts +0 -234
- package/src/content/fields/nestable/index.ts +0 -12
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +0 -293
- package/src/content/fields/slices/Slice/RepeatableContent.ts +0 -29
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +0 -305
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +0 -180
- package/src/content/fields/slices/Slice/SlicePrimaryContent.ts +0 -40
- package/src/content/fields/slices/Slice/index.ts +0 -52
- package/src/content/fields/slices/SliceItem.ts +0 -184
- package/src/content/fields/slices/SlicesContent.ts +0 -677
- package/src/content/fields/slices/index.ts +0 -3
- package/src/content/fields/withDefaultValues.ts +0 -119
- package/src/content/helpers.ts +0 -25
- package/src/content/index.ts +0 -4
- package/src/content/utils.ts +0 -145
- package/src/customtypes/CustomType.ts +0 -280
- package/src/customtypes/Section.ts +0 -98
- package/src/customtypes/diff/Variation.ts +0 -167
- package/src/customtypes/diff/Widgets.ts +0 -17
- package/src/customtypes/diff/index.ts +0 -4
- package/src/customtypes/index.ts +0 -4
- package/src/customtypes/widgets/Group.ts +0 -120
- package/src/customtypes/widgets/UID.ts +0 -27
- package/src/customtypes/widgets/Widget.ts +0 -83
- package/src/customtypes/widgets/index.ts +0 -6
- package/src/customtypes/widgets/nestable/BooleanField.ts +0 -29
- package/src/customtypes/widgets/nestable/Color.ts +0 -25
- package/src/customtypes/widgets/nestable/Date.ts +0 -27
- package/src/customtypes/widgets/nestable/Embed.ts +0 -27
- package/src/customtypes/widgets/nestable/GeoPoint.ts +0 -25
- package/src/customtypes/widgets/nestable/Image.ts +0 -39
- package/src/customtypes/widgets/nestable/IntegrationField.ts +0 -26
- package/src/customtypes/widgets/nestable/Link.ts +0 -313
- package/src/customtypes/widgets/nestable/NestableWidget.ts +0 -40
- package/src/customtypes/widgets/nestable/Number.ts +0 -30
- package/src/customtypes/widgets/nestable/Range.ts +0 -30
- package/src/customtypes/widgets/nestable/RichText.ts +0 -215
- package/src/customtypes/widgets/nestable/Select.ts +0 -34
- package/src/customtypes/widgets/nestable/Separator.ts +0 -24
- package/src/customtypes/widgets/nestable/Table.ts +0 -38
- package/src/customtypes/widgets/nestable/Text.ts +0 -27
- package/src/customtypes/widgets/nestable/Timestamp.ts +0 -27
- package/src/customtypes/widgets/nestable/index.ts +0 -17
- package/src/customtypes/widgets/shared/ImageConstraint.ts +0 -41
- package/src/customtypes/widgets/shared/index.ts +0 -1
- package/src/customtypes/widgets/slices/CompositeSlice.ts +0 -79
- package/src/customtypes/widgets/slices/LegacySlice.ts +0 -15
- package/src/customtypes/widgets/slices/SharedSlice.ts +0 -152
- package/src/customtypes/widgets/slices/SharedSliceRef.ts +0 -10
- package/src/customtypes/widgets/slices/Slice.ts +0 -7
- package/src/customtypes/widgets/slices/SlicePrimaryWidget.ts +0 -12
- package/src/customtypes/widgets/slices/Slices.ts +0 -184
- package/src/customtypes/widgets/slices/SlicesTypes.ts +0 -11
- package/src/customtypes/widgets/slices/index.ts +0 -8
- package/src/utils/Arrays.ts +0 -12
- package/src/utils/DocumentId.ts +0 -8
- package/src/utils/Fields.ts +0 -4
- package/src/utils/Objects.ts +0 -53
- package/src/utils/index.ts +0 -4
- package/src/validators/BasicTypes.ts +0 -55
- package/src/validators/DateFromString.ts +0 -19
- package/src/validators/DateFromStringOrNumber.ts +0 -17
- package/src/validators/DateFromTsMs.ts +0 -17
- package/src/validators/DefaultOrElse.ts +0 -24
- package/src/validators/IntFromNumber.ts +0 -22
- package/src/validators/IntFromPixels.ts +0 -32
- package/src/validators/NonEmptyString.ts +0 -8
- package/src/validators/NonEmptyStringOrNull.ts +0 -22
- package/src/validators/NumberOrNull.ts +0 -5
- package/src/validators/NumberRange.ts +0 -51
- package/src/validators/StringFromBoolean.ts +0 -19
- package/src/validators/StringFromNumber.ts +0 -19
- package/src/validators/StringOrNull.ts +0 -5
- package/src/validators/TrimmedString.ts +0 -33
- package/src/validators/function.ts +0 -115
- package/src/validators/index.ts +0 -15
- /package/src/{customtypes/diff/Changes.ts → model/diff/changes.ts} +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from "zod/mini";
|
|
2
|
+
|
|
3
|
+
//#region src/content/link.d.ts
|
|
4
|
+
declare const FilledImageLinkContentValueSchema: z.ZodMiniObject<{
|
|
5
|
+
kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
|
|
6
|
+
id: z.ZodMiniString<string>;
|
|
7
|
+
url: z.ZodMiniString<string>;
|
|
8
|
+
height: z.ZodMiniString<string>;
|
|
9
|
+
width: z.ZodMiniString<string>;
|
|
10
|
+
size: z.ZodMiniString<string>;
|
|
11
|
+
name: z.ZodMiniString<string>;
|
|
12
|
+
date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
13
|
+
__TYPE__: z.ZodMiniLiteral<"ImageLink">;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
declare const EmptyImageLinkContentValueSchema: z.ZodMiniObject<{
|
|
16
|
+
kind: z.ZodMiniLiteral<"image">;
|
|
17
|
+
__TYPE__: z.ZodMiniLiteral<"ImageLink">;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
declare const FilledFileLinkContentValueSchema: z.ZodMiniObject<{
|
|
20
|
+
kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
|
|
21
|
+
id: z.ZodMiniString<string>;
|
|
22
|
+
url: z.ZodMiniString<string>;
|
|
23
|
+
name: z.ZodMiniString<string>;
|
|
24
|
+
size: z.ZodMiniTransform<string, unknown>;
|
|
25
|
+
date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
26
|
+
__TYPE__: z.ZodMiniLiteral<"FileLink">;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
declare const EmptyFileLinkContentValueSchema: z.ZodMiniObject<{
|
|
29
|
+
kind: z.ZodMiniLiteral<"file">;
|
|
30
|
+
__TYPE__: z.ZodMiniLiteral<"FileLink">;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
declare const EmptyMediaLinkContentValueSchema: z.ZodMiniObject<{
|
|
33
|
+
kind: z.ZodMiniLiteral<"media">;
|
|
34
|
+
__TYPE__: z.ZodMiniLiteral<"MediaLink">;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
declare const FilledDocumentLinkContentValueSchema: z.ZodMiniObject<{
|
|
37
|
+
kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
|
|
38
|
+
id: z.ZodMiniString<string>;
|
|
39
|
+
__TYPE__: z.ZodMiniLiteral<"DocumentLink">;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
declare const EmptyDocumentLinkContentValueSchema: z.ZodMiniObject<{
|
|
42
|
+
kind: z.ZodMiniLiteral<"document">;
|
|
43
|
+
__TYPE__: z.ZodMiniLiteral<"DocumentLink">;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
declare const FilledExternalLinkContentValueSchema: z.ZodMiniObject<{
|
|
46
|
+
kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
|
|
47
|
+
url: z.ZodMiniString<string>;
|
|
48
|
+
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
49
|
+
preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
|
|
50
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
|
+
}, z.core.$strict>>>;
|
|
52
|
+
__TYPE__: z.ZodMiniLiteral<"ExternalLink">;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
declare const EmptyExternalLinkContentValueSchema: z.ZodMiniObject<{
|
|
55
|
+
kind: z.ZodMiniLiteral<"web">;
|
|
56
|
+
__TYPE__: z.ZodMiniLiteral<"ExternalLink">;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
declare const AnyLinkContentValueSchema: z.ZodMiniObject<{
|
|
59
|
+
kind: z.ZodMiniTransform<"any", unknown>;
|
|
60
|
+
__TYPE__: z.ZodMiniLiteral<"AnyLink">;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
type FilledImageLinkContentValue = z.infer<typeof FilledImageLinkContentValueSchema>;
|
|
63
|
+
type FilledFileLinkContentValue = z.infer<typeof FilledFileLinkContentValueSchema>;
|
|
64
|
+
type FilledDocumentLinkContentValue = z.infer<typeof FilledDocumentLinkContentValueSchema>;
|
|
65
|
+
type FilledExternalLinkContentValue = z.infer<typeof FilledExternalLinkContentValueSchema>;
|
|
66
|
+
type FilledLinkContentValue = FilledImageLinkContentValue | FilledFileLinkContentValue | FilledDocumentLinkContentValue | FilledExternalLinkContentValue;
|
|
67
|
+
type EmptyImageLinkContentValue = z.infer<typeof EmptyImageLinkContentValueSchema>;
|
|
68
|
+
type EmptyFileLinkContentValue = z.infer<typeof EmptyFileLinkContentValueSchema>;
|
|
69
|
+
type EmptyMediaLinkContentValue = z.infer<typeof EmptyMediaLinkContentValueSchema>;
|
|
70
|
+
type EmptyDocumentLinkContentValue = z.infer<typeof EmptyDocumentLinkContentValueSchema>;
|
|
71
|
+
type EmptyExternalLinkContentValue = z.infer<typeof EmptyExternalLinkContentValueSchema>;
|
|
72
|
+
type AnyLinkContentValue = z.infer<typeof AnyLinkContentValueSchema>;
|
|
73
|
+
type EmptyLinkContentValue = EmptyImageLinkContentValue | EmptyFileLinkContentValue | EmptyMediaLinkContentValue | EmptyDocumentLinkContentValue | EmptyExternalLinkContentValue | AnyLinkContentValue;
|
|
74
|
+
type LinkContentValue = FilledLinkContentValue | EmptyLinkContentValue;
|
|
75
|
+
declare const FilledLinkContentSchema: z.ZodMiniObject<{
|
|
76
|
+
__TYPE__: z.ZodMiniLiteral<"LinkContent">;
|
|
77
|
+
key: z.ZodMiniTransform<string, unknown>;
|
|
78
|
+
value: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>, z.ZodMiniTransform<{
|
|
79
|
+
text?: unknown;
|
|
80
|
+
variant?: unknown;
|
|
81
|
+
value: Record<string, unknown>;
|
|
82
|
+
}, Record<string, unknown>>>, z.ZodMiniObject<{
|
|
83
|
+
text: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
84
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
85
|
+
value: z.ZodMiniType<FilledLinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<FilledLinkContentValue, Record<string, unknown>>>;
|
|
86
|
+
}, z.core.$strip>>, z.ZodMiniTransform<{
|
|
87
|
+
variant?: string | undefined;
|
|
88
|
+
text?: string | undefined;
|
|
89
|
+
} & FilledLinkContentValue, {
|
|
90
|
+
value: FilledLinkContentValue;
|
|
91
|
+
text?: string | undefined;
|
|
92
|
+
variant?: string | undefined;
|
|
93
|
+
}>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
type FilledLinkContent = z.infer<typeof FilledLinkContentSchema>;
|
|
96
|
+
declare const EmptyLinkContentSchema: z.ZodMiniObject<{
|
|
97
|
+
__TYPE__: z.ZodMiniLiteral<"LinkContent">;
|
|
98
|
+
key: z.ZodMiniTransform<string, unknown>;
|
|
99
|
+
value: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>, z.ZodMiniTransform<{
|
|
100
|
+
text?: unknown;
|
|
101
|
+
variant?: unknown;
|
|
102
|
+
value: Record<string, unknown>;
|
|
103
|
+
}, Record<string, unknown>>>, z.ZodMiniObject<{
|
|
104
|
+
text: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
105
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
106
|
+
value: z.ZodMiniType<EmptyLinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<EmptyLinkContentValue, Record<string, unknown>>>;
|
|
107
|
+
}, z.core.$strip>>, z.ZodMiniTransform<{
|
|
108
|
+
variant?: string | undefined;
|
|
109
|
+
text?: string | undefined;
|
|
110
|
+
} & EmptyLinkContentValue, {
|
|
111
|
+
value: EmptyLinkContentValue;
|
|
112
|
+
text?: string | undefined;
|
|
113
|
+
variant?: string | undefined;
|
|
114
|
+
}>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
type EmptyLinkContent = z.infer<typeof EmptyLinkContentSchema>;
|
|
117
|
+
declare const LinkContentSchema: z.ZodMiniObject<{
|
|
118
|
+
__TYPE__: z.ZodMiniLiteral<"LinkContent">;
|
|
119
|
+
key: z.ZodMiniTransform<string, unknown>;
|
|
120
|
+
value: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>, z.ZodMiniTransform<{
|
|
121
|
+
text?: unknown;
|
|
122
|
+
variant?: unknown;
|
|
123
|
+
value: Record<string, unknown>;
|
|
124
|
+
}, Record<string, unknown>>>, z.ZodMiniObject<{
|
|
125
|
+
text: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
126
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
127
|
+
value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
|
|
128
|
+
}, z.core.$strip>>, z.ZodMiniTransform<{
|
|
129
|
+
variant?: string | undefined;
|
|
130
|
+
text?: string | undefined;
|
|
131
|
+
} & LinkContentValue, {
|
|
132
|
+
value: LinkContentValue;
|
|
133
|
+
text?: string | undefined;
|
|
134
|
+
variant?: string | undefined;
|
|
135
|
+
}>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
type LinkContent = z.infer<typeof LinkContentSchema>;
|
|
138
|
+
//#endregion
|
|
139
|
+
export { EmptyLinkContent, EmptyLinkContentValue, FilledLinkContent, FilledLinkContentValue, LinkContent, LinkContentValue };
|
|
140
|
+
//# sourceMappingURL=link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","names":[],"sources":["../../src/content/link.ts"],"mappings":";;;cAiBM,iCAAA,EAAiC,CAAA,CAAA,aAAA;;;;;;;;;;;cAIjC,gCAAA,EAAgC,CAAA,CAAA,aAAA;;;;cAKhC,gCAAA,EAAgC,CAAA,CAAA,aAAA;;;;;;;;;cAIhC,+BAAA,EAA+B,CAAA,CAAA,aAAA;;;;cAK/B,gCAAA,EAAgC,CAAA,CAAA,aAAA;;;;cAKhC,oCAAA,EAAoC,CAAA,CAAA,aAAA;;;;;cAIpC,mCAAA,EAAmC,CAAA,CAAA,aAAA;;;;cAKnC,oCAAA,EAAoC,CAAA,CAAA,aAAA;;;;;;;;;cAIpC,mCAAA,EAAmC,CAAA,CAAA,aAAA;;;;cAKnC,yBAAA,EAAyB,CAAA,CAAA,aAAA;;;;KAe1B,2BAAA,GAA8B,CAAA,CAAE,KAAA,QAAa,iCAAA;AAAA,KAC7C,0BAAA,GAA6B,CAAA,CAAE,KAAA,QAAa,gCAAA;AAAA,KAC5C,8BAAA,GAAiC,CAAA,CAAE,KAAA,QAAa,oCAAA;AAAA,KAChD,8BAAA,GAAiC,CAAA,CAAE,KAAA,QAAa,oCAAA;AAAA,KACzC,sBAAA,GACT,2BAAA,GACA,0BAAA,GACA,8BAAA,GACA,8BAAA;AAAA,KAYE,0BAAA,GAA6B,CAAA,CAAE,KAAA,QAAa,gCAAA;AAAA,KAC5C,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,KAC3C,0BAAA,GAA6B,CAAA,CAAE,KAAA,QAAa,gCAAA;AAAA,KAC5C,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,mCAAA;AAAA,KAC/C,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,mCAAA;AAAA,KAC/C,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,KAC9B,qBAAA,GACT,0BAAA,GACA,yBAAA,GACA,0BAAA,GACA,6BAAA,GACA,6BAAA,GACA,mBAAA;AAAA,KAQS,gBAAA,GAAmB,sBAAA,GAAyB,qBAAA;AAAA,cAyC3C,uBAAA,EAAuB,CAAA,CAAA,aAAA;;;;;;WAlBtB,MAAA;EAAA;;;;;;;;;;;;;KAoBF,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,sBAAA,EAAsB,CAAA,CAAA,aAAA;;;;;;WAtBrB,MAAA;EAAA;;;;;;;;;;;;;KAwBF,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA;AAAA,cAEjC,iBAAA,EAAiB,CAAA,CAAA,aAAA;;;;;;WA1BhB,MAAA;EAAA;;;;;;;;;;;;;KA4BF,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { AnyLinkLegacySchema, EmptyDocumentLinkLegacyValueSchema, EmptyExternalLinkLegacyValueSchema, EmptyFileLinkLegacyValueSchema, EmptyImageLinkLegacyValueSchema, EmptyMediaLinkLegacyValueSchema, FilledDocumentLinkLegacyValueSchema, FilledExternalLinkLegacyValueSchema, FilledFileLinkLegacyValueSchema, FilledImageLinkLegacyValueSchema, LinkType } from "./legacy/link.js";
|
|
2
|
+
import { z } from "zod/mini";
|
|
3
|
+
//#region src/content/link.ts
|
|
4
|
+
const FilledImageLinkContentValueSchema = z.extend(FilledImageLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.Image) });
|
|
5
|
+
const EmptyImageLinkContentValueSchema = z.extend(EmptyImageLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.Image) });
|
|
6
|
+
const FilledFileLinkContentValueSchema = z.extend(FilledFileLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.File) });
|
|
7
|
+
const EmptyFileLinkContentValueSchema = z.extend(EmptyFileLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.File) });
|
|
8
|
+
const EmptyMediaLinkContentValueSchema = z.extend(EmptyMediaLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.Media) });
|
|
9
|
+
const FilledDocumentLinkContentValueSchema = z.extend(FilledDocumentLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.Document) });
|
|
10
|
+
const EmptyDocumentLinkContentValueSchema = z.extend(EmptyDocumentLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.Document) });
|
|
11
|
+
const FilledExternalLinkContentValueSchema = z.extend(FilledExternalLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.External) });
|
|
12
|
+
const EmptyExternalLinkContentValueSchema = z.extend(EmptyExternalLinkLegacyValueSchema, { __TYPE__: z.literal(LinkType.External) });
|
|
13
|
+
const AnyLinkContentValueSchema = z.extend(AnyLinkLegacySchema, { __TYPE__: z.literal(LinkType.Any) });
|
|
14
|
+
const FilledLinkContentValueSchema = z.union([
|
|
15
|
+
FilledImageLinkContentValueSchema,
|
|
16
|
+
FilledFileLinkContentValueSchema,
|
|
17
|
+
FilledDocumentLinkContentValueSchema,
|
|
18
|
+
FilledExternalLinkContentValueSchema
|
|
19
|
+
]);
|
|
20
|
+
const EmptyLinkContentValueSchema = z.union([
|
|
21
|
+
EmptyImageLinkContentValueSchema,
|
|
22
|
+
EmptyFileLinkContentValueSchema,
|
|
23
|
+
EmptyMediaLinkContentValueSchema,
|
|
24
|
+
EmptyDocumentLinkContentValueSchema,
|
|
25
|
+
EmptyExternalLinkContentValueSchema,
|
|
26
|
+
AnyLinkContentValueSchema
|
|
27
|
+
]);
|
|
28
|
+
const LinkContentValueSchema = z.union([FilledLinkContentValueSchema, EmptyLinkContentValueSchema]);
|
|
29
|
+
const LinkContentType = "LinkContent";
|
|
30
|
+
const getLinkContentSchema = (value) => z.object({
|
|
31
|
+
__TYPE__: z.literal(LinkContentType),
|
|
32
|
+
key: z.transform((value) => z.uuidv4().safeParse(value).data || crypto.randomUUID()),
|
|
33
|
+
value: z.pipe(z.pipe(z.pipe(z.record(z.string(), z.unknown()), z.transform(({ text, variant, ...value }) => ({
|
|
34
|
+
text,
|
|
35
|
+
variant,
|
|
36
|
+
value
|
|
37
|
+
}))), z.object({
|
|
38
|
+
text: z.optional(z.string()),
|
|
39
|
+
variant: z.optional(z.string()),
|
|
40
|
+
value
|
|
41
|
+
})), z.transform(({ text, variant, value }) => ({
|
|
42
|
+
...text ? { text } : {},
|
|
43
|
+
...variant ? { variant } : {},
|
|
44
|
+
...value
|
|
45
|
+
})))
|
|
46
|
+
});
|
|
47
|
+
const FilledLinkContentSchema = getLinkContentSchema(FilledLinkContentValueSchema);
|
|
48
|
+
const EmptyLinkContentSchema = getLinkContentSchema(EmptyLinkContentValueSchema);
|
|
49
|
+
const LinkContentSchema = getLinkContentSchema(LinkContentValueSchema);
|
|
50
|
+
//#endregion
|
|
51
|
+
export { EmptyLinkContentSchema, FilledLinkContentSchema, FilledLinkContentValueSchema, LinkContentSchema, LinkContentType };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","names":[],"sources":["../../src/content/link.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport {\n\tEmptyDocumentLinkLegacyValueSchema,\n\tEmptyImageLinkLegacyValueSchema,\n\tFilledDocumentLinkLegacyValueSchema,\n\tFilledFileLinkLegacyValueSchema,\n\tFilledImageLinkLegacyValueSchema,\n\tEmptyMediaLinkLegacyValueSchema,\n\tFilledExternalLinkLegacyValueSchema,\n\tEmptyExternalLinkLegacyValueSchema,\n\tAnyLinkLegacySchema,\n\tLinkType,\n\tEmptyFileLinkLegacyValueSchema,\n} from \"./legacy/link\"\n\n// Image\nconst FilledImageLinkContentValueSchema = z.extend(FilledImageLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.Image),\n})\n\nconst EmptyImageLinkContentValueSchema = z.extend(EmptyImageLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.Image),\n})\n\n// File\nconst FilledFileLinkContentValueSchema = z.extend(FilledFileLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.File),\n})\n\nconst EmptyFileLinkContentValueSchema = z.extend(EmptyFileLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.File),\n})\n\n// Media\nconst EmptyMediaLinkContentValueSchema = z.extend(EmptyMediaLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.Media),\n})\n\n// Document\nconst FilledDocumentLinkContentValueSchema = z.extend(FilledDocumentLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.Document),\n})\n\nconst EmptyDocumentLinkContentValueSchema = z.extend(EmptyDocumentLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.Document),\n})\n\n// External\nconst FilledExternalLinkContentValueSchema = z.extend(FilledExternalLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.External),\n})\n\nconst EmptyExternalLinkContentValueSchema = z.extend(EmptyExternalLinkLegacyValueSchema, {\n\t__TYPE__: z.literal(LinkType.External),\n})\n\n// Any\nconst AnyLinkContentValueSchema = z.extend(AnyLinkLegacySchema, {\n\t__TYPE__: z.literal(LinkType.Any),\n})\n\n// All\n\n// Used by content/richText\nexport const FilledLinkContentValueSchema: z.ZodMiniType<FilledLinkContentValue> = z.union([\n\tFilledImageLinkContentValueSchema,\n\tFilledFileLinkContentValueSchema,\n\tFilledDocumentLinkContentValueSchema,\n\tFilledExternalLinkContentValueSchema,\n])\n\n// Used by content/legacy/link\ntype FilledImageLinkContentValue = z.infer<typeof FilledImageLinkContentValueSchema>\ntype FilledFileLinkContentValue = z.infer<typeof FilledFileLinkContentValueSchema>\ntype FilledDocumentLinkContentValue = z.infer<typeof FilledDocumentLinkContentValueSchema>\ntype FilledExternalLinkContentValue = z.infer<typeof FilledExternalLinkContentValueSchema>\nexport type FilledLinkContentValue =\n\t| FilledImageLinkContentValue\n\t| FilledFileLinkContentValue\n\t| FilledDocumentLinkContentValue\n\t| FilledExternalLinkContentValue\n\nconst EmptyLinkContentValueSchema: z.ZodMiniType<EmptyLinkContentValue> = z.union([\n\tEmptyImageLinkContentValueSchema,\n\tEmptyFileLinkContentValueSchema,\n\tEmptyMediaLinkContentValueSchema,\n\tEmptyDocumentLinkContentValueSchema,\n\tEmptyExternalLinkContentValueSchema,\n\tAnyLinkContentValueSchema,\n])\n\n// Used by content/codec/link\ntype EmptyImageLinkContentValue = z.infer<typeof EmptyImageLinkContentValueSchema>\ntype EmptyFileLinkContentValue = z.infer<typeof EmptyFileLinkContentValueSchema>\ntype EmptyMediaLinkContentValue = z.infer<typeof EmptyMediaLinkContentValueSchema>\ntype EmptyDocumentLinkContentValue = z.infer<typeof EmptyDocumentLinkContentValueSchema>\ntype EmptyExternalLinkContentValue = z.infer<typeof EmptyExternalLinkContentValueSchema>\ntype AnyLinkContentValue = z.infer<typeof AnyLinkContentValueSchema>\nexport type EmptyLinkContentValue =\n\t| EmptyImageLinkContentValue\n\t| EmptyFileLinkContentValue\n\t| EmptyMediaLinkContentValue\n\t| EmptyDocumentLinkContentValue\n\t| EmptyExternalLinkContentValue\n\t| AnyLinkContentValue\n\nconst LinkContentValueSchema: z.ZodMiniType<LinkContentValue> = z.union([\n\tFilledLinkContentValueSchema,\n\tEmptyLinkContentValueSchema,\n])\n\n// Used by content/codec/link\nexport type LinkContentValue = FilledLinkContentValue | EmptyLinkContentValue\n\n// Content\nexport const LinkContentType = \"LinkContent\" as const\n\nconst getLinkContentSchema = <TValue extends LinkContentValue>(value: z.ZodMiniType<TValue>) =>\n\tz.object({\n\t\t__TYPE__: z.literal(LinkContentType),\n\t\tkey: z.transform((value) => z.uuidv4().safeParse(value).data || crypto.randomUUID()),\n\t\t// We cannot use z.extend here because we're working with unions.\n\t\t// z.intersection wouldn't work also for the same reason.\n\t\tvalue: z.pipe(\n\t\t\tz.pipe(\n\t\t\t\tz.pipe(\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t\tz.transform(\n\t\t\t\t\t\t({\n\t\t\t\t\t\t\ttext,\n\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t...value\n\t\t\t\t\t\t}): {\n\t\t\t\t\t\t\ttext?: unknown\n\t\t\t\t\t\t\tvariant?: unknown\n\t\t\t\t\t\t\tvalue: Record<string, unknown>\n\t\t\t\t\t\t} => ({ text, variant, value }),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tz.object({\n\t\t\t\t\ttext: z.optional(z.string()),\n\t\t\t\t\tvariant: z.optional(z.string()),\n\t\t\t\t\tvalue: value as z.ZodMiniType<TValue, Record<string, unknown>>,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tz.transform(({ text, variant, value }) => ({\n\t\t\t\t...(text ? { text } : {}),\n\t\t\t\t...(variant ? { variant } : {}),\n\t\t\t\t...value,\n\t\t\t})),\n\t\t),\n\t})\n\nexport const FilledLinkContentSchema = getLinkContentSchema(FilledLinkContentValueSchema)\n\nexport type FilledLinkContent = z.infer<typeof FilledLinkContentSchema>\n\nexport const EmptyLinkContentSchema = getLinkContentSchema(EmptyLinkContentValueSchema)\n\nexport type EmptyLinkContent = z.infer<typeof EmptyLinkContentSchema>\n\nexport const LinkContentSchema = getLinkContentSchema(LinkContentValueSchema)\n\nexport type LinkContent = z.infer<typeof LinkContentSchema>\n"],"mappings":";;;AAiBA,MAAM,oCAAoC,EAAE,OAAO,kCAAkC,EACpF,UAAU,EAAE,QAAQ,SAAS,MAAM,EACnC,CAAC;AAEF,MAAM,mCAAmC,EAAE,OAAO,iCAAiC,EAClF,UAAU,EAAE,QAAQ,SAAS,MAAM,EACnC,CAAC;AAGF,MAAM,mCAAmC,EAAE,OAAO,iCAAiC,EAClF,UAAU,EAAE,QAAQ,SAAS,KAAK,EAClC,CAAC;AAEF,MAAM,kCAAkC,EAAE,OAAO,gCAAgC,EAChF,UAAU,EAAE,QAAQ,SAAS,KAAK,EAClC,CAAC;AAGF,MAAM,mCAAmC,EAAE,OAAO,iCAAiC,EAClF,UAAU,EAAE,QAAQ,SAAS,MAAM,EACnC,CAAC;AAGF,MAAM,uCAAuC,EAAE,OAAO,qCAAqC,EAC1F,UAAU,EAAE,QAAQ,SAAS,SAAS,EACtC,CAAC;AAEF,MAAM,sCAAsC,EAAE,OAAO,oCAAoC,EACxF,UAAU,EAAE,QAAQ,SAAS,SAAS,EACtC,CAAC;AAGF,MAAM,uCAAuC,EAAE,OAAO,qCAAqC,EAC1F,UAAU,EAAE,QAAQ,SAAS,SAAS,EACtC,CAAC;AAEF,MAAM,sCAAsC,EAAE,OAAO,oCAAoC,EACxF,UAAU,EAAE,QAAQ,SAAS,SAAS,EACtC,CAAC;AAGF,MAAM,4BAA4B,EAAE,OAAO,qBAAqB,EAC/D,UAAU,EAAE,QAAQ,SAAS,IAAI,EACjC,CAAC;AAKF,MAAa,+BAAsE,EAAE,MAAM;CAC1F;CACA;CACA;CACA;CACA,CAAC;AAaF,MAAM,8BAAoE,EAAE,MAAM;CACjF;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AAiBF,MAAM,yBAA0D,EAAE,MAAM,CACvE,8BACA,4BACA,CAAC;AAMF,MAAa,kBAAkB;AAE/B,MAAM,wBAAyD,UAC9D,EAAE,OAAO;CACR,UAAU,EAAE,QAAQ,gBAAgB;CACpC,KAAK,EAAE,WAAW,UAAU,EAAE,QAAQ,CAAC,UAAU,MAAM,CAAC,QAAQ,OAAO,YAAY,CAAC;CAGpF,OAAO,EAAE,KACR,EAAE,KACD,EAAE,KACD,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,EACjC,EAAE,WACA,EACA,MACA,SACA,GAAG,aAKE;EAAE;EAAM;EAAS;EAAO,EAC9B,CACD,EACD,EAAE,OAAO;EACR,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;EAC5B,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC;EACxB;EACP,CAAC,CACF,EACD,EAAE,WAAW,EAAE,MAAM,SAAS,aAAa;EAC1C,GAAI,OAAO,EAAE,MAAM,GAAG,EAAE;EACxB,GAAI,UAAU,EAAE,SAAS,GAAG,EAAE;EAC9B,GAAG;EACH,EAAE,CACH;CACD,CAAC;AAEH,MAAa,0BAA0B,qBAAqB,6BAA6B;AAIzF,MAAa,yBAAyB,qBAAqB,4BAA4B;AAIvF,MAAa,oBAAoB,qBAAqB,uBAAuB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BooleanContent } from "./boolean.js";
|
|
2
|
+
import { EmbedContent } from "./embed.js";
|
|
3
|
+
import { EmptyContent } from "./empty.js";
|
|
4
|
+
import { ColorContent, DateContent, NumberContent, RangeContent, SelectContent, TextContent, TimestampContent } from "./field.js";
|
|
5
|
+
import { GeoPointContent } from "./geopoint.js";
|
|
6
|
+
import { ImageContent } from "./image.js";
|
|
7
|
+
import { IntegrationFieldContent } from "./integrationField.js";
|
|
8
|
+
import { LinkContent } from "./link.js";
|
|
9
|
+
import { RepeatableContent } from "./repeatable.js";
|
|
10
|
+
import { RichTextContent } from "./richText.js";
|
|
11
|
+
import { SeparatorContent } from "./separator.js";
|
|
12
|
+
import { TableContent } from "./table.js";
|
|
13
|
+
import { z } from "zod/mini";
|
|
14
|
+
|
|
15
|
+
//#region src/content/nestable.d.ts
|
|
16
|
+
type NestableContent = EmptyContent | BooleanContent | ColorContent | DateContent | EmbedContent | GeoPointContent | ImageContent | IntegrationFieldContent | LinkContent | NumberContent | RangeContent | RepeatableContent | RichTextContent | SelectContent | SeparatorContent | TableContent | TextContent | TimestampContent;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { NestableContent };
|
|
19
|
+
//# sourceMappingURL=nestable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestable.d.ts","names":[],"sources":["../../src/content/nestable.ts"],"mappings":";;;;;;;;;;;;;;;KAiEY,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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { EmbedContentSchema, EmbedContentType } from "./embed.js";
|
|
2
|
+
import { ImageContentSchema, ImageContentType } from "./image.js";
|
|
3
|
+
import { LinkContentSchema, LinkContentType } from "./link.js";
|
|
4
|
+
import { RichTextContentSchema, RichTextContentType } from "./richText.js";
|
|
5
|
+
import { BooleanContentSchema, BooleanContentType } from "./boolean.js";
|
|
6
|
+
import { EmptyContentSchema, EmptyContentType } from "./empty.js";
|
|
7
|
+
import { ColorContentSchema, DateContentSchema, FieldContentType, NumberContentSchema, RangeContentSchema, SelectContentSchema, TextContentSchema, TimestampContentSchema } from "./field.js";
|
|
8
|
+
import { GeoPointContentSchema, GeoPointContentType } from "./geopoint.js";
|
|
9
|
+
import { IntegrationFieldContentSchema, IntegrationFieldContentType } from "./integrationField.js";
|
|
10
|
+
import { RepeatableContentSchema, RepeatableContentType } from "./repeatable.js";
|
|
11
|
+
import { SeparatorContentSchema, SeparatorContentType } from "./separator.js";
|
|
12
|
+
import { TableContentSchema, TableContentType } from "./table.js";
|
|
13
|
+
import { z } from "zod/mini";
|
|
14
|
+
//#region src/content/nestable.ts
|
|
15
|
+
const NestableContentSchema = z.union([
|
|
16
|
+
EmptyContentSchema,
|
|
17
|
+
BooleanContentSchema,
|
|
18
|
+
ColorContentSchema,
|
|
19
|
+
DateContentSchema,
|
|
20
|
+
EmbedContentSchema,
|
|
21
|
+
GeoPointContentSchema,
|
|
22
|
+
ImageContentSchema,
|
|
23
|
+
IntegrationFieldContentSchema,
|
|
24
|
+
LinkContentSchema,
|
|
25
|
+
NumberContentSchema,
|
|
26
|
+
RangeContentSchema,
|
|
27
|
+
RepeatableContentSchema,
|
|
28
|
+
RichTextContentSchema,
|
|
29
|
+
SelectContentSchema,
|
|
30
|
+
SeparatorContentSchema,
|
|
31
|
+
TableContentSchema,
|
|
32
|
+
TextContentSchema,
|
|
33
|
+
TimestampContentSchema
|
|
34
|
+
]);
|
|
35
|
+
const NestableContentTypes = [
|
|
36
|
+
EmptyContentType,
|
|
37
|
+
BooleanContentType,
|
|
38
|
+
EmbedContentType,
|
|
39
|
+
FieldContentType,
|
|
40
|
+
GeoPointContentType,
|
|
41
|
+
ImageContentType,
|
|
42
|
+
IntegrationFieldContentType,
|
|
43
|
+
LinkContentType,
|
|
44
|
+
RepeatableContentType,
|
|
45
|
+
RichTextContentType,
|
|
46
|
+
SeparatorContentType,
|
|
47
|
+
TableContentType
|
|
48
|
+
];
|
|
49
|
+
/** @internal */
|
|
50
|
+
function isNestableContent(content) {
|
|
51
|
+
return NestableContentTypes.includes(content.__TYPE__);
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { NestableContentSchema, isNestableContent };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=nestable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestable.js","names":[],"sources":["../../src/content/nestable.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport type { BooleanContent } from \"./boolean\"\nimport { 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\tSelectContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n} from \"./field\"\nimport type { GeoPointContent } from \"./geopoint\"\nimport { GeoPointContentSchema, GeoPointContentType } from \"./geopoint\"\nimport type { ImageContent } from \"./image\"\nimport { ImageContentSchema, ImageContentType } from \"./image\"\nimport type { IntegrationFieldContent } from \"./integrationField\"\nimport { IntegrationFieldContentSchema, IntegrationFieldContentType } from \"./integrationField\"\nimport type { LinkContent } from \"./link\"\nimport { LinkContentSchema, LinkContentType } from \"./link\"\nimport type { RepeatableContent } from \"./repeatable\"\nimport { RepeatableContentSchema, RepeatableContentType } from \"./repeatable\"\nimport type { RichTextContent } from \"./richText\"\nimport { RichTextContentSchema, RichTextContentType } from \"./richText\"\nimport type { SeparatorContent } from \"./separator\"\nimport { SeparatorContentSchema, SeparatorContentType } from \"./separator\"\nimport type { TableContent } from \"./table\"\nimport { TableContentSchema, TableContentType } from \"./table\"\n\nexport const NestableContentSchema: z.ZodMiniType<NestableContent> = z.union([\n\tEmptyContentSchema,\n\tBooleanContentSchema,\n\tColorContentSchema,\n\tDateContentSchema,\n\tEmbedContentSchema,\n\tGeoPointContentSchema,\n\tImageContentSchema,\n\tIntegrationFieldContentSchema,\n\tLinkContentSchema,\n\tNumberContentSchema,\n\tRangeContentSchema,\n\tRepeatableContentSchema,\n\tRichTextContentSchema,\n\tSelectContentSchema,\n\tSeparatorContentSchema,\n\tTableContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n])\n\nexport type NestableContent =\n\t| EmptyContent\n\t| BooleanContent\n\t| ColorContent\n\t| DateContent\n\t| EmbedContent\n\t| GeoPointContent\n\t| ImageContent\n\t| IntegrationFieldContent\n\t| LinkContent\n\t| NumberContent\n\t| RangeContent\n\t| RepeatableContent\n\t| RichTextContent\n\t| SelectContent\n\t| SeparatorContent\n\t| TableContent\n\t| TextContent\n\t| TimestampContent\n\nconst NestableContentTypes = [\n\tEmptyContentType,\n\tBooleanContentType,\n\tEmbedContentType,\n\tFieldContentType,\n\tGeoPointContentType,\n\tImageContentType,\n\tIntegrationFieldContentType,\n\tLinkContentType,\n\tRepeatableContentType,\n\tRichTextContentType,\n\tSeparatorContentType,\n\tTableContentType,\n]\ntype NestableContentType = (typeof NestableContentTypes)[number]\n\n/** @internal */\nexport function isNestableContent(content: {\n\t__TYPE__: string\n}): content is { __TYPE__: NestableContentType } {\n\treturn (NestableContentTypes as string[]).includes(content.__TYPE__)\n}\n"],"mappings":";;;;;;;;;;;;;;AA4CA,MAAa,wBAAwD,EAAE,MAAM;CAC5E;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AAsBF,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAID,SAAgB,kBAAkB,SAEe;AAChD,QAAQ,qBAAkC,SAAS,QAAQ,SAAS"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LinkContentValue } from "./link.js";
|
|
2
|
+
import { z } from "zod/mini";
|
|
3
|
+
|
|
4
|
+
//#region src/content/repeatable.d.ts
|
|
5
|
+
declare const RepeatableContentSchema: z.ZodMiniObject<{
|
|
6
|
+
__TYPE__: z.ZodMiniLiteral<"RepeatableContent">;
|
|
7
|
+
type: z.ZodMiniLiteral<"Link">;
|
|
8
|
+
value: z.ZodMiniArray<z.ZodMiniObject<{
|
|
9
|
+
__TYPE__: z.ZodMiniLiteral<"LinkContent">;
|
|
10
|
+
key: z.ZodMiniTransform<string, unknown>;
|
|
11
|
+
value: z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>, z.ZodMiniTransform<{
|
|
12
|
+
text?: unknown;
|
|
13
|
+
variant?: unknown;
|
|
14
|
+
value: Record<string, unknown>;
|
|
15
|
+
}, Record<string, unknown>>>, z.ZodMiniObject<{
|
|
16
|
+
text: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
17
|
+
variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
18
|
+
value: z.ZodMiniType<LinkContentValue, Record<string, unknown>, z.core.$ZodTypeInternals<LinkContentValue, Record<string, unknown>>>;
|
|
19
|
+
}, z.core.$strip>>, z.ZodMiniTransform<{
|
|
20
|
+
variant?: string | undefined;
|
|
21
|
+
text?: string | undefined;
|
|
22
|
+
} & LinkContentValue, {
|
|
23
|
+
value: LinkContentValue;
|
|
24
|
+
text?: string | undefined;
|
|
25
|
+
variant?: string | undefined;
|
|
26
|
+
}>>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
type RepeatableContent = z.infer<typeof RepeatableContentSchema>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { RepeatableContent };
|
|
32
|
+
//# sourceMappingURL=repeatable.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LinkContentSchema, LinkContentType } from "./link.js";
|
|
2
|
+
import { z } from "zod/mini";
|
|
3
|
+
//#region src/content/repeatable.ts
|
|
4
|
+
const RepeatableContentType = "RepeatableContent";
|
|
5
|
+
const RepeatableContentSchema = z.object({
|
|
6
|
+
__TYPE__: z.literal(RepeatableContentType),
|
|
7
|
+
type: z.literal("Link"),
|
|
8
|
+
value: z.array(LinkContentSchema)
|
|
9
|
+
});
|
|
10
|
+
const RepeatableContentTypes = [LinkContentType];
|
|
11
|
+
function isRepeatableContentValue(content) {
|
|
12
|
+
return RepeatableContentTypes.includes(content.__TYPE__);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { RepeatableContentSchema, RepeatableContentType, isRepeatableContentValue };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=repeatable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repeatable.js","names":[],"sources":["../../src/content/repeatable.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { LinkContentSchema, LinkContentType } from \"./link\"\n\nexport const RepeatableContentType = \"RepeatableContent\" as const\n\nexport const RepeatableContentSchema = z.object({\n\t__TYPE__: z.literal(RepeatableContentType),\n\ttype: z.literal(\"Link\"),\n\tvalue: z.array(LinkContentSchema),\n})\n\nexport type RepeatableContent = z.infer<typeof RepeatableContentSchema>\n\nconst RepeatableContentTypes = [LinkContentType]\ntype RepeatableContentType = (typeof RepeatableContentTypes)[number]\nexport function isRepeatableContentValue(content: {\n\t__TYPE__: string\n}): content is { __TYPE__: RepeatableContentType } {\n\treturn (RepeatableContentTypes as string[]).includes(content.__TYPE__)\n}\n"],"mappings":";;;AAIA,MAAa,wBAAwB;AAErC,MAAa,0BAA0B,EAAE,OAAO;CAC/C,UAAU,EAAE,QAAQ,sBAAsB;CAC1C,MAAM,EAAE,QAAQ,OAAO;CACvB,OAAO,EAAE,MAAM,kBAAkB;CACjC,CAAC;AAIF,MAAM,yBAAyB,CAAC,gBAAgB;AAEhD,SAAgB,yBAAyB,SAEU;AAClD,QAAQ,uBAAoC,SAAS,QAAQ,SAAS"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { FilledLinkContentValue } from "./link.js";
|
|
2
|
+
import { RichTextNodeType, RichTextNodeTypes, Span } from "./legacy/richText.js";
|
|
3
|
+
import { z } from "zod/mini";
|
|
4
|
+
|
|
5
|
+
//#region src/content/richText.d.ts
|
|
6
|
+
type RichTextContentSpan = Span<FilledLinkContentValue>;
|
|
7
|
+
declare const RichTextContentTextBlockSchema: 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: FilledLinkContentValue;
|
|
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 RichTextContentTextBlock = z.infer<typeof RichTextContentTextBlockSchema>;
|
|
31
|
+
declare const RichTextContentImageBlockSchema: 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>;
|
|
37
|
+
width: z.ZodMiniNumber<number>;
|
|
38
|
+
height: z.ZodMiniNumber<number>;
|
|
39
|
+
}, z.core.$strip>;
|
|
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>;
|
|
49
|
+
}, 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<FilledLinkContentValue, unknown, z.core.$ZodTypeInternals<FilledLinkContentValue, 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 RichTextContentImageBlock = z.infer<typeof RichTextContentImageBlockSchema>;
|
|
60
|
+
declare const RichTextContentEmbedBlockSchema: 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>>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
type RichTextContentEmbedBlock = z.infer<typeof RichTextContentEmbedBlockSchema>;
|
|
83
|
+
type RichTextContentBlock = RichTextContentTextBlock | RichTextContentImageBlock | RichTextContentEmbedBlock;
|
|
84
|
+
declare const RichTextContentType: "StructuredTextContent";
|
|
85
|
+
type RichTextContent = {
|
|
86
|
+
__TYPE__: typeof RichTextContentType;
|
|
87
|
+
value: RichTextContentBlock[];
|
|
88
|
+
};
|
|
89
|
+
//#endregion
|
|
90
|
+
export { RichTextContent, RichTextContentBlock, RichTextContentEmbedBlock, RichTextContentImageBlock, RichTextContentSpan, RichTextContentTextBlock };
|
|
91
|
+
//# sourceMappingURL=richText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/content/richText.ts"],"mappings":";;;;;KAkBY,mBAAA,GAAsB,IAAA,CAAK,sBAAA;AAAA,cAOjC,8BAAA,EAA8B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;KACxB,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,cAEhD,+BAAA,EAA+B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIzB,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAEjD,+BAAA,EAA+B,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;KACzB,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,KAS3C,oBAAA,GACT,wBAAA,GACA,yBAAA,GACA,yBAAA;AAAA,cAEU,mBAAA;AAAA,KAED,eAAA;EACX,QAAA,SAAiB,mBAAA;EACjB,KAAA,EAAO,oBAAA;AAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EmbedContentSchema } from "./embed.js";
|
|
2
|
+
import { ImageContentViewSchema } from "./image.js";
|
|
3
|
+
import { getEmbedBlockSchema, getImageBlockSchema, getSpanSchema, getTextBlockSchema } from "./legacy/richText.js";
|
|
4
|
+
import { FilledLinkContentValueSchema } from "./link.js";
|
|
5
|
+
import { z } from "zod/mini";
|
|
6
|
+
//#region src/content/richText.ts
|
|
7
|
+
const RichTextContentSpanSchema = getSpanSchema(FilledLinkContentValueSchema);
|
|
8
|
+
const RichTextContentTextBlockSchema = getTextBlockSchema(FilledLinkContentValueSchema);
|
|
9
|
+
const RichTextContentImageBlockSchema = getImageBlockSchema(ImageContentViewSchema, FilledLinkContentValueSchema);
|
|
10
|
+
const RichTextContentEmbedBlockSchema = getEmbedBlockSchema(EmbedContentSchema);
|
|
11
|
+
const RichTextContentBlockSchema = z.union([
|
|
12
|
+
RichTextContentTextBlockSchema,
|
|
13
|
+
RichTextContentImageBlockSchema,
|
|
14
|
+
RichTextContentEmbedBlockSchema
|
|
15
|
+
]);
|
|
16
|
+
const RichTextContentType = "StructuredTextContent";
|
|
17
|
+
const RichTextContentSchema = z.object({
|
|
18
|
+
__TYPE__: z.literal(RichTextContentType),
|
|
19
|
+
value: z.array(RichTextContentBlockSchema)
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { RichTextContentBlockSchema, RichTextContentSchema, RichTextContentSpanSchema, RichTextContentType };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=richText.js.map
|
|
@@ -0,0 +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 { ImageContentViewSchema } from \"./image\"\nimport {\n\tgetEmbedBlockSchema,\n\tgetImageBlockSchema,\n\tgetSpanSchema,\n\tgetTextBlockSchema,\n} from \"./legacy/richText\"\nimport type { Span } from \"./legacy/richText\"\nimport type { FilledLinkContentValue } from \"./link\"\nimport { FilledLinkContentValueSchema } from \"./link\"\n\nexport { RichTextNodeType } from \"./legacy/richText\"\nexport type { RichTextNodeTypes } from \"./legacy/richText\"\n\n// Spans\nexport type RichTextContentSpan = Span<FilledLinkContentValue>\n\nexport const RichTextContentSpanSchema: z.ZodMiniType<RichTextContentSpan> = getSpanSchema(\n\tFilledLinkContentValueSchema,\n)\n\n// Blocks\nconst RichTextContentTextBlockSchema = getTextBlockSchema(FilledLinkContentValueSchema)\nexport type RichTextContentTextBlock = z.infer<typeof RichTextContentTextBlockSchema>\n\nconst RichTextContentImageBlockSchema = getImageBlockSchema(\n\tImageContentViewSchema,\n\tFilledLinkContentValueSchema,\n)\nexport type RichTextContentImageBlock = z.infer<typeof RichTextContentImageBlockSchema>\n\nconst RichTextContentEmbedBlockSchema = getEmbedBlockSchema(EmbedContentSchema)\nexport type RichTextContentEmbedBlock = z.infer<typeof RichTextContentEmbedBlockSchema>\n\nexport const RichTextContentBlockSchema: z.ZodMiniType<RichTextContentBlock> = z.union([\n\tRichTextContentTextBlockSchema,\n\tRichTextContentImageBlockSchema,\n\tRichTextContentEmbedBlockSchema,\n])\n\n// Used by content/codec/richText\nexport type RichTextContentBlock =\n\t| RichTextContentTextBlock\n\t| RichTextContentImageBlock\n\t| RichTextContentEmbedBlock\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":";;;;;;AAoBA,MAAa,4BAAgE,cAC5E,6BACA;AAGD,MAAM,iCAAiC,mBAAmB,6BAA6B;AAGvF,MAAM,kCAAkC,oBACvC,wBACA,6BACA;AAGD,MAAM,kCAAkC,oBAAoB,mBAAmB;AAG/E,MAAa,6BAAkE,EAAE,MAAM;CACtF;CACA;CACA;CACA,CAAC;AAQF,MAAa,sBAAsB;AAOnC,MAAa,wBAAwD,EAAE,OAAO;CAC7E,UAAU,EAAE,QAAQ,oBAAoB;CACxC,OAAO,EAAE,MAAM,2BAA2B;CAC1C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod/mini";
|
|
2
|
+
|
|
3
|
+
//#region src/content/separator.d.ts
|
|
4
|
+
declare const SeparatorContentSchema: z.ZodMiniObject<{
|
|
5
|
+
__TYPE__: z.ZodMiniLiteral<"SeparatorContent">;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
type SeparatorContent = z.infer<typeof SeparatorContentSchema>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { SeparatorContent };
|
|
10
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","names":[],"sources":["../../src/content/separator.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,aAAA;;;KAIvB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod/mini";
|
|
2
|
+
//#region src/content/separator.ts
|
|
3
|
+
const SeparatorContentType = "SeparatorContent";
|
|
4
|
+
const SeparatorContentSchema = z.object({ __TYPE__: z.literal(SeparatorContentType) });
|
|
5
|
+
//#endregion
|
|
6
|
+
export { SeparatorContentSchema, SeparatorContentType };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","names":[],"sources":["../../src/content/separator.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nexport const SeparatorContentType = \"SeparatorContent\" as const\n\nexport const SeparatorContentSchema = z.object({\n\t__TYPE__: z.literal(SeparatorContentType),\n})\n\nexport type SeparatorContent = z.infer<typeof SeparatorContentSchema>\n"],"mappings":";;AAEA,MAAa,uBAAuB;AAEpC,MAAa,yBAAyB,EAAE,OAAO,EAC9C,UAAU,EAAE,QAAQ,qBAAqB,EACzC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NestableContent } from "./nestable.js";
|
|
2
|
+
import { GroupItemContent, NestableAndGroupContent } from "./group.js";
|
|
3
|
+
import { z } from "zod/mini";
|
|
4
|
+
|
|
5
|
+
//#region src/content/slice.d.ts
|
|
6
|
+
declare const LegacySliceContentSchema: z.ZodMiniType<NestableAndGroupContent, unknown, z.core.$ZodTypeInternals<NestableAndGroupContent, unknown>>;
|
|
7
|
+
type LegacySliceContent = z.infer<typeof LegacySliceContentSchema>;
|
|
8
|
+
declare const CompositeSliceContentSchema: z.ZodMiniObject<{
|
|
9
|
+
__TYPE__: z.ZodMiniLiteral<"CompositeSliceContent">;
|
|
10
|
+
nonRepeat: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<NestableContent, unknown, z.core.$ZodTypeInternals<NestableContent, unknown>>>;
|
|
11
|
+
repeat: z.ZodMiniArray<z.ZodMiniType<GroupItemContent, unknown, z.core.$ZodTypeInternals<GroupItemContent, unknown>>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
type CompositeSliceContent = z.infer<typeof CompositeSliceContentSchema>;
|
|
14
|
+
declare const SharedSliceContentSchema: z.ZodMiniObject<{
|
|
15
|
+
__TYPE__: z.ZodMiniLiteral<"SharedSliceContent">;
|
|
16
|
+
variation: z.ZodMiniString<string>;
|
|
17
|
+
primary: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<NestableAndGroupContent, unknown, z.core.$ZodTypeInternals<NestableAndGroupContent, unknown>>>;
|
|
18
|
+
items: z.ZodMiniArray<z.ZodMiniType<GroupItemContent, unknown, z.core.$ZodTypeInternals<GroupItemContent, unknown>>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
type SharedSliceContent = z.infer<typeof SharedSliceContentSchema>;
|
|
21
|
+
type SliceContent = LegacySliceContent | CompositeSliceContent | SharedSliceContent;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { CompositeSliceContent, LegacySliceContent, SharedSliceContent, SliceContent };
|
|
24
|
+
//# sourceMappingURL=slice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.d.ts","names":[],"sources":["../../src/content/slice.ts"],"mappings":";;;;;cAMa,wBAAA,EAAwB,CAAA,CAAA,WAAA,CAAgC,uBAAA,WAAhC,CAAA,CAAA,IAAA,CAAA,iBAAA,CAAA,uBAAA;AAAA,KAEzB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,cAKnC,2BAAA,EAA2B,CAAA,CAAA,aAAA;;;;;KAM5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;AAAA,cAKtC,wBAAA,EAAwB,CAAA,CAAA,aAAA;;;;;;KAOzB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KASpC,YAAA,GAAe,kBAAA,GAAqB,qBAAA,GAAwB,kBAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NestableContentSchema } from "./nestable.js";
|
|
2
|
+
import { GroupItemContentSchema, NestableAndGroupContentSchema } from "./group.js";
|
|
3
|
+
import { z } from "zod/mini";
|
|
4
|
+
//#region src/content/slice.ts
|
|
5
|
+
const LegacySliceContentSchema = NestableAndGroupContentSchema;
|
|
6
|
+
const CompositeSliceContentType = "CompositeSliceContent";
|
|
7
|
+
const CompositeSliceContentSchema = z.object({
|
|
8
|
+
__TYPE__: z.literal(CompositeSliceContentType),
|
|
9
|
+
nonRepeat: z.record(z.string(), NestableContentSchema),
|
|
10
|
+
repeat: z.array(GroupItemContentSchema)
|
|
11
|
+
});
|
|
12
|
+
const SharedSliceContentType = "SharedSliceContent";
|
|
13
|
+
const SharedSliceContentSchema = z.object({
|
|
14
|
+
__TYPE__: z.literal(SharedSliceContentType),
|
|
15
|
+
variation: z.string(),
|
|
16
|
+
primary: z.record(z.string(), NestableAndGroupContentSchema),
|
|
17
|
+
items: z.array(GroupItemContentSchema)
|
|
18
|
+
});
|
|
19
|
+
const SliceContentSchema = z.union([
|
|
20
|
+
LegacySliceContentSchema,
|
|
21
|
+
CompositeSliceContentSchema,
|
|
22
|
+
SharedSliceContentSchema
|
|
23
|
+
]);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CompositeSliceContentSchema, CompositeSliceContentType, LegacySliceContentSchema, SharedSliceContentSchema, SharedSliceContentType, SliceContentSchema };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=slice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.js","names":[],"sources":["../../src/content/slice.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { GroupItemContentSchema, NestableAndGroupContentSchema } from \"./group\"\nimport { NestableContentSchema } from \"./nestable\"\n\n// Legacy (before 2020)\nexport const LegacySliceContentSchema = NestableAndGroupContentSchema\n\nexport type LegacySliceContent = z.infer<typeof LegacySliceContentSchema>\n\n// Composite (2020 to 2021)\nexport const CompositeSliceContentType = \"CompositeSliceContent\" as const\n\nexport const CompositeSliceContentSchema = z.object({\n\t__TYPE__: z.literal(CompositeSliceContentType),\n\tnonRepeat: z.record(z.string(), NestableContentSchema),\n\trepeat: z.array(GroupItemContentSchema),\n})\n\nexport type CompositeSliceContent = z.infer<typeof CompositeSliceContentSchema>\n\n// Shared (2021 to present)\nexport const SharedSliceContentType = \"SharedSliceContent\" as const\n\nexport const SharedSliceContentSchema = z.object({\n\t__TYPE__: z.literal(SharedSliceContentType),\n\tvariation: z.string(),\n\tprimary: z.record(z.string(), NestableAndGroupContentSchema),\n\titems: z.array(GroupItemContentSchema),\n})\n\nexport type SharedSliceContent = z.infer<typeof SharedSliceContentSchema>\n\n// All\nexport const SliceContentSchema: z.ZodMiniType<SliceContent> = z.union([\n\tLegacySliceContentSchema,\n\tCompositeSliceContentSchema,\n\tSharedSliceContentSchema,\n])\n\nexport type SliceContent = LegacySliceContent | CompositeSliceContent | SharedSliceContent\n"],"mappings":";;;;AAMA,MAAa,2BAA2B;AAKxC,MAAa,4BAA4B;AAEzC,MAAa,8BAA8B,EAAE,OAAO;CACnD,UAAU,EAAE,QAAQ,0BAA0B;CAC9C,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,sBAAsB;CACtD,QAAQ,EAAE,MAAM,uBAAuB;CACvC,CAAC;AAKF,MAAa,yBAAyB;AAEtC,MAAa,2BAA2B,EAAE,OAAO;CAChD,UAAU,EAAE,QAAQ,uBAAuB;CAC3C,WAAW,EAAE,QAAQ;CACrB,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,8BAA8B;CAC5D,OAAO,EAAE,MAAM,uBAAuB;CACtC,CAAC;AAKF,MAAa,qBAAkD,EAAE,MAAM;CACtE;CACA;CACA;CACA,CAAC"}
|