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/split.js ADDED
@@ -0,0 +1,52 @@
1
+ import { STEP_VAR, animation } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/split.tsx
5
+ const DOTS = [0, 1];
6
+ const APART = `calc((var(${STEP_VAR}) * 2 - 1) * 5px) 0`;
7
+ const css = `
8
+ .ld-split-dot {
9
+ transform-box: fill-box;
10
+ transform-origin: center;
11
+ ${animation("split", "ld-split-part", "cubic-bezier(0.65, 0, 0.35, 1)")}
12
+ }
13
+
14
+ @keyframes ld-split-part {
15
+ 0%,
16
+ 100% {
17
+ translate: 0 0;
18
+ scale: 1;
19
+ }
20
+ 40%,
21
+ 60% {
22
+ translate: ${APART};
23
+ scale: 0.65;
24
+ }
25
+ }
26
+
27
+ @media (prefers-reduced-motion: reduce) {
28
+ .ld-split-dot {
29
+ translate: ${APART};
30
+ scale: 0.65;
31
+ }
32
+ }
33
+ `;
34
+ function Split(props) {
35
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
36
+ name: "split",
37
+ children: css
38
+ }), /* @__PURE__ */ jsx("svg", {
39
+ ...spinnerRoot("split", props),
40
+ fill: "currentColor",
41
+ role: "presentation",
42
+ viewBox: "0 0 24 24",
43
+ children: DOTS.map((dot) => /* @__PURE__ */ jsx("circle", {
44
+ className: "ld-split-dot",
45
+ cx: "12",
46
+ cy: "12",
47
+ r: "4",
48
+ style: step(dot)
49
+ }, dot))
50
+ })] });
51
+ }
52
+ export { Split };
@@ -0,0 +1,2 @@
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Steps(props: SpinnerProps): import("react").JSX.Element;
package/dist/steps.js ADDED
@@ -0,0 +1,55 @@
1
+ import { 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
+ // src/steps.tsx
5
+ const SEGMENTS = [
6
+ 1,
7
+ 7,
8
+ 13,
9
+ 19
10
+ ];
11
+ const SLOTS = SEGMENTS.length * 2;
12
+ const css = `
13
+ .ld-steps-segment {
14
+ ${animation("steps", "ld-steps-light", "linear")}
15
+ animation-delay: ${stagger("steps", SLOTS)};
16
+ }
17
+
18
+ @keyframes ld-steps-light {
19
+ 0%,
20
+ 55% {
21
+ opacity: 1;
22
+ }
23
+ 60%,
24
+ 100% {
25
+ opacity: 0.15;
26
+ }
27
+ }
28
+
29
+ @media (prefers-reduced-motion: reduce) {
30
+ .ld-steps-segment {
31
+ opacity: calc(1 - var(${STEP_VAR}) * 0.25);
32
+ }
33
+ }
34
+ `;
35
+ function Steps(props) {
36
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
37
+ name: "steps",
38
+ children: css
39
+ }), /* @__PURE__ */ jsx("svg", {
40
+ ...spinnerRoot("steps", props),
41
+ fill: "currentColor",
42
+ role: "presentation",
43
+ viewBox: "0 0 24 24",
44
+ children: SEGMENTS.map((x, index) => /* @__PURE__ */ jsx("rect", {
45
+ className: "ld-steps-segment",
46
+ height: "6",
47
+ rx: "1.25",
48
+ style: step(index),
49
+ width: "4",
50
+ x,
51
+ y: "9"
52
+ }, x))
53
+ })] });
54
+ }
55
+ export { Steps };
package/dist/swirl.d.ts CHANGED
@@ -1,6 +1,2 @@
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-D9_cXnjI.js";
2
+ export declare function Swirl(props: SpinnerProps): import("react").JSX.Element;
package/dist/swirl.js CHANGED
@@ -1,9 +1,49 @@
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
+ // 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
+ export { Swirl };
package/dist/trace.d.ts CHANGED
@@ -1,11 +1,5 @@
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-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 TraceProps extends SpinnerProps, EasingProps, CapProps {}
5
+ export declare function Trace({ cap, easing, ...rest }: TraceProps): import("react").JSX.Element;
package/dist/trace.js CHANGED
@@ -1,10 +1,45 @@
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
+ // 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
+ export { Trace };
@@ -0,0 +1,8 @@
1
+ interface SpinnerProps {
2
+ className?: string;
3
+ color?: string;
4
+ duration?: number;
5
+ playState?: "paused" | "running";
6
+ size?: number;
7
+ }
8
+ 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-D9_cXnjI.js";
2
+ export { SpinnerProps };
package/dist/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/dist/wave.d.ts CHANGED
@@ -1,11 +1,7 @@
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-D9_cXnjI.js";
2
+ export type WaveOrigin = "bottom" | "center";
3
+ export declare const DEFAULT_WAVE_ORIGIN: WaveOrigin;
4
+ export interface WaveProps extends SpinnerProps {
5
+ origin?: WaveOrigin;
8
6
  }
