@bug-on/m3-expressive 1.3.5 → 1.3.6

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/forms.d.mts +2 -2
  3. package/dist/forms.d.ts +2 -2
  4. package/dist/forms.js +16 -6
  5. package/dist/forms.js.map +1 -1
  6. package/dist/forms.mjs +16 -6
  7. package/dist/forms.mjs.map +1 -1
  8. package/dist/index.d.mts +4 -4
  9. package/dist/index.d.ts +4 -4
  10. package/dist/index.js +722 -187
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.mjs +718 -188
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/{md3-expressive-shapes-CPcfl_Hf.d.mts → md3-expressive-shapes-wk_98LJh.d.mts} +20 -1
  15. package/dist/{md3-expressive-shapes-CPcfl_Hf.d.ts → md3-expressive-shapes-wk_98LJh.d.ts} +20 -1
  16. package/dist/navigation.d.mts +1 -1
  17. package/dist/navigation.d.ts +1 -1
  18. package/dist/navigation.js +73 -20
  19. package/dist/navigation.js.map +1 -1
  20. package/dist/navigation.mjs +73 -20
  21. package/dist/navigation.mjs.map +1 -1
  22. package/dist/overlays.d.mts +4 -2
  23. package/dist/overlays.d.ts +4 -2
  24. package/dist/overlays.js +84 -43
  25. package/dist/overlays.js.map +1 -1
  26. package/dist/overlays.mjs +84 -43
  27. package/dist/overlays.mjs.map +1 -1
  28. package/dist/pickers.js +88 -55
  29. package/dist/pickers.js.map +1 -1
  30. package/dist/pickers.mjs +88 -55
  31. package/dist/pickers.mjs.map +1 -1
  32. package/dist/shapes.d.mts +141 -15
  33. package/dist/shapes.d.ts +141 -15
  34. package/dist/shapes.js +618 -126
  35. package/dist/shapes.js.map +1 -1
  36. package/dist/shapes.mjs +614 -127
  37. package/dist/shapes.mjs.map +1 -1
  38. package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-BycxrabB.d.mts} +70 -0
  39. package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-Cw4vemKx.d.ts} +70 -0
  40. package/dist/{text-field-4OlT9o8s.d.mts → text-field-B1fLh5Sh.d.mts} +22 -3
  41. package/dist/{text-field-DARNdj14.d.ts → text-field-C0VQLp8Y.d.ts} +22 -3
  42. package/llms-full.txt +7 -0
  43. package/package.json +1 -1
package/dist/shapes.d.mts CHANGED
@@ -1,7 +1,50 @@
1
- import { R as RoundedPolygon, a as CornerRounding, b as Cubic, e as MutableCubic, M as MD3ShapeName } from './md3-expressive-shapes-CPcfl_Hf.mjs';
2
- export { A as ANGLE_EPSILON, C as CornerFeature, D as DISTANCE_EPSILON, E as EdgeFeature, F as FLOAT_PI, c as Feature, d as MD3Shapes, P as Point, f as PointTransformer, U as UNROUNDED, g as addPoints, h as clockwise, i as convex, j as cornerFeature, k as cornerRounding, l as directionVector, m as distance, n as distanceSquared, o as dividePoint, p as dotProduct, q as edgeFeature, r as getDirection, s as getDistance, t as getDistanceSquared, u as interpolate, v as lerpPoint, w as point, x as positiveModulo, y as radialToCartesian, z as rotate90, B as scalePoint, G as square, H as subtractPoints, I as transformFeature, J as transformPoint } from './md3-expressive-shapes-CPcfl_Hf.mjs';
1
+ import { M as MD3ShapeName, R as RoundedPolygon, a as CornerRounding, b as Cubic, e as MutableCubic } from './md3-expressive-shapes-wk_98LJh.mjs';
2
+ export { A as ANGLE_EPSILON, C as CornerFeature, D as DISTANCE_EPSILON, E as EdgeFeature, F as FLOAT_PI, c as Feature, d as MD3Shapes, P as Point, f as PointTransformer, U as UNROUNDED, g as addPoints, h as clockwise, i as convex, j as cornerFeature, k as cornerRounding, l as directionVector, m as distance, n as distanceSquared, o as dividePoint, p as dotProduct, q as edgeFeature, r as formatCoordinate, s as getDirection, t as getDistance, u as getDistanceSquared, v as interpolate, w as lerpPoint, x as point, y as positiveModulo, z as radialToCartesian, B as rotate90, G as scalePoint, H as square, I as subtractPoints, J as transformFeature, K as transformPoint } from './md3-expressive-shapes-wk_98LJh.mjs';
3
3
  import { ReactNode, CSSProperties } from 'react';
