numora-react 2.0.5 → 3.0.1

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/README.md CHANGED
@@ -11,10 +11,10 @@ React component wrapper for [Numora](https://github.com/Sharqiewicz/numora) - a
11
11
  |---------|-------------|
12
12
  | **React Component** | Drop-in replacement for `<input>` with numeric formatting |
13
13
  | **Decimal Precision Control** | Configure maximum decimal places with `maxDecimals` prop |
14
- | **Thousand Separators** | Customizable thousand separators with `thousandsSeparator` prop |
14
+ | **Thousand Separators** | Customizable thousand separators with `thousandSeparator` prop |
15
15
  | **Grouping Styles** | Support for different grouping styles (`thousand`, `lakh`, `wan`) |
16
16
  | **Format on Blur/Change** | Choose when to apply formatting: on blur or on change |
17
- | **Compact Notation Expansion** | When enabled via `shorthandParsing`, expands compact notation during paste (e.g., `"1k"` → `"1000"`, `"1.5m"` → `"1500000"`) |
17
+ | **Compact Notation Expansion** | When enabled via `enableCompactNotation`, expands compact notation during paste (e.g., `"1k"` → `"1000"`, `"1.5m"` → `"1500000"`) |
18
18
  | **Scientific Notation Expansion** | Always automatically expands scientific notation (e.g., `"1.5e-7"` → `"0.00000015"`, `"2e+5"` → `"200000"`) |
19
19
  | **Paste Event Handling** | Intelligent paste handling with automatic sanitization, formatting, and cursor positioning |
20
20
  | **Cursor Position Preservation** | Smart cursor positioning that works with thousand separators, even during formatting |
@@ -22,7 +22,7 @@ React component wrapper for [Numora](https://github.com/Sharqiewicz/numora) - a
22
22
  | **Mobile Keyboard Optimization** | Automatic `inputmode="decimal"` for mobile numeric keyboards |
23
23
  | **Mobile Keyboard Filtering** | Automatically filters non-breaking spaces and Unicode whitespace artifacts from mobile keyboards |
24
24
  | **Non-numeric Character Filtering** | Automatic removal of invalid characters |
25
- | **Comma/Dot Conversion** | When `thousandsGroupStyle` is not set (or `None`), typing comma or dot automatically converts to the configured decimal separator |
25
+ | **Comma/Dot Conversion** | When `thousandStyle` is not set (or `None`), typing comma or dot automatically converts to the configured decimal separator |
26
26
  | **TypeScript Support** | Full TypeScript definitions included |
27
27
  | **Ref Forwarding** | Supports React ref forwarding for direct input access |
28
28
  | **Standard Input Props** | Accepts all standard HTMLInputElement props |
@@ -67,11 +67,11 @@ pnpm add numora-react
67
67
  ### Basic Example
68
68
 
69
69
  ```tsx
70
- import { NumericInput } from 'numora-react';
70
+ import { NumoraInput } from 'numora-react';
71
71
 
72
72
  function App() {
73
73
  return (
74
- <NumericInput
74
+ <NumoraInput
75
75
  maxDecimals={2}
76
76
  onChange={(e) => {
77
77
  console.log('Value:', e.target.value);
@@ -84,20 +84,20 @@ function App() {
84
84
  ### Advanced Example
85
85
 
86
86
  ```tsx
87
- import { NumericInput } from 'numora-react';
87
+ import { NumoraInput } from 'numora-react';
88
88
  import { useRef } from 'react';
89
89
 
90
90
  function PaymentForm() {
91
91
  const inputRef = useRef<HTMLInputElement>(null);
92
92
 
93
93
  return (
94
- <NumericInput
94
+ <NumoraInput
95
95
  ref={inputRef}
96
96
  maxDecimals={18}
97
97
  formatOn="change"
98
- thousandsSeparator=","
99
- thousandsGroupStyle="thousand"
100
- shorthandParsing={true} // Enable compact notation expansion on paste
98
+ thousandSeparator=","
99
+ thousandStyle="thousand"
100
+ enableCompactNotation={true} // Enable compact notation expansion on paste
101
101
  placeholder="Enter amount"
102
102
  className="payment-input"
103
103
  onChange={(e) => {
@@ -118,13 +118,13 @@ function PaymentForm() {
118
118
  ### Compact Notation Example
119
119
 
120
120
  ```tsx
121
- import { NumericInput } from 'numora-react';
121
+ import { NumoraInput } from 'numora-react';
122
122
 
123
123
  function App() {
124
124
  return (
125
- <NumericInput
125
+ <NumoraInput
126
126
  maxDecimals={18}
127
- shorthandParsing={true} // Enable compact notation expansion
127
+ enableCompactNotation={true} // Enable compact notation expansion
128
128
  onChange={(e) => {
129
129
  console.log('Value:', e.target.value);
130
130
  }}
@@ -139,11 +139,11 @@ function App() {
139
139
  ### Scientific Notation Example
140
140
 
141
141
  ```tsx
142
- import { NumericInput } from 'numora-react';
142
+ import { NumoraInput } from 'numora-react';
143
143
 
144
144
  function App() {
145
145
  return (
146
- <NumericInput
146
+ <NumoraInput
147
147
  maxDecimals={18}
148
148
  onChange={(e) => {
149
149
  console.log('Value:', e.target.value);
@@ -163,17 +163,17 @@ function App() {
163
163
 
164
164
  ```tsx
165
165
  import { useForm } from 'react-hook-form';
166
- import { NumericInput } from 'numora-react';
166
+ import { NumoraInput } from 'numora-react';
167
167
 
168
168
  function Form() {
169
169
  const { register, handleSubmit } = useForm();
170
170
 
171
171
  return (
172
172
  <form onSubmit={handleSubmit((data) => console.log(data))}>
173
- <NumericInput
173
+ <NumoraInput
174
174
  {...register('amount')}
175
175
  maxDecimals={2}
176
- thousandsSeparator=","
176
+ thousandSeparator=","
177
177
  />
178
178
  <button type="submit">Submit</button>
179
179
  </form>
@@ -185,7 +185,7 @@ function Form() {
185
185
 
186
186
  ```tsx
187
187
  import { useFormik } from 'formik';
188
- import { NumericInput } from 'numora-react';
188
+ import { NumoraInput } from 'numora-react';
189
189
 
190
190
  function Form() {
191
191
  const formik = useFormik({
@@ -197,13 +197,13 @@ function Form() {
197
197
 
198
198
  return (
199
199
  <form onSubmit={formik.handleSubmit}>
200
- <NumericInput
200
+ <NumoraInput
201
201
  name="amount"
202
202
  value={formik.values.amount}
203
203
  onChange={formik.handleChange}
204
204
  onBlur={formik.handleBlur}
205
205
  maxDecimals={2}
206
- thousandsSeparator=","
206
+ thousandSeparator=","
207
207
  />
208
208
  <button type="submit">Submit</button>
209
209
  </form>
@@ -214,18 +214,18 @@ function Form() {
214
214
  ### Controlled Component
215
215
 
216
216
  ```tsx
217
- import { NumericInput } from 'numora-react';
217
+ import { NumoraInput } from 'numora-react';
218
218
  import { useState } from 'react';
219
219
 
220
220
  function ControlledInput() {
221
221
  const [value, setValue] = useState('');
222
222
 
223
223
  return (
224
- <NumericInput
224
+ <NumoraInput
225
225
  value={value}
226
226
  onChange={(e) => setValue(e.target.value)}
227
227
  maxDecimals={2}
228
- thousandsSeparator=","
228
+ thousandSeparator=","
229
229
  />
230
230
  );
231
231
  }
@@ -234,7 +234,7 @@ function ControlledInput() {
234
234
  ### Uncontrolled Component
235
235
 
236
236
  ```tsx
237
- import { NumericInput } from 'numora-react';
237
+ import { NumoraInput } from 'numora-react';
238
238
  import { useRef } from 'react';
239
239
 
240
240
  function UncontrolledInput() {
@@ -247,10 +247,10 @@ function UncontrolledInput() {
247
247
 
248
248
  return (
249
249
  <>
250
- <NumericInput
250
+ <NumoraInput
251
251
  ref={inputRef}
252
252
  maxDecimals={2}
253
- thousandsSeparator=","
253
+ thousandSeparator=","
254
254
  />
255
255
  <button onClick={handleSubmit}>Get Value</button>
256
256
  </>
@@ -264,9 +264,9 @@ function UncontrolledInput() {
264
264
  |------|------|---------|-------------|
265
265
  | `maxDecimals` | `number` | `2` | Maximum number of decimal places allowed |
266
266
  | `formatOn` | `'blur' \| 'change'` | `'blur'` | When to apply formatting: `'blur'` or `'change'` |
267
- | `thousandsSeparator` | `string` | `','` | Character used as thousand separator |
268
- | `thousandsGroupStyle` | `'thousand' \| 'lakh' \| 'wan'` | `'thousand'` | Grouping style for thousand separators |
269
- | `shorthandParsing` | `boolean` | `false` | Enable compact notation expansion (e.g., `"1k"` → `"1000"`) on paste |
267
+ | `thousandSeparator` | `string` | `','` | Character used as thousand separator |
268
+ | `thousandStyle` | `'thousand' \| 'lakh' \| 'wan'` | `'thousand'` | Grouping style for thousand separators |
269
+ | `enableCompactNotation` | `boolean` | `false` | Enable compact notation expansion (e.g., `"1k"` → `"1000"`) on paste |
270
270
  | `onChange` | `(e: ChangeEvent<HTMLInputElement> \| ClipboardEvent<HTMLInputElement>) => void` | `undefined` | Callback when value changes |
271
271
  | `additionalStyle` | `string` | `undefined` | Additional CSS styles (deprecated, use `style` prop) |
272
272
 
@@ -278,7 +278,7 @@ All standard HTMLInputElement props are also supported (e.g., `placeholder`, `cl
278
278
 
279
279
  ## API Reference
280
280
 
281
- ### NumericInput
281
+ ### NumoraInput
282
282
 
283
283
  A React component that wraps the core Numora functionality in a React-friendly API.
284
284
 
@@ -291,14 +291,14 @@ A React component that wraps the core Numora functionality in a React-friendly A
291
291
  Full TypeScript support is included. The component is typed with proper interfaces:
292
292
 
293
293
  ```tsx
294
- import { NumericInput } from 'numora-react';
294
+ import { NumoraInput } from 'numora-react';
295
295
 
296
296
  // All props are fully typed
297
297
  const input = (
298
- <NumericInput
298
+ <NumoraInput
299
299
  maxDecimals={18} // ✅ TypeScript knows this is a number
300
300
  formatOn="change" // ✅ TypeScript knows valid values
301
- shorthandParsing={true} // ✅ TypeScript knows this is boolean
301
+ enableCompactNotation={true} // ✅ TypeScript knows this is boolean
302
302
  onChange={(e) => {
303
303
  // ✅ e is properly typed as ChangeEvent<HTMLInputElement>
304
304
  console.log(e.target.value);
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { FormatOn, ThousandStyle } from 'numora';
3
- interface NumoraInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'type' | 'inputMode'> {
3
+ export interface NumoraInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'type' | 'inputMode'> {
4
4
  maxDecimals?: number;
5
- onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ClipboardEvent<HTMLInputElement>) => void;
5
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
6
6
  formatOn?: FormatOn;
7
7
  thousandSeparator?: string;
8
8
  thousandStyle?: ThousandStyle;
package/dist/index.js CHANGED
@@ -447,10 +447,8 @@ function handleNumoraOnKeyDown(e, formattingOptions) {
447
447
  return numora.handleOnKeyDownNumoraInput(e.nativeEvent, formattingOptions);
448
448
  }
449
449
  function handleNumoraOnBlur(e, options) {
450
- // If formatOn is blur, format the value using the pure formatting utility
451
450
  if (options.formattingOptions.formatOn === numora.FormatOn.Blur) {
452
- const { formatted, raw } = numora.formatValue(e.target.value, options.decimalMaxLength, { ...options.formattingOptions, formatOn: numora.FormatOn.Change });
453
- e.target.value = formatted;
451
+ const { formatted, raw } = numora.formatValueForDisplay(e.target.value, options.decimalMaxLength, { ...options.formattingOptions, formatOn: numora.FormatOn.Change });
454
452
  return {
455
453
  value: formatted,
456
454
  rawValue: raw,
@@ -464,8 +462,9 @@ function handleNumoraOnBlur(e, options) {
464
462
 
465
463
  const NumoraInput = require$$0.forwardRef((props, ref) => {
466
464
  const { maxDecimals = 2, onChange, onPaste, onBlur, onKeyDown, formatOn = numora.FormatOn.Blur, thousandSeparator = ',', thousandStyle = numora.ThousandStyle.Thousand, decimalSeparator = '.', decimalMinLength, enableCompactNotation = false, enableNegative = false, enableLeadingZeros = false, rawValueMode = false, value: controlledValue, defaultValue, ...rest } = props;
467
- const inputRef = require$$0.useRef(null);
465
+ const internalInputRef = require$$0.useRef(null);
468
466
  const caretInfoRef = require$$0.useRef(undefined);
467
+ const lastCaretPosRef = require$$0.useRef(null);
469
468
  const formattingOptions = {
470
469
  formatOn,
471
470
  thousandSeparator,
@@ -477,96 +476,119 @@ const NumoraInput = require$$0.forwardRef((props, ref) => {
477
476
  enableLeadingZeros,
478
477
  rawValueMode,
479
478
  };
480
- const getFormattedDefaultValue = () => {
481
- if (defaultValue !== undefined) {
482
- const { formatted } = numora.formatValue(String(defaultValue), maxDecimals, formattingOptions);
479
+ const getInitialValue = () => {
480
+ const valueToFormat = controlledValue !== undefined ? controlledValue : defaultValue;
481
+ if (valueToFormat !== undefined) {
482
+ const { formatted } = numora.formatValueForDisplay(String(valueToFormat), maxDecimals, formattingOptions);
483
483
  return formatted;
484
484
  }
485
485
  return '';
486
486
  };
487
- const getInitialControlledValue = () => {
488
- if (controlledValue !== undefined) {
489
- const { formatted } = numora.formatValue(String(controlledValue), maxDecimals, formattingOptions);
490
- return formatted;
487
+ const [displayValue, setDisplayValue] = require$$0.useState(getInitialValue);
488
+ // Sync external ref with internal ref
489
+ require$$0.useLayoutEffect(() => {
490
+ if (!ref)
491
+ return;
492
+ if (typeof ref === 'function') {
493
+ ref(internalInputRef.current);
491
494
  }
492
- return '';
493
- };
494
- const [internalValue, setInternalValue] = require$$0.useState(getInitialControlledValue);
495
- require$$0.useImperativeHandle(ref, () => inputRef.current, []);
496
- // When controlled value changes, normalize/format it for display
495
+ else {
496
+ ref.current = internalInputRef.current;
497
+ }
498
+ }, [ref]);
499
+ // When controlled value changes from outside, update display value
497
500
  require$$0.useEffect(() => {
498
501
  if (controlledValue !== undefined) {
499
- const { formatted } = numora.formatValue(String(controlledValue), maxDecimals, formattingOptions);
500
- setInternalValue(formatted);
501
- }
502
- }, [controlledValue, maxDecimals, formatOn, thousandSeparator, thousandStyle, decimalSeparator, decimalMinLength, enableCompactNotation, enableNegative, enableLeadingZeros, rawValueMode]);
503
- const isControlled = controlledValue !== undefined;
504
- const updateValue = (value) => {
505
- if (isControlled) {
506
- setInternalValue(value);
502
+ const { formatted } = numora.formatValueForDisplay(String(controlledValue), maxDecimals, formattingOptions);
503
+ if (formatted !== displayValue) {
504
+ setDisplayValue(formatted);
505
+ }
507
506
  }
508
- };
509
- const syncEventValue = (target, formattedValue, rawValue) => {
510
- Object.defineProperty(target, 'value', {
511
- writable: true,
512
- value: formattedValue,
513
- });
514
- if (rawValue !== undefined) {
515
- Object.defineProperty(target, 'rawValue', {
516
- writable: true,
517
- value: rawValue,
518
- enumerable: true,
519
- configurable: true,
520
- });
507
+ }, [controlledValue, maxDecimals, formattingOptions]);
508
+ // Restore cursor position after render
509
+ require$$0.useLayoutEffect(() => {
510
+ if (internalInputRef.current && lastCaretPosRef.current !== null) {
511
+ const input = internalInputRef.current;
512
+ const pos = lastCaretPosRef.current;
513
+ input.setSelectionRange(pos, pos);
514
+ lastCaretPosRef.current = null;
521
515
  }
522
- };
523
- const handleChange = (e) => {
516
+ });
517
+ const handleChange = require$$0.useCallback((e) => {
524
518
  const { value, rawValue } = handleNumoraOnChange(e, {
525
519
  decimalMaxLength: maxDecimals,
526
520
  caretPositionBeforeChange: caretInfoRef.current,
527
521
  formattingOptions,
528
522
  });
523
+ // Store cursor position AFTER core library has calculated and set it
524
+ // The core library modifies the DOM element directly during handleNumoraOnChange
525
+ // Read from the input ref (which is the same element) to get the position set by the core library
526
+ if (internalInputRef.current) {
527
+ const cursorPos = internalInputRef.current.selectionStart;
528
+ if (cursorPos !== null && cursorPos !== undefined) {
529
+ lastCaretPosRef.current = cursorPos;
530
+ }
531
+ }
529
532
  caretInfoRef.current = undefined;
530
- syncEventValue(e.target, value, rawValue);
531
- updateValue(value);
533
+ // Add rawValue to the event object without overriding 'value' property
534
+ e.target.rawValue = rawValue;
535
+ setDisplayValue(value);
532
536
  if (onChange) {
533
537
  onChange(e);
534
538
  }
535
- };
536
- const handlePaste = (e) => {
539
+ }, [maxDecimals, formattingOptions, onChange]);
540
+ const handleKeyDown = require$$0.useCallback((e) => {
541
+ const coreCaretInfo = handleNumoraOnKeyDown(e, formattingOptions);
542
+ // Always capture cursor position info, even if core library doesn't return it
543
+ // This is needed for cursor position calculation during normal typing (not just Delete/Backspace)
544
+ if (!coreCaretInfo && internalInputRef.current) {
545
+ const selectionStart = internalInputRef.current.selectionStart ?? 0;
546
+ const selectionEnd = internalInputRef.current.selectionEnd ?? 0;
547
+ caretInfoRef.current = {
548
+ selectionStart,
549
+ selectionEnd,
550
+ };
551
+ }
552
+ else {
553
+ caretInfoRef.current = coreCaretInfo;
554
+ }
555
+ if (onKeyDown) {
556
+ onKeyDown(e);
557
+ }
558
+ }, [formattingOptions, onKeyDown]);
559
+ const handlePaste = require$$0.useCallback((e) => {
537
560
  const { value, rawValue } = handleNumoraOnPaste(e, {
538
561
  decimalMaxLength: maxDecimals,
539
562
  formattingOptions,
540
563
  });
541
- syncEventValue(e.target, value, rawValue);
542
- updateValue(value);
564
+ // For paste, we often want to move cursor to the end of pasted content
565
+ // handleNumoraOnPaste already handles DOM value and cursor, but React will overwrite it.
566
+ // So we capture where the core logic set the cursor.
567
+ lastCaretPosRef.current = e.target.selectionStart;
568
+ e.target.rawValue = rawValue;
569
+ setDisplayValue(value);
543
570
  if (onPaste) {
544
571
  onPaste(e);
545
572
  }
573
+ // Trigger onChange manually because paste event doesn't always trigger a ChangeEvent in all React versions
574
+ // when we preventDefault.
546
575
  if (onChange) {
547
- onChange(e);
576
+ const changeEvent = e;
577
+ onChange(changeEvent);
548
578
  }
549
- };
550
- const handleKeyDown = (e) => {
551
- caretInfoRef.current = handleNumoraOnKeyDown(e, formattingOptions);
552
- if (onKeyDown) {
553
- onKeyDown(e);
554
- }
555
- };
556
- const handleBlur = (e) => {
579
+ }, [maxDecimals, formattingOptions, onPaste, onChange]);
580
+ const handleBlur = require$$0.useCallback((e) => {
557
581
  const { value, rawValue } = handleNumoraOnBlur(e, {
558
582
  decimalMaxLength: maxDecimals,
559
583
  formattingOptions,
560
584
  });
561
- syncEventValue(e.target, value, rawValue);
562
- updateValue(value);
585
+ e.target.rawValue = rawValue;
586
+ setDisplayValue(value);
563
587
  if (onBlur) {
564
588
  onBlur(e);
565
589
  }
566
- };
567
- return (jsxRuntimeExports.jsx("input", { ...rest, ref: inputRef, ...(isControlled
568
- ? { value: internalValue }
569
- : { defaultValue: getFormattedDefaultValue() }), onChange: handleChange, onPaste: handlePaste, onKeyDown: handleKeyDown, onBlur: handleBlur, type: "text", inputMode: "decimal" }));
590
+ }, [maxDecimals, formattingOptions, onBlur]);
591
+ return (jsxRuntimeExports.jsx("input", { ...rest, ref: internalInputRef, value: displayValue, onChange: handleChange, onKeyDown: handleKeyDown, onPaste: handlePaste, onBlur: handleBlur, type: "text", inputMode: "decimal", spellCheck: false, autoComplete: "off" }));
570
592
  });
571
593
  NumoraInput.displayName = 'NumoraInput';
572
594
 
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js","../src/handlers.ts","../src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import type React from 'react';\nimport {\n handleOnChangeNumoraInput,\n handleOnKeyDownNumoraInput,\n handleOnPasteNumoraInput,\n formatValue,\n type CaretPositionInfo,\n type FormattingOptions,\n FormatOn,\n} from 'numora';\n\ntype ChangeResult = {\n value: string;\n rawValue?: string;\n};\n\ntype PasteResult = ChangeResult;\ntype BlurResult = ChangeResult;\n\ntype BaseOptions = {\n decimalMaxLength: number;\n caretPositionBeforeChange?: CaretPositionInfo;\n formattingOptions: FormattingOptions & { rawValueMode?: boolean };\n};\n\nexport function handleNumoraOnChange(\n e: React.ChangeEvent<HTMLInputElement>,\n options: BaseOptions\n): ChangeResult {\n const { formatted, raw } = handleOnChangeNumoraInput(\n e.nativeEvent as unknown as Event,\n options.decimalMaxLength,\n options.caretPositionBeforeChange,\n options.formattingOptions\n );\n\n return {\n value: formatted,\n rawValue: raw,\n };\n}\n\nexport function handleNumoraOnPaste(\n e: React.ClipboardEvent<HTMLInputElement>,\n options: Omit<BaseOptions, 'caretPositionBeforeChange'>\n): PasteResult {\n const { formatted, raw } = handleOnPasteNumoraInput(\n e.nativeEvent as ClipboardEvent,\n options.decimalMaxLength,\n options.formattingOptions\n );\n\n return {\n value: formatted,\n rawValue: raw,\n };\n}\n\nexport function handleNumoraOnKeyDown(\n e: React.KeyboardEvent<HTMLInputElement>,\n formattingOptions: FormattingOptions\n): CaretPositionInfo | undefined {\n return handleOnKeyDownNumoraInput(\n e.nativeEvent as unknown as KeyboardEvent,\n formattingOptions\n );\n}\n\nexport function handleNumoraOnBlur(\n e: React.FocusEvent<HTMLInputElement>,\n options: {\n decimalMaxLength: number;\n formattingOptions: FormattingOptions & { rawValueMode?: boolean };\n }\n): BlurResult {\n // If formatOn is blur, format the value using the pure formatting utility\n if (options.formattingOptions.formatOn === FormatOn.Blur) {\n const { formatted, raw } = formatValue(\n e.target.value,\n options.decimalMaxLength,\n { ...options.formattingOptions, formatOn: FormatOn.Change }\n );\n e.target.value = formatted;\n return {\n value: formatted,\n rawValue: raw,\n };\n }\n\n return {\n value: e.target.value,\n rawValue: undefined,\n };\n}\n","import React, {\n useRef,\n useState,\n useEffect,\n forwardRef,\n useImperativeHandle,\n} from 'react';\nimport {\n FormatOn,\n ThousandStyle,\n formatValue,\n type CaretPositionInfo,\n type FormattingOptions,\n} from 'numora';\nimport {\n handleNumoraOnBlur,\n handleNumoraOnChange,\n handleNumoraOnKeyDown,\n handleNumoraOnPaste,\n} from './handlers';\n\ninterface NumoraInputProps\n extends Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'onChange' | 'type' | 'inputMode'\n > {\n maxDecimals?: number;\n onChange?: (e: React.ChangeEvent<HTMLInputElement> | React.ClipboardEvent<HTMLInputElement>) => void;\n\n formatOn?: FormatOn;\n thousandSeparator?: string;\n thousandStyle?: ThousandStyle;\n decimalSeparator?: string;\n decimalMinLength?: number;\n\n enableCompactNotation?: boolean;\n enableNegative?: boolean;\n enableLeadingZeros?: boolean;\n rawValueMode?: boolean;\n}\n\nconst NumoraInput = forwardRef<HTMLInputElement, NumoraInputProps>((props, ref) => {\n const {\n maxDecimals = 2,\n onChange,\n onPaste,\n onBlur,\n onKeyDown,\n formatOn = FormatOn.Blur,\n thousandSeparator = ',',\n thousandStyle = ThousandStyle.Thousand,\n decimalSeparator = '.',\n decimalMinLength,\n enableCompactNotation = false,\n enableNegative = false,\n enableLeadingZeros = false,\n rawValueMode = false,\n value: controlledValue,\n defaultValue,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const caretInfoRef = useRef<CaretPositionInfo | undefined>(undefined);\n\n const formattingOptions: FormattingOptions & { rawValueMode?: boolean } = {\n formatOn,\n thousandSeparator,\n ThousandStyle: thousandStyle,\n decimalSeparator,\n decimalMinLength,\n enableCompactNotation,\n enableNegative,\n enableLeadingZeros,\n rawValueMode,\n };\n\n const getFormattedDefaultValue = (): string => {\n if (defaultValue !== undefined) {\n const { formatted } = formatValue(String(defaultValue), maxDecimals, formattingOptions);\n return formatted;\n }\n return '';\n };\n\n const getInitialControlledValue = (): string => {\n if (controlledValue !== undefined) {\n const { formatted } = formatValue(String(controlledValue), maxDecimals, formattingOptions);\n return formatted;\n }\n return '';\n };\n\n const [internalValue, setInternalValue] = useState<string>(getInitialControlledValue);\n\n useImperativeHandle(ref, () => inputRef.current as HTMLInputElement, []);\n\n // When controlled value changes, normalize/format it for display\n useEffect(() => {\n if (controlledValue !== undefined) {\n const { formatted } = formatValue(String(controlledValue), maxDecimals, formattingOptions);\n setInternalValue(formatted);\n }\n }, [controlledValue, maxDecimals, formatOn, thousandSeparator, thousandStyle, decimalSeparator, decimalMinLength, enableCompactNotation, enableNegative, enableLeadingZeros, rawValueMode]);\n\n const isControlled = controlledValue !== undefined;\n\n const updateValue = (value: string) => {\n if (isControlled) {\n setInternalValue(value);\n }\n };\n\n const syncEventValue = (\n target: HTMLInputElement,\n formattedValue: string,\n rawValue?: string\n ): void => {\n Object.defineProperty(target, 'value', {\n writable: true,\n value: formattedValue,\n });\n\n if (rawValue !== undefined) {\n Object.defineProperty(target, 'rawValue', {\n writable: true,\n value: rawValue,\n enumerable: true,\n configurable: true,\n });\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const { value, rawValue } = handleNumoraOnChange(e, {\n decimalMaxLength: maxDecimals,\n caretPositionBeforeChange: caretInfoRef.current,\n formattingOptions,\n });\n caretInfoRef.current = undefined;\n\n syncEventValue(e.target, value, rawValue);\n updateValue(value);\n\n if (onChange) {\n onChange(e);\n }\n };\n\n const handlePaste = (e: React.ClipboardEvent<HTMLInputElement>) => {\n const { value, rawValue } = handleNumoraOnPaste(e, {\n decimalMaxLength: maxDecimals,\n formattingOptions,\n });\n\n syncEventValue(e.target as HTMLInputElement, value, rawValue);\n updateValue(value);\n\n if (onPaste) {\n onPaste(e);\n }\n if (onChange) {\n onChange(e);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n caretInfoRef.current = handleNumoraOnKeyDown(e, formattingOptions);\n if (onKeyDown) {\n onKeyDown(e);\n }\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n const { value, rawValue } = handleNumoraOnBlur(e, {\n decimalMaxLength: maxDecimals,\n formattingOptions,\n });\n\n syncEventValue(e.target, value, rawValue);\n updateValue(value);\n\n if (onBlur) {\n onBlur(e);\n }\n };\n\n return (\n <input\n {...rest}\n ref={inputRef}\n {...(isControlled\n ? { value: internalValue }\n : { defaultValue: getFormattedDefaultValue() }\n )}\n onChange={handleChange}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n type=\"text\"\n inputMode=\"decimal\"\n />\n );\n});\n\nNumoraInput.displayName = 'NumoraInput';\n\nexport { NumoraInput };\nexport { FormatOn, ThousandStyle } from 'numora';\nexport type { FormattingOptions, CaretPositionInfo } from 'numora';\n"],"names":["require$$0","jsxRuntimeModule","require$$1","handleOnChangeNumoraInput","handleOnPasteNumoraInput","handleOnKeyDownNumoraInput","FormatOn","formatValue","forwardRef","ThousandStyle","useRef","useState","useImperativeHandle","useEffect","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,CAAA,IAAI,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;AACjE,GAAE,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACpD,CAAA,SAAS,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE;GACvC,IAAI,GAAG,GAAG,IAAI;GACd,MAAM,KAAK,QAAQ,KAAK,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC;AAC9C,GAAE,MAAM,KAAK,MAAM,CAAC,GAAG,KAAK,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC;AAClD,GAAE,IAAI,KAAK,IAAI,MAAM,EAAE;KACnB,QAAQ,GAAG,EAAE;AACjB,KAAI,KAAK,IAAI,QAAQ,IAAI,MAAM;AAC/B,OAAM,KAAK,KAAK,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;GACnE,CAAG,MAAM,QAAQ,GAAG,MAAM;AAC1B,GAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;AACvB,GAAE,OAAO;KACL,QAAQ,EAAE,kBAAkB;KAC5B,IAAI,EAAE,IAAI;KACV,GAAG,EAAE,GAAG;KACR,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI;AAC1C,KAAI,KAAK,EAAE;IACR;AACH,CAAA;AACA,CAAA,0BAAA,CAAA,QAAgB,GAAG,mBAAmB;AACtC,CAAA,0BAAA,CAAA,GAAW,GAAG,OAAO;AACrB,CAAA,0BAAA,CAAA,IAAY,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;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pm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js","../src/handlers.ts","../src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import type React from 'react';\nimport {\n handleOnChangeNumoraInput,\n handleOnKeyDownNumoraInput,\n handleOnPasteNumoraInput,\n formatValueForDisplay,\n type CaretPositionInfo,\n type FormattingOptions,\n FormatOn,\n} from 'numora';\n\ntype ChangeResult = {\n value: string;\n rawValue?: string;\n};\n\ntype PasteResult = ChangeResult;\ntype BlurResult = ChangeResult;\n\ntype BaseOptions = {\n decimalMaxLength: number;\n caretPositionBeforeChange?: CaretPositionInfo;\n formattingOptions: FormattingOptions & { rawValueMode?: boolean };\n};\n\nexport function handleNumoraOnChange(\n e: React.ChangeEvent<HTMLInputElement>,\n options: BaseOptions\n): ChangeResult {\n const { formatted, raw } = handleOnChangeNumoraInput(\n e.nativeEvent as unknown as Event,\n options.decimalMaxLength,\n options.caretPositionBeforeChange,\n options.formattingOptions\n );\n\n return {\n value: formatted,\n rawValue: raw,\n };\n}\n\nexport function handleNumoraOnPaste(\n e: React.ClipboardEvent<HTMLInputElement>,\n options: Omit<BaseOptions, 'caretPositionBeforeChange'>\n): PasteResult {\n const { formatted, raw } = handleOnPasteNumoraInput(\n e.nativeEvent as ClipboardEvent,\n options.decimalMaxLength,\n options.formattingOptions\n );\n\n return {\n value: formatted,\n rawValue: raw,\n };\n}\n\nexport function handleNumoraOnKeyDown(\n e: React.KeyboardEvent<HTMLInputElement>,\n formattingOptions: FormattingOptions\n): CaretPositionInfo | undefined {\n return handleOnKeyDownNumoraInput(\n e.nativeEvent as unknown as KeyboardEvent,\n formattingOptions\n );\n}\n\nexport function handleNumoraOnBlur(\n e: React.FocusEvent<HTMLInputElement>,\n options: {\n decimalMaxLength: number;\n formattingOptions: FormattingOptions & { rawValueMode?: boolean };\n }\n): BlurResult {\n if (options.formattingOptions.formatOn === FormatOn.Blur) {\n const { formatted, raw } = formatValueForDisplay(\n e.target.value,\n options.decimalMaxLength,\n { ...options.formattingOptions, formatOn: FormatOn.Change }\n );\n return {\n value: formatted,\n rawValue: raw,\n };\n }\n\n return {\n value: e.target.value,\n rawValue: undefined,\n };\n}\n","import React, {\n useRef,\n useState,\n useEffect,\n useLayoutEffect,\n forwardRef,\n useCallback,\n} from 'react';\nimport {\n FormatOn,\n ThousandStyle,\n formatValueForDisplay,\n type CaretPositionInfo,\n type FormattingOptions,\n} from 'numora';\nimport {\n handleNumoraOnBlur,\n handleNumoraOnChange,\n handleNumoraOnKeyDown,\n handleNumoraOnPaste,\n} from './handlers';\n\nexport interface NumoraInputProps\n extends Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'onChange' | 'type' | 'inputMode'\n > {\n maxDecimals?: number;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n\n formatOn?: FormatOn;\n thousandSeparator?: string;\n thousandStyle?: ThousandStyle;\n decimalSeparator?: string;\n decimalMinLength?: number;\n\n enableCompactNotation?: boolean;\n enableNegative?: boolean;\n enableLeadingZeros?: boolean;\n rawValueMode?: boolean;\n}\n\nconst NumoraInput = forwardRef<HTMLInputElement, NumoraInputProps>((props, ref) => {\n const {\n maxDecimals = 2,\n onChange,\n onPaste,\n onBlur,\n onKeyDown,\n formatOn = FormatOn.Blur,\n thousandSeparator = ',',\n thousandStyle = ThousandStyle.Thousand,\n decimalSeparator = '.',\n decimalMinLength,\n enableCompactNotation = false,\n enableNegative = false,\n enableLeadingZeros = false,\n rawValueMode = false,\n value: controlledValue,\n defaultValue,\n ...rest\n } = props;\n\n const internalInputRef = useRef<HTMLInputElement>(null);\n const caretInfoRef = useRef<CaretPositionInfo | undefined>(undefined);\n const lastCaretPosRef = useRef<number | null>(null);\n\n const formattingOptions: FormattingOptions = {\n formatOn,\n thousandSeparator,\n ThousandStyle: thousandStyle,\n decimalSeparator,\n decimalMinLength,\n enableCompactNotation,\n enableNegative,\n enableLeadingZeros,\n rawValueMode,\n };\n\n const getInitialValue = (): string => {\n const valueToFormat = controlledValue !== undefined ? controlledValue : defaultValue;\n if (valueToFormat !== undefined) {\n const { formatted } = formatValueForDisplay(String(valueToFormat), maxDecimals, formattingOptions);\n return formatted;\n }\n return '';\n };\n\n const [displayValue, setDisplayValue] = useState<string>(getInitialValue);\n\n // Sync external ref with internal ref\n useLayoutEffect(() => {\n if (!ref) return;\n if (typeof ref === 'function') {\n ref(internalInputRef.current);\n } else {\n ref.current = internalInputRef.current;\n }\n }, [ref]);\n\n // When controlled value changes from outside, update display value\n useEffect(() => {\n if (controlledValue !== undefined) {\n const { formatted } = formatValueForDisplay(String(controlledValue), maxDecimals, formattingOptions);\n if (formatted !== displayValue) {\n setDisplayValue(formatted);\n }\n }\n }, [controlledValue, maxDecimals, formattingOptions]);\n\n // Restore cursor position after render\n useLayoutEffect(() => {\n if (internalInputRef.current && lastCaretPosRef.current !== null) {\n const input = internalInputRef.current;\n const pos = lastCaretPosRef.current;\n input.setSelectionRange(pos, pos);\n lastCaretPosRef.current = null;\n }\n });\n\n const handleChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n const { value, rawValue } = handleNumoraOnChange(e, {\n decimalMaxLength: maxDecimals,\n caretPositionBeforeChange: caretInfoRef.current,\n formattingOptions,\n });\n\n // Store cursor position AFTER core library has calculated and set it\n // The core library modifies the DOM element directly during handleNumoraOnChange\n // Read from the input ref (which is the same element) to get the position set by the core library\n if (internalInputRef.current) {\n const cursorPos = internalInputRef.current.selectionStart;\n if (cursorPos !== null && cursorPos !== undefined) {\n lastCaretPosRef.current = cursorPos;\n }\n }\n\n caretInfoRef.current = undefined;\n\n // Add rawValue to the event object without overriding 'value' property\n (e.target as any).rawValue = rawValue;\n\n setDisplayValue(value);\n\n if (onChange) {\n onChange(e);\n }\n }, [maxDecimals, formattingOptions, onChange]);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent<HTMLInputElement>) => {\n const coreCaretInfo = handleNumoraOnKeyDown(e, formattingOptions);\n \n // Always capture cursor position info, even if core library doesn't return it\n // This is needed for cursor position calculation during normal typing (not just Delete/Backspace)\n if (!coreCaretInfo && internalInputRef.current) {\n const selectionStart = internalInputRef.current.selectionStart ?? 0;\n const selectionEnd = internalInputRef.current.selectionEnd ?? 0;\n caretInfoRef.current = {\n selectionStart,\n selectionEnd,\n };\n } else {\n caretInfoRef.current = coreCaretInfo;\n }\n \n if (onKeyDown) {\n onKeyDown(e);\n }\n }, [formattingOptions, onKeyDown]);\n\n const handlePaste = useCallback((e: React.ClipboardEvent<HTMLInputElement>) => {\n const { value, rawValue } = handleNumoraOnPaste(e, {\n decimalMaxLength: maxDecimals,\n formattingOptions,\n });\n\n // For paste, we often want to move cursor to the end of pasted content\n // handleNumoraOnPaste already handles DOM value and cursor, but React will overwrite it.\n // So we capture where the core logic set the cursor.\n lastCaretPosRef.current = (e.target as HTMLInputElement).selectionStart;\n (e.target as any).rawValue = rawValue;\n\n setDisplayValue(value);\n\n if (onPaste) {\n onPaste(e);\n }\n\n // Trigger onChange manually because paste event doesn't always trigger a ChangeEvent in all React versions\n // when we preventDefault.\n if (onChange) {\n const changeEvent = e as unknown as React.ChangeEvent<HTMLInputElement>;\n onChange(changeEvent);\n }\n }, [maxDecimals, formattingOptions, onPaste, onChange]);\n\n const handleBlur = useCallback((e: React.FocusEvent<HTMLInputElement>) => {\n const { value, rawValue } = handleNumoraOnBlur(e, {\n decimalMaxLength: maxDecimals,\n formattingOptions,\n });\n\n (e.target as any).rawValue = rawValue;\n setDisplayValue(value);\n\n if (onBlur) {\n onBlur(e);\n }\n }, [maxDecimals, formattingOptions, onBlur]);\n\n return (\n <input\n {...rest}\n ref={internalInputRef}\n value={displayValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n onBlur={handleBlur}\n type=\"text\"\n inputMode=\"decimal\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n );\n});\n\nNumoraInput.displayName = 'NumoraInput';\n\nexport { NumoraInput };\nexport { FormatOn, ThousandStyle } from 'numora';\nexport type { FormattingOptions, CaretPositionInfo } from 'numora';\n"],"names":["require$$0","jsxRuntimeModule","require$$1","handleOnChangeNumoraInput","handleOnPasteNumoraInput","handleOnKeyDownNumoraInput","FormatOn","formatValueForDisplay","forwardRef","ThousandStyle","useRef","useState","useLayoutEffect","useEffect","useCallback","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,CAAA,IAAI,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;AACjE,GAAE,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACpD,CAAA,SAAS,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE;GACvC,IAAI,GAAG,GAAG,IAAI;GACd,MAAM,KAAK,QAAQ,KAAK,GAAG,GAAG,EAAE,GAAG,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