loading-dev 0.3.5 → 0.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 (114) hide show
  1. package/dist/arc.d.ts +7 -11
  2. package/dist/arc.js +31 -10
  3. package/dist/atom.d.ts +6 -10
  4. package/dist/atom.js +70 -9
  5. package/dist/blocks.d.ts +8 -10
  6. package/dist/blocks.js +73 -9
  7. package/dist/bouncing-dots.d.ts +4 -6
  8. package/dist/bouncing-dots.js +45 -8
  9. package/dist/cap-Ba3uZx03.d.ts +9 -0
  10. package/dist/cap.d.ts +2 -8
  11. package/dist/cap.js +7 -8
  12. package/dist/cascade.d.ts +6 -9
  13. package/dist/cascade.js +50 -9
  14. package/dist/circular-dots.d.ts +4 -6
  15. package/dist/circular-dots.js +40 -9
  16. package/dist/classic-v2.d.ts +4 -6
  17. package/dist/classic-v2.js +41 -9
  18. package/dist/classic.d.ts +4 -6
  19. package/dist/classic.js +48 -9
  20. package/dist/clock.d.ts +6 -10
  21. package/dist/clock.js +31 -9
  22. package/dist/comet.d.ts +6 -10
  23. package/dist/comet.js +52 -9
  24. package/dist/compass.d.ts +4 -6
  25. package/dist/compass.js +39 -8
  26. package/dist/dual.d.ts +7 -11
  27. package/dist/dual.js +47 -10
  28. package/dist/easing-DhnLArHS.d.ts +11 -0
  29. package/dist/easing.d.ts +2 -11
  30. package/dist/easing.js +34 -11
  31. package/dist/eclipse.d.ts +4 -6
  32. package/dist/eclipse.js +69 -8
  33. package/dist/fade.d.ts +6 -7
  34. package/dist/fade.js +27 -7
  35. package/dist/flip.d.ts +4 -6
  36. package/dist/flip.js +41 -8
  37. package/dist/frame.d.ts +15 -17
  38. package/dist/frame.js +42 -13
  39. package/dist/gather.d.ts +4 -6
  40. package/dist/gather.js +85 -8
  41. package/dist/index.d.ts +35 -35
  42. package/dist/index.js +34 -146
  43. package/dist/leap.d.ts +4 -6
  44. package/dist/leap.js +67 -8
  45. package/dist/linear-dots.d.ts +4 -6
  46. package/dist/linear-dots.js +54 -8
  47. package/dist/loading.d.ts +4 -6
  48. package/dist/loading.js +64 -9
  49. package/dist/morph.d.ts +4 -6
  50. package/dist/morph.js +40 -8
  51. package/dist/motion-D_zUuA3S.d.ts +45 -0
  52. package/dist/motion.d.ts +2 -44
  53. package/dist/motion.js +50 -25
  54. package/dist/orbit.d.ts +6 -10
  55. package/dist/orbit.js +44 -9
  56. package/dist/pulse.d.ts +4 -6
  57. package/dist/pulse.js +52 -8
  58. package/dist/radar.d.ts +6 -10
  59. package/dist/radar.js +64 -9
  60. package/dist/ring.d.ts +7 -11
  61. package/dist/ring.js +38 -10
  62. package/dist/ripple.d.ts +8 -10
  63. package/dist/ripple.js +57 -10
  64. package/dist/slide.d.ts +4 -6
  65. package/dist/slide.js +74 -8
  66. package/dist/snake.d.ts +7 -11
  67. package/dist/snake.js +59 -10
  68. package/dist/spinners.d.ts +61 -67
  69. package/dist/spinners.js +62 -39
  70. package/dist/swirl.d.ts +4 -6
  71. package/dist/swirl.js +50 -9
  72. package/dist/trace.d.ts +7 -11
  73. package/dist/trace.js +45 -9
  74. package/dist/types-BYaenrWm.d.ts +10 -0
  75. package/dist/types.d.ts +2 -9
  76. package/dist/types.js +1 -0
  77. package/dist/wave.d.ts +8 -10
  78. package/dist/wave.js +56 -10
  79. package/package.json +14 -14
  80. package/dist/chunk-2LMGBBRJ.js +0 -77
  81. package/dist/chunk-2OX27TAE.js +0 -69
  82. package/dist/chunk-2TYML5J2.js +0 -51
  83. package/dist/chunk-3WMZVDPS.js +0 -61
  84. package/dist/chunk-4O4ADYWE.js +0 -73
  85. package/dist/chunk-5UAEBEER.js +0 -78
  86. package/dist/chunk-A2PZBHTA.js +0 -41
  87. package/dist/chunk-BAVSTTWG.js +0 -88
  88. package/dist/chunk-BCIAMPLU.js +0 -87
  89. package/dist/chunk-DKYEZLIN.js +0 -72
  90. package/dist/chunk-FQ2U2M7F.js +0 -76
  91. package/dist/chunk-FWH6VWVK.js +0 -59
  92. package/dist/chunk-HL7TIIDB.js +0 -124
  93. package/dist/chunk-IJJULNRU.js +0 -53
  94. package/dist/chunk-JKLL7YYG.js +0 -85
  95. package/dist/chunk-JNR4T6LZ.js +0 -10
  96. package/dist/chunk-JQNF5GYA.js +0 -52
  97. package/dist/chunk-KAZ5BTXC.js +0 -74
  98. package/dist/chunk-KOYM24WV.js +0 -72
  99. package/dist/chunk-L2DUMHO4.js +0 -69
  100. package/dist/chunk-LDXBT62V.js +0 -57
  101. package/dist/chunk-MAKBZTL3.js +0 -56
  102. package/dist/chunk-OMNMMKI7.js +0 -64
  103. package/dist/chunk-P4BSSDSY.js +0 -51
  104. package/dist/chunk-PM6DU637.js +0 -70
  105. package/dist/chunk-PVVWLDIS.js +0 -33
  106. package/dist/chunk-R5ZDKN3Z.js +0 -59
  107. package/dist/chunk-RAHAQ7XK.js +0 -61
  108. package/dist/chunk-SUUR5WMA.js +0 -46
  109. package/dist/chunk-UAO52LUL.js +0 -48
  110. package/dist/chunk-ULWRXY3A.js +0 -50
  111. package/dist/chunk-UOXB5QOZ.js +0 -81
  112. package/dist/chunk-UXTZTFNZ.js +0 -62
  113. package/dist/chunk-VZX7APSS.js +0 -82
  114. package/dist/chunk-YIB63EKJ.js +0 -49
