@squiz/dx-page-contents-lib 1.85.0 → 2.0.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.
@@ -3,7 +3,7 @@ import { ComponentNode, VariationNode, Variant, FragmentNode, LayoutNode } from
3
3
  type DeveloperDefinedLayoutNode = z.infer<typeof LayoutNode> & {
4
4
  content: Record<string, PageLayoutContent>;
5
5
  };
6
- export declare const DeveloperDefinedLayoutNode: z.ZodIntersection<z.ZodEffects<z.ZodEffects<z.ZodObject<{
6
+ export declare const DeveloperDefinedLayoutNode: z.ZodIntersection<z.ZodPreprocess<z.ZodObject<{
7
7
  type: z.ZodLiteral<"layout">;
8
8
  layout: z.ZodUnion<[z.ZodObject<{
9
9
  name: z.ZodString;
@@ -14,402 +14,47 @@ export declare const DeveloperDefinedLayoutNode: z.ZodIntersection<z.ZodEffects<
14
14
  displayName: z.ZodString;
15
15
  description: z.ZodString;
16
16
  key: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- key: string;
19
- description: string;
20
- displayName: string;
21
- }, {
22
- key: string;
23
- description: string;
24
- displayName: string;
25
- }>, "many">;
17
+ }, z.core.$strip>>;
26
18
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
27
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
19
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
28
20
  type: z.ZodLiteral<"boolean">;
29
21
  default: z.ZodOptional<z.ZodBoolean>;
30
22
  selectedValue: z.ZodOptional<z.ZodBoolean>;
31
23
  title: z.ZodString;
32
24
  description: z.ZodString;
33
- }, "strip", z.ZodTypeAny, {
34
- description: string;
35
- type: "boolean";
36
- title: string;
37
- selectedValue?: boolean | undefined;
38
- default?: boolean | undefined;
39
- }, {
40
- description: string;
41
- type: "boolean";
42
- title: string;
43
- selectedValue?: boolean | undefined;
44
- default?: boolean | undefined;
45
- }>, z.ZodObject<{
25
+ }, z.core.$strip>, z.ZodObject<{
46
26
  type: z.ZodLiteral<"string">;
47
- enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
28
  oneOf: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
29
  const: z.ZodString;
50
30
  title: z.ZodString;
51
- }, "strip", z.ZodTypeAny, {
52
- title: string;
53
- const: string;
54
- }, {
55
- title: string;
56
- const: string;
57
- }>, "many">>;
31
+ }, z.core.$strip>>>;
58
32
  default: z.ZodOptional<z.ZodString>;
59
33
  selectedValue: z.ZodOptional<z.ZodString>;
60
34
  'ui:metadata': z.ZodOptional<z.ZodObject<{
61
- enumWidget: z.ZodOptional<z.ZodEnum<["radio", "dropdown"]>>;
62
- }, "strip", z.ZodTypeAny, {
63
- enumWidget?: "radio" | "dropdown" | undefined;
64
- }, {
65
- enumWidget?: "radio" | "dropdown" | undefined;
66
- }>>;
35
+ enumWidget: z.ZodOptional<z.ZodEnum<{
36
+ radio: "radio";
37
+ dropdown: "dropdown";
38
+ }>>;
39
+ }, z.core.$strip>>;
67
40
  title: z.ZodString;
68
41
  description: z.ZodString;
