@prismicio/types-internal 4.5.1 → 4.6.0-canary.5b32151
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/dist/common/asset.d.ts +1 -2
- package/dist/common/asset.d.ts.map +1 -1
- package/dist/common/asset.js.map +1 -1
- package/dist/common/embed.d.ts +1 -2
- package/dist/common/embed.d.ts.map +1 -1
- package/dist/common/embed.js.map +1 -1
- package/dist/common/hexaColorCode.d.ts +1 -2
- package/dist/common/hexaColorCode.d.ts.map +1 -1
- package/dist/common/hexaColorCode.js.map +1 -1
- package/dist/common/nonEmptyString.d.ts +1 -2
- package/dist/common/nonEmptyString.d.ts.map +1 -1
- package/dist/common/nonEmptyString.js.map +1 -1
- package/dist/common/widgetKey.d.ts +1 -2
- package/dist/common/widgetKey.d.ts.map +1 -1
- package/dist/common/widgetKey.js.map +1 -1
- package/dist/content/boolean.d.ts +1 -2
- package/dist/content/boolean.d.ts.map +1 -1
- package/dist/content/boolean.js.map +1 -1
- package/dist/content/codec/boolean.js.map +1 -1
- package/dist/content/codec/document.js.map +1 -1
- package/dist/content/codec/embed.js.map +1 -1
- package/dist/content/codec/empty.js.map +1 -1
- package/dist/content/codec/field.js.map +1 -1
- package/dist/content/codec/geopoint.js.map +1 -1
- package/dist/content/codec/group.js +6 -4
- package/dist/content/codec/group.js.map +1 -1
- package/dist/content/codec/image.js.map +1 -1
- package/dist/content/codec/integrationField.js.map +1 -1
- package/dist/content/codec/legacyContentCtx.d.ts +2 -15
- package/dist/content/codec/legacyContentCtx.d.ts.map +1 -1
- package/dist/content/codec/legacyContentCtx.js.map +1 -1
- package/dist/content/codec/link.js.map +1 -1
- package/dist/content/codec/nestable.js.map +1 -1
- package/dist/content/codec/repeatable.js.map +1 -1
- package/dist/content/codec/richText.js.map +1 -1
- package/dist/content/codec/separator.js.map +1 -1
- package/dist/content/codec/slice.js.map +1 -1
- package/dist/content/codec/slices.js.map +1 -1
- package/dist/content/codec/table.js.map +1 -1
- package/dist/content/codec/uid.js.map +1 -1
- package/dist/content/codec/widget.js.map +1 -1
- package/dist/content/document.d.ts +1 -2
- package/dist/content/document.d.ts.map +1 -1
- package/dist/content/document.js.map +1 -1
- package/dist/content/embed.d.ts +1 -2
- package/dist/content/embed.d.ts.map +1 -1
- package/dist/content/embed.js.map +1 -1
- package/dist/content/empty.d.ts +1 -2
- package/dist/content/empty.d.ts.map +1 -1
- package/dist/content/empty.js.map +1 -1
- package/dist/content/field.d.ts +1 -2
- package/dist/content/field.d.ts.map +1 -1
- package/dist/content/field.js.map +1 -1
- package/dist/content/geopoint.d.ts +1 -2
- package/dist/content/geopoint.d.ts.map +1 -1
- package/dist/content/geopoint.js.map +1 -1
- package/dist/content/group.d.ts +3 -2
- package/dist/content/group.d.ts.map +1 -1
- package/dist/content/group.js.map +1 -1
- package/dist/content/image.d.ts +1 -2
- package/dist/content/image.d.ts.map +1 -1
- package/dist/content/image.js.map +1 -1
- package/dist/content/integrationField.d.ts +1 -2
- package/dist/content/integrationField.d.ts.map +1 -1
- package/dist/content/integrationField.js.map +1 -1
- package/dist/content/legacy/boolean.js.map +1 -1
- package/dist/content/legacy/document.d.ts +1 -2
- package/dist/content/legacy/document.d.ts.map +1 -1
- package/dist/content/legacy/document.js.map +1 -1
- package/dist/content/legacy/embed.js.map +1 -1
- package/dist/content/legacy/empty.js.map +1 -1
- package/dist/content/legacy/field.js.map +1 -1
- package/dist/content/legacy/geopoint.js.map +1 -1
- package/dist/content/legacy/group.d.ts +2 -2
- package/dist/content/legacy/group.d.ts.map +1 -1
- package/dist/content/legacy/group.js.map +1 -1
- package/dist/content/legacy/image.d.ts +0 -1
- package/dist/content/legacy/image.d.ts.map +1 -1
- package/dist/content/legacy/image.js.map +1 -1
- package/dist/content/legacy/integrationField.js.map +1 -1
- package/dist/content/legacy/link.d.ts +1 -2
- package/dist/content/legacy/link.d.ts.map +1 -1
- package/dist/content/legacy/link.js.map +1 -1
- package/dist/content/legacy/nestable.d.ts +12 -0
- package/dist/content/legacy/nestable.js.map +1 -1
- package/dist/content/legacy/repeatable.js.map +1 -1
- package/dist/content/legacy/richText.d.ts +5 -2
- package/dist/content/legacy/richText.d.ts.map +1 -1
- package/dist/content/legacy/richText.js.map +1 -1
- package/dist/content/legacy/separator.js.map +1 -1
- package/dist/content/legacy/slice.js +1 -1
- package/dist/content/legacy/slice.js.map +1 -1
- package/dist/content/legacy/slices.js.map +1 -1
- package/dist/content/legacy/table.d.ts +2 -0
- package/dist/content/legacy/table.js.map +1 -1
- package/dist/content/legacy/uid.js.map +1 -1
- package/dist/content/link.d.ts +7 -8
- package/dist/content/link.d.ts.map +1 -1
- package/dist/content/link.js.map +1 -1
- package/dist/content/nestable.d.ts +0 -1
- package/dist/content/nestable.d.ts.map +1 -1
- package/dist/content/nestable.js.map +1 -1
- package/dist/content/repeatable.d.ts +3 -4
- package/dist/content/repeatable.d.ts.map +1 -1
- package/dist/content/repeatable.js.map +1 -1
- package/dist/content/richText.d.ts +2 -3
- package/dist/content/richText.d.ts.map +1 -1
- package/dist/content/richText.js +2 -2
- package/dist/content/richText.js.map +1 -1
- package/dist/content/separator.d.ts +1 -2
- package/dist/content/separator.d.ts.map +1 -1
- package/dist/content/separator.js.map +1 -1
- package/dist/content/slice.d.ts +13 -14
- package/dist/content/slice.d.ts.map +1 -1
- package/dist/content/slice.js.map +1 -1
- package/dist/content/slices.d.ts +13 -14
- package/dist/content/slices.d.ts.map +1 -1
- package/dist/content/slices.js.map +1 -1
- package/dist/content/table.d.ts +1 -2
- package/dist/content/table.d.ts.map +1 -1
- package/dist/content/table.js.map +1 -1
- package/dist/content/uid.d.ts +1 -2
- package/dist/content/uid.d.ts.map +1 -1
- package/dist/content/uid.js.map +1 -1
- package/dist/content/widget.d.ts +0 -1
- package/dist/content/widget.d.ts.map +1 -1
- package/dist/content/widget.js.map +1 -1
- package/dist/helpers/contentPath.d.ts +1 -1
- package/dist/helpers/contentPath.d.ts.map +1 -1
- package/dist/helpers/contentPath.js +1 -1
- package/dist/helpers/contentPath.js.map +1 -1
- package/dist/helpers/customTypeModel.d.ts +3 -4
- package/dist/helpers/customTypeModel.d.ts.map +1 -1
- package/dist/helpers/customTypeModel.js +1 -1
- package/dist/helpers/customTypeModel.js.map +1 -1
- package/dist/helpers/documentContent.d.ts +1 -3
- package/dist/helpers/documentContent.d.ts.map +1 -1
- package/dist/helpers/documentContent.js +1 -1
- package/dist/helpers/documentContent.js.map +1 -1
- package/dist/helpers/fieldModel.d.ts +1 -1
- package/dist/helpers/fieldModel.d.ts.map +1 -1
- package/dist/helpers/fieldModel.js +1 -1
- package/dist/helpers/fieldModel.js.map +1 -1
- package/dist/helpers/imageContent.d.ts +2 -6
- package/dist/helpers/imageContent.d.ts.map +1 -1
- package/dist/helpers/imageContent.js +1 -1
- package/dist/helpers/imageContent.js.map +1 -1
- package/dist/helpers/repository.d.ts +1 -1
- package/dist/helpers/repository.d.ts.map +1 -1
- package/dist/helpers/repository.js +1 -1
- package/dist/helpers/repository.js.map +1 -1
- package/dist/helpers/sliceContent.d.ts +1 -3
- package/dist/helpers/sliceContent.d.ts.map +1 -1
- package/dist/helpers/sliceContent.js.map +1 -1
- package/dist/helpers/sliceModel.d.ts +1 -1
- package/dist/helpers/sliceModel.d.ts.map +1 -1
- package/dist/helpers/sliceModel.js +1 -1
- package/dist/helpers/sliceModel.js.map +1 -1
- package/dist/helpers/traverseContent.d.ts +0 -1
- package/dist/helpers/traverseContent.d.ts.map +1 -1
- package/dist/helpers/traverseContent.js.map +1 -1
- package/dist/helpers/traverseContentWithModel.d.ts +0 -1
- package/dist/helpers/traverseContentWithModel.d.ts.map +1 -1
- package/dist/helpers/traverseContentWithModel.js.map +1 -1
- package/dist/helpers/withDefaultContent.d.ts +1 -3
- package/dist/helpers/withDefaultContent.d.ts.map +1 -1
- package/dist/helpers/withDefaultContent.js +1 -1
- package/dist/helpers/withDefaultContent.js.map +1 -1
- package/dist/io-ts.d.ts +1203 -1209
- package/dist/io-ts.d.ts.map +1 -1
- package/dist/io-ts.js.map +1 -1
- package/dist/model/boolean.d.ts +1 -2
- package/dist/model/boolean.d.ts.map +1 -1
- package/dist/model/boolean.js.map +1 -1
- package/dist/model/color.d.ts +1 -2
- package/dist/model/color.d.ts.map +1 -1
- package/dist/model/color.js.map +1 -1
- package/dist/model/customType.d.ts +3 -4
- package/dist/model/customType.d.ts.map +1 -1
- package/dist/model/customType.js +1 -1
- package/dist/model/customType.js.map +1 -1
- package/dist/model/date.d.ts +1 -2
- package/dist/model/date.d.ts.map +1 -1
- package/dist/model/date.js.map +1 -1
- package/dist/model/embed.d.ts +1 -2
- package/dist/model/embed.d.ts.map +1 -1
- package/dist/model/embed.js.map +1 -1
- package/dist/model/geopoint.d.ts +1 -2
- package/dist/model/geopoint.d.ts.map +1 -1
- package/dist/model/geopoint.js.map +1 -1
- package/dist/model/group.d.ts +39 -40
- package/dist/model/group.d.ts.map +1 -1
- package/dist/model/group.js +1 -1
- package/dist/model/group.js.map +1 -1
- package/dist/model/image.d.ts +1 -2
- package/dist/model/image.d.ts.map +1 -1
- package/dist/model/image.js +1 -1
- package/dist/model/image.js.map +1 -1
- package/dist/model/integrationField.d.ts +1 -2
- package/dist/model/integrationField.d.ts.map +1 -1
- package/dist/model/integrationField.js.map +1 -1
- package/dist/model/link.d.ts +2 -3
- package/dist/model/link.d.ts.map +1 -1
- package/dist/model/link.js.map +1 -1
- package/dist/model/nestable.d.ts +0 -1
- package/dist/model/nestable.d.ts.map +1 -1
- package/dist/model/nestable.js.map +1 -1
- package/dist/model/number.d.ts +1 -2
- package/dist/model/number.d.ts.map +1 -1
- package/dist/model/number.js.map +1 -1
- package/dist/model/range.d.ts +1 -2
- package/dist/model/range.d.ts.map +1 -1
- package/dist/model/range.js.map +1 -1
- package/dist/model/richText.d.ts +1 -2
- package/dist/model/richText.d.ts.map +1 -1
- package/dist/model/richText.js +1 -1
- package/dist/model/richText.js.map +1 -1
- package/dist/model/select.d.ts +1 -2
- package/dist/model/select.d.ts.map +1 -1
- package/dist/model/select.js.map +1 -1
- package/dist/model/separator.d.ts +1 -2
- package/dist/model/separator.d.ts.map +1 -1
- package/dist/model/separator.js.map +1 -1
- package/dist/model/slice.d.ts +44 -45
- package/dist/model/slice.d.ts.map +1 -1
- package/dist/model/slice.js +1 -1
- package/dist/model/slice.js.map +1 -1
- package/dist/model/slices.d.ts +1 -2
- package/dist/model/slices.d.ts.map +1 -1
- package/dist/model/slices.js +1 -1
- package/dist/model/slices.js.map +1 -1
- package/dist/model/table.d.ts +3 -3
- package/dist/model/table.d.ts.map +1 -1
- package/dist/model/table.js.map +1 -1
- package/dist/model/text.d.ts +1 -2
- package/dist/model/text.d.ts.map +1 -1
- package/dist/model/text.js.map +1 -1
- package/dist/model/timestamp.d.ts +1 -2
- package/dist/model/timestamp.d.ts.map +1 -1
- package/dist/model/timestamp.js.map +1 -1
- package/dist/model/uid.d.ts +1 -2
- package/dist/model/uid.d.ts.map +1 -1
- package/dist/model/uid.js.map +1 -1
- package/dist/model/widget.d.ts +25 -26
- package/dist/model/widget.d.ts.map +1 -1
- package/dist/model/widget.js +1 -1
- package/dist/model/widget.js.map +1 -1
- package/dist/zod4.d.ts +3351 -3353
- package/dist/zod4.d.ts.map +1 -1
- package/dist/zod4.js.map +1 -1
- package/package.json +12 -13
- package/src/helpers/customTypeModel.ts +6 -1
- package/src/model/image.ts +4 -1
package/dist/model/slice.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NestableModel } from "./nestable.js";
|
|
2
2
|
import { NestedGroupModel } from "./group.js";
|
|
3
3
|
import { z } from "zod/mini";
|
|
4
|
-
|
|
5
4
|
//#region src/model/slice.d.ts
|
|
6
5
|
type LegacySliceModel = NestableModel | NestedGroupModel;
|
|
7
6
|
declare const CompositeSliceModelSchema: z.ZodMiniObject<{
|
|
@@ -78,7 +77,7 @@ declare const CompositeSliceModelSchema: z.ZodMiniObject<{
|
|
|
78
77
|
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
79
78
|
useAsTitle: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
80
79
|
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
81
|
-
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"
|
|
80
|
+
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"document" | "media" | "web" | null, unknown>>>;
|
|
82
81
|
customtypes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
83
82
|
id: z.ZodMiniString<string>;
|
|
84
83
|
fields: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -251,7 +250,7 @@ declare const CompositeSliceModelSchema: z.ZodMiniObject<{
|
|
|
251
250
|
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
252
251
|
useAsTitle: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
253
252
|
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
254
|
-
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"
|
|
253
|
+
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"document" | "media" | "web" | null, unknown>>>;
|
|
255
254
|
customtypes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
256
255
|
id: z.ZodMiniString<string>;
|
|
257
256
|
fields: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -369,7 +368,7 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
369
368
|
docURL: z.ZodMiniString<string>;
|
|
370
369
|
version: z.ZodMiniString<string>;
|
|
371
370
|
display: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
372
|
-
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<
|
|
371
|
+
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<{
|
|
373
372
|
type: "Group";
|
|
374
373
|
fieldset?: string | null | undefined;
|
|
375
374
|
icon?: string | undefined;
|
|
@@ -377,7 +376,7 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
377
376
|
config?: {
|
|
378
377
|
label?: string | null | undefined;
|
|
379
378
|
repeat?: boolean | undefined;
|
|
380
|
-
fields?: Record<string,
|
|
379
|
+
fields?: Record<string, {
|
|
381
380
|
type: "Group";
|
|
382
381
|
fieldset?: string | null | undefined;
|
|
383
382
|
icon?: string | undefined;
|
|
@@ -453,7 +452,7 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
453
452
|
label?: string | null | undefined;
|
|
454
453
|
useAsTitle?: boolean | undefined;
|
|
455
454
|
placeholder?: string | undefined;
|
|
456
|
-
select?: "
|
|
455
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
457
456
|
customtypes?: (string | {
|
|
458
457
|
id: string;
|
|
459
458
|
fields: (string | {
|
|
@@ -559,9 +558,9 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
559
558
|
} | undefined;
|
|
560
559
|
}> | undefined;
|
|
561
560
|
} | undefined;
|
|
562
|
-
}> | undefined;
|
|
561
|
+
} | NestableModel> | undefined;
|
|
563
562
|
} | undefined;
|
|
564
|
-
}, unknown, z.core.$ZodTypeInternals<
|
|
563
|
+
} | NestableModel, unknown, z.core.$ZodTypeInternals<{
|
|
565
564
|
type: "Group";
|
|
566
565
|
fieldset?: string | null | undefined;
|
|
567
566
|
icon?: string | undefined;
|
|
@@ -569,7 +568,7 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
569
568
|
config?: {
|
|
570
569
|
label?: string | null | undefined;
|
|
571
570
|
repeat?: boolean | undefined;
|
|
572
|
-
fields?: Record<string,
|
|
571
|
+
fields?: Record<string, {
|
|
573
572
|
type: "Group";
|
|
574
573
|
fieldset?: string | null | undefined;
|
|
575
574
|
icon?: string | undefined;
|
|
@@ -645,7 +644,7 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
645
644
|
label?: string | null | undefined;
|
|
646
645
|
useAsTitle?: boolean | undefined;
|
|
647
646
|
placeholder?: string | undefined;
|
|
648
|
-
select?: "
|
|
647
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
649
648
|
customtypes?: (string | {
|
|
650
649
|
id: string;
|
|
651
650
|
fields: (string | {
|
|
@@ -751,9 +750,9 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
751
750
|
} | undefined;
|
|
752
751
|
}> | undefined;
|
|
753
752
|
} | undefined;
|
|
754
|
-
}> | undefined;
|
|
753
|
+
} | NestableModel> | undefined;
|
|
755
754
|
} | undefined;
|
|
756
|
-
}, unknown>>>>;
|
|
755
|
+
} | NestableModel, unknown>>>>;
|
|
757
756
|
items: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
758
757
|
type: z.ZodMiniLiteral<"Boolean">;
|
|
759
758
|
config: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -822,7 +821,7 @@ declare const SharedSliceModelVariationSchema: z.ZodMiniObject<{
|
|
|
822
821
|
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
823
822
|
useAsTitle: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
824
823
|
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
825
|
-
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"
|
|
824
|
+
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"document" | "media" | "web" | null, unknown>>>;
|
|
826
825
|
customtypes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
827
826
|
id: z.ZodMiniString<string>;
|
|
828
827
|
fields: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -941,7 +940,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
941
940
|
docURL: z.ZodMiniString<string>;
|
|
942
941
|
version: z.ZodMiniString<string>;
|
|
943
942
|
display: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
944
|
-
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<
|
|
943
|
+
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<{
|
|
945
944
|
type: "Group";
|
|
946
945
|
fieldset?: string | null | undefined;
|
|
947
946
|
icon?: string | undefined;
|
|
@@ -949,7 +948,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
949
948
|
config?: {
|
|
950
949
|
label?: string | null | undefined;
|
|
951
950
|
repeat?: boolean | undefined;
|
|
952
|
-
fields?: Record<string,
|
|
951
|
+
fields?: Record<string, {
|
|
953
952
|
type: "Group";
|
|
954
953
|
fieldset?: string | null | undefined;
|
|
955
954
|
icon?: string | undefined;
|
|
@@ -1025,7 +1024,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1025
1024
|
label?: string | null | undefined;
|
|
1026
1025
|
useAsTitle?: boolean | undefined;
|
|
1027
1026
|
placeholder?: string | undefined;
|
|
1028
|
-
select?: "
|
|
1027
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
1029
1028
|
customtypes?: (string | {
|
|
1030
1029
|
id: string;
|
|
1031
1030
|
fields: (string | {
|
|
@@ -1131,9 +1130,9 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1131
1130
|
} | undefined;
|
|
1132
1131
|
}> | undefined;
|
|
1133
1132
|
} | undefined;
|
|
1134
|
-
}> | undefined;
|
|
1133
|
+
} | NestableModel> | undefined;
|
|
1135
1134
|
} | undefined;
|
|
1136
|
-
}, unknown, z.core.$ZodTypeInternals<
|
|
1135
|
+
} | NestableModel, unknown, z.core.$ZodTypeInternals<{
|
|
1137
1136
|
type: "Group";
|
|
1138
1137
|
fieldset?: string | null | undefined;
|
|
1139
1138
|
icon?: string | undefined;
|
|
@@ -1141,7 +1140,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1141
1140
|
config?: {
|
|
1142
1141
|
label?: string | null | undefined;
|
|
1143
1142
|
repeat?: boolean | undefined;
|
|
1144
|
-
fields?: Record<string,
|
|
1143
|
+
fields?: Record<string, {
|
|
1145
1144
|
type: "Group";
|
|
1146
1145
|
fieldset?: string | null | undefined;
|
|
1147
1146
|
icon?: string | undefined;
|
|
@@ -1217,7 +1216,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1217
1216
|
label?: string | null | undefined;
|
|
1218
1217
|
useAsTitle?: boolean | undefined;
|
|
1219
1218
|
placeholder?: string | undefined;
|
|
1220
|
-
select?: "
|
|
1219
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
1221
1220
|
customtypes?: (string | {
|
|
1222
1221
|
id: string;
|
|
1223
1222
|
fields: (string | {
|
|
@@ -1323,9 +1322,9 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1323
1322
|
} | undefined;
|
|
1324
1323
|
}> | undefined;
|
|
1325
1324
|
} | undefined;
|
|
1326
|
-
}> | undefined;
|
|
1325
|
+
} | NestableModel> | undefined;
|
|
1327
1326
|
} | undefined;
|
|
1328
|
-
}, unknown>>>>;
|
|
1327
|
+
} | NestableModel, unknown>>>>;
|
|
1329
1328
|
items: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
1330
1329
|
type: z.ZodMiniLiteral<"Boolean">;
|
|
1331
1330
|
config: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -1394,7 +1393,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1394
1393
|
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
1395
1394
|
useAsTitle: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
1396
1395
|
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1397
|
-
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"
|
|
1396
|
+
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"document" | "media" | "web" | null, unknown>>>;
|
|
1398
1397
|
customtypes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
1399
1398
|
id: z.ZodMiniString<string>;
|
|
1400
1399
|
fields: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -1504,7 +1503,6 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1504
1503
|
legacyPaths: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
1505
1504
|
schema: z.ZodMiniOptional<z.ZodMiniUndefined>;
|
|
1506
1505
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
1507
|
-
schema: z.ZodMiniLiteral<"@prismicio/types-internal@4.5.0">;
|
|
1508
1506
|
id: z.ZodMiniString<string>;
|
|
1509
1507
|
type: z.ZodMiniLiteral<"SharedSlice">;
|
|
1510
1508
|
name: z.ZodMiniString<string>;
|
|
@@ -1516,7 +1514,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1516
1514
|
docURL: z.ZodMiniString<string>;
|
|
1517
1515
|
version: z.ZodMiniString<string>;
|
|
1518
1516
|
display: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1519
|
-
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<
|
|
1517
|
+
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<{
|
|
1520
1518
|
type: "Group";
|
|
1521
1519
|
fieldset?: string | null | undefined;
|
|
1522
1520
|
icon?: string | undefined;
|
|
@@ -1524,7 +1522,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1524
1522
|
config?: {
|
|
1525
1523
|
label?: string | null | undefined;
|
|
1526
1524
|
repeat?: boolean | undefined;
|
|
1527
|
-
fields?: Record<string,
|
|
1525
|
+
fields?: Record<string, {
|
|
1528
1526
|
type: "Group";
|
|
1529
1527
|
fieldset?: string | null | undefined;
|
|
1530
1528
|
icon?: string | undefined;
|
|
@@ -1600,7 +1598,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1600
1598
|
label?: string | null | undefined;
|
|
1601
1599
|
useAsTitle?: boolean | undefined;
|
|
1602
1600
|
placeholder?: string | undefined;
|
|
1603
|
-
select?: "
|
|
1601
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
1604
1602
|
customtypes?: (string | {
|
|
1605
1603
|
id: string;
|
|
1606
1604
|
fields: (string | {
|
|
@@ -1706,9 +1704,9 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1706
1704
|
} | undefined;
|
|
1707
1705
|
}> | undefined;
|
|
1708
1706
|
} | undefined;
|
|
1709
|
-
}> | undefined;
|
|
1707
|
+
} | NestableModel> | undefined;
|
|
1710
1708
|
} | undefined;
|
|
1711
|
-
}, unknown, z.core.$ZodTypeInternals<
|
|
1709
|
+
} | NestableModel, unknown, z.core.$ZodTypeInternals<{
|
|
1712
1710
|
type: "Group";
|
|
1713
1711
|
fieldset?: string | null | undefined;
|
|
1714
1712
|
icon?: string | undefined;
|
|
@@ -1716,7 +1714,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1716
1714
|
config?: {
|
|
1717
1715
|
label?: string | null | undefined;
|
|
1718
1716
|
repeat?: boolean | undefined;
|
|
1719
|
-
fields?: Record<string,
|
|
1717
|
+
fields?: Record<string, {
|
|
1720
1718
|
type: "Group";
|
|
1721
1719
|
fieldset?: string | null | undefined;
|
|
1722
1720
|
icon?: string | undefined;
|
|
@@ -1792,7 +1790,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1792
1790
|
label?: string | null | undefined;
|
|
1793
1791
|
useAsTitle?: boolean | undefined;
|
|
1794
1792
|
placeholder?: string | undefined;
|
|
1795
|
-
select?: "
|
|
1793
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
1796
1794
|
customtypes?: (string | {
|
|
1797
1795
|
id: string;
|
|
1798
1796
|
fields: (string | {
|
|
@@ -1898,9 +1896,9 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1898
1896
|
} | undefined;
|
|
1899
1897
|
}> | undefined;
|
|
1900
1898
|
} | undefined;
|
|
1901
|
-
}> | undefined;
|
|
1899
|
+
} | NestableModel> | undefined;
|
|
1902
1900
|
} | undefined;
|
|
1903
|
-
}, unknown>>>>;
|
|
1901
|
+
} | NestableModel, unknown>>>>;
|
|
1904
1902
|
items: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
1905
1903
|
type: z.ZodMiniLiteral<"Boolean">;
|
|
1906
1904
|
config: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -1969,7 +1967,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
1969
1967
|
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
1970
1968
|
useAsTitle: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
1971
1969
|
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1972
|
-
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"
|
|
1970
|
+
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"document" | "media" | "web" | null, unknown>>>;
|
|
1973
1971
|
customtypes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
1974
1972
|
id: z.ZodMiniString<string>;
|
|
1975
1973
|
fields: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -2077,6 +2075,7 @@ declare const SharedSliceModelSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObje
|
|
|
2077
2075
|
}, z.core.$strip>>;
|
|
2078
2076
|
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2079
2077
|
legacyPaths: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
2078
|
+
schema: z.ZodMiniLiteral<"@prismicio/types-internal@4.5.0">;
|
|
2080
2079
|
}, z.core.$strip>], "schema">;
|
|
2081
2080
|
type SharedSliceModel = z.infer<typeof SharedSliceModelSchema>;
|
|
2082
2081
|
declare const SharedSliceRefModelSchema: z.ZodMiniObject<{
|
|
@@ -2088,7 +2087,7 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2088
2087
|
sliceName: z.ZodMiniString<string>;
|
|
2089
2088
|
variationID: z.ZodMiniString<string>;
|
|
2090
2089
|
fields: z.ZodMiniObject<{
|
|
2091
|
-
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<
|
|
2090
|
+
primary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniType<{
|
|
2092
2091
|
type: "Group";
|
|
2093
2092
|
fieldset?: string | null | undefined;
|
|
2094
2093
|
icon?: string | undefined;
|
|
@@ -2096,7 +2095,7 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2096
2095
|
config?: {
|
|
2097
2096
|
label?: string | null | undefined;
|
|
2098
2097
|
repeat?: boolean | undefined;
|
|
2099
|
-
fields?: Record<string,
|
|
2098
|
+
fields?: Record<string, {
|
|
2100
2099
|
type: "Group";
|
|
2101
2100
|
fieldset?: string | null | undefined;
|
|
2102
2101
|
icon?: string | undefined;
|
|
@@ -2172,7 +2171,7 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2172
2171
|
label?: string | null | undefined;
|
|
2173
2172
|
useAsTitle?: boolean | undefined;
|
|
2174
2173
|
placeholder?: string | undefined;
|
|
2175
|
-
select?: "
|
|
2174
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
2176
2175
|
customtypes?: (string | {
|
|
2177
2176
|
id: string;
|
|
2178
2177
|
fields: (string | {
|
|
@@ -2278,9 +2277,9 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2278
2277
|
} | undefined;
|
|
2279
2278
|
}> | undefined;
|
|
2280
2279
|
} | undefined;
|
|
2281
|
-
}> | undefined;
|
|
2280
|
+
} | NestableModel> | undefined;
|
|
2282
2281
|
} | undefined;
|
|
2283
|
-
}, unknown, z.core.$ZodTypeInternals<
|
|
2282
|
+
} | NestableModel, unknown, z.core.$ZodTypeInternals<{
|
|
2284
2283
|
type: "Group";
|
|
2285
2284
|
fieldset?: string | null | undefined;
|
|
2286
2285
|
icon?: string | undefined;
|
|
@@ -2288,7 +2287,7 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2288
2287
|
config?: {
|
|
2289
2288
|
label?: string | null | undefined;
|
|
2290
2289
|
repeat?: boolean | undefined;
|
|
2291
|
-
fields?: Record<string,
|
|
2290
|
+
fields?: Record<string, {
|
|
2292
2291
|
type: "Group";
|
|
2293
2292
|
fieldset?: string | null | undefined;
|
|
2294
2293
|
icon?: string | undefined;
|
|
@@ -2364,7 +2363,7 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2364
2363
|
label?: string | null | undefined;
|
|
2365
2364
|
useAsTitle?: boolean | undefined;
|
|
2366
2365
|
placeholder?: string | undefined;
|
|
2367
|
-
select?: "
|
|
2366
|
+
select?: "document" | "media" | "web" | null | undefined;
|
|
2368
2367
|
customtypes?: (string | {
|
|
2369
2368
|
id: string;
|
|
2370
2369
|
fields: (string | {
|
|
@@ -2470,9 +2469,9 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2470
2469
|
} | undefined;
|
|
2471
2470
|
}> | undefined;
|
|
2472
2471
|
} | undefined;
|
|
2473
|
-
}> | undefined;
|
|
2472
|
+
} | NestableModel> | undefined;
|
|
2474
2473
|
} | undefined;
|
|
2475
|
-
}, unknown>>>>;
|
|
2474
|
+
} | NestableModel, unknown>>>>;
|
|
2476
2475
|
items: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
2477
2476
|
type: z.ZodMiniLiteral<"Boolean">;
|
|
2478
2477
|
config: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
@@ -2541,7 +2540,7 @@ declare const SharedSliceVariationContentModelSchema: z.ZodMiniObject<{
|
|
|
2541
2540
|
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
2542
2541
|
useAsTitle: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2543
2542
|
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2544
|
-
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"
|
|
2543
|
+
select: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<"document" | "media" | "web" | null, unknown>>>;
|
|
2545
2544
|
customtypes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
2546
2545
|
id: z.ZodMiniString<string>;
|
|
2547
2546
|
fields: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -2655,5 +2654,5 @@ type SliceContentModel = CompositeSliceModel | LegacySliceModel | SharedSliceVar
|
|
|
2655
2654
|
declare const SliceModelTypeSchema: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"Slice">, z.ZodMiniLiteral<"SharedSlice">]>;
|
|
2656
2655
|
type SliceModelType = z.infer<typeof SliceModelTypeSchema>;
|
|
2657
2656
|
//#endregion
|
|
2658
|
-
export { CompositeSliceModel, DynamicSliceModel, LegacySliceModel, SharedSliceModel, SharedSliceModelVariation, SharedSliceRefModel, SharedSliceVariationContentModel, SliceContentModel, SliceModelType, StaticSliceModel };
|
|
2657
|
+
export { CompositeSliceModel, CompositeSliceModelSchema, DynamicSliceModel, LegacySliceModel, SharedSliceModel, SharedSliceModelSchema, SharedSliceModelVariation, SharedSliceModelVariationSchema, SharedSliceRefModel, SharedSliceRefModelSchema, SharedSliceVariationContentModel, SharedSliceVariationContentModelSchema, SliceContentModel, SliceModelType, SliceModelTypeSchema, StaticSliceModel };
|
|
2659
2658
|
//# sourceMappingURL=slice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice.d.ts","names":[],"sources":["../../src/model/slice.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"slice.d.ts","names":[],"sources":["../../src/model/slice.ts"],"mappings":";;;;KAcY,mBAAmB,gBAAgB;cASlC,2BAAyB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW1B,sBAAsB,EAAE,aAAa;cAQpC,iCAA+B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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WI,oBAAoB,sBAAsB,mBAAmB;KAQ7D,mBAAmB,sBAAsB,mBAAmB;KAS5D,oBACT,sBACA,mBACA;cAGU,sBAAoB,EAAA,uBAAA,EAAA,yBAAA,EAAA;KAKrB,iBAAiB,EAAE,aAAa"}
|
package/dist/model/slice.js
CHANGED
|
@@ -89,6 +89,6 @@ const SliceContentModelSchema = z.discriminatedUnion("type", [
|
|
|
89
89
|
]);
|
|
90
90
|
const SliceModelTypeSchema = z.union([z.literal(CompositeSliceType), z.literal(SharedSliceType)]);
|
|
91
91
|
//#endregion
|
|
92
|
-
export { CompositeSliceModelSchema, DynamicSliceModelSchema, LegacySliceModelSchema, SharedSliceModelSchema, SharedSliceModelVariationSchema, SharedSliceRefModelSchema, SliceContentModelSchema, SliceModelTypeSchema, StaticSliceModelSchema };
|
|
92
|
+
export { CompositeSliceModelSchema, CompositeSliceType, DynamicSliceModelSchema, LegacySliceModelSchema, SharedSliceModelSchema, SharedSliceModelVariationSchema, SharedSliceRefModelSchema, SharedSliceType, SharedSliceVariationContentModelSchema, SliceContentModelSchema, SliceModelTypeSchema, StaticSliceModelSchema };
|
|
93
93
|
|
|
94
94
|
//# sourceMappingURL=slice.js.map
|
package/dist/model/slice.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice.js","names":[],"sources":["../../src/model/slice.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { WidgetKeySchema } from \"../common/widgetKey\"\nimport type { GroupModel, NestedGroupModel } from \"./group\"\nimport { GroupModelSchema, NestedGroupModelSchema } from \"./group\"\nimport type { NestableModel } from \"./nestable\"\nimport { NestableModelSchema } from \"./nestable\"\n\n// Simple (before 2020)\nexport const LegacySliceModelSchema = z.discriminatedUnion(\"type\", [\n\tNestableModelSchema,\n\tNestedGroupModelSchema,\n])\n\nexport type LegacySliceModel = NestableModel | NestedGroupModel\n\n// Composite (2020 to 2021)\nexport const CompositeSliceType = \"Slice\" as const\n\nconst CompositeSliceConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n})\n\nexport const CompositeSliceModelSchema = z.object({\n\ttype: z.literal(CompositeSliceType),\n\tfieldset: z.nullish(z.string()),\n\tdescription: z.optional(z.string()),\n\ticon: z.optional(z.string()),\n\tdisplay: z.optional(z.string()),\n\t\"non-repeat\": z.optional(z.record(WidgetKeySchema, NestableModelSchema)),\n\trepeat: z.optional(z.record(WidgetKeySchema, NestableModelSchema)),\n\tconfig: z.optional(CompositeSliceConfigSchema),\n})\n\nexport type CompositeSliceModel = z.infer<typeof CompositeSliceModelSchema>\n\n// Shared (2021 to present)\nexport const SharedSliceType = \"SharedSlice\" as const\n\nconst IMAGE_PLACEHOLDER_URL =\n\t\"https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format\"\n\nexport const SharedSliceModelVariationSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tdescription: z.string(),\n\timageUrl: z._default(z.string(), IMAGE_PLACEHOLDER_URL),\n\tdocURL: z.string(),\n\tversion: z.string(),\n\tdisplay: z.optional(z.string()),\n\tprimary: z.optional(\n\t\tz.record(\n\t\t\tz.string(),\n\t\t\tz.discriminatedUnion(\"type\", [NestableModelSchema, GroupModelSchema]) as z.ZodMiniType<\n\t\t\t\tNestableModel | GroupModel\n\t\t\t>,\n\t\t),\n\t),\n\titems: z.optional(z.record(z.string(), NestableModelSchema)),\n})\n\nexport type SharedSliceModelVariation = z.infer<typeof SharedSliceModelVariationSchema>\n\n// 4.4.0 and earlier\nconst SharedSliceModelSchema_4_4_0 = z.object({\n\tid: z.string(),\n\ttype: z.literal(SharedSliceType),\n\tname: z.string(),\n\tvariations: z.array(SharedSliceModelVariationSchema),\n\tdescription: z.optional(z.string()),\n\tlegacyPaths: z.optional(z.record(z.string(), z.string())),\n\tschema: z.optional(z.undefined()),\n})\n\n// 4.5.0 and later\nconst SharedSliceModelSchema_4_5_0 = z\n\t.object({\n\t\t...SharedSliceModelSchema_4_4_0.shape,\n\t\tschema: z.literal(\"@prismicio/types-internal@4.5.0\"),\n\t})\n\t.check(\n\t\tz.superRefine((model, ctx) => {\n\t\t\tif (model.variations.length === 0) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: `Shared slice \"${model.id}\" must have at least one variation`,\n\t\t\t\t\tpath: [\"variations\"],\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// A map of variation IDs to the index they belong to\n\t\t\t// to check for ID uniqueness across all variations.\n\t\t\tconst existingVariationIDs = new Map<string, number>()\n\t\t\tfor (let index = 0; index < model.variations.length; index++) {\n\t\t\t\tconst variation = model.variations[index]\n\n\t\t\t\tconst maybeIndex = existingVariationIDs.get(variation.id)\n\t\t\t\tif (Number.isInteger(maybeIndex)) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: `Variation ID \"${variation.id}\" already exists at index \"${maybeIndex}\"`,\n\t\t\t\t\t\tpath: [\"variations\", index],\n\t\t\t\t\t})\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\texistingVariationIDs.set(variation.id, index)\n\t\t\t}\n\t\t}),\n\t)\n\nexport const SharedSliceModelSchema = z.discriminatedUnion(\"schema\", [\n\tSharedSliceModelSchema_4_4_0,\n\tSharedSliceModelSchema_4_5_0,\n])\n\nexport type SharedSliceModel = z.infer<typeof SharedSliceModelSchema>\n\nexport const SharedSliceRefModelSchema = z.object({\n\ttype: z.literal(SharedSliceType),\n})\n\nexport type SharedSliceRefModel = z.infer<typeof SharedSliceRefModelSchema>\n\n// Used to represent a shared slice content which can only be\n// of a given shared slice variation type.\nexport const SharedSliceVariationContentModelSchema = z.object({\n\ttype: z.literal(SharedSliceType),\n\tsliceName: z.string(),\n\tvariationID: z.string(),\n\tfields: z.pick(SharedSliceModelVariationSchema, { primary: true, items: true }),\n})\n\nexport type SharedSliceVariationContentModel = z.infer<\n\ttypeof SharedSliceVariationContentModelSchema\n>\n\n// All\n\n// Used when slices reference SharedSlice by ref (not full definition)\nexport const DynamicSliceModelSchema: z.ZodMiniType<DynamicSliceModel> = z.discriminatedUnion(\n\t\"type\",\n\t[CompositeSliceModelSchema, LegacySliceModelSchema, SharedSliceRefModelSchema],\n)\n\nexport type DynamicSliceModel = CompositeSliceModel | LegacySliceModel | SharedSliceRefModel\n\n// Used when slices include full SharedSlice definition\nexport const StaticSliceModelSchema: z.ZodMiniType<StaticSliceModel> = z.discriminatedUnion(\n\t\"type\",\n\t[CompositeSliceModelSchema, LegacySliceModelSchema, SharedSliceModelSchema],\n)\n\nexport type StaticSliceModel = CompositeSliceModel | LegacySliceModel | SharedSliceModel\n\n// Used to represent a slice content model as shared slice variations\n// can only be of a given shared slice variation type.\nexport const SliceContentModelSchema: z.ZodMiniType<SliceContentModel> = z.discriminatedUnion(\n\t\"type\",\n\t[CompositeSliceModelSchema, LegacySliceModelSchema, SharedSliceVariationContentModelSchema],\n)\n\nexport type SliceContentModel =\n\t| CompositeSliceModel\n\t| LegacySliceModel\n\t| SharedSliceVariationContentModel\n\n// Model types\nexport const SliceModelTypeSchema = z.union([\n\tz.literal(CompositeSliceType),\n\tz.literal(SharedSliceType),\n])\n\nexport type SliceModelType = z.infer<typeof SliceModelTypeSchema>\n"],"mappings":";;;;;AASA,MAAa,yBAAyB,EAAE,mBAAmB,QAAQ,CAClE,qBACA,
|
|
1
|
+
{"version":3,"file":"slice.js","names":[],"sources":["../../src/model/slice.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { WidgetKeySchema } from \"../common/widgetKey\"\nimport type { GroupModel, NestedGroupModel } from \"./group\"\nimport { GroupModelSchema, NestedGroupModelSchema } from \"./group\"\nimport type { NestableModel } from \"./nestable\"\nimport { NestableModelSchema } from \"./nestable\"\n\n// Simple (before 2020)\nexport const LegacySliceModelSchema = z.discriminatedUnion(\"type\", [\n\tNestableModelSchema,\n\tNestedGroupModelSchema,\n])\n\nexport type LegacySliceModel = NestableModel | NestedGroupModel\n\n// Composite (2020 to 2021)\nexport const CompositeSliceType = \"Slice\" as const\n\nconst CompositeSliceConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n})\n\nexport const CompositeSliceModelSchema = z.object({\n\ttype: z.literal(CompositeSliceType),\n\tfieldset: z.nullish(z.string()),\n\tdescription: z.optional(z.string()),\n\ticon: z.optional(z.string()),\n\tdisplay: z.optional(z.string()),\n\t\"non-repeat\": z.optional(z.record(WidgetKeySchema, NestableModelSchema)),\n\trepeat: z.optional(z.record(WidgetKeySchema, NestableModelSchema)),\n\tconfig: z.optional(CompositeSliceConfigSchema),\n})\n\nexport type CompositeSliceModel = z.infer<typeof CompositeSliceModelSchema>\n\n// Shared (2021 to present)\nexport const SharedSliceType = \"SharedSlice\" as const\n\nconst IMAGE_PLACEHOLDER_URL =\n\t\"https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format\"\n\nexport const SharedSliceModelVariationSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tdescription: z.string(),\n\timageUrl: z._default(z.string(), IMAGE_PLACEHOLDER_URL),\n\tdocURL: z.string(),\n\tversion: z.string(),\n\tdisplay: z.optional(z.string()),\n\tprimary: z.optional(\n\t\tz.record(\n\t\t\tz.string(),\n\t\t\tz.discriminatedUnion(\"type\", [NestableModelSchema, GroupModelSchema]) as z.ZodMiniType<\n\t\t\t\tNestableModel | GroupModel\n\t\t\t>,\n\t\t),\n\t),\n\titems: z.optional(z.record(z.string(), NestableModelSchema)),\n})\n\nexport type SharedSliceModelVariation = z.infer<typeof SharedSliceModelVariationSchema>\n\n// 4.4.0 and earlier\nconst SharedSliceModelSchema_4_4_0 = z.object({\n\tid: z.string(),\n\ttype: z.literal(SharedSliceType),\n\tname: z.string(),\n\tvariations: z.array(SharedSliceModelVariationSchema),\n\tdescription: z.optional(z.string()),\n\tlegacyPaths: z.optional(z.record(z.string(), z.string())),\n\tschema: z.optional(z.undefined()),\n})\n\n// 4.5.0 and later\nconst SharedSliceModelSchema_4_5_0 = z\n\t.object({\n\t\t...SharedSliceModelSchema_4_4_0.shape,\n\t\tschema: z.literal(\"@prismicio/types-internal@4.5.0\"),\n\t})\n\t.check(\n\t\tz.superRefine((model, ctx) => {\n\t\t\tif (model.variations.length === 0) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: `Shared slice \"${model.id}\" must have at least one variation`,\n\t\t\t\t\tpath: [\"variations\"],\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// A map of variation IDs to the index they belong to\n\t\t\t// to check for ID uniqueness across all variations.\n\t\t\tconst existingVariationIDs = new Map<string, number>()\n\t\t\tfor (let index = 0; index < model.variations.length; index++) {\n\t\t\t\tconst variation = model.variations[index]\n\n\t\t\t\tconst maybeIndex = existingVariationIDs.get(variation.id)\n\t\t\t\tif (Number.isInteger(maybeIndex)) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: `Variation ID \"${variation.id}\" already exists at index \"${maybeIndex}\"`,\n\t\t\t\t\t\tpath: [\"variations\", index],\n\t\t\t\t\t})\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\texistingVariationIDs.set(variation.id, index)\n\t\t\t}\n\t\t}),\n\t)\n\nexport const SharedSliceModelSchema = z.discriminatedUnion(\"schema\", [\n\tSharedSliceModelSchema_4_4_0,\n\tSharedSliceModelSchema_4_5_0,\n])\n\nexport type SharedSliceModel = z.infer<typeof SharedSliceModelSchema>\n\nexport const SharedSliceRefModelSchema = z.object({\n\ttype: z.literal(SharedSliceType),\n})\n\nexport type SharedSliceRefModel = z.infer<typeof SharedSliceRefModelSchema>\n\n// Used to represent a shared slice content which can only be\n// of a given shared slice variation type.\nexport const SharedSliceVariationContentModelSchema = z.object({\n\ttype: z.literal(SharedSliceType),\n\tsliceName: z.string(),\n\tvariationID: z.string(),\n\tfields: z.pick(SharedSliceModelVariationSchema, { primary: true, items: true }),\n})\n\nexport type SharedSliceVariationContentModel = z.infer<\n\ttypeof SharedSliceVariationContentModelSchema\n>\n\n// All\n\n// Used when slices reference SharedSlice by ref (not full definition)\nexport const DynamicSliceModelSchema: z.ZodMiniType<DynamicSliceModel> = z.discriminatedUnion(\n\t\"type\",\n\t[CompositeSliceModelSchema, LegacySliceModelSchema, SharedSliceRefModelSchema],\n)\n\nexport type DynamicSliceModel = CompositeSliceModel | LegacySliceModel | SharedSliceRefModel\n\n// Used when slices include full SharedSlice definition\nexport const StaticSliceModelSchema: z.ZodMiniType<StaticSliceModel> = z.discriminatedUnion(\n\t\"type\",\n\t[CompositeSliceModelSchema, LegacySliceModelSchema, SharedSliceModelSchema],\n)\n\nexport type StaticSliceModel = CompositeSliceModel | LegacySliceModel | SharedSliceModel\n\n// Used to represent a slice content model as shared slice variations\n// can only be of a given shared slice variation type.\nexport const SliceContentModelSchema: z.ZodMiniType<SliceContentModel> = z.discriminatedUnion(\n\t\"type\",\n\t[CompositeSliceModelSchema, LegacySliceModelSchema, SharedSliceVariationContentModelSchema],\n)\n\nexport type SliceContentModel =\n\t| CompositeSliceModel\n\t| LegacySliceModel\n\t| SharedSliceVariationContentModel\n\n// Model types\nexport const SliceModelTypeSchema = z.union([\n\tz.literal(CompositeSliceType),\n\tz.literal(SharedSliceType),\n])\n\nexport type SliceModelType = z.infer<typeof SliceModelTypeSchema>\n"],"mappings":";;;;;AASA,MAAa,yBAAyB,EAAE,mBAAmB,QAAQ,CAClE,qBACA,sBACD,CAAC;AAKD,MAAa,qBAAqB;AAElC,MAAM,6BAA6B,EAAE,OAAO,EAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,EAC5B,CAAC;AAED,MAAa,4BAA4B,EAAE,OAAO;CACjD,MAAM,EAAE,QAAQ,kBAAkB;CAClC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC9B,aAAa,EAAE,SAA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StaticSliceModel } from "./slice.js";
|
|
2
2
|
import { z } from "zod/mini";
|
|
3
|
-
|
|
4
3
|
//#region src/model/slices.d.ts
|
|
5
4
|
declare const StaticSlicesModelSchema: z.ZodMiniObject<{
|
|
6
5
|
type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"Slices">, z.ZodMiniLiteral<"Choice">]>;
|
|
@@ -29,5 +28,5 @@ declare const DynamicSlicesModelSchema: z.ZodMiniObject<{
|
|
|
29
28
|
}, z.core.$strip>;
|
|
30
29
|
type DynamicSlicesModel = z.infer<typeof DynamicSlicesModelSchema>;
|
|
31
30
|
//#endregion
|
|
32
|
-
export { DynamicSlicesModel, StaticSlicesModel };
|
|
31
|
+
export { DynamicSlicesModel, DynamicSlicesModelSchema, StaticSlicesModel, StaticSlicesModelSchema };
|
|
33
32
|
//# sourceMappingURL=slices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slices.d.ts","names":[],"sources":["../../src/model/slices.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"slices.d.ts","names":[],"sources":["../../src/model/slices.ts"],"mappings":";;;cA+Ca,yBAAuB,EAAA;;;;;;;;;;;;KAExB,oBAAoB,EAAE,aAAa;cAElC,0BAAwB,EAAA;;;;;;;;;;;;KAEzB,qBAAqB,EAAE,aAAa"}
|
package/dist/model/slices.js
CHANGED
|
@@ -24,6 +24,6 @@ const getSlicesSchema = (configSchema) => z.object({
|
|
|
24
24
|
const StaticSlicesModelSchema = getSlicesSchema(StaticSlicesConfigSchema);
|
|
25
25
|
const DynamicSlicesModelSchema = getSlicesSchema(DynamicSlicesConfigSchema);
|
|
26
26
|
//#endregion
|
|
27
|
-
export { DynamicSlicesModelSchema, StaticSlicesModelSchema };
|
|
27
|
+
export { DynamicSlicesModelSchema, LegacySlicesFieldType, SlicesFieldType, SlicesLabelsSchema, StaticSlicesModelSchema };
|
|
28
28
|
|
|
29
29
|
//# sourceMappingURL=slices.js.map
|
package/dist/model/slices.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slices.js","names":[],"sources":["../../src/model/slices.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { WidgetKeySchema } from \"../common/widgetKey\"\nimport { StaticSliceModelSchema, DynamicSliceModelSchema } from \"./slice\"\n\nexport const LegacySlicesFieldType = \"Choice\"\nexport const SlicesFieldType = \"Slices\"\n\n// Label configuration for slices\nconst SlicesLabelSchema = z.object({\n\tname: z.string(),\n\tdisplay: z.optional(z.string()),\n})\n\nexport const SlicesLabelsSchema = z.union([\n\tz.record(z.string(), z.array(SlicesLabelSchema)),\n\tz.null(),\n])\n\n// Config\nconst getSlicesConfigSchema = <\n\tTSliceSchema extends typeof StaticSliceModelSchema | typeof DynamicSliceModelSchema,\n>(\n\tsliceSchema: TSliceSchema,\n) =>\n\tz.object({\n\t\tlabel: z.nullish(z.string()),\n\t\tlabels: z.optional(SlicesLabelsSchema),\n\t\tchoices: z.optional(z.record(WidgetKeySchema, sliceSchema)),\n\t})\n\nconst StaticSlicesConfigSchema = getSlicesConfigSchema(StaticSliceModelSchema)\n\nconst DynamicSlicesConfigSchema = getSlicesConfigSchema(DynamicSliceModelSchema)\n\n// Model\nconst getSlicesSchema = <\n\tTConfig extends typeof StaticSlicesConfigSchema | typeof DynamicSlicesConfigSchema,\n>(\n\tconfigSchema: TConfig,\n) =>\n\tz.object({\n\t\ttype: z.union([z.literal(SlicesFieldType), z.literal(LegacySlicesFieldType)]),\n\t\tfieldset: z.nullish(z.string()),\n\t\tconfig: z.optional(configSchema),\n\t})\n\nexport const StaticSlicesModelSchema = getSlicesSchema(StaticSlicesConfigSchema)\n\nexport type StaticSlicesModel = z.infer<typeof StaticSlicesModelSchema>\n\nexport const DynamicSlicesModelSchema = getSlicesSchema(DynamicSlicesConfigSchema)\n\nexport type DynamicSlicesModel = z.infer<typeof DynamicSlicesModelSchema>\n"],"mappings":";;;;AAKA,MAAa,wBAAwB;AACrC,MAAa,kBAAkB;AAG/B,MAAM,oBAAoB,EAAE,OAAO;CAClC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"slices.js","names":[],"sources":["../../src/model/slices.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { WidgetKeySchema } from \"../common/widgetKey\"\nimport { StaticSliceModelSchema, DynamicSliceModelSchema } from \"./slice\"\n\nexport const LegacySlicesFieldType = \"Choice\"\nexport const SlicesFieldType = \"Slices\"\n\n// Label configuration for slices\nconst SlicesLabelSchema = z.object({\n\tname: z.string(),\n\tdisplay: z.optional(z.string()),\n})\n\nexport const SlicesLabelsSchema = z.union([\n\tz.record(z.string(), z.array(SlicesLabelSchema)),\n\tz.null(),\n])\n\n// Config\nconst getSlicesConfigSchema = <\n\tTSliceSchema extends typeof StaticSliceModelSchema | typeof DynamicSliceModelSchema,\n>(\n\tsliceSchema: TSliceSchema,\n) =>\n\tz.object({\n\t\tlabel: z.nullish(z.string()),\n\t\tlabels: z.optional(SlicesLabelsSchema),\n\t\tchoices: z.optional(z.record(WidgetKeySchema, sliceSchema)),\n\t})\n\nconst StaticSlicesConfigSchema = getSlicesConfigSchema(StaticSliceModelSchema)\n\nconst DynamicSlicesConfigSchema = getSlicesConfigSchema(DynamicSliceModelSchema)\n\n// Model\nconst getSlicesSchema = <\n\tTConfig extends typeof StaticSlicesConfigSchema | typeof DynamicSlicesConfigSchema,\n>(\n\tconfigSchema: TConfig,\n) =>\n\tz.object({\n\t\ttype: z.union([z.literal(SlicesFieldType), z.literal(LegacySlicesFieldType)]),\n\t\tfieldset: z.nullish(z.string()),\n\t\tconfig: z.optional(configSchema),\n\t})\n\nexport const StaticSlicesModelSchema = getSlicesSchema(StaticSlicesConfigSchema)\n\nexport type StaticSlicesModel = z.infer<typeof StaticSlicesModelSchema>\n\nexport const DynamicSlicesModelSchema = getSlicesSchema(DynamicSlicesConfigSchema)\n\nexport type DynamicSlicesModel = z.infer<typeof DynamicSlicesModelSchema>\n"],"mappings":";;;;AAKA,MAAa,wBAAwB;AACrC,MAAa,kBAAkB;AAG/B,MAAM,oBAAoB,EAAE,OAAO;CAClC,MAAM,EAAE,OAAO;CACf,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;AAC/B,CAAC;AAED,MAAa,qBAAqB,EAAE,MAAM,CACzC,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,MAAM,iBAAiB,CAAC,GAC/C,EAAE,KAAK,CACR,CAAC;AAGD,MAAM,yBAGL,gBAEA,EAAE,OAAO;CACR,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC3B,QAAQ,EAAE,SAAS,kBAAkB;CACrC,SAAS,EAAE,SAAS,EAAE,OAAO,iBAAiB,WAAW,CAAC;AAC3D,CAAC;AAEF,MAAM,2BAA2B,sBAAsB,sBAAsB;AAE7E,MAAM,4BAA4B,sBAAsB,uBAAuB;AAG/E,MAAM,mBAGL,iBAEA,EAAE,OAAO;CACR,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,eAAe,GAAG,EAAE,QAAQ,qBAAqB,CAAC,CAAC;CAC5E,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC9B,QAAQ,EAAE,SAAS,YAAY;AAChC,CAAC;AAEF,MAAa,0BAA0B,gBAAgB,wBAAwB;AAI/E,MAAa,2BAA2B,gBAAgB,yBAAyB"}
|
package/dist/model/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import "./richText.js";
|
|
1
2
|
import { z } from "zod/mini";
|
|
2
|
-
|
|
3
3
|
//#region src/model/table.d.ts
|
|
4
4
|
declare const TableModelSchema: z.ZodMiniObject<{
|
|
5
5
|
type: z.ZodMiniLiteral<"Table">;
|
|
@@ -8,7 +8,7 @@ declare const TableModelSchema: z.ZodMiniObject<{
|
|
|
8
8
|
}, z.core.$strip>>;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
type TableModel = z.infer<typeof TableModelSchema>;
|
|
11
|
-
declare const TableCellModelNodeTypes: ("
|
|
11
|
+
declare const TableCellModelNodeTypes: ("em" | "hyperlink" | "paragraph" | "strong")[];
|
|
12
12
|
//#endregion
|
|
13
|
-
export { TableCellModelNodeTypes, TableModel };
|
|
13
|
+
export { TableCellModelNodeTypes, TableModel, TableModelSchema };
|
|
14
14
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","names":[],"sources":["../../src/model/table.ts"],"mappings":";;;cAQa,
|
|
1
|
+
{"version":3,"file":"table.d.ts","names":[],"sources":["../../src/model/table.ts"],"mappings":";;;cAQa,kBAAgB,EAAA;;;;;;KAKjB,aAAa,EAAE,aAAa;cAG3B"}
|
package/dist/model/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":[],"sources":["../../src/model/table.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { RichTextModelNodeType, type RichTextModel } from \"./richText\"\n\nconst TableConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n})\n\nexport const TableModelSchema = z.object({\n\ttype: z.literal(\"Table\"),\n\tconfig: z.optional(TableConfigSchema),\n})\n\nexport type TableModel = z.infer<typeof TableModelSchema>\n\n// TableCell configuration constant (used for cell rich text configuration)\nexport const TableCellModelNodeTypes = [\n\tRichTextModelNodeType.paragraph,\n\tRichTextModelNodeType.strong,\n\tRichTextModelNodeType.em,\n\tRichTextModelNodeType.hyperlink,\n]\n\nexport const TableCellModel: RichTextModel = {\n\ttype: \"StructuredText\" as const,\n\tconfig: {\n\t\tmulti: TableCellModelNodeTypes.join(\",\"),\n\t},\n}\n"],"mappings":";;;AAIA,MAAM,oBAAoB,EAAE,OAAO,EAClC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"table.js","names":[],"sources":["../../src/model/table.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { RichTextModelNodeType, type RichTextModel } from \"./richText\"\n\nconst TableConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n})\n\nexport const TableModelSchema = z.object({\n\ttype: z.literal(\"Table\"),\n\tconfig: z.optional(TableConfigSchema),\n})\n\nexport type TableModel = z.infer<typeof TableModelSchema>\n\n// TableCell configuration constant (used for cell rich text configuration)\nexport const TableCellModelNodeTypes = [\n\tRichTextModelNodeType.paragraph,\n\tRichTextModelNodeType.strong,\n\tRichTextModelNodeType.em,\n\tRichTextModelNodeType.hyperlink,\n]\n\nexport const TableCellModel: RichTextModel = {\n\ttype: \"StructuredText\" as const,\n\tconfig: {\n\t\tmulti: TableCellModelNodeTypes.join(\",\"),\n\t},\n}\n"],"mappings":";;;AAIA,MAAM,oBAAoB,EAAE,OAAO,EAClC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,EAC5B,CAAC;AAED,MAAa,mBAAmB,EAAE,OAAO;CACxC,MAAM,EAAE,QAAQ,OAAO;CACvB,QAAQ,EAAE,SAAS,iBAAiB;AACrC,CAAC;AAKD,MAAa,0BAA0B;CACtC,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;AACvB;AAEA,MAAa,iBAAgC;CAC5C,MAAM;CACN,QAAQ,EACP,OAAO,wBAAwB,KAAK,GAAG,EACxC;AACD"}
|
package/dist/model/text.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod/mini";
|
|
2
|
-
|
|
3
2
|
//#region src/model/text.d.ts
|
|
4
3
|
declare const TextModelSchema: z.ZodMiniObject<{
|
|
5
4
|
type: z.ZodMiniLiteral<"Text">;
|
|
@@ -12,5 +11,5 @@ declare const TextModelSchema: z.ZodMiniObject<{
|
|
|
12
11
|
}, z.core.$strip>;
|
|
13
12
|
type TextModel = z.infer<typeof TextModelSchema>;
|
|
14
13
|
//#endregion
|
|
15
|
-
export { TextModel };
|
|
14
|
+
export { TextModel, TextModelSchema };
|
|
16
15
|
//# sourceMappingURL=text.d.ts.map
|
package/dist/model/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","names":[],"sources":["../../src/model/text.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.d.ts","names":[],"sources":["../../src/model/text.ts"],"mappings":";;cAQa,iBAAe,EAAA;;;;;;;;;KAMhB,YAAY,EAAE,aAAa"}
|
package/dist/model/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","names":[],"sources":["../../src/model/text.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst TextConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tuseAsTitle: z.optional(z.boolean()),\n\tplaceholder: z.optional(z.string()),\n})\n\nexport const TextModelSchema = z.object({\n\ttype: z.literal(\"Text\"),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(TextConfigSchema),\n})\n\nexport type TextModel = z.infer<typeof TextModelSchema>\n"],"mappings":";;AAEA,MAAM,mBAAmB,EAAE,OAAO;CACjC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../../src/model/text.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst TextConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tuseAsTitle: z.optional(z.boolean()),\n\tplaceholder: z.optional(z.string()),\n})\n\nexport const TextModelSchema = z.object({\n\ttype: z.literal(\"Text\"),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(TextConfigSchema),\n})\n\nexport type TextModel = z.infer<typeof TextModelSchema>\n"],"mappings":";;AAEA,MAAM,mBAAmB,EAAE,OAAO;CACjC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC3B,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;CAClC,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC;AACnC,CAAC;AAED,MAAa,kBAAkB,EAAE,OAAO;CACvC,MAAM,EAAE,QAAQ,MAAM;CACtB,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC9B,QAAQ,EAAE,SAAS,gBAAgB;AACpC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod/mini";
|
|
2
|
-
|
|
3
2
|
//#region src/model/timestamp.d.ts
|
|
4
3
|
declare const TimestampModelSchema: z.ZodMiniObject<{
|
|
5
4
|
type: z.ZodMiniLiteral<"Timestamp">;
|
|
@@ -12,5 +11,5 @@ declare const TimestampModelSchema: z.ZodMiniObject<{
|
|
|
12
11
|
}, z.core.$strip>;
|
|
13
12
|
type TimestampModel = z.infer<typeof TimestampModelSchema>;
|
|
14
13
|
//#endregion
|
|
15
|
-
export { TimestampModel };
|
|
14
|
+
export { TimestampModel, TimestampModelSchema };
|
|
16
15
|
//# sourceMappingURL=timestamp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.d.ts","names":[],"sources":["../../src/model/timestamp.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"timestamp.d.ts","names":[],"sources":["../../src/model/timestamp.ts"],"mappings":";;cAQa,sBAAoB,EAAA;;;;;;;;;KAMrB,iBAAiB,EAAE,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.js","names":[],"sources":["../../src/model/timestamp.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst TimestampConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tplaceholder: z.optional(z.string()),\n\tdefault: z.optional(z.string()),\n})\n\nexport const TimestampModelSchema = z.object({\n\ttype: z.literal(\"Timestamp\"),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(TimestampConfigSchema),\n})\n\nexport type TimestampModel = z.infer<typeof TimestampModelSchema>\n"],"mappings":";;AAEA,MAAM,wBAAwB,EAAE,OAAO;CACtC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"timestamp.js","names":[],"sources":["../../src/model/timestamp.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst TimestampConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tplaceholder: z.optional(z.string()),\n\tdefault: z.optional(z.string()),\n})\n\nexport const TimestampModelSchema = z.object({\n\ttype: z.literal(\"Timestamp\"),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(TimestampConfigSchema),\n})\n\nexport type TimestampModel = z.infer<typeof TimestampModelSchema>\n"],"mappings":";;AAEA,MAAM,wBAAwB,EAAE,OAAO;CACtC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC3B,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC;CAClC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;AAC/B,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO;CAC5C,MAAM,EAAE,QAAQ,WAAW;CAC3B,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC9B,QAAQ,EAAE,SAAS,qBAAqB;AACzC,CAAC"}
|
package/dist/model/uid.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod/mini";
|
|
2
|
-
|
|
3
2
|
//#region src/model/uid.d.ts
|
|
4
3
|
declare const UIDModelSchema: z.ZodMiniObject<{
|
|
5
4
|
type: z.ZodMiniLiteral<"UID">;
|
|
@@ -12,5 +11,5 @@ declare const UIDModelSchema: z.ZodMiniObject<{
|
|
|
12
11
|
}, z.core.$strip>;
|
|
13
12
|
type UIDModel = z.infer<typeof UIDModelSchema>;
|
|
14
13
|
//#endregion
|
|
15
|
-
export { UIDModel };
|
|
14
|
+
export { UIDModel, UIDModelSchema };
|
|
16
15
|
//# sourceMappingURL=uid.d.ts.map
|
package/dist/model/uid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uid.d.ts","names":[],"sources":["../../src/model/uid.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"uid.d.ts","names":[],"sources":["../../src/model/uid.ts"],"mappings":";;cAQa,gBAAc,EAAA;;;;;;;;;KAMf,WAAW,EAAE,aAAa"}
|
package/dist/model/uid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uid.js","names":[],"sources":["../../src/model/uid.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst UIDConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tuseAsTitle: z.optional(z.boolean()),\n\tplaceholder: z.optional(z.string()),\n})\n\nexport const UIDModelSchema = z.object({\n\ttype: z.literal(\"UID\"),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(UIDConfigSchema),\n})\n\nexport type UIDModel = z.infer<typeof UIDModelSchema>\n"],"mappings":";;AAEA,MAAM,kBAAkB,EAAE,OAAO;CAChC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"uid.js","names":[],"sources":["../../src/model/uid.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nconst UIDConfigSchema = z.object({\n\tlabel: z.nullish(z.string()),\n\tuseAsTitle: z.optional(z.boolean()),\n\tplaceholder: z.optional(z.string()),\n})\n\nexport const UIDModelSchema = z.object({\n\ttype: z.literal(\"UID\"),\n\tfieldset: z.nullish(z.string()),\n\tconfig: z.optional(UIDConfigSchema),\n})\n\nexport type UIDModel = z.infer<typeof UIDModelSchema>\n"],"mappings":";;AAEA,MAAM,kBAAkB,EAAE,OAAO;CAChC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC3B,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;CAClC,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC;AACnC,CAAC;AAED,MAAa,iBAAiB,EAAE,OAAO;CACtC,MAAM,EAAE,QAAQ,KAAK;CACrB,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;CAC9B,QAAQ,EAAE,SAAS,eAAe;AACnC,CAAC"}
|