@squiz/dx-page-contents-lib 1.70.2 → 1.71.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.
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { LayoutContentNodes, LayoutVariant, LayoutVariationNode } from '../layout-content';
3
3
  import { PageLayout } from '../layouts';
4
4
  import { ContentNodeTypes, InvalidContentNodeTypes } from './PageContentsMocks';
5
+ import { CustomLayoutConfig } from '../layouts/custom-layout';
5
6
  declare const PageContentsResolved: z.ZodObject<{
6
7
  id: z.ZodString;
7
8
  name: z.ZodString;
@@ -2355,6 +2356,689 @@ declare const PageContentsResolved: z.ZodObject<{
2355
2356
  })[];
2356
2357
  };
2357
2358
  name: "two-column";
2359
+ }>, z.ZodObject<{
2360
+ name: z.ZodLiteral<"custom-layout">;
2361
+ config: z.ZodEffects<z.ZodObject<{
2362
+ rootWrapper: z.ZodObject<{
2363
+ tag: z.ZodString;
2364
+ classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2365
+ }, "strip", z.ZodTypeAny, {
2366
+ tag: string;
2367
+ classes?: string[] | undefined;
2368
+ }, {
2369
+ tag: string;
2370
+ classes?: string[] | undefined;
2371
+ }>;
2372
+ nodeWrapper: z.ZodOptional<z.ZodObject<{
2373
+ tag: z.ZodString;
2374
+ classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2375
+ }, "strip", z.ZodTypeAny, {
2376
+ tag: string;
2377
+ classes?: string[] | undefined;
2378
+ }, {
2379
+ tag: string;
2380
+ classes?: string[] | undefined;
2381
+ }>>;
2382
+ minNodes: z.ZodDefault<z.ZodNumber>;
2383
+ maxNodes: z.ZodOptional<z.ZodNumber>;
2384
+ }, "strip", z.ZodTypeAny, {
2385
+ rootWrapper: {
2386
+ tag: string;
2387
+ classes?: string[] | undefined;
2388
+ };
2389
+ minNodes: number;
2390
+ nodeWrapper?: {
2391
+ tag: string;
2392
+ classes?: string[] | undefined;
2393
+ } | undefined;
2394
+ maxNodes?: number | undefined;
2395
+ }, {
2396
+ rootWrapper: {
2397
+ tag: string;
2398
+ classes?: string[] | undefined;
2399
+ };
2400
+ nodeWrapper?: {
2401
+ tag: string;
2402
+ classes?: string[] | undefined;
2403
+ } | undefined;
2404
+ minNodes?: number | undefined;
2405
+ maxNodes?: number | undefined;
2406
+ }>, {
2407
+ rootWrapper: {
2408
+ tag: string;
2409
+ classes?: string[] | undefined;
2410
+ };
2411
+ minNodes: number;
2412
+ nodeWrapper?: {
2413
+ tag: string;
2414
+ classes?: string[] | undefined;
2415
+ } | undefined;
2416
+ maxNodes?: number | undefined;
2417
+ }, {
2418
+ rootWrapper: {
2419
+ tag: string;
2420
+ classes?: string[] | undefined;
2421
+ };
2422
+ nodeWrapper?: {
2423
+ tag: string;
2424
+ classes?: string[] | undefined;
2425
+ } | undefined;
2426
+ minNodes?: number | undefined;
2427
+ maxNodes?: number | undefined;
2428
+ }>;
2429
+ content: z.ZodObject<{
2430
+ main: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodType<{
2431
+ value: string;
2432
+ type: "text";
2433
+ } | {
2434
+ type: "matrix-image";
2435
+ matrixDomain: string;
2436
+ matrixAssetId: string;
2437
+ attributes?: (Record<string, string> & {
2438
+ src?: undefined;
2439
+ }) | undefined;
2440
+ formattingOptions?: {
2441
+ alignment: "left" | "center" | "right" | "justify";
2442
+ } | undefined;
2443
+ matrixIdentifier?: string | undefined;
2444
+ } | {
2445
+ type: "dam-image";
2446
+ damSystemType: "bynder";
2447
+ damSystemIdentifier: string;
2448
+ damObjectId: string;
2449
+ attributes?: (Record<string, string> & {
2450
+ src?: undefined;
2451
+ }) | undefined;
2452
+ formattingOptions?: {
2453
+ alignment: "left" | "center" | "right" | "justify";
2454
+ } | undefined;
2455
+ damAdditional?: {
2456
+ variant?: string | undefined;
2457
+ } | undefined;
2458
+ } | {
2459
+ type: "component";
2460
+ componentId: string;
2461
+ componentSet: string;
2462
+ componentType?: "server" | "edge" | undefined;
2463
+ contentItem?: {
2464
+ id: string;
2465
+ } | {
2466
+ content: Record<string, unknown>;
2467
+ schemaName: string;
2468
+ } | undefined;
2469
+ } | (({
2470
+ type: "tag";
2471
+ tag: string;
2472
+ attributes?: Record<string, string> | undefined;
2473
+ font?: {
2474
+ bold?: boolean | undefined;
2475
+ italics?: boolean | undefined;
2476
+ underline?: boolean | undefined;
2477
+ color?: string | undefined;
2478
+ size?: string | undefined;
2479
+ fontFamily?: string | undefined;
2480
+ } | undefined;
2481
+ formattingOptions?: {
2482
+ alignment: "left" | "center" | "right" | "justify";
2483
+ } | undefined;
2484
+ } | {
2485
+ type: "fragment";
2486
+ } | {
2487
+ type: "link-to-matrix-asset";
2488
+ matrixDomain: string;
2489
+ matrixAssetId: string;
2490
+ target: "_blank" | "_self" | "_parent" | "_top";
2491
+ attributes?: (Record<string, string> & {
2492
+ target?: undefined;
2493
+ href?: undefined;
2494
+ }) | undefined;
2495
+ formattingOptions?: {
2496
+ alignment: "left" | "center" | "right" | "justify";
2497
+ } | undefined;
2498
+ matrixIdentifier?: string | undefined;
2499
+ }) & {
2500
+ children: LayoutContentNodes[];
2501
+ }), z.ZodTypeDef, {
2502
+ value: string;
2503
+ type: "text";
2504
+ } | {
2505
+ type: "tag";
2506
+ tag: string;
2507
+ attributes?: Record<string, string> | undefined;
2508
+ font?: {
2509
+ bold?: boolean | undefined;
2510
+ italics?: boolean | undefined;
2511
+ underline?: boolean | undefined;
2512
+ color?: string | undefined;
2513
+ size?: string | undefined;
2514
+ fontFamily?: string | undefined;
2515
+ } | undefined;
2516
+ formattingOptions?: {
2517
+ alignment: "left" | "center" | "right" | "justify";
2518
+ } | undefined;
2519
+ } | {
2520
+ type: "fragment";
2521
+ } | {
2522
+ type: "link-to-matrix-asset";
2523
+ matrixDomain: string;
2524
+ matrixAssetId: string;
2525
+ target: "_blank" | "_self" | "_parent" | "_top";
2526
+ attributes?: (Record<string, string> & {
2527
+ target?: undefined;
2528
+ href?: undefined;
2529
+ }) | undefined;
2530
+ formattingOptions?: {
2531
+ alignment: "left" | "center" | "right" | "justify";
2532
+ } | undefined;
2533
+ matrixIdentifier?: string | undefined;
2534
+ } | {
2535
+ type: "matrix-image";
2536
+ matrixDomain: string;
2537
+ matrixAssetId: string;
2538
+ attributes?: (Record<string, string> & {
2539
+ src?: undefined;
2540
+ }) | undefined;
2541
+ formattingOptions?: {
2542
+ alignment: "left" | "center" | "right" | "justify";
2543
+ } | undefined;
2544
+ matrixIdentifier?: string | undefined;
2545
+ } | {
2546
+ type: "dam-image";
2547
+ damSystemType: "bynder";
2548
+ damSystemIdentifier: string;
2549
+ damObjectId: string;
2550
+ attributes?: (Record<string, string> & {
2551
+ src?: undefined;
2552
+ }) | undefined;
2553
+ formattingOptions?: {
2554
+ alignment: "left" | "center" | "right" | "justify";
2555
+ } | undefined;
2556
+ damAdditional?: {
2557
+ variant?: string | undefined;
2558
+ } | undefined;
2559
+ } | {
2560
+ type: "component";
2561
+ componentId: string;
2562
+ componentSet: string;
2563
+ componentType?: "server" | "edge" | undefined;
2564
+ contentItem?: {
2565
+ id: string;
2566
+ } | {
2567
+ content: Record<string, unknown>;
2568
+ schemaName: string;
2569
+ } | undefined;
2570
+ }>, z.ZodType<LayoutVariationNode, z.ZodTypeDef, {
2571
+ type: "variation";
2572
+ default: {};
2573
+ }>]>, "many">, (LayoutVariationNode | ({
2574
+ value: string;
2575
+ type: "text";
2576
+ } | {
2577
+ type: "matrix-image";
2578
+ matrixDomain: string;
2579
+ matrixAssetId: string;
2580
+ attributes?: (Record<string, string> & {
2581
+ src?: undefined;
2582
+ }) | undefined;
2583
+ formattingOptions?: {
2584
+ alignment: "left" | "center" | "right" | "justify";
2585
+ } | undefined;
2586
+ matrixIdentifier?: string | undefined;
2587
+ } | {
2588
+ type: "dam-image";
2589
+ damSystemType: "bynder";
2590
+ damSystemIdentifier: string;
2591
+ damObjectId: string;
2592
+ attributes?: (Record<string, string> & {
2593
+ src?: undefined;
2594
+ }) | undefined;
2595
+ formattingOptions?: {
2596
+ alignment: "left" | "center" | "right" | "justify";
2597
+ } | undefined;
2598
+ damAdditional?: {
2599
+ variant?: string | undefined;
2600
+ } | undefined;
2601
+ } | {
2602
+ type: "component";
2603
+ componentId: string;
2604
+ componentSet: string;
2605
+ componentType?: "server" | "edge" | undefined;
2606
+ contentItem?: {
2607
+ id: string;
2608
+ } | {
2609
+ content: Record<string, unknown>;
2610
+ schemaName: string;
2611
+ } | undefined;
2612
+ } | (({
2613
+ type: "tag";
2614
+ tag: string;
2615
+ attributes?: Record<string, string> | undefined;
2616
+ font?: {
2617
+ bold?: boolean | undefined;
2618
+ italics?: boolean | undefined;
2619
+ underline?: boolean | undefined;
2620
+ color?: string | undefined;
2621
+ size?: string | undefined;
2622
+ fontFamily?: string | undefined;
2623
+ } | undefined;
2624
+ formattingOptions?: {
2625
+ alignment: "left" | "center" | "right" | "justify";
2626
+ } | undefined;
2627
+ } | {
2628
+ type: "fragment";
2629
+ } | {
2630
+ type: "link-to-matrix-asset";
2631
+ matrixDomain: string;
2632
+ matrixAssetId: string;
2633
+ target: "_blank" | "_self" | "_parent" | "_top";
2634
+ attributes?: (Record<string, string> & {
2635
+ target?: undefined;
2636
+ href?: undefined;
2637
+ }) | undefined;
2638
+ formattingOptions?: {
2639
+ alignment: "left" | "center" | "right" | "justify";
2640
+ } | undefined;
2641
+ matrixIdentifier?: string | undefined;
2642
+ }) & {
2643
+ children: LayoutContentNodes[];
2644
+ })))[], ({
2645
+ value: string;
2646
+ type: "text";
2647
+ } | {
2648
+ type: "tag";
2649
+ tag: string;
2650
+ attributes?: Record<string, string> | undefined;
2651
+ font?: {
2652
+ bold?: boolean | undefined;
2653
+ italics?: boolean | undefined;
2654
+ underline?: boolean | undefined;
2655
+ color?: string | undefined;
2656
+ size?: string | undefined;
2657
+ fontFamily?: string | undefined;
2658
+ } | undefined;
2659
+ formattingOptions?: {
2660
+ alignment: "left" | "center" | "right" | "justify";
2661
+ } | undefined;
2662
+ } | {
2663
+ type: "fragment";
2664
+ } | {
2665
+ type: "link-to-matrix-asset";
2666
+ matrixDomain: string;
2667
+ matrixAssetId: string;
2668
+ target: "_blank" | "_self" | "_parent" | "_top";
2669
+ attributes?: (Record<string, string> & {
2670
+ target?: undefined;
2671
+ href?: undefined;
2672
+ }) | undefined;
2673
+ formattingOptions?: {
2674
+ alignment: "left" | "center" | "right" | "justify";
2675
+ } | undefined;
2676
+ matrixIdentifier?: string | undefined;
2677
+ } | {
2678
+ type: "matrix-image";
2679
+ matrixDomain: string;
2680
+ matrixAssetId: string;
2681
+ attributes?: (Record<string, string> & {
2682
+ src?: undefined;
2683
+ }) | undefined;
2684
+ formattingOptions?: {
2685
+ alignment: "left" | "center" | "right" | "justify";
2686
+ } | undefined;
2687
+ matrixIdentifier?: string | undefined;
2688
+ } | {
2689
+ type: "dam-image";
2690
+ damSystemType: "bynder";
2691
+ damSystemIdentifier: string;
2692
+ damObjectId: string;
2693
+ attributes?: (Record<string, string> & {
2694
+ src?: undefined;
2695
+ }) | undefined;
2696
+ formattingOptions?: {
2697
+ alignment: "left" | "center" | "right" | "justify";
2698
+ } | undefined;
2699
+ damAdditional?: {
2700
+ variant?: string | undefined;
2701
+ } | undefined;
2702
+ } | {
2703
+ type: "component";
2704
+ componentId: string;
2705
+ componentSet: string;
2706
+ componentType?: "server" | "edge" | undefined;
2707
+ contentItem?: {
2708
+ id: string;
2709
+ } | {
2710
+ content: Record<string, unknown>;
2711
+ schemaName: string;
2712
+ } | undefined;
2713
+ } | {
2714
+ type: "variation";
2715
+ default: {};
2716
+ })[]>;
2717
+ }, "strip", z.ZodTypeAny, {
2718
+ main: (LayoutVariationNode | ({
2719
+ value: string;
2720
+ type: "text";
2721
+ } | {
2722
+ type: "matrix-image";
2723
+ matrixDomain: string;
2724
+ matrixAssetId: string;
2725
+ attributes?: (Record<string, string> & {
2726
+ src?: undefined;
2727
+ }) | undefined;
2728
+ formattingOptions?: {
2729
+ alignment: "left" | "center" | "right" | "justify";
2730
+ } | undefined;
2731
+ matrixIdentifier?: string | undefined;
2732
+ } | {
2733
+ type: "dam-image";
2734
+ damSystemType: "bynder";
2735
+ damSystemIdentifier: string;
2736
+ damObjectId: string;
2737
+ attributes?: (Record<string, string> & {
2738
+ src?: undefined;
2739
+ }) | undefined;
2740
+ formattingOptions?: {
2741
+ alignment: "left" | "center" | "right" | "justify";
2742
+ } | undefined;
2743
+ damAdditional?: {
2744
+ variant?: string | undefined;
2745
+ } | undefined;
2746
+ } | {
2747
+ type: "component";
2748
+ componentId: string;
2749
+ componentSet: string;
2750
+ componentType?: "server" | "edge" | undefined;
2751
+ contentItem?: {
2752
+ id: string;
2753
+ } | {
2754
+ content: Record<string, unknown>;
2755
+ schemaName: string;
2756
+ } | undefined;
2757
+ } | (({
2758
+ type: "tag";
2759
+ tag: string;
2760
+ attributes?: Record<string, string> | undefined;
2761
+ font?: {
2762
+ bold?: boolean | undefined;
2763
+ italics?: boolean | undefined;
2764
+ underline?: boolean | undefined;
2765
+ color?: string | undefined;
2766
+ size?: string | undefined;
2767
+ fontFamily?: string | undefined;
2768
+ } | undefined;
2769
+ formattingOptions?: {
2770
+ alignment: "left" | "center" | "right" | "justify";
2771
+ } | undefined;
2772
+ } | {
2773
+ type: "fragment";
2774
+ } | {
2775
+ type: "link-to-matrix-asset";
2776
+ matrixDomain: string;
2777
+ matrixAssetId: string;
2778
+ target: "_blank" | "_self" | "_parent" | "_top";
2779
+ attributes?: (Record<string, string> & {
2780
+ target?: undefined;
2781
+ href?: undefined;
2782
+ }) | undefined;
2783
+ formattingOptions?: {
2784
+ alignment: "left" | "center" | "right" | "justify";
2785
+ } | undefined;
2786
+ matrixIdentifier?: string | undefined;
2787
+ }) & {
2788
+ children: LayoutContentNodes[];
2789
+ })))[];
2790
+ }, {
2791
+ main: ({
2792
+ value: string;
2793
+ type: "text";
2794
+ } | {
2795
+ type: "tag";
2796
+ tag: string;
2797
+ attributes?: Record<string, string> | undefined;
2798
+ font?: {
2799
+ bold?: boolean | undefined;
2800
+ italics?: boolean | undefined;
2801
+ underline?: boolean | undefined;
2802
+ color?: string | undefined;
2803
+ size?: string | undefined;
2804
+ fontFamily?: string | undefined;
2805
+ } | undefined;
2806
+ formattingOptions?: {
2807
+ alignment: "left" | "center" | "right" | "justify";
2808
+ } | undefined;
2809
+ } | {
2810
+ type: "fragment";
2811
+ } | {
2812
+ type: "link-to-matrix-asset";
2813
+ matrixDomain: string;
2814
+ matrixAssetId: string;
2815
+ target: "_blank" | "_self" | "_parent" | "_top";
2816
+ attributes?: (Record<string, string> & {
2817
+ target?: undefined;
2818
+ href?: undefined;
2819
+ }) | undefined;
2820
+ formattingOptions?: {
2821
+ alignment: "left" | "center" | "right" | "justify";
2822
+ } | undefined;
2823
+ matrixIdentifier?: string | undefined;
2824
+ } | {
2825
+ type: "matrix-image";
2826
+ matrixDomain: string;
2827
+ matrixAssetId: string;
2828
+ attributes?: (Record<string, string> & {
2829
+ src?: undefined;
2830
+ }) | undefined;
2831
+ formattingOptions?: {
2832
+ alignment: "left" | "center" | "right" | "justify";
2833
+ } | undefined;
2834
+ matrixIdentifier?: string | undefined;
2835
+ } | {
2836
+ type: "dam-image";
2837
+ damSystemType: "bynder";
2838
+ damSystemIdentifier: string;
2839
+ damObjectId: string;
2840
+ attributes?: (Record<string, string> & {
2841
+ src?: undefined;
2842
+ }) | undefined;
2843
+ formattingOptions?: {
2844
+ alignment: "left" | "center" | "right" | "justify";
2845
+ } | undefined;
2846
+ damAdditional?: {
2847
+ variant?: string | undefined;
2848
+ } | undefined;
2849
+ } | {
2850
+ type: "component";
2851
+ componentId: string;
2852
+ componentSet: string;
2853
+ componentType?: "server" | "edge" | undefined;
2854
+ contentItem?: {
2855
+ id: string;
2856
+ } | {
2857
+ content: Record<string, unknown>;
2858
+ schemaName: string;
2859
+ } | undefined;
2860
+ } | {
2861
+ type: "variation";
2862
+ default: {};
2863
+ })[];
2864
+ }>;
2865
+ }, "strip", z.ZodTypeAny, {
2866
+ content: {
2867
+ main: (LayoutVariationNode | ({
2868
+ value: string;
2869
+ type: "text";
2870
+ } | {
2871
+ type: "matrix-image";
2872
+ matrixDomain: string;
2873
+ matrixAssetId: string;
2874
+ attributes?: (Record<string, string> & {
2875
+ src?: undefined;
2876
+ }) | undefined;
2877
+ formattingOptions?: {
2878
+ alignment: "left" | "center" | "right" | "justify";
2879
+ } | undefined;
2880
+ matrixIdentifier?: string | undefined;
2881
+ } | {
2882
+ type: "dam-image";
2883
+ damSystemType: "bynder";
2884
+ damSystemIdentifier: string;
2885
+ damObjectId: string;
2886
+ attributes?: (Record<string, string> & {
2887
+ src?: undefined;
2888
+ }) | undefined;
2889
+ formattingOptions?: {
2890
+ alignment: "left" | "center" | "right" | "justify";
2891
+ } | undefined;
2892
+ damAdditional?: {
2893
+ variant?: string | undefined;
2894
+ } | undefined;
2895
+ } | {
2896
+ type: "component";
2897
+ componentId: string;
2898
+ componentSet: string;
2899
+ componentType?: "server" | "edge" | undefined;
2900
+ contentItem?: {
2901
+ id: string;
2902
+ } | {
2903
+ content: Record<string, unknown>;
2904
+ schemaName: string;
2905
+ } | undefined;
2906
+ } | (({
2907
+ type: "tag";
2908
+ tag: string;
2909
+ attributes?: Record<string, string> | undefined;
2910
+ font?: {
2911
+ bold?: boolean | undefined;
2912
+ italics?: boolean | undefined;
2913
+ underline?: boolean | undefined;
2914
+ color?: string | undefined;
2915
+ size?: string | undefined;
2916
+ fontFamily?: string | undefined;
2917
+ } | undefined;
2918
+ formattingOptions?: {
2919
+ alignment: "left" | "center" | "right" | "justify";
2920
+ } | undefined;
2921
+ } | {
2922
+ type: "fragment";
2923
+ } | {
2924
+ type: "link-to-matrix-asset";
2925
+ matrixDomain: string;
2926
+ matrixAssetId: string;
2927
+ target: "_blank" | "_self" | "_parent" | "_top";
2928
+ attributes?: (Record<string, string> & {
2929
+ target?: undefined;
2930
+ href?: undefined;
2931
+ }) | undefined;
2932
+ formattingOptions?: {
2933
+ alignment: "left" | "center" | "right" | "justify";
2934
+ } | undefined;
2935
+ matrixIdentifier?: string | undefined;
2936
+ }) & {
2937
+ children: LayoutContentNodes[];
2938
+ })))[];
2939
+ };
2940
+ name: "custom-layout";
2941
+ config: {
2942
+ rootWrapper: {
2943
+ tag: string;
2944
+ classes?: string[] | undefined;
2945
+ };
2946
+ minNodes: number;
2947
+ nodeWrapper?: {
2948
+ tag: string;
2949
+ classes?: string[] | undefined;
2950
+ } | undefined;
2951
+ maxNodes?: number | undefined;
2952
+ };
2953
+ }, {
2954
+ content: {
2955
+ main: ({
2956
+ value: string;
2957
+ type: "text";
2958
+ } | {
2959
+ type: "tag";
2960
+ tag: string;
2961
+ attributes?: Record<string, string> | undefined;
2962
+ font?: {
2963
+ bold?: boolean | undefined;
2964
+ italics?: boolean | undefined;
2965
+ underline?: boolean | undefined;
2966
+ color?: string | undefined;
2967
+ size?: string | undefined;
2968
+ fontFamily?: string | undefined;
2969
+ } | undefined;
2970
+ formattingOptions?: {
2971
+ alignment: "left" | "center" | "right" | "justify";
2972
+ } | undefined;
2973
+ } | {
2974
+ type: "fragment";
2975
+ } | {
2976
+ type: "link-to-matrix-asset";
2977
+ matrixDomain: string;
2978
+ matrixAssetId: string;
2979
+ target: "_blank" | "_self" | "_parent" | "_top";
2980
+ attributes?: (Record<string, string> & {
2981
+ target?: undefined;
2982
+ href?: undefined;
2983
+ }) | undefined;
2984
+ formattingOptions?: {
2985
+ alignment: "left" | "center" | "right" | "justify";
2986
+ } | undefined;
2987
+ matrixIdentifier?: string | undefined;
2988
+ } | {
2989
+ type: "matrix-image";
2990
+ matrixDomain: string;
2991
+ matrixAssetId: string;
2992
+ attributes?: (Record<string, string> & {
2993
+ src?: undefined;
2994
+ }) | undefined;
2995
+ formattingOptions?: {
2996
+ alignment: "left" | "center" | "right" | "justify";
2997
+ } | undefined;
2998
+ matrixIdentifier?: string | undefined;
2999
+ } | {
3000
+ type: "dam-image";
3001
+ damSystemType: "bynder";
3002
+ damSystemIdentifier: string;
3003
+ damObjectId: string;
3004
+ attributes?: (Record<string, string> & {
3005
+ src?: undefined;
3006
+ }) | undefined;
3007
+ formattingOptions?: {
3008
+ alignment: "left" | "center" | "right" | "justify";
3009
+ } | undefined;
3010
+ damAdditional?: {
3011
+ variant?: string | undefined;
3012
+ } | undefined;
3013
+ } | {
3014
+ type: "component";
3015
+ componentId: string;
3016
+ componentSet: string;
3017
+ componentType?: "server" | "edge" | undefined;
3018
+ contentItem?: {
3019
+ id: string;
3020
+ } | {
3021
+ content: Record<string, unknown>;
3022
+ schemaName: string;
3023
+ } | undefined;
3024
+ } | {
3025
+ type: "variation";
3026
+ default: {};
3027
+ })[];
3028
+ };
3029
+ name: "custom-layout";
3030
+ config: {
3031
+ rootWrapper: {
3032
+ tag: string;
3033
+ classes?: string[] | undefined;
3034
+ };
3035
+ nodeWrapper?: {
3036
+ tag: string;
3037
+ classes?: string[] | undefined;
3038
+ } | undefined;
3039
+ minNodes?: number | undefined;
3040
+ maxNodes?: number | undefined;
3041
+ };
2358
3042
  }>]>, "many">;
