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.
- package/dist/arc.d.ts +7 -11
- package/dist/arc.js +31 -10
- package/dist/atom.d.ts +6 -10
- package/dist/atom.js +70 -9
- package/dist/blocks.d.ts +8 -10
- package/dist/blocks.js +73 -9
- package/dist/bouncing-dots.d.ts +4 -6
- package/dist/bouncing-dots.js +45 -8
- package/dist/cap-Ba3uZx03.d.ts +9 -0
- package/dist/cap.d.ts +2 -8
- package/dist/cap.js +7 -8
- package/dist/cascade.d.ts +6 -9
- package/dist/cascade.js +50 -9
- package/dist/circular-dots.d.ts +4 -6
- package/dist/circular-dots.js +40 -9
- package/dist/classic-v2.d.ts +4 -6
- package/dist/classic-v2.js +41 -9
- package/dist/classic.d.ts +4 -6
- package/dist/classic.js +48 -9
- package/dist/clock.d.ts +6 -10
- package/dist/clock.js +31 -9
- package/dist/comet.d.ts +6 -10
- package/dist/comet.js +52 -9
- package/dist/compass.d.ts +4 -6
- package/dist/compass.js +39 -8
- package/dist/dual.d.ts +7 -11
- package/dist/dual.js +47 -10
- package/dist/easing-DhnLArHS.d.ts +11 -0
- package/dist/easing.d.ts +2 -11
- package/dist/easing.js +34 -11
- package/dist/eclipse.d.ts +4 -6
- package/dist/eclipse.js +69 -8
- package/dist/fade.d.ts +6 -7
- package/dist/fade.js +27 -7
- package/dist/flip.d.ts +4 -6
- package/dist/flip.js +41 -8
- package/dist/frame.d.ts +15 -17
- package/dist/frame.js +42 -13
- package/dist/gather.d.ts +4 -6
- package/dist/gather.js +85 -8
- package/dist/index.d.ts +35 -35
- package/dist/index.js +34 -146
- package/dist/leap.d.ts +4 -6
- package/dist/leap.js +67 -8
- package/dist/linear-dots.d.ts +4 -6
- package/dist/linear-dots.js +54 -8
- package/dist/loading.d.ts +4 -6
- package/dist/loading.js +64 -9
- package/dist/morph.d.ts +4 -6
- package/dist/morph.js +40 -8
- package/dist/motion-D_zUuA3S.d.ts +45 -0
- package/dist/motion.d.ts +2 -44
- package/dist/motion.js +50 -25
- package/dist/orbit.d.ts +6 -10
- package/dist/orbit.js +44 -9
- package/dist/pulse.d.ts +4 -6
- package/dist/pulse.js +52 -8
- package/dist/radar.d.ts +6 -10
- package/dist/radar.js +64 -9
- package/dist/ring.d.ts +7 -11
- package/dist/ring.js +38 -10
- package/dist/ripple.d.ts +8 -10
- package/dist/ripple.js +57 -10
- package/dist/slide.d.ts +4 -6
- package/dist/slide.js +74 -8
- package/dist/snake.d.ts +7 -11
- package/dist/snake.js +59 -10
- package/dist/spinners.d.ts +61 -67
- package/dist/spinners.js +62 -39
- package/dist/swirl.d.ts +4 -6
- package/dist/swirl.js +50 -9
- package/dist/trace.d.ts +7 -11
- package/dist/trace.js +45 -9
- package/dist/types-BYaenrWm.d.ts +10 -0
- package/dist/types.d.ts +2 -9
- package/dist/types.js +1 -0
- package/dist/wave.d.ts +8 -10
- package/dist/wave.js +56 -10
- package/package.json +14 -14
- package/dist/chunk-2LMGBBRJ.js +0 -77
- package/dist/chunk-2OX27TAE.js +0 -69
- package/dist/chunk-2TYML5J2.js +0 -51
- package/dist/chunk-3WMZVDPS.js +0 -61
- package/dist/chunk-4O4ADYWE.js +0 -73
- package/dist/chunk-5UAEBEER.js +0 -78
- package/dist/chunk-A2PZBHTA.js +0 -41
- package/dist/chunk-BAVSTTWG.js +0 -88
- package/dist/chunk-BCIAMPLU.js +0 -87
- package/dist/chunk-DKYEZLIN.js +0 -72
- package/dist/chunk-FQ2U2M7F.js +0 -76
- package/dist/chunk-FWH6VWVK.js +0 -59
- package/dist/chunk-HL7TIIDB.js +0 -124
- package/dist/chunk-IJJULNRU.js +0 -53
- package/dist/chunk-JKLL7YYG.js +0 -85
- package/dist/chunk-JNR4T6LZ.js +0 -10
- package/dist/chunk-JQNF5GYA.js +0 -52
- package/dist/chunk-KAZ5BTXC.js +0 -74
- package/dist/chunk-KOYM24WV.js +0 -72
- package/dist/chunk-L2DUMHO4.js +0 -69
- package/dist/chunk-LDXBT62V.js +0 -57
- package/dist/chunk-MAKBZTL3.js +0 -56
- package/dist/chunk-OMNMMKI7.js +0 -64
- package/dist/chunk-P4BSSDSY.js +0 -51
- package/dist/chunk-PM6DU637.js +0 -70
- package/dist/chunk-PVVWLDIS.js +0 -33
- package/dist/chunk-R5ZDKN3Z.js +0 -59
- package/dist/chunk-RAHAQ7XK.js +0 -61
- package/dist/chunk-SUUR5WMA.js +0 -46
- package/dist/chunk-UAO52LUL.js +0 -48
- package/dist/chunk-ULWRXY3A.js +0 -50
- package/dist/chunk-UOXB5QOZ.js +0 -81
- package/dist/chunk-UXTZTFNZ.js +0 -62
- package/dist/chunk-VZX7APSS.js +0 -82
- package/dist/chunk-YIB63EKJ.js +0 -49
package/dist/snake.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function Snake({ cap, easing, ...rest }: SnakeProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { Snake, type SnakeProps };
|
|
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/snake.d.ts
|
|
5
|
+
export interface SnakeProps extends SpinnerProps, EasingProps, CapProps {}
|
|
6
|
+
export declare function Snake({ cap, easing, ...rest }: SnakeProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
package/dist/snake.js
CHANGED
|
@@ -1,10 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "./
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { linecap } from "./cap.js";
|
|
2
|
+
import { animation } from "./motion.js";
|
|
3
|
+
import { rotationCss, spinClass } from "./easing.js";
|
|
4
|
+
import { SpinnerStyle, spinnerRoot } from "./frame.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/snake.tsx
|
|
7
|
+
const css = `
|
|
8
|
+
${rotationCss("snake")}
|
|
9
|
+
|
|
10
|
+
.ld-snake-dash {
|
|
11
|
+
${animation("snake", "ld-snake-stretch", "ease-in-out")}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes ld-snake-stretch {
|
|
15
|
+
0% {
|
|
16
|
+
stroke-dasharray: 1 100;
|
|
17
|
+
stroke-dashoffset: 0;
|
|
18
|
+
}
|
|
19
|
+
50% {
|
|
20
|
+
stroke-dasharray: 45 100;
|
|
21
|
+
stroke-dashoffset: -17;
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
stroke-dasharray: 45 100;
|
|
25
|
+
stroke-dashoffset: -62;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
.ld-snake-dash {
|
|
31
|
+
stroke-dasharray: 18 100;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
function Snake({ cap, easing, ...rest }) {
|
|
36
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
37
|
+
name: "snake",
|
|
38
|
+
children: css
|
|
39
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
40
|
+
...spinnerRoot("snake", rest),
|
|
41
|
+
fill: "none",
|
|
42
|
+
role: "presentation",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
children: /* @__PURE__ */ jsx("g", {
|
|
45
|
+
className: spinClass("snake", easing),
|
|
46
|
+
children: /* @__PURE__ */ jsx("circle", {
|
|
47
|
+
className: "ld-snake-dash",
|
|
48
|
+
cx: "12",
|
|
49
|
+
cy: "12",
|
|
50
|
+
r: "10",
|
|
51
|
+
stroke: "currentColor",
|
|
52
|
+
strokeLinecap: linecap(cap),
|
|
53
|
+
strokeWidth: "2.5"
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})] });
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Snake };
|
package/dist/spinners.d.ts
CHANGED
|
@@ -1,68 +1,62 @@
|
|
|
1
|
-
import { Arc } from
|
|
2
|
-
import { Atom } from
|
|
3
|
-
import { Blocks } from
|
|
4
|
-
import { BouncingDots } from
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Classic } from
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
slide: typeof Slide;
|
|
62
|
-
snake: typeof Snake;
|
|
63
|
-
swirl: typeof Swirl;
|
|
64
|
-
trace: typeof Trace;
|
|
65
|
-
wave: typeof Wave;
|
|
1
|
+
import { Arc } from "./arc.js";
|
|
2
|
+
import { Atom } from "./atom.js";
|
|
3
|
+
import { Blocks } from "./blocks.js";
|
|
4
|
+
import { BouncingDots } from "./bouncing-dots.js";
|
|
5
|
+
import { Cascade } from "./cascade.js";
|
|
6
|
+
import { CircularDots } from "./circular-dots.js";
|
|
7
|
+
import { ClassicV2 } from "./classic-v2.js";
|
|
8
|
+
import { Classic } from "./classic.js";
|
|
9
|
+
import { Clock } from "./clock.js";
|
|
10
|
+
import { Comet } from "./comet.js";
|
|
11
|
+
import { Compass } from "./compass.js";
|
|
12
|
+
import { Dual } from "./dual.js";
|
|
13
|
+
import { Eclipse } from "./eclipse.js";
|
|
14
|
+
import { Flip } from "./flip.js";
|
|
15
|
+
import { Gather } from "./gather.js";
|
|
16
|
+
import { Leap } from "./leap.js";
|
|
17
|
+
import { LinearDots } from "./linear-dots.js";
|
|
18
|
+
import { Loading } from "./loading.js";
|
|
19
|
+
import { Morph } from "./morph.js";
|
|
20
|
+
import { Orbit } from "./orbit.js";
|
|
21
|
+
import { Pulse } from "./pulse.js";
|
|
22
|
+
import { Radar } from "./radar.js";
|
|
23
|
+
import { Ring } from "./ring.js";
|
|
24
|
+
import { Ripple } from "./ripple.js";
|
|
25
|
+
import { Slide } from "./slide.js";
|
|
26
|
+
import { Snake } from "./snake.js";
|
|
27
|
+
import { Swirl } from "./swirl.js";
|
|
28
|
+
import { Trace } from "./trace.js";
|
|
29
|
+
import { Wave } from "./wave.js";
|
|
30
|
+
//#region src/spinners.d.ts
|
|
31
|
+
export declare const SPINNERS: {
|
|
32
|
+
arc: typeof Arc;
|
|
33
|
+
atom: typeof Atom;
|
|
34
|
+
blocks: typeof Blocks;
|
|
35
|
+
"bouncing-dots": typeof BouncingDots;
|
|
36
|
+
cascade: typeof Cascade;
|
|
37
|
+
"circular-dots": typeof CircularDots;
|
|
38
|
+
classic: typeof Classic;
|
|
39
|
+
"classic-v2": typeof ClassicV2;
|
|
40
|
+
clock: typeof Clock;
|
|
41
|
+
comet: typeof Comet;
|
|
42
|
+
compass: typeof Compass;
|
|
43
|
+
dual: typeof Dual;
|
|
44
|
+
eclipse: typeof Eclipse;
|
|
45
|
+
flip: typeof Flip;
|
|
46
|
+
gather: typeof Gather;
|
|
47
|
+
leap: typeof Leap;
|
|
48
|
+
"linear-dots": typeof LinearDots;
|
|
49
|
+
loading: typeof Loading;
|
|
50
|
+
morph: typeof Morph;
|
|
51
|
+
orbit: typeof Orbit;
|
|
52
|
+
pulse: typeof Pulse;
|
|
53
|
+
radar: typeof Radar;
|
|
54
|
+
ring: typeof Ring;
|
|
55
|
+
ripple: typeof Ripple;
|
|
56
|
+
slide: typeof Slide;
|
|
57
|
+
snake: typeof Snake;
|
|
58
|
+
swirl: typeof Swirl;
|
|
59
|
+
trace: typeof Trace;
|
|
60
|
+
wave: typeof Wave;
|
|
66
61
|
};
|
|
67
|
-
|
|
68
|
-
export { SPINNERS };
|
|
62
|
+
//#endregion
|
package/dist/spinners.js
CHANGED
|
@@ -1,40 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { Arc } from "./arc.js";
|
|
2
|
+
import { Atom } from "./atom.js";
|
|
3
|
+
import { Blocks } from "./blocks.js";
|
|
4
|
+
import { BouncingDots } from "./bouncing-dots.js";
|
|
5
|
+
import { Cascade } from "./cascade.js";
|
|
6
|
+
import { CircularDots } from "./circular-dots.js";
|
|
7
|
+
import { ClassicV2 } from "./classic-v2.js";
|
|
8
|
+
import { Classic } from "./classic.js";
|
|
9
|
+
import { Clock } from "./clock.js";
|
|
10
|
+
import { Comet } from "./comet.js";
|
|
11
|
+
import { Compass } from "./compass.js";
|
|
12
|
+
import { Dual } from "./dual.js";
|
|
13
|
+
import { Eclipse } from "./eclipse.js";
|
|
14
|
+
import { Flip } from "./flip.js";
|
|
15
|
+
import { Gather } from "./gather.js";
|
|
16
|
+
import { Leap } from "./leap.js";
|
|
17
|
+
import { LinearDots } from "./linear-dots.js";
|
|
18
|
+
import { Loading } from "./loading.js";
|
|
19
|
+
import { Morph } from "./morph.js";
|
|
20
|
+
import { Orbit } from "./orbit.js";
|
|
21
|
+
import { Pulse } from "./pulse.js";
|
|
22
|
+
import { Radar } from "./radar.js";
|
|
23
|
+
import { Ring } from "./ring.js";
|
|
24
|
+
import { Ripple } from "./ripple.js";
|
|
25
|
+
import { Slide } from "./slide.js";
|
|
26
|
+
import { Snake } from "./snake.js";
|
|
27
|
+
import { Swirl } from "./swirl.js";
|
|
28
|
+
import { Trace } from "./trace.js";
|
|
29
|
+
import { Wave } from "./wave.js";
|
|
30
|
+
//#region src/spinners.ts
|
|
31
|
+
const SPINNERS = {
|
|
32
|
+
arc: Arc,
|
|
33
|
+
atom: Atom,
|
|
34
|
+
blocks: Blocks,
|
|
35
|
+
"bouncing-dots": BouncingDots,
|
|
36
|
+
cascade: Cascade,
|
|
37
|
+
"circular-dots": CircularDots,
|
|
38
|
+
classic: Classic,
|
|
39
|
+
"classic-v2": ClassicV2,
|
|
40
|
+
clock: Clock,
|
|
41
|
+
comet: Comet,
|
|
42
|
+
compass: Compass,
|
|
43
|
+
dual: Dual,
|
|
44
|
+
eclipse: Eclipse,
|
|
45
|
+
flip: Flip,
|
|
46
|
+
gather: Gather,
|
|
47
|
+
leap: Leap,
|
|
48
|
+
"linear-dots": LinearDots,
|
|
49
|
+
loading: Loading,
|
|
50
|
+
morph: Morph,
|
|
51
|
+
orbit: Orbit,
|
|
52
|
+
pulse: Pulse,
|
|
53
|
+
radar: Radar,
|
|
54
|
+
ring: Ring,
|
|
55
|
+
ripple: Ripple,
|
|
56
|
+
slide: Slide,
|
|
57
|
+
snake: Snake,
|
|
58
|
+
swirl: Swirl,
|
|
59
|
+
trace: Trace,
|
|
60
|
+
wave: Wave
|
|
40
61
|
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { SPINNERS };
|
package/dist/swirl.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Swirl };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/swirl.d.ts
|
|
3
|
+
export declare function Swirl(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/swirl.js
CHANGED
|
@@ -1,9 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
//#region 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
|
+
//#endregion
|
|
50
|
+
export { Swirl };
|
package/dist/trace.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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-Ba3uZx03.js";
|
|
2
|
+
import { r as EasingProps } from "./easing-DhnLArHS.js";
|
|
3
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
4
|
+
//#region src/trace.d.ts
|
|
5
|
+
export interface TraceProps extends SpinnerProps, EasingProps, CapProps {}
|
|
6
|
+
export declare function Trace({ cap, easing, ...rest }: TraceProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
package/dist/trace.js
CHANGED
|
@@ -1,10 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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/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
|
+
//#endregion
|
|
46
|
+
export { Trace };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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-BYaenrWm.js";
|
|
2
|
+
export { SpinnerProps };
|
package/dist/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/wave.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
origin?: WaveOrigin;
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/wave.d.ts
|
|
3
|
+
export type WaveOrigin = "bottom" | "center";
|
|
4
|
+
export declare const DEFAULT_WAVE_ORIGIN: WaveOrigin;
|
|
5
|
+
export interface WaveProps extends SpinnerProps {
|
|
6
|
+
origin?: WaveOrigin;
|
|
8
7
|
}
|
|
9
|
-
declare function Wave({ origin, ...rest }: WaveProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { DEFAULT_WAVE_ORIGIN, Wave, type WaveOrigin, type WaveProps };
|
|
8
|
+
export declare function Wave({ origin, ...rest }: WaveProps): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
package/dist/wave.js
CHANGED
|
@@ -1,10 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
+
//#region 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
|
+
//#endregion
|
|
56
|
+
export { DEFAULT_WAVE_ORIGIN, Wave };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loading-dev",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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.
|
|
47
|
-
"@types/node": "^
|
|
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.
|
|
51
|
-
"react": "19.
|
|
52
|
-
"react-dom": "19.
|
|
53
|
-
"
|
|
54
|
-
"typescript": "^
|
|
55
|
-
"ultracite": "
|
|
56
|
-
"vitest": "^
|
|
50
|
+
"oxlint": "1.87.0",
|
|
51
|
+
"react": "19.3.0",
|
|
52
|
+
"react-dom": "19.3.0",
|
|
53
|
+
"tsdown": "^0.23.0",
|
|
54
|
+
"typescript": "^7.0.2",
|
|
55
|
+
"ultracite": "8.0.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@
|
|
62
|
+
"packageManager": "pnpm@12.10.1"
|
|
63
63
|
}
|