UNPKG

hydrogen-sanity

Version:
55 lines (50 loc) 1.82 kB
import { jsx, Fragment } from 'react/jsx-runtime'; import { lazy, Suspense } from 'react'; import { isServer } from '../_chunks-es/utils.js'; function LiveModeFallback() { return /* @__PURE__ */ jsx(Fragment, {}); } const LiveModeComponent = isServer() ? LiveModeFallback : lazy( () => ( /** * `lazy` expects the component as the default export * @see https://react.dev/reference/react/lazy */ import('../_chunks-es/LiveMode.client.js') ) ); function LiveMode(props) { return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LiveModeFallback, {}), children: /* @__PURE__ */ jsx(LiveModeComponent, { ...props }) }); } function OverlaysFallback() { return /* @__PURE__ */ jsx(Fragment, {}); } const OverlaysComponent = isServer() ? OverlaysFallback : lazy( () => ( /** * `lazy` expects the component as the default export * @see https://react.dev/reference/react/lazy */ import('../_chunks-es/Overlays.client.js') ) ); function Overlays(props) { return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(OverlaysFallback, {}), children: /* @__PURE__ */ jsx(OverlaysComponent, { ...props }) }); } function VisualEditingFallback() { return /* @__PURE__ */ jsx(Fragment, {}); } const VisualEditingComponent = isServer() ? VisualEditingFallback : lazy( () => ( /** * `lazy` expects the component as the default export * @see https://react.dev/reference/react/lazy */ import('../_chunks-es/VisualEditing.client.js') ) ); function VisualEditing(props) { return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(VisualEditingFallback, {}), children: /* @__PURE__ */ jsx(VisualEditingComponent, { ...props }) }); } export { LiveMode, Overlays, VisualEditing }; //# sourceMappingURL=index.js.map