expo-gl 15.1.8-canary-20250709-136b77f → 15.1.8-canary-20250722-599a28f
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/CHANGELOG.md +2 -0
- package/android/build.gradle +2 -2
- package/build/Canvas.d.ts.map +1 -1
- package/build/Canvas.js +2 -2
- package/build/Canvas.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.module → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.pom → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/src/Canvas.tsx +6 -5
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.gl/15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f-sources.jar → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f-sources.jar.md5 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f-sources.jar.sha1 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f-sources.jar.sha256 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f-sources.jar.sha512 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.aar → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.aar.md5 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.aar.sha1 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.aar.sha256 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.gl/{15.1.8-canary-20250709-136b77f/expo.modules.gl-15.1.8-canary-20250709-136b77f.aar.sha512 → 15.1.8-canary-20250722-599a28f/expo.modules.gl-15.1.8-canary-20250722-599a28f.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -9,7 +9,7 @@ def reactNativeArchitectures() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
group = 'host.exp.exponent'
|
|
12
|
-
version = '15.1.8-canary-
|
|
12
|
+
version = '15.1.8-canary-20250722-599a28f'
|
|
13
13
|
|
|
14
14
|
android {
|
|
15
15
|
if (rootProject.hasProperty("ndkPath")) {
|
|
@@ -22,7 +22,7 @@ android {
|
|
|
22
22
|
namespace "expo.modules.gl"
|
|
23
23
|
defaultConfig {
|
|
24
24
|
versionCode 31
|
|
25
|
-
versionName "15.1.8-canary-
|
|
25
|
+
versionName "15.1.8-canary-20250722-599a28f"
|
|
26
26
|
|
|
27
27
|
externalNativeBuild {
|
|
28
28
|
cmake {
|
package/build/Canvas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAmD,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAmD,SAAS,EAAE,MAAM,cAAc,CAAC;AAiD1F,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAC1C,SAAS,GAAG;IACV,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACzC,CAmEF,CAAC;AAQF,eAAe,aAAa,CAAC"}
|
package/build/Canvas.js
CHANGED
|
@@ -32,7 +32,7 @@ function getSize({ size, ref }) {
|
|
|
32
32
|
const { offsetWidth: width = 0, offsetHeight: height = 0 } = element;
|
|
33
33
|
return { width, height };
|
|
34
34
|
}
|
|
35
|
-
const Canvas =
|
|
35
|
+
const Canvas = (props) => createElement('canvas', props);
|
|
36
36
|
const CanvasWrapper = ({ pointerEvents, children, style, ...props }) => {
|
|
37
37
|
const [size, setSize] = React.useState(null);
|
|
38
38
|
const ref = React.useRef(null);
|
|
@@ -76,7 +76,7 @@ const CanvasWrapper = ({ pointerEvents, children, style, ...props }) => {
|
|
|
76
76
|
setRef(props.canvasRef, canvas);
|
|
77
77
|
}, [_canvasRef]);
|
|
78
78
|
return (<View {...props} style={[styles.wrapper, style]} ref={ref} onLayout={onLayout}>
|
|
79
|
-
<Canvas ref={_canvasRef}
|
|
79
|
+
<Canvas ref={_canvasRef} style={[StyleSheet.absoluteFill, { pointerEvents }]}/>
|
|
80
80
|
{children}
|
|
81
81
|
</View>);
|
|
82
82
|
};
|
package/build/Canvas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.js","sourceRoot":"","sources":["../src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,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AAC,CAAC,QAAQ,CAAC,CAC5E;MAAA,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC,EAC7E;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { LayoutChangeEvent, PixelRatio, StyleSheet, View, ViewProps } from 'react-native';\nimport createElement from 'react-native-web/dist/exports/createElement';\n\ninterface Size {\n width: number;\n height: number;\n}\n\ninterface GetSizeParams {\n size: Size | null;\n ref: React.RefObject<View | null>;\n}\n\nfunction getElement(component: React.ReactInstance): React.ReactInstance | Element | null | Text {\n try {\n return findDOMNode(component);\n } catch {\n return component;\n }\n}\n\nfunction setRef<T>(refProp: React.Ref<T>, ref: T | null) {\n if (!refProp) return;\n\n if (typeof refProp === 'function') {\n refProp(ref);\n } else if ('current' in refProp) {\n // @ts-ignore\n refProp.current = ref;\n }\n}\n\nfunction getSize({ size, ref }: GetSizeParams): Size {\n if (size) {\n return size;\n } else if (!ref.current || typeof window === 'undefined') {\n return { width: 0, height: 0 };\n }\n const element = getElement(ref.current);\n const { offsetWidth: width = 0, offsetHeight: height = 0 } = element as HTMLElement;\n return { width, height };\n}\n\nconst Canvas = (\n props: React.ComponentProps<typeof View> & {\n ref?: React.Ref<HTMLCanvasElement>;\n }\n) => createElement('canvas', props);\n\nconst CanvasWrapper: React.FunctionComponent<\n ViewProps & {\n canvasRef: React.Ref<HTMLCanvasElement>;\n }\n> = ({ pointerEvents, children, style, ...props }) => {\n const [size, setSize] = React.useState<Size | null>(null);\n\n const ref = React.useRef<View>(null);\n const _canvasRef = React.useRef<HTMLCanvasElement>(null);\n\n const updateCanvasSize = React.useCallback(() => {\n const canvas = _canvasRef.current;\n if (typeof HTMLCanvasElement !== 'undefined' && canvas instanceof HTMLCanvasElement) {\n const currentSize = getSize({\n size,\n ref,\n });\n const scale = PixelRatio.get();\n\n canvas.style.width = `${currentSize.width}px`;\n canvas.style.height = `${currentSize.height}px`;\n\n canvas.width = currentSize.width * scale;\n canvas.height = currentSize.height * scale;\n }\n }, [size?.width, size?.height]);\n\n const onLayout = React.useCallback(\n (event: LayoutChangeEvent) => {\n const {\n nativeEvent: {\n layout: { width, height },\n },\n } = event;\n\n if (width !== size?.width || height !== size?.height) {\n setSize({ width, height });\n\n if (props.onLayout) {\n props.onLayout(event);\n }\n }\n },\n [size?.width, size?.height, props.onLayout]\n );\n\n React.useEffect(() => {\n if (ref.current != null) {\n setSize(getSize({ size, ref }));\n }\n }, [ref]);\n\n React.useEffect(() => {\n updateCanvasSize();\n }, [size]);\n\n React.useEffect(() => {\n const canvas = _canvasRef.current;\n if (canvas) {\n updateCanvasSize();\n }\n setRef(props.canvasRef, canvas);\n }, [_canvasRef]);\n\n return (\n <View {...props} style={[styles.wrapper, style]} ref={ref} onLayout={onLayout}>\n <Canvas ref={_canvasRef} style={[StyleSheet.absoluteFill, { pointerEvents }]} />\n {children}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n pointerEvents: 'box-none',\n },\n});\n\nexport default CanvasWrapper;\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.gl",
|
|
6
|
-
"version": "15.1.8-canary-
|
|
6
|
+
"version": "15.1.8-canary-20250722-599a28f",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.gl-15.1.8-canary-
|
|
28
|
-
"url": "expo.modules.gl-15.1.8-canary-
|
|
27
|
+
"name": "expo.modules.gl-15.1.8-canary-20250722-599a28f.aar",
|
|
28
|
+
"url": "expo.modules.gl-15.1.8-canary-20250722-599a28f.aar",
|
|
29
29
|
"size": 1044170,
|
|
30
30
|
"sha512": "2202e3eb08e28665adb7aa95e5478a45c57cec3d10894422a9b2c3ae94fe8945f3c517285fc5a37198ded7e55d3e8cd2ac719fe7b06d9366131c24ea59923476",
|
|
31
31
|
"sha256": "527fcd582585cac3e26b3ecfe4ce8c3383c849a23ab4094015d3265803b84bcb",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
],
|
|
54
54
|
"files": [
|
|
55
55
|
{
|
|
56
|
-
"name": "expo.modules.gl-15.1.8-canary-
|
|
57
|
-
"url": "expo.modules.gl-15.1.8-canary-
|
|
56
|
+
"name": "expo.modules.gl-15.1.8-canary-20250722-599a28f.aar",
|
|
57
|
+
"url": "expo.modules.gl-15.1.8-canary-20250722-599a28f.aar",
|
|
58
58
|
"size": 1044170,
|
|
59
59
|
"sha512": "2202e3eb08e28665adb7aa95e5478a45c57cec3d10894422a9b2c3ae94fe8945f3c517285fc5a37198ded7e55d3e8cd2ac719fe7b06d9366131c24ea59923476",
|
|
60
60
|
"sha256": "527fcd582585cac3e26b3ecfe4ce8c3383c849a23ab4094015d3265803b84bcb",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"files": [
|
|
75
75
|
{
|
|
76
|
-
"name": "expo.modules.gl-15.1.8-canary-
|
|
77
|
-
"url": "expo.modules.gl-15.1.8-canary-
|
|
76
|
+
"name": "expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar",
|
|
77
|
+
"url": "expo.modules.gl-15.1.8-canary-20250722-599a28f-sources.jar",
|
|
78
78
|
"size": 12381,
|
|
79
79
|
"sha512": "1cab724074b050f7459a884ac9e98fbf2d009d8239810ca6384c5113f52dd33e5ac40a72ec7174b297e1b10521e56682d73f533715316be5be66ce0e482356d8",
|
|
80
80
|
"sha256": "e8892c6837d1eb5093b2c3b063883d7511799b0e246940c5b70f1515cb4451cd",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c403d0ed3b8bcc0f7f03b3920bb80b7b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
126eb09980e0d20f01e50b8d2373deccd3dde5b3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7efe50674ba8ae576bbb72a32763682deb6f78c3f5ff70ddfbd13c4b7679e16d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fea4f55c5610b24f0825e500bda0d54d7541147d7e4bfe7198c6f6350a3e0d21105caadf30f950c62fbf83637a62462ed73fdf9cb3334f6220ec8e8a6c44b1f4
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.gl</artifactId>
|
|
12
|
-
<version>15.1.8-canary-
|
|
12
|
+
<version>15.1.8-canary-20250722-599a28f</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.gl</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ac2605ac7038f0a9d89e7bf7797d9cc3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8c223c209098c4424ccb2bb50ea7932b70ac0bc1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d23132a85dbf094c93907c7a56b10c70026fc92de7f155eccfafccf2cb1f998b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
15e67f5560179ca31cb7ce0a750ea42f8f0b34f28c27a4d52ffc51d545dd25ad3c9c943d2d98e2a318197929d52290dad238e93fa20bcc670e9a2c96179c34ba
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.gl</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>15.1.8-canary-
|
|
7
|
-
<release>15.1.8-canary-
|
|
6
|
+
<latest>15.1.8-canary-20250722-599a28f</latest>
|
|
7
|
+
<release>15.1.8-canary-20250722-599a28f</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>15.1.8-canary-
|
|
9
|
+
<version>15.1.8-canary-20250722-599a28f</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250722134658</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0029d205374458845052ab48bb375d91
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e58c537fc74f2761cbeac5449d26e90810bbe3ca
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
932ca33a458abc9772774ab992023619a4c3c7270dfddf31a1e9d0eba7e5bdd5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
826adf8f2e423690277dddbf11848cb1596dca9cad5288fa122206f921e077b0ca7f7122c37078cfa43c89af073fa4a86a7044393366335542e9401ffff974c7
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-gl",
|
|
3
|
-
"version": "15.1.8-canary-
|
|
3
|
+
"version": "15.1.8-canary-20250722-599a28f",
|
|
4
4
|
"description": "Provides GLView that acts as OpenGL ES render target and gives GL context object implementing WebGL 2.0 specification.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@types/invariant": "^2.2.33",
|
|
44
44
|
"@types/offscreencanvas": "2019.6.4",
|
|
45
45
|
"@types/webgl2": "^0.0.6",
|
|
46
|
-
"expo-module-scripts": "4.1.10-canary-
|
|
46
|
+
"expo-module-scripts": "4.1.10-canary-20250722-599a28f",
|
|
47
47
|
"react-test-renderer": "19.1.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"expo": "54.0.0-canary-
|
|
50
|
+
"expo": "54.0.0-canary-20250722-599a28f",
|
|
51
51
|
"react": "*",
|
|
52
52
|
"react-native": "*",
|
|
53
53
|
"react-native-web": "*"
|
package/src/Canvas.tsx
CHANGED
|
@@ -43,10 +43,11 @@ function getSize({ size, ref }: GetSizeParams): Size {
|
|
|
43
43
|
return { width, height };
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
const Canvas =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const Canvas = (
|
|
47
|
+
props: React.ComponentProps<typeof View> & {
|
|
48
|
+
ref?: React.Ref<HTMLCanvasElement>;
|
|
49
|
+
}
|
|
50
|
+
) => createElement('canvas', props);
|
|
50
51
|
|
|
51
52
|
const CanvasWrapper: React.FunctionComponent<
|
|
52
53
|
ViewProps & {
|
|
@@ -114,7 +115,7 @@ const CanvasWrapper: React.FunctionComponent<
|
|
|
114
115
|
|
|
115
116
|
return (
|
|
116
117
|
<View {...props} style={[styles.wrapper, style]} ref={ref} onLayout={onLayout}>
|
|
117
|
-
<Canvas ref={_canvasRef}
|
|
118
|
+
<Canvas ref={_canvasRef} style={[StyleSheet.absoluteFill, { pointerEvents }]} />
|
|
118
119
|
{children}
|
|
119
120
|
</View>
|
|
120
121
|
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fc45ce5ffef74e1bf44efe4b5cf05709
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f1fa728486763d1135c197a12c68de7dce214510
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8fadf851737850b64cc3500c029973b4793212c7db05c879816c264ba05633fe
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6d750e25acfbb5666322da18ef16f25100cee92cd5c7bae8c028ca91229584b917e33c17ff79177fbf1214393b5f365cae1b4892d426a9a26552eb82d5a54aef
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
48e87873ce21e282aaee7ec308d722c5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
346c3192e5d458abc952ba1543307df34302f142
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4b504e11cf667a125dd6645971de8745cff0342c5166530c4c3160c84ac39f22
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c6267592259f21203770a86f421d512344903ea4404f4bdf43034675ec108ad4db61b78a8f708cc1a17aff44e8fa353c832d69d95acc2908a453ff799f2642ab
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|