2359
3043
  }, "strip", z.ZodTypeAny, {
2360
3044
  id: string;
@@ -2659,6 +3343,94 @@ declare const PageContentsResolved: z.ZodObject<{
2659
3343
  })))[];
2660
3344
  };
2661
3345
  name: "two-column";
3346
+ } | {
3347
+ content: {
3348
+ main: (LayoutVariationNode | ({
3349
+ value: string;
3350
+ type: "text";
3351
+ } | {
3352
+ type: "matrix-image";
3353
+ matrixDomain: string;
3354
+ matrixAssetId: string;
3355
+ attributes?: (Record<string, string> & {
3356
+ src?: undefined;
3357
+ }) | undefined;
3358
+ formattingOptions?: {
3359
+ alignment: "left" | "center" | "right" | "justify";
3360
+ } | undefined;
3361
+ matrixIdentifier?: string | undefined;
3362
+ } | {
3363
+ type: "dam-image";
3364
+ damSystemType: "bynder";
3365
+ damSystemIdentifier: string;
3366
+ damObjectId: string;
3367
+ attributes?: (Record<string, string> & {
3368
+ src?: undefined;
3369
+ }) | undefined;
3370
+ formattingOptions?: {
3371
+ alignment: "left" | "center" | "right" | "justify";
3372
+ } | undefined;
3373
+ damAdditional?: {
3374
+ variant?: string | undefined;
3375
+ } | undefined;
3376
+ } | {
3377
+ type: "component";
3378
+ componentId: string;
3379
+ componentSet: string;
3380
+ componentType?: "server" | "edge" | undefined;
3381
+ contentItem?: {
3382
+ id: string;
3383
+ } | {
3384
+ content: Record<string, unknown>;
3385
+ schemaName: string;
3386
+ } | undefined;
3387
+ } | (({
3388
+ type: "tag";
3389
+ tag: string;
3390
+ attributes?: Record<string, string> | undefined;
3391
+ font?: {
3392
+ bold?: boolean | undefined;
3393
+ italics?: boolean | undefined;
3394
+ underline?: boolean | undefined;
3395
+ color?: string | undefined;
3396
+ size?: string | undefined;
3397
+ fontFamily?: string | undefined;
3398
+ } | undefined;
3399
+ formattingOptions?: {
3400
+ alignment: "left" | "center" | "right" | "justify";
3401
+ } | undefined;
3402
+ } | {
3403
+ type: "fragment";
3404
+ } | {
3405
+ type: "link-to-matrix-asset";
3406
+ matrixDomain: string;
3407
+ matrixAssetId: string;
3408
+ target: "_blank" | "_self" | "_parent" | "_top";
3409
+ attributes?: (Record<string, string> & {
3410
+ target?: undefined;
3411
+ href?: undefined;
3412
+ }) | undefined;
3413
+ formattingOptions?: {
3414
+ alignment: "left" | "center" | "right" | "justify";
3415
+ } | undefined;
3416
+ matrixIdentifier?: string | undefined;
3417
+ }) & {
3418
+ children: LayoutContentNodes[];
3419
+ })))[];
3420
+ };
3421
+ name: "custom-layout";
3422
+ config: {
3423
+ rootWrapper: {
3424
+ tag: string;
3425
+ classes?: string[] | undefined;
3426
+ };
3427
+ minNodes: number;
3428
+ nodeWrapper?: {
3429
+ tag: string;
3430
+ classes?: string[] | undefined;
3431
+ } | undefined;
3432
+ maxNodes?: number | undefined;
3433
+ };
2662
3434
  })[];
