@tamagui/react-native-svg 2.4.6 → 2.5.1
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/.turbo/turbo-build.log +1 -1
- package/dist/cjs/index.cjs +39 -100
- package/dist/esm/index.js +39 -100
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +39 -100
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +7 -2
- package/src/index.js +39 -31
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ tamagui-build
|
|
2
|
-
built @tamagui/react-native-svg in
|
|
2
|
+
built @tamagui/react-native-svg in 251 ms
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -51,104 +51,43 @@ __export(index_exports, {
|
|
|
51
51
|
});
|
|
52
52
|
module.exports = __toCommonJS(index_exports);
|
|
53
53
|
var import_react = require("react");
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}));
|
|
94
|
-
const Mask = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("mask", {
|
|
95
|
-
...p,
|
|
96
|
-
ref
|
|
97
|
-
}));
|
|
98
|
-
const Path = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("path", {
|
|
99
|
-
...p,
|
|
100
|
-
ref
|
|
101
|
-
}));
|
|
102
|
-
const Pattern = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("pattern", {
|
|
103
|
-
...p,
|
|
104
|
-
ref
|
|
105
|
-
}));
|
|
106
|
-
const Polygon = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("polygon", {
|
|
107
|
-
...p,
|
|
108
|
-
ref
|
|
109
|
-
}));
|
|
110
|
-
const Polyline = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("polyline", {
|
|
111
|
-
...p,
|
|
112
|
-
ref
|
|
113
|
-
}));
|
|
114
|
-
const RadialGradient = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("radialGradient", {
|
|
115
|
-
...p,
|
|
116
|
-
ref
|
|
117
|
-
}));
|
|
118
|
-
const Rect = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("rect", {
|
|
119
|
-
...p,
|
|
120
|
-
ref
|
|
121
|
-
}));
|
|
122
|
-
const Shape = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("shape", {
|
|
123
|
-
...p,
|
|
124
|
-
ref
|
|
125
|
-
}));
|
|
126
|
-
const Stop = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("stop", {
|
|
127
|
-
...p,
|
|
128
|
-
ref
|
|
129
|
-
}));
|
|
130
|
-
const Svg = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("svg", {
|
|
131
|
-
...p,
|
|
132
|
-
ref
|
|
133
|
-
}));
|
|
134
|
-
const Symbol2 = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("symbol", {
|
|
135
|
-
...p,
|
|
136
|
-
ref
|
|
137
|
-
}));
|
|
138
|
-
const Text = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("text", {
|
|
139
|
-
...p,
|
|
140
|
-
ref
|
|
141
|
-
}));
|
|
142
|
-
const TextPath = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("clipPath", {
|
|
143
|
-
...p,
|
|
144
|
-
ref
|
|
145
|
-
}));
|
|
146
|
-
const TSpan = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("tSpan", {
|
|
147
|
-
...p,
|
|
148
|
-
ref
|
|
149
|
-
}));
|
|
150
|
-
const Use = (0, import_react.forwardRef)((p, ref) => (0, import_react.createElement)("use", {
|
|
151
|
-
...p,
|
|
152
|
-
ref
|
|
153
|
-
}));
|
|
54
|
+
const toDOMProps = props => {
|
|
55
|
+
const {
|
|
56
|
+
testID,
|
|
57
|
+
accessibilityLabel,
|
|
58
|
+
...rest
|
|
59
|
+
} = props;
|
|
60
|
+
if (testID !== void 0) rest["data-testid"] = testID;
|
|
61
|
+
if (accessibilityLabel !== void 0) rest["aria-label"] = accessibilityLabel;
|
|
62
|
+
return rest;
|
|
63
|
+
};
|
|
64
|
+
const svgElement = tag => (0, import_react.forwardRef)((props, ref) => (0, import_react.createElement)(tag, {
|
|
65
|
+
...toDOMProps(props),
|
|
66
|
+
ref
|
|
67
|
+
}));
|
|
68
|
+
const Circle = svgElement("circle");
|
|
69
|
+
const ClipPath = svgElement("clipPath");
|
|
70
|
+
const Defs = svgElement("defs");
|
|
71
|
+
const Ellipse = svgElement("ellipse");
|
|
72
|
+
const ForeignObject = svgElement("foreignObject");
|
|
73
|
+
const G = svgElement("g");
|
|
74
|
+
const Image = svgElement("image");
|
|
75
|
+
const Line = svgElement("line");
|
|
76
|
+
const LinearGradient = svgElement("linearGradient");
|
|
77
|
+
const Marker = svgElement("marker");
|
|
78
|
+
const Mask = svgElement("mask");
|
|
79
|
+
const Path = svgElement("path");
|
|
80
|
+
const Pattern = svgElement("pattern");
|
|
81
|
+
const Polygon = svgElement("polygon");
|
|
82
|
+
const Polyline = svgElement("polyline");
|
|
83
|
+
const RadialGradient = svgElement("radialGradient");
|
|
84
|
+
const Rect = svgElement("rect");
|
|
85
|
+
const Shape = svgElement("shape");
|
|
86
|
+
const Stop = svgElement("stop");
|
|
87
|
+
const Svg = svgElement("svg");
|
|
88
|
+
const Symbol2 = svgElement("symbol");
|
|
89
|
+
const Text = svgElement("text");
|
|
90
|
+
const TextPath = svgElement("clipPath");
|
|
91
|
+
const TSpan = svgElement("tSpan");
|
|
92
|
+
const Use = svgElement("use");
|
|
154
93
|
var index_default = Svg;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,104 +1,43 @@
|
|
|
1
1
|
import { createElement, forwardRef } from "react";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}));
|
|
42
|
-
const Mask = forwardRef((p, ref) => createElement("mask", {
|
|
43
|
-
...p,
|
|
44
|
-
ref
|
|
45
|
-
}));
|
|
46
|
-
const Path = forwardRef((p, ref) => createElement("path", {
|
|
47
|
-
...p,
|
|
48
|
-
ref
|
|
49
|
-
}));
|
|
50
|
-
const Pattern = forwardRef((p, ref) => createElement("pattern", {
|
|
51
|
-
...p,
|
|
52
|
-
ref
|
|
53
|
-
}));
|
|
54
|
-
const Polygon = forwardRef((p, ref) => createElement("polygon", {
|
|
55
|
-
...p,
|
|
56
|
-
ref
|
|
57
|
-
}));
|
|
58
|
-
const Polyline = forwardRef((p, ref) => createElement("polyline", {
|
|
59
|
-
...p,
|
|
60
|
-
ref
|
|
61
|
-
}));
|
|
62
|
-
const RadialGradient = forwardRef((p, ref) => createElement("radialGradient", {
|
|
63
|
-
...p,
|
|
64
|
-
ref
|
|
65
|
-
}));
|
|
66
|
-
const Rect = forwardRef((p, ref) => createElement("rect", {
|
|
67
|
-
...p,
|
|
68
|
-
ref
|
|
69
|
-
}));
|
|
70
|
-
const Shape = forwardRef((p, ref) => createElement("shape", {
|
|
71
|
-
...p,
|
|
72
|
-
ref
|
|
73
|
-
}));
|
|
74
|
-
const Stop = forwardRef((p, ref) => createElement("stop", {
|
|
75
|
-
...p,
|
|
76
|
-
ref
|
|
77
|
-
}));
|
|
78
|
-
const Svg = forwardRef((p, ref) => createElement("svg", {
|
|
79
|
-
...p,
|
|
80
|
-
ref
|
|
81
|
-
}));
|
|
82
|
-
const Symbol = forwardRef((p, ref) => createElement("symbol", {
|
|
83
|
-
...p,
|
|
84
|
-
ref
|
|
85
|
-
}));
|
|
86
|
-
const Text = forwardRef((p, ref) => createElement("text", {
|
|
87
|
-
...p,
|
|
88
|
-
ref
|
|
89
|
-
}));
|
|
90
|
-
const TextPath = forwardRef((p, ref) => createElement("clipPath", {
|
|
91
|
-
...p,
|
|
92
|
-
ref
|
|
93
|
-
}));
|
|
94
|
-
const TSpan = forwardRef((p, ref) => createElement("tSpan", {
|
|
95
|
-
...p,
|
|
96
|
-
ref
|
|
97
|
-
}));
|
|
98
|
-
const Use = forwardRef((p, ref) => createElement("use", {
|
|
99
|
-
...p,
|
|
100
|
-
ref
|
|
101
|
-
}));
|
|
2
|
+
const toDOMProps = props => {
|
|
3
|
+
const {
|
|
4
|
+
testID,
|
|
5
|
+
accessibilityLabel,
|
|
6
|
+
...rest
|
|
7
|
+
} = props;
|
|
8
|
+
if (testID !== void 0) rest["data-testid"] = testID;
|
|
9
|
+
if (accessibilityLabel !== void 0) rest["aria-label"] = accessibilityLabel;
|
|
10
|
+
return rest;
|
|
11
|
+
};
|
|
12
|
+
const svgElement = tag => forwardRef((props, ref) => createElement(tag, {
|
|
13
|
+
...toDOMProps(props),
|
|
14
|
+
ref
|
|
15
|
+
}));
|
|
16
|
+
const Circle = svgElement("circle");
|
|
17
|
+
const ClipPath = svgElement("clipPath");
|
|
18
|
+
const Defs = svgElement("defs");
|
|
19
|
+
const Ellipse = svgElement("ellipse");
|
|
20
|
+
const ForeignObject = svgElement("foreignObject");
|
|
21
|
+
const G = svgElement("g");
|
|
22
|
+
const Image = svgElement("image");
|
|
23
|
+
const Line = svgElement("line");
|
|
24
|
+
const LinearGradient = svgElement("linearGradient");
|
|
25
|
+
const Marker = svgElement("marker");
|
|
26
|
+
const Mask = svgElement("mask");
|
|
27
|
+
const Path = svgElement("path");
|
|
28
|
+
const Pattern = svgElement("pattern");
|
|
29
|
+
const Polygon = svgElement("polygon");
|
|
30
|
+
const Polyline = svgElement("polyline");
|
|
31
|
+
const RadialGradient = svgElement("radialGradient");
|
|
32
|
+
const Rect = svgElement("rect");
|
|
33
|
+
const Shape = svgElement("shape");
|
|
34
|
+
const Stop = svgElement("stop");
|
|
35
|
+
const Svg = svgElement("svg");
|
|
36
|
+
const Symbol = svgElement("symbol");
|
|
37
|
+
const Text = svgElement("text");
|
|
38
|
+
const TextPath = svgElement("clipPath");
|
|
39
|
+
const TSpan = svgElement("tSpan");
|
|
40
|
+
const Use = svgElement("use");
|
|
102
41
|
var index_default = Svg;
|
|
103
42
|
export { Circle, ClipPath, Defs, Ellipse, ForeignObject, G, Image, Line, LinearGradient, Marker, Mask, Path, Pattern, Polygon, Polyline, RadialGradient, Rect, Shape, Stop, Svg, Symbol, TSpan, Text, TextPath, Use, index_default as default };
|
|
104
43
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createElement","forwardRef","
|
|
1
|
+
{"version":3,"names":["createElement","forwardRef","toDOMProps","props","testID","accessibilityLabel","rest","svgElement","tag","ref","Circle","ClipPath","Defs","Ellipse","ForeignObject","G","Image","Line","LinearGradient","Marker","Mask","Path","Pattern","Polygon","Polyline","RadialGradient","Rect","Shape","Stop","Svg","Symbol","Text","TextPath","TSpan","Use","index_default"],"sources":["../../src/index.js"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,EAAeC,UAAA,QAAkB;AAM1C,MAAMC,UAAA,GAAcC,KAAA,IAAU;EAC5B,MAAM;IAAEC,MAAA;IAAQC,kBAAA;IAAoB,GAAGC;EAAK,IAAIH,KAAA;EAChD,IAAIC,MAAA,KAAW,QAAWE,IAAA,CAAK,aAAa,IAAIF,MAAA;EAChD,IAAIC,kBAAA,KAAuB,QAAWC,IAAA,CAAK,YAAY,IAAID,kBAAA;EAC3D,OAAOC,IAAA;AACT;AAEA,MAAMC,UAAA,GAAcC,GAAA,IAClBP,UAAA,CAAW,CAACE,KAAA,EAAOM,GAAA,KAAQT,aAAA,CAAcQ,GAAA,EAAK;EAAE,GAAGN,UAAA,CAAWC,KAAK;EAAGM;AAAI,CAAC,CAAC;AAEvE,MAAMC,MAAA,GAASH,UAAA,CAAW,QAAQ;AAClC,MAAMI,QAAA,GAAWJ,UAAA,CAAW,UAAU;AACtC,MAAMK,IAAA,GAAOL,UAAA,CAAW,MAAM;AAC9B,MAAMM,OAAA,GAAUN,UAAA,CAAW,SAAS;AACpC,MAAMO,aAAA,GAAgBP,UAAA,CAAW,eAAe;AAChD,MAAMQ,CAAA,GAAIR,UAAA,CAAW,GAAG;AACxB,MAAMS,KAAA,GAAQT,UAAA,CAAW,OAAO;AAChC,MAAMU,IAAA,GAAOV,UAAA,CAAW,MAAM;AAC9B,MAAMW,cAAA,GAAiBX,UAAA,CAAW,gBAAgB;AAClD,MAAMY,MAAA,GAASZ,UAAA,CAAW,QAAQ;AAClC,MAAMa,IAAA,GAAOb,UAAA,CAAW,MAAM;AAC9B,MAAMc,IAAA,GAAOd,UAAA,CAAW,MAAM;AAC9B,MAAMe,OAAA,GAAUf,UAAA,CAAW,SAAS;AACpC,MAAMgB,OAAA,GAAUhB,UAAA,CAAW,SAAS;AACpC,MAAMiB,QAAA,GAAWjB,UAAA,CAAW,UAAU;AACtC,MAAMkB,cAAA,GAAiBlB,UAAA,CAAW,gBAAgB;AAClD,MAAMmB,IAAA,GAAOnB,UAAA,CAAW,MAAM;AAC9B,MAAMoB,KAAA,GAAQpB,UAAA,CAAW,OAAO;AAChC,MAAMqB,IAAA,GAAOrB,UAAA,CAAW,MAAM;AAC9B,MAAMsB,GAAA,GAAMtB,UAAA,CAAW,KAAK;AAC5B,MAAMuB,MAAA,GAASvB,UAAA,CAAW,QAAQ;AAClC,MAAMwB,IAAA,GAAOxB,UAAA,CAAW,MAAM;AAC9B,MAAMyB,QAAA,GAAWzB,UAAA,CAAW,UAAU;AACtC,MAAM0B,KAAA,GAAQ1B,UAAA,CAAW,OAAO;AAChC,MAAM2B,GAAA,GAAM3B,UAAA,CAAW,KAAK;AAEnC,IAAO4B,aAAA,GAAQN,GAAA","ignoreList":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,104 +1,43 @@
|
|
|
1
1
|
import { createElement, forwardRef } from "react";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}));
|
|
42
|
-
const Mask = forwardRef((p, ref) => createElement("mask", {
|
|
43
|
-
...p,
|
|
44
|
-
ref
|
|
45
|
-
}));
|
|
46
|
-
const Path = forwardRef((p, ref) => createElement("path", {
|
|
47
|
-
...p,
|
|
48
|
-
ref
|
|
49
|
-
}));
|
|
50
|
-
const Pattern = forwardRef((p, ref) => createElement("pattern", {
|
|
51
|
-
...p,
|
|
52
|
-
ref
|
|
53
|
-
}));
|
|
54
|
-
const Polygon = forwardRef((p, ref) => createElement("polygon", {
|
|
55
|
-
...p,
|
|
56
|
-
ref
|
|
57
|
-
}));
|
|
58
|
-
const Polyline = forwardRef((p, ref) => createElement("polyline", {
|
|
59
|
-
...p,
|
|
60
|
-
ref
|
|
61
|
-
}));
|
|
62
|
-
const RadialGradient = forwardRef((p, ref) => createElement("radialGradient", {
|
|
63
|
-
...p,
|
|
64
|
-
ref
|
|
65
|
-
}));
|
|
66
|
-
const Rect = forwardRef((p, ref) => createElement("rect", {
|
|
67
|
-
...p,
|
|
68
|
-
ref
|
|
69
|
-
}));
|
|
70
|
-
const Shape = forwardRef((p, ref) => createElement("shape", {
|
|
71
|
-
...p,
|
|
72
|
-
ref
|
|
73
|
-
}));
|
|
74
|
-
const Stop = forwardRef((p, ref) => createElement("stop", {
|
|
75
|
-
...p,
|
|
76
|
-
ref
|
|
77
|
-
}));
|
|
78
|
-
const Svg = forwardRef((p, ref) => createElement("svg", {
|
|
79
|
-
...p,
|
|
80
|
-
ref
|
|
81
|
-
}));
|
|
82
|
-
const Symbol = forwardRef((p, ref) => createElement("symbol", {
|
|
83
|
-
...p,
|
|
84
|
-
ref
|
|
85
|
-
}));
|
|
86
|
-
const Text = forwardRef((p, ref) => createElement("text", {
|
|
87
|
-
...p,
|
|
88
|
-
ref
|
|
89
|
-
}));
|
|
90
|
-
const TextPath = forwardRef((p, ref) => createElement("clipPath", {
|
|
91
|
-
...p,
|
|
92
|
-
ref
|
|
93
|
-
}));
|
|
94
|
-
const TSpan = forwardRef((p, ref) => createElement("tSpan", {
|
|
95
|
-
...p,
|
|
96
|
-
ref
|
|
97
|
-
}));
|
|
98
|
-
const Use = forwardRef((p, ref) => createElement("use", {
|
|
99
|
-
...p,
|
|
100
|
-
ref
|
|
101
|
-
}));
|
|
2
|
+
const toDOMProps = props => {
|
|
3
|
+
const {
|
|
4
|
+
testID,
|
|
5
|
+
accessibilityLabel,
|
|
6
|
+
...rest
|
|
7
|
+
} = props;
|
|
8
|
+
if (testID !== void 0) rest["data-testid"] = testID;
|
|
9
|
+
if (accessibilityLabel !== void 0) rest["aria-label"] = accessibilityLabel;
|
|
10
|
+
return rest;
|
|
11
|
+
};
|
|
12
|
+
const svgElement = tag => forwardRef((props, ref) => createElement(tag, {
|
|
13
|
+
...toDOMProps(props),
|
|
14
|
+
ref
|
|
15
|
+
}));
|
|
16
|
+
const Circle = svgElement("circle");
|
|
17
|
+
const ClipPath = svgElement("clipPath");
|
|
18
|
+
const Defs = svgElement("defs");
|
|
19
|
+
const Ellipse = svgElement("ellipse");
|
|
20
|
+
const ForeignObject = svgElement("foreignObject");
|
|
21
|
+
const G = svgElement("g");
|
|
22
|
+
const Image = svgElement("image");
|
|
23
|
+
const Line = svgElement("line");
|
|
24
|
+
const LinearGradient = svgElement("linearGradient");
|
|
25
|
+
const Marker = svgElement("marker");
|
|
26
|
+
const Mask = svgElement("mask");
|
|
27
|
+
const Path = svgElement("path");
|
|
28
|
+
const Pattern = svgElement("pattern");
|
|
29
|
+
const Polygon = svgElement("polygon");
|
|
30
|
+
const Polyline = svgElement("polyline");
|
|
31
|
+
const RadialGradient = svgElement("radialGradient");
|
|
32
|
+
const Rect = svgElement("rect");
|
|
33
|
+
const Shape = svgElement("shape");
|
|
34
|
+
const Stop = svgElement("stop");
|
|
35
|
+
const Svg = svgElement("svg");
|
|
36
|
+
const Symbol = svgElement("symbol");
|
|
37
|
+
const Text = svgElement("text");
|
|
38
|
+
const TextPath = svgElement("clipPath");
|
|
39
|
+
const TSpan = svgElement("tSpan");
|
|
40
|
+
const Use = svgElement("use");
|
|
102
41
|
var index_default = Svg;
|
|
103
42
|
export { Circle, ClipPath, Defs, Ellipse, ForeignObject, G, Image, Line, LinearGradient, Marker, Mask, Path, Pattern, Polygon, Polyline, RadialGradient, Rect, Shape, Stop, Svg, Symbol, TSpan, Text, TextPath, Use, index_default as default };
|
|
104
43
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createElement","forwardRef","
|
|
1
|
+
{"version":3,"names":["createElement","forwardRef","toDOMProps","props","testID","accessibilityLabel","rest","svgElement","tag","ref","Circle","ClipPath","Defs","Ellipse","ForeignObject","G","Image","Line","LinearGradient","Marker","Mask","Path","Pattern","Polygon","Polyline","RadialGradient","Rect","Shape","Stop","Svg","Symbol","Text","TextPath","TSpan","Use","index_default"],"sources":["../../src/index.js"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,EAAeC,UAAA,QAAkB;AAM1C,MAAMC,UAAA,GAAcC,KAAA,IAAU;EAC5B,MAAM;IAAEC,MAAA;IAAQC,kBAAA;IAAoB,GAAGC;EAAK,IAAIH,KAAA;EAChD,IAAIC,MAAA,KAAW,QAAWE,IAAA,CAAK,aAAa,IAAIF,MAAA;EAChD,IAAIC,kBAAA,KAAuB,QAAWC,IAAA,CAAK,YAAY,IAAID,kBAAA;EAC3D,OAAOC,IAAA;AACT;AAEA,MAAMC,UAAA,GAAcC,GAAA,IAClBP,UAAA,CAAW,CAACE,KAAA,EAAOM,GAAA,KAAQT,aAAA,CAAcQ,GAAA,EAAK;EAAE,GAAGN,UAAA,CAAWC,KAAK;EAAGM;AAAI,CAAC,CAAC;AAEvE,MAAMC,MAAA,GAASH,UAAA,CAAW,QAAQ;AAClC,MAAMI,QAAA,GAAWJ,UAAA,CAAW,UAAU;AACtC,MAAMK,IAAA,GAAOL,UAAA,CAAW,MAAM;AAC9B,MAAMM,OAAA,GAAUN,UAAA,CAAW,SAAS;AACpC,MAAMO,aAAA,GAAgBP,UAAA,CAAW,eAAe;AAChD,MAAMQ,CAAA,GAAIR,UAAA,CAAW,GAAG;AACxB,MAAMS,KAAA,GAAQT,UAAA,CAAW,OAAO;AAChC,MAAMU,IAAA,GAAOV,UAAA,CAAW,MAAM;AAC9B,MAAMW,cAAA,GAAiBX,UAAA,CAAW,gBAAgB;AAClD,MAAMY,MAAA,GAASZ,UAAA,CAAW,QAAQ;AAClC,MAAMa,IAAA,GAAOb,UAAA,CAAW,MAAM;AAC9B,MAAMc,IAAA,GAAOd,UAAA,CAAW,MAAM;AAC9B,MAAMe,OAAA,GAAUf,UAAA,CAAW,SAAS;AACpC,MAAMgB,OAAA,GAAUhB,UAAA,CAAW,SAAS;AACpC,MAAMiB,QAAA,GAAWjB,UAAA,CAAW,UAAU;AACtC,MAAMkB,cAAA,GAAiBlB,UAAA,CAAW,gBAAgB;AAClD,MAAMmB,IAAA,GAAOnB,UAAA,CAAW,MAAM;AAC9B,MAAMoB,KAAA,GAAQpB,UAAA,CAAW,OAAO;AAChC,MAAMqB,IAAA,GAAOrB,UAAA,CAAW,MAAM;AAC9B,MAAMsB,GAAA,GAAMtB,UAAA,CAAW,KAAK;AAC5B,MAAMuB,MAAA,GAASvB,UAAA,CAAW,QAAQ;AAClC,MAAMwB,IAAA,GAAOxB,UAAA,CAAW,MAAM;AAC9B,MAAMyB,QAAA,GAAWzB,UAAA,CAAW,UAAU;AACtC,MAAM0B,KAAA,GAAQ1B,UAAA,CAAW,OAAO;AAChC,MAAM2B,GAAA,GAAM3B,UAAA,CAAW,KAAK;AAEnC,IAAO4B,aAAA,GAAQN,GAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/react-native-svg",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
"clean:build": "tamagui-build clean:build"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tamagui/build": "2.
|
|
28
|
+
"@tamagui/build": "2.5.1",
|
|
29
29
|
"react-native-svg": "15.15.3"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/tamagui/tamagui.git",
|
|
34
|
+
"directory": "code/packages/react-native-svg"
|
|
30
35
|
}
|
|
31
36
|
}
|
package/src/index.js
CHANGED
|
@@ -1,35 +1,43 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
)
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
3
|
+
// react-native props that have no DOM spelling. react-native-svg's own web
|
|
4
|
+
// build runs props through react-native-web's createDOMProps, which performs
|
|
5
|
+
// this translation; without it these land on the svg element verbatim and
|
|
6
|
+
// React warns ("React does not recognize the testID prop on a DOM element").
|
|
7
|
+
const toDOMProps = (props) => {
|
|
8
|
+
const { testID, accessibilityLabel, ...rest } = props
|
|
9
|
+
if (testID !== undefined) rest['data-testid'] = testID
|
|
10
|
+
if (accessibilityLabel !== undefined) rest['aria-label'] = accessibilityLabel
|
|
11
|
+
return rest
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const svgElement = (tag) =>
|
|
15
|
+
forwardRef((props, ref) => createElement(tag, { ...toDOMProps(props), ref }))
|
|
16
|
+
|
|
17
|
+
export const Circle = svgElement('circle')
|
|
18
|
+
export const ClipPath = svgElement('clipPath')
|
|
19
|
+
export const Defs = svgElement('defs')
|
|
20
|
+
export const Ellipse = svgElement('ellipse')
|
|
21
|
+
export const ForeignObject = svgElement('foreignObject')
|
|
22
|
+
export const G = svgElement('g')
|
|
23
|
+
export const Image = svgElement('image')
|
|
24
|
+
export const Line = svgElement('line')
|
|
25
|
+
export const LinearGradient = svgElement('linearGradient')
|
|
26
|
+
export const Marker = svgElement('marker')
|
|
27
|
+
export const Mask = svgElement('mask')
|
|
28
|
+
export const Path = svgElement('path')
|
|
29
|
+
export const Pattern = svgElement('pattern')
|
|
30
|
+
export const Polygon = svgElement('polygon')
|
|
31
|
+
export const Polyline = svgElement('polyline')
|
|
32
|
+
export const RadialGradient = svgElement('radialGradient')
|
|
33
|
+
export const Rect = svgElement('rect')
|
|
34
|
+
export const Shape = svgElement('shape')
|
|
35
|
+
export const Stop = svgElement('stop')
|
|
36
|
+
export const Svg = svgElement('svg')
|
|
37
|
+
export const Symbol = svgElement('symbol')
|
|
38
|
+
export const Text = svgElement('text')
|
|
39
|
+
export const TextPath = svgElement('clipPath')
|
|
40
|
+
export const TSpan = svgElement('tSpan')
|
|
41
|
+
export const Use = svgElement('use')
|
|
34
42
|
|
|
35
43
|
export default Svg
|