31 lines
843 B
TypeScript
Raw Normal View History

2022-09-28 20:04:00 -06:00
import createReactClass from 'create-react-class';
import { createElement, useCallback, useEffect, useMemo, useState } from 'react';
2022-09-28 20:04:00 -06:00
import bootstrap from './bootstrap';
import Registry from './lib/registry';
export * from './backends';
export * from './widgets';
export * from './media-libraries';
export { default as locales } from './locales';
2022-09-28 20:04:00 -06:00
export * from './lib';
2022-11-05 15:29:04 -04:00
export * from './interface';
const CMS = {
2022-09-28 20:04:00 -06:00
...Registry,
init: bootstrap,
};
if (typeof window !== 'undefined') {
window.CMS = CMS;
window.createClass = window.createClass || createReactClass;
window.useState = window.useState || useState;
window.useMemo = window.useMemo || useMemo;
window.useEffect = window.useEffect || useEffect;
window.useCallback = window.useCallback || useCallback;
window.h = window.h || createElement;
2022-09-28 20:04:00 -06:00
}
export default CMS;