2022-09-28 20:04:00 -06:00
|
|
|
import createReactClass from 'create-react-class';
|
2022-12-01 19:29:33 -05:00
|
|
|
import { createElement, useCallback, useEffect, useMemo, useState } from 'react';
|
2022-09-28 20:04:00 -06:00
|
|
|
|
|
|
|
import bootstrap from './bootstrap';
|
2023-01-10 12:49:12 -05:00
|
|
|
import useIsMediaAsset from './lib/hooks/useIsMediaAsset';
|
|
|
|
import useMediaAsset from './lib/hooks/useMediaAsset';
|
|
|
|
import useMediaInsert from './lib/hooks/useMediaInsert';
|
|
|
|
import useUUID from './lib/hooks/useUUID';
|
2022-09-28 20:04:00 -06:00
|
|
|
import Registry from './lib/registry';
|
|
|
|
|
|
|
|
export * from './backends';
|
2022-11-05 15:29:04 -04:00
|
|
|
export * from './interface';
|
2023-01-10 12:49:12 -05:00
|
|
|
export * from './lib';
|
|
|
|
export { default as locales } from './locales';
|
|
|
|
export * from './media-libraries';
|
|
|
|
export * from './widgets';
|
2022-11-05 15:29:04 -04:00
|
|
|
|
2022-11-05 00:22:38 -04:00
|
|
|
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;
|
2022-12-01 19:29:33 -05:00
|
|
|
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;
|
2023-01-10 12:49:12 -05:00
|
|
|
window.useIsMediaAsset = window.useIsMediaAsset || useIsMediaAsset;
|
|
|
|
window.useMediaAsset = window.useMediaAsset || useMediaAsset;
|
|
|
|
window.useMediaInsert = window.useMediaInsert || useMediaInsert;
|
|
|
|
window.useUUID = window.useUUID || useUUID;
|
2022-09-28 20:04:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export default CMS;
|