@sportswik/icons-react 1.3.0 → 1.4.0

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/animated.js CHANGED
@@ -680,10 +680,28 @@ var flip = (delay = 0) => ({
680
680
  rest: { scaleX: 1, transition: settleSpring },
681
681
  play: { scaleX: [1, 0, 1], transition: { ...gesture, delay } }
682
682
  });
683
- var globeSpin = () => ({
684
- rest: { scaleX: 1, transition: settleSpring },
685
- play: { scaleX: [1, -1, 1], transition: { ...gesture, duration: 0.5 } }
686
- });
683
+ var MERIDIAN_FRAMES = 32;
684
+ var meridianEase = (t) => 0.5 - Math.cos(Math.PI * t) / 2;
685
+ var round = (n) => String(Math.round(n * 1e3) / 1e3);
686
+ var pathOf = (strings, ...values) => strings.reduce((d, s, i) => d + s + (i < values.length ? round(values[i]) : ""), "");
687
+ var meridianTurn = (shape, rests, r, fixed = "") => {
688
+ const starts = rests.map((s0) => Math.asin(s0 / r));
689
+ const wraps = starts.map((start) => Math.acos(1 - 2 * (Math.PI / 2 - start) / Math.PI) / Math.PI);
690
+ const uniform = Array.from({ length: MERIDIAN_FRAMES + 1 }, (_, i) => i / MERIDIAN_FRAMES);
691
+ const times = [.../* @__PURE__ */ new Set([...uniform, ...wraps.flatMap((t) => [t, t + 1e-4])])].filter((t) => t <= 1).sort((a, b) => a - b);
692
+ const frame = (t) => [fixed, ...rests.map((s0, k) => {
693
+ if (t === wraps[k]) return shape(r);
694
+ if (t === wraps[k] + 1e-4) return shape(-r);
695
+ if (t === 0 || t === 1) return shape(s0);
696
+ let lon = starts[k] + Math.PI * meridianEase(t);
697
+ if (lon > Math.PI / 2) lon -= Math.PI;
698
+ return shape(r * Math.sin(lon));
699
+ })].filter(Boolean).join(" ");
700
+ return {
701
+ rest: { d: frame(0), transition: settleTween },
702
+ play: { d: times.map(frame), transition: { duration: 1.4, ease: "linear", times } }
703
+ };
704
+ };
687
705
  var burst = (dx2, dy, delay = 0) => ({
688
706
  rest: { x: 0, y: 0, opacity: 0, transition: settleTween },
689
707
  play: {
@@ -1830,8 +1848,12 @@ var Frown_default = Frown;
1830
1848
  // src/animated/Gem.tsx
1831
1849
  var import_react55 = require("motion/react");
1832
1850
  var import_jsx_runtime52 = require("react/jsx-runtime");
1833
- var spin = globeSpin();
1834
- var Gem = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
1851
+ var facet = (s) => {
1852
+ const w = Math.min(Math.max((Math.abs(s) - 4) / 6, 0), 1);
1853
+ return pathOf`M12 22L${12 + s} 9L${12 + s * (0.25 + 0.35 * w)} 3`;
1854
+ };
1855
+ var turn2 = meridianTurn(facet, [4, -4, 10], 10, "M22 9l-4-6H6L2 9 M22 9L12 22 M22 9H2 M12 22L2 9");
1856
+ var Gem = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
1835
1857
  AnimatedSvg,
1836
1858
  {
1837
1859
  stroke: "currentColor",
@@ -1839,10 +1861,10 @@ var Gem = (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
1839
1861
  strokeLinejoin: "round",
1840
1862
  strokeWidth: 1.8,
1841
1863
  ...props,
1842
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react55.motion.g, { variants: spin, children: [
1864
+ children: [
1843
1865
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Fill, { d: GemFillPath }),
1844
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M22 9l-4-6H6L2 9 M22 9L12 22 M22 9H2 M12 22L2 9 M12 22l4-13l-3-6 M12 22L8 9l3-6" })
1845
- ] })
1866
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react55.motion.path, { variants: turn2 })
1867
+ ]
1846
1868
  }
1847
1869
  );
