@vectoriox/iox-ui 5.81.0 → 5.82.1

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
@@ -1774,10 +1774,25 @@ declare enum ComponentState {
1774
1774
  * — a TARGETED state: its trigger is the item (`stateTriggers['trigger-on']`), compiled through
1775
1775
  * `targetedStateSelector`. On a node OUTSIDE every item (composite T20, CC4a) the author PICKS the item — "when tab
1776
1776
  * Night is on" — the same state and the same `:has()` scoped to the nearest common ancestor. */
1777
- ItemOpen = "trigger-on"
1778
- }
1779
- /** The attribute selector each (non-targeted) component state compiles to. */
1777
+ ItemOpen = "trigger-on",
1778
+ /** G4: a control that cannot be used — a disabled button, or one marked aria-disabled. */
1779
+ Disabled = "disabled",
1780
+ /** G4: busy — a submit button while its form sends (`syncSubmitButtons`), a form while it sends. */
1781
+ Busy = "busy",
1782
+ /** G4: chosen — a toggle button pressed, an option checked or selected. */
1783
+ Selected = "selected",
1784
+ /** G4: the page has scrolled (a header that firms up once the page moves) — `SCROLLED_ATTRIBUTE` on the root. */
1785
+ Scrolled = "scrolled"
1786
+ }
1787
+ /** The page has scrolled: written on the document element by the live site (and on the canvas page by the builder). */
1788
+ declare const SCROLLED_ATTRIBUTE = "data-iox-scrolled";
1789
+ /** The selector each (non-targeted) component state compiles to — an attribute, or an `:is()` of the ways a node can
1790
+ * be in it (a native `:disabled` or `aria-disabled`; pressed / checked / selected), so one rule covers every markup. */
1780
1791
  declare const COMPONENT_STATE_SELECTOR: Readonly<Record<string, string>>;
1792
+ /** Scrolled is offered on the site header and its parts — generation-core's NavRole family (`nav`, `nav.brand`…), the
1793
+ * drawer's parts aside (the drawer is a dialog over the page). Spelled here — the main entry does not import
1794
+ * generation-core; style-compiler.spec pins it to the enum. */
1795
+ declare const SCROLLED_STATE_ROLE = "nav";
1781
1796
  /** The composite roles that are themselves "on" when their item is open (they carry `data-iox-on`): an accordion's
1782
1797
  * item, header and panel; a disclosure (its own item), its toggle and its panel (CC2.1); a tab and its panel (CC4a —
1783
1798
  * "Active"). The main entry does not import composite-core, so the roles are spelled here — `style-compiler.spec` pins
@@ -1813,19 +1828,35 @@ declare function hasHoverState(stateStyles: Record<string, Record<string, any> |
1813
1828
  * The base-rule transition a hovering node gets when it declares none of its own, so a hover
1814
1829
  * animates instead of snapping. ONE copy for the builder canvas, the style panel and the engine.
1815
1830
  *
1816
- * Two values, chosen by the element-style MARKER (§3b-bis): a node wearing an element style takes
1831
+ * Two timings, chosen by the element-style MARKER (§3b-bis): a node wearing an element style takes
1817
1832
  * the motion tokens; a node without one (saved before DS2, not adopted) keeps the pre-DS2 literal
1818
- * byte-for-byte — seeding an org's tokens must never change how a legacy page hovers.
1819
- */
1820
- declare const HOVER_DEFAULT_TRANSITION = "all var(--iox-dur-fast) var(--iox-ease-standard)";
1821
- declare const LEGACY_HOVER_TRANSITION = "all 0.2s ease";
1822
- /** The default hover transition for a node that wears `elementStyle` (or none). */
1823
- declare function defaultHoverTransition(elementStyle?: string | null): string;
1824
- /** True when the RAW style map already yields a transition (an explicit one, or the composed
1825
- * transitionDuration/TimingFunction an element style writes). */
1833
+ * timing — seeding an org's tokens must never change how a legacy page hovers. WHAT transitions is the
1834
+ * list of properties the node's states change (G2 — never `transition: all`).
1835
+ */
1836
+ declare const HOVER_DEFAULT_TRANSITION_TRAITS: Readonly<Record<string, string>>;
1837
+ declare const LEGACY_HOVER_TRANSITION_TRAITS: Readonly<Record<string, string>>;
1838
+ /** The default hover timing for a node that wears `elementStyle` (or none). */
1839
+ declare function defaultHoverTransitionTraits(elementStyle?: string | null): Readonly<Record<string, string>>;
1840
+ /** True when the RAW style map times a transition of its own (an explicit `transition`, or the
1841
+ * transitionDuration / TimingFunction an element style writes). */
1826
1842
  declare function hasOwnTransition(styleProps: Record<string, any> | null | undefined): boolean;
