@thesvg/react 3.3.1 → 3.3.2

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/zod.js CHANGED
@@ -2,29 +2,12 @@
2
2
  // Auto-generated. Do not edit.
3
3
  // Variants: default, mono
4
4
 
5
- import { forwardRef, createElement, useId } from 'react';
5
+ import { forwardRef, createElement } from 'react';
6
6
 
7
- const _variants = {"default":{"viewBox":"0 0 256 203","fill":"currentColor","childNodes":[{"type":"defs","props":{},"children":[{"type":"filter","props":{"id":"a","width":"105.2%","height":"106.5%","x":"-2.2%","y":"-2.8%","filterUnits":"objectBoundingBox"},"children":[{"type":"feOffset","props":{"dx":"1","dy":"1","in":"SourceAlpha","result":"shadowOffsetOuter1"},"children":[]},{"type":"feGaussianBlur","props":{"in":"shadowOffsetOuter1","result":"shadowBlurOuter1","stdDeviation":"2"},"children":[]},{"type":"feColorMatrix","props":{"in":"shadowBlurOuter1","values":"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.36 0"},"children":[]}]},{"type":"path","props":{"id":"b","d":"M200.42 0H53.63L0 53.355l121.76 146.624 9.714-10.9L252 53.857 200.42 0Zm-5.362 12.562 39.84 41.6-112.8 126.558L17 54.162l41.815-41.6h136.243Z"},"children":[]}]},{"type":"path","props":{"fill":"#18253F","d":"M60.816 14.033h136.278l39.933 41.69-112.989 126.554L18.957 55.724z"},"children":[]},{"type":"path","props":{"fill":"#274D82","d":"M151.427 152.386H98.013l-24.124-29.534 68.364-.002.002-4.19h39.078z"},"children":[]},{"type":"path","props":{"fill":"#274D82","d":"m225.56 43.834-147.382 85.09-19.226-24.051 114.099-65.877-2.096-3.631 30.391-17.546zM146.596 14.075 35.93 77.968 18.719 56.483l74.095-42.78z"},"children":[]},{"type":"g","props":{"transform":"translate(2 1.51)"},"children":[{"type":"use","props":{"href":"#b","filter":"url(#a)"},"children":[]},{"type":"use","props":{"href":"#b","fill":"#3068B7"},"children":[]}]}]},"mono":{"viewBox":"0 0 24 24","fill":"currentColor","childNodes":[{"type":"title","props":{},"children":["Zod"]},{"type":"path","props":{"d":"M2.584 3.582a2.247 2.247 0 0 1 2.112-1.479h14.617c.948 0 1.794.595 2.115 1.487l2.44 6.777a2.248 2.248 0 0 1-.624 2.443l-9.61 8.52a2.247 2.247 0 0 1-2.963.018L.776 12.773a2.248 2.248 0 0 1-.64-2.467Zm12.038 4.887-9.11 5.537 5.74 5.007c.456.399 1.139.396 1.593-.006l5.643-5.001H14.4l6.239-3.957c.488-.328.69-.947.491-1.5l-1.24-3.446a1.535 1.535 0 0 0-1.456-1.015H5.545a1.535 1.535 0 0 0-1.431 1.01l-1.228 3.37z"},"children":[]}]}};
8
-
9
- function _ns(props, p) {
10
- var out = {};
11
- for (var k in props) {
12
- var v = props[k];
13
- if (k === 'id') out[k] = p + v;
14
- else if (k === 'href' && typeof v === 'string' && v.charCodeAt(0) === 35) out[k] = '#' + p + v.slice(1);
15
- else if (typeof v === 'string') out[k] = v.replace(/url\(#([^)]+)\)/g, function (_m, id) { return 'url(#' + p + id + ')'; });
16
- else if (v && typeof v === 'object') {
17
- var s = {};
18
- for (var sk in v) { var sv = v[sk]; s[sk] = typeof sv === 'string' ? sv.replace(/url\(#([^)]+)\)/g, function (_m, id) { return 'url(#' + p + id + ')'; }) : sv; }
19
- out[k] = s;
20
- } else out[k] = v;
21
- }
22
- return out;
23
- }
7
+ const _variants = {"default":{"viewBox":"0 0 24 24","fill":"#408AFF","childNodes":[{"type":"path","props":{"d":"M2.584 3.582a2.25 2.25 0 0 1 2.112-1.479h14.617c.948 0 1.794.595 2.115 1.487l2.44 6.777a2.25 2.25 0 0 1-.624 2.443l-9.61 8.52a2.25 2.25 0 0 1-2.963.018L.776 12.773a2.25 2.25 0 0 1-.64-2.467Zm12.038 4.887-9.11 5.537 5.74 5.007a1.206 1.206 0 0 0 1.593-.006l5.643-5.001H14.4l6.239-3.957c.488-.328.69-.947.491-1.5l-1.24-3.446a1.535 1.535 0 0 0-1.456-1.015H5.545a1.535 1.535 0 0 0-1.431 1.01l-1.228 3.37z"},"children":[]}]},"mono":{"viewBox":"0 0 24 24","fill":"currentColor","childNodes":[{"type":"title","props":{},"children":["Zod"]},{"type":"path","props":{"d":"M2.584 3.582a2.247 2.247 0 0 1 2.112-1.479h14.617c.948 0 1.794.595 2.115 1.487l2.44 6.777a2.248 2.248 0 0 1-.624 2.443l-9.61 8.52a2.247 2.247 0 0 1-2.963.018L.776 12.773a2.248 2.248 0 0 1-.64-2.467Zm12.038 4.887-9.11 5.537 5.74 5.007c.456.399 1.139.396 1.593-.006l5.643-5.001H14.4l6.239-3.957c.488-.328.69-.947.491-1.5l-1.24-3.446a1.535 1.535 0 0 0-1.456-1.015H5.545a1.535 1.535 0 0 0-1.431 1.01l-1.228 3.37z"},"children":[]}]}};
24
8
 
25
9
  const Zod = forwardRef(
26
10
  function Zod({ variant = 'default', viewBox, ...props }, ref) {
27
- const _p = 'tsvg' + useId().replace(/[^a-zA-Z0-9]/g, '') + '-';
28
11
  const _v = _variants[variant] || _variants.default;
29
12
  return createElement(
30
13
  'svg',
@@ -32,7 +15,7 @@ const Zod = forwardRef(
32
15
  ..._v.childNodes
33
16
  .map(function _c(el) {
34
17
  if (typeof el === 'string') return el;
35
- return createElement(el.type, _ns(el.props, _p), ...(el.children || []).map(_c));
18
+ return createElement(el.type, el.props, ...(el.children || []).map(_c));
36
19
  })
37
20
  );
38
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thesvg/react",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Typed React SVG components for all 6,500+ brand icons from thesvg.org",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/react": "^19.2.18",
54
- "tsx": "^4.23.10",
54
+ "tsx": "^4.23.12",
55
55
  "typescript": "^6.0.3"
56
56
  },
57
57
  "engines": {