2663
3435
  }, {
2664
3436
  id: string;
@@ -2967,9 +3739,103 @@ declare const PageContentsResolved: z.ZodObject<{
2967
3739
  })[];
2968
3740
  };
2969
3741
  name: "two-column";
3742
+ } | {
3743
+ content: {
3744
+ main: ({
3745
+ value: string;
3746
+ type: "text";
3747
+ } | {
3748
+ type: "tag";
3749
+ tag: string;
3750
+ attributes?: Record<string, string> | undefined;
3751
+ font?: {
3752
+ bold?: boolean | undefined;
3753
+ italics?: boolean | undefined;
3754
+ underline?: boolean | undefined;
3755
+ color?: string | undefined;
3756
+ size?: string | undefined;
3757
+ fontFamily?: string | undefined;
3758
+ } | undefined;
3759
+ formattingOptions?: {
3760
+ alignment: "left" | "center" | "right" | "justify";
3761
+ } | undefined;
3762
+ } | {
3763
+ type: "fragment";
3764
+ } | {
3765
+ type: "link-to-matrix-asset";
3766
+ matrixDomain: string;
3767
+ matrixAssetId: string;
3768
+ target: "_blank" | "_self" | "_parent" | "_top";
3769
+ attributes?: (Record<string, string> & {
3770
+ target?: undefined;
3771
+ href?: undefined;
3772
+ }) | undefined;
3773
+ formattingOptions?: {
3774
+ alignment: "left" | "center" | "right" | "justify";
3775
+ } | undefined;
3776
+ matrixIdentifier?: string | undefined;
3777
+ } | {
3778
+ type: "matrix-image";
3779
+ matrixDomain: string;
3780
+ matrixAssetId: string;
3781
+ attributes?: (Record<string, string> & {
3782
+ src?: undefined;
3783
+ }) | undefined;
3784
+ formattingOptions?: {
3785
+ alignment: "left" | "center" | "right" | "justify";
3786
+ } | undefined;
3787
+ matrixIdentifier?: string | undefined;
3788
+ } | {
3789
+ type: "dam-image";
3790
+ damSystemType: "bynder";
3791
+ damSystemIdentifier: string;
3792
+ damObjectId: string;
3793
+ attributes?: (Record<string, string> & {
3794
+ src?: undefined;
3795
+ }) | undefined;
3796
+ formattingOptions?: {
3797
+ alignment: "left" | "center" | "right" | "justify";
3798
+ } | undefined;
3799
+ damAdditional?: {
3800
+ variant?: string | undefined;
3801
+ } | undefined;
3802
+ } | {
3803
+ type: "component";
3804
+ componentId: string;
3805
+ componentSet: string;
3806
+ componentType?: "server" | "edge" | undefined;
3807
+ contentItem?: {
3808
+ id: string;
3809
+ } | {
3810
+ content: Record<string, unknown>;
3811
+ schemaName: string;
3812
+ } | undefined;
3813
+ } | {
3814
+ type: "variation";
3815
+ default: {};
3816
+ })[];
3817
+ };
3818
+ name: "custom-layout";
3819
+ config: {
3820
+ rootWrapper: {
3821
+ tag: string;
3822
+ classes?: string[] | undefined;
3823
+ };
3824
+ nodeWrapper?: {
3825
+ tag: string;
3826
+ classes?: string[] | undefined;
3827
+ } | undefined;
3828
+ minNodes?: number | undefined;
3829
+ maxNodes?: number | undefined;
3830
+ };
2970
3831
  })[];