9
- declare function Wave({ origin, ...rest }: WaveProps): react.JSX.Element;
10
-
11
- export { DEFAULT_WAVE_ORIGIN, Wave, type WaveOrigin, type WaveProps };
7
+ export declare function Wave({ origin, ...rest }: WaveProps): import("react").JSX.Element;
package/dist/wave.js CHANGED
@@ -1,10 +1,55 @@
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
+ // 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
+ 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.7",
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.90.0",
51
+ "react": "19.3.1",
52
+ "react-dom": "19.3.1",
53
+ "tsdown": "^0.23.3",
54
+ "typescript": "^7.0.2",
55
+ "ultracite": "8.1.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
  }
@@ -1,77 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot,
4
- step
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- STEP_VAR,
9
- animation,
10
- stagger
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/eclipse.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DOTS = [0, 1];
16
- var css = `
17
- .ld-eclipse {
18
- position: relative;
19
- width: ${SIZE};
20
- height: ${SIZE};
21
- }
22
-
23
- .ld-eclipse-dot {
24
- position: absolute;
25
- top: 30%;
26
- left: 30%;
27
- width: 40%;
28
- height: 40%;
29
- background: currentColor;
30
- border-radius: 50%;
31
- ${animation("eclipse", ["ld-eclipse-slide", "ld-eclipse-depth"], "ease-in-out")}
32
- animation-delay: ${stagger("eclipse", DOTS.length)};
33
- }
34
-
35
- @keyframes ld-eclipse-slide {
36
- 0%,
37
- 100% {
38
- translate: 75% 0;
39
- }
40
- 50% {
41
- translate: -75% 0;
42
- }
43
- }
44
-
45
- @keyframes ld-eclipse-depth {
46
- 0%,
47
- 50%,
48
- 100% {
49
- opacity: 0.75;
50
- scale: 1;
51
- }
52
- 25% {
53
- opacity: 1;
54
- scale: 1.3;
55
- }
56
- 75% {
57
- opacity: 0.5;
58
- scale: 0.7;
59
- }
60
- }
61
-
62
- @media (prefers-reduced-motion: reduce) {
63
- .ld-eclipse-dot {
64
- translate: calc(var(${STEP_VAR}) * 150% - 75%) 0;
65
- }
66
- }
67
- `;
68
- function Eclipse(props) {
69
- return /* @__PURE__ */ jsxs(Fragment, { children: [
70
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "eclipse", children: css }),
71
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("eclipse", props), children: DOTS.map((index) => /* @__PURE__ */ jsx("div", { className: "ld-eclipse-dot", style: step(index) }, index)) })
72
- ] });
73
- }
74
-
75
- export {
76
- Eclipse
77
- };
@@ -1,69 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- SpinnerStyle,
7
- spinnerRoot
8
- } from "./chunk-UAO52LUL.js";
9
- import {
10
- SIZE
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/radar.tsx
14
- import { useId } from "react";
15
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
- var css = `
17
- .ld-radar {
18
- width: ${SIZE};
19
- height: ${SIZE};
20
- }
21
-
22
- ${rotationCss("radar")}
23
- `;
24
- function Radar({ easing, ...rest }) {
25
- const beamGradient = useId();
26
- return /* @__PURE__ */ jsxs(Fragment, { children: [
27
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "radar", children: css }),
28
- /* @__PURE__ */ jsxs(
29
- "svg",
30
- {
31
- ...spinnerRoot("radar", rest),
32
- fill: "none",
33
- role: "presentation",
34
- viewBox: "0 0 16 16",
35
- children: [
36
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
37
- "radialGradient",
38
- {
39
- cx: "8",
40
- cy: "8",
41
- gradientUnits: "userSpaceOnUse",
42
- id: beamGradient,
43
- r: "8",
44
- children: [
45
- /* @__PURE__ */ jsx("stop", { offset: "0.3334", stopColor: "currentColor" }),
46
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
47
- ]
48
- }
49
- ) }),
50
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.2", r: "8" }),
51
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", opacity: "0.2", r: "5.5", stroke: "currentColor" }),
52
- /* @__PURE__ */ jsx(
53
- "path",
54
- {
55
- className: spinClass("radar", easing),
56
- 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",
57
- fill: `url(#${beamGradient})`
58
- }
59
- ),
60
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
61
- ]
62
- }
63
- )
64
- ] });
65
- }
66
-
67
- export {
68
- Radar
69
- };
@@ -1,51 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- SpinnerStyle,
7
- spinnerRoot
8
- } from "./chunk-UAO52LUL.js";
9
- import {
10
- SIZE
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/clock.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var css = `
16
- .ld-clock {
17
- width: ${SIZE};
18
- height: ${SIZE};
19
- }
20
-
21
- ${rotationCss("clock")}
22
- `;
23
- function Clock({ easing, ...rest }) {
24
- return /* @__PURE__ */ jsxs(Fragment, { children: [
25
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "clock", children: css }),
26
- /* @__PURE__ */ jsxs(
27
- "svg",
28
- {
29
- ...spinnerRoot("clock", rest),
30
- fill: "none",
31
- role: "presentation",
32
- viewBox: "0 0 16 16",
33
- children: [
34
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.1", r: "8" }),
35
- /* @__PURE__ */ jsx(
36
- "path",
37
- {
38
- className: spinClass("clock", easing),
39
- d: "M11.1937 2.92061C10.5206 2.49739 9.77304 2.21397 8.9954 2.08314C8.45076 1.99151 8 2.44772 8 3V7.20324C8 7.49211 8.12492 7.76686 8.34259 7.95677L11.8999 11.0603C12.3287 11.4344 12.9913 11.378 13.2643 10.8787C13.6356 10.1998 13.8736 9.45248 13.9617 8.67713C14.0892 7.55433 13.8971 6.41834 13.4074 5.39993C12.9177 4.38152 12.1503 3.5221 11.1937 2.92061Z",
40
- fill: "currentColor"
41
- }
42
- )
43
- ]
44
- }
45
- )
46
- ] });
47
- }
48
-
49
- export {
50
- Clock
51
- };
@@ -1,61 +0,0 @@
1
- import {
2
- fadeCss
3
- } from "./chunk-PVVWLDIS.js";
4
- import {
5
- SpinnerStyle,
6
- spinnerRoot,
7
- step
8
- } from "./chunk-UAO52LUL.js";
9
- import {
10
- SIZE
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/circular-dots.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DOTS = [
16
- [8, 1.5],
17
- [12.5962, 3.4038],
18
- [14.5, 8],
19
- [12.5962, 12.5962],
20
- [8, 14.5],
21
- [3.4038, 12.5962],
22
- [1.5, 8],
23
- [3.4038, 3.4038]
24
- ];
25
- var css = `
26
- .ld-circular-dots {
27
- width: ${SIZE};
28
- height: ${SIZE};
29
- }
30
-
31
- ${fadeCss("circular-dots", "dot", DOTS.length, { dim: 0.2, rest: 0.6 })}
32
- `;
33
- function CircularDots(props) {
34
- return /* @__PURE__ */ jsxs(Fragment, { children: [
35
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "circular-dots", children: css }),
36
- /* @__PURE__ */ jsx(
37
- "svg",
38
- {
39
- ...spinnerRoot("circular-dots", props),
40
- fill: "currentColor",
41
- role: "presentation",
42
- viewBox: "0 0 16 16",
43
- children: DOTS.map(([cx, cy], index) => /* @__PURE__ */ jsx(
44
- "circle",
45
- {
46
- className: "ld-circular-dots-dot",
47
- cx,
48
- cy,
49
- r: "1.5",
50
- style: step(index)
51
- },
52
- `${cx}-${cy}`
53
- ))
54
- }
55
- )
56
- ] });
57
- }
58
-
59
- export {
60
- CircularDots
61
- };