4
4
 
5
+ /**
6
+ * Material Design 3 Expressive — Shape Pairings & Families.
7
+ *
8
+ * Defines natural, expressive bidirectional morph pairings for all 35 MD3 shapes.
9
+ * Organized by design families:
10
+ * - Organic & Floral
11
+ * - Starburst & Explosive
12
+ * - Clover, Gem & Diamond
13
+ * - Cookies & Geometric Multi-sided
14
+ * - Rounded & Architectural
15
+ * - Polygonal & Directional
16
+ */
17
+
18
+ /**
19
+ * Curated bidirectional morph pairings for MD3 Expressive shapes.
20
+ * Each shape is paired with a harmonious companion shape within its design family.
21
+ */
22
+ declare const MD3_SHAPE_PAIRINGS: Readonly<Record<MD3ShapeName, MD3ShapeName>>;
23
+ /**
24
+ * Shape families grouping shapes by structural and expressive traits.
25
+ */
26
+ declare const MD3_SHAPE_FAMILIES: {
27
+ readonly organic: readonly ["circle", "flower", "sunny", "verySunny", "bun", "clamshell", "puffy"];
28
+ readonly starburst: readonly ["burst", "softBurst", "boom", "softBoom", "cookie12Sided"];
29
+ readonly cloverAndGems: readonly ["diamond", "puffyDiamond", "clover4Leaf", "clover8Leaf", "gem", "heart"];
30
+ readonly cookiesAndPolygons: readonly ["cookie4Sided", "cookie6Sided", "cookie7Sided", "cookie9Sided", "square"];
31
+ readonly roundedContainers: readonly ["pill", "oval", "arch", "semiCircle", "slanted"];
32
+ readonly directionalAndPixel: readonly ["triangle", "arrow", "pentagon", "fan", "ghostish", "pixelTriangle", "pixelCircle"];
33
+ };
34
+ type MD3ShapeFamily = keyof typeof MD3_SHAPE_FAMILIES;
35
+ /**
36
+ * Returns the recommended morph target shape for a given shape.
37
+ * If a custom RoundedPolygon is passed without a name match, defaults to "circle".
38
+ *
39
+ * @param shape - Shape name or RoundedPolygon instance
40
+ * @returns The recommended companion MD3 shape name
41
+ *
42
+ * @example
43
+ * getRecommendedMorphShape("flower"); // "sunny"
44
+ * getRecommendedMorphShape("burst"); // "softBurst"
45
+ */
46
+ declare function getRecommendedMorphShape(shape: MD3ShapeName | RoundedPolygon): MD3ShapeName;
47
+
5
48
  /**
6
49
  * MD3 Corner Radius Token Scale.
7
50
  * Ported from MD3 spec: https://m3.material.io/styles/shape/corner-radius-scale
@@ -171,6 +214,8 @@ interface MeasuredFeature {
171
214
  readonly progress: number;
172
215
  /** Whether this corner is convex */
173
216
  readonly convex: boolean;
217
+ /** Polar angle in radians [-PI, PI] from polygon center to feature midpoint */
218
+ readonly angle: number;
174
219
  }