1827
- /** `styleProps` plus the default hover transition when the node hovers and sets none itself. */
1828
- declare function withDefaultHoverTransition(styleProps: Record<string, any>, stateStyles: Record<string, Record<string, any> | undefined> | null | undefined, elementStyle?: string | null): Record<string, any>;
1843
+ type StateMaps = Record<string, Record<string, any> | undefined> | null | undefined;
1844
+ /**
1845
+ * The CSS properties a node's states change — what its transition names (G2, Emil 183: never `transition: all`).
1846
+ * Every state the node holds, at every breakpoint, composed as the renderers compose it (translateX / scaleX → one
1847
+ * `transform`, a gradient background → `background-image`…), in a stable order so both renderers emit one string.
1848
+ */
1849
+ declare function stateTransitionProperties(stateStyles: StateMaps, responsive?: Record<string, {
1850
+ stateStyles?: StateMaps;
1851
+ } | undefined> | null, type?: string | null): string[];
1852
+ /**
1853
+ * `styleProps` as a renderer compiles them: a hovering node with no timing of its own takes the default hover timing,
1854
+ * and a node whose transition names no properties gets the ones its states change. An author's own `transitionProperty`
1855
+ * (or a raw `transition`) always wins. Pure: the node's stored styles are never touched.
1856
+ */
1857
+ declare function withStateTransitions(styleProps: Record<string, any>, stateStyles: StateMaps, elementStyle?: string | null, responsive?: Record<string, {
1858
+ stateStyles?: StateMaps;
1859
+ } | undefined> | null, type?: string | null): Record<string, any>;
1829
1860
  /**
1830
1861
  * Per-type default `width` that the builder applies from each component's config
1831
1862
  * (NOT persisted in styleProps — see render-parity.md "saved node is not
@@ -1843,12 +1874,13 @@ declare const DEFAULT_WIDTH_BY_TYPE: Readonly<Record<string, string>>;
1843
1874
  * behaviour, which the engine must re-apply explicitly for parity. Returns `"prop: value"`
1844
1875
  * declarations to append AFTER the node's own compiled declarations.
1845
1876
  *
1877
+ * The default hover transition is no longer one of them: it is composed into the node's own rule by
1878
+ * `withStateTransitions` (both renderers), listing the properties its states change (G2).
1879
+ *
1846
1880
  * @param type Node type (registry key).
1847
1881
  * @param styleProps The node's persisted styleProps.
1848
- * @param hasHoverState Whether the node has a non-empty hover / parent-hover state.
1849
- * @param elementStyle The element style the node wears — picks the default hover transition.
1850
1882
  */
1851
- declare function renderDefaultDeclarations(type: string, styleProps: Record<string, any>, hasHoverState: boolean, elementStyle?: string | null): string[];
1883
+ declare function renderDefaultDeclarations(type: string, styleProps: Record<string, any>): string[];
1852
1884
 
1853
1885
  /**
1854
1886
  * One composed output property and the virtual traits it is built from.
@@ -1867,6 +1899,12 @@ interface VirtualTraitGroup {
1867
1899
  * (`::marker` styles are a nested map, not a single cancellable property). */
1868
1900
  readonly reset: string | null;
1869
1901
  }
1902
+ /** The Transition ▸ Properties trait (G2): what a transition names, comma-separated. Unset, the renderers fill in the
1903
+ * properties the node's states change (`withStateTransitions`); a transition never names `all` unless an author
1904
+ * typed it. */
1905
+ declare const TRANSITION_PROPERTY_KEY = "transitionProperty";
1906
+ /** The property list a `transitionProperty` value names (`color, transform` → two entries). */
1907
+ declare function transitionPropertyList(value: unknown): string[];
1870
1908
  /** "Max lines" (Card v2, board 8 — opt-in on a Title / Text): a whole number clamps the text to that many
1871
1909
  * lines with an ellipsis. It composes into the four declarations a line clamp takes; anything else
1872
1910
  * (`none`, empty, 0) clamps nothing. */
