@vectoriox/iox-ui 4.24.0 → 4.26.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/index.d.ts CHANGED
@@ -509,6 +509,180 @@ declare class ButtonBlockComponent {
509
509
  static ɵcmp: i0.ɵɵComponentDeclaration<ButtonBlockComponent, "a[iox-button-block],button[iox-button-block]", never, { "tag": { "alias": "tag"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "type": { "alias": "type"; "required": false; }; "nodeId": { "alias": "nodeId"; "required": false; }; }, {}, never, never, false, never>;
510
510
  }
511
511
 
512
+ /** The five fixed breakpoints (plan decision D2). Desktop-first: each narrower one
513
+ * overrides the wider ones through `max-width`. */
514
+ declare enum Breakpoint {
515
+ Base = "base",
516
+ Laptop = "laptop",
517
+ Tablet = "tablet",
518
+ Mobile = "mobile",
519
+ Small = "small"
520
+ }
521
+ /** Every breakpoint that can hold overrides. Base styles live in `styleProps`. */
522
+ type OverrideBreakpoint = Exclude<Breakpoint, Breakpoint.Base>;
523
+ interface BreakpointDef {
524
+ readonly id: Breakpoint;
525
+ readonly label: string;
526
+ /** Inclusive upper bound in CSS px (`max-width`). `null` for Base, which has no query. */
527
+ readonly maxWidth: number | null;
528
+ /** Width the builder canvas simulates while this breakpoint is being edited. Always
529
+ * inside the breakpoint's own range (above the next one's `maxWidth`). */
530
+ readonly previewWidth: number;
531
+ }
532
+ /**
533
+ * Widest → narrowest. This order IS the cascade order and the `@media` emission order.
534
+ *
535
+ * ⚠️ Phones in portrait (360–430px) land in `Small`, NOT `Mobile` — `Mobile` is 480–767,
536
+ * a phone held landscape. The labels say so (as Webflow's do). The ids stay short because
537
+ * they are storage keys; the cascade still makes a `Mobile` override reach every phone.
538
+ */
539
+ declare const BREAKPOINTS: readonly BreakpointDef[];
540
+ /** The definition for `bp`, or `undefined` for an unknown id (e.g. hand-edited JSON). */
541
+ declare function breakpointDef(bp: Breakpoint | string): BreakpointDef | undefined;
542
+ /** Base → `bp`, inclusive — the layers whose values apply at `bp`. Unknown → `[Base]`. */
543
+ declare function cascadeChain(bp: Breakpoint | string): Breakpoint[];
544
+ /**
545
+ * The breakpoint a viewport (or canvas) of `width` CSS px falls in — the narrowest one whose
546
+ * `maxWidth` it fits under, else Base. Mirrors how the `max-width` media queries resolve, so the
547
+ * builder's editing scope is always the breakpoint the canvas is actually showing.
548
+ */
549
+ declare function breakpointForWidth(width: number): Breakpoint;
550
+ /** The next-wider breakpoint (what `bp` inherits from), or `null` for Base / unknown. */
551
+ declare function parentBreakpoint(bp: Breakpoint | string): Breakpoint | null;
552
+ /**
553
+ * What a breakpoint's width is measured against.
554
+ *
555
+ * `Media` — the browser viewport. The SSR engine: a visitor's window IS the page.
556
+ * `Container` — a named CSS size container. The builder: its canvas is a fixed-width frame inside a
557
+ * desktop browser (and `transform: scale`d for zoom), so a media query would read the EDITOR's width.
558
+ * A container query reads the frame's own layout width — which equals the simulated viewport and
559
+ * ignores the zoom transform — so the builder emits the same structure as the engine.
560
+ */
561
+ declare enum BreakpointQueryKind {
562
+ Media = "media",
563
+ Container = "container"
564
+ }
565
+ /**
566
+ * The at-rule prelude for `bp` — `@media (max-width: 767px)`, or with `Container`
567
+ * `@container iox-canvas (max-width: 767px)`. `null` for Base or an unknown id.
568
+ * `containerName` is required for `Container` (an unnamed container query would match
569
+ * whichever ancestor container is nearest, which is not guaranteed to be the canvas).
570
+ */
571
+ declare function breakpointQueryFor(bp: Breakpoint | string, kind?: BreakpointQueryKind, containerName?: string): string | null;
572
+ /** Wrap already-compiled rules for `bp`. Base (and blank css) passes through unwrapped. */
573
+ declare function wrapInBreakpointQuery(bp: Breakpoint | string, css: string, kind?: BreakpointQueryKind, containerName?: string): string;
574
+ /** `@media (max-width: 767px)` for `bp`; `null` for Base or an unknown id. */
575
+ declare function mediaQueryFor(bp: Breakpoint | string): string | null;
576
+ /** Wrap already-compiled rules for `bp` in its media query. Base (and blank css) passes through. */
577
+ declare function wrapInMediaQuery(bp: Breakpoint | string, css: string): string;
578
+ type StyleMap = Record<string, any>;
579
+ type StateStyleMap = Record<string, StyleMap>;
580
+ /** Component trait values (node `props`/`inputs`), keyed by trait name. */
581
+ type InputMap = Record<string, any>;
582
+ /** What one breakpoint overrides. All maps are SPARSE — only keys that differ. */
583
+ interface ResponsiveLayer {
584
+ styleProps?: StyleMap;
585
+ stateStyles?: StateStyleMap;
586
+ /**
587
+ * Per-breakpoint COMPONENT TRAIT overrides (`slidesPerView`, `limit`, …) — the things a media
588
+ * query cannot express because they are component inputs, not CSS. Without this a 4-up slider
589
+ * stays 4-up on a phone; the only escape used to be hand-typed Swiper JSON.
590
+ *
591
+ * Sparse and additive like the maps above, so a page with no trait overrides serialises exactly
592
+ * as before. Only traits declared `responsive` on their `TraitConfig` may appear here.
593
+ */
594
+ inputs?: InputMap;
595
+ }
596
+ type ResponsiveOverrides = Partial<Record<OverrideBreakpoint, ResponsiveLayer>>;
597
+ /** The full effective style map at `bp`: base, then each layer down the cascade. */
598
+ declare function resolveStyleProps(styleProps: StyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): StyleMap;
599
+ /**
600
+ * The full effective TRAIT map at `bp`: the node's own inputs, then each layer down the cascade.
601
+ * Deliberately identical in shape and cascade order to `resolveStyleProps`, so "how does a value
602
+ * at this width get decided" has ONE answer on both sides of the renderer split.
603
+ */
604
+ declare function resolveInputs(inputs: InputMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): InputMap;
605
+ /** True when `bp` itself sets trait `name` — the panel's override indicator. Never true for Base. */
606
+ declare function isInputOverriddenAt(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, name: string): boolean;
607
+ /**
608
+ * Every level from Base down to `bp` that sets trait `name`, in cascade order — the trait-row
609
+ * equivalent of `resolveValueChain`, driving the same "Base 4 → Tablet 2 → Mobile 1" source chain.
610
+ */
611
+ declare function resolveInputChain(name: string, inputs: InputMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): ValueSource[];
612
+ /** The effective per-state maps at `bp`. States with no values anywhere are omitted. */
613
+ declare function resolveStateStyles(stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): StateStyleMap;
614
+ /**
615
+ * Every state that has a value anywhere — at base or at any breakpoint — in a stable order
616
+ * (base states first, then any that exist only at a breakpoint). A renderer iterates this, not
617
+ * `Object.keys(stateStyles)`, so a state defined ONLY at a breakpoint (a Mobile-only hover) still
618
+ * gets its selector scope resolved.
619
+ */
620
+ declare function stateNamesIn(stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined): string[];
621
+ /** One level of the cascade that sets a value. */
622
+ interface ValueSource {
623
+ breakpoint: Breakpoint;
624
+ value: any;
625
+ }
626
+ /**
627
+ * Every level from Base down to `bp` that sets `prop` (optionally within `state`), in
628
+ * cascade order. The LAST entry is the effective value; an empty array means unset.
629
+ * Drives the style panel's source chain ("Base 34 → Tablet 28 → Mobile 22").
630
+ */
631
+ declare function resolveValueChain(prop: string, styleProps: StyleMap | null | undefined, stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, state?: string): ValueSource[];
632
+ /** True when `bp` itself sets `prop` (the style panel's orange edge). Never true for Base. */
633
+ declare function isOverriddenAt(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop: string, state?: string): boolean;
634
+ /** Number of overridden values — at `bp`, or across every breakpoint when omitted. */
635
+ declare function countOverrides(responsive: ResponsiveOverrides | null | undefined, bp?: Breakpoint | string): number;
636
+ /** Returns a new overrides object with `prop` set at `bp` (optionally within `state`). */
637
+ declare function setOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop: string, value: any, state?: string): ResponsiveOverrides;
638
+ /** Returns a new overrides object with trait `name` set at `bp`. */
639
+ declare function setInputOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, name: string, value: any): ResponsiveOverrides;
640
+ /**
641
+ * Remove trait overrides at `bp`, pruning empties exactly like `clearOverride` — omit `name` to
642
+ * drop every trait override at that width. Returns `undefined` when nothing is left anywhere.
643
+ */
644
+ declare function clearInputOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, name?: string): ResponsiveOverrides | undefined;
645
+ /**
646
+ * Remove overrides at `bp` and PRUNE whatever becomes empty, so "reset" and "never
647
+ * overridden" are the same state on disk — no tombstones, no nulls.
648
+ *
649
+ * clearOverride(r, bp) — the whole breakpoint
650
+ * clearOverride(r, bp, undefined, st) — one state at that breakpoint
651
+ * clearOverride(r, bp, prop) — one base-state value
652
+ * clearOverride(r, bp, prop, st) — one value within a state
653
+ *
654
+ * Returns `undefined` when nothing is left, so a serialiser omits the key entirely.
655
+ */
656
+ declare function clearOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop?: string, state?: string): ResponsiveOverrides | undefined;
657
+ /**
658
+ * Everything one breakpoint must emit, already composed. Wrap in `mediaQuery` (engine)
659
+ * or apply directly (builder, flattened).
660
+ *
661
+ * ⚠️ Compile these maps with `compileDeclarations(map, …, DeclarationContext.Override)`. The
662
+ * default Base context drops CSS initial values as no-ops — but here `width: auto` or
663
+ * `transform: none` is how a breakpoint UNDOES the wider value, and dropping it silently keeps
664
+ * the desktop style.
665
+ */
666
+ interface ResponsiveRuleSet {
667
+ breakpoint: OverrideBreakpoint;
668
+ mediaQuery: string;
669
+ /** Sparse declarations for the node itself at this width (virtual traits composed). */
670
+ styleProps: StyleMap;
671
+ /** Sparse declarations per state at this width (virtual traits composed). */
672
+ stateStyles: StateStyleMap;
673
+ }
674
+ /**
675
+ * The per-breakpoint rule sets a node needs, widest → narrowest (the order they must be
676
+ * emitted in, AFTER every base rule — equal specificity means source order decides).
677
+ * Breakpoints with nothing to emit are omitted.
678
+ *
679
+ * Handles the cross-axis case: a breakpoint that changes a virtual group (say
680
+ * `translateX`) also re-emits that group for every state the node has, because the wider
681
+ * state rule was composed against the wider value and would otherwise snap back to it on
682
+ * hover.
683
+ */
684
+ declare function planResponsiveRules(styleProps: StyleMap | null | undefined, stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined): ResponsiveRuleSet[];
685
+
512
686
  declare class ClientSliderContainerComponent implements OnInit, AfterViewInit, OnDestroy {
513
687
  private platformId;
514
688
  nodeId: string;
@@ -519,6 +693,9 @@ declare class ClientSliderContainerComponent implements OnInit, AfterViewInit, O
519
693
  direction: 'horizontal' | 'vertical';
520
694
  loop: boolean;
521
695
  slidesPerView: number;
696
+ /** Declared by the config since the slider shipped, but never declared HERE — so `safeSetInput`
697
+ * dropped it and the panel control did nothing on either renderer. */
698
+ slidesPerGroup: number;
522
699
  spaceBetween: number;
523
700
  speed: number;
524
701
  effect: string;
@@ -540,12 +717,20 @@ declare class ClientSliderContainerComponent implements OnInit, AfterViewInit, O
540
717
  paginationType: 'bullets' | 'fraction' | 'progressbar';
541
718
  paginationClickable: boolean;
542
719
  gridRows: number;
720
+ /** Advanced escape hatch: raw Swiper `breakpoints` JSON. Merged OVER the map derived from the
721
+ * node's per-breakpoint traits, so an explicit hand-written value always wins. */
543
722
  breakpoints: string;
723
+ /** The node's per-breakpoint overrides. Only its `inputs` layer is read here — the style layers
724
+ * are compiled to CSS by the style engine, not handed to Swiper. */
725
+ responsive: ResponsiveOverrides | null;
544
726
  childrenHost: ViewContainerRef;
545
727
  swiperEl: {
546
728
  nativeElement: HTMLElement;
547
729
  };
548
730
  private _swiper;
731
+ /** The base (Base-breakpoint) values of the traits Swiper reads per width. Read from the live
732
+ * inputs rather than the node, so the builder's direct-assignment edits are picked up too. */
733
+ private collectSwiperInputs;
549
734
  private instanceRegistry;
550
735
  constructor(platformId: object);
551
736
  ngOnInit(): void;
@@ -553,7 +738,7 @@ declare class ClientSliderContainerComponent implements OnInit, AfterViewInit, O
553
738
  ngOnDestroy(): void;
554
739
  private _initSwiper;
555
740
  static ɵfac: i0.ɵɵFactoryDeclaration<ClientSliderContainerComponent, never>;
556
- static ɵcmp: i0.ɵɵComponentDeclaration<ClientSliderContainerComponent, "iox-slider-container", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "loop": { "alias": "loop"; "required": false; }; "slidesPerView": { "alias": "slidesPerView"; "required": false; }; "spaceBetween": { "alias": "spaceBetween"; "required": false; }; "speed": { "alias": "speed"; "required": false; }; "effect": { "alias": "effect"; "required": false; }; "grabCursor": { "alias": "grabCursor"; "required": false; }; "centeredSlides": { "alias": "centeredSlides"; "required": false; }; "initialSlide": { "alias": "initialSlide"; "required": false; }; "enableNavigation": { "alias": "enableNavigation"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "enableScrollbar": { "alias": "enableScrollbar"; "required": false; }; "enableAutoplay": { "alias": "enableAutoplay"; "required": false; }; "enableKeyboard": { "alias": "enableKeyboard"; "required": false; }; "enableMousewheel": { "alias": "enableMousewheel"; "required": false; }; "enableZoom": { "alias": "enableZoom"; "required": false; }; "enableGrid": { "alias": "enableGrid"; "required": false; }; "enableParallax": { "alias": "enableParallax"; "required": false; }; "autoplayDelay": { "alias": "autoplayDelay"; "required": false; }; "autoplayPauseOnMouseEnter": { "alias": "autoplayPauseOnMouseEnter"; "required": false; }; "autoplayDisableOnInteraction": { "alias": "autoplayDisableOnInteraction"; "required": false; }; "paginationType": { "alias": "paginationType"; "required": false; }; "paginationClickable": { "alias": "paginationClickable"; "required": false; }; "gridRows": { "alias": "gridRows"; "required": false; }; "breakpoints": { "alias": "breakpoints"; "required": false; }; }, {}, never, never, false, never>;
741
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClientSliderContainerComponent, "iox-slider-container", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "loop": { "alias": "loop"; "required": false; }; "slidesPerView": { "alias": "slidesPerView"; "required": false; }; "slidesPerGroup": { "alias": "slidesPerGroup"; "required": false; }; "spaceBetween": { "alias": "spaceBetween"; "required": false; }; "speed": { "alias": "speed"; "required": false; }; "effect": { "alias": "effect"; "required": false; }; "grabCursor": { "alias": "grabCursor"; "required": false; }; "centeredSlides": { "alias": "centeredSlides"; "required": false; }; "initialSlide": { "alias": "initialSlide"; "required": false; }; "enableNavigation": { "alias": "enableNavigation"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "enableScrollbar": { "alias": "enableScrollbar"; "required": false; }; "enableAutoplay": { "alias": "enableAutoplay"; "required": false; }; "enableKeyboard": { "alias": "enableKeyboard"; "required": false; }; "enableMousewheel": { "alias": "enableMousewheel"; "required": false; }; "enableZoom": { "alias": "enableZoom"; "required": false; }; "enableGrid": { "alias": "enableGrid"; "required": false; }; "enableParallax": { "alias": "enableParallax"; "required": false; }; "autoplayDelay": { "alias": "autoplayDelay"; "required": false; }; "autoplayPauseOnMouseEnter": { "alias": "autoplayPauseOnMouseEnter"; "required": false; }; "autoplayDisableOnInteraction": { "alias": "autoplayDisableOnInteraction"; "required": false; }; "paginationType": { "alias": "paginationType"; "required": false; }; "paginationClickable": { "alias": "paginationClickable"; "required": false; }; "gridRows": { "alias": "gridRows"; "required": false; }; "breakpoints": { "alias": "breakpoints"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; }, {}, never, never, false, never>;
557
742
  }
558
743
 
559
744
  /**
@@ -624,7 +809,15 @@ interface GalleryBoundSource {
624
809
  * @param bound bound-mode records + image field. When present, takes precedence over `images`.
625
810
  * @param ctx render context for per-item bindings (item/route data). Defaults to `{}`.
626
811
  */
627
- declare function resolveGalleryUrls(images: GalleryImage[] | undefined, bound: GalleryBoundSource | null | undefined, ctx?: Record<string, any>): string[];
812
+ declare function resolveGalleryUrls(images: readonly (GalleryImage | string)[] | undefined, bound: GalleryBoundSource | null | undefined, ctx?: Record<string, any>): string[];
813
+ /**
814
+ * A plain string is a valid entry — a pasted URL list, an older saved node, or a bound field that
815
+ * yielded a URL directly. Accepting it HERE (not in one consumer) is what keeps the two render paths
816
+ * honest: `ClientGalleryComponent` used to normalise privately, so the engine's string-renderer
817
+ * fallback — which calls this function directly — silently dropped every string-shaped image and
818
+ * rendered an empty gallery. One resolver, one answer. See gallery-component-plan.md.
819
+ */
820
+ declare function normalizeGalleryImage(image: GalleryImage | string | null | undefined): GalleryImage | undefined;
628
821
  /**
629
822
  * Parse a pasted block of URLs (newline- and/or comma-separated) into `GalleryImage[]`. Used by the
630
823
  * MediaList trait editor's "paste URL list" affordance. Pure so it can be unit-tested + reused.
@@ -678,7 +871,6 @@ declare class ClientGalleryComponent implements AfterViewInit, OnDestroy {
678
871
  * image is the visible static frame; once running, the effect owns each slide's look. */
679
872
  slideStyle(i: number): Record<string, string>;
680
873
  private startLoop;
681
- private normalizeImages;
682
874
  static ɵfac: i0.ɵɵFactoryDeclaration<ClientGalleryComponent, never>;
683
875
  static ɵcmp: i0.ɵɵComponentDeclaration<ClientGalleryComponent, "iox-gallery", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "effect": { "alias": "effect"; "required": false; }; "autoStart": { "alias": "autoStart"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "images": { "alias": "images"; "required": false; }; "showDuration": { "alias": "showDuration"; "required": false; }; "fadeDuration": { "alias": "fadeDuration"; "required": false; }; }, {}, never, never, false, never>;
684
876
  }
