@adhese/sdk-devtools 0.11.0 → 0.11.2
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/CHANGELOG.md +18 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @adhese/sdk-devtools
|
|
2
2
|
|
|
3
|
+
## 0.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a4b013d]
|
|
8
|
+
- Updated dependencies [696b4ea]
|
|
9
|
+
- @adhese/sdk-shared@0.7.0
|
|
10
|
+
|
|
11
|
+
## 0.11.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- ef68972: Add hooks to context instead of global variable which could break when adhese was disposed
|
|
16
|
+
- Updated dependencies [2c01e34]
|
|
17
|
+
- Updated dependencies [ad9b38f]
|
|
18
|
+
- Updated dependencies [ef68972]
|
|
19
|
+
- @adhese/sdk-shared@0.6.0
|
|
20
|
+
|
|
3
21
|
## 0.11.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const sdkShared = require("@adhese/sdk-shared");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const devtoolsPlugin = (context, {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
hooks: {
|
|
7
|
+
onInit,
|
|
8
|
+
onDispose
|
|
9
|
+
}
|
|
8
10
|
}) => {
|
|
9
11
|
const wrapperElement = document.createElement("div");
|
|
10
12
|
let unmount;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { AdheseContext, AdhesePlugin } from '@adhese/sdk';\nimport { watch } from '@adhese/sdk-shared';\nimport { lazy } from 'react';\n\nexport const devtoolsPlugin: AdhesePlugin = (context: AdheseContext, {\n onInit,\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { AdheseContext, AdhesePlugin } from '@adhese/sdk';\nimport { watch } from '@adhese/sdk-shared';\nimport { lazy } from 'react';\n\nexport const devtoolsPlugin: AdhesePlugin = (context: AdheseContext, {\n hooks: {\n onInit,\n onDispose,\n },\n}) => {\n const wrapperElement = document.createElement('div');\n let unmount: (() => void) | undefined;\n\n async function initDevtools(): Promise<void> {\n const main = await import('./main');\n\n if (!unmount) {\n document.body.appendChild(wrapperElement);\n\n unmount = main.createAdheseDevtools(wrapperElement, context);\n }\n }\n\n onInit(() => {\n watch(() => [context.debug, context.isDisposed], async ([debug, isDisposed]) => {\n if (debug && !isDisposed) {\n await initDevtools();\n\n if (context.isDisposed)\n dispose();\n }\n else {\n dispose();\n }\n }, {\n immediate: true,\n });\n });\n\n function dispose(): void {\n unmount?.();\n unmount = undefined;\n if (wrapperElement.parentElement)\n wrapperElement.outerHTML = '';\n }\n\n onDispose(dispose);\n};\n\n// eslint-disable-next-line ts/naming-convention\nexport const Devtools = lazy(() => import('./Devtools').then(module => ({ default: module.Devtools })));\n"],"names":["watch","lazy","module"],"mappings":";;;;AAIa,MAAA,iBAA+B,CAAC,SAAwB;AAAA,EACnE,OAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF,MAAM;AACE,QAAA,iBAAiB,SAAS,cAAc,KAAK;AAC/C,MAAA;AAEJ,iBAAe,eAA8B;AACrC,UAAA,OAAO,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA,QAAA,yBAAQ;AAElC,QAAI,CAAC,SAAS;AACH,eAAA,KAAK,YAAY,cAAc;AAE9B,gBAAA,KAAK,qBAAqB,gBAAgB,OAAO;AAAA,IAC7D;AAAA,EACF;AAEA,SAAO,MAAM;AACLA,oBAAA,MAAM,CAAC,QAAQ,OAAO,QAAQ,UAAU,GAAG,OAAO,CAAC,OAAO,UAAU,MAAM;AAC1E,UAAA,SAAS,CAAC,YAAY;AACxB,cAAM,aAAa;AAEnB,YAAI,QAAQ;AACF;MAAA,OAEP;AACK;MACV;AAAA,IAAA,GACC;AAAA,MACD,WAAW;AAAA,IAAA,CACZ;AAAA,EAAA,CACF;AAED,WAAS,UAAgB;AACb;AACA,cAAA;AACV,QAAI,eAAe;AACjB,qBAAe,YAAY;AAAA,EAC/B;AAEA,YAAU,OAAO;AACnB;AAGO,MAAM,WAAWC,MAAA,KAAK,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA,QAAA,yBAAY,CAAA,EAAA,KAAA,OAAA,EAAA,QAAA,EAAE,KAAK,CAAAC,aAAW,EAAE,SAASA,QAAO,WAAW,CAAC;;;"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { AdheseContext, AdhesePlugin } from '@adhese/sdk';\nimport { watch } from '@adhese/sdk-shared';\nimport { lazy } from 'react';\n\nexport const devtoolsPlugin: AdhesePlugin = (context: AdheseContext, {\n onInit,\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { AdheseContext, AdhesePlugin } from '@adhese/sdk';\nimport { watch } from '@adhese/sdk-shared';\nimport { lazy } from 'react';\n\nexport const devtoolsPlugin: AdhesePlugin = (context: AdheseContext, {\n hooks: {\n onInit,\n onDispose,\n },\n}) => {\n const wrapperElement = document.createElement('div');\n let unmount: (() => void) | undefined;\n\n async function initDevtools(): Promise<void> {\n const main = await import('./main');\n\n if (!unmount) {\n document.body.appendChild(wrapperElement);\n\n unmount = main.createAdheseDevtools(wrapperElement, context);\n }\n }\n\n onInit(() => {\n watch(() => [context.debug, context.isDisposed], async ([debug, isDisposed]) => {\n if (debug && !isDisposed) {\n await initDevtools();\n\n if (context.isDisposed)\n dispose();\n }\n else {\n dispose();\n }\n }, {\n immediate: true,\n });\n });\n\n function dispose(): void {\n unmount?.();\n unmount = undefined;\n if (wrapperElement.parentElement)\n wrapperElement.outerHTML = '';\n }\n\n onDispose(dispose);\n};\n\n// eslint-disable-next-line ts/naming-convention\nexport const Devtools = lazy(() => import('./Devtools').then(module => ({ default: module.Devtools })));\n"],"names":[],"mappings":";;AAIa,MAAA,iBAA+B,CAAC,SAAwB;AAAA,EACnE,OAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF,MAAM;AACE,QAAA,iBAAiB,SAAS,cAAc,KAAK;AAC/C,MAAA;AAEJ,iBAAe,eAA8B;AACrC,UAAA,OAAO,MAAM,OAAO,wBAAQ;AAElC,QAAI,CAAC,SAAS;AACH,eAAA,KAAK,YAAY,cAAc;AAE9B,gBAAA,KAAK,qBAAqB,gBAAgB,OAAO;AAAA,IAC7D;AAAA,EACF;AAEA,SAAO,MAAM;AACL,UAAA,MAAM,CAAC,QAAQ,OAAO,QAAQ,UAAU,GAAG,OAAO,CAAC,OAAO,UAAU,MAAM;AAC1E,UAAA,SAAS,CAAC,YAAY;AACxB,cAAM,aAAa;AAEnB,YAAI,QAAQ;AACF;MAAA,OAEP;AACK;MACV;AAAA,IAAA,GACC;AAAA,MACD,WAAW;AAAA,IAAA,CACZ;AAAA,EAAA,CACF;AAED,WAAS,UAAgB;AACb;AACA,cAAA;AACV,QAAI,eAAe;AACjB,qBAAe,YAAY;AAAA,EAC/B;AAEA,YAAU,OAAO;AACnB;AAGO,MAAM,WAAW,KAAK,MAAM,OAAO,wBAAY,EAAA,KAAA,OAAA,EAAA,CAAA,EAAE,KAAK,CAAA,YAAW,EAAE,SAAS,OAAO,WAAW,CAAC;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhese/sdk-devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.2",
|
|
5
5
|
"description": "Adhese SDK Devtools",
|
|
6
6
|
"license": "GPL-3.0",
|
|
7
7
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"react-dom": ">=16.13"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@adhese/sdk-shared": "^0.
|
|
34
|
+
"@adhese/sdk-shared": "^0.7.0",
|
|
35
35
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
36
36
|
"@radix-ui/react-icons": "^1.3.0",
|
|
37
37
|
"@radix-ui/react-label": "^2.0.2",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"tailwindcss-animate": "^1.0.7"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@types/react": "^18.3.
|
|
48
|
+
"@types/react": "^18.3.2",
|
|
49
49
|
"@types/react-dom": "^18.3.0",
|
|
50
50
|
"react": "^18.3.1",
|
|
51
51
|
"react-dom": "^18.3.1"
|