@@ -2090,6 +2128,16 @@ declare function splitOuterProps(styles: Record<string, any>): {
2090
2128
  inner: Record<string, any>;
2091
2129
  outer: Record<string, any>;
2092
2130
  };
2131
+ /**
2132
+ * The devices a hover rule is for (G1 — Emil 91, mobile-native M1): a phone has no hover, and a tap fires a false
2133
+ * one that STICKS until the next tap elsewhere. Every hover, parent-hover and trigger-hover rule — the node's own and
2134
+ * a part's — is emitted inside this query by both renderers; `:active` (a real press on touch) never is.
2135
+ */
2136
+ declare const HOVER_MEDIA_QUERY = "(hover: hover) and (pointer: fine)";
2137
+ /** True for a state driven by a pointer hovering something (its own, its parent's, a chosen trigger's). */
2138
+ declare function isHoverState(state: string | null | undefined): boolean;
2139
+ /** `css` as it is emitted for `state`: inside `HOVER_MEDIA_QUERY` for a hover state, unchanged otherwise. */
2140
+ declare function gateHoverRule(state: string | null | undefined, css: string): string;
2093
2141
 
2094
2142
  /** Trait names whose value Swiper reads per breakpoint. Anything else is config-wide. */
2095
2143
  declare const SWIPER_RESPONSIVE_TRAITS: readonly string[];
@@ -2406,6 +2454,105 @@ declare const ENTRANCE_NOSCRIPT_CSS = "[data-iox-enter]{opacity:1!important;tran
2406
2454
  */
2407
2455
  declare function finalKeyframe(frames: ReadonlyArray<InteractionKeyframe> | null | undefined): InteractionKeyframe | null;
2408
2456
 