1848
1870
  var Gem_default = Gem;
@@ -1915,8 +1937,17 @@ var GenderMix_default = GenderMix;
1915
1937
  // src/animated/Globe.tsx
1916
1938
  var import_react59 = require("motion/react");
1917
1939
  var import_jsx_runtime56 = require("react/jsx-runtime");
1918
- var spin2 = globeSpin();
1919
- var Globe = (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
1940
+ var meridian = (s) => {
1941
+ const w = Math.min(Math.max((Math.abs(s) - 4) / 6, 0), 1);
1942
+ const mix = (arc2, ellipse) => arc2 + (ellipse - arc2) * w;
1943
+ const x1 = 12 + mix(0.6253, 0.5523) * s;
1944
+ const y1 = mix(19.2616, 22);
1945
+ const x22 = 12 + mix(0.9807, 1) * s;
1946
+ const y2 = mix(15.708, 17.523);
1947
+ return pathOf`M12 22C${x1} ${y1} ${x22} ${y2} ${12 + s} 12C${x22} ${24 - y2} ${x1} ${24 - y1} 12 2`;
1948
+ };
1949
+ var turn3 = meridianTurn(meridian, [4, -4, 10], 10, "M22 12c0 5.523-4.477 10-10 10M22 12c0-5.523-4.477-10-10-10M22 12H2M12 22C6.477 22 2 17.523 2 12M2 12C2 6.477 6.477 2 12 2");
1950
+ var Globe = (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
1920
1951
  AnimatedSvg,
1921
1952
  {
1922
1953
  stroke: "currentColor",
@@ -1924,15 +1955,10 @@ var Globe = (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
1924
1955
  strokeLinejoin: "round",
1925
1956
  strokeWidth: 1.8,
1926
1957
  ...props,
1927
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react59.motion.g, { variants: spin2, children: [
1958
+ children: [
1928
1959
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Fill, { d: GlobeFillPath }),
1929
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
1930
- "path",
1931
- {
1932
- d: "M22 12c0 5.523-4.477 10-10 10M22 12c0-5.523-4.477-10-10-10M22 12H2M12 22C6.477 22 2 17.523 2 12M12 22a15.3 15.3 0 0 0 4-10a15.3 15.3 0 0 0-4-10M12 22a15.3 15.3 0 0 1-4-10a15.3 15.3 0 0 1 4-10M2 12C2 6.477 6.477 2 12 2"
1933
- }
1934
- )
1935
- ] })
1960
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react59.motion.path, { variants: turn3 })
1961
+ ]
1936
1962
  }
1937
1963
  );
1938
1964
  var Globe_default = Globe;
@@ -5098,7 +5124,7 @@ var Referee_default = Referee;
5098
5124
  // src/animated/RefreshCcw.tsx
5099
5125
  var import_react199 = require("motion/react");
5100
5126
  var import_jsx_runtime196 = require("react/jsx-runtime");
5101
- var spin3 = spinOnce(-1);
5127
+ var spin = spinOnce(-1);
5102
5128
  var RefreshCcw = (props) => /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
5103
5129
  AnimatedSvg,
5104
5130
  {
@@ -5107,7 +5133,7 @@ var RefreshCcw = (props) => /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
5107
5133
  strokeLinejoin: "round",
5108
5134
  strokeWidth: 1.8,
5109
5135
  ...props,
5110
- children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_react199.motion.g, { variants: spin3, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("path", { d: "M21 22v-6M21 16h-6M21 16l-3 2.7A9 9 0 0 1 3 12M3 2v6M3 8h6M3 8l3-2.7A9 9 0 0 1 21 12" }) })
5136
+ children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_react199.motion.g, { variants: spin, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("path", { d: "M21 22v-6M21 16h-6M21 16l-3 2.7A9 9 0 0 1 3 12M3 2v6M3 8h6M3 8l3-2.7A9 9 0 0 1 21 12" }) })
5111
5137
  }
5112
5138
  );
5113
5139
  var RefreshCcw_default = RefreshCcw;
