@blukavantui/community 1.1.0 → 1.2.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/dist/build-audit.json +127 -65
- package/dist/checkbox.js +1 -1
- package/dist/chunk-4LHIQROI.js +0 -0
- package/dist/chunk-6T677NSC.js +1 -0
- package/dist/chunk-7CEOCZ5L.js +0 -0
- package/dist/chunk-7DXFNK7C.js +1 -0
- package/dist/chunk-CNIIMGT3.js +0 -0
- package/dist/chunk-CSTCEBEK.js +1 -0
- package/dist/chunk-DRZM2AL3.js +0 -0
- package/dist/{chunk-JVE6CXCJ.js → chunk-EPPETNK6.js} +1 -1
- package/dist/chunk-EPPSBHZR.js +1 -0
- package/dist/{chunk-NTFHNL7T.js → chunk-G6OW4OZM.js} +1 -1
- package/dist/chunk-GS67ZBLI.js +1 -0
- package/dist/{chunk-6EHKOVZK.js → chunk-HVR2UDFX.js} +1 -1
- package/dist/chunk-IKYBFMHI.js +1 -0
- package/dist/chunk-KVOA55NE.js +0 -0
- package/dist/{chunk-MZBB5ROJ.js → chunk-LF2HELEZ.js} +1 -1
- package/dist/{chunk-UEOCR2C3.js → chunk-OLDA73XG.js} +2 -2
- package/dist/{chunk-IZJN3EF7.js → chunk-T45FJNEQ.js} +1 -1
- package/dist/chunk-TZSX4OTV.js +1 -0
- package/dist/{chunk-GK3INPAZ.js → chunk-V2YPIC6Z.js} +1 -1
- package/dist/chunk-V4ZQLQ7L.js +0 -0
- package/dist/chunk-VAM3FPCS.js +0 -0
- package/dist/chunk-VSTKXZYY.js +0 -0
- package/dist/chunk-WG4US4JH.js +1 -0
- package/dist/chunk-WGSTNXAQ.js +0 -0
- package/dist/chunk-WJHCVECU.js +1 -0
- package/dist/chunk-Y4AXWTAD.js +0 -0
- package/dist/chunk-YLFXSHKZ.js +0 -0
- package/dist/chunk-ZDGZGAYG.js +0 -0
- package/dist/command-palette.js +1 -1
- package/dist/component-motion.css +39 -0
- package/dist/component-motion.d.ts +45 -0
- package/dist/component-motion.js +1 -0
- package/dist/content.js +1 -1
- package/dist/core.css +8 -0
- package/dist/core.js +1 -1
- package/dist/data-motion.css +4 -0
- package/dist/data-motion.d.ts +23 -0
- package/dist/data-motion.js +1 -0
- package/dist/data.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/date-time-picker.js +1 -1
- package/dist/drawer.js +1 -1
- package/dist/essentials.css +8 -0
- package/dist/feedback.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/index.js +1 -1
- package/dist/inputs.js +1 -1
- package/dist/layout.js +1 -1
- package/dist/modal.js +1 -1
- package/dist/motion/action-feedback.d.ts +14 -0
- package/dist/motion/border-glow.d.ts +12 -0
- package/dist/motion/button.d.ts +11 -0
- package/dist/motion/component-settings.d.ts +51 -0
- package/dist/motion/controller.d.ts +33 -0
- package/dist/motion/effects.d.ts +30 -0
- package/dist/motion/feedback.d.ts +6 -0
- package/dist/motion/loading.d.ts +9 -0
- package/dist/motion/optional.d.ts +35 -0
- package/dist/motion/photo.d.ts +7 -0
- package/dist/motion/presence.d.ts +12 -0
- package/dist/motion/scene.d.ts +10 -0
- package/dist/motion/screen.d.ts +6 -0
- package/dist/motion/scroll-reveal.d.ts +13 -0
- package/dist/motion/settings-group.d.ts +14 -0
- package/dist/motion/stagger.d.ts +12 -0
- package/dist/motion/structure.d.ts +18 -0
- package/dist/motion/tabs.d.ts +19 -0
- package/dist/motion/tokens.d.ts +11 -0
- package/dist/motion/value.d.ts +21 -0
- package/dist/motion/view-transition.d.ts +14 -0
- package/dist/motion-enhancers.d.ts +12 -0
- package/dist/motion-enhancers.js +1 -0
- package/dist/motion-settings.d.ts +3 -0
- package/dist/motion-settings.js +1 -0
- package/dist/motion.css +1076 -0
- package/dist/motion.d.ts +20 -0
- package/dist/motion.js +1 -0
- package/dist/native/form-layout.js +1 -1
- package/dist/native-motion-components.d.ts +3 -0
- package/dist/native-motion-content.d.ts +1 -0
- package/dist/native-motion-foundations.d.ts +3 -0
- package/dist/native-motion-layout.d.ts +3 -0
- package/dist/native-motion-pilot.d.ts +34 -0
- package/dist/native-motion.d.ts +71 -0
- package/dist/notification.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/radio-button.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/sizes.json +273 -151
- package/dist/skeleton.css +8 -0
- package/dist/styles.css +1130 -0
- package/dist/switch.js +1 -1
- package/dist/table.js +1 -1
- package/dist/time-picker.js +1 -1
- package/dist/tree-view.js +1 -1
- package/dist/web-motion/chip-ripple.d.ts +6 -0
- package/dist/web-motion/choice-ripple.d.ts +6 -0
- package/dist/web-motion/content.d.ts +9 -0
- package/dist/web-motion/data-rows.d.ts +12 -0
- package/dist/web-motion/fields.d.ts +6 -0
- package/dist/web-motion/navigation.d.ts +6 -0
- package/dist/web-motion/notifications.d.ts +6 -0
- package/dist/web-motion/select-ripple.d.ts +6 -0
- package/dist/web-motion/statistic.d.ts +13 -0
- package/dist/web-motion/surfaces.d.ts +10 -0
- package/dist/web-motion/tree.d.ts +6 -0
- package/docs/FORM-LAYOUT-ESSENTIALS.md +4 -4
- package/edition.json +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +29 -3
- package/scripts/build-motion-css.mjs +36 -0
- package/scripts/build-motion-styles.mjs +29 -0
- package/scripts/build.mjs +5 -1
- package/scripts/motion-entries.mjs +2 -0
- package/src/component-motion.ts +101 -0
- package/src/data-motion.ts +60 -0
- package/src/form-layout/choice.ts +17 -1
- package/src/motion/action-feedback.ts +38 -0
- package/src/motion/border-glow.ts +41 -0
- package/src/motion/button.ts +56 -0
- package/src/motion/component-settings.ts +147 -0
- package/src/motion/controller.ts +191 -0
- package/src/motion/effects.ts +75 -0
- package/src/motion/feedback.ts +41 -0
- package/src/motion/loading.ts +40 -0
- package/src/motion/optional.ts +123 -0
- package/src/motion/photo.ts +19 -0
- package/src/motion/presence.ts +44 -0
- package/src/motion/scene.ts +103 -0
- package/src/motion/screen.ts +15 -0
- package/src/motion/scroll-reveal.ts +49 -0
- package/src/motion/settings-group.ts +28 -0
- package/src/motion/stagger.ts +26 -0
- package/src/motion/structure.ts +75 -0
- package/src/motion/tabs.ts +105 -0
- package/src/motion/tokens.ts +2 -0
- package/src/motion/value.ts +61 -0
- package/src/motion/view-transition.ts +57 -0
- package/src/motion-enhancers.ts +12 -0
- package/src/motion-settings.ts +3 -0
- package/src/motion.ts +20 -0
- package/src/native-motion-components.ts +76 -0
- package/src/native-motion-content.ts +10 -0
- package/src/native-motion-foundations.ts +56 -0
- package/src/native-motion-layout.ts +35 -0
- package/src/native-motion-pilot.ts +151 -0
- package/src/native-motion.ts +188 -0
- package/src/web-motion/chip-ripple.ts +31 -0
- package/src/web-motion/choice-ripple.ts +30 -0
- package/src/web-motion/content.ts +74 -0
- package/src/web-motion/data-rows.ts +106 -0
- package/src/web-motion/fields.ts +52 -0
- package/src/web-motion/navigation.ts +62 -0
- package/src/web-motion/notifications.ts +67 -0
- package/src/web-motion/select-ripple.ts +23 -0
- package/src/web-motion/statistic.ts +23 -0
- package/src/web-motion/surfaces.ts +137 -0
- package/src/web-motion/tree.ts +44 -0
- package/styles/component-motion.css +39 -0
- package/styles/data-motion.css +4 -0
- package/styles/motion-optional.css +15 -0
- package/styles/motion-presets.css +92 -0
- package/styles/motion-tokens.css +6 -0
- package/styles/motion.css +125 -0
- package/styles/skeleton.css +8 -0
- package/test/component-motion-settings.test.mjs +35 -0
- package/test/content-overlay-motion.test.mjs +36 -0
- package/test/isolation.test.mjs +1 -1
- package/test/motion.test.mjs +215 -0
- package/dist/chunk-GXHANADL.js +0 -1
- /package/dist/{chunk-3PNBQVYS.js → chunk-2BSBXDOT.js} +0 -0
- /package/dist/{chunk-H7ETPJVW.js → chunk-3PODK22R.js} +0 -0
- /package/dist/{chunk-SIU7DSOA.js → chunk-KBWB4OIF.js} +0 -0
- /package/dist/{chunk-OPMD7QNV.js → chunk-W3H7XTA7.js} +0 -0
- /package/dist/{chunk-XWXEH3SW.js → chunk-XVMJG26X.js} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface BorderGlowOptions {
|
|
2
|
+
/** One slow circuit in milliseconds, 4–60 seconds. Default: 12 seconds. */
|
|
3
|
+
duration?: number;
|
|
4
|
+
paused?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Decorative, noninteractive border only. CSS honors the motion scope and OS.
|
|
7
|
+
* Pause automatically while outside the viewport or in a hidden document. */
|
|
8
|
+
export declare function createBorderGlow(element: HTMLElement, options?: BorderGlowOptions): {
|
|
9
|
+
element: HTMLSpanElement;
|
|
10
|
+
update(next: BorderGlowOptions): void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ButtonOptions, ButtonEvents, Component } from '../types.js';
|
|
2
|
+
/** Draft web API; deliberately separate from the shared native Button until review. */
|
|
3
|
+
export interface MotionButtonOptions extends ButtonOptions {
|
|
4
|
+
LoadingLabel?: string;
|
|
5
|
+
SpinnerPosition?: 'Leading' | 'Trailing';
|
|
6
|
+
/** Reserve space for known result labels to avoid shifting surrounding controls. */
|
|
7
|
+
ReserveLabels?: string[];
|
|
8
|
+
/** App-owned completion/failure message, announced outside the busy button. */
|
|
9
|
+
StatusText?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function createMotionButton(host: HTMLElement, initial: MotionButtonOptions, events?: ButtonEvents): Component<MotionButtonOptions>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { MotionEasing } from './effects.js';
|
|
2
|
+
import type { MotionController, MotionMode, MotionOptions, MotionTarget } from './controller.js';
|
|
3
|
+
/** Local 1.2 component contract. Omitted values inherit collection defaults. */
|
|
4
|
+
export interface ComponentMotionSettings {
|
|
5
|
+
mode?: 'inherit' | 'reduced' | 'off';
|
|
6
|
+
/** Override finite component transitions. Does not change spinner speed. Zero is instant. */
|
|
7
|
+
duration?: number;
|
|
8
|
+
easing?: MotionEasing;
|
|
9
|
+
}
|
|
10
|
+
export interface ComponentMotionHandle {
|
|
11
|
+
/** Replace this component's overrides; omit settings to inherit again. */
|
|
12
|
+
setMotion(settings?: ComponentMotionSettings): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function validateComponentMotion(settings: ComponentMotionSettings): ComponentMotionSettings;
|
|
15
|
+
/** Shared presentation state for WAAPI adapters and chart engines. */
|
|
16
|
+
export declare function createComponentMotionState(root: HTMLElement, parent: {
|
|
17
|
+
readonly mode: MotionMode;
|
|
18
|
+
}, initial?: ComponentMotionSettings): {
|
|
19
|
+
mode: () => MotionMode;
|
|
20
|
+
resolveOptions: (options?: MotionOptions) => MotionOptions;
|
|
21
|
+
readonly settings: {
|
|
22
|
+
mode?: "inherit" | "reduced" | "off";
|
|
23
|
+
/** Override finite component transitions. Does not change spinner speed. Zero is instant. */
|
|
24
|
+
duration?: number;
|
|
25
|
+
easing?: MotionEasing;
|
|
26
|
+
};
|
|
27
|
+
update(next: ComponentMotionSettings): void;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
};
|
|
30
|
+
/** Minimal controller contract also usable from a native lifecycle adapter. */
|
|
31
|
+
export interface TransitionMotion {
|
|
32
|
+
readonly mode: MotionMode;
|
|
33
|
+
animate(target: MotionTarget, frames: Keyframe[], options: {
|
|
34
|
+
duration: number;
|
|
35
|
+
easing?: MotionEasing;
|
|
36
|
+
}, reduced?: 'fade' | 'instant'): Promise<unknown>;
|
|
37
|
+
cancel(target: MotionTarget): void;
|
|
38
|
+
}
|
|
39
|
+
export declare function createTransitionMotionScope(root: HTMLElement, parent: TransitionMotion, initial?: ComponentMotionSettings): {
|
|
40
|
+
motion: TransitionMotion;
|
|
41
|
+
update(next: ComponentMotionSettings): void;
|
|
42
|
+
destroy(): void;
|
|
43
|
+
};
|
|
44
|
+
/** An owned view of a shared controller, including portal exit decorations.
|
|
45
|
+
* No second system-preference listener or component event interception is needed.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createComponentMotionScope(root: HTMLElement, parent: MotionController, initial?: ComponentMotionSettings): {
|
|
48
|
+
motion: MotionController;
|
|
49
|
+
update: (next: ComponentMotionSettings) => void;
|
|
50
|
+
destroy: () => void;
|
|
51
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MotionEffect, MotionPhase, MotionEasing, MotionOrigin } from './effects.js';
|
|
2
|
+
export type { MotionEffect, MotionPhase, MotionEasing } from './effects.js';
|
|
3
|
+
export type MotionPreference = 'system' | 'reduced' | 'off';
|
|
4
|
+
export type MotionMode = 'full' | 'reduced' | 'off';
|
|
5
|
+
export type MotionResult = 'finished' | 'cancelled';
|
|
6
|
+
export type MotionTarget = HTMLElement | SVGElement;
|
|
7
|
+
export interface MotionOptions {
|
|
8
|
+
phase?: MotionPhase;
|
|
9
|
+
duration?: number;
|
|
10
|
+
delay?: number;
|
|
11
|
+
easing?: MotionEasing;
|
|
12
|
+
/** Scale/rotation anchor. Does not move or position the target itself. */
|
|
13
|
+
origin?: MotionOrigin;
|
|
14
|
+
}
|
|
15
|
+
export interface MotionController {
|
|
16
|
+
readonly mode: MotionMode;
|
|
17
|
+
readonly preference: MotionPreference;
|
|
18
|
+
setPreference(preference: MotionPreference): void;
|
|
19
|
+
/** Component-scoped timing resolver, used by bounded visual-cleanup deadlines. */
|
|
20
|
+
resolveOptions?(options?: MotionOptions): MotionOptions;
|
|
21
|
+
play(element: HTMLElement, effect?: MotionEffect, options?: MotionOptions): Promise<MotionResult>;
|
|
22
|
+
/** Custom frames use instant reduced motion unless a fade is explicitly requested. */
|
|
23
|
+
animate(element: MotionTarget, frames: Keyframe[], options?: MotionOptions, reduced?: 'instant' | 'fade'): Promise<MotionResult>;
|
|
24
|
+
/** Numeric interpolation shares cancellation and preference handling with other effects. */
|
|
25
|
+
tween(element: MotionTarget, from: number, to: number, render: (value: number) => void, options?: MotionOptions): Promise<MotionResult>;
|
|
26
|
+
cancel(element: MotionTarget): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
}
|
|
29
|
+
export declare function resolveMotionMode(preference: MotionPreference, systemReduced: boolean): MotionMode;
|
|
30
|
+
export declare function boundedTime(value: number | undefined, fallback: number, maximum?: number): number;
|
|
31
|
+
export declare function createMotionController(scope: HTMLElement, initial?: MotionPreference): MotionController;
|
|
32
|
+
/** Solve cubic-bezier x before sampling y, so numeric motion matches CSS timing. */
|
|
33
|
+
export declare function easeProgress(progress: number, easing: MotionEasing): number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Shared preset definitions: used by the controller and the CSS generator. */
|
|
2
|
+
export declare const motionEffects: readonly ["fade", "slide-up", "slide-down", "slide-left", "slide-right", "zoom-in", "zoom-out", "rotate-left", "rotate-right", "flip-x", "flip-y", "pop", "bounce", "wipe-up", "wipe-down", "wipe-left", "wipe-right", "circle-reveal", "blur-clear"];
|
|
3
|
+
export declare const motionOrigins: {
|
|
4
|
+
readonly center: "50% 50%";
|
|
5
|
+
readonly top: "50% 0%";
|
|
6
|
+
readonly bottom: "50% 100%";
|
|
7
|
+
readonly left: "0% 50%";
|
|
8
|
+
readonly right: "100% 50%";
|
|
9
|
+
readonly 'top-left': "0% 0%";
|
|
10
|
+
readonly 'top-right': "100% 0%";
|
|
11
|
+
readonly 'bottom-left': "0% 100%";
|
|
12
|
+
readonly 'bottom-right': "100% 100%";
|
|
13
|
+
};
|
|
14
|
+
export type MotionOrigin = keyof typeof motionOrigins;
|
|
15
|
+
export type MotionPreset = typeof motionEffects[number];
|
|
16
|
+
export type MotionEffect = MotionPreset | 'scale';
|
|
17
|
+
export type MotionPhase = 'enter' | 'exit';
|
|
18
|
+
export declare const motionEasings: {
|
|
19
|
+
readonly standard: "cubic-bezier(.2,.8,.2,1)";
|
|
20
|
+
readonly 'ease-in': "cubic-bezier(.42,0,1,1)";
|
|
21
|
+
readonly 'ease-out': "cubic-bezier(0,0,.58,1)";
|
|
22
|
+
readonly 'ease-in-out': "cubic-bezier(.42,0,.58,1)";
|
|
23
|
+
readonly linear: "linear";
|
|
24
|
+
readonly spring: "cubic-bezier(.34,1.25,.64,1)";
|
|
25
|
+
};
|
|
26
|
+
export type MotionEasing = keyof typeof motionEasings;
|
|
27
|
+
/** Names describe movement: slide-left enters from the right and exits toward the left. */
|
|
28
|
+
export declare function motionFrames(effect: MotionEffect, phase?: MotionPhase, distance?: string): Keyframe[];
|
|
29
|
+
export declare function motionClass(effect: MotionPreset, phase?: MotionPhase): string;
|
|
30
|
+
export declare function motionEasingClass(easing: MotionEasing): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MotionController, MotionOptions } from './controller.js';
|
|
2
|
+
export declare function playFeedback(element: HTMLElement, motion: MotionController, effect: 'highlight' | 'nudge', options?: MotionOptions): Promise<import("./controller.js").MotionResult>;
|
|
3
|
+
/** Decorative feedback only: does not call click, prevent native activation, or alter button state. */
|
|
4
|
+
export declare function createPressFeedback(element: HTMLElement, motion: MotionController): {
|
|
5
|
+
destroy(): void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Component } from '../types.js';
|
|
2
|
+
export interface LoadingIndicatorOptions {
|
|
3
|
+
Label: string;
|
|
4
|
+
Variant?: 'Spinner' | 'Dots' | 'Bar';
|
|
5
|
+
/** Real completion percentage, 0–100. Omit when the amount of work is unknown. */
|
|
6
|
+
Progress?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function normalizeProgress(value: number | undefined): number | undefined;
|
|
9
|
+
export declare function createLoadingIndicator(host: HTMLElement, initial: LoadingIndicatorOptions): Component<LoadingIndicatorOptions>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { MotionController, MotionOptions, MotionResult } from './controller.js';
|
|
2
|
+
/** Responds to an actual click; never synthesizes activation or changes focus. */
|
|
3
|
+
export declare function createRipple(element: HTMLElement, motion: MotionController, options?: MotionOptions & {
|
|
4
|
+
listen?: boolean;
|
|
5
|
+
}): {
|
|
6
|
+
element: HTMLSpanElement;
|
|
7
|
+
play: (point?: {
|
|
8
|
+
clientX: number;
|
|
9
|
+
clientY: number;
|
|
10
|
+
}) => void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
13
|
+
export interface ShimmerOptions {
|
|
14
|
+
duration?: number;
|
|
15
|
+
paused?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Attach to a decorative skeleton only. The caller owns busy/status semantics. */
|
|
18
|
+
export declare function createShimmer(element: HTMLElement, options?: ShimmerOptions): {
|
|
19
|
+
element: HTMLSpanElement;
|
|
20
|
+
update(next: ShimmerOptions): void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
};
|
|
23
|
+
export type MotionIcon = 'chevron' | 'plus-minus' | 'menu-close' | 'save-check';
|
|
24
|
+
/** Owns an empty decorative icon slot only. Labels and aria-expanded/pressed belong to the control. */
|
|
25
|
+
export declare function createIconTransition(host: HTMLElement, motion: MotionController, kind: MotionIcon, initial?: boolean): {
|
|
26
|
+
element: SVGSVGElement;
|
|
27
|
+
setActive(next: boolean, options?: MotionOptions): Promise<MotionResult>;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
};
|
|
30
|
+
/** Persistent selection decoration; never replaces a focus outline. */
|
|
31
|
+
export declare function createEmphasis(element: HTMLElement, motion: MotionController, kind?: 'underline' | 'border'): {
|
|
32
|
+
element: HTMLSpanElement;
|
|
33
|
+
setActive(next: boolean, options?: MotionOptions): Promise<MotionResult>;
|
|
34
|
+
destroy(): void;
|
|
35
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MotionController, MotionResult } from './controller.js';
|
|
2
|
+
import { type TransitionOptions } from './structure.js';
|
|
3
|
+
/** A persistent crop change inside an overflow-hidden frame; does not fade the photo away. */
|
|
4
|
+
export declare function createPhotoZoom(image: HTMLImageElement, motion: MotionController, maximum?: number): {
|
|
5
|
+
setZoomed(zoomed: boolean, options?: TransitionOptions): Promise<MotionResult>;
|
|
6
|
+
destroy(): void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MotionController, MotionEffect, MotionOptions, MotionResult } from './controller.js';
|
|
2
|
+
export interface PresenceOptions extends Omit<MotionOptions, 'phase'> {
|
|
3
|
+
effect?: MotionEffect;
|
|
4
|
+
/** Required when hiding an element that currently contains keyboard focus. */
|
|
5
|
+
focusFallback?: HTMLElement;
|
|
6
|
+
}
|
|
7
|
+
/** Owns hidden/inert for a mounted element. Use for panels, cards and menus; no router dependency. */
|
|
8
|
+
export declare function createMotionPresence(element: HTMLElement, motion: MotionController): {
|
|
9
|
+
show(options?: PresenceOptions): Promise<MotionResult>;
|
|
10
|
+
hide(options?: PresenceOptions): Promise<MotionResult>;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MotionController, MotionResult } from './controller.js';
|
|
2
|
+
import { type TransitionOptions } from './structure.js';
|
|
3
|
+
export declare function createCrossfade(host: HTMLElement, motion: MotionController): {
|
|
4
|
+
show(next: HTMLElement, options?: TransitionOptions): Promise<MotionResult>;
|
|
5
|
+
destroy(): void;
|
|
6
|
+
};
|
|
7
|
+
export declare function createSharedElementTransition(host: HTMLElement, motion: MotionController): {
|
|
8
|
+
show(next: HTMLElement, options?: TransitionOptions): Promise<MotionResult>;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MotionController, MotionResult } from './controller.js';
|
|
2
|
+
/** Enhance an already-rendered container. The host owns visibility, DOM and navigation. */
|
|
3
|
+
export declare function createScreenMotion(scope: HTMLElement, motion: MotionController): {
|
|
4
|
+
enter(element: HTMLElement, key: string): Promise<MotionResult>;
|
|
5
|
+
destroy(): void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MotionController, MotionEffect, MotionOptions } from './controller.js';
|
|
2
|
+
export interface ScrollRevealOptions extends Omit<MotionOptions, 'phase'> {
|
|
3
|
+
effect?: MotionEffect;
|
|
4
|
+
once?: boolean;
|
|
5
|
+
threshold?: number;
|
|
6
|
+
root?: Element | Document | null;
|
|
7
|
+
rootMargin?: string;
|
|
8
|
+
onReveal?: (element: HTMLElement) => void;
|
|
9
|
+
}
|
|
10
|
+
/** Progressive enhancement: nothing is hidden before the observer runs or when JS is unavailable. */
|
|
11
|
+
export declare function createScrollReveal(targets: Iterable<HTMLElement>, motion: MotionController, options?: ScrollRevealOptions): {
|
|
12
|
+
destroy(): void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentMotionSettings } from './component-settings.js';
|
|
2
|
+
/** Settings only: factories keep ownership of their components and business state. */
|
|
3
|
+
export declare function createMotionSettingsGroup(initial?: ComponentMotionSettings): {
|
|
4
|
+
readonly settings: {
|
|
5
|
+
mode?: "inherit" | "reduced" | "off";
|
|
6
|
+
duration?: number;
|
|
7
|
+
easing?: import("./effects.js").MotionEasing;
|
|
8
|
+
};
|
|
9
|
+
configure(next?: ComponentMotionSettings): void;
|
|
10
|
+
bind(update: (settings: ComponentMotionSettings) => void): {
|
|
11
|
+
setMotion(next?: ComponentMotionSettings): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MotionController, MotionEffect, MotionOptions, MotionResult } from './controller.js';
|
|
2
|
+
export type StaggerOrder = 'forward' | 'reverse' | 'center' | 'rows' | 'columns';
|
|
3
|
+
export interface StaggerOptions extends MotionOptions {
|
|
4
|
+
gap?: number;
|
|
5
|
+
order?: StaggerOrder;
|
|
6
|
+
/** Used for row/column sequences. Supply the current rendered column count. */
|
|
7
|
+
columns?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Logical ranks only: never reorder the DOM or change reading/tab order. */
|
|
10
|
+
export declare function staggerRanks(count: number, order?: StaggerOrder, columns?: number): number[];
|
|
11
|
+
/** A bounded entrance/exit sequence. Reduced/Off modes suppress delays in the controller. */
|
|
12
|
+
export declare function playStagger(motion: MotionController, elements: Iterable<HTMLElement>, effect?: MotionEffect, options?: StaggerOptions): Promise<MotionResult[]>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { MotionController, MotionOptions, MotionResult } from './controller.js';
|
|
2
|
+
export type TransitionOptions = Omit<MotionOptions, 'phase'>;
|
|
3
|
+
/** Save only owned declarations, preserving unrelated inline styles and priorities. */
|
|
4
|
+
export declare function preserveStyles(element: HTMLElement | SVGElement, properties: string[]): () => void;
|
|
5
|
+
export declare function moveFocusOut(element: HTMLElement, fallback?: HTMLElement): void;
|
|
6
|
+
/** Animate an unpadded outer wrapper; put padding/borders in its child. Handles auto dimensions. */
|
|
7
|
+
export declare function createSizeTransition(element: HTMLElement, motion: MotionController, axis?: 'height' | 'width'): {
|
|
8
|
+
setOpen(open: boolean, options?: TransitionOptions & {
|
|
9
|
+
focusFallback?: HTMLElement;
|
|
10
|
+
}): Promise<MotionResult>;
|
|
11
|
+
resize(change: () => void, options?: TransitionOptions): Promise<MotionResult>;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
};
|
|
14
|
+
/** FLIP movement for retained DOM nodes. The caller owns data changes and removed nodes. */
|
|
15
|
+
export declare function createLayoutTransition(container: HTMLElement, motion: MotionController): {
|
|
16
|
+
update(elements: HTMLElement[], change: () => void, options?: TransitionOptions): Promise<MotionResult>;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { MotionController, MotionResult } from './controller.js';
|
|
2
|
+
export interface MotionTab {
|
|
3
|
+
key: string;
|
|
4
|
+
tab: HTMLButtonElement;
|
|
5
|
+
panel: HTMLElement;
|
|
6
|
+
}
|
|
7
|
+
export interface MotionTabsOptions {
|
|
8
|
+
/** Automatic selects with arrows. Manual selects with Enter/Space. */
|
|
9
|
+
activation?: 'automatic' | 'manual';
|
|
10
|
+
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
onChange?: (key: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/** Local web helper for app-owned tabs. Panels remain mounted, preserving input state.
|
|
14
|
+
* Supply unique tab/panel IDs, a labelled tablist and one shared panel container. */
|
|
15
|
+
export declare function createMotionTabs(tablist: HTMLElement, items: MotionTab[], motion: MotionController, options?: MotionTabsOptions): {
|
|
16
|
+
readonly activeKey: string;
|
|
17
|
+
select: (key: string) => Promise<MotionResult>;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Shared opt-in defaults in milliseconds. Explicit zero remains instant. */
|
|
2
|
+
export declare const motionTiming: Readonly<{
|
|
3
|
+
fast: 280;
|
|
4
|
+
normal: 450;
|
|
5
|
+
slow: 750;
|
|
6
|
+
layout: 650;
|
|
7
|
+
highlight: 1400;
|
|
8
|
+
reduced: 200;
|
|
9
|
+
maxDuration: 2000;
|
|
10
|
+
maxDelay: 500;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MotionController, MotionResult } from './controller.js';
|
|
2
|
+
import { type TransitionOptions } from './structure.js';
|
|
3
|
+
export declare function finiteValue(value: number): number;
|
|
4
|
+
/** Visual fill only. Owner supplies the real value and progress semantics. */
|
|
5
|
+
export declare function createProgressTransition(fill: HTMLElement, motion: MotionController, initial?: number): {
|
|
6
|
+
set(next: number, options?: TransitionOptions): Promise<MotionResult>;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
};
|
|
9
|
+
/** SVG drawing or measured progress, normalized to 0–100 without guessing path length. */
|
|
10
|
+
export declare function createStrokeTransition(path: SVGGeometryElement, motion: MotionController, initial?: number): {
|
|
11
|
+
set(next: number, options?: TransitionOptions): Promise<MotionResult>;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
};
|
|
14
|
+
/** One stable accessible value. Intermediate visual numbers are never live announcements. */
|
|
15
|
+
export declare function createNumberTransition(element: HTMLElement, motion: MotionController, options: {
|
|
16
|
+
value: number;
|
|
17
|
+
format?: (value: number) => string;
|
|
18
|
+
}): {
|
|
19
|
+
set(next: number, timing?: TransitionOptions): Promise<MotionResult>;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { MotionController, MotionEffect, MotionResult } from './controller.js';
|
|
2
|
+
export interface ViewTransitionOptions {
|
|
3
|
+
effect?: MotionEffect | 'instant';
|
|
4
|
+
/** Container scroll only. Routing, browser history and document scroll stay app-owned. */
|
|
5
|
+
scroll?: 'preserve' | 'top';
|
|
6
|
+
/** Entrance duration; exit uses 280 ms. */
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Replace one workspace/page outlet. Latest request wins; no document/router interception. */
|
|
10
|
+
export declare function createViewTransition(host: HTMLElement, motion: MotionController): {
|
|
11
|
+
show(next: HTMLElement, options?: ViewTransitionOptions): Promise<MotionResult>;
|
|
12
|
+
cancel(): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** DOM-only adapters. Attach after the component mounts; dispose before its root. */
|
|
2
|
+
export * from './web-motion/data-rows.js';
|
|
3
|
+
export * from './web-motion/content.js';
|
|
4
|
+
export * from './web-motion/statistic.js';
|
|
5
|
+
export * from './web-motion/tree.js';
|
|
6
|
+
export * from './web-motion/navigation.js';
|
|
7
|
+
export * from './web-motion/notifications.js';
|
|
8
|
+
export * from './web-motion/fields.js';
|
|
9
|
+
export * from './web-motion/surfaces.js';
|
|
10
|
+
export * from './web-motion/chip-ripple.js';
|
|
11
|
+
export * from './web-motion/choice-ripple.js';
|
|
12
|
+
export * from './web-motion/select-ripple.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as I,b as D,c as P,d as j}from"./chunk-WJHCVECU.js";import{a as B}from"./chunk-WG4US4JH.js";import{d as O,e as A}from"./chunk-IKYBFMHI.js";import{a as R,g as V}from"./chunk-6T677NSC.js";function U(e,u,a,p={}){let c=!1,s=0,y=0,o=new Map,r=new WeakMap,d=t=>{let i=r.get(t);return i||(i="node-"+ ++y,r.set(t,i)),i},b=(t,i,l=650,m=!1)=>{let v=++y;o.set(t,v),u.animate(t,i,{duration:l,easing:"ease-in-out"},m?"fade":"instant").finally(()=>{o.get(t)===v&&o.delete(t)})};function g(){let t=e.getBoundingClientRect(),i=[],l=(n,E,T=()=>"")=>{[...e.querySelectorAll(n)].slice(0,40).forEach((M,N)=>{let C=M.getBoundingClientRect(),F=o.has(M)?getComputedStyle(M).translate.split(/\s+/).map(Number.parseFloat):[],w=new DOMRect(C.left-t.left-(F[0]||0),C.top-t.top-(F[1]||0),C.width,C.height);w.width&&w.height&&!M.closest("[hidden]")&&i.push([E(M,N),{el:M,rect:w,signature:T(M)}])})};a==="collection-layout"&&l(".blu-collection-layout__item",d),a==="timeline"&&l(".blu-timeline__item",(n,E)=>p.timelineKeys?.()[E]||n.querySelector("h3")?.textContent||d(n)),a==="transfer"&&l(".blu-transfer__row",n=>n.dataset.key||n.querySelector(".blu-transfer__label")?.textContent||d(n)),a==="chip"&&l(".blu-chip",n=>n.querySelector(".blu-chip__select,.blu-chip__label")?.textContent||d(n),n=>String(n.classList.contains("blu-chip--selected"))),a==="tree-select"&&l(".blu-tree-select__item[data-key] > .blu-tree-select__row",n=>n.parentElement.dataset.key),a==="cascader"&&l(".blu-cascader__column",(n,E)=>"column-"+E,n=>n.textContent||""),a==="tour"&&l(".blu-tour__panel",()=>"tour-step",n=>n.textContent||""),a==="notification-center"&&(l(".blu-notification-center__list",()=>"inbox",n=>n.textContent||""),l(".blu-notification-center__item",n=>n.querySelector("[data-focus]")?.getAttribute("data-focus")||d(n),n=>n.className)),a==="skeleton"&&l("[aria-busy]",()=>"loading-content",n=>n.getAttribute("aria-busy")||"");let m=new Map,v=new Set;for(let[n,E]of i)m.has(n)&&v.add(n),m.set(n,E);for(let n of v)m.delete(n);return m}let h=g(),_=()=>{s||(h=g())};function L(){if(s=0,c)return;let t=g();for(let[i,l]of t){let m=h.get(i);if(!m){b(l.el,[{opacity:0},{opacity:1}],450,!0);continue}let v=m.rect.left-l.rect.left,n=m.rect.top-l.rect.top;a!=="tour"&&(Math.abs(v)>1||Math.abs(n)>1)?b(l.el,[{translate:`${v}px ${n}px`},{translate:"0px 0px"}]):m.signature!==l.signature&&b(l.el,[{opacity:.55},{opacity:1}],450,!0)}for(let i of o.keys())e.contains(i)||(u.cancel(i),o.delete(i));h=t}let f=new MutationObserver(()=>{s||(s=requestAnimationFrame(L))});f.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","class","aria-selected","aria-checked","style"]});for(let t of["click","change","input","keydown","pointerdown"])e.addEventListener(t,_,!0);let x=e.getAttribute("data-blu-content-motion");e.setAttribute("data-blu-content-motion",a);let K=a==="cascader"||a==="tree-select"?I(e,u,a):void 0,H=new Map;function S(){for(let t of e.querySelectorAll(".blu-overlay,.blu-tour")){if(t.closest("[data-blu-content-motion]")!==e)continue;let i=H.get(t);i||(i={open:!1,revision:0,restore:()=>{}},H.set(t,i));let l=!t.hidden;if(l===i.open)continue;i.open=l;let m=++i.revision;if(i.restore(),u.cancel(t),l){u.play(t,"fade",{duration:450});continue}if(u.mode==="off")continue;let v=R(t,["display","pointer-events"]),n=t.inert,E=t.getAttribute("aria-hidden"),T;i.restore=()=>{clearTimeout(T),v(),t.inert=n,E===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",E)},t.inert=!0,t.setAttribute("aria-hidden","true"),t.style.setProperty("display","flex","important"),t.style.pointerEvents="none";let M=()=>{!c&&i.revision===m&&(i.restore(),i.restore=()=>{})};T=setTimeout(M,(u.resolveOptions?.({duration:450}).duration??450)+100),u.animate(t,[{opacity:1},{opacity:0}],{duration:450,easing:"ease-in-out"},"fade").finally(M)}}let k=new MutationObserver(S);["profile-card","video-lightbox","collection-layout","media-image","tour"].includes(a)&&(k.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["hidden"]}),S());let q=t=>{let i=t.target;i.tagName==="VIDEO"&&queueMicrotask(()=>{if(c||!e.contains(i))return;let l=i.closest(".blu-video-player"),m=l?.querySelector(".blu-video-player__pause-glass"),v=i.paused&&m&&!m.hidden&&getComputedStyle(m).display!=="none"?m:l?.querySelector(".blu-video-player__primary");v&&b(v,[{opacity:.4},{opacity:1}],450,!0)})};for(let t of["play","pause","waiting","loadeddata"])e.addEventListener(t,q,!0);return{capture:_,destroy(){if(!c){c=!0,f.disconnect(),k.disconnect(),cancelAnimationFrame(s),K?.destroy();for(let[t,i]of H)i.revision++,i.restore(),u.cancel(t);for(let t of o.keys())u.cancel(t);o.clear();for(let t of["click","change","input","keydown","pointerdown"])e.removeEventListener(t,_,!0);x===null?e.removeAttribute("data-blu-content-motion"):e.setAttribute("data-blu-content-motion",x);for(let t of["play","pause","waiting","loadeddata"])e.removeEventListener(t,q,!0)}}}}function z(e,u,a){let p=e.getAttribute("data-blu-component-motion");e.setAttribute("data-blu-component-motion","statistic");let c=!1,s=null,y=a().Value??0,o,r=()=>{if(c)return;let b=e.querySelector(".blu-statistic__value > strong");if(b===s||(o?.destroy(),o=void 0,s=b,!b))return;let g=a(),h=Number(g.Value??0);if(!Number.isFinite(h))return;let _=new Intl.NumberFormat(g.Locale||"en-US",{minimumFractionDigits:g.Precision??0,maximumFractionDigits:g.Precision??0});o=O(b,u,{value:y,format:L=>_.format(L)}),o.set(h,{duration:750,easing:"ease-in-out"}),y=h};r();let d=new MutationObserver(r);return d.observe(e,{childList:!0,subtree:!0}),{capture(){},destroy(){c||(c=!0,d.disconnect(),o?.destroy(),p===null?e.removeAttribute("data-blu-component-motion"):e.setAttribute("data-blu-component-motion",p))}}}function Q(e,u){let a=!1,p=0,c=0,s,y=o=>{let r=o.target instanceof Element?o.target.closest(".blu-chip__select"):null;if(!r||!e.contains(r)||r.disabled)return;let d=[...e.querySelectorAll(".blu-chip__select")],b=r.textContent,g=d.filter(f=>f.textContent===b).indexOf(r),h=r.getAttribute("aria-pressed"),_=o.detail?{clientX:o.clientX,clientY:o.clientY}:void 0,L=++p;cancelAnimationFrame(c),c=requestAnimationFrame(()=>{if(c=0,a||L!==p)return;s?.destroy(),s=void 0;let f=r.isConnected?r:[...e.querySelectorAll(".blu-chip__select")].filter(x=>x.textContent===b)[g];!f||f.disabled||u.mode!=="full"||o.defaultPrevented&&f.getAttribute("aria-pressed")===h||(s=A(f,u,{duration:1e3,easing:"ease-out",listen:!1}),s.play(_))})};return e.addEventListener("click",y,!0),{destroy(){a||(a=!0,++p,cancelAnimationFrame(c),e.removeEventListener("click",y,!0),s?.destroy())}}}function te(e,u,a={}){let p=!1,c=0,s,y=o=>{let r=o.target;if(!(r instanceof HTMLInputElement)||!r.matches(".blu-choice__input")||r.disabled||r.getAttribute("aria-readonly")==="true")return;let d=r.name,b=r.value,g=r.type,h=()=>[...e.querySelectorAll(".blu-choice__input")].filter(f=>f.name===d&&f.value===b&&f.type===g),_=h().indexOf(r),L=r.checked;cancelAnimationFrame(c),c=requestAnimationFrame(()=>{if(c=0,p||o.defaultPrevented||u.mode!=="full")return;let f=e.contains(r)?r:h()[_];if(!f||f.disabled||f.getAttribute("aria-readonly")==="true"||f.checked!==L)return;let x=f.nextElementSibling;x?.classList.contains("blu-choice__mark")&&(s?.destroy(),s=A(x,u,{duration:1e3,easing:"ease-out",...a,listen:!1}),s.element.classList.add("blu-motion-choice-ripple"),s.play())})};return e.addEventListener("click",y,!0),e.addEventListener("change",y,!0),{destroy(){p||(p=!0,cancelAnimationFrame(c),e.removeEventListener("click",y,!0),e.removeEventListener("change",y,!0),s?.destroy())}}}function ie(e,u,a={}){let p=!1,c=0,s,y=()=>e.querySelector(".blu-select__trigger")?.getAttribute("aria-expanded")+"|"+e.querySelector(".blu-select__native")?.value,o=r=>{if(!(r.target instanceof Element)||!r.target.closest(".blu-select"))return;let d=e.querySelector(".blu-select__trigger");if(!d||d.disabled||d.getAttribute("aria-readonly")==="true"||r instanceof KeyboardEvent&&!["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(r.key))return;let b=y(),g=r instanceof MouseEvent&&r.detail>0&&r.target.closest(".blu-select__trigger")?{clientX:r.clientX,clientY:r.clientY}:void 0;cancelAnimationFrame(c),c=requestAnimationFrame(()=>{c=0,!(p||!e.contains(d)||d.disabled||u.mode!=="full"||y()===b)&&(s?.destroy(),s=A(d,u,{duration:1e3,easing:"ease-out",...a,listen:!1}),s.play(g))})};return e.addEventListener("click",o,!0),e.addEventListener("keydown",o,!0),{destroy(){p||(p=!0,cancelAnimationFrame(c),e.removeEventListener("click",o,!0),e.removeEventListener("keydown",o,!0),s?.destroy())}}}export{Q as enhanceChipRipple,te as enhanceChoiceRipple,U as enhanceContentMotion,B as enhanceDataRows,j as enhanceField,V as enhanceNavigation,P as enhanceNotifications,ie as enhanceSelectRipple,z as enhanceStatistic,D as enhanceTree,I as observeSurface};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"./chunk-GS67ZBLI.js";import{a as o,b as r,c as e,d as f}from"./chunk-EPPSBHZR.js";import"./chunk-CSTCEBEK.js";export{f as createComponentMotionScope,r as createComponentMotionState,m as createMotionSettingsGroup,e as createTransitionMotionScope,o as validateComponentMotion};
|