loading-dev 0.3.6 → 0.3.8

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 (93) hide show
  1. package/README.md +9 -1
  2. package/dist/arc.d.ts +4 -6
  3. package/dist/arc.js +1 -2
  4. package/dist/atom.d.ts +3 -5
  5. package/dist/atom.js +1 -2
  6. package/dist/blocks.d.ts +2 -4
  7. package/dist/blocks.js +1 -2
  8. package/dist/bouncing-dots.d.ts +2 -4
  9. package/dist/bouncing-dots.js +1 -2
  10. package/dist/{cap-Ba3uZx03.d.ts → cap-B_Mo1a7N.d.ts} +0 -2
  11. package/dist/cap.d.ts +1 -1
  12. package/dist/cap.js +1 -2
  13. package/dist/cascade.d.ts +3 -5
  14. package/dist/cascade.js +1 -2
  15. package/dist/chevrons.d.ts +2 -0
  16. package/dist/chevrons.js +36 -0
  17. package/dist/circular-dots.d.ts +2 -4
  18. package/dist/circular-dots.js +1 -2
  19. package/dist/classic-v2.d.ts +2 -4
  20. package/dist/classic-v2.js +1 -2
  21. package/dist/classic.d.ts +2 -4
  22. package/dist/classic.js +1 -2
  23. package/dist/clock.d.ts +3 -5
  24. package/dist/clock.js +1 -2
  25. package/dist/comet.d.ts +3 -5
  26. package/dist/comet.js +1 -2
  27. package/dist/compass.d.ts +2 -4
  28. package/dist/compass.js +1 -2
  29. package/dist/dual.d.ts +4 -6
  30. package/dist/dual.js +1 -2
  31. package/dist/{easing-DhnLArHS.d.ts → easing-BM_1QWrA.d.ts} +1 -3
  32. package/dist/easing.d.ts +1 -1
  33. package/dist/easing.js +1 -2
  34. package/dist/eclipse.d.ts +2 -4
  35. package/dist/eclipse.js +1 -2
  36. package/dist/fade.d.ts +2 -4
  37. package/dist/fade.js +1 -2
  38. package/dist/fill.d.ts +2 -0
  39. package/dist/fill.js +59 -0
  40. package/dist/flip.d.ts +2 -4
  41. package/dist/flip.js +1 -2
  42. package/dist/frame.d.ts +3 -5
  43. package/dist/frame.js +1 -2
  44. package/dist/gather.d.ts +2 -4
  45. package/dist/gather.js +1 -2
  46. package/dist/index.d.ts +12 -5
  47. package/dist/index.js +8 -1
  48. package/dist/leap.d.ts +2 -4
  49. package/dist/leap.js +1 -2
  50. package/dist/linear-dots.d.ts +2 -4
  51. package/dist/linear-dots.js +1 -2
  52. package/dist/loading.d.ts +2 -4
  53. package/dist/loading.js +1 -2
  54. package/dist/loop.d.ts +5 -0
  55. package/dist/loop.js +37 -0
  56. package/dist/morph.d.ts +2 -4
  57. package/dist/morph.js +1 -2
  58. package/dist/{motion-D_zUuA3S.d.ts → motion-trIEyOxA.d.ts} +7 -2
  59. package/dist/motion.d.ts +1 -1
  60. package/dist/motion.js +8 -2
  61. package/dist/orbit.d.ts +3 -5
  62. package/dist/orbit.js +1 -2
  63. package/dist/phases.d.ts +2 -0
  64. package/dist/phases.js +73 -0
  65. package/dist/pulse.d.ts +2 -4
  66. package/dist/pulse.js +1 -2
  67. package/dist/radar.d.ts +3 -5
  68. package/dist/radar.js +1 -2
  69. package/dist/ring.d.ts +4 -6
  70. package/dist/ring.js +1 -2
  71. package/dist/ripple.d.ts +2 -4
  72. package/dist/ripple.js +1 -2
  73. package/dist/scan.d.ts +2 -0
  74. package/dist/scan.js +56 -0
  75. package/dist/slide.d.ts +2 -4
  76. package/dist/slide.js +1 -2
  77. package/dist/snake.d.ts +4 -6
  78. package/dist/snake.js +1 -2
  79. package/dist/spinners.d.ts +15 -3
  80. package/dist/spinners.js +15 -2
  81. package/dist/split.d.ts +2 -0
  82. package/dist/split.js +52 -0
  83. package/dist/steps.d.ts +7 -0
  84. package/dist/steps.js +60 -0
  85. package/dist/swirl.d.ts +2 -4
  86. package/dist/swirl.js +1 -2
  87. package/dist/trace.d.ts +4 -6
  88. package/dist/trace.js +1 -2
  89. package/dist/{types-BYaenrWm.d.ts → types-D9_cXnjI.d.ts} +0 -2
  90. package/dist/types.d.ts +1 -1
  91. package/dist/wave.d.ts +2 -4
  92. package/dist/wave.js +1 -2
  93. package/package.json +6 -6
