@prismicio/types-internal 2.5.0 → 2.6.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/_internal/utils.d.ts +2 -2
- package/lib/content/Document.d.ts +588 -1632
- package/lib/content/fields/WidgetContent.d.ts +588 -1632
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +4 -4
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +2 -1
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +5 -2158
- package/lib/content/fields/slices/Slice/RepeatableContent.js +6 -148
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +4 -4
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +6 -1049
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +7 -10
- package/lib/content/fields/slices/Slice/index.d.ts +27 -754
- package/lib/content/fields/slices/Slice/index.js +0 -1
- package/lib/content/fields/slices/SliceItem.d.ts +325 -1051
- package/lib/content/fields/slices/SlicesContent.d.ts +1771 -2815
- package/package.json +1 -1
- package/src/_internal/utils.ts +1 -2
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +4 -8
- package/src/content/fields/slices/Slice/RepeatableContent.ts +11 -242
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +7 -7
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +17 -21
- package/src/content/fields/slices/Slice/index.ts +0 -1
- package/src/content/fields/slices/SlicesContent.ts +2 -2
|
@@ -635,7 +635,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
|
|
|
635
635
|
}))[];
|
|
636
636
|
} | {
|
|
637
637
|
__TYPE__: "SeparatorContent";
|
|
638
|
-
}][];
|
|
638
|
+
} | import("../../GroupContent").GroupContent][];
|
|
639
639
|
}[];
|
|
640
640
|
};
|
|
641
641
|
export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
@@ -1269,7 +1269,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
1269
1269
|
}))[];
|
|
1270
1270
|
} | {
|
|
1271
1271
|
__TYPE__: "SeparatorContent";
|
|
1272
|
-
}][];
|
|
1272
|
+
} | import("../../GroupContent").GroupContent][];
|
|
1273
1273
|
}[];
|
|
1274
1274
|
}, WithTypes<{
|
|
1275
1275
|
repeat?: unknown[];
|
|
@@ -1684,7 +1684,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
1684
1684
|
}>>]>>;
|
|
1685
1685
|
repeat: t.ArrayC<t.ExactC<t.TypeC<{
|
|
1686
1686
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
1687
|
-
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.ExactC<t.TypeC<{
|
|
1687
|
+
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
1688
1688
|
type: t.StringC;
|
|
1689
1689
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
1690
1690
|
}>>, t.ExactC<t.TypeC<{
|
|
@@ -2086,7 +2086,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
2086
2086
|
}>]>>]>>;
|
|
2087
2087
|
}>>, t.ExactC<t.TypeC<{
|
|
2088
2088
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
2089
|
-
}>>]>]>>;
|
|
2089
|
+
}>>]>, t.Type<import("../../GroupContent").GroupContent, import("../../GroupContent").GroupContent, unknown>]>]>>;
|
|
2090
2090
|
}>>>;
|
|
2091
2091
|
}>>;
|
|
2092
2092
|
export declare type CompositeSliceContent = t.TypeOf<typeof CompositeSliceContent>;
|
|
@@ -8,6 +8,7 @@ const function_1 = require("fp-ts/lib/function");
|
|
|
8
8
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
9
9
|
const LegacyContentCtx_1 = require("../../../LegacyContentCtx");
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
|
+
const GroupContent_1 = require("../../GroupContent");
|
|
11
12
|
const nestable_1 = require("../../nestable");
|
|
12
13
|
const withDefaultValues_1 = require("../../withDefaultValues");
|
|
13
14
|
const RepeatableContent_1 = require("./RepeatableContent");
|
|
@@ -122,7 +123,7 @@ function traverseCompositeSliceContent({ path, sliceKey, sliceName, model, conte
|
|
|
122
123
|
[fieldKey]: transformedField,
|
|
123
124
|
};
|
|
124
125
|
}, {});
|
|
125
|
-
const items = (0,
|
|
126
|
+
const items = (0, GroupContent_1.traverseGroupItemsContent)({
|
|
126
127
|
path: path.concat([{ key: "repeat", type: "items" }]),
|
|
127
128
|
model: (model === null || model === void 0 ? void 0 : model.type) === "SharedSlice" ? model === null || model === void 0 ? void 0 : model.fields.items : model === null || model === void 0 ? void 0 : model.repeat,
|
|
128
129
|
content: content.widget.repeat,
|