@zag-js/tabs 0.0.0-dev-20220627213436 → 0.0.0-dev-20220628115342

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
@@ -181,16 +181,6 @@ function prevById(v, id, loop = true) {
181
181
  return v[idx];
182
182
  }
183
183
 
184
- // ../../types/dist/index.mjs
185
- function createNormalizer(fn) {
186
- return new Proxy({}, {
187
- get() {
188
- return fn;
189
- }
190
- });
191
- }
192
- var normalizeProp = createNormalizer((v) => v);
193
-
194
184
  // ../../utilities/core/dist/index.mjs
195
185
  var first = (v) => v[0];
196
186
  var last = (v) => v[v.length - 1];
@@ -278,7 +268,7 @@ var dom = {
278
268
  };
279
269
 
280
270
  // src/tabs.connect.ts
281
- function connect(state, send, normalize = normalizeProp) {
271
+ function connect(state, send, normalize) {
282
272
  const messages = state.context.messages;
283
273
  const isFocused = state.matches("focused");
284
274
  return {
package/dist/index.mjs CHANGED
@@ -158,16 +158,6 @@ function prevById(v, id, loop = true) {
158
158
  return v[idx];
159
159
  }
160
160
 
161
- // ../../types/dist/index.mjs
162
- function createNormalizer(fn) {
163
- return new Proxy({}, {
164
- get() {
165
- return fn;
166
- }
167
- });
168
- }
169
- var normalizeProp = createNormalizer((v) => v);
170
-
171
161
  // ../../utilities/core/dist/index.mjs
172
162
  var first = (v) => v[0];
173
163
  var last = (v) => v[v.length - 1];
@@ -255,7 +245,7 @@ var dom = {
255
245
  };
256
246
 
257
247
  // src/tabs.connect.ts
258
- function connect(state, send, normalize = normalizeProp) {
248
+ function connect(state, send, normalize) {
259
249
  const messages = state.context.messages;
260
250
  const isFocused = state.matches("focused");
261
251
  return {
@@ -1,6 +1,6 @@
1
- import { PropTypes, ReactPropTypes } from "@zag-js/types";
1
+ import type { NormalizeProps, PropTypes } from "@zag-js/types";
2
2
  import type { Send, State, TabProps } from "./tabs.types";
3
- export declare function connect<T extends PropTypes = ReactPropTypes>(state: State, send: Send, normalize?: import("@zag-js/types").NormalizeProps): {
3
+ export declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
4
4
  value: string;
5
5
  focusedValue: string;
6
6
  previousValues: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "0.0.0-dev-20220627213436",
3
+ "version": "0.0.0-dev-20220628115342",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -29,9 +29,9 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/core": "0.0.0-dev-20220627213436",
33
- "@zag-js/dom-utils": "0.0.0-dev-20220627213436",
34
- "@zag-js/types": "0.2.0",
32
+ "@zag-js/core": "0.0.0-dev-20220628115342",
33
+ "@zag-js/dom-utils": "0.0.0-dev-20220628115342",
34
+ "@zag-js/types": "0.0.0-dev-20220628115342",
35
35
  "@zag-js/utils": "0.1.2"
36
36
  },
37
37
  "scripts": {