69
- }, "strip", z.ZodTypeAny, {
70
- description: string;
71
- type: "string";
72
- title: string;
73
- selectedValue?: string | undefined;
74
- default?: string | undefined;
75
- enum?: string[] | undefined;
76
- oneOf?: {
77
- title: string;
78
- const: string;
79
- }[] | undefined;
80
- 'ui:metadata'?: {
81
- enumWidget?: "radio" | "dropdown" | undefined;
82
- } | undefined;
83
- }, {
84
- description: string;
85
- type: "string";
86
- title: string;
87
- selectedValue?: string | undefined;
88
- default?: string | undefined;
89
- enum?: string[] | undefined;
90
- oneOf?: {
91
- title: string;
92
- const: string;
93
- }[] | undefined;
94
- 'ui:metadata'?: {
95
- enumWidget?: "radio" | "dropdown" | undefined;
96
- } | undefined;
97
- }>]>>>;
98
- }, "strip", z.ZodTypeAny, {
99
- description: string;
100
- displayName: string;
101
- name: string;
102
- template: string;
103
- zones: {
104
- key: string;
105
- description: string;
106
- displayName: string;
107
- }[];
108
- options?: Record<string, unknown> | undefined;
109
- properties?: Record<string, {
110
- description: string;
111
- type: "boolean";
112
- title: string;
113
- selectedValue?: boolean | undefined;
114
- default?: boolean | undefined;
115
- } | {
116
- description: string;
117
- type: "string";
118
- title: string;
119
- selectedValue?: string | undefined;
120
- default?: string | undefined;
121
- enum?: string[] | undefined;
122
- oneOf?: {
123
- title: string;
124
- const: string;
125
- }[] | undefined;
126
- 'ui:metadata'?: {
127
- enumWidget?: "radio" | "dropdown" | undefined;
128
- } | undefined;
129
- }> | undefined;
130
- }, {
131
- description: string;
132
- displayName: string;
133
- name: string;
134
- template: string;
135
- zones: {
136
- key: string;
137
- description: string;
138
- displayName: string;
139
- }[];
140
- options?: Record<string, unknown> | undefined;
141
- properties?: Record<string, {
142
- description: string;
143
- type: "boolean";
144
- title: string;
145
- selectedValue?: boolean | undefined;
146
- default?: boolean | undefined;
147
- } | {
148
- description: string;
149
- type: "string";
150
- title: string;
151
- selectedValue?: string | undefined;
152
- default?: string | undefined;
153
- enum?: string[] | undefined;
154
- oneOf?: {
155
- title: string;
156
- const: string;
157
- }[] | undefined;
158
- 'ui:metadata'?: {
159
- enumWidget?: "radio" | "dropdown" | undefined;
160
- } | undefined;
161
- }> | undefined;
162
- }>, z.ZodObject<{
42
+ }, z.core.$strip>], "type">>>;
43
+ }, z.core.$strip>, z.ZodObject<{
163
44
  name: z.ZodString;
164
45
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
165
46
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
166
- selectedValue: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
167
- }, "strip", z.ZodTypeAny, {
168
- selectedValue: string | boolean;
169
- }, {
170
- selectedValue: string | boolean;
171
- }>>>;
172
- }, "strip", z.ZodTypeAny, {
173
- name: string;
174
- options?: Record<string, unknown> | undefined;
175
- properties?: Record<string, {
176
- selectedValue: string | boolean;
177
- }> | undefined;
178
- }, {
179
- name: string;
180
- options?: Record<string, unknown> | undefined;
181
- properties?: Record<string, {
182
- selectedValue: string | boolean;
183
- }> | undefined;
184
- }>]>;
47
+ selectedValue: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>;
48
+ }, z.core.$strip>>>;
49
+ }, z.core.$strip>]>;
185
50
  nodeName: z.ZodOptional<z.ZodString>;
