@squiz/dx-page-contents-lib 1.80.0 → 1.81.1
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 +44 -44
- package/lib/formatted-text.js +9 -5
- package/lib/formatted-text.js.map +1 -1
- package/lib/layout-content.d.ts +44 -44
- package/lib/layouts/custom-layout.d.ts +5 -73
- package/lib/layouts/custom-layout.js +3 -34
- package/lib/layouts/custom-layout.js.map +1 -1
- package/lib/layouts/index.d.ts +3 -25
- package/lib/layouts/index.js +2 -4
- package/lib/layouts/index.js.map +1 -1
- package/lib/mocks/PageContentsHelpers.d.ts +4 -26
- package/lib/page-contents-lib.d.ts +7 -0
- package/lib/page-contents-lib.js +22 -6
- package/lib/page-contents-lib.js.map +1 -1
- package/lib/page-contents-lib.spec.js +560 -35
- package/lib/page-contents-lib.spec.js.map +1 -1
- package/package.json +1 -1
package/lib/formatted-text.d.ts
CHANGED
|
@@ -432,20 +432,20 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
432
432
|
zones: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
433
433
|
displayName: z.ZodString;
|
|
434
434
|
description: z.ZodString;
|
|
435
|
-
minNodes: z.ZodNumber
|
|
435
|
+
minNodes: z.ZodOptional<z.ZodNumber>;
|
|
436
436
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
437
437
|
}, "strip", z.ZodTypeAny, {
|
|
438
438
|
displayName: string;
|
|
439
439
|
description: string;
|
|
440
|
-
minNodes
|
|
440
|
+
minNodes?: number | undefined;
|
|
441
441
|
maxNodes?: number | undefined;
|
|
442
442
|
}, {
|
|
443
443
|
displayName: string;
|
|
444
444
|
description: string;
|
|
445
|
-
minNodes
|
|
445
|
+
minNodes?: number | undefined;
|
|
446
446
|
maxNodes?: number | undefined;
|
|
447
447
|
}>>;
|
|
448
|
-
options: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
448
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
449
449
|
displayName: z.ZodString;
|
|
450
450
|
description: z.ZodString;
|
|
451
451
|
values: z.ZodArray<z.ZodString, "many">;
|
|
@@ -460,14 +460,8 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
460
460
|
displayName: string;
|
|
461
461
|
description: string;
|
|
462
462
|
selectedValue: string;
|
|
463
|
-
}
|
|
463
|
+
}>>>;
|
|
464
464
|
}, "strip", z.ZodTypeAny, {
|
|
465
|
-
options: Record<string, {
|
|
466
|
-
values: string[];
|
|
467
|
-
displayName: string;
|
|
468
|
-
description: string;
|
|
469
|
-
selectedValue: string;
|
|
470
|
-
}>;
|
|
471
465
|
name: string;
|
|
472
466
|
displayName: string;
|
|
473
467
|
description: string;
|
|
@@ -475,16 +469,16 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
475
469
|
zones: Record<string, {
|
|
476
470
|
displayName: string;
|
|
477
471
|
description: string;
|
|
478
|
-
minNodes
|
|
472
|
+
minNodes?: number | undefined;
|
|
479
473
|
maxNodes?: number | undefined;
|
|
480
474
|
}>;
|
|
481
|
-
|
|
482
|
-
options: Record<string, {
|
|
475
|
+
options?: Record<string, {
|
|
483
476
|
values: string[];
|
|
484
477
|
displayName: string;
|
|
485
478
|
description: string;
|
|
486
479
|
selectedValue: string;
|
|
487
|
-
}
|
|
480
|
+
}> | undefined;
|
|
481
|
+
}, {
|
|
488
482
|
name: string;
|
|
489
483
|
displayName: string;
|
|
490
484
|
description: string;
|
|
@@ -492,38 +486,38 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
492
486
|
zones: Record<string, {
|
|
493
487
|
displayName: string;
|
|
494
488
|
description: string;
|
|
495
|
-
minNodes
|
|
489
|
+
minNodes?: number | undefined;
|
|
496
490
|
maxNodes?: number | undefined;
|
|
497
491
|
}>;
|
|
492
|
+
options?: Record<string, {
|
|
493
|
+
values: string[];
|
|
494
|
+
displayName: string;
|
|
495
|
+
description: string;
|
|
496
|
+
selectedValue: string;
|
|
497
|
+
}> | undefined;
|
|
498
498
|
}>, z.ZodObject<{
|
|
499
499
|
name: z.ZodString;
|
|
500
|
-
options: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
500
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
501
501
|
selectedValue: z.ZodString;
|
|
502
502
|
}, "strip", z.ZodTypeAny, {
|
|
503
503
|
selectedValue: string;
|
|
504
504
|
}, {
|
|
505
505
|
selectedValue: string;
|
|
506
|
-
}
|
|
506
|
+
}>>>;
|
|
507
507
|
}, "strip", z.ZodTypeAny, {
|
|
508
|
-
options: Record<string, {
|
|
509
|
-
selectedValue: string;
|
|
510
|
-
}>;
|
|
511
508
|
name: string;
|
|
512
|
-
|
|
513
|
-
options: Record<string, {
|
|
509
|
+
options?: Record<string, {
|
|
514
510
|
selectedValue: string;
|
|
515
|
-
}
|
|
511
|
+
}> | undefined;
|
|
512
|
+
}, {
|
|
516
513
|
name: string;
|
|
514
|
+
options?: Record<string, {
|
|
515
|
+
selectedValue: string;
|
|
516
|
+
}> | undefined;
|
|
517
517
|
}>]>;
|
|
518
518
|
}, "strip", z.ZodTypeAny, {
|
|
519
519
|
type: "layout";
|
|
520
520
|
layout: {
|
|
521
|
-
options: Record<string, {
|
|
522
|
-
values: string[];
|
|
523
|
-
displayName: string;
|
|
524
|
-
description: string;
|
|
525
|
-
selectedValue: string;
|
|
526
|
-
}>;
|
|
527
521
|
name: string;
|
|
528
522
|
displayName: string;
|
|
529
523
|
description: string;
|
|
@@ -531,24 +525,24 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
531
525
|
zones: Record<string, {
|
|
532
526
|
displayName: string;
|
|
533
527
|
description: string;
|
|
534
|
-
minNodes
|
|
528
|
+
minNodes?: number | undefined;
|
|
535
529
|
maxNodes?: number | undefined;
|
|
536
530
|
}>;
|
|
537
|
-
|
|
538
|
-
|
|
531
|
+
options?: Record<string, {
|
|
532
|
+
values: string[];
|
|
533
|
+
displayName: string;
|
|
534
|
+
description: string;
|
|
539
535
|
selectedValue: string;
|
|
540
|
-
}
|
|
536
|
+
}> | undefined;
|
|
537
|
+
} | {
|
|
541
538
|
name: string;
|
|
539
|
+
options?: Record<string, {
|
|
540
|
+
selectedValue: string;
|
|
541
|
+
}> | undefined;
|
|
542
542
|
};
|
|
543
543
|
}, {
|
|
544
544
|
type: "layout";
|
|
545
545
|
layout: {
|
|
546
|
-
options: Record<string, {
|
|
547
|
-
values: string[];
|
|
548
|
-
displayName: string;
|
|
549
|
-
description: string;
|
|
550
|
-
selectedValue: string;
|
|
551
|
-
}>;
|
|
552
546
|
name: string;
|
|
553
547
|
displayName: string;
|
|
554
548
|
description: string;
|
|
@@ -556,14 +550,20 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
556
550
|
zones: Record<string, {
|
|
557
551
|
displayName: string;
|
|
558
552
|
description: string;
|
|
559
|
-
minNodes
|
|
553
|
+
minNodes?: number | undefined;
|
|
560
554
|
maxNodes?: number | undefined;
|
|
561
555
|
}>;
|
|
562
|
-
|
|
563
|
-
|
|
556
|
+
options?: Record<string, {
|
|
557
|
+
values: string[];
|
|
558
|
+
displayName: string;
|
|
559
|
+
description: string;
|
|
564
560
|
selectedValue: string;
|
|
565
|
-
}
|
|
561
|
+
}> | undefined;
|
|
562
|
+
} | {
|
|
566
563
|
name: string;
|
|
564
|
+
options?: Record<string, {
|
|
565
|
+
selectedValue: string;
|
|
566
|
+
}> | undefined;
|
|
567
567
|
};
|
|
568
568
|
}>;
|
|
569
569
|
export declare const FragmentNode: z.ZodObject<{
|
package/lib/formatted-text.js
CHANGED
|
@@ -135,21 +135,25 @@ exports.LayoutNode = zod_1.z.object({
|
|
|
135
135
|
zones: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
136
136
|
displayName: zod_1.z.string(),
|
|
137
137
|
description: zod_1.z.string(),
|
|
138
|
-
minNodes: zod_1.z.number().min(0),
|
|
138
|
+
minNodes: zod_1.z.number().min(0).optional(),
|
|
139
139
|
maxNodes: zod_1.z.number().min(1).optional(),
|
|
140
140
|
})),
|
|
141
|
-
options: zod_1.z
|
|
141
|
+
options: zod_1.z
|
|
142
|
+
.record(zod_1.z.string(), zod_1.z.object({
|
|
142
143
|
displayName: zod_1.z.string(),
|
|
143
144
|
description: zod_1.z.string(),
|
|
144
145
|
values: zod_1.z.array(zod_1.z.string()),
|
|
145
146
|
selectedValue: zod_1.z.string(),
|
|
146
|
-
}))
|
|
147
|
+
}))
|
|
148
|
+
.optional(),
|
|
147
149
|
})
|
|
148
150
|
.or(zod_1.z.object({
|
|
149
151
|
name: zod_1.z.string(),
|
|
150
|
-
options: zod_1.z
|
|
152
|
+
options: zod_1.z
|
|
153
|
+
.record(zod_1.z.string(), zod_1.z.object({
|
|
151
154
|
selectedValue: zod_1.z.string(),
|
|
152
|
-
}))
|
|
155
|
+
}))
|
|
156
|
+
.optional(),
|
|
153
157
|
})),
|
|
154
158
|
});
|
|
155
159
|
exports.FragmentNode = zod_1.z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatted-text.js","sourceRoot":"","sources":["../src/formatted-text.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sEAAsE;AACtE,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;CAC1D,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAA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YACP,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;SAC1B,CAAC,CACH;aACA,QAAQ,EAAE;KACd,CAAC,CACH;CACJ,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC"}
|
package/lib/layout-content.d.ts
CHANGED
|
@@ -13,20 +13,20 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
13
13
|
zones: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
14
14
|
displayName: z.ZodString;
|
|
15
15
|
description: z.ZodString;
|
|
16
|
-
minNodes: z.ZodNumber
|
|
16
|
+
minNodes: z.ZodOptional<z.ZodNumber>;
|
|
17
17
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
19
|
displayName: string;
|
|
20
20
|
description: string;
|
|
21
|
-
minNodes
|
|
21
|
+
minNodes?: number | undefined;
|
|
22
22
|
maxNodes?: number | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
displayName: string;
|
|
25
25
|
description: string;
|
|
26
|
-
minNodes
|
|
26
|
+
minNodes?: number | undefined;
|
|
27
27
|
maxNodes?: number | undefined;
|
|
28
28
|
}>>;
|
|
29
|
-
options: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
29
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
30
30
|
displayName: z.ZodString;
|
|
31
31
|
description: z.ZodString;
|
|
32
32
|
values: z.ZodArray<z.ZodString, "many">;
|
|
@@ -41,14 +41,8 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
41
41
|
displayName: string;
|
|
42
42
|
description: string;
|
|
43
43
|
selectedValue: string;
|
|
44
|
-
}
|
|
44
|
+
}>>>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
options: Record<string, {
|
|
47
|
-
values: string[];
|
|
48
|
-
displayName: string;
|
|
49
|
-
description: string;
|
|
50
|
-
selectedValue: string;
|
|
51
|
-
}>;
|
|
52
46
|
name: string;
|
|
53
47
|
displayName: string;
|
|
54
48
|
description: string;
|
|
@@ -56,16 +50,16 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
56
50
|
zones: Record<string, {
|
|
57
51
|
displayName: string;
|
|
58
52
|
description: string;
|
|
59
|
-
minNodes
|
|
53
|
+
minNodes?: number | undefined;
|
|
60
54
|
maxNodes?: number | undefined;
|
|
61
55
|
}>;
|
|
62
|
-
|
|
63
|
-
options: Record<string, {
|
|
56
|
+
options?: Record<string, {
|
|
64
57
|
values: string[];
|
|
65
58
|
displayName: string;
|
|
66
59
|
description: string;
|
|
67
60
|
selectedValue: string;
|
|
68
|
-
}
|
|
61
|
+
}> | undefined;
|
|
62
|
+
}, {
|
|
69
63
|
name: string;
|
|
70
64
|
displayName: string;
|
|
71
65
|
description: string;
|
|
@@ -73,28 +67,34 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
73
67
|
zones: Record<string, {
|
|
74
68
|
displayName: string;
|
|
75
69
|
description: string;
|
|
76
|
-
minNodes
|
|
70
|
+
minNodes?: number | undefined;
|
|
77
71
|
maxNodes?: number | undefined;
|
|
78
72
|
}>;
|
|
73
|
+
options?: Record<string, {
|
|
74
|
+
values: string[];
|
|
75
|
+
displayName: string;
|
|
76
|
+
description: string;
|
|
77
|
+
selectedValue: string;
|
|
78
|
+
}> | undefined;
|
|
79
79
|
}>, z.ZodObject<{
|
|
80
80
|
name: z.ZodString;
|
|
81
|
-
options: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
81
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
82
82
|
selectedValue: z.ZodString;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
selectedValue: string;
|
|
85
85
|
}, {
|
|
86
86
|
selectedValue: string;
|
|
87
|
-
}
|
|
87
|
+
}>>>;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
options: Record<string, {
|
|
90
|
-
selectedValue: string;
|
|
91
|
-
}>;
|
|
92
89
|
name: string;
|
|
93
|
-
|
|
94
|
-
options: Record<string, {
|
|
90
|
+
options?: Record<string, {
|
|
95
91
|
selectedValue: string;
|
|
96
|
-
}
|
|
92
|
+
}> | undefined;
|
|
93
|
+
}, {
|
|
97
94
|
name: string;
|
|
95
|
+
options?: Record<string, {
|
|
96
|
+
selectedValue: string;
|
|
97
|
+
}> | undefined;
|
|
98
98
|
}>]>;
|
|
99
99
|
}, {
|
|
100
100
|
content: z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodType<LayoutContentNodes[], z.ZodTypeDef, unknown[]>>>;
|
|
@@ -102,12 +102,6 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
102
102
|
type: "layout";
|
|
103
103
|
content: Record<string, LayoutContentNodes[]>;
|
|
104
104
|
layout: {
|
|
105
|
-
options: Record<string, {
|
|
106
|
-
values: string[];
|
|
107
|
-
displayName: string;
|
|
108
|
-
description: string;
|
|
109
|
-
selectedValue: string;
|
|
110
|
-
}>;
|
|
111
105
|
name: string;
|
|
112
106
|
displayName: string;
|
|
113
107
|
description: string;
|
|
@@ -115,25 +109,25 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
115
109
|
zones: Record<string, {
|
|
116
110
|
displayName: string;
|
|
117
111
|
description: string;
|
|
118
|
-
minNodes
|
|
112
|
+
minNodes?: number | undefined;
|
|
119
113
|
maxNodes?: number | undefined;
|
|
120
114
|
}>;
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
options?: Record<string, {
|
|
116
|
+
values: string[];
|
|
117
|
+
displayName: string;
|
|
118
|
+
description: string;
|
|
123
119
|
selectedValue: string;
|
|
124
|
-
}
|
|
120
|
+
}> | undefined;
|
|
121
|
+
} | {
|
|
125
122
|
name: string;
|
|
123
|
+
options?: Record<string, {
|
|
124
|
+
selectedValue: string;
|
|
125
|
+
}> | undefined;
|
|
126
126
|
};
|
|
127
127
|
}, {
|
|
128
128
|
type: "layout";
|
|
129
129
|
content: Record<string, unknown[]>;
|
|
130
130
|
layout: {
|
|
131
|
-
options: Record<string, {
|
|
132
|
-
values: string[];
|
|
133
|
-
displayName: string;
|
|
134
|
-
description: string;
|
|
135
|
-
selectedValue: string;
|
|
136
|
-
}>;
|
|
137
131
|
name: string;
|
|
138
132
|
displayName: string;
|
|
139
133
|
description: string;
|
|
@@ -141,14 +135,20 @@ export declare const DeveloperDefinedLayoutNode: z.ZodObject<z.objectUtil.extend
|
|
|
141
135
|
zones: Record<string, {
|
|
142
136
|
displayName: string;
|
|
143
137
|
description: string;
|
|
144
|
-
minNodes
|
|
138
|
+
minNodes?: number | undefined;
|
|
145
139
|
maxNodes?: number | undefined;
|
|
146
140
|
}>;
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
options?: Record<string, {
|
|
142
|
+
values: string[];
|
|
143
|
+
displayName: string;
|
|
144
|
+
description: string;
|
|
149
145
|
selectedValue: string;
|
|
150
|
-
}
|
|
146
|
+
}> | undefined;
|
|
147
|
+
} | {
|
|
151
148
|
name: string;
|
|
149
|
+
options?: Record<string, {
|
|
150
|
+
selectedValue: string;
|
|
151
|
+
}> | undefined;
|
|
152
152
|
};
|
|
153
153
|
}>;
|
|
154
154
|
declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export declare const CustomLayoutConfig: z.ZodEffects<z.ZodObject<{
|
|
2
|
+
export declare const CustomLayoutConfig: z.ZodObject<{
|
|
4
3
|
rootWrapper: z.ZodObject<{
|
|
5
4
|
tag: z.ZodString;
|
|
6
5
|
classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -21,20 +20,9 @@ export declare const CustomLayoutConfig: z.ZodEffects<z.ZodObject<{
|
|
|
21
20
|
tag: string;
|
|
22
21
|
classes?: string[] | undefined;
|
|
23
22
|
}>>;
|
|
24
|
-
minNodes: z.ZodDefault<z.ZodNumber
|
|
23
|
+
minNodes: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
25
24
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
26
25
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
minNodes: number;
|
|
28
|
-
rootWrapper: {
|
|
29
|
-
tag: string;
|
|
30
|
-
classes?: string[] | undefined;
|
|
31
|
-
};
|
|
32
|
-
maxNodes?: number | undefined;
|
|
33
|
-
nodeWrapper?: {
|
|
34
|
-
tag: string;
|
|
35
|
-
classes?: string[] | undefined;
|
|
36
|
-
} | undefined;
|
|
37
|
-
}, {
|
|
38
26
|
rootWrapper: {
|
|
39
27
|
tag: string;
|
|
40
28
|
classes?: string[] | undefined;
|
|
@@ -45,17 +33,6 @@ export declare const CustomLayoutConfig: z.ZodEffects<z.ZodObject<{
|
|
|
45
33
|
tag: string;
|
|
46
34
|
classes?: string[] | undefined;
|
|
47
35
|
} | undefined;
|
|
48
|
-
}>, {
|
|
49
|
-
minNodes: number;
|
|
50
|
-
rootWrapper: {
|
|
51
|
-
tag: string;
|
|
52
|
-
classes?: string[] | undefined;
|
|
53
|
-
};
|
|
54
|
-
maxNodes?: number | undefined;
|
|
55
|
-
nodeWrapper?: {
|
|
56
|
-
tag: string;
|
|
57
|
-
classes?: string[] | undefined;
|
|
58
|
-
} | undefined;
|
|
59
36
|
}, {
|
|
60
37
|
rootWrapper: {
|
|
61
38
|
tag: string;
|
|
@@ -68,9 +45,9 @@ export declare const CustomLayoutConfig: z.ZodEffects<z.ZodObject<{
|
|
|
68
45
|
classes?: string[] | undefined;
|
|
69
46
|
} | undefined;
|
|
70
47
|
}>;
|
|
71
|
-
export declare const CustomLayout: z.
|
|
48
|
+
export declare const CustomLayout: z.ZodObject<{
|
|
72
49
|
name: z.ZodLiteral<"custom-layout">;
|
|
73
|
-
config: z.
|
|
50
|
+
config: z.ZodObject<{
|
|
74
51
|
rootWrapper: z.ZodObject<{
|
|
75
52
|
tag: z.ZodString;
|
|
76
53
|
classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -91,20 +68,9 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
91
68
|
tag: string;
|
|
92
69
|
classes?: string[] | undefined;
|
|
93
70
|
}>>;
|
|
94
|
-
minNodes: z.ZodDefault<z.ZodNumber
|
|
71
|
+
minNodes: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
95
72
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
96
73
|
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
minNodes: number;
|
|
98
|
-
rootWrapper: {
|
|
99
|
-
tag: string;
|
|
100
|
-
classes?: string[] | undefined;
|
|
101
|
-
};
|
|
102
|
-
maxNodes?: number | undefined;
|
|
103
|
-
nodeWrapper?: {
|
|
104
|
-
tag: string;
|
|
105
|
-
classes?: string[] | undefined;
|
|
106
|
-
} | undefined;
|
|
107
|
-
}, {
|
|
108
74
|
rootWrapper: {
|
|
109
75
|
tag: string;
|
|
110
76
|
classes?: string[] | undefined;
|
|
@@ -115,17 +81,6 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
115
81
|
tag: string;
|
|
116
82
|
classes?: string[] | undefined;
|
|
117
83
|
} | undefined;
|
|
118
|
-
}>, {
|
|
119
|
-
minNodes: number;
|
|
120
|
-
rootWrapper: {
|
|
121
|
-
tag: string;
|
|
122
|
-
classes?: string[] | undefined;
|
|
123
|
-
};
|
|
124
|
-
maxNodes?: number | undefined;
|
|
125
|
-
nodeWrapper?: {
|
|
126
|
-
tag: string;
|
|
127
|
-
classes?: string[] | undefined;
|
|
128
|
-
} | undefined;
|
|
129
84
|
}, {
|
|
130
85
|
rootWrapper: {
|
|
131
86
|
tag: string;
|
|
@@ -150,23 +105,6 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
150
105
|
main: import("../layout-content").LayoutContentNodes[];
|
|
151
106
|
};
|
|
152
107
|
name: "custom-layout";
|
|
153
|
-
config: {
|
|
154
|
-
minNodes: number;
|
|
155
|
-
rootWrapper: {
|
|
156
|
-
tag: string;
|
|
157
|
-
classes?: string[] | undefined;
|
|
158
|
-
};
|
|
159
|
-
maxNodes?: number | undefined;
|
|
160
|
-
nodeWrapper?: {
|
|
161
|
-
tag: string;
|
|
162
|
-
classes?: string[] | undefined;
|
|
163
|
-
} | undefined;
|
|
164
|
-
};
|
|
165
|
-
}, {
|
|
166
|
-
content: {
|
|
167
|
-
main: unknown[];
|
|
168
|
-
};
|
|
169
|
-
name: "custom-layout";
|
|
170
108
|
config: {
|
|
171
109
|
rootWrapper: {
|
|
172
110
|
tag: string;
|
|
@@ -179,12 +117,6 @@ export declare const CustomLayout: z.ZodEffects<z.ZodObject<{
|
|
|
179
117
|
classes?: string[] | undefined;
|
|
180
118
|
} | undefined;
|
|
181
119
|
};
|
|
182
|
-
}>, {
|
|
183
|
-
name: "custom-layout";
|
|
184
|
-
config: z.infer<typeof CustomLayoutConfig>;
|
|
185
|
-
content: {
|
|
186
|
-
main: PageLayoutContent;
|
|
187
|
-
};
|
|
188
120
|
}, {
|
|
189
121
|
content: {
|
|
190
122
|
main: unknown[];
|
|
@@ -7,49 +7,18 @@ const wrapperConfig = {
|
|
|
7
7
|
tag: zod_1.z.string(),
|
|
8
8
|
classes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
9
9
|
};
|
|
10
|
-
exports.CustomLayoutConfig = zod_1.z
|
|
11
|
-
.object({
|
|
10
|
+
exports.CustomLayoutConfig = zod_1.z.object({
|
|
12
11
|
rootWrapper: zod_1.z.object(wrapperConfig),
|
|
13
12
|
nodeWrapper: zod_1.z.object(wrapperConfig).optional(),
|
|
14
|
-
minNodes: zod_1.z.number().min(0).default(0),
|
|
13
|
+
minNodes: zod_1.z.number().min(0).default(0).optional(),
|
|
15
14
|
maxNodes: zod_1.z.number().min(1).optional(),
|
|
16
|
-
})
|
|
17
|
-
.refine((config) => {
|
|
18
|
-
return typeof config.maxNodes === 'undefined' || config.maxNodes >= config.minNodes;
|
|
19
|
-
}, {
|
|
20
|
-
message: 'maxNodes must be greater than minNodes',
|
|
21
|
-
path: ['maxNodes'],
|
|
22
15
|
});
|
|
23
|
-
exports.CustomLayout = zod_1.z
|
|
24
|
-
.object({
|
|
16
|
+
exports.CustomLayout = zod_1.z.object({
|
|
25
17
|
name: zod_1.z.literal('custom-layout'),
|
|
26
18
|
config: exports.CustomLayoutConfig,
|
|
27
19
|
content: zod_1.z.object({
|
|
28
20
|
main: layout_content_1.PageLayoutContent,
|
|
29
21
|
}),
|
|
30
|
-
})
|
|
31
|
-
.superRefine((arg, ctx) => {
|
|
32
|
-
if (arg.config.minNodes > arg.content.main.length) {
|
|
33
|
-
ctx.addIssue({
|
|
34
|
-
code: zod_1.z.ZodIssueCode.too_small,
|
|
35
|
-
minimum: arg.config.minNodes,
|
|
36
|
-
inclusive: true,
|
|
37
|
-
type: 'array',
|
|
38
|
-
message: 'Layout config requires a minimum number of content nodes',
|
|
39
|
-
path: ['content', 'main'],
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (arg.config.maxNodes && arg.config.maxNodes < arg.content.main.length) {
|
|
43
|
-
ctx.addIssue({
|
|
44
|
-
code: zod_1.z.ZodIssueCode.too_big,
|
|
45
|
-
maximum: arg.config.maxNodes,
|
|
46
|
-
inclusive: true,
|
|
47
|
-
type: 'array',
|
|
48
|
-
message: 'Layout config supports a maximum number of content nodes',
|
|
49
|
-
path: ['content', 'main'],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return zod_1.z.NEVER;
|
|
53
22
|
});
|
|
54
23
|
exports.CUSTOM_LAYOUT_TEMPLATE = `
|
|
55
24
|
<{{rootTag}} class="{{joinClasses rootClasses}}">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-layout.js","sourceRoot":"","sources":["../../src/layouts/custom-layout.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAAsD;AAEtD,MAAM,aAAa,GAAG;IACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC;AAEW,QAAA,kBAAkB,GAAG,OAAC
|
|
1
|
+
{"version":3,"file":"custom-layout.js","sourceRoot":"","sources":["../../src/layouts/custom-layout.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAAsD;AAEtD,MAAM,aAAa,GAAG;IACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC;AAEW,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,aAAa,CAAC;IACpC,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACjD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IAChC,MAAM,EAAE,0BAAkB;IAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,kCAAiB;KACxB,CAAC;CACH,CAAC,CAAC;AAGU,QAAA,sBAAsB,GAAG;;;;;;;;;;CAUrC,CAAC"}
|
package/lib/layouts/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare const PageLayout: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
|
|
|
63
63
|
name: "two-column";
|
|
64
64
|
}>, z.ZodObject<{
|
|
65
65
|
name: z.ZodLiteral<"custom-layout">;
|
|
66
|
-
config: z.
|
|
66
|
+
config: z.ZodObject<{
|
|
67
67
|
rootWrapper: z.ZodObject<{
|
|
68
68
|
tag: z.ZodString;
|
|
69
69
|
classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -84,20 +84,9 @@ export declare const PageLayout: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
|
|
|
84
84
|
tag: string;
|
|
85
85
|
classes?: string[] | undefined;
|
|
86
86
|
}>>;
|
|
87
|
-
minNodes: z.ZodDefault<z.ZodNumber
|
|
87
|
+
minNodes: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
88
88
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
89
89
|
}, "strip", z.ZodTypeAny, {
|
|
90
|
-
minNodes: number;
|
|
91
|
-
rootWrapper: {
|
|
92
|
-
tag: string;
|
|
93
|
-
classes?: string[] | undefined;
|
|
94
|
-
};
|
|
95
|
-
maxNodes?: number | undefined;
|
|
96
|
-
nodeWrapper?: {
|
|
97
|
-
tag: string;
|
|
98
|
-
classes?: string[] | undefined;
|
|
99
|
-
} | undefined;
|
|
100
|
-
}, {
|
|
101
90
|
rootWrapper: {
|
|
102
91
|
tag: string;
|
|
103
92
|
classes?: string[] | undefined;
|
|
@@ -108,17 +97,6 @@ export declare const PageLayout: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
|
|
|
108
97
|
tag: string;
|
|
109
98
|
classes?: string[] | undefined;
|
|
110
99
|
} | undefined;
|
|
111
|
-
}>, {
|
|
112
|
-
minNodes: number;
|
|
113
|
-
rootWrapper: {
|
|
114
|
-
tag: string;
|
|
115
|
-
classes?: string[] | undefined;
|
|
116
|
-
};
|
|
117
|
-
maxNodes?: number | undefined;
|
|
118
|
-
nodeWrapper?: {
|
|
119
|
-
tag: string;
|
|
120
|
-
classes?: string[] | undefined;
|
|
121
|
-
} | undefined;
|
|
122
100
|
}, {
|
|
123
101
|
rootWrapper: {
|
|
124
102
|
tag: string;
|
|
@@ -144,11 +122,11 @@ export declare const PageLayout: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
|
|
|
144
122
|
};
|
|
145
123
|
name: "custom-layout";
|
|
146
124
|
config: {
|
|
147
|
-
minNodes: number;
|
|
148
125
|
rootWrapper: {
|
|
149
126
|
tag: string;
|
|
150
127
|
classes?: string[] | undefined;
|
|
151
128
|
};
|
|
129
|
+
minNodes?: number | undefined;
|
|
152
130
|
maxNodes?: number | undefined;
|
|
153
131
|
nodeWrapper?: {
|
|
154
132
|
tag: string;
|