@@ -5115,7 +5141,7 @@ var RefreshCcw_default = RefreshCcw;
5115
5141
  // src/animated/RefreshCw.tsx
5116
5142
  var import_react200 = require("motion/react");
5117
5143
  var import_jsx_runtime197 = require("react/jsx-runtime");
5118
- var spin4 = spinOnce(1);
5144
+ var spin2 = spinOnce(1);
5119
5145
  var RefreshCw = (props) => /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
5120
5146
  AnimatedSvg,
5121
5147
  {
@@ -5124,7 +5150,7 @@ var RefreshCw = (props) => /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
5124
5150
  strokeLinejoin: "round",
5125
5151
  strokeWidth: 1.8,
5126
5152
  ...props,
5127
- children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_react200.motion.g, { variants: spin4, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("path", { d: "M3 22v-6M3 16h6M3 16l3 2.7A9 9 0 0 0 21 12M21 2v6M21 8h-6M21 8l-3-2.7A9 9 0 0 0 3 12" }) })
5153
+ children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_react200.motion.g, { variants: spin2, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("path", { d: "M3 22v-6M3 16h6M3 16l3 2.7A9 9 0 0 0 21 12M21 2v6M21 8h-6M21 8l-3-2.7A9 9 0 0 0 3 12" }) })
5128
5154
  }
5129
5155
  );
5130
5156
  var RefreshCw_default = RefreshCw;
package/dist/animated.mjs CHANGED
@@ -311,10 +311,28 @@ var flip = (delay = 0) => ({
311
311
  rest: { scaleX: 1, transition: settleSpring },
312
312
  play: { scaleX: [1, 0, 1], transition: { ...gesture, delay } }
313
313
  });
