loading-dev 0.3.4 → 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/README.md +7 -9
  2. package/dist/arc.d.ts +7 -11
  3. package/dist/arc.js +31 -10
  4. package/dist/atom.d.ts +6 -10
  5. package/dist/atom.js +70 -9
  6. package/dist/blocks.d.ts +8 -10
  7. package/dist/blocks.js +73 -9
  8. package/dist/bouncing-dots.d.ts +4 -6
  9. package/dist/bouncing-dots.js +45 -8
  10. package/dist/cap-Ba3uZx03.d.ts +9 -0
  11. package/dist/cap.d.ts +2 -8
  12. package/dist/cap.js +7 -8
  13. package/dist/cascade.d.ts +6 -9
  14. package/dist/cascade.js +50 -9
  15. package/dist/circular-dots.d.ts +4 -6
  16. package/dist/circular-dots.js +40 -8
  17. package/dist/classic-v2.d.ts +4 -6
  18. package/dist/classic-v2.js +41 -8
  19. package/dist/classic.d.ts +4 -6
  20. package/dist/classic.js +48 -8
  21. package/dist/clock.d.ts +6 -10
  22. package/dist/clock.js +31 -9
  23. package/dist/comet.d.ts +6 -10
  24. package/dist/comet.js +52 -9
  25. package/dist/compass.d.ts +4 -6
  26. package/dist/compass.js +39 -8
  27. package/dist/dual.d.ts +7 -11
  28. package/dist/dual.js +47 -10
  29. package/dist/easing-DhnLArHS.d.ts +11 -0
  30. package/dist/easing.d.ts +2 -11
  31. package/dist/easing.js +34 -11
  32. package/dist/eclipse.d.ts +4 -6
  33. package/dist/eclipse.js +69 -8
  34. package/dist/fade.d.ts +7 -0
  35. package/dist/fade.js +27 -0
  36. package/dist/flip.d.ts +4 -6
  37. package/dist/flip.js +41 -8
  38. package/dist/frame.d.ts +15 -19
  39. package/dist/frame.js +42 -13
  40. package/dist/gather.d.ts +4 -6
  41. package/dist/gather.js +85 -8
  42. package/dist/index.d.ts +35 -35
  43. package/dist/index.js +34 -145
  44. package/dist/leap.d.ts +4 -6
  45. package/dist/leap.js +67 -8
  46. package/dist/linear-dots.d.ts +4 -6
  47. package/dist/linear-dots.js +54 -8
  48. package/dist/loading.d.ts +4 -6
  49. package/dist/loading.js +64 -8
  50. package/dist/morph.d.ts +4 -6
  51. package/dist/morph.js +40 -8
  52. package/dist/motion-D_zUuA3S.d.ts +45 -0
  53. package/dist/motion.d.ts +2 -44
  54. package/dist/motion.js +50 -25
  55. package/dist/orbit.d.ts +6 -10
  56. package/dist/orbit.js +44 -9
  57. package/dist/pulse.d.ts +4 -6
  58. package/dist/pulse.js +52 -8
  59. package/dist/radar.d.ts +6 -10
  60. package/dist/radar.js +64 -9
  61. package/dist/ring.d.ts +7 -11
  62. package/dist/ring.js +38 -10
  63. package/dist/ripple.d.ts +8 -10
  64. package/dist/ripple.js +57 -10
  65. package/dist/slide.d.ts +4 -6
  66. package/dist/slide.js +74 -8
  67. package/dist/snake.d.ts +7 -11
  68. package/dist/snake.js +59 -10
  69. package/dist/spinners.d.ts +61 -67
  70. package/dist/spinners.js +62 -38
  71. package/dist/swirl.d.ts +4 -6
  72. package/dist/swirl.js +50 -8
  73. package/dist/trace.d.ts +7 -11
  74. package/dist/trace.js +45 -9
  75. package/dist/types-BYaenrWm.d.ts +10 -0
  76. package/dist/types.d.ts +2 -23
  77. package/dist/types.js +1 -0
  78. package/dist/wave.d.ts +8 -10
  79. package/dist/wave.js +56 -10
  80. package/package.json +19 -17
  81. package/dist/chunk-5A6DX4J6.js +0 -62
  82. package/dist/chunk-5DLURQGF.js +0 -88
  83. package/dist/chunk-5DS5PSRD.js +0 -124
  84. package/dist/chunk-5LSP7MQQ.js +0 -69
  85. package/dist/chunk-5R75HMWP.js +0 -55
  86. package/dist/chunk-7C6Q6WUN.js +0 -47
  87. package/dist/chunk-A43AJR54.js +0 -79
  88. package/dist/chunk-AHW6IXXT.js +0 -78
  89. package/dist/chunk-AY4VLQBZ.js +0 -57
  90. package/dist/chunk-BMJ3AGRK.js +0 -62
  91. package/dist/chunk-FKUMWHUL.js +0 -71
  92. package/dist/chunk-HDBQBCTN.js +0 -74
  93. package/dist/chunk-I5CFO2M5.js +0 -78
  94. package/dist/chunk-IQ2WQZFY.js +0 -51
  95. package/dist/chunk-IRMB7CHZ.js +0 -88
  96. package/dist/chunk-IWVH2GKE.js +0 -77
  97. package/dist/chunk-IZ4TRHOC.js +0 -68
  98. package/dist/chunk-JNR4T6LZ.js +0 -10
  99. package/dist/chunk-K5XVX5GB.js +0 -60
  100. package/dist/chunk-LIPOYJAI.js +0 -74
  101. package/dist/chunk-MVL7SVAH.js +0 -79
  102. package/dist/chunk-NHN4FV63.js +0 -78
  103. package/dist/chunk-OMNMMKI7.js +0 -64
  104. package/dist/chunk-PBB2PRPT.js +0 -83
  105. package/dist/chunk-RTKHVDCD.js +0 -82
  106. package/dist/chunk-T5EUYN7R.js +0 -77
  107. package/dist/chunk-T7OV7MUW.js +0 -58
  108. package/dist/chunk-TFHDE6YZ.js +0 -92
  109. package/dist/chunk-UWSCBISJ.js +0 -56
  110. package/dist/chunk-VBI53UGV.js +0 -73
  111. package/dist/chunk-VRX5ZYC6.js +0 -41
  112. package/dist/chunk-X7BJQCYL.js +0 -56
  113. package/dist/chunk-Y7QGIWTL.js +0 -57
  114. package/dist/chunk-ZLJYYX76.js +0 -69
