loading-dev 0.3.5 → 0.3.7

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 (129) hide show
  1. package/README.md +9 -1
  2. package/dist/arc.d.ts +5 -11
  3. package/dist/arc.js +30 -10
  4. package/dist/atom.d.ts +4 -10
  5. package/dist/atom.js +69 -9
  6. package/dist/blocks.d.ts +6 -10
  7. package/dist/blocks.js +72 -9
  8. package/dist/bouncing-dots.d.ts +2 -6
  9. package/dist/bouncing-dots.js +44 -8
  10. package/dist/cap-B_Mo1a7N.d.ts +7 -0
  11. package/dist/cap.d.ts +2 -8
  12. package/dist/cap.js +6 -8
  13. package/dist/cascade.d.ts +4 -9
  14. package/dist/cascade.js +49 -9
  15. package/dist/chevrons.d.ts +2 -0
  16. package/dist/chevrons.js +36 -0
  17. package/dist/circular-dots.d.ts +2 -6
  18. package/dist/circular-dots.js +39 -9
  19. package/dist/classic-v2.d.ts +2 -6
  20. package/dist/classic-v2.js +40 -9
  21. package/dist/classic.d.ts +2 -6
  22. package/dist/classic.js +47 -9
  23. package/dist/clock.d.ts +4 -10
  24. package/dist/clock.js +30 -9
  25. package/dist/comet.d.ts +4 -10
  26. package/dist/comet.js +51 -9
  27. package/dist/compass.d.ts +2 -6
  28. package/dist/compass.js +38 -8
  29. package/dist/dual.d.ts +5 -11
  30. package/dist/dual.js +46 -10
  31. package/dist/easing-BM_1QWrA.d.ts +9 -0
  32. package/dist/easing.d.ts +2 -11
  33. package/dist/easing.js +33 -11
  34. package/dist/eclipse.d.ts +2 -6
  35. package/dist/eclipse.js +68 -8
  36. package/dist/fade.d.ts +5 -8
  37. package/dist/fade.js +26 -7
  38. package/dist/fill.d.ts +2 -0
  39. package/dist/fill.js +59 -0
  40. package/dist/flip.d.ts +2 -6
  41. package/dist/flip.js +40 -8
  42. package/dist/frame.d.ts +14 -18
  43. package/dist/frame.js +41 -13
  44. package/dist/gather.d.ts +2 -6
  45. package/dist/gather.js +84 -8
  46. package/dist/index.d.ts +42 -35
  47. package/dist/index.js +41 -146
  48. package/dist/leap.d.ts +2 -6
  49. package/dist/leap.js +66 -8
  50. package/dist/linear-dots.d.ts +2 -6
  51. package/dist/linear-dots.js +53 -8
  52. package/dist/loading.d.ts +2 -6
  53. package/dist/loading.js +63 -9
  54. package/dist/loop.d.ts +5 -0
  55. package/dist/loop.js +37 -0
  56. package/dist/morph.d.ts +2 -6
  57. package/dist/morph.js +39 -8
  58. package/dist/motion-trIEyOxA.d.ts +50 -0
  59. package/dist/motion.d.ts +2 -44
  60. package/dist/motion.js +56 -25
  61. package/dist/orbit.d.ts +4 -10
  62. package/dist/orbit.js +43 -9
  63. package/dist/phases.d.ts +2 -0
  64. package/dist/phases.js +73 -0
  65. package/dist/pulse.d.ts +2 -6
  66. package/dist/pulse.js +51 -8
  67. package/dist/radar.d.ts +4 -10
  68. package/dist/radar.js +63 -9
  69. package/dist/ring.d.ts +5 -11
  70. package/dist/ring.js +37 -10
  71. package/dist/ripple.d.ts +6 -10
  72. package/dist/ripple.js +56 -10
  73. package/dist/scan.d.ts +2 -0
  74. package/dist/scan.js +56 -0
  75. package/dist/slide.d.ts +2 -6
  76. package/dist/slide.js +73 -8
  77. package/dist/snake.d.ts +5 -11
  78. package/dist/snake.js +58 -10
  79. package/dist/spinners.d.ts +74 -68
  80. package/dist/spinners.js +75 -39
  81. package/dist/split.d.ts +2 -0
  82. package/dist/split.js +52 -0
  83. package/dist/steps.d.ts +2 -0
  84. package/dist/steps.js +55 -0
  85. package/dist/swirl.d.ts +2 -6
  86. package/dist/swirl.js +49 -9
  87. package/dist/trace.d.ts +5 -11
  88. package/dist/trace.js +44 -9
  89. package/dist/types-D9_cXnjI.d.ts +8 -0
  90. package/dist/types.d.ts +2 -9
  91. package/dist/types.js +1 -0
  92. package/dist/wave.d.ts +6 -10
  93. package/dist/wave.js +55 -10
  94. package/package.json +14 -14
  95. package/dist/chunk-2LMGBBRJ.js +0 -77
  96. package/dist/chunk-2OX27TAE.js +0 -69
  97. package/dist/chunk-2TYML5J2.js +0 -51
  98. package/dist/chunk-3WMZVDPS.js +0 -61
  99. package/dist/chunk-4O4ADYWE.js +0 -73
  100. package/dist/chunk-5UAEBEER.js +0 -78
  101. package/dist/chunk-A2PZBHTA.js +0 -41
  102. package/dist/chunk-BAVSTTWG.js +0 -88
  103. package/dist/chunk-BCIAMPLU.js +0 -87
  104. package/dist/chunk-DKYEZLIN.js +0 -72
  105. package/dist/chunk-FQ2U2M7F.js +0 -76
  106. package/dist/chunk-FWH6VWVK.js +0 -59
  107. package/dist/chunk-HL7TIIDB.js +0 -124
  108. package/dist/chunk-IJJULNRU.js +0 -53
  109. package/dist/chunk-JKLL7YYG.js +0 -85
  110. package/dist/chunk-JNR4T6LZ.js +0 -10
  111. package/dist/chunk-JQNF5GYA.js +0 -52
  112. package/dist/chunk-KAZ5BTXC.js +0 -74
  113. package/dist/chunk-KOYM24WV.js +0 -72
  114. package/dist/chunk-L2DUMHO4.js +0 -69
  115. package/dist/chunk-LDXBT62V.js +0 -57
  116. package/dist/chunk-MAKBZTL3.js +0 -56
  117. package/dist/chunk-OMNMMKI7.js +0 -64
  118. package/dist/chunk-P4BSSDSY.js +0 -51
  119. package/dist/chunk-PM6DU637.js +0 -70
  120. package/dist/chunk-PVVWLDIS.js +0 -33
  121. package/dist/chunk-R5ZDKN3Z.js +0 -59
  122. package/dist/chunk-RAHAQ7XK.js +0 -61
  123. package/dist/chunk-SUUR5WMA.js +0 -46
  124. package/dist/chunk-UAO52LUL.js +0 -48
  125. package/dist/chunk-ULWRXY3A.js +0 -50
  126. package/dist/chunk-UOXB5QOZ.js +0 -81
  127. package/dist/chunk-UXTZTFNZ.js +0 -62
  128. package/dist/chunk-VZX7APSS.js +0 -82
  129. package/dist/chunk-YIB63EKJ.js +0 -49
