@vectoriox/iox-ui 4.22.0 → 4.23.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "4.22.0",
3
+ "version": "4.23.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -779,6 +779,25 @@ declare const DEFAULT_WIDTH_BY_TYPE: Readonly<Record<string, string>>;
779
779
  */
780
780
  declare function renderDefaultDeclarations(type: string, styleProps: Record<string, any>, hasHoverState: boolean): string[];
781
781
 
782
+ /**
783
+ * One composed output property and the virtual traits it is built from.
784
+ *
785
+ * Consumers that emit a PARTIAL override (a breakpoint layer — see `responsive.ts`) need
786
+ * to know which outputs an override actually touches, and what to emit when a touched
787
+ * group composes to nothing (e.g. translateX reset to 0px while the base had 20px: the
788
+ * override must say `transform: none`, or the wider rule's transform silently wins).
789
+ */
790
+ interface VirtualTraitGroup {
791
+ /** The composed key `composeVirtualTraits` writes (camelCase, or `__markerStyles`). */
792
+ readonly output: string;
793
+ /** The virtual trait keys that feed it. */
794
+ readonly keys: readonly string[];
795
+ /** Value that cancels a wider rule's output, or `null` when there is no such value
796
+ * (`::marker` styles are a nested map, not a single cancellable property). */
797
+ readonly reset: string | null;
798
+ }
799
+ declare const VIRTUAL_TRAIT_GROUPS: readonly VirtualTraitGroup[];
800
+ /** Every virtual trait key — derived from the groups so there is one list to maintain. */
782
801
  declare const VIRTUAL_TRAIT_KEYS: Set<string>;
783
802
  /**
784
803
  * Strip virtual trait keys from `raw` and emit their composed CSS equivalents.
@@ -834,6 +853,107 @@ declare function nearestCommonAncestorId(root: readonly StyleTreeNode[], styledC
834
853
  */
835
854
  declare function buildTargetedStateSelector(scopeCssId: string, triggerCssId: string, styledCssId: string, base: string): string;
836
855
 
