decord/source/design/components/Layers/native/LayerScope.native.tsx

67 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7164
// Function ID: 7165
2026-07-20 16:05:17 +00:00
// Name: Layer
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 676, 21, 7165, 7166, 2]
2026-07-20 16:05:17 +00:00
// Exports: LayerScope
2026-08-24 06:08:38 +00:00
// Module 7164 (Layer)
import useInitialValueDefault from "useInitialValue" /* 7165 */;
import add from "add" /* 7166 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { NOOP } from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function Layer(zIndex) {
zIndex = zIndex.zIndex;
2026-07-29 08:29:29 +00:00
let context;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let callback;
2026-08-24 06:08:38 +00:00
context = React.useContext(zIndex(7166).LayerContext);
2026-07-29 08:29:29 +00:00
dependencyMap = callback(React.useState({}), 2)[1];
2026-07-23 10:11:24 +00:00
callback = React.useRef(null);
2026-07-20 16:05:17 +00:00
const items = [context];
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
context.invalidate = () => callback({});
2026-07-20 16:05:17 +00:00
return () => {
2026-07-29 08:29:29 +00:00
closure_1.invalidate = () => null;
2026-07-20 16:05:17 +00:00
};
}, items);
const items1 = context.items;
const items2 = [zIndex];
return callback2(closure_5, {
style: React.useMemo(() => {
const obj = {};
2026-08-24 06:08:38 +00:00
const merged = Object.assign(closure_1_6.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj.zIndex = zIndex;
2026-07-20 16:05:17 +00:00
return obj;
}, items2),
ref(current) {
2026-08-24 06:08:38 +00:00
closure_3.current = current;
2026-07-20 16:05:17 +00:00
context.setSurfaceRef(current);
},
onLayout: NOOP,
pointerEvents: "box-none",
2026-07-29 08:29:29 +00:00
children: items1.map((children) => callback(React.Fragment, { children: children.component }, children.key))
2026-07-20 16:05:17 +00:00
});
}
2026-07-29 08:29:29 +00:00
({ View: c5, StyleSheet: closure_6 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ jsx: closure_8, jsxs: c9 } = jsxProd);
const result = require("set").fileFinishedImporting("design/components/Layers/native/LayerScope.native.tsx");
2026-07-20 16:05:17 +00:00
export const LayerScope = function LayerScope(arg0) {
({ children, zIndex } = arg0);
const obj = {
2026-08-24 06:08:38 +00:00
value: useInitialValueDefault(() => {
2026-07-29 08:29:29 +00:00
const layerContextManager = new callback(table[6]).LayerContextManager();
2026-07-20 16:05:17 +00:00
return layerContextManager;
2026-07-29 08:29:29 +00:00
}),
children: null
2026-07-20 16:05:17 +00:00
};
const items = [children, callback2(Layer, { zIndex })];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-08-24 06:08:38 +00:00
return callback3(add.LayerContext.Provider, obj);
2026-07-20 16:05:17 +00:00
};