@aphrody/m3-motion 3.2.4 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aphrody/m3-motion",
3
- "version": "3.2.4",
3
+ "version": "3.2.5",
4
4
  "description": "Material 3 animation plugin powered by Motion (formerly Framer Motion)",
5
5
  "homepage": "https://github.com/aphrody-code/material-web/tree/main/packages/m3-motion#readme",
6
6
  "bugs": {
@@ -35,13 +35,13 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "motion": "^12.40.0"
38
+ "motion": "catalog:"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/react": "^19.2.15",
42
- "react": "^19.2.6",
43
- "tsup": "^8.5.1",
44
- "typescript": "^6.0.3"
41
+ "@types/react": "catalog:",
42
+ "react": "catalog:",
43
+ "tsup": "catalog:",
44
+ "typescript": "catalog:"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "motion": ">=12.0.0",
@@ -1,21 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps } from "motion/react";
3
- export interface M3CollapseProps extends HTMLMotionProps<"div"> {
4
- /**
5
- * If true, the component expands. If false, it collapses.
6
- * If omitted, the component behaves as a standard motion element meant to be unmounted/mounted
7
- * by an external <AnimatePresence>.
8
- */
9
- in?: boolean;
10
- /**
11
- * If true, animate the transition on initial mount.
12
- * @default false
13
- */
14
- appear?: boolean;
15
- }
16
- /**
17
- * M3Collapse transition component.
18
- * Animates the height and opacity of its children, perfect for accordions, menus, or disclosures.
19
- */
20
- export declare const M3Collapse: React.ForwardRefExoticComponent<Omit<M3CollapseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
- //# sourceMappingURL=M3Collapse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3Collapse.d.ts","sourceRoot":"","sources":["../../src/components/M3Collapse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,eAAgB,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC7D;;;;OAIG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,qGAsDtB,CAAC"}
@@ -1,54 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps } from "motion/react";
3
- export interface M3ContainerTransformProps extends HTMLMotionProps<"div"> {
4
- /**
5
- * Shared identifier linking the starting container (e.g., card) and ending container (e.g., detail page).
6
- */
7
- layoutId?: string;
8
- /**
9
- * Speed preset to use for the morphing animation.
10
- * @default "default"
11
- */
12
- speed?: "fast" | "default" | "slow";
13
- /**
14
- * If true, renders the expanded container state.
15
- * @default false
16
- */
17
- isExpanded?: boolean;
18
- }
19
- export interface M3ContainerTransformContextValue {
20
- isExpanded: boolean;
21
- speed: "fast" | "default" | "slow";
22
- }
23
- export declare const M3ContainerTransformContext: React.Context<M3ContainerTransformContextValue | null>;
24
- /**
25
- * M3ContainerTransform component.
26
- * Implements the Material 3 Container Transform motion pattern using shared element transitions.
27
- * Use the same layoutId on both source and target containers to morph them smoothly.
28
- */
29
- export declare const M3ContainerTransform: React.ForwardRefExoticComponent<Omit<M3ContainerTransformProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
30
- export interface M3ContainerTransformStartProps extends HTMLMotionProps<"div"> {
31
- /**
32
- * Overrides the active state. By default, active when isExpanded is false.
33
- */
34
- active?: boolean;
35
- }
36
- /**
37
- * M3ContainerTransformStart component.
38
- * Represents the starting content (e.g., Card content) inside M3ContainerTransform.
39
- * Prevents aspect ratio distortion and fades out during the container transform morph.
40
- */
41
- export declare const M3ContainerTransformStart: React.ForwardRefExoticComponent<Omit<M3ContainerTransformStartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
42
- export interface M3ContainerTransformEndProps extends HTMLMotionProps<"div"> {
43
- /**
44
- * Overrides the active state. By default, active when isExpanded is true.
45
- */
46
- active?: boolean;
47
- }
48
- /**
49
- * M3ContainerTransformEnd component.
50
- * Represents the target content (e.g., Detail page content) inside M3ContainerTransform.
51
- * Prevents aspect ratio distortion and fades in during the container transform morph.
52
- */
53
- export declare const M3ContainerTransformEnd: React.ForwardRefExoticComponent<Omit<M3ContainerTransformEndProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
54
- //# sourceMappingURL=M3ContainerTransform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3ContainerTransform.d.ts","sourceRoot":"","sources":["../../src/components/M3ContainerTransform.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAA2B,MAAM,cAAc,CAAC;AAI7E,MAAM,WAAW,yBAA0B,SAAQ,eAAe,CAAC,KAAK,CAAC;IACvE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CACpC;AAED,eAAO,MAAM,2BAA2B,wDAAqE,CAAC;AAsB9G;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+GA6BhC,CAAC;AAIF,MAAM,WAAW,8BAA+B,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC5E;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,oHAkCrC,CAAC;AAIF,MAAM,WAAW,4BAA6B,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC1E;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,kHAmCnC,CAAC"}
@@ -1,21 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps } from "motion/react";
3
- export interface M3FadeProps extends HTMLMotionProps<"div"> {
4
- /**
5
- * If true, the component will transition in. If false, it will transition out.
6
- * If omitted, the component behaves as a standard motion element meant to be unmounted/mounted
7
- * by an external <AnimatePresence>.
8
- */
9
- in?: boolean;
10
- /**
11
- * If true, animate the transition on initial mount.
12
- * @default true
13
- */
14
- appear?: boolean;
15
- }
16
- /**
17
- * M3Fade transition component.
18
- * Fades elements in/out using Material 3 standard decelerate/accelerate curves.
19
- */
20
- export declare const M3Fade: React.ForwardRefExoticComponent<Omit<M3FadeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
- //# sourceMappingURL=M3Fade.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3Fade.d.ts","sourceRoot":"","sources":["../../src/components/M3Fade.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,WAAY,SAAQ,eAAe,CAAC,KAAK,CAAC;IACzD;;;;OAIG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,iGAwClB,CAAC"}
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps, Transition } from "motion/react";
3
- export interface M3FadeThroughProps extends HTMLMotionProps<"div"> {
4
- /**
5
- * Unique key representing the active view/content. Changing this key triggers the transition.
6
- */
7
- stateKey: React.Key;
8
- /**
9
- * Custom transition for the fade through animation.
10
- */
11
- transition?: Transition;
12
- }
13
- /**
14
- * M3FadeThrough transition component.
15
- * Implements the Material 3 Fade Through navigation pattern.
16
- * The outgoing element fades out over 90ms, followed by the incoming element fading in and scaling up over 210ms.
17
- */
18
- export declare const M3FadeThrough: React.FC<M3FadeThroughProps>;
19
- //# sourceMappingURL=M3FadeThrough.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3FadeThrough.d.ts","sourceRoot":"","sources":["../../src/components/M3FadeThrough.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAG1E,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,KAAK,CAAC;IAChE;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgDtD,CAAC"}
@@ -1,40 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps } from "motion/react";
3
- export interface M3ListStaggerProps {
4
- /**
5
- * Delay between each child item entering the scene (seconds).
6
- * @default 0.05
7
- */
8
- staggerDelay?: number;
9
- /**
10
- * Delay before the stagger sequence starts (seconds).
11
- * @default 0
12
- */
13
- delayChildren?: number;
14
- /**
15
- * If true, items animate on initial render.
16
- * @default true
17
- */
18
- appear?: boolean;
19
- className?: string;
20
- style?: React.CSSProperties;
21
- children?: React.ReactNode;
22
- }
23
- export interface M3ListStaggerItemProps extends HTMLMotionProps<"div"> {
24
- children?: React.ReactNode;
25
- }
26
- /**
27
- * M3ListStagger — stagger container for list-item enter/exit animations.
28
- *
29
- * Usage:
30
- * <M3ListStagger>
31
- * {items.map(item => <M3ListStaggerItem key={item.id}>{item.label}</M3ListStaggerItem>)}
32
- * </M3ListStagger>
33
- */
34
- export declare const M3ListStagger: React.ForwardRefExoticComponent<M3ListStaggerProps & React.RefAttributes<HTMLDivElement>>;
35
- /**
36
- * M3ListStaggerItem — a single animated item inside M3ListStagger.
37
- * Must be a direct or indirect descendant of M3ListStagger to inherit variants.
38
- */
39
- export declare const M3ListStaggerItem: React.ForwardRefExoticComponent<Omit<M3ListStaggerItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
- //# sourceMappingURL=M3ListStagger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3ListStagger.d.ts","sourceRoot":"","sources":["../../src/components/M3ListStagger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAuB,SAAQ,eAAe,CAAC,KAAK,CAAC;IACpE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiCD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,2FAmBzB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4GAa7B,CAAC"}
@@ -1,35 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps, Transition } from "motion/react";
3
- export interface M3SharedAxisProps extends HTMLMotionProps<"div"> {
4
- /**
5
- * If true, the component will transition in. If false, it will transition out.
6
- * If omitted, the component behaves as a standard motion element meant to be unmounted/mounted
7
- * by an external <AnimatePresence>.
8
- */
9
- in?: boolean;
10
- /**
11
- * Axis of translation.
12
- * @default "x"
13
- */
14
- axis?: "x" | "y" | "z";
15
- /**
16
- * Direction of navigation. If true, slides forward/up/zoom-in. If false, slides backward/down/zoom-out.
17
- * @default true
18
- */
19
- forward?: boolean;
20
- /**
21
- * If true, animate the transition on initial mount.
22
- * @default true
23
- */
24
- appear?: boolean;
25
- /**
26
- * Custom transition for the shared axis animation.
27
- */
28
- transition?: Transition;
29
- }
30
- /**
31
- * M3SharedAxis transition component.
32
- * Implements the Material 3 Shared Axis motion pattern (X, Y, Z axes).
33
- */
34
- export declare const M3SharedAxis: React.ForwardRefExoticComponent<Omit<M3SharedAxisProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
- //# sourceMappingURL=M3SharedAxis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3SharedAxis.d.ts","sourceRoot":"","sources":["../../src/components/M3SharedAxis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAG1E,MAAM,WAAW,iBAAkB,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC/D;;;;OAIG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,uGA6DxB,CAAC"}
@@ -1,36 +0,0 @@
1
- import * as React from "react";
2
- import type { HTMLMotionProps, MotionStyle, Variants } from "motion/react";
3
- export type M3TransitionPattern = "fade" | "fade-through" | "shared-axis-x" | "shared-axis-y" | "shared-axis-z" | "collapse";
4
- export interface M3TransitionProps extends Omit<HTMLMotionProps<"div">, "variants" | "style"> {
5
- style?: MotionStyle;
6
- /**
7
- * Unique key representing the active view/content. Changing this key triggers the transition.
8
- */
9
- stateKey: React.Key;
10
- /**
11
- * Which M3 transition pattern to apply.
12
- * @default "fade"
13
- */
14
- pattern?: M3TransitionPattern;
15
- /**
16
- * Direction of navigation for shared-axis-* patterns.
17
- * @default true
18
- */
19
- forward?: boolean;
20
- /**
21
- * Custom variants — overrides the pattern defaults entirely.
22
- */
23
- variants?: Variants;
24
- /**
25
- * AnimatePresence mode.
26
- * @default "wait"
27
- */
28
- mode?: "wait" | "sync" | "popLayout";
29
- }
30
- /**
31
- * M3Transition — generic Material 3 transition wrapper.
32
- * Supports all standard M3 patterns via the `pattern` prop.
33
- * The `stateKey` prop drives AnimatePresence re-mounts.
34
- */
35
- export declare const M3Transition: React.ForwardRefExoticComponent<Omit<M3TransitionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
36
- //# sourceMappingURL=M3Transition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"M3Transition.d.ts","sourceRoot":"","sources":["../../src/components/M3Transition.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGvF,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,cAAc,GACd,eAAe,GACf,eAAe,GACf,eAAe,GACf,UAAU,CAAC;AAEf,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC3F,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CACtC;AA0HD;;;;GAIG;AACH,eAAO,MAAM,YAAY,uGAoCxB,CAAC"}
package/dist/easings.d.ts DELETED
@@ -1,60 +0,0 @@
1
- /**
2
- * Material Design 3 Easing Presets.
3
- * Represented as cubic-bezier array coordinates [x1, y1, x2, y2].
4
- *
5
- * Source of truth: packages/material-web/tokens/versions/v0_192/_md-sys-motion.scss
6
- * and docs/01-md3-spec-foundations.md §7.1
7
- *
8
- * Note on `emphasized`: the full M3 emphasized path is a 2-segment spline
9
- * (not expressible as a single cubic-bezier). The token file maps
10
- * easing-emphasized to cubic-bezier(0.2, 0, 0, 1) — identical to standard —
11
- * because that is the closest single-bezier approximation used in web
12
- * implementations. Use emphasizedDecelerate / emphasizedAccelerate for
13
- * enter/exit transitions respectively (recommended practice per spec §7.1).
14
- */
15
- export declare const m3Easings: {
16
- /** Closest single-bezier approximation. Use emphasizedDecelerate/Accelerate for transitions. */
17
- readonly emphasized: readonly [0.2, 0, 0, 1];
18
- readonly emphasizedDecelerate: readonly [0.05, 0.7, 0.1, 1];
19
- readonly emphasizedAccelerate: readonly [0.3, 0, 0.8, 0.15];
20
- readonly standard: readonly [0.2, 0, 0, 1];
21
- readonly standardDecelerate: readonly [0, 0, 0, 1];
22
- readonly standardAccelerate: readonly [0.3, 0, 1, 1];
23
- readonly linear: readonly [0, 0, 1, 1];
24
- /** Legacy (M2 default) — kept for migration compatibility. */
25
- readonly legacy: readonly [0.4, 0, 0.2, 1];
26
- readonly legacyDecelerate: readonly [0, 0, 0.2, 1];
27
- readonly legacyAccelerate: readonly [0.4, 0, 1, 1];
28
- };
29
- export type M3EasingKey = keyof typeof m3Easings;
30
- export type M3EasingValue = (typeof m3Easings)[M3EasingKey];
31
- /**
32
- * Material Design 3 Duration Presets (in seconds, compatible with Motion duration option).
33
- *
34
- * Canonical values from _md-sys-motion.scss:
35
- * short1=50ms, short2=100ms, short3=150ms, short4=200ms
36
- * medium1=250ms, medium2=300ms, medium3=350ms, medium4=400ms
37
- * long1=450ms, long2=500ms, long3=550ms, long4=600ms
38
- * extraLong1=700ms, extraLong2=800ms, extraLong3=900ms, extraLong4=1000ms
39
- */
40
- export declare const m3Durations: {
41
- readonly short1: 0.05;
42
- readonly short2: 0.1;
43
- readonly short3: 0.15;
44
- readonly short4: 0.2;
45
- readonly medium1: 0.25;
46
- readonly medium2: 0.3;
47
- readonly medium3: 0.35;
48
- readonly medium4: 0.4;
49
- readonly long1: 0.45;
50
- readonly long2: 0.5;
51
- readonly long3: 0.55;
52
- readonly long4: 0.6;
53
- readonly extraLong1: 0.7;
54
- readonly extraLong2: 0.8;
55
- readonly extraLong3: 0.9;
56
- readonly extraLong4: 1;
57
- };
58
- export type M3DurationKey = keyof typeof m3Durations;
59
- export type M3DurationValue = (typeof m3Durations)[M3DurationKey];
60
- //# sourceMappingURL=easings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easings.d.ts","sourceRoot":"","sources":["../src/easings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS;IACpB,gGAAgG;;;;;;;;IAQhG,8DAA8D;;;;CAItD,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,SAAS,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAiBd,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,WAAW,CAAC;AACrD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,aAAa,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- import type { AnimationScope, AnimationPlaybackControlsWithThen, AnimationSequence, SequenceOptions, ElementOrSelector, DOMKeyframesDefinition, AnimationOptions, MotionValue, UnresolvedValueKeyframe, ValueAnimationTransition, ObjectTarget } from "motion/react";
2
- /**
3
- * Overloaded type for the scoped animate function returned by useM3Animate.
4
- * Mirrors the overload set of the underlying motion animate, adding M3 defaults.
5
- */
6
- export interface M3AnimateFn {
7
- (sequence: AnimationSequence, options?: SequenceOptions): AnimationPlaybackControlsWithThen;
8
- (value: string | MotionValue<string>, keyframes: string | UnresolvedValueKeyframe<string>[], options?: ValueAnimationTransition<string>): AnimationPlaybackControlsWithThen;
9
- (value: number | MotionValue<number>, keyframes: number | UnresolvedValueKeyframe<number>[], options?: ValueAnimationTransition<number>): AnimationPlaybackControlsWithThen;
10
- <V extends string | number>(value: V | MotionValue<V>, keyframes: V | UnresolvedValueKeyframe<V>[], options?: ValueAnimationTransition<V>): AnimationPlaybackControlsWithThen;
11
- (element: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions): AnimationPlaybackControlsWithThen;
12
- <O extends object>(object: O | O[], keyframes: ObjectTarget<O>, options?: AnimationOptions): AnimationPlaybackControlsWithThen;
13
- }
14
- /**
15
- * A custom hook wrapping motion's `useAnimate` that injects Material 3 motion defaults
16
- * (emphasized easing and medium2 duration) for all imperative DOM animations.
17
- *
18
- * SSR-safe: useAnimate creates refs; no DOM access occurs at module or render time.
19
- */
20
- export declare function useM3Animate<T extends Element = HTMLElement>(): [AnimationScope<T>, M3AnimateFn];
21
- //# sourceMappingURL=useM3Animate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useM3Animate.d.ts","sourceRoot":"","sources":["../../src/hooks/useM3Animate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,iCAAiC,EACjC,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,uBAAuB,EACvB,wBAAwB,EACxB,YAAY,EACb,MAAM,cAAc,CAAC;AAGtB;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iCAAiC,CAAC;IAC5F,CACE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,EACnC,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,EAAE,EACrD,OAAO,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACzC,iCAAiC,CAAC;IACrC,CACE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,EACnC,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,EAAE,EACrD,OAAO,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACzC,iCAAiC,CAAC;IACrC,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACxB,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EACzB,SAAS,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC,EAAE,EAC3C,OAAO,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACpC,iCAAiC,CAAC;IACrC,CACE,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,sBAAsB,EACjC,OAAO,CAAC,EAAE,gBAAgB,GACzB,iCAAiC,CAAC;IACrC,CAAC,CAAC,SAAS,MAAM,EACf,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EACf,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,EAC1B,OAAO,CAAC,EAAE,gBAAgB,GACzB,iCAAiC,CAAC;CACtC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CA0ChG"}
package/dist/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export * from "./springs.js";
2
- export * from "./easings.js";
3
- export * from "./spring-interpolation.js";
4
- export * from "./components/M3Fade.js";
5
- export * from "./components/M3SharedAxis.js";
6
- export * from "./components/M3FadeThrough.js";
7
- export * from "./components/M3Collapse.js";
8
- export * from "./components/M3ContainerTransform.js";
9
- export * from "./components/M3Transition.js";
10
- export * from "./components/M3ListStagger.js";
11
- export * from "./hooks/useM3Animate.js";
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC"}