186
- }, "strip", z.ZodTypeAny, {
187
- type: "layout";
188
- layout: {
189
- description: string;
190
- displayName: string;
191
- name: string;
192
- template: string;
193
- zones: {
194
- key: string;
195
- description: string;
196
- displayName: string;
197
- }[];
198
- options?: Record<string, unknown> | undefined;
199
- properties?: Record<string, {
200
- description: string;
201
- type: "boolean";
202
- title: string;
203
- selectedValue?: boolean | undefined;
204
- default?: boolean | undefined;
205
- } | {
206
- description: string;
207
- type: "string";
208
- title: string;
209
- selectedValue?: string | undefined;
210
- default?: string | undefined;
211
- enum?: string[] | undefined;
212
- oneOf?: {
213
- title: string;
214
- const: string;
215
- }[] | undefined;
216
- 'ui:metadata'?: {
217
- enumWidget?: "radio" | "dropdown" | undefined;
218
- } | undefined;
219
- }> | undefined;
220
- } | {
221
- name: string;
222
- options?: Record<string, unknown> | undefined;
223
- properties?: Record<string, {
224
- selectedValue: string | boolean;
225
- }> | undefined;
226
- };
227
- nodeName?: string | undefined;
228
- }, {
229
- type: "layout";
230
- layout: {
231
- description: string;
232
- displayName: string;
233
- name: string;
234
- template: string;
235
- zones: {
236
- key: string;
237
- description: string;
238
- displayName: string;
239
- }[];
240
- options?: Record<string, unknown> | undefined;
241
- properties?: Record<string, {
242
- description: string;
243
- type: "boolean";
244
- title: string;
245
- selectedValue?: boolean | undefined;
246
- default?: boolean | undefined;
247
- } | {
248
- description: string;
249
- type: "string";
250
- title: string;
251
- selectedValue?: string | undefined;
252
- default?: string | undefined;
253
- enum?: string[] | undefined;
254
- oneOf?: {
255
- title: string;
256
- const: string;
257
- }[] | undefined;
258
- 'ui:metadata'?: {
259
- enumWidget?: "radio" | "dropdown" | undefined;
260
- } | undefined;
261
- }> | undefined;
262
- } | {
263
- name: string;
264
- options?: Record<string, unknown> | undefined;
265
- properties?: Record<string, {
266
- selectedValue: string | boolean;
267
- }> | undefined;
268
- };
269
- nodeName?: string | undefined;
270
- }>, {
271
- type: "layout";
272
- layout: {
273
- description: string;
274
- displayName: string;
275
- name: string;
276
- template: string;
277
- zones: {
278
- key: string;
279
- description: string;
280
- displayName: string;
281
- }[];
282
- options?: Record<string, unknown> | undefined;
283
- properties?: Record<string, {
284
- description: string;
285
- type: "boolean";
286
- title: string;
287
- selectedValue?: boolean | undefined;
288
- default?: boolean | undefined;
289
- } | {
290
- description: string;
291
- type: "string";
292
- title: string;
293
- selectedValue?: string | undefined;
294
- default?: string | undefined;
295
- enum?: string[] | undefined;
296
- oneOf?: {
297
- title: string;
298
- const: string;
299
- }[] | undefined;
300
- 'ui:metadata'?: {
301
- enumWidget?: "radio" | "dropdown" | undefined;
302
- } | undefined;
303
- }> | undefined;
304
- } | {
305
- name: string;
306
- options?: Record<string, unknown> | undefined;
307
- properties?: Record<string, {
308
- selectedValue: string | boolean;
309
- }> | undefined;
310
- };
311
- nodeName?: string | undefined;
312
- }, {
313
- type: "layout";
314
- layout: {
315
- description: string;
316
- displayName: string;
317
- name: string;
318
- template: string;
319
- zones: {
320
- key: string;
321
- description: string;
322
- displayName: string;
323
- }[];
324
- options?: Record<string, unknown> | undefined;
325
- properties?: Record<string, {
326
- description: string;
327
- type: "boolean";
328
- title: string;
329
- selectedValue?: boolean | undefined;
330
- default?: boolean | undefined;
331
- } | {
332
- description: string;
333
- type: "string";
334
- title: string;
335
- selectedValue?: string | undefined;
336
- default?: string | undefined;
337
- enum?: string[] | undefined;
338
- oneOf?: {
339
- title: string;
340
- const: string;
341
- }[] | undefined;
342
- 'ui:metadata'?: {
343
- enumWidget?: "radio" | "dropdown" | undefined;
344
- } | undefined;
345
- }> | undefined;
346
- } | {
347
- name: string;
348
- options?: Record<string, unknown> | undefined;
349
- properties?: Record<string, {
350
- selectedValue: string | boolean;
351
- }> | undefined;
352
- };
353
- nodeName?: string | undefined;
354
- }>, {
355
- type: "layout";
356
- layout: {
357
- description: string;
358
- displayName: string;
359
- name: string;
360
- template: string;
361
- zones: {
362
- key: string;
363
- description: string;
364
- displayName: string;
365
- }[];
366
- options?: Record<string, unknown> | undefined;
367
- properties?: Record<string, {
368
- description: string;
369
- type: "boolean";
370
- title: string;
371
- selectedValue?: boolean | undefined;
372
- default?: boolean | undefined;
373
- } | {
374
- description: string;
375
- type: "string";
376
- title: string;
377
- selectedValue?: string | undefined;
378
- default?: string | undefined;
379
- enum?: string[] | undefined;
380
- oneOf?: {
381
- title: string;
382
- const: string;
383
- }[] | undefined;
384
- 'ui:metadata'?: {
385
- enumWidget?: "radio" | "dropdown" | undefined;
386
- } | undefined;
387
- }> | undefined;
388
- } | {
389
- name: string;
390
- options?: Record<string, unknown> | undefined;
391
- properties?: Record<string, {
392
- selectedValue: string | boolean;
393
- }> | undefined;
394
- };
395
- nodeName?: string | undefined;
396
- }, unknown>, z.ZodObject<{
397
- content: z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodType<LayoutContentNodes[], z.ZodTypeDef, unknown[]>>>;
398
- }, "strip", z.ZodTypeAny, {
399
- content: Record<string, LayoutContentNodes[]>;
400
- }, {
401
- content: Record<string, unknown[]>;
402
- }>>;
403
- declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
51
+ }, z.core.$strip>, any>, z.ZodObject<{
52
+ content: z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodType<PageLayoutContent, unknown, z.core.$ZodTypeInternals<PageLayoutContent, unknown>>>>;
53
+ }, z.core.$strip>>;
54
+ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<[z.ZodObject<{
404
55
  type: z.ZodLiteral<"text">;
405
56
  value: z.ZodString;
406
- }, "strip", z.ZodTypeAny, {
407
- value: string;
408
- type: "text";
409
- }, {
410
- value: string;
411
- type: "text";
412
- }>, z.ZodObject<{
57
+ }, z.core.$strip>, z.ZodObject<{
413
58
  type: z.ZodLiteral<"tag">;
414
59
  tag: z.ZodString;
415
60
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -420,265 +65,100 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
420
65
  color: z.ZodOptional<z.ZodString>;
421
66
  size: z.ZodOptional<z.ZodString>;
422
67
  fontFamily: z.ZodOptional<z.ZodString>;
423
- }, "strip", z.ZodTypeAny, {
424
- bold?: boolean | undefined;
425
- italics?: boolean | undefined;
426
- underline?: boolean | undefined;
427
- color?: string | undefined;
428
- size?: string | undefined;
429
- fontFamily?: string | undefined;
430
- }, {
431
- bold?: boolean | undefined;
432
- italics?: boolean | undefined;
433
- underline?: boolean | undefined;
434
- color?: string | undefined;
435
- size?: string | undefined;
436
- fontFamily?: string | undefined;
437
- }>>;
68
+ }, z.core.$strip>>;
438
69
  formattingOptions: z.ZodOptional<z.ZodObject<{
439
- alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
440
- }, "strip", z.ZodTypeAny, {
441
- alignment: "left" | "center" | "right" | "justify";
442
- }, {
443
- alignment: "left" | "center" | "right" | "justify";
444
- }>>;
445
- }, "strip", z.ZodTypeAny, {
446
- type: "tag";
447
- tag: string;
448
- attributes?: Record<string, string> | undefined;
449
- font?: {
450
- bold?: boolean | undefined;
451
- italics?: boolean | undefined;
452
- underline?: boolean | undefined;
453
- color?: string | undefined;
454
- size?: string | undefined;
455
- fontFamily?: string | undefined;
456
- } | undefined;
457
- formattingOptions?: {
458
- alignment: "left" | "center" | "right" | "justify";
459
- } | undefined;
460
- }, {
461
- type: "tag";
462
- tag: string;
463
- attributes?: Record<string, string> | undefined;
464
- font?: {
465
- bold?: boolean | undefined;
466
- italics?: boolean | undefined;
467
- underline?: boolean | undefined;
468
- color?: string | undefined;
469
- size?: string | undefined;
470
- fontFamily?: string | undefined;
471
- } | undefined;
472
- formattingOptions?: {
473
- alignment: "left" | "center" | "right" | "justify";
474
- } | undefined;
475
- }>, z.ZodObject<{
70
+ alignment: z.ZodEnum<{
71
+ left: "left";
72
+ center: "center";
73
+ right: "right";
74
+ justify: "justify";
75
+ }>;
76
+ }, z.core.$strip>>;
77
+ }, z.core.$strip>, z.ZodObject<{
476
78
  type: z.ZodLiteral<"link-to-matrix-asset">;
477
79
  matrixIdentifier: z.ZodOptional<z.ZodString>;
478
80
  matrixDomain: z.ZodString;
479
81
  matrixAssetId: z.ZodString;
480
- target: z.ZodEnum<["_blank", "_self", "_parent", "_top"]>;
82
+ target: z.ZodEnum<{
83
+ _blank: "_blank";
84
+ _self: "_self";
85
+ _parent: "_parent";
86
+ _top: "_top";
87
+ }>;
481
88
  formattingOptions: z.ZodOptional<z.ZodObject<{
482
- alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
483
- }, "strip", z.ZodTypeAny, {
484
- alignment: "left" | "center" | "right" | "justify";
485
- }, {
486
- alignment: "left" | "center" | "right" | "justify";
487
- }>>;
89
+ alignment: z.ZodEnum<{
90
+ left: "left";
91
+ center: "center";
92
+ right: "right";
93
+ justify: "justify";
94
+ }>;
95
+ }, z.core.$strip>>;
488
96
  attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
