@ankhorage/zora 28.7.0 → 28.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/package.json +3 -3
- package/web-dist/runtime/ZoraProvider.js +6 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# ZORA
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Provides opinionated React Native and React Native Web UI components, theme primitives, registries, and reader surfaces built on @ankhorage/surface.
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "28.7.
|
|
4
|
+
"version": "28.7.2",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@ankhorage/graph": "^0.5.0",
|
|
50
50
|
"@ankhorage/grid-view": "^0.5.0",
|
|
51
51
|
"@ankhorage/reader": "^0.1.4",
|
|
52
|
-
"@ankhorage/runtime": "^5.8.
|
|
53
|
-
"@ankhorage/surface": "^9.8.
|
|
52
|
+
"@ankhorage/runtime": "^5.8.2",
|
|
53
|
+
"@ankhorage/surface": "^9.8.10",
|
|
54
54
|
"@ankhorage/utility": "^1.11.0",
|
|
55
55
|
"expo-asset": "~57.0.21",
|
|
56
56
|
"expo-audio": "~57.0.5",
|
|
@@ -108,9 +108,13 @@ function useOverlayStackRuntime() {
|
|
|
108
108
|
const topmost = overlaysRef.current.at(-1);
|
|
109
109
|
topmost?.onDismiss?.();
|
|
110
110
|
}, []);
|
|
111
|
+
const isDescendantOf = React2.useCallback((id, ancestorId) => {
|
|
112
|
+
const entry = overlaysRef.current.find((item) => item.id === id);
|
|
113
|
+
return entry === undefined ? false : isOverlayDescendantOf(entry, ancestorId, overlaysRef.current);
|
|
114
|
+
}, []);
|
|
111
115
|
const isTopmost = React2.useCallback((id) => overlaysRef.current.at(-1)?.id === id, []);
|
|
112
|
-
const actions = React2.useMemo(() => ({ dismissTopmost, isTopmost, removeOverlay, setOverlay }), [dismissTopmost, isTopmost, removeOverlay, setOverlay]);
|
|
113
|
-
const value = React2.useMemo(() => ({ dismissTopmost, isTopmost, overlays, removeOverlay, setOverlay }), [dismissTopmost, isTopmost, overlays, removeOverlay, setOverlay]);
|
|
116
|
+
const actions = React2.useMemo(() => ({ dismissTopmost, isDescendantOf, isTopmost, removeOverlay, setOverlay }), [dismissTopmost, isDescendantOf, isTopmost, removeOverlay, setOverlay]);
|
|
117
|
+
const value = React2.useMemo(() => ({ dismissTopmost, isDescendantOf, isTopmost, overlays, removeOverlay, setOverlay }), [dismissTopmost, isDescendantOf, isTopmost, overlays, removeOverlay, setOverlay]);
|
|
114
118
|
return { actions, value };
|
|
115
119
|
}
|
|
116
120
|
function isOverlayDescendantOf(entry, removedId, overlays) {
|