@@ -868,148 +1060,30 @@ declare function nearestCommonAncestorId(root: readonly StyleTreeNode[], styledC
868
1060
  */
869
1061
  declare function buildTargetedStateSelector(scopeCssId: string, triggerCssId: string, styledCssId: string, base: string): string;
870
1062
 
871
- /** The five fixed breakpoints (plan decision D2). Desktop-first: each narrower one
872
- * overrides the wider ones through `max-width`. */
873
- declare enum Breakpoint {
874
- Base = "base",
875
- Laptop = "laptop",
876
- Tablet = "tablet",
877
- Mobile = "mobile",
878
- Small = "small"
879
- }
880
- /** Every breakpoint that can hold overrides. Base styles live in `styleProps`. */
881
- type OverrideBreakpoint = Exclude<Breakpoint, Breakpoint.Base>;
882
- interface BreakpointDef {
883
- readonly id: Breakpoint;
884
- readonly label: string;
885
- /** Inclusive upper bound in CSS px (`max-width`). `null` for Base, which has no query. */
886
- readonly maxWidth: number | null;
887
- /** Width the builder canvas simulates while this breakpoint is being edited. Always
888
- * inside the breakpoint's own range (above the next one's `maxWidth`). */
889
- readonly previewWidth: number;
890
- }
1063
+ /** Trait names whose value Swiper reads per breakpoint. Anything else is config-wide. */
1064
+ declare const SWIPER_RESPONSIVE_TRAITS: readonly string[];
1065
+ /** `{ [minWidth]: { slidesPerView, … } }` — Swiper's own `breakpoints` shape. */
1066
+ type SwiperBreakpointMap = Record<number, InputMap>;
891
1067
  /**
892
- * Widest → narrowest. This order IS the cascade order and the `@media` emission order.
1068
+ * Build Swiper's mobile-first `breakpoints` map from IOX's desktop-first layers.
893
1069
  *
894
- * ⚠️ Phones in portrait (360–430px) land in `Small`, NOT `Mobile` — `Mobile` is 480–767,
895
- * a phone held landscape. The labels say so (as Webflow's do). The ids stay short because
896
- * they are storage keys; the cascade still makes a `Mobile` override reach every phone.
897
- */
898
- declare const BREAKPOINTS: readonly BreakpointDef[];
899
- /** The definition for `bp`, or `undefined` for an unknown id (e.g. hand-edited JSON). */
900
- declare function breakpointDef(bp: Breakpoint | string): BreakpointDef | undefined;
901
- /** Base → `bp`, inclusive — the layers whose values apply at `bp`. Unknown → `[Base]`. */
902
- declare function cascadeChain(bp: Breakpoint | string): Breakpoint[];
903
- /**
904
- * The breakpoint a viewport (or canvas) of `width` CSS px falls in — the narrowest one whose
905
- * `maxWidth` it fits under, else Base. Mirrors how the `max-width` media queries resolve, so the
906
- * builder's editing scope is always the breakpoint the canvas is actually showing.
907
- */
908
- declare function breakpointForWidth(width: number): Breakpoint;
909
- /** The next-wider breakpoint (what `bp` inherits from), or `null` for Base / unknown. */
910
- declare function parentBreakpoint(bp: Breakpoint | string): Breakpoint | null;
911
- /**
912
- * What a breakpoint's width is measured against.
1070
+ * Each IOX breakpoint covers `[nextNarrower.maxWidth + 1 … this.maxWidth]`, so the Swiper key for a
1071
+ * layer is **one px above the next-narrower breakpoint's max-width** — the low edge of the band the
1072
+ * layer governs. Base becomes the key above the widest bounded breakpoint.
913
1073
  *
914
- * `Media` — the browser viewport. The SSR engine: a visitor's window IS the page.
915
- * `Container` — a named CSS size container. The builder: its canvas is a fixed-width frame inside a
916
- * desktop browser (and `transform: scale`d for zoom), so a media query would read the EDITOR's width.
917
- * A container query reads the frame's own layout width — which equals the simulated viewport and
918
- * ignores the zoom transform — so the builder emits the same structure as the engine.
919
- */
920
- declare enum BreakpointQueryKind {
921
- Media = "media",
922
- Container = "container"
923
- }
924
- /**
925
- * The at-rule prelude for `bp` — `@media (max-width: 767px)`, or with `Container`
926
- * `@container iox-canvas (max-width: 767px)`. `null` for Base or an unknown id.
927
- * `containerName` is required for `Container` (an unnamed container query would match
928
- * whichever ancestor container is nearest, which is not guaranteed to be the canvas).
929
- */
930
- declare function breakpointQueryFor(bp: Breakpoint | string, kind?: BreakpointQueryKind, containerName?: string): string | null;
931
- /** Wrap already-compiled rules for `bp`. Base (and blank css) passes through unwrapped. */
932
- declare function wrapInBreakpointQuery(bp: Breakpoint | string, css: string, kind?: BreakpointQueryKind, containerName?: string): string;
933
- /** `@media (max-width: 767px)` for `bp`; `null` for Base or an unknown id. */
934
- declare function mediaQueryFor(bp: Breakpoint | string): string | null;
935
- /** Wrap already-compiled rules for `bp` in its media query. Base (and blank css) passes through. */
936
- declare function wrapInMediaQuery(bp: Breakpoint | string, css: string): string;
937
- type StyleMap = Record<string, any>;
938
- type StateStyleMap = Record<string, StyleMap>;
939
- /** What one breakpoint overrides. Both maps are SPARSE — only keys that differ. */
940
- interface ResponsiveLayer {
941
- styleProps?: StyleMap;
942
- stateStyles?: StateStyleMap;
943
- }
944
- type ResponsiveOverrides = Partial<Record<OverrideBreakpoint, ResponsiveLayer>>;
945
- /** The full effective style map at `bp`: base, then each layer down the cascade. */
946
- declare function resolveStyleProps(styleProps: StyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): StyleMap;
947
- /** The effective per-state maps at `bp`. States with no values anywhere are omitted. */
948
- declare function resolveStateStyles(stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): StateStyleMap;
949
- /**
950
- * Every state that has a value anywhere — at base or at any breakpoint — in a stable order
951
- * (base states first, then any that exist only at a breakpoint). A renderer iterates this, not
952
- * `Object.keys(stateStyles)`, so a state defined ONLY at a breakpoint (a Mobile-only hover) still
953
- * gets its selector scope resolved.
954
- */
955
- declare function stateNamesIn(stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined): string[];
956
- /** One level of the cascade that sets a value. */
957
- interface ValueSource {
958
- breakpoint: Breakpoint;
959
- value: any;
960
- }
961
- /**
962
- * Every level from Base down to `bp` that sets `prop` (optionally within `state`), in
963
- * cascade order. The LAST entry is the effective value; an empty array means unset.
964
- * Drives the style panel's source chain ("Base 34 → Tablet 28 → Mobile 22").
965
- */
966
- declare function resolveValueChain(prop: string, styleProps: StyleMap | null | undefined, stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, state?: string): ValueSource[];
967
- /** True when `bp` itself sets `prop` (the style panel's orange edge). Never true for Base. */
968
- declare function isOverriddenAt(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop: string, state?: string): boolean;
969
- /** Number of overridden values — at `bp`, or across every breakpoint when omitted. */
970
- declare function countOverrides(responsive: ResponsiveOverrides | null | undefined, bp?: Breakpoint | string): number;
971
- /** Returns a new overrides object with `prop` set at `bp` (optionally within `state`). */
972
- declare function setOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop: string, value: any, state?: string): ResponsiveOverrides;
973
- /**
974
- * Remove overrides at `bp` and PRUNE whatever becomes empty, so "reset" and "never
975
- * overridden" are the same state on disk — no tombstones, no nulls.
1074
+ * Values are the RESOLVED ones at each width (base + every wider layer), never the raw sparse layer:
1075
+ * Swiper does not cascade between its own breakpoints the way CSS does — the largest matching key
1076
+ * wins outright and is not merged with smaller ones — so each entry must be self-sufficient.
976
1077
  *
977
- * clearOverride(r, bp) — the whole breakpoint
978
- * clearOverride(r, bp, undefined, st) — one state at that breakpoint
979
- * clearOverride(r, bp, prop) — one base-state value
980
- * clearOverride(r, bp, prop, st) — one value within a state
981
- *
982
- * Returns `undefined` when nothing is left, so a serialiser omits the key entirely.
1078
+ * Only `SWIPER_RESPONSIVE_TRAITS` are emitted, and a band is omitted when it matches the band below
1079
+ * it, keeping the config as small as the author's actual overrides.
983
1080
  */
