@glasshome/widget-sdk 1.23.1 → 1.24.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/host/index.d.ts +1 -1
- package/dist/host/index.js +10 -7
- package/dist/host/instantiate-widget.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/host/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { instantiateWidget, type MountOptions, type WidgetInstanceHandle, } from "./instantiate-widget";
|
|
1
|
+
export { delegateInside, instantiateWidget, type MountOptions, type WidgetInstanceHandle, } from "./instantiate-widget";
|
package/dist/host/index.js
CHANGED
|
@@ -32,14 +32,17 @@ if (typeof document < "u") {
|
|
|
32
32
|
i(e);
|
|
33
33
|
for (let t of e) document.addEventListener(t, h);
|
|
34
34
|
}
|
|
35
|
-
function g(e) {
|
|
35
|
+
function g(e, t = /* @__PURE__ */ new Set()) {
|
|
36
36
|
if (e.mode !== "closed") return () => {};
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
let a = [...n], o = {
|
|
38
|
+
addEventListener: (n, r) => e.addEventListener(n, r, { passive: t.has(n) }),
|
|
39
|
+
removeEventListener: (t, n) => e.removeEventListener(t, n)
|
|
40
|
+
};
|
|
41
|
+
i(a, o);
|
|
42
|
+
for (let t of a) e.addEventListener(t, h);
|
|
40
43
|
return () => {
|
|
41
|
-
r(
|
|
42
|
-
for (let
|
|
44
|
+
r(o);
|
|
45
|
+
for (let t of a) e.removeEventListener(t, h);
|
|
43
46
|
};
|
|
44
47
|
}
|
|
45
48
|
function _(n, r) {
|
|
@@ -66,4 +69,4 @@ function _(n, r) {
|
|
|
66
69
|
} };
|
|
67
70
|
}
|
|
68
71
|
//#endregion
|
|
69
|
-
export { _ as instantiateWidget };
|
|
72
|
+
export { g as delegateInside, _ as instantiateWidget };
|
|
@@ -28,6 +28,11 @@ export interface MountOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
mirrorClasses?: string[];
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Solid handlers inside a closed root run; anything a host renders into one it owns needs this.
|
|
33
|
+
* Event types in `passive` are listened to passively, so they never hold up scrolling.
|
|
34
|
+
*/
|
|
35
|
+
export declare function delegateInside(shadow: ShadowRoot, passive?: ReadonlySet<string>): () => void;
|
|
31
36
|
/**
|
|
32
37
|
* Mount a widget into a closed shadow root on `host`.
|
|
33
38
|
*
|
package/dist/index.js
CHANGED
|
@@ -3136,7 +3136,7 @@ function Co() {
|
|
|
3136
3136
|
//#region src/version.ts
|
|
3137
3137
|
var wo = {
|
|
3138
3138
|
name: "@glasshome/widget-sdk",
|
|
3139
|
-
version: "1.
|
|
3139
|
+
version: "1.24.0",
|
|
3140
3140
|
description: "SDK for building GlassHome dashboard widgets with SolidJS",
|
|
3141
3141
|
keywords: [
|
|
3142
3142
|
"dashboard",
|