decord/source/modules/icymi/native/ICYMIContext.tsx

29 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 16524
// Function ID: 16525
// Name: ICYMIContext
// Dependencies: [19, 21, 1477, 576, 2]
2026-07-29 08:29:29 +00:00
// Exports: ICYMIContextProvider, useICYMIContextConstructor
2026-07-20 16:05:17 +00:00
// Module 16524 (ICYMIContext)
import _mod19 from "module_19" /* 19 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import nativeDefault from "native" /* 576 */;
import useWindowDimensionsDefault from "useWindowDimensions" /* 1477 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const jsx = jsxProd.jsx;
const context = _mod19.createContext({ width: 0, margin: 0, inset: 0 });
const result = size.fileFinishedImporting("modules/icymi/native/ICYMIContext.tsx");
2026-07-20 16:05:17 +00:00
export const ICYMIContext = context;
2026-07-29 08:29:29 +00:00
export const useICYMIContextConstructor = function useICYMIContextConstructor() {
2026-08-24 06:08:38 +00:00
const bound = Math.min(useWindowDimensionsDefault().width, 480);
const PX_16 = nativeDefault.space.PX_16;
2026-07-29 08:29:29 +00:00
return { width: bound, margin: PX_16, inset: PX_16 + 38 };
};
2026-07-20 16:05:17 +00:00
export const ICYMIContextProvider = function ICYMIContextProvider(children) {
2026-08-24 06:08:38 +00:00
const bound = Math.min(useWindowDimensionsDefault().width, 480);
const PX_16 = nativeDefault.space.PX_16;
2026-07-29 08:29:29 +00:00
return <context.Provider value={{ width: bound, margin: PX_16, inset: PX_16 + 38 }}>{arg0.children}</context.Provider>;
2026-07-20 16:05:17 +00:00
};