UNPKG

@tomorrowevening/hermes

Version:

An extendable set of Web Tools controlled via a separate window for non-intereference with content.

2 lines (1 loc) 453 B
"use strict";const e=require("react/jsx-runtime"),i=require("react");function h(c){const{app:t,renderEditor:r,onLoad:n,renderLoading:o=null,children:d}=c,[u,s]=i.useState(!1);if(i.useEffect(()=>{t.detectSettings().then(()=>{n?n(t).then(()=>s(!0)):s(!0)})},[]),!u)return e.jsx(e.Fragment,{children:o});if(t.editor&&r){const a=t.components.get("three");return e.jsx(e.Fragment,{children:r(a)})}return e.jsx(e.Fragment,{children:d?.(t)})}module.exports=h;