loading-dev 0.3.1 → 0.3.3

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/index.js CHANGED
@@ -1,27 +1,52 @@
1
+ // src/cap.ts
2
+ var DEFAULT_CAP = "round";
3
+ function linecap(cap = DEFAULT_CAP) {
4
+ return cap === "flat" ? "butt" : "round";
5
+ }
6
+
1
7
  // src/motion.ts
2
8
  var DURATION_VAR = "--ld-duration";
3
9
  var PLAY_STATE_VAR = "--ld-play-state";
4
10
  var SIZE_VAR = "--ld-size";
11
+ var STEP_VAR = "--ld-step";
5
12
  var DEFAULT_SIZE = 20;
6
13
  var SIZE = `var(${SIZE_VAR}, ${DEFAULT_SIZE}px)`;
7
14
  var SPINNER_MOTION = {
8
- arc: { duration: 800 },
9
- "bouncing-dots": { duration: 500 },
10
- "circular-dots": { duration: 800 },
11
- classic: { duration: 1200 },
12
- "classic-v2": { duration: 800 },
13
- clock: { duration: 1200 },
14
- comet: { duration: 700 },
15
- compass: { duration: 500 },
16
- "linear-dots": { duration: 900 },
17
- orbit: { duration: 750 },
18
- pulse: { duration: 1200 },
19
- radar: { duration: 1500 },
20
- ring: { duration: 800 },
21
- swirl: { duration: 1200 }
15
+ arc: 800,
16
+ atom: 1e3,
17
+ blocks: 1300,
18
+ "bouncing-dots": 500,
19
+ cascade: 1500,
20
+ "circular-dots": 800,
21
+ classic: 1200,
22
+ "classic-v2": 800,
23
+ clock: 1200,
24
+ comet: 700,
25
+ compass: 500,
26
+ dual: 1e3,
27
+ eclipse: 1200,
28
+ flip: 1200,
29
+ gather: 1600,
30
+ leap: 1800,
31
+ "linear-dots": 900,
32
+ loading: 1e3,
33
+ morph: 1200,
34
+ orbit: 750,
35
+ pulse: 1200,
36
+ radar: 1500,
37
+ ring: 800,
38
+ ripple: 1200,
39
+ slide: 2400,
40
+ snake: 1400,
41
+ swirl: 1200,
42
+ trace: 1200,
43
+ wave: 900
22
44
  };
23
45
  function duration(name) {
24
- return `var(${DURATION_VAR}, ${SPINNER_MOTION[name].duration}ms)`;
46
+ return `var(${DURATION_VAR}, ${SPINNER_MOTION[name]}ms)`;
47
+ }
48
+ function stagger(name, count) {
49
+ return `calc(${duration(name)} * (var(${STEP_VAR}) - ${count}) / ${count})`;
25
50
  }
26
51
  var PLAY_STATE = `var(${PLAY_STATE_VAR}, running)`;
27
52
 
@@ -31,7 +56,10 @@ function spinClass(name, easing = DEFAULT_EASING) {
31
56
  const base = `ld-${name}-spin`;
32
57
  return easing === "linear" ? base : `${base} ${base}-${easing}`;
33
58
  }
34
- function rotationCss(name) {
59
+ var ROTATE = `to {
60
+ transform: rotate(360deg);
61
+ }`;
62
+ function rotationCss(name, turn = ROTATE) {
35
63
  return `
36
64
  .ld-${name}-spin {
37
65
  transform-origin: center;
@@ -50,9 +78,7 @@ function rotationCss(name) {
50
78
  }
51
79
 
52
80
  @keyframes ld-${name}-rotate {
53
- to {
54
- transform: rotate(360deg);
55
- }
81
+ ${turn}
56
82
  }
57
83
 
58
84
  @media (prefers-reduced-motion: reduce) {
@@ -74,6 +100,9 @@ function SpinnerStyle({
74
100
  function cssVars(vars) {
75
101
  return vars;
76
102
  }
103
+ function step(index) {
104
+ return cssVars({ [STEP_VAR]: index });
105
+ }
77
106
  function spinnerRoot(name, { className, color, duration: duration2, playState, size = DEFAULT_SIZE }) {
78
107
  return {
79
108
  "aria-hidden": true,
@@ -97,7 +126,7 @@ var css = `
97
126
 
98
127
  ${rotationCss("arc")}
99
128
  `;
100
- function Arc({ easing, ...rest }) {
129
+ function Arc({ cap, easing, ...rest }) {
101
130
  return /* @__PURE__ */ jsxs(Fragment, { children: [
102
131
  /* @__PURE__ */ jsx2(SpinnerStyle, { name: "arc", children: css }),
103
132
  /* @__PURE__ */ jsx2(
@@ -116,7 +145,7 @@ function Arc({ easing, ...rest }) {
116
145
  r: "10",
117
146
  stroke: "currentColor",
118
147
  strokeDasharray: "18 44.8",
119
- strokeLinecap: "round",
148
+ strokeLinecap: linecap(cap),
120
149
  strokeWidth: "2.5"
121
150
  }
122
151
  )
@@ -125,11 +154,150 @@ function Arc({ easing, ...rest }) {
125
154
  ] });
126
155
  }
127
156
 
128
- // src/bouncing-dots.tsx
157
+ // src/atom.tsx
129
158
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
159
+ var ORBITS = Array.from({ length: 3 }, (_, index) => index);
160
+ var TILT = 180 / ORBITS.length;
161
+ var STROKE = `calc(${SIZE} * 0.055)`;
162
+ var INNER_STROKE = `calc(${SIZE} * 0.045)`;
163
+ var css2 = `
164
+ .ld-atom {
165
+ position: relative;
166
+ width: ${SIZE};
167
+ height: ${SIZE};
168
+ }
169
+
170
+ .ld-atom-shell {
171
+ position: absolute;
172
+ inset: 0;
173
+ box-sizing: border-box;
174
+ border: ${STROKE} solid currentColor;
175
+ border-radius: 9999px;
176
+ }
177
+
178
+ .ld-atom-orbit {
179
+ position: absolute;
180
+ inset: 0;
181
+ transform-style: preserve-3d;
182
+ transform: rotate(var(--ld-atom-tilt)) rotateX(90deg);
183
+ }
184
+
185
+ .ld-atom-ring {
186
+ position: absolute;
187
+ inset: 0;
188
+ box-sizing: border-box;
189
+ border: ${INNER_STROKE} solid currentColor;
190
+ border-radius: 9999px;
191
+ transform: rotateX(90deg);
192
+ }
193
+
194
+ ${rotationCss("atom")}
195
+
196
+ .ld-atom-spin {
197
+ position: absolute;
198
+ inset: 0;
199
+ transform-style: preserve-3d;
200
+ animation-delay: ${stagger("atom", ORBITS.length)};
201
+ }
202
+
203
+ @media (prefers-reduced-motion: reduce) {
204
+ .ld-atom-spin {
205
+ transform: rotate(${TILT}deg);
206
+ }
207
+ }
208
+ `;
209
+ function Atom({ easing, ...rest }) {
210
+ return /* @__PURE__ */ jsxs2(Fragment2, { children: [
211
+ /* @__PURE__ */ jsx3(SpinnerStyle, { name: "atom", children: css2 }),
212
+ /* @__PURE__ */ jsxs2("div", { ...spinnerRoot("atom", rest), children: [
213
+ /* @__PURE__ */ jsx3("div", { className: "ld-atom-shell" }),
214
+ ORBITS.map((index) => /* @__PURE__ */ jsx3(
215
+ "div",
216
+ {
217
+ className: "ld-atom-orbit",
218
+ style: cssVars({ "--ld-atom-tilt": `${index * TILT}deg` }),
219
+ children: /* @__PURE__ */ jsx3("div", { className: spinClass("atom", easing), style: step(index), children: /* @__PURE__ */ jsx3("div", { className: "ld-atom-ring" }) })
220
+ },
221
+ index
222
+ ))
223
+ ] })
224
+ ] });
225
+ }
226
+
227
+ // src/blocks.tsx
228
+ import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
229
+ var DEFAULT_BLOCKS_SWEEP = "diagonal";
230
+ var SIDE = 3;
231
+ var CELLS = Array.from({ length: SIDE * SIDE }, (_, index) => ({
232
+ col: index % SIDE,
233
+ row: Math.floor(index / SIDE)
234
+ }));
235
+ var SWEEPS = {
236
+ columns: { count: SIDE, place: ({ col }) => col },
237
+ diagonal: { count: SIDE * 2 - 1, place: ({ col, row }) => row + col },
238
+ rows: { count: SIDE, place: ({ row }) => row }
239
+ };
240
+ var css3 = `
241
+ .ld-blocks {
242
+ display: grid;
243
+ grid-template-columns: repeat(${SIDE}, 1fr);
244
+ grid-template-rows: repeat(${SIDE}, 1fr);
245
+ gap: calc(${SIZE} * 0.1);
246
+ width: ${SIZE};
247
+ height: ${SIZE};
248
+ }
249
+
250
+ .ld-blocks-cell {
251
+ background: currentColor;
252
+ border-radius: calc(${SIZE} * 0.0625);
253
+ animation: ld-blocks-sweep ${duration("blocks")} ease-in-out infinite;
254
+ animation-play-state: ${PLAY_STATE};
255
+ }
256
+ ${Object.entries(SWEEPS).map(
257
+ ([sweep, { count }]) => `
258
+ .ld-blocks-cell-${sweep} {
259
+ animation-delay: ${stagger("blocks", count)};
260
+ }
261
+ `
262
+ ).join("")}
263
+ @keyframes ld-blocks-sweep {
264
+ 0%,
265
+ 70%,
266
+ 100% {
267
+ transform: scale(1);
268
+ }
269
+ 35% {
270
+ transform: scale(0);
271
+ }
272
+ }
273
+
274
+ @media (prefers-reduced-motion: reduce) {
275
+ .ld-blocks-cell {
276
+ transform: scale(0.8);
277
+ animation: none;
278
+ }
279
+ }
280
+ `;
281
+ function Blocks({ sweep = DEFAULT_BLOCKS_SWEEP, ...rest }) {
282
+ const { place } = SWEEPS[sweep];
283
+ return /* @__PURE__ */ jsxs3(Fragment3, { children: [
284
+ /* @__PURE__ */ jsx4(SpinnerStyle, { name: "blocks", children: css3 }),
285
+ /* @__PURE__ */ jsx4("div", { ...spinnerRoot("blocks", rest), children: CELLS.map((cell) => /* @__PURE__ */ jsx4(
286
+ "div",
287
+ {
288
+ className: `ld-blocks-cell ld-blocks-cell-${sweep}`,
289
+ style: step(place(cell))
290
+ },
291
+ `${cell.col}-${cell.row}`
292
+ )) })
293
+ ] });
294
+ }
295
+
296
+ // src/bouncing-dots.tsx
297
+ import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
130
298
  var DOTS = Array.from({ length: 3 }, (_, index) => index);
131
299
  var dur = duration("bouncing-dots");
132
- var css2 = `
300
+ var css4 = `
133
301
  .ld-bouncing-dots {
134
302
  display: flex;
135
303
  align-items: center;
@@ -170,14 +338,76 @@ var css2 = `
170
338
  }
171
339
  `;
172
340
  function BouncingDots(props) {
173
- return /* @__PURE__ */ jsxs2(Fragment2, { children: [
174
- /* @__PURE__ */ jsx3(SpinnerStyle, { name: "bouncing-dots", children: css2 }),
175
- /* @__PURE__ */ jsx3("div", { ...spinnerRoot("bouncing-dots", props), children: DOTS.map((dot) => /* @__PURE__ */ jsx3("div", { className: "ld-bouncing-dots-dot" }, dot)) })
341
+ return /* @__PURE__ */ jsxs4(Fragment4, { children: [
342
+ /* @__PURE__ */ jsx5(SpinnerStyle, { name: "bouncing-dots", children: css4 }),
343
+ /* @__PURE__ */ jsx5("div", { ...spinnerRoot("bouncing-dots", props), children: DOTS.map((dot) => /* @__PURE__ */ jsx5("div", { className: "ld-bouncing-dots-dot" }, dot)) })
344
+ ] });
345
+ }
346
+
347
+ // src/cascade.tsx
348
+ import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
349
+ var RADII = [10.5, 7, 3.5];
350
+ var SLOTS = 24;
351
+ var css5 = `
352
+ .ld-cascade {
353
+ width: ${SIZE};
354
+ height: ${SIZE};
355
+ }
356
+
357
+ .ld-cascade-arc {
358
+ transform-origin: center;
359
+ animation: ld-cascade-turn ${duration("cascade")} cubic-bezier(0.68, -0.75, 0.265, 1.75) infinite;
360
+ animation-delay: ${stagger("cascade", SLOTS)};
361
+ animation-play-state: ${PLAY_STATE};
362
+ }
363
+
364
+ @keyframes ld-cascade-turn {
365
+ to {
366
+ transform: rotate(360deg);
367
+ }
368
+ }
369
+
370
+ @media (prefers-reduced-motion: reduce) {
371
+ .ld-cascade-arc {
372
+ animation: none;
373
+ }
374
+ }
375
+ `;
376
+ function Cascade({ cap, ...rest }) {
377
+ return /* @__PURE__ */ jsxs5(Fragment5, { children: [
378
+ /* @__PURE__ */ jsx6(SpinnerStyle, { name: "cascade", children: css5 }),
379
+ /* @__PURE__ */ jsx6(
380
+ "svg",
381
+ {
382
+ ...spinnerRoot("cascade", rest),
383
+ fill: "none",
384
+ role: "presentation",
385
+ stroke: "currentColor",
386
+ strokeLinecap: linecap(cap),
387
+ strokeWidth: "2",
388
+ viewBox: "0 0 24 24",
389
+ children: RADII.map((r, index) => {
390
+ const circumference = 2 * Math.PI * r;
391
+ return /* @__PURE__ */ jsx6(
392
+ "circle",
393
+ {
394
+ className: "ld-cascade-arc",
395
+ cx: "12",
396
+ cy: "12",
397
+ r,
398
+ strokeDasharray: `${circumference / 4} ${circumference * 3 / 4}`,
399
+ style: step(index)
400
+ },
401
+ r
402
+ );
403
+ })
404
+ }
405
+ )
176
406
  ] });
177
407
  }
178
408
 
179
409
  // src/circular-dots.tsx
180
- import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
410
+ import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
181
411
  var DOTS2 = [
182
412
  [8, 1.5],
183
413
  [12.5962, 3.4038],
@@ -188,16 +418,15 @@ var DOTS2 = [
188
418
  [1.5, 8],
189
419
  [3.4038, 3.4038]
190
420
  ];
191
- var dur2 = duration("circular-dots");
192
- var css3 = `
421
+ var css6 = `
193
422
  .ld-circular-dots {
194
423
  width: ${SIZE};
195
424
  height: ${SIZE};
196
425
  }
197
426
 
198
427
  .ld-circular-dots-dot {
199
- animation: ld-circular-dots-fade ${dur2} linear infinite;
200
- animation-delay: calc(${dur2} * (var(--ld-circular-dots-step) - ${DOTS2.length}) / ${DOTS2.length});
428
+ animation: ld-circular-dots-fade ${duration("circular-dots")} linear infinite;
429
+ animation-delay: ${stagger("circular-dots", DOTS2.length)};
201
430
  animation-play-state: ${PLAY_STATE};
202
431
  }
203
432
 
@@ -218,23 +447,23 @@ var css3 = `
218
447
  }
