@prismicio/types-internal 3.16.0 → 3.16.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/content/fields/RepeatableContent.d.ts +51 -123
- package/lib/content/fields/RepeatableContent.js +10 -14
- package/lib/content/fields/nestable/RichTextContent/Block.d.ts +1036 -0
- package/lib/content/fields/nestable/RichTextContent/Block.js +31 -0
- package/lib/content/fields/nestable/RichTextContent/EmbedBlock.d.ts +60 -0
- package/lib/content/fields/nestable/RichTextContent/EmbedBlock.js +53 -0
- package/lib/content/fields/nestable/RichTextContent/ImageBlock.d.ts +203 -0
- package/lib/content/fields/nestable/RichTextContent/ImageBlock.js +36 -0
- package/lib/content/fields/nestable/RichTextContent/TableBlock.d.ts +500 -0
- package/lib/content/fields/nestable/RichTextContent/TableBlock.js +21 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +590 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
- package/lib/scripts/release.d.ts +1 -0
- package/lib/scripts/release.js +34 -0
- package/lib/src/_internal/utils.d.ts +36 -0
- package/lib/src/_internal/utils.js +20 -0
- package/lib/src/common/Asset.d.ts +16 -0
- package/lib/src/common/Asset.js +11 -0
- package/lib/src/common/Embed.d.ts +15 -0
- package/lib/src/common/Embed.js +10 -0
- package/lib/src/common/HexaColorCode.d.ts +4 -0
- package/lib/src/common/HexaColorCode.js +7 -0
- package/lib/src/common/UUID.d.ts +6 -0
- package/lib/src/common/UUID.js +8 -0
- package/lib/src/common/WidgetKey.d.ts +3 -0
- package/lib/src/common/WidgetKey.js +8 -0
- package/lib/src/common/index.d.ts +3 -0
- package/lib/src/common/index.js +6 -0
- package/lib/src/content/Document.d.ts +11803 -0
- package/lib/src/content/Document.js +266 -0
- package/lib/src/content/LegacyContentCtx.d.ts +64 -0
- package/lib/src/content/LegacyContentCtx.js +130 -0
- package/lib/src/content/fields/EmptyContent.d.ts +16 -0
- package/lib/src/content/fields/EmptyContent.js +30 -0
- package/lib/src/content/fields/GroupContent.d.ts +42 -0
- package/lib/src/content/fields/GroupContent.js +208 -0
- package/lib/src/content/fields/UIDContent.d.ts +16 -0
- package/lib/src/content/fields/UIDContent.js +25 -0
- package/lib/src/content/fields/WidgetContent.d.ts +11749 -0
- package/lib/src/content/fields/WidgetContent.js +57 -0
- package/lib/src/content/fields/index.d.ts +6 -0
- package/lib/src/content/fields/index.js +9 -0
- package/lib/src/content/fields/nestable/BooleanContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/BooleanContent.js +35 -0
- package/lib/src/content/fields/nestable/EmbedContent.d.ts +78 -0
- package/lib/src/content/fields/nestable/EmbedContent.js +56 -0
- package/lib/src/content/fields/nestable/FieldContent/ColorContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/FieldContent/ColorContent.js +35 -0
- package/lib/src/content/fields/nestable/FieldContent/DateContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/FieldContent/DateContent.js +35 -0
- package/lib/src/content/fields/nestable/FieldContent/NumberContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/FieldContent/NumberContent.js +35 -0
- package/lib/src/content/fields/nestable/FieldContent/RangeContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/FieldContent/RangeContent.js +35 -0
- package/lib/src/content/fields/nestable/FieldContent/SelectContent.d.ts +20 -0
- package/lib/src/content/fields/nestable/FieldContent/SelectContent.js +46 -0
- package/lib/src/content/fields/nestable/FieldContent/TextContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/FieldContent/TextContent.js +35 -0
- package/lib/src/content/fields/nestable/FieldContent/TimestampContent.d.ts +18 -0
- package/lib/src/content/fields/nestable/FieldContent/TimestampContent.js +35 -0
- package/lib/src/content/fields/nestable/FieldContent/common.d.ts +1 -0
- package/lib/src/content/fields/nestable/FieldContent/common.js +4 -0
- package/lib/src/content/fields/nestable/FieldContent/index.d.ts +49 -0
- package/lib/src/content/fields/nestable/FieldContent/index.js +38 -0
- package/lib/src/content/fields/nestable/GeoPointContent.d.ts +33 -0
- package/lib/src/content/fields/nestable/GeoPointContent.js +31 -0
- package/lib/src/content/fields/nestable/ImageContent.d.ts +227 -0
- package/lib/src/content/fields/nestable/ImageContent.js +73 -0
- package/lib/src/content/fields/nestable/IntegrationFieldContent.d.ts +16 -0
- package/lib/src/content/fields/nestable/IntegrationFieldContent.js +28 -0
- package/lib/src/content/fields/nestable/LinkContent.d.ts +919 -0
- package/lib/src/content/fields/nestable/LinkContent.js +399 -0
- package/lib/src/content/fields/nestable/NestableContent.d.ts +1953 -0
- package/lib/src/content/fields/nestable/NestableContent.js +167 -0
- package/lib/src/content/fields/nestable/RepeatableContent.d.ts +176 -0
- package/lib/src/content/fields/nestable/RepeatableContent.js +104 -0
- package/lib/src/content/fields/nestable/RichTextContent/Blocks.d.ts +1261 -0
- package/lib/src/content/fields/nestable/RichTextContent/Blocks.js +170 -0
- package/lib/src/content/fields/nestable/RichTextContent/index.d.ts +1004 -0
- package/lib/src/content/fields/nestable/RichTextContent/index.js +28 -0
- package/lib/src/content/fields/nestable/SeparatorContent.d.ts +13 -0
- package/lib/src/content/fields/nestable/SeparatorContent.js +22 -0
- package/lib/src/content/fields/nestable/TableContent.d.ts +770 -0
- package/lib/src/content/fields/nestable/TableContent.js +121 -0
- package/lib/src/content/fields/nestable/index.d.ts +12 -0
- package/lib/src/content/fields/nestable/index.js +15 -0
- package/lib/src/content/fields/slices/Slice/CompositeSliceContent.d.ts +3934 -0
- package/lib/src/content/fields/slices/Slice/CompositeSliceContent.js +195 -0
- package/lib/src/content/fields/slices/Slice/RepeatableContent.d.ts +774 -0
- package/lib/src/content/fields/slices/Slice/RepeatableContent.js +21 -0
- package/lib/src/content/fields/slices/Slice/SharedSliceContent.d.ts +3937 -0
- package/lib/src/content/fields/slices/Slice/SharedSliceContent.js +215 -0
- package/lib/src/content/fields/slices/Slice/SimpleSliceContent.d.ts +1962 -0
- package/lib/src/content/fields/slices/Slice/SimpleSliceContent.js +130 -0
- package/lib/src/content/fields/slices/Slice/SlicePrimaryContent.d.ts +1952 -0
- package/lib/src/content/fields/slices/Slice/SlicePrimaryContent.js +30 -0
- package/lib/src/content/fields/slices/Slice/index.d.ts +6810 -0
- package/lib/src/content/fields/slices/Slice/index.js +45 -0
- package/lib/src/content/fields/slices/SliceItem.d.ts +6846 -0
- package/lib/src/content/fields/slices/SliceItem.js +116 -0
- package/lib/src/content/fields/slices/SlicesContent.d.ts +9809 -0
- package/lib/src/content/fields/slices/SlicesContent.js +187 -0
- package/lib/src/content/fields/slices/index.d.ts +3 -0
- package/lib/src/content/fields/slices/index.js +6 -0
- package/lib/src/content/fields/withDefaultValues.d.ts +9 -0
- package/lib/src/content/fields/withDefaultValues.js +79 -0
- package/lib/src/content/index.d.ts +3 -0
- package/lib/src/content/index.js +6 -0
- package/lib/src/content/utils.d.ts +14 -0
- package/lib/src/content/utils.js +33 -0
- package/lib/src/customtypes/CustomType.d.ts +3680 -0
- package/lib/src/customtypes/CustomType.js +184 -0
- package/lib/src/customtypes/Section.d.ts +3635 -0
- package/lib/src/customtypes/Section.js +66 -0
- package/lib/src/customtypes/diff/Changes.d.ts +17 -0
- package/lib/src/customtypes/diff/Changes.js +9 -0
- package/lib/src/customtypes/diff/SharedSlice.d.ts +1624 -0
- package/lib/src/customtypes/diff/SharedSlice.js +55 -0
- package/lib/src/customtypes/diff/Variation.d.ts +1605 -0
- package/lib/src/customtypes/diff/Variation.js +113 -0
- package/lib/src/customtypes/diff/Widgets.d.ts +11 -0
- package/lib/src/customtypes/diff/Widgets.js +2 -0
- package/lib/src/customtypes/diff/index.d.ts +4 -0
- package/lib/src/customtypes/diff/index.js +7 -0
- package/lib/src/customtypes/index.d.ts +4 -0
- package/lib/src/customtypes/index.js +7 -0
- package/lib/src/customtypes/widgets/Group.d.ts +1352 -0
- package/lib/src/customtypes/widgets/Group.js +92 -0
- package/lib/src/customtypes/widgets/UID.d.ts +19 -0
- package/lib/src/customtypes/widgets/UID.js +21 -0
- package/lib/src/customtypes/widgets/Widget.d.ts +4457 -0
- package/lib/src/customtypes/widgets/Widget.js +49 -0
- package/lib/src/customtypes/widgets/index.d.ts +6 -0
- package/lib/src/customtypes/widgets/index.js +9 -0
- package/lib/src/customtypes/widgets/nestable/BooleanField.d.ts +20 -0
- package/lib/src/customtypes/widgets/nestable/BooleanField.js +21 -0
- package/lib/src/customtypes/widgets/nestable/Color.d.ts +17 -0
- package/lib/src/customtypes/widgets/nestable/Color.js +20 -0
- package/lib/src/customtypes/widgets/nestable/Date.d.ts +19 -0
- package/lib/src/customtypes/widgets/nestable/Date.js +21 -0
- package/lib/src/customtypes/widgets/nestable/Embed.d.ts +19 -0
- package/lib/src/customtypes/widgets/nestable/Embed.js +21 -0
- package/lib/src/customtypes/widgets/nestable/GeoPoint.d.ts +15 -0
- package/lib/src/customtypes/widgets/nestable/GeoPoint.js +19 -0
- package/lib/src/customtypes/widgets/nestable/Image.d.ts +44 -0
- package/lib/src/customtypes/widgets/nestable/Image.js +29 -0
- package/lib/src/customtypes/widgets/nestable/IntegrationField.d.ts +19 -0
- package/lib/src/customtypes/widgets/nestable/IntegrationField.js +21 -0
- package/lib/src/customtypes/widgets/nestable/Link.d.ts +196 -0
- package/lib/src/customtypes/widgets/nestable/Link.js +167 -0
- package/lib/src/customtypes/widgets/nestable/NestableWidget.d.ts +217 -0
- package/lib/src/customtypes/widgets/nestable/NestableWidget.js +39 -0
- package/lib/src/customtypes/widgets/nestable/Number.d.ts +23 -0
- package/lib/src/customtypes/widgets/nestable/Number.js +24 -0
- package/lib/src/customtypes/widgets/nestable/Range.d.ts +23 -0
- package/lib/src/customtypes/widgets/nestable/Range.js +24 -0
- package/lib/src/customtypes/widgets/nestable/RichText.d.ts +73 -0
- package/lib/src/customtypes/widgets/nestable/RichText.js +131 -0
- package/lib/src/customtypes/widgets/nestable/Select.d.ts +21 -0
- package/lib/src/customtypes/widgets/nestable/Select.js +22 -0
- package/lib/src/customtypes/widgets/nestable/Separator.d.ts +14 -0
- package/lib/src/customtypes/widgets/nestable/Separator.js +18 -0
- package/lib/src/customtypes/widgets/nestable/Table.d.ts +21 -0
- package/lib/src/customtypes/widgets/nestable/Table.js +30 -0
- package/lib/src/customtypes/widgets/nestable/Text.d.ts +19 -0
- package/lib/src/customtypes/widgets/nestable/Text.js +21 -0
- package/lib/src/customtypes/widgets/nestable/Timestamp.d.ts +19 -0
- package/lib/src/customtypes/widgets/nestable/Timestamp.js +21 -0
- package/lib/src/customtypes/widgets/nestable/index.d.ts +17 -0
- package/lib/src/customtypes/widgets/nestable/index.js +20 -0
- package/lib/src/customtypes/widgets/shared/ImageConstraint.d.ts +7 -0
- package/lib/src/customtypes/widgets/shared/ImageConstraint.js +31 -0
- package/lib/src/customtypes/widgets/shared/index.d.ts +1 -0
- package/lib/src/customtypes/widgets/shared/index.js +8 -0
- package/lib/src/customtypes/widgets/slices/CompositeSlice.d.ts +455 -0
- package/lib/src/customtypes/widgets/slices/CompositeSlice.js +63 -0
- package/lib/src/customtypes/widgets/slices/LegacySlice.d.ts +442 -0
- package/lib/src/customtypes/widgets/slices/LegacySlice.js +12 -0
- package/lib/src/customtypes/widgets/slices/SharedSlice.d.ts +1807 -0
- package/lib/src/customtypes/widgets/slices/SharedSlice.js +118 -0
- package/lib/src/customtypes/widgets/slices/SharedSliceRef.d.ts +5 -0
- package/lib/src/customtypes/widgets/slices/SharedSliceRef.js +9 -0
- package/lib/src/customtypes/widgets/slices/Slice.d.ts +6 -0
- package/lib/src/customtypes/widgets/slices/Slice.js +2 -0
- package/lib/src/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +1259 -0
- package/lib/src/customtypes/widgets/slices/SlicePrimaryWidget.js +10 -0
- package/lib/src/customtypes/widgets/slices/Slices.d.ts +5917 -0
- package/lib/src/customtypes/widgets/slices/Slices.js +146 -0
- package/lib/src/customtypes/widgets/slices/SlicesTypes.d.ts +6 -0
- package/lib/src/customtypes/widgets/slices/SlicesTypes.js +11 -0
- package/lib/src/customtypes/widgets/slices/index.d.ts +8 -0
- package/lib/src/customtypes/widgets/slices/index.js +11 -0
- package/lib/src/utils/Arrays.d.ts +1 -0
- package/lib/src/utils/Arrays.js +13 -0
- package/lib/src/utils/DocumentId.d.ts +2 -0
- package/lib/src/utils/DocumentId.js +7 -0
- package/lib/src/utils/Objects.d.ts +8 -0
- package/lib/src/utils/Objects.js +42 -0
- package/lib/src/utils/index.d.ts +3 -0
- package/lib/src/utils/index.js +7 -0
- package/lib/src/validators/BasicTypes.d.ts +10 -0
- package/lib/src/validators/BasicTypes.js +25 -0
- package/lib/src/validators/DateFromString.d.ts +3 -0
- package/lib/src/validators/DateFromString.js +11 -0
- package/lib/src/validators/DateFromStringOrNumber.d.ts +3 -0
- package/lib/src/validators/DateFromStringOrNumber.js +10 -0
- package/lib/src/validators/DateFromTsMs.d.ts +3 -0
- package/lib/src/validators/DateFromTsMs.js +10 -0
- package/lib/src/validators/DefaultOrElse.d.ts +5 -0
- package/lib/src/validators/DefaultOrElse.js +21 -0
- package/lib/src/validators/IntFromNumber.d.ts +5 -0
- package/lib/src/validators/IntFromNumber.js +14 -0
- package/lib/src/validators/IntFromPixels.d.ts +8 -0
- package/lib/src/validators/IntFromPixels.js +24 -0
- package/lib/src/validators/NonEmptyString.d.ts +3 -0
- package/lib/src/validators/NonEmptyString.js +6 -0
- package/lib/src/validators/NonEmptyStringOrNull.d.ts +3 -0
- package/lib/src/validators/NonEmptyStringOrNull.js +15 -0
- package/lib/src/validators/NumberOrNull.d.ts +3 -0
- package/lib/src/validators/NumberOrNull.js +6 -0
- package/lib/src/validators/NumberRange.d.ts +32 -0
- package/lib/src/validators/NumberRange.js +40 -0
- package/lib/src/validators/StringFromBoolean.d.ts +5 -0
- package/lib/src/validators/StringFromBoolean.js +10 -0
- package/lib/src/validators/StringFromNumber.d.ts +5 -0
- package/lib/src/validators/StringFromNumber.js +10 -0
- package/lib/src/validators/StringOrNull.d.ts +3 -0
- package/lib/src/validators/StringOrNull.js +6 -0
- package/lib/src/validators/TrimmedString.d.ts +5 -0
- package/lib/src/validators/TrimmedString.js +23 -0
- package/lib/src/validators/function.d.ts +34 -0
- package/lib/src/validators/function.js +100 -0
- package/lib/src/validators/index.d.ts +15 -0
- package/lib/src/validators/index.js +31 -0
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RichTextLegacy = exports.RichTextContent = exports.RichTextLegacyContent = exports.isRichTextContent = exports.RichTextContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fp_ts_1 = require("fp-ts");
|
|
6
|
+
const function_1 = require("fp-ts/lib/function");
|
|
7
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
9
|
+
const Blocks_1 = require("./Blocks");
|
|
10
|
+
exports.RichTextContentType = "StructuredTextContent";
|
|
11
|
+
const isRichTextContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.RichTextContentType;
|
|
12
|
+
exports.isRichTextContent = isRichTextContent;
|
|
13
|
+
exports.RichTextLegacyContent = t.array(Blocks_1.BlockLegacy);
|
|
14
|
+
exports.RichTextContent = t.strict({
|
|
15
|
+
__TYPE__: t.literal(exports.RichTextContentType),
|
|
16
|
+
value: t.array(Blocks_1.Block),
|
|
17
|
+
});
|
|
18
|
+
(0, tslib_1.__exportStar)(require("./Blocks"), exports);
|
|
19
|
+
const RichTextLegacy = (ctx) => new t.Type("RichTextLegacy", exports.isRichTextContent, (u) => {
|
|
20
|
+
return (0, function_1.pipe)(exports.RichTextLegacyContent.decode(u), fp_ts_1.either.map((r) => ({ value: r, __TYPE__: exports.RichTextContentType })));
|
|
21
|
+
}, (r) => {
|
|
22
|
+
return {
|
|
23
|
+
content: exports.RichTextLegacyContent.encode(r.value),
|
|
24
|
+
types: { [ctx.keyOfType]: "StructuredText" },
|
|
25
|
+
keys: {},
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
exports.RichTextLegacy = RichTextLegacy;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import type { LegacyContentCtx, WithTypes } from "../../LegacyContentCtx";
|
|
3
|
+
export declare const SeparatorContentType = "SeparatorContent";
|
|
4
|
+
export declare const isSeparatorContent: (u: unknown) => u is {
|
|
5
|
+
__TYPE__: "SeparatorContent";
|
|
6
|
+
};
|
|
7
|
+
export declare const SeparatorLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
8
|
+
__TYPE__: "SeparatorContent";
|
|
9
|
+
}, WithTypes<unknown>, unknown>;
|
|
10
|
+
export declare const SeparatorContent: t.ExactC<t.TypeC<{
|
|
11
|
+
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
12
|
+
}>>;
|
|
13
|
+
export declare type SeparatorContent = t.TypeOf<typeof SeparatorContent>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SeparatorContent = exports.SeparatorLegacy = exports.isSeparatorContent = exports.SeparatorContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
exports.SeparatorContentType = "SeparatorContent";
|
|
8
|
+
const isSeparatorContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.SeparatorContentType;
|
|
9
|
+
exports.isSeparatorContent = isSeparatorContent;
|
|
10
|
+
const SeparatorLegacy = (ctx) => new t.Type("SeparatorLegacy", exports.isSeparatorContent, () => {
|
|
11
|
+
return t.success(exports.SeparatorContent.encode({ __TYPE__: exports.SeparatorContentType }));
|
|
12
|
+
}, () => {
|
|
13
|
+
return {
|
|
14
|
+
content: {},
|
|
15
|
+
types: { [ctx.keyOfType]: "Separator" },
|
|
16
|
+
keys: {},
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
exports.SeparatorLegacy = SeparatorLegacy;
|
|
20
|
+
exports.SeparatorContent = t.strict({
|
|
21
|
+
__TYPE__: t.literal(exports.SeparatorContentType),
|
|
22
|
+
});
|