@react-native-ohos/react-native-svg 15.12.1-rc.15 → 15.12.1-rc.16
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/harmony/svg/oh-package.json5 +1 -1
- package/harmony/svg/src/main/cpp/SvgQuote.h +30 -0
- package/harmony/svg.har +0 -0
- package/lib/commonjs/css/index.js +54 -54
- package/lib/commonjs/css/index.js.map +1 -1
- package/lib/commonjs/index.js +25 -25
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/css/index.js +3 -3
- package/lib/module/css/index.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/package.json +3 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
name: '@react-native-ohos/react-native-svg',
|
|
7
7
|
type: 'module',
|
|
8
8
|
main: 'index.ets',
|
|
9
|
-
version: '15.12.1-rc.
|
|
9
|
+
version: '15.12.1-rc.16',
|
|
10
10
|
dependencies: {
|
|
11
11
|
"@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/harmony/react_native_openharmony.har"
|
|
12
12
|
},
|
|
@@ -36,6 +36,11 @@ public:
|
|
|
36
36
|
DLOG(INFO) << "[SvgQuote] getClipPath";
|
|
37
37
|
for (const auto &child : children_) {
|
|
38
38
|
auto childPath = child->AsPath();
|
|
39
|
+
// Apply child's transform to the path (use child's scale for correct transformation)
|
|
40
|
+
const auto &transform = child->GetBaseAttributes().transform;
|
|
41
|
+
double childScale = child->GetScale();
|
|
42
|
+
DLOG(INFO) << "[SvgQuote] child transform size: " << transform.size() << ", childScale: " << childScale;
|
|
43
|
+
applyTransformToPath(childPath, transform, childScale);
|
|
39
44
|
path.AddPath(childPath);
|
|
40
45
|
}
|
|
41
46
|
return path;
|
|
@@ -45,11 +50,36 @@ public:
|
|
|
45
50
|
DLOG(INFO) << "[SvgQuote] getClipPath with op, op = " << op;
|
|
46
51
|
for (const auto &child : children_) {
|
|
47
52
|
auto childPath = child->AsPath();
|
|
53
|
+
// Apply child's transform to the path (use child's scale for correct transformation)
|
|
54
|
+
const auto &transform = child->GetBaseAttributes().transform;
|
|
55
|
+
double childScale = child->GetScale();
|
|
56
|
+
DLOG(INFO) << "[SvgQuote] child transform size: " << transform.size() << ", childScale: " << childScale;
|
|
57
|
+
applyTransformToPath(childPath, transform, childScale);
|
|
48
58
|
path.Op(childPath, op);
|
|
49
59
|
}
|
|
50
60
|
return path;
|
|
51
61
|
}
|
|
52
62
|
|
|
63
|
+
private:
|
|
64
|
+
void applyTransformToPath(drawing::Path &path, const std::vector<double> &transform, double childScale) {
|
|
65
|
+
if (transform.size() >= 6) {
|
|
66
|
+
// transform array: [scaleX, skewY, skewX, scaleY, transX, transY]
|
|
67
|
+
drawing::Matrix matrix;
|
|
68
|
+
matrix.SetMatrix(
|
|
69
|
+
static_cast<float>(transform[0]), // scaleX
|
|
70
|
+
static_cast<float>(transform[2]), // skewX
|
|
71
|
+
static_cast<float>(transform[4] * childScale), // transX
|
|
72
|
+
static_cast<float>(transform[1]), // skewY
|
|
73
|
+
static_cast<float>(transform[3]), // scaleY
|
|
74
|
+
static_cast<float>(transform[5] * childScale), // transY
|
|
75
|
+
0, 0, 1.0f
|
|
76
|
+
);
|
|
77
|
+
path.Transform(matrix);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
public:
|
|
82
|
+
|
|
53
83
|
drawing::Path AsPath() override {
|
|
54
84
|
DLOG(INFO) << "[SvgQuote] AsPath";
|
|
55
85
|
drawing::Path path;
|
package/harmony/svg.har
CHANGED
|
Binary file
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "LocalSvg", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _css.LocalSvg;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "SvgCss", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _css.SvgCss;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "SvgCssUri", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _css.SvgCssUri;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "SvgWithCss", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _css.SvgWithCss;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "SvgWithCssUri", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _css.SvgWithCssUri;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "WithLocalSvg", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _css.WithLocalSvg;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "inlineStyles", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _css.inlineStyles;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "loadLocalRawResource", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _css.loadLocalRawResource;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
var _css = require("react-native-svg/css");
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "LocalSvg", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _css.LocalSvg;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "SvgCss", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _css.SvgCss;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "SvgCssUri", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _css.SvgCssUri;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "SvgWithCss", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _css.SvgWithCss;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "SvgWithCssUri", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _css.SvgWithCssUri;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "WithLocalSvg", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _css.WithLocalSvg;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "inlineStyles", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _css.inlineStyles;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "loadLocalRawResource", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _css.loadLocalRawResource;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var _css = require("react-native-svg/css");
|
|
55
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_css","require"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["_css","require"],"sourceRoot":"../../../src","sources":["css/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {};
|
|
7
|
-
Object.defineProperty(exports, "default", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _ReactNativeSVG.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var _ReactNativeSVG = _interopRequireWildcard(require("react-native-svg/src/ReactNativeSVG"));
|
|
14
|
-
Object.keys(_ReactNativeSVG).forEach(function (key) {
|
|
15
|
-
if (key === "default" || key === "__esModule") return;
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
-
if (key in exports && exports[key] === _ReactNativeSVG[key]) return;
|
|
18
|
-
Object.defineProperty(exports, key, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _ReactNativeSVG[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _ReactNativeSVG.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _ReactNativeSVG = _interopRequireWildcard(require("react-native-svg/src/ReactNativeSVG"));
|
|
14
|
+
Object.keys(_ReactNativeSVG).forEach(function (key) {
|
|
15
|
+
if (key === "default" || key === "__esModule") return;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
+
if (key in exports && exports[key] === _ReactNativeSVG[key]) return;
|
|
18
|
+
Object.defineProperty(exports, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _ReactNativeSVG[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ReactNativeSVG","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["_ReactNativeSVG","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAJ,eAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,eAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAd,eAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAAoD,SAAAL,wBAAAc,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAhB,uBAAA,YAAAA,CAAAc,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAP,GAAA,CAAAC,CAAA,GAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAR,cAAA,CAAAC,IAAA,CAAAM,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAlB,MAAA,CAAAS,cAAA,KAAAT,MAAA,CAAAyB,wBAAA,CAAAb,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAR,GAAA,IAAAQ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA","ignoreList":[]}
|
package/lib/module/css/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles } from 'react-native-svg/css';
|
|
2
|
-
import { LocalSvg, WithLocalSvg, loadLocalRawResource } from 'react-native-svg/css';
|
|
3
|
-
export { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles, LocalSvg, WithLocalSvg, loadLocalRawResource };
|
|
1
|
+
import { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles } from 'react-native-svg/css';
|
|
2
|
+
import { LocalSvg, WithLocalSvg, loadLocalRawResource } from 'react-native-svg/css';
|
|
3
|
+
export { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles, LocalSvg, WithLocalSvg, loadLocalRawResource };
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SvgCss","SvgCssUri","SvgWithCss","SvgWithCssUri","inlineStyles","LocalSvg","WithLocalSvg","loadLocalRawResource"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["SvgCss","SvgCssUri","SvgWithCss","SvgWithCssUri","inlineStyles","LocalSvg","WithLocalSvg","loadLocalRawResource"],"sourceRoot":"../../../src","sources":["css/index.tsx"],"mappings":"AAAA,SACIA,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,aAAa,EACbC,YAAY,QACP,sBAAsB;AAE7B,SAASC,QAAQ,EAAEC,YAAY,EAAEC,oBAAoB,QAAQ,sBAAsB;AAEnF,SACEP,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,aAAa,EACbC,YAAY,EACZC,QAAQ,EACRC,YAAY,EACZC,oBAAoB","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from 'react-native-svg/src/ReactNativeSVG';
|
|
2
|
-
export { default } from 'react-native-svg/src/ReactNativeSVG';
|
|
1
|
+
export * from 'react-native-svg/src/ReactNativeSVG';
|
|
2
|
+
export { default } from 'react-native-svg/src/ReactNativeSVG';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,cAAc,qCAAqC;AAEnD,SAASA,OAAO,QAAQ,qCAAqC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-ohos/react-native-svg",
|
|
3
|
-
"version": "15.12.1-rc.
|
|
3
|
+
"version": "15.12.1-rc.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"react-native": "src/index",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"output": "lib",
|
|
47
47
|
"targets": [
|
|
48
48
|
"commonjs",
|
|
49
|
-
"module"
|
|
49
|
+
"module",
|
|
50
|
+
"typescript"
|
|
50
51
|
]
|
|
51
52
|
}
|
|
52
53
|
}
|