@uiwwsw/virtual-keyboard 2.0.0 → 2.1.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.
@@ -2,6 +2,11 @@ import { type RefObject } from "react";
2
2
  import type { VirtualInputHandle } from "./Input.js";
3
3
  import type { InputPolicy } from "../types/inputPolicy.js";
4
4
  import type { KeypadLayout } from "../types/keyboard.js";
5
+ export interface InputEditingStatus {
6
+ selectionLength: number;
7
+ hasValue: boolean;
8
+ message: string;
9
+ }
5
10
  interface VirtualInputContextValue {
6
11
  inputRef: RefObject<VirtualInputHandle | null>;
7
12
  onFocus: (id: string, target: HTMLElement, policy: InputPolicy) => void;
@@ -21,6 +26,8 @@ interface VirtualInputContextValue {
21
26
  toggleSelectionAdjust: () => void;
22
27
  toggleKorean: () => void;
23
28
  activeInputPolicy: Required<InputPolicy>;
29
+ editingStatus: InputEditingStatus;
30
+ setEditingStatus: (status: InputEditingStatus) => void;
24
31
  }
25
32
  export declare const VirtualInputContext: import("react").Context<VirtualInputContextValue | null>;
26
33
  export declare function useVirtualInputContext(): VirtualInputContextValue;
@@ -0,0 +1,7 @@
1
+ import { type EditingState } from "./editing.js";
2
+ /** Apply only the browser's changed range, retaining untouched text and input policies. */
3
+ export declare function nativeEdit(previous: EditingState, value: string, selection: {
4
+ start: number;
5
+ end: number;
6
+ backward: boolean;
7
+ }, sanitize: (value: string) => string, filter: (value: string) => boolean, maxLength?: number): EditingState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiwwsw/virtual-keyboard",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "types": "dist/types/index.d.ts",
6
6
  "main": "dist/index.js",