package/dist/slide.js CHANGED
@@ -1,8 +1,74 @@
1
- import {
2
- Slide
3
- } from "./chunk-IRMB7CHZ.js";
4
- import "./chunk-VRX5ZYC6.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Slide
8
- };
1
+ import { animation, stagger } from "./motion.js";
2
+ import { SpinnerStyle, cssVars, spinnerRoot, step } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/slide.tsx
5
+ const DOT = 34;
6
+ const MARGIN = 6;
7
+ const FAR = `${(54 / DOT * 100).toFixed(1)}%`;
8
+ const RESTS = [
9
+ `translate(${FAR}, 0)`,
10
+ "translate(0, 0)",
11
+ `translate(0, ${FAR})`
12
+ ];
13
+ const css = `
14
+ .ld-slide {
15
+ position: relative;
16
+ }
17
+
18
+ .ld-slide-dot {
19
+ position: absolute;
20
+ top: ${MARGIN}%;
21
+ left: ${MARGIN}%;
22
+ width: ${DOT}%;
23
+ height: ${DOT}%;
24
+ background: currentColor;
25
+ border-radius: 50%;
26
+ ${animation("slide", "ld-slide-walk", "ease-in-out")}
27
+ animation-delay: ${stagger("slide", RESTS.length)};
28
+ }
29
+
30
+ @keyframes ld-slide-walk {
31
+ 0% {
32
+ transform: translate(${FAR}, 0);
33
+ }
34
+ 8.33%,
35
+ 25% {
36
+ transform: translate(${FAR}, ${FAR});
37
+ }
38
+ 33.33%,
39
+ 50% {
40
+ transform: translate(0, ${FAR});
41
+ }
42
+ 58.33%,
43
+ 75% {
44
+ transform: translate(0, 0);
45
+ }
46
+ 83.33%,
47
+ 100% {
48
+ transform: translate(${FAR}, 0);
49
+ }
50
+ }
51
+
52
+ @media (prefers-reduced-motion: reduce) {
53
+ .ld-slide-dot {
54
+ transform: var(--ld-slide-rest);
55
+ }
56
+ }
57
+ `;
58
+ function Slide(props) {
59
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
60
+ name: "slide",
61
+ children: css
62
+ }), /* @__PURE__ */ jsx("div", {
63
+ ...spinnerRoot("slide", props),
64
+ children: RESTS.map((rest, index) => /* @__PURE__ */ jsx("div", {
65
+ className: "ld-slide-dot",
66
+ style: cssVars({
67
+ ...step(index),
68
+ "--ld-slide-rest": rest
69
+ })
70
+ }, rest))
71
+ })] });
72
+ }
73
+ //#endregion
74
+ export { Slide };
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-RTKHVDCD.js";
4
- import "./chunk-7C6Q6WUN.js";
5
- import "./chunk-JNR4T6LZ.js";
6
- import "./chunk-VRX5ZYC6.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,39 +1,63 @@
1
- import {
2
- SPINNERS
3
- } from "./chunk-5DS5PSRD.js";
4
- import "./chunk-BMJ3AGRK.js";
5
- import "./chunk-HDBQBCTN.js";
6
- import "./chunk-VBI53UGV.js";
7
- import "./chunk-Y7QGIWTL.js";
8
- import "./chunk-FKUMWHUL.js";
9
- import "./chunk-5LSP7MQQ.js";
10
- import "./chunk-ZLJYYX76.js";
11
- import "./chunk-IWVH2GKE.js";
12
- import "./chunk-IRMB7CHZ.js";
13
- import "./chunk-RTKHVDCD.js";
14
- import "./chunk-TFHDE6YZ.js";
15
- import "./chunk-LIPOYJAI.js";
16
- import "./chunk-K5XVX5GB.js";
17
- import "./chunk-MVL7SVAH.js";
18
- import "./chunk-AY4VLQBZ.js";
19
- import "./chunk-IZ4TRHOC.js";
20
- import "./chunk-IQ2WQZFY.js";
21
- import "./chunk-5A6DX4J6.js";
22
- import "./chunk-T7OV7MUW.js";
23
- import "./chunk-NHN4FV63.js";
24
- import "./chunk-AHW6IXXT.js";
25
- import "./chunk-5R75HMWP.js";
26
- import "./chunk-X7BJQCYL.js";
27
- import "./chunk-5DLURQGF.js";
28
- import "./chunk-7C6Q6WUN.js";
29
- import "./chunk-PBB2PRPT.js";
30
- import "./chunk-UWSCBISJ.js";
31
- import "./chunk-I5CFO2M5.js";
32
- import "./chunk-JNR4T6LZ.js";
33
- import "./chunk-A43AJR54.js";
34
- import "./chunk-T5EUYN7R.js";
35
- import "./chunk-VRX5ZYC6.js";
36
- import "./chunk-OMNMMKI7.js";
37
- export {
38
- 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
39
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,8 +1,50 @@
1
- import {
2
- Swirl
3
- } from "./chunk-BMJ3AGRK.js";
4
- import "./chunk-VRX5ZYC6.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Swirl
8
- };
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-HDBQBCTN.js";
4
- import "./chunk-7C6Q6WUN.js";
5
- import "./chunk-JNR4T6LZ.js";
6
- import "./chunk-VRX5ZYC6.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,23 +1,2 @@
1
- interface SpinnerProps {
2
- /** Extra class names merged onto the root element. */
3
- className?: string;
4
- /**
5
- * Any CSS color — `#f97316`, `oklch(70% 0.19 45)`, `rgb(249 115 22 / 60%)`,
6
- * `var(--brand)`. Omit to keep inheriting the surrounding text color.
7
- */
8
- color?: string;
9
- /**
10
- * Length of one animation cycle in milliseconds. Omit to inherit
11
- * `--ld-duration` from an ancestor, then the spinner's own default.
12
- */
13
- duration?: number;
14
- /**
15
- * Whether the animation runs. Omit to inherit `--ld-play-state` from an
16
- * ancestor, which defaults to running.
17
- */
18
- playState?: "paused" | "running";
19
- /** Width and height of the spinner in pixels. Defaults to 20. */
20
- size?: number;
21
- }
22
-
23
- 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