@@ -3,6 +3,7 @@ import { Atom } from "./atom.js";
3
3
  import { Blocks } from "./blocks.js";
4
4
  import { BouncingDots } from "./bouncing-dots.js";
5
5
  import { Cascade } from "./cascade.js";
6
+ import { Chevrons } from "./chevrons.js";
6
7
  import { CircularDots } from "./circular-dots.js";
7
8
  import { ClassicV2 } from "./classic-v2.js";
8
9
  import { Classic } from "./classic.js";
@@ -11,29 +12,35 @@ import { Comet } from "./comet.js";
11
12
  import { Compass } from "./compass.js";
12
13
  import { Dual } from "./dual.js";
13
14
  import { Eclipse } from "./eclipse.js";
15
+ import { Fill } from "./fill.js";
14
16
  import { Flip } from "./flip.js";
15
17
  import { Gather } from "./gather.js";
16
18
  import { Leap } from "./leap.js";
17
19
  import { LinearDots } from "./linear-dots.js";
18
20
  import { Loading } from "./loading.js";
21
+ import { Loop } from "./loop.js";
19
22
  import { Morph } from "./morph.js";
20
23
  import { Orbit } from "./orbit.js";
24
+ import { Phases } from "./phases.js";
21
25
  import { Pulse } from "./pulse.js";
22
26
  import { Radar } from "./radar.js";
23
27
  import { Ring } from "./ring.js";
24
28
  import { Ripple } from "./ripple.js";
29
+ import { Scan } from "./scan.js";
25
30
  import { Slide } from "./slide.js";
26
31
  import { Snake } from "./snake.js";
32
+ import { Split } from "./split.js";
33
+ import { Steps } from "./steps.js";
27
34
  import { Swirl } from "./swirl.js";
28
35
  import { Trace } from "./trace.js";
29
36
  import { Wave } from "./wave.js";
30
- //#region src/spinners.d.ts
31
37
  export declare const SPINNERS: {
32
38
  arc: typeof Arc;
33
39
  atom: typeof Atom;
34
40
  blocks: typeof Blocks;
35
41
  "bouncing-dots": typeof BouncingDots;
36
42
  cascade: typeof Cascade;
43
+ chevrons: typeof Chevrons;
37
44
  "circular-dots": typeof CircularDots;
38
45
  classic: typeof Classic;
39
46
  "classic-v2": typeof ClassicV2;
@@ -42,21 +49,26 @@ export declare const SPINNERS: {
42
49
  compass: typeof Compass;
43
50
  dual: typeof Dual;
44
51
  eclipse: typeof Eclipse;
52
+ fill: typeof Fill;
45
53
  flip: typeof Flip;
46
54
  gather: typeof Gather;
47
55
  leap: typeof Leap;
48
56
  "linear-dots": typeof LinearDots;
49
57
  loading: typeof Loading;
58
+ loop: typeof Loop;
50
59
  morph: typeof Morph;
51
60
  orbit: typeof Orbit;
61
+ phases: typeof Phases;
52
62
  pulse: typeof Pulse;
53
63
  radar: typeof Radar;
54
64
  ring: typeof Ring;
55
65
  ripple: typeof Ripple;
66
+ scan: typeof Scan;
56
67
  slide: typeof Slide;
57
68
  snake: typeof Snake;
69
+ split: typeof Split;
70
+ steps: typeof Steps;
58
71
  swirl: typeof Swirl;
59
72
  trace: typeof Trace;
60
73
  wave: typeof Wave;
61
- };
62
- //#endregion
74
+ };
package/dist/spinners.js CHANGED
@@ -3,6 +3,7 @@ import { Atom } from "./atom.js";
3
3
  import { Blocks } from "./blocks.js";