219
448
  `;
220
449
  function CircularDots(props) {
221
- return /* @__PURE__ */ jsxs3(Fragment3, { children: [
222
- /* @__PURE__ */ jsx4(SpinnerStyle, { name: "circular-dots", children: css3 }),
223
- /* @__PURE__ */ jsx4(
450
+ return /* @__PURE__ */ jsxs6(Fragment6, { children: [
451
+ /* @__PURE__ */ jsx7(SpinnerStyle, { name: "circular-dots", children: css6 }),
452
+ /* @__PURE__ */ jsx7(
224
453
  "svg",
225
454
  {
226
455
  ...spinnerRoot("circular-dots", props),
227
456
  fill: "currentColor",
228
457
  role: "presentation",
229
458
  viewBox: "0 0 16 16",
230
- children: DOTS2.map(([cx, cy], step) => /* @__PURE__ */ jsx4(
459
+ children: DOTS2.map(([cx, cy], index) => /* @__PURE__ */ jsx7(
231
460
  "circle",
232
461
  {
233
462
  className: "ld-circular-dots-dot",
234
463
  cx,
235
464
  cy,
236
465
  r: "1.5",
237
- style: cssVars({ "--ld-circular-dots-step": step })
466
+ style: step(index)
238
467
  },
239
468
  `${cx}-${cy}`
240
469
  ))
@@ -244,17 +473,9 @@ function CircularDots(props) {
244
473
  }
245
474
 
246
475
  // src/classic.tsx
247
- import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
476
+ import { Fragment as Fragment7, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
248
477
  var BARS = Array.from({ length: 12 }, (_, index) => index);
249
- var dur3 = duration("classic");
250
- var BAR_RULES = BARS.map(
251
- (bar) => `
252
- .ld-classic-bar:nth-child(${bar + 1}) {
253
- transform: rotate(${bar === 0 ? "0.0001" : bar * 30}deg) translate(146%);
254
- animation-delay: calc(${dur3} * ${(bar / 12 - 1).toFixed(4)});
255
- }`
256
- ).join("\n");
257
- var css4 = `
478
+ var css7 = `
258
479
  .ld-classic {
259
480
  width: ${SIZE};
260
481
  height: ${SIZE};
@@ -276,10 +497,11 @@ var css4 = `
276
497
  height: 8%;
277
498
  background: currentColor;
278
499
  border-radius: 6px;
279
- animation: ld-classic-spin ${dur3} linear infinite;
500
+ transform: rotate(calc(var(${STEP_VAR}) * 30deg)) translate(146%);
501
+ animation: ld-classic-spin ${duration("classic")} linear infinite;
502
+ animation-delay: ${stagger("classic", BARS.length)};
280
503
  animation-play-state: ${PLAY_STATE};
281
504
  }
282
- ${BAR_RULES}
283
505
 
