@adhese/sdk-devtools 0.2.0 → 0.3.0
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/cjs/devtools.js +14 -10
- package/dist/cjs/devtools.js.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/devtools.js +14 -9
- package/dist/es/devtools.js.map +1 -1
- package/dist/es/index.js +3 -3
- package/dist/es/index.js.map +1 -1
- package/dist/style.css +1314 -9
- package/package.json +2 -2
package/dist/es/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { lazy } from "react";
|
|
2
2
|
async function createDevtools(context) {
|
|
3
|
-
const
|
|
3
|
+
const main = await import("./devtools.js").then((n) => n.m);
|
|
4
4
|
const wrapperElement = document.createElement("div");
|
|
5
5
|
document.body.appendChild(wrapperElement);
|
|
6
|
-
const unmount =
|
|
6
|
+
const unmount = main.createAdheseDevtools(wrapperElement, context);
|
|
7
7
|
return () => {
|
|
8
8
|
unmount();
|
|
9
9
|
wrapperElement.outerHTML = "";
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
const Devtools = lazy(() => import("./devtools.js").then((module) => ({ default: module.Devtools })));
|
|
12
|
+
const Devtools = lazy(() => import("./devtools.js").then((n) => n.D).then((module) => ({ default: module.Devtools })));
|
|
13
13
|
export {
|
|
14
14
|
Devtools,
|
|
15
15
|
createDevtools
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import type { AdheseContext } from '@adhese/sdk';\nimport { lazy } from 'react';\n\nexport async function createDevtools(context: AdheseContext): Promise<() => void> {\n const
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import type { AdheseContext } from '@adhese/sdk';\nimport { lazy } from 'react';\n\nexport async function createDevtools(context: AdheseContext): Promise<() => void> {\n const main = await import('./main');\n\n const wrapperElement = document.createElement('div');\n document.body.appendChild(wrapperElement);\n\n const unmount = main.createAdheseDevtools(wrapperElement, context);\n\n return () => {\n unmount();\n wrapperElement.outerHTML = '';\n };\n}\n\n// eslint-disable-next-line ts/naming-convention\nexport const Devtools = lazy(() => import('./Devtools').then(module => ({ default: module.Devtools })));\n"],"names":[],"mappings":";AAGA,eAAsB,eAAe,SAA6C;AAC1E,QAAA,OAAO,MAAM,OAAO,eAAQ;AAE5B,QAAA,iBAAiB,SAAS,cAAc,KAAK;AAC1C,WAAA,KAAK,YAAY,cAAc;AAExC,QAAM,UAAU,KAAK,qBAAqB,gBAAgB,OAAO;AAEjE,SAAO,MAAM;AACH;AACR,mBAAe,YAAY;AAAA,EAAA;AAE/B;AAGO,MAAM,WAAW,KAAK,MAAM,OAAO,eAAY,EAAA,KAAA,OAAA,EAAA,CAAA,EAAE,KAAK,CAAA,YAAW,EAAE,SAAS,OAAO,WAAW,CAAC;"}
|