package/dist/snake.d.ts CHANGED
@@ -1,11 +1,7 @@
1
- import * as react from 'react';
2
- import { CapProps } from './cap.js';
3
- import { EasingProps } from './easing.js';
4
- import { SpinnerProps } from './types.js';
5
- import './motion.js';
6
-
7
- interface SnakeProps extends SpinnerProps, EasingProps, CapProps {
8
- }
9
- declare function Snake({ cap, easing, ...rest }: SnakeProps): react.JSX.Element;
10
-
11
- export { Snake, type SnakeProps };
1
+ import { n as CapProps } from "./cap-Ba3uZx03.js";
2
+ import { r as EasingProps } from "./easing-DhnLArHS.js";
3
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
4
+ //#region src/snake.d.ts
5
+ export interface SnakeProps extends SpinnerProps, EasingProps, CapProps {}
6
+ export declare function Snake({ cap, easing, ...rest }: SnakeProps): import("react").JSX.Element;
7
+ //#endregion
package/dist/snake.js CHANGED
@@ -1,10 +1,59 @@
1
- import {
2
- Snake
3
- } from "./chunk-UOXB5QOZ.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-JNR4T6LZ.js";
6
- import "./chunk-UAO52LUL.js";
7
- import "./chunk-OMNMMKI7.js";
8
- export {
9
- Snake
10
- };
1
+ import { linecap } from "./cap.js";
2
+ import { animation } from "./motion.js";
3
+ import { rotationCss, spinClass } from "./easing.js";
4
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/snake.tsx
7
+ const css = `
8
+ ${rotationCss("snake")}
9
+
10
+ .ld-snake-dash {
11
+ ${animation("snake", "ld-snake-stretch", "ease-in-out")}
12
+ }
13
+
14
+ @keyframes ld-snake-stretch {
15
+ 0% {
16
+ stroke-dasharray: 1 100;
17
+ stroke-dashoffset: 0;
18
+ }
19
+ 50% {
20
+ stroke-dasharray: 45 100;
21
+ stroke-dashoffset: -17;
22
+ }
23
+ 100% {
24
+ stroke-dasharray: 45 100;
25
+ stroke-dashoffset: -62;
26
+ }
27
+ }
28
+
29
+ @media (prefers-reduced-motion: reduce) {
30
+ .ld-snake-dash {
31
+ stroke-dasharray: 18 100;
32
+ }
33
+ }
34
+ `;
35
+ function Snake({ cap, easing, ...rest }) {
36
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
37
+ name: "snake",
38
+ children: css
39
+ }), /* @__PURE__ */ jsx("svg", {
40
+ ...spinnerRoot("snake", rest),
41
+ fill: "none",
42
+ role: "presentation",
43
+ viewBox: "0 0 24 24",
44
+ children: /* @__PURE__ */ jsx("g", {
45
+ className: spinClass("snake", easing),
46
+ children: /* @__PURE__ */ jsx("circle", {
47
+ className: "ld-snake-dash",
48
+ cx: "12",
49
+ cy: "12",
50
+ r: "10",
51
+ stroke: "currentColor",
52
+ strokeLinecap: linecap(cap),
53
+ strokeWidth: "2.5"
54
+ })
55
+ })
56
+ })] });
57
+ }
58
+ //#endregion
59
+ export { Snake };
@@ -1,68 +1,62 @@
1
- import { Arc } from './arc.js';
2
- import { Atom } from './atom.js';
3
- import { Blocks } from './blocks.js';
4
- import { BouncingDots } from './bouncing-dots.js';
5
- import './cap.js';
6
- import { Cascade } from './cascade.js';
7
- import { CircularDots } from './circular-dots.js';
8
- import { Classic } from './classic.js';
9
- import { ClassicV2 } from './classic-v2.js';
10
- import { Clock } from './clock.js';
11
- import { Comet } from './comet.js';
12
- import { Compass } from './compass.js';
13
- import { Dual } from './dual.js';
14
- import './easing.js';
15
- import { Eclipse } from './eclipse.js';
16
- import { Flip } from './flip.js';
17
- import { Gather } from './gather.js';
18
- import { Leap } from './leap.js';
19
- import { LinearDots } from './linear-dots.js';
20
- import { Loading } from './loading.js';
21
- import { Morph } from './morph.js';
22
- import './motion.js';
23
- import { Orbit } from './orbit.js';
24
- import { Pulse } from './pulse.js';
25
- import { Radar } from './radar.js';
26
- import { Ring } from './ring.js';
27
- import { Ripple } from './ripple.js';
28
- import { Slide } from './slide.js';
29
- import { Snake } from './snake.js';
30
- import { Swirl } from './swirl.js';
31
- import { Trace } from './trace.js';
32
- import { Wave } from './wave.js';
33
- import './types.js';
34
- import 'react';
35
-
36
- declare const SPINNERS: {
37
- arc: typeof Arc;
38
- atom: typeof Atom;
39
- blocks: typeof Blocks;
40
- "bouncing-dots": typeof BouncingDots;
41
- cascade: typeof Cascade;
42
- "circular-dots": typeof CircularDots;
43
- classic: typeof Classic;
44
- "classic-v2": typeof ClassicV2;
45
- clock: typeof Clock;
46
- comet: typeof Comet;
47
- compass: typeof Compass;
48
- dual: typeof Dual;
49
- eclipse: typeof Eclipse;
50
- flip: typeof Flip;
51
- gather: typeof Gather;
52
- leap: typeof Leap;
53
- "linear-dots": typeof LinearDots;
54
- loading: typeof Loading;
55
- morph: typeof Morph;
56
- orbit: typeof Orbit;
57
- pulse: typeof Pulse;
58
- radar: typeof Radar;
59
- ring: typeof Ring;
60
- ripple: typeof Ripple;
61
- slide: typeof Slide;
62
- snake: typeof Snake;
63
- swirl: typeof Swirl;
64
- trace: typeof Trace;
65
- wave: typeof Wave;
1
+ import { Arc } from "./arc.js";
2
+ import { Atom } from "./atom.js";
3
+ import { Blocks } from "./blocks.js";
4
+ import { BouncingDots } from "./bouncing-dots.js";
5
+ import { Cascade } from "./cascade.js";
6
+ import { CircularDots } from "./circular-dots.js";
7
+ import { ClassicV2 } from "./classic-v2.js";
8
+ import { Classic } from "./classic.js";
9
+ import { Clock } from "./clock.js";
10
+ import { Comet } from "./comet.js";
11
+ import { Compass } from "./compass.js";
12
+ import { Dual } from "./dual.js";
13
+ import { Eclipse } from "./eclipse.js";
14
+ import { Flip } from "./flip.js";
15
+ import { Gather } from "./gather.js";
16
+ import { Leap } from "./leap.js";
17
+ import { LinearDots } from "./linear-dots.js";
18
+ import { Loading } from "./loading.js";
19
+ import { Morph } from "./morph.js";
20
+ import { Orbit } from "./orbit.js";
21
+ import { Pulse } from "./pulse.js";
22
+ import { Radar } from "./radar.js";
23
+ import { Ring } from "./ring.js";
24
+ import { Ripple } from "./ripple.js";
25
+ import { Slide } from "./slide.js";
26
+ import { Snake } from "./snake.js";
27
+ import { Swirl } from "./swirl.js";
28
+ import { Trace } from "./trace.js";
29
+ import { Wave } from "./wave.js";
30
+ //#region src/spinners.d.ts
31
+ export declare const SPINNERS: {
32
+ arc: typeof Arc;
33
+ atom: typeof Atom;
34
+ blocks: typeof Blocks;
35
+ "bouncing-dots": typeof BouncingDots;
36
+ cascade: typeof Cascade;
37
+ "circular-dots": typeof CircularDots;
38
+ classic: typeof Classic;
39
+ "classic-v2": typeof ClassicV2;
40
+ clock: typeof Clock;
41
+ comet: typeof Comet;
42
+ compass: typeof Compass;
43
+ dual: typeof Dual;
44
+ eclipse: typeof Eclipse;
45
+ flip: typeof Flip;
46
+ gather: typeof Gather;
47
+ leap: typeof Leap;
48
+ "linear-dots": typeof LinearDots;
49
+ loading: typeof Loading;
50
+ morph: typeof Morph;
51
+ orbit: typeof Orbit;
52
+ pulse: typeof Pulse;
53
+ radar: typeof Radar;
54
+ ring: typeof Ring;
55
+ ripple: typeof Ripple;
56
+ slide: typeof Slide;
57
+ snake: typeof Snake;
58
+ swirl: typeof Swirl;
59
+ trace: typeof Trace;
60
+ wave: typeof Wave;
66
61
  };
67
-
68
- export { SPINNERS };
62
+ //#endregion
package/dist/spinners.js CHANGED
@@ -1,40 +1,63 @@
1
- import {
2
- SPINNERS
3
- } from "./chunk-HL7TIIDB.js";
4
- import "./chunk-SUUR5WMA.js";
5
- import "./chunk-KAZ5BTXC.js";
6
- import "./chunk-DKYEZLIN.js";
7
- import "./chunk-LDXBT62V.js";
8
- import "./chunk-PM6DU637.js";
9
- import "./chunk-2OX27TAE.js";
10
- import "./chunk-L2DUMHO4.js";
11
- import "./chunk-FQ2U2M7F.js";
12
- import "./chunk-BCIAMPLU.js";
13
- import "./chunk-UOXB5QOZ.js";
14
- import "./chunk-YIB63EKJ.js";
15
- import "./chunk-JKLL7YYG.js";
16
- import "./chunk-4O4ADYWE.js";
17
- import "./chunk-FWH6VWVK.js";
18
- import "./chunk-RAHAQ7XK.js";
19
- import "./chunk-P4BSSDSY.js";
20
- import "./chunk-IJJULNRU.js";
21
- import "./chunk-2TYML5J2.js";
22
- import "./chunk-UXTZTFNZ.js";
23
- import "./chunk-JQNF5GYA.js";
24
- import "./chunk-5UAEBEER.js";
25
- import "./chunk-2LMGBBRJ.js";
26
- import "./chunk-MAKBZTL3.js";
27
- import "./chunk-BAVSTTWG.js";
28
- import "./chunk-A2PZBHTA.js";
29
- import "./chunk-VZX7APSS.js";
30
- import "./chunk-ULWRXY3A.js";
31
- import "./chunk-KOYM24WV.js";
32
- import "./chunk-JNR4T6LZ.js";
33
- import "./chunk-3WMZVDPS.js";
34
- import "./chunk-R5ZDKN3Z.js";
35
- import "./chunk-PVVWLDIS.js";
36
- import "./chunk-UAO52LUL.js";
37
- import "./chunk-OMNMMKI7.js";
38
- export {
39
- SPINNERS
1
+ import { Arc } from "./arc.js";
2
+ import { Atom } from "./atom.js";
3
+ import { Blocks } from "./blocks.js";
4
+ import { BouncingDots } from "./bouncing-dots.js";
5
+ import { Cascade } from "./cascade.js";
6
+ import { CircularDots } from "./circular-dots.js";
7
+ import { ClassicV2 } from "./classic-v2.js";
8
+ import { Classic } from "./classic.js";
9
+ import { Clock } from "./clock.js";
10
+ import { Comet } from "./comet.js";
11
+ import { Compass } from "./compass.js";
12
+ import { Dual } from "./dual.js";
13
+ import { Eclipse } from "./eclipse.js";
14
+ import { Flip } from "./flip.js";
15
+ import { Gather } from "./gather.js";
16
+ import { Leap } from "./leap.js";
17
+ import { LinearDots } from "./linear-dots.js";
18
+ import { Loading } from "./loading.js";
19
+ import { Morph } from "./morph.js";
20
+ import { Orbit } from "./orbit.js";
21
+ import { Pulse } from "./pulse.js";
22
+ import { Radar } from "./radar.js";
23
+ import { Ring } from "./ring.js";
24
+ import { Ripple } from "./ripple.js";
25
+ import { Slide } from "./slide.js";
26
+ import { Snake } from "./snake.js";
27
+ import { Swirl } from "./swirl.js";
28
+ import { Trace } from "./trace.js";
29
+ import { Wave } from "./wave.js";
30
+ //#region src/spinners.ts
31
+ const SPINNERS = {
32
+ arc: Arc,
33
+ atom: Atom,
34
+ blocks: Blocks,
35
+ "bouncing-dots": BouncingDots,
36
+ cascade: Cascade,
37
+ "circular-dots": CircularDots,
38
+ classic: Classic,
39
+ "classic-v2": ClassicV2,
40
+ clock: Clock,
41
+ comet: Comet,
42
+ compass: Compass,
43
+ dual: Dual,
44
+ eclipse: Eclipse,
45
+ flip: Flip,
46
+ gather: Gather,
47
+ leap: Leap,
48
+ "linear-dots": LinearDots,
49
+ loading: Loading,
50
+ morph: Morph,
51
+ orbit: Orbit,
52
+ pulse: Pulse,
53
+ radar: Radar,
54
+ ring: Ring,
55
+ ripple: Ripple,
56
+ slide: Slide,
57
+ snake: Snake,
58
+ swirl: Swirl,
59
+ trace: Trace,
60
+ wave: Wave
40
61
  };
62
+ //#endregion
63
+ export { SPINNERS };
package/dist/swirl.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Swirl(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Swirl };
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/swirl.d.ts
3
+ export declare function Swirl(props: SpinnerProps): import("react").JSX.Element;
4
+ //#endregion
package/dist/swirl.js CHANGED
@@ -1,9 +1,50 @@
1
- import {
2
- Swirl
3
- } from "./chunk-SUUR5WMA.js";
4
- import "./chunk-PVVWLDIS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Swirl
9
- };
1
+ import { SIZE } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
3
+ import { fadeCss } from "./fade.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/swirl.tsx
6
+ const RING = [
7
+ 0,
8
+ 1,
9
+ 2,
10
+ 7,
11
+ null,
12
+ 3,
13
+ 6,
14
+ 5,
15
+ 4
16
+ ];
17
+ const PLACES = RING.filter((place) => place !== null).length;
18
+ const css = `
19
+ .ld-swirl {
20
+ display: grid;
21
+ grid-template-columns: repeat(3, 1fr);
22
+ grid-template-rows: repeat(3, 1fr);
23
+ gap: calc(${SIZE} * 0.15625);
24
+ box-sizing: border-box;
25
+ padding: calc(${SIZE} * 0.0625);
26
+ }
27
+
28
+ .ld-swirl-cell {
29
+ background: currentColor;
30
+ border-radius: calc(${SIZE} * 0.0625);
31
+ }
32
+ ${fadeCss("swirl", "cell", PLACES, {
33
+ dim: .2,
34
+ rest: .6
35
+ })}
36
+ `;
37
+ function Swirl(props) {
38
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
39
+ name: "swirl",
40
+ children: css
41
+ }), /* @__PURE__ */ jsx("div", {
42
+ ...spinnerRoot("swirl", props),
43
+ children: RING.map((place, index) => place === null ? /* @__PURE__ */ jsx("div", {}, index) : /* @__PURE__ */ jsx("div", {
44
+ className: "ld-swirl-cell",
45
+ style: step(place)
46
+ }, index))
47
+ })] });
48
+ }
49
+ //#endregion
50
+ export { Swirl };
package/dist/trace.d.ts CHANGED
@@ -1,11 +1,7 @@
1
- import * as react from 'react';
2
- import { CapProps } from './cap.js';
3
- import { EasingProps } from './easing.js';
4
- import { SpinnerProps } from './types.js';
5
- import './motion.js';
6
-
7
- interface TraceProps extends SpinnerProps, EasingProps, CapProps {
8
- }
9
- declare function Trace({ cap, easing, ...rest }: TraceProps): react.JSX.Element;
10
-
11
- export { Trace, type TraceProps };
1
+ import { n as CapProps } from "./cap-Ba3uZx03.js";
2
+ import { r as EasingProps } from "./easing-DhnLArHS.js";
3
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
4
+ //#region src/trace.d.ts
5
+ export interface TraceProps extends SpinnerProps, EasingProps, CapProps {}
6
+ export declare function Trace({ cap, easing, ...rest }: TraceProps): import("react").JSX.Element;
7
+ //#endregion
package/dist/trace.js CHANGED
@@ -1,10 +1,46 @@
1
- import {
2
- Trace
3
- } from "./chunk-KAZ5BTXC.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-JNR4T6LZ.js";
6
- import "./chunk-UAO52LUL.js";
7
- import "./chunk-OMNMMKI7.js";
8
- export {
9
- Trace
1
+ import { linecap } from "./cap.js";
2
+ import { rotationCss, spinClass } from "./easing.js";
3
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/trace.tsx
6
+ const VIEW = 20;
7
+ const SIDE = 17.5;
8
+ const RADIUS = 4;
9
+ const PERIMETER = 38 + 2 * Math.PI * RADIUS;
10
+ const DASH = 16;
11
+ const RECT = {
12
+ height: SIDE,
13
+ rx: RADIUS,
14
+ width: SIDE,
15
+ x: 2.5 / 2,
16
+ y: 2.5 / 2
10
17
  };
18
+ const css = `
19
+ ${rotationCss("trace", `to {
20
+ stroke-dashoffset: ${-PERIMETER};
21
+ }`)}
22
+ `;
23
+ function Trace({ cap, easing, ...rest }) {
24
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
25
+ name: "trace",
26
+ children: css
27
+ }), /* @__PURE__ */ jsxs("svg", {
28
+ ...spinnerRoot("trace", rest),
29
+ fill: "none",
30
+ role: "presentation",
31
+ stroke: "currentColor",
32
+ strokeWidth: "2.5",
33
+ viewBox: `0 0 ${VIEW} ${VIEW}`,
34
+ children: [/* @__PURE__ */ jsx("rect", {
35
+ ...RECT,
36
+ opacity: "0.2"
37
+ }), /* @__PURE__ */ jsx("rect", {
38
+ ...RECT,
39
+ className: spinClass("trace", easing),
40
+ strokeDasharray: `${DASH} ${PERIMETER - DASH}`,
41
+ strokeLinecap: linecap(cap)
42
+ })]
43
+ })] });
44
+ }
45
+ //#endregion
46
+ export { Trace };
@@ -0,0 +1,10 @@
1
+ //#region src/types.d.ts
2
+ interface SpinnerProps {
3
+ className?: string;
4
+ color?: string;
5
+ duration?: number;
6
+ playState?: "paused" | "running";
7
+ size?: number;
8
+ }
9
+ //#endregion
10
+ export { SpinnerProps as t };
package/dist/types.d.ts CHANGED
@@ -1,9 +1,2 @@
1
- interface SpinnerProps {
2
- className?: string;
3
- color?: string;
4
- duration?: number;
5
- playState?: "paused" | "running";
6
- size?: number;
7
- }
8
-
9
- export type { SpinnerProps };
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ export { SpinnerProps };
package/dist/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/dist/wave.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- type WaveOrigin = "bottom" | "center";
5
- declare const DEFAULT_WAVE_ORIGIN: WaveOrigin;
6
- interface WaveProps extends SpinnerProps {
7
- origin?: WaveOrigin;
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/wave.d.ts
3
+ export type WaveOrigin = "bottom" | "center";
4
+ export declare const DEFAULT_WAVE_ORIGIN: WaveOrigin;
5
+ export interface WaveProps extends SpinnerProps {
6
+ origin?: WaveOrigin;
8
7
  }
9
- declare function Wave({ origin, ...rest }: WaveProps): react.JSX.Element;
10
-
11
- export { DEFAULT_WAVE_ORIGIN, Wave, type WaveOrigin, type WaveProps };
8
+ export declare function Wave({ origin, ...rest }: WaveProps): import("react").JSX.Element;
9
+ //#endregion
package/dist/wave.js CHANGED
@@ -1,10 +1,56 @@
1
- import {
2
- DEFAULT_WAVE_ORIGIN,
3
- Wave
4
- } from "./chunk-DKYEZLIN.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- DEFAULT_WAVE_ORIGIN,
9
- Wave
10
- };
1
+ import { SIZE, STEP_VAR, animation, stagger } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/wave.tsx
5
+ const DEFAULT_WAVE_ORIGIN = "center";
6
+ const BARS = Array.from({ length: 5 }, (_, index) => index);
7
+ const css = `
8
+ .ld-wave {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ }
13
+
14
+ .ld-wave-bar {
15
+ width: calc(${SIZE} * 0.12);
16
+ height: 100%;
17
+ background: currentColor;
18
+ border-radius: 9999px;
19
+ ${animation("wave", "ld-wave-rise", "ease-in-out")}
20
+ animation-delay: ${stagger("wave", BARS.length)};
21
+ }
22
+
23
+ .ld-wave-bar-bottom {
24
+ align-self: flex-end;
25
+ }
26
+
27
+ @keyframes ld-wave-rise {
28
+ 0%,
29
+ 100% {
30
+ height: 30%;
31
+ }
32
+ 50% {
33
+ height: 100%;
34
+ }
35
+ }
36
+
37
+ @media (prefers-reduced-motion: reduce) {
38
+ .ld-wave-bar {
39
+ height: calc((0.4 + var(${STEP_VAR}) * 0.15) * 100%);
40
+ }
41
+ }
42
+ `;
43
+ function Wave({ origin = DEFAULT_WAVE_ORIGIN, ...rest }) {
44
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
45
+ name: "wave",
46
+ children: css
47
+ }), /* @__PURE__ */ jsx("div", {
48
+ ...spinnerRoot("wave", rest),
49
+ children: BARS.map((index) => /* @__PURE__ */ jsx("div", {
50
+ className: `ld-wave-bar ld-wave-bar-${origin}`,
51
+ style: step(index)
52
+ }, index))
53
+ })] });
54
+ }
55
+ //#endregion
56
+ export { DEFAULT_WAVE_ORIGIN, Wave };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loading-dev",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "A lightweight library full of beautiful loading indicators for React.",
5
5
  "keywords": [
6
6
  "react",
@@ -28,36 +28,36 @@
28
28
  "dist"
29
29
  ],
