sykpcomposer 0.0.84 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +5 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1499,7 +1499,7 @@ Example:
|
|
|
1499
1499
|
Perhaps you're looking to import 'styled-components/native'?
|
|
1500
1500
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1501
1501
|
|
|
1502
|
-
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const uk=zp,dk=({initialHtml:m,onHtmlChanged:c})=>{const[p]=yr(),[t,f]=be.useState(!0);return be.useEffect(()=>{!m||!t||(f(!1),p.update(()=>{const n=new DOMParser().parseFromString(m,"text/html"),e=e0(p,n);gm(e)}))},[]),le.jsx(z0,{onChange:r=>{r.read(()=>{c(n0(p))})}})},Up=mE([...[wo,Hl,Fi,Su]]);function fk(){return le.jsx("div",{className:"editor-placeholder"})}const pk={namespace:"React.js Demo",nodes:Up,onError(m){throw m},theme:_E},hk=()=>le.jsx(le.Fragment,{children:"hello"});function gk({collabApiKey:m,styleConfig:c,userObj:p,docId:t}){const[f,r]=be.useState(!1),[n,e]=be.useState([]),[s,i]=be.useState({root:null}),{userId:l,userName:o,userEmail:a}=p,{pageMargin:d}=c||{},u=be.useRef();be.useState("");const h={docId:t,apiKey:m,user:{name:o,id:l,email:a},hooks:{contentChanged:({source:x,content:S})=>{},usersUpdate:x=>{e(x)}}},y=()=>{u.current&&u.current.start(h).then(()=>{console.log("[Lexical Demo][codox.start] success"),r(!0)}).catch(x=>console.log("[Lexical Demo][codox.start] error",x))};be.useEffect(()=>()=>{v()},[]);const v=()=>{u.current&&u.current.stop(),r(!1)};let _={root:{children:[{children:[],direction:"ltr",format:"",indent:0,type:"paragraph",version:1,textFormat:0,showUI:!0}],direction:"ltr",format:"",indent:0,type:"root",version:1}};be.useEffect(()=>{(async()=>{if(!
|
|
1502
|
+
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const uk=zp,dk=({initialHtml:m,onHtmlChanged:c})=>{const[p]=yr(),[t,f]=be.useState(!0);return be.useEffect(()=>{!m||!t||(f(!1),p.update(()=>{const n=new DOMParser().parseFromString(m,"text/html"),e=e0(p,n);gm(e)}))},[]),le.jsx(z0,{onChange:r=>{console.log("editorState",r),r.read(()=>{c(n0(p))})}})},Up=mE([...[wo,Hl,Fi,Su]]);function fk(){return le.jsx("div",{className:"editor-placeholder"})}const pk={namespace:"React.js Demo",nodes:Up,onError(m){throw m},theme:_E},hk=()=>le.jsx(le.Fragment,{children:"hello"});function gk({collabApiKey:m,styleConfig:c,userObj:p,docId:t}){const[f,r]=be.useState(!1),[n,e]=be.useState([]),[s,i]=be.useState({root:null}),{userId:l,userName:o,userEmail:a}=p,{pageMargin:d}=c||{},u=be.useRef();be.useState("");const h={docId:t,apiKey:m,user:{name:o,id:l,email:a},hooks:{contentChanged:({source:x,content:S})=>{},usersUpdate:x=>{e(x)}}},y=()=>{u.current&&u.current.start(h).then(()=>{console.log("[Lexical Demo][codox.start] success"),r(!0)}).catch(x=>console.log("[Lexical Demo][codox.start] error",x))};be.useEffect(()=>()=>{v()},[]);const v=()=>{u.current&&u.current.stop(),r(!1)};let _={root:{children:[{children:[],direction:"ltr",format:"",indent:0,type:"paragraph",version:1,textFormat:0,showUI:!0}],direction:"ltr",format:"",indent:0,type:"root",version:1}};be.useEffect(()=>{(async()=>{if(!t)return;f&&v();let x=_;if(x)try{yE(x,Up),i(x)}catch(S){console.error("[APP] error: ",S)}})()},[t]),be.useEffect(()=>{s&&t&&!f&&y()},[s,t,f]),be.useMemo(()=>({editorState:s?JSON.stringify({root:s.root}):null,namespace:"Playground",nodes:Up,onError:x=>{throw x},theme:{}}),[s]);const b=()=>{let x=[],S=[];return n&&n.length>0&&n.map((C,k)=>{S.includes(C.name)||(S.push(C.name),x.push(le.jsxs("div",{title:C.email,className:`avatarStyle avatar-color-${k+1}`,children:[" ",C.name&&C.name[0],C.name&&C.name[4]]},k)))}),le.jsx("div",{className:"flexContainer",children:x})},w=uk.div`
|
|
1503
1503
|
padding: ${d||"56px"};
|
|
1504
1504
|
`;return be.useEffect(()=>{(async()=>{const x=!!m,S=!!p,C=!!c;console.log(x&&S&&C?"All three conditions are met.":x&&S||x&&C||S&&C?"Any two of the three conditions are met.":x||S||C?"Any one of the three conditions is met.":"None of the three conditions are met.")})()},[m,p,c]),le.jsx("div",{children:le.jsx(Pm,{initialConfig:pk,children:le.jsxs("div",{className:"editor-container",children:[le.jsx(uC,{renderOnlineUsers:b,styleConfig:c}),le.jsxs("div",{className:"editor-inner",children:[le.jsx(fx,{contentEditable:le.jsx(w,{children:le.jsx(Nm,{className:"editor-input"})}),placeholder:le.jsx(fk,{}),ErrorBoundary:hk}),le.jsx(gE,{ref:u}),le.jsx(Ym,{}),le.jsx(bE,{}),le.jsx(dk,{onHtmlChanged:x=>console.log(x),initialHtml:"<h1 style='color: red'>Heading 1</h1><h2 style='color: red'>Heading 2</h2><h3 style='color: red'>Heading 3</h3><p>Sample </p>"}),le.jsx(jm,{})]})]})})})}Br.Editor=gk,Object.defineProperty(Br,Symbol.toStringTag,{value:"Module"})});
|
|
1505
1505
|
//# sourceMappingURL=index.umd.js.map
|