@shopify/react-native-skia 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/api/JsiSkPaint.h +8 -1
- package/lib/commonjs/dom/types/Common.d.ts +6 -4
- package/lib/commonjs/dom/types/Common.js.map +1 -1
- package/lib/commonjs/dom/types/ImageFilters.d.ts +1 -1
- package/lib/commonjs/dom/types/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/types/Node.d.ts +0 -2
- package/lib/commonjs/dom/types/Node.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.d.ts +0 -1
- package/lib/commonjs/external/reanimated/index.js +0 -11
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/renderHelpers.d.ts +0 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js +5 -43
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/Paint.d.ts +1 -0
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js +3 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/sksg/Container.d.ts +3 -2
- package/lib/commonjs/sksg/Container.js +32 -26
- package/lib/commonjs/sksg/Container.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.d.ts +2 -2
- package/lib/commonjs/sksg/HostConfig.js +7 -25
- package/lib/commonjs/sksg/HostConfig.js.map +1 -1
- package/lib/commonjs/sksg/Node.d.ts +19 -0
- package/lib/commonjs/sksg/Node.js +78 -0
- package/lib/commonjs/sksg/Node.js.map +1 -0
- package/lib/commonjs/sksg/Reconciler.d.ts +1 -1
- package/lib/commonjs/sksg/Recorder/Core.d.ts +79 -0
- package/lib/commonjs/sksg/Recorder/Core.js +110 -0
- package/lib/commonjs/sksg/Recorder/Core.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +18 -0
- package/lib/commonjs/sksg/Recorder/DrawingContext.js +105 -0
- package/lib/commonjs/sksg/Recorder/DrawingContext.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/Player.d.ts +3 -0
- package/lib/commonjs/sksg/Recorder/Player.js +127 -0
- package/lib/commonjs/sksg/Recorder/Player.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/Recorder.d.ts +50 -0
- package/lib/commonjs/sksg/Recorder/Recorder.js +288 -0
- package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/Recording.d.ts +7 -0
- package/lib/commonjs/sksg/Recorder/Recording.js +12 -0
- package/lib/commonjs/sksg/Recorder/Recording.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/Visitor.d.ts +5 -0
- package/lib/commonjs/sksg/Recorder/Visitor.js +293 -0
- package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/Box.d.ts +13 -0
- package/lib/commonjs/sksg/Recorder/commands/Box.js +71 -0
- package/lib/commonjs/sksg/Recorder/commands/Box.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/CTM.d.ts +3 -0
- package/lib/commonjs/sksg/Recorder/commands/CTM.js +79 -0
- package/lib/commonjs/sksg/Recorder/commands/CTM.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
- package/lib/commonjs/sksg/Recorder/commands/ColorFilters.js +76 -0
- package/lib/commonjs/sksg/Recorder/commands/ColorFilters.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +24 -0
- package/lib/commonjs/sksg/{nodes/drawings.js → Recorder/commands/Drawing.js} +5 -5
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +183 -0
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/Paint.d.ts +4 -0
- package/lib/commonjs/sksg/Recorder/commands/Paint.js +70 -0
- package/lib/commonjs/sksg/Recorder/commands/Paint.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/PathEffects.d.ts +6 -0
- package/lib/commonjs/sksg/Recorder/commands/PathEffects.js +137 -0
- package/lib/commonjs/sksg/Recorder/commands/PathEffects.js.map +1 -0
- package/lib/commonjs/sksg/Recorder/commands/Shaders.d.ts +5 -0
- package/lib/commonjs/sksg/{nodes/shaders.js → Recorder/commands/Shaders.js} +58 -15
- package/lib/commonjs/sksg/Recorder/commands/Shaders.js.map +1 -0
- package/lib/commonjs/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
- package/lib/commonjs/sksg/{nodes/utils.js → utils.js} +12 -2
- package/lib/commonjs/sksg/utils.js.map +1 -0
- package/lib/module/dom/types/Common.d.ts +6 -4
- package/lib/module/dom/types/Common.js.map +1 -1
- package/lib/module/dom/types/ImageFilters.d.ts +1 -1
- package/lib/module/dom/types/ImageFilters.js.map +1 -1
- package/lib/module/dom/types/Node.d.ts +0 -2
- package/lib/module/dom/types/Node.js.map +1 -1
- package/lib/module/external/reanimated/index.d.ts +0 -1
- package/lib/module/external/reanimated/index.js +0 -1
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/renderHelpers.d.ts +0 -1
- package/lib/module/external/reanimated/renderHelpers.js +4 -42
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/skia/types/Paint/Paint.d.ts +1 -0
- package/lib/module/skia/types/Paint/Paint.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPaint.js +3 -0
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/sksg/Container.d.ts +3 -2
- package/lib/module/sksg/Container.js +30 -24
- package/lib/module/sksg/Container.js.map +1 -1
- package/lib/module/sksg/HostConfig.d.ts +2 -2
- package/lib/module/sksg/HostConfig.js +7 -25
- package/lib/module/sksg/HostConfig.js.map +1 -1
- package/lib/module/sksg/Node.d.ts +19 -0
- package/lib/module/sksg/Node.js +67 -0
- package/lib/module/sksg/Node.js.map +1 -0
- package/lib/module/sksg/Reconciler.d.ts +1 -1
- package/lib/module/sksg/Recorder/Core.d.ts +79 -0
- package/lib/module/sksg/Recorder/Core.js +101 -0
- package/lib/module/sksg/Recorder/Core.js.map +1 -0
- package/lib/module/sksg/Recorder/DrawingContext.d.ts +18 -0
- package/lib/module/sksg/Recorder/DrawingContext.js +98 -0
- package/lib/module/sksg/Recorder/DrawingContext.js.map +1 -0
- package/lib/module/sksg/Recorder/Player.d.ts +3 -0
- package/lib/module/sksg/Recorder/Player.js +120 -0
- package/lib/module/sksg/Recorder/Player.js.map +1 -0
- package/lib/module/sksg/Recorder/Recorder.d.ts +50 -0
- package/lib/module/sksg/Recorder/Recorder.js +281 -0
- package/lib/module/sksg/Recorder/Recorder.js.map +1 -0
- package/lib/module/sksg/Recorder/Recording.d.ts +7 -0
- package/lib/module/sksg/Recorder/Recording.js +5 -0
- package/lib/module/sksg/Recorder/Recording.js.map +1 -0
- package/lib/module/sksg/Recorder/Visitor.d.ts +5 -0
- package/lib/module/sksg/Recorder/Visitor.js +285 -0
- package/lib/module/sksg/Recorder/Visitor.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/Box.d.ts +13 -0
- package/lib/module/sksg/Recorder/commands/Box.js +63 -0
- package/lib/module/sksg/Recorder/commands/Box.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/CTM.d.ts +3 -0
- package/lib/module/sksg/Recorder/commands/CTM.js +72 -0
- package/lib/module/sksg/Recorder/commands/CTM.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
- package/lib/module/sksg/Recorder/commands/ColorFilters.js +67 -0
- package/lib/module/sksg/Recorder/commands/ColorFilters.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/Drawing.d.ts +24 -0
- package/lib/module/sksg/{nodes/drawings.js → Recorder/commands/Drawing.js} +5 -5
- package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
- package/lib/module/sksg/{nodes/imageFilters.js → Recorder/commands/ImageFilters.js} +87 -95
- package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/Paint.d.ts +4 -0
- package/lib/module/sksg/Recorder/commands/Paint.js +62 -0
- package/lib/module/sksg/Recorder/commands/Paint.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/PathEffects.d.ts +6 -0
- package/lib/module/sksg/Recorder/commands/PathEffects.js +128 -0
- package/lib/module/sksg/Recorder/commands/PathEffects.js.map +1 -0
- package/lib/module/sksg/Recorder/commands/Shaders.d.ts +5 -0
- package/lib/module/sksg/{nodes/shaders.js → Recorder/commands/Shaders.js} +63 -13
- package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -0
- package/lib/module/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
- package/lib/module/sksg/{nodes/utils.js → utils.js} +10 -1
- package/lib/module/sksg/utils.js.map +1 -0
- package/lib/typescript/lib/commonjs/external/reanimated/renderHelpers.d.ts +0 -1
- package/lib/typescript/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/typescript/lib/commonjs/sksg/Container.d.ts +4 -0
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +1 -3
- package/lib/typescript/lib/commonjs/sksg/Node.d.ts +14 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/Core.d.ts +5 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +17 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/Player.d.ts +2 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/Recorder.d.ts +45 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/Recording.d.ts +5 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/Visitor.d.ts +27 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Box.d.ts +3 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/CTM.d.ts +2 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/ColorFilters.d.ts +4 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/ImageFilters.d.ts +6 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Paint.d.ts +14 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/PathEffects.d.ts +4 -0
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Shaders.d.ts +3 -0
- package/lib/typescript/lib/commonjs/sksg/{nodes/utils.d.ts → utils.d.ts} +1 -0
- package/lib/typescript/lib/module/external/reanimated/index.d.ts +0 -1
- package/lib/typescript/lib/module/external/reanimated/renderHelpers.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/Container.d.ts +4 -0
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +1 -3
- package/lib/typescript/lib/module/sksg/Node.d.ts +13 -0
- package/lib/typescript/lib/module/sksg/Recorder/Core.d.ts +4 -0
- package/lib/typescript/lib/module/sksg/Recorder/DrawingContext.d.ts +16 -0
- package/lib/typescript/lib/module/sksg/Recorder/Player.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +44 -0
- package/lib/typescript/lib/module/sksg/Recorder/Recording.d.ts +4 -0
- package/lib/typescript/lib/module/sksg/Recorder/Visitor.d.ts +26 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/Box.d.ts +2 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/CTM.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/ColorFilters.d.ts +3 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/ImageFilters.d.ts +5 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/Paint.d.ts +13 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/PathEffects.d.ts +3 -0
- package/lib/typescript/lib/module/sksg/Recorder/commands/Shaders.d.ts +2 -0
- package/lib/typescript/lib/module/sksg/{nodes/utils.d.ts → utils.d.ts} +1 -0
- package/lib/typescript/src/dom/types/Common.d.ts +6 -4
- package/lib/typescript/src/dom/types/ImageFilters.d.ts +1 -1
- package/lib/typescript/src/dom/types/Node.d.ts +0 -2
- package/lib/typescript/src/external/reanimated/index.d.ts +0 -1
- package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +0 -1
- package/lib/typescript/src/skia/types/Paint/Paint.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/typescript/src/sksg/Container.d.ts +3 -2
- package/lib/typescript/src/sksg/HostConfig.d.ts +2 -2
- package/lib/typescript/src/sksg/Node.d.ts +19 -0
- package/lib/typescript/src/sksg/Reconciler.d.ts +1 -1
- package/lib/typescript/src/sksg/Recorder/Core.d.ts +79 -0
- package/lib/typescript/src/sksg/Recorder/DrawingContext.d.ts +18 -0
- package/lib/typescript/src/sksg/Recorder/Player.d.ts +3 -0
- package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +50 -0
- package/lib/typescript/src/sksg/Recorder/Recording.d.ts +7 -0
- package/lib/typescript/src/sksg/Recorder/Visitor.d.ts +5 -0
- package/lib/typescript/src/sksg/Recorder/commands/Box.d.ts +13 -0
- package/lib/typescript/src/sksg/Recorder/commands/CTM.d.ts +3 -0
- package/lib/typescript/src/sksg/Recorder/commands/ColorFilters.d.ts +6 -0
- package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +24 -0
- package/lib/typescript/src/sksg/Recorder/commands/ImageFilters.d.ts +12 -0
- package/lib/typescript/src/sksg/Recorder/commands/Paint.d.ts +4 -0
- package/lib/typescript/src/sksg/Recorder/commands/PathEffects.d.ts +6 -0
- package/lib/typescript/src/sksg/Recorder/commands/Shaders.d.ts +5 -0
- package/lib/typescript/src/sksg/{nodes/utils.d.ts → utils.d.ts} +3 -0
- package/package.json +1 -1
- package/src/__tests__/snapshots/image-filter/test-shadow.png +0 -0
- package/src/dom/types/Common.ts +7 -5
- package/src/dom/types/ImageFilters.ts +2 -1
- package/src/dom/types/Node.ts +0 -4
- package/src/external/reanimated/index.ts +0 -1
- package/src/external/reanimated/renderHelpers.ts +4 -44
- package/src/renderer/__tests__/e2e/ColorFilters.spec.tsx +15 -0
- package/src/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.tsx +23 -2
- package/src/renderer/__tests__/e2e/ImageFilters.spec.tsx +91 -2
- package/src/renderer/__tests__/setup.tsx +1 -1
- package/src/skia/types/Paint/Paint.ts +2 -0
- package/src/skia/web/JsiSkPaint.ts +4 -0
- package/src/sksg/Container.ts +35 -29
- package/src/sksg/HostConfig.ts +5 -50
- package/src/sksg/Node.ts +105 -0
- package/src/sksg/Recorder/Core.ts +171 -0
- package/src/sksg/Recorder/DrawingContext.ts +130 -0
- package/src/sksg/Recorder/Player.ts +160 -0
- package/src/sksg/Recorder/Recorder.ts +259 -0
- package/src/sksg/Recorder/Recording.ts +13 -0
- package/src/sksg/Recorder/Visitor.ts +324 -0
- package/src/sksg/Recorder/commands/Box.ts +63 -0
- package/src/sksg/Recorder/commands/CTM.ts +72 -0
- package/src/sksg/Recorder/commands/ColorFilters.ts +87 -0
- package/src/sksg/{nodes/drawings.ts → Recorder/commands/Drawing.ts} +29 -65
- package/src/sksg/Recorder/commands/ImageFilters.ts +255 -0
- package/src/sksg/Recorder/commands/Paint.ts +77 -0
- package/src/sksg/Recorder/commands/PathEffects.ts +169 -0
- package/src/sksg/{nodes/shaders.ts → Recorder/commands/Shaders.ts} +100 -26
- package/src/sksg/{nodes/utils.ts → utils.ts} +14 -1
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +0 -24
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +0 -1
- package/lib/commonjs/sksg/DeclarationContext.d.ts +0 -56
- package/lib/commonjs/sksg/DeclarationContext.js +0 -77
- package/lib/commonjs/sksg/DeclarationContext.js.map +0 -1
- package/lib/commonjs/sksg/DrawingContext.d.ts +0 -13
- package/lib/commonjs/sksg/DrawingContext.js +0 -172
- package/lib/commonjs/sksg/DrawingContext.js.map +0 -1
- package/lib/commonjs/sksg/__tests__/Declarations.spec.d.ts +0 -1
- package/lib/commonjs/sksg/__tests__/MockDeclaration.d.ts +0 -57
- package/lib/commonjs/sksg/nodes/Node.d.ts +0 -7
- package/lib/commonjs/sksg/nodes/Node.js +0 -6
- package/lib/commonjs/sksg/nodes/Node.js.map +0 -1
- package/lib/commonjs/sksg/nodes/colorFilters.d.ts +0 -10
- package/lib/commonjs/sksg/nodes/colorFilters.js +0 -79
- package/lib/commonjs/sksg/nodes/colorFilters.js.map +0 -1
- package/lib/commonjs/sksg/nodes/context.d.ts +0 -3
- package/lib/commonjs/sksg/nodes/context.js +0 -394
- package/lib/commonjs/sksg/nodes/context.js.map +0 -1
- package/lib/commonjs/sksg/nodes/drawings.d.ts +0 -30
- package/lib/commonjs/sksg/nodes/drawings.js.map +0 -1
- package/lib/commonjs/sksg/nodes/imageFilters.d.ts +0 -17
- package/lib/commonjs/sksg/nodes/imageFilters.js +0 -197
- package/lib/commonjs/sksg/nodes/imageFilters.js.map +0 -1
- package/lib/commonjs/sksg/nodes/index.d.ts +0 -3
- package/lib/commonjs/sksg/nodes/index.js +0 -39
- package/lib/commonjs/sksg/nodes/index.js.map +0 -1
- package/lib/commonjs/sksg/nodes/paint.d.ts +0 -3
- package/lib/commonjs/sksg/nodes/paint.js +0 -81
- package/lib/commonjs/sksg/nodes/paint.js.map +0 -1
- package/lib/commonjs/sksg/nodes/pathEffects.d.ts +0 -11
- package/lib/commonjs/sksg/nodes/pathEffects.js +0 -111
- package/lib/commonjs/sksg/nodes/pathEffects.js.map +0 -1
- package/lib/commonjs/sksg/nodes/shaders.d.ts +0 -11
- package/lib/commonjs/sksg/nodes/shaders.js.map +0 -1
- package/lib/commonjs/sksg/nodes/utils.js.map +0 -1
- package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
- package/lib/module/external/reanimated/useDerivedValueOnJS.js +0 -16
- package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +0 -1
- package/lib/module/sksg/DeclarationContext.d.ts +0 -56
- package/lib/module/sksg/DeclarationContext.js +0 -69
- package/lib/module/sksg/DeclarationContext.js.map +0 -1
- package/lib/module/sksg/DrawingContext.d.ts +0 -13
- package/lib/module/sksg/DrawingContext.js +0 -165
- package/lib/module/sksg/DrawingContext.js.map +0 -1
- package/lib/module/sksg/__tests__/Declarations.spec.d.ts +0 -1
- package/lib/module/sksg/__tests__/MockDeclaration.d.ts +0 -57
- package/lib/module/sksg/nodes/Node.d.ts +0 -7
- package/lib/module/sksg/nodes/Node.js +0 -2
- package/lib/module/sksg/nodes/Node.js.map +0 -1
- package/lib/module/sksg/nodes/colorFilters.d.ts +0 -10
- package/lib/module/sksg/nodes/colorFilters.js +0 -66
- package/lib/module/sksg/nodes/colorFilters.js.map +0 -1
- package/lib/module/sksg/nodes/context.d.ts +0 -3
- package/lib/module/sksg/nodes/context.js +0 -387
- package/lib/module/sksg/nodes/context.js.map +0 -1
- package/lib/module/sksg/nodes/drawings.d.ts +0 -30
- package/lib/module/sksg/nodes/drawings.js.map +0 -1
- package/lib/module/sksg/nodes/imageFilters.d.ts +0 -17
- package/lib/module/sksg/nodes/imageFilters.js.map +0 -1
- package/lib/module/sksg/nodes/index.d.ts +0 -3
- package/lib/module/sksg/nodes/index.js +0 -4
- package/lib/module/sksg/nodes/index.js.map +0 -1
- package/lib/module/sksg/nodes/paint.d.ts +0 -3
- package/lib/module/sksg/nodes/paint.js +0 -74
- package/lib/module/sksg/nodes/paint.js.map +0 -1
- package/lib/module/sksg/nodes/pathEffects.d.ts +0 -11
- package/lib/module/sksg/nodes/pathEffects.js +0 -97
- package/lib/module/sksg/nodes/pathEffects.js.map +0 -1
- package/lib/module/sksg/nodes/shaders.d.ts +0 -11
- package/lib/module/sksg/nodes/shaders.js.map +0 -1
- package/lib/module/sksg/nodes/utils.js.map +0 -1
- package/lib/typescript/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +0 -2
- package/lib/typescript/lib/commonjs/sksg/DeclarationContext.d.ts +0 -53
- package/lib/typescript/lib/commonjs/sksg/DrawingContext.d.ts +0 -22
- package/lib/typescript/lib/commonjs/sksg/nodes/Node.d.ts +0 -1
- package/lib/typescript/lib/commonjs/sksg/nodes/colorFilters.d.ts +0 -8
- package/lib/typescript/lib/commonjs/sksg/nodes/context.d.ts +0 -2
- package/lib/typescript/lib/commonjs/sksg/nodes/imageFilters.d.ts +0 -12
- package/lib/typescript/lib/commonjs/sksg/nodes/index.d.ts +0 -1
- package/lib/typescript/lib/commonjs/sksg/nodes/paint.d.ts +0 -2
- package/lib/typescript/lib/commonjs/sksg/nodes/pathEffects.d.ts +0 -9
- package/lib/typescript/lib/commonjs/sksg/nodes/shaders.d.ts +0 -10
- package/lib/typescript/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/DeclarationContext.d.ts +0 -52
- package/lib/typescript/lib/module/sksg/DrawingContext.d.ts +0 -21
- package/lib/typescript/lib/module/sksg/nodes/Node.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/nodes/colorFilters.d.ts +0 -7
- package/lib/typescript/lib/module/sksg/nodes/context.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/nodes/imageFilters.d.ts +0 -11
- package/lib/typescript/lib/module/sksg/nodes/index.d.ts +0 -3
- package/lib/typescript/lib/module/sksg/nodes/paint.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/nodes/pathEffects.d.ts +0 -8
- package/lib/typescript/lib/module/sksg/nodes/shaders.d.ts +0 -9
- package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +0 -1
- package/lib/typescript/src/sksg/DeclarationContext.d.ts +0 -56
- package/lib/typescript/src/sksg/DrawingContext.d.ts +0 -13
- package/lib/typescript/src/sksg/__tests__/Declarations.spec.d.ts +0 -1
- package/lib/typescript/src/sksg/__tests__/MockDeclaration.d.ts +0 -57
- package/lib/typescript/src/sksg/nodes/Node.d.ts +0 -7
- package/lib/typescript/src/sksg/nodes/colorFilters.d.ts +0 -10
- package/lib/typescript/src/sksg/nodes/context.d.ts +0 -3
- package/lib/typescript/src/sksg/nodes/drawings.d.ts +0 -30
- package/lib/typescript/src/sksg/nodes/imageFilters.d.ts +0 -17
- package/lib/typescript/src/sksg/nodes/index.d.ts +0 -3
- package/lib/typescript/src/sksg/nodes/paint.d.ts +0 -3
- package/lib/typescript/src/sksg/nodes/pathEffects.d.ts +0 -11
- package/lib/typescript/src/sksg/nodes/shaders.d.ts +0 -11
- package/src/external/reanimated/useDerivedValueOnJS.ts +0 -20
- package/src/sksg/DeclarationContext.ts +0 -85
- package/src/sksg/DrawingContext.ts +0 -226
- package/src/sksg/__tests__/Declarations.spec.tsx +0 -235
- package/src/sksg/__tests__/MockDeclaration.ts +0 -138
- package/src/sksg/nodes/Node.ts +0 -8
- package/src/sksg/nodes/colorFilters.ts +0 -79
- package/src/sksg/nodes/context.ts +0 -412
- package/src/sksg/nodes/imageFilters.ts +0 -235
- package/src/sksg/nodes/index.ts +0 -3
- package/src/sksg/nodes/paint.ts +0 -75
- package/src/sksg/nodes/pathEffects.ts +0 -118
- /package/lib/typescript/lib/commonjs/sksg/{nodes/drawings.d.ts → Recorder/commands/Drawing.d.ts} +0 -0
- /package/lib/typescript/lib/module/sksg/{nodes/drawings.d.ts → Recorder/commands/Drawing.d.ts} +0 -0
@@ -3,9 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
var _nodes = require("
|
8
|
-
var _types = require("
|
6
|
+
exports.pushShader = exports.isPushShader = void 0;
|
7
|
+
var _nodes = require("../../../dom/nodes");
|
8
|
+
var _types = require("../../../dom/types");
|
9
|
+
var _types2 = require("../../../skia/types");
|
10
|
+
var _utils = require("../../utils");
|
11
|
+
var _Core = require("../Core");
|
9
12
|
const declareShader = (ctx, props) => {
|
10
13
|
"worklet";
|
11
14
|
|
@@ -16,10 +19,9 @@ const declareShader = (ctx, props) => {
|
|
16
19
|
} = props;
|
17
20
|
const m3 = ctx.Skia.Matrix();
|
18
21
|
(0, _nodes.processTransformProps)(m3, transform);
|
19
|
-
const shader = source.makeShaderWithChildren((0,
|
22
|
+
const shader = source.makeShaderWithChildren((0, _types2.processUniforms)(source, uniforms), ctx.shaders.splice(0, ctx.shaders.length), m3);
|
20
23
|
ctx.shaders.push(shader);
|
21
24
|
};
|
22
|
-
exports.declareShader = declareShader;
|
23
25
|
const declareColorShader = (ctx, props) => {
|
24
26
|
"worklet";
|
25
27
|
|
@@ -29,7 +31,6 @@ const declareColorShader = (ctx, props) => {
|
|
29
31
|
const shader = ctx.Skia.Shader.MakeColor(ctx.Skia.Color(color));
|
30
32
|
ctx.shaders.push(shader);
|
31
33
|
};
|
32
|
-
exports.declareColorShader = declareColorShader;
|
33
34
|
const declareFractalNoiseShader = (ctx, props) => {
|
34
35
|
"worklet";
|
35
36
|
|
@@ -44,7 +45,6 @@ const declareFractalNoiseShader = (ctx, props) => {
|
|
44
45
|
const shader = ctx.Skia.Shader.MakeFractalNoise(freqX, freqY, octaves, seed, tileWidth, tileHeight);
|
45
46
|
ctx.shaders.push(shader);
|
46
47
|
};
|
47
|
-
exports.declareFractalNoiseShader = declareFractalNoiseShader;
|
48
48
|
const declareTwoPointConicalGradientShader = (ctx, props) => {
|
49
49
|
"worklet";
|
50
50
|
|
@@ -64,7 +64,6 @@ const declareTwoPointConicalGradientShader = (ctx, props) => {
|
|
64
64
|
const shader = ctx.Skia.Shader.MakeTwoPointConicalGradient(start, startR, end, endR, colors, positions, mode, localMatrix, flags);
|
65
65
|
ctx.shaders.push(shader);
|
66
66
|
};
|
67
|
-
exports.declareTwoPointConicalGradientShader = declareTwoPointConicalGradientShader;
|
68
67
|
const declareRadialGradientShader = (ctx, props) => {
|
69
68
|
"worklet";
|
70
69
|
|
@@ -82,7 +81,6 @@ const declareRadialGradientShader = (ctx, props) => {
|
|
82
81
|
const shader = ctx.Skia.Shader.MakeRadialGradient(c, r, colors, positions, mode, localMatrix, flags);
|
83
82
|
ctx.shaders.push(shader);
|
84
83
|
};
|
85
|
-
exports.declareRadialGradientShader = declareRadialGradientShader;
|
86
84
|
const declareSweepGradientShader = (ctx, props) => {
|
87
85
|
"worklet";
|
88
86
|
|
@@ -101,7 +99,6 @@ const declareSweepGradientShader = (ctx, props) => {
|
|
101
99
|
const shader = ctx.Skia.Shader.MakeSweepGradient(c.x, c.y, colors, positions, mode, localMatrix, flags, start, end);
|
102
100
|
ctx.shaders.push(shader);
|
103
101
|
};
|
104
|
-
exports.declareSweepGradientShader = declareSweepGradientShader;
|
105
102
|
const declareLinearGradientShader = (ctx, props) => {
|
106
103
|
"worklet";
|
107
104
|
|
@@ -119,7 +116,6 @@ const declareLinearGradientShader = (ctx, props) => {
|
|
119
116
|
const shader = ctx.Skia.Shader.MakeLinearGradient(start, end, colors, positions !== null && positions !== void 0 ? positions : null, mode, localMatrix, flags);
|
120
117
|
ctx.shaders.push(shader);
|
121
118
|
};
|
122
|
-
exports.declareLinearGradientShader = declareLinearGradientShader;
|
123
119
|
const declareTurbulenceShader = (ctx, props) => {
|
124
120
|
"worklet";
|
125
121
|
|
@@ -134,7 +130,6 @@ const declareTurbulenceShader = (ctx, props) => {
|
|
134
130
|
const shader = ctx.Skia.Shader.MakeTurbulence(freqX, freqY, octaves, seed, tileWidth, tileHeight);
|
135
131
|
ctx.shaders.push(shader);
|
136
132
|
};
|
137
|
-
exports.declareTurbulenceShader = declareTurbulenceShader;
|
138
133
|
const declareImageShader = (ctx, props) => {
|
139
134
|
"worklet";
|
140
135
|
|
@@ -166,8 +161,56 @@ const declareImageShader = (ctx, props) => {
|
|
166
161
|
const lm = ctx.Skia.Matrix();
|
167
162
|
lm.concat(m3);
|
168
163
|
(0, _nodes.processTransformProps)(lm, imageShaderProps);
|
169
|
-
const shader = image.makeShaderOptions(
|
164
|
+
const shader = image.makeShaderOptions(_types2.TileMode[(0, _nodes.enumKey)(tx)], _types2.TileMode[(0, _nodes.enumKey)(ty)], _types2.FilterMode[(0, _nodes.enumKey)(fm)], _types2.MipmapMode[(0, _nodes.enumKey)(mm)], lm);
|
170
165
|
ctx.shaders.push(shader);
|
171
166
|
};
|
172
|
-
|
173
|
-
|
167
|
+
const declareBlend = (ctx, props) => {
|
168
|
+
"worklet";
|
169
|
+
|
170
|
+
const blend = _types2.BlendMode[(0, _nodes.enumKey)(props.mode)];
|
171
|
+
const shaders = ctx.shaders.splice(0, ctx.shaders.length);
|
172
|
+
if (shaders.length > 0) {
|
173
|
+
const composer = ctx.Skia.Shader.MakeBlend.bind(ctx.Skia.Shader, blend);
|
174
|
+
ctx.shaders.push((0, _utils.composeDeclarations)(shaders, composer));
|
175
|
+
}
|
176
|
+
};
|
177
|
+
const isPushShader = command => {
|
178
|
+
"worklet";
|
179
|
+
|
180
|
+
return command.type === _Core.CommandType.PushShader;
|
181
|
+
};
|
182
|
+
exports.isPushShader = isPushShader;
|
183
|
+
const isShader = (command, type) => {
|
184
|
+
"worklet";
|
185
|
+
|
186
|
+
return command.shaderType === type;
|
187
|
+
};
|
188
|
+
const pushShader = (ctx, command) => {
|
189
|
+
"worklet";
|
190
|
+
|
191
|
+
if (isShader(command, _types.NodeType.Shader)) {
|
192
|
+
declareShader(ctx, command.props);
|
193
|
+
} else if (isShader(command, _types.NodeType.ImageShader)) {
|
194
|
+
declareImageShader(ctx, command.props);
|
195
|
+
} else if (isShader(command, _types.NodeType.ColorShader)) {
|
196
|
+
declareColorShader(ctx, command.props);
|
197
|
+
} else if (isShader(command, _types.NodeType.Turbulence)) {
|
198
|
+
declareTurbulenceShader(ctx, command.props);
|
199
|
+
} else if (isShader(command, _types.NodeType.FractalNoise)) {
|
200
|
+
declareFractalNoiseShader(ctx, command.props);
|
201
|
+
} else if (isShader(command, _types.NodeType.LinearGradient)) {
|
202
|
+
declareLinearGradientShader(ctx, command.props);
|
203
|
+
} else if (isShader(command, _types.NodeType.RadialGradient)) {
|
204
|
+
declareRadialGradientShader(ctx, command.props);
|
205
|
+
} else if (isShader(command, _types.NodeType.SweepGradient)) {
|
206
|
+
declareSweepGradientShader(ctx, command.props);
|
207
|
+
} else if (isShader(command, _types.NodeType.TwoPointConicalGradient)) {
|
208
|
+
declareTwoPointConicalGradientShader(ctx, command.props);
|
209
|
+
} else if (isShader(command, _types.NodeType.Blend)) {
|
210
|
+
declareBlend(ctx, command.props);
|
211
|
+
} else {
|
212
|
+
throw new Error(`Unknown shader type: ${command.shaderType}`);
|
213
|
+
}
|
214
|
+
};
|
215
|
+
exports.pushShader = pushShader;
|
216
|
+
//# sourceMappingURL=Shaders.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_nodes","require","_types","_types2","_utils","_Core","declareShader","ctx","props","source","uniforms","transform","m3","Skia","Matrix","processTransformProps","shader","makeShaderWithChildren","processUniforms","shaders","splice","length","push","declareColorShader","color","Shader","MakeColor","Color","declareFractalNoiseShader","freqX","freqY","octaves","seed","tileWidth","tileHeight","MakeFractalNoise","declareTwoPointConicalGradientShader","startR","endR","start","end","colors","positions","mode","localMatrix","flags","processGradientProps","MakeTwoPointConicalGradient","declareRadialGradientShader","c","r","MakeRadialGradient","declareSweepGradientShader","MakeSweepGradient","x","y","declareLinearGradientShader","MakeLinearGradient","declareTurbulenceShader","MakeTurbulence","declareImageShader","fit","image","tx","ty","fm","mm","imageShaderProps","rct","getRect","rects","fitRects","width","height","sx","sy","rect2rect","src","dst","translate","translateX","translateY","scale","scaleX","scaleY","lm","concat","makeShaderOptions","TileMode","enumKey","FilterMode","MipmapMode","declareBlend","blend","BlendMode","composer","MakeBlend","bind","composeDeclarations","isPushShader","command","type","CommandType","PushShader","exports","isShader","shaderType","pushShader","NodeType","ImageShader","ColorShader","Turbulence","FractalNoise","LinearGradient","RadialGradient","SweepGradient","TwoPointConicalGradient","Blend","Error"],"sources":["Shaders.ts"],"sourcesContent":["import {\n enumKey,\n fitRects,\n getRect,\n processGradientProps,\n processTransformProps,\n rect2rect,\n} from \"../../../dom/nodes\";\nimport { NodeType } from \"../../../dom/types\";\nimport type {\n BlendProps,\n ColorProps,\n FractalNoiseProps,\n ImageShaderProps,\n LinearGradientProps,\n RadialGradientProps,\n ShaderProps,\n SweepGradientProps,\n TurbulenceProps,\n TwoPointConicalGradientProps,\n} from \"../../../dom/types\";\nimport {\n BlendMode,\n FilterMode,\n MipmapMode,\n processUniforms,\n TileMode,\n} from \"../../../skia/types\";\nimport { composeDeclarations } from \"../../utils\";\nimport type { Command } from \"../Core\";\nimport { CommandType } from \"../Core\";\nimport type { DrawingContext } from \"../DrawingContext\";\n\nconst declareShader = (ctx: DrawingContext, props: ShaderProps) => {\n \"worklet\";\n const { source, uniforms, ...transform } = props;\n const m3 = ctx.Skia.Matrix();\n processTransformProps(m3, transform);\n const shader = source.makeShaderWithChildren(\n processUniforms(source, uniforms),\n ctx.shaders.splice(0, ctx.shaders.length),\n m3\n );\n ctx.shaders.push(shader);\n};\n\nconst declareColorShader = (ctx: DrawingContext, props: ColorProps) => {\n \"worklet\";\n const { color } = props;\n const shader = ctx.Skia.Shader.MakeColor(ctx.Skia.Color(color));\n ctx.shaders.push(shader);\n};\n\nconst declareFractalNoiseShader = (\n ctx: DrawingContext,\n props: FractalNoiseProps\n) => {\n \"worklet\";\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = props;\n const shader = ctx.Skia.Shader.MakeFractalNoise(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n ctx.shaders.push(shader);\n};\n\nconst declareTwoPointConicalGradientShader = (\n ctx: DrawingContext,\n props: TwoPointConicalGradientProps\n) => {\n \"worklet\";\n const { startR, endR, start, end } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeTwoPointConicalGradient(\n start,\n startR,\n end,\n endR,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n ctx.shaders.push(shader);\n};\n\nconst declareRadialGradientShader = (\n ctx: DrawingContext,\n props: RadialGradientProps\n) => {\n \"worklet\";\n const { c, r } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeRadialGradient(\n c,\n r,\n colors,\n positions,\n mode,\n localMatrix,\n flags\n );\n ctx.shaders.push(shader);\n};\n\nconst declareSweepGradientShader = (\n ctx: DrawingContext,\n props: SweepGradientProps\n) => {\n \"worklet\";\n const { c, start, end } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeSweepGradient(\n c.x,\n c.y,\n colors,\n positions,\n mode,\n localMatrix,\n flags,\n start,\n end\n );\n ctx.shaders.push(shader);\n};\n\nconst declareLinearGradientShader = (\n ctx: DrawingContext,\n props: LinearGradientProps\n) => {\n \"worklet\";\n const { start, end } = props;\n const { colors, positions, mode, localMatrix, flags } = processGradientProps(\n ctx.Skia,\n props\n );\n const shader = ctx.Skia.Shader.MakeLinearGradient(\n start,\n end,\n colors,\n positions ?? null,\n mode,\n localMatrix,\n flags\n );\n ctx.shaders.push(shader);\n};\n\nconst declareTurbulenceShader = (\n ctx: DrawingContext,\n props: TurbulenceProps\n) => {\n \"worklet\";\n const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = props;\n const shader = ctx.Skia.Shader.MakeTurbulence(\n freqX,\n freqY,\n octaves,\n seed,\n tileWidth,\n tileHeight\n );\n ctx.shaders.push(shader);\n};\n\nconst declareImageShader = (ctx: DrawingContext, props: ImageShaderProps) => {\n \"worklet\";\n const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = props;\n if (!image) {\n return;\n }\n\n const rct = getRect(ctx.Skia, imageShaderProps);\n const m3 = ctx.Skia.Matrix();\n if (rct) {\n const rects = fitRects(\n fit,\n { x: 0, y: 0, width: image.width(), height: image.height() },\n rct\n );\n const [x, y, sx, sy] = rect2rect(rects.src, rects.dst);\n m3.translate(x.translateX, y.translateY);\n m3.scale(sx.scaleX, sy.scaleY);\n }\n const lm = ctx.Skia.Matrix();\n lm.concat(m3);\n processTransformProps(lm, imageShaderProps);\n const shader = image.makeShaderOptions(\n TileMode[enumKey(tx)],\n TileMode[enumKey(ty)],\n FilterMode[enumKey(fm)],\n MipmapMode[enumKey(mm)],\n lm\n );\n ctx.shaders.push(shader);\n};\n\nconst declareBlend = (ctx: DrawingContext, props: BlendProps) => {\n \"worklet\";\n const blend = BlendMode[enumKey(props.mode as BlendProps[\"mode\"])];\n const shaders = ctx.shaders.splice(0, ctx.shaders.length);\n if (shaders.length > 0) {\n const composer = ctx.Skia.Shader.MakeBlend.bind(ctx.Skia.Shader, blend);\n ctx.shaders.push(composeDeclarations(shaders, composer));\n }\n};\n\nexport const isPushShader = (\n command: Command\n): command is Command<CommandType.PushShader> => {\n \"worklet\";\n return command.type === CommandType.PushShader;\n};\n\ntype Props = {\n [NodeType.Shader]: ShaderProps;\n [NodeType.ImageShader]: ImageShaderProps;\n [NodeType.ColorShader]: ColorProps;\n [NodeType.Turbulence]: TurbulenceProps;\n [NodeType.FractalNoise]: FractalNoiseProps;\n [NodeType.LinearGradient]: LinearGradientProps;\n [NodeType.RadialGradient]: RadialGradientProps;\n [NodeType.SweepGradient]: SweepGradientProps;\n [NodeType.TwoPointConicalGradient]: TwoPointConicalGradientProps;\n [NodeType.Blend]: BlendProps;\n};\n\ninterface PushShader<T extends keyof Props>\n extends Command<CommandType.PushShader> {\n shaderType: T;\n props: Props[T];\n}\n\nconst isShader = <T extends keyof Props>(\n command: Command<CommandType.PushShader>,\n type: T\n): command is PushShader<T> => {\n \"worklet\";\n return command.shaderType === type;\n};\n\nexport const pushShader = (\n ctx: DrawingContext,\n command: Command<CommandType.PushShader>\n) => {\n \"worklet\";\n if (isShader(command, NodeType.Shader)) {\n declareShader(ctx, command.props);\n } else if (isShader(command, NodeType.ImageShader)) {\n declareImageShader(ctx, command.props);\n } else if (isShader(command, NodeType.ColorShader)) {\n declareColorShader(ctx, command.props);\n } else if (isShader(command, NodeType.Turbulence)) {\n declareTurbulenceShader(ctx, command.props);\n } else if (isShader(command, NodeType.FractalNoise)) {\n declareFractalNoiseShader(ctx, command.props);\n } else if (isShader(command, NodeType.LinearGradient)) {\n declareLinearGradientShader(ctx, command.props);\n } else if (isShader(command, NodeType.RadialGradient)) {\n declareRadialGradientShader(ctx, command.props);\n } else if (isShader(command, NodeType.SweepGradient)) {\n declareSweepGradientShader(ctx, command.props);\n } else if (isShader(command, NodeType.TwoPointConicalGradient)) {\n declareTwoPointConicalGradientShader(ctx, command.props);\n } else if (isShader(command, NodeType.Blend)) {\n declareBlend(ctx, command.props);\n } else {\n throw new Error(`Unknown shader type: ${command.shaderType}`);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAaA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAGA,MAAMK,aAAa,GAAGA,CAACC,GAAmB,EAAEC,KAAkB,KAAK;EACjE,SAAS;;EACT,MAAM;IAAEC,MAAM;IAAEC,QAAQ;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EAChD,MAAMI,EAAE,GAAGL,GAAG,CAACM,IAAI,CAACC,MAAM,CAAC,CAAC;EAC5B,IAAAC,4BAAqB,EAACH,EAAE,EAAED,SAAS,CAAC;EACpC,MAAMK,MAAM,GAAGP,MAAM,CAACQ,sBAAsB,CAC1C,IAAAC,uBAAe,EAACT,MA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C,CAAC7B,GAAG,EAAE6F,OAAO,CAAC5F,KAAK,CAAC;EAC1D,CAAC,MAAM,IAAIiG,QAAQ,CAACL,OAAO,EAAEQ,eAAQ,CAACS,KAAK,CAAC,EAAE;IAC5CzB,YAAY,CAACrF,GAAG,EAAE6F,OAAO,CAAC5F,KAAK,CAAC;EAClC,CAAC,MAAM;IACL,MAAM,IAAI8G,KAAK,CAAC,wBAAwBlB,OAAO,CAACM,UAAU,EAAE,CAAC;EAC/D;AACF,CAAC;AAACF,OAAA,CAAAG,UAAA,GAAAA,UAAA","ignoreList":[]}
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import type { SharedValue } from "react-native-reanimated";
|
2
2
|
export declare const isSharedValue: <T = unknown>(value: unknown) => value is SharedValue<T>;
|
3
3
|
export declare const materialize: <T extends object>(props: T) => T;
|
4
|
+
type Composer<T> = (outer: T, inner: T) => T;
|
5
|
+
export declare const composeDeclarations: <T>(filters: T[], composer: Composer<T>) => T;
|
6
|
+
export {};
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.materialize = exports.isSharedValue = void 0;
|
7
|
-
var _typeddash = require("
|
6
|
+
exports.materialize = exports.isSharedValue = exports.composeDeclarations = void 0;
|
7
|
+
var _typeddash = require("../renderer/typeddash");
|
8
8
|
const isSharedValue = value => {
|
9
9
|
"worklet";
|
10
10
|
|
@@ -25,4 +25,14 @@ const materialize = props => {
|
|
25
25
|
return result;
|
26
26
|
};
|
27
27
|
exports.materialize = materialize;
|
28
|
+
const composeDeclarations = (filters, composer) => {
|
29
|
+
"worklet";
|
30
|
+
|
31
|
+
const len = filters.length;
|
32
|
+
if (len <= 1) {
|
33
|
+
return filters[0];
|
34
|
+
}
|
35
|
+
return filters.reduceRight((inner, outer) => inner ? composer(outer, inner) : outer);
|
36
|
+
};
|
37
|
+
exports.composeDeclarations = composeDeclarations;
|
28
38
|
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_typeddash","require","isSharedValue","value","_isReanimatedSharedValue","exports","materialize","props","result","Object","assign","mapKeys","forEach","key","composeDeclarations","filters","composer","len","length","reduceRight","inner","outer"],"sources":["utils.ts"],"sourcesContent":["import type { SharedValue } from \"react-native-reanimated\";\n\nimport { mapKeys } from \"../renderer/typeddash\";\n\nexport const isSharedValue = <T = unknown>(\n value: unknown\n): value is SharedValue<T> => {\n \"worklet\";\n // We cannot use `in` operator here because `value` could be a HostObject and therefore we cast.\n return (value as Record<string, unknown>)?._isReanimatedSharedValue === true;\n};\n\nexport const materialize = <T extends object>(props: T) => {\n \"worklet\";\n const result: T = Object.assign({}, props);\n mapKeys(result).forEach((key) => {\n const value = result[key];\n if (isSharedValue(value)) {\n result[key] = value.value as never;\n }\n });\n return result;\n};\n\ntype Composer<T> = (outer: T, inner: T) => T;\n\nexport const composeDeclarations = <T>(filters: T[], composer: Composer<T>) => {\n \"worklet\";\n const len = filters.length;\n if (len <= 1) {\n return filters[0];\n }\n return filters.reduceRight((inner, outer) =>\n inner ? composer(outer, inner) : outer\n );\n};\n"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAEO,MAAMC,aAAa,GACxBC,KAAc,IACc;EAC5B,SAAS;;EACT;EACA,OAAO,CAACA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAA8BC,wBAAwB,MAAK,IAAI;AAC9E,CAAC;AAACC,OAAA,CAAAH,aAAA,GAAAA,aAAA;AAEK,MAAMI,WAAW,GAAsBC,KAAQ,IAAK;EACzD,SAAS;;EACT,MAAMC,MAAS,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEH,KAAK,CAAC;EAC1C,IAAAI,kBAAO,EAACH,MAAM,CAAC,CAACI,OAAO,CAAEC,GAAG,IAAK;IAC/B,MAAMV,KAAK,GAAGK,MAAM,CAACK,GAAG,CAAC;IACzB,IAAIX,aAAa,CAACC,KAAK,CAAC,EAAE;MACxBK,MAAM,CAACK,GAAG,CAAC,GAAGV,KAAK,CAACA,KAAc;IACpC;EACF,CAAC,CAAC;EACF,OAAOK,MAAM;AACf,CAAC;AAACH,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAIK,MAAMQ,mBAAmB,GAAGA,CAAIC,OAAY,EAAEC,QAAqB,KAAK;EAC7E,SAAS;;EACT,MAAMC,GAAG,GAAGF,OAAO,CAACG,MAAM;EAC1B,IAAID,GAAG,IAAI,CAAC,EAAE;IACZ,OAAOF,OAAO,CAAC,CAAC,CAAC;EACnB;EACA,OAAOA,OAAO,CAACI,WAAW,CAAC,CAACC,KAAK,EAAEC,KAAK,KACtCD,KAAK,GAAGJ,QAAQ,CAACK,KAAK,EAAED,KAAK,CAAC,GAAGC,KACnC,CAAC;AACH,CAAC;AAAChB,OAAA,CAAAS,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
@@ -38,6 +38,11 @@ export interface TransformProps {
|
|
38
38
|
origin?: Vector;
|
39
39
|
matrix?: InputMatrix;
|
40
40
|
}
|
41
|
+
export interface CTMProps extends TransformProps {
|
42
|
+
clip?: ClipDef;
|
43
|
+
invertClip?: boolean;
|
44
|
+
layer?: SkPaint | boolean;
|
45
|
+
}
|
41
46
|
export interface PaintProps extends ChildrenProps {
|
42
47
|
color?: Color;
|
43
48
|
strokeWidth?: number;
|
@@ -50,8 +55,5 @@ export interface PaintProps extends ChildrenProps {
|
|
50
55
|
antiAlias?: boolean;
|
51
56
|
dither?: boolean;
|
52
57
|
}
|
53
|
-
export interface GroupProps extends PaintProps,
|
54
|
-
clip?: ClipDef;
|
55
|
-
invertClip?: boolean;
|
56
|
-
layer?: SkPaint | boolean;
|
58
|
+
export interface GroupProps extends PaintProps, CTMProps {
|
57
59
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["Common.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type {\n BlendMode,\n Color,\n InputMatrix,\n InputRRect,\n PaintStyle,\n SkPaint,\n SkPath,\n SkRect,\n SkRRect,\n StrokeCap,\n StrokeJoin,\n Transforms3d,\n Vector,\n} from \"../../skia/types\";\n\nexport type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;\n\nexport type PathDef = string | SkPath;\n\nexport type ClipDef = SkRRect | SkRect | PathDef;\n\nexport type Fit =\n | \"cover\"\n | \"contain\"\n | \"fill\"\n | \"fitHeight\"\n | \"fitWidth\"\n | \"none\"\n | \"scaleDown\";\n\nexport type Radius = number | Vector;\n\nexport interface ChildrenProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport interface RectCtor {\n x?: number;\n y?: number;\n width: number;\n height: number;\n}\n\nexport interface RRectCtor extends RectCtor {\n r?: Radius;\n}\n\nexport type RectDef = RectCtor | { rect: SkRect };\nexport type RRectDef = RRectCtor | { rect: InputRRect };\n\nexport interface PointCircleDef {\n c?: Vector;\n r: number;\n}\n\nexport interface ScalarCircleDef {\n cx: number;\n cy: number;\n r: number;\n}\n\nexport type CircleDef = PointCircleDef | ScalarCircleDef;\n\nexport interface TransformProps {\n transform?: Transforms3d;\n origin?: Vector;\n matrix?: InputMatrix;\n}\n\nexport interface PaintProps extends ChildrenProps {\n color?: Color;\n strokeWidth?: number;\n blendMode?: SkEnum<typeof BlendMode>;\n style?: SkEnum<typeof PaintStyle>;\n strokeJoin?: SkEnum<typeof StrokeJoin>;\n strokeCap?: SkEnum<typeof StrokeCap>;\n strokeMiter?: number;\n opacity?: number;\n antiAlias?: boolean;\n dither?: boolean;\n}\n\nexport interface GroupProps extends PaintProps,
|
1
|
+
{"version":3,"names":[],"sources":["Common.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type {\n BlendMode,\n Color,\n InputMatrix,\n InputRRect,\n PaintStyle,\n SkPaint,\n SkPath,\n SkRect,\n SkRRect,\n StrokeCap,\n StrokeJoin,\n Transforms3d,\n Vector,\n} from \"../../skia/types\";\n\nexport type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;\n\nexport type PathDef = string | SkPath;\n\nexport type ClipDef = SkRRect | SkRect | PathDef;\n\nexport type Fit =\n | \"cover\"\n | \"contain\"\n | \"fill\"\n | \"fitHeight\"\n | \"fitWidth\"\n | \"none\"\n | \"scaleDown\";\n\nexport type Radius = number | Vector;\n\nexport interface ChildrenProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport interface RectCtor {\n x?: number;\n y?: number;\n width: number;\n height: number;\n}\n\nexport interface RRectCtor extends RectCtor {\n r?: Radius;\n}\n\nexport type RectDef = RectCtor | { rect: SkRect };\nexport type RRectDef = RRectCtor | { rect: InputRRect };\n\nexport interface PointCircleDef {\n c?: Vector;\n r: number;\n}\n\nexport interface ScalarCircleDef {\n cx: number;\n cy: number;\n r: number;\n}\n\nexport type CircleDef = PointCircleDef | ScalarCircleDef;\n\nexport interface TransformProps {\n transform?: Transforms3d;\n origin?: Vector;\n matrix?: InputMatrix;\n}\n\nexport interface CTMProps extends TransformProps {\n clip?: ClipDef;\n invertClip?: boolean;\n layer?: SkPaint | boolean;\n}\n\nexport interface PaintProps extends ChildrenProps {\n color?: Color;\n strokeWidth?: number;\n blendMode?: SkEnum<typeof BlendMode>;\n style?: SkEnum<typeof PaintStyle>;\n strokeJoin?: SkEnum<typeof StrokeJoin>;\n strokeCap?: SkEnum<typeof StrokeCap>;\n strokeMiter?: number;\n opacity?: number;\n antiAlias?: boolean;\n dither?: boolean;\n}\n\nexport interface GroupProps extends PaintProps, CTMProps {}\n"],"mappings":"","ignoreList":[]}
|
@@ -13,7 +13,7 @@ export interface RuntimeShaderImageFilterProps extends ChildrenProps {
|
|
13
13
|
uniforms?: Uniforms;
|
14
14
|
}
|
15
15
|
export interface BlendImageFilterProps extends ChildrenProps {
|
16
|
-
mode: BlendMode
|
16
|
+
mode: SkEnum<typeof BlendMode>;
|
17
17
|
}
|
18
18
|
export interface MorphologyImageFilterProps extends ChildrenProps {
|
19
19
|
operator: "erode" | "dilate";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["ImageFilters.ts"],"sourcesContent":["import type {\n BlendMode,\n Color,\n ColorChannel,\n SkRuntimeEffect,\n TileMode,\n Uniforms,\n} from \"../../skia/types\";\n\nimport type { Radius, SkEnum, ChildrenProps } from \"./Common\";\n\nexport interface BlurImageFilterProps extends ChildrenProps {\n blur: Radius;\n mode: SkEnum<typeof TileMode>;\n}\n\nexport interface OffsetImageFilterProps extends ChildrenProps {\n x: number;\n y: number;\n}\n\nexport interface RuntimeShaderImageFilterProps extends ChildrenProps {\n source: SkRuntimeEffect;\n uniforms?: Uniforms;\n}\n\nexport interface BlendImageFilterProps extends ChildrenProps {\n mode: BlendMode
|
1
|
+
{"version":3,"names":[],"sources":["ImageFilters.ts"],"sourcesContent":["import type {\n BlendMode,\n Color,\n ColorChannel,\n SkRuntimeEffect,\n TileMode,\n Uniforms,\n} from \"../../skia/types\";\n\nimport type { Radius, SkEnum, ChildrenProps } from \"./Common\";\n\nexport interface BlurImageFilterProps extends ChildrenProps {\n blur: Radius;\n mode: SkEnum<typeof TileMode>;\n}\n\nexport interface OffsetImageFilterProps extends ChildrenProps {\n x: number;\n y: number;\n}\n\nexport interface RuntimeShaderImageFilterProps extends ChildrenProps {\n source: SkRuntimeEffect;\n uniforms?: Uniforms;\n}\n\n// TODO: delete\nexport interface BlendImageFilterProps extends ChildrenProps {\n mode: SkEnum<typeof BlendMode>;\n}\n\nexport interface MorphologyImageFilterProps extends ChildrenProps {\n operator: \"erode\" | \"dilate\";\n radius: Radius;\n}\n\nexport interface DropShadowImageFilterProps extends ChildrenProps {\n dx: number;\n dy: number;\n blur: number;\n color: Color;\n inner?: boolean;\n shadowOnly?: boolean;\n}\n\nexport interface DisplacementMapImageFilterProps extends ChildrenProps {\n channelX: SkEnum<typeof ColorChannel>;\n channelY: SkEnum<typeof ColorChannel>;\n scale: number;\n}\n\nexport interface BlendProps extends ChildrenProps {\n mode: SkEnum<typeof BlendMode>;\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { GroupProps } from "./Common";
|
2
2
|
import type { NodeType } from "./NodeType";
|
3
|
-
import type { DeclarationContext } from "../../sksg/DeclarationContext";
|
4
3
|
export interface Node<P> {
|
5
4
|
type: NodeType;
|
6
5
|
setProps(props: P): void;
|
@@ -13,7 +12,6 @@ export interface Node<P> {
|
|
13
12
|
}
|
14
13
|
export type Invalidate = () => void;
|
15
14
|
export interface DeclarationNode<P> extends Node<P> {
|
16
|
-
decorate(ctx: DeclarationContext): void;
|
17
15
|
setInvalidate(invalidate: Invalidate): void;
|
18
16
|
}
|
19
17
|
export type RenderNode<P extends GroupProps> = Node<P>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type { GroupProps } from \"./Common\";\nimport type { NodeType } from \"./NodeType\";\
|
1
|
+
{"version":3,"names":[],"sources":["Node.ts"],"sourcesContent":["import type { GroupProps } from \"./Common\";\nimport type { NodeType } from \"./NodeType\";\n\nexport interface Node<P> {\n type: NodeType;\n\n setProps(props: P): void;\n setProp<K extends keyof P>(name: K, v: P[K]): boolean;\n getProps(): P;\n\n children(): Node<unknown>[];\n addChild(child: Node<unknown>): void;\n removeChild(child: Node<unknown>): void;\n insertChildBefore(child: Node<unknown>, before: Node<unknown>): void;\n}\n\nexport type Invalidate = () => void;\n\nexport interface DeclarationNode<P> extends Node<P> {\n setInvalidate(invalidate: Invalidate): void;\n}\n\nexport type RenderNode<P extends GroupProps> = Node<P>;\n"],"mappings":"","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAnimatedImageValue\";\nexport * from \"./
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAnimatedImageValue\";\nexport * from \"./renderHelpers\";\nexport * from \"./interpolators\";\nexport * from \"./textures\";\nexport * from \"./buffers\";\nexport * from \"./useVideo\";\n"],"mappings":"AAAA,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,cAAc,YAAY","ignoreList":[]}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { Container } from "../../renderer/Container";
|
2
2
|
import type { AnimatedProps } from "../../renderer/processors";
|
3
3
|
import type { Node } from "../../dom/types";
|
4
|
-
export declare let HAS_REANIMATED: boolean;
|
5
4
|
export declare let HAS_REANIMATED_3: boolean;
|
6
5
|
export declare const unbindReanimatedNode: (node: Node<unknown>) => void;
|
7
6
|
export declare function extractReanimatedProps(props: AnimatedProps<any>): AnimatedProps<any, never>[];
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
2
|
|
3
3
|
import Rea from "./ReanimatedProxy";
|
4
|
-
export let HAS_REANIMATED = false;
|
5
4
|
export let HAS_REANIMATED_3 = false;
|
6
5
|
try {
|
7
6
|
// This logic is convoluted but necessary
|
@@ -10,16 +9,15 @@ try {
|
|
10
9
|
// So it will not throw an error and we need to check the version to know if it's there.
|
11
10
|
const reanimatedVersion = require("react-native-reanimated/package.json").version;
|
12
11
|
require("react-native-reanimated");
|
13
|
-
HAS_REANIMATED = !!reanimatedVersion;
|
14
12
|
if (reanimatedVersion && (reanimatedVersion >= "3.0.0" || reanimatedVersion.includes("3.0.0-"))) {
|
15
13
|
HAS_REANIMATED_3 = true;
|
16
14
|
}
|
17
15
|
} catch (e) {
|
18
|
-
|
16
|
+
// do nothing
|
19
17
|
}
|
20
18
|
const _bindings = new WeakMap();
|
21
19
|
export const unbindReanimatedNode = node => {
|
22
|
-
if (!
|
20
|
+
if (!HAS_REANIMATED_3) {
|
23
21
|
return;
|
24
22
|
}
|
25
23
|
const previousMapperId = _bindings.get(node);
|
@@ -28,7 +26,7 @@ export const unbindReanimatedNode = node => {
|
|
28
26
|
}
|
29
27
|
};
|
30
28
|
export function extractReanimatedProps(props) {
|
31
|
-
if (!
|
29
|
+
if (!HAS_REANIMATED_3) {
|
32
30
|
return [props, {}];
|
33
31
|
}
|
34
32
|
const reanimatedProps = {};
|
@@ -47,44 +45,8 @@ export function extractReanimatedProps(props) {
|
|
47
45
|
}
|
48
46
|
return [otherProps, reanimatedProps];
|
49
47
|
}
|
50
|
-
function bindReanimatedProps2(container, node, reanimatedProps) {
|
51
|
-
const sharedValues = Object.values(reanimatedProps);
|
52
|
-
const previousMapperId = _bindings.get(node);
|
53
|
-
if (previousMapperId !== undefined) {
|
54
|
-
Rea.stopMapper(previousMapperId);
|
55
|
-
}
|
56
|
-
if (sharedValues.length > 0) {
|
57
|
-
const viewId = container.getNativeId();
|
58
|
-
const {
|
59
|
-
SkiaViewApi
|
60
|
-
} = global;
|
61
|
-
const updateProps = () => {
|
62
|
-
for (const propName in reanimatedProps) {
|
63
|
-
node && node.setProp(propName, reanimatedProps[propName].value);
|
64
|
-
}
|
65
|
-
// On React Native we use the SkiaViewApi to redraw because it can
|
66
|
-
// run on the worklet thread (container.redraw can't)
|
67
|
-
// if SkiaViewApi is undefined, we are on web and container.redraw()
|
68
|
-
// can safely be invoked
|
69
|
-
if (SkiaViewApi) {
|
70
|
-
SkiaViewApi.requestRedraw(viewId);
|
71
|
-
} else {
|
72
|
-
container.redraw();
|
73
|
-
}
|
74
|
-
};
|
75
|
-
const mapperId = Rea.startMapper(() => {
|
76
|
-
"worklet";
|
77
|
-
|
78
|
-
Rea.runOnJS(updateProps)();
|
79
|
-
}, sharedValues);
|
80
|
-
_bindings.set(node, mapperId);
|
81
|
-
}
|
82
|
-
}
|
83
48
|
export function bindReanimatedProps(container, node, reanimatedProps) {
|
84
|
-
if (
|
85
|
-
return bindReanimatedProps2(container, node, reanimatedProps);
|
86
|
-
}
|
87
|
-
if (!HAS_REANIMATED) {
|
49
|
+
if (!HAS_REANIMATED_3) {
|
88
50
|
return;
|
89
51
|
}
|
90
52
|
const sharedValues = Object.values(reanimatedProps);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Rea","
|
1
|
+
{"version":3,"names":["Rea","HAS_REANIMATED_3","reanimatedVersion","require","version","includes","e","_bindings","WeakMap","unbindReanimatedNode","node","previousMapperId","get","undefined","stopMapper","extractReanimatedProps","props","reanimatedProps","otherProps","propName","propValue","isSharedValue","value","bindReanimatedProps","container","sharedValues","Object","values","length","viewId","getNativeId","SkiaViewApi","global","mapperId","startMapper","setProp","requestRedraw","redraw","set"],"sources":["renderHelpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Container } from \"../../renderer/Container\";\nimport type { AnimatedProps } from \"../../renderer/processors\";\nimport type { Node } from \"../../dom/types\";\n\nimport Rea from \"./ReanimatedProxy\";\n\nexport let HAS_REANIMATED_3 = false;\ntry {\n // This logic is convoluted but necessary\n // In most systems, `require(\"react-native-reanimated\")` throws an error, all is well.\n // In webpack, in some configuration it will return an empty object.\n // So it will not throw an error and we need to check the version to know if it's there.\n const reanimatedVersion =\n require(\"react-native-reanimated/package.json\").version;\n require(\"react-native-reanimated\");\n if (\n reanimatedVersion &&\n (reanimatedVersion >= \"3.0.0\" || reanimatedVersion.includes(\"3.0.0-\"))\n ) {\n HAS_REANIMATED_3 = true;\n }\n} catch (e) {\n // do nothing\n}\n\nconst _bindings = new WeakMap<Node<unknown>, unknown>();\n\nexport const unbindReanimatedNode = (node: Node<unknown>) => {\n if (!HAS_REANIMATED_3) {\n return;\n }\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n Rea.stopMapper(previousMapperId as number);\n }\n};\n\nexport function extractReanimatedProps(props: AnimatedProps<any>) {\n if (!HAS_REANIMATED_3) {\n return [props, {}];\n }\n const reanimatedProps = {} as AnimatedProps<any>;\n const otherProps = {} as AnimatedProps<any>;\n for (const propName in props) {\n if (propName === \"children\") {\n continue;\n }\n const propValue = props[propName];\n if (Rea.isSharedValue(propValue)) {\n reanimatedProps[propName] = propValue;\n otherProps[propName] = propValue.value;\n } else {\n otherProps[propName] = propValue;\n }\n }\n return [otherProps, reanimatedProps];\n}\n\nexport function bindReanimatedProps(\n container: Container,\n node: Node<any>,\n reanimatedProps: AnimatedProps<any>\n) {\n if (!HAS_REANIMATED_3) {\n return;\n }\n const sharedValues = Object.values(reanimatedProps);\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n Rea.stopMapper(previousMapperId as number);\n }\n if (sharedValues.length > 0) {\n const viewId = container.getNativeId();\n const { SkiaViewApi } = global;\n const mapperId = Rea.startMapper(() => {\n \"worklet\";\n if (node) {\n for (const propName in reanimatedProps) {\n node.setProp(propName, reanimatedProps[propName].value);\n }\n }\n // On React Native we use the SkiaViewApi to redraw because it can\n // run on the worklet thread (container.redraw can't)\n // if SkiaViewApi is undefined, we are on web and container.redraw()\n // can safely be invoked\n if (SkiaViewApi) {\n SkiaViewApi.requestRedraw(viewId);\n } else {\n container.redraw();\n }\n }, sharedValues);\n _bindings.set(node, mapperId);\n }\n}\n"],"mappings":"AAAA;;AAMA,OAAOA,GAAG,MAAM,mBAAmB;AAEnC,OAAO,IAAIC,gBAAgB,GAAG,KAAK;AACnC,IAAI;EACF;EACA;EACA;EACA;EACA,MAAMC,iBAAiB,GACrBC,OAAO,CAAC,sCAAsC,CAAC,CAACC,OAAO;EACzDD,OAAO,CAAC,yBAAyB,CAAC;EAClC,IACED,iBAAiB,KAChBA,iBAAiB,IAAI,OAAO,IAAIA,iBAAiB,CAACG,QAAQ,CAAC,QAAQ,CAAC,CAAC,EACtE;IACAJ,gBAAgB,GAAG,IAAI;EACzB;AACF,CAAC,CAAC,OAAOK,CAAC,EAAE;EACV;AAAA;AAGF,MAAMC,SAAS,GAAG,IAAIC,OAAO,CAAyB,CAAC;AAEvD,OAAO,MAAMC,oBAAoB,GAAIC,IAAmB,IAAK;EAC3D,IAAI,CAACT,gBAAgB,EAAE;IACrB;EACF;EACA,MAAMU,gBAAgB,GAAGJ,SA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,MAAM;MAAEC;IAAY,CAAC,GAAGC,MAAM;IAC9B,MAAMC,QAAQ,GAAGjC,GAAG,CAACkC,WAAW,CAAC,MAAM;MACrC,SAAS;;MACT,IAAIxB,IAAI,EAAE;QACR,KAAK,MAAMS,QAAQ,IAAIF,eAAe,EAAE;UACtCP,IAAI,CAACyB,OAAO,CAAChB,QAAQ,EAAEF,eAAe,CAACE,QAAQ,CAAC,CAACG,KAAK,CAAC;QACzD;MACF;MACA;MACA;MACA;MACA;MACA,IAAIS,WAAW,EAAE;QACfA,WAAW,CAACK,aAAa,CAACP,MAAM,CAAC;MACnC,CAAC,MAAM;QACLL,SAAS,CAACa,MAAM,CAAC,CAAC;MACpB;IACF,CAAC,EAAEZ,YAAY,CAAC;IAChBlB,SAAS,CAAC+B,GAAG,CAAC5B,IAAI,EAAEuB,QAAQ,CAAC;EAC/B;AACF","ignoreList":[]}
|
@@ -35,6 +35,7 @@ export interface SkPaint extends SkJSIInstance<"Paint"> {
|
|
35
35
|
SkPaint with the result of SkPaint().
|
36
36
|
*/
|
37
37
|
reset(): void;
|
38
|
+
assign(paint: SkPaint): void;
|
38
39
|
/**
|
39
40
|
* Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values
|
40
41
|
* (sRGB gamut, and encoded with the sRGB transfer function).
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["PaintStyle","StrokeCap","StrokeJoin","isPaint","obj","__typename__"],"sources":["Paint.ts"],"sourcesContent":["import type { SkImageFilter } from \"../ImageFilter\";\nimport type { SkMaskFilter } from \"../MaskFilter\";\nimport type { SkColorFilter } from \"../ColorFilter\";\nimport type { SkColor } from \"../Color\";\nimport type { SkPathEffect } from \"../PathEffect\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkShader } from \"../Shader\";\n\nimport type { BlendMode } from \"./BlendMode\";\n\nexport enum PaintStyle {\n Fill,\n Stroke,\n}\n\nexport enum StrokeCap {\n Butt,\n Round,\n Square,\n}\n\nexport enum StrokeJoin {\n Miter,\n Round,\n Bevel,\n}\n\nexport const isPaint = (obj: SkJSIInstance<string> | null): obj is SkPaint =>\n obj !== null && obj.__typename__ === \"Paint\";\n\nexport interface SkPaint extends SkJSIInstance<\"Paint\"> {\n /**\n * Retrieves alpha from the color used when stroking and filling.\n */\n getAlphaf(): number;\n\n /**\n * Returns a copy of this paint.\n */\n copy(): SkPaint;\n\n /**\n * Sets all SkPaint contents to their initial values. This is equivalent to replacing\n SkPaint with the result of SkPaint().\n */\n reset(): void;\n\n /**\n * Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values\n * (sRGB gamut, and encoded with the sRGB transfer function).\n */\n getColor(): SkColor;\n\n /**\n * Returns the geometry drawn at the beginning and end of strokes.\n */\n getStrokeCap(): StrokeCap;\n\n /**\n * Returns the geometry drawn at the corners of strokes.\n */\n getStrokeJoin(): StrokeJoin;\n\n /**\n * Returns the limit at which a sharp corner is drawn beveled.\n */\n getStrokeMiter(): number;\n\n /**\n * Returns the thickness of the pen used to outline the shape.\n */\n getStrokeWidth(): number;\n\n /**\n * Replaces alpha, leaving RGBA unchanged. 0 means fully transparent, 1.0 means opaque.\n * @param alpha\n */\n setAlphaf(alpha: number): void;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with\n * partial transparency.\n * @param aa\n */\n setAntiAlias: (aa: boolean) => void;\n\n /**\n * Requests, but does not require, to distribute color error.\n * @param dither\n */\n setDither: (dither: boolean) => void;\n\n /**\n * Sets the blend mode that is, the mode used to combine source color\n * with destination color.\n * @param mode\n */\n setBlendMode: (blendMode: BlendMode) => void;\n\n /**\n * Sets alpha and RGB used when stroking and filling. The color is a 32-bit\n * value, unpremultiplied, packing 8-bit components for alpha, red, blue,\n * and green.\n *\n * @param color unpremultiplied ARGB\n *\n * example: https://fiddle.skia.org/c/@Paint_setColor\n */\n setColor(color: SkColor): void;\n\n /**\n * Sets the current color filter, replacing the existing one if there was one.\n * @param filter\n */\n setColorFilter(filter: SkColorFilter | null): void;\n\n /**\n * Sets the current image filter, replacing the existing one if there was one.\n * @param filter\n */\n setImageFilter(filter: SkImageFilter | null): void;\n\n /**\n * Sets the current mask filter, replacing the existing one if there was one.\n * @param filter\n */\n setMaskFilter(filter: SkMaskFilter | null): void;\n\n /**\n * Sets the current path effect, replacing the existing one if there was one.\n * @param effect\n */\n setPathEffect(effect: SkPathEffect | null): void;\n\n /**\n * Sets the current shader, replacing the existing one if there was one.\n * @param shader\n */\n setShader(shader: SkShader | null): void;\n\n /**\n * Sets the geometry drawn at the beginning and end of strokes.\n * @param cap\n */\n setStrokeCap(cap: StrokeCap): void;\n\n /**\n * Sets the geometry drawn at the corners of strokes.\n * @param join\n */\n setStrokeJoin(join: StrokeJoin): void;\n\n /**\n * Sets the limit at which a sharp corner is drawn beveled.\n * @param limit\n */\n setStrokeMiter(limit: number): void;\n\n /**\n * Sets the thickness of the pen used to outline the shape.\n * @param width\n */\n setStrokeWidth(width: number): void;\n\n /**\n * Sets whether the geometry is filled or stroked.\n * @param style\n */\n setStyle(style: PaintStyle): void;\n}\n"],"mappings":"AAUA,WAAYA,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAKtB,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAMrB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAMtB,OAAO,MAAMC,OAAO,GAAIC,GAAiC,IACvDA,GAAG,KAAK,IAAI,IAAIA,GAAG,CAACC,YAAY,KAAK,OAAO","ignoreList":[]}
|
1
|
+
{"version":3,"names":["PaintStyle","StrokeCap","StrokeJoin","isPaint","obj","__typename__"],"sources":["Paint.ts"],"sourcesContent":["import type { SkImageFilter } from \"../ImageFilter\";\nimport type { SkMaskFilter } from \"../MaskFilter\";\nimport type { SkColorFilter } from \"../ColorFilter\";\nimport type { SkColor } from \"../Color\";\nimport type { SkPathEffect } from \"../PathEffect\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkShader } from \"../Shader\";\n\nimport type { BlendMode } from \"./BlendMode\";\n\nexport enum PaintStyle {\n Fill,\n Stroke,\n}\n\nexport enum StrokeCap {\n Butt,\n Round,\n Square,\n}\n\nexport enum StrokeJoin {\n Miter,\n Round,\n Bevel,\n}\n\nexport const isPaint = (obj: SkJSIInstance<string> | null): obj is SkPaint =>\n obj !== null && obj.__typename__ === \"Paint\";\n\nexport interface SkPaint extends SkJSIInstance<\"Paint\"> {\n /**\n * Retrieves alpha from the color used when stroking and filling.\n */\n getAlphaf(): number;\n\n /**\n * Returns a copy of this paint.\n */\n copy(): SkPaint;\n\n /**\n * Sets all SkPaint contents to their initial values. This is equivalent to replacing\n SkPaint with the result of SkPaint().\n */\n reset(): void;\n\n assign(paint: SkPaint): void;\n\n /**\n * Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values\n * (sRGB gamut, and encoded with the sRGB transfer function).\n */\n getColor(): SkColor;\n\n /**\n * Returns the geometry drawn at the beginning and end of strokes.\n */\n getStrokeCap(): StrokeCap;\n\n /**\n * Returns the geometry drawn at the corners of strokes.\n */\n getStrokeJoin(): StrokeJoin;\n\n /**\n * Returns the limit at which a sharp corner is drawn beveled.\n */\n getStrokeMiter(): number;\n\n /**\n * Returns the thickness of the pen used to outline the shape.\n */\n getStrokeWidth(): number;\n\n /**\n * Replaces alpha, leaving RGBA unchanged. 0 means fully transparent, 1.0 means opaque.\n * @param alpha\n */\n setAlphaf(alpha: number): void;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with\n * partial transparency.\n * @param aa\n */\n setAntiAlias: (aa: boolean) => void;\n\n /**\n * Requests, but does not require, to distribute color error.\n * @param dither\n */\n setDither: (dither: boolean) => void;\n\n /**\n * Sets the blend mode that is, the mode used to combine source color\n * with destination color.\n * @param mode\n */\n setBlendMode: (blendMode: BlendMode) => void;\n\n /**\n * Sets alpha and RGB used when stroking and filling. The color is a 32-bit\n * value, unpremultiplied, packing 8-bit components for alpha, red, blue,\n * and green.\n *\n * @param color unpremultiplied ARGB\n *\n * example: https://fiddle.skia.org/c/@Paint_setColor\n */\n setColor(color: SkColor): void;\n\n /**\n * Sets the current color filter, replacing the existing one if there was one.\n * @param filter\n */\n setColorFilter(filter: SkColorFilter | null): void;\n\n /**\n * Sets the current image filter, replacing the existing one if there was one.\n * @param filter\n */\n setImageFilter(filter: SkImageFilter | null): void;\n\n /**\n * Sets the current mask filter, replacing the existing one if there was one.\n * @param filter\n */\n setMaskFilter(filter: SkMaskFilter | null): void;\n\n /**\n * Sets the current path effect, replacing the existing one if there was one.\n * @param effect\n */\n setPathEffect(effect: SkPathEffect | null): void;\n\n /**\n * Sets the current shader, replacing the existing one if there was one.\n * @param shader\n */\n setShader(shader: SkShader | null): void;\n\n /**\n * Sets the geometry drawn at the beginning and end of strokes.\n * @param cap\n */\n setStrokeCap(cap: StrokeCap): void;\n\n /**\n * Sets the geometry drawn at the corners of strokes.\n * @param join\n */\n setStrokeJoin(join: StrokeJoin): void;\n\n /**\n * Sets the limit at which a sharp corner is drawn beveled.\n * @param limit\n */\n setStrokeMiter(limit: number): void;\n\n /**\n * Sets the thickness of the pen used to outline the shape.\n * @param width\n */\n setStrokeWidth(width: number): void;\n\n /**\n * Sets whether the geometry is filled or stroked.\n * @param style\n */\n setStyle(style: PaintStyle): void;\n}\n"],"mappings":"AAUA,WAAYA,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAKtB,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAMrB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAMtB,OAAO,MAAMC,OAAO,GAAIC,GAAiC,IACvDA,GAAG,KAAK,IAAI,IAAIA,GAAG,CAACC,YAAY,KAAK,OAAO","ignoreList":[]}
|
@@ -5,6 +5,7 @@ export declare class JsiSkPaint extends HostObject<Paint, "Paint"> implements Sk
|
|
5
5
|
constructor(CanvasKit: CanvasKit, ref: Paint);
|
6
6
|
dispose: () => void;
|
7
7
|
copy(): JsiSkPaint;
|
8
|
+
assign(paint: JsiSkPaint): void;
|
8
9
|
reset(): void;
|
9
10
|
getAlphaf(): number;
|
10
11
|
getColor(): Float32Array;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","getEnum","JsiSkColorFilter","JsiSkImageFilter","JsiSkMaskFilter","JsiSkPathEffect","JsiSkShader","JsiSkPaint","constructor","CanvasKit","ref","_defineProperty","delete","copy","reset","Paint","getAlphaf","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setDither","dither","setBlendMode","blendMode","BlendMode","setColor","color","setColorFilter","filter","fromValue","setImageFilter","setMaskFilter","setPathEffect","effect","setShader","shader","setStrokeCap","cap","StrokeCap","setStrokeJoin","join","StrokeJoin","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"sources":["JsiSkPaint.ts"],"sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n StrokeJoin,\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../types\";\n\nimport { HostObject, getEnum } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkMaskFilter } from \"./JsiSkMaskFilter\";\nimport { JsiSkPathEffect } from \"./JsiSkPathEffect\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n reset() {\n this.ref = new this.CanvasKit.Paint();\n }\n\n getAlphaf() {\n return this.getColor()[3];\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setDither(dither: boolean) {\n this.ref.setDither(dither);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode(getEnum(this.CanvasKit.BlendMode, blendMode));\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(filter ? JsiSkColorFilter.fromValue(filter) : null);\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(filter ? JsiSkImageFilter.fromValue(filter) : null);\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(filter ? JsiSkMaskFilter.fromValue(filter) : null);\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(effect ? JsiSkPathEffect.fromValue(effect) : null);\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(shader ? JsiSkShader.fromValue(shader) : null);\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap(getEnum(this.CanvasKit.StrokeCap, cap));\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin(getEnum(this.CanvasKit.StrokeJoin, join));\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"],"mappings":";;;AAgBA,SAASA,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAC5C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,UAAU,SAASP,UAAU,CAAoC;EAC5EQ,WAAWA,CAACC,SAAoB,EAAEC,GAAU,EAAE;IAC5C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,OAAO,CAAC;IAACC,eAAA,kBAGvB,MAAM;MACd,IAAI,CAACD,GAAG,CAACE,MAAM,CAAC,CAAC;IACnB,CAAC;EAJD;EAMAC,IAAIA,CAAA,EAAG;IACL,OAAO,IAAIN,UAAU,CAAC,IAAI,CAACE,SAAS,EAAE,IAAI,CAACC,GAAG,CAACG,IAAI,CAAC,CAAC,CAAC;EACxD;EAEAC,KAAKA,CAAA,EAAG;IACN,IAAI,
|
1
|
+
{"version":3,"names":["HostObject","getEnum","JsiSkColorFilter","JsiSkImageFilter","JsiSkMaskFilter","JsiSkPathEffect","JsiSkShader","JsiSkPaint","constructor","CanvasKit","ref","_defineProperty","delete","copy","assign","paint","reset","Paint","getAlphaf","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setDither","dither","setBlendMode","blendMode","BlendMode","setColor","color","setColorFilter","filter","fromValue","setImageFilter","setMaskFilter","setPathEffect","effect","setShader","shader","setStrokeCap","cap","StrokeCap","setStrokeJoin","join","StrokeJoin","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"sources":["JsiSkPaint.ts"],"sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n StrokeJoin,\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../types\";\n\nimport { HostObject, getEnum } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkMaskFilter } from \"./JsiSkMaskFilter\";\nimport { JsiSkPathEffect } from \"./JsiSkPathEffect\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n assign(paint: JsiSkPaint) {\n this.ref = paint.ref.copy();\n }\n\n reset() {\n this.ref = new this.CanvasKit.Paint();\n }\n\n getAlphaf() {\n return this.getColor()[3];\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setDither(dither: boolean) {\n this.ref.setDither(dither);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode(getEnum(this.CanvasKit.BlendMode, blendMode));\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(filter ? JsiSkColorFilter.fromValue(filter) : null);\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(filter ? JsiSkImageFilter.fromValue(filter) : null);\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(filter ? JsiSkMaskFilter.fromValue(filter) : null);\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(effect ? JsiSkPathEffect.fromValue(effect) : null);\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(shader ? JsiSkShader.fromValue(shader) : null);\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap(getEnum(this.CanvasKit.StrokeCap, cap));\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin(getEnum(this.CanvasKit.StrokeJoin, join));\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"],"mappings":";;;AAgBA,SAASA,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAC5C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,UAAU,SAASP,UAAU,CAAoC;EAC5EQ,WAAWA,CAACC,SAAoB,EAAEC,GAAU,EAAE;IAC5C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,OAAO,CAAC;IAACC,eAAA,k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C/D;EAEAE,aAAaA,CAACC,IAAgB,EAAE;IAC9B,IAAI,CAACvC,GAAG,CAACsC,aAAa,CAAC/C,OAAO,CAAC,IAAI,CAACQ,SAAS,CAACyC,UAAU,EAAED,IAAI,CAAC,CAAC;EAClE;EAEAE,cAAcA,CAACC,KAAa,EAAE;IAC5B,IAAI,CAAC1C,GAAG,CAACyC,cAAc,CAACC,KAAK,CAAC;EAChC;EAEAC,cAAcA,CAACC,KAAa,EAAE;IAC5B,IAAI,CAAC5C,GAAG,CAAC2C,cAAc,CAACC,KAAK,CAAC;EAChC;EAEAC,QAAQA,CAACC,KAAiB,EAAE;IAC1B,IAAI,CAAC9C,GAAG,CAAC6C,QAAQ,CAAC;MAAElC,KAAK,EAAEmC;IAAM,CAAC,CAAC;EACrC;AACF","ignoreList":[]}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import type { Skia, SkCanvas } from "../skia/types";
|
2
|
-
import type { Node } from "./
|
2
|
+
import type { Node } from "./Node";
|
3
3
|
export declare class Container {
|
4
4
|
Skia: Skia;
|
5
5
|
private nativeId;
|
6
|
-
_root
|
6
|
+
private _root;
|
7
|
+
private _recording;
|
7
8
|
unmounted: boolean;
|
8
9
|
private values;
|
9
10
|
private mapperId;
|