@squiz/dx-page-contents-lib 1.71.1 → 1.73.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/formatted-text.d.ts +144 -0
- package/lib/formatted-text.js +29 -1
- package/lib/formatted-text.js.map +1 -1
- package/lib/layout-content.d.ts +81 -2
- package/lib/layout-content.js +6 -2
- package/lib/layout-content.js.map +1 -1
- package/lib/layouts/custom-layout.d.ts +150 -25
- package/lib/layouts/index.d.ts +527 -27
- package/lib/layouts/raw.layout.d.ts +103 -3
- package/lib/layouts/single-column.layout.d.ts +103 -3
- package/lib/layouts/two-column.layout.d.ts +206 -6
- package/lib/mocks/PageContentsHelpers.d.ts +661 -36
- package/lib/mocks/PageContentsMocks.js +1 -0
- package/lib/mocks/PageContentsMocks.js.map +1 -1
- package/lib/page-contents-lib.d.ts +1 -1
- package/lib/page-contents-lib.js +2 -1
- package/lib/page-contents-lib.js.map +1 -1
- package/lib/resolvers/default-layout-resolver.d.ts +5 -0
- package/lib/resolvers/default-layout-resolver.js +14 -0
- package/lib/resolvers/default-layout-resolver.js.map +1 -0
- package/lib/resolvers/index.d.ts +1 -0
- package/lib/resolvers/index.js +1 -0
- package/lib/resolvers/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -24,49 +24,49 @@ export declare const CustomLayoutConfig: z.ZodEffects<z.ZodObject<{
|
|
|
24
24
|
minNodes: z.ZodDefault<z.ZodNumber>;
|
|
25
25
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
minNodes: number;
|
|
27
28
|
rootWrapper: {
|
|
28
29
|
tag: string;
|
|
29
30
|
classes?: string[] | undefined;
|
|
30
31
|
};
|
|
31
|
-
|
|
32
|
+
maxNodes?: number | undefined;
|
|
32
33
|
nodeWrapper?: {
|
|
33
34
|
tag: string;
|
|
34
35
|
classes?: string[] | undefined;
|
|
35
36
|
} | undefined;
|
|
36
|
-
maxNodes?: number | undefined;
|
|
37
37
|
}, {
|
|
38
38
|
rootWrapper: {
|
|
39
39
|
tag: string;
|
|
40
40
|
classes?: string[] | undefined;
|
|
41
41
|
};
|
|
42
|
+
minNodes?: number | undefined;
|
|
43
|
+
maxNodes?: number | undefined;
|
|
42
44
|
nodeWrapper?: {
|
|
43
45
|
tag: string;
|
|
44
46
|
classes?: string[] | undefined;
|
|
45
47
|
} | undefined;
|
|
46
|
-
minNodes?: number | undefined;
|
|
47
|
-
maxNodes?: number | undefined;
|
|
48
48
|
}>, {
|
|
49
|
+
minNodes: number;
|
|
49
50
|
rootWrapper: {
|
|
50
51
|
tag: string;
|
|
51
52
|
classes?: string[] | undefined;
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
+
maxNodes?: number | undefined;
|
|
54
55
|
nodeWrapper?: {
|
|
55
56
|
tag: string;
|
|
56
57
|
classes?: string[] | undefined;
|
|
57
58
|
} | undefined;
|
|
58
|
-
maxNodes?: number | undefined;
|
|
59
59
|
}, {
|
|
60
60
|
rootWrapper: {
|
|
61
61
|
tag: string;
|
|
62
62
|
classes?: string[] | undefined;
|
|
63
63
|
};
|
|
64
|
+
minNodes?: number | undefined;
|
|
65
|
+
maxNodes?: number | undefined;
|
|
64
66
|
nodeWrapper?: {
|
|
65
67
|
tag: string;
|
|
66
68
|
classes?: string[] | undefined;
|
|
67
69
|
} | undefined;
|
|
68
|
-
minNodes?: number | undefined;
|
|
69
|
-
maxNodes?: number | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
72
72
|
name: z.ZodLiteral<"custom-layout">;
|
|
@@ -94,49 +94,49 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
94
94
|
minNodes: z.ZodDefault<z.ZodNumber>;
|
|
95
95
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
96
96
|
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
minNodes: number;
|
|
97
98
|
rootWrapper: {
|
|
98
99
|
tag: string;
|
|
99
100
|
classes?: string[] | undefined;
|
|
100
101
|
};
|
|
101
|
-
|
|
102
|
+
maxNodes?: number | undefined;
|
|
102
103
|
nodeWrapper?: {
|
|
103
104
|
tag: string;
|
|
104
105
|
classes?: string[] | undefined;
|
|
105
106
|
} | undefined;
|
|
106
|
-
maxNodes?: number | undefined;
|
|
107
107
|
}, {
|
|
108
108
|
rootWrapper: {
|
|
109
109
|
tag: string;
|
|
110
110
|
classes?: string[] | undefined;
|
|
111
111
|
};
|
|
112
|
+
minNodes?: number | undefined;
|
|
113
|
+
maxNodes?: number | undefined;
|
|
112
114
|
nodeWrapper?: {
|
|
113
115
|
tag: string;
|
|
114
116
|
classes?: string[] | undefined;
|
|
115
117
|
} | undefined;
|
|
116
|
-
minNodes?: number | undefined;
|
|
117
|
-
maxNodes?: number | undefined;
|
|
118
118
|
}>, {
|
|
119
|
+
minNodes: number;
|
|
119
120
|
rootWrapper: {
|
|
120
121
|
tag: string;
|
|
121
122
|
classes?: string[] | undefined;
|
|
122
123
|
};
|
|
123
|
-
|
|
124
|
+
maxNodes?: number | undefined;
|
|
124
125
|
nodeWrapper?: {
|
|
125
126
|
tag: string;
|
|
126
127
|
classes?: string[] | undefined;
|
|
127
128
|
} | undefined;
|
|
128
|
-
maxNodes?: number | undefined;
|
|
129
129
|
}, {
|
|
130
130
|
rootWrapper: {
|
|
131
131
|
tag: string;
|
|
132
132
|
classes?: string[] | undefined;
|
|
133
133
|
};
|
|
134
|
+
minNodes?: number | undefined;
|
|
135
|
+
maxNodes?: number | undefined;
|
|
134
136
|
nodeWrapper?: {
|
|
135
137
|
tag: string;
|
|
136
138
|
classes?: string[] | undefined;
|
|
137
139
|
} | undefined;
|
|
138
|
-
minNodes?: number | undefined;
|
|
139
|
-
maxNodes?: number | undefined;
|
|
140
140
|
}>;
|
|
141
141
|
content: z.ZodObject<{
|
|
142
142
|
main: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodType<{
|
|
@@ -282,6 +282,31 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
282
282
|
}>, z.ZodType<import("../layout-content").LayoutVariationNode, z.ZodTypeDef, {
|
|
283
283
|
type: "variation";
|
|
284
284
|
default: {};
|
|
285
|
+
}>, z.ZodType<import("../layout-content").DeveloperDefinedLayoutNode, z.ZodTypeDef, {
|
|
286
|
+
type: "layout";
|
|
287
|
+
layout: {
|
|
288
|
+
options: Record<string, {
|
|
289
|
+
values: string[];
|
|
290
|
+
displayName: string;
|
|
291
|
+
description: string;
|
|
292
|
+
selectedValue: string;
|
|
293
|
+
}>;
|
|
294
|
+
name: string;
|
|
295
|
+
displayName: string;
|
|
296
|
+
description: string;
|
|
297
|
+
template: string;
|
|
298
|
+
zones: Record<string, {
|
|
299
|
+
displayName: string;
|
|
300
|
+
description: string;
|
|
301
|
+
minNodes: number;
|
|
302
|
+
maxNodes?: number | undefined;
|
|
303
|
+
}>;
|
|
304
|
+
} | {
|
|
305
|
+
options: Record<string, {
|
|
306
|
+
selectedValue: string;
|
|
307
|
+
}>;
|
|
308
|
+
name: string;
|
|
309
|
+
};
|
|
285
310
|
}>]>, "many">, (import("../layout-content").LayoutVariationNode | ({
|
|
286
311
|
value: string;
|
|
287
312
|
type: "text";
|
|
@@ -353,7 +378,7 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
353
378
|
matrixIdentifier?: string | undefined;
|
|
354
379
|
}) & {
|
|
355
380
|
children: import("../layout-content").LayoutContentNodes[];
|
|
356
|
-
})))[], ({
|
|
381
|
+
})) | import("../layout-content").DeveloperDefinedLayoutNode)[], ({
|
|
357
382
|
value: string;
|
|
358
383
|
type: "text";
|
|
359
384
|
} | {
|
|
@@ -425,6 +450,31 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
425
450
|
} | {
|
|
426
451
|
type: "variation";
|
|
427
452
|
default: {};
|
|
453
|
+
} | {
|
|
454
|
+
type: "layout";
|
|
455
|
+
layout: {
|
|
456
|
+
options: Record<string, {
|
|
457
|
+
values: string[];
|
|
458
|
+
displayName: string;
|
|
459
|
+
description: string;
|
|
460
|
+
selectedValue: string;
|
|
461
|
+
}>;
|
|
462
|
+
name: string;
|
|
463
|
+
displayName: string;
|
|
464
|
+
description: string;
|
|
465
|
+
template: string;
|
|
466
|
+
zones: Record<string, {
|
|
467
|
+
displayName: string;
|
|
468
|
+
description: string;
|
|
469
|
+
minNodes: number;
|
|
470
|
+
maxNodes?: number | undefined;
|
|
471
|
+
}>;
|
|
472
|
+
} | {
|
|
473
|
+
options: Record<string, {
|
|
474
|
+
selectedValue: string;
|
|
475
|
+
}>;
|
|
476
|
+
name: string;
|
|
477
|
+
};
|
|
428
478
|
})[]>;
|
|
429
479
|
}, "strip", z.ZodTypeAny, {
|
|
430
480
|
main: (import("../layout-content").LayoutVariationNode | ({
|
|
@@ -498,7 +548,7 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
498
548
|
matrixIdentifier?: string | undefined;
|
|
499
549
|
}) & {
|
|
500
550
|
children: import("../layout-content").LayoutContentNodes[];
|
|
501
|
-
})))[];
|
|
551
|
+
})) | import("../layout-content").DeveloperDefinedLayoutNode)[];
|
|
502
552
|
}, {
|
|
503
553
|
main: ({
|
|
504
554
|
value: string;
|
|
@@ -572,6 +622,31 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
572
622
|
} | {
|
|
573
623
|
type: "variation";
|
|
574
624
|
default: {};
|
|
625
|
+
} | {
|
|
626
|
+
type: "layout";
|
|
627
|
+
layout: {
|
|
628
|
+
options: Record<string, {
|
|
629
|
+
values: string[];
|
|
630
|
+
displayName: string;
|
|
631
|
+
description: string;
|
|
632
|
+
selectedValue: string;
|
|
633
|
+
}>;
|
|
634
|
+
name: string;
|
|
635
|
+
displayName: string;
|
|
636
|
+
description: string;
|
|
637
|
+
template: string;
|
|
638
|
+
zones: Record<string, {
|
|
639
|
+
displayName: string;
|
|
640
|
+
description: string;
|
|
641
|
+
minNodes: number;
|
|
642
|
+
maxNodes?: number | undefined;
|
|
643
|
+
}>;
|
|
644
|
+
} | {
|
|
645
|
+
options: Record<string, {
|
|
646
|
+
selectedValue: string;
|
|
647
|
+
}>;
|
|
648
|
+
name: string;
|
|
649
|
+
};
|
|
575
650
|
})[];
|
|
576
651
|
}>;
|
|
577
652
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -647,20 +722,20 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
647
722
|
matrixIdentifier?: string | undefined;
|
|
648
723
|
}) & {
|
|
649
724
|
children: import("../layout-content").LayoutContentNodes[];
|
|
650
|
-
})))[];
|
|
725
|
+
})) | import("../layout-content").DeveloperDefinedLayoutNode)[];
|
|
651
726
|
};
|
|
652
727
|
name: "custom-layout";
|
|
653
728
|
config: {
|
|
729
|
+
minNodes: number;
|
|
654
730
|
rootWrapper: {
|
|
655
731
|
tag: string;
|
|
656
732
|
classes?: string[] | undefined;
|
|
657
733
|
};
|
|
658
|
-
|
|
734
|
+
maxNodes?: number | undefined;
|
|
659
735
|
nodeWrapper?: {
|
|
660
736
|
tag: string;
|
|
661
737
|
classes?: string[] | undefined;
|
|
662
738
|
} | undefined;
|
|
663
|
-
maxNodes?: number | undefined;
|
|
664
739
|
};
|
|
665
740
|
}, {
|
|
666
741
|
content: {
|
|
@@ -736,6 +811,31 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
736
811
|
} | {
|
|
737
812
|
type: "variation";
|
|
738
813
|
default: {};
|
|
814
|
+
} | {
|
|
815
|
+
type: "layout";
|
|
816
|
+
layout: {
|
|
817
|
+
options: Record<string, {
|
|
818
|
+
values: string[];
|
|
819
|
+
displayName: string;
|
|
820
|
+
description: string;
|
|
821
|
+
selectedValue: string;
|
|
822
|
+
}>;
|
|
823
|
+
name: string;
|
|
824
|
+
displayName: string;
|
|
825
|
+
description: string;
|
|
826
|
+
template: string;
|
|
827
|
+
zones: Record<string, {
|
|
828
|
+
displayName: string;
|
|
829
|
+
description: string;
|
|
830
|
+
minNodes: number;
|
|
831
|
+
maxNodes?: number | undefined;
|
|
832
|
+
}>;
|
|
833
|
+
} | {
|
|
834
|
+
options: Record<string, {
|
|
835
|
+
selectedValue: string;
|
|
836
|
+
}>;
|
|
837
|
+
name: string;
|
|
838
|
+
};
|
|
739
839
|
})[];
|
|
740
840
|
};
|
|
741
841
|
name: "custom-layout";
|
|
@@ -744,12 +844,12 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
744
844
|
tag: string;
|
|
745
845
|
classes?: string[] | undefined;
|
|
746
846
|
};
|
|
847
|
+
minNodes?: number | undefined;
|
|
848
|
+
maxNodes?: number | undefined;
|
|
747
849
|
nodeWrapper?: {
|
|
748
850
|
tag: string;
|
|
749
851
|
classes?: string[] | undefined;
|
|
750
852
|
} | undefined;
|
|
751
|
-
minNodes?: number | undefined;
|
|
752
|
-
maxNodes?: number | undefined;
|
|
753
853
|
};
|
|
754
854
|
}>, {
|
|
755
855
|
name: "custom-layout";
|
|
@@ -831,6 +931,31 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
831
931
|
} | {
|
|
832
932
|
type: "variation";
|
|
833
933
|
default: {};
|
|
934
|
+
} | {
|
|
935
|
+
type: "layout";
|
|
936
|
+
layout: {
|
|
937
|
+
options: Record<string, {
|
|
938
|
+
values: string[];
|
|
939
|
+
displayName: string;
|
|
940
|
+
description: string;
|
|
941
|
+
selectedValue: string;
|
|
942
|
+
}>;
|
|
943
|
+
name: string;
|
|
944
|
+
displayName: string;
|
|
945
|
+
description: string;
|
|
946
|
+
template: string;
|
|
947
|
+
zones: Record<string, {
|
|
948
|
+
displayName: string;
|
|
949
|
+
description: string;
|
|
950
|
+
minNodes: number;
|
|
951
|
+
maxNodes?: number | undefined;
|
|
952
|
+
}>;
|
|
953
|
+
} | {
|
|
954
|
+
options: Record<string, {
|
|
955
|
+
selectedValue: string;
|
|
956
|
+
}>;
|
|
957
|
+
name: string;
|
|
958
|
+
};
|
|
834
959
|
})[];
|
|
835
960
|
};
|
|
836
961
|
name: "custom-layout";
|
|
@@ -839,12 +964,12 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
839
964
|
tag: string;
|
|
840
965
|
classes?: string[] | undefined;
|
|
841
966
|
};
|
|
967
|
+
minNodes?: number | undefined;
|
|
968
|
+
maxNodes?: number | undefined;
|
|
842
969
|
nodeWrapper?: {
|
|
843
970
|
tag: string;
|
|
844
971
|
classes?: string[] | undefined;
|
|
845
972
|
} | undefined;
|
|
846
|
-
minNodes?: number | undefined;
|
|
847
|
-
maxNodes?: number | undefined;
|
|
848
973
|
};
|
|
849
974
|
}>;
|
|
850
975
|
export type CustomLayout = z.infer<typeof CustomLayout>;
|