numora 3.4.0 → 3.5.0

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.
@@ -1,4 +1,18 @@
1
1
  import { type FormattingOptions, type CaretPositionInfo } from '@/types';
2
+ /**
3
+ * Handles the beforeinput event to format the value before it is applied to the DOM.
4
+ *
5
+ * Returns null for paste events so the dedicated paste handler can process them.
6
+ *
7
+ * @param e - The InputEvent (beforeinput)
8
+ * @param decimalMaxLength - The maximum number of decimal places allowed
9
+ * @param formattingOptions - Optional formatting options
10
+ * @returns Object with formatted and raw values, or null if the event should be handled natively
11
+ */
12
+ export declare function handleOnBeforeInputNumoraInput(e: InputEvent, decimalMaxLength: number, formattingOptions?: FormattingOptions): {
13
+ formatted: string;
14
+ raw: string;
15
+ } | null;
2
16
  /**
3
17
  * Handles the keydown event to prevent the user from entering a second decimal point.
4
18
  * Also tracks selection info for Delete/Backspace keys to enable proper cursor positioning.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "numora",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Framework-agnostic numeric input library for DeFi and financial apps",
5
5
  "homepage": "https://numora.xyz/",
6
6
  "main": "dist/index.js",
@@ -65,6 +65,6 @@
65
65
  "scripts": {
66
66
  "build": "vite build && tsc --emitDeclarationOnly",
67
67
  "test": "vitest run",
68
- "dev": "vite build --watch"
68
+ "dev": "vite build --watch & tsc --watch --emitDeclarationOnly --preserveWatchOutput"
69
69
  }
70
70
  }