175
220
  /**
176
221
  * A list of MeasuredCubics covering the full outline of a polygon.
@@ -209,12 +254,10 @@ declare class MeasuredPolygon {
209
254
 
210
255
  /**
211
256
  * Creates a DoubleMapper that maps progress values between two polygons
212
- * based on matching their convex corners by proximity.
257
+ * based on matching their features by optimal cyclic alignment.
213
258
  *
214
- * The algorithm:
215
- * 1. Extract convex corner progress values from both polygons
216
- * 2. Match each corner in polygon1 to the closest corner of the same type in polygon2
217
- * 3. Build a piecewise-linear bidirectional mapper
259
+ * Finds the cyclic phase shift that minimizes both perimeter distance
260
+ * and spatial angular difference between features of polygon 1 and polygon 2.
218
261
  *
219
262
  * @param features1 - Measured features from polygon 1
220
263
  * @param features2 - Measured features from polygon 2
@@ -264,13 +307,30 @@ declare class Morph {
264
307
  * Returns the interpolated shape at the given progress as a list of Cubics.
265
308
  *
266
309
  * Note: This allocates a new list. For performance-critical animation loops,
267
- * use {@link forEachCubic} instead.
310
+ * use {@link toSvgPath} or {@link forEachCubic} instead.
268
311
  *
269
312
  * @param progress - Value in [0, 1]. 0 = start shape, 1 = end shape.
270
313
  * Values outside [0, 1] produce exaggerated shapes (useful for bounce/overshoot).
271
314
  * @returns List of interpolated Cubic curves forming the morphed shape
272
315
  */
273
316
  asCubics(progress: number): Cubic[];
317
+ /**
318
+ * Returns an SVG path data string for the morphed shape at the given progress.
319
+ * Directly evaluates coordinates without allocating intermediate Cubic objects.
320
+ *
321
+ * @param progress - Value in [0, 1]
322
+ * @param width - Target pixel width (default: 1)
323
+ * @param height - Target pixel height (default: 1)
324
+ */
325
+ toSvgPath(progress: number, width?: number, height?: number): string;
326
+ /**
327
+ * Returns a CSS clip-path value for the morphed shape at the given progress.
328
+ *
329
+ * @param progress - Value in [0, 1]
330
+ * @param width - Element width in pixels
331
+ * @param height - Element height in pixels
332
+ */
333
+ toClipPath(progress: number, width: number, height: number): string;
274
334
  /**
275
335
  * Iterates over the morphed cubics without allocating new Cubic instances.
276
336
  * Reuses a single MutableCubic for each callback invocation.
@@ -408,9 +468,10 @@ interface ShapeMediaProps {
408
468
  shape: ShapeRef;
409
469
  /**
410
470
  * The target shape to morph to (optional).
471
+ * If "auto", picks the recommended MD3 shape pairing.
411
472
  * When not provided, no morphing animation occurs.
412
473
  */
413
- morphTo?: ShapeRef;
474
+ morphTo?: ShapeRef | "auto";
414
475
  /** Which interaction triggers the morph (default: "hover"). */
415
476
  morphOn?: MorphTrigger;
416
477
  /** Animation options. */
