react-native-worklets 0.7.0-nightly-20251015-0297d2990 → 0.7.0-nightly-20251017-662b1e7c1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
#import <worklets/apple/SlowAnimations.h>
|
|
6
6
|
#import <chrono>
|
|
7
7
|
|
|
8
|
+
#if TARGET_OS_OSX
|
|
9
|
+
#import <QuartzCore/CADisplayLink.h>
|
|
10
|
+
#endif // TARGET_OS_OSX
|
|
11
|
+
|
|
8
12
|
#import <React/RCTAssert.h>
|
|
9
13
|
|
|
10
14
|
constexpr auto TIME_SAMPLES_AMOUNT = 4;
|
|
@@ -34,7 +38,11 @@ typedef void (^AnimationFrameCallback)(WorkletsDisplayLink *displayLink);
|
|
|
34
38
|
{
|
|
35
39
|
AssertJavaScriptQueue();
|
|
36
40
|
if constexpr (worklets::StaticFeatureFlags::getFlag("IOS_DYNAMIC_FRAMERATE_ENABLED")) {
|
|
37
|
-
bool supportsProMotion =
|
|
41
|
+
bool supportsProMotion = false;
|
|
42
|
+
#if !TARGET_OS_OSX
|
|
43
|
+
supportsProMotion = [UIScreen mainScreen].maximumFramesPerSecond > 60;
|
|
44
|
+
#endif // !TARGET_OS_OSX
|
|
45
|
+
|
|
38
46
|
SEL frameCallback = supportsProMotion ? @selector(executeQueueForProMotion:) : @selector(executeQueue:);
|
|
39
47
|
currentFrameRate_ = supportsProMotion ? FrameRateRange::BEST : FrameRateRange::STANDARD;
|
|
40
48
|
displayLink_ = [WorkletsDisplayLink displayLinkWithTarget:self selector:frameCallback];
|
|
@@ -120,7 +128,9 @@ typedef void (^AnimationFrameCallback)(WorkletsDisplayLink *displayLink);
|
|
|
120
128
|
frameRateRange = FrameRateRange::POOR;
|
|
121
129
|
}
|
|
122
130
|
if (currentFrameRate_.preferred != frameRateRange.preferred) {
|
|
131
|
+
#if !TARGET_OS_OSX
|
|
123
132
|
displayLink_.preferredFrameRateRange = frameRateRange;
|
|
133
|
+
#endif // !TARGET_OS_OSX
|
|
124
134
|
currentFrameRate_ = frameRateRange;
|
|
125
135
|
}
|
|
126
136
|
}
|
package/compatibility.json
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* version used to build the native part of the library in runtime. Remember to
|
|
6
6
|
* keep this in sync with the version declared in `package.json`
|
|
7
7
|
*/
|
|
8
|
-
export const jsVersion = '0.7.0-nightly-
|
|
8
|
+
export const jsVersion = '0.7.0-nightly-20251017-662b1e7c1';
|
|
9
9
|
//# sourceMappingURL=jsVersion.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* version used to build the native part of the library in runtime. Remember to
|
|
4
4
|
* keep this in sync with the version declared in `package.json`
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsVersion = "0.7.0-nightly-
|
|
6
|
+
export declare const jsVersion = "0.7.0-nightly-20251017-662b1e7c1";
|
|
7
7
|
//# sourceMappingURL=jsVersion.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-worklets",
|
|
3
|
-
"version": "0.7.0-nightly-
|
|
3
|
+
"version": "0.7.0-nightly-20251017-662b1e7c1",
|
|
4
4
|
"description": "The React Native multithreading library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -50,38 +50,38 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://docs.swmansion.com/react-native-worklets",
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@babel/core": "
|
|
53
|
+
"@babel/core": "*",
|
|
54
54
|
"react": "*",
|
|
55
55
|
"react-native": "*"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@babel/plugin-transform-arrow-functions": "
|
|
59
|
-
"@babel/plugin-transform-class-properties": "
|
|
60
|
-
"@babel/plugin-transform-classes": "
|
|
61
|
-
"@babel/plugin-transform-nullish-coalescing-operator": "
|
|
62
|
-
"@babel/plugin-transform-optional-chaining": "
|
|
63
|
-
"@babel/plugin-transform-shorthand-properties": "
|
|
64
|
-
"@babel/plugin-transform-template-literals": "
|
|
65
|
-
"@babel/plugin-transform-unicode-regex": "
|
|
66
|
-
"@babel/preset-typescript": "
|
|
67
|
-
"convert-source-map": "
|
|
68
|
-
"semver": "7.7.
|
|
58
|
+
"@babel/plugin-transform-arrow-functions": "7.27.1",
|
|
59
|
+
"@babel/plugin-transform-class-properties": "7.27.1",
|
|
60
|
+
"@babel/plugin-transform-classes": "7.28.4",
|
|
61
|
+
"@babel/plugin-transform-nullish-coalescing-operator": "7.27.1",
|
|
62
|
+
"@babel/plugin-transform-optional-chaining": "7.27.1",
|
|
63
|
+
"@babel/plugin-transform-shorthand-properties": "7.27.1",
|
|
64
|
+
"@babel/plugin-transform-template-literals": "7.27.1",
|
|
65
|
+
"@babel/plugin-transform-unicode-regex": "7.27.1",
|
|
66
|
+
"@babel/preset-typescript": "7.27.1",
|
|
67
|
+
"convert-source-map": "2.0.0",
|
|
68
|
+
"semver": "7.7.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@babel/cli": "
|
|
72
|
-
"@babel/core": "
|
|
71
|
+
"@babel/cli": "7.28.3",
|
|
72
|
+
"@babel/core": "7.28.4",
|
|
73
73
|
"@react-native-community/cli": "20.0.0",
|
|
74
74
|
"@react-native/eslint-config": "0.82.0",
|
|
75
|
-
"@types/jest": "
|
|
76
|
-
"@types/
|
|
77
|
-
"
|
|
78
|
-
"clang-format-node": "
|
|
79
|
-
"
|
|
80
|
-
"eslint
|
|
81
|
-
"jest": "
|
|
82
|
-
"knip": "
|
|
83
|
-
"madge": "
|
|
84
|
-
"prettier": "
|
|
75
|
+
"@types/jest": "30.0.0",
|
|
76
|
+
"@types/node": "24.7.0",
|
|
77
|
+
"@types/react": "19.2.2",
|
|
78
|
+
"clang-format-node": "1.3.5",
|
|
79
|
+
"code-tag": "1.2.0",
|
|
80
|
+
"eslint": "9.37.0",
|
|
81
|
+
"jest": "30.2.0",
|
|
82
|
+
"knip": "5.61.3",
|
|
83
|
+
"madge": "8.0.0",
|
|
84
|
+
"prettier": "3.6.2",
|
|
85
85
|
"react": "19.1.1",
|
|
86
86
|
"react-native": "0.82.0",
|
|
87
87
|
"react-native-builder-bob": "0.40.13",
|
package/plugin/index.js
CHANGED
|
@@ -571,9 +571,8 @@ var require_transform = __commonJS({
|
|
|
571
571
|
"use strict";
|
|
572
572
|
var __rest = exports2 && exports2.__rest || function(s, e) {
|
|
573
573
|
var t = {};
|
|
574
|
-
for (var p in s)
|
|
575
|
-
|
|
576
|
-
t[p] = s[p];
|
|
574
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
575
|
+
t[p] = s[p];
|
|
577
576
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
578
577
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
579
578
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
@@ -599,9 +598,8 @@ var require_transform = __commonJS({
|
|
|
599
598
|
var require_workletStringCode = __commonJS({
|
|
600
599
|
"lib/workletStringCode.js"(exports2) {
|
|
601
600
|
"use strict";
|
|
602
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
603
|
-
if (k2 === void 0)
|
|
604
|
-
k2 = k;
|
|
601
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
602
|
+
if (k2 === void 0) k2 = k;
|
|
605
603
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
606
604
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
607
605
|
desc = { enumerable: true, get: function() {
|
|
@@ -609,40 +607,34 @@ var require_workletStringCode = __commonJS({
|
|
|
609
607
|
} };
|
|
610
608
|
}
|
|
611
609
|
Object.defineProperty(o, k2, desc);
|
|
612
|
-
} : function(o, m, k, k2) {
|
|
613
|
-
if (k2 === void 0)
|
|
614
|
-
k2 = k;
|
|
610
|
+
}) : (function(o, m, k, k2) {
|
|
611
|
+
if (k2 === void 0) k2 = k;
|
|
615
612
|
o[k2] = m[k];
|
|
616
|
-
});
|
|
617
|
-
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
613
|
+
}));
|
|
614
|
+
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
618
615
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
619
|
-
} : function(o, v) {
|
|
616
|
+
}) : function(o, v) {
|
|
620
617
|
o["default"] = v;
|
|
621
618
|
});
|
|
622
|
-
var __importStar = exports2 && exports2.__importStar || function() {
|
|
619
|
+
var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
|
|
623
620
|
var ownKeys = function(o) {
|
|
624
621
|
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
625
622
|
var ar = [];
|
|
626
|
-
for (var k in o2)
|
|
627
|
-
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
628
|
-
ar[ar.length] = k;
|
|
623
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
629
624
|
return ar;
|
|
630
625
|
};
|
|
631
626
|
return ownKeys(o);
|
|
632
627
|
};
|
|
633
628
|
return function(mod) {
|
|
634
|
-
if (mod && mod.__esModule)
|
|
635
|
-
return mod;
|
|
629
|
+
if (mod && mod.__esModule) return mod;
|
|
636
630
|
var result = {};
|
|
637
631
|
if (mod != null) {
|
|
638
|
-
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
639
|
-
if (k[i] !== "default")
|
|
640
|
-
__createBinding(result, mod, k[i]);
|
|
632
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
641
633
|
}
|
|
642
634
|
__setModuleDefault(result, mod);
|
|
643
635
|
return result;
|
|
644
636
|
};
|
|
645
|
-
}();
|
|
637
|
+
})();
|
|
646
638
|
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
647
639
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
648
640
|
};
|
package/src/utils/jsVersion.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* version used to build the native part of the library in runtime. Remember to
|
|
5
5
|
* keep this in sync with the version declared in `package.json`
|
|
6
6
|
*/
|
|
7
|
-
export const jsVersion = '0.7.0-nightly-
|
|
7
|
+
export const jsVersion = '0.7.0-nightly-20251017-662b1e7c1';
|