@zag-js/toast 0.0.0-dev-20220709181637 → 0.0.0-dev-20220712092426

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/index.js CHANGED
@@ -109,7 +109,8 @@ function defineDomHelpers(domUtils) {
109
109
  var _a;
110
110
  return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
111
111
  },
112
- getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
112
+ getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
113
+ getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
113
114
  };
114
115
  return __spreadValues2(__spreadValues2({}, roots), domUtils);
115
116
  }
package/dist/index.mjs CHANGED
@@ -83,7 +83,8 @@ function defineDomHelpers(domUtils) {
83
83
  var _a;
84
84
  return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
85
85
  },
86
- getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
86
+ getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
87
+ getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
87
88
  };
88
89
  return __spreadValues2(__spreadValues2({}, roots), domUtils);
89
90
  }
@@ -12,6 +12,9 @@ export declare const dom: {
12
12
  getActiveElement: (ctx: {
13
13
  getRootNode?: () => Node | Document | ShadowRoot;
14
14
  }) => HTMLElement;
15
+ getById: (ctx: {
16
+ getRootNode?: () => Node | Document | ShadowRoot;
17
+ }, id: string) => HTMLElement;
15
18
  } & {
16
19
  getGroupId: (placement: Placement) => string;
17
20
  getContainerId: (ctx: Ctx) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/toast",
3
- "version": "0.0.0-dev-20220709181637",
3
+ "version": "0.0.0-dev-20220712092426",
4
4
  "description": "Core logic for the toast widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -29,9 +29,11 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/core": "0.1.7",
33
- "@zag-js/dom-utils": "0.0.0-dev-20220709181637",
34
- "@zag-js/types": "0.0.0-dev-20220709181637",
32
+ "@zag-js/core": "0.0.0-dev-20220712092426",
33
+ "@zag-js/types": "0.0.0-dev-20220712092426"
34
+ },
35
+ "devDependencies": {
36
+ "@zag-js/dom-utils": "0.0.0-dev-20220712092426",
35
37
  "@zag-js/utils": "0.1.2"
36
38
  },
37
39
  "scripts": {