UNPKG

@memberjunction/react-runtime

Version:

Platform-agnostic React component runtime for MemberJunction. Provides core compilation, registry, and execution capabilities for React components in any JavaScript environment.

63 lines 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCoreRuntimeLibrary = exports.getCoreRuntimeLibraries = void 0; function getReactUrl(debug = false) { return debug ? 'https://unpkg.com/react@18.2.0/umd/react.development.js' : 'https://unpkg.com/react@18.2.0/umd/react.production.min.js'; } function getReactDOMUrl(debug = false) { return debug ? 'https://unpkg.com/react-dom@18.2.0/umd/react-dom.development.js' : 'https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js'; } function getCoreRuntimeLibraries(debug = false) { return [ { id: 'react', name: 'react', displayName: 'React', category: 'runtime', globalVariable: 'React', version: '18.2.0', cdnUrl: getReactUrl(debug), description: 'React core library', isEnabled: true, isCore: true, isRuntimeOnly: true }, { id: 'react-dom', name: 'react-dom', displayName: 'ReactDOM', category: 'runtime', globalVariable: 'ReactDOM', version: '18.2.0', cdnUrl: getReactDOMUrl(debug), description: 'React DOM library', isEnabled: true, isCore: true, isRuntimeOnly: true }, { id: 'babel-standalone', name: '@babel/standalone', displayName: 'Babel Standalone', category: 'runtime', globalVariable: 'Babel', version: '7.24.4', cdnUrl: 'https://unpkg.com/@babel/standalone@7.24.4/babel.min.js', description: 'Babel compiler for JSX transformation', isEnabled: true, isCore: true, isRuntimeOnly: true } ]; } exports.getCoreRuntimeLibraries = getCoreRuntimeLibraries; function isCoreRuntimeLibrary(libraryId) { const coreLibraries = getCoreRuntimeLibraries(); return coreLibraries.some((lib) => lib.id === libraryId); } exports.isCoreRuntimeLibrary = isCoreRuntimeLibrary; //# sourceMappingURL=core-libraries.js.map