@contentful/experiences-core 3.8.0-prerelease-20250922T2329-e132272.0 → 3.8.0-prerelease-20250926T1312-a8b5fb7.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/dist/index.cjs +3 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -56
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -181,7 +181,6 @@ const builtInStyles = {
|
|
|
181
181
|
},
|
|
182
182
|
type: 'Text',
|
|
183
183
|
group: 'style',
|
|
184
|
-
description: 'The vertical alignment of the section',
|
|
185
184
|
defaultValue: 'center',
|
|
186
185
|
displayName: 'Vertical alignment',
|
|
187
186
|
},
|
|
@@ -208,7 +207,6 @@ const builtInStyles = {
|
|
|
208
207
|
},
|
|
209
208
|
type: 'Text',
|
|
210
209
|
group: 'style',
|
|
211
|
-
description: 'The horizontal alignment of the section',
|
|
212
210
|
defaultValue: 'center',
|
|
213
211
|
displayName: 'Horizontal alignment',
|
|
214
212
|
},
|
|
@@ -217,83 +215,71 @@ const builtInStyles = {
|
|
|
217
215
|
type: 'Boolean',
|
|
218
216
|
group: 'style',
|
|
219
217
|
defaultValue: true,
|
|
220
|
-
description: 'The visibility of the component',
|
|
221
218
|
},
|
|
222
219
|
cfMargin: {
|
|
223
220
|
displayName: 'Margin',
|
|
224
221
|
type: 'Text',
|
|
225
222
|
group: 'style',
|
|
226
|
-
description: 'The margin of the section',
|
|
227
223
|
defaultValue: '0 0 0 0',
|
|
228
224
|
},
|
|
229
225
|
cfPadding: {
|
|
230
226
|
displayName: 'Padding',
|
|
231
227
|
type: 'Text',
|
|
232
228
|
group: 'style',
|
|
233
|
-
description: 'The padding of the section',
|
|
234
229
|
defaultValue: '0 0 0 0',
|
|
235
230
|
},
|
|
236
231
|
cfBackgroundColor: {
|
|
237
232
|
displayName: 'Background color',
|
|
238
233
|
type: 'Text',
|
|
239
234
|
group: 'style',
|
|
240
|
-
description: 'The background color of the section',
|
|
241
235
|
defaultValue: 'rgba(0, 0, 0, 0)',
|
|
242
236
|
},
|
|
243
237
|
cfWidth: {
|
|
244
238
|
displayName: 'Width',
|
|
245
239
|
type: 'Text',
|
|
246
240
|
group: 'style',
|
|
247
|
-
description: 'The width of the section',
|
|
248
241
|
defaultValue: '100%',
|
|
249
242
|
},
|
|
250
243
|
cfHeight: {
|
|
251
244
|
displayName: 'Height',
|
|
252
245
|
type: 'Text',
|
|
253
246
|
group: 'style',
|
|
254
|
-
description: 'The height of the section',
|
|
255
247
|
defaultValue: 'fit-content',
|
|
256
248
|
},
|
|
257
249
|
cfMaxWidth: {
|
|
258
250
|
displayName: 'Max width',
|
|
259
251
|
type: 'Text',
|
|
260
252
|
group: 'style',
|
|
261
|
-
description: 'The max-width of the section',
|
|
262
253
|
defaultValue: 'none',
|
|
263
254
|
},
|
|
264
255
|
cfFlexDirection: {
|
|
265
256
|
displayName: 'Direction',
|
|
266
257
|
type: 'Text',
|
|
267
258
|
group: 'style',
|
|
268
|
-
description: 'The orientation of the section',
|
|
269
259
|
defaultValue: 'column',
|
|
270
260
|
},
|
|
271
261
|
cfFlexReverse: {
|
|
272
262
|
displayName: 'Reverse Direction',
|
|
273
263
|
type: 'Boolean',
|
|
274
264
|
group: 'style',
|
|
275
|
-
description: 'Toggle the flex direction to be reversed',
|
|
276
265
|
defaultValue: false,
|
|
277
266
|
},
|
|
278
267
|
cfFlexWrap: {
|
|
279
268
|
displayName: 'Wrap objects',
|
|
280
269
|
type: 'Text',
|
|
281
270
|
group: 'style',
|
|
282
|
-
description: 'Wrap objects',
|
|
283
271
|
defaultValue: 'nowrap',
|
|
284
272
|
},
|
|
285
273
|
cfBorder: {
|
|
286
274
|
displayName: 'Border',
|
|
287
275
|
type: 'Text',
|
|
288
276
|
group: 'style',
|
|
289
|
-
description: 'The border of the section',
|
|
290
277
|
defaultValue: '0px solid rgba(0, 0, 0, 0)',
|
|
291
278
|
},
|
|
292
279
|
cfGap: {
|
|
293
280
|
displayName: 'Gap',
|
|
294
281
|
type: 'Text',
|
|
295
282
|
group: 'style',
|
|
296
|
-
description: 'The spacing between the elements of the section',
|
|
297
283
|
defaultValue: '0px',
|
|
298
284
|
},
|
|
299
285
|
cfHyperlink: {
|
|
@@ -304,7 +290,6 @@ const builtInStyles = {
|
|
|
304
290
|
format: 'URL',
|
|
305
291
|
bindingSourceType: ['entry', 'experience', 'manual'],
|
|
306
292
|
},
|
|
307
|
-
description: 'hyperlink for section or container',
|
|
308
293
|
},
|
|
309
294
|
cfOpenInNewTab: {
|
|
310
295
|
displayName: 'URL behaviour',
|
|
@@ -318,7 +303,6 @@ const optionalBuiltInStyles = {
|
|
|
318
303
|
displayName: 'Font Size',
|
|
319
304
|
type: 'Text',
|
|
320
305
|
group: 'style',
|
|
321
|
-
description: 'The font size of the element',
|
|
322
306
|
defaultValue: '16px',
|
|
323
307
|
},
|
|
324
308
|
cfFontWeight: {
|
|
@@ -341,13 +325,11 @@ const optionalBuiltInStyles = {
|
|
|
341
325
|
displayName: 'Font Weight',
|
|
342
326
|
type: 'Text',
|
|
343
327
|
group: 'style',
|
|
344
|
-
description: 'The font weight of the element',
|
|
345
328
|
defaultValue: '400',
|
|
346
329
|
},
|
|
347
330
|
cfImageAsset: {
|
|
348
331
|
displayName: 'Image',
|
|
349
332
|
type: 'Media',
|
|
350
|
-
description: 'Image to display',
|
|
351
333
|
validations: {
|
|
352
334
|
bindingSourceType: ['asset', 'entry', 'manual'],
|
|
353
335
|
},
|
|
@@ -366,13 +348,11 @@ const optionalBuiltInStyles = {
|
|
|
366
348
|
displayName: 'Background color',
|
|
367
349
|
type: 'Text',
|
|
368
350
|
group: 'style',
|
|
369
|
-
description: 'The background color of the element',
|
|
370
351
|
defaultValue: 'rgba(0, 0, 0, 0)',
|
|
371
352
|
},
|
|
372
353
|
cfBackgroundImageUrl: {
|
|
373
354
|
displayName: 'Background image',
|
|
374
355
|
type: 'Media',
|
|
375
|
-
description: 'Background image for component',
|
|
376
356
|
validations: {
|
|
377
357
|
bindingSourceType: ['asset', 'entry', 'manual'],
|
|
378
358
|
},
|
|
@@ -391,28 +371,24 @@ const optionalBuiltInStyles = {
|
|
|
391
371
|
displayName: 'Border Radius',
|
|
392
372
|
type: 'Text',
|
|
393
373
|
group: 'style',
|
|
394
|
-
description: 'The border radius of the section',
|
|
395
374
|
defaultValue: '0px',
|
|
396
375
|
},
|
|
397
376
|
cfLineHeight: {
|
|
398
377
|
displayName: 'Line Height',
|
|
399
378
|
type: 'Text',
|
|
400
379
|
group: 'style',
|
|
401
|
-
description: 'The line height of the element',
|
|
402
380
|
defaultValue: '20px',
|
|
403
381
|
},
|
|
404
382
|
cfLetterSpacing: {
|
|
405
383
|
displayName: 'Letter Spacing',
|
|
406
384
|
type: 'Text',
|
|
407
385
|
group: 'style',
|
|
408
|
-
description: 'The letter spacing of the element',
|
|
409
386
|
defaultValue: '0px',
|
|
410
387
|
},
|
|
411
388
|
cfTextColor: {
|
|
412
389
|
displayName: 'Text Color',
|
|
413
390
|
type: 'Text',
|
|
414
391
|
group: 'style',
|
|
415
|
-
description: 'The text color of the element',
|
|
416
392
|
defaultValue: 'rgba(0, 0, 0, 1)',
|
|
417
393
|
},
|
|
418
394
|
cfTextAlign: {
|
|
@@ -435,7 +411,6 @@ const optionalBuiltInStyles = {
|
|
|
435
411
|
displayName: 'Text Align',
|
|
436
412
|
type: 'Text',
|
|
437
413
|
group: 'style',
|
|
438
|
-
description: 'The text alignment of the element',
|
|
439
414
|
defaultValue: 'start',
|
|
440
415
|
},
|
|
441
416
|
cfTextTransform: {
|
|
@@ -462,28 +437,24 @@ const optionalBuiltInStyles = {
|
|
|
462
437
|
displayName: 'Text Transform',
|
|
463
438
|
type: 'Text',
|
|
464
439
|
group: 'style',
|
|
465
|
-
description: 'The text transform of the element',
|
|
466
440
|
defaultValue: 'none',
|
|
467
441
|
},
|
|
468
442
|
cfTextBold: {
|
|
469
443
|
displayName: 'Bold',
|
|
470
444
|
type: 'Boolean',
|
|
471
445
|
group: 'style',
|
|
472
|
-
description: 'The text bold of the element',
|
|
473
446
|
defaultValue: false,
|
|
474
447
|
},
|
|
475
448
|
cfTextItalic: {
|
|
476
449
|
displayName: 'Italic',
|
|
477
450
|
type: 'Boolean',
|
|
478
451
|
group: 'style',
|
|
479
|
-
description: 'The text italic of the element',
|
|
480
452
|
defaultValue: false,
|
|
481
453
|
},
|
|
482
454
|
cfTextUnderline: {
|
|
483
455
|
displayName: 'Underline',
|
|
484
456
|
type: 'Boolean',
|
|
485
457
|
group: 'style',
|
|
486
|
-
description: 'The text underline of the element',
|
|
487
458
|
defaultValue: false,
|
|
488
459
|
},
|
|
489
460
|
};
|
|
@@ -502,7 +473,6 @@ const containerBuiltInStyles = {
|
|
|
502
473
|
displayName: 'Margin',
|
|
503
474
|
type: 'Text',
|
|
504
475
|
group: 'style',
|
|
505
|
-
description: 'The margin of the container',
|
|
506
476
|
// Note: The UI overwrites '0 Auto 0 Auto' as the default value for top-level containers
|
|
507
477
|
defaultValue: '0 0 0 0',
|
|
508
478
|
},
|
|
@@ -510,7 +480,6 @@ const containerBuiltInStyles = {
|
|
|
510
480
|
displayName: 'Max Width',
|
|
511
481
|
type: 'Text',
|
|
512
482
|
group: 'style',
|
|
513
|
-
description: 'The max-width of the section',
|
|
514
483
|
defaultValue: '1192px',
|
|
515
484
|
},
|
|
516
485
|
};
|
|
@@ -521,35 +490,30 @@ const dividerBuiltInStyles = {
|
|
|
521
490
|
displayName: 'Margin',
|
|
522
491
|
type: 'Text',
|
|
523
492
|
group: 'style',
|
|
524
|
-
description: 'The margin of the divider',
|
|
525
493
|
defaultValue: '20px 0px 20px 0px',
|
|
526
494
|
},
|
|
527
495
|
cfWidth: {
|
|
528
496
|
displayName: 'Width',
|
|
529
497
|
type: 'Text',
|
|
530
498
|
group: 'style',
|
|
531
|
-
description: 'The width of the divider',
|
|
532
499
|
defaultValue: '100%',
|
|
533
500
|
},
|
|
534
501
|
cfHeight: {
|
|
535
502
|
displayName: 'Height',
|
|
536
503
|
type: 'Text',
|
|
537
504
|
group: 'style',
|
|
538
|
-
description: 'The height of the divider',
|
|
539
505
|
defaultValue: '1px',
|
|
540
506
|
},
|
|
541
507
|
cfMaxWidth: {
|
|
542
508
|
displayName: 'Max width',
|
|
543
509
|
type: 'Text',
|
|
544
510
|
group: 'style',
|
|
545
|
-
description: 'The max-width of the divider',
|
|
546
511
|
defaultValue: 'none',
|
|
547
512
|
},
|
|
548
513
|
cfBackgroundColor: {
|
|
549
514
|
displayName: 'Background color',
|
|
550
515
|
type: 'Text',
|
|
551
516
|
group: 'style',
|
|
552
|
-
description: 'The background color of the divider',
|
|
553
517
|
defaultValue: 'rgba(204, 204, 204, 1)',
|
|
554
518
|
},
|
|
555
519
|
};
|
|
@@ -582,7 +546,6 @@ const singleColumnBuiltInStyles = {
|
|
|
582
546
|
},
|
|
583
547
|
type: 'Text',
|
|
584
548
|
group: 'style',
|
|
585
|
-
description: 'The vertical alignment of the column',
|
|
586
549
|
defaultValue: 'center',
|
|
587
550
|
displayName: 'Vertical alignment',
|
|
588
551
|
},
|
|
@@ -609,7 +572,6 @@ const singleColumnBuiltInStyles = {
|
|
|
609
572
|
},
|
|
610
573
|
type: 'Text',
|
|
611
574
|
group: 'style',
|
|
612
|
-
description: 'The horizontal alignment of the column',
|
|
613
575
|
defaultValue: 'center',
|
|
614
576
|
displayName: 'Horizontal alignment',
|
|
615
577
|
},
|
|
@@ -617,35 +579,30 @@ const singleColumnBuiltInStyles = {
|
|
|
617
579
|
displayName: 'Padding',
|
|
618
580
|
type: 'Text',
|
|
619
581
|
group: 'style',
|
|
620
|
-
description: 'The padding of the column',
|
|
621
582
|
defaultValue: '0 0 0 0',
|
|
622
583
|
},
|
|
623
584
|
cfFlexDirection: {
|
|
624
585
|
displayName: 'Direction',
|
|
625
586
|
type: 'Text',
|
|
626
587
|
group: 'style',
|
|
627
|
-
description: 'The orientation of the column',
|
|
628
588
|
defaultValue: 'column',
|
|
629
589
|
},
|
|
630
590
|
cfFlexWrap: {
|
|
631
591
|
displayName: 'Wrap objects',
|
|
632
592
|
type: 'Text',
|
|
633
593
|
group: 'style',
|
|
634
|
-
description: 'Wrap objects',
|
|
635
594
|
defaultValue: 'nowrap',
|
|
636
595
|
},
|
|
637
596
|
cfBorder: {
|
|
638
597
|
displayName: 'Border',
|
|
639
598
|
type: 'Text',
|
|
640
599
|
group: 'style',
|
|
641
|
-
description: 'The border of the column',
|
|
642
600
|
defaultValue: '0px solid rgba(0, 0, 0, 0)',
|
|
643
601
|
},
|
|
644
602
|
cfGap: {
|
|
645
603
|
displayName: 'Gap',
|
|
646
604
|
type: 'Text',
|
|
647
605
|
group: 'style',
|
|
648
|
-
description: 'The spacing between the elements of the column',
|
|
649
606
|
defaultValue: '0px',
|
|
650
607
|
},
|
|
651
608
|
cfColumnSpan: {
|
|
@@ -669,7 +626,6 @@ const columnsBuiltInStyles = {
|
|
|
669
626
|
displayName: 'Margin',
|
|
670
627
|
type: 'Text',
|
|
671
628
|
group: 'style',
|
|
672
|
-
description: 'The margin of the columns',
|
|
673
629
|
// Note: The UI overwrites '0 Auto 0 Auto' as the default value for top-level columns
|
|
674
630
|
defaultValue: '0 0 0 0',
|
|
675
631
|
},
|
|
@@ -677,35 +633,30 @@ const columnsBuiltInStyles = {
|
|
|
677
633
|
displayName: 'Width',
|
|
678
634
|
type: 'Text',
|
|
679
635
|
group: 'style',
|
|
680
|
-
description: 'The width of the columns',
|
|
681
636
|
defaultValue: '100%',
|
|
682
637
|
},
|
|
683
638
|
cfMaxWidth: {
|
|
684
639
|
displayName: 'Max width',
|
|
685
640
|
type: 'Text',
|
|
686
641
|
group: 'style',
|
|
687
|
-
description: 'The max-width of the columns',
|
|
688
642
|
defaultValue: '1192px',
|
|
689
643
|
},
|
|
690
644
|
cfPadding: {
|
|
691
645
|
displayName: 'Padding',
|
|
692
646
|
type: 'Text',
|
|
693
647
|
group: 'style',
|
|
694
|
-
description: 'The padding of the columns',
|
|
695
648
|
defaultValue: '10px 10px 10px 10px',
|
|
696
649
|
},
|
|
697
650
|
cfBorder: {
|
|
698
651
|
displayName: 'Border',
|
|
699
652
|
type: 'Text',
|
|
700
653
|
group: 'style',
|
|
701
|
-
description: 'The border of the columns',
|
|
702
654
|
defaultValue: '0px solid rgba(0, 0, 0, 0)',
|
|
703
655
|
},
|
|
704
656
|
cfGap: {
|
|
705
657
|
displayName: 'Gap',
|
|
706
658
|
type: 'Text',
|
|
707
659
|
group: 'style',
|
|
708
|
-
description: 'The spacing between the elements of the columns',
|
|
709
660
|
defaultValue: '10px 10px',
|
|
710
661
|
},
|
|
711
662
|
cfColumns: {
|
|
@@ -1038,18 +989,15 @@ const ComponentVariableSchema = z.object({
|
|
|
1038
989
|
const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
|
|
1039
990
|
children: z.lazy(() => ComponentTreeNodeSchema.array()),
|
|
1040
991
|
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
992
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
993
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
994
|
+
// and they will start failing if we do.
|
|
1041
995
|
if (prebindingId && !parameters) {
|
|
1042
996
|
ctx.addIssue({
|
|
1043
997
|
code: z.ZodIssueCode.custom,
|
|
1044
998
|
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
1045
999
|
});
|
|
1046
1000
|
}
|
|
1047
|
-
if (parameters && !prebindingId) {
|
|
1048
|
-
ctx.addIssue({
|
|
1049
|
-
code: z.ZodIssueCode.custom,
|
|
1050
|
-
message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
1001
|
});
|
|
1054
1002
|
const ComponentTreeSchema = z
|
|
1055
1003
|
.object({
|
|
@@ -1153,7 +1101,6 @@ const ParameterDefinitionSchema = z.object({
|
|
|
1153
1101
|
passToNodes: z
|
|
1154
1102
|
.array(PassToNodeSchema)
|
|
1155
1103
|
.max(1, 'At most one "passToNodes" element is allowed per parameter definition.'),
|
|
1156
|
-
// we might change this to be empty array for native parameter definitions, that's why we don't use .length(1)
|
|
1157
1104
|
});
|
|
1158
1105
|
const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
|
|
1159
1106
|
const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
|