2971
3832
  }>;
2972
3833
  type MockPageContentsResolved = z.infer<typeof PageContentsResolved>;
3834
+ type ExtractColumnType<T extends PageLayout['name']> = Extract<PageLayout, {
3835
+ name: T;
3836
+ }>;
3837
+ type CustomLayout = ExtractColumnType<'custom-layout'>;
3838
+ type CustomLayoutConfig = CustomLayout['config'];
2973
3839
  /**
2974
3840
  * Use this builder for creating mock raw layouts for tests.
2975
3841
  * @export
@@ -2992,6 +3858,13 @@ export declare class PageSingleColumLayoutBuilder {
2992
3858
  reset(): PageSingleColumLayoutBuilder;
2993
3859
  build(): PageLayout;
2994
3860
  }
3861
+ export declare class CustomLayoutBuilder {
3862
+ private layout;
3863
+ constructor(config: z.input<typeof CustomLayoutConfig>);
3864
+ addNode(node: LayoutContentNodes): CustomLayoutBuilder;
3865
+ reset(): CustomLayoutBuilder;
3866
+ build(): PageLayout;
3867
+ }
2995
3868
  /**
2996
3869
  * Use this builder for creating mock resolved page contents for tests.
2997
3870
  * @export
@@ -3005,6 +3878,7 @@ export declare class PageContentResolvedMockBuilder {
3005
3878
  setName(name: string): PageContentResolvedMockBuilder;
3006
3879
  setLayouts(layouts: PageLayout[]): PageContentResolvedMockBuilder;
3007
3880
  createLayout(): PageRawLayoutBuilder;
3881
+ createCustomLayout(config: CustomLayoutConfig): CustomLayoutBuilder;
3008
3882
  addLayout(layout: PageLayout): PageContentResolvedMockBuilder;
3009
3883
  nodeFactory(): MockNodeFactory;
3010
3884
  reset(): PageContentResolvedMockBuilder;