489
97
  href: z.ZodOptional<z.ZodNever>;
490
98
  target: z.ZodOptional<z.ZodNever>;
491
- }, "strip", z.ZodTypeAny, {
492
- target?: undefined;
493
- href?: undefined;
494
- }, {
495
- target?: undefined;
496
- href?: undefined;
497
- }>>>;
498
- }, "strip", z.ZodTypeAny, {
499
- type: "link-to-matrix-asset";
500
- matrixDomain: string;
501
- matrixAssetId: string;
502
- target: "_blank" | "_self" | "_parent" | "_top";
503
- attributes?: (Record<string, string> & {
504
- target?: undefined;
505
- href?: undefined;
506
- }) | undefined;
507
- formattingOptions?: {
508
- alignment: "left" | "center" | "right" | "justify";
509
- } | undefined;
510
- matrixIdentifier?: string | undefined;
511
- }, {
512
- type: "link-to-matrix-asset";
513
- matrixDomain: string;
514
- matrixAssetId: string;
515
- target: "_blank" | "_self" | "_parent" | "_top";
516
- attributes?: (Record<string, string> & {
517
- target?: undefined;
518
- href?: undefined;
519
- }) | undefined;
520
- formattingOptions?: {
521
- alignment: "left" | "center" | "right" | "justify";
522
- } | undefined;
523
- matrixIdentifier?: string | undefined;
524
- }>, z.ZodObject<{
99
+ }, z.core.$strip>>>;
100
+ }, z.core.$strip>, z.ZodObject<{
525
101
  type: z.ZodLiteral<"link-to-dam-asset">;
526
102
  damSystemType: z.ZodString;
527
103
  damSystemIdentifier: z.ZodString;
528
104
  damObjectId: z.ZodString;
529
105
  damAdditional: z.ZodOptional<z.ZodObject<{
530
106
  variant: z.ZodOptional<z.ZodString>;
531
- }, "strip", z.ZodTypeAny, {
532
- variant?: string | undefined;
533
- }, {
534
- variant?: string | undefined;
535
- }>>;
536
- target: z.ZodEnum<["_blank", "_self", "_parent", "_top"]>;
107
+ }, z.core.$strip>>;
108
+ target: z.ZodEnum<{
109
+ _blank: "_blank";
110
+ _self: "_self";
111
+ _parent: "_parent";
112
+ _top: "_top";
113
+ }>;
537
114
  formattingOptions: z.ZodOptional<z.ZodObject<{
538
- alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
539
- }, "strip", z.ZodTypeAny, {
540
- alignment: "left" | "center" | "right" | "justify";
541
- }, {
542
- alignment: "left" | "center" | "right" | "justify";
543
- }>>;
115
+ alignment: z.ZodEnum<{
116
+ left: "left";
117
+ center: "center";
118
+ right: "right";
119
+ justify: "justify";
120
+ }>;
121
+ }, z.core.$strip>>;
544
122
  attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
