@squiz/dx-page-contents-lib 1.40.1-alpha.18
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/README.md +5 -0
- package/lib/formatted-text.d.ts +177 -0
- package/lib/formatted-text.js +57 -0
- package/lib/formatted-text.js.map +1 -0
- package/lib/layout-content.d.ts +210 -0
- package/lib/layout-content.js +60 -0
- package/lib/layout-content.js.map +1 -0
- package/lib/layouts/index.d.ts +455 -0
- package/lib/layouts/index.js +12 -0
- package/lib/layouts/index.js.map +1 -0
- package/lib/layouts/single-column.layout.d.ts +158 -0
- package/lib/layouts/single-column.layout.js +15 -0
- package/lib/layouts/single-column.layout.js.map +1 -0
- package/lib/layouts/two-column.layout.d.ts +298 -0
- package/lib/layouts/two-column.layout.js +16 -0
- package/lib/layouts/two-column.layout.js.map +1 -0
- package/lib/page-contents-lib.d.ts +11 -0
- package/lib/page-contents-lib.js +54 -0
- package/lib/page-contents-lib.js.map +1 -0
- package/lib/page-contents-lib.spec.d.ts +1 -0
- package/lib/page-contents-lib.spec.js +198 -0
- package/lib/page-contents-lib.spec.js.map +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PageLayout: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
|
|
3
|
+
name: z.ZodLiteral<"single-column">;
|
|
4
|
+
content: z.ZodObject<{
|
|
5
|
+
main: z.ZodArray<z.ZodType<import("../layout-content").LayoutContentNodes, z.ZodTypeDef, {
|
|
6
|
+
value: string;
|
|
7
|
+
type: "text";
|
|
8
|
+
} | {
|
|
9
|
+
type: "tag";
|
|
10
|
+
tag: string;
|
|
11
|
+
attributes?: Record<string, string> | undefined;
|
|
12
|
+
font?: {
|
|
13
|
+
bold?: boolean | undefined;
|
|
14
|
+
italics?: boolean | undefined;
|
|
15
|
+
underline?: boolean | undefined;
|
|
16
|
+
color?: string | undefined;
|
|
17
|
+
size?: string | undefined;
|
|
18
|
+
fontFamily?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
formattingOptions?: {
|
|
21
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
22
|
+
} | undefined;
|
|
23
|
+
} | {
|
|
24
|
+
type: "link-to-matrix-asset";
|
|
25
|
+
matrixDomain: string;
|
|
26
|
+
matrixAssetId: string;
|
|
27
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
28
|
+
matrixIdentifier?: string | undefined;
|
|
29
|
+
formattingOptions?: {
|
|
30
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
31
|
+
} | undefined;
|
|
32
|
+
} | {
|
|
33
|
+
type: "matrix-image";
|
|
34
|
+
matrixDomain: string;
|
|
35
|
+
matrixAssetId: string;
|
|
36
|
+
matrixIdentifier?: string | undefined;
|
|
37
|
+
formattingOptions?: {
|
|
38
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
39
|
+
} | undefined;
|
|
40
|
+
} | {
|
|
41
|
+
type: "component";
|
|
42
|
+
componentId: string;
|
|
43
|
+
componentSet: string;
|
|
44
|
+
contentItem?: {
|
|
45
|
+
id: string;
|
|
46
|
+
} | {
|
|
47
|
+
content: Record<string, unknown>;
|
|
48
|
+
schemaName: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}>, "many">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
main: import("../layout-content").LayoutContentNodes[];
|
|
53
|
+
}, {
|
|
54
|
+
main: ({
|
|
55
|
+
value: string;
|
|
56
|
+
type: "text";
|
|
57
|
+
} | {
|
|
58
|
+
type: "tag";
|
|
59
|
+
tag: string;
|
|
60
|
+
attributes?: Record<string, string> | undefined;
|
|
61
|
+
font?: {
|
|
62
|
+
bold?: boolean | undefined;
|
|
63
|
+
italics?: boolean | undefined;
|
|
64
|
+
underline?: boolean | undefined;
|
|
65
|
+
color?: string | undefined;
|
|
66
|
+
size?: string | undefined;
|
|
67
|
+
fontFamily?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
formattingOptions?: {
|
|
70
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
71
|
+
} | undefined;
|
|
72
|
+
} | {
|
|
73
|
+
type: "link-to-matrix-asset";
|
|
74
|
+
matrixDomain: string;
|
|
75
|
+
matrixAssetId: string;
|
|
76
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
77
|
+
matrixIdentifier?: string | undefined;
|
|
78
|
+
formattingOptions?: {
|
|
79
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
80
|
+
} | undefined;
|
|
81
|
+
} | {
|
|
82
|
+
type: "matrix-image";
|
|
83
|
+
matrixDomain: string;
|
|
84
|
+
matrixAssetId: string;
|
|
85
|
+
matrixIdentifier?: string | undefined;
|
|
86
|
+
formattingOptions?: {
|
|
87
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
88
|
+
} | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
type: "component";
|
|
91
|
+
componentId: string;
|
|
92
|
+
componentSet: string;
|
|
93
|
+
contentItem?: {
|
|
94
|
+
id: string;
|
|
95
|
+
} | {
|
|
96
|
+
content: Record<string, unknown>;
|
|
97
|
+
schemaName: string;
|
|
98
|
+
} | undefined;
|
|
99
|
+
})[];
|
|
100
|
+
}>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
content: {
|
|
103
|
+
main: import("../layout-content").LayoutContentNodes[];
|
|
104
|
+
};
|
|
105
|
+
name: "single-column";
|
|
106
|
+
}, {
|
|
107
|
+
content: {
|
|
108
|
+
main: ({
|
|
109
|
+
value: string;
|
|
110
|
+
type: "text";
|
|
111
|
+
} | {
|
|
112
|
+
type: "tag";
|
|
113
|
+
tag: string;
|
|
114
|
+
attributes?: Record<string, string> | undefined;
|
|
115
|
+
font?: {
|
|
116
|
+
bold?: boolean | undefined;
|
|
117
|
+
italics?: boolean | undefined;
|
|
118
|
+
underline?: boolean | undefined;
|
|
119
|
+
color?: string | undefined;
|
|
120
|
+
size?: string | undefined;
|
|
121
|
+
fontFamily?: string | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
formattingOptions?: {
|
|
124
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
125
|
+
} | undefined;
|
|
126
|
+
} | {
|
|
127
|
+
type: "link-to-matrix-asset";
|
|
128
|
+
matrixDomain: string;
|
|
129
|
+
matrixAssetId: string;
|
|
130
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
131
|
+
matrixIdentifier?: string | undefined;
|
|
132
|
+
formattingOptions?: {
|
|
133
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
134
|
+
} | undefined;
|
|
135
|
+
} | {
|
|
136
|
+
type: "matrix-image";
|
|
137
|
+
matrixDomain: string;
|
|
138
|
+
matrixAssetId: string;
|
|
139
|
+
matrixIdentifier?: string | undefined;
|
|
140
|
+
formattingOptions?: {
|
|
141
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
142
|
+
} | undefined;
|
|
143
|
+
} | {
|
|
144
|
+
type: "component";
|
|
145
|
+
componentId: string;
|
|
146
|
+
componentSet: string;
|
|
147
|
+
contentItem?: {
|
|
148
|
+
id: string;
|
|
149
|
+
} | {
|
|
150
|
+
content: Record<string, unknown>;
|
|
151
|
+
schemaName: string;
|
|
152
|
+
} | undefined;
|
|
153
|
+
})[];
|
|
154
|
+
};
|
|
155
|
+
name: "single-column";
|
|
156
|
+
}>, z.ZodObject<{
|
|
157
|
+
name: z.ZodLiteral<"two-column">;
|
|
158
|
+
content: z.ZodObject<{
|
|
159
|
+
left: z.ZodArray<z.ZodType<import("../layout-content").LayoutContentNodes, z.ZodTypeDef, {
|
|
160
|
+
value: string;
|
|
161
|
+
type: "text";
|
|
162
|
+
} | {
|
|
163
|
+
type: "tag";
|
|
164
|
+
tag: string;
|
|
165
|
+
attributes?: Record<string, string> | undefined;
|
|
166
|
+
font?: {
|
|
167
|
+
bold?: boolean | undefined;
|
|
168
|
+
italics?: boolean | undefined;
|
|
169
|
+
underline?: boolean | undefined;
|
|
170
|
+
color?: string | undefined;
|
|
171
|
+
size?: string | undefined;
|
|
172
|
+
fontFamily?: string | undefined;
|
|
173
|
+
} | undefined;
|
|
174
|
+
formattingOptions?: {
|
|
175
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
176
|
+
} | undefined;
|
|
177
|
+
} | {
|
|
178
|
+
type: "link-to-matrix-asset";
|
|
179
|
+
matrixDomain: string;
|
|
180
|
+
matrixAssetId: string;
|
|
181
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
182
|
+
matrixIdentifier?: string | undefined;
|
|
183
|
+
formattingOptions?: {
|
|
184
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
185
|
+
} | undefined;
|
|
186
|
+
} | {
|
|
187
|
+
type: "matrix-image";
|
|
188
|
+
matrixDomain: string;
|
|
189
|
+
matrixAssetId: string;
|
|
190
|
+
matrixIdentifier?: string | undefined;
|
|
191
|
+
formattingOptions?: {
|
|
192
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
193
|
+
} | undefined;
|
|
194
|
+
} | {
|
|
195
|
+
type: "component";
|
|
196
|
+
componentId: string;
|
|
197
|
+
componentSet: string;
|
|
198
|
+
contentItem?: {
|
|
199
|
+
id: string;
|
|
200
|
+
} | {
|
|
201
|
+
content: Record<string, unknown>;
|
|
202
|
+
schemaName: string;
|
|
203
|
+
} | undefined;
|
|
204
|
+
}>, "many">;
|
|
205
|
+
right: z.ZodArray<z.ZodType<import("../layout-content").LayoutContentNodes, z.ZodTypeDef, {
|
|
206
|
+
value: string;
|
|
207
|
+
type: "text";
|
|
208
|
+
} | {
|
|
209
|
+
type: "tag";
|
|
210
|
+
tag: string;
|
|
211
|
+
attributes?: Record<string, string> | undefined;
|
|
212
|
+
font?: {
|
|
213
|
+
bold?: boolean | undefined;
|
|
214
|
+
italics?: boolean | undefined;
|
|
215
|
+
underline?: boolean | undefined;
|
|
216
|
+
color?: string | undefined;
|
|
217
|
+
size?: string | undefined;
|
|
218
|
+
fontFamily?: string | undefined;
|
|
219
|
+
} | undefined;
|
|
220
|
+
formattingOptions?: {
|
|
221
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
222
|
+
} | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
type: "link-to-matrix-asset";
|
|
225
|
+
matrixDomain: string;
|
|
226
|
+
matrixAssetId: string;
|
|
227
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
228
|
+
matrixIdentifier?: string | undefined;
|
|
229
|
+
formattingOptions?: {
|
|
230
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
231
|
+
} | undefined;
|
|
232
|
+
} | {
|
|
233
|
+
type: "matrix-image";
|
|
234
|
+
matrixDomain: string;
|
|
235
|
+
matrixAssetId: string;
|
|
236
|
+
matrixIdentifier?: string | undefined;
|
|
237
|
+
formattingOptions?: {
|
|
238
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
239
|
+
} | undefined;
|
|
240
|
+
} | {
|
|
241
|
+
type: "component";
|
|
242
|
+
componentId: string;
|
|
243
|
+
componentSet: string;
|
|
244
|
+
contentItem?: {
|
|
245
|
+
id: string;
|
|
246
|
+
} | {
|
|
247
|
+
content: Record<string, unknown>;
|
|
248
|
+
schemaName: string;
|
|
249
|
+
} | undefined;
|
|
250
|
+
}>, "many">;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
left: import("../layout-content").LayoutContentNodes[];
|
|
253
|
+
right: import("../layout-content").LayoutContentNodes[];
|
|
254
|
+
}, {
|
|
255
|
+
left: ({
|
|
256
|
+
value: string;
|
|
257
|
+
type: "text";
|
|
258
|
+
} | {
|
|
259
|
+
type: "tag";
|
|
260
|
+
tag: string;
|
|
261
|
+
attributes?: Record<string, string> | undefined;
|
|
262
|
+
font?: {
|
|
263
|
+
bold?: boolean | undefined;
|
|
264
|
+
italics?: boolean | undefined;
|
|
265
|
+
underline?: boolean | undefined;
|
|
266
|
+
color?: string | undefined;
|
|
267
|
+
size?: string | undefined;
|
|
268
|
+
fontFamily?: string | undefined;
|
|
269
|
+
} | undefined;
|
|
270
|
+
formattingOptions?: {
|
|
271
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
272
|
+
} | undefined;
|
|
273
|
+
} | {
|
|
274
|
+
type: "link-to-matrix-asset";
|
|
275
|
+
matrixDomain: string;
|
|
276
|
+
matrixAssetId: string;
|
|
277
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
278
|
+
matrixIdentifier?: string | undefined;
|
|
279
|
+
formattingOptions?: {
|
|
280
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
281
|
+
} | undefined;
|
|
282
|
+
} | {
|
|
283
|
+
type: "matrix-image";
|
|
284
|
+
matrixDomain: string;
|
|
285
|
+
matrixAssetId: string;
|
|
286
|
+
matrixIdentifier?: string | undefined;
|
|
287
|
+
formattingOptions?: {
|
|
288
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
289
|
+
} | undefined;
|
|
290
|
+
} | {
|
|
291
|
+
type: "component";
|
|
292
|
+
componentId: string;
|
|
293
|
+
componentSet: string;
|
|
294
|
+
contentItem?: {
|
|
295
|
+
id: string;
|
|
296
|
+
} | {
|
|
297
|
+
content: Record<string, unknown>;
|
|
298
|
+
schemaName: string;
|
|
299
|
+
} | undefined;
|
|
300
|
+
})[];
|
|
301
|
+
right: ({
|
|
302
|
+
value: string;
|
|
303
|
+
type: "text";
|
|
304
|
+
} | {
|
|
305
|
+
type: "tag";
|
|
306
|
+
tag: string;
|
|
307
|
+
attributes?: Record<string, string> | undefined;
|
|
308
|
+
font?: {
|
|
309
|
+
bold?: boolean | undefined;
|
|
310
|
+
italics?: boolean | undefined;
|
|
311
|
+
underline?: boolean | undefined;
|
|
312
|
+
color?: string | undefined;
|
|
313
|
+
size?: string | undefined;
|
|
314
|
+
fontFamily?: string | undefined;
|
|
315
|
+
} | undefined;
|
|
316
|
+
formattingOptions?: {
|
|
317
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
318
|
+
} | undefined;
|
|
319
|
+
} | {
|
|
320
|
+
type: "link-to-matrix-asset";
|
|
321
|
+
matrixDomain: string;
|
|
322
|
+
matrixAssetId: string;
|
|
323
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
324
|
+
matrixIdentifier?: string | undefined;
|
|
325
|
+
formattingOptions?: {
|
|
326
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
327
|
+
} | undefined;
|
|
328
|
+
} | {
|
|
329
|
+
type: "matrix-image";
|
|
330
|
+
matrixDomain: string;
|
|
331
|
+
matrixAssetId: string;
|
|
332
|
+
matrixIdentifier?: string | undefined;
|
|
333
|
+
formattingOptions?: {
|
|
334
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
335
|
+
} | undefined;
|
|
336
|
+
} | {
|
|
337
|
+
type: "component";
|
|
338
|
+
componentId: string;
|
|
339
|
+
componentSet: string;
|
|
340
|
+
contentItem?: {
|
|
341
|
+
id: string;
|
|
342
|
+
} | {
|
|
343
|
+
content: Record<string, unknown>;
|
|
344
|
+
schemaName: string;
|
|
345
|
+
} | undefined;
|
|
346
|
+
})[];
|
|
347
|
+
}>;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
content: {
|
|
350
|
+
left: import("../layout-content").LayoutContentNodes[];
|
|
351
|
+
right: import("../layout-content").LayoutContentNodes[];
|
|
352
|
+
};
|
|
353
|
+
name: "two-column";
|
|
354
|
+
}, {
|
|
355
|
+
content: {
|
|
356
|
+
left: ({
|
|
357
|
+
value: string;
|
|
358
|
+
type: "text";
|
|
359
|
+
} | {
|
|
360
|
+
type: "tag";
|
|
361
|
+
tag: string;
|
|
362
|
+
attributes?: Record<string, string> | undefined;
|
|
363
|
+
font?: {
|
|
364
|
+
bold?: boolean | undefined;
|
|
365
|
+
italics?: boolean | undefined;
|
|
366
|
+
underline?: boolean | undefined;
|
|
367
|
+
color?: string | undefined;
|
|
368
|
+
size?: string | undefined;
|
|
369
|
+
fontFamily?: string | undefined;
|
|
370
|
+
} | undefined;
|
|
371
|
+
formattingOptions?: {
|
|
372
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
373
|
+
} | undefined;
|
|
374
|
+
} | {
|
|
375
|
+
type: "link-to-matrix-asset";
|
|
376
|
+
matrixDomain: string;
|
|
377
|
+
matrixAssetId: string;
|
|
378
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
379
|
+
matrixIdentifier?: string | undefined;
|
|
380
|
+
formattingOptions?: {
|
|
381
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
382
|
+
} | undefined;
|
|
383
|
+
} | {
|
|
384
|
+
type: "matrix-image";
|
|
385
|
+
matrixDomain: string;
|
|
386
|
+
matrixAssetId: string;
|
|
387
|
+
matrixIdentifier?: string | undefined;
|
|
388
|
+
formattingOptions?: {
|
|
389
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
390
|
+
} | undefined;
|
|
391
|
+
} | {
|
|
392
|
+
type: "component";
|
|
393
|
+
componentId: string;
|
|
394
|
+
componentSet: string;
|
|
395
|
+
contentItem?: {
|
|
396
|
+
id: string;
|
|
397
|
+
} | {
|
|
398
|
+
content: Record<string, unknown>;
|
|
399
|
+
schemaName: string;
|
|
400
|
+
} | undefined;
|
|
401
|
+
})[];
|
|
402
|
+
right: ({
|
|
403
|
+
value: string;
|
|
404
|
+
type: "text";
|
|
405
|
+
} | {
|
|
406
|
+
type: "tag";
|
|
407
|
+
tag: string;
|
|
408
|
+
attributes?: Record<string, string> | undefined;
|
|
409
|
+
font?: {
|
|
410
|
+
bold?: boolean | undefined;
|
|
411
|
+
italics?: boolean | undefined;
|
|
412
|
+
underline?: boolean | undefined;
|
|
413
|
+
color?: string | undefined;
|
|
414
|
+
size?: string | undefined;
|
|
415
|
+
fontFamily?: string | undefined;
|
|
416
|
+
} | undefined;
|
|
417
|
+
formattingOptions?: {
|
|
418
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
419
|
+
} | undefined;
|
|
420
|
+
} | {
|
|
421
|
+
type: "link-to-matrix-asset";
|
|
422
|
+
matrixDomain: string;
|
|
423
|
+
matrixAssetId: string;
|
|
424
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
425
|
+
matrixIdentifier?: string | undefined;
|
|
426
|
+
formattingOptions?: {
|
|
427
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
428
|
+
} | undefined;
|
|
429
|
+
} | {
|
|
430
|
+
type: "matrix-image";
|
|
431
|
+
matrixDomain: string;
|
|
432
|
+
matrixAssetId: string;
|
|
433
|
+
matrixIdentifier?: string | undefined;
|
|
434
|
+
formattingOptions?: {
|
|
435
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
436
|
+
} | undefined;
|
|
437
|
+
} | {
|
|
438
|
+
type: "component";
|
|
439
|
+
componentId: string;
|
|
440
|
+
componentSet: string;
|
|
441
|
+
contentItem?: {
|
|
442
|
+
id: string;
|
|
443
|
+
} | {
|
|
444
|
+
content: Record<string, unknown>;
|
|
445
|
+
schemaName: string;
|
|
446
|
+
} | undefined;
|
|
447
|
+
})[];
|
|
448
|
+
};
|
|
449
|
+
name: "two-column";
|
|
450
|
+
}>]>;
|
|
451
|
+
export type PageLayout = z.infer<typeof PageLayout>;
|
|
452
|
+
export declare const LAYOUT_TEMPLATES: {
|
|
453
|
+
'single-column': string;
|
|
454
|
+
'two-column': string;
|
|
455
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LAYOUT_TEMPLATES = exports.PageLayout = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const single_column_layout_1 = require("./single-column.layout");
|
|
6
|
+
const two_column_layout_1 = require("./two-column.layout");
|
|
7
|
+
exports.PageLayout = zod_1.z.discriminatedUnion('name', [single_column_layout_1.SingleColumnLayout, two_column_layout_1.TwoColumnLayout]);
|
|
8
|
+
exports.LAYOUT_TEMPLATES = {
|
|
9
|
+
'single-column': single_column_layout_1.TEMPLATE,
|
|
10
|
+
'two-column': two_column_layout_1.TEMPLATE,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iEAA8F;AAC9F,2DAAqF;AAExE,QAAA,UAAU,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,yCAAkB,EAAE,mCAAe,CAAC,CAAC,CAAC;AAGjF,QAAA,gBAAgB,GAAG;IAC9B,eAAe,EAAE,+BAAoB;IACrC,YAAY,EAAE,4BAAiB;CAChC,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LayoutContentNodes } from '../layout-content';
|
|
3
|
+
export declare const SingleColumnLayout: z.ZodObject<{
|
|
4
|
+
name: z.ZodLiteral<"single-column">;
|
|
5
|
+
content: z.ZodObject<{
|
|
6
|
+
main: z.ZodArray<z.ZodType<LayoutContentNodes, z.ZodTypeDef, {
|
|
7
|
+
value: string;
|
|
8
|
+
type: "text";
|
|
9
|
+
} | {
|
|
10
|
+
type: "tag";
|
|
11
|
+
tag: string;
|
|
12
|
+
attributes?: Record<string, string> | undefined;
|
|
13
|
+
font?: {
|
|
14
|
+
bold?: boolean | undefined;
|
|
15
|
+
italics?: boolean | undefined;
|
|
16
|
+
underline?: boolean | undefined;
|
|
17
|
+
color?: string | undefined;
|
|
18
|
+
size?: string | undefined;
|
|
19
|
+
fontFamily?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
formattingOptions?: {
|
|
22
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
23
|
+
} | undefined;
|
|
24
|
+
} | {
|
|
25
|
+
type: "link-to-matrix-asset";
|
|
26
|
+
matrixDomain: string;
|
|
27
|
+
matrixAssetId: string;
|
|
28
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
29
|
+
matrixIdentifier?: string | undefined;
|
|
30
|
+
formattingOptions?: {
|
|
31
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
32
|
+
} | undefined;
|
|
33
|
+
} | {
|
|
34
|
+
type: "matrix-image";
|
|
35
|
+
matrixDomain: string;
|
|
36
|
+
matrixAssetId: string;
|
|
37
|
+
matrixIdentifier?: string | undefined;
|
|
38
|
+
formattingOptions?: {
|
|
39
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
40
|
+
} | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
type: "component";
|
|
43
|
+
componentId: string;
|
|
44
|
+
componentSet: string;
|
|
45
|
+
contentItem?: {
|
|
46
|
+
id: string;
|
|
47
|
+
} | {
|
|
48
|
+
content: Record<string, unknown>;
|
|
49
|
+
schemaName: string;
|
|
50
|
+
} | undefined;
|
|
51
|
+
}>, "many">;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
main: LayoutContentNodes[];
|
|
54
|
+
}, {
|
|
55
|
+
main: ({
|
|
56
|
+
value: string;
|
|
57
|
+
type: "text";
|
|
58
|
+
} | {
|
|
59
|
+
type: "tag";
|
|
60
|
+
tag: string;
|
|
61
|
+
attributes?: Record<string, string> | undefined;
|
|
62
|
+
font?: {
|
|
63
|
+
bold?: boolean | undefined;
|
|
64
|
+
italics?: boolean | undefined;
|
|
65
|
+
underline?: boolean | undefined;
|
|
66
|
+
color?: string | undefined;
|
|
67
|
+
size?: string | undefined;
|
|
68
|
+
fontFamily?: string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
formattingOptions?: {
|
|
71
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
72
|
+
} | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
type: "link-to-matrix-asset";
|
|
75
|
+
matrixDomain: string;
|
|
76
|
+
matrixAssetId: string;
|
|
77
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
78
|
+
matrixIdentifier?: string | undefined;
|
|
79
|
+
formattingOptions?: {
|
|
80
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
81
|
+
} | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
type: "matrix-image";
|
|
84
|
+
matrixDomain: string;
|
|
85
|
+
matrixAssetId: string;
|
|
86
|
+
matrixIdentifier?: string | undefined;
|
|
87
|
+
formattingOptions?: {
|
|
88
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
89
|
+
} | undefined;
|
|
90
|
+
} | {
|
|
91
|
+
type: "component";
|
|
92
|
+
componentId: string;
|
|
93
|
+
componentSet: string;
|
|
94
|
+
contentItem?: {
|
|
95
|
+
id: string;
|
|
96
|
+
} | {
|
|
97
|
+
content: Record<string, unknown>;
|
|
98
|
+
schemaName: string;
|
|
99
|
+
} | undefined;
|
|
100
|
+
})[];
|
|
101
|
+
}>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
content: {
|
|
104
|
+
main: LayoutContentNodes[];
|
|
105
|
+
};
|
|
106
|
+
name: "single-column";
|
|
107
|
+
}, {
|
|
108
|
+
content: {
|
|
109
|
+
main: ({
|
|
110
|
+
value: string;
|
|
111
|
+
type: "text";
|
|
112
|
+
} | {
|
|
113
|
+
type: "tag";
|
|
114
|
+
tag: string;
|
|
115
|
+
attributes?: Record<string, string> | undefined;
|
|
116
|
+
font?: {
|
|
117
|
+
bold?: boolean | undefined;
|
|
118
|
+
italics?: boolean | undefined;
|
|
119
|
+
underline?: boolean | undefined;
|
|
120
|
+
color?: string | undefined;
|
|
121
|
+
size?: string | undefined;
|
|
122
|
+
fontFamily?: string | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
formattingOptions?: {
|
|
125
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
126
|
+
} | undefined;
|
|
127
|
+
} | {
|
|
128
|
+
type: "link-to-matrix-asset";
|
|
129
|
+
matrixDomain: string;
|
|
130
|
+
matrixAssetId: string;
|
|
131
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
132
|
+
matrixIdentifier?: string | undefined;
|
|
133
|
+
formattingOptions?: {
|
|
134
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
135
|
+
} | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
type: "matrix-image";
|
|
138
|
+
matrixDomain: string;
|
|
139
|
+
matrixAssetId: string;
|
|
140
|
+
matrixIdentifier?: string | undefined;
|
|
141
|
+
formattingOptions?: {
|
|
142
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
143
|
+
} | undefined;
|
|
144
|
+
} | {
|
|
145
|
+
type: "component";
|
|
146
|
+
componentId: string;
|
|
147
|
+
componentSet: string;
|
|
148
|
+
contentItem?: {
|
|
149
|
+
id: string;
|
|
150
|
+
} | {
|
|
151
|
+
content: Record<string, unknown>;
|
|
152
|
+
schemaName: string;
|
|
153
|
+
} | undefined;
|
|
154
|
+
})[];
|
|
155
|
+
};
|
|
156
|
+
name: "single-column";
|
|
157
|
+
}>;
|
|
158
|
+
export declare const TEMPLATE = "\n<div class=\"container\">{{main}}</div>\n";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEMPLATE = exports.SingleColumnLayout = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const layout_content_1 = require("../layout-content");
|
|
6
|
+
exports.SingleColumnLayout = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.literal('single-column'),
|
|
8
|
+
content: zod_1.z.object({
|
|
9
|
+
main: zod_1.z.array(layout_content_1.LayoutContentNodes),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
exports.TEMPLATE = `
|
|
13
|
+
<div class="container">{{main}}</div>
|
|
14
|
+
`;
|
|
15
|
+
//# sourceMappingURL=single-column.layout.js.map
|
|
@@ -0,0 +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"}
|