package/dist/loading.js CHANGED
@@ -1,9 +1,63 @@
1
- import {
2
- Loading
3
- } from "./chunk-RAHAQ7XK.js";
4
- import "./chunk-PVVWLDIS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Loading
9
- };
1
+ import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
2
+ import { fadeCss } from "./fade.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/loading.tsx
5
+ const BLOCK = "M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2z";
6
+ const SEGMENTS = [
7
+ {
8
+ x: 12,
9
+ y: 6
10
+ },
11
+ {
12
+ x: 10,
13
+ y: 10
14
+ },
15
+ {
16
+ x: 6,
17
+ y: 12
18
+ },
19
+ {
20
+ x: 2,
21
+ y: 10
22
+ },
23
+ {
24
+ x: 0,
25
+ y: 6
26
+ },
27
+ {
28
+ x: 2,
29
+ y: 2
30
+ },
31
+ {
32
+ x: 6,
33
+ y: 0
34
+ },
35
+ {
36
+ x: 10,
37
+ y: 2
38
+ }
39
+ ];
40
+ const css = `
41
+ ${fadeCss("loading", "segment", SEGMENTS.length, {
42
+ dim: .2,
43
+ rest: .6
44
+ })}
45
+ `;
46
+ function Loading(props) {
47
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
48
+ name: "loading",
49
+ children: css
50
+ }), /* @__PURE__ */ jsx("svg", {
51
+ ...spinnerRoot("loading", props),
52
+ fill: "currentColor",
53
+ role: "presentation",
54
+ viewBox: "0 0 15 15",
55
+ children: SEGMENTS.map(({ x, y }, segment) => /* @__PURE__ */ jsx("path", {
56
+ className: "ld-loading-segment",
57
+ d: BLOCK,
58
+ style: step(segment),
59
+ transform: `translate(${x} ${y})`
60
+ }, `${x}-${y}`))
61
+ })] });
62
+ }
63
+ export { Loading };
package/dist/loop.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { n as CapProps } from "./cap-B_Mo1a7N.js";
2
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
3
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
4
+ export interface LoopProps extends SpinnerProps, EasingProps, CapProps {}
5
+ export declare function Loop({ cap, easing, ...rest }: LoopProps): import("react").JSX.Element;
package/dist/loop.js ADDED
@@ -0,0 +1,37 @@
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
+ // src/loop.tsx
6
+ const PATH = "M12 12c-2-2.7-3.6-4-5.5-4a4 4 0 0 0 0 8c1.9 0 3.5-1.3 5.5-4s3.6-4 5.5-4a4 4 0 0 1 0 8c-1.9 0-3.5-1.3-5.5-4z";
7
+ const LENGTH = 100;
8
+ const DASH = 30;
9
+ const css = `
10
+ ${rotationCss("loop", `to {
11
+ stroke-dashoffset: -100;
12
+ }`)}
13
+ `;
14
+ function Loop({ cap, easing, ...rest }) {
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
16
+ name: "loop",
17
+ children: css
18
+ }), /* @__PURE__ */ jsxs("svg", {
19
+ ...spinnerRoot("loop", rest),
20
+ fill: "none",
21
+ role: "presentation",
22
+ stroke: "currentColor",
23
+ strokeWidth: "2.5",
24
+ viewBox: "0 0 24 24",
25
+ children: [/* @__PURE__ */ jsx("path", {
26
+ d: PATH,
27
+ opacity: "0.2"
28
+ }), /* @__PURE__ */ jsx("path", {
29
+ className: spinClass("loop", easing),
30
+ d: PATH,
31
+ pathLength: LENGTH,
32
+ strokeDasharray: `${DASH} 70`,
33
+ strokeLinecap: linecap(cap)
34
+ })]
35
+ })] });
36
+ }
37
+ export { Loop };
package/dist/morph.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Morph(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Morph };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Morph(props: SpinnerProps): import("react").JSX.Element;
package/dist/morph.js CHANGED
@@ -1,8 +1,39 @@
1
- import {
2
- Morph
3
- } from "./chunk-P4BSSDSY.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Morph
8
- };
1
+ import { SIZE, animation } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/morph.tsx
5
+ const css = `
6
+ .ld-morph-shape {
7
+ width: 64%;
8
+ height: 64%;
9
+ margin: 18%;
10
+ background: currentColor;
11
+ border-radius: calc(${SIZE} * 0.08);
12
+ ${animation("morph", "ld-morph-round", "ease-in-out")}
13
+ }
14
+
15
+ @keyframes ld-morph-round {
16
+ 0% {
17
+ border-radius: calc(${SIZE} * 0.08);
18
+ transform: rotate(0);
19
+ }
20
+ 50% {
21
+ border-radius: 50%;
22
+ transform: rotate(45deg);
23
+ }
24
+ 100% {
25
+ border-radius: calc(${SIZE} * 0.08);
26
+ transform: rotate(90deg);
27
+ }
28
+ }
29
+ `;
30
+ function Morph(props) {
31
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
32
+ name: "morph",
33
+ children: css
34
+ }), /* @__PURE__ */ jsx("div", {
35
+ ...spinnerRoot("morph", props),
36
+ children: /* @__PURE__ */ jsx("div", { className: "ld-morph-shape" })
37
+ })] });
38
+ }
39
+ export { Morph };
@@ -0,0 +1,50 @@
1
+ declare const DURATION_VAR = "--ld-duration";
2
+ declare const PLAY_STATE_VAR = "--ld-play-state";
3
+ declare const SIZE_VAR = "--ld-size";
4
+ declare const STEP_VAR = "--ld-step";
5
+ declare const DEFAULT_SIZE = 20;
6
+ declare const SIZE = "var(--ld-size, 20px)";
7
+ declare const SPINNER_MOTION: {
8
+ readonly arc: 800;
9
+ readonly atom: 1000;
10
+ readonly blocks: 1300;
11
+ readonly "bouncing-dots": 500;
12
+ readonly cascade: 1500;
13
+ readonly chevrons: 1000;
14
+ readonly "circular-dots": 800;
15
+ readonly classic: 1200;
16
+ readonly "classic-v2": 800;
17
+ readonly clock: 1200;
18
+ readonly comet: 700;
19
+ readonly compass: 500;
20
+ readonly dual: 1000;
21
+ readonly eclipse: 1200;
22
+ readonly fill: 1600;
23
+ readonly flip: 1200;
24
+ readonly gather: 1600;
25
+ readonly leap: 1800;
26
+ readonly "linear-dots": 900;
27
+ readonly loading: 1000;
28
+ readonly loop: 1600;
29
+ readonly morph: 1200;
30
+ readonly orbit: 750;
31
+ readonly phases: 3000;
32
+ readonly pulse: 1200;
33
+ readonly radar: 1500;
34
+ readonly ring: 800;
35
+ readonly ripple: 1200;
36
+ readonly scan: 1800;
37
+ readonly slide: 2400;
38
+ readonly snake: 1400;
39
+ readonly split: 1400;
40
+ readonly steps: 1600;
41
+ readonly swirl: 1200;
42
+ readonly trace: 1200;
43
+ readonly wave: 900;
44
+ };
45
+ type SpinnerName = keyof typeof SPINNER_MOTION;
46
+ declare function duration(name: SpinnerName): string;
47
+ declare function stagger(name: SpinnerName, count: number): string;
48
+ declare const PLAY_STATE = "var(--ld-play-state, running)";
49
+ declare function animation(name: SpinnerName, keyframes: string | string[], timing: string): string;
50
+ export { SIZE as a, STEP_VAR as c, duration as d, stagger as f, PLAY_STATE_VAR as i, SpinnerName as l, DURATION_VAR as n, SIZE_VAR as o, PLAY_STATE as r, SPINNER_MOTION as s, DEFAULT_SIZE as t, animation as u };
package/dist/motion.d.ts CHANGED
@@ -1,44 +1,2 @@
1
- declare const DURATION_VAR = "--ld-duration";
2
- declare const PLAY_STATE_VAR = "--ld-play-state";
3
- declare const SIZE_VAR = "--ld-size";
4
- declare const STEP_VAR = "--ld-step";
5
- declare const DEFAULT_SIZE = 20;
6
- declare const SIZE = "var(--ld-size, 20px)";
7
- declare const SPINNER_MOTION: {
8
- readonly arc: 800;
9
- readonly atom: 1000;
10
- readonly blocks: 1300;
11
- readonly "bouncing-dots": 500;
12
- readonly cascade: 1500;
13
- readonly "circular-dots": 800;
14
- readonly classic: 1200;
15
- readonly "classic-v2": 800;
16
- readonly clock: 1200;
17
- readonly comet: 700;
18
- readonly compass: 500;
19
- readonly dual: 1000;
20
- readonly eclipse: 1200;
21
- readonly flip: 1200;
22
- readonly gather: 1600;
23
- readonly leap: 1800;
24
- readonly "linear-dots": 900;
25
- readonly loading: 1000;
26
- readonly morph: 1200;
27
- readonly orbit: 750;
28
- readonly pulse: 1200;
29
- readonly radar: 1500;
30
- readonly ring: 800;
31
- readonly ripple: 1200;
32
- readonly slide: 2400;
33
- readonly snake: 1400;
34
- readonly swirl: 1200;
35
- readonly trace: 1200;
36
- readonly wave: 900;
37
- };
38
- type SpinnerName = keyof typeof SPINNER_MOTION;
39
- declare function duration(name: SpinnerName): string;
40
- declare function stagger(name: SpinnerName, count: number): string;
41
- declare const PLAY_STATE = "var(--ld-play-state, running)";
42
- declare function animation(name: SpinnerName, keyframes: string | string[], timing: string): string;
43
-
44
- export { DEFAULT_SIZE, DURATION_VAR, PLAY_STATE, PLAY_STATE_VAR, SIZE, SIZE_VAR, SPINNER_MOTION, STEP_VAR, type SpinnerName, animation, duration, stagger };
1
+ import { a as SIZE, c as STEP_VAR, d as duration, f as stagger, i as PLAY_STATE_VAR, l as SpinnerName, n as DURATION_VAR, o as SIZE_VAR, r as PLAY_STATE, s as SPINNER_MOTION, t as DEFAULT_SIZE, u as animation } from "./motion-trIEyOxA.js";
2
+ export { DEFAULT_SIZE, DURATION_VAR, PLAY_STATE, PLAY_STATE_VAR, SIZE, SIZE_VAR, SPINNER_MOTION, STEP_VAR, SpinnerName, animation, duration, stagger };
package/dist/motion.js CHANGED
@@ -1,26 +1,57 @@
1
- import {
2
- DEFAULT_SIZE,
3
- DURATION_VAR,
4
- PLAY_STATE,
5
- PLAY_STATE_VAR,
6
- SIZE,
7
- SIZE_VAR,
8
- SPINNER_MOTION,
9
- STEP_VAR,
10
- animation,
11
- duration,
12
- stagger
13
- } from "./chunk-OMNMMKI7.js";
14
- export {
15
- DEFAULT_SIZE,
16
- DURATION_VAR,
17
- PLAY_STATE,
18
- PLAY_STATE_VAR,
19
- SIZE,
20
- SIZE_VAR,
21
- SPINNER_MOTION,
22
- STEP_VAR,
23
- animation,
24
- duration,
25
- stagger
1
+ // src/motion.ts
2
+ const DURATION_VAR = "--ld-duration";
3
+ const PLAY_STATE_VAR = "--ld-play-state";
4
+ const SIZE_VAR = "--ld-size";
5
+ const STEP_VAR = "--ld-step";
6
+ const DEFAULT_SIZE = 20;
7
+ const SIZE = `var(${SIZE_VAR}, 20px)`;
8
+ const SPINNER_MOTION = {
9
+ arc: 800,
10
+ atom: 1e3,
11
+ blocks: 1300,
12
+ "bouncing-dots": 500,
13
+ cascade: 1500,
14
+ chevrons: 1e3,
15
+ "circular-dots": 800,
16
+ classic: 1200,
17
+ "classic-v2": 800,
18
+ clock: 1200,
19
+ comet: 700,
20
+ compass: 500,
21
+ dual: 1e3,
22
+ eclipse: 1200,
23
+ fill: 1600,
24
+ flip: 1200,
25
+ gather: 1600,
26
+ leap: 1800,
27
+ "linear-dots": 900,
28
+ loading: 1e3,
29
+ loop: 1600,
30
+ morph: 1200,
31
+ orbit: 750,
32
+ phases: 3e3,
33
+ pulse: 1200,
34
+ radar: 1500,
35
+ ring: 800,
36
+ ripple: 1200,
37
+ scan: 1800,
38
+ slide: 2400,
39
+ snake: 1400,
40
+ split: 1400,
41
+ steps: 1600,
42
+ swirl: 1200,
43
+ trace: 1200,
44
+ wave: 900
26
45
  };
46
+ function duration(name) {
47
+ return `var(${DURATION_VAR}, ${SPINNER_MOTION[name]}ms)`;
48
+ }
49
+ function stagger(name, count) {
50
+ return `calc(${duration(name)} * (var(${STEP_VAR}) - ${count}) / ${count})`;
51
+ }
52
+ const PLAY_STATE = `var(${PLAY_STATE_VAR}, running)`;
53
+ function animation(name, keyframes, timing) {
54
+ return `animation: ${[keyframes].flat().map((frames) => `${frames} ${duration(name)} ${timing} infinite`).join(", ")};
55
+ animation-play-state: ${PLAY_STATE};`;
56
+ }
57
+ export { DEFAULT_SIZE, DURATION_VAR, PLAY_STATE, PLAY_STATE_VAR, SIZE, SIZE_VAR, SPINNER_MOTION, STEP_VAR, animation, duration, stagger };
package/dist/orbit.d.ts CHANGED
@@ -1,10 +1,4 @@
1
- import * as react from 'react';
2
- import { EasingProps } from './easing.js';
3
- import { SpinnerProps } from './types.js';
4
- import './motion.js';
5
-
6
- interface OrbitProps extends SpinnerProps, EasingProps {
7
- }
8
- declare function Orbit({ easing, ...rest }: OrbitProps): react.JSX.Element;
9
-
10
- export { Orbit, type OrbitProps };
1
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
2
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
3
+ export interface OrbitProps extends SpinnerProps, EasingProps {}
4
+ export declare function Orbit({ easing, ...rest }: OrbitProps): import("react").JSX.Element;
package/dist/orbit.js CHANGED
@@ -1,9 +1,43 @@
1
- import {
2
- Orbit
3
- } from "./chunk-LDXBT62V.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Orbit
9
- };
1
+ import { SIZE } from "./motion.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
+ // src/orbit.tsx
6
+ const css = `
7
+ .ld-orbit {
8
+ --ld-orbit-stroke: calc(${SIZE} * 0.0625);
9
+ position: relative;
10
+ }
11
+
12
+ .ld-orbit-track {
13
+ position: absolute;
14
+ inset: 8%;
15
+ border-radius: 9999px;
16
+ background: conic-gradient(from 180deg, transparent 0deg, currentColor 180deg, transparent 180deg);
17
+ -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
18
+ mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
19
+ }
20
+
21
+ .ld-orbit-dot {
22
+ position: absolute;
23
+ top: 50%;
24
+ left: 50%;
25
+ width: 25%;
26
+ height: 25%;
27
+ background: currentColor;
28
+ border-radius: 9999px;
29
+ transform: translate(-50%, -50%);
30
+ }
31
+
32
+ ${rotationCss("orbit")}
33
+ `;
34
+ function Orbit({ easing, ...rest }) {
35
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
36
+ name: "orbit",
37
+ children: css
38
+ }), /* @__PURE__ */ jsxs("div", {
39
+ ...spinnerRoot("orbit", rest),
40
+ children: [/* @__PURE__ */ jsx("div", { className: "ld-orbit-dot" }), /* @__PURE__ */ jsx("div", { className: `ld-orbit-track ${spinClass("orbit", easing)}` })]
41
+ })] });
42
+ }
43
+ export { Orbit };
@@ -0,0 +1,2 @@
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Phases(props: SpinnerProps): import("react").JSX.Element;
package/dist/phases.js ADDED
@@ -0,0 +1,73 @@
1
+ import { animation, duration } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { useId } from "react";
5
+ // src/phases.tsx
6
+ const RADIUS = 10;
7
+ const css = `
8
+ .ld-phases-shade {
9
+ ${animation("phases", "ld-phases-wax", "ease-out")}
10
+ animation-delay: calc(${duration("phases")} / -2);
11
+ }
12
+
13
+ @keyframes ld-phases-wax {
14
+ from {
15
+ transform: translateX(20.5px);
16
+ }
17
+ 50% {
18
+ transform: translateX(0);
19
+ animation-timing-function: ease-in;
20
+ }
21
+ to {
22
+ transform: translateX(-20.5px);
23
+ }
24
+ }
25
+
26
+ @media (prefers-reduced-motion: reduce) {
27
+ .ld-phases-shade {
28
+ transform: translateX(-10px);
29
+ }
30
+ }
31
+ `;
32
+ function Phases(props) {
33
+ const shade = useId();
34
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
35
+ name: "phases",
36
+ children: css
37
+ }), /* @__PURE__ */ jsxs("svg", {
38
+ ...spinnerRoot("phases", props),
39
+ fill: "currentColor",
40
+ role: "presentation",
41
+ viewBox: "0 0 24 24",
42
+ children: [
43
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("mask", {
44
+ id: shade,
45
+ children: [/* @__PURE__ */ jsx("circle", {
46
+ cx: "12",
47
+ cy: "12",
48
+ fill: "white",
49
+ r: RADIUS
50
+ }), /* @__PURE__ */ jsx("circle", {
51
+ className: "ld-phases-shade",
52
+ cx: "12",
53
+ cy: "12",
54
+ fill: "black",
55
+ r: 10.25
56
+ })]
57
+ }) }),
58
+ /* @__PURE__ */ jsx("circle", {
59
+ cx: "12",
60
+ cy: "12",
61
+ opacity: "0.2",
62
+ r: RADIUS
63
+ }),
64
+ /* @__PURE__ */ jsx("circle", {
65
+ cx: "12",
66
+ cy: "12",
67
+ mask: `url(#${shade})`,
68
+ r: RADIUS
69
+ })
70
+ ]
71
+ })] });
72
+ }
73
+ export { Phases };
package/dist/pulse.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Pulse(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Pulse };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Pulse(props: SpinnerProps): import("react").JSX.Element;
package/dist/pulse.js CHANGED
@@ -1,8 +1,51 @@
1
- import {
2
- Pulse
3
- } from "./chunk-PM6DU637.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Pulse
8
- };
1
+ import { animation } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/pulse.tsx
5
+ const css = `
6
+ .ld-pulse-ring {
7
+ transform-origin: center;
8
+ ${animation("pulse", "ld-pulse-ripple", "ease-out")}
9
+ }
10
+
11
+ @keyframes ld-pulse-ripple {
12
+ from {
13
+ opacity: 0.4;
14
+ transform: scale(0.25);
15
+ }
16
+ to {
17
+ opacity: 0;
18
+ transform: scale(1);
19
+ }
20
+ }
21
+
22
+ @media (prefers-reduced-motion: reduce) {
23
+ .ld-pulse-ring {
24
+ opacity: 0.2;
25
+ }
26
+ }
27
+ `;
28
+ function Pulse(props) {
29
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
30
+ name: "pulse",
31
+ children: css
32
+ }), /* @__PURE__ */ jsxs("svg", {
33
+ ...spinnerRoot("pulse", props),
34
+ fill: "none",
35
+ role: "presentation",
36
+ viewBox: "0 0 16 16",
37
+ children: [/* @__PURE__ */ jsx("circle", {
38
+ className: "ld-pulse-ring",
39
+ cx: "8",
40
+ cy: "8",
41
+ fill: "currentColor",
42
+ r: "8"
43
+ }), /* @__PURE__ */ jsx("circle", {
44
+ cx: "8",
45
+ cy: "8",
46
+ fill: "currentColor",
47
+ r: "2"
48
+ })]
49
+ })] });
50
+ }
51
+ export { Pulse };
package/dist/radar.d.ts CHANGED
@@ -1,10 +1,4 @@
1
- import * as react from 'react';
2
- import { EasingProps } from './easing.js';
3
- import { SpinnerProps } from './types.js';
4
- import './motion.js';
5
-
6
- interface RadarProps extends SpinnerProps, EasingProps {
7
- }
8
- declare function Radar({ easing, ...rest }: RadarProps): react.JSX.Element;
9
-
10
- export { Radar, type RadarProps };
1
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
2
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
3
+ export interface RadarProps extends SpinnerProps, EasingProps {}
4
+ export declare function Radar({ easing, ...rest }: RadarProps): import("react").JSX.Element;
package/dist/radar.js CHANGED
@@ -1,9 +1,63 @@
1
- import {
2
- Radar
3
- } from "./chunk-2OX27TAE.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Radar
9
- };
1
+ import { rotationCss, spinClass } from "./easing.js";
2
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { useId } from "react";
5
+ // src/radar.tsx
6
+ const css = `
7
+ ${rotationCss("radar")}
8
+ `;
9
+ function Radar({ easing, ...rest }) {
10
+ const beamGradient = useId();
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
12
+ name: "radar",
13
+ children: css
14
+ }), /* @__PURE__ */ jsxs("svg", {
15
+ ...spinnerRoot("radar", rest),
16
+ fill: "none",
17
+ role: "presentation",
18
+ viewBox: "0 0 16 16",
19
+ children: [
20
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("radialGradient", {
21
+ cx: "8",
22
+ cy: "8",
23
+ gradientUnits: "userSpaceOnUse",
24
+ id: beamGradient,
25
+ r: "8",
26
+ children: [/* @__PURE__ */ jsx("stop", {
27
+ offset: "0.3334",
28
+ stopColor: "currentColor"
29
+ }), /* @__PURE__ */ jsx("stop", {
30
+ offset: "1",
31
+ stopColor: "currentColor",
32
+ stopOpacity: "0"
33
+ })]
34
+ }) }),
35
+ /* @__PURE__ */ jsx("circle", {
36
+ cx: "8",
37
+ cy: "8",
38
+ fill: "currentColor",
39
+ opacity: "0.2",
40
+ r: "8"
41
+ }),
42
+ /* @__PURE__ */ jsx("circle", {
43
+ cx: "8",
44
+ cy: "8",
45
+ opacity: "0.2",
46
+ r: "5.5",
47
+ stroke: "currentColor"
48
+ }),
49
+ /* @__PURE__ */ jsx("path", {
50
+ className: spinClass("radar", easing),
51
+ d: "M8 0C9.50657 0 10.9824 0.425672 12.2578 1.22754C13.5333 2.02953 14.557 3.17533 15.21 4.5332C15.8629 5.89107 16.1193 7.40626 15.9492 8.90332C15.7791 10.4001 15.1896 11.8184 14.249 12.9951L10.4707 9.69922C10.8037 9.21598 11 8.63123 11 8C11 6.34315 9.65685 5 8 5V0Z",
52
+ fill: `url(#${beamGradient})`
53
+ }),
54
+ /* @__PURE__ */ jsx("circle", {
55
+ cx: "8",
56
+ cy: "8",
57
+ fill: "currentColor",
58
+ r: "2"
59
+ })
60
+ ]
61
+ })] });
62
+ }
63
+ export { Radar };