@squiz/dx-page-contents-lib 1.69.0 → 1.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/formatted-text.d.ts +63 -6
- package/lib/formatted-text.js +25 -1
- package/lib/formatted-text.js.map +1 -1
- package/lib/formatted-text.spec.d.ts +1 -0
- package/lib/formatted-text.spec.js +109 -0
- package/lib/formatted-text.spec.js.map +1 -0
- package/lib/layout-content.d.ts +96 -0
- package/lib/layouts/index.d.ts +624 -0
- package/lib/layouts/raw.layout.d.ts +156 -0
- package/lib/layouts/single-column.layout.d.ts +156 -0
- package/lib/layouts/two-column.layout.d.ts +312 -0
- package/lib/mocks/PageContentsHelpers.d.ts +780 -0
- package/package.json +1 -1
package/lib/formatted-text.d.ts
CHANGED
|
@@ -93,6 +93,16 @@ export declare const LinkToMatrixAssetNode: z.ZodObject<{
|
|
|
93
93
|
}, {
|
|
94
94
|
alignment: "left" | "center" | "right" | "justify";
|
|
95
95
|
}>>;
|
|
96
|
+
attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
97
|
+
href: z.ZodOptional<z.ZodNever>;
|
|
98
|
+
target: z.ZodOptional<z.ZodNever>;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
href?: undefined;
|
|
101
|
+
target?: undefined;
|
|
102
|
+
}, {
|
|
103
|
+
href?: undefined;
|
|
104
|
+
target?: undefined;
|
|
105
|
+
}>>>;
|
|
96
106
|
}, "strip", z.ZodTypeAny, {
|
|
97
107
|
type: "link-to-matrix-asset";
|
|
98
108
|
matrixDomain: string;
|
|
@@ -102,6 +112,10 @@ export declare const LinkToMatrixAssetNode: z.ZodObject<{
|
|
|
102
112
|
formattingOptions?: {
|
|
103
113
|
alignment: "left" | "center" | "right" | "justify";
|
|
104
114
|
} | undefined;
|
|
115
|
+
attributes?: (Record<string, string> & {
|
|
116
|
+
href?: undefined;
|
|
117
|
+
target?: undefined;
|
|
118
|
+
}) | undefined;
|
|
105
119
|
}, {
|
|
106
120
|
type: "link-to-matrix-asset";
|
|
107
121
|
matrixDomain: string;
|
|
@@ -111,6 +125,10 @@ export declare const LinkToMatrixAssetNode: z.ZodObject<{
|
|
|
111
125
|
formattingOptions?: {
|
|
112
126
|
alignment: "left" | "center" | "right" | "justify";
|
|
113
127
|
} | undefined;
|
|
128
|
+
attributes?: (Record<string, string> & {
|
|
129
|
+
href?: undefined;
|
|
130
|
+
target?: undefined;
|
|
131
|
+
}) | undefined;
|
|
114
132
|
}>;
|
|
115
133
|
export declare const MatrixImageNode: z.ZodObject<{
|
|
116
134
|
type: z.ZodLiteral<"matrix-image">;
|
|
@@ -124,6 +142,13 @@ export declare const MatrixImageNode: z.ZodObject<{
|
|
|
124
142
|
}, {
|
|
125
143
|
alignment: "left" | "center" | "right" | "justify";
|
|
126
144
|
}>>;
|
|
145
|
+
attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
146
|
+
src: z.ZodOptional<z.ZodNever>;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
src?: undefined;
|
|
149
|
+
}, {
|
|
150
|
+
src?: undefined;
|
|
151
|
+
}>>>;
|
|
127
152
|
}, "strip", z.ZodTypeAny, {
|
|
128
153
|
type: "matrix-image";
|
|
129
154
|
matrixDomain: string;
|
|
@@ -132,6 +157,9 @@ export declare const MatrixImageNode: z.ZodObject<{
|
|
|
132
157
|
formattingOptions?: {
|
|
133
158
|
alignment: "left" | "center" | "right" | "justify";
|
|
134
159
|
} | undefined;
|
|
160
|
+
attributes?: (Record<string, string> & {
|
|
161
|
+
src?: undefined;
|
|
162
|
+
}) | undefined;
|
|
135
163
|
}, {
|
|
136
164
|
type: "matrix-image";
|
|
137
165
|
matrixDomain: string;
|
|
@@ -140,6 +168,9 @@ export declare const MatrixImageNode: z.ZodObject<{
|
|
|
140
168
|
formattingOptions?: {
|
|
141
169
|
alignment: "left" | "center" | "right" | "justify";
|
|
142
170
|
} | undefined;
|
|
171
|
+
attributes?: (Record<string, string> & {
|
|
172
|
+
src?: undefined;
|
|
173
|
+
}) | undefined;
|
|
143
174
|
}>;
|
|
144
175
|
export declare const DamImageNode: z.ZodObject<{
|
|
145
176
|
type: z.ZodLiteral<"dam-image">;
|
|
@@ -147,28 +178,54 @@ export declare const DamImageNode: z.ZodObject<{
|
|
|
147
178
|
damSystemIdentifier: z.ZodString;
|
|
148
179
|
damObjectId: z.ZodString;
|
|
149
180
|
damAdditional: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
variant?: string | undefined;
|
|
184
|
+
}, {
|
|
185
|
+
variant?: string | undefined;
|
|
186
|
+
}>>;
|
|
187
|
+
formattingOptions: z.ZodOptional<z.ZodObject<{
|
|
150
188
|
alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
|
|
151
189
|
}, "strip", z.ZodTypeAny, {
|
|
152
190
|
alignment: "left" | "center" | "right" | "justify";
|
|
153
191
|
}, {
|
|
154
192
|
alignment: "left" | "center" | "right" | "justify";
|
|
155
193
|
}>>;
|
|
194
|
+
attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
195
|
+
src: z.ZodOptional<z.ZodNever>;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
src?: undefined;
|
|
198
|
+
}, {
|
|
199
|
+
src?: undefined;
|
|
200
|
+
}>>>;
|
|
156
201
|
}, "strip", z.ZodTypeAny, {
|
|
157
202
|
type: "dam-image";
|
|
158
203
|
damSystemType: "bynder";
|
|
159
204
|
damSystemIdentifier: string;
|
|
160
205
|
damObjectId: string;
|
|
161
206
|
damAdditional?: {
|
|
207
|
+
variant?: string | undefined;
|
|
208
|
+
} | undefined;
|
|
209
|
+
formattingOptions?: {
|
|
162
210
|
alignment: "left" | "center" | "right" | "justify";
|
|
163
211
|
} | undefined;
|
|
212
|
+
attributes?: (Record<string, string> & {
|
|
213
|
+
src?: undefined;
|
|
214
|
+
}) | undefined;
|
|
164
215
|
}, {
|
|
165
216
|
type: "dam-image";
|
|
166
217
|
damSystemType: "bynder";
|
|
167
218
|
damSystemIdentifier: string;
|
|
168
219
|
damObjectId: string;
|
|
169
220
|
damAdditional?: {
|
|
221
|
+
variant?: string | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
formattingOptions?: {
|
|
170
224
|
alignment: "left" | "center" | "right" | "justify";
|
|
171
225
|
} | undefined;
|
|
226
|
+
attributes?: (Record<string, string> & {
|
|
227
|
+
src?: undefined;
|
|
228
|
+
}) | undefined;
|
|
172
229
|
}>;
|
|
173
230
|
export declare const ComponentNode: z.ZodObject<{
|
|
174
231
|
type: z.ZodLiteral<"component">;
|
|
@@ -227,27 +284,27 @@ export declare const Variant: z.ZodObject<{
|
|
|
227
284
|
id: z.ZodString;
|
|
228
285
|
variant: z.ZodString;
|
|
229
286
|
}, "strip", z.ZodTypeAny, {
|
|
230
|
-
id: string;
|
|
231
287
|
variant: string;
|
|
232
|
-
}, {
|
|
233
288
|
id: string;
|
|
289
|
+
}, {
|
|
234
290
|
variant: string;
|
|
291
|
+
id: string;
|
|
235
292
|
}>>;
|
|
236
293
|
}, "strip", z.ZodTypeAny, {
|
|
237
294
|
segment?: {
|
|
238
295
|
code: string;
|
|
239
296
|
} | undefined;
|
|
240
297
|
experiment?: {
|
|
241
|
-
id: string;
|
|
242
298
|
variant: string;
|
|
299
|
+
id: string;
|
|
243
300
|
} | undefined;
|
|
244
301
|
}, {
|
|
245
302
|
segment?: {
|
|
246
303
|
code: string;
|
|
247
304
|
} | undefined;
|
|
248
305
|
experiment?: {
|
|
249
|
-
id: string;
|
|
250
306
|
variant: string;
|
|
307
|
+
id: string;
|
|
251
308
|
} | undefined;
|
|
252
309
|
}>;
|
|
253
310
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -256,8 +313,8 @@ export declare const Variant: z.ZodObject<{
|
|
|
256
313
|
code: string;
|
|
257
314
|
} | undefined;
|
|
258
315
|
experiment?: {
|
|
259
|
-
id: string;
|
|
260
316
|
variant: string;
|
|
317
|
+
id: string;
|
|
261
318
|
} | undefined;
|
|
262
319
|
};
|
|
263
320
|
}, {
|
|
@@ -266,8 +323,8 @@ export declare const Variant: z.ZodObject<{
|
|
|
266
323
|
code: string;
|
|
267
324
|
} | undefined;
|
|
268
325
|
experiment?: {
|
|
269
|
-
id: string;
|
|
270
326
|
variant: string;
|
|
327
|
+
id: string;
|
|
271
328
|
} | undefined;
|
|
272
329
|
};
|
|
273
330
|
}>;
|
package/lib/formatted-text.js
CHANGED
|
@@ -35,6 +35,13 @@ exports.LinkToMatrixAssetNode = zod_1.z.object({
|
|
|
35
35
|
matrixAssetId: zod_1.z.string().min(1),
|
|
36
36
|
target: zod_1.z.enum(['_blank', '_self', '_parent', '_top']),
|
|
37
37
|
formattingOptions: FormattingOptions.optional(),
|
|
38
|
+
attributes: zod_1.z
|
|
39
|
+
.record(zod_1.z.string())
|
|
40
|
+
.and(zod_1.z.object({
|
|
41
|
+
href: zod_1.z.never().optional(),
|
|
42
|
+
target: zod_1.z.never().optional(),
|
|
43
|
+
}))
|
|
44
|
+
.optional(),
|
|
38
45
|
});
|
|
39
46
|
exports.MatrixImageNode = zod_1.z.object({
|
|
40
47
|
type: zod_1.z.literal('matrix-image'),
|
|
@@ -42,13 +49,30 @@ exports.MatrixImageNode = zod_1.z.object({
|
|
|
42
49
|
matrixDomain: zod_1.z.string().min(1),
|
|
43
50
|
matrixAssetId: zod_1.z.string().min(1),
|
|
44
51
|
formattingOptions: FormattingOptions.optional(),
|
|
52
|
+
attributes: zod_1.z
|
|
53
|
+
.record(zod_1.z.string())
|
|
54
|
+
.and(zod_1.z.object({
|
|
55
|
+
src: zod_1.z.never().optional(),
|
|
56
|
+
}))
|
|
57
|
+
.optional(),
|
|
45
58
|
});
|
|
46
59
|
exports.DamImageNode = zod_1.z.object({
|
|
47
60
|
type: zod_1.z.literal('dam-image'),
|
|
48
61
|
damSystemType: zod_1.z.enum(['bynder']),
|
|
49
62
|
damSystemIdentifier: zod_1.z.string().min(1),
|
|
50
63
|
damObjectId: zod_1.z.string().min(1),
|
|
51
|
-
damAdditional:
|
|
64
|
+
damAdditional: zod_1.z
|
|
65
|
+
.object({
|
|
66
|
+
variant: zod_1.z.string().min(1).optional(),
|
|
67
|
+
})
|
|
68
|
+
.optional(),
|
|
69
|
+
formattingOptions: FormattingOptions.optional(),
|
|
70
|
+
attributes: zod_1.z
|
|
71
|
+
.record(zod_1.z.string())
|
|
72
|
+
.and(zod_1.z.object({
|
|
73
|
+
src: zod_1.z.never().optional(),
|
|
74
|
+
}))
|
|
75
|
+
.optional(),
|
|
52
76
|
});
|
|
53
77
|
exports.ComponentNode = zod_1.z.object({
|
|
54
78
|
type: zod_1.z.literal('component'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatted-text.js","sourceRoot":"","sources":["../src/formatted-text.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sEAAsE;AAEtE,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,EAAE;IAC5B,IAAI,EAAE,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C,CAAC,QAAQ,EAAE;IACpD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,OAAC;SACX,MAAM,CAAC;QACN,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;KACf,CAAC;SACD,EAAE,CACD,OAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;QAC9B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;KACvB,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC,CAAC;AAEU,QAAA,OAAO,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,UAAU,EAAE,OAAC;SACV,MAAM,CAAC;QACN,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;SACjB,CAAC;QACF,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;YACd,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;SACpB,CAAC;KACH,CAAC;SACD,OAAO,EAAE;CACb,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;CACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const formatted_text_1 = require("./formatted-text");
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
describe('formatted-text', () => {
|
|
6
|
+
describe('LinkToMatrixAssetNode', () => {
|
|
7
|
+
const validNode = {
|
|
8
|
+
type: 'link-to-matrix-asset',
|
|
9
|
+
matrixIdentifier: 'matrix-identifier',
|
|
10
|
+
matrixDomain: 'https://my-matrix.squiz.net',
|
|
11
|
+
matrixAssetId: '12345',
|
|
12
|
+
target: '_blank',
|
|
13
|
+
formattingOptions: {
|
|
14
|
+
alignment: 'center',
|
|
15
|
+
},
|
|
16
|
+
attributes: {
|
|
17
|
+
title: 'Link title',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
it.each([['valid node', validNode]])('Does not throw when parsing a %s', (description, node) => {
|
|
21
|
+
expect(() => formatted_text_1.LinkToMatrixAssetNode.parse(node)).not.toThrow();
|
|
22
|
+
});
|
|
23
|
+
it.each([
|
|
24
|
+
[
|
|
25
|
+
'node with a reserved attribute',
|
|
26
|
+
{
|
|
27
|
+
...validNode,
|
|
28
|
+
attributes: {
|
|
29
|
+
href: 'https://www.my-matrix.squiz.net',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
])('Throws when parsing a %s', (description, node) => {
|
|
34
|
+
expect(() => formatted_text_1.LinkToMatrixAssetNode.parse(node)).toThrow(zod_1.ZodError);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe('MatrixImageNode', () => {
|
|
38
|
+
const validNode = {
|
|
39
|
+
type: 'matrix-image',
|
|
40
|
+
matrixIdentifier: 'matrix-identifier',
|
|
41
|
+
matrixDomain: 'https://my-matrix.squiz.net',
|
|
42
|
+
matrixAssetId: '12345',
|
|
43
|
+
formattingOptions: {
|
|
44
|
+
alignment: 'center',
|
|
45
|
+
},
|
|
46
|
+
attributes: {
|
|
47
|
+
title: 'Link title',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
it.each([['valid node', validNode]])('Does not throw when parsing a %s', (description, node) => {
|
|
51
|
+
expect(() => formatted_text_1.MatrixImageNode.parse(node)).not.toThrow();
|
|
52
|
+
});
|
|
53
|
+
it.each([
|
|
54
|
+
[
|
|
55
|
+
'node with a reserved attribute',
|
|
56
|
+
{
|
|
57
|
+
...validNode,
|
|
58
|
+
attributes: {
|
|
59
|
+
src: 'https://www.my-matrix.squiz.net/image.png',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
])('Throws when parsing a %s', (description, node) => {
|
|
64
|
+
expect(() => formatted_text_1.MatrixImageNode.parse(node)).toThrow(zod_1.ZodError);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
describe('DamImageNode', () => {
|
|
68
|
+
const validNode = {
|
|
69
|
+
type: 'dam-image',
|
|
70
|
+
damSystemIdentifier: 'dam-identifier',
|
|
71
|
+
damObjectId: 'dam-object-id',
|
|
72
|
+
damSystemType: 'bynder',
|
|
73
|
+
formattingOptions: {
|
|
74
|
+
alignment: 'center',
|
|
75
|
+
},
|
|
76
|
+
attributes: {
|
|
77
|
+
title: 'Link title',
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
it.each([
|
|
81
|
+
['valid node', validNode],
|
|
82
|
+
[
|
|
83
|
+
'valid node with variant',
|
|
84
|
+
{
|
|
85
|
+
...validNode,
|
|
86
|
+
damAdditional: {
|
|
87
|
+
variant: 'dam-image-variant',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
])('Does not throw when parsing a %s', (description, node) => {
|
|
92
|
+
expect(() => formatted_text_1.DamImageNode.parse(node)).not.toThrow();
|
|
93
|
+
});
|
|
94
|
+
it.each([
|
|
95
|
+
[
|
|
96
|
+
'node with a reserved attribute',
|
|
97
|
+
{
|
|
98
|
+
...validNode,
|
|
99
|
+
attributes: {
|
|
100
|
+
src: 'https://www.my-matrix.squiz.net/image.png',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
])('Throws when parsing a %s', (description, node) => {
|
|
105
|
+
expect(() => formatted_text_1.DamImageNode.parse(node)).toThrow(zod_1.ZodError);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
//# sourceMappingURL=formatted-text.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatted-text.spec.js","sourceRoot":"","sources":["../src/formatted-text.spec.ts"],"names":[],"mappings":";;AAAA,qDAAwF;AACxF,6BAAkC;AAElC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;QACrC,MAAM,SAAS,GAA0C;YACvD,IAAI,EAAE,sBAAsB;YAC5B,gBAAgB,EAAE,mBAAmB;YACrC,YAAY,EAAE,6BAA6B;YAC3C,aAAa,EAAE,OAAO;YACtB,MAAM,EAAE,QAAQ;YAChB,iBAAiB,EAAE;gBACjB,SAAS,EAAE,QAAQ;aACpB;YACD,UAAU,EAAE;gBACV,KAAK,EAAE,YAAY;aACpB;SACF,CAAC;QAEF,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,CAClC,kCAAkC,EAClC,CAAC,WAAmB,EAAE,IAA2C,EAAE,EAAE;YACnE,MAAM,CAAC,GAAG,EAAE,CAAC,sCAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QAChE,CAAC,CACF,CAAC;QAEF,EAAE,CAAC,IAAI,CAAC;YACN;gBACE,gCAAgC;gBAChC;oBACE,GAAG,SAAS;oBACZ,UAAU,EAAE;wBACV,IAAI,EAAE,iCAAiC;qBACxC;iBACF;aACF;SACF,CAAC,CAAC,0BAA0B,EAAE,CAAC,WAAmB,EAAE,IAAa,EAAE,EAAE;YACpE,MAAM,CAAC,GAAG,EAAE,CAAC,sCAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAQ,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EA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,SAAS,CAAC;YACzB;gBACE,yBAAyB;gBACzB;oBACE,GAAG,SAAS;oBACZ,aAAa,EAAE;wBACb,OAAO,EAAE,mBAAmB;qBAC7B;iBACF;aACF;SACF,CAAC,CAAC,kCAAkC,EAAE,CAAC,WAAmB,EAAE,IAAkC,EAAE,EAAE;YACjG,MAAM,CAAC,GAAG,EAAE,CAAC,6BAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACvD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,IAAI,CAAC;YACN;gBACE,gCAAgC;gBAChC;oBACE,GAAG,SAAS;oBACZ,UAAU,EAAE;wBACV,GAAG,EAAE,2CAA2C;qBACjD;iBACF;aACF;SACF,CAAC,CAAC,0BAA0B,EAAE,CAAC,WAAmB,EAAE,IAAa,EAAE,EAAE;YACpE,MAAM,CAAC,GAAG,EAAE,CAAC,6BAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAQ,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/lib/layout-content.d.ts
CHANGED
|
@@ -134,6 +134,16 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
134
134
|
}, {
|
|
135
135
|
alignment: "left" | "center" | "right" | "justify";
|
|
136
136
|
}>>;
|
|
137
|
+
attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
138
|
+
href: z.ZodOptional<z.ZodNever>;
|
|
139
|
+
target: z.ZodOptional<z.ZodNever>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
href?: undefined;
|
|
142
|
+
target?: undefined;
|
|
143
|
+
}, {
|
|
144
|
+
href?: undefined;
|
|
145
|
+
target?: undefined;
|
|
146
|
+
}>>>;
|
|
137
147
|
}, "strip", z.ZodTypeAny, {
|
|
138
148
|
type: "link-to-matrix-asset";
|
|
139
149
|
matrixDomain: string;
|
|
@@ -143,6 +153,10 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
143
153
|
formattingOptions?: {
|
|
144
154
|
alignment: "left" | "center" | "right" | "justify";
|
|
145
155
|
} | undefined;
|
|
156
|
+
attributes?: (Record<string, string> & {
|
|
157
|
+
href?: undefined;
|
|
158
|
+
target?: undefined;
|
|
159
|
+
}) | undefined;
|
|
146
160
|
}, {
|
|
147
161
|
type: "link-to-matrix-asset";
|
|
148
162
|
matrixDomain: string;
|
|
@@ -152,6 +166,10 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
152
166
|
formattingOptions?: {
|
|
153
167
|
alignment: "left" | "center" | "right" | "justify";
|
|
154
168
|
} | undefined;
|
|
169
|
+
attributes?: (Record<string, string> & {
|
|
170
|
+
href?: undefined;
|
|
171
|
+
target?: undefined;
|
|
172
|
+
}) | undefined;
|
|
155
173
|
}>, z.ZodObject<{
|
|
156
174
|
type: z.ZodLiteral<"matrix-image">;
|
|
157
175
|
matrixIdentifier: z.ZodOptional<z.ZodString>;
|
|
@@ -164,6 +182,13 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
164
182
|
}, {
|
|
165
183
|
alignment: "left" | "center" | "right" | "justify";
|
|
166
184
|
}>>;
|
|
185
|
+
attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
186
|
+
src: z.ZodOptional<z.ZodNever>;
|
|
187
|
+
}, "strip", z.ZodTypeAny, {
|
|
188
|
+
src?: undefined;
|
|
189
|
+
}, {
|
|
190
|
+
src?: undefined;
|
|
191
|
+
}>>>;
|
|
167
192
|
}, "strip", z.ZodTypeAny, {
|
|
168
193
|
type: "matrix-image";
|
|
169
194
|
matrixDomain: string;
|
|
@@ -172,6 +197,9 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
172
197
|
formattingOptions?: {
|
|
173
198
|
alignment: "left" | "center" | "right" | "justify";
|
|
174
199
|
} | undefined;
|
|
200
|
+
attributes?: (Record<string, string> & {
|
|
201
|
+
src?: undefined;
|
|
202
|
+
}) | undefined;
|
|
175
203
|
}, {
|
|
176
204
|
type: "matrix-image";
|
|
177
205
|
matrixDomain: string;
|
|
@@ -180,34 +208,63 @@ declare const BaseLayoutContentNodes: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
180
208
|
formattingOptions?: {
|
|
181
209
|
alignment: "left" | "center" | "right" | "justify";
|
|
182
210
|
} | undefined;
|
|
211
|
+
attributes?: (Record<string, string> & {
|
|
212
|
+
src?: undefined;
|
|
213
|
+
}) | undefined;
|
|
183
214
|
}>, z.ZodObject<{
|
|
184
215
|
type: z.ZodLiteral<"dam-image">;
|
|
185
216
|
damSystemType: z.ZodEnum<["bynder"]>;
|
|
186
217
|
damSystemIdentifier: z.ZodString;
|
|
187
218
|
damObjectId: z.ZodString;
|
|
188
219
|
damAdditional: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
variant?: string | undefined;
|
|
223
|
+
}, {
|
|
224
|
+
variant?: string | undefined;
|
|
225
|
+
}>>;
|
|
226
|
+
formattingOptions: z.ZodOptional<z.ZodObject<{
|
|
189
227
|
alignment: z.ZodEnum<["left", "center", "right", "justify"]>;
|
|
190
228
|
}, "strip", z.ZodTypeAny, {
|
|
191
229
|
alignment: "left" | "center" | "right" | "justify";
|
|
192
230
|
}, {
|
|
193
231
|
alignment: "left" | "center" | "right" | "justify";
|
|
194
232
|
}>>;
|
|
233
|
+
attributes: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
234
|
+
src: z.ZodOptional<z.ZodNever>;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
src?: undefined;
|
|
237
|
+
}, {
|
|
238
|
+
src?: undefined;
|
|
239
|
+
}>>>;
|
|
195
240
|
}, "strip", z.ZodTypeAny, {
|
|
196
241
|
type: "dam-image";
|
|
197
242
|
damSystemType: "bynder";
|
|
198
243
|
damSystemIdentifier: string;
|
|
199
244
|
damObjectId: string;
|
|
200
245
|
damAdditional?: {
|
|
246
|
+
variant?: string | undefined;
|
|
247
|
+
} | undefined;
|
|
248
|
+
formattingOptions?: {
|
|
201
249
|
alignment: "left" | "center" | "right" | "justify";
|
|
202
250
|
} | undefined;
|
|
251
|
+
attributes?: (Record<string, string> & {
|
|
252
|
+
src?: undefined;
|
|
253
|
+
}) | undefined;
|
|
203
254
|
}, {
|
|
204
255
|
type: "dam-image";
|
|
205
256
|
damSystemType: "bynder";
|
|
206
257
|
damSystemIdentifier: string;
|
|
207
258
|
damObjectId: string;
|
|
208
259
|
damAdditional?: {
|
|
260
|
+
variant?: string | undefined;
|
|
261
|
+
} | undefined;
|
|
262
|
+
formattingOptions?: {
|
|
209
263
|
alignment: "left" | "center" | "right" | "justify";
|
|
210
264
|
} | undefined;
|
|
265
|
+
attributes?: (Record<string, string> & {
|
|
266
|
+
src?: undefined;
|
|
267
|
+
}) | undefined;
|
|
211
268
|
}>]>;
|
|
212
269
|
type BaseLayoutContentNodes = z.infer<typeof BaseLayoutContentNodes>;
|
|
213
270
|
/**
|
|
@@ -261,6 +318,10 @@ export declare const LayoutContentNodes: z.ZodUnion<[z.ZodType<SimpleContentNode
|
|
|
261
318
|
formattingOptions?: {
|
|
262
319
|
alignment: "left" | "center" | "right" | "justify";
|
|
263
320
|
} | undefined;
|
|
321
|
+
attributes?: (Record<string, string> & {
|
|
322
|
+
href?: undefined;
|
|
323
|
+
target?: undefined;
|
|
324
|
+
}) | undefined;
|
|
264
325
|
} | {
|
|
265
326
|
type: "matrix-image";
|
|
266
327
|
matrixDomain: string;
|
|
@@ -269,14 +330,23 @@ export declare const LayoutContentNodes: z.ZodUnion<[z.ZodType<SimpleContentNode
|
|
|
269
330
|
formattingOptions?: {
|
|
270
331
|
alignment: "left" | "center" | "right" | "justify";
|
|
271
332
|
} | undefined;
|
|
333
|
+
attributes?: (Record<string, string> & {
|
|
334
|
+
src?: undefined;
|
|
335
|
+
}) | undefined;
|
|
272
336
|
} | {
|
|
273
337
|
type: "dam-image";
|
|
274
338
|
damSystemType: "bynder";
|
|
275
339
|
damSystemIdentifier: string;
|
|
276
340
|
damObjectId: string;
|
|
277
341
|
damAdditional?: {
|
|
342
|
+
variant?: string | undefined;
|
|
343
|
+
} | undefined;
|
|
344
|
+
formattingOptions?: {
|
|
278
345
|
alignment: "left" | "center" | "right" | "justify";
|
|
279
346
|
} | undefined;
|
|
347
|
+
attributes?: (Record<string, string> & {
|
|
348
|
+
src?: undefined;
|
|
349
|
+
}) | undefined;
|
|
280
350
|
} | {
|
|
281
351
|
type: "component";
|
|
282
352
|
componentId: string;
|
|
@@ -326,6 +396,10 @@ export declare const PageLayoutContent: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.Zo
|
|
|
326
396
|
formattingOptions?: {
|
|
327
397
|
alignment: "left" | "center" | "right" | "justify";
|
|
328
398
|
} | undefined;
|
|
399
|
+
attributes?: (Record<string, string> & {
|
|
400
|
+
href?: undefined;
|
|
401
|
+
target?: undefined;
|
|
402
|
+
}) | undefined;
|
|
329
403
|
} | {
|
|
330
404
|
type: "matrix-image";
|
|
331
405
|
matrixDomain: string;
|
|
@@ -334,14 +408,23 @@ export declare const PageLayoutContent: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.Zo
|
|
|
334
408
|
formattingOptions?: {
|
|
335
409
|
alignment: "left" | "center" | "right" | "justify";
|
|
336
410
|
} | undefined;
|
|
411
|
+
attributes?: (Record<string, string> & {
|
|
412
|
+
src?: undefined;
|
|
413
|
+
}) | undefined;
|
|
337
414
|
} | {
|
|
338
415
|
type: "dam-image";
|
|
339
416
|
damSystemType: "bynder";
|
|
340
417
|
damSystemIdentifier: string;
|
|
341
418
|
damObjectId: string;
|
|
342
419
|
damAdditional?: {
|
|
420
|
+
variant?: string | undefined;
|
|
421
|
+
} | undefined;
|
|
422
|
+
formattingOptions?: {
|
|
343
423
|
alignment: "left" | "center" | "right" | "justify";
|
|
344
424
|
} | undefined;
|
|
425
|
+
attributes?: (Record<string, string> & {
|
|
426
|
+
src?: undefined;
|
|
427
|
+
}) | undefined;
|
|
345
428
|
} | {
|
|
346
429
|
type: "component";
|
|
347
430
|
componentId: string;
|
|
@@ -385,6 +468,10 @@ export declare const PageLayoutContent: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.Zo
|
|
|
385
468
|
formattingOptions?: {
|
|
386
469
|
alignment: "left" | "center" | "right" | "justify";
|
|
387
470
|
} | undefined;
|
|
471
|
+
attributes?: (Record<string, string> & {
|
|
472
|
+
href?: undefined;
|
|
473
|
+
target?: undefined;
|
|
474
|
+
}) | undefined;
|
|
388
475
|
} | {
|
|
389
476
|
type: "matrix-image";
|
|
390
477
|
matrixDomain: string;
|
|
@@ -393,14 +480,23 @@ export declare const PageLayoutContent: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.Zo
|
|
|
393
480
|
formattingOptions?: {
|
|
394
481
|
alignment: "left" | "center" | "right" | "justify";
|
|
395
482
|
} | undefined;
|
|
483
|
+
attributes?: (Record<string, string> & {
|
|
484
|
+
src?: undefined;
|
|
485
|
+
}) | undefined;
|
|
396
486
|
} | {
|
|
397
487
|
type: "dam-image";
|
|
398
488
|
damSystemType: "bynder";
|
|
399
489
|
damSystemIdentifier: string;
|
|
400
490
|
damObjectId: string;
|
|
401
491
|
damAdditional?: {
|
|
492
|
+
variant?: string | undefined;
|
|
493
|
+
} | undefined;
|
|
494
|
+
formattingOptions?: {
|
|
402
495
|
alignment: "left" | "center" | "right" | "justify";
|
|
403
496
|
} | undefined;
|
|
497
|
+
attributes?: (Record<string, string> & {
|
|
498
|
+
src?: undefined;
|
|
499
|
+
}) | undefined;
|
|
404
500
|
} | {
|
|
405
501
|
type: "component";
|
|
406
502
|
componentId: string;
|