984
- declare function clearOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop?: string, state?: string): ResponsiveOverrides | undefined;
1081
+ declare function buildSwiperBreakpoints(inputs: InputMap | null | undefined, responsive: ResponsiveOverrides | null | undefined): SwiperBreakpointMap;
985
1082
  /**
986
- * Everything one breakpoint must emit, already composed. Wrap in `mediaQuery` (engine)
987
- * or apply directly (builder, flattened).
988
- *
989
- * ⚠️ Compile these maps with `compileDeclarations(map, …, DeclarationContext.Override)`. The
990
- * default Base context drops CSS initial values as no-ops — but here `width: auto` or
991
- * `transform: none` is how a breakpoint UNDOES the wider value, and dropping it silently keeps
992
- * the desktop style.
1083
+ * The full `breakpoints` value to hand Swiper: the derived map, with any hand-written advanced JSON
1084
+ * merged OVER it so an author's explicit escape hatch always wins.
993
1085
  */
994
- interface ResponsiveRuleSet {
995
- breakpoint: OverrideBreakpoint;
996
- mediaQuery: string;
997
- /** Sparse declarations for the node itself at this width (virtual traits composed). */
998
- styleProps: StyleMap;
999
- /** Sparse declarations per state at this width (virtual traits composed). */
1000
- stateStyles: StateStyleMap;
1001
- }
1002
- /**
1003
- * The per-breakpoint rule sets a node needs, widest → narrowest (the order they must be
1004
- * emitted in, AFTER every base rule — equal specificity means source order decides).
1005
- * Breakpoints with nothing to emit are omitted.
1006
- *
1007
- * Handles the cross-axis case: a breakpoint that changes a virtual group (say
1008
- * `translateX`) also re-emits that group for every state the node has, because the wider
1009
- * state rule was composed against the wider value and would otherwise snap back to it on
1010
- * hover.
1011
- */
1012
- declare function planResponsiveRules(styleProps: StyleMap | null | undefined, stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined): ResponsiveRuleSet[];
1086
+ declare function mergeSwiperBreakpoints(derived: SwiperBreakpointMap, advancedJson: string | null | undefined): SwiperBreakpointMap | undefined;
1013
1087
 
1014
1088
  /**
1015
1089
  * Shared data-source resolving pattern — the SINGLE source of truth for how an IoxDataSource
@@ -1928,5 +2002,5 @@ declare class GalleryLoop {
1928
2002
  private emit;
1929
2003
  }
1930
2004
 
1931
- export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, ENVIRONMENT, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildRelatedFilter, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isActionEnabled, isContextAction, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, parentBreakpoint, parseUrlList, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setOverride, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
1932
- export type { BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, IoxContextSlot, IoxPipe, OverrideBreakpoint, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
2005
+ export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, ENVIRONMENT, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, parentBreakpoint, parseUrlList, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
2006
+ export type { BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, IoxContextSlot, IoxPipe, OverrideBreakpoint, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "4.24.0",
3
+ "version": "4.26.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",