@squiz/dx-page-contents-lib 1.70.2 → 1.70.3

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.
@@ -0,0 +1,694 @@
1
+ import { z } from 'zod';
2
+ export declare const CustomLayoutConfig: z.ZodObject<{
3
+ rootWrapper: z.ZodObject<{
4
+ tag: z.ZodString;
5
+ classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ tag: string;
8
+ classes?: string[] | undefined;
9
+ }, {
10
+ tag: string;
11
+ classes?: string[] | undefined;
12
+ }>;
13
+ nodeWrapper: z.ZodOptional<z.ZodObject<{
14
+ tag: z.ZodString;
15
+ classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ tag: string;
18
+ classes?: string[] | undefined;
19
+ }, {
20
+ tag: string;
21
+ classes?: string[] | undefined;
22
+ }>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ rootWrapper: {
25
+ tag: string;
26
+ classes?: string[] | undefined;
27
+ };
28
+ nodeWrapper?: {
29
+ tag: string;
30
+ classes?: string[] | undefined;
31
+ } | undefined;
32
+ }, {
33
+ rootWrapper: {
34
+ tag: string;
35
+ classes?: string[] | undefined;
36
+ };
37
+ nodeWrapper?: {
38
+ tag: string;
39
+ classes?: string[] | undefined;
40
+ } | undefined;
41
+ }>;
42
+ export declare const CustomLayout: z.ZodObject<{
43
+ name: z.ZodLiteral<"custom-layout">;
44
+ config: z.ZodObject<{
45
+ rootWrapper: z.ZodObject<{
46
+ tag: z.ZodString;
47
+ classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ tag: string;
50
+ classes?: string[] | undefined;
51
+ }, {
52
+ tag: string;
53
+ classes?: string[] | undefined;
54
+ }>;
55
+ nodeWrapper: z.ZodOptional<z.ZodObject<{
56
+ tag: z.ZodString;
57
+ classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ tag: string;
60
+ classes?: string[] | undefined;
61
+ }, {
62
+ tag: string;
63
+ classes?: string[] | undefined;
64
+ }>>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ rootWrapper: {
67
+ tag: string;
68
+ classes?: string[] | undefined;
69
+ };
70
+ nodeWrapper?: {
71
+ tag: string;
72
+ classes?: string[] | undefined;
73
+ } | undefined;
74
+ }, {
75
+ rootWrapper: {
76
+ tag: string;
77
+ classes?: string[] | undefined;
78
+ };
79
+ nodeWrapper?: {
80
+ tag: string;
81
+ classes?: string[] | undefined;
82
+ } | undefined;
83
+ }>;
84
+ content: z.ZodObject<{
85
+ main: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodType<{
86
+ value: string;
87
+ type: "text";
88
+ } | {
89
+ type: "matrix-image";
90
+ matrixDomain: string;
91
+ matrixAssetId: string;
92
+ attributes?: (Record<string, string> & {
93
+ src?: undefined;
94
+ }) | undefined;
95
+ formattingOptions?: {
96
+ alignment: "left" | "center" | "right" | "justify";
97
+ } | undefined;
98
+ matrixIdentifier?: string | undefined;
99
+ } | {
100
+ type: "dam-image";
101
+ damSystemType: "bynder";
102
+ damSystemIdentifier: string;
103
+ damObjectId: string;
104
+ attributes?: (Record<string, string> & {
105
+ src?: undefined;
106
+ }) | undefined;
107
+ formattingOptions?: {
108
+ alignment: "left" | "center" | "right" | "justify";
109
+ } | undefined;
110
+ damAdditional?: {
111
+ variant?: string | undefined;
112
+ } | undefined;
113
+ } | {
114
+ type: "component";
115
+ componentId: string;
116
+ componentSet: string;
117
+ componentType?: "server" | "edge" | undefined;
118
+ contentItem?: {
119
+ id: string;
120
+ } | {
121
+ content: Record<string, unknown>;
122
+ schemaName: string;
123
+ } | undefined;
124
+ } | (({
125
+ type: "tag";
126
+ tag: string;
127
+ attributes?: Record<string, string> | undefined;
128
+ font?: {
129
+ bold?: boolean | undefined;
130
+ italics?: boolean | undefined;
131
+ underline?: boolean | undefined;
132
+ color?: string | undefined;
133
+ size?: string | undefined;
134
+ fontFamily?: string | undefined;
135
+ } | undefined;
136
+ formattingOptions?: {
137
+ alignment: "left" | "center" | "right" | "justify";
138
+ } | undefined;
139
+ } | {
140
+ type: "fragment";
141
+ } | {
142
+ type: "link-to-matrix-asset";
143
+ matrixDomain: string;
144
+ matrixAssetId: string;
145
+ target: "_blank" | "_self" | "_parent" | "_top";
146
+ attributes?: (Record<string, string> & {
147
+ target?: undefined;
148
+ href?: undefined;
149
+ }) | undefined;
150
+ formattingOptions?: {
151
+ alignment: "left" | "center" | "right" | "justify";
152
+ } | undefined;
153
+ matrixIdentifier?: string | undefined;
154
+ }) & {
155
+ children: import("../layout-content").LayoutContentNodes[];
156
+ }), z.ZodTypeDef, {
157
+ value: string;
158
+ type: "text";
159
+ } | {
160
+ type: "tag";
161
+ tag: string;
162
+ attributes?: Record<string, string> | undefined;
163
+ font?: {
164
+ bold?: boolean | undefined;
165
+ italics?: boolean | undefined;
166
+ underline?: boolean | undefined;
167
+ color?: string | undefined;
168
+ size?: string | undefined;
169
+ fontFamily?: string | undefined;
170
+ } | undefined;
171
+ formattingOptions?: {
172
+ alignment: "left" | "center" | "right" | "justify";
173
+ } | undefined;
174
+ } | {
175
+ type: "fragment";
176
+ } | {
177
+ type: "link-to-matrix-asset";
178
+ matrixDomain: string;
179
+ matrixAssetId: string;
180
+ target: "_blank" | "_self" | "_parent" | "_top";
181
+ attributes?: (Record<string, string> & {
182
+ target?: undefined;
183
+ href?: undefined;
184
+ }) | undefined;
185
+ formattingOptions?: {
186
+ alignment: "left" | "center" | "right" | "justify";
187
+ } | undefined;
188
+ matrixIdentifier?: string | undefined;
189
+ } | {
190
+ type: "matrix-image";
191
+ matrixDomain: string;
192
+ matrixAssetId: string;
193
+ attributes?: (Record<string, string> & {
194
+ src?: undefined;
195
+ }) | undefined;
196
+ formattingOptions?: {
197
+ alignment: "left" | "center" | "right" | "justify";
198
+ } | undefined;
199
+ matrixIdentifier?: string | undefined;
200
+ } | {
201
+ type: "dam-image";
202
+ damSystemType: "bynder";
203
+ damSystemIdentifier: string;
204
+ damObjectId: string;
205
+ attributes?: (Record<string, string> & {
206
+ src?: undefined;
207
+ }) | undefined;
208
+ formattingOptions?: {
209
+ alignment: "left" | "center" | "right" | "justify";
210
+ } | undefined;
211
+ damAdditional?: {
212
+ variant?: string | undefined;
213
+ } | undefined;
214
+ } | {
215
+ type: "component";
216
+ componentId: string;
217
+ componentSet: string;
218
+ componentType?: "server" | "edge" | undefined;
219
+ contentItem?: {
220
+ id: string;
221
+ } | {
222
+ content: Record<string, unknown>;
223
+ schemaName: string;
224
+ } | undefined;
225
+ }>, z.ZodType<import("../layout-content").LayoutVariationNode, z.ZodTypeDef, {
226
+ type: "variation";
227
+ default: {};
228
+ }>]>, "many">, (import("../layout-content").LayoutVariationNode | ({
229
+ value: string;
230
+ type: "text";
231
+ } | {
232
+ type: "matrix-image";
233
+ matrixDomain: string;
234
+ matrixAssetId: string;
235
+ attributes?: (Record<string, string> & {
236
+ src?: undefined;
237
+ }) | undefined;
238
+ formattingOptions?: {
239
+ alignment: "left" | "center" | "right" | "justify";
240
+ } | undefined;
241
+ matrixIdentifier?: string | undefined;
242
+ } | {
243
+ type: "dam-image";
244
+ damSystemType: "bynder";
245
+ damSystemIdentifier: string;
246
+ damObjectId: string;
247
+ attributes?: (Record<string, string> & {
248
+ src?: undefined;
249
+ }) | undefined;
250
+ formattingOptions?: {
251
+ alignment: "left" | "center" | "right" | "justify";
252
+ } | undefined;
253
+ damAdditional?: {
254
+ variant?: string | undefined;
255
+ } | undefined;
256
+ } | {
257
+ type: "component";
258
+ componentId: string;
259
+ componentSet: string;
260
+ componentType?: "server" | "edge" | undefined;
261
+ contentItem?: {
262
+ id: string;
263
+ } | {
264
+ content: Record<string, unknown>;
265
+ schemaName: string;
266
+ } | undefined;
267
+ } | (({
268
+ type: "tag";
269
+ tag: string;
270
+ attributes?: Record<string, string> | undefined;
271
+ font?: {
272
+ bold?: boolean | undefined;
273
+ italics?: boolean | undefined;
274
+ underline?: boolean | undefined;
275
+ color?: string | undefined;
276
+ size?: string | undefined;
277
+ fontFamily?: string | undefined;
278
+ } | undefined;
279
+ formattingOptions?: {
280
+ alignment: "left" | "center" | "right" | "justify";
281
+ } | undefined;
282
+ } | {
283
+ type: "fragment";
284
+ } | {
285
+ type: "link-to-matrix-asset";
286
+ matrixDomain: string;
287
+ matrixAssetId: string;
288
+ target: "_blank" | "_self" | "_parent" | "_top";
289
+ attributes?: (Record<string, string> & {
290
+ target?: undefined;
291
+ href?: undefined;
292
+ }) | undefined;
293
+ formattingOptions?: {
294
+ alignment: "left" | "center" | "right" | "justify";
295
+ } | undefined;
296
+ matrixIdentifier?: string | undefined;
297
+ }) & {
298
+ children: import("../layout-content").LayoutContentNodes[];
299
+ })))[], ({
300
+ value: string;
301
+ type: "text";
302
+ } | {
303
+ type: "tag";
304
+ tag: string;
305
+ attributes?: Record<string, string> | undefined;
306
+ font?: {
307
+ bold?: boolean | undefined;
308
+ italics?: boolean | undefined;
309
+ underline?: boolean | undefined;
310
+ color?: string | undefined;
311
+ size?: string | undefined;
312
+ fontFamily?: string | undefined;
313
+ } | undefined;
314
+ formattingOptions?: {
315
+ alignment: "left" | "center" | "right" | "justify";
316
+ } | undefined;
317
+ } | {
318
+ type: "fragment";
319
+ } | {
320
+ type: "link-to-matrix-asset";
321
+ matrixDomain: string;
322
+ matrixAssetId: string;
323
+ target: "_blank" | "_self" | "_parent" | "_top";
324
+ attributes?: (Record<string, string> & {
325
+ target?: undefined;
326
+ href?: undefined;
327
+ }) | undefined;
328
+ formattingOptions?: {
329
+ alignment: "left" | "center" | "right" | "justify";
330
+ } | undefined;
331
+ matrixIdentifier?: string | undefined;
332
+ } | {
333
+ type: "matrix-image";
334
+ matrixDomain: string;
335
+ matrixAssetId: string;
336
+ attributes?: (Record<string, string> & {
337
+ src?: undefined;
338
+ }) | undefined;
339
+ formattingOptions?: {
340
+ alignment: "left" | "center" | "right" | "justify";
341
+ } | undefined;
342
+ matrixIdentifier?: string | undefined;
343
+ } | {
344
+ type: "dam-image";
345
+ damSystemType: "bynder";
346
+ damSystemIdentifier: string;
347
+ damObjectId: string;
348
+ attributes?: (Record<string, string> & {
349
+ src?: undefined;
350
+ }) | undefined;
351
+ formattingOptions?: {
352
+ alignment: "left" | "center" | "right" | "justify";
353
+ } | undefined;
354
+ damAdditional?: {
355
+ variant?: string | undefined;
356
+ } | undefined;
357
+ } | {
358
+ type: "component";
359
+ componentId: string;
360
+ componentSet: string;
361
+ componentType?: "server" | "edge" | undefined;
362
+ contentItem?: {
363
+ id: string;
364
+ } | {
365
+ content: Record<string, unknown>;
366
+ schemaName: string;
367
+ } | undefined;
368
+ } | {
369
+ type: "variation";
370
+ default: {};
371
+ })[]>;
372
+ }, "strip", z.ZodTypeAny, {
373
+ main: (import("../layout-content").LayoutVariationNode | ({
374
+ value: string;
375
+ type: "text";
376
+ } | {
377
+ type: "matrix-image";
378
+ matrixDomain: string;
379
+ matrixAssetId: string;
380
+ attributes?: (Record<string, string> & {
381
+ src?: undefined;
382
+ }) | undefined;
383
+ formattingOptions?: {
384
+ alignment: "left" | "center" | "right" | "justify";
385
+ } | undefined;
386
+ matrixIdentifier?: string | undefined;
387
+ } | {
388
+ type: "dam-image";
389
+ damSystemType: "bynder";
390
+ damSystemIdentifier: string;
391
+ damObjectId: string;
392
+ attributes?: (Record<string, string> & {
393
+ src?: undefined;
394
+ }) | undefined;
395
+ formattingOptions?: {
396
+ alignment: "left" | "center" | "right" | "justify";
397
+ } | undefined;
398
+ damAdditional?: {
399
+ variant?: string | undefined;
400
+ } | undefined;
401
+ } | {
402
+ type: "component";
403
+ componentId: string;
404
+ componentSet: string;
405
+ componentType?: "server" | "edge" | undefined;
406
+ contentItem?: {
407
+ id: string;
408
+ } | {
409
+ content: Record<string, unknown>;
410
+ schemaName: string;
411
+ } | undefined;
412
+ } | (({
413
+ type: "tag";
414
+ tag: string;
415
+ attributes?: Record<string, string> | undefined;
416
+ font?: {
417
+ bold?: boolean | undefined;
418
+ italics?: boolean | undefined;
419
+ underline?: boolean | undefined;
420
+ color?: string | undefined;
421
+ size?: string | undefined;
422
+ fontFamily?: string | undefined;
423
+ } | undefined;
424
+ formattingOptions?: {
425
+ alignment: "left" | "center" | "right" | "justify";
426
+ } | undefined;
427
+ } | {
428
+ type: "fragment";
429
+ } | {
430
+ type: "link-to-matrix-asset";
431
+ matrixDomain: string;
432
+ matrixAssetId: string;
433
+ target: "_blank" | "_self" | "_parent" | "_top";
434
+ attributes?: (Record<string, string> & {
435
+ target?: undefined;
436
+ href?: undefined;
437
+ }) | undefined;
438
+ formattingOptions?: {
439
+ alignment: "left" | "center" | "right" | "justify";
440
+ } | undefined;
441
+ matrixIdentifier?: string | undefined;
442
+ }) & {
443
+ children: import("../layout-content").LayoutContentNodes[];
444
+ })))[];
445
+ }, {
446
+ main: ({
447
+ value: string;
448
+ type: "text";
449
+ } | {
450
+ type: "tag";
451
+ tag: string;
452
+ attributes?: Record<string, string> | undefined;
453
+ font?: {
454
+ bold?: boolean | undefined;
455
+ italics?: boolean | undefined;
456
+ underline?: boolean | undefined;
457
+ color?: string | undefined;
458
+ size?: string | undefined;
459
+ fontFamily?: string | undefined;
460
+ } | undefined;
461
+ formattingOptions?: {
462
+ alignment: "left" | "center" | "right" | "justify";
463
+ } | undefined;
464
+ } | {
465
+ type: "fragment";
466
+ } | {
467
+ type: "link-to-matrix-asset";
468
+ matrixDomain: string;
469
+ matrixAssetId: string;
470
+ target: "_blank" | "_self" | "_parent" | "_top";
471
+ attributes?: (Record<string, string> & {
472
+ target?: undefined;
473
+ href?: undefined;
474
+ }) | undefined;
475
+ formattingOptions?: {
476
+ alignment: "left" | "center" | "right" | "justify";
477
+ } | undefined;
478
+ matrixIdentifier?: string | undefined;
479
+ } | {
480
+ type: "matrix-image";
481
+ matrixDomain: string;
482
+ matrixAssetId: string;
483
+ attributes?: (Record<string, string> & {
484
+ src?: undefined;
485
+ }) | undefined;
486
+ formattingOptions?: {
487
+ alignment: "left" | "center" | "right" | "justify";
488
+ } | undefined;
489
+ matrixIdentifier?: string | undefined;
490
+ } | {
491
+ type: "dam-image";
492
+ damSystemType: "bynder";
493
+ damSystemIdentifier: string;
494
+ damObjectId: string;
495
+ attributes?: (Record<string, string> & {
496
+ src?: undefined;
497
+ }) | undefined;
498
+ formattingOptions?: {
499
+ alignment: "left" | "center" | "right" | "justify";
500
+ } | undefined;
501
+ damAdditional?: {
502
+ variant?: string | undefined;
503
+ } | undefined;
504
+ } | {
505
+ type: "component";
506
+ componentId: string;
507
+ componentSet: string;
508
+ componentType?: "server" | "edge" | undefined;
509
+ contentItem?: {
510
+ id: string;
511
+ } | {
512
+ content: Record<string, unknown>;
513
+ schemaName: string;
514
+ } | undefined;
515
+ } | {
516
+ type: "variation";
517
+ default: {};
518
+ })[];
519
+ }>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ content: {
522
+ main: (import("../layout-content").LayoutVariationNode | ({
523
+ value: string;
524
+ type: "text";
525
+ } | {
526
+ type: "matrix-image";
527
+ matrixDomain: string;
528
+ matrixAssetId: string;
529
+ attributes?: (Record<string, string> & {
530
+ src?: undefined;
531
+ }) | undefined;
532
+ formattingOptions?: {
533
+ alignment: "left" | "center" | "right" | "justify";
534
+ } | undefined;
535
+ matrixIdentifier?: string | undefined;
536
+ } | {
537
+ type: "dam-image";
538
+ damSystemType: "bynder";
539
+ damSystemIdentifier: string;
540
+ damObjectId: string;
541
+ attributes?: (Record<string, string> & {
542
+ src?: undefined;
543
+ }) | undefined;
544
+ formattingOptions?: {
545
+ alignment: "left" | "center" | "right" | "justify";
546
+ } | undefined;
547
+ damAdditional?: {
548
+ variant?: string | undefined;
549
+ } | undefined;
550
+ } | {
551
+ type: "component";
552
+ componentId: string;
553
+ componentSet: string;
554
+ componentType?: "server" | "edge" | undefined;
555
+ contentItem?: {
556
+ id: string;
557
+ } | {
558
+ content: Record<string, unknown>;
559
+ schemaName: string;
560
+ } | undefined;
561
+ } | (({
562
+ type: "tag";
563
+ tag: string;
564
+ attributes?: Record<string, string> | undefined;
565
+ font?: {
566
+ bold?: boolean | undefined;
567
+ italics?: boolean | undefined;
568
+ underline?: boolean | undefined;
569
+ color?: string | undefined;
570
+ size?: string | undefined;
571
+ fontFamily?: string | undefined;
572
+ } | undefined;
573
+ formattingOptions?: {
574
+ alignment: "left" | "center" | "right" | "justify";
575
+ } | undefined;
576
+ } | {
577
+ type: "fragment";
578
+ } | {
579
+ type: "link-to-matrix-asset";
580
+ matrixDomain: string;
581
+ matrixAssetId: string;
582
+ target: "_blank" | "_self" | "_parent" | "_top";
583
+ attributes?: (Record<string, string> & {
584
+ target?: undefined;
585
+ href?: undefined;
586
+ }) | undefined;
587
+ formattingOptions?: {
588
+ alignment: "left" | "center" | "right" | "justify";
589
+ } | undefined;
590
+ matrixIdentifier?: string | undefined;
591
+ }) & {
592
+ children: import("../layout-content").LayoutContentNodes[];
593
+ })))[];
594
+ };
595
+ name: "custom-layout";
596
+ config: {
597
+ rootWrapper: {
598
+ tag: string;
599
+ classes?: string[] | undefined;
600
+ };
601
+ nodeWrapper?: {
602
+ tag: string;
603
+ classes?: string[] | undefined;
604
+ } | undefined;
605
+ };
606
+ }, {
607
+ content: {
608
+ main: ({
609
+ value: string;
610
+ type: "text";
611
+ } | {
612
+ type: "tag";
613
+ tag: string;
614
+ attributes?: Record<string, string> | undefined;
615
+ font?: {
616
+ bold?: boolean | undefined;
617
+ italics?: boolean | undefined;
618
+ underline?: boolean | undefined;
619
+ color?: string | undefined;
620
+ size?: string | undefined;
621
+ fontFamily?: string | undefined;
622
+ } | undefined;
623
+ formattingOptions?: {
624
+ alignment: "left" | "center" | "right" | "justify";
625
+ } | undefined;
626
+ } | {
627
+ type: "fragment";
628
+ } | {
629
+ type: "link-to-matrix-asset";
630
+ matrixDomain: string;
631
+ matrixAssetId: string;
632
+ target: "_blank" | "_self" | "_parent" | "_top";
633
+ attributes?: (Record<string, string> & {
634
+ target?: undefined;
635
+ href?: undefined;
636
+ }) | undefined;
637
+ formattingOptions?: {
638
+ alignment: "left" | "center" | "right" | "justify";
639
+ } | undefined;
640
+ matrixIdentifier?: string | undefined;
641
+ } | {
642
+ type: "matrix-image";
643
+ matrixDomain: string;
644
+ matrixAssetId: string;
645
+ attributes?: (Record<string, string> & {
646
+ src?: undefined;
647
+ }) | undefined;
648
+ formattingOptions?: {
649
+ alignment: "left" | "center" | "right" | "justify";
650
+ } | undefined;
651
+ matrixIdentifier?: string | undefined;
652
+ } | {
653
+ type: "dam-image";
654
+ damSystemType: "bynder";
655
+ damSystemIdentifier: string;
656
+ damObjectId: string;
657
+ attributes?: (Record<string, string> & {
658
+ src?: undefined;
659
+ }) | undefined;
660
+ formattingOptions?: {
661
+ alignment: "left" | "center" | "right" | "justify";
662
+ } | undefined;
663
+ damAdditional?: {
664
+ variant?: string | undefined;
665
+ } | undefined;
666
+ } | {
667
+ type: "component";
668
+ componentId: string;
669
+ componentSet: string;
670
+ componentType?: "server" | "edge" | undefined;
671
+ contentItem?: {
672
+ id: string;
673
+ } | {
674
+ content: Record<string, unknown>;
675
+ schemaName: string;
676
+ } | undefined;
677
+ } | {
678
+ type: "variation";
679
+ default: {};
680
+ })[];
681
+ };
682
+ name: "custom-layout";
683
+ config: {
684
+ rootWrapper: {
685
+ tag: string;
686
+ classes?: string[] | undefined;
687
+ };
688
+ nodeWrapper?: {
689
+ tag: string;
690
+ classes?: string[] | undefined;
691
+ } | undefined;
692
+ };
693
+ }>;
694
+ export declare const CUSTOM_LAYOUT_TEMPLATE = "\n<{{rootTag}} class=\"{{joinClasses rootClasses}}\">\n {{#each main}}\n {{#if ../nodeTag}}\n <{{../nodeTag}} class=\"{{joinClasses ../nodeClasses}}\">{{{this}}}</{{../nodeTag}}>\n {{else}}\n {{{this}}}\n {{/if}}\n {{/each}}\n</{{rootTag}}>\n";