@shopify/react-native-skia 0.1.229 → 0.1.230
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/jni/JniLoad.cpp +0 -2
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
- package/cpp/api/JsiSkApi.h +4 -1
- package/cpp/api/JsiSkParagraph.h +15 -0
- package/cpp/api/JsiSkParagraphBuilder.h +3 -32
- package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
- package/cpp/rnskia/RNSkManager.cpp +0 -6
- package/cpp/rnskia/RNSkView.h +2 -91
- package/cpp/rnskia/dom/JsiDomApi.h +0 -9
- package/lib/commonjs/animation/index.d.ts +0 -3
- package/lib/commonjs/animation/index.js +0 -39
- package/lib/commonjs/animation/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +1 -2
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
- package/lib/commonjs/dom/nodes/Node.js +0 -5
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
- package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
- package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
- package/lib/commonjs/dom/types/NodeType.js +0 -1
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/index.d.ts +0 -1
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock/index.js +0 -4
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +2 -21
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.d.ts +1 -3
- package/lib/commonjs/renderer/Container.js +4 -6
- package/lib/commonjs/renderer/Container.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
- package/lib/commonjs/renderer/HostComponents.js +0 -3
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +2 -23
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
- package/lib/commonjs/renderer/Reconciler.js +3 -18
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/components/index.d.ts +0 -1
- package/lib/commonjs/renderer/components/index.js +0 -13
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/index.d.ts +0 -1
- package/lib/commonjs/renderer/index.js +0 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
- package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
- package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
- package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
- package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
- package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
- package/lib/commonjs/views/SkiaDomView.js +3 -14
- package/lib/commonjs/views/SkiaDomView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.web.js +4 -14
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
- package/lib/commonjs/views/SkiaPictureView.js +3 -14
- package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
- package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
- package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
- package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
- package/lib/commonjs/views/index.d.ts +0 -2
- package/lib/commonjs/views/index.js +0 -26
- package/lib/commonjs/views/index.js.map +1 -1
- package/lib/commonjs/views/types.d.ts +2 -15
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/index.d.ts +0 -3
- package/lib/module/animation/index.js +0 -3
- package/lib/module/animation/index.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +1 -2
- package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/Node.d.ts +0 -3
- package/lib/module/dom/nodes/Node.js +0 -5
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
- package/lib/module/dom/nodes/drawings/index.js +0 -1
- package/lib/module/dom/nodes/drawings/index.js.map +1 -1
- package/lib/module/dom/types/Drawings.d.ts +0 -4
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +0 -1
- package/lib/module/dom/types/NodeType.js +0 -1
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/dom/types/SkDOM.d.ts +1 -2
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/index.d.ts +0 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock/index.js +1 -4
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +2 -20
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.d.ts +1 -3
- package/lib/module/renderer/Container.js +4 -6
- package/lib/module/renderer/Container.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +1 -6
- package/lib/module/renderer/HostComponents.js +0 -3
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +3 -23
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Reconciler.d.ts +1 -5
- package/lib/module/renderer/Reconciler.js +3 -16
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/components/index.d.ts +0 -1
- package/lib/module/renderer/components/index.js +0 -1
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/index.d.ts +0 -1
- package/lib/module/renderer/index.js +0 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
- package/lib/module/renderer/processors/Animations/Animations.js +0 -28
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
- package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
- package/lib/module/skia/web/JsiSkParagraph.js +12 -0
- package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
- package/lib/module/views/SkiaBaseWebView.js +0 -17
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaDomView.d.ts +0 -7
- package/lib/module/views/SkiaDomView.js +2 -13
- package/lib/module/views/SkiaDomView.js.map +1 -1
- package/lib/module/views/SkiaDomView.web.js +4 -13
- package/lib/module/views/SkiaDomView.web.js.map +1 -1
- package/lib/module/views/SkiaPictureView.d.ts +0 -7
- package/lib/module/views/SkiaPictureView.js +2 -13
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
- package/lib/module/views/SkiaViewNativeId.js +4 -0
- package/lib/module/views/SkiaViewNativeId.js.map +1 -0
- package/lib/module/views/index.d.ts +0 -2
- package/lib/module/views/index.js +0 -2
- package/lib/module/views/index.js.map +1 -1
- package/lib/module/views/types.d.ts +2 -15
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/animation/index.d.ts +0 -3
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +1 -2
- package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
- package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
- package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
- package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
- package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/renderer/Container.d.ts +1 -3
- package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
- package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
- package/lib/typescript/src/renderer/components/index.d.ts +0 -1
- package/lib/typescript/src/renderer/index.d.ts +0 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
- package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
- package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
- package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
- package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
- package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
- package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
- package/lib/typescript/src/views/index.d.ts +0 -2
- package/lib/typescript/src/views/types.d.ts +2 -15
- package/package.json +1 -1
- package/src/animation/index.ts +0 -3
- package/src/dom/nodes/JsiSkDOM.ts +0 -12
- package/src/dom/nodes/Node.ts +0 -5
- package/src/dom/nodes/drawings/index.ts +0 -1
- package/src/dom/types/Drawings.ts +0 -5
- package/src/dom/types/NodeType.ts +0 -1
- package/src/dom/types/SkDOM.ts +0 -4
- package/src/index.ts +0 -1
- package/src/mock/index.ts +0 -3
- package/src/renderer/Canvas.tsx +3 -21
- package/src/renderer/Container.tsx +1 -4
- package/src/renderer/HostComponents.ts +0 -13
- package/src/renderer/HostConfig.ts +3 -24
- package/src/renderer/Reconciler.tsx +1 -19
- package/src/renderer/components/index.ts +0 -1
- package/src/renderer/index.ts +0 -1
- package/src/renderer/processors/Animations/Animations.ts +1 -51
- package/src/skia/types/Paragraph/Paragraph.ts +25 -0
- package/src/skia/web/JsiSkParagraph.ts +11 -0
- package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
- package/src/views/SkiaBaseWebView.tsx +0 -19
- package/src/views/SkiaDomView.tsx +1 -13
- package/src/views/SkiaDomView.web.tsx +1 -6
- package/src/views/SkiaPictureView.tsx +1 -13
- package/src/views/SkiaViewNativeId.ts +1 -0
- package/src/views/index.ts +0 -2
- package/src/views/types.ts +2 -26
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
- package/cpp/rnskia/RNSkAnimation.h +0 -65
- package/cpp/rnskia/RNSkValueApi.h +0 -72
- package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
- package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
- package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
- package/cpp/rnskia/values/RNSkClockValue.h +0 -140
- package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
- package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
- package/cpp/rnskia/values/RNSkValue.h +0 -116
- package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
- package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
- package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
- package/lib/commonjs/animation/decay/decay.d.ts +0 -2
- package/lib/commonjs/animation/decay/decay.js +0 -42
- package/lib/commonjs/animation/decay/decay.js.map +0 -1
- package/lib/commonjs/animation/decay/index.d.ts +0 -1
- package/lib/commonjs/animation/decay/index.js +0 -14
- package/lib/commonjs/animation/decay/index.js.map +0 -1
- package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
- package/lib/commonjs/animation/decay/runDecay.js +0 -48
- package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
- package/lib/commonjs/animation/decay/types.d.ts +0 -21
- package/lib/commonjs/animation/decay/types.js +0 -6
- package/lib/commonjs/animation/decay/types.js.map +0 -1
- package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
- package/lib/commonjs/animation/spring/Spring.js +0 -77
- package/lib/commonjs/animation/spring/Spring.js.map +0 -1
- package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
- package/lib/commonjs/animation/spring/functions/index.js +0 -14
- package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
- package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
- package/lib/commonjs/animation/spring/functions/spring.js +0 -94
- package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
- package/lib/commonjs/animation/spring/index.d.ts +0 -3
- package/lib/commonjs/animation/spring/index.js +0 -30
- package/lib/commonjs/animation/spring/index.js.map +0 -1
- package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
- package/lib/commonjs/animation/spring/runSpring.js +0 -35
- package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
- package/lib/commonjs/animation/spring/types.d.ts +0 -6
- package/lib/commonjs/animation/spring/types.js +0 -2
- package/lib/commonjs/animation/spring/types.js.map +0 -1
- package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
- package/lib/commonjs/animation/spring/useSpring.js +0 -27
- package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
- package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
- package/lib/commonjs/animation/timing/Easing.js +0 -108
- package/lib/commonjs/animation/timing/Easing.js.map +0 -1
- package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
- package/lib/commonjs/animation/timing/createTiming.js +0 -55
- package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
- package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
- package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
- package/lib/commonjs/animation/timing/functions/index.js +0 -54
- package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
- package/lib/commonjs/animation/timing/functions/timing.js +0 -50
- package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
- package/lib/commonjs/animation/timing/functions/types.js +0 -2
- package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
- package/lib/commonjs/animation/timing/index.d.ts +0 -4
- package/lib/commonjs/animation/timing/index.js +0 -38
- package/lib/commonjs/animation/timing/index.js.map +0 -1
- package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
- package/lib/commonjs/animation/timing/runTiming.js +0 -36
- package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
- package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
- package/lib/commonjs/animation/timing/useLoop.js +0 -25
- package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
- package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
- package/lib/commonjs/animation/timing/useTiming.js +0 -67
- package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
- package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
- package/lib/commonjs/renderer/DependencyManager.js +0 -185
- package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
- package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
- package/lib/commonjs/renderer/components/Drawing.js +0 -22
- package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
- package/lib/commonjs/values/api.d.ts +0 -26
- package/lib/commonjs/values/api.js +0 -55
- package/lib/commonjs/values/api.js.map +0 -1
- package/lib/commonjs/values/api.web.d.ts +0 -2
- package/lib/commonjs/values/api.web.js +0 -18
- package/lib/commonjs/values/api.web.js.map +0 -1
- package/lib/commonjs/values/hooks/index.d.ts +0 -4
- package/lib/commonjs/values/hooks/index.js +0 -58
- package/lib/commonjs/values/hooks/index.js.map +0 -1
- package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
- package/lib/commonjs/values/hooks/useClockValue.js +0 -30
- package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
- package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
- package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
- package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
- package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
- package/lib/commonjs/values/hooks/useValue.js +0 -26
- package/lib/commonjs/values/hooks/useValue.js.map +0 -1
- package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
- package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
- package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
- package/lib/commonjs/values/index.d.ts +0 -4
- package/lib/commonjs/values/index.js +0 -58
- package/lib/commonjs/values/index.js.map +0 -1
- package/lib/commonjs/values/selector.d.ts +0 -14
- package/lib/commonjs/values/selector.js +0 -24
- package/lib/commonjs/values/selector.js.map +0 -1
- package/lib/commonjs/values/types.d.ts +0 -63
- package/lib/commonjs/values/types.js +0 -2
- package/lib/commonjs/values/types.js.map +0 -1
- package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
- package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
- package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
- package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
- package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
- package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
- package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
- package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
- package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
- package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
- package/lib/commonjs/values/web/RNSkValue.js +0 -73
- package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
- package/lib/commonjs/values/web/api.d.ts +0 -2
- package/lib/commonjs/values/web/api.js +0 -31
- package/lib/commonjs/values/web/api.js.map +0 -1
- package/lib/commonjs/values/web/index.d.ts +0 -1
- package/lib/commonjs/values/web/index.js +0 -19
- package/lib/commonjs/values/web/index.js.map +0 -1
- package/lib/commonjs/views/SkiaView.d.ts +0 -35
- package/lib/commonjs/views/SkiaView.js +0 -139
- package/lib/commonjs/views/SkiaView.js.map +0 -1
- package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
- package/lib/commonjs/views/SkiaView.web.js +0 -30
- package/lib/commonjs/views/SkiaView.web.js.map +0 -1
- package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
- package/lib/commonjs/views/useDrawCallback.js +0 -23
- package/lib/commonjs/views/useDrawCallback.js.map +0 -1
- package/lib/module/animation/decay/decay.d.ts +0 -2
- package/lib/module/animation/decay/decay.js +0 -33
- package/lib/module/animation/decay/decay.js.map +0 -1
- package/lib/module/animation/decay/index.d.ts +0 -1
- package/lib/module/animation/decay/index.js +0 -2
- package/lib/module/animation/decay/index.js.map +0 -1
- package/lib/module/animation/decay/runDecay.d.ts +0 -10
- package/lib/module/animation/decay/runDecay.js +0 -38
- package/lib/module/animation/decay/runDecay.js.map +0 -1
- package/lib/module/animation/decay/types.d.ts +0 -21
- package/lib/module/animation/decay/types.js +0 -2
- package/lib/module/animation/decay/types.js.map +0 -1
- package/lib/module/animation/spring/Spring.d.ts +0 -65
- package/lib/module/animation/spring/Spring.js +0 -69
- package/lib/module/animation/spring/Spring.js.map +0 -1
- package/lib/module/animation/spring/functions/index.d.ts +0 -1
- package/lib/module/animation/spring/functions/index.js +0 -2
- package/lib/module/animation/spring/functions/index.js.map +0 -1
- package/lib/module/animation/spring/functions/spring.d.ts +0 -10
- package/lib/module/animation/spring/functions/spring.js +0 -85
- package/lib/module/animation/spring/functions/spring.js.map +0 -1
- package/lib/module/animation/spring/index.d.ts +0 -3
- package/lib/module/animation/spring/index.js +0 -4
- package/lib/module/animation/spring/index.js.map +0 -1
- package/lib/module/animation/spring/runSpring.d.ts +0 -19
- package/lib/module/animation/spring/runSpring.js +0 -24
- package/lib/module/animation/spring/runSpring.js.map +0 -1
- package/lib/module/animation/spring/types.d.ts +0 -6
- package/lib/module/animation/spring/types.js +0 -2
- package/lib/module/animation/spring/types.js.map +0 -1
- package/lib/module/animation/spring/useSpring.d.ts +0 -13
- package/lib/module/animation/spring/useSpring.js +0 -16
- package/lib/module/animation/spring/useSpring.js.map +0 -1
- package/lib/module/animation/timing/Easing.d.ts +0 -19
- package/lib/module/animation/timing/Easing.js +0 -98
- package/lib/module/animation/timing/Easing.js.map +0 -1
- package/lib/module/animation/timing/createTiming.d.ts +0 -17
- package/lib/module/animation/timing/createTiming.js +0 -49
- package/lib/module/animation/timing/createTiming.js.map +0 -1
- package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
- package/lib/module/animation/timing/functions/bezier.js +0 -141
- package/lib/module/animation/timing/functions/bezier.js.map +0 -1
- package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
- package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
- package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
- package/lib/module/animation/timing/functions/index.d.ts +0 -4
- package/lib/module/animation/timing/functions/index.js +0 -5
- package/lib/module/animation/timing/functions/index.js.map +0 -1
- package/lib/module/animation/timing/functions/timing.d.ts +0 -17
- package/lib/module/animation/timing/functions/timing.js +0 -41
- package/lib/module/animation/timing/functions/timing.js.map +0 -1
- package/lib/module/animation/timing/functions/types.d.ts +0 -7
- package/lib/module/animation/timing/functions/types.js +0 -2
- package/lib/module/animation/timing/functions/types.js.map +0 -1
- package/lib/module/animation/timing/index.d.ts +0 -4
- package/lib/module/animation/timing/index.js +0 -5
- package/lib/module/animation/timing/index.js.map +0 -1
- package/lib/module/animation/timing/runTiming.d.ts +0 -19
- package/lib/module/animation/timing/runTiming.js +0 -26
- package/lib/module/animation/timing/runTiming.js.map +0 -1
- package/lib/module/animation/timing/useLoop.d.ts +0 -11
- package/lib/module/animation/timing/useLoop.js +0 -16
- package/lib/module/animation/timing/useLoop.js.map +0 -1
- package/lib/module/animation/timing/useTiming.d.ts +0 -13
- package/lib/module/animation/timing/useTiming.js +0 -57
- package/lib/module/animation/timing/useTiming.js.map +0 -1
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
- package/lib/module/renderer/DependencyManager.d.ts +0 -46
- package/lib/module/renderer/DependencyManager.js +0 -174
- package/lib/module/renderer/DependencyManager.js.map +0 -1
- package/lib/module/renderer/components/Drawing.d.ts +0 -8
- package/lib/module/renderer/components/Drawing.js +0 -11
- package/lib/module/renderer/components/Drawing.js.map +0 -1
- package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
- package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
- package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
- package/lib/module/values/api.d.ts +0 -26
- package/lib/module/values/api.js +0 -48
- package/lib/module/values/api.js.map +0 -1
- package/lib/module/values/api.web.d.ts +0 -2
- package/lib/module/values/api.web.js +0 -7
- package/lib/module/values/api.web.js.map +0 -1
- package/lib/module/values/hooks/index.d.ts +0 -4
- package/lib/module/values/hooks/index.js +0 -5
- package/lib/module/values/hooks/index.js.map +0 -1
- package/lib/module/values/hooks/useClockValue.d.ts +0 -9
- package/lib/module/values/hooks/useClockValue.js +0 -20
- package/lib/module/values/hooks/useClockValue.js.map +0 -1
- package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
- package/lib/module/values/hooks/useComputedValue.js +0 -21
- package/lib/module/values/hooks/useComputedValue.js.map +0 -1
- package/lib/module/values/hooks/useValue.d.ts +0 -10
- package/lib/module/values/hooks/useValue.js +0 -16
- package/lib/module/values/hooks/useValue.js.map +0 -1
- package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
- package/lib/module/values/hooks/useValueEffect.js +0 -16
- package/lib/module/values/hooks/useValueEffect.js.map +0 -1
- package/lib/module/values/index.d.ts +0 -4
- package/lib/module/values/index.js +0 -5
- package/lib/module/values/index.js.map +0 -1
- package/lib/module/values/selector.d.ts +0 -14
- package/lib/module/values/selector.js +0 -15
- package/lib/module/values/selector.js.map +0 -1
- package/lib/module/values/types.d.ts +0 -63
- package/lib/module/values/types.js +0 -2
- package/lib/module/values/types.js.map +0 -1
- package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
- package/lib/module/values/web/RNSkAnimation.js +0 -36
- package/lib/module/values/web/RNSkAnimation.js.map +0 -1
- package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
- package/lib/module/values/web/RNSkClockValue.js +0 -65
- package/lib/module/values/web/RNSkClockValue.js.map +0 -1
- package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
- package/lib/module/values/web/RNSkComputedValue.js +0 -49
- package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
- package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
- package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
- package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
- package/lib/module/values/web/RNSkValue.d.ts +0 -14
- package/lib/module/values/web/RNSkValue.js +0 -63
- package/lib/module/values/web/RNSkValue.js.map +0 -1
- package/lib/module/values/web/api.d.ts +0 -2
- package/lib/module/values/web/api.js +0 -19
- package/lib/module/values/web/api.js.map +0 -1
- package/lib/module/values/web/index.d.ts +0 -1
- package/lib/module/values/web/index.js +0 -2
- package/lib/module/values/web/index.js.map +0 -1
- package/lib/module/views/SkiaView.d.ts +0 -35
- package/lib/module/views/SkiaView.js +0 -119
- package/lib/module/views/SkiaView.js.map +0 -1
- package/lib/module/views/SkiaView.web.d.ts +0 -7
- package/lib/module/views/SkiaView.web.js +0 -20
- package/lib/module/views/SkiaView.web.js.map +0 -1
- package/lib/module/views/useDrawCallback.d.ts +0 -8
- package/lib/module/views/useDrawCallback.js +0 -14
- package/lib/module/views/useDrawCallback.js.map +0 -1
- package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
- package/lib/typescript/src/animation/decay/index.d.ts +0 -1
- package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
- package/lib/typescript/src/animation/decay/types.d.ts +0 -21
- package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
- package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
- package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
- package/lib/typescript/src/animation/spring/index.d.ts +0 -3
- package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
- package/lib/typescript/src/animation/spring/types.d.ts +0 -6
- package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
- package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
- package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
- package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
- package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
- package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
- package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
- package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
- package/lib/typescript/src/animation/timing/index.d.ts +0 -4
- package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
- package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
- package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
- package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
- package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
- package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
- package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
- package/lib/typescript/src/values/api.d.ts +0 -26
- package/lib/typescript/src/values/api.web.d.ts +0 -2
- package/lib/typescript/src/values/hooks/index.d.ts +0 -4
- package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
- package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
- package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
- package/lib/typescript/src/values/index.d.ts +0 -4
- package/lib/typescript/src/values/selector.d.ts +0 -14
- package/lib/typescript/src/values/types.d.ts +0 -63
- package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
- package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
- package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
- package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
- package/lib/typescript/src/values/web/api.d.ts +0 -2
- package/lib/typescript/src/values/web/index.d.ts +0 -1
- package/lib/typescript/src/views/SkiaView.d.ts +0 -35
- package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
- package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
- package/src/animation/decay/decay.ts +0 -35
- package/src/animation/decay/index.ts +0 -1
- package/src/animation/decay/runDecay.ts +0 -40
- package/src/animation/decay/types.ts +0 -24
- package/src/animation/spring/Spring.ts +0 -61
- package/src/animation/spring/functions/index.ts +0 -1
- package/src/animation/spring/functions/spring.ts +0 -86
- package/src/animation/spring/index.ts +0 -3
- package/src/animation/spring/runSpring.ts +0 -40
- package/src/animation/spring/types.ts +0 -6
- package/src/animation/spring/useSpring.ts +0 -31
- package/src/animation/timing/Easing.ts +0 -102
- package/src/animation/timing/createTiming.ts +0 -62
- package/src/animation/timing/functions/bezier.ts +0 -165
- package/src/animation/timing/functions/getResolvedParams.ts +0 -50
- package/src/animation/timing/functions/index.ts +0 -4
- package/src/animation/timing/functions/timing.ts +0 -44
- package/src/animation/timing/functions/types.ts +0 -8
- package/src/animation/timing/index.ts +0 -4
- package/src/animation/timing/runTiming.ts +0 -36
- package/src/animation/timing/useLoop.ts +0 -21
- package/src/animation/timing/useTiming.ts +0 -71
- package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
- package/src/renderer/DependencyManager.tsx +0 -196
- package/src/renderer/components/Drawing.tsx +0 -12
- package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
- package/src/values/api.ts +0 -61
- package/src/values/api.web.ts +0 -5
- package/src/values/hooks/index.ts +0 -4
- package/src/values/hooks/useClockValue.ts +0 -21
- package/src/values/hooks/useComputedValue.ts +0 -24
- package/src/values/hooks/useValue.ts +0 -17
- package/src/values/hooks/useValueEffect.ts +0 -18
- package/src/values/index.ts +0 -4
- package/src/values/selector.ts +0 -24
- package/src/values/types.ts +0 -73
- package/src/values/web/RNSkAnimation.ts +0 -33
- package/src/values/web/RNSkClockValue.ts +0 -58
- package/src/values/web/RNSkComputedValue.ts +0 -49
- package/src/values/web/RNSkReadonlyValue.ts +0 -38
- package/src/values/web/RNSkValue.ts +0 -57
- package/src/values/web/api.ts +0 -33
- package/src/values/web/index.ts +0 -1
- package/src/views/SkiaView.tsx +0 -111
- package/src/views/SkiaView.web.tsx +0 -22
- package/src/views/useDrawCallback.ts +0 -19
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { SkiaMutableValue } from "../types";
|
2
|
-
/**
|
3
|
-
* @deprecated Use Reanimated 3
|
4
|
-
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
5
|
-
*
|
6
|
-
* Creates a new value that holds some data.
|
7
|
-
* @param v Value to hold
|
8
|
-
* @returns A Value of type of v
|
9
|
-
*/
|
10
|
-
export declare const useValue: <T>(v: T) => SkiaMutableValue<T>;
|
@@ -1,26 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useValue = void 0;
|
7
|
-
|
8
|
-
var _react = require("react");
|
9
|
-
|
10
|
-
var _api = require("../api");
|
11
|
-
|
12
|
-
/**
|
13
|
-
* @deprecated Use Reanimated 3
|
14
|
-
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
15
|
-
*
|
16
|
-
* Creates a new value that holds some data.
|
17
|
-
* @param v Value to hold
|
18
|
-
* @returns A Value of type of v
|
19
|
-
*/
|
20
|
-
const useValue = v => {
|
21
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
22
|
-
return (0, _react.useMemo)(() => _api.ValueApi.createValue(v), []);
|
23
|
-
};
|
24
|
-
|
25
|
-
exports.useValue = useValue;
|
26
|
-
//# sourceMappingURL=useValue.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["useValue","v","useMemo","ValueApi","createValue"],"sources":["useValue.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport type { SkiaMutableValue } from \"../types\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Creates a new value that holds some data.\n * @param v Value to hold\n * @returns A Value of type of v\n */\nexport const useValue = <T>(v: T): SkiaMutableValue<T> => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => ValueApi.createValue(v), []);\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAOC,CAAJ,IAAkC;EACxD;EACA,OAAO,IAAAC,cAAA,EAAQ,MAAMC,aAAA,CAASC,WAAT,CAAqBH,CAArB,CAAd,EAAuC,EAAvC,CAAP;AACD,CAHM"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { SkiaValue } from "../types";
|
2
|
-
/**
|
3
|
-
* @deprecated Use Reanimated 3
|
4
|
-
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
5
|
-
*
|
6
|
-
* Sets up an effect that will be run whenever the value changes
|
7
|
-
* @param value Value to subscribe to changes on
|
8
|
-
* @param cb Callback to run when value changes
|
9
|
-
*/
|
10
|
-
export declare const useValueEffect: <T>(value: SkiaValue<T>, cb: (v: T) => void) => void;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useValueEffect = void 0;
|
7
|
-
|
8
|
-
var _react = require("react");
|
9
|
-
|
10
|
-
/**
|
11
|
-
* @deprecated Use Reanimated 3
|
12
|
-
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
|
13
|
-
*
|
14
|
-
* Sets up an effect that will be run whenever the value changes
|
15
|
-
* @param value Value to subscribe to changes on
|
16
|
-
* @param cb Callback to run when value changes
|
17
|
-
*/
|
18
|
-
const useValueEffect = (value, cb) => {
|
19
|
-
(0, _react.useEffect)(() => {
|
20
|
-
return value.addListener(cb); // eslint-disable-next-line react-hooks/exhaustive-deps
|
21
|
-
}, [value]);
|
22
|
-
};
|
23
|
-
|
24
|
-
exports.useValueEffect = useValueEffect;
|
25
|
-
//# sourceMappingURL=useValueEffect.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["useValueEffect","value","cb","useEffect","addListener"],"sources":["useValueEffect.ts"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport type { SkiaValue } from \"../types\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Sets up an effect that will be run whenever the value changes\n * @param value Value to subscribe to changes on\n * @param cb Callback to run when value changes\n */\nexport const useValueEffect = <T>(value: SkiaValue<T>, cb: (v: T) => void) => {\n useEffect(() => {\n return value.addListener(cb);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n};\n"],"mappings":";;;;;;;AAAA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GAAG,CAAIC,KAAJ,EAAyBC,EAAzB,KAAgD;EAC5E,IAAAC,gBAAA,EAAU,MAAM;IACd,OAAOF,KAAK,CAACG,WAAN,CAAkBF,EAAlB,CAAP,CADc,CAEd;EACD,CAHD,EAGG,CAACD,KAAD,CAHH;AAID,CALM"}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
|
7
|
-
var _types = require("./types");
|
8
|
-
|
9
|
-
Object.keys(_types).forEach(function (key) {
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
11
|
-
if (key in exports && exports[key] === _types[key]) return;
|
12
|
-
Object.defineProperty(exports, key, {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _types[key];
|
16
|
-
}
|
17
|
-
});
|
18
|
-
});
|
19
|
-
|
20
|
-
var _hooks = require("./hooks");
|
21
|
-
|
22
|
-
Object.keys(_hooks).forEach(function (key) {
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
24
|
-
if (key in exports && exports[key] === _hooks[key]) return;
|
25
|
-
Object.defineProperty(exports, key, {
|
26
|
-
enumerable: true,
|
27
|
-
get: function () {
|
28
|
-
return _hooks[key];
|
29
|
-
}
|
30
|
-
});
|
31
|
-
});
|
32
|
-
|
33
|
-
var _api = require("./api");
|
34
|
-
|
35
|
-
Object.keys(_api).forEach(function (key) {
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
37
|
-
if (key in exports && exports[key] === _api[key]) return;
|
38
|
-
Object.defineProperty(exports, key, {
|
39
|
-
enumerable: true,
|
40
|
-
get: function () {
|
41
|
-
return _api[key];
|
42
|
-
}
|
43
|
-
});
|
44
|
-
});
|
45
|
-
|
46
|
-
var _selector = require("./selector");
|
47
|
-
|
48
|
-
Object.keys(_selector).forEach(function (key) {
|
49
|
-
if (key === "default" || key === "__esModule") return;
|
50
|
-
if (key in exports && exports[key] === _selector[key]) return;
|
51
|
-
Object.defineProperty(exports, key, {
|
52
|
-
enumerable: true,
|
53
|
-
get: function () {
|
54
|
-
return _selector[key];
|
55
|
-
}
|
56
|
-
});
|
57
|
-
});
|
58
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./hooks\";\nexport * from \"./api\";\nexport * from \"./selector\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { SkiaValue } from "./types";
|
2
|
-
export type SkiaSelector<TReturn, TInput = unknown> = {
|
3
|
-
value: SkiaValue<TInput>;
|
4
|
-
selector: (v: TInput) => TReturn;
|
5
|
-
};
|
6
|
-
/**
|
7
|
-
* Wraps a Skia Value with a selector function. The selector function can access the
|
8
|
-
* inner values of the Skia Value so that we can dynamically ready array values and
|
9
|
-
* object values when doing animations in Skia.
|
10
|
-
* @param value Dependant value
|
11
|
-
* @param selector Selector function to calculate new value from the Skia Value's value
|
12
|
-
* @returns A descriptor that will be used by the reconciler to calculate the value
|
13
|
-
*/
|
14
|
-
export declare const Selector: <TInput, TReturn>(value: SkiaValue<TInput>, selector: (v: TInput) => TReturn) => SkiaSelector<TReturn, TInput>;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.Selector = void 0;
|
7
|
-
|
8
|
-
/**
|
9
|
-
* Wraps a Skia Value with a selector function. The selector function can access the
|
10
|
-
* inner values of the Skia Value so that we can dynamically ready array values and
|
11
|
-
* object values when doing animations in Skia.
|
12
|
-
* @param value Dependant value
|
13
|
-
* @param selector Selector function to calculate new value from the Skia Value's value
|
14
|
-
* @returns A descriptor that will be used by the reconciler to calculate the value
|
15
|
-
*/
|
16
|
-
const Selector = (value, selector) => {
|
17
|
-
return {
|
18
|
-
selector,
|
19
|
-
value
|
20
|
-
};
|
21
|
-
};
|
22
|
-
|
23
|
-
exports.Selector = Selector;
|
24
|
-
//# sourceMappingURL=selector.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["Selector","value","selector"],"sources":["selector.ts"],"sourcesContent":["import type { SkiaValue } from \"./types\";\n\nexport type SkiaSelector<TReturn, TInput = unknown> = {\n value: SkiaValue<TInput>;\n selector: (v: TInput) => TReturn;\n};\n\n/**\n * Wraps a Skia Value with a selector function. The selector function can access the\n * inner values of the Skia Value so that we can dynamically ready array values and\n * object values when doing animations in Skia.\n * @param value Dependant value\n * @param selector Selector function to calculate new value from the Skia Value's value\n * @returns A descriptor that will be used by the reconciler to calculate the value\n */\nexport const Selector = <TInput, TReturn>(\n value: SkiaValue<TInput>,\n selector: (v: TInput) => TReturn\n): SkiaSelector<TReturn, TInput> => {\n return {\n selector,\n value,\n };\n};\n"],"mappings":";;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG,CACtBC,KADsB,EAEtBC,QAFsB,KAGY;EAClC,OAAO;IACLA,QADK;IAELD;EAFK,CAAP;AAID,CARM"}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
export interface SkiaValue<T = number> {
|
2
|
-
/**
|
3
|
-
* Gets the value hold by the Value object
|
4
|
-
*/
|
5
|
-
readonly current: T;
|
6
|
-
/**
|
7
|
-
* Adds a listener that is called when value changes.
|
8
|
-
* Returns unsubscribe method.
|
9
|
-
*/
|
10
|
-
addListener: (cb: (value: T) => void) => () => void;
|
11
|
-
/**
|
12
|
-
* Invalidates the value. Has different meaning depending on the type of the value.
|
13
|
-
*/
|
14
|
-
dispose: () => void;
|
15
|
-
/**
|
16
|
-
* Field to make typechecking easier
|
17
|
-
*/
|
18
|
-
__typename__: "RNSkValue";
|
19
|
-
}
|
20
|
-
export interface SkiaMutableValue<T = number> extends SkiaValue<T> {
|
21
|
-
/**
|
22
|
-
* Get/sets the value hold by the Value object
|
23
|
-
*/
|
24
|
-
current: T;
|
25
|
-
/**
|
26
|
-
* Get/sets the animation controlling the value
|
27
|
-
* */
|
28
|
-
animation: SkiaAnimation | undefined;
|
29
|
-
}
|
30
|
-
export interface SkiaClockValue extends SkiaValue<number> {
|
31
|
-
start: () => void;
|
32
|
-
stop: () => void;
|
33
|
-
}
|
34
|
-
export interface SkiaAnimation extends SkiaClockValue {
|
35
|
-
cancel: () => void;
|
36
|
-
}
|
37
|
-
export interface AnimationState {
|
38
|
-
current: number;
|
39
|
-
finished: boolean;
|
40
|
-
}
|
41
|
-
export interface ISkiaValueApi {
|
42
|
-
/**
|
43
|
-
* Creates a new value that holds the initial value and that
|
44
|
-
* can be changed.
|
45
|
-
*/
|
46
|
-
createValue<T>(initialValue: T): SkiaMutableValue<T>;
|
47
|
-
/**
|
48
|
-
* Creates a computed value. This is a calculated value that returns the result of
|
49
|
-
* a function that is called with the values of the dependencies.
|
50
|
-
*/
|
51
|
-
createComputedValue<R>(cb: () => R, values: Array<SkiaValue<unknown>>): SkiaValue<R>;
|
52
|
-
/**
|
53
|
-
* Creates a clock value where the value is the number of milliseconds elapsed
|
54
|
-
* since the clock was created
|
55
|
-
*/
|
56
|
-
createClockValue(): SkiaClockValue;
|
57
|
-
/**
|
58
|
-
* Creates an animation that is driven from a clock and updated every frame.
|
59
|
-
* @param cb Callback to calculate next value from time.
|
60
|
-
* @returns An animation object that can control a value.
|
61
|
-
*/
|
62
|
-
createAnimation<S extends AnimationState = AnimationState>(cb: (t: number, state: S | undefined) => S): SkiaAnimation;
|
63
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface SkiaValue<T = number> {\n /**\n * Gets the value hold by the Value object\n */\n readonly current: T;\n /**\n * Adds a listener that is called when value changes.\n * Returns unsubscribe method.\n */\n addListener: (cb: (value: T) => void) => () => void;\n /**\n * Invalidates the value. Has different meaning depending on the type of the value.\n */\n dispose: () => void;\n /**\n * Field to make typechecking easier\n */\n __typename__: \"RNSkValue\";\n}\n\nexport interface SkiaMutableValue<T = number> extends SkiaValue<T> {\n /**\n * Get/sets the value hold by the Value object\n */\n current: T;\n /**\n * Get/sets the animation controlling the value\n * */\n animation: SkiaAnimation | undefined;\n}\n\nexport interface SkiaClockValue extends SkiaValue<number> {\n start: () => void;\n stop: () => void;\n}\n\nexport interface SkiaAnimation extends SkiaClockValue {\n cancel: () => void;\n}\n\nexport interface AnimationState {\n current: number;\n finished: boolean;\n}\n\nexport interface ISkiaValueApi {\n /**\n * Creates a new value that holds the initial value and that\n * can be changed.\n */\n createValue<T>(initialValue: T): SkiaMutableValue<T>;\n /**\n * Creates a computed value. This is a calculated value that returns the result of\n * a function that is called with the values of the dependencies.\n */\n createComputedValue<R>(\n cb: () => R,\n values: Array<SkiaValue<unknown>>\n ): SkiaValue<R>;\n /**\n * Creates a clock value where the value is the number of milliseconds elapsed\n * since the clock was created\n */\n createClockValue(): SkiaClockValue;\n /**\n * Creates an animation that is driven from a clock and updated every frame.\n * @param cb Callback to calculate next value from time.\n * @returns An animation object that can control a value.\n */\n createAnimation<S extends AnimationState = AnimationState>(\n cb: (t: number, state: S | undefined) => S\n ): SkiaAnimation;\n}\n"],"mappings":""}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { AnimationState, SkiaAnimation } from "../types";
|
2
|
-
import { RNSkClockValue } from "./RNSkClockValue";
|
3
|
-
export declare class RNSkAnimation<S extends AnimationState = AnimationState> extends RNSkClockValue implements SkiaAnimation {
|
4
|
-
constructor(callback: (t: number, state: S | undefined) => S, raf: (callback: (time: number) => void) => number);
|
5
|
-
private _callback;
|
6
|
-
private _animationState;
|
7
|
-
cancel(): void;
|
8
|
-
protected update(nextValue: number): void;
|
9
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.RNSkAnimation = void 0;
|
7
|
-
|
8
|
-
var _RNSkClockValue = require("./RNSkClockValue");
|
9
|
-
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
-
|
12
|
-
class RNSkAnimation extends _RNSkClockValue.RNSkClockValue {
|
13
|
-
constructor(callback, raf) {
|
14
|
-
super(raf);
|
15
|
-
|
16
|
-
_defineProperty(this, "_callback", void 0);
|
17
|
-
|
18
|
-
_defineProperty(this, "_animationState", undefined);
|
19
|
-
|
20
|
-
this._callback = callback;
|
21
|
-
}
|
22
|
-
|
23
|
-
cancel() {
|
24
|
-
this.stop();
|
25
|
-
}
|
26
|
-
|
27
|
-
update(nextValue) {
|
28
|
-
var _this$_animationState2;
|
29
|
-
|
30
|
-
if (this._callback) {
|
31
|
-
var _this$_animationState;
|
32
|
-
|
33
|
-
this._animationState = this._callback(nextValue, this._animationState);
|
34
|
-
|
35
|
-
if ((_this$_animationState = this._animationState) !== null && _this$_animationState !== void 0 && _this$_animationState.finished) {
|
36
|
-
this.stop();
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
super.update(((_this$_animationState2 = this._animationState) === null || _this$_animationState2 === void 0 ? void 0 : _this$_animationState2.current) ?? nextValue);
|
41
|
-
}
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
exports.RNSkAnimation = RNSkAnimation;
|
46
|
-
//# sourceMappingURL=RNSkAnimation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["RNSkAnimation","RNSkClockValue","constructor","callback","raf","undefined","_callback","cancel","stop","update","nextValue","_animationState","finished","current"],"sources":["RNSkAnimation.ts"],"sourcesContent":["import type { AnimationState, SkiaAnimation } from \"../types\";\n\nimport { RNSkClockValue } from \"./RNSkClockValue\";\n\nexport class RNSkAnimation<S extends AnimationState = AnimationState>\n extends RNSkClockValue\n implements SkiaAnimation\n{\n constructor(\n callback: (t: number, state: S | undefined) => S,\n raf: (callback: (time: number) => void) => number\n ) {\n super(raf);\n this._callback = callback;\n }\n\n private _callback: (t: number, state: S | undefined) => S;\n private _animationState: S | undefined = undefined;\n\n public cancel() {\n this.stop();\n }\n\n protected update(nextValue: number): void {\n if (this._callback) {\n this._animationState = this._callback(nextValue, this._animationState);\n if (this._animationState?.finished) {\n this.stop();\n }\n }\n super.update(this._animationState?.current ?? nextValue);\n }\n}\n"],"mappings":";;;;;;;AAEA;;;;AAEO,MAAMA,aAAN,SACGC,8BADH,CAGP;EACEC,WAAW,CACTC,QADS,EAETC,GAFS,EAGT;IACA,MAAMA,GAAN;;IADA;;IAAA,yCAMuCC,SANvC;;IAEA,KAAKC,SAAL,GAAiBH,QAAjB;EACD;;EAKMI,MAAM,GAAG;IACd,KAAKC,IAAL;EACD;;EAESC,MAAM,CAACC,SAAD,EAA0B;IAAA;;IACxC,IAAI,KAAKJ,SAAT,EAAoB;MAAA;;MAClB,KAAKK,eAAL,GAAuB,KAAKL,SAAL,CAAeI,SAAf,EAA0B,KAAKC,eAA/B,CAAvB;;MACA,6BAAI,KAAKA,eAAT,kDAAI,sBAAsBC,QAA1B,EAAoC;QAClC,KAAKJ,IAAL;MACD;IACF;;IACD,MAAMC,MAAN,CAAa,gCAAKE,eAAL,kFAAsBE,OAAtB,KAAiCH,SAA9C;EACD;;AAxBH"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { SkiaClockValue } from "../types";
|
2
|
-
import { RNSkReadonlyValue } from "./RNSkReadonlyValue";
|
3
|
-
export declare class RNSkClockValue extends RNSkReadonlyValue<number> implements SkiaClockValue {
|
4
|
-
constructor(raf: (callback: (time: number) => void) => number);
|
5
|
-
private _raf;
|
6
|
-
private _start;
|
7
|
-
private _stop;
|
8
|
-
private _state;
|
9
|
-
private notifyUpdate;
|
10
|
-
protected tick(value: number): void;
|
11
|
-
start(): void;
|
12
|
-
stop(): void;
|
13
|
-
}
|
@@ -1,75 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.RNSkClockValue = void 0;
|
7
|
-
|
8
|
-
var _RNSkReadonlyValue = require("./RNSkReadonlyValue");
|
9
|
-
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
-
|
12
|
-
var RNSkClockState;
|
13
|
-
|
14
|
-
(function (RNSkClockState) {
|
15
|
-
RNSkClockState[RNSkClockState["NotStarted"] = 0] = "NotStarted";
|
16
|
-
RNSkClockState[RNSkClockState["Running"] = 1] = "Running";
|
17
|
-
RNSkClockState[RNSkClockState["Stopped"] = 2] = "Stopped";
|
18
|
-
})(RNSkClockState || (RNSkClockState = {}));
|
19
|
-
|
20
|
-
class RNSkClockValue extends _RNSkReadonlyValue.RNSkReadonlyValue {
|
21
|
-
constructor(raf) {
|
22
|
-
super(0);
|
23
|
-
|
24
|
-
_defineProperty(this, "_raf", void 0);
|
25
|
-
|
26
|
-
_defineProperty(this, "_start", void 0);
|
27
|
-
|
28
|
-
_defineProperty(this, "_stop", void 0);
|
29
|
-
|
30
|
-
_defineProperty(this, "_state", RNSkClockState.NotStarted);
|
31
|
-
|
32
|
-
_defineProperty(this, "notifyUpdate", _ => {
|
33
|
-
if (this._state === RNSkClockState.Running) {
|
34
|
-
const now = Date.now();
|
35
|
-
const deltaFromStart = now - this._start;
|
36
|
-
this.tick(deltaFromStart);
|
37
|
-
|
38
|
-
this._raf(this.notifyUpdate);
|
39
|
-
}
|
40
|
-
});
|
41
|
-
|
42
|
-
this._raf = raf;
|
43
|
-
this.update(0);
|
44
|
-
}
|
45
|
-
|
46
|
-
tick(value) {
|
47
|
-
this.update(value);
|
48
|
-
}
|
49
|
-
|
50
|
-
start() {
|
51
|
-
if (this._state === RNSkClockState.NotStarted) {
|
52
|
-
this._start = Date.now();
|
53
|
-
this._stop = this._start;
|
54
|
-
} // Subtract pause time from start
|
55
|
-
|
56
|
-
|
57
|
-
const timeSinceStop = Date.now() - this._stop;
|
58
|
-
|
59
|
-
this._start += timeSinceStop;
|
60
|
-
this._state = RNSkClockState.Running;
|
61
|
-
|
62
|
-
this._raf(this.notifyUpdate);
|
63
|
-
}
|
64
|
-
|
65
|
-
stop() {
|
66
|
-
if (this._state === RNSkClockState.Running) {
|
67
|
-
this._state = RNSkClockState.Stopped;
|
68
|
-
this._stop = Date.now();
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
}
|
73
|
-
|
74
|
-
exports.RNSkClockValue = RNSkClockValue;
|
75
|
-
//# sourceMappingURL=RNSkClockValue.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["RNSkClockState","RNSkClockValue","RNSkReadonlyValue","constructor","raf","NotStarted","_","_state","Running","now","Date","deltaFromStart","_start","tick","_raf","notifyUpdate","update","value","start","_stop","timeSinceStop","stop","Stopped"],"sources":["RNSkClockValue.ts"],"sourcesContent":["import type { SkiaClockValue } from \"../types\";\n\nimport { RNSkReadonlyValue } from \"./RNSkReadonlyValue\";\n\nenum RNSkClockState {\n NotStarted = 0,\n Running = 1,\n Stopped = 2,\n}\n\nexport class RNSkClockValue\n extends RNSkReadonlyValue<number>\n implements SkiaClockValue\n{\n constructor(raf: (callback: (time: number) => void) => number) {\n super(0);\n this._raf = raf;\n this.update(0);\n }\n\n private _raf: (callback: (time: number) => void) => number;\n private _start: number | undefined;\n private _stop: number | undefined;\n private _state: RNSkClockState = RNSkClockState.NotStarted;\n\n private notifyUpdate = (_: number) => {\n if (this._state === RNSkClockState.Running) {\n const now = Date.now();\n const deltaFromStart = now - this._start!;\n this.tick(deltaFromStart);\n this._raf(this.notifyUpdate);\n }\n };\n\n protected tick(value: number) {\n this.update(value);\n }\n\n public start() {\n if (this._state === RNSkClockState.NotStarted) {\n this._start = Date.now();\n this._stop = this._start;\n }\n // Subtract pause time from start\n const timeSinceStop = Date.now() - this._stop!;\n this._start! += timeSinceStop;\n\n this._state = RNSkClockState.Running;\n this._raf(this.notifyUpdate);\n }\n\n public stop() {\n if (this._state === RNSkClockState.Running) {\n this._state = RNSkClockState.Stopped;\n this._stop = Date.now();\n }\n }\n}\n"],"mappings":";;;;;;;AAEA;;;;IAEKA,c;;WAAAA,c;EAAAA,c,CAAAA,c;EAAAA,c,CAAAA,c;EAAAA,c,CAAAA,c;GAAAA,c,KAAAA,c;;AAME,MAAMC,cAAN,SACGC,oCADH,CAGP;EACEC,WAAW,CAACC,GAAD,EAAoD;IAC7D,MAAM,CAAN;;IAD6D;;IAAA;;IAAA;;IAAA,gCAS9BJ,cAAc,CAACK,UATe;;IAAA,sCAWvCC,CAAD,IAAe;MACpC,IAAI,KAAKC,MAAL,KAAgBP,cAAc,CAACQ,OAAnC,EAA4C;QAC1C,MAAMC,GAAG,GAAGC,IAAI,CAACD,GAAL,EAAZ;QACA,MAAME,cAAc,GAAGF,GAAG,GAAG,KAAKG,MAAlC;QACA,KAAKC,IAAL,CAAUF,cAAV;;QACA,KAAKG,IAAL,CAAU,KAAKC,YAAf;MACD;IACF,CAlB8D;;IAE7D,KAAKD,IAAL,GAAYV,GAAZ;IACA,KAAKY,MAAL,CAAY,CAAZ;EACD;;EAgBSH,IAAI,CAACI,KAAD,EAAgB;IAC5B,KAAKD,MAAL,CAAYC,KAAZ;EACD;;EAEMC,KAAK,GAAG;IACb,IAAI,KAAKX,MAAL,KAAgBP,cAAc,CAACK,UAAnC,EAA+C;MAC7C,KAAKO,MAAL,GAAcF,IAAI,CAACD,GAAL,EAAd;MACA,KAAKU,KAAL,GAAa,KAAKP,MAAlB;IACD,CAJY,CAKb;;;IACA,MAAMQ,aAAa,GAAGV,IAAI,CAACD,GAAL,KAAa,KAAKU,KAAxC;;IACA,KAAKP,MAAL,IAAgBQ,aAAhB;IAEA,KAAKb,MAAL,GAAcP,cAAc,CAACQ,OAA7B;;IACA,KAAKM,IAAL,CAAU,KAAKC,YAAf;EACD;;EAEMM,IAAI,GAAG;IACZ,IAAI,KAAKd,MAAL,KAAgBP,cAAc,CAACQ,OAAnC,EAA4C;MAC1C,KAAKD,MAAL,GAAcP,cAAc,CAACsB,OAA7B;MACA,KAAKH,KAAL,GAAaT,IAAI,CAACD,GAAL,EAAb;IACD;EACF;;AA3CH"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { DependencyList } from "react";
|
2
|
-
import { RNSkReadonlyValue } from "./RNSkReadonlyValue";
|
3
|
-
export declare class RNSkComputedValue<T> extends RNSkReadonlyValue<T> {
|
4
|
-
constructor(callback: () => T, dependencies: DependencyList);
|
5
|
-
private dependecyUpdated;
|
6
|
-
private _callback;
|
7
|
-
private _unsubscribers;
|
8
|
-
unsubscribe(): void;
|
9
|
-
dispose(): void;
|
10
|
-
}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.RNSkComputedValue = void 0;
|
7
|
-
|
8
|
-
var _RNSkReadonlyValue = require("./RNSkReadonlyValue");
|
9
|
-
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
-
|
12
|
-
class RNSkComputedValue extends _RNSkReadonlyValue.RNSkReadonlyValue {
|
13
|
-
constructor(callback, dependencies) {
|
14
|
-
// Initialize dependencies - we can't call this yet, since
|
15
|
-
// super if not called and it requires a start value to be set.
|
16
|
-
const unsubscribers = [];
|
17
|
-
const notifyUpdateRef = {
|
18
|
-
current: undefined
|
19
|
-
};
|
20
|
-
dependencies.forEach(dep => {
|
21
|
-
if (dep && typeof dep === "object" && "__typename__" in dep && "addListener" in dep) {
|
22
|
-
unsubscribers.push(dep.addListener(() => {
|
23
|
-
var _notifyUpdateRef$curr;
|
24
|
-
|
25
|
-
return (_notifyUpdateRef$curr = notifyUpdateRef.current) === null || _notifyUpdateRef$curr === void 0 ? void 0 : _notifyUpdateRef$curr.call(notifyUpdateRef);
|
26
|
-
}));
|
27
|
-
}
|
28
|
-
});
|
29
|
-
super(callback());
|
30
|
-
|
31
|
-
_defineProperty(this, "_callback", void 0);
|
32
|
-
|
33
|
-
_defineProperty(this, "_unsubscribers", void 0);
|
34
|
-
|
35
|
-
this._unsubscribers = unsubscribers;
|
36
|
-
notifyUpdateRef.current = this.dependecyUpdated.bind(this);
|
37
|
-
this._callback = callback;
|
38
|
-
}
|
39
|
-
|
40
|
-
dependecyUpdated() {
|
41
|
-
this.update(this._callback());
|
42
|
-
}
|
43
|
-
|
44
|
-
unsubscribe() {
|
45
|
-
this._unsubscribers.forEach(unsubscribe => unsubscribe());
|
46
|
-
|
47
|
-
this._unsubscribers = [];
|
48
|
-
}
|
49
|
-
|
50
|
-
dispose() {
|
51
|
-
this._unsubscribers.forEach(unsubscribe => unsubscribe());
|
52
|
-
|
53
|
-
this._unsubscribers = [];
|
54
|
-
}
|
55
|
-
|
56
|
-
}
|
57
|
-
|
58
|
-
exports.RNSkComputedValue = RNSkComputedValue;
|
59
|
-
//# sourceMappingURL=RNSkComputedValue.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["RNSkComputedValue","RNSkReadonlyValue","constructor","callback","dependencies","unsubscribers","notifyUpdateRef","current","undefined","forEach","dep","push","addListener","_unsubscribers","dependecyUpdated","bind","_callback","update","unsubscribe","dispose"],"sources":["RNSkComputedValue.ts"],"sourcesContent":["import type { DependencyList } from \"react\";\n\nimport { RNSkReadonlyValue } from \"./RNSkReadonlyValue\";\n\nexport class RNSkComputedValue<T> extends RNSkReadonlyValue<T> {\n constructor(callback: () => T, dependencies: DependencyList) {\n // Initialize dependencies - we can't call this yet, since\n // super if not called and it requires a start value to be set.\n const unsubscribers: Array<() => void> = [];\n const notifyUpdateRef: { current: (() => void) | undefined } = {\n current: undefined,\n };\n dependencies.forEach((dep) => {\n if (\n dep &&\n typeof dep === \"object\" &&\n \"__typename__\" in dep &&\n \"addListener\" in dep\n ) {\n unsubscribers.push(\n (dep as RNSkReadonlyValue<unknown>).addListener(() =>\n notifyUpdateRef.current?.()\n )\n );\n }\n });\n super(callback());\n this._unsubscribers = unsubscribers;\n notifyUpdateRef.current = this.dependecyUpdated.bind(this);\n this._callback = callback;\n }\n\n private dependecyUpdated() {\n this.update(this._callback());\n }\n\n private _callback: () => T;\n private _unsubscribers: Array<() => void>;\n\n public unsubscribe() {\n this._unsubscribers.forEach((unsubscribe) => unsubscribe());\n this._unsubscribers = [];\n }\n\n public dispose(): void {\n this._unsubscribers.forEach((unsubscribe) => unsubscribe());\n this._unsubscribers = [];\n }\n}\n"],"mappings":";;;;;;;AAEA;;;;AAEO,MAAMA,iBAAN,SAAmCC,oCAAnC,CAAwD;EAC7DC,WAAW,CAACC,QAAD,EAAoBC,YAApB,EAAkD;IAC3D;IACA;IACA,MAAMC,aAAgC,GAAG,EAAzC;IACA,MAAMC,eAAsD,GAAG;MAC7DC,OAAO,EAAEC;IADoD,CAA/D;IAGAJ,YAAY,CAACK,OAAb,CAAsBC,GAAD,IAAS;MAC5B,IACEA,GAAG,IACH,OAAOA,GAAP,KAAe,QADf,IAEA,kBAAkBA,GAFlB,IAGA,iBAAiBA,GAJnB,EAKE;QACAL,aAAa,CAACM,IAAd,CACGD,GAAD,CAAoCE,WAApC,CAAgD;UAAA;;UAAA,gCAC9CN,eAAe,CAACC,OAD8B,0DAC9C,2BAAAD,eAAe,CAD+B;QAAA,CAAhD,CADF;MAKD;IACF,CAbD;IAcA,MAAMH,QAAQ,EAAd;;IArB2D;;IAAA;;IAsB3D,KAAKU,cAAL,GAAsBR,aAAtB;IACAC,eAAe,CAACC,OAAhB,GAA0B,KAAKO,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAA1B;IACA,KAAKC,SAAL,GAAiBb,QAAjB;EACD;;EAEOW,gBAAgB,GAAG;IACzB,KAAKG,MAAL,CAAY,KAAKD,SAAL,EAAZ;EACD;;EAKME,WAAW,GAAG;IACnB,KAAKL,cAAL,CAAoBJ,OAApB,CAA6BS,WAAD,IAAiBA,WAAW,EAAxD;;IACA,KAAKL,cAAL,GAAsB,EAAtB;EACD;;EAEMM,OAAO,GAAS;IACrB,KAAKN,cAAL,CAAoBJ,OAApB,CAA6BS,WAAD,IAAiBA,WAAW,EAAxD;;IACA,KAAKL,cAAL,GAAsB,EAAtB;EACD;;AA3C4D"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import type { SkiaValue } from "../types";
|
2
|
-
export declare class RNSkReadonlyValue<T> implements SkiaValue<T> {
|
3
|
-
constructor(value: T);
|
4
|
-
private _current;
|
5
|
-
private _listeners;
|
6
|
-
private notifyListeners;
|
7
|
-
protected update(nextValue: T): void;
|
8
|
-
readonly __typename__ = "RNSkValue";
|
9
|
-
get current(): T;
|
10
|
-
addListener(cb: (value: T) => void): () => void;
|
11
|
-
dispose(): void;
|
12
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.RNSkReadonlyValue = void 0;
|
7
|
-
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9
|
-
|
10
|
-
class RNSkReadonlyValue {
|
11
|
-
constructor(value) {
|
12
|
-
_defineProperty(this, "_current", void 0);
|
13
|
-
|
14
|
-
_defineProperty(this, "_listeners", []);
|
15
|
-
|
16
|
-
_defineProperty(this, "__typename__", "RNSkValue");
|
17
|
-
|
18
|
-
this._current = value;
|
19
|
-
}
|
20
|
-
|
21
|
-
notifyListeners() {
|
22
|
-
this._listeners.forEach(cb => cb(this._current));
|
23
|
-
}
|
24
|
-
|
25
|
-
update(nextValue) {
|
26
|
-
if (this._current !== nextValue) {
|
27
|
-
this._current = nextValue;
|
28
|
-
this.notifyListeners();
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
get current() {
|
33
|
-
return this._current;
|
34
|
-
}
|
35
|
-
|
36
|
-
addListener(cb) {
|
37
|
-
this._listeners.push(cb);
|
38
|
-
|
39
|
-
return () => {
|
40
|
-
this._listeners.splice(this._listeners.indexOf(cb), 1);
|
41
|
-
};
|
42
|
-
}
|
43
|
-
|
44
|
-
dispose() {
|
45
|
-
this._listeners = [];
|
46
|
-
}
|
47
|
-
|
48
|
-
}
|
49
|
-
|
50
|
-
exports.RNSkReadonlyValue = RNSkReadonlyValue;
|
51
|
-
//# sourceMappingURL=RNSkReadonlyValue.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["RNSkReadonlyValue","constructor","value","_current","notifyListeners","_listeners","forEach","cb","update","nextValue","current","addListener","push","splice","indexOf","dispose"],"sources":["RNSkReadonlyValue.ts"],"sourcesContent":["import type { SkiaValue } from \"../types\";\n\nexport class RNSkReadonlyValue<T> implements SkiaValue<T> {\n constructor(value: T) {\n this._current = value;\n }\n\n private _current: T;\n private _listeners: Array<(value: T) => void> = [];\n\n private notifyListeners(): void {\n this._listeners.forEach((cb) => cb(this._current));\n }\n\n protected update(nextValue: T): void {\n if (this._current !== nextValue) {\n this._current = nextValue;\n this.notifyListeners();\n }\n }\n\n public readonly __typename__ = \"RNSkValue\";\n\n public get current(): T {\n return this._current;\n }\n\n public addListener(cb: (value: T) => void) {\n this._listeners.push(cb);\n return () => {\n this._listeners.splice(this._listeners.indexOf(cb), 1);\n };\n }\n\n public dispose(): void {\n this._listeners = [];\n }\n}\n"],"mappings":";;;;;;;;;AAEO,MAAMA,iBAAN,CAAmD;EACxDC,WAAW,CAACC,KAAD,EAAW;IAAA;;IAAA,oCAK0B,EAL1B;;IAAA,sCAkBS,WAlBT;;IACpB,KAAKC,QAAL,GAAgBD,KAAhB;EACD;;EAKOE,eAAe,GAAS;IAC9B,KAAKC,UAAL,CAAgBC,OAAhB,CAAyBC,EAAD,IAAQA,EAAE,CAAC,KAAKJ,QAAN,CAAlC;EACD;;EAESK,MAAM,CAACC,SAAD,EAAqB;IACnC,IAAI,KAAKN,QAAL,KAAkBM,SAAtB,EAAiC;MAC/B,KAAKN,QAAL,GAAgBM,SAAhB;MACA,KAAKL,eAAL;IACD;EACF;;EAIiB,IAAPM,OAAO,GAAM;IACtB,OAAO,KAAKP,QAAZ;EACD;;EAEMQ,WAAW,CAACJ,EAAD,EAAyB;IACzC,KAAKF,UAAL,CAAgBO,IAAhB,CAAqBL,EAArB;;IACA,OAAO,MAAM;MACX,KAAKF,UAAL,CAAgBQ,MAAhB,CAAuB,KAAKR,UAAL,CAAgBS,OAAhB,CAAwBP,EAAxB,CAAvB,EAAoD,CAApD;IACD,CAFD;EAGD;;EAEMQ,OAAO,GAAS;IACrB,KAAKV,UAAL,GAAkB,EAAlB;EACD;;AAlCuD"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { SkiaAnimation, SkiaValue } from "../types";
|
2
|
-
import { RNSkReadonlyValue } from "./RNSkReadonlyValue";
|
3
|
-
export declare class RNSkValue<T> extends RNSkReadonlyValue<T> implements SkiaValue<T> {
|
4
|
-
constructor(value: T);
|
5
|
-
set current(value: T);
|
6
|
-
get current(): T;
|
7
|
-
private _unsubscribe;
|
8
|
-
private unsubscribe;
|
9
|
-
private subscribe;
|
10
|
-
private animationDidUpdate;
|
11
|
-
private _animation;
|
12
|
-
get animation(): SkiaAnimation | undefined;
|
13
|
-
set animation(v: SkiaAnimation | undefined);
|
14
|
-
}
|