2457
+ /**
2458
+ * What an interaction's easing may be (G6, decision D8): one of the five CSS keywords, a `cubic-bezier()`, or the
2459
+ * NAME of one of the look's easing tokens — so an author's entrance moves on the same curve as the site's buttons and
2460
+ * dialogs (Emil 21: one token system), and Spring plays the look's spring (a `linear()` curve, `springToLinear`).
2461
+ * Both runtimes resolve it the same way, through the CSS custom property on the element itself.
2462
+ */
2463
+ declare enum EasingKeyword {
2464
+ Linear = "linear",
2465
+ Ease = "ease",
2466
+ EaseIn = "ease-in",
2467
+ EaseOut = "ease-out",
2468
+ EaseInOut = "ease-in-out"
2469
+ }
2470
+ /** The look's easing tokens an interaction may name (their `--iox-<name>` holds the curve). */
2471
+ declare enum EasingToken {
2472
+ Standard = "ease-standard",
2473
+ Enter = "ease-enter",
2474
+ Exit = "ease-exit",
2475
+ Spring = "ease-spring"
2476
+ }
2477
+ declare const EASING_KEYWORDS: ReadonlyArray<string>;
2478
+ declare const EASING_TOKENS: ReadonlyArray<string>;
2479
+ /** What an unknown or unresolvable easing plays as: a deceleration, never ease-in (Emil 17). */
2480
+ declare const DEFAULT_INTERACTION_EASING = EasingKeyword.EaseOut;
2481
+ /** A well-formed `cubic-bezier(x1, y1, x2, y2)` whose x values sit in [0, 1] (what CSS and WAAPI accept). */
2482
+ declare function isCubicBezier(value: unknown): boolean;
2483
+ declare function isEasingToken(value: unknown): value is EasingToken;
2484
+ /** True for anything an interaction may store as its easing. */
2485
+ declare function isInteractionEasing(value: unknown): boolean;
2486
+ /** Anything that reads a computed custom property (an element in a document; a stub in a spec). */
2487
+ interface StyledElement {
2488
+ ownerDocument?: {
2489
+ defaultView?: {
2490
+ getComputedStyle(el: unknown): {
2491
+ getPropertyValue(name: string): string;
2492
+ };
2493
+ } | null;
2494
+ } | null;
2495
+ }
2496
+ /**
2497
+ * The timing function WAAPI plays for `easing` on `el`: a keyword or a curve as stored; a token name → the token's
2498
+ * value as the element sees it (`--iox-ease-spring` → its `linear()`), so a section scheme or the canvas's token scope
2499
+ * applies; anything else, or a token the element cannot resolve → `fallback`.
2500
+ */
2501
+ declare function resolveInteractionEasing(easing: unknown, el?: StyledElement | null, fallback?: string): string;
2502
+
2503
+ /**
2504
+ * When a pointer event should move something (G7 — Emil 85/86/91, mobile-native M1/M5). Both runtimes ask here.
2505
+ *
2506
+ * · A hover trigger answers a mouse or a pen only: a finger has no hover, and a tap's emulated mouseenter left the
2507
+ * hover state on until the next tap elsewhere.
2508
+ * · Press feedback lands on pointer-DOWN, at once — the click (pointer-up) commits. Only an action that is pure
2509
+ * feedback moves early: an animation of the pressed element itself that hides nothing and shows nothing. Opening,
2510
+ * closing, navigating and toggling stay on the click, so dragging away still cancels them. A keyboard press (Enter,
2511
+ * Space) has no pointer-down, so it never animates (Emil 2).
2512
+ */
2513
+ declare enum PointerKind {
2514
+ Mouse = "mouse",
2515
+ Pen = "pen",
2516
+ Touch = "touch"
2517
+ }
2518
+ /** True for a pointer that really hovers — a mouse or a pen, never a finger. An event with no pointer type (a synthetic
2519
+ * `mouseenter`) counts as a mouse. */
2520
+ declare function isHoverPointer(event: {
2521
+ pointerType?: string | null;
2522
+ } | null | undefined): boolean;
2523
+ /** The minimal action shape this reads. */
2524
+ interface PressAction {
2525
+ type: string;
2526
+ target?: string;
2527
+ disabled?: boolean;
2528
+ params?: Readonly<Record<string, unknown>> | null;
2529
+ }
2530
+ /** True for an action that is press FEEDBACK: it animates the pressed element itself and neither hides nor shows it. */
2531
+ declare function isPressFeedback(action: PressAction | null | undefined): boolean;
2532
+ /** A click interaction's actions split by when they run: the feedback on pointer-down, the rest on the click. */
2533
+ declare function splitPressFeedback<T extends PressAction>(actions: ReadonlyArray<T> | null | undefined): {
2534
+ onPress: T[];
2535
+ onClick: T[];
2536
+ };
2537
+
2538
+ /** How far the page has to move before it counts as scrolled — past a trackpad's rest jitter. */
2539
+ declare const SCROLLED_THRESHOLD_PX = 8;
2540
+ /** True once `offset` has passed the threshold. */
2541
+ declare function isScrolled(offset: number, threshold?: number): boolean;
2542
+ /** Anything that scrolls: a window (`scrollY`) or an element (`scrollTop`). */
2543
+ interface ScrollSource {
2544
+ addEventListener(type: 'scroll', fn: () => void, options?: AddEventListenerOptions): void;
2545
+ removeEventListener(type: 'scroll', fn: () => void): void;
2546
+ scrollY?: number;
2547
+ scrollTop?: number;
2548
+ }
2549
+ /**
2550
+ * Keep `SCROLLED_ATTRIBUTE` on `target` while `source` has scrolled past the threshold — what the Scrolled state (G4)
2551
+ * compiles against, on the live site (the window → the document element) and on the canvas (its scroller → the page).
2552
+ * One passive listener, read once per frame, written only when it changes. Returns the stop.
2553
+ */
2554
+ declare function watchScrolled(source: ScrollSource, target: Element, threshold?: number): () => void;
2555
+
2409
2556
  /**
2410
2557
  * page-style — the ONE compiler that turns a page's style settings into CSS.
2411
2558
  *
@@ -3413,5 +3560,5 @@ declare function attachStringForm(form: Element | null | undefined, options?: St
3413
3560
  */