284
506
  @keyframes ld-classic-spin {
285
507
  0% {
@@ -298,34 +520,35 @@ ${BAR_RULES}
298
520
  }
299
521
  `;
300
522
  function Classic(props) {
301
- return /* @__PURE__ */ jsxs4(Fragment4, { children: [
302
- /* @__PURE__ */ jsx5(SpinnerStyle, { name: "classic", children: css4 }),
303
- /* @__PURE__ */ jsx5("div", { ...spinnerRoot("classic", props), children: /* @__PURE__ */ jsx5("div", { className: "ld-classic-inner", children: BARS.map((bar) => /* @__PURE__ */ jsx5("div", { className: "ld-classic-bar" }, bar)) }) })
523
+ return /* @__PURE__ */ jsxs7(Fragment7, { children: [
524
+ /* @__PURE__ */ jsx8(SpinnerStyle, { name: "classic", children: css7 }),
525
+ /* @__PURE__ */ jsx8("div", { ...spinnerRoot("classic", props), children: /* @__PURE__ */ jsx8("div", { className: "ld-classic-inner", children: BARS.map((bar) => /* @__PURE__ */ jsx8("div", { className: "ld-classic-bar", style: step(bar) }, bar)) }) })
304
526
  ] });
305
527
  }
306
528
 
307
529
  // src/classic-v2.tsx
308
- import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
309
- var TICKS = 8;
310
- var dur4 = duration("classic-v2");
311
- var TICK_RULES = Array.from(
312
- { length: TICKS },
313
- (_, tick) => `
314
- .ld-classic-v2-tick:nth-child(${tick + 1}) {
315
- animation-delay: calc(${dur4} * ${(tick / TICKS - 1).toFixed(4)});
316
- }`
317
- ).join("\n");
318
- var css5 = `
530
+ import { Fragment as Fragment8, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
531
+ var TICKS = [
532
+ "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",
533
+ "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",
534
+ "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",
535
+ "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",
536
+ "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",
537
+ "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",
538
+ "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",
539
+ "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"
540
+ ];
541
+ var css8 = `
319
542
  .ld-classic-v2 {
320
543
  width: ${SIZE};
321
544
  height: ${SIZE};
322
545
  }
323
546
 
324
547
  .ld-classic-v2-tick {
325
- animation: ld-classic-v2-fade ${dur4} linear infinite;
548
+ animation: ld-classic-v2-fade ${duration("classic-v2")} linear infinite;
549
+ animation-delay: ${stagger("classic-v2", TICKS.length)};
326
550
  animation-play-state: ${PLAY_STATE};
327
551
  }
328
- ${TICK_RULES}
329
552
 
330
553
  @keyframes ld-classic-v2-fade {
331
554
  0% {
@@ -344,81 +567,32 @@ ${TICK_RULES}
344
567
  }
345
568
  `;
346
569
  function ClassicV2(props) {
347
- return /* @__PURE__ */ jsxs5(Fragment5, { children: [
348
- /* @__PURE__ */ jsx6(SpinnerStyle, { name: "classic-v2", children: css5 }),
349
- /* @__PURE__ */ jsx6(
570
+ return /* @__PURE__ */ jsxs8(Fragment8, { children: [
571
+ /* @__PURE__ */ jsx9(SpinnerStyle, { name: "classic-v2", children: css8 }),
572
+ /* @__PURE__ */ jsx9(
350
573
  "svg",
351
574
  {
352
575
  ...spinnerRoot("classic-v2", props),
353
576
  fill: "none",
354
577
  role: "presentation",
355
578
  viewBox: "0 0 16 16",
356
- children: /* @__PURE__ */ jsxs5("g", { fill: "currentColor", children: [
357
- /* @__PURE__ */ jsx6(
358
- "path",
359
- {
360
- className: "ld-classic-v2-tick",
361
- d: "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"
362
- }
363
- ),
364
- /* @__PURE__ */ jsx6(
365
- "path",
366
- {
367
- className: "ld-classic-v2-tick",
368
- d: "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"
369
- }
370
- ),
371
- /* @__PURE__ */ jsx6(
372
- "path",
373
- {
374
- className: "ld-classic-v2-tick",
375
- d: "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"
376
- }
377
- ),
378
- /* @__PURE__ */ jsx6(
379
- "path",
380
- {
381
- className: "ld-classic-v2-tick",
382
- d: "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"
383
- }
384
- ),
385
- /* @__PURE__ */ jsx6(
386
- "path",
387
- {
388
- className: "ld-classic-v2-tick",
389
- d: "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"
390
- }
391
- ),
392
- /* @__PURE__ */ jsx6(
393
- "path",
394
- {
395
- className: "ld-classic-v2-tick",
396
- d: "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"
397
- }
398
- ),
399
- /* @__PURE__ */ jsx6(
400
- "path",
401
- {
402
- className: "ld-classic-v2-tick",
403
- d: "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"
404
- }
405
- ),
406
- /* @__PURE__ */ jsx6(
407
- "path",
408
- {
409
- className: "ld-classic-v2-tick",
410
- d: "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"
411
- }
412
- )
413
- ] })
579
+ children: /* @__PURE__ */ jsx9("g", { fill: "currentColor", children: TICKS.map((d, tick) => /* @__PURE__ */ jsx9(
580
+ "path",
581
+ {
582
+ className: "ld-classic-v2-tick",
583
+ d,
584
+ style: step(tick)
585
+ },
586
+ d
587
+ )) })
414
588
  }
415
589
  )
416
590
  ] });
417
591
  }
418
592
 
419
593
  // src/clock.tsx
420
- import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
421
- var css6 = `
594
+ import { Fragment as Fragment9, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
595
+ var css9 = `
422
596
  .ld-clock {
423
597
  width: ${SIZE};
424
598
  height: ${SIZE};
@@ -427,9 +601,9 @@ var css6 = `
427
601
  ${rotationCss("clock")}
428
602
  `;
429
603
  function Clock({ easing, ...rest }) {
430
- return /* @__PURE__ */ jsxs6(Fragment6, { children: [
431
- /* @__PURE__ */ jsx7(SpinnerStyle, { name: "clock", children: css6 }),
432
- /* @__PURE__ */ jsxs6(
604
+ return /* @__PURE__ */ jsxs9(Fragment9, { children: [
605
+ /* @__PURE__ */ jsx10(SpinnerStyle, { name: "clock", children: css9 }),
606
+ /* @__PURE__ */ jsxs9(
433
607
  "svg",
434
608
  {
435
609
  ...spinnerRoot("clock", rest),
@@ -437,8 +611,8 @@ function Clock({ easing, ...rest }) {
437
611
  role: "presentation",
438
612
  viewBox: "0 0 16 16",
439
613
  children: [
440
- /* @__PURE__ */ jsx7("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.1", r: "8" }),
441
- /* @__PURE__ */ jsx7(
614
+ /* @__PURE__ */ jsx10("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.1", r: "8" }),
615
+ /* @__PURE__ */ jsx10(
442
616
  "path",
443
617
  {
444
618
  className: spinClass("clock", easing),
@@ -453,8 +627,8 @@ function Clock({ easing, ...rest }) {
453
627
  }
454
628
 
455
629
  // src/comet.tsx
456
- import { Fragment as Fragment7, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
457
- var css7 = `
630
+ import { Fragment as Fragment10, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
631
+ var css10 = `
458
632
  .ld-comet {
459
633
  --ld-comet-stroke: calc(${SIZE} * 0.12);
460
634
  position: relative;
@@ -490,18 +664,18 @@ var css7 = `
490
664
  ${rotationCss("comet")}
491
665
  `;
492
666
  function Comet({ easing, ...rest }) {
493
- return /* @__PURE__ */ jsxs7(Fragment7, { children: [
494
- /* @__PURE__ */ jsx8(SpinnerStyle, { name: "comet", children: css7 }),
495
- /* @__PURE__ */ jsx8("div", { ...spinnerRoot("comet", rest), children: /* @__PURE__ */ jsxs7("div", { className: spinClass("comet", easing), children: [
496
- /* @__PURE__ */ jsx8("div", { className: "ld-comet-tail" }),
497
- /* @__PURE__ */ jsx8("div", { className: "ld-comet-head" })
667
+ return /* @__PURE__ */ jsxs10(Fragment10, { children: [
668
+ /* @__PURE__ */ jsx11(SpinnerStyle, { name: "comet", children: css10 }),
669
+ /* @__PURE__ */ jsx11("div", { ...spinnerRoot("comet", rest), children: /* @__PURE__ */ jsxs10("div", { className: spinClass("comet", easing), children: [
670
+ /* @__PURE__ */ jsx11("div", { className: "ld-comet-tail" }),
671
+ /* @__PURE__ */ jsx11("div", { className: "ld-comet-head" })
498
672
  ] }) })
499
673
  ] });
500
674
  }
501
675
 
502
676
  // src/compass.tsx
503
- import { Fragment as Fragment8, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
504
- var css8 = `
677
+ import { Fragment as Fragment11, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
678
+ var css11 = `
505
679
  .ld-compass {
506
680
  width: ${SIZE};
507
681
  height: ${SIZE};
@@ -526,98 +700,510 @@ var css8 = `
526
700
  }
527
701
  `;
528
702
  function Compass(props) {
529
- return /* @__PURE__ */ jsxs8(Fragment8, { children: [
530
- /* @__PURE__ */ jsx9(SpinnerStyle, { name: "compass", children: css8 }),
531
- /* @__PURE__ */ jsx9(
703
+ return /* @__PURE__ */ jsxs11(Fragment11, { children: [
704
+ /* @__PURE__ */ jsx12(SpinnerStyle, { name: "compass", children: css11 }),
705
+ /* @__PURE__ */ jsx12(
532
706
  "svg",
533
707
  {
534
708
  ...spinnerRoot("compass", props),
535
709
  fill: "none",
536
710
  role: "presentation",
537
711
  viewBox: "0 0 16 16",
538
- children: /* @__PURE__ */ jsxs8("g", { className: "ld-compass-ticks", fill: "currentColor", children: [
539
- /* @__PURE__ */ jsx9("path", { d: "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" }),
540
- /* @__PURE__ */ jsx9("path", { d: "M12.6667 8.66667C12.2985 8.66667 12 8.3682 12 8.00001C12 7.63182 12.2985 7.33334 12.6667 7.33334H15.3333C15.7015 7.33334 16 7.63182 16 8.00001C16 8.3682 15.7015 8.66667 15.3333 8.66667H12.6667Z" }),
541
- /* @__PURE__ */ jsx9("path", { d: "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" }),
542
- /* @__PURE__ */ jsx9("path", { d: "M0.666667 8.66667C0.298477 8.66667 1.60941e-08 8.3682 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.3682 3.70152 8.66667 3.33333 8.66667H0.666667Z" })
712
+ children: /* @__PURE__ */ jsxs11("g", { className: "ld-compass-ticks", fill: "currentColor", children: [
713
+ /* @__PURE__ */ jsx12("path", { d: "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" }),
714
+ /* @__PURE__ */ jsx12("path", { d: "M12.6667 8.66667C12.2985 8.66667 12 8.3682 12 8.00001C12 7.63182 12.2985 7.33334 12.6667 7.33334H15.3333C15.7015 7.33334 16 7.63182 16 8.00001C16 8.3682 15.7015 8.66667 15.3333 8.66667H12.6667Z" }),
715
+ /* @__PURE__ */ jsx12("path", { d: "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" }),
716
+ /* @__PURE__ */ jsx12("path", { d: "M0.666667 8.66667C0.298477 8.66667 1.60941e-08 8.3682 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.3682 3.70152 8.66667 3.33333 8.66667H0.666667Z" })
543
717
  ] })
544
718
  }
545
719
  )
546
720
  ] });
547
721
  }
548
722
 
549
- // src/linear-dots.tsx
550
- import { Fragment as Fragment9, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
551
- var COUNT = 3;
552
- var DOTS3 = Array.from({ length: COUNT }, (_, index) => ({
553
- step: (COUNT - index) % COUNT
554
- }));
555
- var dur5 = duration("linear-dots");
556
- var css9 = `
557
- .ld-linear-dots {
558
- display: flex;
559
- align-items: center;
560
- gap: calc(${SIZE} * 0.1875);
723
+ // src/dual.tsx
724
+ import { Fragment as Fragment12, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
725
+ var css12 = `
726
+ .ld-dual {
727
+ width: ${SIZE};
561
728
  height: ${SIZE};
562
729
  }
563
730
 
564
- .ld-linear-dots-dot {
565
- width: calc(${SIZE} * 0.1875);
566
- height: calc(${SIZE} * 0.1875);
567
- background: currentColor;
568
- border-radius: 9999px;
569
- animation: ld-linear-dots-fade ${dur5} linear infinite;
570
- animation-delay: calc(${dur5} * var(--ld-linear-dots-step) / -${COUNT});
571
- animation-play-state: ${PLAY_STATE};
572
- }
731
+ ${rotationCss("dual")}
573
732
 
574
- @keyframes ld-linear-dots-fade {
575
- 0% {
576
- opacity: 1;
577
- }
578
- 66.67% {
579
- opacity: 0.5;
580
- }
581
- 100% {
582
- opacity: 1;
583
- }
733
+ .ld-dual-inner {
734
+ animation-direction: reverse;
584
735
  }
585
736
 
586
737
  @media (prefers-reduced-motion: reduce) {
587
- .ld-linear-dots-dot {
588
- opacity: 0.75;
589
- animation: none;
738
+ .ld-dual-inner {
739
+ transform: rotate(180deg);
590
740
  }
591
741
  }
592
742
  `;
593
- function LinearDots(props) {
594
- return /* @__PURE__ */ jsxs9(Fragment9, { children: [
595
- /* @__PURE__ */ jsx10(SpinnerStyle, { name: "linear-dots", children: css9 }),
596
- /* @__PURE__ */ jsx10("div", { ...spinnerRoot("linear-dots", props), children: DOTS3.map((dot, index) => /* @__PURE__ */ jsx10(
597
- "div",
743
+ function Dual({ cap, easing, ...rest }) {
744
+ return /* @__PURE__ */ jsxs12(Fragment12, { children: [
745
+ /* @__PURE__ */ jsx13(SpinnerStyle, { name: "dual", children: css12 }),
746
+ /* @__PURE__ */ jsxs12(
747
+ "svg",
598
748
  {
599
- className: "ld-linear-dots-dot",
600
- style: cssVars({ "--ld-linear-dots-step": dot.step })
601
- },
602
- index
603
- )) })
604
- ] });
605
- }
606
-
607
- // src/orbit.tsx
608
- import { Fragment as Fragment10, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
609
- var css10 = `
610
- .ld-orbit {
611
- --ld-orbit-stroke: calc(${SIZE} * 0.0625);
612
- position: relative;
613
- width: ${SIZE};
614
- height: ${SIZE};
615
- }
616
-
617
- .ld-orbit-track {
618
- position: absolute;
619
- inset: 8%;
620
- border-radius: 9999px;
749
+ ...spinnerRoot("dual", rest),
750
+ fill: "none",
751
+ role: "presentation",
752
+ stroke: "currentColor",
753
+ strokeLinecap: linecap(cap),
754
+ strokeWidth: "2.5",
755
+ viewBox: "0 0 24 24",
756
+ children: [
757
+ /* @__PURE__ */ jsx13(
758
+ "circle",
759
+ {
760
+ className: spinClass("dual", easing),
761
+ cx: "12",
762
+ cy: "12",
763
+ r: "10",
764
+ strokeDasharray: "18 44.8"
765
+ }
766
+ ),
767
+ /* @__PURE__ */ jsx13(
768
+ "circle",
769
+ {
770
+ className: `ld-dual-inner ${spinClass("dual", easing)}`,
771
+ cx: "12",
772
+ cy: "12",
773
+ r: "5.5",
774
+ strokeDasharray: "10 24.6"
775
+ }
776
+ )
777
+ ]
778
+ }
779
+ )
780
+ ] });
781
+ }
782
+
783
+ // src/eclipse.tsx
784
+ import { Fragment as Fragment13, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
785
+ var DOTS3 = [0, 1];
786
+ var css13 = `
787
+ .ld-eclipse {
788
+ position: relative;
789
+ width: ${SIZE};
790
+ height: ${SIZE};
791
+ }
792
+
793
+ .ld-eclipse-dot {
794
+ position: absolute;
795
+ top: 30%;
796
+ left: 30%;
797
+ width: 40%;
798
+ height: 40%;
799
+ background: currentColor;
800
+ border-radius: 50%;
801
+ animation:
802
+ ld-eclipse-slide ${duration("eclipse")} ease-in-out infinite,
803
+ ld-eclipse-depth ${duration("eclipse")} ease-in-out infinite;
804
+ animation-delay: ${stagger("eclipse", DOTS3.length)};
805
+ animation-play-state: ${PLAY_STATE};
806
+ }
807
+
808
+ @keyframes ld-eclipse-slide {
809
+ 0%,
810
+ 100% {
811
+ translate: 75% 0;
812
+ }
813
+ 50% {
814
+ translate: -75% 0;
815
+ }
816
+ }
817
+
818
+ @keyframes ld-eclipse-depth {
819
+ 0%,
820
+ 50%,
821
+ 100% {
822
+ opacity: 0.75;
823
+ scale: 1;
824
+ }
825
+ 25% {
826
+ opacity: 1;
827
+ scale: 1.3;
828
+ }
829
+ 75% {
830
+ opacity: 0.5;
831
+ scale: 0.7;
832
+ }
833
+ }
834
+
835
+ @media (prefers-reduced-motion: reduce) {
836
+ .ld-eclipse-dot {
837
+ translate: calc(var(${STEP_VAR}) * 150% - 75%) 0;
838
+ animation: none;
839
+ }
840
+ }
841
+ `;
842
+ function Eclipse(props) {
843
+ return /* @__PURE__ */ jsxs13(Fragment13, { children: [
844
+ /* @__PURE__ */ jsx14(SpinnerStyle, { name: "eclipse", children: css13 }),
845
+ /* @__PURE__ */ jsx14("div", { ...spinnerRoot("eclipse", props), children: DOTS3.map((index) => /* @__PURE__ */ jsx14("div", { className: "ld-eclipse-dot", style: step(index) }, index)) })
846
+ ] });
847
+ }
848
+
849
+ // src/flip.tsx
850
+ import { Fragment as Fragment14, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
851
+ var css14 = `
852
+ .ld-flip {
853
+ width: ${SIZE};
854
+ height: ${SIZE};
855
+ perspective: calc(${SIZE} * 3);
856
+ }
857
+
858
+ .ld-flip-face {
859
+ width: 64%;
860
+ height: 64%;
861
+ margin: 18%;
862
+ background: currentColor;
863
+ border-radius: calc(${SIZE} * 0.06);
864
+ animation: ld-flip-turn ${duration("flip")} ease-in-out infinite;
865
+ animation-play-state: ${PLAY_STATE};
866
+ }
867
+
868
+ @keyframes ld-flip-turn {
869
+ 0% {
870
+ transform: rotateX(0) rotateY(0);
871
+ }
872
+ 50% {
873
+ transform: rotateX(-180deg) rotateY(0);
874
+ }
875
+ 100% {
876
+ transform: rotateX(-180deg) rotateY(-180deg);
877
+ }
878
+ }
879
+
880
+ @media (prefers-reduced-motion: reduce) {
881
+ .ld-flip-face {
882
+ animation: none;
883
+ }
884
+ }
885
+ `;
886
+ function Flip(props) {
887
+ return /* @__PURE__ */ jsxs14(Fragment14, { children: [
888
+ /* @__PURE__ */ jsx15(SpinnerStyle, { name: "flip", children: css14 }),
889
+ /* @__PURE__ */ jsx15("div", { ...spinnerRoot("flip", props), children: /* @__PURE__ */ jsx15("div", { className: "ld-flip-face" }) })
890
+ ] });
891
+ }
892
+
893
+ // src/gather.tsx
894
+ import { Fragment as Fragment15, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
895
+ var BLOCKS = [
896
+ { x: 1, y: 1 },
897
+ { x: -1, y: 1 },
898
+ { x: 1, y: -1 },
899
+ { x: -1, y: -1 }
900
+ ];
901
+ var GAP = 24;
902
+ var GAP_IN = 8;
903
+ var BLOCK = (100 - GAP) / 2;
904
+ var PULL = `${((GAP - GAP_IN) / 2 / BLOCK * 100).toFixed(1)}%`;
905
+ var css15 = `
906
+ .ld-gather {
907
+ width: ${SIZE};
908
+ height: ${SIZE};
909
+ }
910
+
911
+ .ld-gather-group {
912
+ display: grid;
913
+ grid-template-columns: 1fr 1fr;
914
+ gap: ${GAP}%;
915
+ width: 100%;
916
+ height: 100%;
917
+ animation: ld-gather-turn ${duration("gather")} ease-in-out infinite;
918
+ animation-play-state: ${PLAY_STATE};
919
+ }
920
+
921
+ .ld-gather-block {
922
+ background: currentColor;
923
+ border-radius: calc(${SIZE} * 0.14);
924
+ animation: ld-gather-pull ${duration("gather")} ease-in-out infinite;
925
+ animation-play-state: ${PLAY_STATE};
926
+ }
927
+
928
+ @keyframes ld-gather-pull {
929
+ 0%,
930
+ 100% {
931
+ transform: translate(0, 0);
932
+ }
933
+ 30%,
934
+ 60% {
935
+ transform: translate(
936
+ calc(var(--ld-gather-x) * ${PULL}),
937
+ calc(var(--ld-gather-y) * ${PULL})
938
+ );
939
+ }
940
+ }
941
+
942
+ @keyframes ld-gather-turn {
943
+ 0%,
944
+ 30% {
945
+ transform: rotate(0);
946
+ }
947
+ 60%,
948
+ 100% {
949
+ transform: rotate(90deg);
950
+ }
951
+ }
952
+
953
+ @media (prefers-reduced-motion: reduce) {
954
+ .ld-gather-group,
955
+ .ld-gather-block {
956
+ animation: none;
957
+ }
958
+ }
959
+ `;
960
+ function Gather(props) {
961
+ return /* @__PURE__ */ jsxs15(Fragment15, { children: [
962
+ /* @__PURE__ */ jsx16(SpinnerStyle, { name: "gather", children: css15 }),
963
+ /* @__PURE__ */ jsx16("div", { ...spinnerRoot("gather", props), children: /* @__PURE__ */ jsx16("div", { className: "ld-gather-group", children: BLOCKS.map(({ x, y }) => /* @__PURE__ */ jsx16(
964
+ "div",
965
+ {
966
+ className: "ld-gather-block",
967
+ style: cssVars({ "--ld-gather-x": x, "--ld-gather-y": y })
968
+ },
969
+ `${x}${y}`
970
+ )) }) })
971
+ ] });
972
+ }
973
+
974
+ // src/leap.tsx
975
+ import { Fragment as Fragment16, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
976
+ var DOTS4 = Array.from({ length: 3 }, (_, index) => index);
977
+ var css16 = `
978
+ .ld-leap {
979
+ position: relative;
980
+ width: ${SIZE};
981
+ height: ${SIZE};
982
+ }
983
+
984
+ .ld-leap-wrapper {
985
+ position: absolute;
986
+ inset: 0;
987
+ animation: ld-leap-hop ${duration("leap")} ease-in-out infinite;
988
+ animation-delay: ${stagger("leap", DOTS4.length)};
989
+ animation-play-state: ${PLAY_STATE};
990
+ }
991
+
992
+ .ld-leap-dot {
993
+ position: absolute;
994
+ top: 39%;
995
+ left: 0;
996
+ width: 22%;
997
+ height: 22%;
998
+ background: currentColor;
999
+ border-radius: 50%;
1000
+ }
1001
+
1002
+ @keyframes ld-leap-hop {
1003
+ 0% {
1004
+ transform: translateX(0) rotate(0);
1005
+ }
1006
+ 33.33% {
1007
+ transform: translateX(0) rotate(180deg);
1008
+ }
1009
+ 66.66% {
1010
+ transform: translateX(-39%) rotate(180deg);
1011
+ }
1012
+ 99.99% {
1013
+ transform: translateX(-78%) rotate(180deg);
1014
+ }
1015
+ 100% {
1016
+ transform: translateX(0) rotate(0);
1017
+ }
1018
+ }
1019
+
1020
+ @media (prefers-reduced-motion: reduce) {
1021
+ .ld-leap-wrapper {
1022
+ transform: translateX(calc(var(${STEP_VAR}) * 39%));
1023
+ animation: none;
1024
+ }
1025
+ }
1026
+ `;
1027
+ function Leap(props) {
1028
+ return /* @__PURE__ */ jsxs16(Fragment16, { children: [
1029
+ /* @__PURE__ */ jsx17(SpinnerStyle, { name: "leap", children: css16 }),
1030
+ /* @__PURE__ */ jsx17("div", { ...spinnerRoot("leap", props), children: DOTS4.map((index) => /* @__PURE__ */ jsx17("div", { className: "ld-leap-wrapper", style: step(index), children: /* @__PURE__ */ jsx17("div", { className: "ld-leap-dot" }) }, index)) })
1031
+ ] });
1032
+ }
1033
+
1034
+ // src/linear-dots.tsx
1035
+ import { Fragment as Fragment17, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
1036
+ var DOTS5 = Array.from({ length: 3 }, (_, index) => index);
1037
+ var css17 = `
1038
+ .ld-linear-dots {
1039
+ display: flex;
1040
+ align-items: center;
1041
+ gap: calc(${SIZE} * 0.1875);
1042
+ height: ${SIZE};
1043
+ }
1044
+
1045
+ .ld-linear-dots-dot {
1046
+ width: calc(${SIZE} * 0.1875);
1047
+ height: calc(${SIZE} * 0.1875);
1048
+ background: currentColor;
1049
+ border-radius: 9999px;
1050
+ animation: ld-linear-dots-fade ${duration("linear-dots")} linear infinite;
1051
+ animation-delay: ${stagger("linear-dots", DOTS5.length)};
1052
+ animation-play-state: ${PLAY_STATE};
1053
+ }
1054
+
1055
+ @keyframes ld-linear-dots-fade {
1056
+ 0% {
1057
+ opacity: 1;
1058
+ }
1059
+ 66.67% {
1060
+ opacity: 0.5;
1061
+ }
1062
+ 100% {
1063
+ opacity: 1;
1064
+ }
1065
+ }
1066
+
1067
+ @media (prefers-reduced-motion: reduce) {
1068
+ .ld-linear-dots-dot {
1069
+ opacity: 0.75;
1070
+ animation: none;
1071
+ }
1072
+ }
1073
+ `;
1074
+ function LinearDots(props) {
1075
+ return /* @__PURE__ */ jsxs17(Fragment17, { children: [
1076
+ /* @__PURE__ */ jsx18(SpinnerStyle, { name: "linear-dots", children: css17 }),
1077
+ /* @__PURE__ */ jsx18("div", { ...spinnerRoot("linear-dots", props), children: DOTS5.map((dot) => /* @__PURE__ */ jsx18("div", { className: "ld-linear-dots-dot", style: step(dot) }, dot)) })
1078
+ ] });
1079
+ }
1080
+
1081
+ // src/loading.tsx
1082
+ import { Fragment as Fragment18, jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
1083
+ var BLOCK2 = "M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2z";
1084
+ var SEGMENTS = [
1085
+ { x: 12, y: 6 },
1086
+ { x: 10, y: 10 },
1087
+ { x: 6, y: 12 },
1088
+ { x: 2, y: 10 },
1089
+ { x: 0, y: 6 },
1090
+ { x: 2, y: 2 },
1091
+ { x: 6, y: 0 },
1092
+ { x: 10, y: 2 }
1093
+ ];
1094
+ var css18 = `
1095
+ .ld-loading {
1096
+ width: ${SIZE};
1097
+ height: ${SIZE};
1098
+ }
1099
+
1100
+ .ld-loading-segment {
1101
+ animation: ld-loading-fade ${duration("loading")} linear infinite;
1102
+ animation-delay: ${stagger("loading", SEGMENTS.length)};
1103
+ animation-play-state: ${PLAY_STATE};
1104
+ }
1105
+
1106
+ @keyframes ld-loading-fade {
1107
+ from {
1108
+ opacity: 1;
1109
+ }
1110
+ to {
1111
+ opacity: 0.2;
1112
+ }
1113
+ }
1114
+
1115
+ @media (prefers-reduced-motion: reduce) {
1116
+ .ld-loading-segment {
1117
+ opacity: 0.6;
1118
+ animation: none;
1119
+ }
1120
+ }
1121
+ `;
1122
+ function Loading(props) {
1123
+ return /* @__PURE__ */ jsxs18(Fragment18, { children: [
1124
+ /* @__PURE__ */ jsx19(SpinnerStyle, { name: "loading", children: css18 }),
1125
+ /* @__PURE__ */ jsx19(
1126
+ "svg",
1127
+ {
1128
+ ...spinnerRoot("loading", props),
1129
+ fill: "currentColor",
1130
+ role: "presentation",
1131
+ viewBox: "0 0 15 15",
1132
+ children: SEGMENTS.map(({ x, y }, segment) => /* @__PURE__ */ jsx19(
1133
+ "path",
1134
+ {
1135
+ className: "ld-loading-segment",
1136
+ d: BLOCK2,
1137
+ style: step(segment),
1138
+ transform: `translate(${x} ${y})`
1139
+ },
1140
+ `${x}-${y}`
1141
+ ))
1142
+ }
1143
+ )
1144
+ ] });
1145
+ }
1146
+
1147
+ // src/morph.tsx
1148
+ import { Fragment as Fragment19, jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
1149
+ var css19 = `
1150
+ .ld-morph {
1151
+ width: ${SIZE};
1152
+ height: ${SIZE};
1153
+ }
1154
+
1155
+ .ld-morph-shape {
1156
+ width: 64%;
1157
+ height: 64%;
1158
+ margin: 18%;
1159
+ background: currentColor;
1160
+ border-radius: calc(${SIZE} * 0.08);
1161
+ animation: ld-morph-round ${duration("morph")} ease-in-out infinite;
1162
+ animation-play-state: ${PLAY_STATE};
1163
+ }
1164
+
1165
+ @keyframes ld-morph-round {
1166
+ 0% {
1167
+ border-radius: calc(${SIZE} * 0.08);
1168
+ transform: rotate(0);
1169
+ }
1170
+ 50% {
1171
+ border-radius: 50%;
1172
+ transform: rotate(45deg);
1173
+ }
1174
+ 100% {
1175
+ border-radius: calc(${SIZE} * 0.08);
1176
+ transform: rotate(90deg);
1177
+ }
1178
+ }
1179
+
1180
+ @media (prefers-reduced-motion: reduce) {
1181
+ .ld-morph-shape {
1182
+ animation: none;
1183
+ }
1184
+ }
1185
+ `;
1186
+ function Morph(props) {
1187
+ return /* @__PURE__ */ jsxs19(Fragment19, { children: [
1188
+ /* @__PURE__ */ jsx20(SpinnerStyle, { name: "morph", children: css19 }),
1189
+ /* @__PURE__ */ jsx20("div", { ...spinnerRoot("morph", props), children: /* @__PURE__ */ jsx20("div", { className: "ld-morph-shape" }) })
1190
+ ] });
1191
+ }
1192
+
1193
+ // src/orbit.tsx
1194
+ import { Fragment as Fragment20, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
1195
+ var css20 = `
1196
+ .ld-orbit {
1197
+ --ld-orbit-stroke: calc(${SIZE} * 0.0625);
1198
+ position: relative;
1199
+ width: ${SIZE};
1200
+ height: ${SIZE};
1201
+ }
1202
+
1203
+ .ld-orbit-track {
1204
+ position: absolute;
1205
+ inset: 8%;
1206
+ border-radius: 9999px;
621
1207
  background: conic-gradient(from 180deg, transparent 0deg, currentColor 180deg, transparent 180deg);
622
1208
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
623
1209
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
@@ -637,18 +1223,18 @@ var css10 = `
637
1223
  ${rotationCss("orbit")}
638
1224
  `;
639
1225
  function Orbit({ easing, ...rest }) {
640
- return /* @__PURE__ */ jsxs10(Fragment10, { children: [
641
- /* @__PURE__ */ jsx11(SpinnerStyle, { name: "orbit", children: css10 }),
642
- /* @__PURE__ */ jsxs10("div", { ...spinnerRoot("orbit", rest), children: [
643
- /* @__PURE__ */ jsx11("div", { className: "ld-orbit-dot" }),
644
- /* @__PURE__ */ jsx11("div", { className: `ld-orbit-track ${spinClass("orbit", easing)}` })
1226
+ return /* @__PURE__ */ jsxs20(Fragment20, { children: [
1227
+ /* @__PURE__ */ jsx21(SpinnerStyle, { name: "orbit", children: css20 }),
1228
+ /* @__PURE__ */ jsxs20("div", { ...spinnerRoot("orbit", rest), children: [
1229
+ /* @__PURE__ */ jsx21("div", { className: "ld-orbit-dot" }),
1230
+ /* @__PURE__ */ jsx21("div", { className: `ld-orbit-track ${spinClass("orbit", easing)}` })
645
1231
  ] })
646
1232
  ] });
647
1233
  }
648
1234
 
649
1235
  // src/pulse.tsx
650
- import { Fragment as Fragment11, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
651
- var css11 = `
1236
+ import { Fragment as Fragment21, jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
1237
+ var css21 = `
652
1238
  .ld-pulse {
653
1239
  width: ${SIZE};
654
1240
  height: ${SIZE};
@@ -679,9 +1265,9 @@ var css11 = `
679
1265
  }
680
1266
  `;
681
1267
  function Pulse(props) {
682
- return /* @__PURE__ */ jsxs11(Fragment11, { children: [
683
- /* @__PURE__ */ jsx12(SpinnerStyle, { name: "pulse", children: css11 }),
684
- /* @__PURE__ */ jsxs11(
1268
+ return /* @__PURE__ */ jsxs21(Fragment21, { children: [
1269
+ /* @__PURE__ */ jsx22(SpinnerStyle, { name: "pulse", children: css21 }),
1270
+ /* @__PURE__ */ jsxs21(
685
1271
  "svg",
686
1272
  {
687
1273
  ...spinnerRoot("pulse", props),
@@ -689,7 +1275,7 @@ function Pulse(props) {
689
1275
  role: "presentation",
690
1276
  viewBox: "0 0 16 16",
691
1277
  children: [
692
- /* @__PURE__ */ jsx12(
1278
+ /* @__PURE__ */ jsx22(
693
1279
  "circle",
694
1280
  {
695
1281
  className: "ld-pulse-ring",
@@ -699,7 +1285,7 @@ function Pulse(props) {
699
1285
  r: "8"
700
1286
  }
701
1287
  ),
702
- /* @__PURE__ */ jsx12("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
1288
+ /* @__PURE__ */ jsx22("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
703
1289
  ]
704
1290
  }
705
1291
  )
@@ -708,8 +1294,8 @@ function Pulse(props) {
708
1294
 
709
1295
  // src/radar.tsx
710
1296
  import { useId } from "react";
711
- import { Fragment as Fragment12, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
712
- var css12 = `
1297
+ import { Fragment as Fragment22, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
1298
+ var css22 = `
713
1299
  .ld-radar {
714
1300
  width: ${SIZE};
715
1301
  height: ${SIZE};
@@ -719,9 +1305,9 @@ ${rotationCss("radar")}
719
1305
  `;
720
1306
  function Radar({ easing, ...rest }) {
721
1307
  const beamGradient = useId();
722
- return /* @__PURE__ */ jsxs12(Fragment12, { children: [
723
- /* @__PURE__ */ jsx13(SpinnerStyle, { name: "radar", children: css12 }),
724
- /* @__PURE__ */ jsxs12(
1308
+ return /* @__PURE__ */ jsxs22(Fragment22, { children: [
1309
+ /* @__PURE__ */ jsx23(SpinnerStyle, { name: "radar", children: css22 }),
1310
+ /* @__PURE__ */ jsxs22(
725
1311
  "svg",
726
1312
  {
727
1313
  ...spinnerRoot("radar", rest),
@@ -729,7 +1315,7 @@ function Radar({ easing, ...rest }) {
729
1315
  role: "presentation",
730
1316
  viewBox: "0 0 16 16",
731
1317
  children: [
732
- /* @__PURE__ */ jsx13("defs", { children: /* @__PURE__ */ jsxs12(
1318
+ /* @__PURE__ */ jsx23("defs", { children: /* @__PURE__ */ jsxs22(
733
1319
  "radialGradient",
734
1320
  {
735
1321
  cx: "8",
@@ -738,14 +1324,14 @@ function Radar({ easing, ...rest }) {
738
1324
  id: beamGradient,
739
1325
  r: "8",
740
1326
  children: [
741
- /* @__PURE__ */ jsx13("stop", { offset: "0.3334", stopColor: "currentColor" }),
742
- /* @__PURE__ */ jsx13("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
1327
+ /* @__PURE__ */ jsx23("stop", { offset: "0.3334", stopColor: "currentColor" }),
1328
+ /* @__PURE__ */ jsx23("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
743
1329
  ]
744
1330
  }
745
1331
  ) }),
746
- /* @__PURE__ */ jsx13("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.2", r: "8" }),
747
- /* @__PURE__ */ jsx13("circle", { cx: "8", cy: "8", opacity: "0.2", r: "5.5", stroke: "currentColor" }),
748
- /* @__PURE__ */ jsx13(
1332
+ /* @__PURE__ */ jsx23("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.2", r: "8" }),
1333
+ /* @__PURE__ */ jsx23("circle", { cx: "8", cy: "8", opacity: "0.2", r: "5.5", stroke: "currentColor" }),
1334
+ /* @__PURE__ */ jsx23(
749
1335
  "path",
750
1336
  {
751
1337
  className: spinClass("radar", easing),
@@ -753,7 +1339,7 @@ function Radar({ easing, ...rest }) {
753
1339
  fill: `url(#${beamGradient})`
754
1340
  }
755
1341
  ),
756
- /* @__PURE__ */ jsx13("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
1342
+ /* @__PURE__ */ jsx23("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
757
1343
  ]
758
1344
  }
759
1345
  )
@@ -761,8 +1347,8 @@ function Radar({ easing, ...rest }) {
761
1347
  }
762
1348
 
763
1349
  // src/ring.tsx
764
- import { Fragment as Fragment13, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
765
- var css13 = `
1350
+ import { Fragment as Fragment23, jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
1351
+ var css23 = `
766
1352
  .ld-ring {
767
1353
  width: ${SIZE};
768
1354
  height: ${SIZE};
@@ -770,10 +1356,10 @@ var css13 = `
770
1356
 
771
1357
  ${rotationCss("ring")}
772
1358
  `;
773
- function Ring({ easing, ...rest }) {
774
- return /* @__PURE__ */ jsxs13(Fragment13, { children: [
775
- /* @__PURE__ */ jsx14(SpinnerStyle, { name: "ring", children: css13 }),
776
- /* @__PURE__ */ jsxs13(
1359
+ function Ring({ cap, easing, ...rest }) {
1360
+ return /* @__PURE__ */ jsxs23(Fragment23, { children: [
1361
+ /* @__PURE__ */ jsx24(SpinnerStyle, { name: "ring", children: css23 }),
1362
+ /* @__PURE__ */ jsxs23(
777
1363
  "svg",
778
1364
  {
779
1365
  ...spinnerRoot("ring", rest),
@@ -781,7 +1367,7 @@ function Ring({ easing, ...rest }) {
781
1367
  role: "presentation",
782
1368
  viewBox: "0 0 24 24",
783
1369
  children: [
784
- /* @__PURE__ */ jsx14(
1370
+ /* @__PURE__ */ jsx24(
785
1371
  "circle",
786
1372
  {
787
1373
  cx: "12",
@@ -792,7 +1378,7 @@ function Ring({ easing, ...rest }) {
792
1378
  strokeWidth: "2.5"
793
1379
  }
794
1380
  ),
795
- /* @__PURE__ */ jsx14(
1381
+ /* @__PURE__ */ jsx24(
796
1382
  "circle",
797
1383
  {
798
1384
  className: spinClass("ring", easing),
@@ -801,7 +1387,7 @@ function Ring({ easing, ...rest }) {
801
1387
  r: "10",
802
1388
  stroke: "currentColor",
803
1389
  strokeDasharray: "16 46.8",
804
- strokeLinecap: "round",
1390
+ strokeLinecap: linecap(cap),
805
1391
  strokeWidth: "2.5"
806
1392
  }
807
1393
  )
@@ -811,15 +1397,211 @@ function Ring({ easing, ...rest }) {
811
1397
  ] });
812
1398
  }
813
1399
 
1400
+ // src/ripple.tsx
1401
+ import { Fragment as Fragment24, jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
1402
+ var DEFAULT_RIPPLE_DIRECTION = "out";
1403
+ var RINGS = Array.from({ length: 3 }, (_, index) => index);
1404
+ var css24 = `
1405
+ .ld-ripple {
1406
+ position: relative;
1407
+ width: ${SIZE};
1408
+ height: ${SIZE};
1409
+ }
1410
+
1411
+ .ld-ripple-ring {
1412
+ position: absolute;
1413
+ inset: 0;
1414
+ box-sizing: border-box;
1415
+ border: calc(${SIZE} * 0.08) solid currentColor;
1416
+ border-radius: 9999px;
1417
+ animation: ld-ripple-spread ${duration("ripple")} ease-out infinite;
1418
+ animation-delay: ${stagger("ripple", RINGS.length)};
1419
+ animation-play-state: ${PLAY_STATE};
1420
+ }
1421
+
1422
+ .ld-ripple-ring-in {
1423
+ animation-direction: reverse;
1424
+ }
1425
+
1426
+ @keyframes ld-ripple-spread {
1427
+ from {
1428
+ opacity: 1;
1429
+ transform: scale(0);
1430
+ }
1431
+ to {
1432
+ opacity: 0;
1433
+ transform: scale(1);
1434
+ }
1435
+ }
1436
+
1437
+ @media (prefers-reduced-motion: reduce) {
1438
+ .ld-ripple-ring {
1439
+ opacity: 0.4;
1440
+ transform: scale(calc((var(${STEP_VAR}) + 1) / ${RINGS.length}));
1441
+ animation: none;
1442
+ }
1443
+ }
1444
+ `;
1445
+ function Ripple({
1446
+ direction = DEFAULT_RIPPLE_DIRECTION,
1447
+ ...rest
1448
+ }) {
1449
+ return /* @__PURE__ */ jsxs24(Fragment24, { children: [
1450
+ /* @__PURE__ */ jsx25(SpinnerStyle, { name: "ripple", children: css24 }),
1451
+ /* @__PURE__ */ jsx25("div", { ...spinnerRoot("ripple", rest), children: RINGS.map((index) => /* @__PURE__ */ jsx25(
1452
+ "div",
1453
+ {
1454
+ className: `ld-ripple-ring ld-ripple-ring-${direction}`,
1455
+ style: step(index)
1456
+ },
1457
+ index
1458
+ )) })
1459
+ ] });
1460
+ }
1461
+
1462
+ // src/slide.tsx
1463
+ import { Fragment as Fragment25, jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
1464
+ var DOT = 34;
1465
+ var GAP2 = 20;
1466
+ var MARGIN = (100 - 2 * DOT - GAP2) / 2;
1467
+ var FAR = `${((DOT + GAP2) / DOT * 100).toFixed(1)}%`;
1468
+ var RESTS = [
1469
+ `translate(${FAR}, 0)`,
1470
+ "translate(0, 0)",
1471
+ `translate(0, ${FAR})`
1472
+ ];
1473
+ var css25 = `
1474
+ .ld-slide {
1475
+ position: relative;
1476
+ width: ${SIZE};
1477
+ height: ${SIZE};
1478
+ }
1479
+
1480
+ .ld-slide-dot {
1481
+ position: absolute;
1482
+ top: ${MARGIN}%;
1483
+ left: ${MARGIN}%;
1484
+ width: ${DOT}%;
1485
+ height: ${DOT}%;
1486
+ background: currentColor;
1487
+ border-radius: 50%;
1488
+ animation: ld-slide-walk ${duration("slide")} ease-in-out infinite;
1489
+ animation-delay: ${stagger("slide", RESTS.length)};
1490
+ animation-play-state: ${PLAY_STATE};
1491
+ }
1492
+
1493
+ @keyframes ld-slide-walk {
1494
+ 0% {
1495
+ transform: translate(${FAR}, 0);
1496
+ }
1497
+ 8.33%,
1498
+ 25% {
1499
+ transform: translate(${FAR}, ${FAR});
1500
+ }
1501
+ 33.33%,
1502
+ 50% {
1503
+ transform: translate(0, ${FAR});
1504
+ }
1505
+ 58.33%,
1506
+ 75% {
1507
+ transform: translate(0, 0);
1508
+ }
1509
+ 83.33%,
1510
+ 100% {
1511
+ transform: translate(${FAR}, 0);
1512
+ }
1513
+ }
1514
+
1515
+ @media (prefers-reduced-motion: reduce) {
1516
+ .ld-slide-dot {
1517
+ transform: var(--ld-slide-rest);
1518
+ animation: none;
1519
+ }
1520
+ }
1521
+ `;
1522
+ function Slide(props) {
1523
+ return /* @__PURE__ */ jsxs25(Fragment25, { children: [
1524
+ /* @__PURE__ */ jsx26(SpinnerStyle, { name: "slide", children: css25 }),
1525
+ /* @__PURE__ */ jsx26("div", { ...spinnerRoot("slide", props), children: RESTS.map((rest, index) => /* @__PURE__ */ jsx26(
1526
+ "div",
1527
+ {
1528
+ className: "ld-slide-dot",
1529
+ style: cssVars({ ...step(index), "--ld-slide-rest": rest })
1530
+ },
1531
+ rest
1532
+ )) })
1533
+ ] });
1534
+ }
1535
+
1536
+ // src/snake.tsx
1537
+ import { Fragment as Fragment26, jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
1538
+ var css26 = `
1539
+ .ld-snake {
1540
+ width: ${SIZE};
1541
+ height: ${SIZE};
1542
+ }
1543
+
1544
+ ${rotationCss("snake")}
1545
+
1546
+ .ld-snake-dash {
1547
+ animation: ld-snake-stretch ${duration("snake")} ease-in-out infinite;
1548
+ animation-play-state: ${PLAY_STATE};
1549
+ }
1550
+
1551
+ @keyframes ld-snake-stretch {
1552
+ 0% {
1553
+ stroke-dasharray: 1 100;
1554
+ stroke-dashoffset: 0;
1555
+ }
1556
+ 50% {
1557
+ stroke-dasharray: 45 100;
1558
+ stroke-dashoffset: -17;
1559
+ }
1560
+ 100% {
1561
+ stroke-dasharray: 45 100;
1562
+ stroke-dashoffset: -62;
1563
+ }
1564
+ }
1565
+
1566
+ @media (prefers-reduced-motion: reduce) {
1567
+ .ld-snake-dash {
1568
+ stroke-dasharray: 18 100;
1569
+ animation: none;
1570
+ }
1571
+ }
1572
+ `;
1573
+ function Snake({ cap, easing, ...rest }) {
1574
+ return /* @__PURE__ */ jsxs26(Fragment26, { children: [
1575
+ /* @__PURE__ */ jsx27(SpinnerStyle, { name: "snake", children: css26 }),
1576
+ /* @__PURE__ */ jsx27(
1577
+ "svg",
1578
+ {
1579
+ ...spinnerRoot("snake", rest),
1580
+ fill: "none",
1581
+ role: "presentation",
1582
+ viewBox: "0 0 24 24",
1583
+ children: /* @__PURE__ */ jsx27("g", { className: spinClass("snake", easing), children: /* @__PURE__ */ jsx27(
1584
+ "circle",
1585
+ {
1586
+ className: "ld-snake-dash",
1587
+ cx: "12",
1588
+ cy: "12",
1589
+ r: "10",
1590
+ stroke: "currentColor",
1591
+ strokeLinecap: linecap(cap),
1592
+ strokeWidth: "2.5"
1593
+ }
1594
+ ) })
1595
+ }
1596
+ )
1597
+ ] });
1598
+ }
1599
+
814
1600
  // src/swirl.tsx
815
- import { Fragment as Fragment14, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1601
+ import { Fragment as Fragment27, jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
816
1602
  var RING = [0, 1, 2, 7, null, 3, 6, 5, 4];
817
- var CELLS = RING.map((place) => ({
818
- place,
819
- step: place === null ? null : (8 - place) % 8
820
- }));
821
- var dur6 = duration("swirl");
822
- var css14 = `
1603
+ var PLACES = RING.filter((place) => place !== null).length;
1604
+ var css27 = `
823
1605
  .ld-swirl {
824
1606
  display: grid;
825
1607
  grid-template-columns: repeat(3, 1fr);
@@ -834,8 +1616,8 @@ var css14 = `
834
1616
  .ld-swirl-cell {
835
1617
  background: currentColor;
836
1618
  border-radius: calc(${SIZE} * 0.0625);
837
- animation: ld-swirl-fade ${dur6} linear infinite;
838
- animation-delay: calc(${dur6} * var(--ld-swirl-step) / -8);
1619
+ animation: ld-swirl-fade ${duration("swirl")} linear infinite;
1620
+ animation-delay: ${stagger("swirl", PLACES)};
839
1621
  animation-play-state: ${PLAY_STATE};
840
1622
  }
841
1623
 
@@ -856,55 +1638,197 @@ var css14 = `
856
1638
  }
857
1639
  `;
858
1640
  function Swirl(props) {
859
- return /* @__PURE__ */ jsxs14(Fragment14, { children: [
860
- /* @__PURE__ */ jsx15(SpinnerStyle, { name: "swirl", children: css14 }),
861
- /* @__PURE__ */ jsx15("div", { ...spinnerRoot("swirl", props), children: CELLS.map(
862
- (cell, index) => cell.step === null ? /* @__PURE__ */ jsx15("div", {}, index) : /* @__PURE__ */ jsx15(
863
- "div",
864
- {
865
- className: "ld-swirl-cell",
866
- style: cssVars({ "--ld-swirl-step": cell.step })
867
- },
868
- index
869
- )
1641
+ return /* @__PURE__ */ jsxs27(Fragment27, { children: [
1642
+ /* @__PURE__ */ jsx28(SpinnerStyle, { name: "swirl", children: css27 }),
1643
+ /* @__PURE__ */ jsx28("div", { ...spinnerRoot("swirl", props), children: RING.map(
1644
+ (place, index) => place === null ? /* @__PURE__ */ jsx28("div", {}, index) : /* @__PURE__ */ jsx28("div", { className: "ld-swirl-cell", style: step(place) }, index)
870
1645
  ) })
871
1646
  ] });
872
1647
  }
873
1648
 
1649
+ // src/trace.tsx
1650
+ import { Fragment as Fragment28, jsx as jsx29, jsxs as jsxs28 } from "react/jsx-runtime";
1651
+ var VIEW = 20;
1652
+ var SIDE2 = 17.5;
1653
+ var RADIUS = 4;
1654
+ var PERIMETER = 4 * (SIDE2 - 2 * RADIUS) + 2 * Math.PI * RADIUS;
1655
+ var DASH = 16;
1656
+ var RECT = {
1657
+ height: SIDE2,
1658
+ rx: RADIUS,
1659
+ width: SIDE2,
1660
+ x: (VIEW - SIDE2) / 2,
1661
+ y: (VIEW - SIDE2) / 2
1662
+ };
1663
+ var css28 = `
1664
+ .ld-trace {
1665
+ width: ${SIZE};
1666
+ height: ${SIZE};
1667
+ }
1668
+
1669
+ ${rotationCss(
1670
+ "trace",
1671
+ `to {
1672
+ stroke-dashoffset: ${-PERIMETER};
1673
+ }`
1674
+ )}
1675
+ `;
1676
+ function Trace({ cap, easing, ...rest }) {
1677
+ return /* @__PURE__ */ jsxs28(Fragment28, { children: [
1678
+ /* @__PURE__ */ jsx29(SpinnerStyle, { name: "trace", children: css28 }),
1679
+ /* @__PURE__ */ jsxs28(
1680
+ "svg",
1681
+ {
1682
+ ...spinnerRoot("trace", rest),
1683
+ fill: "none",
1684
+ role: "presentation",
1685
+ stroke: "currentColor",
1686
+ strokeWidth: "2.5",
1687
+ viewBox: `0 0 ${VIEW} ${VIEW}`,
1688
+ children: [
1689
+ /* @__PURE__ */ jsx29("rect", { ...RECT, opacity: "0.2" }),
1690
+ /* @__PURE__ */ jsx29(
1691
+ "rect",
1692
+ {
1693
+ ...RECT,
1694
+ className: spinClass("trace", easing),
1695
+ strokeDasharray: `${DASH} ${PERIMETER - DASH}`,
1696
+ strokeLinecap: linecap(cap)
1697
+ }
1698
+ )
1699
+ ]
1700
+ }
1701
+ )
1702
+ ] });
1703
+ }
1704
+
1705
+ // src/wave.tsx
1706
+ import { Fragment as Fragment29, jsx as jsx30, jsxs as jsxs29 } from "react/jsx-runtime";
1707
+ var DEFAULT_WAVE_ORIGIN = "center";
1708
+ var BARS2 = Array.from({ length: 5 }, (_, index) => index);
1709
+ var css29 = `
1710
+ .ld-wave {
1711
+ display: flex;
1712
+ align-items: center;
1713
+ justify-content: space-between;
1714
+ width: ${SIZE};
1715
+ height: ${SIZE};
1716
+ }
1717
+
1718
+ .ld-wave-bar {
1719
+ width: calc(${SIZE} * 0.12);
1720
+ height: 100%;
1721
+ background: currentColor;
1722
+ border-radius: 9999px;
1723
+ animation: ld-wave-rise ${duration("wave")} ease-in-out infinite;
1724
+ animation-delay: ${stagger("wave", BARS2.length)};
1725
+ animation-play-state: ${PLAY_STATE};
1726
+ }
1727
+
1728
+ .ld-wave-bar-bottom {
1729
+ align-self: flex-end;
1730
+ }
1731
+
1732
+ @keyframes ld-wave-rise {
1733
+ 0%,
1734
+ 100% {
1735
+ height: 30%;
1736
+ }
1737
+ 50% {
1738
+ height: 100%;
1739
+ }
1740
+ }
1741
+
1742
+ @media (prefers-reduced-motion: reduce) {
1743
+ .ld-wave-bar {
1744
+ height: calc((0.4 + var(${STEP_VAR}) * 0.15) * 100%);
1745
+ animation: none;
1746
+ }
1747
+ }
1748
+ `;
1749
+ function Wave({ origin = DEFAULT_WAVE_ORIGIN, ...rest }) {
1750
+ return /* @__PURE__ */ jsxs29(Fragment29, { children: [
1751
+ /* @__PURE__ */ jsx30(SpinnerStyle, { name: "wave", children: css29 }),
1752
+ /* @__PURE__ */ jsx30("div", { ...spinnerRoot("wave", rest), children: BARS2.map((index) => /* @__PURE__ */ jsx30(
1753
+ "div",
1754
+ {
1755
+ className: `ld-wave-bar ld-wave-bar-${origin}`,
1756
+ style: step(index)
1757
+ },
1758
+ index
1759
+ )) })
1760
+ ] });
1761
+ }
1762
+
874
1763
  // src/spinners.ts
875
1764
  var SPINNERS = {
876
1765
  arc: Arc,
1766
+ atom: Atom,
1767
+ blocks: Blocks,
877
1768
  "bouncing-dots": BouncingDots,
1769
+ cascade: Cascade,
878
1770
  "circular-dots": CircularDots,
879
1771
  classic: Classic,
880
1772
  "classic-v2": ClassicV2,
881
1773
  clock: Clock,
882
1774
  comet: Comet,
883
1775
  compass: Compass,
1776
+ dual: Dual,
1777
+ eclipse: Eclipse,
1778
+ flip: Flip,
1779
+ gather: Gather,
1780
+ leap: Leap,
884
1781
  "linear-dots": LinearDots,
1782
+ loading: Loading,
1783
+ morph: Morph,
885
1784
  orbit: Orbit,
886
1785
  pulse: Pulse,
887
1786
  radar: Radar,
888
1787
  ring: Ring,
889
- swirl: Swirl
1788
+ ripple: Ripple,
1789
+ slide: Slide,
1790
+ snake: Snake,
1791
+ swirl: Swirl,
1792
+ trace: Trace,
1793
+ wave: Wave
890
1794
  };
891
1795
  export {
892
1796
  Arc,
1797
+ Atom,
1798
+ Blocks,
893
1799
  BouncingDots,
1800
+ Cascade,
894
1801
  CircularDots,
895
1802
  Classic,
896
1803
  ClassicV2,
897
1804
  Clock,
898
1805
  Comet,
899
1806
  Compass,
1807
+ DEFAULT_BLOCKS_SWEEP,
1808
+ DEFAULT_CAP,
1809
+ DEFAULT_EASING,
1810
+ DEFAULT_RIPPLE_DIRECTION,
1811
+ DEFAULT_WAVE_ORIGIN,
900
1812
  DURATION_VAR,
1813
+ Dual,
1814
+ Eclipse,
1815
+ Flip,
1816
+ Gather,
1817
+ Leap,
901
1818
  LinearDots,
1819
+ Loading,
1820
+ Morph,
902
1821
  Orbit,
903
1822
  PLAY_STATE_VAR,
904
1823
  Pulse,
905
1824
  Radar,
906
1825
  Ring,
1826
+ Ripple,
907
1827
  SPINNERS,
908
1828
  SPINNER_MOTION,
909
- Swirl
1829
+ Slide,
1830
+ Snake,
1831
+ Swirl,
1832
+ Trace,
1833
+ Wave
910
1834
  };