545
123
  href: z.ZodOptional<z.ZodNever>;
546
124
  target: z.ZodOptional<z.ZodNever>;
547
- }, "strip", z.ZodTypeAny, {
548
- target?: undefined;
549
- href?: undefined;
550
- }, {
551
- target?: undefined;
552
- href?: undefined;
553
- }>>>;
554
- }, "strip", z.ZodTypeAny, {
555
- type: "link-to-dam-asset";
556
- target: "_blank" | "_self" | "_parent" | "_top";
557
- damSystemType: string;
558
- damSystemIdentifier: string;
559
- damObjectId: string;
560
- attributes?: (Record<string, string> & {
561
- target?: undefined;
562
- href?: undefined;
563
- }) | undefined;
564
- formattingOptions?: {
565
- alignment: "left" | "center" | "right" | "justify";
566
- } | undefined;
567
- damAdditional?: {
568
- variant?: string | undefined;
569
- } | undefined;
570
- }, {
571
- type: "link-to-dam-asset";
572
- target: "_blank" | "_self" | "_parent" | "_top";
573
- damSystemType: string;
574
- damSystemIdentifier: string;
575
- damObjectId: string;
576
- attributes?: (Record<string, string> & {
577
- target?: undefined;
578
- href?: undefined;
579
- }) | undefined;
580
- formattingOptions?: {
581
- alignment: "left" | "center" | "right" | "justify";
582
- } | undefined;
583
- damAdditional?: {
584
- variant?: string | undefined;
585
- } | undefined;
586
- }>, z.ZodObject<{
125
+ }, z.core.$strip>>>;
126
+ }, z.core.$strip>, z.ZodObject<{
587
127
  type: z.ZodLiteral<"matrix-image">;
588
128
  matrixIdentifier: z.ZodOptional<z.ZodString>;
589
129
  matrixDomain: z.ZodString;
590
130
  matrixAssetId: z.ZodString;
591
131
  formattingOptions: z.ZodOptional<z.ZodObject<{
592
- alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
593
- }, "strip", z.ZodTypeAny, {
594
- alignment: "left" | "center" | "right" | "justify";
595
- }, {
596
- alignment: "left" | "center" | "right" | "justify";
597
- }>>;
132
+ alignment: z.ZodEnum<{
133
+ left: "left";
134
+ center: "center";
135
+ right: "right";
136
+ justify: "justify";
137
+ }>;
138
+ }, z.core.$strip>>;
598
139
  attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
