@shopify/react-native-skia 0.1.181 → 0.1.182
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/api/JsiSkData.h +7 -0
- package/cpp/api/JsiSkImage.h +7 -1
- package/cpp/api/JsiSkSVG.h +7 -0
- package/cpp/api/JsiSkTypeface.h +7 -0
- package/cpp/rnskia/dom/base/DerivedNodeProp.h +1 -1
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +12 -0
- package/cpp/rnskia/dom/base/NodePropsContainer.h +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +56 -54
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +30 -9
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +1 -0
- package/lib/commonjs/renderer/HostComponents.js +6 -1
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.js +3 -1
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/skia/core/Data.d.ts +2 -2
- package/lib/commonjs/skia/core/Data.js +5 -0
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Data/Data.d.ts +2 -2
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Image/Image.d.ts +2 -2
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
- package/lib/commonjs/skia/types/JsiInstance.d.ts +3 -0
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +3 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkImage.js +4 -0
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +4 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +55 -54
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/renderer/Canvas.js +29 -10
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +1 -0
- package/lib/module/renderer/HostComponents.js +3 -0
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/Reconciler.js +2 -1
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/skia/core/Data.d.ts +2 -2
- package/lib/module/skia/core/Data.js +5 -0
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/types/Data/Data.d.ts +2 -2
- package/lib/module/skia/types/Data/Data.js.map +1 -1
- package/lib/module/skia/types/Image/Image.d.ts +2 -2
- package/lib/module/skia/types/Image/Image.js.map +1 -1
- package/lib/module/skia/types/JsiInstance.d.ts +3 -0
- package/lib/module/skia/types/JsiInstance.js.map +1 -1
- package/lib/module/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/module/skia/types/SVG/SVG.js.map +1 -1
- package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.d.ts +1 -0
- package/lib/module/skia/web/JsiSkData.js +3 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.d.ts +1 -0
- package/lib/module/skia/web/JsiSkImage.js +4 -0
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.d.ts +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +4 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/typescript/src/renderer/HostComponents.d.ts +1 -0
- package/lib/typescript/src/skia/core/Data.d.ts +2 -2
- package/lib/typescript/src/skia/types/Data/Data.d.ts +2 -2
- package/lib/typescript/src/skia/types/Image/Image.d.ts +2 -2
- package/lib/typescript/src/skia/types/JsiInstance.d.ts +3 -0
- package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +1 -0
- package/package.json +1 -1
- package/src/dom/nodes/JsiSkDOM.ts +55 -54
- package/src/renderer/Canvas.tsx +34 -14
- package/src/renderer/HostComponents.ts +4 -0
- package/src/renderer/Reconciler.tsx +2 -1
- package/src/skia/core/Data.ts +14 -6
- package/src/skia/types/Data/Data.ts +2 -2
- package/src/skia/types/Image/Image.ts +2 -2
- package/src/skia/types/JsiInstance.ts +4 -0
- package/src/skia/types/SVG/SVG.ts +2 -2
- package/src/skia/types/Typeface/Typeface.ts +2 -2
- package/src/skia/web/JsiSkData.ts +4 -0
- package/src/skia/web/JsiSkImage.ts +4 -0
- package/src/skia/web/JsiSkTypeface.ts +4 -0
package/cpp/api/JsiSkData.h
CHANGED
@@ -30,6 +30,13 @@ public:
|
|
30
30
|
|
31
31
|
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkData, __typename__))
|
32
32
|
|
33
|
+
JSI_HOST_FUNCTION(dispose) {
|
34
|
+
setObject(nullptr);
|
35
|
+
return jsi::Value::undefined();
|
36
|
+
}
|
37
|
+
|
38
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkData, dispose))
|
39
|
+
|
33
40
|
/**
|
34
41
|
Returns the underlying object from a host object of this type
|
35
42
|
*/
|
package/cpp/api/JsiSkImage.h
CHANGED
@@ -104,12 +104,18 @@ public:
|
|
104
104
|
return jsi::String::createFromAscii(runtime, buffer);
|
105
105
|
}
|
106
106
|
|
107
|
+
JSI_HOST_FUNCTION(dispose) {
|
108
|
+
setObject(nullptr);
|
109
|
+
return jsi::Value::undefined();
|
110
|
+
}
|
111
|
+
|
107
112
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkImage, width),
|
108
113
|
JSI_EXPORT_FUNC(JsiSkImage, height),
|
109
114
|
JSI_EXPORT_FUNC(JsiSkImage, makeShaderOptions),
|
110
115
|
JSI_EXPORT_FUNC(JsiSkImage, makeShaderCubic),
|
111
116
|
JSI_EXPORT_FUNC(JsiSkImage, encodeToBytes),
|
112
|
-
JSI_EXPORT_FUNC(JsiSkImage, encodeToBase64)
|
117
|
+
JSI_EXPORT_FUNC(JsiSkImage, encodeToBase64),
|
118
|
+
JSI_EXPORT_FUNC(JsiSkImage, dispose))
|
113
119
|
|
114
120
|
JsiSkImage(std::shared_ptr<RNSkPlatformContext> context,
|
115
121
|
const sk_sp<SkImage> image)
|
package/cpp/api/JsiSkSVG.h
CHANGED
@@ -30,6 +30,13 @@ public:
|
|
30
30
|
|
31
31
|
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkSVG, __typename__))
|
32
32
|
|
33
|
+
JSI_HOST_FUNCTION(dispose) {
|
34
|
+
setObject(nullptr);
|
35
|
+
return jsi::Value::undefined();
|
36
|
+
}
|
37
|
+
|
38
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkSVG, dispose))
|
39
|
+
|
33
40
|
/**
|
34
41
|
Returns the underlying object from a host object of this type
|
35
42
|
*/
|
package/cpp/api/JsiSkTypeface.h
CHANGED
@@ -29,6 +29,13 @@ public:
|
|
29
29
|
|
30
30
|
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkTypeface, __typename__))
|
31
31
|
|
32
|
+
JSI_HOST_FUNCTION(dispose) {
|
33
|
+
setObject(nullptr);
|
34
|
+
return jsi::Value::undefined();
|
35
|
+
}
|
36
|
+
|
37
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkTypeface, dispose))
|
38
|
+
|
32
39
|
JsiSkTypeface(std::shared_ptr<RNSkPlatformContext> context,
|
33
40
|
sk_sp<SkTypeface> typeface)
|
34
41
|
: JsiSkWrappingSkPtrHostObject(std::move(context), std::move(typeface)) {}
|
@@ -72,7 +72,7 @@ public:
|
|
72
72
|
Adds a property to the derived property child props.
|
73
73
|
*/
|
74
74
|
template <class _Tp, class... _Args,
|
75
|
-
class = std::
|
75
|
+
class = std::enable_if_t<!std::is_array<_Tp>::value>>
|
76
76
|
_Tp *defineProperty(_Args &&...__args) {
|
77
77
|
auto prop =
|
78
78
|
std::make_shared<_Tp>(std::forward<_Args>(__args)..., _onChange);
|
@@ -132,6 +132,14 @@ public:
|
|
132
132
|
*/
|
133
133
|
void resetPendingChanges() override { JsiDomNode::resetPendingChanges(); }
|
134
134
|
|
135
|
+
/**
|
136
|
+
Overridden dispose to release resources
|
137
|
+
*/
|
138
|
+
void dispose(bool immediate) override {
|
139
|
+
JsiDomNode::dispose(immediate);
|
140
|
+
_paintCache.clear();
|
141
|
+
}
|
142
|
+
|
135
143
|
protected:
|
136
144
|
/**
|
137
145
|
Invalidates and marks then context as changed.
|
@@ -232,6 +240,10 @@ private:
|
|
232
240
|
}
|
233
241
|
|
234
242
|
struct PaintCache {
|
243
|
+
void clear() {
|
244
|
+
parent = nullptr;
|
245
|
+
child = nullptr;
|
246
|
+
}
|
235
247
|
std::shared_ptr<SkPaint> parent;
|
236
248
|
std::shared_ptr<SkPaint> child;
|
237
249
|
};
|
@@ -112,7 +112,7 @@ public:
|
|
112
112
|
Defines a property that will be added to the container
|
113
113
|
*/
|
114
114
|
template <class _Tp, class... _Args,
|
115
|
-
class = std::
|
115
|
+
class = std::enable_if_t<!std::is_array<_Tp>::value>>
|
116
116
|
_Tp *defineProperty(_Args &&...__args) {
|
117
117
|
// Create property and set onChange callback
|
118
118
|
auto prop =
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.JsiSkDOM = void 0;
|
7
7
|
|
8
|
+
var _HostComponents = require("../../renderer/HostComponents");
|
9
|
+
|
8
10
|
var _drawings = require("./drawings");
|
9
11
|
|
10
12
|
var _paint = require("./paint");
|
@@ -27,139 +29,139 @@ class JsiSkDOM {
|
|
27
29
|
}
|
28
30
|
|
29
31
|
Layer(props) {
|
30
|
-
return
|
32
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.LayerNode(props ?? {}) : new _LayerNode.LayerNode(this.ctx, props ?? {});
|
31
33
|
}
|
32
34
|
|
33
35
|
Group(props) {
|
34
|
-
return
|
36
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.GroupNode(props ?? {}) : new _GroupNode.GroupNode(this.ctx, props ?? {});
|
35
37
|
}
|
36
38
|
|
37
39
|
Paint(props) {
|
38
|
-
return
|
40
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.PaintNode(props ?? {}) : new _PaintNode.PaintNode(this.ctx, props);
|
39
41
|
} // Drawings
|
40
42
|
|
41
43
|
|
42
44
|
Fill(props) {
|
43
|
-
return
|
45
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.FillNode(props ?? {}) : new _drawings.FillNode(this.ctx, props);
|
44
46
|
}
|
45
47
|
|
46
48
|
Image(props) {
|
47
|
-
return
|
49
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.ImageNode(props ?? {}) : new _drawings.ImageNode(this.ctx, props);
|
48
50
|
}
|
49
51
|
|
50
52
|
Circle(props) {
|
51
|
-
return
|
53
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.CircleNode(props ?? {}) : new _drawings.CircleNode(this.ctx, props);
|
52
54
|
}
|
53
55
|
|
54
56
|
Path(props) {
|
55
|
-
return
|
57
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.PathNode(props ?? {}) : new _drawings.PathNode(this.ctx, props);
|
56
58
|
}
|
57
59
|
|
58
60
|
CustomDrawing(props) {
|
59
|
-
return
|
61
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.CustomDrawingNode(props ?? {}) : new _drawings.CustomDrawingNode(this.ctx, props);
|
60
62
|
}
|
61
63
|
|
62
64
|
Line(props) {
|
63
|
-
return
|
65
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.LineNode(props ?? {}) : new _drawings.LineNode(this.ctx, props);
|
64
66
|
}
|
65
67
|
|
66
68
|
Oval(props) {
|
67
|
-
return
|
69
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.OvalNode(props ?? {}) : new _drawings.OvalNode(this.ctx, props);
|
68
70
|
}
|
69
71
|
|
70
72
|
Patch(props) {
|
71
|
-
return
|
73
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.PatchNode(props ?? {}) : new _drawings.PatchNode(this.ctx, props);
|
72
74
|
}
|
73
75
|
|
74
76
|
Points(props) {
|
75
|
-
return
|
77
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.PointsNode(props ?? {}) : new _drawings.PointsNode(this.ctx, props);
|
76
78
|
}
|
77
79
|
|
78
80
|
Rect(props) {
|
79
|
-
return
|
81
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.RectNode(props) : new _drawings.RectNode(this.ctx, props);
|
80
82
|
}
|
81
83
|
|
82
84
|
RRect(props) {
|
83
|
-
return
|
85
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.RRectNode(props) : new _drawings.RRectNode(this.ctx, props);
|
84
86
|
}
|
85
87
|
|
86
88
|
Vertices(props) {
|
87
|
-
return
|
89
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.VerticesNode(props) : new _drawings.VerticesNode(this.ctx, props);
|
88
90
|
}
|
89
91
|
|
90
92
|
Text(props) {
|
91
|
-
return
|
93
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.TextNode(props) : new _drawings.TextNode(this.ctx, props);
|
92
94
|
}
|
93
95
|
|
94
96
|
TextPath(props) {
|
95
|
-
return
|
97
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.TextPathNode(props) : new _drawings.TextPathNode(this.ctx, props);
|
96
98
|
}
|
97
99
|
|
98
100
|
TextBlob(props) {
|
99
|
-
return
|
101
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.TextBlobNode(props) : new _drawings.TextBlobNode(this.ctx, props);
|
100
102
|
}
|
101
103
|
|
102
104
|
Glyphs(props) {
|
103
|
-
return
|
105
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.GlyphsNode(props) : new _drawings.GlyphsNode(this.ctx, props);
|
104
106
|
}
|
105
107
|
|
106
108
|
DiffRect(props) {
|
107
|
-
return
|
109
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.DiffRectNode(props) : new _drawings.DiffRectNode(this.ctx, props);
|
108
110
|
}
|
109
111
|
|
110
112
|
Picture(props) {
|
111
|
-
return
|
113
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.PictureNode(props) : new _drawings.PictureNode(this.ctx, props);
|
112
114
|
}
|
113
115
|
|
114
116
|
ImageSVG(props) {
|
115
|
-
return
|
117
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.ImageSVGNode(props) : new _drawings.ImageSVGNode(this.ctx, props);
|
116
118
|
} // BlurMaskFilters
|
117
119
|
|
118
120
|
|
119
121
|
BlurMaskFilter(props) {
|
120
|
-
return
|
122
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BlurMaskFilterNode(props) : new _paint.BlurMaskFilterNode(this.ctx, props);
|
121
123
|
} // ImageFilters
|
122
124
|
|
123
125
|
|
124
126
|
BlendImageFilter(props) {
|
125
|
-
return
|
127
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BlendImageFilterNode(props) : new _paint.BlendImageFilterNode(this.ctx, props);
|
126
128
|
}
|
127
129
|
|
128
130
|
DropShadowImageFilter(props) {
|
129
|
-
return
|
131
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.DropShadowImageFilterNode(props) : new _paint.DropShadowImageFilterNode(this.ctx, props);
|
130
132
|
}
|
131
133
|
|
132
134
|
DisplacementMapImageFilter(props) {
|
133
|
-
return
|
135
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.DisplacementMapImageFilterNode(props) : new _paint.DisplacementMapImageFilterNode(this.ctx, props);
|
134
136
|
}
|
135
137
|
|
136
138
|
BlurImageFilter(props) {
|
137
|
-
return
|
139
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BlurImageFilterNode(props) : new _paint.BlurImageFilterNode(this.ctx, props);
|
138
140
|
}
|
139
141
|
|
140
142
|
OffsetImageFilter(props) {
|
141
|
-
return
|
143
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.OffsetImageFilterNode(props) : new _paint.OffsetImageFilterNode(this.ctx, props);
|
142
144
|
}
|
143
145
|
|
144
146
|
MorphologyImageFilter(props) {
|
145
|
-
return
|
147
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.MorphologyImageFilterNode(props) : new _ImageFilters.MorphologyImageFilterNode(this.ctx, props);
|
146
148
|
}
|
147
149
|
|
148
150
|
RuntimeShaderImageFilter(props) {
|
149
|
-
return
|
151
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props) : new _paint.RuntimeShaderImageFilterNode(this.ctx, props);
|
150
152
|
} // Color Filters
|
151
153
|
|
152
154
|
|
153
155
|
MatrixColorFilter(props) {
|
154
|
-
return
|
156
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.MatrixColorFilterNode(props) : new _ColorFilters.MatrixColorFilterNode(this.ctx, props);
|
155
157
|
}
|
156
158
|
|
157
159
|
BlendColorFilter(props) {
|
158
|
-
return
|
160
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BlendColorFilterNode(props) : new _ColorFilters.BlendColorFilterNode(this.ctx, props);
|
159
161
|
}
|
160
162
|
|
161
163
|
LumaColorFilter() {
|
162
|
-
return
|
164
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.LumaColorFilterNode() : new _ColorFilters.LumaColorFilterNode(this.ctx);
|
163
165
|
}
|
164
166
|
|
165
167
|
LinearToSRGBGammaColorFilter() {
|
@@ -171,89 +173,89 @@ class JsiSkDOM {
|
|
171
173
|
}
|
172
174
|
|
173
175
|
LerpColorFilter(props) {
|
174
|
-
return
|
176
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.LerpColorFilterNode(props) : new _ColorFilters.LerpColorFilterNode(this.ctx, props);
|
175
177
|
} // Shaders
|
176
178
|
|
177
179
|
|
178
180
|
Shader(props) {
|
179
|
-
return
|
181
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.ShaderNode(props) : new _Shaders.ShaderNode(this.ctx, props);
|
180
182
|
}
|
181
183
|
|
182
184
|
ImageShader(props) {
|
183
|
-
return
|
185
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.ImageShaderNode(props) : new _Shaders.ImageShaderNode(this.ctx, props);
|
184
186
|
}
|
185
187
|
|
186
188
|
ColorShader(props) {
|
187
|
-
return
|
189
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.ColorShaderNode(props) : new _Shaders.ColorNode(this.ctx, props);
|
188
190
|
}
|
189
191
|
|
190
192
|
SweepGradient(props) {
|
191
|
-
return
|
193
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.SweepGradientNode(props) : new _Shaders.SweepGradientNode(this.ctx, props);
|
192
194
|
}
|
193
195
|
|
194
196
|
Turbulence(props) {
|
195
|
-
return
|
197
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.TurbulenceNode(props) : new _Shaders.TurbulenceNode(this.ctx, props);
|
196
198
|
}
|
197
199
|
|
198
200
|
FractalNoise(props) {
|
199
|
-
return
|
201
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.FractalNoiseNode(props) : new _Shaders.FractalNoiseNode(this.ctx, props);
|
200
202
|
}
|
201
203
|
|
202
204
|
LinearGradient(props) {
|
203
|
-
return
|
205
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.LinearGradientNode(props) : new _Shaders.LinearGradientNode(this.ctx, props);
|
204
206
|
}
|
205
207
|
|
206
208
|
RadialGradient(props) {
|
207
|
-
return
|
209
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.RadialGradientNode(props) : new _Shaders.RadialGradientNode(this.ctx, props);
|
208
210
|
}
|
209
211
|
|
210
212
|
TwoPointConicalGradient(props) {
|
211
|
-
return
|
213
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.TwoPointConicalGradientNode(props) : new _Shaders.TwoPointConicalGradientNode(this.ctx, props);
|
212
214
|
} // Path Effects
|
213
215
|
|
214
216
|
|
215
217
|
CornerPathEffect(props) {
|
216
|
-
return
|
218
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.CornerPathEffectNode(props) : new _paint.CornerPathEffectNode(this.ctx, props);
|
217
219
|
}
|
218
220
|
|
219
221
|
DiscretePathEffect(props) {
|
220
|
-
return
|
222
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.DiscretePathEffectNode(props) : new _paint.DiscretePathEffectNode(this.ctx, props);
|
221
223
|
}
|
222
224
|
|
223
225
|
DashPathEffect(props) {
|
224
|
-
return
|
226
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.DashPathEffectNode(props) : new _paint.DashPathEffectNode(this.ctx, props);
|
225
227
|
}
|
226
228
|
|
227
229
|
Path1DPathEffect(props) {
|
228
|
-
return
|
230
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.Path1DPathEffectNode(props) : new _paint.Path1DPathEffectNode(this.ctx, props);
|
229
231
|
}
|
230
232
|
|
231
233
|
Path2DPathEffect(props) {
|
232
|
-
return
|
234
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.Path2DPathEffectNode(props) : new _paint.Path2DPathEffectNode(this.ctx, props);
|
233
235
|
}
|
234
236
|
|
235
237
|
SumPathEffect() {
|
236
|
-
return
|
238
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.SumPathEffectNode() : new _paint.SumPathEffectNode(this.ctx);
|
237
239
|
}
|
238
240
|
|
239
241
|
Line2DPathEffect(props) {
|
240
|
-
return
|
242
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.Line2DPathEffectNode(props) : new _paint.Line2DPathEffectNode(this.ctx, props);
|
241
243
|
}
|
242
244
|
|
243
245
|
Blend(props) {
|
244
|
-
return
|
246
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BlendNode(props) : new _paint.BlendNode(this.ctx, props);
|
245
247
|
}
|
246
248
|
|
247
249
|
BackdropFilter(props) {
|
248
|
-
return
|
250
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BackdropFilterNode(props) : new _drawings.BackdropFilterNode(this.ctx, props);
|
249
251
|
}
|
250
252
|
|
251
253
|
Box(props) {
|
252
|
-
return
|
254
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BoxNode(props) : new _drawings.BoxNode(this.ctx, props);
|
253
255
|
}
|
254
256
|
|
255
257
|
BoxShadow(props) {
|
256
|
-
return
|
258
|
+
return _HostComponents.NATIVE_DOM ? global.SkiaDomApi.BoxShadowNode(props) : new _drawings.BoxShadowNode(this.ctx, props);
|
257
259
|
}
|
258
260
|
|
259
261
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JsiSkDOM","constructor","ctx","Layer","props","global","SkiaDomApi","LayerNode","Group","GroupNode","Paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","CustomDrawing","CustomDrawingNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorShaderNode","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Layer(props?: ChildrenProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LayerNode\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return global.SkiaDomApi && global.SkiaDomApi.GroupNode\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PaintNode\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return global.SkiaDomApi && global.SkiaDomApi.FillNode\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ImageNode\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return global.SkiaDomApi && global.SkiaDomApi.CircleNode\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PathNode\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return global.SkiaDomApi && global.SkiaDomApi.CustomDrawingNode\n ? global.SkiaDomApi.CustomDrawingNode(props ?? {})\n : new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LineNode\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return global.SkiaDomApi && global.SkiaDomApi.OvalNode\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PatchNode\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PointsNode\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RectNode\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RRectNode\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return global.SkiaDomApi && global.SkiaDomApi.VerticesNode\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TextNode\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TextPathNode\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TextBlobNode\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return global.SkiaDomApi && global.SkiaDomApi.GlyphsNode\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DiffRectNode\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return global.SkiaDomApi && global.SkiaDomApi.PictureNode\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ImageSVGNode\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlurMaskFilterNode\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlendImageFilterNode\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DropShadowImageFilterNode\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DisplacementMapImageFilterNode\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlurImageFilterNode\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.OffsetImageFilterNode\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.MorphologyImageFilterNode\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RuntimeShaderImageFilterNode\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.MatrixColorFilterNode\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlendColorFilterNode\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return global.SkiaDomApi && global.SkiaDomApi.LumaColorFilterNode\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LerpColorFilterNode\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ShaderNode\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ImageShaderNode\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return global.SkiaDomApi && global.SkiaDomApi.ColorShaderNode\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.SweepGradientNode\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TurbulenceNode\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return global.SkiaDomApi && global.SkiaDomApi.FractalNoiseNode\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.LinearGradientNode\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.RadialGradientNode\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return global.SkiaDomApi && global.SkiaDomApi.TwoPointConicalGradientNode\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.CornerPathEffectNode\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DiscretePathEffectNode\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.DashPathEffectNode\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.Path1DPathEffectNode\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.Path2DPathEffectNode\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return global.SkiaDomApi && global.SkiaDomApi.SumPathEffectNode\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return global.SkiaDomApi && global.SkiaDomApi.Line2DPathEffectNode\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BlendNode\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BackdropFilterNode\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BoxNode\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return global.SkiaDomApi && global.SkiaDomApi.BoxShadowNode\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n}\n"],"mappings":";;;;;;;AA2DA;;AAwBA;;AAiBA;;AAQA;;AAWA;;AACA;;AACA;;AAEA;;AAEO,MAAMA,QAAN,CAAgC;EACrCC,WAAW,CAASC,GAAT,EAA2B;IAAA,KAAlBA,GAAkB,GAAlBA,GAAkB;EAAE;;EAExCC,KAAK,CAACC,KAAD,EAAwB;IAC3B,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkBC,SAAvC,GACHF,MAAM,CAACC,UAAP,CAAkBC,SAAlB,CAA4BH,KAAK,IAAI,EAArC,CADG,GAEH,IAAIG,oBAAJ,CAAc,KAAKL,GAAnB,EAAwBE,KAAK,IAAI,EAAjC,CAFJ;EAGD;;EAEDI,KAAK,CAACJ,KAAD,EAAqB;IACxB,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkBG,SAAvC,GACHJ,MAAM,CAACC,UAAP,CAAkBG,SAAlB,CAA4BL,KAAK,IAAI,EAArC,CADG,GAEH,IAAIK,oBAAJ,CAAc,KAAKP,GAAnB,EAAwBE,KAAK,IAAI,EAAjC,CAFJ;EAGD;;EAEDM,KAAK,CAACN,KAAD,EAAoB;IACvB,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkBK,SAAvC,GACHN,MAAM,CAACC,UAAP,CAAkBK,SAAlB,CAA4BP,KAAK,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A9B,EAAmCE,KAAnC,CAFJ;EAGD;;EAED2G,KAAK,CAAC3G,KAAD,EAAoB;IACvB,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkB0G,SAAvC,GACH3G,MAAM,CAACC,UAAP,CAAkB0G,SAAlB,CAA4B5G,KAA5B,CADG,GAEH,IAAI4G,gBAAJ,CAAc,KAAK9G,GAAnB,EAAwBE,KAAxB,CAFJ;EAGD;;EAED6G,cAAc,CAAC7G,KAAD,EAAuB;IACnC,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkB4G,kBAAvC,GACH7G,MAAM,CAACC,UAAP,CAAkB4G,kBAAlB,CAAqC9G,KAArC,CADG,GAEH,IAAI8G,4BAAJ,CAAuB,KAAKhH,GAA5B,EAAiCE,KAAjC,CAFJ;EAGD;;EAED+G,GAAG,CAAC/G,KAAD,EAAkB;IACnB,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkB8G,OAAvC,GACH/G,MAAM,CAACC,UAAP,CAAkB8G,OAAlB,CAA0BhH,KAA1B,CADG,GAEH,IAAIgH,iBAAJ,CAAY,KAAKlH,GAAjB,EAAsBE,KAAtB,CAFJ;EAGD;;EAEDiH,SAAS,CAACjH,KAAD,EAAwB;IAC/B,OAAOC,MAAM,CAACC,UAAP,IAAqBD,MAAM,CAACC,UAAP,CAAkBgH,aAAvC,GACHjH,MAAM,CAACC,UAAP,CAAkBgH,aAAlB,CAAgClH,KAAhC,CADG,GAEH,IAAIkH,uBAAJ,CAAkB,KAAKpH,GAAvB,EAA4BE,KAA5B,CAFJ;EAGD;;AAzVoC"}
|
1
|
+
{"version":3,"names":["JsiSkDOM","constructor","ctx","Layer","props","NATIVE_DOM","global","SkiaDomApi","LayerNode","Group","GroupNode","Paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","CustomDrawing","CustomDrawingNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorShaderNode","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\nimport { NATIVE_DOM } from \"../../renderer/HostComponents\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n CustomDrawingNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Layer(props?: ChildrenProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n CustomDrawing(props: CustomDrawingNodeProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.CustomDrawingNode(props ?? {})\n : new CustomDrawingNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return NATIVE_DOM\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return NATIVE_DOM\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n}\n"],"mappings":";;;;;;;AA0DA;;AAEA;;AAwBA;;AAiBA;;AAQA;;AAWA;;AACA;;AACA;;AAEA;;AAEO,MAAMA,QAAN,CAAgC;EACrCC,WAAW,CAASC,GAAT,EAA2B;IAAA,KAAlBA,GAAkB,GAAlBA,GAAkB;EAAE;;EAExCC,KAAK,CAACC,KAAD,EAAwB;IAC3B,OAAOC,0BAAA,GACHC,MAAM,CAACC,UAAP,CAAkBC,SAAlB,CAA4BJ,KAAK,IAAI,EAArC,CADG,GAEH,IAAII,oBAAJ,CAAc,KAAKN,GAAnB,EAAwBE,KAAK,IAAI,EAAjC,CAFJ;EAGD;;EAEDK,KAAK,CAACL,KAAD,EAAqB;IACxB,OAAOC,0BAAA,GACHC,MAAM,CAACC,UAAP,CAAkBG,SAAlB,CAA4BN,KAAK,IAAI,EAArC,CADG,GAEH,IAAIM,oBAAJ,CAAc,KAAKR,GAAnB,EAAwBE,KAAK,IAAI,EAAjC,CAFJ;EAGD;;EAEDO,KAAK,CAACP,KAAD,EAAoB;IACvB,OAAOC,0BAAA,GACHC,MAAM,CAACC,UAAP,CAAkBK,SAAlB,CAA4BR,KAAK,IAAI,EAArC,CADG,GAEH,IAAIQ,oBAAJ,CAAc,KAAKV,GAAnB,EAAwBE,KAAxB,CAFJ;EAGD,CAnBoC,CAqBrC;;;EACAS,IAAI,CAACT,KAAD,EAA2B;IAC7B,OAAOC,0BAAA,GACHC,MAAM,CAACC,UAAP,CAAkBO,QAAlB,CAA2BV,KAAK,IAAI,EAApC,CADG,GAEH,IAAIU,kBAAJ,CAAa,KAAKZ,GAAlB,EAAuBE,KAAvB,CAFJ;EAGD;;EAEDW,KAAK,CAACX,KAAD,EAAoB;IACvB,OAAOC,0BAAA,GACHC,MAAM,CAAC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H,KAA1B,CADG,GAEH,IAAIiH,iBAAJ,CAAY,KAAKnH,GAAjB,EAAsBE,KAAtB,CAFJ;EAGD;;EAEDkH,SAAS,CAAClH,KAAD,EAAwB;IAC/B,OAAOC,0BAAA,GACHC,MAAM,CAACC,UAAP,CAAkBgH,aAAlB,CAAgCnH,KAAhC,CADG,GAEH,IAAImH,uBAAJ,CAAkB,KAAKrH,GAAvB,EAA4BE,KAA5B,CAFJ;EAGD;;AAzVoC"}
|
@@ -11,8 +11,12 @@ var _views = require("../views");
|
|
11
11
|
|
12
12
|
var _Skia = require("../skia/Skia");
|
13
13
|
|
14
|
+
var _types = require("../dom/types");
|
15
|
+
|
14
16
|
var _Reconciler = require("./Reconciler");
|
15
17
|
|
18
|
+
var _HostComponents = require("./HostComponents");
|
19
|
+
|
16
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
17
21
|
|
18
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -62,15 +66,32 @@ const Canvas = /*#__PURE__*/(0, _react.forwardRef)((_ref, forwardedRef) => {
|
|
62
66
|
root.unmount();
|
63
67
|
};
|
64
68
|
}, [root]);
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
|
70
|
+
if (_HostComponents.NATIVE_DOM) {
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_views.SkiaDomView, _extends({
|
72
|
+
ref: ref,
|
73
|
+
style: style,
|
74
|
+
root: root.dom,
|
75
|
+
onTouch: onTouch,
|
76
|
+
onSize: onSize,
|
77
|
+
mode: mode,
|
78
|
+
debug: debug
|
79
|
+
}, props));
|
80
|
+
} else {
|
81
|
+
return /*#__PURE__*/_react.default.createElement(_views.SkiaView // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
82
|
+
, _extends({
|
83
|
+
ref: ref,
|
84
|
+
style: style,
|
85
|
+
mode: mode,
|
86
|
+
debug: debug,
|
87
|
+
onSize: onSize,
|
88
|
+
onDraw: (canvas, info) => {
|
89
|
+
onTouch && onTouch(info.touches);
|
90
|
+
const ctx = new _types.JsiDrawingContext(_Skia.Skia, canvas);
|
91
|
+
root.dom.render(ctx);
|
92
|
+
}
|
93
|
+
}, props));
|
94
|
+
}
|
74
95
|
});
|
75
96
|
/**
|
76
97
|
* Combines a list of refs into a single ref. This can be used to provide
|