loading-dev 0.3.3 → 0.3.5
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.
- package/README.md +7 -9
- package/dist/arc.d.ts +11 -0
- package/dist/arc.js +10 -0
- package/dist/atom.d.ts +10 -0
- package/dist/atom.js +9 -0
- package/dist/blocks.d.ts +11 -0
- package/dist/blocks.js +10 -0
- package/dist/bouncing-dots.d.ts +6 -0
- package/dist/bouncing-dots.js +8 -0
- package/dist/cap.d.ts +8 -0
- package/dist/cap.js +8 -0
- package/dist/cascade.d.ts +9 -0
- package/dist/cascade.js +9 -0
- package/dist/chunk-2LMGBBRJ.js +77 -0
- package/dist/chunk-2OX27TAE.js +69 -0
- package/dist/chunk-2TYML5J2.js +51 -0
- package/dist/chunk-3WMZVDPS.js +61 -0
- package/dist/chunk-4O4ADYWE.js +73 -0
- package/dist/chunk-5UAEBEER.js +78 -0
- package/dist/chunk-A2PZBHTA.js +41 -0
- package/dist/chunk-BAVSTTWG.js +88 -0
- package/dist/chunk-BCIAMPLU.js +87 -0
- package/dist/chunk-DKYEZLIN.js +72 -0
- package/dist/chunk-FQ2U2M7F.js +76 -0
- package/dist/chunk-FWH6VWVK.js +59 -0
- package/dist/chunk-HL7TIIDB.js +124 -0
- package/dist/chunk-IJJULNRU.js +53 -0
- package/dist/chunk-JKLL7YYG.js +85 -0
- package/dist/chunk-JNR4T6LZ.js +10 -0
- package/dist/chunk-JQNF5GYA.js +52 -0
- package/dist/chunk-KAZ5BTXC.js +74 -0
- package/dist/chunk-KOYM24WV.js +72 -0
- package/dist/chunk-L2DUMHO4.js +69 -0
- package/dist/chunk-LDXBT62V.js +57 -0
- package/dist/chunk-MAKBZTL3.js +56 -0
- package/dist/chunk-OMNMMKI7.js +64 -0
- package/dist/chunk-P4BSSDSY.js +51 -0
- package/dist/chunk-PM6DU637.js +70 -0
- package/dist/chunk-PVVWLDIS.js +33 -0
- package/dist/chunk-R5ZDKN3Z.js +59 -0
- package/dist/chunk-RAHAQ7XK.js +61 -0
- package/dist/chunk-SUUR5WMA.js +46 -0
- package/dist/chunk-UAO52LUL.js +48 -0
- package/dist/chunk-ULWRXY3A.js +50 -0
- package/dist/chunk-UOXB5QOZ.js +81 -0
- package/dist/chunk-UXTZTFNZ.js +62 -0
- package/dist/chunk-VZX7APSS.js +82 -0
- package/dist/chunk-YIB63EKJ.js +49 -0
- package/dist/circular-dots.d.ts +6 -0
- package/dist/circular-dots.js +9 -0
- package/dist/classic-v2.d.ts +6 -0
- package/dist/classic-v2.js +9 -0
- package/dist/classic.d.ts +6 -0
- package/dist/classic.js +9 -0
- package/dist/clock.d.ts +10 -0
- package/dist/clock.js +9 -0
- package/dist/comet.d.ts +10 -0
- package/dist/comet.js +9 -0
- package/dist/compass.d.ts +6 -0
- package/dist/compass.js +8 -0
- package/dist/dual.d.ts +11 -0
- package/dist/dual.js +10 -0
- package/dist/easing.d.ts +11 -0
- package/dist/easing.js +11 -0
- package/dist/eclipse.d.ts +6 -0
- package/dist/eclipse.js +8 -0
- package/dist/fade.d.ts +8 -0
- package/dist/fade.js +7 -0
- package/dist/flip.d.ts +6 -0
- package/dist/flip.js +8 -0
- package/dist/frame.d.ts +18 -0
- package/dist/frame.js +13 -0
- package/dist/gather.d.ts +6 -0
- package/dist/gather.js +8 -0
- package/dist/index.d.ts +35 -199
- package/dist/index.js +106 -1794
- package/dist/leap.d.ts +6 -0
- package/dist/leap.js +8 -0
- package/dist/linear-dots.d.ts +6 -0
- package/dist/linear-dots.js +8 -0
- package/dist/loading.d.ts +6 -0
- package/dist/loading.js +9 -0
- package/dist/morph.d.ts +6 -0
- package/dist/morph.js +8 -0
- package/dist/motion.d.ts +44 -0
- package/dist/motion.js +26 -0
- package/dist/orbit.d.ts +10 -0
- package/dist/orbit.js +9 -0
- package/dist/pulse.d.ts +6 -0
- package/dist/pulse.js +8 -0
- package/dist/radar.d.ts +10 -0
- package/dist/radar.js +9 -0
- package/dist/ring.d.ts +11 -0
- package/dist/ring.js +10 -0
- package/dist/ripple.d.ts +11 -0
- package/dist/ripple.js +10 -0
- package/dist/slide.d.ts +6 -0
- package/dist/slide.js +8 -0
- package/dist/snake.d.ts +11 -0
- package/dist/snake.js +10 -0
- package/dist/spinners.d.ts +68 -0
- package/dist/spinners.js +40 -0
- package/dist/swirl.d.ts +6 -0
- package/dist/swirl.js +9 -0
- package/dist/trace.d.ts +11 -0
- package/dist/trace.js +10 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +0 -0
- package/dist/wave.d.ts +11 -0
- package/dist/wave.js +10 -0
- package/package.json +12 -9
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
};
|
package/dist/classic.js
ADDED
package/dist/clock.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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 };
|
package/dist/clock.js
ADDED
package/dist/comet.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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 CometProps extends SpinnerProps, EasingProps {
|
|
7
|
+
}
|
|
8
|
+
declare function Comet({ easing, ...rest }: CometProps): react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { Comet, type CometProps };
|
package/dist/comet.js
ADDED
package/dist/compass.js
ADDED
package/dist/dual.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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 DualProps extends SpinnerProps, EasingProps, CapProps {
|
|
8
|
+
}
|
|
9
|
+
declare function Dual({ cap, easing, ...rest }: DualProps): react.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { Dual, type DualProps };
|
package/dist/dual.js
ADDED
package/dist/easing.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SpinnerName } from './motion.js';
|
|
2
|
+
|
|
3
|
+
type Easing = "linear" | "ease-in-out" | "stacked";
|
|
4
|
+
declare const DEFAULT_EASING: Easing;
|
|
5
|
+
interface EasingProps {
|
|
6
|
+
easing?: Easing;
|
|
7
|
+
}
|
|
8
|
+
declare function spinClass(name: SpinnerName, easing?: Easing): string;
|
|
9
|
+
declare function rotationCss(name: SpinnerName, turn?: string): string;
|
|
10
|
+
|
|
11
|
+
export { DEFAULT_EASING, type Easing, type EasingProps, rotationCss, spinClass };
|
package/dist/easing.js
ADDED
package/dist/eclipse.js
ADDED
package/dist/fade.d.ts
ADDED
package/dist/fade.js
ADDED
package/dist/flip.d.ts
ADDED
package/dist/flip.js
ADDED
package/dist/frame.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import { SpinnerName } from './motion.js';
|
|
4
|
+
import { SpinnerProps } from './types.js';
|
|
5
|
+
|
|
6
|
+
declare function SpinnerStyle({ children, name, }: {
|
|
7
|
+
children: string;
|
|
8
|
+
name: SpinnerName;
|
|
9
|
+
}): react.JSX.Element;
|
|
10
|
+
declare function cssVars(vars: CSSProperties & Record<`--ld-${string}`, number | string>): CSSProperties;
|
|
11
|
+
declare function step(index: number): CSSProperties;
|
|
12
|
+
declare function spinnerRoot(name: SpinnerName, { className, color, duration, playState, size }: SpinnerProps): {
|
|
13
|
+
"aria-hidden": boolean;
|
|
14
|
+
className: string;
|
|
15
|
+
style: CSSProperties;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { SpinnerStyle, cssVars, spinnerRoot, step };
|
package/dist/frame.js
ADDED