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
package/dist/frame.d.ts CHANGED
@@ -1,18 +1,14 @@
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 };
1
+ import { l as SpinnerName } from "./motion-trIEyOxA.js";
2
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
3
+ import { CSSProperties } from "react";
4
+ export declare function SpinnerStyle({ children, name }: {
5
+ children: string;
6
+ name: SpinnerName;
7
+ }): import("react").JSX.Element;
8
+ export declare function cssVars(vars: CSSProperties & Record<`--ld-${string}`, number | string>): CSSProperties;
9
+ export declare function step(index: number): CSSProperties;
10
+ export declare function spinnerRoot(name: SpinnerName, { className, color, duration, playState, size }: SpinnerProps): {
11
+ "aria-hidden": boolean;
12
+ className: string;
13
+ style: CSSProperties;
14
+ };
package/dist/frame.js CHANGED
@@ -1,13 +1,41 @@
1
- import {
2
- SpinnerStyle,
3
- cssVars,
4
- spinnerRoot,
5
- step
6
- } from "./chunk-UAO52LUL.js";
7
- import "./chunk-OMNMMKI7.js";
8
- export {
9
- SpinnerStyle,
10
- cssVars,
11
- spinnerRoot,
12
- step
13
- };
1
+ import { DURATION_VAR, PLAY_STATE_VAR, SIZE, SIZE_VAR, STEP_VAR } from "./motion.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ // src/frame.tsx
4
+ function SpinnerStyle({ children, name }) {
5
+ return /* @__PURE__ */ jsx("style", {
6
+ href: `ld-${name}`,
7
+ precedence: "loading-dev",
8
+ children: `
9
+ .ld-${name} {
10
+ width: ${SIZE};
11
+ height: ${SIZE};
12
+ }
13
+ ${children}
14
+ @media (prefers-reduced-motion: reduce) {
15
+ .ld-${name},
16
+ .ld-${name} * {
17
+ animation: none;
18
+ }
19
+ }
20
+ `
21
+ });
22
+ }
23
+ function cssVars(vars) {
24
+ return vars;
25
+ }
26
+ function step(index) {
27
+ return cssVars({ [STEP_VAR]: index });
28
+ }
29
+ function spinnerRoot(name, { className, color, duration, playState, size = 20 }) {
30
+ return {
31
+ "aria-hidden": true,
32
+ className: [`ld-${name}`, className].filter(Boolean).join(" "),
33
+ style: cssVars({
34
+ [SIZE_VAR]: `${size}px`,
35
+ ...color === void 0 ? null : { color },
36
+ ...duration === void 0 ? null : { [DURATION_VAR]: `${duration}ms` },
37
+ ...playState === void 0 ? null : { [PLAY_STATE_VAR]: playState }
38
+ })
39
+ };
40
+ }
41
+ export { SpinnerStyle, cssVars, spinnerRoot, step };
package/dist/gather.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Gather(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Gather };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Gather(props: SpinnerProps): import("react").JSX.Element;
package/dist/gather.js CHANGED
@@ -1,8 +1,84 @@
1
- import {
2
- Gather
3
- } from "./chunk-JKLL7YYG.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Gather
8
- };
1
+ import { SIZE, animation } from "./motion.js";
2
+ import { SpinnerStyle, cssVars, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/gather.tsx
5
+ const BLOCKS = [
6
+ {
7
+ x: 1,
8
+ y: 1
9
+ },
10
+ {
11
+ x: -1,
12
+ y: 1
13
+ },
14
+ {
15
+ x: 1,
16
+ y: -1
17
+ },
18
+ {
19
+ x: -1,
20
+ y: -1
21
+ }
22
+ ];
23
+ const GAP = 24;
24
+ const PULL = `${(8 / 38 * 100).toFixed(1)}%`;
25
+ const css = `
26
+ .ld-gather-group {
27
+ display: grid;
28
+ grid-template-columns: 1fr 1fr;
29
+ gap: ${GAP}%;
30
+ width: 100%;
31
+ height: 100%;
32
+ ${animation("gather", "ld-gather-turn", "ease-in-out")}
33
+ }
34
+
35
+ .ld-gather-block {
36
+ background: currentColor;
37
+ border-radius: calc(${SIZE} * 0.14);
38
+ ${animation("gather", "ld-gather-pull", "ease-in-out")}
39
+ }
40
+
41
+ @keyframes ld-gather-pull {
42
+ 0%,
43
+ 100% {
44
+ transform: translate(0, 0);
45
+ }
46
+ 30%,
47
+ 60% {
48
+ transform: translate(
49
+ calc(var(--ld-gather-x) * ${PULL}),
50
+ calc(var(--ld-gather-y) * ${PULL})
51
+ );
52
+ }
53
+ }
54
+
55
+ @keyframes ld-gather-turn {
56
+ 0%,
57
+ 30% {
58
+ transform: rotate(0);
59
+ }
60
+ 60%,
61
+ 100% {
62
+ transform: rotate(90deg);
63
+ }
64
+ }
65
+ `;
66
+ function Gather(props) {
67
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
68
+ name: "gather",
69
+ children: css
70
+ }), /* @__PURE__ */ jsx("div", {
71
+ ...spinnerRoot("gather", props),
72
+ children: /* @__PURE__ */ jsx("div", {
73
+ className: "ld-gather-group",
74
+ children: BLOCKS.map(({ x, y }) => /* @__PURE__ */ jsx("div", {
75
+ className: "ld-gather-block",
76
+ style: cssVars({
77
+ "--ld-gather-x": x,
78
+ "--ld-gather-y": y
79
+ })
80
+ }, `${x}${y}`))
81
+ })
82
+ })] });
83
+ }
84
+ export { Gather };
package/dist/index.d.ts CHANGED
@@ -1,35 +1,42 @@
1
- export { Arc, ArcProps } from './arc.js';
2
- export { Atom, AtomProps } from './atom.js';
3
- export { Blocks, BlocksProps, BlocksSweep, DEFAULT_BLOCKS_SWEEP } from './blocks.js';
4
- export { BouncingDots } from './bouncing-dots.js';
5
- export { Cap, CapProps, DEFAULT_CAP } from './cap.js';
6
- export { Cascade, CascadeProps } from './cascade.js';
7
- export { CircularDots } from './circular-dots.js';
8
- export { Classic } from './classic.js';
9
- export { ClassicV2 } from './classic-v2.js';
10
- export { Clock, ClockProps } from './clock.js';
11
- export { Comet, CometProps } from './comet.js';
12
- export { Compass } from './compass.js';
13
- export { Dual, DualProps } from './dual.js';
14
- export { DEFAULT_EASING, Easing, EasingProps } from './easing.js';
15
- export { Eclipse } from './eclipse.js';
16
- export { Flip } from './flip.js';
17
- export { Gather } from './gather.js';
18
- export { Leap } from './leap.js';
19
- export { LinearDots } from './linear-dots.js';
20
- export { Loading } from './loading.js';
21
- export { Morph } from './morph.js';
22
- export { DURATION_VAR, PLAY_STATE_VAR, SPINNER_MOTION, SpinnerName } from './motion.js';
23
- export { Orbit, OrbitProps } from './orbit.js';
24
- export { Pulse } from './pulse.js';
25
- export { Radar, RadarProps } from './radar.js';
26
- export { Ring, RingProps } from './ring.js';
27
- export { DEFAULT_RIPPLE_DIRECTION, Ripple, RippleDirection, RippleProps } from './ripple.js';
28
- export { Slide } from './slide.js';
29
- export { Snake, SnakeProps } from './snake.js';
30
- export { SPINNERS } from './spinners.js';
31
- export { Swirl } from './swirl.js';
32
- export { Trace, TraceProps } from './trace.js';
33
- export { SpinnerProps } from './types.js';
34
- export { DEFAULT_WAVE_ORIGIN, Wave, WaveOrigin, WaveProps } from './wave.js';
35
- import 'react';
1
+ import { n as CapProps, r as DEFAULT_CAP, t as Cap } from "./cap-B_Mo1a7N.js";
2
+ import { i as PLAY_STATE_VAR, l as SpinnerName, n as DURATION_VAR, s as SPINNER_MOTION } from "./motion-trIEyOxA.js";
3
+ import { n as Easing, r as EasingProps, t as DEFAULT_EASING } from "./easing-BM_1QWrA.js";
4
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
5
+ import { Arc, ArcProps } from "./arc.js";
6
+ import { Atom, AtomProps } from "./atom.js";
7
+ import { Blocks, BlocksProps, BlocksSweep, DEFAULT_BLOCKS_SWEEP } from "./blocks.js";
8
+ import { BouncingDots } from "./bouncing-dots.js";
9
+ import { Cascade, CascadeProps } from "./cascade.js";
10
+ import { Chevrons } from "./chevrons.js";
11
+ import { CircularDots } from "./circular-dots.js";
12
+ import { ClassicV2 } from "./classic-v2.js";
13
+ import { Classic } from "./classic.js";
14
+ import { Clock, ClockProps } from "./clock.js";
15
+ import { Comet, CometProps } from "./comet.js";
16
+ import { Compass } from "./compass.js";
17
+ import { Dual, DualProps } from "./dual.js";
18
+ import { Eclipse } from "./eclipse.js";
19
+ import { Fill } from "./fill.js";
20
+ import { Flip } from "./flip.js";
21
+ import { Gather } from "./gather.js";
22
+ import { Leap } from "./leap.js";
23
+ import { LinearDots } from "./linear-dots.js";
24
+ import { Loading } from "./loading.js";
25
+ import { Loop, LoopProps } from "./loop.js";
26
+ import { Morph } from "./morph.js";
27
+ import { Orbit, OrbitProps } from "./orbit.js";
28
+ import { Phases } from "./phases.js";
29
+ import { Pulse } from "./pulse.js";
30
+ import { Radar, RadarProps } from "./radar.js";
31
+ import { Ring, RingProps } from "./ring.js";
32
+ import { DEFAULT_RIPPLE_DIRECTION, Ripple, RippleDirection, RippleProps } from "./ripple.js";
33
+ import { Scan } from "./scan.js";
34
+ import { Slide } from "./slide.js";
35
+ import { Snake, SnakeProps } from "./snake.js";
36
+ import { Split } from "./split.js";
37
+ import { Steps } from "./steps.js";
38
+ import { Swirl } from "./swirl.js";
39
+ import { Trace, TraceProps } from "./trace.js";
40
+ import { DEFAULT_WAVE_ORIGIN, Wave, WaveOrigin, WaveProps } from "./wave.js";
41
+ import { SPINNERS } from "./spinners.js";
42
+ export { Arc, type ArcProps, Atom, type AtomProps, Blocks, type BlocksProps, type BlocksSweep, BouncingDots, type Cap, type CapProps, Cascade, type CascadeProps, Chevrons, CircularDots, Classic, ClassicV2, Clock, type ClockProps, Comet, type CometProps, Compass, DEFAULT_BLOCKS_SWEEP, DEFAULT_CAP, DEFAULT_EASING, DEFAULT_RIPPLE_DIRECTION, DEFAULT_WAVE_ORIGIN, DURATION_VAR, Dual, type DualProps, type Easing, type EasingProps, Eclipse, Fill, Flip, Gather, Leap, LinearDots, Loading, Loop, type LoopProps, Morph, Orbit, type OrbitProps, PLAY_STATE_VAR, Phases, Pulse, Radar, type RadarProps, Ring, type RingProps, Ripple, type RippleDirection, type RippleProps, SPINNERS, SPINNER_MOTION, Scan, Slide, Snake, type SnakeProps, type SpinnerName, type SpinnerProps, Split, Steps, Swirl, Trace, type TraceProps, Wave, type WaveOrigin, type WaveProps };
package/dist/index.js CHANGED
@@ -1,146 +1,41 @@
1
- import {
2
- SPINNERS
3
- } from "./chunk-HL7TIIDB.js";
4
- import {
5
- Swirl
6
- } from "./chunk-SUUR5WMA.js";
7
- import {
8
- Trace
9
- } from "./chunk-KAZ5BTXC.js";
10
- import {
11
- DEFAULT_WAVE_ORIGIN,
12
- Wave
13
- } from "./chunk-DKYEZLIN.js";
14
- import {
15
- Orbit
16
- } from "./chunk-LDXBT62V.js";
17
- import {
18
- Pulse
19
- } from "./chunk-PM6DU637.js";
20
- import {
21
- Radar
22
- } from "./chunk-2OX27TAE.js";
23
- import {
24
- Ring
25
- } from "./chunk-L2DUMHO4.js";
26
- import {
27
- DEFAULT_RIPPLE_DIRECTION,
28
- Ripple
29
- } from "./chunk-FQ2U2M7F.js";
30
- import {
31
- Slide
32
- } from "./chunk-BCIAMPLU.js";
33
- import {
34
- Snake
35
- } from "./chunk-UOXB5QOZ.js";
36
- import {
37
- Flip
38
- } from "./chunk-YIB63EKJ.js";
39
- import {
40
- Gather
41
- } from "./chunk-JKLL7YYG.js";
42
- import {
43
- Leap
44
- } from "./chunk-4O4ADYWE.js";
45
- import {
46
- LinearDots
47
- } from "./chunk-FWH6VWVK.js";
48
- import {
49
- Loading
50
- } from "./chunk-RAHAQ7XK.js";
51
- import {
52
- Morph
53
- } from "./chunk-P4BSSDSY.js";
54
- import {
55
- Classic
56
- } from "./chunk-IJJULNRU.js";
57
- import {
58
- Clock
59
- } from "./chunk-2TYML5J2.js";
60
- import {
61
- Comet
62
- } from "./chunk-UXTZTFNZ.js";
63
- import {
64
- Compass
65
- } from "./chunk-JQNF5GYA.js";
66
- import {
67
- Dual
68
- } from "./chunk-5UAEBEER.js";
69
- import {
70
- Eclipse
71
- } from "./chunk-2LMGBBRJ.js";
72
- import {
73
- Arc
74
- } from "./chunk-MAKBZTL3.js";
75
- import {
76
- Atom
77
- } from "./chunk-BAVSTTWG.js";
78
- import {
79
- DEFAULT_EASING
80
- } from "./chunk-A2PZBHTA.js";
81
- import {
82
- Blocks,
83
- DEFAULT_BLOCKS_SWEEP
84
- } from "./chunk-VZX7APSS.js";
85
- import {
86
- BouncingDots
87
- } from "./chunk-ULWRXY3A.js";
88
- import {
89
- Cascade
90
- } from "./chunk-KOYM24WV.js";
91
- import {
92
- DEFAULT_CAP
93
- } from "./chunk-JNR4T6LZ.js";
94
- import {
95
- CircularDots
96
- } from "./chunk-3WMZVDPS.js";
97
- import {
98
- ClassicV2
99
- } from "./chunk-R5ZDKN3Z.js";
100
- import "./chunk-PVVWLDIS.js";
101
- import "./chunk-UAO52LUL.js";
102
- import {
103
- DURATION_VAR,
104
- PLAY_STATE_VAR,
105
- SPINNER_MOTION
106
- } from "./chunk-OMNMMKI7.js";
107
- export {
108
- Arc,
109
- Atom,
110
- Blocks,
111
- BouncingDots,
112
- Cascade,
113
- CircularDots,
114
- Classic,
115
- ClassicV2,
116
- Clock,
117
- Comet,
118
- Compass,
119
- DEFAULT_BLOCKS_SWEEP,
120
- DEFAULT_CAP,
121
- DEFAULT_EASING,
122
- DEFAULT_RIPPLE_DIRECTION,
123
- DEFAULT_WAVE_ORIGIN,
124
- DURATION_VAR,
125
- Dual,
126
- Eclipse,
127
- Flip,
128
- Gather,
129
- Leap,
130
- LinearDots,
131
- Loading,
132
- Morph,
133
- Orbit,
134
- PLAY_STATE_VAR,
135
- Pulse,
136
- Radar,
137
- Ring,
138
- Ripple,
139
- SPINNERS,
140
- SPINNER_MOTION,
141
- Slide,
142
- Snake,
143
- Swirl,
144
- Trace,
145
- Wave
146
- };
1
+ import { DEFAULT_CAP } from "./cap.js";
2
+ import { DURATION_VAR, PLAY_STATE_VAR, SPINNER_MOTION } from "./motion.js";
3
+ import { DEFAULT_EASING } from "./easing.js";
4
+ import { Arc } from "./arc.js";
5
+ import { Atom } from "./atom.js";
6
+ import { Blocks, DEFAULT_BLOCKS_SWEEP } from "./blocks.js";
7
+ import { BouncingDots } from "./bouncing-dots.js";
8
+ import { Cascade } from "./cascade.js";
9
+ import { Chevrons } from "./chevrons.js";
10
+ import { CircularDots } from "./circular-dots.js";
11
+ import { ClassicV2 } from "./classic-v2.js";
12
+ import { Classic } from "./classic.js";
13
+ import { Clock } from "./clock.js";
14
+ import { Comet } from "./comet.js";
15
+ import { Compass } from "./compass.js";
16
+ import { Dual } from "./dual.js";
17
+ import { Eclipse } from "./eclipse.js";
18
+ import { Fill } from "./fill.js";
19
+ import { Flip } from "./flip.js";
20
+ import { Gather } from "./gather.js";
21
+ import { Leap } from "./leap.js";
22
+ import { LinearDots } from "./linear-dots.js";
23
+ import { Loading } from "./loading.js";
24
+ import { Loop } from "./loop.js";
25
+ import { Morph } from "./morph.js";
26
+ import { Orbit } from "./orbit.js";
27
+ import { Phases } from "./phases.js";
28
+ import { Pulse } from "./pulse.js";
29
+ import { Radar } from "./radar.js";
30
+ import { Ring } from "./ring.js";
31
+ import { DEFAULT_RIPPLE_DIRECTION, Ripple } from "./ripple.js";
32
+ import { Scan } from "./scan.js";
33
+ import { Slide } from "./slide.js";
34
+ import { Snake } from "./snake.js";
35
+ import { Split } from "./split.js";
36
+ import { Steps } from "./steps.js";
37
+ import { Swirl } from "./swirl.js";
38
+ import { Trace } from "./trace.js";
39
+ import { DEFAULT_WAVE_ORIGIN, Wave } from "./wave.js";
40
+ import { SPINNERS } from "./spinners.js";
41
+ export { Arc, Atom, Blocks, BouncingDots, Cascade, Chevrons, CircularDots, Classic, ClassicV2, Clock, Comet, Compass, DEFAULT_BLOCKS_SWEEP, DEFAULT_CAP, DEFAULT_EASING, DEFAULT_RIPPLE_DIRECTION, DEFAULT_WAVE_ORIGIN, DURATION_VAR, Dual, Eclipse, Fill, Flip, Gather, Leap, LinearDots, Loading, Loop, Morph, Orbit, PLAY_STATE_VAR, Phases, Pulse, Radar, Ring, Ripple, SPINNERS, SPINNER_MOTION, Scan, Slide, Snake, Split, Steps, Swirl, Trace, Wave };
package/dist/leap.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Leap(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Leap };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Leap(props: SpinnerProps): import("react").JSX.Element;
package/dist/leap.js CHANGED
@@ -1,8 +1,66 @@
1
- import {
2
- Leap
3
- } from "./chunk-4O4ADYWE.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Leap
8
- };
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
+ import { createElement } from "react";
5
+ // src/leap.tsx
6
+ const DOTS = Array.from({ length: 3 }, (_, index) => index);
7
+ const css = `
8
+ .ld-leap {
9
+ --ld-leap-dot: round(calc(${SIZE} * 0.22), 1px);
10
+ --ld-leap-gap: round(down, calc((${SIZE} - var(--ld-leap-dot)) / 2), 1px);
11
+ position: relative;
12
+ }
13
+
14
+ .ld-leap-wrapper {
15
+ position: absolute;
16
+ top: round(calc((${SIZE} - var(--ld-leap-dot)) / 2), 1px);
17
+ left: calc(${SIZE} - var(--ld-leap-dot) - var(--ld-leap-gap) * 2);
18
+ width: calc(var(--ld-leap-gap) * 2 + var(--ld-leap-dot));
19
+ height: var(--ld-leap-dot);
20
+ ${animation("leap", "ld-leap-hop", "ease-in-out")}
21
+ animation-delay: ${stagger("leap", DOTS.length)};
22
+ }
23
+
24
+ .ld-leap-dot {
25
+ position: absolute;
26
+ inset: 0 auto 0 0;
27
+ width: var(--ld-leap-dot);
28
+ background: currentColor;
29
+ border-radius: 50%;
30
+ }
31
+
32
+ @keyframes ld-leap-hop {
33
+ 0% {
34
+ transform: translateX(0) rotate(0);
35
+ }
36
+ 33.33% {
37
+ transform: translateX(0) rotate(180deg);
38
+ }
39
+ 66.66% {
40
+ transform: translateX(calc(var(--ld-leap-gap) * -1)) rotate(180deg);
41
+ }
42
+ 100% {
43
+ transform: translateX(calc(var(--ld-leap-gap) * -2)) rotate(180deg);
44
+ }
45
+ }
46
+
47
+ @media (prefers-reduced-motion: reduce) {
48
+ .ld-leap-wrapper {
49
+ transform: translateX(calc(var(${STEP_VAR}) * var(--ld-leap-gap)));
50
+ }
51
+ }
52
+ `;
53
+ function Leap(props) {
54
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
55
+ name: "leap",
56
+ children: css
57
+ }), /* @__PURE__ */ createElement("div", {
58
+ ...spinnerRoot("leap", props),
59
+ key: props.size
60
+ }, DOTS.map((index) => /* @__PURE__ */ jsx("div", {
61
+ className: "ld-leap-wrapper",
62
+ style: step(index),
63
+ children: /* @__PURE__ */ jsx("div", { className: "ld-leap-dot" })
64
+ }, index)))] });
65
+ }
66
+ export { Leap };
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function LinearDots(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { LinearDots };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function LinearDots(props: SpinnerProps): import("react").JSX.Element;
@@ -1,8 +1,53 @@
1
- import {
2
- LinearDots
3
- } from "./chunk-FWH6VWVK.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- LinearDots
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
+ // src/linear-dots.tsx
5
+ const DOTS = Array.from({ length: 3 }, (_, index) => index);
6
+ const css = `
7
+ .ld-linear-dots {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: calc(${SIZE} * 0.1875);
11
+ width: auto;
12
+ }
13
+
14
+ .ld-linear-dots-dot {
15
+ width: calc(${SIZE} * 0.1875);
16
+ height: calc(${SIZE} * 0.1875);
17
+ background: currentColor;
18
+ border-radius: 9999px;
19
+ ${animation("linear-dots", "ld-linear-dots-fade", "linear")}
20
+ animation-delay: ${stagger("linear-dots", DOTS.length)};
21
+ }
22
+
23
+ @keyframes ld-linear-dots-fade {
24
+ 0% {
25
+ opacity: 1;
26
+ }
27
+ 66.67% {
28
+ opacity: 0.5;
29
+ }
30
+ 100% {
31
+ opacity: 1;
32
+ }
33
+ }
34
+
35
+ @media (prefers-reduced-motion: reduce) {
36
+ .ld-linear-dots-dot {
37
+ opacity: 0.75;
38
+ }
39
+ }
40
+ `;
41
+ function LinearDots(props) {
42
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
43
+ name: "linear-dots",
44
+ children: css
45
+ }), /* @__PURE__ */ jsx("div", {
46
+ ...spinnerRoot("linear-dots", props),
47
+ children: DOTS.map((dot) => /* @__PURE__ */ jsx("div", {
48
+ className: "ld-linear-dots-dot",
49
+ style: step(dot)
50
+ }, dot))
51
+ })] });
52
+ }
53
+ export { LinearDots };
package/dist/loading.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Loading(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Loading };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Loading(props: SpinnerProps): import("react").JSX.Element;