@squiz/dx-page-contents-lib 1.53.1-alpha.2 → 1.53.1-alpha.21

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.
@@ -1,9 +1,240 @@
1
1
  import { z } from 'zod';
2
- import { LayoutContentNodes } from '../layout-content';
3
2
  export declare const SingleColumnLayout: z.ZodObject<{
4
3
  name: z.ZodLiteral<"single-column">;
5
4
  content: z.ZodObject<{
6
- main: z.ZodArray<z.ZodType<LayoutContentNodes, z.ZodTypeDef, {
5
+ main: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodType<{
6
+ value: string;
7
+ type: "text";
8
+ } | {
9
+ type: "matrix-image";
10
+ matrixDomain: string;
11
+ matrixAssetId: string;
12
+ matrixIdentifier?: string | undefined;
13
+ formattingOptions?: {
14
+ alignment: "left" | "center" | "right" | "justify";
15
+ } | undefined;
16
+ } | {
17
+ type: "component";
18
+ componentId: string;
19
+ componentSet: string;
20
+ contentItem?: {
21
+ id: string;
22
+ } | {
23
+ content: Record<string, unknown>;
24
+ schemaName: string;
25
+ } | undefined;
26
+ } | (({
27
+ type: "tag";
28
+ tag: string;
29
+ attributes?: Record<string, string> | undefined;
30
+ font?: {
31
+ bold?: boolean | undefined;
32
+ italics?: boolean | undefined;
33
+ underline?: boolean | undefined;
34
+ color?: string | undefined;
35
+ size?: string | undefined;
36
+ fontFamily?: string | undefined;
37
+ } | undefined;
38
+ formattingOptions?: {
39
+ alignment: "left" | "center" | "right" | "justify";
40
+ } | undefined;
41
+ } | {
42
+ type: "link-to-matrix-asset";
43
+ matrixDomain: string;
44
+ matrixAssetId: string;
45
+ target: "_blank" | "_self" | "_parent" | "_top";
46
+ matrixIdentifier?: string | undefined;
47
+ formattingOptions?: {
48
+ alignment: "left" | "center" | "right" | "justify";
49
+ } | undefined;
50
+ }) & {
51
+ children: (import("../layout-content").LayoutVariationNode | ({
52
+ value: string;
53
+ type: "text";
54
+ } | {
55
+ type: "matrix-image";
56
+ matrixDomain: string;
57
+ matrixAssetId: string;
58
+ matrixIdentifier?: string | undefined;
59
+ formattingOptions?: {
60
+ alignment: "left" | "center" | "right" | "justify";
61
+ } | undefined;
62
+ } | {
63
+ type: "component";
64
+ componentId: string;
65
+ componentSet: string;
66
+ contentItem?: {
67
+ id: string;
68
+ } | {
69
+ content: Record<string, unknown>;
70
+ schemaName: string;
71
+ } | undefined;
72
+ } | (({
73
+ type: "tag";
74
+ tag: string;
75
+ attributes?: Record<string, string> | undefined;
76
+ font?: {
77
+ bold?: boolean | undefined;
78
+ italics?: boolean | undefined;
79
+ underline?: boolean | undefined;
80
+ color?: string | undefined;
81
+ size?: string | undefined;
82
+ fontFamily?: string | undefined;
83
+ } | undefined;
84
+ formattingOptions?: {
85
+ alignment: "left" | "center" | "right" | "justify";
86
+ } | undefined;
87
+ } | {
88
+ type: "link-to-matrix-asset";
89
+ matrixDomain: string;
90
+ matrixAssetId: string;
91
+ target: "_blank" | "_self" | "_parent" | "_top";
92
+ matrixIdentifier?: string | undefined;
93
+ formattingOptions?: {
94
+ alignment: "left" | "center" | "right" | "justify";
95
+ } | undefined;
96
+ }) & any)))[];
97
+ }), z.ZodTypeDef, {
98
+ value: string;
99
+ type: "text";
100
+ } | {
101
+ type: "tag";
102
+ tag: string;
103
+ attributes?: Record<string, string> | undefined;
104
+ font?: {
105
+ bold?: boolean | undefined;
106
+ italics?: boolean | undefined;
107
+ underline?: boolean | undefined;
108
+ color?: string | undefined;
109
+ size?: string | undefined;
110
+ fontFamily?: string | undefined;
111
+ } | undefined;
112
+ formattingOptions?: {
113
+ alignment: "left" | "center" | "right" | "justify";
114
+ } | undefined;
115
+ } | {
116
+ type: "link-to-matrix-asset";
117
+ matrixDomain: string;
118
+ matrixAssetId: string;
119
+ target: "_blank" | "_self" | "_parent" | "_top";
120
+ matrixIdentifier?: string | undefined;
121
+ formattingOptions?: {
122
+ alignment: "left" | "center" | "right" | "justify";
123
+ } | undefined;
124
+ } | {
125
+ type: "matrix-image";
126
+ matrixDomain: string;
127
+ matrixAssetId: string;
128
+ matrixIdentifier?: string | undefined;
129
+ formattingOptions?: {
130
+ alignment: "left" | "center" | "right" | "justify";
131
+ } | undefined;
132
+ } | {
133
+ type: "component";
134
+ componentId: string;
135
+ componentSet: string;
136
+ contentItem?: {
137
+ id: string;
138
+ } | {
139
+ content: Record<string, unknown>;
140
+ schemaName: string;
141
+ } | undefined;
142
+ }>, z.ZodType<import("../layout-content").LayoutVariationNode, z.ZodTypeDef, {
143
+ type: "variation";
144
+ default: {};
145
+ }>]>, "many">, (import("../layout-content").LayoutVariationNode | ({
146
+ value: string;
147
+ type: "text";
148
+ } | {
149
+ type: "matrix-image";
150
+ matrixDomain: string;
151
+ matrixAssetId: string;
152
+ matrixIdentifier?: string | undefined;
153
+ formattingOptions?: {
154
+ alignment: "left" | "center" | "right" | "justify";
155
+ } | undefined;
156
+ } | {
157
+ type: "component";
158
+ componentId: string;
159
+ componentSet: string;
160
+ contentItem?: {
161
+ id: string;
162
+ } | {
163
+ content: Record<string, unknown>;
164
+ schemaName: string;
165
+ } | undefined;
166
+ } | (({
167
+ type: "tag";
168
+ tag: string;
169
+ attributes?: Record<string, string> | undefined;
170
+ font?: {
171
+ bold?: boolean | undefined;
172
+ italics?: boolean | undefined;
173
+ underline?: boolean | undefined;
174
+ color?: string | undefined;
175
+ size?: string | undefined;
176
+ fontFamily?: string | undefined;
177
+ } | undefined;
178
+ formattingOptions?: {
179
+ alignment: "left" | "center" | "right" | "justify";
180
+ } | undefined;
181
+ } | {
182
+ type: "link-to-matrix-asset";
183
+ matrixDomain: string;
184
+ matrixAssetId: string;
185
+ target: "_blank" | "_self" | "_parent" | "_top";
186
+ matrixIdentifier?: string | undefined;
187
+ formattingOptions?: {
188
+ alignment: "left" | "center" | "right" | "justify";
189
+ } | undefined;
190
+ }) & {
191
+ children: (import("../layout-content").LayoutVariationNode | ({
192
+ value: string;
193
+ type: "text";
194
+ } | {
195
+ type: "matrix-image";
196
+ matrixDomain: string;
197
+ matrixAssetId: string;
198
+ matrixIdentifier?: string | undefined;
199
+ formattingOptions?: {
200
+ alignment: "left" | "center" | "right" | "justify";
201
+ } | undefined;
202
+ } | {
203
+ type: "component";
204
+ componentId: string;
205
+ componentSet: string;
206
+ contentItem?: {
207
+ id: string;
208
+ } | {
209
+ content: Record<string, unknown>;
210
+ schemaName: string;
211
+ } | undefined;
212
+ } | (({
213
+ type: "tag";
214
+ tag: string;
215
+ attributes?: Record<string, string> | undefined;
216
+ font?: {
217
+ bold?: boolean | undefined;
218
+ italics?: boolean | undefined;
219
+ underline?: boolean | undefined;
220
+ color?: string | undefined;
221
+ size?: string | undefined;
222
+ fontFamily?: string | undefined;
223
+ } | undefined;
224
+ formattingOptions?: {
225
+ alignment: "left" | "center" | "right" | "justify";
226
+ } | undefined;
227
+ } | {
228
+ type: "link-to-matrix-asset";
229
+ matrixDomain: string;
230
+ matrixAssetId: string;
231
+ target: "_blank" | "_self" | "_parent" | "_top";
232
+ matrixIdentifier?: string | undefined;
233
+ formattingOptions?: {
234
+ alignment: "left" | "center" | "right" | "justify";
235
+ } | undefined;
236
+ }) & any)))[];
237
+ })))[], ({
7
238
  value: string;
8
239
  type: "text";
9
240
  } | {
@@ -51,9 +282,101 @@ export declare const SingleColumnLayout: z.ZodObject<{
51
282
  } | {
52
283
  type: "variation";
53
284
  default: {};
54
- }>, "many">;
285
+ })[]>;
55
286
  }, "strip", z.ZodTypeAny, {
56
- main: LayoutContentNodes[];
287
+ main: (import("../layout-content").LayoutVariationNode | ({
288
+ value: string;
289
+ type: "text";
290
+ } | {
291
+ type: "matrix-image";
292
+ matrixDomain: string;
293
+ matrixAssetId: string;
294
+ matrixIdentifier?: string | undefined;
295
+ formattingOptions?: {
296
+ alignment: "left" | "center" | "right" | "justify";
297
+ } | undefined;
298
+ } | {
299
+ type: "component";
300
+ componentId: string;
301
+ componentSet: string;
302
+ contentItem?: {
303
+ id: string;
304
+ } | {
305
+ content: Record<string, unknown>;
306
+ schemaName: string;
307
+ } | undefined;
308
+ } | (({
309
+ type: "tag";
310
+ tag: string;
311
+ attributes?: Record<string, string> | undefined;
312
+ font?: {
313
+ bold?: boolean | undefined;
314
+ italics?: boolean | undefined;
315
+ underline?: boolean | undefined;
316
+ color?: string | undefined;
317
+ size?: string | undefined;
318
+ fontFamily?: string | undefined;
319
+ } | undefined;
320
+ formattingOptions?: {
321
+ alignment: "left" | "center" | "right" | "justify";
322
+ } | undefined;
323
+ } | {
324
+ type: "link-to-matrix-asset";
325
+ matrixDomain: string;
326
+ matrixAssetId: string;
327
+ target: "_blank" | "_self" | "_parent" | "_top";
328
+ matrixIdentifier?: string | undefined;
329
+ formattingOptions?: {
330
+ alignment: "left" | "center" | "right" | "justify";
331
+ } | undefined;
332
+ }) & {
333
+ children: (import("../layout-content").LayoutVariationNode | ({
334
+ value: string;
335
+ type: "text";
336
+ } | {
337
+ type: "matrix-image";
338
+ matrixDomain: string;
339
+ matrixAssetId: string;
340
+ matrixIdentifier?: string | undefined;
341
+ formattingOptions?: {
342
+ alignment: "left" | "center" | "right" | "justify";
343
+ } | undefined;
344
+ } | {
345
+ type: "component";
346
+ componentId: string;
347
+ componentSet: string;
348
+ contentItem?: {
349
+ id: string;
350
+ } | {
351
+ content: Record<string, unknown>;
352
+ schemaName: string;
353
+ } | undefined;
354
+ } | (({
355
+ type: "tag";
356
+ tag: string;
357
+ attributes?: Record<string, string> | undefined;
358
+ font?: {
359
+ bold?: boolean | undefined;
360
+ italics?: boolean | undefined;
361
+ underline?: boolean | undefined;
362
+ color?: string | undefined;
363
+ size?: string | undefined;
364
+ fontFamily?: string | undefined;
365
+ } | undefined;
366
+ formattingOptions?: {
367
+ alignment: "left" | "center" | "right" | "justify";
368
+ } | undefined;
369
+ } | {
370
+ type: "link-to-matrix-asset";
371
+ matrixDomain: string;
372
+ matrixAssetId: string;
373
+ target: "_blank" | "_self" | "_parent" | "_top";
374
+ matrixIdentifier?: string | undefined;
375
+ formattingOptions?: {
376
+ alignment: "left" | "center" | "right" | "justify";
377
+ } | undefined;
378
+ }) & any)))[];
379
+ })))[];
57
380
  }, {
58
381
  main: ({
59
382
  value: string;
@@ -107,7 +430,99 @@ export declare const SingleColumnLayout: z.ZodObject<{
107
430
  }>;
108
431
  }, "strip", z.ZodTypeAny, {
109
432
  content: {
110
- main: LayoutContentNodes[];
433
+ main: (import("../layout-content").LayoutVariationNode | ({
434
+ value: string;
435
+ type: "text";
436
+ } | {
437
+ type: "matrix-image";
438
+ matrixDomain: string;
439
+ matrixAssetId: string;
440
+ matrixIdentifier?: string | undefined;
441
+ formattingOptions?: {
442
+ alignment: "left" | "center" | "right" | "justify";
443
+ } | undefined;
444
+ } | {
445
+ type: "component";
446
+ componentId: string;
447
+ componentSet: string;
448
+ contentItem?: {
449
+ id: string;
450
+ } | {
451
+ content: Record<string, unknown>;
452
+ schemaName: string;
453
+ } | undefined;
454
+ } | (({
455
+ type: "tag";
456
+ tag: string;
457
+ attributes?: Record<string, string> | undefined;
458
+ font?: {
459
+ bold?: boolean | undefined;
460
+ italics?: boolean | undefined;
461
+ underline?: boolean | undefined;
462
+ color?: string | undefined;
463
+ size?: string | undefined;
464
+ fontFamily?: string | undefined;
465
+ } | undefined;
466
+ formattingOptions?: {
467
+ alignment: "left" | "center" | "right" | "justify";
468
+ } | undefined;
469
+ } | {
470
+ type: "link-to-matrix-asset";
471
+ matrixDomain: string;
472
+ matrixAssetId: string;
473
+ target: "_blank" | "_self" | "_parent" | "_top";
474
+ matrixIdentifier?: string | undefined;
475
+ formattingOptions?: {
476
+ alignment: "left" | "center" | "right" | "justify";
477
+ } | undefined;
478
+ }) & {
479
+ children: (import("../layout-content").LayoutVariationNode | ({
480
+ value: string;
481
+ type: "text";
482
+ } | {
483
+ type: "matrix-image";
484
+ matrixDomain: string;
485
+ matrixAssetId: string;
486
+ matrixIdentifier?: string | undefined;
487
+ formattingOptions?: {
488
+ alignment: "left" | "center" | "right" | "justify";
489
+ } | undefined;
490
+ } | {
491
+ type: "component";
492
+ componentId: string;
493
+ componentSet: string;
494
+ contentItem?: {
495
+ id: string;
496
+ } | {
497
+ content: Record<string, unknown>;
498
+ schemaName: string;
499
+ } | undefined;
500
+ } | (({
501
+ type: "tag";
502
+ tag: string;
503
+ attributes?: Record<string, string> | undefined;
504
+ font?: {
505
+ bold?: boolean | undefined;
506
+ italics?: boolean | undefined;
507
+ underline?: boolean | undefined;
508
+ color?: string | undefined;
509
+ size?: string | undefined;
510
+ fontFamily?: string | undefined;
511
+ } | undefined;
512
+ formattingOptions?: {
513
+ alignment: "left" | "center" | "right" | "justify";
514
+ } | undefined;
515
+ } | {
516
+ type: "link-to-matrix-asset";
517
+ matrixDomain: string;
518
+ matrixAssetId: string;
519
+ target: "_blank" | "_self" | "_parent" | "_top";
520
+ matrixIdentifier?: string | undefined;
521
+ formattingOptions?: {
522
+ alignment: "left" | "center" | "right" | "justify";
523
+ } | undefined;
524
+ }) & any)))[];
525
+ })))[];
111
526
  };
112
527
  name: "single-column";
113
528
  }, {
@@ -6,7 +6,7 @@ const layout_content_1 = require("../layout-content");
6
6
  exports.SingleColumnLayout = zod_1.z.object({
7
7
  name: zod_1.z.literal('single-column'),
8
8
  content: zod_1.z.object({
9
- main: zod_1.z.array(layout_content_1.LayoutContentNodes),
9
+ main: layout_content_1.PageLayoutContent,
10
10
  }),
11
11
  });
12
12
  exports.TEMPLATE = `
@@ -1 +1 @@
1
- {"version":3,"file":"single-column.layout.js","sourceRoot":"","sources":["../../src/layouts/single-column.layout.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAAuD;AAE1C,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IAChC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,mCAAkB,CAAC;KAClC,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG;;CAEvB,CAAC"}
1
+ {"version":3,"file":"single-column.layout.js","sourceRoot":"","sources":["../../src/layouts/single-column.layout.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAAsD;AAEzC,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IAChC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,kCAAiB;KACxB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG;;CAEvB,CAAC"}