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/arc.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 ArcProps extends SpinnerProps, EasingProps, CapProps {
8
- }
9
- declare function Arc({ cap, easing, ...rest }: ArcProps): react.JSX.Element;
10
-
11
- export { Arc, type ArcProps };
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/arc.d.ts
5
+ export interface ArcProps extends SpinnerProps, EasingProps, CapProps {}
6
+ export declare function Arc({ cap, easing, ...rest }: ArcProps): import("react").JSX.Element;
7
+ //#endregion
package/dist/arc.js CHANGED
@@ -1,10 +1,31 @@
1
- import {
2
- Arc
3
- } from "./chunk-MAKBZTL3.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-JNR4T6LZ.js";
6
- import "./chunk-UAO52LUL.js";
7
- import "./chunk-OMNMMKI7.js";
8
- export {
9
- Arc
10
- };
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/arc.tsx
6
+ const css = `
7
+ ${rotationCss("arc")}
8
+ `;
9
+ function Arc({ cap, easing, ...rest }) {
10
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
11
+ name: "arc",
12
+ children: css
13
+ }), /* @__PURE__ */ jsx("svg", {
14
+ ...spinnerRoot("arc", rest),
15
+ fill: "none",
16
+ role: "presentation",
17
+ viewBox: "0 0 24 24",
18
+ children: /* @__PURE__ */ jsx("circle", {
19
+ className: spinClass("arc", easing),
20
+ cx: "12",
21
+ cy: "12",
22
+ r: "10",
23
+ stroke: "currentColor",
24
+ strokeDasharray: "18 44.8",
25
+ strokeLinecap: linecap(cap),
26
+ strokeWidth: "2.5"
27
+ })
28
+ })] });
29
+ }
30
+ //#endregion
31
+ export { Arc };
package/dist/atom.d.ts CHANGED
@@ -1,10 +1,6 @@
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 AtomProps extends SpinnerProps, EasingProps {
7
- }
8
- declare function Atom({ easing, ...rest }: AtomProps): react.JSX.Element;
9
-
10
- export { Atom, type AtomProps };
1
+ import { r as EasingProps } from "./easing-DhnLArHS.js";
2
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
3
+ //#region src/atom.d.ts
4
+ export interface AtomProps extends SpinnerProps, EasingProps {}
5
+ export declare function Atom({ easing, ...rest }: AtomProps): import("react").JSX.Element;
6
+ //#endregion
package/dist/atom.js CHANGED
@@ -1,9 +1,70 @@
1
- import {
2
- Atom
3
- } from "./chunk-BAVSTTWG.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Atom
9
- };
1
+ import { SIZE, stagger } from "./motion.js";
2
+ import { rotationCss, spinClass } from "./easing.js";
3
+ import { SpinnerStyle, cssVars, spinnerRoot, step } from "./frame.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/atom.tsx
6
+ const ORBITS = Array.from({ length: 3 }, (_, index) => index);
7
+ const TILT = 180 / ORBITS.length;
8
+ const css = `
9
+ .ld-atom {
10
+ position: relative;
11
+ }
12
+
13
+ .ld-atom-shell {
14
+ position: absolute;
15
+ inset: 0;
16
+ box-sizing: border-box;
17
+ border: ${`calc(${SIZE} * 0.055)`} solid currentColor;
18
+ border-radius: 9999px;
19
+ }
20
+
21
+ .ld-atom-orbit {
22
+ position: absolute;
23
+ inset: 0;
24
+ transform-style: preserve-3d;
25
+ transform: rotate(var(--ld-atom-tilt)) rotateX(90deg);
26
+ }
27
+
28
+ .ld-atom-ring {
29
+ position: absolute;
30
+ inset: 0;
31
+ box-sizing: border-box;
32
+ border: ${`calc(${SIZE} * 0.045)`} solid currentColor;
33
+ border-radius: 9999px;
34
+ transform: rotateX(90deg);
35
+ }
36
+
37
+ ${rotationCss("atom")}
38
+
39
+ .ld-atom-spin {
40
+ position: absolute;
41
+ inset: 0;
42
+ transform-style: preserve-3d;
43
+ animation-delay: ${stagger("atom", ORBITS.length)};
44
+ }
45
+
46
+ @media (prefers-reduced-motion: reduce) {
47
+ .ld-atom-spin {
48
+ transform: rotate(${TILT}deg);
49
+ }
50
+ }
51
+ `;
52
+ function Atom({ easing, ...rest }) {
53
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
54
+ name: "atom",
55
+ children: css
56
+ }), /* @__PURE__ */ jsxs("div", {
57
+ ...spinnerRoot("atom", rest),
58
+ children: [/* @__PURE__ */ jsx("div", { className: "ld-atom-shell" }), ORBITS.map((index) => /* @__PURE__ */ jsx("div", {
59
+ className: "ld-atom-orbit",
60
+ style: cssVars({ "--ld-atom-tilt": `${index * TILT}deg` }),
61
+ children: /* @__PURE__ */ jsx("div", {
62
+ className: spinClass("atom", easing),
63
+ style: step(index),
64
+ children: /* @__PURE__ */ jsx("div", { className: "ld-atom-ring" })
65
+ })
66
+ }, index))]
67
+ })] });
68
+ }
69
+ //#endregion
70
+ export { Atom };
package/dist/blocks.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- type BlocksSweep = "columns" | "diagonal" | "rows";
5
- declare const DEFAULT_BLOCKS_SWEEP: BlocksSweep;
6
- interface BlocksProps extends SpinnerProps {
7
- sweep?: BlocksSweep;
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/blocks.d.ts
3
+ export type BlocksSweep = "columns" | "diagonal" | "rows";
4
+ export declare const DEFAULT_BLOCKS_SWEEP: BlocksSweep;
5
+ export interface BlocksProps extends SpinnerProps {
6
+ sweep?: BlocksSweep;
8
7
  }
9
- declare function Blocks({ sweep, ...rest }: BlocksProps): react.JSX.Element;
10
-
11
- export { Blocks, type BlocksProps, type BlocksSweep, DEFAULT_BLOCKS_SWEEP };
8
+ export declare function Blocks({ sweep, ...rest }: BlocksProps): import("react").JSX.Element;
9
+ //#endregion
package/dist/blocks.js CHANGED
@@ -1,10 +1,74 @@
1
- import {
2
- Blocks,
3
- DEFAULT_BLOCKS_SWEEP
4
- } from "./chunk-VZX7APSS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Blocks,
9
- DEFAULT_BLOCKS_SWEEP
1
+ import { SIZE, 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/blocks.tsx
5
+ const DEFAULT_BLOCKS_SWEEP = "diagonal";
6
+ const SIDE = 3;
7
+ const CELLS = Array.from({ length: 9 }, (_, index) => ({
8
+ col: index % SIDE,
9
+ row: Math.floor(index / SIDE)
10
+ }));
11
+ const SWEEPS = {
12
+ columns: {
13
+ count: SIDE,
14
+ place: ({ col }) => col
15
+ },
16
+ diagonal: {
17
+ count: 5,
18
+ place: ({ col, row }) => row + col
19
+ },
20
+ rows: {
21
+ count: SIDE,
22
+ place: ({ row }) => row
23
+ }
10
24
  };
25
+ const css = `
26
+ .ld-blocks {
27
+ display: grid;
28
+ grid-template-columns: repeat(${SIDE}, 1fr);
29
+ grid-template-rows: repeat(${SIDE}, 1fr);
30
+ gap: calc(${SIZE} * 0.1);
31
+ }
32
+
33
+ .ld-blocks-cell {
34
+ background: currentColor;
35
+ border-radius: calc(${SIZE} * 0.0625);
36
+ ${animation("blocks", "ld-blocks-sweep", "ease-in-out")}
37
+ }
38
+ ${Object.entries(SWEEPS).map(([sweep, { count }]) => `
39
+ .ld-blocks-cell-${sweep} {
40
+ animation-delay: ${stagger("blocks", count)};
41
+ }
42
+ `).join("")}
43
+ @keyframes ld-blocks-sweep {
44
+ 0%,
45
+ 70%,
46
+ 100% {
47
+ transform: scale(1);
48
+ }
49
+ 35% {
50
+ transform: scale(0);
51
+ }
52
+ }
53
+
54
+ @media (prefers-reduced-motion: reduce) {
55
+ .ld-blocks-cell {
56
+ transform: scale(0.8);
57
+ }
58
+ }
59
+ `;
60
+ function Blocks({ sweep = DEFAULT_BLOCKS_SWEEP, ...rest }) {
61
+ const { place } = SWEEPS[sweep];
62
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
63
+ name: "blocks",
64
+ children: css
65
+ }), /* @__PURE__ */ jsx("div", {
66
+ ...spinnerRoot("blocks", rest),
67
+ children: CELLS.map((cell) => /* @__PURE__ */ jsx("div", {
68
+ className: `ld-blocks-cell ld-blocks-cell-${sweep}`,
69
+ style: step(place(cell))
70
+ }, `${cell.col}-${cell.row}`))
71
+ })] });
72
+ }
73
+ //#endregion
74
+ export { Blocks, DEFAULT_BLOCKS_SWEEP };
@@ -1,6 +1,4 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function BouncingDots(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { BouncingDots };
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/bouncing-dots.d.ts
3
+ export declare function BouncingDots(props: SpinnerProps): import("react").JSX.Element;
4
+ //#endregion
@@ -1,8 +1,45 @@
1
- import {
2
- BouncingDots
3
- } from "./chunk-ULWRXY3A.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- BouncingDots
8
- };
1
+ import { SIZE, 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/bouncing-dots.tsx
5
+ const DOTS = Array.from({ length: 3 }, (_, index) => index);
6
+ const css = `
7
+ .ld-bouncing-dots {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: calc(${SIZE} * 0.2);
11
+ width: auto;
12
+ }
13
+
14
+ .ld-bouncing-dots-dot {
15
+ width: calc(${SIZE} * 0.25);
16
+ height: calc(${SIZE} * 0.25);
17
+ background: currentColor;
18
+ border-radius: 9999px;
19
+ ${animation("bouncing-dots", "ld-bouncing-dots-bounce", "ease-in-out alternate")}
20
+ animation-delay: ${stagger("bouncing-dots", DOTS.length)};
21
+ }
22
+
23
+ @keyframes ld-bouncing-dots-bounce {
24
+ from {
25
+ transform: translateY(28%);
26
+ }
27
+ to {
28
+ transform: translateY(-72%);
29
+ }
30
+ }
31
+ `;
32
+ function BouncingDots(props) {
33
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
34
+ name: "bouncing-dots",
35
+ children: css
36
+ }), /* @__PURE__ */ jsx("div", {
37
+ ...spinnerRoot("bouncing-dots", props),
38
+ children: DOTS.map((dot) => /* @__PURE__ */ jsx("div", {
39
+ className: "ld-bouncing-dots-dot",
40
+ style: step(dot)
41
+ }, dot))
42
+ })] });
43
+ }
44
+ //#endregion
45
+ export { BouncingDots };
@@ -0,0 +1,9 @@
1
+ //#region src/cap.d.ts
2
+ type Cap = "flat" | "round";
3
+ declare const DEFAULT_CAP: Cap;
4
+ interface CapProps {
5
+ cap?: Cap;
6
+ }
7
+ declare function linecap(cap?: Cap): "butt" | "round";
8
+ //#endregion
9
+ export { linecap as i, CapProps as n, DEFAULT_CAP as r, Cap as t };
package/dist/cap.d.ts CHANGED
@@ -1,8 +1,2 @@
1
- type Cap = "flat" | "round";
2
- declare const DEFAULT_CAP: Cap;
3
- interface CapProps {
4
- cap?: Cap;
5
- }
6
- declare function linecap(cap?: Cap): "butt" | "round";
7
-
8
- export { type Cap, type CapProps, DEFAULT_CAP, linecap };
1
+ import { i as linecap, n as CapProps, r as DEFAULT_CAP, t as Cap } from "./cap-Ba3uZx03.js";
2
+ export { Cap, CapProps, DEFAULT_CAP, linecap };
package/dist/cap.js CHANGED
@@ -1,8 +1,7 @@
1
- import {
2
- DEFAULT_CAP,
3
- linecap
4
- } from "./chunk-JNR4T6LZ.js";
5
- export {
6
- DEFAULT_CAP,
7
- linecap
8
- };
1
+ //#region src/cap.ts
2
+ const DEFAULT_CAP = "round";
3
+ function linecap(cap = DEFAULT_CAP) {
4
+ return cap === "flat" ? "butt" : "round";
5
+ }
6
+ //#endregion
7
+ export { DEFAULT_CAP, linecap };
package/dist/cascade.d.ts CHANGED
@@ -1,9 +1,6 @@
1
- import * as react from 'react';
2
- import { CapProps } from './cap.js';
3
- import { SpinnerProps } from './types.js';
4
-
5
- interface CascadeProps extends SpinnerProps, CapProps {
6
- }
7
- declare function Cascade({ cap, ...rest }: CascadeProps): react.JSX.Element;
8
-
9
- export { Cascade, type CascadeProps };
1
+ import { n as CapProps } from "./cap-Ba3uZx03.js";
2
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
3
+ //#region src/cascade.d.ts
4
+ export interface CascadeProps extends SpinnerProps, CapProps {}
5
+ export declare function Cascade({ cap, ...rest }: CascadeProps): import("react").JSX.Element;
6
+ //#endregion
package/dist/cascade.js CHANGED
@@ -1,9 +1,50 @@
1
- import {
2
- Cascade
3
- } from "./chunk-KOYM24WV.js";
4
- import "./chunk-JNR4T6LZ.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Cascade
9
- };
1
+ import { linecap } from "./cap.js";
2
+ import { animation, stagger } from "./motion.js";
3
+ import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/cascade.tsx
6
+ const RADII = [
7
+ 10.5,
8
+ 7,
9
+ 3.5
10
+ ];
11
+ const css = `
12
+ .ld-cascade-arc {
13
+ transform-origin: center;
14
+ ${animation("cascade", "ld-cascade-turn", "cubic-bezier(0.68, -0.75, 0.265, 1.75)")}
15
+ animation-delay: ${stagger("cascade", 24)};
16
+ }
17
+
18
+ @keyframes ld-cascade-turn {
19
+ to {
20
+ transform: rotate(360deg);
21
+ }
22
+ }
23
+ `;
24
+ function Cascade({ cap, ...rest }) {
25
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
26
+ name: "cascade",
27
+ children: css
28
+ }), /* @__PURE__ */ jsx("svg", {
29
+ ...spinnerRoot("cascade", rest),
30
+ fill: "none",
31
+ role: "presentation",
32
+ stroke: "currentColor",
33
+ strokeLinecap: linecap(cap),
34
+ strokeWidth: "2",
35
+ viewBox: "0 0 24 24",
36
+ children: RADII.map((r, index) => {
37
+ const circumference = 2 * Math.PI * r;
38
+ return /* @__PURE__ */ jsx("circle", {
39
+ className: "ld-cascade-arc",
40
+ cx: "12",
41
+ cy: "12",
42
+ r,
43
+ strokeDasharray: `${circumference / 4} ${circumference * 3 / 4}`,
44
+ style: step(index)
45
+ }, r);
46
+ })
47
+ })] });
48
+ }
49
+ //#endregion
50
+ export { Cascade };
@@ -1,6 +1,4 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function CircularDots(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { CircularDots };
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/circular-dots.d.ts
3
+ export declare function CircularDots(props: SpinnerProps): import("react").JSX.Element;
4
+ //#endregion
@@ -1,9 +1,40 @@
1
- import {
2
- CircularDots
3
- } from "./chunk-3WMZVDPS.js";
4
- import "./chunk-PVVWLDIS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- CircularDots
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
+ //#region src/circular-dots.tsx
5
+ const DOTS = [
6
+ [8, 1.5],
7
+ [12.5962, 3.4038],
8
+ [14.5, 8],
9
+ [12.5962, 12.5962],
10
+ [8, 14.5],
11
+ [3.4038, 12.5962],
12
+ [1.5, 8],
13
+ [3.4038, 3.4038]
14
+ ];
15
+ const css = `
16
+ ${fadeCss("circular-dots", "dot", DOTS.length, {
17
+ dim: .2,
18
+ rest: .6
19
+ })}
20
+ `;
21
+ function CircularDots(props) {
22
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
23
+ name: "circular-dots",
24
+ children: css
25
+ }), /* @__PURE__ */ jsx("svg", {
26
+ ...spinnerRoot("circular-dots", props),
27
+ fill: "currentColor",
28
+ role: "presentation",
29
+ viewBox: "0 0 16 16",
30
+ children: DOTS.map(([cx, cy], index) => /* @__PURE__ */ jsx("circle", {
31
+ className: "ld-circular-dots-dot",
32
+ cx,
33
+ cy,
34
+ r: "1.5",
35
+ style: step(index)
36
+ }, `${cx}-${cy}`))
37
+ })] });
38
+ }
39
+ //#endregion
40
+ export { CircularDots };
@@ -1,6 +1,4 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function ClassicV2(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { ClassicV2 };
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/classic-v2.d.ts
3
+ export declare function ClassicV2(props: SpinnerProps): import("react").JSX.Element;
4
+ //#endregion
@@ -1,9 +1,41 @@
1
- import {
2
- ClassicV2
3
- } from "./chunk-R5ZDKN3Z.js";
4
- import "./chunk-PVVWLDIS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- ClassicV2
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
+ //#region src/classic-v2.tsx
5
+ const TICKS = [
6
+ "M7.33334 0.666667C7.33334 0.298477 7.63181 0 8 0C8.36819 0 8.66667 0.298477 8.66667 0.666667V3.33333C8.66667 3.70152 8.36819 4 8 4C7.63181 4 7.33334 3.70152 7.33334 3.33333V0.666667Z",
7
+ "M11.7712 5.17154C11.5109 5.43189 11.0888 5.43189 10.8284 5.17154C10.5681 4.91119 10.5681 4.48908 10.8284 4.22873L12.714 2.34311C12.9744 2.08276 13.3965 2.08276 13.6568 2.34311C13.9172 2.60346 13.9172 3.02557 13.6568 3.28592L11.7712 5.17154Z",
8
+ "M12.6667 8.66667C12.2985 8.66667 12 8.36819 12 8.00001C12 7.63182 12.2985 7.33334 12.6667 7.33334H15.3333C15.7015 7.33334 16 7.63182 16 8.00001C16 8.36819 15.7015 8.66667 15.3333 8.66667H12.6667Z",
9
+ "M10.8284 11.7713C10.5681 11.5109 10.5681 11.0888 10.8284 10.8284C11.0888 10.5681 11.5109 10.5681 11.7712 10.8284L13.6568 12.7141C13.9172 12.9744 13.9172 13.3965 13.6568 13.6569C13.3965 13.9172 12.9744 13.9172 12.714 13.6569L10.8284 11.7713Z",
10
+ "M7.33333 12.6667C7.33333 12.2985 7.63181 12 8 12C8.36819 12 8.66667 12.2985 8.66667 12.6667V15.3333C8.66667 15.7015 8.36819 16 8 16C7.63181 16 7.33333 15.7015 7.33333 15.3333V12.6667Z",
11
+ "M3.28594 13.6569C3.02559 13.9172 2.60348 13.9172 2.34313 13.6569C2.08278 13.3965 2.08278 12.9744 2.34313 12.714L4.22875 10.8284C4.4891 10.5681 4.91121 10.5681 5.17156 10.8284C5.43191 11.0888 5.43191 11.5109 5.17156 11.7712L3.28594 13.6569Z",
12
+ "M0.666667 8.66667C0.298477 8.66667 1.60941e-08 8.36819 0 8.00001C-1.60941e-08 7.63182 0.298477 7.33334 0.666667 7.33334H3.33333C3.70152 7.33334 4 7.63182 4 8.00001C4 8.36819 3.70152 8.66667 3.33333 8.66667H0.666667Z",
13
+ "M2.34315 3.28594C2.0828 3.02559 2.0828 2.60348 2.34315 2.34314C2.6035 2.08279 3.02561 2.08279 3.28596 2.34313L5.17158 4.22875C5.43193 4.4891 5.43193 4.91121 5.17158 5.17156C4.91123 5.43191 4.48912 5.43191 4.22877 5.17156L2.34315 3.28594Z"
14
+ ];
15
+ const css = `
16
+ ${fadeCss("classic-v2", "tick", TICKS.length, {
17
+ dim: .4,
18
+ rest: .5
19
+ })}
20
+ `;
21
+ function ClassicV2(props) {
22
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
23
+ name: "classic-v2",
24
+ children: css
25
+ }), /* @__PURE__ */ jsx("svg", {
26
+ ...spinnerRoot("classic-v2", props),
27
+ fill: "none",
28
+ role: "presentation",
29
+ viewBox: "0 0 16 16",
30
+ children: /* @__PURE__ */ jsx("g", {
31
+ fill: "currentColor",
32
+ children: TICKS.map((d, tick) => /* @__PURE__ */ jsx("path", {
33
+ className: "ld-classic-v2-tick",
34
+ d,
35
+ style: step(tick)
36
+ }, d))
37
+ })
38
+ })] });
39
+ }
40
+ //#endregion
41
+ export { ClassicV2 };
package/dist/classic.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Classic(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Classic };
1
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
+ //#region src/classic.d.ts
3
+ export declare function Classic(props: SpinnerProps): import("react").JSX.Element;
4
+ //#endregion
package/dist/classic.js CHANGED
@@ -1,9 +1,48 @@
1
- import {
2
- Classic
3
- } from "./chunk-IJJULNRU.js";
4
- import "./chunk-PVVWLDIS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Classic
9
- };
1
+ import { SIZE, STEP_VAR } 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/classic.tsx
6
+ const BARS = Array.from({ length: 12 }, (_, index) => index);
7
+ const css = `
8
+ .ld-classic-inner {
9
+ position: relative;
10
+ top: 50%;
11
+ left: 50%;
12
+ width: ${SIZE};
13
+ height: ${SIZE};
14
+ }
15
+
16
+ .ld-classic-bar {
17
+ position: absolute;
18
+ top: -3.9%;
19
+ left: -10%;
20
+ width: 24%;
21
+ height: 8%;
22
+ background: currentColor;
23
+ border-radius: 6px;
24
+ transform: rotate(calc(var(${STEP_VAR}) * 30deg)) translate(146%);
25
+ }
26
+
27
+ ${fadeCss("classic", "bar", BARS.length, {
28
+ dim: .15,
29
+ rest: .5
30
+ })}
31
+ `;
32
+ function Classic(props) {
33
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
34
+ name: "classic",
35
+ children: css
36
+ }), /* @__PURE__ */ jsx("div", {
37
+ ...spinnerRoot("classic", props),
38
+ children: /* @__PURE__ */ jsx("div", {
39
+ className: "ld-classic-inner",
40
+ children: BARS.map((bar) => /* @__PURE__ */ jsx("div", {
41
+ className: "ld-classic-bar",
42
+ style: step(bar)
43
+ }, bar))
44
+ })
45
+ })] });
46
+ }
47
+ //#endregion
48
+ export { Classic };
package/dist/clock.d.ts CHANGED
@@ -1,10 +1,6 @@
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 ClockProps extends SpinnerProps, EasingProps {
7
- }
8
- declare function Clock({ easing, ...rest }: ClockProps): react.JSX.Element;
9
-
10
- export { Clock, type ClockProps };
1
+ import { r as EasingProps } from "./easing-DhnLArHS.js";
2
+ import { t as SpinnerProps } from "./types-BYaenrWm.js";
3
+ //#region src/clock.d.ts
4
+ export interface ClockProps extends SpinnerProps, EasingProps {}
5
+ export declare function Clock({ easing, ...rest }: ClockProps): import("react").JSX.Element;
6
+ //#endregion