856
+ /** The five fixed breakpoints (plan decision D2). Desktop-first: each narrower one
857
+ * overrides the wider ones through `max-width`. */
858
+ declare enum Breakpoint {
859
+ Base = "base",
860
+ Laptop = "laptop",
861
+ Tablet = "tablet",
862
+ Mobile = "mobile",
863
+ Small = "small"
864
+ }
865
+ /** Every breakpoint that can hold overrides. Base styles live in `styleProps`. */
866
+ type OverrideBreakpoint = Exclude<Breakpoint, Breakpoint.Base>;
867
+ interface BreakpointDef {
868
+ readonly id: Breakpoint;
869
+ readonly label: string;
870
+ /** Inclusive upper bound in CSS px (`max-width`). `null` for Base, which has no query. */
871
+ readonly maxWidth: number | null;
872
+ /** Width the builder canvas simulates while this breakpoint is being edited. Always
873
+ * inside the breakpoint's own range (above the next one's `maxWidth`). */
874
+ readonly previewWidth: number;
875
+ }
876
+ /**
877
+ * Widest → narrowest. This order IS the cascade order and the `@media` emission order.
878
+ *
879
+ * ⚠️ Phones in portrait (360–430px) land in `Small`, NOT `Mobile` — `Mobile` is 480–767,
880
+ * a phone held landscape. The labels say so (as Webflow's do). The ids stay short because
881
+ * they are storage keys; the cascade still makes a `Mobile` override reach every phone.
882
+ */
883
+ declare const BREAKPOINTS: readonly BreakpointDef[];
884
+ /** The definition for `bp`, or `undefined` for an unknown id (e.g. hand-edited JSON). */
885
+ declare function breakpointDef(bp: Breakpoint | string): BreakpointDef | undefined;
886
+ /** Base → `bp`, inclusive — the layers whose values apply at `bp`. Unknown → `[Base]`. */
887
+ declare function cascadeChain(bp: Breakpoint | string): Breakpoint[];
888
+ /** The next-wider breakpoint (what `bp` inherits from), or `null` for Base / unknown. */
889
+ declare function parentBreakpoint(bp: Breakpoint | string): Breakpoint | null;
890
+ /** `@media (max-width: 767px)` for `bp`; `null` for Base or an unknown id. */
891
+ declare function mediaQueryFor(bp: Breakpoint | string): string | null;
892
+ /** Wrap already-compiled rules for `bp`. Base (and blank css) passes through unwrapped. */
893
+ declare function wrapInMediaQuery(bp: Breakpoint | string, css: string): string;
894
+ type StyleMap = Record<string, any>;
895
+ type StateStyleMap = Record<string, StyleMap>;
896
+ /** What one breakpoint overrides. Both maps are SPARSE — only keys that differ. */
897
+ interface ResponsiveLayer {
898
+ styleProps?: StyleMap;
899
+ stateStyles?: StateStyleMap;
900
+ }
901
+ type ResponsiveOverrides = Partial<Record<OverrideBreakpoint, ResponsiveLayer>>;
902
+ /** The full effective style map at `bp`: base, then each layer down the cascade. */
903
+ declare function resolveStyleProps(styleProps: StyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): StyleMap;
904
+ /** The effective per-state maps at `bp`. States with no values anywhere are omitted. */
905
+ declare function resolveStateStyles(stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string): StateStyleMap;
906
+ /** One level of the cascade that sets a value. */
907
+ interface ValueSource {
908
+ breakpoint: Breakpoint;
909
+ value: any;
910
+ }
911
+ /**
912
+ * Every level from Base down to `bp` that sets `prop` (optionally within `state`), in
913
+ * cascade order. The LAST entry is the effective value; an empty array means unset.
914
+ * Drives the style panel's source chain ("Base 34 → Tablet 28 → Mobile 22").
915
+ */
916
+ declare function resolveValueChain(prop: string, styleProps: StyleMap | null | undefined, stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, state?: string): ValueSource[];
917
+ /** True when `bp` itself sets `prop` (the style panel's orange edge). Never true for Base. */
918
+ declare function isOverriddenAt(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop: string, state?: string): boolean;
919
+ /** Number of overridden values — at `bp`, or across every breakpoint when omitted. */
920
+ declare function countOverrides(responsive: ResponsiveOverrides | null | undefined, bp?: Breakpoint | string): number;
921
+ /** Returns a new overrides object with `prop` set at `bp` (optionally within `state`). */
922
+ declare function setOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop: string, value: any, state?: string): ResponsiveOverrides;
923
+ /**
924
+ * Remove overrides at `bp` and PRUNE whatever becomes empty, so "reset" and "never
925
+ * overridden" are the same state on disk — no tombstones, no nulls.
926
+ *
927
+ * clearOverride(r, bp) — the whole breakpoint
928
+ * clearOverride(r, bp, undefined, st) — one state at that breakpoint
929
+ * clearOverride(r, bp, prop) — one base-state value
930
+ * clearOverride(r, bp, prop, st) — one value within a state
931
+ *
932
+ * Returns `undefined` when nothing is left, so a serialiser omits the key entirely.
933
+ */
934
+ declare function clearOverride(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint | string, prop?: string, state?: string): ResponsiveOverrides | undefined;
935
+ /** Everything one breakpoint must emit, already composed. Wrap in `mediaQuery` (engine)
936
+ * or apply directly (builder, flattened). */
937
+ interface ResponsiveRuleSet {
938
+ breakpoint: OverrideBreakpoint;
939
+ mediaQuery: string;
940
+ /** Sparse declarations for the node itself at this width (virtual traits composed). */
941
+ styleProps: StyleMap;
942
+ /** Sparse declarations per state at this width (virtual traits composed). */
943
+ stateStyles: StateStyleMap;
944
+ }
945
+ /**
946
+ * The per-breakpoint rule sets a node needs, widest → narrowest (the order they must be
947
+ * emitted in, AFTER every base rule — equal specificity means source order decides).
948
+ * Breakpoints with nothing to emit are omitted.
949
+ *
950
+ * Handles the cross-axis case: a breakpoint that changes a virtual group (say
951
+ * `translateX`) also re-emits that group for every state the node has, because the wider
952
+ * state rule was composed against the wider value and would otherwise snap back to it on
953
+ * hover.
954
+ */
955
+ declare function planResponsiveRules(styleProps: StyleMap | null | undefined, stateStyles: StateStyleMap | null | undefined, responsive: ResponsiveOverrides | null | undefined): ResponsiveRuleSet[];
956
+
837
957
  /**
838
958
  * Shared data-source resolving pattern — the SINGLE source of truth for how an IoxDataSource
839
959
  * becomes a backend fetch, consumed by BOTH the page builder (iox-cms-client bindings panel) and
@@ -1751,5 +1871,5 @@ declare class GalleryLoop {
1751
1871
  private emit;
1752
1872
  }
1753
1873
 
1754
- export { AOSService, AnalyticsService, 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, 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_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, buildDataSourceFilter, buildRelatedFilter, buildTargetedStateSelector, buildTransitionTimeline, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, dataSourcePlanToRequest, declaredInputNames, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isActionEnabled, isContextAction, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, parseUrlList, planDataSource, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, rewriteViewportUnits, safeSetInput, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots };
1755
- export type { 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, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, RouteContext, SetContextParams, SiblingsResult, StyleTreeNode, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput };
1874
+ export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, 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, 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, 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, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInMediaQuery };
1875
+ 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 };