3414
3561
  declare function syncSubmitButtons(form: Element | null | undefined, state: FormRenderState | string | null | undefined): void;
3415
3562
 
3416
- export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DeclarationContext, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION, HOVER_STATES, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION, LEGACY_SWIPER_CONTROLS, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, NO_PAGE_TRANSITION, ON_STATE_ROLES, OUTER_STYLE_PROPS, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PHONE_TRANSITION_QUERY, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, REDUCED_MOTION_QUERY, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollEasing, SectionComponent, SettleMode, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TRANSITION_FEELS, TextAlign, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, animateAction, applyBindingPipes, applyFeel, attachStringForm, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, domHasSliderParts, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, entranceStartsHidden, feelFor, finalKeyframe, framesFromLiveValue, getSeoValue, hasHoverState, hasOwnPageTransition, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCurrentLink, isExternalOrFragment, isGradientPaint, isInputOverriddenAt, isLastEmittedStateKey, isOverriddenAt, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseUrlList, partClassName, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playDualLayerTransition, playInteraction, prefersReducedMotion, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, sliderControlElements, sliderInputsFromProps, sliderInputsOf, splitOuterProps, stateNamesIn, statePseudoClass, stateSelectorSuffix, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, viewportTransitionContext, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
3417
- export type { A11yNodeSource, AnimateActionOptions, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteAnimationLike, ScrollPlanContext, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SettleOptions, SliderBootOptions, SliderControlElements, SliderInputs, StateRulePlan, StateScope, StateStyleMap, StringFormOptions, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToggleableAction, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
3563
+ export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_INTERACTION_EASING, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION_TRAITS, LEGACY_SWIPER_CONTROLS, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, NO_PAGE_TRANSITION, ON_STATE_ROLES, OUTER_STYLE_PROPS, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PHONE_TRANSITION_QUERY, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, PointerKind, REDUCED_MOTION_QUERY, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollEasing, SectionComponent, SettleMode, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, animateAction, applyBindingPipes, applyFeel, attachStringForm, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, domHasSliderParts, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, entranceStartsHidden, feelFor, finalKeyframe, framesFromLiveValue, gateHoverRule, getSeoValue, hasHoverState, hasOwnPageTransition, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOverriddenAt, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseUrlList, partClassName, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playDualLayerTransition, playInteraction, prefersReducedMotion, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, sliderControlElements, sliderInputsFromProps, sliderInputsOf, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, transitionPropertyList, viewportTransitionContext, watchScrolled, withContextSlots, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
3564
+ export type { A11yNodeSource, AnimateActionOptions, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, PressAction, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteAnimationLike, ScrollPlanContext, ScrollSource, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SettleOptions, SliderBootOptions, SliderControlElements, SliderInputs, StateRulePlan, StateScope, StateStyleMap, StringFormOptions, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToggleableAction, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.81.0",
3
+ "version": "5.82.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -22,10 +22,18 @@ export enum ElementStyleState {
22
22
  /** A composite part that is ON — the active tab (CC4a "Active"): compiles to `[data-iox-on]`, the attribute every
23
23
  * composite runtime writes. */
24
24
  On = 'on',
25
+ /** G4 — compile through the style compiler's COMPONENT_STATE_SELECTOR: `:disabled` / aria-disabled, aria-busy,
26
+ * pressed / checked / selected, the page scrolled. */
27
+ Disabled = 'disabled',
28
+ Busy = 'busy',
29
+ Selected = 'selected',
30
+ Scrolled = 'scrolled',
25
31
  }
26
32
 
27
- export const ELEMENT_STYLE_STATES: ReadonlyArray<ElementStyleState> =
28
- [ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus, ElementStyleState.Current, ElementStyleState.On];
33
+ export const ELEMENT_STYLE_STATES: ReadonlyArray<ElementStyleState> = [
34
+ ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus, ElementStyleState.Current, ElementStyleState.On,
35
+ ElementStyleState.Disabled, ElementStyleState.Busy, ElementStyleState.Selected, ElementStyleState.Scrolled,
36
+ ];
29
37
 
30
38
  export interface ElementStyle {
31
39
  readonly id: string;
@@ -38,6 +46,10 @@ export interface ElementStyle {
38
46
  readonly focus?: Readonly<Record<string, string>>;
39
47
  readonly current?: Readonly<Record<string, string>>;
40
48
  readonly on?: Readonly<Record<string, string>>;
49
+ readonly disabled?: Readonly<Record<string, string>>;
50
+ readonly busy?: Readonly<Record<string, string>>;
51
+ readonly selected?: Readonly<Record<string, string>>;
52
+ readonly scrolled?: Readonly<Record<string, string>>;
41
53
  }
42
54
 
43
55
  export const ELEMENT_STYLES: ReadonlyArray<ElementStyle> = SPEC_ELEMENT_STYLES;
@@ -21,13 +21,24 @@ export interface StaggerSpec {
21
21
  readonly cap?: number;
22
22
  }
23
23
 
24
- /** The delay of the `index`-th item: `stagger` ms each, the last `cap` waiting no longer than the one before. */
24
+ /** Each gap is this much of the one before (G8 — Emil 66: a uniform stagger is a metronome; the delays shrink). */
25
+ export const STAGGER_SHRINK = 0.75;
26
+ /** Only the first items stagger; the rest arrive with the sixth (Emil 67). */
27
+ export const STAGGER_MAX_ITEMS = 6;
28
+
29
+ /**
30
+ * The delay of the `index`-th item (G8): the first gap is `stagger` ms and every next one is `STAGGER_SHRINK` of the
31
+ * one before, so the group lands together instead of ticking; items from the `cap`-th on (never past the sixth) arrive
32
+ * with it. 80 ms → 0, 80, 140, 185, 219, 244. Static groups (their delays written at stamp time) and a Repeater's rows
33
+ * (`entranceDelay`) read the same curve.
34
+ */
25
35
  export function staggerDelay(spec: StaggerSpec, index = 0): number {
26
36
  const stagger = Number(spec.stagger ?? 0);
27
37
  if (!(stagger > 0)) return 0;
28
- const cap = Math.max(1, Math.floor(Number(spec.cap ?? 1)) || 1);
38
+ const cap = Math.min(STAGGER_MAX_ITEMS, Math.max(1, Math.floor(Number(spec.cap ?? 1)) || 1));
29
39
  const i = Number.isFinite(index) ? Math.max(0, Math.floor(index)) : 0;
30
- return Math.min(i, cap - 1) * stagger;
40
+ const steps = Math.min(i, cap - 1);
41
+ return Math.round(stagger * (1 - STAGGER_SHRINK ** steps) / (1 - STAGGER_SHRINK));
31
42
  }
32
43
 
33
44
  /** What an action carries, as both runtimes read it. */
@@ -1340,7 +1340,7 @@ export const SPEC_AXES = {
1340
1340
  "ease-spring": "cubic-bezier(0.2, 0, 0, 1)",
1341
1341
  "dur-spring": "140ms",
1342
1342
  "hover-lift": "-2px",
1343
- "press-scale": "1"
1343
+ "press-scale": "0.97"
1344
1344
  },
1345
1345
  "standard": {
1346
1346
  "label": "Standard",
@@ -1362,7 +1362,7 @@ export const SPEC_AXES = {
1362
1362
  "ease-spring": "cubic-bezier(0.33, 0, 0.1, 1)",
1363
1363
  "dur-spring": "400ms",
1364
1364
  "hover-lift": "0px",
1365
- "press-scale": "1"
1365
+ "press-scale": "0.98"
1366
1366
  },
1367
1367
  "lively": {
1368
1368
  "label": "Lively",
@@ -2618,7 +2618,13 @@ export const SPEC_A11Y = {
2618
2618
  "reducedTransparency": {
2619
2619
  "surface-glass": "var(--iox-surface)",
2620
2620
  "surface-glass-strong": "var(--iox-surface)",
2621
- "blur-surface": "none"
2621
+ "blur-surface": "none",
2622
+ "button-secondary-backdrop": "none",
2623
+ "card-backdrop": "none",
2624
+ "nav-backdrop": "none",
2625
+ "dialog-backdrop": "none",
2626
+ "tabbar-backdrop": "none",
2627
+ "segmented-track-backdrop": "none"
2622
2628
  }
2623
2629
  } as const;
2624
2630
 
@@ -6558,7 +6564,7 @@ export const SPEC_FLAVOR_PACKS = [
6558
6564
  "tier": "semantic",
6559
6565
  "type": "number",
6560
6566
  "group": "motion",
6561
- "value": "1"
6567
+ "value": "0.98"
6562
6568
  },
6563
6569
  {
6564
6570
  "name": "button-font",
@@ -13817,7 +13823,7 @@ export const SPEC_FLAVOR_PACKS = [
13817
13823
  "tier": "semantic",
13818
13824
  "type": "number",
13819
13825
  "group": "motion",
13820
- "value": "1"
13826
+ "value": "0.97"
13821
13827
  },
13822
13828
  {
13823
13829
  "name": "button-font",
@@ -13957,7 +13963,7 @@ export const SPEC_FLAVOR_PACKS = [
13957
13963
  "tier": "component",
13958
13964
  "type": "number",
13959
13965
  "group": "components",
13960
- "value": "1",
13966
+ "value": "0.97",
13961
13967
  "overridden": true
13962
13968
  },
13963
13969
  {
@@ -12,6 +12,7 @@ export * from './flavor-spec.generated';
12
12
  export * from './design-token.model';
13
13
  export * from './css-names';
14
14
  export * from './token-css';
15
+ export * from './theme-color';
15
16
  export * from './flavor';
16
17
  export * from './element-styles';
17
18
  export * from './adopt';
@@ -0,0 +1,41 @@
1
+ import { DesignMode } from './design-token.model';
2
+ import { DesignTokenLike } from './token-css';
3
+
4
+ /** The token the browser's own chrome takes its colour from: the page's ground. */
5
+ export const THEME_COLOR_TOKEN = 'bg';
6
+
7
+ const VAR_REF = /^var\(\s*--iox-([\w-]+)\s*(?:,\s*([^()]+))?\)$/;
8
+ /** A colour the browser's chrome can wear: opaque hex, rgb() or hsl() — never a gradient, a mix or a translucent one. */
9
+ const SOLID_COLOUR = /^(#([0-9a-f]{3}|[0-9a-f]{6})|rgb\(\s*[\d.]+\s*,?\s*[\d.]+\s*,?\s*[\d.]+\s*\)|hsl\([^()/]+\))$/i;
10
+
11
+ export interface ThemeColors {
12
+ light?: string;
13
+ dark?: string;
14
+ }
15
+
16
+ function resolveIn(map: ReadonlyMap<string, string>, value: string | undefined, depth = 0): string | undefined {
17
+ if (!value || depth > 12) return undefined;
18
+ const ref = VAR_REF.exec(value.trim());
19
+ if (!ref) return value.trim();
20
+ return resolveIn(map, map.get(ref[1]) ?? ref[2]?.trim(), depth + 1);
21
+ }
22
+
23
+ function colourFor(rows: ReadonlyArray<DesignTokenLike>, dark: boolean): string | undefined {
24
+ const map = new Map(rows.map(r => [r.name, dark ? (r.values?.dark ?? r.value) : r.value] as [string, string]));
25
+ const colour = resolveIn(map, map.get(THEME_COLOR_TOKEN));
26
+ return colour && SOLID_COLOUR.test(colour) ? colour : undefined;
27
+ }
28
+
29
+ /**
30
+ * The `theme-color` the browser's chrome takes per colour scheme (premium components G15 — mobile-native M10): the
31
+ * page's ground in each mode the site shows, resolved through the org's rows. A light or dark site answers its one
32
+ * mode; `auto` answers both (the engine writes them with `media="(prefers-color-scheme: …)"`). A value that is not a
33
+ * solid colour answers nothing — the browser keeps its own.
34
+ */
35
+ export function themeColors(rows: ReadonlyArray<DesignTokenLike> | null | undefined, mode: DesignMode | string | null | undefined = 'auto'): ThemeColors {
36
+ const list = rows ?? [];
37
+ const out: ThemeColors = {};
38
+ if (mode !== 'dark') { const light = colourFor(list, false); if (light) out.light = light; }
39
+ if (mode !== 'light') { const dark = colourFor(list, true); if (dark) out.dark = dark; }
40
+ return out;
41
+ }