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
@@ -1,53 +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
- STEP_VAR
12
- } from "./chunk-OMNMMKI7.js";
13
-
14
- // src/classic.tsx
15
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
- var BARS = Array.from({ length: 12 }, (_, index) => index);
17
- var css = `
18
- .ld-classic {
19
- width: ${SIZE};
20
- height: ${SIZE};
21
- }
22
-
23
- .ld-classic-inner {
24
- position: relative;
25
- top: 50%;
26
- left: 50%;
27
- width: ${SIZE};
28
- height: ${SIZE};
29
- }
30
-
31
- .ld-classic-bar {
32
- position: absolute;
33
- top: -3.9%;
34
- left: -10%;
35
- width: 24%;
36
- height: 8%;
37
- background: currentColor;
38
- border-radius: 6px;
39
- transform: rotate(calc(var(${STEP_VAR}) * 30deg)) translate(146%);
40
- }
41
-
42
- ${fadeCss("classic", "bar", BARS.length, { dim: 0.15, rest: 0.5 })}
43
- `;
44
- function Classic(props) {
45
- return /* @__PURE__ */ jsxs(Fragment, { children: [
46
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "classic", children: css }),
47
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("classic", props), children: /* @__PURE__ */ jsx("div", { className: "ld-classic-inner", children: BARS.map((bar) => /* @__PURE__ */ jsx("div", { className: "ld-classic-bar", style: step(bar) }, bar)) }) })
48
- ] });
49
- }
50
-
51
- export {
52
- Classic
53
- };
@@ -1,85 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- cssVars,
4
- spinnerRoot
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- animation
9
- } from "./chunk-OMNMMKI7.js";
10
-
11
- // src/gather.tsx
12
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
- var BLOCKS = [
14
- { x: 1, y: 1 },
15
- { x: -1, y: 1 },
16
- { x: 1, y: -1 },
17
- { x: -1, y: -1 }
18
- ];
19
- var GAP = 24;
20
- var GAP_IN = 8;
21
- var BLOCK = (100 - GAP) / 2;
22
- var PULL = `${((GAP - GAP_IN) / 2 / BLOCK * 100).toFixed(1)}%`;
23
- var css = `
24
- .ld-gather {
25
- width: ${SIZE};
26
- height: ${SIZE};
27
- }
28
-
29
- .ld-gather-group {
30
- display: grid;
31
- grid-template-columns: 1fr 1fr;
32
- gap: ${GAP}%;
33
- width: 100%;
34
- height: 100%;
35
- ${animation("gather", "ld-gather-turn", "ease-in-out")}
36
- }
37
-
38
- .ld-gather-block {
39
- background: currentColor;
40
- border-radius: calc(${SIZE} * 0.14);
41
- ${animation("gather", "ld-gather-pull", "ease-in-out")}
42
- }
43
-
44
- @keyframes ld-gather-pull {
45
- 0%,
46
- 100% {
47
- transform: translate(0, 0);
48
- }
49
- 30%,
50
- 60% {
51
- transform: translate(
52
- calc(var(--ld-gather-x) * ${PULL}),
53
- calc(var(--ld-gather-y) * ${PULL})
54
- );
55
- }
56
- }
57
-
58
- @keyframes ld-gather-turn {
59
- 0%,
60
- 30% {
61
- transform: rotate(0);
62
- }
63
- 60%,
64
- 100% {
65
- transform: rotate(90deg);
66
- }
67
- }
68
- `;
69
- function Gather(props) {
70
- return /* @__PURE__ */ jsxs(Fragment, { children: [
71
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "gather", children: css }),
72
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("gather", props), children: /* @__PURE__ */ jsx("div", { className: "ld-gather-group", children: BLOCKS.map(({ x, y }) => /* @__PURE__ */ jsx(
73
- "div",
74
- {
75
- className: "ld-gather-block",
76
- style: cssVars({ "--ld-gather-x": x, "--ld-gather-y": y })
77
- },
78
- `${x}${y}`
79
- )) }) })
80
- ] });
81
- }
82
-
83
- export {
84
- Gather
85
- };
@@ -1,10 +0,0 @@
1
- // src/cap.ts
2
- var DEFAULT_CAP = "round";
3
- function linecap(cap = DEFAULT_CAP) {
4
- return cap === "flat" ? "butt" : "round";
5
- }
6
-
7
- export {
8
- DEFAULT_CAP,
9
- linecap
10
- };
@@ -1,52 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot
4
- } from "./chunk-UAO52LUL.js";
5
- import {
6
- SIZE,
7
- animation
8
- } from "./chunk-OMNMMKI7.js";
9
-
10
- // src/compass.tsx
11
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- var css = `
13
- .ld-compass {
14
- width: ${SIZE};
15
- height: ${SIZE};
16
- }
17
-
18
- .ld-compass-ticks {
19
- transform-origin: center;
20
- ${animation("compass", "ld-compass-turn", "ease-in-out")}
21
- }
22
-
23
- @keyframes ld-compass-turn {
24
- to {
25
- transform: rotate(90deg);
26
- }
27
- }
28
- `;
29
- function Compass(props) {
30
- return /* @__PURE__ */ jsxs(Fragment, { children: [
31
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "compass", children: css }),
32
- /* @__PURE__ */ jsx(
33
- "svg",
34
- {
35
- ...spinnerRoot("compass", props),
36
- fill: "none",
37
- role: "presentation",
38
- viewBox: "0 0 16 16",
39
- children: /* @__PURE__ */ jsxs("g", { className: "ld-compass-ticks", fill: "currentColor", children: [
40
- /* @__PURE__ */ jsx("path", { d: "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" }),
41
- /* @__PURE__ */ jsx("path", { d: "M12.6667 8.66667C12.2985 8.66667 12 8.3682 12 8.00001C12 7.63182 12.2985 7.33334 12.6667 7.33334H15.3333C15.7015 7.33334 16 7.63182 16 8.00001C16 8.3682 15.7015 8.66667 15.3333 8.66667H12.6667Z" }),
42
- /* @__PURE__ */ jsx("path", { d: "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" }),
43
- /* @__PURE__ */ jsx("path", { d: "M0.666667 8.66667C0.298477 8.66667 1.60941e-08 8.3682 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.3682 3.70152 8.66667 3.33333 8.66667H0.666667Z" })
44
- ] })
45
- }
46
- )
47
- ] });
48
- }
49
-
50
- export {
51
- Compass
52
- };
@@ -1,74 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- linecap
7
- } from "./chunk-JNR4T6LZ.js";
8
- import {
9
- SpinnerStyle,
10
- spinnerRoot
11
- } from "./chunk-UAO52LUL.js";
12
- import {
13
- SIZE
14
- } from "./chunk-OMNMMKI7.js";
15
-
16
- // src/trace.tsx
17
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
- var VIEW = 20;
19
- var SIDE = 17.5;
20
- var RADIUS = 4;
21
- var PERIMETER = 4 * (SIDE - 2 * RADIUS) + 2 * Math.PI * RADIUS;
22
- var DASH = 16;
23
- var RECT = {
24
- height: SIDE,
25
- rx: RADIUS,
26
- width: SIDE,
27
- x: (VIEW - SIDE) / 2,
28
- y: (VIEW - SIDE) / 2
29
- };
30
- var css = `
31
- .ld-trace {
32
- width: ${SIZE};
33
- height: ${SIZE};
34
- }
35
-
36
- ${rotationCss(
37
- "trace",
38
- `to {
39
- stroke-dashoffset: ${-PERIMETER};
40
- }`
41
- )}
42
- `;
43
- function Trace({ cap, easing, ...rest }) {
44
- return /* @__PURE__ */ jsxs(Fragment, { children: [
45
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "trace", children: css }),
46
- /* @__PURE__ */ jsxs(
47
- "svg",
48
- {
49
- ...spinnerRoot("trace", rest),
50
- fill: "none",
51
- role: "presentation",
52
- stroke: "currentColor",
53
- strokeWidth: "2.5",
54
- viewBox: `0 0 ${VIEW} ${VIEW}`,
55
- children: [
56
- /* @__PURE__ */ jsx("rect", { ...RECT, opacity: "0.2" }),
57
- /* @__PURE__ */ jsx(
58
- "rect",
59
- {
60
- ...RECT,
61
- className: spinClass("trace", easing),
62
- strokeDasharray: `${DASH} ${PERIMETER - DASH}`,
63
- strokeLinecap: linecap(cap)
64
- }
65
- )
66
- ]
67
- }
68
- )
69
- ] });
70
- }
71
-
72
- export {
73
- Trace
74
- };
@@ -1,72 +0,0 @@
1
- import {
2
- linecap
3
- } from "./chunk-JNR4T6LZ.js";
4
- import {
5
- SpinnerStyle,
6
- spinnerRoot,
7
- step
8
- } from "./chunk-UAO52LUL.js";
9
- import {
10
- SIZE,
11
- animation,
12
- stagger
13
- } from "./chunk-OMNMMKI7.js";
14
-
15
- // src/cascade.tsx
16
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
- var RADII = [10.5, 7, 3.5];
18
- var SLOTS = 24;
19
- var css = `
20
- .ld-cascade {
21
- width: ${SIZE};
22
- height: ${SIZE};
23
- }
24
-
25
- .ld-cascade-arc {
26
- transform-origin: center;
27
- ${animation("cascade", "ld-cascade-turn", "cubic-bezier(0.68, -0.75, 0.265, 1.75)")}
28
- animation-delay: ${stagger("cascade", SLOTS)};
29
- }
30
-
31
- @keyframes ld-cascade-turn {
32
- to {
33
- transform: rotate(360deg);
34
- }
35
- }
36
- `;
37
- function Cascade({ cap, ...rest }) {
38
- return /* @__PURE__ */ jsxs(Fragment, { children: [
39
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "cascade", children: css }),
40
- /* @__PURE__ */ jsx(
41
- "svg",
42
- {
43
- ...spinnerRoot("cascade", rest),
44
- fill: "none",
45
- role: "presentation",
46
- stroke: "currentColor",
47
- strokeLinecap: linecap(cap),
48
- strokeWidth: "2",
49
- viewBox: "0 0 24 24",
50
- children: RADII.map((r, index) => {
51
- const circumference = 2 * Math.PI * r;
52
- return /* @__PURE__ */ jsx(
53
- "circle",
54
- {
55
- className: "ld-cascade-arc",
56
- cx: "12",
57
- cy: "12",
58
- r,
59
- strokeDasharray: `${circumference / 4} ${circumference * 3 / 4}`,
60
- style: step(index)
61
- },
62
- r
63
- );
64
- })
65
- }
66
- )
67
- ] });
68
- }
69
-
70
- export {
71
- Cascade
72
- };
@@ -1,69 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- linecap
7
- } from "./chunk-JNR4T6LZ.js";
8
- import {
9
- SpinnerStyle,
10
- spinnerRoot
11
- } from "./chunk-UAO52LUL.js";
12
- import {
13
- SIZE
14
- } from "./chunk-OMNMMKI7.js";
15
-
16
- // src/ring.tsx
17
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
- var css = `
19
- .ld-ring {
20
- width: ${SIZE};
21
- height: ${SIZE};
22
- }
23
-
24
- ${rotationCss("ring")}
25
- `;
26
- function Ring({ cap, easing, ...rest }) {
27
- return /* @__PURE__ */ jsxs(Fragment, { children: [
28
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "ring", children: css }),
29
- /* @__PURE__ */ jsxs(
30
- "svg",
31
- {
32
- ...spinnerRoot("ring", rest),
33
- fill: "none",
34
- role: "presentation",
35
- viewBox: "0 0 24 24",
36
- children: [
37
- /* @__PURE__ */ jsx(
38
- "circle",
39
- {
40
- cx: "12",
41
- cy: "12",
42
- opacity: "0.2",
43
- r: "10",
44
- stroke: "currentColor",
45
- strokeWidth: "2.5"
46
- }
47
- ),
48
- /* @__PURE__ */ jsx(
49
- "circle",
50
- {
51
- className: spinClass("ring", easing),
52
- cx: "12",
53
- cy: "12",
54
- r: "10",
55
- stroke: "currentColor",
56
- strokeDasharray: "16 46.8",
57
- strokeLinecap: linecap(cap),
58
- strokeWidth: "2.5"
59
- }
60
- )
61
- ]
62
- }
63
- )
64
- ] });
65
- }
66
-
67
- export {
68
- Ring
69
- };
@@ -1,57 +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/orbit.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var css = `
16
- .ld-orbit {
17
- --ld-orbit-stroke: calc(${SIZE} * 0.0625);
18
- position: relative;
19
- width: ${SIZE};
20
- height: ${SIZE};
21
- }
22
-
23
- .ld-orbit-track {
24
- position: absolute;
25
- inset: 8%;
26
- border-radius: 9999px;
27
- background: conic-gradient(from 180deg, transparent 0deg, currentColor 180deg, transparent 180deg);
28
- -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
29
- mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
30
- }
31
-
32
- .ld-orbit-dot {
33
- position: absolute;
34
- top: 50%;
35
- left: 50%;
36
- width: 25%;
37
- height: 25%;
38
- background: currentColor;
39
- border-radius: 9999px;
40
- transform: translate(-50%, -50%);
41
- }
42
-
43
- ${rotationCss("orbit")}
44
- `;
45
- function Orbit({ easing, ...rest }) {
46
- return /* @__PURE__ */ jsxs(Fragment, { children: [
47
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "orbit", children: css }),
48
- /* @__PURE__ */ jsxs("div", { ...spinnerRoot("orbit", rest), children: [
49
- /* @__PURE__ */ jsx("div", { className: "ld-orbit-dot" }),
50
- /* @__PURE__ */ jsx("div", { className: `ld-orbit-track ${spinClass("orbit", easing)}` })
51
- ] })
52
- ] });
53
- }
54
-
55
- export {
56
- Orbit
57
- };
@@ -1,56 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- linecap
7
- } from "./chunk-JNR4T6LZ.js";
8
- import {
9
- SpinnerStyle,
10
- spinnerRoot
11
- } from "./chunk-UAO52LUL.js";
12
- import {
13
- SIZE
14
- } from "./chunk-OMNMMKI7.js";
15
-
16
- // src/arc.tsx
17
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
- var css = `
19
- .ld-arc {
20
- width: ${SIZE};
21
- height: ${SIZE};
22
- }
23
-
24
- ${rotationCss("arc")}
25
- `;
26
- function Arc({ cap, easing, ...rest }) {
27
- return /* @__PURE__ */ jsxs(Fragment, { children: [
28
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "arc", children: css }),
29
- /* @__PURE__ */ jsx(
30
- "svg",
31
- {
32
- ...spinnerRoot("arc", rest),
33
- fill: "none",
34
- role: "presentation",
35
- viewBox: "0 0 24 24",
36
- children: /* @__PURE__ */ jsx(
37
- "circle",
38
- {
39
- className: spinClass("arc", easing),
40
- cx: "12",
41
- cy: "12",
42
- r: "10",
43
- stroke: "currentColor",
44
- strokeDasharray: "18 44.8",
45
- strokeLinecap: linecap(cap),
46
- strokeWidth: "2.5"
47
- }
48
- )
49
- }
50
- )
51
- ] });
52
- }
53
-
54
- export {
55
- Arc
56
- };
@@ -1,64 +0,0 @@
1
- // src/motion.ts
2
- var DURATION_VAR = "--ld-duration";
3
- var PLAY_STATE_VAR = "--ld-play-state";
4
- var SIZE_VAR = "--ld-size";
5
- var STEP_VAR = "--ld-step";
6
- var DEFAULT_SIZE = 20;
7
- var SIZE = `var(${SIZE_VAR}, ${DEFAULT_SIZE}px)`;
8
- var SPINNER_MOTION = {
9
- arc: 800,
10
- atom: 1e3,
11
- blocks: 1300,
12
- "bouncing-dots": 500,
13
- cascade: 1500,
14
- "circular-dots": 800,
15
- classic: 1200,
16
- "classic-v2": 800,
17
- clock: 1200,
18
- comet: 700,
19
- compass: 500,
20
- dual: 1e3,
21
- eclipse: 1200,
22
- flip: 1200,
23
- gather: 1600,
24
- leap: 1800,
25
- "linear-dots": 900,
26
- loading: 1e3,
27
- morph: 1200,
28
- orbit: 750,
29
- pulse: 1200,
30
- radar: 1500,
31
- ring: 800,
32
- ripple: 1200,
33
- slide: 2400,
34
- snake: 1400,
35
- swirl: 1200,
36
- trace: 1200,
37
- wave: 900
38
- };
39
- function duration(name) {
40
- return `var(${DURATION_VAR}, ${SPINNER_MOTION[name]}ms)`;
41
- }
42
- function stagger(name, count) {
43
- return `calc(${duration(name)} * (var(${STEP_VAR}) - ${count}) / ${count})`;
44
- }
45
- var PLAY_STATE = `var(${PLAY_STATE_VAR}, running)`;
46
- function animation(name, keyframes, timing) {
47
- const runs = [keyframes].flat().map((frames) => `${frames} ${duration(name)} ${timing} infinite`);
48
- return `animation: ${runs.join(", ")};
49
- animation-play-state: ${PLAY_STATE};`;
50
- }
51
-
52
- export {
53
- DURATION_VAR,
54
- PLAY_STATE_VAR,
55
- SIZE_VAR,
56
- STEP_VAR,
57
- DEFAULT_SIZE,
58
- SIZE,
59
- SPINNER_MOTION,
60
- duration,
61
- stagger,
62
- PLAY_STATE,
63
- animation
64
- };
@@ -1,51 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot
4
- } from "./chunk-UAO52LUL.js";
5
- import {
6
- SIZE,
7
- animation
8
- } from "./chunk-OMNMMKI7.js";
9
-
10
- // src/morph.tsx
11
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- var css = `
13
- .ld-morph {
14
- width: ${SIZE};
15
- height: ${SIZE};
16
- }
17
-
18
- .ld-morph-shape {
19
- width: 64%;
20
- height: 64%;
21
- margin: 18%;
22
- background: currentColor;
23
- border-radius: calc(${SIZE} * 0.08);
24
- ${animation("morph", "ld-morph-round", "ease-in-out")}
25
- }
26
-
27
- @keyframes ld-morph-round {
28
- 0% {
29
- border-radius: calc(${SIZE} * 0.08);
30
- transform: rotate(0);
31
- }
32
- 50% {
33
- border-radius: 50%;
34
- transform: rotate(45deg);
35
- }
36
- 100% {
37
- border-radius: calc(${SIZE} * 0.08);
38
- transform: rotate(90deg);
39
- }
40
- }
41
- `;
42
- function Morph(props) {
43
- return /* @__PURE__ */ jsxs(Fragment, { children: [
44
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "morph", children: css }),
45
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("morph", props), children: /* @__PURE__ */ jsx("div", { className: "ld-morph-shape" }) })
46
- ] });
47
- }
48
-
49
- export {
50
- Morph
51
- };