@prismicio/types-internal 2.9.0-alpha.3 → 3.0.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 -3
- package/lib/content/Document.d.ts +212 -1520
- package/lib/content/Document.js +0 -11
- package/lib/content/LegacyContentCtx.d.ts +2 -2
- package/lib/content/LegacyContentCtx.js +1 -4
- package/lib/content/fields/GroupContent.js +0 -13
- package/lib/content/fields/WidgetContent.d.ts +186 -1494
- package/lib/content/fields/index.d.ts +0 -1
- package/lib/content/fields/index.js +0 -1
- package/lib/content/fields/nestable/LinkContent.d.ts +32 -32
- package/lib/content/fields/nestable/LinkContent.js +10 -2
- package/lib/content/fields/nestable/NestableContent.d.ts +22 -240
- package/lib/content/fields/nestable/NestableContent.js +1 -8
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +106 -106
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +20 -20
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +46 -482
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +10 -84
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +48 -484
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +4 -20
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +23 -241
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +23 -241
- package/lib/content/fields/slices/Slice/index.d.ts +85 -815
- package/lib/content/fields/slices/SliceItem.d.ts +84 -814
- package/lib/content/fields/slices/SlicesContent.d.ts +118 -1208
- package/lib/customtypes/CustomType.d.ts +0 -18
- package/lib/customtypes/Section.d.ts +0 -18
- package/lib/customtypes/diff/SharedSlice.d.ts +0 -8
- package/lib/customtypes/diff/Variation.d.ts +0 -8
- package/lib/customtypes/widgets/Group.d.ts +0 -6
- package/lib/customtypes/widgets/Widget.d.ts +0 -21
- package/lib/customtypes/widgets/nestable/Link.d.ts +0 -10
- package/lib/customtypes/widgets/nestable/Link.js +0 -5
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +0 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +0 -2
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +0 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +0 -8
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +0 -6
- package/lib/customtypes/widgets/slices/Slices.d.ts +0 -28
- package/package.json +1 -1
- package/src/_internal/utils.ts +1 -3
- package/src/content/Document.ts +0 -12
- package/src/content/LegacyContentCtx.ts +1 -4
- package/src/content/fields/GroupContent.ts +0 -13
- package/src/content/fields/index.ts +0 -1
- package/src/content/fields/nestable/LinkContent.ts +26 -2
- package/src/content/fields/nestable/NestableContent.ts +1 -12
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +0 -18
- package/src/customtypes/widgets/nestable/Link.ts +0 -6
- package/src/content/fields/RepeatableContent.ts +0 -147
package/lib/_internal/utils.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { SharedSliceItemContent, SliceItemContent, WidgetContent } from "../content";
|
|
2
|
-
import type { RepeatableContent } from "../content/fields/RepeatableContent";
|
|
3
2
|
import type { CompositeSlice, Group, NestableWidget, StaticSlices, UID, VariationFields } from "../customtypes";
|
|
4
3
|
export declare type TraverseSliceContentFn = <S extends SliceItemContent | SharedSliceItemContent, D extends VariationFields | CompositeSlice | Group | NestableWidget>({ path, key, apiId, model, content, }: {
|
|
5
4
|
path: ContentPath;
|
|
@@ -8,7 +7,7 @@ export declare type TraverseSliceContentFn = <S extends SliceItemContent | Share
|
|
|
8
7
|
model?: D | undefined;
|
|
9
8
|
content: S;
|
|
10
9
|
}) => S | SharedSliceItemContent | undefined;
|
|
11
|
-
export declare type TraverseWidgetContentFn = <C extends WidgetContent
|
|
10
|
+
export declare type TraverseWidgetContentFn = <C extends WidgetContent, D extends NestableWidget | StaticSlices | Group | UID>({ path, key, apiId, model, content, }: {
|
|
12
11
|
path: ContentPath;
|
|
13
12
|
key: string;
|
|
14
13
|
apiId: string;
|
|
@@ -16,7 +15,7 @@ export declare type TraverseWidgetContentFn = <C extends WidgetContent | Repeata
|
|
|
16
15
|
content: C;
|
|
17
16
|
}) => C | undefined;
|
|
18
17
|
export declare type ContentPathEntry = {
|
|
19
|
-
type: "CustomType" | "Widget" | "SharedSlice" | "Slice" | "LegacySlice" | "GroupItem" | "primary" | "items"
|
|
18
|
+
type: "CustomType" | "Widget" | "SharedSlice" | "Slice" | "LegacySlice" | "GroupItem" | "primary" | "items";
|
|
20
19
|
key: string;
|
|
21
20
|
};
|
|
22
21
|
export declare type ContentPath = ReadonlyArray<ContentPathEntry>;
|