@zag-js/number-input 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
@@ -220,16 +220,6 @@ function decimalOperation(a, op, b) {
220
220
  }
221
221
  var nf = new Intl.NumberFormat("en-US", { style: "decimal", maximumFractionDigits: 20 });
222
222
 
223
- // ../../types/dist/index.mjs
224
- function createNormalizer(fn) {
225
- return new Proxy({}, {
226
- get() {
227
- return fn;
228
- }
229
- });
230
- }
231
- var normalizeProp = createNormalizer((v) => v);
232
-
233
223
  // ../../utilities/core/dist/index.mjs
234
224
  var isDom = () => typeof window !== "undefined";
235
225
  function getPlatform() {
@@ -381,7 +371,7 @@ var utils = {
381
371
  };
382
372
 
383
373
  // src/number-input.connect.ts
384
- function connect(state, send, normalize = normalizeProp) {
374
+ function connect(state, send, normalize) {
385
375
  const isFocused = state.hasTag("focus");
386
376
  const isInvalid = state.context.isOutOfRange || !!state.context.invalid;
387
377
  const isDisabled = !!state.context.disabled;
package/dist/index.mjs CHANGED
@@ -197,16 +197,6 @@ function decimalOperation(a, op, b) {
197
197
  }
198
198
  var nf = new Intl.NumberFormat("en-US", { style: "decimal", maximumFractionDigits: 20 });
199
199
 
200
- // ../../types/dist/index.mjs
201
- function createNormalizer(fn) {
202
- return new Proxy({}, {
203
- get() {
204
- return fn;
205
- }
206
- });
207
- }
208
- var normalizeProp = createNormalizer((v) => v);
209
-
210
200
  // ../../utilities/core/dist/index.mjs
211
201
  var isDom = () => typeof window !== "undefined";
212
202
  function getPlatform() {
@@ -358,7 +348,7 @@ var utils = {
358
348
  };
359
349
 
360
350
  // src/number-input.connect.ts
361
- function connect(state, send, normalize = normalizeProp) {
351
+ function connect(state, send, normalize) {
362
352
  const isFocused = state.hasTag("focus");
363
353
  const isInvalid = state.context.isOutOfRange || !!state.context.invalid;
364
354
  const isDisabled = !!state.context.disabled;
@@ -1,6 +1,6 @@
1
- import { PropTypes, ReactPropTypes } from "@zag-js/types";
1
+ import type { NormalizeProps, PropTypes } from "@zag-js/types";
2
2
  import { Send, State } from "./number-input.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
  isFocused: boolean;
5
5
  isInvalid: boolean;
6
6
  value: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/number-input",
3
- "version": "0.0.0-dev-20220627213436",
3
+ "version": "0.0.0-dev-20220628115342",
4
4
  "description": "Core logic for the number-input widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -29,10 +29,10 @@
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",
32
+ "@zag-js/core": "0.0.0-dev-20220628115342",
33
+ "@zag-js/dom-utils": "0.0.0-dev-20220628115342",
34
34
  "@zag-js/number-utils": "0.1.2",
35
- "@zag-js/types": "0.2.0",
35
+ "@zag-js/types": "0.0.0-dev-20220628115342",
36
36
  "@zag-js/utils": "0.1.2"
37
37
  },
38
38
  "scripts": {