1 line
No EOL
5.7 KiB
JSON
1 line
No EOL
5.7 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom/client';\nvar nodes = new Map();\nfunction getIsReactActEnvironment() {\n return globalThis.IS_REACT_ACT_ENVIRONMENT;\n}\nvar WithCallback = ({\n callback,\n children\n}) => {\n let once = React.useRef();\n return React.useLayoutEffect(() => {\n once.current !== callback && (once.current = callback, callback());\n }, [callback]), children;\n};\ntypeof Promise.withResolvers > \"u\" && (Promise.withResolvers = () => {\n let resolve = null,\n reject = null;\n return {\n promise: new Promise((res, rej) => {\n resolve = res, reject = rej;\n }),\n resolve,\n reject\n };\n});\nvar renderElement = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (node, el, rootOptions) {\n let root = yield getReactRoot(el, rootOptions);\n if (getIsReactActEnvironment()) {\n root.render(node);\n return;\n }\n let {\n promise,\n resolve\n } = Promise.withResolvers();\n return root.render(React.createElement(WithCallback, {\n callback: resolve\n }, node)), promise;\n });\n return function renderElement(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n }(),\n unmountElement = (el, shouldUseNewRootApi) => {\n let root = nodes.get(el);\n root && (root.unmount(), nodes.delete(el));\n },\n getReactRoot = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(function* (el, rootOptions) {\n let root = nodes.get(el);\n return root || (root = ReactDOM.createRoot(el, rootOptions), nodes.set(el, root)), root;\n });\n return function getReactRoot(_x4, _x5) {\n return _ref2.apply(this, arguments);\n };\n }();\nexport { renderElement, unmountElement };","map":{"version":3,"names":["React","ReactDOM","nodes","Map","getIsReactActEnvironment","globalThis","IS_REACT_ACT_ENVIRONMENT","WithCallback","callback","children","once","useRef","useLayoutEffect","current","Promise","withResolvers","resolve","reject","promise","res","rej","renderElement","_ref","_asyncToGenerator","node","el","rootOptions","root","getReactRoot","render","createElement","_x","_x2","_x3","apply","arguments","unmountElement","shouldUseNewRootApi","get","unmount","delete","_ref2","createRoot","set","_x4","_x5"],"sources":["/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/react-dom-shim/dist/react-18.mjs"],"sourcesContent":["import * as React from 'react';\nimport * as ReactDOM from 'react-dom/client';\n\nvar nodes=new Map;function getIsReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var WithCallback=({callback,children})=>{let once=React.useRef();return React.useLayoutEffect(()=>{once.current!==callback&&(once.current=callback,callback());},[callback]),children};typeof Promise.withResolvers>\"u\"&&(Promise.withResolvers=()=>{let resolve=null,reject=null;return {promise:new Promise((res,rej)=>{resolve=res,reject=rej;}),resolve,reject}});var renderElement=async(node,el,rootOptions)=>{let root=await getReactRoot(el,rootOptions);if(getIsReactActEnvironment()){root.render(node);return}let{promise,resolve}=Promise.withResolvers();return root.render(React.createElement(WithCallback,{callback:resolve},node)),promise},unmountElement=(el,shouldUseNewRootApi)=>{let root=nodes.get(el);root&&(root.unmount(),nodes.delete(el));},getReactRoot=async(el,rootOptions)=>{let root=nodes.get(el);return root||(root=ReactDOM.createRoot(el,rootOptions),nodes.set(el,root)),root};\n\nexport { renderElement, unmountElement };\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,QAAQ,MAAM,kBAAkB;AAE5C,IAAIC,KAAK,GAAC,IAAIC,GAAG,CAAD,CAAC;AAAC,SAASC,wBAAwBA,CAAA,EAAE;EAAC,OAAOC,UAAU,CAACC,wBAAwB;AAAA;AAAC,IAAIC,YAAY,GAACA,CAAC;EAACC,QAAQ;EAACC;AAAQ,CAAC,KAAG;EAAC,IAAIC,IAAI,GAACV,KAAK,CAACW,MAAM,CAAC,CAAC;EAAC,OAAOX,KAAK,CAACY,eAAe,CAAC,MAAI;IAACF,IAAI,CAACG,OAAO,KAAGL,QAAQ,KAAGE,IA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