@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/cjs/index.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require$$0 = require("react");
|
|
4
4
|
async function createDevtools(context) {
|
|
5
|
-
const
|
|
5
|
+
const main = await Promise.resolve().then(() => require("./devtools.js")).then((n) => n.main);
|
|
6
6
|
const wrapperElement = document.createElement("div");
|
|
7
7
|
document.body.appendChild(wrapperElement);
|
|
8
|
-
const unmount =
|
|
8
|
+
const unmount = main.createAdheseDevtools(wrapperElement, context);
|
|
9
9
|
return () => {
|
|
10
10
|
unmount();
|
|
11
11
|
wrapperElement.outerHTML = "";
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
const Devtools = require$$0.lazy(() => Promise.resolve().then(() => require("./devtools.js")).then((module2) => ({ default: module2.Devtools })));
|
|
14
|
+
const Devtools = require$$0.lazy(() => Promise.resolve().then(() => require("./devtools.js")).then((n) => n.Devtools).then((module2) => ({ default: module2.Devtools })));
|
|
15
15
|
exports.Devtools = Devtools;
|
|
16
16
|
exports.createDevtools = createDevtools;
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/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":["lazy","module"],"mappings":";;;AAGA,eAAsB,eAAe,SAA6C;AAC1E,QAAA,OAAO,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA,QAAA,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,WAAWA,WAAA,KAAK,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA,QAAA,eAAY,CAAA,EAAA,KAAA,OAAA,EAAA,QAAA,EAAE,KAAK,CAAAC,aAAW,EAAE,SAASA,QAAO,WAAW,CAAC;;;"}
|
package/dist/es/devtools.js
CHANGED
|
@@ -1641,13 +1641,10 @@ function FronttailSettings({
|
|
|
1641
1641
|
id: `fronttailDebugKey${id}`,
|
|
1642
1642
|
value: fronttailDebugKey,
|
|
1643
1643
|
onChange: onFronttailDebugKeyChange,
|
|
1644
|
-
className: cn(
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
"border-destructive": fronttailDebugKey.length < 4
|
|
1649
|
-
}
|
|
1650
|
-
)
|
|
1644
|
+
className: cn("max-w-60", {
|
|
1645
|
+
// eslint-disable-next-line ts/naming-convention
|
|
1646
|
+
"border-destructive": fronttailDebugKey.length < 4
|
|
1647
|
+
})
|
|
1651
1648
|
}
|
|
1652
1649
|
),
|
|
1653
1650
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1753,6 +1750,10 @@ function Devtools({ adheseContext }) {
|
|
|
1753
1750
|
/* @__PURE__ */ jsxRuntimeExports.jsx(PreviewButton, {})
|
|
1754
1751
|
] }) });
|
|
1755
1752
|
}
|
|
1753
|
+
const Devtools$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1754
|
+
__proto__: null,
|
|
1755
|
+
Devtools
|
|
1756
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1756
1757
|
function createAdheseDevtools(element, context) {
|
|
1757
1758
|
const root = createRoot(element);
|
|
1758
1759
|
root.render(/* @__PURE__ */ jsxRuntimeExports.jsx(Devtools, { adheseContext: context }));
|
|
@@ -1760,8 +1761,12 @@ function createAdheseDevtools(element, context) {
|
|
|
1760
1761
|
root.unmount();
|
|
1761
1762
|
};
|
|
1762
1763
|
}
|
|
1763
|
-
|
|
1764
|
-
|
|
1764
|
+
const main = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1765
|
+
__proto__: null,
|
|
1765
1766
|
createAdheseDevtools
|
|
1767
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1768
|
+
export {
|
|
1769
|
+
Devtools$1 as D,
|
|
1770
|
+
main as m
|
|
1766
1771
|
};
|
|
1767
1772
|
//# sourceMappingURL=devtools.js.map
|