@uiwwsw/virtual-keyboard 2.2.0 → 2.2.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.en.md ADDED
@@ -0,0 +1,73 @@
1
+ # React Virtual Keyboard
2
+
3
+ [한국어](README.md) · [Live demo](https://virtual-keyboard-uiwwsw.vercel.app/en/) · [npm](https://www.npmjs.com/package/@uiwwsw/virtual-keyboard)
4
+
5
+ An accessible React on-screen keyboard with Korean Hangul composition, English input, numeric and phone keypads, custom layouts and input policies. Virtual Keyboard is the product name; custom keypads are one feature. Supports React 18 and 19.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install @uiwwsw/virtual-keyboard
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```tsx
16
+ "use client";
17
+ import { useState } from "react";
18
+ import { VirtualInput, VirtualInputProvider } from "@uiwwsw/virtual-keyboard";
19
+
20
+ export default function Example() {
21
+ const [value, setValue] = useState("");
22
+ return (
23
+ <VirtualInputProvider locale="en" keyboardVisibility="always">
24
+ <VirtualInput
25
+ mode="text"
26
+ value={value}
27
+ onValueChange={setValue}
28
+ aria-label="Your message"
29
+ maxLength={48}
30
+ />
31
+ </VirtualInputProvider>
32
+ );
33
+ }
34
+ ```
35
+
36
+ The `locale` option is available in the source update documented here; check the installed package version before using a newly added option. It changes keyboard labels, accessibility text and clipboard status messages, not user-entered text or the input language. Default: `ko`. `en` provides English labels.
37
+
38
+ ## Input modes
39
+
40
+ | Mode | Accepted input |
41
+ | ------------ | ------------------------------------------------ |
42
+ | text | Free text with Korean/English keyboard switching |
43
+ | hangul | Korean composition |
44
+ | number | Numeric input and decimal point |
45
+ | tel | Digits and +, *, # |
46
+ | alpha | English letters |
47
+ | alphanumeric | English letters and digits |
48
+ | custom | Your configured key layout and macro values |
49
+
50
+ The same character policies apply to typing and pasting. Keyboard visibility can be auto, always or never. Themes can be light/dark or follow the system. Use value/onValueChange for string state, and provide an accessible input label. The input uses normal DOM, supports selection, editing, clipboard feedback and physical keys.
51
+
52
+ ## Custom keys
53
+
54
+ ```tsx
55
+ import type { KeypadLayout } from "@uiwwsw/virtual-keyboard";
56
+ const layout: KeypadLayout = [
57
+ [
58
+ { label: "Hello", value: "Hello! " },
59
+ { label: "Thanks", value: "Thank you. " },
60
+ ],
61
+ [
62
+ { value: "Backspace", type: "action" },
63
+ { value: "Enter", type: "action" },
64
+ ],
65
+ ];
66
+ // Pass mode="custom" layout={layout} to VirtualInput.
67
+ ```
68
+
69
+ ## Development
70
+
71
+ Use a supported Node version from package.json. Run npm ci and npm run check; the demo build is demo-dist, the library build is dist. Follow workspace SSD rules when applicable. The Korean reference README covers the full API and migration notes; its code identifiers apply in either language.
72
+
73
+ MIT license. Use the GitHub issue tracker for bugs and feature requests.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  한글 조합과 커스텀 키패드를 지원하는 React 가상 키보드입니다. 입력란은 실제 `<input inputMode="none">`을 사용해 커서·길게 누르기·선택을 브라우저에 맡기며, 화면 키패드는 Shadow DOM 안의 실제 버튼으로 렌더링됩니다.
4
4
 
5
- [데모](https://composed-input.vercel.app/) · [npm](https://www.npmjs.com/package/@uiwwsw/virtual-keyboard) · [MIT License](./LICENSE)
5
+ [데모](https://virtual-keyboard-uiwwsw.vercel.app/) · [npm](https://www.npmjs.com/package/@uiwwsw/virtual-keyboard) · [MIT License](./LICENSE)
6
6
 
7
7
  ## Installation
8
8
 
@@ -206,3 +206,9 @@ npm의 `package-lock.json`을 의존성 기준으로 사용합니다. Vite 라
206
206
  ## Migration from 2.0
207
207
 
208
208
  2.1부터 입력란 내부는 실제 input입니다. 공개 값·ref API와 컨테이너의 `className`/`style`은 유지합니다. 내부 문자 span이나 가짜 커서를 선택하던 CSS·DOM 코드는 제거하세요. 선택 범위를 직접 읽을 때는 input의 `selectionStart`, `selectionEnd`, `selectionDirection`을 사용합니다. `id`와 접근성 속성은 실제 input으로 이동하므로 `label htmlFor`를 연결할 수 있습니다.
209
+
210
+ ## 데모 언어와 검색
211
+
212
+ [한국어 데모](https://virtual-keyboard-uiwwsw.vercel.app/) · [English demo](https://virtual-keyboard-uiwwsw.vercel.app/en/) · [English README](README.en.md)
213
+
214
+ Virtual Keyboard(버추얼 키보드)가 제품·패키지 이름입니다. 커스텀 키패드는 지원 기능 중 하나입니다. 데모는 한·영 UI, 언어별 제목·설명·초기 HTML·canonical/hreflang·사이트맵을 제공합니다. Provider의 `locale="ko" | "en"`(기본 ko)는 키보드 버튼·접근성·클립보드 상태 안내의 표시 언어이며 입력 모드와 독립적입니다. 입력 문자를 자동 번역하지 않습니다. [SEO 기록](docs/SEO.md).