314
- var globeSpin = () => ({
315
- rest: { scaleX: 1, transition: settleSpring },
316
- play: { scaleX: [1, -1, 1], transition: { ...gesture, duration: 0.5 } }
317
- });
314
+ var MERIDIAN_FRAMES = 32;
315
+ var meridianEase = (t) => 0.5 - Math.cos(Math.PI * t) / 2;
316
+ var round = (n) => String(Math.round(n * 1e3) / 1e3);
317
+ var pathOf = (strings, ...values) => strings.reduce((d, s, i) => d + s + (i < values.length ? round(values[i]) : ""), "");
318
+ var meridianTurn = (shape, rests, r, fixed = "") => {
319
+ const starts = rests.map((s0) => Math.asin(s0 / r));
320
+ const wraps = starts.map((start) => Math.acos(1 - 2 * (Math.PI / 2 - start) / Math.PI) / Math.PI);
321
+ const uniform = Array.from({ length: MERIDIAN_FRAMES + 1 }, (_, i) => i / MERIDIAN_FRAMES);
322
+ const times = [.../* @__PURE__ */ new Set([...uniform, ...wraps.flatMap((t) => [t, t + 1e-4])])].filter((t) => t <= 1).sort((a, b) => a - b);
323
+ const frame = (t) => [fixed, ...rests.map((s0, k) => {
324
+ if (t === wraps[k]) return shape(r);
325
+ if (t === wraps[k] + 1e-4) return shape(-r);
326
+ if (t === 0 || t === 1) return shape(s0);
327
+ let lon = starts[k] + Math.PI * meridianEase(t);
328
+ if (lon > Math.PI / 2) lon -= Math.PI;
329
+ return shape(r * Math.sin(lon));
330
+ })].filter(Boolean).join(" ");
331
+ return {
332
+ rest: { d: frame(0), transition: settleTween },
333
+ play: { d: times.map(frame), transition: { duration: 1.4, ease: "linear", times } }
334
+ };
335
+ };
318
336
  var burst = (dx2, dy, delay = 0) => ({
319
337
  rest: { x: 0, y: 0, opacity: 0, transition: settleTween },
320
338
  play: {
@@ -1461,8 +1479,12 @@ var Frown_default = Frown;
1461
1479
  // src/animated/Gem.tsx
1462
1480
  import { motion as motion52 } from "motion/react";
1463
1481
  import { jsx as jsx52, jsxs as jsxs50 } from "react/jsx-runtime";
1464
- var spin = globeSpin();
1465
- var Gem = (props) => /* @__PURE__ */ jsx52(
1482
+ var facet = (s) => {
1483
+ const w = Math.min(Math.max((Math.abs(s) - 4) / 6, 0), 1);
1484
+ return pathOf`M12 22L${12 + s} 9L${12 + s * (0.25 + 0.35 * w)} 3`;
1485
+ };
1486
+ var turn2 = meridianTurn(facet, [4, -4, 10], 10, "M22 9l-4-6H6L2 9 M22 9L12 22 M22 9H2 M12 22L2 9");
1487
+ var Gem = (props) => /* @__PURE__ */ jsxs50(
1466
1488
  AnimatedSvg,
1467
1489
  {
1468
1490
  stroke: "currentColor",
@@ -1470,10 +1492,10 @@ var Gem = (props) => /* @__PURE__ */ jsx52(
1470
1492
  strokeLinejoin: "round",
1471
1493
  strokeWidth: 1.8,
1472
1494
  ...props,
1473
- children: /* @__PURE__ */ jsxs50(motion52.g, { variants: spin, children: [
1495
+ children: [
1474
1496
  /* @__PURE__ */ jsx52(Fill, { d: GemFillPath }),
1475
- /* @__PURE__ */ jsx52("path", { d: "M22 9l-4-6H6L2 9 M22 9L12 22 M22 9H2 M12 22L2 9 M12 22l4-13l-3-6 M12 22L8 9l3-6" })
1476
- ] })
1497
+ /* @__PURE__ */ jsx52(motion52.path, { variants: turn2 })
1498
+ ]
1477
1499
  }
1478
1500
  );
1479
1501
  var Gem_default = Gem;
@@ -1546,8 +1568,17 @@ var GenderMix_default = GenderMix;
1546
1568
  // src/animated/Globe.tsx
1547
1569
  import { motion as motion56 } from "motion/react";
1548
1570
  import { jsx as jsx56, jsxs as jsxs54 } from "react/jsx-runtime";
1549
- var spin2 = globeSpin();
1550
- var Globe = (props) => /* @__PURE__ */ jsx56(
1571
+ var meridian = (s) => {
1572
+ const w = Math.min(Math.max((Math.abs(s) - 4) / 6, 0), 1);
1573
+ const mix = (arc2, ellipse) => arc2 + (ellipse - arc2) * w;
1574
+ const x1 = 12 + mix(0.6253, 0.5523) * s;
1575
+ const y1 = mix(19.2616, 22);
1576
+ const x22 = 12 + mix(0.9807, 1) * s;
1577
+ const y2 = mix(15.708, 17.523);
1578
+ return pathOf`M12 22C${x1} ${y1} ${x22} ${y2} ${12 + s} 12C${x22} ${24 - y2} ${x1} ${24 - y1} 12 2`;
1579
+ };
1580
+ var turn3 = meridianTurn(meridian, [4, -4, 10], 10, "M22 12c0 5.523-4.477 10-10 10M22 12c0-5.523-4.477-10-10-10M22 12H2M12 22C6.477 22 2 17.523 2 12M2 12C2 6.477 6.477 2 12 2");
1581
+ var Globe = (props) => /* @__PURE__ */ jsxs54(
1551
1582
  AnimatedSvg,
1552
1583
  {
1553
1584
  stroke: "currentColor",
@@ -1555,15 +1586,10 @@ var Globe = (props) => /* @__PURE__ */ jsx56(
1555
1586
  strokeLinejoin: "round",
1556
1587
  strokeWidth: 1.8,
1557
1588
  ...props,
1558
- children: /* @__PURE__ */ jsxs54(motion56.g, { variants: spin2, children: [
1589
+ children: [
1559
1590
  /* @__PURE__ */ jsx56(Fill, { d: GlobeFillPath }),
1560
- /* @__PURE__ */ jsx56(
1561
- "path",
1562
- {
1563
- d: "M22 12c0 5.523-4.477 10-10 10M22 12c0-5.523-4.477-10-10-10M22 12H2M12 22C6.477 22 2 17.523 2 12M12 22a15.3 15.3 0 0 0 4-10a15.3 15.3 0 0 0-4-10M12 22a15.3 15.3 0 0 1-4-10a15.3 15.3 0 0 1 4-10M2 12C2 6.477 6.477 2 12 2"
1564
- }
1565
- )
1566
- ] })
1591
+ /* @__PURE__ */ jsx56(motion56.path, { variants: turn3 })
1592
+ ]
1567
1593
  }
1568
1594
  );
1569
1595
  var Globe_default = Globe;
@@ -4729,7 +4755,7 @@ var Referee_default = Referee;
4729
4755
  // src/animated/RefreshCcw.tsx
4730
4756
  import { motion as motion196 } from "motion/react";
4731
4757
  import { jsx as jsx196 } from "react/jsx-runtime";
4732
- var spin3 = spinOnce(-1);
4758
+ var spin = spinOnce(-1);
4733
4759
  var RefreshCcw = (props) => /* @__PURE__ */ jsx196(
4734
4760
  AnimatedSvg,
4735
4761
  {
@@ -4738,7 +4764,7 @@ var RefreshCcw = (props) => /* @__PURE__ */ jsx196(
4738
4764
  strokeLinejoin: "round",
4739
4765
  strokeWidth: 1.8,
4740
4766
  ...props,
4741
- children: /* @__PURE__ */ jsx196(motion196.g, { variants: spin3, children: /* @__PURE__ */ jsx196("path", { d: "M21 22v-6M21 16h-6M21 16l-3 2.7A9 9 0 0 1 3 12M3 2v6M3 8h6M3 8l3-2.7A9 9 0 0 1 21 12" }) })
4767
+ children: /* @__PURE__ */ jsx196(motion196.g, { variants: spin, children: /* @__PURE__ */ jsx196("path", { d: "M21 22v-6M21 16h-6M21 16l-3 2.7A9 9 0 0 1 3 12M3 2v6M3 8h6M3 8l3-2.7A9 9 0 0 1 21 12" }) })
4742
4768
  }
4743
4769
  );
4744
4770
  var RefreshCcw_default = RefreshCcw;
@@ -4746,7 +4772,7 @@ var RefreshCcw_default = RefreshCcw;
4746
4772
  // src/animated/RefreshCw.tsx
4747
4773
  import { motion as motion197 } from "motion/react";
4748
4774
  import { jsx as jsx197 } from "react/jsx-runtime";
4749
- var spin4 = spinOnce(1);
4775
+ var spin2 = spinOnce(1);
4750
4776
  var RefreshCw = (props) => /* @__PURE__ */ jsx197(
4751
4777
  AnimatedSvg,
4752
4778
  {
@@ -4755,7 +4781,7 @@ var RefreshCw = (props) => /* @__PURE__ */ jsx197(
4755
4781
  strokeLinejoin: "round",
4756
4782
  strokeWidth: 1.8,
4757
4783
  ...props,
4758
- children: /* @__PURE__ */ jsx197(motion197.g, { variants: spin4, children: /* @__PURE__ */ jsx197("path", { d: "M3 22v-6M3 16h6M3 16l3 2.7A9 9 0 0 0 21 12M21 2v6M21 8h-6M21 8l-3-2.7A9 9 0 0 0 3 12" }) })
4784
+ children: /* @__PURE__ */ jsx197(motion197.g, { variants: spin2, children: /* @__PURE__ */ jsx197("path", { d: "M3 22v-6M3 16h6M3 16l3 2.7A9 9 0 0 0 21 12M21 2v6M21 8h-6M21 8l-3-2.7A9 9 0 0 0 3 12" }) })
4759
4785
  }
4760
4786
  );
4761
4787
  var RefreshCw_default = RefreshCw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportswik/icons-react",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "private": false,
5
5
  "description": "Sportswik icon components for React",
6
6
  "main": "dist/index.js",