4
4
  import { BouncingDots } from "./bouncing-dots.js";
5
5
  import { Cascade } from "./cascade.js";
6
+ import { Chevrons } from "./chevrons.js";
6
7
  import { CircularDots } from "./circular-dots.js";
7
8
  import { ClassicV2 } from "./classic-v2.js";
8
9
  import { Classic } from "./classic.js";
@@ -11,29 +12,36 @@ import { Comet } from "./comet.js";
11
12
  import { Compass } from "./compass.js";
12
13
  import { Dual } from "./dual.js";
13
14
  import { Eclipse } from "./eclipse.js";
15
+ import { Fill } from "./fill.js";
14
16
  import { Flip } from "./flip.js";
15
17
  import { Gather } from "./gather.js";
16
18
  import { Leap } from "./leap.js";
17
19
  import { LinearDots } from "./linear-dots.js";
18
20
  import { Loading } from "./loading.js";
21
+ import { Loop } from "./loop.js";
19
22
  import { Morph } from "./morph.js";
20
23
  import { Orbit } from "./orbit.js";
24
+ import { Phases } from "./phases.js";
21
25
  import { Pulse } from "./pulse.js";
22
26
  import { Radar } from "./radar.js";
23
27
  import { Ring } from "./ring.js";
24
28
  import { Ripple } from "./ripple.js";
29
+ import { Scan } from "./scan.js";
25
30
  import { Slide } from "./slide.js";
26
31
  import { Snake } from "./snake.js";
32
+ import { Split } from "./split.js";
33
+ import { Steps } from "./steps.js";
27
34
  import { Swirl } from "./swirl.js";
28
35
  import { Trace } from "./trace.js";
29
36
  import { Wave } from "./wave.js";
