From a553c93e8709abbacf81ae8bcd4d38b68c15fb59 Mon Sep 17 00:00:00 2001 From: mym0404 Date: Sat, 4 May 2024 02:35:15 +0900 Subject: [PATCH] feat: done --- ...-pencil-kit.podspec => RNPencilKit.podspec | 4 +- .../project.pbxproj | 24 +- example/ios/Podfile.lock | 75 ++- example/ios/noop.swift | 8 + example/package.json | 1 + example/src/App.tsx | 73 ++- ios/RNPencilKit.h | 3 + ios/RNPencilKit.mm | 270 ++++++++++- ios/RNPencilKitManager.mm | 5 +- ios/RNPencilKitUtil.h | 13 + ios/RNPencilKitUtil.mm | 72 +++ ios/RNPencilKitUtilFunction.h | 20 + package.json | 8 +- src/PencilKitViewNativeComponent.ts | 8 - src/index.tsx | 117 ++++- src/spec/NativeRNPencilKitUtil.ts | 10 + src/spec/RNPencilKitNativeComponent.ts | 69 +++ yarn.lock | 436 +++++++++++++++++- 18 files changed, 1132 insertions(+), 84 deletions(-) rename react-native-pencil-kit.podspec => RNPencilKit.podspec (94%) create mode 100644 example/ios/noop.swift create mode 100644 ios/RNPencilKitUtil.h create mode 100644 ios/RNPencilKitUtil.mm create mode 100644 ios/RNPencilKitUtilFunction.h delete mode 100644 src/PencilKitViewNativeComponent.ts create mode 100644 src/spec/NativeRNPencilKitUtil.ts create mode 100644 src/spec/RNPencilKitNativeComponent.ts diff --git a/react-native-pencil-kit.podspec b/RNPencilKit.podspec similarity index 94% rename from react-native-pencil-kit.podspec rename to RNPencilKit.podspec index 39c2cb1..61bf754 100644 --- a/react-native-pencil-kit.podspec +++ b/RNPencilKit.podspec @@ -4,14 +4,14 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json"))) folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' Pod::Spec.new do |s| - s.name = "react-native-pencil-kit" + s.name = "RNPencilKit" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors = package["author"] - s.platforms = { :ios => min_ios_version_supported } + s.platforms = { :ios => '14.0' } s.source = { :git => "https://github.com/mym0404/react-native-pencil-kit.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,mm}" diff --git a/example/ios/PencilKitExample.xcodeproj/project.pbxproj b/example/ios/PencilKitExample.xcodeproj/project.pbxproj index 01eeebe..19a27e6 100644 --- a/example/ios/PencilKitExample.xcodeproj/project.pbxproj +++ b/example/ios/PencilKitExample.xcodeproj/project.pbxproj @@ -12,6 +12,9 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 2D8473532BE51B21002D299C /* noop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D8473522BE51B21002D299C /* noop.swift */; }; + 2D8473582BE51E3E002D299C /* libPods-PencilKitExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D8473572BE51E3E002D299C /* libPods-PencilKitExample.a */; }; + 2D8473592BE51E96002D299C /* PencilKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D8473552BE51D03002D299C /* PencilKit.framework */; }; 7699B88040F8A987B510C191 /* libPods-PencilKitExample-PencilKitExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-PencilKitExample-PencilKitExampleTests.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ @@ -38,6 +41,10 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = PencilKitExample/main.m; sourceTree = ""; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = PencilKitExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; 19F6CBCC0A4E27FBF8BF4A61 /* libPods-PencilKitExample-PencilKitExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PencilKitExample-PencilKitExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D8473512BE51B21002D299C /* PencilKitExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PencilKitExample-Bridging-Header.h"; sourceTree = ""; }; + 2D8473522BE51B21002D299C /* noop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = noop.swift; sourceTree = ""; }; + 2D8473552BE51D03002D299C /* PencilKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PencilKit.framework; path = System/Library/Frameworks/PencilKit.framework; sourceTree = SDKROOT; }; + 2D8473572BE51E3E002D299C /* libPods-PencilKitExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libPods-PencilKitExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3B4392A12AC88292D35C810B /* Pods-PencilKitExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PencilKitExample.debug.xcconfig"; path = "Target Support Files/Pods-PencilKitExample/Pods-PencilKitExample.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-PencilKitExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PencilKitExample.release.xcconfig"; path = "Target Support Files/Pods-PencilKitExample/Pods-PencilKitExample.release.xcconfig"; sourceTree = ""; }; 5B7EB9410499542E8C5724F5 /* Pods-PencilKitExample-PencilKitExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PencilKitExample-PencilKitExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-PencilKitExample-PencilKitExampleTests/Pods-PencilKitExample-PencilKitExampleTests.debug.xcconfig"; sourceTree = ""; }; @@ -60,7 +67,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 2D8473582BE51E3E002D299C /* libPods-PencilKitExample.a in Frameworks */, 0C80B921A6F3F58F76C31292 /* libPods-PencilKitExample.a in Frameworks */, + 2D8473592BE51E96002D299C /* PencilKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -94,6 +103,8 @@ 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 13B07FB71A68108700A75B9A /* main.m */, 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, + 2D8473522BE51B21002D299C /* noop.swift */, + 2D8473512BE51B21002D299C /* PencilKitExample-Bridging-Header.h */, ); name = PencilKitExample; sourceTree = ""; @@ -101,6 +112,8 @@ 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( + 2D8473572BE51E3E002D299C /* libPods-PencilKitExample.a */, + 2D8473552BE51D03002D299C /* PencilKit.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 5DCACB8F33CDC322A6C60F78 /* libPods-PencilKitExample.a */, 19F6CBCC0A4E27FBF8BF4A61 /* libPods-PencilKitExample-PencilKitExampleTests.a */, @@ -208,7 +221,7 @@ TestTargetID = 13B07F861A680F5B00A75B9A; }; 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; + LastSwiftMigration = 1530; }; }; }; @@ -395,6 +408,7 @@ buildActionMask = 2147483647; files = ( 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, + 2D8473532BE51B21002D299C /* noop.swift in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -414,6 +428,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-PencilKitExample-PencilKitExampleTests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -441,6 +456,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-PencilKitExample-PencilKitExampleTests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = PencilKitExampleTests/Info.plist; @@ -470,6 +486,8 @@ CURRENT_PROJECT_VERSION = 1; ENABLE_BITCODE = NO; INFOPLIST_FILE = PencilKitExample/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -482,6 +500,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = PencilKitExample; + SWIFT_OBJC_BRIDGING_HEADER = "PencilKitExample-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -496,6 +515,8 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = PencilKitExample/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -508,6 +529,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = PencilKitExample; + SWIFT_OBJC_BRIDGING_HEADER = "PencilKitExample-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index f81fbde..f45c246 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,27 @@ PODS: - boost (1.83.0) - DoubleConversion (1.1.6) + - dr-pogodin-react-native-fs (2.24.6): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - FBLazyVector (0.74.0) - fmt (9.1.0) - glog (0.3.5) @@ -935,27 +956,6 @@ PODS: - React-Mapbuffer (0.74.0): - glog - React-debug - - react-native-pencil-kit (0.1.0-alpha.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Codegen - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - React-nativeconfig (0.74.0) - React-NativeModulesApple (0.74.0): - glog @@ -1184,12 +1184,34 @@ PODS: - React-logger (= 0.74.0) - React-perflogger (= 0.74.0) - React-utils (= 0.74.0) + - RNPencilKit (0.1.0-alpha.2): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - SocketRocket (0.7.0) - Yoga (0.0.0) DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - "dr-pogodin-react-native-fs (from `../node_modules/@dr.pogodin/react-native-fs`)" - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) @@ -1220,7 +1242,6 @@ DEPENDENCIES: - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - - react-native-pencil-kit (from `../..`) - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) @@ -1244,6 +1265,7 @@ DEPENDENCIES: - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - RNPencilKit (from `../..`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -1255,6 +1277,8 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + dr-pogodin-react-native-fs: + :path: "../node_modules/@dr.pogodin/react-native-fs" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" fmt: @@ -1312,8 +1336,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/logger" React-Mapbuffer: :path: "../node_modules/react-native/ReactCommon" - react-native-pencil-kit: - :path: "../.." React-nativeconfig: :path: "../node_modules/react-native/ReactCommon" React-NativeModulesApple: @@ -1360,12 +1382,15 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/utils" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + RNPencilKit: + :path: "../.." Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: boost: d3f49c53809116a5d38da093a8aa78bf551aed09 DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 + dr-pogodin-react-native-fs: 7e0b92aa0ea441ed86247cec1686e6682378afe0 FBLazyVector: 026c8f4ae67b06e088ae01baa2271ef8a26c0e8c fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 @@ -1394,7 +1419,6 @@ SPEC CHECKSUMS: React-jsitracing: 36a2bbc272300313653d980de5ab700ec86c534a React-logger: 03f2f7b955cfe24593a2b8c9705c23e142d1ad24 React-Mapbuffer: 5e05d78fe6505f4a054b86f415733d4ad02dd314 - react-native-pencil-kit: 5c143168cadf085370cc469a732d357da8aa74a1 React-nativeconfig: 951ec32f632e81cbd7d40aebb3211313251c092e React-NativeModulesApple: 0b3a42ca90069119ef79d8b2327d01441d71abd4 React-perflogger: 271f1111779fef70f9502d1d38da5132e5585230 @@ -1418,6 +1442,7 @@ SPEC CHECKSUMS: React-runtimescheduler: 7fe561d179b97cecd0c2bec0bbd08f9fd8581c26 React-utils: f013537c3371270d2095bff1d594d00d4bc9261b ReactCommon: 2cde697fd80bd31da1d6448d25a5803088585219 + RNPencilKit: f290fbdcadd41189b33df9d6ba300b2fe7d272c8 SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Yoga: 56f906bf6c11c931588191dde1229fd3e4e3d557 diff --git a/example/ios/noop.swift b/example/ios/noop.swift new file mode 100644 index 0000000..2976919 --- /dev/null +++ b/example/ios/noop.swift @@ -0,0 +1,8 @@ +// +// noop.swift +// PencilKitExample +// +// Created by mj on 5/3/24. +// + +import Foundation diff --git a/example/package.json b/example/package.json index 4084f2a..d958bc4 100644 --- a/example/package.json +++ b/example/package.json @@ -10,6 +10,7 @@ "build:ios": "cd ios && xcodebuild -workspace PencilKitExample.xcworkspace -scheme PencilKitExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO" }, "dependencies": { + "@dr.pogodin/react-native-fs": "^2.24.6", "react": "18.2.0", "react-native": "0.74.0" }, diff --git a/example/src/App.tsx b/example/src/App.tsx index 9bd757f..4a79d41 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,23 +1,64 @@ -import { StyleSheet, View } from 'react-native'; -import PencilKitView from 'react-native-pencil-kit'; +import { useRef } from 'react'; +import { Text, TouchableOpacity, View } from 'react-native'; +import PencilKitView, { type PencilKitRef } from 'react-native-pencil-kit'; +import { DocumentDirectoryPath } from '@dr.pogodin/react-native-fs'; export default function App() { + const ref = useRef(null); + + const path = `${DocumentDirectoryPath}/drawing.dat`; + return ( - - + + + + ref.current?.showToolPicker()} text={'show'} /> + ref.current?.hideToolPicker()} text={'hide'} /> + ref.current?.clear()} text={'clear'} /> + ref.current?.undo()} text={'undo'} /> + ref.current?.redo()} text={'redo'} /> + ref.current?.saveDrawing(path)} text={'save'} /> + ref.current?.loadDrawing(path)} text={'load'} /> + ref.current?.getBase64Data()} text={'get base64'} /> + ref.current?.loadBase64Data('')} text={'load base64'} /> + + ref.current?.setTool({ + toolType: 'pen', + width: 2, + color: 'red', + }) + } + text={'pen'} + /> + ); } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, -}); +const Btn = ({ onPress, text }: { onPress: () => void; text: string }) => { + return ( + + {text.toUpperCase()} + + ); +}; diff --git a/ios/RNPencilKit.h b/ios/RNPencilKit.h index 5cae8d1..0029955 100644 --- a/ios/RNPencilKit.h +++ b/ios/RNPencilKit.h @@ -1,5 +1,8 @@ // This guard prevent this file to be compiled in the old architecture. #ifdef RCT_NEW_ARCH_ENABLED +#import "RNPencilKitUtilFunction.h" +#import +#import #import #import diff --git a/ios/RNPencilKit.mm b/ios/RNPencilKit.mm index 6240e26..10e6837 100644 --- a/ios/RNPencilKit.mm +++ b/ios/RNPencilKit.mm @@ -1,24 +1,26 @@ #import "RNPencilKit.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" using namespace facebook::react; -@interface RNPencilKit () +static inline const std::shared_ptr +getEmitter(const SharedViewEventEmitter emitter) { + return std::static_pointer_cast(emitter); +} + +@interface RNPencilKit () @end @implementation RNPencilKit { - UIView* _view; -} - -+ (ComponentDescriptorProvider)componentDescriptorProvider { - return concreteComponentDescriptorProvider(); + PKCanvasView* _Nonnull _view; + PKToolPicker* _Nullable _toolPicker; } - (instancetype)initWithFrame:(CGRect)frame { @@ -26,24 +28,266 @@ - (instancetype)initWithFrame:(CGRect)frame { static const auto defaultProps = std::make_shared(); _props = defaultProps; - _view = [[UIView alloc] init]; - + _view = [[PKCanvasView alloc] initWithFrame:frame]; + _view.delegate = self; + _toolPicker = [[PKToolPicker alloc] init]; + [_toolPicker addObserver:_view]; + [_toolPicker addObserver:self]; + [_toolPicker setVisible:YES forFirstResponder:_view]; self.contentView = _view; } return self; } +- (void)dealloc { + [_toolPicker removeObserver:_view]; + [_toolPicker removeObserver:self]; +} + - (void)updateProps:(Props::Shared const&)props oldProps:(Props::Shared const&)oldProps { const auto& prev = *std::static_pointer_cast(_props); const auto& next = *std::static_pointer_cast(props); - if (prev.alwaysBounceVertical ^ next.alwaysBounceVertical) { + if (prev.alwaysBounceVertical ^ next.alwaysBounceVertical) + _view.alwaysBounceVertical = next.alwaysBounceVertical; + + if (prev.alwaysBounceHorizontal ^ next.alwaysBounceHorizontal) + _view.alwaysBounceHorizontal = next.alwaysBounceHorizontal; + + if (prev.drawingPolicy != next.drawingPolicy) + _view.drawingPolicy = next.drawingPolicy == RNPencilKitDrawingPolicy::Anyinput + ? PKCanvasViewDrawingPolicyAnyInput + : next.drawingPolicy == RNPencilKitDrawingPolicy::Default + ? PKCanvasViewDrawingPolicyDefault + : PKCanvasViewDrawingPolicyPencilOnly; + + if (prev.isRulerActive ^ next.isRulerActive) + [_view setRulerActive:next.isRulerActive]; + + if (prev.isOpaque ^ next.isOpaque) + [_view setOpaque:next.isOpaque]; + + if (prev.backgroundColor ^ next.backgroundColor) { + [_view setBackgroundColor:intToColor(next.backgroundColor)]; } [super updateProps:props oldProps:oldProps]; } +- (void)clear { + NSLog(@"clear"); + [_view setDrawing:[[PKDrawing alloc] init]]; +} + +- (void)showToolPicker { + [_view becomeFirstResponder]; +} +- (void)hideToolPicker { + [_view resignFirstResponder]; +} +- (void)redo { + [_view.undoManager redo]; +} + +- (void)undo { + [_view.undoManager undo]; +} + +- (void)saveDrawing:(NSString*)path { + NSData* data = [_view.drawing dataRepresentation]; + NSError* error = nil; + [data writeToURL:[[NSURL alloc] initFileURLWithPath:path] + options:NSDataWritingAtomic + error:&error]; + if (error) { + getEmitter(_eventEmitter)->onSaveDrawing({.success = false}); + } else { + getEmitter(_eventEmitter) + ->onSaveDrawing( + {.success = true, .base64 = [[data base64EncodedStringWithOptions:0] UTF8String]}); + } +} + +- (void)loadDrawing:(NSString*)path { + NSURL* url = [[NSURL alloc] initFileURLWithPath:path]; + if (![[NSFileManager defaultManager] fileExistsAtPath:[url path]]) { + getEmitter(_eventEmitter)->onLoadDrawing({.success = false}); + return; + } + + NSData* data = [[NSData alloc] initWithContentsOfURL:url]; + BOOL result = [self loadWithData:data]; + getEmitter(_eventEmitter)->onLoadDrawing({.success = result}); +} + +- (void)getBase64Data { + getEmitter(_eventEmitter) + ->onGetBase64Data({.success = true, + .base64 = [[_view.drawing.dataRepresentation + base64EncodedStringWithOptions:0] UTF8String]}); +} + +- (void)loadBase64Data:(NSString*)base64 { + NSData* data = + [[NSData alloc] initWithBase64EncodedString:base64 + options:NSDataBase64DecodingIgnoreUnknownCharacters]; + BOOL result = [self loadWithData:data]; + getEmitter(_eventEmitter)->onLoadBase64({.success = result}); +} + +- (BOOL)loadWithData:(NSData*)data { + if (!data) { + return NO; + } + NSError* error = nil; + PKDrawing* drawing = [[PKDrawing alloc] initWithData:data error:&error]; + if (error || !drawing) { + return NO; + } else { + [_view setDrawing:drawing]; + [_view.undoManager removeAllActions]; + return YES; + } +} + +- (void)setTool:(NSString*)toolType width:(double)width color:(NSInteger)color { + std::string tool = [toolType UTF8String]; + BOOL isWidthValid = width != 0; + BOOL isColorValid = color != 0; + double defaultWidth = 1; + UIColor* defaultColor = [UIColor blackColor]; + if (tool == "pen") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypePen + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + if (tool == "pencil") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypePencil + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + if (tool == "marker") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypeMarker + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + if (@available(iOS 17.0, *)) { + if (tool == "monoline") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypeMonoline + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + if (tool == "fountainPen") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypeFountainPen + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + if (tool == "watercolor") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypeWatercolor + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + if (tool == "crayon") { + _toolPicker.selectedTool = _view.tool = + [[PKInkingTool alloc] initWithInkType:PKInkTypeCrayon + color:isColorValid ? intToColor(color) : defaultColor + width:isWidthValid ? width : defaultWidth]; + } + } + + if (tool == "eraserVector") { + if (@available(iOS 16.4, *)) { + _toolPicker.selectedTool = _view.tool = + [[PKEraserTool alloc] initWithEraserType:PKEraserTypeVector + width:isWidthValid ? width : defaultWidth]; + } else { + _toolPicker.selectedTool = _view.tool = + [[PKEraserTool alloc] initWithEraserType:PKEraserTypeVector]; + } + } + if (tool == "eraserBitmap") { + if (@available(iOS 16.4, *)) { + _toolPicker.selectedTool = _view.tool = + [[PKEraserTool alloc] initWithEraserType:PKEraserTypeBitmap + width:isWidthValid ? width : defaultWidth]; + } else { + _toolPicker.selectedTool = _view.tool = + [[PKEraserTool alloc] initWithEraserType:PKEraserTypeBitmap]; + } + } + if (@available(iOS 16.4, *)) { + if (tool == "eraserFixedWidthBitmap") { + _toolPicker.selectedTool = _view.tool = + [[PKEraserTool alloc] initWithEraserType:PKEraserTypeFixedWidthBitmap + width:isWidthValid ? width : defaultWidth]; + } + } +} + +@end + +@implementation RNPencilKit (PKCanvasviewDelegate) +- (void)canvasViewDidBeginUsingTool:(PKCanvasView*)canvasView { + if (auto e = getEmitter(_eventEmitter)) { + e->onCanvasViewDidBeginUsingTool({}); + } +} +- (void)canvasViewDrawingDidChange:(PKCanvasView*)canvasView { + if (auto e = getEmitter(_eventEmitter)) { + e->onCanvasViewDrawingDidChange({}); + } +} +- (void)canvasViewDidEndUsingTool:(PKCanvasView*)canvasView { + if (auto e = getEmitter(_eventEmitter)) { + e->onCanvasViewDidEndUsingTool({}); + } +} +- (void)canvasViewDidFinishRendering:(PKCanvasView*)canvasView { + if (auto e = getEmitter(_eventEmitter)) { + e->onCanvasViewDidFinishRendering({}); + } +} +@end + +@implementation RNPencilKit (PKToolPickerObserver) +- (void)toolPickerVisibilityDidChange:(PKToolPicker*)toolPicker { + if (auto e = getEmitter(_eventEmitter)) { + e->onToolPickerVisibilityDidChange({}); + } +} +- (void)toolPickerSelectedToolDidChange:(PKToolPicker*)toolPicker { + if (auto e = getEmitter(_eventEmitter)) { + e->onToolPickerSelectedToolDidChange({}); + } +} +- (void)toolPickerFramesObscuredDidChange:(PKToolPicker*)toolPicker { + if (auto e = getEmitter(_eventEmitter)) { + e->onToolPickerFramesObscuredDidChange({}); + } +} +- (void)toolPickerIsRulerActiveDidChange:(PKToolPicker*)toolPicker { + if (auto e = getEmitter(_eventEmitter)) { + e->onToolPickerIsRulerActiveDidChange({}); + } +} +@end + +@implementation RNPencilKit (ReactNative) +- (void)handleCommand:(const NSString*)commandName args:(const NSArray*)args { + RCTRNPencilKitHandleCommand(self, commandName, args); +} + ++ (ComponentDescriptorProvider)componentDescriptorProvider { + return concreteComponentDescriptorProvider(); +} + Class RNPencilKitCls(void) { return RNPencilKit.class; } diff --git a/ios/RNPencilKitManager.mm b/ios/RNPencilKitManager.mm index d412ef3..d634f8d 100644 --- a/ios/RNPencilKitManager.mm +++ b/ios/RNPencilKitManager.mm @@ -6,9 +6,6 @@ @interface RNPencilKitManager : RCTViewManager @end @implementation RNPencilKitManager - -RCT_EXPORT_MODULE(RNPencilKit) - -// RCT_EXPORT_VIEW_PROPERTY(color, NSString) +RCT_EXPORT_MODULE() @end diff --git a/ios/RNPencilKitUtil.h b/ios/RNPencilKitUtil.h new file mode 100644 index 0000000..4b516bb --- /dev/null +++ b/ios/RNPencilKitUtil.h @@ -0,0 +1,13 @@ +// +// RNPencilKitUtil.h +// RNPencilKit +// +// Created by mj on 5/4/24. +// + +#import "RNPencilKitSpec.h" +#import + +@interface RNPencilKitUtil : NSObject + +@end diff --git a/ios/RNPencilKitUtil.mm b/ios/RNPencilKitUtil.mm new file mode 100644 index 0000000..e0937a6 --- /dev/null +++ b/ios/RNPencilKitUtil.mm @@ -0,0 +1,72 @@ +// +// RNPencilKitUtil.m +// RNPencilKit +// +// Created by mj on 5/4/24. +// + +#import "RNPencilKitUtil.h" + +@implementation RNPencilKitUtil + +RCT_EXPORT_MODULE() + +- (NSNumber*)isPencilKitAvailable { + if (@available(iOS 14, *)) { + return @(YES); + } else { + return @(NO); + } +} + +- (NSNumber*)isiOSEqualsOrGreaterThan17 { + if (@available(iOS 17, *)) { + return @(YES); + } else { + return @(NO); + } +} + +- (NSNumber*)isiOSEqualsOrGreaterThan16_4 { + if (@available(iOS 16.4, *)) { + return @(YES); + } else { + return @(NO); + } +} + +- (NSArray*)getAvailableTools { + if ([self isPencilKitAvailable]) { + if ([self isiOSEqualsOrGreaterThan17]) { + return @[ + @"pen", + @"pencil", + @"marker", + @"monoline", + @"fountainPen", + @"watercolor", + @"crayon", + @"eraserVector", + @"eraserBitmap", + @"eraserFixedWidthBitmap", + ]; + } else { + return @[ + @"pen", + @"pencil", + @"marker", + @"eraserVector", + @"eraserBitmap", + ]; + } + } else { + return @[]; + } +} + +- (std::shared_ptr)getTurboModule: + (const facebook::react::ObjCTurboModule::InitParams&)params { + return std::make_shared(params); +} + +@end diff --git a/ios/RNPencilKitUtilFunction.h b/ios/RNPencilKitUtilFunction.h new file mode 100644 index 0000000..2fc784b --- /dev/null +++ b/ios/RNPencilKitUtilFunction.h @@ -0,0 +1,20 @@ +// +// RNPencilKitUtil.h +// RNPencilKit +// +// Created by mj on 5/3/24. +// + +#import +#import + +static UIColor* intToColor(NSInteger colorValue) { + NSUInteger alpha = (colorValue >> 24) & 0xFF; + NSUInteger red = (colorValue >> 16) & 0xFF; + NSUInteger green = (colorValue >> 8) & 0xFF; + NSUInteger blue = colorValue & 0xFF; + return [UIColor colorWithRed:red / 255.0 + green:green / 255.0 + blue:blue / 255.0 + alpha:alpha / 255.0]; +} diff --git a/package.json b/package.json index 96478be..422540a 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "husky": "^9.0.11", "prettier": "3.2.5", "react": "18.2.0", - "react-native": "0.74.0", + "react-native": "0.74.1", "react-native-builder-bob": "^0.23.2", "release-it": "^15.0.0", "turbo": "^1.10.7", @@ -140,8 +140,8 @@ ] }, "codegenConfig": { - "name": "RNPencilKitViewSpec", - "type": "components", - "jsSrcsDir": "src" + "name": "RNPencilKitSpec", + "type": "all", + "jsSrcsDir": "src/spec" } } diff --git a/src/PencilKitViewNativeComponent.ts b/src/PencilKitViewNativeComponent.ts deleted file mode 100644 index 2484c03..0000000 --- a/src/PencilKitViewNativeComponent.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ViewProps } from 'react-native'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; - -interface NativeProps extends ViewProps { - alwaysBounceVertical?: boolean; -} - -export default codegenNativeComponent('RNPencilKit'); diff --git a/src/index.tsx b/src/index.tsx index a67b686..09d0c25 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,20 +1,117 @@ -import { type ForwardedRef, forwardRef, useImperativeHandle } from 'react'; -import type { ViewProps } from 'react-native'; +import { type ForwardedRef, forwardRef, useImperativeHandle, useRef } from 'react'; +import { type ColorValue, processColor, type ViewProps } from 'react-native'; +import type { DirectEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; -import NativePencilKitView from './PencilKitViewNativeComponent'; +import NativePencilKitView, { Commands } from './spec/RNPencilKitNativeComponent'; -export type PencilKitProps = {} & ViewProps; -export type PencilKitCommands = {}; -function PencilKit({ ...rest }: PencilKitProps, ref: ForwardedRef) { +export type PencilKitProps = { + alwaysBounceVertical?: boolean; + alwaysBounceHorizontal?: boolean; + isRulerActive?: boolean; + backgroundColor?: ColorValue; + drawingPolicy?: WithDefault<'default' | 'anyinput' | 'pencilonly', 'default'>; + isOpaque?: boolean; + + onToolPickerVisibilityDidChange?: DirectEventHandler<{}>; + onToolPickerIsRulerActiveDidChange?: DirectEventHandler<{}>; + onToolPickerFramesObscuredDidChange?: DirectEventHandler<{}>; + onToolPickerSelectedToolDidChange?: DirectEventHandler<{}>; + onCanvasViewDidBeginUsingTool?: DirectEventHandler<{}>; + onCanvasViewDidEndUsingTool?: DirectEventHandler<{}>; + onCanvasViewDrawingDidChange?: DirectEventHandler<{}>; + onCanvasViewDidFinishRendering?: DirectEventHandler<{}>; +} & ViewProps; +export type PencilKitTool = + | 'pen' + | 'pencil' + | 'marker' + | 'monoline' + | 'fountainPen' + | 'watercolor' + | 'crayon' + | 'eraserVector' + | 'eraserBitmap' + | 'eraserFixedWidthBitmap'; +export type PencilKitRef = { + clear: () => void; + showToolPicker: () => void; + hideToolPicker: () => void; + redo: () => void; + undo: () => void; + saveDrawing: (path: string) => void; + loadDrawing: (path: string) => string; + getBase64Data: () => void; + loadBase64Data: (base64: string) => void; + setTool: (params: { toolType: PencilKitTool; width?: number; color?: ColorValue }) => void; +}; +function PencilKit( + { + alwaysBounceHorizontal = true, + alwaysBounceVertical = true, + isRulerActive = false, + drawingPolicy = 'default', + backgroundColor, + isOpaque = true, + onToolPickerFramesObscuredDidChange, + onToolPickerIsRulerActiveDidChange, + onToolPickerSelectedToolDidChange, + onToolPickerVisibilityDidChange, + onCanvasViewDidBeginUsingTool, + onCanvasViewDidEndUsingTool, + onCanvasViewDidFinishRendering, + onCanvasViewDrawingDidChange, + ...rest + }: PencilKitProps, + ref: ForwardedRef, +) { + const nativeRef = useRef(null); useImperativeHandle( ref, - () => { - return {}; - }, + () => ({ + clear: () => Commands.clear(nativeRef.current!), + showToolPicker: () => Commands.showToolPicker(nativeRef.current!), + hideToolPicker: () => Commands.hideToolPicker(nativeRef.current!), + redo: () => Commands.redo(nativeRef.current!), + undo: () => Commands.undo(nativeRef.current!), + saveDrawing: (path) => Commands.saveDrawing(nativeRef.current!, path), + loadDrawing: (path) => Commands.loadDrawing(nativeRef.current!, path), + getBase64Data: () => Commands.getBase64Data(nativeRef.current!), + loadBase64Data: (base64) => Commands.loadBase64Data(nativeRef.current!, base64), + setTool: ({ color, toolType, width }) => { + console.log(color, processColor(color)); + Commands.setTool( + nativeRef.current!, + toolType, + width ?? 0, + color ? (processColor(color) as number) : 0, + ); + }, + }), [], ); - return ; + return ( + + ); } const PencilKitView = forwardRef(PencilKit); diff --git a/src/spec/NativeRNPencilKitUtil.ts b/src/spec/NativeRNPencilKitUtil.ts new file mode 100644 index 0000000..8b27004 --- /dev/null +++ b/src/spec/NativeRNPencilKitUtil.ts @@ -0,0 +1,10 @@ +import { type TurboModule, TurboModuleRegistry } from 'react-native'; + +export interface Spec extends TurboModule { + isPencilKitAvailable(): boolean; + isiOSEqualsOrGreaterThan17(): boolean; + isiOSEqualsOrGreaterThan16_4(): boolean; + getAvailableTools(): string[]; +} + +export default TurboModuleRegistry.getEnforcing('RNPencilKitUtil'); diff --git a/src/spec/RNPencilKitNativeComponent.ts b/src/spec/RNPencilKitNativeComponent.ts new file mode 100644 index 0000000..1b71a03 --- /dev/null +++ b/src/spec/RNPencilKitNativeComponent.ts @@ -0,0 +1,69 @@ +import type React from 'react'; +import { type ComponentType } from 'react'; +import type { ViewProps } from 'react-native'; +import type { + DirectEventHandler, + Double, + Int32, + WithDefault, +} from 'react-native/Libraries/Types/CodegenTypes'; +import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + +export interface NativeProps extends ViewProps { + alwaysBounceVertical: boolean; + alwaysBounceHorizontal: boolean; + isRulerActive: boolean; + backgroundColor: Int32; + drawingPolicy?: WithDefault<'default' | 'anyinput' | 'pencilonly', 'default'>; + isOpaque?: boolean; + + onToolPickerVisibilityDidChange?: DirectEventHandler<{}>; + onToolPickerIsRulerActiveDidChange?: DirectEventHandler<{}>; + onToolPickerFramesObscuredDidChange?: DirectEventHandler<{}>; + onToolPickerSelectedToolDidChange?: DirectEventHandler<{}>; + onCanvasViewDidBeginUsingTool?: DirectEventHandler<{}>; + onCanvasViewDidEndUsingTool?: DirectEventHandler<{}>; + onCanvasViewDrawingDidChange?: DirectEventHandler<{}>; + onCanvasViewDidFinishRendering?: DirectEventHandler<{}>; + + // native command callback hack + onSaveDrawing?: DirectEventHandler<{ base64?: string; success: boolean }>; + onLoadDrawing?: DirectEventHandler<{ success: boolean }>; + onGetBase64Data?: DirectEventHandler<{ base64?: string; success: boolean }>; + onLoadBase64?: DirectEventHandler<{ success: boolean }>; +} + +export interface PencilKitCommands { + clear: (ref: React.ElementRef) => void; + showToolPicker: (ref: React.ElementRef) => void; + hideToolPicker: (ref: React.ElementRef) => void; + redo: (ref: React.ElementRef) => void; + undo: (ref: React.ElementRef) => void; + saveDrawing: (ref: React.ElementRef, path: string) => void; + loadDrawing: (ref: React.ElementRef, path: string) => string; + getBase64Data: (ref: React.ElementRef) => void; + loadBase64Data: (ref: React.ElementRef, base64: string) => void; + setTool: ( + ref: React.ElementRef, + toolType: string, + width?: Double, + color?: Int32, + ) => void; +} + +export const Commands: PencilKitCommands = codegenNativeCommands({ + supportedCommands: [ + 'clear', + 'showToolPicker', + 'hideToolPicker', + 'redo', + 'undo', + 'saveDrawing', + 'loadDrawing', + 'getBase64Data', + 'loadBase64Data', + 'setTool', + ], +}); +export default codegenNativeComponent('RNPencilKit'); diff --git a/yarn.lock b/yarn.lock index 4c6337a..aa0fc3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1882,6 +1882,19 @@ __metadata: languageName: node linkType: hard +"@dr.pogodin/react-native-fs@npm:^2.24.6": + version: 2.24.6 + resolution: "@dr.pogodin/react-native-fs@npm:2.24.6" + dependencies: + buffer: "npm:^6.0.3" + peerDependencies: + react: "*" + react-native: ^0.73.* + react-native-windows: ^0.73.* + checksum: 10c0/6b3eb08c8a1ddca27a43336998b5e1b4bcb70055bbac0063d5ca22fd215f7ad307fc5bdbd6e874789b0be702e8ef195ab9714c457296f9245104fef61aa6e907 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -2429,6 +2442,18 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-clean@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-clean@npm:13.6.6" + dependencies: + "@react-native-community/cli-tools": "npm:13.6.6" + chalk: "npm:^4.1.2" + execa: "npm:^5.0.0" + fast-glob: "npm:^3.3.2" + checksum: 10c0/3d8719bd1ee633c715fbe0d68bb1f5bab9177b8a4c7d4ee2233c925dd1352d8bd3a8b473cd2508960ebde31544bc82dcdda19a70dadee92c6979099b40b88f96 + languageName: node + linkType: hard + "@react-native-community/cli-config@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-config@npm:13.6.4" @@ -2443,6 +2468,20 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-config@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-config@npm:13.6.6" + dependencies: + "@react-native-community/cli-tools": "npm:13.6.6" + chalk: "npm:^4.1.2" + cosmiconfig: "npm:^5.1.0" + deepmerge: "npm:^4.3.0" + fast-glob: "npm:^3.3.2" + joi: "npm:^17.2.1" + checksum: 10c0/0f0b5b176f11d8d74f82a016c688703d0d249745f2ae3ce0de8dcef277c3c84445fa58186326ed0e9f521471712bdcb9eb5e5b0cca052eba919dcef165a11bac + languageName: node + linkType: hard + "@react-native-community/cli-debugger-ui@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-debugger-ui@npm:13.6.4" @@ -2452,6 +2491,15 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-debugger-ui@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-debugger-ui@npm:13.6.6" + dependencies: + serve-static: "npm:^1.13.1" + checksum: 10c0/bd089d8f365e01ba3fc5ff0b00f5e4a672fdc20e0a2394108fcf724689ae6cedfa921655f613bf960e1b5e16e26052a9097175642f9bb9b8b7cbc819d76e2904 + languageName: node + linkType: hard + "@react-native-community/cli-doctor@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-doctor@npm:13.6.4" @@ -2477,6 +2525,31 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-doctor@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-doctor@npm:13.6.6" + dependencies: + "@react-native-community/cli-config": "npm:13.6.6" + "@react-native-community/cli-platform-android": "npm:13.6.6" + "@react-native-community/cli-platform-apple": "npm:13.6.6" + "@react-native-community/cli-platform-ios": "npm:13.6.6" + "@react-native-community/cli-tools": "npm:13.6.6" + chalk: "npm:^4.1.2" + command-exists: "npm:^1.2.8" + deepmerge: "npm:^4.3.0" + envinfo: "npm:^7.10.0" + execa: "npm:^5.0.0" + hermes-profile-transformer: "npm:^0.0.6" + node-stream-zip: "npm:^1.9.1" + ora: "npm:^5.4.1" + semver: "npm:^7.5.2" + strip-ansi: "npm:^5.2.0" + wcwidth: "npm:^1.0.1" + yaml: "npm:^2.2.1" + checksum: 10c0/95e193c879bdac03aa6dc548b3a6ff2a715fb45696c7e7279ed956893622a9bd100aecb6166daa74a80fb54659f4428bcfb665a40b462df29566f04667fa58b7 + languageName: node + linkType: hard + "@react-native-community/cli-hermes@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-hermes@npm:13.6.4" @@ -2489,6 +2562,18 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-hermes@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-hermes@npm:13.6.6" + dependencies: + "@react-native-community/cli-platform-android": "npm:13.6.6" + "@react-native-community/cli-tools": "npm:13.6.6" + chalk: "npm:^4.1.2" + hermes-profile-transformer: "npm:^0.0.6" + checksum: 10c0/59e1239c0c70845b30d8b431d79fee07a5775fa6a15154fc5ab7779bff592f92de5cee0934b1e263e14d369335eeabb890d0c01206d573a8f67a23afffc30b61 + languageName: node + linkType: hard + "@react-native-community/cli-platform-android@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-platform-android@npm:13.6.4" @@ -2503,6 +2588,20 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-platform-android@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-platform-android@npm:13.6.6" + dependencies: + "@react-native-community/cli-tools": "npm:13.6.6" + chalk: "npm:^4.1.2" + execa: "npm:^5.0.0" + fast-glob: "npm:^3.3.2" + fast-xml-parser: "npm:^4.2.4" + logkitty: "npm:^0.7.1" + checksum: 10c0/b778605c17d91eed99bdd0f16b3cba926ae766b6e781ad2cc51650e8d51f067c1fa2c7fd8100b47683662cf886ff5fcde9a24968180a7c937307348f6abbd3a6 + languageName: node + linkType: hard + "@react-native-community/cli-platform-apple@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-platform-apple@npm:13.6.4" @@ -2517,6 +2616,20 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-platform-apple@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-platform-apple@npm:13.6.6" + dependencies: + "@react-native-community/cli-tools": "npm:13.6.6" + chalk: "npm:^4.1.2" + execa: "npm:^5.0.0" + fast-glob: "npm:^3.3.2" + fast-xml-parser: "npm:^4.0.12" + ora: "npm:^5.4.1" + checksum: 10c0/b84ed2020da15588d5e998c37e497d3e811a405d2e72a14815dfefeed63d1939752c348ed21eaae5bc57780fdbf4a775fda1d7c5eae3e2af3f60afadaca97a0b + languageName: node + linkType: hard + "@react-native-community/cli-platform-ios@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-platform-ios@npm:13.6.4" @@ -2526,6 +2639,15 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-platform-ios@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-platform-ios@npm:13.6.6" + dependencies: + "@react-native-community/cli-platform-apple": "npm:13.6.6" + checksum: 10c0/b25a23b1975eb8e7497b19e007b8c28e83df1e37fcf00343be4f1598c425afa83d5867edcf6f5d10f47f8206619c7d2a466025c3c918f46f363d96e7516bce20 + languageName: node + linkType: hard + "@react-native-community/cli-server-api@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-server-api@npm:13.6.4" @@ -2543,6 +2665,23 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-server-api@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-server-api@npm:13.6.6" + dependencies: + "@react-native-community/cli-debugger-ui": "npm:13.6.6" + "@react-native-community/cli-tools": "npm:13.6.6" + compression: "npm:^1.7.1" + connect: "npm:^3.6.5" + errorhandler: "npm:^1.5.1" + nocache: "npm:^3.0.1" + pretty-format: "npm:^26.6.2" + serve-static: "npm:^1.13.1" + ws: "npm:^6.2.2" + checksum: 10c0/bbaa896dad84b3806a6186525dfb4aeab5f98166c6eafdee8f9bc085dbe5489fecbbc67891ee661701b5663976791d8fd60e5ede0979e6261c7330cc94530d15 + languageName: node + linkType: hard + "@react-native-community/cli-tools@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-tools@npm:13.6.4" @@ -2562,6 +2701,25 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-tools@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-tools@npm:13.6.6" + dependencies: + appdirsjs: "npm:^1.2.4" + chalk: "npm:^4.1.2" + execa: "npm:^5.0.0" + find-up: "npm:^5.0.0" + mime: "npm:^2.4.1" + node-fetch: "npm:^2.6.0" + open: "npm:^6.2.0" + ora: "npm:^5.4.1" + semver: "npm:^7.5.2" + shell-quote: "npm:^1.7.3" + sudo-prompt: "npm:^9.0.0" + checksum: 10c0/45399af028178716131d144fe421e04624a7fac98366a97ac7b64dedf90a6b1aa122d5c0109b0a7134ae5bd7d97314b4e781c6f1dcf659194483487eef9ff7eb + languageName: node + linkType: hard + "@react-native-community/cli-types@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli-types@npm:13.6.4" @@ -2571,6 +2729,15 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-types@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli-types@npm:13.6.6" + dependencies: + joi: "npm:^17.2.1" + checksum: 10c0/a2d6dca5041374657930eb9cbbbc9c1f82c7e9f2d2e466fa8f09976b137b9288feba3f55bca97c15e9f7eed9eabcf42c40a1d48a015db0dd206a416eb033d60a + languageName: node + linkType: hard + "@react-native-community/cli@npm:13.6.4": version: 13.6.4 resolution: "@react-native-community/cli@npm:13.6.4" @@ -2598,6 +2765,33 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli@npm:13.6.6": + version: 13.6.6 + resolution: "@react-native-community/cli@npm:13.6.6" + dependencies: + "@react-native-community/cli-clean": "npm:13.6.6" + "@react-native-community/cli-config": "npm:13.6.6" + "@react-native-community/cli-debugger-ui": "npm:13.6.6" + "@react-native-community/cli-doctor": "npm:13.6.6" + "@react-native-community/cli-hermes": "npm:13.6.6" + "@react-native-community/cli-server-api": "npm:13.6.6" + "@react-native-community/cli-tools": "npm:13.6.6" + "@react-native-community/cli-types": "npm:13.6.6" + chalk: "npm:^4.1.2" + commander: "npm:^9.4.1" + deepmerge: "npm:^4.3.0" + execa: "npm:^5.0.0" + find-up: "npm:^4.1.0" + fs-extra: "npm:^8.1.0" + graceful-fs: "npm:^4.1.3" + prompts: "npm:^2.4.2" + semver: "npm:^7.5.2" + bin: + react-native: build/bin.js + checksum: 10c0/de7fcf30c90f8188bb214bd480814b0caf54d3208d8c4d337d3dd9cd8c4431e027f15aec64ef255dd76a0f3bda36ec1ec83d010d4e22016be90a44bb8f4d27a2 + languageName: node + linkType: hard + "@react-native/assets-registry@npm:0.74.81": version: 0.74.81 resolution: "@react-native/assets-registry@npm:0.74.81" @@ -2605,6 +2799,13 @@ __metadata: languageName: node linkType: hard +"@react-native/assets-registry@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/assets-registry@npm:0.74.83" + checksum: 10c0/e37d545b2398cd76891d468b80407c04d9a8fe116e958f440991dfba0ed740195277b62f38b7aae7a19b8aa9c68cf6f09875b67e82f71fed58ba8d4568edadc1 + languageName: node + linkType: hard + "@react-native/babel-plugin-codegen@npm:0.74.81": version: 0.74.81 resolution: "@react-native/babel-plugin-codegen@npm:0.74.81" @@ -2614,6 +2815,15 @@ __metadata: languageName: node linkType: hard +"@react-native/babel-plugin-codegen@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/babel-plugin-codegen@npm:0.74.83" + dependencies: + "@react-native/codegen": "npm:0.74.83" + checksum: 10c0/adfc4dbfe0155c210c0480b896344c29e837523aed404f65c0d16da980869ec8373420f36f669e32090e83d06011de6d97da66a3b22e0638f574cab1c2d59029 + languageName: node + linkType: hard + "@react-native/babel-preset@npm:0.74.81": version: 0.74.81 resolution: "@react-native/babel-preset@npm:0.74.81" @@ -2667,6 +2877,59 @@ __metadata: languageName: node linkType: hard +"@react-native/babel-preset@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/babel-preset@npm:0.74.83" + dependencies: + "@babel/core": "npm:^7.20.0" + "@babel/plugin-proposal-async-generator-functions": "npm:^7.0.0" + "@babel/plugin-proposal-class-properties": "npm:^7.18.0" + "@babel/plugin-proposal-export-default-from": "npm:^7.0.0" + "@babel/plugin-proposal-logical-assignment-operators": "npm:^7.18.0" + "@babel/plugin-proposal-nullish-coalescing-operator": "npm:^7.18.0" + "@babel/plugin-proposal-numeric-separator": "npm:^7.0.0" + "@babel/plugin-proposal-object-rest-spread": "npm:^7.20.0" + "@babel/plugin-proposal-optional-catch-binding": "npm:^7.0.0" + "@babel/plugin-proposal-optional-chaining": "npm:^7.20.0" + "@babel/plugin-syntax-dynamic-import": "npm:^7.8.0" + "@babel/plugin-syntax-export-default-from": "npm:^7.0.0" + "@babel/plugin-syntax-flow": "npm:^7.18.0" + "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.0.0" + "@babel/plugin-syntax-optional-chaining": "npm:^7.0.0" + "@babel/plugin-transform-arrow-functions": "npm:^7.0.0" + "@babel/plugin-transform-async-to-generator": "npm:^7.20.0" + "@babel/plugin-transform-block-scoping": "npm:^7.0.0" + "@babel/plugin-transform-classes": "npm:^7.0.0" + "@babel/plugin-transform-computed-properties": "npm:^7.0.0" + "@babel/plugin-transform-destructuring": "npm:^7.20.0" + "@babel/plugin-transform-flow-strip-types": "npm:^7.20.0" + "@babel/plugin-transform-function-name": "npm:^7.0.0" + "@babel/plugin-transform-literals": "npm:^7.0.0" + "@babel/plugin-transform-modules-commonjs": "npm:^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.0.0" + "@babel/plugin-transform-parameters": "npm:^7.0.0" + "@babel/plugin-transform-private-methods": "npm:^7.22.5" + "@babel/plugin-transform-private-property-in-object": "npm:^7.22.11" + "@babel/plugin-transform-react-display-name": "npm:^7.0.0" + "@babel/plugin-transform-react-jsx": "npm:^7.0.0" + "@babel/plugin-transform-react-jsx-self": "npm:^7.0.0" + "@babel/plugin-transform-react-jsx-source": "npm:^7.0.0" + "@babel/plugin-transform-runtime": "npm:^7.0.0" + "@babel/plugin-transform-shorthand-properties": "npm:^7.0.0" + "@babel/plugin-transform-spread": "npm:^7.0.0" + "@babel/plugin-transform-sticky-regex": "npm:^7.0.0" + "@babel/plugin-transform-typescript": "npm:^7.5.0" + "@babel/plugin-transform-unicode-regex": "npm:^7.0.0" + "@babel/template": "npm:^7.0.0" + "@react-native/babel-plugin-codegen": "npm:0.74.83" + babel-plugin-transform-flow-enums: "npm:^0.0.2" + react-refresh: "npm:^0.14.0" + peerDependencies: + "@babel/core": "*" + checksum: 10c0/1bc539fd187f5f6dc564ae6276cd4481b6d261d4409beb9a92c7456e4ffcd22d6a683399ea068350a766ae523f4dc2240cdbcf6ae05a1e3babb4561bd1940fae + languageName: node + linkType: hard + "@react-native/codegen@npm:0.74.81": version: 0.74.81 resolution: "@react-native/codegen@npm:0.74.81" @@ -2684,6 +2947,23 @@ __metadata: languageName: node linkType: hard +"@react-native/codegen@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/codegen@npm:0.74.83" + dependencies: + "@babel/parser": "npm:^7.20.0" + glob: "npm:^7.1.1" + hermes-parser: "npm:0.19.1" + invariant: "npm:^2.2.4" + jscodeshift: "npm:^0.14.0" + mkdirp: "npm:^0.5.1" + nullthrows: "npm:^1.1.1" + peerDependencies: + "@babel/preset-env": ^7.1.6 + checksum: 10c0/399597a54e1def1759cdc5a07f995794156a230818fb6edd4dca14d29c1b0a5efd2c76950fdf7afd8c48d420d7bdb4486f7a4774a528b84edf998691f4d21118 + languageName: node + linkType: hard + "@react-native/community-cli-plugin@npm:0.74.81": version: 0.74.81 resolution: "@react-native/community-cli-plugin@npm:0.74.81" @@ -2704,6 +2984,26 @@ __metadata: languageName: node linkType: hard +"@react-native/community-cli-plugin@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/community-cli-plugin@npm:0.74.83" + dependencies: + "@react-native-community/cli-server-api": "npm:13.6.6" + "@react-native-community/cli-tools": "npm:13.6.6" + "@react-native/dev-middleware": "npm:0.74.83" + "@react-native/metro-babel-transformer": "npm:0.74.83" + chalk: "npm:^4.0.0" + execa: "npm:^5.1.1" + metro: "npm:^0.80.3" + metro-config: "npm:^0.80.3" + metro-core: "npm:^0.80.3" + node-fetch: "npm:^2.2.0" + querystring: "npm:^0.2.1" + readline: "npm:^1.3.0" + checksum: 10c0/9584779819a90bae10feceb875eb0a2b11c487d7584550e7f159e1f04f2d711b5b640d4e4d145df33ec40dcce44948836c2a9943521d58d723371fac96a2c66c + languageName: node + linkType: hard + "@react-native/debugger-frontend@npm:0.74.81": version: 0.74.81 resolution: "@react-native/debugger-frontend@npm:0.74.81" @@ -2711,6 +3011,13 @@ __metadata: languageName: node linkType: hard +"@react-native/debugger-frontend@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/debugger-frontend@npm:0.74.83" + checksum: 10c0/c56517ee8acdeac3df9c4c025be5f6d183f8452d6b482a1f2f4a75d35b496ca81fc538089ae77d76cc0fb59bc91bb2153b15be53867ed742670c83a0e23474c9 + languageName: node + linkType: hard + "@react-native/dev-middleware@npm:0.74.81": version: 0.74.81 resolution: "@react-native/dev-middleware@npm:0.74.81" @@ -2732,6 +3039,27 @@ __metadata: languageName: node linkType: hard +"@react-native/dev-middleware@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/dev-middleware@npm:0.74.83" + dependencies: + "@isaacs/ttlcache": "npm:^1.4.1" + "@react-native/debugger-frontend": "npm:0.74.83" + "@rnx-kit/chromium-edge-launcher": "npm:^1.0.0" + chrome-launcher: "npm:^0.15.2" + connect: "npm:^3.6.5" + debug: "npm:^2.2.0" + node-fetch: "npm:^2.2.0" + nullthrows: "npm:^1.1.1" + open: "npm:^7.0.3" + selfsigned: "npm:^2.4.1" + serve-static: "npm:^1.13.1" + temp-dir: "npm:^2.0.0" + ws: "npm:^6.2.2" + checksum: 10c0/dd1dfe07c22510c16e26db5eda5fd9f3c0e49c6d0d7e9a8eb5a5db0dd2e33eadf62870889a2437ff92f241591a7ab059f82c96252bfb843978ee43fb6eb2c424 + languageName: node + linkType: hard + "@react-native/eslint-config@npm:0.74.81": version: 0.74.81 resolution: "@react-native/eslint-config@npm:0.74.81" @@ -2770,6 +3098,13 @@ __metadata: languageName: node linkType: hard +"@react-native/gradle-plugin@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/gradle-plugin@npm:0.74.83" + checksum: 10c0/fcfba4d868d51569f24fc16a69a88488df39e220117fe6434bba5ed77477a18f994a61c3fd104e7fb8df8271e9c8775fe69591bdf0762813e5f3ac36776fb456 + languageName: node + linkType: hard + "@react-native/js-polyfills@npm:0.74.81": version: 0.74.81 resolution: "@react-native/js-polyfills@npm:0.74.81" @@ -2777,6 +3112,13 @@ __metadata: languageName: node linkType: hard +"@react-native/js-polyfills@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/js-polyfills@npm:0.74.83" + checksum: 10c0/6dec9cebc330bed9f89ca44fb6eb93c03419abe2e0d3a36c582efc7e8800077cea92911b368e625ae0c8a739b77dd6907cf29445ca178caea43f104f87b9ed68 + languageName: node + linkType: hard + "@react-native/metro-babel-transformer@npm:0.74.81": version: 0.74.81 resolution: "@react-native/metro-babel-transformer@npm:0.74.81" @@ -2791,6 +3133,20 @@ __metadata: languageName: node linkType: hard +"@react-native/metro-babel-transformer@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/metro-babel-transformer@npm:0.74.83" + dependencies: + "@babel/core": "npm:^7.20.0" + "@react-native/babel-preset": "npm:0.74.83" + hermes-parser: "npm:0.19.1" + nullthrows: "npm:^1.1.1" + peerDependencies: + "@babel/core": "*" + checksum: 10c0/d0333b885fe721daff58a3f1b5b2555a1d54b0ea805fa9835db4ad20dd60ee2927f400de1dcaf282af63c26ec617f90563ca900cb7acb67b43ad92afc7803420 + languageName: node + linkType: hard + "@react-native/metro-config@npm:0.74.81": version: 0.74.81 resolution: "@react-native/metro-config@npm:0.74.81" @@ -2810,6 +3166,13 @@ __metadata: languageName: node linkType: hard +"@react-native/normalize-colors@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/normalize-colors@npm:0.74.83" + checksum: 10c0/e1821e395c289c8aea3748044d3d0e39f792123e58281b8ae2d805ed4ac5517071d5b6325da1ceb9f45444c5cdad2b3ac2a6cd302d4f4a247aed68e10dcfedee + languageName: node + linkType: hard + "@react-native/typescript-config@npm:0.74.81": version: 0.74.81 resolution: "@react-native/typescript-config@npm:0.74.81" @@ -2834,6 +3197,23 @@ __metadata: languageName: node linkType: hard +"@react-native/virtualized-lists@npm:0.74.83": + version: 0.74.83 + resolution: "@react-native/virtualized-lists@npm:0.74.83" + dependencies: + invariant: "npm:^2.2.4" + nullthrows: "npm:^1.1.1" + peerDependencies: + "@types/react": ^18.2.6 + react: "*" + react-native: "*" + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/8a2d1a1214f0743a3442e5c17eca43d7bae5652bd9a5dc3bcefb4283763c15ca4944a284c4d1f3819071df29f5d33b6df285608b89262801f2af5edf0261213a + languageName: node + linkType: hard + "@release-it/conventional-changelog@npm:^5.0.0": version: 5.1.1 resolution: "@release-it/conventional-changelog@npm:5.1.1" @@ -10351,6 +10731,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@babel/preset-env": "npm:^7.20.0" "@babel/runtime": "npm:^7.20.0" + "@dr.pogodin/react-native-fs": "npm:^2.24.6" "@react-native/babel-preset": "npm:0.74.81" "@react-native/metro-config": "npm:0.74.81" "@react-native/typescript-config": "npm:0.74.81" @@ -10377,7 +10758,7 @@ __metadata: husky: "npm:^9.0.11" prettier: "npm:3.2.5" react: "npm:18.2.0" - react-native: "npm:0.74.0" + react-native: "npm:0.74.1" react-native-builder-bob: "npm:^0.23.2" release-it: "npm:^15.0.0" turbo: "npm:^1.10.7" @@ -10441,6 +10822,59 @@ __metadata: languageName: node linkType: hard +"react-native@npm:0.74.1": + version: 0.74.1 + resolution: "react-native@npm:0.74.1" + dependencies: + "@jest/create-cache-key-function": "npm:^29.6.3" + "@react-native-community/cli": "npm:13.6.6" + "@react-native-community/cli-platform-android": "npm:13.6.6" + "@react-native-community/cli-platform-ios": "npm:13.6.6" + "@react-native/assets-registry": "npm:0.74.83" + "@react-native/codegen": "npm:0.74.83" + "@react-native/community-cli-plugin": "npm:0.74.83" + "@react-native/gradle-plugin": "npm:0.74.83" + "@react-native/js-polyfills": "npm:0.74.83" + "@react-native/normalize-colors": "npm:0.74.83" + "@react-native/virtualized-lists": "npm:0.74.83" + abort-controller: "npm:^3.0.0" + anser: "npm:^1.4.9" + ansi-regex: "npm:^5.0.0" + base64-js: "npm:^1.5.1" + chalk: "npm:^4.0.0" + event-target-shim: "npm:^5.0.1" + flow-enums-runtime: "npm:^0.0.6" + invariant: "npm:^2.2.4" + jest-environment-node: "npm:^29.6.3" + jsc-android: "npm:^250231.0.0" + memoize-one: "npm:^5.0.0" + metro-runtime: "npm:^0.80.3" + metro-source-map: "npm:^0.80.3" + mkdirp: "npm:^0.5.1" + nullthrows: "npm:^1.1.1" + pretty-format: "npm:^26.5.2" + promise: "npm:^8.3.0" + react-devtools-core: "npm:^5.0.0" + react-refresh: "npm:^0.14.0" + react-shallow-renderer: "npm:^16.15.0" + regenerator-runtime: "npm:^0.13.2" + scheduler: "npm:0.24.0-canary-efb381bbf-20230505" + stacktrace-parser: "npm:^0.1.10" + whatwg-fetch: "npm:^3.0.0" + ws: "npm:^6.2.2" + yargs: "npm:^17.6.2" + peerDependencies: + "@types/react": ^18.2.6 + react: 18.2.0 + peerDependenciesMeta: + "@types/react": + optional: true + bin: + react-native: cli.js + checksum: 10c0/af7666150638ee10abf58cddeaa40a89223959c8726c983ff5ddc231342315658dde065ee16ddae9d7d3c2eb41005bc055367ad899f70dffe82db66419a13e84 + languageName: node + linkType: hard + "react-refresh@npm:^0.14.0": version: 0.14.2 resolution: "react-refresh@npm:0.14.2"