@@ -441,8 +502,8 @@ interface ShapeMediaProps {
441
502
  interface ShapeIconProps {
442
503
  /** The base shape. */
443
504
  shape: ShapeRef;
444
- /** Shape to morph to on hover. */
445
- morphTo?: ShapeRef;
505
+ /** Shape to morph to on hover (or "auto" for recommended pairing). */
506
+ morphTo?: ShapeRef | "auto";
446
507
  /** Size in pixels (width = height). Default: 48. */
447
508
  size?: number;
448
509
  /** Icon content. */
@@ -478,8 +539,52 @@ interface ShapeSvgProps {
478
539
  "aria-label"?: string;
479
540
  /** Morph progress [0, 1] — set to animate between shape and morphTo. */
480
541
  progress?: number;
481
- /** Target shape for morphed SVG rendering. */
482
- morphTo?: ShapeRef;
542
+ /** Target shape for morphed SVG rendering (or "auto" for recommended pairing). */
543
+ morphTo?: ShapeRef | "auto";
544
+ }
545
+ /** Options for useShapeSequenceMorph hook. */
546
+ interface UseShapeSequenceMorphOptions {
547
+ /** Array of shapes to morph through in sequence. */
548
+ shapes: ShapeRef[];
549
+ /** Duration per morph in seconds (default: 0.6). */
550
+ duration?: number;
551
+ /** Interval between morph steps in seconds when autoplay is enabled (default: 2.0). */
552
+ interval?: number;
553
+ /** Whether to automatically cycle through shapes (default: false). */
554
+ autoplay?: boolean;
555
+ /** Whether to loop back to the first shape after reaching the end (default: true). */
556
+ loop?: boolean;
557
+ /** Custom animation options. */
558
+ morphOptions?: ShapeMorphOptions;
559
+ /** Output clip-path width in pixels. */
560
+ width: number;
561
+ /** Output clip-path height in pixels. */
562
+ height: number;
563
+ /** Whether the sequence animation is disabled. */
564
+ disabled?: boolean;
565
+ }
566
+ /** Return value of useShapeSequenceMorph hook. */
567
+ interface UseShapeSequenceMorphResult {
568
+ /** CSS clip-path string for the current interpolated frame. */
569
+ clipPath: string;
570
+ /** Index of current base shape in the shapes array. */
571
+ currentIndex: number;
572
+ /** Index of next target shape. */
573
+ nextIndex: number;
574
+ /** Current morph progress between currentIndex and nextIndex [0, 1]. */
575
+ progress: number;
576
+ /** Whether autoplay is currently active. */
577
+ isPlaying: boolean;
578
+ /** Advance to the next shape in the sequence. */
579
+ next: () => void;
580
+ /** Go back to the previous shape in the sequence. */
581
+ prev: () => void;
582
+ /** Jump directly to a specific shape index. */
583
+ goTo: (index: number) => void;
584
+ /** Start autoplay cycling. */
585
+ play: () => void;
586
+ /** Pause autoplay cycling. */
587
+ pause: () => void;
483
588
  }
484
589
 
485
590
  /**
@@ -608,7 +713,7 @@ declare function ShapeSvg({ shape, morphTo, progress, width, height, fill, strok
608
713
 
609
714
  interface UseShapeMorphOptions {
610
715
  shape: ShapeRef;
611
- morphTo?: ShapeRef;
716
+ morphTo?: ShapeRef | "auto";
612
717
  morphOn?: MorphTrigger;
613
718
  morphOptions?: ShapeMorphOptions;
614
719
  scrollProgress?: number;
@@ -621,4 +726,25 @@ interface UseShapeMorphOptions {
621
726
  */
622
727
  declare function useShapeMorph({ shape, morphTo, morphOn, morphOptions, scrollProgress, width, height, disabled, }: UseShapeMorphOptions): UseShapeMorphResult;
623
728
 
624
- export { CornerRounding, Cubic, type CubicPair, type DoubleMapper, MD3CornerRadius, type MD3CornerRadiusToken, MD3ShapeName, type MeasuredCubic, type MeasuredFeature, MeasuredPolygon, Morph, type MorphTrigger, MutableCubic, RoundedPolygon, ShapeIcon, type ShapeIconProps, ShapeMedia, type ShapeMediaProps, ShapeMediaServer, type ShapeMorphOptions, type ShapeRef, ShapeSvg, type ShapeSvgProps, type UseShapeMorphResult, circle, createDoubleMapper, featureMapper, interpolatePath, pill, pillStar, rectangle, star, toClipPath, toSvgPath, useShapeMorph };
729
+ /**
730
+ * useShapeSequenceMorph — React hook for animating through a sequence of shapes.
731
+ *
732
+ * Smoothly morphs through an array of MD3 Expressive shapes, supporting
733
+ * autoplay, manual step-by-step navigation, and looping.
734
+ *
735
+ * @example
736
+ * const { clipPath, next, prev, isPlaying } = useShapeSequenceMorph({
737
+ * shapes: ["circle", "flower", "sunny", "burst"],
738
+ * autoplay: true,
739
+ * interval: 2.5,
740
+ * duration: 0.6,
741
+ * width: 200,
742
+ * height: 200,
743
+ * });
744
+ *
745
+ * return <div style={{ clipPath }}>...</div>;
746
+ */
747
+
748
+ declare function useShapeSequenceMorph({ shapes, duration, interval, autoplay, loop, morphOptions, width, height, disabled, }: UseShapeSequenceMorphOptions): UseShapeSequenceMorphResult;
749
+
750
+ export { CornerRounding, Cubic, type CubicPair, type DoubleMapper, MD3CornerRadius, type MD3CornerRadiusToken, type MD3ShapeFamily, MD3ShapeName, MD3_SHAPE_FAMILIES, MD3_SHAPE_PAIRINGS, type MeasuredCubic, type MeasuredFeature, MeasuredPolygon, Morph, type MorphTrigger, MutableCubic, RoundedPolygon, ShapeIcon, type ShapeIconProps, ShapeMedia, type ShapeMediaProps, ShapeMediaServer, type ShapeMorphOptions, type ShapeRef, ShapeSvg, type ShapeSvgProps, type UseShapeMorphResult, type UseShapeSequenceMorphOptions, type UseShapeSequenceMorphResult, circle, createDoubleMapper, featureMapper, getRecommendedMorphShape, interpolatePath, pill, pillStar, rectangle, star, toClipPath, toSvgPath, useShapeMorph, useShapeSequenceMorph };
package/dist/shapes.d.ts CHANGED
@@ -1,7 +1,50 @@
1
- import { R as RoundedPolygon, a as CornerRounding, b as Cubic, e as MutableCubic, M as MD3ShapeName } from './md3-expressive-shapes-CPcfl_Hf.js';
2
- export { A as ANGLE_EPSILON, C as CornerFeature, D as DISTANCE_EPSILON, E as EdgeFeature, F as FLOAT_PI, c as Feature, d as MD3Shapes, P as Point, f as PointTransformer, U as UNROUNDED, g as addPoints, h as clockwise, i as convex, j as cornerFeature, k as cornerRounding, l as directionVector, m as distance, n as distanceSquared, o as dividePoint, p as dotProduct, q as edgeFeature, r as getDirection, s as getDistance, t as getDistanceSquared, u as interpolate, v as lerpPoint, w as point, x as positiveModulo, y as radialToCartesian, z as rotate90, B as scalePoint, G as square, H as subtractPoints, I as transformFeature, J as transformPoint } from './md3-expressive-shapes-CPcfl_Hf.js';
1
+ import { M as MD3ShapeName, R as RoundedPolygon, a as CornerRounding, b as Cubic, e as MutableCubic } from './md3-expressive-shapes-wk_98LJh.js';
2
+ export { A as ANGLE_EPSILON, C as CornerFeature, D as DISTANCE_EPSILON, E as EdgeFeature, F as FLOAT_PI, c as Feature, d as MD3Shapes, P as Point, f as PointTransformer, U as UNROUNDED, g as addPoints, h as clockwise, i as convex, j as cornerFeature, k as cornerRounding, l as directionVector, m as distance, n as distanceSquared, o as dividePoint, p as dotProduct, q as edgeFeature, r as formatCoordinate, s as getDirection, t as getDistance, u as getDistanceSquared, v as interpolate, w as lerpPoint, x as point, y as positiveModulo, z as radialToCartesian, B as rotate90, G as scalePoint, H as square, I as subtractPoints, J as transformFeature, K as transformPoint } from './md3-expressive-shapes-wk_98LJh.js';
3
3
  import { ReactNode, CSSProperties } from 'react';
4
4
 
5
+ /**
6
+ * Material Design 3 Expressive — Shape Pairings & Families.
7
+ *
8
+ * Defines natural, expressive bidirectional morph pairings for all 35 MD3 shapes.
9
+ * Organized by design families:
10
+ * - Organic & Floral
11
+ * - Starburst & Explosive
12
+ * - Clover, Gem & Diamond
13
+ * - Cookies & Geometric Multi-sided
14
+ * - Rounded & Architectural
15
+ * - Polygonal & Directional
16
+ */
17
+
18
+ /**
19
+ * Curated bidirectional morph pairings for MD3 Expressive shapes.
20
+ * Each shape is paired with a harmonious companion shape within its design family.
21
+ */
22
+ declare const MD3_SHAPE_PAIRINGS: Readonly<Record<MD3ShapeName, MD3ShapeName>>;
23
+ /**
24
+ * Shape families grouping shapes by structural and expressive traits.
25
+ */
26
+ declare const MD3_SHAPE_FAMILIES: {
27
+ readonly organic: readonly ["circle", "flower", "sunny", "verySunny", "bun", "clamshell", "puffy"];
28
+ readonly starburst: readonly ["burst", "softBurst", "boom", "softBoom", "cookie12Sided"];
29
+ readonly cloverAndGems: readonly ["diamond", "puffyDiamond", "clover4Leaf", "clover8Leaf", "gem", "heart"];
30
+ readonly cookiesAndPolygons: readonly ["cookie4Sided", "cookie6Sided", "cookie7Sided", "cookie9Sided", "square"];
31
+ readonly roundedContainers: readonly ["pill", "oval", "arch", "semiCircle", "slanted"];
32
+ readonly directionalAndPixel: readonly ["triangle", "arrow", "pentagon", "fan", "ghostish", "pixelTriangle", "pixelCircle"];
33
+ };
34
+ type MD3ShapeFamily = keyof typeof MD3_SHAPE_FAMILIES;
35
+ /**
36
+ * Returns the recommended morph target shape for a given shape.
37
+ * If a custom RoundedPolygon is passed without a name match, defaults to "circle".
38
+ *
39
+ * @param shape - Shape name or RoundedPolygon instance
40
+ * @returns The recommended companion MD3 shape name
41
+ *
42
+ * @example
43
+ * getRecommendedMorphShape("flower"); // "sunny"
44
+ * getRecommendedMorphShape("burst"); // "softBurst"
45
+ */
46
+ declare function getRecommendedMorphShape(shape: MD3ShapeName | RoundedPolygon): MD3ShapeName;
47
+
5
48
  /**
6
49
  * MD3 Corner Radius Token Scale.
7
50
  * Ported from MD3 spec: https://m3.material.io/styles/shape/corner-radius-scale
@@ -171,6 +214,8 @@ interface MeasuredFeature {
171
214
  readonly progress: number;
172
215
  /** Whether this corner is convex */
173
216
  readonly convex: boolean;
217
+ /** Polar angle in radians [-PI, PI] from polygon center to feature midpoint */
218
+ readonly angle: number;
174
219
  }
175
220
  /**
176
221
  * A list of MeasuredCubics covering the full outline of a polygon.
@@ -209,12 +254,10 @@ declare class MeasuredPolygon {
209
254
 
210
255
  /**
211
256
  * Creates a DoubleMapper that maps progress values between two polygons
212
- * based on matching their convex corners by proximity.
257
+ * based on matching their features by optimal cyclic alignment.
213
258
  *
214
- * The algorithm:
215
- * 1. Extract convex corner progress values from both polygons
216
- * 2. Match each corner in polygon1 to the closest corner of the same type in polygon2
217
- * 3. Build a piecewise-linear bidirectional mapper
259
+ * Finds the cyclic phase shift that minimizes both perimeter distance
260
+ * and spatial angular difference between features of polygon 1 and polygon 2.
218
261
  *
219
262
  * @param features1 - Measured features from polygon 1
220
263
  * @param features2 - Measured features from polygon 2
@@ -264,13 +307,30 @@ declare class Morph {
264
307
  * Returns the interpolated shape at the given progress as a list of Cubics.
265
308
  *
266
309
  * Note: This allocates a new list. For performance-critical animation loops,
267
- * use {@link forEachCubic} instead.
310
+ * use {@link toSvgPath} or {@link forEachCubic} instead.
268
311
  *
269
312
  * @param progress - Value in [0, 1]. 0 = start shape, 1 = end shape.
270
313
  * Values outside [0, 1] produce exaggerated shapes (useful for bounce/overshoot).
271
314
  * @returns List of interpolated Cubic curves forming the morphed shape
272
315
  */
273
316
  asCubics(progress: number): Cubic[];
317
+ /**
318
+ * Returns an SVG path data string for the morphed shape at the given progress.
319
+ * Directly evaluates coordinates without allocating intermediate Cubic objects.
320
+ *
321
+ * @param progress - Value in [0, 1]
322
+ * @param width - Target pixel width (default: 1)
323
+ * @param height - Target pixel height (default: 1)
324
+ */
325
+ toSvgPath(progress: number, width?: number, height?: number): string;
326
+ /**
327
+ * Returns a CSS clip-path value for the morphed shape at the given progress.
328
+ *
329
+ * @param progress - Value in [0, 1]
330
+ * @param width - Element width in pixels
331
+ * @param height - Element height in pixels
332
+ */
333
+ toClipPath(progress: number, width: number, height: number): string;
274
334
  /**
275
335
  * Iterates over the morphed cubics without allocating new Cubic instances.
276
336
  * Reuses a single MutableCubic for each callback invocation.
@@ -408,9 +468,10 @@ interface ShapeMediaProps {
408
468
  shape: ShapeRef;
409
469
  /**
410
470
  * The target shape to morph to (optional).
471
+ * If "auto", picks the recommended MD3 shape pairing.
411
472
  * When not provided, no morphing animation occurs.
412
473
  */
413
- morphTo?: ShapeRef;
474
+ morphTo?: ShapeRef | "auto";
414
475
  /** Which interaction triggers the morph (default: "hover"). */
415
476
  morphOn?: MorphTrigger;
416
477
  /** Animation options. */
@@ -441,8 +502,8 @@ interface ShapeMediaProps {
441
502
  interface ShapeIconProps {
442
503
  /** The base shape. */
443
504
  shape: ShapeRef;
444
- /** Shape to morph to on hover. */
445
- morphTo?: ShapeRef;
505
+ /** Shape to morph to on hover (or "auto" for recommended pairing). */
506
+ morphTo?: ShapeRef | "auto";
446
507
  /** Size in pixels (width = height). Default: 48. */
447
508
  size?: number;
448
509
  /** Icon content. */
@@ -478,8 +539,52 @@ interface ShapeSvgProps {
478
539
  "aria-label"?: string;
479
540
  /** Morph progress [0, 1] — set to animate between shape and morphTo. */
480
541
  progress?: number;
481
- /** Target shape for morphed SVG rendering. */
482
- morphTo?: ShapeRef;
542
+ /** Target shape for morphed SVG rendering (or "auto" for recommended pairing). */
543
+ morphTo?: ShapeRef | "auto";
544
+ }
545
+ /** Options for useShapeSequenceMorph hook. */
546
+ interface UseShapeSequenceMorphOptions {
547
+ /** Array of shapes to morph through in sequence. */
548
+ shapes: ShapeRef[];
549
+ /** Duration per morph in seconds (default: 0.6). */
550
+ duration?: number;
551
+ /** Interval between morph steps in seconds when autoplay is enabled (default: 2.0). */
552
+ interval?: number;
553
+ /** Whether to automatically cycle through shapes (default: false). */
554
+ autoplay?: boolean;
555
+ /** Whether to loop back to the first shape after reaching the end (default: true). */
556
+ loop?: boolean;
557
+ /** Custom animation options. */
558
+ morphOptions?: ShapeMorphOptions;
559
+ /** Output clip-path width in pixels. */
560
+ width: number;
561
+ /** Output clip-path height in pixels. */
562
+ height: number;
563
+ /** Whether the sequence animation is disabled. */
564
+ disabled?: boolean;
565
+ }
566
+ /** Return value of useShapeSequenceMorph hook. */
567
+ interface UseShapeSequenceMorphResult {
568
+ /** CSS clip-path string for the current interpolated frame. */
569
+ clipPath: string;
570
+ /** Index of current base shape in the shapes array. */
571
+ currentIndex: number;
572
+ /** Index of next target shape. */
573
+ nextIndex: number;
574
+ /** Current morph progress between currentIndex and nextIndex [0, 1]. */
575
+ progress: number;
576
+ /** Whether autoplay is currently active. */
577
+ isPlaying: boolean;
578
+ /** Advance to the next shape in the sequence. */
579
+ next: () => void;
580
+ /** Go back to the previous shape in the sequence. */
581
+ prev: () => void;
582
+ /** Jump directly to a specific shape index. */
583
+ goTo: (index: number) => void;
584
+ /** Start autoplay cycling. */
585
+ play: () => void;
586
+ /** Pause autoplay cycling. */
587
+ pause: () => void;
483
588
  }
484
589
 
485
590
  /**
@@ -608,7 +713,7 @@ declare function ShapeSvg({ shape, morphTo, progress, width, height, fill, strok
608
713
 
609
714
  interface UseShapeMorphOptions {
610
715
  shape: ShapeRef;
611
- morphTo?: ShapeRef;
716
+ morphTo?: ShapeRef | "auto";
612
717
  morphOn?: MorphTrigger;
613
718
  morphOptions?: ShapeMorphOptions;
614
719
  scrollProgress?: number;
@@ -621,4 +726,25 @@ interface UseShapeMorphOptions {
621
726
  */
622
727
  declare function useShapeMorph({ shape, morphTo, morphOn, morphOptions, scrollProgress, width, height, disabled, }: UseShapeMorphOptions): UseShapeMorphResult;
623
728
 
624
- export { CornerRounding, Cubic, type CubicPair, type DoubleMapper, MD3CornerRadius, type MD3CornerRadiusToken, MD3ShapeName, type MeasuredCubic, type MeasuredFeature, MeasuredPolygon, Morph, type MorphTrigger, MutableCubic, RoundedPolygon, ShapeIcon, type ShapeIconProps, ShapeMedia, type ShapeMediaProps, ShapeMediaServer, type ShapeMorphOptions, type ShapeRef, ShapeSvg, type ShapeSvgProps, type UseShapeMorphResult, circle, createDoubleMapper, featureMapper, interpolatePath, pill, pillStar, rectangle, star, toClipPath, toSvgPath, useShapeMorph };
729
+ /**
730
+ * useShapeSequenceMorph — React hook for animating through a sequence of shapes.
731
+ *
732
+ * Smoothly morphs through an array of MD3 Expressive shapes, supporting
733
+ * autoplay, manual step-by-step navigation, and looping.
734
+ *
735
+ * @example
736
+ * const { clipPath, next, prev, isPlaying } = useShapeSequenceMorph({
737
+ * shapes: ["circle", "flower", "sunny", "burst"],
738
+ * autoplay: true,
739
+ * interval: 2.5,
740
+ * duration: 0.6,
741
+ * width: 200,
742
+ * height: 200,
743
+ * });
744
+ *
745
+ * return <div style={{ clipPath }}>...</div>;
746
+ */
747
+
748
+ declare function useShapeSequenceMorph({ shapes, duration, interval, autoplay, loop, morphOptions, width, height, disabled, }: UseShapeSequenceMorphOptions): UseShapeSequenceMorphResult;
749
+
750
+ export { CornerRounding, Cubic, type CubicPair, type DoubleMapper, MD3CornerRadius, type MD3CornerRadiusToken, type MD3ShapeFamily, MD3ShapeName, MD3_SHAPE_FAMILIES, MD3_SHAPE_PAIRINGS, type MeasuredCubic, type MeasuredFeature, MeasuredPolygon, Morph, type MorphTrigger, MutableCubic, RoundedPolygon, ShapeIcon, type ShapeIconProps, ShapeMedia, type ShapeMediaProps, ShapeMediaServer, type ShapeMorphOptions, type ShapeRef, ShapeSvg, type ShapeSvgProps, type UseShapeMorphResult, type UseShapeSequenceMorphOptions, type UseShapeSequenceMorphResult, circle, createDoubleMapper, featureMapper, getRecommendedMorphShape, interpolatePath, pill, pillStar, rectangle, star, toClipPath, toSvgPath, useShapeMorph, useShapeSequenceMorph };