UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

26 lines 934 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useReactFlowVersion = void 0; const react_flow_renderer_1 = require("react-flow-renderer"); const react_flow_renderer_lts_1 = require("react-flow-renderer-lts"); const react_1 = require("@xyflow/react"); const useReactFlowVersion = () => { try { const [, , zoom] = (0, react_flow_renderer_1.useStoreState)((state) => state.transform); return zoom ? "legacy" : "none"; } catch (_a) { } try { const [, , zoom] = (0, react_flow_renderer_lts_1.useStore)((state) => state.transform); return zoom ? "next" : "none"; } catch (_b) { } try { const [, , zoom] = (0, react_1.useStore)((state) => state.transform); return zoom ? "v12" : "none"; } catch (_c) { } return "none"; }; exports.useReactFlowVersion = useReactFlowVersion; //# sourceMappingURL=versionsupport.js.map