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.
Files changed (41) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/android/build.gradle +2 -2
  3. package/build/Canvas.d.ts.map +1 -1
  4. package/build/Canvas.js +2 -2
  5. package/build/Canvas.js.map +1 -1
  6. package/expo-module.config.json +1 -1
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml +4 -4
  18. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.md5 +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha1 +1 -1
  20. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha256 +1 -1
  21. package/local-maven-repo/host/exp/exponent/expo.modules.gl/maven-metadata.xml.sha512 +1 -1
  22. package/package.json +3 -3
  23. package/src/Canvas.tsx +6 -5
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. /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
  33. /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
  34. /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
  35. /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
  36. /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
  37. /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
  38. /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
  39. /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
  40. /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
  41. /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
@@ -10,6 +10,8 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ - Use pointerEvents style instead of prop for components on web. ([#38023](https://github.com/expo/expo/pull/38023) by [@EvanBacon](https://github.com/EvanBacon))
14
+
13
15
  ## 15.1.7 - 2025-07-01
14
16
 
15
17
  ### 🐛 Bug fixes
@@ -9,7 +9,7 @@ def reactNativeArchitectures() {
9
9
  }
10
10
 
11
11
  group = 'host.exp.exponent'
12
- version = '15.1.8-canary-20250709-136b77f'
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-20250709-136b77f"
25
+ versionName "15.1.8-canary-20250722-599a28f"
26
26
 
27
27
  externalNativeBuild {
28
28
  cmake {
@@ -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;AAgD1F,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"}
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 = React.forwardRef((props, ref) => createElement('canvas', { ...props, ref }));
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} pointerEvents={pointerEvents} style={StyleSheet.absoluteFill}/>
79
+ <Canvas ref={_canvasRef} style={[StyleSheet.absoluteFill, { pointerEvents }]}/>
80
80
  {children}
81
81
  </View>);
82
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Canvas.js","sourceRoot":"","sources":["../src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAqB,UAAU,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAC;AAC1F,OAAO,aAAa,MAAM,6CAA6C,CAAC;AAYxE,SAAS,UAAU,CAAC,SAA8B;IAChD,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAI,OAAqB,EAAE,GAAa;IACrD,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;SAAM,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QAChC,aAAa;QACb,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAS,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAiB;IAC3C,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QACzD,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACjC,CAAC;IACD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC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AAM,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAC5E;MAAA,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,EACtF;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 = React.forwardRef(\n (props: React.ComponentProps<typeof View>, ref: React.Ref<HTMLCanvasElement>) =>\n createElement('canvas', { ...props, ref })\n);\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} pointerEvents={pointerEvents} style={StyleSheet.absoluteFill} />\n {children}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n pointerEvents: 'box-none',\n },\n});\n\nexport default CanvasWrapper;\n"]}
1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AAG,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,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"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "host.exp.exponent",
11
11
  "artifactId": "expo.modules.gl",
12
- "version": "15.1.8-canary-20250709-136b77f",
12
+ "version": "15.1.8-canary-20250722-599a28f",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -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-20250709-136b77f",
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-20250709-136b77f.aar",
28
- "url": "expo.modules.gl-15.1.8-canary-20250709-136b77f.aar",
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-20250709-136b77f.aar",
57
- "url": "expo.modules.gl-15.1.8-canary-20250709-136b77f.aar",
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-20250709-136b77f-sources.jar",
77
- "url": "expo.modules.gl-15.1.8-canary-20250709-136b77f-sources.jar",
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
+ 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-20250709-136b77f</version>
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
+ 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-20250709-136b77f</latest>
7
- <release>15.1.8-canary-20250709-136b77f</release>
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-20250709-136b77f</version>
9
+ <version>15.1.8-canary-20250722-599a28f</version>
10
10
  </versions>
11
- <lastUpdated>20250709123427</lastUpdated>
11
+ <lastUpdated>20250722134658</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 2a35646c34af4c6755407fe8df95de18
1
+ 0029d205374458845052ab48bb375d91
@@ -1 +1 @@
1
- 3161095f2c37d479edfba729a29edcf4100c0958
1
+ e58c537fc74f2761cbeac5449d26e90810bbe3ca
@@ -1 +1 @@
1
- 27c249d73235149a586374775ec4530be66b7dfd3e17960455aeb776659812c3
1
+ 932ca33a458abc9772774ab992023619a4c3c7270dfddf31a1e9d0eba7e5bdd5
@@ -1 +1 @@
1
- 8726abfdecbca250a0fd3c05615d4900a832049ed8a8072a7c907fb134ee106ea1f2945f28e983c2d749c3fb47b5940b0828c4bcc3678ed0d4bdc05e195298b3
1
+ 826adf8f2e423690277dddbf11848cb1596dca9cad5288fa122206f921e077b0ca7f7122c37078cfa43c89af073fa4a86a7044393366335542e9401ffff974c7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-gl",
3
- "version": "15.1.8-canary-20250709-136b77f",
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-20250709-136b77f",
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-20250709-136b77f",
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 = React.forwardRef(
47
- (props: React.ComponentProps<typeof View>, ref: React.Ref<HTMLCanvasElement>) =>
48
- createElement('canvas', { ...props, ref })
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} pointerEvents={pointerEvents} style={StyleSheet.absoluteFill} />
118
+ <Canvas ref={_canvasRef} style={[StyleSheet.absoluteFill, { pointerEvents }]} />
118
119
  {children}
119
120
  </View>
120
121
  );
@@ -1 +0,0 @@
1
- 6d750e25acfbb5666322da18ef16f25100cee92cd5c7bae8c028ca91229584b917e33c17ff79177fbf1214393b5f365cae1b4892d426a9a26552eb82d5a54aef
@@ -1 +0,0 @@
1
- c6267592259f21203770a86f421d512344903ea4404f4bdf43034675ec108ad4db61b78a8f708cc1a17aff44e8fa353c832d69d95acc2908a453ff799f2642ab