30
30
  "scripts": {
31
- "build": "tsup",
31
+ "build": "tsdown",
32
32
  "build:web": "pnpm --filter web build",
33
33
  "check": "pnpm lint && biome check --error-on-warnings .",
34
34
  "dev": "pnpm run \"/^dev:/\"",
35
- "dev:lib": "tsup --watch src",
35
+ "dev:lib": "tsdown --watch src",
36
36
  "dev:web": "pnpm --filter web dev",
37
37
  "fix": "oxlint --fix . && biome check --write .",
38
38
  "format": "biome format --write .",
39
39
  "lint": "oxlint --deny-warnings --report-unused-disable-directives-severity error .",
40
- "prepublishOnly": "tsup",
40
+ "prepublishOnly": "tsdown",
41
41
  "test": "vitest run",
42
42
  "test:watch": "vitest",
43
43
  "typecheck": "tsc --noEmit && pnpm build && pnpm --filter web typecheck"
44
44
  },
45
45
  "devDependencies": {
46
- "@biomejs/biome": "^2.5.14",
47
- "@types/node": "^24.19.0",
46
+ "@biomejs/biome": "^2.5.15",
47
+ "@types/node": "^26.6.4",
48
48
  "@types/react": "^19.3.0",
49
49
  "@types/react-dom": "^19.3.0",
50
- "oxlint": "1.85.0",
51
- "react": "19.2.6",
52
- "react-dom": "19.2.6",
53
- "tsup": "^8.5.1",
54
- "typescript": "^5.9.3",
55
- "ultracite": "7.12.0",
56
- "vitest": "^4.1.11"
50
+ "oxlint": "1.87.0",
51
+ "react": "19.3.0",
52
+ "react-dom": "19.3.0",
53
+ "tsdown": "^0.23.0",
54
+ "typescript": "^7.0.2",
55
+ "ultracite": "8.0.0",
56
+ "vitest": "^5.0.3"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "react": ">=19.0.0",
60
60
  "react-dom": ">=19.0.0"
61
61
  },
62
- "packageManager": "pnpm@11.8.0"
62
+ "packageManager": "pnpm@12.10.1"
63
63
  }