@amazon-devices/react-native-worklets 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/cpp/worklets/Registries/EventHandlerRegistry.h +5 -3
- package/Common/cpp/worklets/RunLoop/AsyncQueueImpl.cpp +5 -6
- package/Common/cpp/worklets/RunLoop/EventLoop.cpp +6 -6
- package/Common/cpp/worklets/SharedItems/Serializable.h +9 -8
- package/Common/cpp/worklets/Tools/JSISerializer.h +4 -4
- package/Common/cpp/worklets/Tools/JSScheduler.h +5 -3
- package/Common/cpp/worklets/Tools/SingleInstanceChecker.h +3 -2
- package/Common/cpp/worklets/Tools/UIScheduler.h +4 -4
- package/Common/cpp/worklets/Tools/VersionUtils.h +1 -4
- package/Common/cpp/worklets/Tools/WorkletsSystraceSection.h +0 -25
- package/SystemModules/amzn__react-native-worklets-1.private.modules.txt +57 -33
- package/kepler-compatibility.json +3 -1
- package/lib/module/index.js +0 -25
- package/oss-attribution/attribution.txt +2262 -0
- package/oss-attribution/licenseInfos.json +585 -0
- package/package.json +1 -153
- package/src/index.ts +0 -52
- package/SystemBundles/cc12deac6e91c435b76698c8445aed85612f2f88e733218d14f88a35d06fb0f4.bundle +0 -10512
- package/SystemBundles/cc12deac6e91c435b76698c8445aed85612f2f88e733218d14f88a35d06fb0f4.map +0 -3771
- package/bundleMode/index.js +0 -59
- package/lib/module/PlatformChecker/PlatformChecker.js +0 -8
- package/lib/module/PlatformChecker/index.js +0 -18
- package/lib/module/WorkletsError.js +0 -29
- package/lib/module/WorkletsModule/JSWorklets.js +0 -111
- package/lib/module/WorkletsModule/NativeWorklets.js +0 -126
- package/lib/module/WorkletsModule/index.js +0 -4
- package/lib/module/WorkletsModule/workletsModuleInstance.js +0 -7
- package/lib/module/WorkletsModule/workletsModuleInstance.web.js +0 -5
- package/lib/module/WorkletsModule/workletsModuleProxy.js +0 -4
- package/lib/module/bundleUnpacker.js +0 -47
- package/lib/module/callGuard.js +0 -30
- package/lib/module/deprecated.js +0 -20
- package/lib/module/errors.js +0 -69
- package/lib/module/featureFlags/index.js +0 -48
- package/lib/module/initializers.js +0 -221
- package/lib/module/isSynchronizable.js +0 -6
- package/lib/module/logger.js +0 -15
- package/lib/module/privateGlobals.d.js +0 -7
- package/lib/module/publicGlobals.js +0 -6
- package/lib/module/runLoop/common/setImmediatePolyfill.js +0 -15
- package/lib/module/runLoop/common/setIntervalPolyfill.js +0 -26
- package/lib/module/runLoop/uiRuntime/mockedRequestAnimationFrame.js +0 -10
- package/lib/module/runLoop/uiRuntime/requestAnimationFrame.js +0 -52
- package/lib/module/runLoop/uiRuntime/setTimeoutPolyfill.js +0 -32
- package/lib/module/runLoop/workletRuntime/index.js +0 -19
- package/lib/module/runLoop/workletRuntime/queueMicrotask.js +0 -11
- package/lib/module/runLoop/workletRuntime/requestAnimationFramePolyfill.js +0 -48
- package/lib/module/runLoop/workletRuntime/setTimeout.js +0 -28
- package/lib/module/runLoop/workletRuntime/taskQueue.js +0 -37
- package/lib/module/runtimeKind.js +0 -39
- package/lib/module/runtimes.js +0 -100
- package/lib/module/serializable.js +0 -568
- package/lib/module/serializableMappingCache.js +0 -37
- package/lib/module/specs/NativeWorkletsModule.js +0 -5
- package/lib/module/specs/NativeWorkletsModule.kepler.js +0 -7
- package/lib/module/specs/index.js +0 -10
- package/lib/module/synchronizable.js +0 -9
- package/lib/module/synchronizableUnpacker.js +0 -42
- package/lib/module/threads.js +0 -347
- package/lib/module/utils/checkCppVersion.js +0 -30
- package/lib/module/utils/jsVersion.js +0 -9
- package/lib/module/valueUnpacker.js +0 -60
- package/lib/module/workletFunction.js +0 -37
- package/lib/module/workletRuntimeEntry.js +0 -32
- package/lib/module/workletTypes.js +0 -12
- package/scripts/validate-react-native-version.js +0 -43
- package/src/PlatformChecker/PlatformChecker.ts +0 -7
- package/src/PlatformChecker/index.ts +0 -30
- package/src/WorkletsError.ts +0 -36
- package/src/WorkletsModule/JSWorklets.ts +0 -200
- package/src/WorkletsModule/NativeWorklets.ts +0 -256
- package/src/WorkletsModule/index.ts +0 -7
- package/src/WorkletsModule/workletsModuleInstance.ts +0 -9
- package/src/WorkletsModule/workletsModuleInstance.web.ts +0 -5
- package/src/WorkletsModule/workletsModuleProxy.ts +0 -126
- package/src/bundleUnpacker.ts +0 -75
- package/src/callGuard.ts +0 -33
- package/src/deprecated.ts +0 -32
- package/src/errors.ts +0 -80
- package/src/featureFlags/index.ts +0 -72
- package/src/initializers.ts +0 -262
- package/src/isSynchronizable.ts +0 -13
- package/src/logger.ts +0 -16
- package/src/publicGlobals.ts +0 -39
- package/src/runLoop/common/setImmediatePolyfill.ts +0 -20
- package/src/runLoop/common/setIntervalPolyfill.ts +0 -38
- package/src/runLoop/uiRuntime/mockedRequestAnimationFrame.ts +0 -11
- package/src/runLoop/uiRuntime/requestAnimationFrame.ts +0 -66
- package/src/runLoop/uiRuntime/setTimeoutPolyfill.ts +0 -40
- package/src/runLoop/workletRuntime/index.ts +0 -18
- package/src/runLoop/workletRuntime/queueMicrotask.ts +0 -13
- package/src/runLoop/workletRuntime/requestAnimationFramePolyfill.ts +0 -61
- package/src/runLoop/workletRuntime/setTimeout.ts +0 -37
- package/src/runLoop/workletRuntime/taskQueue.ts +0 -44
- package/src/runtimeKind.ts +0 -37
- package/src/runtimes.ts +0 -193
- package/src/serializable.ts +0 -801
- package/src/serializableMappingCache.ts +0 -42
- package/src/specs/NativeWorkletsModule.kepler.ts +0 -11
- package/src/specs/NativeWorkletsModule.ts +0 -9
- package/src/specs/index.ts +0 -13
- package/src/synchronizable.ts +0 -32
- package/src/synchronizableUnpacker.ts +0 -67
- package/src/threads.ts +0 -452
- package/src/utils/checkCppVersion.ts +0 -34
- package/src/utils/jsVersion.ts +0 -7
- package/src/valueUnpacker.ts +0 -90
- package/src/workletFunction.ts +0 -42
- package/src/workletRuntimeEntry.ts +0 -35
- package/src/workletTypes.ts +0 -81
package/package.json
CHANGED
|
@@ -1,153 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"//": "amzn_mod - update package name and build with yarn",
|
|
3
|
-
"name": "@amazon-devices/react-native-worklets",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"description": "The React Native multithreading library",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"react-native",
|
|
8
|
-
"react",
|
|
9
|
-
"native",
|
|
10
|
-
"worklets"
|
|
11
|
-
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "yarn workspace @amazon-devices/babel-plugin-worklets build && bob build && yarn build:unpackers",
|
|
14
|
-
"build:unpackers": "node ./scripts/export-unpackers.js",
|
|
15
|
-
"circular-dependency-check": "yarn madge --extensions js,jsx --circular lib",
|
|
16
|
-
"find-unused-code:js": "knip",
|
|
17
|
-
"format": "yarn format:js && yarn format:plugin && yarn format:common && yarn format:android && yarn format:apple",
|
|
18
|
-
"format:android": "yarn format:android:java && yarn format:android:cpp && yarn format:android:cmake",
|
|
19
|
-
"format:android:cpp": "find android/src -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i",
|
|
20
|
-
"format:android:cmake": "find ./android -type d \\( -name build -o -name .cxx \\) -prune -o -type f -name 'CMakeLists.txt' -print | xargs ../../scripts/format-cmake.sh",
|
|
21
|
-
"format:android:java": "node ../../scripts/format-java.js",
|
|
22
|
-
"format:apple": "find apple -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" -o -iname \"*.cpp\" | xargs clang-format -i",
|
|
23
|
-
"format:common": "find Common -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i",
|
|
24
|
-
"format:js": "prettier --write --list-different src",
|
|
25
|
-
"format:plugin": "yarn workspace babel-plugin-worklets format",
|
|
26
|
-
"lint": "yarn lint:js && yarn lint:common && yarn lint:plugin && yarn lint:android && yarn lint:apple",
|
|
27
|
-
"lint:android": "../../scripts/validate-android.sh && ./android/gradlew -p android spotlessCheck -q && ../../scripts/cpplint.sh android/src && yarn format:android:cpp --dry-run -Werror && yarn lint:cmake",
|
|
28
|
-
"lint:apple": "../../scripts/validate-apple.sh && yarn format:apple --dry-run -Werror",
|
|
29
|
-
"lint:common": "../../scripts/validate-common.sh && ../../scripts/cpplint.sh Common && yarn format:common --dry-run -Werror",
|
|
30
|
-
"lint:cmake": "find ./android -type d \\( -name build -o -name .cxx \\) -prune -o -type f -name 'CMakeLists.txt' -print | xargs ../../scripts/lint-cmake.sh",
|
|
31
|
-
"lint:clang-tidy": "find Common -iname \"*.h\" -o -iname \"*.cpp\" | xargs ../../scripts/clang-tidy-lint.sh",
|
|
32
|
-
"lint:js": "eslint src && yarn prettier --check src",
|
|
33
|
-
"lint:plugin": "yarn workspace babel-plugin-worklets lint",
|
|
34
|
-
"test": "jest",
|
|
35
|
-
"type:check": "yarn type:check:src && yarn type:check:plugin && yarn type:check:app && yarn type:check:tests",
|
|
36
|
-
"type:check:src": "yarn tsc --noEmit",
|
|
37
|
-
"type:check:app": "yarn workspace common-app type:check",
|
|
38
|
-
"type:check:plugin": "yarn workspace babel-plugin-worklets type:check",
|
|
39
|
-
"type:check:tests": "../../scripts/test-ts.sh __typetests__",
|
|
40
|
-
"use-strict-check": "node ../../scripts/validate-use-strict.js"
|
|
41
|
-
},
|
|
42
|
-
"repository": {
|
|
43
|
-
"type": "git",
|
|
44
|
-
"url": "git+https://github.com/software-mansion/react-native-reanimated.git",
|
|
45
|
-
"directory": "packages/react-native-worklets"
|
|
46
|
-
},
|
|
47
|
-
"license": "See license in LICENSE",
|
|
48
|
-
"readmeFilename": "README.md",
|
|
49
|
-
"bugs": {
|
|
50
|
-
"url": "https://github.com/software-mansion/react-native-reanimated/issues"
|
|
51
|
-
},
|
|
52
|
-
"homepage": "https://docs.swmansion.com/react-native-worklets",
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"@babel/core": "^7.0.0-0",
|
|
55
|
-
"react": "*",
|
|
56
|
-
"react-native": "*"
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"@babel/plugin-transform-arrow-functions": "^7.0.0-0",
|
|
60
|
-
"@babel/plugin-transform-class-properties": "^7.0.0-0",
|
|
61
|
-
"@babel/plugin-transform-classes": "^7.0.0-0",
|
|
62
|
-
"@babel/plugin-transform-nullish-coalescing-operator": "^7.0.0-0",
|
|
63
|
-
"@babel/plugin-transform-optional-chaining": "^7.0.0-0",
|
|
64
|
-
"@babel/plugin-transform-shorthand-properties": "^7.0.0-0",
|
|
65
|
-
"@babel/plugin-transform-template-literals": "^7.0.0-0",
|
|
66
|
-
"@babel/plugin-transform-unicode-regex": "^7.0.0-0",
|
|
67
|
-
"@babel/preset-typescript": "^7.16.7",
|
|
68
|
-
"convert-source-map": "^2.0.0",
|
|
69
|
-
"semver": "7.7.2"
|
|
70
|
-
},
|
|
71
|
-
"devDependencies": {
|
|
72
|
-
"@babel/cli": "^7.20.0",
|
|
73
|
-
"@babel/core": "^7.25.2",
|
|
74
|
-
"@react-native-community/cli": "20.0.0",
|
|
75
|
-
"@react-native/eslint-config": "0.81.0",
|
|
76
|
-
"@types/jest": "^29.5.5",
|
|
77
|
-
"@types/react": "^19.1.0",
|
|
78
|
-
"clang-format-node": "^1.3.1",
|
|
79
|
-
"eslint": "^9.29.0",
|
|
80
|
-
"jest": "^29.0.0",
|
|
81
|
-
"knip": "^5.61.3",
|
|
82
|
-
"madge": "^5.0.1",
|
|
83
|
-
"prettier": "^3.3.3",
|
|
84
|
-
"react": "19.1.0",
|
|
85
|
-
"react-native": "0.81.5",
|
|
86
|
-
"react-native-builder-bob": "0.40.13",
|
|
87
|
-
"@react-native/babel-preset": "0.81.0",
|
|
88
|
-
"typescript": "5.8.3"
|
|
89
|
-
},
|
|
90
|
-
"main": "./lib/module/index",
|
|
91
|
-
"module": "./lib/module/index",
|
|
92
|
-
"react-native": "./src/index",
|
|
93
|
-
"source": "./src/index",
|
|
94
|
-
"types": "lib/typescript/index.d.ts",
|
|
95
|
-
"files": [
|
|
96
|
-
"src",
|
|
97
|
-
"lib",
|
|
98
|
-
"android",
|
|
99
|
-
"apple",
|
|
100
|
-
"Common",
|
|
101
|
-
"compatibility.json",
|
|
102
|
-
"bundleMode/index.js",
|
|
103
|
-
"bundleMode/index.d.ts",
|
|
104
|
-
"scripts/worklets_utils.rb",
|
|
105
|
-
"scripts/validate-react-native-version.js",
|
|
106
|
-
"SystemModules",
|
|
107
|
-
"SystemBundles",
|
|
108
|
-
"plugin/index.js",
|
|
109
|
-
"*.podspec",
|
|
110
|
-
"react-native.config.js",
|
|
111
|
-
"kepler-compatibility.json",
|
|
112
|
-
"!apple/build",
|
|
113
|
-
"!android/build",
|
|
114
|
-
"!android/gradle",
|
|
115
|
-
"!android/gradlew",
|
|
116
|
-
"!android/gradlew.bat",
|
|
117
|
-
"!android/local.properties",
|
|
118
|
-
"!**/__tests__",
|
|
119
|
-
"!**/__fixtures__",
|
|
120
|
-
"!**/__mocks__",
|
|
121
|
-
"!**/.*",
|
|
122
|
-
"kepler-transformed-package-info.json"
|
|
123
|
-
],
|
|
124
|
-
"react-native-builder-bob": {
|
|
125
|
-
"source": "src",
|
|
126
|
-
"output": "lib",
|
|
127
|
-
"targets": [
|
|
128
|
-
[
|
|
129
|
-
"module",
|
|
130
|
-
{
|
|
131
|
-
"esm": false,
|
|
132
|
-
"jsxRuntime": "automatic"
|
|
133
|
-
}
|
|
134
|
-
],
|
|
135
|
-
"typescript"
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
"codegenConfig": {
|
|
139
|
-
"name": "rnworklets",
|
|
140
|
-
"type": "modules",
|
|
141
|
-
"jsSrcsDir": "src/specs",
|
|
142
|
-
"android": {
|
|
143
|
-
"javaPackageName": "com.swmansion.worklets"
|
|
144
|
-
},
|
|
145
|
-
"ios": {
|
|
146
|
-
"modulesConformingToProtocol": {
|
|
147
|
-
"RCTBundleConsumer": [
|
|
148
|
-
"WorkletsModule"
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
1
|
+
{"name": "@amazon-devices/react-native-worklets", "version": "1.0.2+0.6.0", "description": "The React Native multithreading library", "keywords": ["react-native", "react", "native", "worklets"], "homepage": "https://docs.swmansion.com/react-native-worklets", "bugs": {"url": "https://github.com/software-mansion/react-native-reanimated/issues"}, "license": "See license in LICENSE", "files": ["src", "lib", "android", "apple", "Common", "compatibility.json", "bundleMode/index.js", "bundleMode/index.d.ts", "scripts/worklets_utils.rb", "scripts/validate-react-native-version.js", "SystemModules", "SystemBundles", "plugin/index.js", "*.podspec", "react-native.config.js", "kepler-compatibility.json", "oss-attribution", "!apple/build", "!android/build", "!android/gradle", "!android/gradlew", "!android/gradlew.bat", "!android/local.properties", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__", "!**/.*", "kepler-transformed-package-info.json"], "main": "./lib/module/index", "dependencies": {"@babel/plugin-transform-arrow-functions": "^7.0.0-0", "@babel/plugin-transform-nullish-coalescing-operator": "^7.0.0-0", "@babel/plugin-transform-optional-chaining": "^7.0.0-0", "@babel/plugin-transform-shorthand-properties": "^7.0.0-0", "@babel/plugin-transform-template-literals": "^7.0.0-0", "@babel/preset-typescript": "^7.16.7", "convert-source-map": "^2.0.0"}, "peerDependencies": {"@babel/core": "^7.0.0-0", "react": "*", "react-native": "*"}, "types": "lib/typescript/index.d.ts", "react-native": "./src/index", "interfaceOnly": {"keep": ["plugin"]}}
|
package/src/index.ts
CHANGED
|
@@ -1,53 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
3
|
-
import './publicGlobals';
|
|
4
|
-
|
|
5
|
-
import { init } from './initializers';
|
|
6
|
-
import { bundleModeInit } from './workletRuntimeEntry';
|
|
7
|
-
|
|
8
|
-
init();
|
|
9
|
-
|
|
10
|
-
export type { MakeShareableClone, ShareableRef } from './deprecated';
|
|
11
|
-
export {
|
|
12
|
-
isShareableRef,
|
|
13
|
-
makeShareable,
|
|
14
|
-
makeShareableCloneOnUIRecursive,
|
|
15
|
-
makeShareableCloneRecursive,
|
|
16
|
-
shareableMappingCache,
|
|
17
|
-
} from './deprecated';
|
|
18
|
-
export { getStaticFeatureFlag, setDynamicFeatureFlag } from './featureFlags';
|
|
19
|
-
export { isSynchronizable } from './isSynchronizable';
|
|
20
|
-
export { getRuntimeKind, RuntimeKind } from './runtimeKind';
|
|
21
|
-
export { createWorkletRuntime, runOnRuntime } from './runtimes';
|
|
22
|
-
export { createSerializable, isSerializableRef } from './serializable';
|
|
23
|
-
export { serializableMappingCache } from './serializableMappingCache';
|
|
24
|
-
export type { Synchronizable } from './synchronizable';
|
|
25
|
-
export { createSynchronizable } from './synchronizable';
|
|
26
|
-
export {
|
|
27
|
-
callMicrotasks,
|
|
28
|
-
executeOnUIRuntimeSync,
|
|
29
|
-
runOnJS,
|
|
30
|
-
runOnUI,
|
|
31
|
-
runOnUIAsync,
|
|
32
|
-
runOnUISync,
|
|
33
|
-
scheduleOnRN,
|
|
34
|
-
scheduleOnUI,
|
|
35
|
-
// eslint-disable-next-line camelcase
|
|
36
|
-
unstable_eventLoopTask,
|
|
37
|
-
} from './threads';
|
|
38
|
-
export { isWorkletFunction } from './workletFunction';
|
|
39
|
-
export type { IWorkletsModule, WorkletsModuleProxy } from './WorkletsModule';
|
|
40
|
-
export { WorkletsModule } from './WorkletsModule';
|
|
41
|
-
export type {
|
|
42
|
-
SerializableRef,
|
|
43
|
-
WorkletFunction,
|
|
44
|
-
WorkletRuntime,
|
|
45
|
-
WorkletStackDetails,
|
|
46
|
-
} from './workletTypes';
|
|
47
|
-
|
|
48
|
-
// @ts-expect-error We must trick the bundler to include
|
|
49
|
-
// the `workletRuntimeEntry` file the way it cannot optimize it out.
|
|
50
|
-
if (globalThis._ALWAYS_FALSE) {
|
|
51
|
-
// Bundle mode.
|
|
52
|
-
bundleModeInit();
|
|
53
|
-
}
|