@vectoriox/iox-ui 5.87.0 → 5.88.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/actions-core/index.d.ts +17 -3
- package/composite-core/index.d.ts +208 -2
- package/design-core/index.d.ts +373 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +30 -4
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +656 -116
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +444 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +5 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +231 -7
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +603 -20
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +196 -2
- package/package.json +1 -1
- package/scene-core/index.d.ts +158 -2
- package/src/actions-core/action.model.ts +3 -0
- package/src/actions-core/element-actions.ts +32 -3
- package/src/composite-core/marquee-runtime.ts +255 -0
- package/src/composite-core/marquee.ts +267 -0
- package/src/composite-core/public-api.ts +3 -0
- package/src/composite-core/scroll-recipes.ts +74 -0
- package/src/composite-core/structure.ts +7 -0
- package/src/design-core/contrast-audit.ts +6 -1
- package/src/design-core/flavor-spec.generated.ts +435 -1
- package/src/generation-core/node-baselines.generated.ts +5 -1
- package/src/scene-core/public-api.ts +1 -0
- package/src/scene-core/scroll-driver.ts +98 -0
- package/src/scene-core/scroll-range.ts +195 -0
- package/styles/iox-design.css +49 -1
package/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
|
|
11
11
|
import { VideoPlan } from '@vectoriox/iox-ui/media-core';
|
|
12
12
|
import { SliderWords } from '@vectoriox/iox-ui/composite-core';
|
|
13
13
|
import { OpenerNodeLike } from '@vectoriox/iox-ui/actions-core';
|
|
14
|
+
export { SCROLL_PROGRESS_TRIGGER } from '@vectoriox/iox-ui/actions-core';
|
|
15
|
+
import { ScrollDriver, ScrollMotionEnv, ScrollActionKind } from '@vectoriox/iox-ui/scene-core';
|
|
14
16
|
export * from '@vectoriox/iox-ui/data-core';
|
|
15
17
|
|
|
16
18
|
declare class ViewPositionDirective implements AfterViewInit {
|
|
@@ -2624,6 +2626,15 @@ declare enum RevealActionType {
|
|
|
2624
2626
|
Zoom = "zoomOut",
|
|
2625
2627
|
Text = "revealText"
|
|
2626
2628
|
}
|
|
2629
|
+
/**
|
|
2630
|
+
* Actions the SCROLL plays (premium components M6, N7): a layer at a depth, a bar that fills as the page is read. They
|
|
2631
|
+
* have no frames in time — `buildInteractionKeyframes` answers null for them — and play only under a `scrollProgress`
|
|
2632
|
+
* trigger (`scroll-progress.ts`).
|
|
2633
|
+
*/
|
|
2634
|
+
declare enum ScrollActionType {
|
|
2635
|
+
Parallax = "parallax",
|
|
2636
|
+
ProgressBar = "progressBar"
|
|
2637
|
+
}
|
|
2627
2638
|
/** Actions that reveal an element (hidden → visible). Their FIRST frame is the pre-state. */
|
|
2628
2639
|
declare const ENTRANCE_ACTION_TYPES: ReadonlySet<string>;
|
|
2629
2640
|
/** Actions that hide an element (visible → hidden). */
|
|
@@ -2694,6 +2705,15 @@ declare function animateAction(el: HTMLElement, action: {
|
|
|
2694
2705
|
type: string;
|
|
2695
2706
|
params?: Readonly<Record<string, unknown>> | null;
|
|
2696
2707
|
}, frames: ReadonlyArray<InteractionKeyframe>, timing: KeyframeAnimationOptions, options?: AnimateActionOptions): Animation;
|
|
2708
|
+
/**
|
|
2709
|
+
* The frames an action plays on `el` in its page's direction: a clip reveal from Start or End opens from the other
|
|
2710
|
+
* physical side in a right-to-left page (`clip-path` has no logical sides). Anything else comes back as given. Read once,
|
|
2711
|
+
* as a run starts — by time (`animateAction`) or by the scroll (`scroll-progress.ts`).
|
|
2712
|
+
*/
|
|
2713
|
+
declare function directionalFrames(el: HTMLElement, action: {
|
|
2714
|
+
type: string;
|
|
2715
|
+
params?: Readonly<Record<string, unknown>> | null;
|
|
2716
|
+
}, frames: ReadonlyArray<InteractionKeyframe>): ReadonlyArray<InteractionKeyframe>;
|
|
2697
2717
|
/** `translateX` → `translate-x`, `opacity` → `opacity`: the CSS property name of a keyframe key. */
|
|
2698
2718
|
declare function keyframePropertyName(key: string): string;
|
|
2699
2719
|
/** A keyframe as `[css-property, value]` pairs — what a runtime writes inline. */
|
|
@@ -2811,6 +2831,180 @@ declare function splitPressFeedback<T extends PressAction>(actions: ReadonlyArra
|
|
|
2811
2831
|
onClick: T[];
|
|
2812
2832
|
};
|
|
2813
2833
|
|
|
2834
|
+
/**
|
|
2835
|
+
* A number that counts up (premium components M6, N5 — complex-components CC5 §7g, Emil 176–178, D4).
|
|
2836
|
+
*
|
|
2837
|
+
* - The FINAL value is the node's own text, so it is what the server sends: crawlers, a visitor with no script and a
|
|
2838
|
+
* screen reader read the real number, and there is never a 0 in the HTML.
|
|
2839
|
+
* - It plays ONCE, the first time its number comes into view, and never again on that page (D4: a proof beat).
|
|
2840
|
+
* - While it counts, the digits that move are hidden from assistive technology and the final number sits beside them,
|
|
2841
|
+
* visually hidden, so a screen reader reads "1,250" once, never every step. It is never a live region.
|
|
2842
|
+
* - The digits are tabular (Emil 176) and the box keeps the final number's width, so nothing beside it moves.
|
|
2843
|
+
* - Formatted with `Intl.NumberFormat` in the page's language, keeping the author's decimals and grouping (a year stays
|
|
2844
|
+
* "2026", never "2,026").
|
|
2845
|
+
* - A number the visitor can already read when the page wakes keeps its value: a count never takes a number away. Paired
|
|
2846
|
+
* with an entrance (hidden until it plays), it counts in the first screen too.
|
|
2847
|
+
* - Reduced motion shows the final value at once; an interrupted count ends on it. The original text node is put back
|
|
2848
|
+
* when it ends, never rebuilt from a string (a framework may hold it).
|
|
2849
|
+
*/
|
|
2850
|
+
|
|
2851
|
+
declare const COUNT_UP_ACTION = "countUp";
|
|
2852
|
+
/** The attribute every renderer writes on an element a `countUp` plays on, so its digits are tabular from the first paint. */
|
|
2853
|
+
declare const COUNT_ATTRIBUTE = "data-iox-count";
|
|
2854
|
+
/** WCAG 2.2.2 (moving content that starts on its own): a count is done well inside five seconds. */
|
|
2855
|
+
declare const COUNT_MAX_MS = 4000;
|
|
2856
|
+
declare const COUNT_DEFAULT_MS = 1200;
|
|
2857
|
+
/** A number found in a text, and how it was written. */
|
|
2858
|
+
interface CountTarget {
|
|
2859
|
+
/** Before and after the number: "₪", "+", "%", " clients". */
|
|
2860
|
+
prefix: string;
|
|
2861
|
+
suffix: string;
|
|
2862
|
+
/** The number as written. */
|
|
2863
|
+
text: string;
|
|
2864
|
+
value: number;
|
|
2865
|
+
/** Digits after the decimal separator. */
|
|
2866
|
+
decimals: number;
|
|
2867
|
+
/** Written with group separators ("1,250") — a year is not ("2026"). */
|
|
2868
|
+
grouping: boolean;
|
|
2869
|
+
}
|
|
2870
|
+
/**
|
|
2871
|
+
* The number a text holds, read in `locale`'s way of writing numbers, or null when it holds none. Pure.
|
|
2872
|
+
* "1,250+" → 1250 (grouped); "4.9" → 4.9 (one decimal); "₪ 3,500" → 3500; "1.250" in German → 1250.
|
|
2873
|
+
*/
|
|
2874
|
+
declare function parseCount(text: string, locale?: string): CountTarget | null;
|
|
2875
|
+
/** `value` written as the target was: its decimals, its grouping, the page's language. */
|
|
2876
|
+
declare function formatCount(value: number, target: Pick<CountTarget, 'decimals' | 'grouping'>, locale?: string): string;
|
|
2877
|
+
/** The value a count stands at, `progress` (0–1, already eased) of the way from `from` to `to`, at the target's precision. */
|
|
2878
|
+
declare function countValueAt(from: number, to: number, progress: number, decimals: number): number;
|
|
2879
|
+
/** A count's duration: the action's, capped well inside WCAG 2.2.2's five seconds. */
|
|
2880
|
+
declare function countDuration(duration: unknown): number;
|
|
2881
|
+
/** The language a number is written in: the nearest `lang`, else the page's. */
|
|
2882
|
+
declare function countLocaleOf(el: Element): string | undefined;
|
|
2883
|
+
/** Whether a visitor can read `el` right now: on screen and not hidden by an entrance's first frame. */
|
|
2884
|
+
declare function countIsReadable(el: HTMLElement): boolean;
|
|
2885
|
+
/**
|
|
2886
|
+
* Get `el` ready to count: its number shows the start value until it plays. Nothing happens when motion is not wanted,
|
|
2887
|
+
* when it has counted already, when it is being edited, when it holds no number, or when the visitor can already read it
|
|
2888
|
+
* (`countIsReadable`) — then it keeps its value. Returns true when it is armed.
|
|
2889
|
+
*/
|
|
2890
|
+
declare function armCountUp(el: HTMLElement, params?: Readonly<Record<string, unknown>> | null, host?: Parameters<typeof motionAllowed>[0]): boolean;
|
|
2891
|
+
/** Put the original number back: the count ended, was interrupted, or the runtime let go. */
|
|
2892
|
+
declare function restoreCountUp(el: Element): void;
|
|
2893
|
+
/** True once `el` has counted (or was read before it could). */
|
|
2894
|
+
declare function hasCounted(el: Element): boolean;
|
|
2895
|
+
/**
|
|
2896
|
+
* Play an armed count. Returns ONE Animation (a timing-only effect, so a runtime treats it like every other run: it
|
|
2897
|
+
* finishes, it can be cancelled), or null when there is nothing to count — the element keeps its final value. The digits
|
|
2898
|
+
* are written on each frame from the animation's own eased progress; on finish or cancel the original text comes back.
|
|
2899
|
+
*/
|
|
2900
|
+
declare function playCountUp(el: HTMLElement, timing: KeyframeAnimationOptions): Animation | null;
|
|
2901
|
+
interface CountAction {
|
|
2902
|
+
type?: string;
|
|
2903
|
+
target?: string;
|
|
2904
|
+
params?: Readonly<Record<string, unknown>> | null;
|
|
2905
|
+
disabled?: boolean;
|
|
2906
|
+
}
|
|
2907
|
+
/**
|
|
2908
|
+
* Arm every count an element's interactions hold — the ONE walk the canvas and both engine paths run after their
|
|
2909
|
+
* pre-states, so a number its entrance hides is armed and one already read keeps its value. Only under a trigger a count
|
|
2910
|
+
* waits on (actions-core `COUNT_UP_TRIGGERS`): under a click it would stand at its start value until pressed. Returns the
|
|
2911
|
+
* elements armed (what the runtime puts back when it lets go).
|
|
2912
|
+
*/
|
|
2913
|
+
declare function armInteractionCounts(interactions: ReadonlyArray<{
|
|
2914
|
+
trigger?: string;
|
|
2915
|
+
actions?: ReadonlyArray<CountAction> | null;
|
|
2916
|
+
}> | null | undefined, resolve: (action: CountAction) => HTMLElement | null, host?: Parameters<typeof motionAllowed>[0]): HTMLElement[];
|
|
2917
|
+
|
|
2918
|
+
/**
|
|
2919
|
+
* The `scrollProgress` trigger (premium components M6, N7 — Motion v2 V1, vectoriox/iox-ui#36): an interaction whose
|
|
2920
|
+
* actions are played by WHERE its element stands in the page, through a named range, instead of by time. ONE runtime for
|
|
2921
|
+
* the canvas and both engine paths; it rides the caller's ONE `ScrollDriver` as links (never a loop per element).
|
|
2922
|
+
*
|
|
2923
|
+
* - Every action keeps its frames from THE keyframe map (`buildInteractionKeyframes`), so a scrubbed fade is the same fade
|
|
2924
|
+
* a click plays. A paused Web Animation is moved to the progress, so any frames — a transform, a clip from the reading
|
|
2925
|
+
* side — play without a second interpolator.
|
|
2926
|
+
* - `parallax` (a depth: back · front) and `progressBar` are the scroll's own: `translate` and `scale`, never the
|
|
2927
|
+
* element's `transform`, so a hover lift or an entrance on the same element is never overwritten.
|
|
2928
|
+
* - A scrubbed entrance that has fully played is LET GO (the stylesheet applies again: its hover, its press — the M2
|
|
2929
|
+
* settle rule); an exit is let go before it starts.
|
|
2930
|
+
* - Transform, opacity, clip-path only: nothing changes a box, so CLS stays 0.
|
|
2931
|
+
* - The degrade is the ONE table `scrollPlayFor`: reduced motion keeps a scrub's opacity and the reading bar (no glide),
|
|
2932
|
+
* rests a depth; a light device rests decoration; a phone moves a depth half as far.
|
|
2933
|
+
* - What a visitor operates never glides (round three, Emil gate 4): a depth is refused on a form, a field, a button, a
|
|
2934
|
+
* slider or a marquee.
|
|
2935
|
+
*/
|
|
2936
|
+
|
|
2937
|
+
/** The id every scroll-played Animation carries: a hover's run never mistakes one for its own (`framesFromLiveValue`). */
|
|
2938
|
+
declare const SCROLL_ANIMATION_ID = "iox-scroll";
|
|
2939
|
+
/** The attribute on a section that holds a layer at a depth: it clips vertically, so a glide never carries a layer onto
|
|
2940
|
+
* the next section's ground (round three, M1). iox-design.css. */
|
|
2941
|
+
declare const DEPTH_CLIP_ATTRIBUTE = "data-iox-depth-clip";
|
|
2942
|
+
/** What a scroll-driven action is, or null when the scroll cannot play it. */
|
|
2943
|
+
declare function scrollActionKind(type: string): ScrollActionKind | null;
|
|
2944
|
+
/** True for an action a `scrollProgress` trigger can play (the picker offers these, and only these, under it). */
|
|
2945
|
+
declare function playsOnScroll(type: string): boolean;
|
|
2946
|
+
declare function isOperated(el: Element): boolean;
|
|
2947
|
+
interface ScrollProgressAction {
|
|
2948
|
+
type: string;
|
|
2949
|
+
target?: string;
|
|
2950
|
+
params?: Readonly<Record<string, unknown>> | null;
|
|
2951
|
+
easing?: string;
|
|
2952
|
+
disabled?: boolean;
|
|
2953
|
+
}
|
|
2954
|
+
interface ScrollProgressInteraction {
|
|
2955
|
+
trigger: string;
|
|
2956
|
+
/** `ScrollRange` — the part of the element's way through the page that plays the actions. */
|
|
2957
|
+
range?: string;
|
|
2958
|
+
actions?: ReadonlyArray<ScrollProgressAction>;
|
|
2959
|
+
}
|
|
2960
|
+
interface ScrollProgressHost {
|
|
2961
|
+
/** The runtime instance's ONE driver: the same one its Scenes ride. */
|
|
2962
|
+
driver: ScrollDriver;
|
|
2963
|
+
/** What `ScrollRange.Page` measures: the document's root on the site, the page frame on the canvas. */
|
|
2964
|
+
page: HTMLElement;
|
|
2965
|
+
/** An action's target elements: `self` is the owner. */
|
|
2966
|
+
targetsOf(action: ScrollProgressAction, owner: HTMLElement): HTMLElement[];
|
|
2967
|
+
/** Defaults to what the visitor's device asks for. */
|
|
2968
|
+
env?: ScrollMotionEnv;
|
|
2969
|
+
/** A progress to stand at instead of the scroll's, or null (the canvas holds a selected reading bar full — R2). */
|
|
2970
|
+
held?: () => number | null;
|
|
2971
|
+
}
|
|
2972
|
+
/** The environment of a visitor, asked once. */
|
|
2973
|
+
declare function scrollMotionEnv(host?: Window | null): ScrollMotionEnv;
|
|
2974
|
+
/**
|
|
2975
|
+
* Play a `scrollProgress` interaction of `owner` on `host.driver`. Returns the way to let go: every animation cancelled,
|
|
2976
|
+
* every element back to its own styles. Nothing is attached for an action the scroll cannot play, a disabled one, or one
|
|
2977
|
+
* the visitor's device rests (`scrollPlayFor`).
|
|
2978
|
+
*/
|
|
2979
|
+
declare function attachScrollProgress(owner: HTMLElement, interaction: ScrollProgressInteraction, host: ScrollProgressHost): () => void;
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* What an element's interactions say about its FIRST paint (premium components M6) — attributes every renderer writes
|
|
2983
|
+
* from the saved node, so the raw SSR, the component path and the canvas agree before any script runs:
|
|
2984
|
+
* - `data-iox-count`: a number a count plays on — its digits are tabular from the first paint (iox-design.css), so the
|
|
2985
|
+
* box never changes width when the count starts or ends;
|
|
2986
|
+
* - `data-iox-progress`: a reading bar — empty until the scroll fills it (a visitor with no script sees none, never a
|
|
2987
|
+
* full one).
|
|
2988
|
+
* Only for actions that play on the element itself; a count or a bar aimed at another node is the runtime's alone.
|
|
2989
|
+
*/
|
|
2990
|
+
declare const PROGRESS_ATTRIBUTE = "data-iox-progress";
|
|
2991
|
+
/** Every attribute `interactionMarkerAttributes` may write: what a live sync removes when it no longer applies. */
|
|
2992
|
+
declare const INTERACTION_MARKER_ATTRIBUTES: ReadonlyArray<string>;
|
|
2993
|
+
interface MarkedAction {
|
|
2994
|
+
type?: string;
|
|
2995
|
+
target?: string;
|
|
2996
|
+
disabled?: boolean;
|
|
2997
|
+
}
|
|
2998
|
+
interface MarkedNode {
|
|
2999
|
+
interactions?: ReadonlyArray<{
|
|
3000
|
+
trigger?: string;
|
|
3001
|
+
actions?: ReadonlyArray<MarkedAction> | null;
|
|
3002
|
+
}> | null;
|
|
3003
|
+
}
|
|
3004
|
+
declare function interactionMarkerAttributes(node: MarkedNode | null | undefined): Record<string, string>;
|
|
3005
|
+
/** Make an element carry its node's markers: the canvas's live sync and the component path's stamp. */
|
|
3006
|
+
declare function syncInteractionMarkers(el: Element | null | undefined, node: MarkedNode | null | undefined): void;
|
|
3007
|
+
|
|
2814
3008
|
/**
|
|
2815
3009
|
* page-style — the ONE compiler that turns a page's style settings into CSS.
|
|
2816
3010
|
*
|
|
@@ -4352,5 +4546,5 @@ declare function formToastsOnSend(form: Element | null | undefined): boolean;
|
|
|
4352
4546
|
/** Raise the form's Sent toast (from the form — its scope and its look). */
|
|
4353
4547
|
declare function raiseFormToast(form: Element): ToastHandle | null;
|
|
4354
4548
|
|
|
4355
|
-
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, CALENDAR_CLOSING_ATTRIBUTE, CALENDAR_DESIGN_ATTRIBUTE, CALENDAR_INSTANT_ATTRIBUTE, CALENDAR_SHEET_QUERY, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CalendarClass, 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, DatePickerRuntime, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ELEMENT_STYLE_TRANSITION_EXTRAS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FLOATING_GAP, FLOATING_LAYER_CLASS, FLOATING_MARGIN, FLOATING_SHEET_QUERY, FloatingAlign, FloatingSide, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HEADER_SCROLL_HYSTERESIS_PX, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, HeaderRuntime, 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, IoxPopoverComponent, 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, POPOVER_SELECTOR, PageScrollProvider, PageStyleField, PageStyleSource, PausableTimer, PauseReason, PointerKind, PopoverAttribute, REDUCED_MOTION_QUERY, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SHAKE_DURATION_MS, SHAKE_EASING, SHAKE_KEYFRAMES, SLIDER_FEEL, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, SLIDER_PHONE_BREAKPOINT, SLIDER_RUNWAY_CLASS, SLIDER_STEPS_PROPERTY, SLIDE_CAPTION_ATTRIBUTE, 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, TOAST_CLOSE_WORDS, TOAST_DESIGN_ATTRIBUTE, TOAST_EDGE_ATTRIBUTE, TOAST_FIRST_LANDS_MS, TOAST_MAX_MS, TOAST_MAX_VISIBLE, TOAST_MIN_MS, TOAST_MS_PER_CHAR, TOOLTIP_ATTRIBUTE, TOOLTIP_FIRST_DELAY_MS, TOOLTIP_HIDE_GRACE_MS, TOOLTIP_INSTANT_ATTRIBUTE, TOOLTIP_PINNED_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, TOOLTIP_SIDE_ATTRIBUTE, TOOLTIP_TYPES, TOOLTIP_WARM_MS, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, ToastClass, ToastEdge, TooltipClass, TooltipRuntime, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, animateAction, applyBindingPipes, applyFeel, attachDatePicker, attachDatePickers, attachStringForm, attachTooltips, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, canPopover, cascadeChain, clearInputOverride, clearOverride, clearToasts, closeAboveMediaQuery, closeAllPopovers, closePopover, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, datePickerOf, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, domHasSliderParts, durationMs, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, entranceStartsHidden, feelFor, fieldLanguage, finalKeyframe, floatingLayer, floatingScope, formSentWords, formToastsOnSend, framesFromLiveValue, gateHoverRule, getSeoValue, hasHoverState, hasOwnPageTransition, hasOwnTransition, headerShouldHide, hideFromTopLayer, hidingHeadersIn, initialSlotValues, isActionEnabled, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOpenPopover, isOverriddenAt, isPopoverOpen, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, layerFrame, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, openPopover, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseUrlList, partClassName, placeFloating, placePopover, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playDualLayerTransition, playInteraction, popoverPanelAttributes, popoverSide, prefersReducedMotion, raiseFloatingLayer, raiseFormToast, rectInLayer, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setDateFieldValue, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, shakeElement, showCalendarDesign, showInTopLayer, showToast, showToastDesign, sliderControlElements, sliderInputsFromProps, sliderInputsOf, sliderRunwayHtml, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, toLayerRect, toastCloseWord, toastDuration, toastEdge, toastsToEvict, togglePopover, tooltipSide, tooltipTiming, tooltipWords, tooltipsOf, transitionPropertyList, viewportTransitionContext, watchHeaders, watchScrolled, withContextSlots, withPhoneDefaults, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
4356
|
-
export type { A11yNodeSource, AnimateActionOptions, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, DatePickerOptions, FloatingLayerOptions, FloatingOptions, FloatingPlacement, FloatingRect, FloatingSize, FloatingViewport, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, HeaderRuntimeOptions, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, LayerFrame, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, PopoverCloseOptions, PopoverOpenOptions, PressAction, RegisteredField, 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, ToastHandle, ToastOptions, ToggleableAction, TooltipRuntimeOptions, TooltipTimingState, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
|
|
4549
|
+
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, CALENDAR_CLOSING_ATTRIBUTE, CALENDAR_DESIGN_ATTRIBUTE, CALENDAR_INSTANT_ATTRIBUTE, CALENDAR_SHEET_QUERY, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, COUNT_ATTRIBUTE, COUNT_DEFAULT_MS, COUNT_MAX_MS, COUNT_UP_ACTION, CURRENT_LINK_TYPES, CalendarClass, 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, DEPTH_CLIP_ATTRIBUTE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DatePickerRuntime, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ELEMENT_STYLE_TRANSITION_EXTRAS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FLOATING_GAP, FLOATING_LAYER_CLASS, FLOATING_MARGIN, FLOATING_SHEET_QUERY, FloatingAlign, FloatingSide, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HEADER_SCROLL_HYSTERESIS_PX, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, HeaderRuntime, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, INTERACTION_MARKER_ATTRIBUTES, 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, IoxPopoverComponent, 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, POPOVER_SELECTOR, PROGRESS_ATTRIBUTE, PageScrollProvider, PageStyleField, PageStyleSource, PausableTimer, PauseReason, PointerKind, PopoverAttribute, REDUCED_MOTION_QUERY, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_ANIMATION_ID, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SHAKE_DURATION_MS, SHAKE_EASING, SHAKE_KEYFRAMES, SLIDER_FEEL, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, SLIDER_PHONE_BREAKPOINT, SLIDER_RUNWAY_CLASS, SLIDER_STEPS_PROPERTY, SLIDE_CAPTION_ATTRIBUTE, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollActionType, ScrollEasing, SectionComponent, SettleMode, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TOAST_CLOSE_WORDS, TOAST_DESIGN_ATTRIBUTE, TOAST_EDGE_ATTRIBUTE, TOAST_FIRST_LANDS_MS, TOAST_MAX_MS, TOAST_MAX_VISIBLE, TOAST_MIN_MS, TOAST_MS_PER_CHAR, TOOLTIP_ATTRIBUTE, TOOLTIP_FIRST_DELAY_MS, TOOLTIP_HIDE_GRACE_MS, TOOLTIP_INSTANT_ATTRIBUTE, TOOLTIP_PINNED_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, TOOLTIP_SIDE_ATTRIBUTE, TOOLTIP_TYPES, TOOLTIP_WARM_MS, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, ToastClass, ToastEdge, TooltipClass, TooltipRuntime, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, animateAction, applyBindingPipes, applyFeel, armCountUp, armInteractionCounts, attachDatePicker, attachDatePickers, attachScrollProgress, attachStringForm, attachTooltips, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, canPopover, cascadeChain, clearInputOverride, clearOverride, clearToasts, closeAboveMediaQuery, closeAllPopovers, closePopover, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countDuration, countIsReadable, countLocaleOf, countOverrides, countValueAt, datePickerOf, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, directionalFrames, domHasSliderParts, durationMs, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, entranceStartsHidden, feelFor, fieldLanguage, finalKeyframe, floatingLayer, floatingScope, formSentWords, formToastsOnSend, formatCount, framesFromLiveValue, gateHoverRule, getSeoValue, hasCounted, hasHoverState, hasOwnPageTransition, hasOwnTransition, headerShouldHide, hideFromTopLayer, hidingHeadersIn, initialSlotValues, interactionMarkerAttributes, isActionEnabled, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOpenPopover, isOperated, isOverriddenAt, isPopoverOpen, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, layerFrame, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, openPopover, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseCount, parseUrlList, partClassName, placeFloating, placePopover, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playCountUp, playDualLayerTransition, playInteraction, playsOnScroll, popoverPanelAttributes, popoverSide, prefersReducedMotion, raiseFloatingLayer, raiseFormToast, rectInLayer, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, restoreCountUp, rewriteViewportUnits, safeSetInput, scrollActionKind, scrollMotionEnv, serializeA11yAttributes, setDateFieldValue, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, shakeElement, showCalendarDesign, showInTopLayer, showToast, showToastDesign, sliderControlElements, sliderInputsFromProps, sliderInputsOf, sliderRunwayHtml, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncInteractionMarkers, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, toLayerRect, toastCloseWord, toastDuration, toastEdge, toastsToEvict, togglePopover, tooltipSide, tooltipTiming, tooltipWords, tooltipsOf, transitionPropertyList, viewportTransitionContext, watchHeaders, watchScrolled, withContextSlots, withPhoneDefaults, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
4550
|
+
export type { A11yNodeSource, AnimateActionOptions, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CountTarget, CurrentLinkOptions, DatePickerOptions, FloatingLayerOptions, FloatingOptions, FloatingPlacement, FloatingRect, FloatingSize, FloatingViewport, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, HeaderRuntimeOptions, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, LayerFrame, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, PopoverCloseOptions, PopoverOpenOptions, PressAction, RegisteredField, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteAnimationLike, ScrollPlanContext, ScrollProgressAction, ScrollProgressHost, ScrollProgressInteraction, ScrollSource, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SettleOptions, SliderBootOptions, SliderControlElements, SliderInputs, StateRulePlan, StateScope, StateStyleMap, StringFormOptions, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToastHandle, ToastOptions, ToggleableAction, TooltipRuntimeOptions, TooltipTimingState, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
|
package/package.json
CHANGED
package/scene-core/index.d.ts
CHANGED
|
@@ -284,6 +284,117 @@ declare const SCENE_STAGE_HEIGHT = "100svh";
|
|
|
284
284
|
/** A fresh Scene: it already moves, so the author sees what the thing is before touching it. */
|
|
285
285
|
declare function buildSceneRecipe(create: CompositeNodeFactory, words?: Partial<SceneWords>): SceneLayerNode;
|
|
286
286
|
|
|
287
|
+
/**
|
|
288
|
+
* Scroll-driven motion outside a Scene (premium components M6, N7 — Motion v2 V1). An element plays its actions by WHERE
|
|
289
|
+
* it stands in the page, not by time: a fade that follows the scroll, a layer that glides at its own depth, a bar that
|
|
290
|
+
* fills as the page is read. Every one of them rides the ONE `ScrollDriver` (its links), never a loop of its own.
|
|
291
|
+
*
|
|
292
|
+
* The ranges are CSS's named view-timeline ranges, so a `view()` timeline could take them over 1:1, plus the whole page
|
|
293
|
+
* (a reading-progress bar). The maths is pure: geometry in, progress out, the same at any canvas zoom because every length
|
|
294
|
+
* is in one space.
|
|
295
|
+
*/
|
|
296
|
+
declare enum ScrollRange {
|
|
297
|
+
/** From the element's top edge at the bottom of the screen until it is wholly in (CSS `entry`). */
|
|
298
|
+
Enter = "enter",
|
|
299
|
+
/** From the moment it starts to come in until it has wholly left (CSS `cover`). */
|
|
300
|
+
Cover = "cover",
|
|
301
|
+
/** While it is wholly in view, or, when it is taller than the screen, while it fills it (CSS `contain`). */
|
|
302
|
+
Contain = "contain",
|
|
303
|
+
/** From the moment it starts to leave until it has gone (CSS `exit`). */
|
|
304
|
+
Exit = "exit",
|
|
305
|
+
/** The section the element stands in, while it is read: Contain, measured on the section (a section's reading bar). */
|
|
306
|
+
Section = "section",
|
|
307
|
+
/** The whole page, from its top to its bottom: how much of it has been read. */
|
|
308
|
+
Page = "page"
|
|
309
|
+
}
|
|
310
|
+
declare const SCROLL_RANGE_DEFAULT = ScrollRange.Cover;
|
|
311
|
+
/** The node element that holds `el` outermost — its section on the page — stopping below `stop`. A node element is one
|
|
312
|
+
* carrying its `iox-node-<id>` class, in every render path; a wrapper a renderer drew around nodes is never one. */
|
|
313
|
+
declare function outermostNodeOf(el: Element, stop?: Element | null): HTMLElement;
|
|
314
|
+
/** A saved range, or the default for anything else. */
|
|
315
|
+
declare function normalizeScrollRange(value: unknown): ScrollRange;
|
|
316
|
+
/** A box along the scroll axis: its top and its height, in the same space as the view's. */
|
|
317
|
+
interface ScrollBox {
|
|
318
|
+
top: number;
|
|
319
|
+
height: number;
|
|
320
|
+
}
|
|
321
|
+
/** Where a range starts and ends, as the element's top relative to the view's top. */
|
|
322
|
+
declare function rangeEnds(range: ScrollRange, box: ScrollBox, view: ScrollBox): {
|
|
323
|
+
start: number;
|
|
324
|
+
end: number;
|
|
325
|
+
};
|
|
326
|
+
/** How far the scroll travels through a range, in the box's space: what a parallax depth is a share of. */
|
|
327
|
+
declare function rangeDistance(range: ScrollRange, box: ScrollBox, view: ScrollBox): number;
|
|
328
|
+
/**
|
|
329
|
+
* How far `box` has come through `range` of `view`, 0–1. For `Page`, `box` is the page itself: 0 at its top, 1 once its
|
|
330
|
+
* bottom reaches the bottom of the view. A range of no length is a step: 0 before it, 1 from it on.
|
|
331
|
+
*/
|
|
332
|
+
declare function rangeProgress(range: ScrollRange, box: ScrollBox, view: ScrollBox): number;
|
|
333
|
+
/**
|
|
334
|
+
* The parallax trio (round three's back · middle · front). Middle is the page's own speed, so it is no action at all.
|
|
335
|
+
* Back glides slower than the page, front faster: a share of the scroll it travels through.
|
|
336
|
+
*/
|
|
337
|
+
declare enum ParallaxDepth {
|
|
338
|
+
Back = "back",
|
|
339
|
+
Front = "front"
|
|
340
|
+
}
|
|
341
|
+
declare const PARALLAX_DEPTH_DEFAULT = ParallaxDepth.Back;
|
|
342
|
+
/** The share of the scroll a depth moves against the page. Round three moved its layers by about this much. */
|
|
343
|
+
declare const PARALLAX_SPEED = 0.3;
|
|
344
|
+
/** A phone's layers move half as far: on a narrow stack a glide reaches the next block sooner (round three's phone rule). */
|
|
345
|
+
declare const PARALLAX_PHONE_FACTOR = 0.5;
|
|
346
|
+
declare function normalizeParallaxDepth(value: unknown): ParallaxDepth;
|
|
347
|
+
/**
|
|
348
|
+
* How far a layer stands off its place at each end of its range, in the box's px: it runs from `-shift` to `+shift`
|
|
349
|
+
* (back) or the other way (front), and stands exactly in its place halfway. Never more than the share of one screen, so
|
|
350
|
+
* a tall layer never slides a screen away from what it belongs to.
|
|
351
|
+
*/
|
|
352
|
+
declare function parallaxShift(distance: number, viewHeight: number, options?: {
|
|
353
|
+
phone?: boolean;
|
|
354
|
+
}): number;
|
|
355
|
+
/** The frames of a parallax depth over its range: the individual `translate` property, so the element's own `transform`
|
|
356
|
+
* (a hover lift, an entrance) is never overwritten. */
|
|
357
|
+
declare function parallaxFrames(depth: ParallaxDepth, shift: number): Array<Record<string, string>>;
|
|
358
|
+
/** A bar that fills along the reading direction: the individual `scale` property, from its reading start (iox-design.css). */
|
|
359
|
+
declare const PROGRESS_BAR_FRAMES: ReadonlyArray<Record<string, string>>;
|
|
360
|
+
/** What a scroll-driven action is, for what each visitor gets of it (`scrollPlayFor`). */
|
|
361
|
+
declare enum ScrollActionKind {
|
|
362
|
+
/** A glide at a depth: pure decoration. */
|
|
363
|
+
Parallax = "parallax",
|
|
364
|
+
/** How much has been read: information, tied to the visitor's own scroll. */
|
|
365
|
+
Progress = "progress",
|
|
366
|
+
/** Any entrance or exit, played by the scroll instead of the clock. */
|
|
367
|
+
Scrub = "scrub"
|
|
368
|
+
}
|
|
369
|
+
/** What a visitor gets of one scroll-driven action. */
|
|
370
|
+
declare enum ScrollPlay {
|
|
371
|
+
/** All of it. */
|
|
372
|
+
Full = "full",
|
|
373
|
+
/** Its opacity only: no movement (reduced motion, Emil 192: gentler, not zero). */
|
|
374
|
+
Gentle = "gentle",
|
|
375
|
+
/** Nothing: the element stands as it is, where it is. */
|
|
376
|
+
Rest = "rest"
|
|
377
|
+
}
|
|
378
|
+
interface ScrollMotionEnv {
|
|
379
|
+
reducedMotion: boolean;
|
|
380
|
+
/** Save-Data, or a device that says it has little memory (`lightMotionWanted`). */
|
|
381
|
+
light: boolean;
|
|
382
|
+
}
|
|
383
|
+
/** THE degrade (motion-v2 §3d/§3e): one table, read by the canvas and both engine paths. */
|
|
384
|
+
declare function scrollPlayFor(kind: ScrollActionKind, env: ScrollMotionEnv): ScrollPlay;
|
|
385
|
+
/** A frame list cut down to what a Gentle play keeps; empty when nothing is left to play. */
|
|
386
|
+
declare function gentleFrames<T extends Record<string, unknown>>(frames: ReadonlyArray<T>): T[];
|
|
387
|
+
interface LightHost {
|
|
388
|
+
navigator?: Navigator & {
|
|
389
|
+
connection?: {
|
|
390
|
+
saveData?: boolean;
|
|
391
|
+
};
|
|
392
|
+
deviceMemory?: number;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
/** True when the visitor asked to save data, or the device reports little memory: scrubs and depths rest. */
|
|
396
|
+
declare function lightMotionWanted(host?: LightHost | null | undefined): boolean;
|
|
397
|
+
|
|
287
398
|
/**
|
|
288
399
|
* The ONE scroll loop (premium-sites plan §5b, SC0). Every Scene on a page reads one progress value from it, on the
|
|
289
400
|
* canvas and on the live site alike. It reads where the root is and nothing else, so it has one code path: under the
|
|
@@ -320,9 +431,43 @@ interface ScrollDriverOptions {
|
|
|
320
431
|
damping?: number;
|
|
321
432
|
/** Called after every frame it writes, outside any framework's zone (the canvas's selection box follows on it). */
|
|
322
433
|
onFrame?: (root: HTMLElement, state: SceneFrameState) => void;
|
|
434
|
+
/** The part of the screen the page is seen through, when that is not the window (the canvas's scroller). Links only. */
|
|
435
|
+
view?: () => ScrollBox | null;
|
|
323
436
|
/** The window, for a test. */
|
|
324
437
|
host?: Window;
|
|
325
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* A SCROLL LINK (premium components M6, N7): something outside a Scene that follows where an element stands in the page —
|
|
441
|
+
* a scrubbed entrance, a parallax depth, a reading bar. It rides this same loop: read with every Scene, damped the same
|
|
442
|
+
* way, written in the same write phase. Never a second loop per element.
|
|
443
|
+
*/
|
|
444
|
+
interface ScrollLink {
|
|
445
|
+
/** What is measured: the element for a view range, the page for `ScrollRange.Page`. */
|
|
446
|
+
measured: HTMLElement;
|
|
447
|
+
range: ScrollRange;
|
|
448
|
+
/** Written in the write phase with the damped progress (0–1). Compositor properties only. */
|
|
449
|
+
write(progress: number, geometry: ScrollLinkGeometry): void;
|
|
450
|
+
/** Follow the scroll exactly, with no glide (reduced motion). */
|
|
451
|
+
immediate?: boolean;
|
|
452
|
+
/** The page the measured element stands in: its layout is measured inside it (`layoutBoxOnScreen`). */
|
|
453
|
+
within?: HTMLElement | null;
|
|
454
|
+
}
|
|
455
|
+
/** A link's geometry this frame, in the PAGE's px (the canvas's zoom undone). */
|
|
456
|
+
interface ScrollLinkGeometry {
|
|
457
|
+
/** How far the scroll travels through the range. */
|
|
458
|
+
distance: number;
|
|
459
|
+
/** The height of the part of the page on screen. */
|
|
460
|
+
viewHeight: number;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Where an element's LAYOUT box stands on screen: its offsets up to the nearest box that has no offset parent, placed by
|
|
464
|
+
* that box's own rectangle. Transforms on the element itself are not in it — a layer that glides is measured where it
|
|
465
|
+
* stands in the flow, so what it is moved by never feeds back into how far it is moved. `zoom` undoes the canvas's scale.
|
|
466
|
+
*/
|
|
467
|
+
declare function layoutBoxOnScreen(el: HTMLElement, within?: HTMLElement | null): {
|
|
468
|
+
box: ScrollBox;
|
|
469
|
+
zoom: number;
|
|
470
|
+
};
|
|
326
471
|
interface SceneFrameState {
|
|
327
472
|
/** Where the scroll stands, undamped: what a scrubber shows. */
|
|
328
473
|
target: number;
|
|
@@ -332,6 +477,7 @@ interface SceneFrameState {
|
|
|
332
477
|
declare class ScrollDriver {
|
|
333
478
|
private readonly options;
|
|
334
479
|
private readonly scenes;
|
|
480
|
+
private readonly links;
|
|
335
481
|
private readonly host;
|
|
336
482
|
private readonly resize;
|
|
337
483
|
private frame;
|
|
@@ -360,6 +506,13 @@ declare class ScrollDriver {
|
|
|
360
506
|
* scroll, which reads as a shake. Damping is untouched: only the pin has to be exact.
|
|
361
507
|
*/
|
|
362
508
|
pinNow(): void;
|
|
509
|
+
/**
|
|
510
|
+
* Follow where `link.measured` stands, on this loop. Returns the way to let go. A link that is added lands on its first
|
|
511
|
+
* frame exactly where the scroll is, with no glide.
|
|
512
|
+
*/
|
|
513
|
+
addLink(link: ScrollLink): () => void;
|
|
514
|
+
/** True while it plays anything: a Scene or a link. */
|
|
515
|
+
get busy(): boolean;
|
|
363
516
|
/** Something moved that no scroll or resize announces (the canvas's zoom). */
|
|
364
517
|
wake(): void;
|
|
365
518
|
destroy(): void;
|
|
@@ -372,6 +525,9 @@ declare class ScrollDriver {
|
|
|
372
525
|
private remeasureAll;
|
|
373
526
|
private measure;
|
|
374
527
|
private readonly tick;
|
|
528
|
+
/** The part of the page on screen: the host's own, or the window. */
|
|
529
|
+
private viewBox;
|
|
530
|
+
private readLink;
|
|
375
531
|
private read;
|
|
376
532
|
private write;
|
|
377
533
|
/**
|
|
@@ -444,5 +600,5 @@ declare function revealStagger(groups: number, by: TextRevealBy): number;
|
|
|
444
600
|
*/
|
|
445
601
|
declare function playTextReveal(el: HTMLElement, by: TextRevealBy, timing: KeyframeAnimationOptions): Animation | null;
|
|
446
602
|
|
|
447
|
-
export { LIGHT_UP_PIECE_CAP, REVEAL_PIECE_CAP, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollDriver, TextRevealBy, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, heldProgress, lineIndexes, movedSceneKey, normalizeTracks, playTextReveal, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, splitText, syncSceneAttributes, textPieces, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
448
|
-
export type { SceneBudget, SceneFilmDensity, SceneFrame, SceneFrameOptions, SceneFrameState, SceneKey, SceneLayerNode, SceneNodeSource, SceneTrack, SceneTrackDef, SceneTreeNode, SceneWords, ScrollDriverOptions, SplitText, SplitTextOptions, TextPiece };
|
|
603
|
+
export { LIGHT_UP_PIECE_CAP, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, REVEAL_PIECE_CAP, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeScrollRange, normalizeTracks, outermostNodeOf, parallaxFrames, parallaxShift, playTextReveal, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, splitText, syncSceneAttributes, textPieces, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
604
|
+
export type { SceneBudget, SceneFilmDensity, SceneFrame, SceneFrameOptions, SceneFrameState, SceneKey, SceneLayerNode, SceneNodeSource, SceneTrack, SceneTrackDef, SceneTreeNode, SceneWords, ScrollBox, ScrollDriverOptions, ScrollLink, ScrollLinkGeometry, ScrollMotionEnv, SplitText, SplitTextOptions, TextPiece };
|
|
@@ -57,6 +57,9 @@ export interface ActionDescriptor {
|
|
|
57
57
|
locked?: boolean;
|
|
58
58
|
/** Not offered yet — shown greyed with a "coming soon" note, so the roadmap is visible. */
|
|
59
59
|
planned?: boolean;
|
|
60
|
+
/** The only triggers it is offered under (premium M6): a count waits for its number to be seen, a depth and a reading
|
|
61
|
+
* bar are the scroll's. Absent = every trigger. `actionOfferedUnder` reads it; so do the runtimes. */
|
|
62
|
+
triggers?: ReadonlyArray<string>;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
/**
|
|
@@ -20,6 +20,17 @@ const OPEN_TARGET_ROLES = [...ITEM_TARGET_ROLES, TabsRole.Trigger, SegmentedRole
|
|
|
20
20
|
* `signIn`/`startCheckout` ship greyed with the honest reason (D-A5): no visitor identity, no
|
|
21
21
|
* payments — a subsystem and a product, not dropdown entries.
|
|
22
22
|
*/
|
|
23
|
+
/** The trigger whose actions the scroll plays (premium M6, N7). */
|
|
24
|
+
export const SCROLL_PROGRESS_TRIGGER = 'scrollProgress';
|
|
25
|
+
const SCROLL_ONLY: ReadonlyArray<string> = Object.freeze([SCROLL_PROGRESS_TRIGGER]);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The triggers a count waits on (premium M6, N5, D4): it plays the first time its number is seen, so only a trigger that
|
|
29
|
+
* fires on its own — when it comes into view, or with the page in the first screen behind an entrance. Under a click or a
|
|
30
|
+
* hover it would stand at its start value until pressed; it is never armed there, and never offered.
|
|
31
|
+
*/
|
|
32
|
+
export const COUNT_UP_TRIGGERS: ReadonlyArray<string> = Object.freeze(['viewportEnter', 'pageLoad']);
|
|
33
|
+
|
|
23
34
|
export const ELEMENT_ACTION_DESCRIPTORS: readonly ActionDescriptor[] = Object.freeze([
|
|
24
35
|
// ── Motion (shipped WAAPI actions — timing row applies) ──────────────────
|
|
25
36
|
{ type: 'fadeIn', labelKey: 'builder.actions.fadeIn', kind: 'animated', group: 'motion', builderBehaviour: 'run' },
|
|
@@ -47,6 +58,18 @@ export const ELEMENT_ACTION_DESCRIPTORS: readonly ActionDescriptor[] = Object.fr
|
|
|
47
58
|
{ value: 'line', labelKey: 'builder.actions.params.byLine' },
|
|
48
59
|
{ value: 'word', labelKey: 'builder.actions.params.byWord' },
|
|
49
60
|
] }] },
|
|
61
|
+
// Premium M6 (N5): a number that counts up ONCE, the first time it comes into view (D4); its final value is always the
|
|
62
|
+
// node's own text, so it is what the page sends. Offered only where it can wait unseen for that moment.
|
|
63
|
+
{ type: 'countUp', labelKey: 'builder.actions.countUp', kind: 'animated', group: 'motion', builderBehaviour: 'run', triggers: COUNT_UP_TRIGGERS,
|
|
64
|
+
params: [{ name: 'from', type: 'number', label: 'builder.actions.params.countFrom' }] },
|
|
65
|
+
// Premium M6 (N7): what the SCROLL plays — a layer at a depth (round three's trio) and a reading bar. Offered under a
|
|
66
|
+
// `scrollProgress` trigger only; the scroll also plays every entrance above.
|
|
67
|
+
{ type: 'parallax', labelKey: 'builder.actions.parallax', kind: 'animated', group: 'motion', builderBehaviour: 'run', triggers: SCROLL_ONLY,
|
|
68
|
+
params: [{ name: 'depth', type: 'string', label: 'builder.actions.params.depth', options: [
|
|
69
|
+
{ value: 'back', labelKey: 'builder.actions.params.depthBack' },
|
|
70
|
+
{ value: 'front', labelKey: 'builder.actions.params.depthFront' },
|
|
71
|
+
] }] },
|
|
72
|
+
{ type: 'progressBar', labelKey: 'builder.actions.progressBar', kind: 'animated', group: 'motion', builderBehaviour: 'run', triggers: SCROLL_ONLY },
|
|
50
73
|
|
|
51
74
|
// ── Visibility (shipped) ─────────────────────────────────────────────────
|
|
52
75
|
{ type: 'show', labelKey: 'builder.actions.show', kind: 'instant', group: 'visibility', builderBehaviour: 'run' },
|
|
@@ -198,9 +221,15 @@ export const CONSENT_ACTION_TYPES: ReadonlySet<string> =
|
|
|
198
221
|
export const ELEMENT_ACTION_GROUP_ORDER: readonly string[] =
|
|
199
222
|
Object.freeze(['motion', 'visibility', 'navigate', 'dialog', 'popover', 'notice', 'item', 'form', 'data', 'consent', 'service']);
|
|
200
223
|
|
|
201
|
-
/**
|
|
202
|
-
export function
|
|
224
|
+
/** True when `d` is offered under `trigger` (its `triggers`, else every trigger) — the picker's rule and the runtimes'. */
|
|
225
|
+
export function actionOfferedUnder(d: Pick<ActionDescriptor, 'triggers'>, trigger: string | null | undefined): boolean {
|
|
226
|
+
return !d.triggers || (!!trigger && d.triggers.includes(trigger));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** The catalog, grouped and ordered for the picker — one derivation, no hand-kept second list. `keep` narrows it (the
|
|
230
|
+
* picker keeps what its trigger offers — `actionOfferedUnder` — and, under `scrollProgress`, what the scroll can play). */
|
|
231
|
+
export function groupedElementActions(keep: (d: ActionDescriptor) => boolean = () => true): ReadonlyArray<{ group: string; actions: ActionDescriptor[] }> {
|
|
203
232
|
return ELEMENT_ACTION_GROUP_ORDER
|
|
204
|
-
.map(group => ({ group, actions: ELEMENT_ACTION_DESCRIPTORS.filter(d => d.group === group) }))
|
|
233
|
+
.map(group => ({ group, actions: ELEMENT_ACTION_DESCRIPTORS.filter(d => d.group === group && keep(d)) }))
|
|
205
234
|
.filter(g => g.actions.length > 0);
|
|
206
235
|
}
|