30
- //#region src/spinners.ts
37
+ // src/spinners.ts
31
38
  const SPINNERS = {
32
39
  arc: Arc,
33
40
  atom: Atom,
34
41
  blocks: Blocks,
35
42
  "bouncing-dots": BouncingDots,
36
43
  cascade: Cascade,
44
+ chevrons: Chevrons,
37
45
  "circular-dots": CircularDots,
38
46
  classic: Classic,
39
47
  "classic-v2": ClassicV2,
@@ -42,22 +50,27 @@ const SPINNERS = {
42
50
  compass: Compass,
43
51
  dual: Dual,
44
52
  eclipse: Eclipse,
53
+ fill: Fill,
45
54
  flip: Flip,
46
55
  gather: Gather,
47
56
  leap: Leap,
48
57
  "linear-dots": LinearDots,
49
58
  loading: Loading,
59
+ loop: Loop,
50
60
  morph: Morph,
51
61
  orbit: Orbit,
62
+ phases: Phases,
52
63
  pulse: Pulse,
53
64
  radar: Radar,
54
65
  ring: Ring,
55
66
  ripple: Ripple,
67
+ scan: Scan,
56
68
  slide: Slide,
57
69
  snake: Snake,
70
+ split: Split,
71
+ steps: Steps,
58
72
  swirl: Swirl,
59
73
  trace: Trace,
60
74
  wave: Wave
61
75
  };
62
- //#endregion
63
76
  export { SPINNERS };
@@ -0,0 +1,2 @@
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Split(props: SpinnerProps): import("react").JSX.Element;
package/dist/split.js ADDED
@@ -0,0 +1,52 @@
1
+ import { STEP_VAR, animation } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/split.tsx
5
+ const DOTS = [0, 1];
6
+ const APART = `calc((var(${STEP_VAR}) * 2 - 1) * 5px) 0`;
7
+ const css = `
8
+ .ld-split-dot {
9
+ transform-box: fill-box;
10
+ transform-origin: center;
11
+ ${animation("split", "ld-split-part", "cubic-bezier(0.65, 0, 0.35, 1)")}
12
+ }
13
+
14
+ @keyframes ld-split-part {
15
+ 0%,
16
+ 100% {
17
+ translate: 0 0;
18
+ scale: 1;
19
+ }
20
+ 40%,
21
+ 60% {
22
+ translate: ${APART};
23
+ scale: 0.65;
24
+ }
25
+ }
26
+
27
+ @media (prefers-reduced-motion: reduce) {
28
+ .ld-split-dot {
29
+ translate: ${APART};
30
+ scale: 0.65;
31
+ }
32
+ }
33
+ `;
34
+ function Split(props) {
35
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
36
+ name: "split",
37
+ children: css
38
+ }), /* @__PURE__ */ jsx("svg", {
39
+ ...spinnerRoot("split", props),
40
+ fill: "currentColor",
41
+ role: "presentation",
42
+ viewBox: "0 0 24 24",
43
+ children: DOTS.map((dot) => /* @__PURE__ */ jsx("circle", {
44
+ className: "ld-split-dot",
45
+ cx: "12",
46
+ cy: "12",
47
+ r: "4",
48
+ style: step(dot)
49
+ }, dot))
50
+ })] });
51
+ }
52
+ export { Split };
@@ -0,0 +1,7 @@
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export type StepsRows = "double" | "single";
3
+ export declare const DEFAULT_STEPS_ROWS: StepsRows;
4
+ export interface StepsProps extends SpinnerProps {
5
+ rows?: StepsRows;
6
+ }
7
+ export declare function Steps({ rows, ...rest }: StepsProps): import("react").JSX.Element;
package/dist/steps.js ADDED
@@ -0,0 +1,60 @@
1
+ import { 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
+ // src/steps.tsx
5
+ const DEFAULT_STEPS_ROWS = "single";
6
+ const SEGMENTS = [
7
+ 1,
8
+ 7,
9
+ 13,
10
+ 19
11
+ ];
12
+ const ROWS = {
13
+ double: [5, 13],
14
+ single: [9]
15
+ };
16
+ const SLOTS = SEGMENTS.length * 2;
17
+ const css = `
18
+ .ld-steps-segment {
19
+ ${animation("steps", "ld-steps-light", "linear")}
20
+ animation-delay: ${stagger("steps", SLOTS)};
21
+ }
22
+
23
+ @keyframes ld-steps-light {
24
+ 0%,
25
+ 55% {
26
+ opacity: 1;
27
+ }
28
+ 60%,
29
+ 100% {
30
+ opacity: 0.15;
31
+ }
32
+ }
33
+
34
+ @media (prefers-reduced-motion: reduce) {
35
+ .ld-steps-segment {
36
+ opacity: calc(1 - var(${STEP_VAR}) * 0.25);
37
+ }
38
+ }
39
+ `;
40
+ function Steps({ rows = DEFAULT_STEPS_ROWS, ...rest }) {
41
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
42
+ name: "steps",
43
+ children: css
44
+ }), /* @__PURE__ */ jsx("svg", {
45
+ ...spinnerRoot("steps", rest),
46
+ fill: "currentColor",
47
+ role: "presentation",
48
+ viewBox: "0 0 24 24",
49
+ children: ROWS[rows].map((y) => SEGMENTS.map((x, index) => /* @__PURE__ */ jsx("rect", {
50
+ className: "ld-steps-segment",
51
+ height: "6",
52
+ rx: "1.25",
53
+ style: step(index),
54
+ width: "4",
55
+ x,
56
+ y
57
+ }, `${x}-${y}`)))
58
+ })] });
59
+ }
60
+ export { DEFAULT_STEPS_ROWS, Steps };
package/dist/swirl.d.ts CHANGED
@@ -1,4 +1,2 @@
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
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Swirl(props: SpinnerProps): import("react").JSX.Element;
package/dist/swirl.js CHANGED
@@ -2,7 +2,7 @@ import { SIZE } from "./motion.js";
2
2
  import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
3
3
  import { fadeCss } from "./fade.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/swirl.tsx