599
140
  src: z.ZodOptional<z.ZodNever>;
600
- }, "strip", z.ZodTypeAny, {
601
- src?: undefined;
602
- }, {
603
- src?: undefined;
604
- }>>>;
605
- }, "strip", z.ZodTypeAny, {
606
- type: "matrix-image";
607
- matrixDomain: string;
608
- matrixAssetId: string;
609
- attributes?: (Record<string, string> & {
610
- src?: undefined;
611
- }) | undefined;
612
- formattingOptions?: {
613
- alignment: "left" | "center" | "right" | "justify";
614
- } | undefined;
615
- matrixIdentifier?: string | undefined;
616
- }, {
617
- type: "matrix-image";
618
- matrixDomain: string;
619
- matrixAssetId: string;
620
- attributes?: (Record<string, string> & {
621
- src?: undefined;
622
- }) | undefined;
623
- formattingOptions?: {
624
- alignment: "left" | "center" | "right" | "justify";
625
- } | undefined;
626
- matrixIdentifier?: string | undefined;
627
- }>, z.ZodObject<{
141
+ }, z.core.$strip>>>;
142
+ }, z.core.$strip>, z.ZodObject<{
628
143
  type: z.ZodLiteral<"dam-image">;
629
144
  damSystemType: z.ZodString;
630
145
  damSystemIdentifier: z.ZodString;
631
146
  damObjectId: z.ZodString;
632
147
  damAdditional: z.ZodOptional<z.ZodObject<{
633
148
  variant: z.ZodOptional<z.ZodString>;
634
- }, "strip", z.ZodTypeAny, {
635
- variant?: string | undefined;
636
- }, {
637
- variant?: string | undefined;
638
- }>>;
149
+ }, z.core.$strip>>;
639
150
  formattingOptions: z.ZodOptional<z.ZodObject<{
640
- alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
641
- }, "strip", z.ZodTypeAny, {
642
- alignment: "left" | "center" | "right" | "justify";
643
- }, {
644
- alignment: "left" | "center" | "right" | "justify";
645
- }>>;
151
+ alignment: z.ZodEnum<{
152
+ left: "left";
153
+ center: "center";
154
+ right: "right";
155
+ justify: "justify";
156
+ }>;
157
+ }, z.core.$strip>>;
646
158
  attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
647
159
  src: z.ZodOptional<z.ZodNever>;
648
- }, "strip", z.ZodTypeAny, {
649
- src?: undefined;
650
- }, {
651
- src?: undefined;
652
- }>>>;
653
- }, "strip", z.ZodTypeAny, {
654
- type: "dam-image";
655
- damSystemType: string;
656
- damSystemIdentifier: string;
657
- damObjectId: string;
658
- attributes?: (Record<string, string> & {
659
- src?: undefined;
660
- }) | undefined;
661
- formattingOptions?: {
662
- alignment: "left" | "center" | "right" | "justify";
663
- } | undefined;
664
- damAdditional?: {
665
- variant?: string | undefined;
666
- } | undefined;
667
- }, {
668
- type: "dam-image";
669
- damSystemType: string;
670
- damSystemIdentifier: string;
671
- damObjectId: string;
672
- attributes?: (Record<string, string> & {
673
- src?: undefined;
674
- }) | undefined;
675
- formattingOptions?: {
676
- alignment: "left" | "center" | "right" | "justify";
677
- } | undefined;
678
- damAdditional?: {
679
- variant?: string | undefined;
680
- } | undefined;
681
- }>]>;
160
+ }, z.core.$strip>>>;
161
+ }, z.core.$strip>], "type">;
682
162
  type BaseLayoutContentNodes = z.infer<typeof BaseLayoutContentNodes>;
