orgo-vnc
Version:
Embed cloud desktops in your React app
1 lines • 1.25 kB
Source Map (JSON)
{"version":3,"sources":["../src/ComputerDisplay.tsx"],"sourcesContent":["'use client';\n\nimport { useState, useEffect } from 'react';\nimport type { ComputerDisplayProps } from './types';\n\nexport function ComputerDisplay(props: ComputerDisplayProps) {\n const [Client, setClient] = useState<React.ComponentType<ComputerDisplayProps> | null>(null);\n\n useEffect(() => {\n import('./VNCClient').then((mod) => {\n setClient(() => mod.VNCClient);\n });\n }, []);\n\n if (!Client) {\n return (\n <div\n className={props.className}\n style={{\n width: '100%',\n height: '100%',\n background: props.background || '#000',\n ...props.style,\n }}\n />\n );\n }\n\n return <Client {...props} />;\n}"],"mappings":";;;AAEA,SAAS,UAAU,iBAAiB;AAc9B;AAXC,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA2D,IAAI;AAE3F,YAAU,MAAM;AACd,WAAO,iBAAa,EAAE,KAAK,CAAC,QAAQ;AAClC,gBAAU,MAAM,IAAI,SAAS;AAAA,IAC/B,CAAC;AAAA,EACH,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,QAAQ;AACX,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,MAAM;AAAA,QACjB,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,YAAY,MAAM,cAAc;AAAA,UAChC,GAAG,MAAM;AAAA,QACX;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SAAO,oBAAC,UAAQ,GAAG,OAAO;AAC5B;","names":[]}