5
+ // src/swirl.tsx
6
6
  const RING = [
7
7
  0,
8
8
  1,
@@ -46,5 +46,4 @@ function Swirl(props) {
46
46
  }, index))
47
47
  })] });
48
48
  }
49
- //#endregion
50
49
  export { Swirl };
package/dist/trace.d.ts CHANGED
@@ -1,7 +1,5 @@
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
1
+ import { n as CapProps } from "./cap-B_Mo1a7N.js";
2
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
3
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
5
4
  export interface TraceProps extends SpinnerProps, EasingProps, CapProps {}
6
- export declare function Trace({ cap, easing, ...rest }: TraceProps): import("react").JSX.Element;
7
- //#endregion
5
+ export declare function Trace({ cap, easing, ...rest }: TraceProps): import("react").JSX.Element;
package/dist/trace.js CHANGED
@@ -2,7 +2,7 @@ import { linecap } from "./cap.js";
2
2
  import { rotationCss, spinClass } from "./easing.js";
3
3
  import { SpinnerStyle, spinnerRoot } from "./frame.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/trace.tsx
5
+ // src/trace.tsx
6
6
  const VIEW = 20;
7
7
  const SIDE = 17.5;
8
8
  const RADIUS = 4;
@@ -42,5 +42,4 @@ function Trace({ cap, easing, ...rest }) {
42
42
  })]
43
43
  })] });
44
44
  }
45
- //#endregion
46
45
  export { Trace };
@@ -1,4 +1,3 @@
1
- //#region src/types.d.ts
2
1
  interface SpinnerProps {
3
2
  className?: string;
4
3
  color?: string;
@@ -6,5 +5,4 @@ interface SpinnerProps {
6
5
  playState?: "paused" | "running";
7
6
  size?: number;
8
7
  }
9
- //#endregion
10
8
  export { SpinnerProps as t };
package/dist/types.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as SpinnerProps } from "./types-BYaenrWm.js";
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
2
  export { SpinnerProps };
package/dist/wave.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { t as SpinnerProps } from "./types-BYaenrWm.js";
2
- //#region src/wave.d.ts
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
3
2
  export type WaveOrigin = "bottom" | "center";
4
3
  export declare const DEFAULT_WAVE_ORIGIN: WaveOrigin;
5
4
  export interface WaveProps extends SpinnerProps {
6
5
  origin?: WaveOrigin;
7
6
  }
8
- export declare function Wave({ origin, ...rest }: WaveProps): import("react").JSX.Element;
9
- //#endregion
7
+ export declare function Wave({ origin, ...rest }: WaveProps): import("react").JSX.Element;
package/dist/wave.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SIZE, STEP_VAR, animation, stagger } from "./motion.js";
2
2
  import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/wave.tsx
4
+ // src/wave.tsx
5
5
  const DEFAULT_WAVE_ORIGIN = "center";
6
6
  const BARS = Array.from({ length: 5 }, (_, index) => index);
7
7
  const css = `
@@ -52,5 +52,4 @@ function Wave({ origin = DEFAULT_WAVE_ORIGIN, ...rest }) {
52
52
  }, index))
53
53
  })] });
54
54
  }
55
- //#endregion
56
55
  export { DEFAULT_WAVE_ORIGIN, Wave };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loading-dev",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "A lightweight library full of beautiful loading indicators for React.",
5
5
  "keywords": [
6
6
  "react",
@@ -47,12 +47,12 @@
47
47
  "@types/node": "^26.6.4",
48
48
  "@types/react": "^19.3.0",
49
49
  "@types/react-dom": "^19.3.0",
50
- "oxlint": "1.87.0",
51
- "react": "19.3.0",
52
- "react-dom": "19.3.0",
53
- "tsdown": "^0.23.0",
50
+ "oxlint": "1.90.0",
51
+ "react": "19.3.1",
52
+ "react-dom": "19.3.1",
53
+ "tsdown": "^0.23.3",
54
54
  "typescript": "^7.0.2",
55
- "ultracite": "8.0.0",
55
+ "ultracite": "8.1.0",
56
56
  "vitest": "^5.0.3"
57
57
  },
58
58
  "peerDependencies": {