683
163
  export type LayoutVariant = z.infer<typeof Variant> & {
684
164
  node: LayoutContentNodes | null;
@@ -689,185 +169,26 @@ type LayoutVariationNode = z.infer<typeof VariationNode> & {
689
169
  };
690
170
  variants: LayoutVariant[];
691
171
  };
692
- export declare const LayoutVariationNode: z.ZodEffects<z.ZodObject<{
172
+ export declare const LayoutVariationNode: z.ZodObject<{
693
173
  type: z.ZodLiteral<"variation">;
694
- } & {
695
174
  default: z.ZodObject<{
696
- node: z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodType<LayoutContentNodes, z.ZodTypeDef, Omit<LayoutContentNodes, "nodeId"> & {
697
- nodeId?: string | undefined;
698
- }>, LayoutContentNodes, unknown>>>;
699
- }, "strip", z.ZodTypeAny, {
700
- node: LayoutContentNodes | null;
701
- }, {
702
- node?: unknown;
703
- }>;
704
- variants: z.ZodEffects<z.ZodArray<z.ZodIntersection<z.ZodObject<{
175
+ node: z.ZodNullable<z.ZodLazy<z.ZodType<LayoutContentNodes, unknown, z.core.$ZodTypeInternals<LayoutContentNodes, unknown>>>>;
176
+ }, z.core.$strip>;
177
+ variants: z.ZodArray<z.ZodIntersection<z.ZodObject<{
705
178
  conditions: z.ZodObject<{
706
179
  segment: z.ZodOptional<z.ZodObject<{
707
180
  code: z.ZodString;
708
- }, "strip", z.ZodTypeAny, {
709
- code: string;
710
- }, {
711
- code: string;
712
- }>>;
181
+ }, z.core.$strip>>;
713
182
  experiment: z.ZodOptional<z.ZodObject<{
714
183
  id: z.ZodString;
715
184
  variant: z.ZodString;
716
- }, "strip", z.ZodTypeAny, {
717
- variant: string;
718
- id: string;
719
- }, {
720
- variant: string;
721
- id: string;
722
- }>>;
723
- }, "strip", z.ZodTypeAny, {
724
- segment?: {
725
- code: string;
726
- } | undefined;
727
- experiment?: {
728
- variant: string;
729
- id: string;
730
- } | undefined;
731
- }, {
732
- segment?: {
733
- code: string;
734
- } | undefined;
735
- experiment?: {
736
- variant: string;
737
- id: string;
738
- } | undefined;
739
- }>;
740
- }, "strip", z.ZodTypeAny, {
741
- conditions: {
742
- segment?: {
743
- code: string;
744
- } | undefined;
745
- experiment?: {
746
- variant: string;
747
- id: string;
748
- } | undefined;
749
- };
750
- }, {
751
- conditions: {
752
- segment?: {
753
- code: string;
754
- } | undefined;
755
- experiment?: {
756
- variant: string;
757
- id: string;
758
- } | undefined;
759
- };
760
- }>, z.ZodObject<{
761
- node: z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodType<LayoutContentNodes, z.ZodTypeDef, Omit<LayoutContentNodes, "nodeId"> & {
762
- nodeId?: string | undefined;
763
- }>, LayoutContentNodes, unknown>>>;
764
- }, "strip", z.ZodTypeAny, {
765
- node: LayoutContentNodes | null;
766
- }, {
767
- node?: unknown;
768
- }>>, "many">, ({
769
- conditions: {
770
- segment?: {
771
- code: string;
772
- } | undefined;
773
- experiment?: {
774
- variant: string;
775
- id: string;
776
- } | undefined;
777
- };
778
- } & {
779
- node: LayoutContentNodes | null;
780
- })[], ({
781
- conditions: {
782
- segment?: {
783
- code: string;
784
- } | undefined;
785
- experiment?: {
786
- variant: string;
787
- id: string;
788
- } | undefined;
789
- };
790
- } & {
791
- node?: unknown;
792
- })[]>;
185
+ }, z.core.$strip>>;
186
+ }, z.core.$strip>;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ node: z.ZodNullable<z.ZodLazy<z.ZodType<LayoutContentNodes, unknown, z.core.$ZodTypeInternals<LayoutContentNodes, unknown>>>>;
189
+ }, z.core.$strip>>>;
793
190
  nodeName: z.ZodOptional<z.ZodString>;
