Skip to content

Commit 38400fe

Browse files
authored
Merge pull request #10 from blazejkustra/holo-implementation
Holo implementation
2 parents 4cf46f9 + 87a41ba commit 38400fe

File tree

25 files changed

+6450
-20
lines changed

25 files changed

+6450
-20
lines changed

example/assets/charizard.png

684 KB
Loading

example/assets/components/holo.png

197 KB
Loading

example/ios/Podfile.lock

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,28 @@ PODS:
17811781
- React-utils (= 0.81.4)
17821782
- ReactNativeDependencies
17831783
- ReactNativeDependencies (0.81.4)
1784+
- RNGestureHandler (2.29.0):
1785+
- hermes-engine
1786+
- RCTRequired
1787+
- RCTTypeSafety
1788+
- React-Core
1789+
- React-Core-prebuilt
1790+
- React-debug
1791+
- React-Fabric
1792+
- React-featureflags
1793+
- React-graphics
1794+
- React-ImageManager
1795+
- React-jsi
1796+
- React-NativeModulesApple
1797+
- React-RCTFabric
1798+
- React-renderercss
1799+
- React-rendererdebug
1800+
- React-utils
1801+
- ReactCodegen
1802+
- ReactCommon/turbomodule/bridging
1803+
- ReactCommon/turbomodule/core
1804+
- ReactNativeDependencies
1805+
- Yoga
17841806
- RNReanimated (4.1.3):
17851807
- hermes-engine
17861808
- RCTRequired
@@ -2052,6 +2074,7 @@ DEPENDENCIES:
20522074
- ReactCodegen (from `build/generated/ios`)
20532075
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
20542076
- ReactNativeDependencies (from `../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec`)
2077+
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
20552078
- RNReanimated (from `../node_modules/react-native-reanimated`)
20562079
- RNScreens (from `../node_modules/react-native-screens`)
20572080
- RNWorklets (from `../node_modules/react-native-worklets`)
@@ -2209,6 +2232,8 @@ EXTERNAL SOURCES:
22092232
:path: "../node_modules/react-native/ReactCommon"
22102233
ReactNativeDependencies:
22112234
:podspec: "../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec"
2235+
RNGestureHandler:
2236+
:path: "../node_modules/react-native-gesture-handler"
22122237
RNReanimated:
22132238
:path: "../node_modules/react-native-reanimated"
22142239
RNScreens:
@@ -2294,6 +2319,7 @@ SPEC CHECKSUMS:
22942319
ReactCodegen: c7382a9d84b5826fec1441c7eec6e424499bc8c0
22952320
ReactCommon: b720ccad5e1e8a528746c39b671825fcb7207d3c
22962321
ReactNativeDependencies: ed6d1e64802b150399f04f1d5728ec16b437251e
2322+
RNGestureHandler: a95abac1bb5e061975d7fdc926ec385de67889ae
22972323
RNReanimated: 1c03486192caeabe2795787e4bb046116383be7a
22982324
RNScreens: 323681ad7305fab21bc2594275f1dc89de82ac2b
22992325
RNWorklets: 83609071441ac7d623f1e0e63b9043f4f345e2a2

