@zag-js/splitter 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
@@ -108,7 +108,8 @@ function defineDomHelpers(domUtils) {
108
108
  var _a;
109
109
  return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
110
110
  },
111
- getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
111
+ getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
112
+ getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
112
113
  };
113
114
  return __spreadValues2(__spreadValues2({}, roots), domUtils);
114
115
  }
package/dist/index.mjs CHANGED
@@ -84,7 +84,8 @@ function defineDomHelpers(domUtils) {
84
84
  var _a;
85
85
  return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
86
86
  },
87
- getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
87
+ getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
88
+ getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
88
89
  };
89
90
  return __spreadValues2(__spreadValues2({}, roots), domUtils);
90
91
  }
@@ -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
  getRootId: (ctx: Ctx) => string;
17
20
  getSplitterId: (ctx: Ctx) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/splitter",
3
- "version": "0.0.0-dev-20220709181637",
3
+ "version": "0.0.0-dev-20220712092426",
4
4
  "description": "Core logic for the splitter widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -30,10 +30,12 @@
30
30
  "url": "https://github.com/chakra-ui/zag/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@zag-js/core": "0.1.7",
34
- "@zag-js/dom-utils": "0.0.0-dev-20220709181637",
35
- "@zag-js/number-utils": "0.1.2",
36
- "@zag-js/types": "0.0.0-dev-20220709181637"
33
+ "@zag-js/core": "0.0.0-dev-20220712092426",
34
+ "@zag-js/types": "0.0.0-dev-20220712092426"
35
+ },
36
+ "devDependencies": {
37
+ "@zag-js/dom-utils": "0.0.0-dev-20220712092426",
38
+ "@zag-js/number-utils": "0.1.2"
37
39
  },
38
40
  "scripts": {
39
41
  "build:fast": "zag build",