794
- }, "strip", z.ZodTypeAny, {
795
- type: "variation";
796
- default: {
797
- node: LayoutContentNodes | null;
798
- };
799
- variants: ({
800
- conditions: {
801
- segment?: {
802
- code: string;
803
- } | undefined;
804
- experiment?: {
805
- variant: string;
806
- id: string;
807
- } | undefined;
808
- };
809
- } & {
810
- node: LayoutContentNodes | null;
811
- })[];
812
- nodeName?: string | undefined;
813
- }, {
814
- type: "variation";
815
- default: {
816
- node?: unknown;
817
- };
818
- variants: ({
819
- conditions: {
820
- segment?: {
821
- code: string;
822
- } | undefined;
823
- experiment?: {
824
- variant: string;
825
- id: string;
826
- } | undefined;
827
- };
828
- } & {
829
- node?: unknown;
830
- })[];
831
- nodeName?: string | undefined;
832
- }>, {
833
- type: "variation";
834
- default: {
835
- node: LayoutContentNodes | null;
836
- };
837
- variants: ({
838
- conditions: {
839
- segment?: {
840
- code: string;
841
- } | undefined;
842
- experiment?: {
843
- variant: string;
844
- id: string;
845
- } | undefined;
846
- };
847
- } & {
848
- node: LayoutContentNodes | null;
849
- })[];
850
- nodeName?: string | undefined;
851
- }, {
852
- type: "variation";
853
- default: {
854
- node?: unknown;
855
- };
856
- variants: ({
857
- conditions: {
858
- segment?: {
859
- code: string;
860
- } | undefined;
861
- experiment?: {
862
- variant: string;
863
- id: string;
864
- } | undefined;
865
- };
866
- } & {
867
- node?: unknown;
868
- })[];
869
- nodeName?: string | undefined;
870
- }>;
191
+ }, z.core.$strip>;
871
192
  type FragmentNodeWithChildren = z.infer<typeof FragmentNode> & {
872
193
  children: SimpleContentNodes[];
873
194
  };
@@ -881,16 +202,14 @@ export type SimpleContentNodes = BaseLayoutContentNodes & {
881
202
  export type LayoutContentNodes = {
882
203
  nodeId: string;
883
204
  } & (FragmentNodeWithChildren | LayoutVariationNode | DeveloperDefinedLayoutNode | z.infer<typeof ComponentNode>);
884
- export declare const LayoutContentNodes: z.ZodEffects<z.ZodType<LayoutContentNodes, z.ZodTypeDef, Omit<LayoutContentNodes, 'nodeId'> & {
885
- nodeId?: string | undefined;
886
- }>, LayoutContentNodes, unknown>;
205
+ export declare const LayoutContentNodes: z.ZodType<LayoutContentNodes>;
887
206
  /**
888
207
  * Comprehensive list of all nodes and the existence of child nodes within
889
208
  */
890
209
  export type LayoutContentNodesInput = z.input<typeof LayoutContentNodes>;
891
210
  export declare function getNestedNodes(nodes: LayoutContentNodes[]): LayoutContentNodes[];
892
- export declare const PageLayoutContent: z.ZodType<Array<LayoutContentNodes>, z.ZodTypeDef, z.input<typeof LayoutContentNodes>[]>;
893
- export type PageLayoutContent = z.infer<typeof PageLayoutContent>;
211
+ export type PageLayoutContent = LayoutContentNodes[];
212
+ export declare const PageLayoutContent: z.ZodType<PageLayoutContent>;
894
213
  export type NodeResolver = (node: LayoutContentNodes) => Promise<LayoutContentNodes>;
895
214
  export type ContentResolver<K extends (LayoutContentNodes | SimpleContentNodes)['type']> = (node: Extract<LayoutContentNodes | SimpleContentNodes, {
896
215
  type: K;