@zag-js/number-input 0.1.7 → 0.1.8

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.mjs CHANGED
@@ -108,17 +108,6 @@ function getNativeEvent(event) {
108
108
  var _a;
109
109
  return (_a = event.nativeEvent) != null ? _a : event;
110
110
  }
111
- var PAGE_KEYS = /* @__PURE__ */ new Set(["PageUp", "PageDown"]);
112
- var ARROW_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
113
- function getEventStep(event) {
114
- if (event.ctrlKey || event.metaKey) {
115
- return 0.1;
116
- } else {
117
- const isPageKey = PAGE_KEYS.has(event.key);
118
- const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.has(event.key);
119
- return isSkipKey ? 10 : 1;
120
- }
121
- }
122
111
  function observeAttributes(node, attributes, fn) {
123
112
  if (!node)
124
113
  return noop;
@@ -134,6 +123,17 @@ function observeAttributes(node, attributes, fn) {
134
123
  obs.observe(node, { attributes: true, attributeFilter: attrs });
135
124
  return () => obs.disconnect();
136
125
  }
126
+ var PAGE_KEYS = /* @__PURE__ */ new Set(["PageUp", "PageDown"]);
127
+ var ARROW_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
128
+ function getEventStep(event) {
129
+ if (event.ctrlKey || event.metaKey) {
130
+ return 0.1;
131
+ } else {
132
+ const isPageKey = PAGE_KEYS.has(event.key);
133
+ const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.has(event.key);
134
+ return isSkipKey ? 10 : 1;
135
+ }
136
+ }
137
137
  function itemById(v, id) {
138
138
  return v.find((node) => node.id === id);
139
139
  }
@@ -304,7 +304,11 @@ function getEventPoint(e, t2 = "page") {
304
304
 
305
305
  // ../../types/dist/index.mjs
306
306
  function createNormalizer(fn) {
307
- return { button: fn, label: fn, input: fn, output: fn, element: fn };
307
+ return new Proxy({}, {
308
+ get() {
309
+ return fn;
310
+ }
311
+ });
308
312
  }
309
313
  var normalizeProp = createNormalizer((v) => v);
310
314