example/ios/example.xcodeproj/project.pbxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
48A2FD51E39C259B074209A3 /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
2424
564544C6DD373A94E258D289 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = "<group>"; };
2525
59F8605AE40160F2600DE52A /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-example/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
26-
7B3D2087D2CA6B33379401DA /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = example/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
26+
7B3D2087D2CA6B33379401DA /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = example/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
2727
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = example/SplashScreen.storyboard; sourceTree = "<group>"; };
2828
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
2929
C4AC96DDBC3E1BCCB1CCC26C /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = "<group>"; };
@@ -120,7 +120,6 @@
120120
564544C6DD373A94E258D289 /* Pods-example.debug.xcconfig */,
121121
C4AC96DDBC3E1BCCB1CCC26C /* Pods-example.release.xcconfig */,
122122
);
123-
name = Pods;
124123
path = Pods;
125124
sourceTree = "<group>";
126125
};
@@ -337,6 +336,7 @@
337336
CLANG_ENABLE_MODULES = YES;
338337
CODE_SIGN_ENTITLEMENTS = example/example.entitlements;
339338
CURRENT_PROJECT_VERSION = 1;
339+
DEVELOPMENT_TEAM = 9S2Q77K6U6;
340340
ENABLE_BITCODE = NO;
341341
GCC_PREPROCESSOR_DEFINITIONS = (
342342
"$(inherited)",
@@ -373,6 +373,7 @@
373373
CLANG_ENABLE_MODULES = YES;
374374
CODE_SIGN_ENTITLEMENTS = example/example.entitlements;
375375
CURRENT_PROJECT_VERSION = 1;
376+
DEVELOPMENT_TEAM = 9S2Q77K6U6;
376377
INFOPLIST_FILE = example/Info.plist;
377378
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
378379
LD_RUNPATH_SEARCH_PATHS = (

example/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"ios": "expo run:ios",
99
"web": "expo start --web",
1010
"prebuild": "expo prebuild",
11-
"prebuild:clean": "expo prebuild --clean"
11+
"prebuild:clean": "expo prebuild --clean",
12+
"postinstall": "npx patch-package"
1213
},
1314
"dependencies": {
1415
"@expo/metro-runtime": "~6.1.2",
@@ -19,6 +20,7 @@
1920
"react": "19.1.0",
2021
"react-dom": "19.1.0",
2122
"react-native": "0.81.4",
23+
"react-native-gesture-handler": "^2.29.0",
2224
"react-native-reanimated": "4.1.3",
2325
"react-native-safe-area-context": "^5.6.1",
2426
"react-native-screens": "^4.17.1",
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
diff --git a/node_modules/react-native-web/.DS_Store b/node_modules/react-native-web/.DS_Store
2+
new file mode 100644
3+
index 0000000..9de77ec
4+
Binary files /dev/null and b/node_modules/react-native-web/.DS_Store differ
5+
diff --git a/node_modules/react-native-web/dist/cjs/exports/Image/index.js b/node_modules/react-native-web/dist/cjs/exports/Image/index.js
6+
index c76ecde..b0864cc 100644
7+
--- a/node_modules/react-native-web/dist/cjs/exports/Image/index.js
8+
+++ b/node_modules/react-native-web/dist/cjs/exports/Image/index.js
9+
@@ -290,6 +290,22 @@ Image.displayName = 'Image';
10+
11+
// $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet
12+
var ImageWithStatics = Image;
13+
+ImageWithStatics.resolveAssetSource = function resolveAssetSource(source) {
14+
+ var uri = resolveAssetUri(source) || '';
15+
+ var dimensions = resolveAssetDimensions(source) || {};
16+
+ var width, height;
17+
+ if (typeof dimensions.width === 'number') {
18+
+ width = dimensions.width;
19+
+ }
20+
+ if (typeof dimensions.height === 'number') {
21+
+ height = dimensions.height;
22+
+ }
23+
+ return {
24+
+ uri,
25+
+ width,
26+
+ height
27+
+ };
28+
+};
29+
ImageWithStatics.getSize = function (uri, success, failure) {
30+
_ImageLoader.default.getSize(uri, success, failure);
31+
};
32+
diff --git a/node_modules/react-native-web/dist/exports/Image/index.js b/node_modules/react-native-web/dist/exports/Image/index.js
33+
index 348831d..0d20f70 100644
34+
--- a/node_modules/react-native-web/dist/exports/Image/index.js
35+
+++ b/node_modules/react-native-web/dist/exports/Image/index.js
36+
@@ -285,6 +285,22 @@ Image.displayName = 'Image';
37+
38+
// $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet
39+
var ImageWithStatics = Image;
40+
+ImageWithStatics.resolveAssetSource = function resolveAssetSource(source) {
41+
+ var uri = resolveAssetUri(source) || '';
42+
+ var dimensions = resolveAssetDimensions(source) || {};
43+
+ var width, height;
44+
+ if (typeof dimensions.width === 'number') {
45+
+ width = dimensions.width;
46+
+ }
47+
+ if (typeof dimensions.height === 'number') {
48+
+ height = dimensions.height;
49+
+ }
50+
+ return {
51+
+ uri,
52+
+ width,
53+
+ height
54+
+ };
55+
+};
56+
ImageWithStatics.getSize = function (uri, success, failure) {
57+
ImageLoader.getSize(uri, success, failure);
58+
};
59+
diff --git a/node_modules/react-native-web/dist/exports/Image/index.js.flow b/node_modules/react-native-web/dist/exports/Image/index.js.flow
60+
index 9c53bdd..d01b34f 100644
61+
--- a/node_modules/react-native-web/dist/exports/Image/index.js.flow
62+
+++ b/node_modules/react-native-web/dist/exports/Image/index.js.flow
63+
@@ -10,7 +10,7 @@
64+
65+
'use client';
66+
67+
-import type { ImageProps } from './types';
68+
+import type { ImageProps, Source } from './types';
69+
import * as React from 'react';
70+
import createElement from '../createElement';
71+
import { getAssetByID } from '../../modules/AssetRegistry';
72+
@@ -34,6 +34,11 @@ declare function resolveAssetDimensions(source: any): any;
73+
declare function resolveAssetUri(source: any): ?string;
74+
interface ImageStatics {
75+
getSize: (uri: string, success: (width: number, height: number) => void, failure: () => void) => void,
76+
+ resolveAssetSource: (source: Source) => {
77+
+ uri: string,
78+
+ width?: number,
79+
+ height?: number,
80+
+ },
81+
prefetch: (uri: string) => Promise<void>,
82+
queryCache: (uris: Array<string>) => Promise<{|
83+
[uri: string]: 'disk/memory'
84+
@@ -150,6 +155,26 @@ Image.displayName = 'Image';
85+
86+
// $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet
87+
const ImageWithStatics = (Image: React.AbstractComponent<ImageProps, React.ElementRef<typeof View>> & ImageStatics);
88+
+ImageWithStatics.resolveAssetSource = function resolveAssetSource(source): {
89+
+ uri: string,
90+
+ width?: number,
91+
+ height?: number,
92+
+} {
93+
+ const uri = resolveAssetUri(source) || '';
94+
+ const dimensions = resolveAssetDimensions(source) || {};
95+
+ let width, height;
96+
+ if (typeof dimensions.width === 'number') {
97+
+ width = dimensions.width;
98+
+ }
99+
+ if (typeof dimensions.height === 'number') {
100+
+ height = dimensions.height;
101+
+ }
102+
+ return {
103+
+ uri,
104+
+ width,
105+
+ height
106+
+ };
107+
+};
108+
ImageWithStatics.getSize = function (uri, success, failure) {
109+
ImageLoader.getSize(uri, success, failure);
110+
};

0 commit comments

Comments
 (0)