@vectoriox/iox-ui 4.4.4 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -812,5 +812,107 @@ interface DataSourceRequest {
|
|
|
812
812
|
*/
|
|
813
813
|
declare function dataSourcePlanToRequest(plan: DataSourcePlan, endpoints: DataSourceEndpoints): DataSourceRequest | null;
|
|
814
814
|
|
|
815
|
-
|
|
816
|
-
|
|
815
|
+
/**
|
|
816
|
+
* Cinematic page-transition presets — the SINGLE SOURCE OF TRUTH shared by the page builder
|
|
817
|
+
* (preview) and the SSR client engine (production). Pure, transport-agnostic: this module only
|
|
818
|
+
* describes WAAPI keyframe pairs + timing/ordering. It never touches the DOM.
|
|
819
|
+
*
|
|
820
|
+
* A page transition plays TWO synchronized WAAPI animations at once — an `out` animation on a
|
|
821
|
+
* snapshot of the outgoing page and an `in` animation on the incoming page — inside a shared
|
|
822
|
+
* `perspective` container, gated on BOTH finishing (the "cinematic" feel, à la Codrops
|
|
823
|
+
* PageTransitions). The consumer supplies the DOM (snapshot layer + live page) and calls
|
|
824
|
+
* `element.animate(frames, options)`; it does NOT redefine the frames.
|
|
825
|
+
*
|
|
826
|
+
* @see architecture/builder/page-transitions.md
|
|
827
|
+
*/
|
|
828
|
+
/** Perspective (px) applied to the transition container unless a preset overrides it. */
|
|
829
|
+
declare const DEFAULT_PAGE_TRANSITION_PERSPECTIVE = 1200;
|
|
830
|
+
/** Default transition duration (ms) when the page does not specify one. */
|
|
831
|
+
declare const DEFAULT_PAGE_TRANSITION_DURATION = 600;
|
|
832
|
+
type PageTransitionCategory = 'move' | 'fade' | 'scale' | 'rotate';
|
|
833
|
+
interface PageTransitionPreset {
|
|
834
|
+
category: PageTransitionCategory;
|
|
835
|
+
label: string;
|
|
836
|
+
/** Keyframes for the OUTGOING page (played on a fixed snapshot). */
|
|
837
|
+
outKeyframes: Keyframe[];
|
|
838
|
+
/** Keyframes for the INCOMING page. */
|
|
839
|
+
inKeyframes: Keyframe[];
|
|
840
|
+
/** Which layer is stacked on top during the transition. Default: 'in'. */
|
|
841
|
+
ontop?: 'in' | 'out';
|
|
842
|
+
/** `transform-origin` for the outgoing layer (3D hinge effects). */
|
|
843
|
+
outTransformOrigin?: string;
|
|
844
|
+
/** `transform-origin` for the incoming layer. */
|
|
845
|
+
inTransformOrigin?: string;
|
|
846
|
+
/** Override the container perspective (px) for this preset. */
|
|
847
|
+
perspective?: number;
|
|
848
|
+
/** Delay before the OUT animation starts, as a fraction (0..1) of the duration. */
|
|
849
|
+
outDelayRatio?: number;
|
|
850
|
+
/** Delay before the IN animation starts, as a fraction (0..1) of the duration. */
|
|
851
|
+
inDelayRatio?: number;
|
|
852
|
+
}
|
|
853
|
+
declare const PAGE_TRANSITION_PRESETS: Record<string, PageTransitionPreset>;
|
|
854
|
+
interface PageTransitionCategoryMeta {
|
|
855
|
+
value: PageTransitionCategory;
|
|
856
|
+
label: string;
|
|
857
|
+
presets: {
|
|
858
|
+
value: string;
|
|
859
|
+
label: string;
|
|
860
|
+
}[];
|
|
861
|
+
}
|
|
862
|
+
/** Built from PAGE_TRANSITION_PRESETS so the two lists can never drift apart. */
|
|
863
|
+
declare const PAGE_TRANSITION_CATEGORIES: PageTransitionCategoryMeta[];
|
|
864
|
+
interface PageTransitionOptions {
|
|
865
|
+
/** Total transition duration (ms). */
|
|
866
|
+
duration?: number;
|
|
867
|
+
easing?: string;
|
|
868
|
+
/** Container perspective (px); a preset-specific perspective still wins. */
|
|
869
|
+
perspective?: number;
|
|
870
|
+
}
|
|
871
|
+
interface ResolvedPageTransition {
|
|
872
|
+
outFrames: Keyframe[];
|
|
873
|
+
inFrames: Keyframe[];
|
|
874
|
+
outOptions: KeyframeAnimationOptions;
|
|
875
|
+
inOptions: KeyframeAnimationOptions;
|
|
876
|
+
ontop: 'in' | 'out';
|
|
877
|
+
perspective: number;
|
|
878
|
+
outTransformOrigin?: string;
|
|
879
|
+
inTransformOrigin?: string;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Resolve a persisted preset id + timing into the two WAAPI animations the consumer runs.
|
|
883
|
+
* Returns `null` for unknown / 'none' presets (caller should skip the transition).
|
|
884
|
+
*/
|
|
885
|
+
declare function resolvePageTransition(name: string | null | undefined, opts?: PageTransitionOptions): ResolvedPageTransition | null;
|
|
886
|
+
type TransitionPhase = 'leave' | 'transition' | 'enter';
|
|
887
|
+
interface TransitionTimelineInput {
|
|
888
|
+
/** At least one element on the outgoing page has a `pageLeave` interaction. */
|
|
889
|
+
hasLeave: boolean;
|
|
890
|
+
/** A page transition preset is configured (and not 'none'). */
|
|
891
|
+
hasTransition: boolean;
|
|
892
|
+
/** At least one element on the incoming page has a `pageEnter` interaction. */
|
|
893
|
+
hasEnter: boolean;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* The ordered phases a navigation runs, given what is present. The order is INVARIANT:
|
|
897
|
+
* every element `leave` animation finishes before the page `transition` starts, and the page
|
|
898
|
+
* `transition` finishes before any element `enter` animation begins. Phases with nothing to
|
|
899
|
+
* play are omitted. The engine iterates this list and `await`s each phase's completion.
|
|
900
|
+
*/
|
|
901
|
+
declare function buildTransitionTimeline(input: TransitionTimelineInput): TransitionPhase[];
|
|
902
|
+
/**
|
|
903
|
+
* Map a legacy `enter` preset (none/fade/slideUp/slideDown/zoomIn/zoomOut/blurIn/flip) to the
|
|
904
|
+
* nearest cinematic paired `transition` id, so pages saved before this system keep animating.
|
|
905
|
+
* Returns 'fade' for anything unmapped, and 'none' for 'none'.
|
|
906
|
+
*/
|
|
907
|
+
declare function legacyEnterToTransition(enter: string | null | undefined): string;
|
|
908
|
+
/**
|
|
909
|
+
* Resolve the effective transition id for a page's route-animation settings: the explicit
|
|
910
|
+
* `transition` when present, otherwise migrated from the legacy `enter` preset.
|
|
911
|
+
*/
|
|
912
|
+
declare function effectiveTransitionId(anim: {
|
|
913
|
+
transition?: string | null;
|
|
914
|
+
enter?: string | null;
|
|
915
|
+
} | null | undefined): string;
|
|
916
|
+
|
|
917
|
+
export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CardComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SectionComponent, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, buildDataSourceFilter, buildTransitionTimeline, compileDeclarations, composeVirtualTraits, dataSourcePlanToRequest, effectiveTransitionId, legacyEnterToTransition, matchRouteParams, normalizeCollectionResult, planDataSource, renderDefaultDeclarations, resolvePageTransition, resolveSingleItemId, rewriteViewportUnits, styleKeyToKebab };
|
|
918
|
+
export type { DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, IBuilderEventEmitter, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, ResolvedPageTransition, TransitionPhase, TransitionTimelineInput };
|