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,70 +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/pulse.tsx
11
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- var css = `
13
- .ld-pulse {
14
- width: ${SIZE};
15
- height: ${SIZE};
16
- }
17
-
18
- .ld-pulse-ring {
19
- transform-origin: center;
20
- ${animation("pulse", "ld-pulse-ripple", "ease-out")}
21
- }
22
-
23
- @keyframes ld-pulse-ripple {
24
- from {
25
- opacity: 0.4;
26
- transform: scale(0.25);
27
- }
28
- to {
29
- opacity: 0;
30
- transform: scale(1);
31
- }
32
- }
33
-
34
- @media (prefers-reduced-motion: reduce) {
35
- .ld-pulse-ring {
36
- opacity: 0.2;
37
- }
38
- }
39
- `;
40
- function Pulse(props) {
41
- return /* @__PURE__ */ jsxs(Fragment, { children: [
42
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "pulse", children: css }),
43
- /* @__PURE__ */ jsxs(
44
- "svg",
45
- {
46
- ...spinnerRoot("pulse", props),
47
- fill: "none",
48
- role: "presentation",
49
- viewBox: "0 0 16 16",
50
- children: [
51
- /* @__PURE__ */ jsx(
52
- "circle",
53
- {
54
- className: "ld-pulse-ring",
55
- cx: "8",
56
- cy: "8",
57
- fill: "currentColor",
58
- r: "8"
59
- }
60
- ),
61
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
62
- ]
63
- }
64
- )
65
- ] });
66
- }
67
-
68
- export {
69
- Pulse
70
- };
@@ -1,33 +0,0 @@
1
- import {
2
- animation,
3
- stagger
4
- } from "./chunk-OMNMMKI7.js";
5
-
6
- // src/fade.ts
7
- function fadeCss(name, element, count, { dim, rest }) {
8
- return `
9
- .ld-${name}-${element} {
10
- ${animation(name, `ld-${name}-fade`, "linear")}
11
- animation-delay: ${stagger(name, count)};
12
- }
13
-
14
- @keyframes ld-${name}-fade {
15
- from {
16
- opacity: 1;
17
- }
18
- to {
19
- opacity: ${dim};
20
- }
21
- }
22
-
23
- @media (prefers-reduced-motion: reduce) {
24
- .ld-${name}-${element} {
25
- opacity: ${rest};
26
- }
27
- }
28
- `;
29
- }
30
-
31
- export {
32
- fadeCss
33
- };
@@ -1,59 +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/classic-v2.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var TICKS = [
16
- "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",
17
- "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",
18
- "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",
19
- "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",
20
- "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",
21
- "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",
22
- "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",
23
- "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"
24
- ];
25
- var css = `
26
- .ld-classic-v2 {
27
- width: ${SIZE};
28
- height: ${SIZE};
29
- }
30
-
31
- ${fadeCss("classic-v2", "tick", TICKS.length, { dim: 0.4, rest: 0.5 })}
32
- `;
33
- function ClassicV2(props) {
34
- return /* @__PURE__ */ jsxs(Fragment, { children: [
35
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "classic-v2", children: css }),
36
- /* @__PURE__ */ jsx(
37
- "svg",
38
- {
39
- ...spinnerRoot("classic-v2", props),
40
- fill: "none",
41
- role: "presentation",
42
- viewBox: "0 0 16 16",
43
- children: /* @__PURE__ */ jsx("g", { fill: "currentColor", children: TICKS.map((d, tick) => /* @__PURE__ */ jsx(
44
- "path",
45
- {
46
- className: "ld-classic-v2-tick",
47
- d,
48
- style: step(tick)
49
- },
50
- d
51
- )) })
52
- }
53
- )
54
- ] });
55
- }
56
-
57
- export {
58
- ClassicV2
59
- };
@@ -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/loading.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var BLOCK = "M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2z";
16
- var SEGMENTS = [
17
- { x: 12, y: 6 },
18
- { x: 10, y: 10 },
19
- { x: 6, y: 12 },
20
- { x: 2, y: 10 },
21
- { x: 0, y: 6 },
22
- { x: 2, y: 2 },
23
- { x: 6, y: 0 },
24
- { x: 10, y: 2 }
25
- ];
26
- var css = `
27
- .ld-loading {
28
- width: ${SIZE};
29
- height: ${SIZE};
30
- }
31
-
32
- ${fadeCss("loading", "segment", SEGMENTS.length, { dim: 0.2, rest: 0.6 })}
33
- `;
34
- function Loading(props) {
35
- return /* @__PURE__ */ jsxs(Fragment, { children: [
36
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "loading", children: css }),
37
- /* @__PURE__ */ jsx(
38
- "svg",
39
- {
40
- ...spinnerRoot("loading", props),
41
- fill: "currentColor",
42
- role: "presentation",
43
- viewBox: "0 0 15 15",
44
- children: SEGMENTS.map(({ x, y }, segment) => /* @__PURE__ */ jsx(
45
- "path",
46
- {
47
- className: "ld-loading-segment",
48
- d: BLOCK,
49
- style: step(segment),
50
- transform: `translate(${x} ${y})`
51
- },
52
- `${x}-${y}`
53
- ))
54
- }
55
- )
56
- ] });
57
- }
58
-
59
- export {
60
- Loading
61
- };
@@ -1,46 +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/swirl.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var RING = [0, 1, 2, 7, null, 3, 6, 5, 4];
16
- var PLACES = RING.filter((place) => place !== null).length;
17
- var css = `
18
- .ld-swirl {
19
- display: grid;
20
- grid-template-columns: repeat(3, 1fr);
21
- grid-template-rows: repeat(3, 1fr);
22
- gap: calc(${SIZE} * 0.15625);
23
- box-sizing: border-box;
24
- width: ${SIZE};
25
- height: ${SIZE};
26
- padding: calc(${SIZE} * 0.0625);
27
- }
28
-
29
- .ld-swirl-cell {
30
- background: currentColor;
31
- border-radius: calc(${SIZE} * 0.0625);
32
- }
33
- ${fadeCss("swirl", "cell", PLACES, { dim: 0.2, rest: 0.6 })}
34
- `;
35
- function Swirl(props) {
36
- return /* @__PURE__ */ jsxs(Fragment, { children: [
37
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "swirl", children: css }),
38
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("swirl", props), children: RING.map(
39
- (place, index) => place === null ? /* @__PURE__ */ jsx("div", {}, index) : /* @__PURE__ */ jsx("div", { className: "ld-swirl-cell", style: step(place) }, index)
40
- ) })
41
- ] });
42
- }
43
-
44
- export {
45
- Swirl
46
- };
@@ -1,48 +0,0 @@
1
- import {
2
- DEFAULT_SIZE,
3
- DURATION_VAR,
4
- PLAY_STATE_VAR,
5
- SIZE_VAR,
6
- STEP_VAR
7
- } from "./chunk-OMNMMKI7.js";
8
-
9
- // src/frame.tsx
10
- import { jsx } from "react/jsx-runtime";
11
- function SpinnerStyle({
12
- children,
13
- name
14
- }) {
15
- return /* @__PURE__ */ jsx("style", { href: `ld-${name}`, precedence: "loading-dev", children: `${children}
16
- @media (prefers-reduced-motion: reduce) {
17
- .ld-${name},
18
- .ld-${name} * {
19
- animation: none;
20
- }
21
- }
22
- ` });
23
- }
24
- function cssVars(vars) {
25
- return vars;
26
- }
27
- function step(index) {
28
- return cssVars({ [STEP_VAR]: index });
29
- }
30
- function spinnerRoot(name, { className, color, duration, playState, size = DEFAULT_SIZE }) {
31
- return {
32
- "aria-hidden": true,
33
- className: [`ld-${name}`, className].filter(Boolean).join(" "),
34
- style: cssVars({
35
- [SIZE_VAR]: `${size}px`,
36
- ...color === void 0 ? null : { color },
37
- ...duration === void 0 ? null : { [DURATION_VAR]: `${duration}ms` },
38
- ...playState === void 0 ? null : { [PLAY_STATE_VAR]: playState }
39
- })
40
- };
41
- }
42
-
43
- export {
44
- SpinnerStyle,
45
- cssVars,
46
- step,
47
- spinnerRoot
48
- };
@@ -1,50 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot,
4
- step
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- animation,
9
- stagger
10
- } from "./chunk-OMNMMKI7.js";
11
-
12
- // src/bouncing-dots.tsx
13
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- var DOTS = Array.from({ length: 3 }, (_, index) => index);
15
- var css = `
16
- .ld-bouncing-dots {
17
- display: flex;
18
- align-items: center;
19
- gap: calc(${SIZE} * 0.2);
20
- height: ${SIZE};
21
- }
22
-
23
- .ld-bouncing-dots-dot {
24
- width: calc(${SIZE} * 0.25);
25
- height: calc(${SIZE} * 0.25);
26
- background: currentColor;
27
- border-radius: 9999px;
28
- ${animation("bouncing-dots", "ld-bouncing-dots-bounce", "ease-in-out alternate")}
29
- animation-delay: ${stagger("bouncing-dots", DOTS.length)};
30
- }
31
-
32
- @keyframes ld-bouncing-dots-bounce {
33
- from {
34
- transform: translateY(28%);
35
- }
36
- to {
37
- transform: translateY(-72%);
38
- }
39
- }
40
- `;
41
- function BouncingDots(props) {
42
- return /* @__PURE__ */ jsxs(Fragment, { children: [
43
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "bouncing-dots", children: css }),
44
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("bouncing-dots", props), children: DOTS.map((dot) => /* @__PURE__ */ jsx("div", { className: "ld-bouncing-dots-dot", style: step(dot) }, dot)) })
45
- ] });
46
- }
47
-
48
- export {
49
- BouncingDots
50
- };
@@ -1,81 +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
- animation
15
- } from "./chunk-OMNMMKI7.js";
16
-
17
- // src/snake.tsx
18
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
- var css = `
20
- .ld-snake {
21
- width: ${SIZE};
22
- height: ${SIZE};
23
- }
24
-
25
- ${rotationCss("snake")}
26
-
27
- .ld-snake-dash {
28
- ${animation("snake", "ld-snake-stretch", "ease-in-out")}
29
- }
30
-
31
- @keyframes ld-snake-stretch {
32
- 0% {
33
- stroke-dasharray: 1 100;
34
- stroke-dashoffset: 0;
35
- }
36
- 50% {
37
- stroke-dasharray: 45 100;
38
- stroke-dashoffset: -17;
39
- }
40
- 100% {
41
- stroke-dasharray: 45 100;
42
- stroke-dashoffset: -62;
43
- }
44
- }
45
-
46
- @media (prefers-reduced-motion: reduce) {
47
- .ld-snake-dash {
48
- stroke-dasharray: 18 100;
49
- }
50
- }
51
- `;
52
- function Snake({ cap, easing, ...rest }) {
53
- return /* @__PURE__ */ jsxs(Fragment, { children: [
54
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "snake", children: css }),
55
- /* @__PURE__ */ jsx(
56
- "svg",
57
- {
58
- ...spinnerRoot("snake", rest),
59
- fill: "none",
60
- role: "presentation",
61
- viewBox: "0 0 24 24",
62
- children: /* @__PURE__ */ jsx("g", { className: spinClass("snake", easing), children: /* @__PURE__ */ jsx(
63
- "circle",
64
- {
65
- className: "ld-snake-dash",
66
- cx: "12",
67
- cy: "12",
68
- r: "10",
69
- stroke: "currentColor",
70
- strokeLinecap: linecap(cap),
71
- strokeWidth: "2.5"
72
- }
73
- ) })
74
- }
75
- )
76
- ] });
77
- }
78
-
79
- export {
80
- Snake
81
- };
@@ -1,62 +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/comet.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var css = `
16
- .ld-comet {
17
- --ld-comet-stroke: calc(${SIZE} * 0.12);
18
- position: relative;
19
- width: ${SIZE};
20
- height: ${SIZE};
21
- }
22
-
23
- .ld-comet-spin {
24
- position: absolute;
25
- inset: 0;
26
- }
27
-
28
- .ld-comet-tail {
29
- position: absolute;
30
- inset: 0;
31
- border-radius: 9999px;
32
- background: conic-gradient(from 0deg, transparent, currentColor);
33
- -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-comet-stroke)), #000 0);
34
- mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-comet-stroke)), #000 0);
35
- }
36
-
37
- .ld-comet-head {
38
- position: absolute;
39
- top: 0;
40
- left: 50%;
41
- width: var(--ld-comet-stroke);
42
- height: var(--ld-comet-stroke);
43
- background: currentColor;
44
- border-radius: 9999px;
45
- transform: translateX(-50%);
46
- }
47
-
48
- ${rotationCss("comet")}
49
- `;
50
- function Comet({ easing, ...rest }) {
51
- return /* @__PURE__ */ jsxs(Fragment, { children: [
52
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "comet", children: css }),
53
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("comet", rest), children: /* @__PURE__ */ jsxs("div", { className: spinClass("comet", easing), children: [
54
- /* @__PURE__ */ jsx("div", { className: "ld-comet-tail" }),
55
- /* @__PURE__ */ jsx("div", { className: "ld-comet-head" })
56
- ] }) })
57
- ] });
58
- }
59
-
60
- export {
61
- Comet
62
- };
@@ -1,82 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot,
4
- step
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- animation,
9
- stagger
10
- } from "./chunk-OMNMMKI7.js";
11
-
12
- // src/blocks.tsx
13
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- var DEFAULT_BLOCKS_SWEEP = "diagonal";
15
- var SIDE = 3;
16
- var CELLS = Array.from({ length: SIDE * SIDE }, (_, index) => ({
17
- col: index % SIDE,
18
- row: Math.floor(index / SIDE)
19
- }));
20
- var SWEEPS = {
21
- columns: { count: SIDE, place: ({ col }) => col },
22
- diagonal: { count: SIDE * 2 - 1, place: ({ col, row }) => row + col },
23
- rows: { count: SIDE, place: ({ row }) => row }
24
- };
25
- var 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
- width: ${SIZE};
32
- height: ${SIZE};
33
- }
34
-
35
- .ld-blocks-cell {
36
- background: currentColor;
37
- border-radius: calc(${SIZE} * 0.0625);
38
- ${animation("blocks", "ld-blocks-sweep", "ease-in-out")}
39
- }
40
- ${Object.entries(SWEEPS).map(
41
- ([sweep, { count }]) => `
42
- .ld-blocks-cell-${sweep} {
43
- animation-delay: ${stagger("blocks", count)};
44
- }
45
- `
46
- ).join("")}
47
- @keyframes ld-blocks-sweep {
48
- 0%,
49
- 70%,
50
- 100% {
51
- transform: scale(1);
52
- }
53
- 35% {
54
- transform: scale(0);
55
- }
56
- }
57
-
58
- @media (prefers-reduced-motion: reduce) {
59
- .ld-blocks-cell {
60
- transform: scale(0.8);
61
- }
62
- }
63
- `;
64
- function Blocks({ sweep = DEFAULT_BLOCKS_SWEEP, ...rest }) {
65
- const { place } = SWEEPS[sweep];
66
- return /* @__PURE__ */ jsxs(Fragment, { children: [
67
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "blocks", children: css }),
68
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("blocks", rest), children: CELLS.map((cell) => /* @__PURE__ */ jsx(
69
- "div",
70
- {
71
- className: `ld-blocks-cell ld-blocks-cell-${sweep}`,
72
- style: step(place(cell))
73
- },
74
- `${cell.col}-${cell.row}`
75
- )) })
76
- ] });
77
- }
78
-
79
- export {
80
- DEFAULT_BLOCKS_SWEEP,
81
- Blocks
82
- };
@@ -1,49 +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/flip.tsx
11
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- var css = `
13
- .ld-flip {
14
- width: ${SIZE};
15
- height: ${SIZE};
16
- perspective: calc(${SIZE} * 3);
17
- }
18
-
19
- .ld-flip-face {
20
- width: 64%;
21
- height: 64%;
22
- margin: 18%;
23
- background: currentColor;
24
- border-radius: calc(${SIZE} * 0.06);
25
- ${animation("flip", "ld-flip-turn", "ease-in-out")}
26
- }
27
-
28
- @keyframes ld-flip-turn {
29
- 0% {
30
- transform: rotateX(0) rotateY(0);
31
- }
32
- 50% {
33
- transform: rotateX(-180deg) rotateY(0);
34
- }
35
- 100% {
36
- transform: rotateX(-180deg) rotateY(-180deg);
37
- }
38
- }
39
- `;
40
- function Flip(props) {
41
- return /* @__PURE__ */ jsxs(Fragment, { children: [
42
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "flip", children: css }),
43
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("flip", props), children: /* @__PURE__ */ jsx("div", { className: "ld-flip-face" }) })
44
- ] });
45
- }
46
-
47
- export {
48
- Flip
49
- };