@composy/keyboard-core 0.0.1 → 0.0.2

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.
Files changed (339) hide show
  1. package/README.md +156 -37
  2. package/dist/index.js +1540 -1395
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +2981 -1
  5. package/dist/index.min.js.map +1 -0
  6. package/es/.dts-output-manifest.json +1 -0
  7. package/es/.dts.tsbuildinfo +1 -0
  8. package/es/icons.d.ts +0 -1
  9. package/es/icons.js +1 -1
  10. package/es/icons.js.map +1 -1
  11. package/es/index.d.ts +3 -4
  12. package/es/index.js +15 -15
  13. package/es/layouts/amount.d.ts +0 -1
  14. package/es/layouts/amount.js +1 -1
  15. package/es/layouts/amount.js.map +1 -1
  16. package/es/layouts/bankcard.d.ts +0 -1
  17. package/es/layouts/bankcard.js +1 -1
  18. package/es/layouts/bankcard.js.map +1 -1
  19. package/es/layouts/email.d.ts +0 -1
  20. package/es/layouts/email.js +1 -1
  21. package/es/layouts/email.js.map +1 -1
  22. package/es/layouts/idcard.d.ts +0 -1
  23. package/es/layouts/idcard.js +1 -1
  24. package/es/layouts/idcard.js.map +1 -1
  25. package/es/layouts/index.d.ts +11 -12
  26. package/es/layouts/index.js +23 -23
  27. package/es/layouts/index.js.map +1 -1
  28. package/es/layouts/license-plate.d.ts +0 -1
  29. package/es/layouts/license-plate.js +1 -1
  30. package/es/layouts/license-plate.js.map +1 -1
  31. package/es/layouts/number.d.ts +0 -1
  32. package/es/layouts/number.js +1 -1
  33. package/es/layouts/number.js.map +1 -1
  34. package/es/layouts/phone.d.ts +0 -1
  35. package/es/layouts/phone.js +1 -1
  36. package/es/layouts/phone.js.map +1 -1
  37. package/es/layouts/punct.d.ts +0 -1
  38. package/es/layouts/punct.js +1 -1
  39. package/es/layouts/punct.js.map +1 -1
  40. package/es/layouts/qwerty.d.ts +0 -1
  41. package/es/layouts/qwerty.js +1 -1
  42. package/es/layouts/qwerty.js.map +1 -1
  43. package/es/layouts/search.d.ts +0 -1
  44. package/es/layouts/search.js +1 -1
  45. package/es/layouts/search.js.map +1 -1
  46. package/es/layouts/symbol.d.ts +0 -1
  47. package/es/layouts/symbol.js +1 -1
  48. package/es/layouts/symbol.js.map +1 -1
  49. package/es/layouts/url.d.ts +0 -1
  50. package/es/layouts/url.js +1 -1
  51. package/es/layouts/url.js.map +1 -1
  52. package/es/layouts/verifycode.d.ts +0 -1
  53. package/es/layouts/verifycode.js +1 -1
  54. package/es/layouts/verifycode.js.map +1 -1
  55. package/es/managers/index.d.ts +1 -2
  56. package/es/managers/index.js +1 -1
  57. package/es/managers/keyboard-manager.d.ts +2 -1
  58. package/es/managers/keyboard-manager.js +79 -22
  59. package/es/managers/keyboard-manager.js.map +1 -1
  60. package/es/managers/keyboard-renderer.d.ts +3 -2
  61. package/es/managers/keyboard-renderer.js +81 -39
  62. package/es/managers/keyboard-renderer.js.map +1 -1
  63. package/es/managers/position-manager.d.ts +4 -3
  64. package/es/managers/position-manager.js +42 -21
  65. package/es/managers/position-manager.js.map +1 -1
  66. package/es/themes/index.d.ts +1 -2
  67. package/es/themes/index.js +2 -1
  68. package/es/themes/index.js.map +1 -1
  69. package/es/themes/presets.d.ts +0 -1
  70. package/es/themes/presets.js +1 -1
  71. package/es/themes/presets.js.map +1 -1
  72. package/es/themes/types.d.ts +1 -1
  73. package/es/themes/types.js +1 -1
  74. package/es/types/index.d.ts +0 -1
  75. package/es/types/index.js +1 -1
  76. package/es/types/keyboard.d.ts +0 -1
  77. package/es/types/keyboard.js +1 -1
  78. package/es/types/position.d.ts +0 -1
  79. package/es/types/position.js +1 -1
  80. package/es/utils/device.d.ts +0 -1
  81. package/es/utils/device.js +11 -7
  82. package/es/utils/device.js.map +1 -1
  83. package/es/utils/dom.d.ts +4 -1
  84. package/es/utils/dom.js +25 -7
  85. package/es/utils/dom.js.map +1 -1
  86. package/es/utils/event-emitter.d.ts +0 -1
  87. package/es/utils/event-emitter.js +2 -1
  88. package/es/utils/event-emitter.js.map +1 -1
  89. package/es/utils/formatters.d.ts +0 -1
  90. package/es/utils/formatters.js +4 -4
  91. package/es/utils/formatters.js.map +1 -1
  92. package/es/utils/index.d.ts +2 -3
  93. package/es/utils/index.js +5 -5
  94. package/es/utils/random.d.ts +4 -1
  95. package/es/utils/random.js +2 -2
  96. package/es/utils/random.js.map +1 -1
  97. package/esm/icons.js +1 -1
  98. package/esm/icons.js.map +1 -1
  99. package/esm/index.js +15 -15
  100. package/esm/layouts/amount.js +1 -1
  101. package/esm/layouts/amount.js.map +1 -1
  102. package/esm/layouts/bankcard.js +1 -1
  103. package/esm/layouts/bankcard.js.map +1 -1
  104. package/esm/layouts/email.js +1 -1
  105. package/esm/layouts/email.js.map +1 -1
  106. package/esm/layouts/idcard.js +1 -1
  107. package/esm/layouts/idcard.js.map +1 -1
  108. package/esm/layouts/index.js +23 -23
  109. package/esm/layouts/index.js.map +1 -1
  110. package/esm/layouts/license-plate.js +1 -1
  111. package/esm/layouts/license-plate.js.map +1 -1
  112. package/esm/layouts/number.js +1 -1
  113. package/esm/layouts/number.js.map +1 -1
  114. package/esm/layouts/phone.js +1 -1
  115. package/esm/layouts/phone.js.map +1 -1
  116. package/esm/layouts/punct.js +1 -1
  117. package/esm/layouts/punct.js.map +1 -1
  118. package/esm/layouts/qwerty.js +1 -1
  119. package/esm/layouts/qwerty.js.map +1 -1
  120. package/esm/layouts/search.js +1 -1
  121. package/esm/layouts/search.js.map +1 -1
  122. package/esm/layouts/symbol.js +1 -1
  123. package/esm/layouts/symbol.js.map +1 -1
  124. package/esm/layouts/url.js +1 -1
  125. package/esm/layouts/url.js.map +1 -1
  126. package/esm/layouts/verifycode.js +1 -1
  127. package/esm/layouts/verifycode.js.map +1 -1
  128. package/esm/managers/index.js +1 -1
  129. package/esm/managers/keyboard-manager.js +79 -22
  130. package/esm/managers/keyboard-manager.js.map +1 -1
  131. package/esm/managers/keyboard-renderer.js +81 -39
  132. package/esm/managers/keyboard-renderer.js.map +1 -1
  133. package/esm/managers/position-manager.js +42 -21
  134. package/esm/managers/position-manager.js.map +1 -1
  135. package/esm/themes/index.js +2 -1
  136. package/esm/themes/index.js.map +1 -1
  137. package/esm/themes/presets.js +1 -1
  138. package/esm/themes/presets.js.map +1 -1
  139. package/esm/utils/device.js +11 -7
  140. package/esm/utils/device.js.map +1 -1
  141. package/esm/utils/dom.js +25 -7
  142. package/esm/utils/dom.js.map +1 -1
  143. package/esm/utils/event-emitter.js +2 -1
  144. package/esm/utils/event-emitter.js.map +1 -1
  145. package/esm/utils/formatters.js +4 -4
  146. package/esm/utils/formatters.js.map +1 -1
  147. package/esm/utils/random.js +2 -2
  148. package/esm/utils/random.js.map +1 -1
  149. package/lib/icons.cjs +1 -1
  150. package/lib/icons.cjs.map +1 -1
  151. package/{esm/icons.d.ts → lib/icons.d.cts} +0 -1
  152. package/lib/index.cjs +14 -13
  153. package/{esm/index.d.ts → lib/index.d.cts} +3 -4
  154. package/lib/layouts/amount.cjs +1 -1
  155. package/lib/layouts/amount.cjs.map +1 -1
  156. package/{esm/layouts/amount.d.ts → lib/layouts/amount.d.cts} +0 -1
  157. package/lib/layouts/bankcard.cjs +1 -1
  158. package/lib/layouts/bankcard.cjs.map +1 -1
  159. package/{esm/layouts/bankcard.d.ts → lib/layouts/bankcard.d.cts} +0 -1
  160. package/lib/layouts/email.cjs +1 -1
  161. package/lib/layouts/email.cjs.map +1 -1
  162. package/lib/layouts/{email.d.ts → email.d.cts} +0 -1
  163. package/lib/layouts/idcard.cjs +1 -1
  164. package/lib/layouts/idcard.cjs.map +1 -1
  165. package/{esm/layouts/idcard.d.ts → lib/layouts/idcard.d.cts} +0 -1
  166. package/lib/layouts/index.cjs +23 -23
  167. package/lib/layouts/index.cjs.map +1 -1
  168. package/{esm/layouts/index.d.ts → lib/layouts/index.d.cts} +11 -12
  169. package/lib/layouts/license-plate.cjs +1 -1
  170. package/lib/layouts/license-plate.cjs.map +1 -1
  171. package/{esm/layouts/license-plate.d.ts → lib/layouts/license-plate.d.cts} +0 -1
  172. package/lib/layouts/number.cjs +1 -1
  173. package/lib/layouts/number.cjs.map +1 -1
  174. package/{esm/layouts/number.d.ts → lib/layouts/number.d.cts} +0 -1
  175. package/lib/layouts/phone.cjs +1 -1
  176. package/lib/layouts/phone.cjs.map +1 -1
  177. package/lib/layouts/{phone.d.ts → phone.d.cts} +0 -1
  178. package/lib/layouts/punct.cjs +1 -1
  179. package/lib/layouts/punct.cjs.map +1 -1
  180. package/lib/layouts/{punct.d.ts → punct.d.cts} +0 -1
  181. package/lib/layouts/qwerty.cjs +1 -1
  182. package/lib/layouts/qwerty.cjs.map +1 -1
  183. package/{esm/layouts/qwerty.d.ts → lib/layouts/qwerty.d.cts} +0 -1
  184. package/lib/layouts/search.cjs +1 -1
  185. package/lib/layouts/search.cjs.map +1 -1
  186. package/{esm/layouts/search.d.ts → lib/layouts/search.d.cts} +0 -1
  187. package/lib/layouts/symbol.cjs +1 -1
  188. package/lib/layouts/symbol.cjs.map +1 -1
  189. package/{esm/layouts/symbol.d.ts → lib/layouts/symbol.d.cts} +0 -1
  190. package/lib/layouts/url.cjs +1 -1
  191. package/lib/layouts/url.cjs.map +1 -1
  192. package/{esm/layouts/url.d.ts → lib/layouts/url.d.cts} +0 -1
  193. package/lib/layouts/verifycode.cjs +1 -1
  194. package/lib/layouts/verifycode.cjs.map +1 -1
  195. package/lib/layouts/{verifycode.d.ts → verifycode.d.cts} +0 -1
  196. package/lib/managers/index.cjs +1 -1
  197. package/lib/managers/{index.d.ts → index.d.cts} +1 -2
  198. package/lib/managers/keyboard-manager.cjs +79 -22
  199. package/lib/managers/keyboard-manager.cjs.map +1 -1
  200. package/lib/managers/{keyboard-manager.d.ts → keyboard-manager.d.cts} +2 -1
  201. package/lib/managers/keyboard-renderer.cjs +80 -38
  202. package/lib/managers/keyboard-renderer.cjs.map +1 -1
  203. package/lib/managers/{keyboard-renderer.d.ts → keyboard-renderer.d.cts} +3 -2
  204. package/lib/managers/position-manager.cjs +42 -21
  205. package/lib/managers/position-manager.cjs.map +1 -1
  206. package/lib/managers/{position-manager.d.ts → position-manager.d.cts} +4 -3
  207. package/lib/themes/index.cjs +2 -1
  208. package/lib/themes/index.cjs.map +1 -1
  209. package/lib/themes/{index.d.ts → index.d.cts} +1 -2
  210. package/lib/themes/presets.cjs +1 -1
  211. package/lib/themes/presets.cjs.map +1 -1
  212. package/lib/themes/{presets.d.ts → presets.d.cts} +0 -1
  213. package/lib/themes/types.cjs +1 -1
  214. package/{esm/themes/types.d.ts → lib/themes/types.d.cts} +1 -1
  215. package/lib/types/index.cjs +1 -1
  216. package/{esm/types/index.d.ts → lib/types/index.d.cts} +0 -1
  217. package/lib/types/keyboard.cjs +1 -1
  218. package/{esm/types/keyboard.d.ts → lib/types/keyboard.d.cts} +0 -1
  219. package/lib/types/position.cjs +1 -1
  220. package/lib/types/{position.d.ts → position.d.cts} +0 -1
  221. package/lib/utils/device.cjs +11 -7
  222. package/lib/utils/device.cjs.map +1 -1
  223. package/{esm/utils/device.d.ts → lib/utils/device.d.cts} +0 -1
  224. package/lib/utils/dom.cjs +25 -6
  225. package/lib/utils/dom.cjs.map +1 -1
  226. package/{esm/utils/dom.d.ts → lib/utils/dom.d.cts} +4 -1
  227. package/lib/utils/event-emitter.cjs +2 -1
  228. package/lib/utils/event-emitter.cjs.map +1 -1
  229. package/{esm/utils/event-emitter.d.ts → lib/utils/event-emitter.d.cts} +0 -1
  230. package/lib/utils/formatters.cjs +4 -4
  231. package/lib/utils/formatters.cjs.map +1 -1
  232. package/{esm/utils/formatters.d.ts → lib/utils/formatters.d.cts} +0 -1
  233. package/lib/utils/index.cjs +4 -3
  234. package/{esm/utils/index.d.ts → lib/utils/index.d.cts} +2 -3
  235. package/lib/utils/random.cjs +2 -2
  236. package/lib/utils/random.cjs.map +1 -1
  237. package/{esm/utils/random.d.ts → lib/utils/random.d.cts} +4 -1
  238. package/package.json +28 -14
  239. package/es/icons.d.ts.map +0 -1
  240. package/es/index.d.ts.map +0 -1
  241. package/es/layouts/amount.d.ts.map +0 -1
  242. package/es/layouts/bankcard.d.ts.map +0 -1
  243. package/es/layouts/email.d.ts.map +0 -1
  244. package/es/layouts/idcard.d.ts.map +0 -1
  245. package/es/layouts/index.d.ts.map +0 -1
  246. package/es/layouts/license-plate.d.ts.map +0 -1
  247. package/es/layouts/number.d.ts.map +0 -1
  248. package/es/layouts/phone.d.ts.map +0 -1
  249. package/es/layouts/punct.d.ts.map +0 -1
  250. package/es/layouts/qwerty.d.ts.map +0 -1
  251. package/es/layouts/search.d.ts.map +0 -1
  252. package/es/layouts/symbol.d.ts.map +0 -1
  253. package/es/layouts/url.d.ts.map +0 -1
  254. package/es/layouts/verifycode.d.ts.map +0 -1
  255. package/es/managers/index.d.ts.map +0 -1
  256. package/es/managers/keyboard-manager.d.ts.map +0 -1
  257. package/es/managers/keyboard-renderer.d.ts.map +0 -1
  258. package/es/managers/position-manager.d.ts.map +0 -1
  259. package/es/themes/index.d.ts.map +0 -1
  260. package/es/themes/presets.d.ts.map +0 -1
  261. package/es/themes/types.d.ts.map +0 -1
  262. package/es/types/index.d.ts.map +0 -1
  263. package/es/types/keyboard.d.ts.map +0 -1
  264. package/es/types/position.d.ts.map +0 -1
  265. package/es/utils/device.d.ts.map +0 -1
  266. package/es/utils/dom.d.ts.map +0 -1
  267. package/es/utils/event-emitter.d.ts.map +0 -1
  268. package/es/utils/formatters.d.ts.map +0 -1
  269. package/es/utils/index.d.ts.map +0 -1
  270. package/es/utils/random.d.ts.map +0 -1
  271. package/esm/icons.d.ts.map +0 -1
  272. package/esm/index.d.ts.map +0 -1
  273. package/esm/layouts/amount.d.ts.map +0 -1
  274. package/esm/layouts/bankcard.d.ts.map +0 -1
  275. package/esm/layouts/email.d.ts +0 -11
  276. package/esm/layouts/email.d.ts.map +0 -1
  277. package/esm/layouts/idcard.d.ts.map +0 -1
  278. package/esm/layouts/index.d.ts.map +0 -1
  279. package/esm/layouts/license-plate.d.ts.map +0 -1
  280. package/esm/layouts/number.d.ts.map +0 -1
  281. package/esm/layouts/phone.d.ts +0 -15
  282. package/esm/layouts/phone.d.ts.map +0 -1
  283. package/esm/layouts/punct.d.ts +0 -7
  284. package/esm/layouts/punct.d.ts.map +0 -1
  285. package/esm/layouts/qwerty.d.ts.map +0 -1
  286. package/esm/layouts/search.d.ts.map +0 -1
  287. package/esm/layouts/symbol.d.ts.map +0 -1
  288. package/esm/layouts/url.d.ts.map +0 -1
  289. package/esm/layouts/verifycode.d.ts +0 -15
  290. package/esm/layouts/verifycode.d.ts.map +0 -1
  291. package/esm/managers/index.d.ts +0 -8
  292. package/esm/managers/index.d.ts.map +0 -1
  293. package/esm/managers/keyboard-manager.d.ts +0 -130
  294. package/esm/managers/keyboard-manager.d.ts.map +0 -1
  295. package/esm/managers/keyboard-renderer.d.ts +0 -115
  296. package/esm/managers/keyboard-renderer.d.ts.map +0 -1
  297. package/esm/managers/position-manager.d.ts +0 -72
  298. package/esm/managers/position-manager.d.ts.map +0 -1
  299. package/esm/themes/index.d.ts +0 -70
  300. package/esm/themes/index.d.ts.map +0 -1
  301. package/esm/themes/presets.d.ts +0 -39
  302. package/esm/themes/presets.d.ts.map +0 -1
  303. package/esm/themes/types.d.ts.map +0 -1
  304. package/esm/themes/types.js +0 -10
  305. package/esm/types/index.d.ts.map +0 -1
  306. package/esm/types/index.js +0 -10
  307. package/esm/types/keyboard.d.ts.map +0 -1
  308. package/esm/types/keyboard.js +0 -10
  309. package/esm/types/position.d.ts +0 -139
  310. package/esm/types/position.d.ts.map +0 -1
  311. package/esm/types/position.js +0 -10
  312. package/esm/utils/device.d.ts.map +0 -1
  313. package/esm/utils/dom.d.ts.map +0 -1
  314. package/esm/utils/event-emitter.d.ts.map +0 -1
  315. package/esm/utils/formatters.d.ts.map +0 -1
  316. package/esm/utils/index.d.ts.map +0 -1
  317. package/esm/utils/index.js +0 -16
  318. package/esm/utils/random.d.ts.map +0 -1
  319. package/lib/icons.d.ts +0 -58
  320. package/lib/index.d.ts +0 -12
  321. package/lib/layouts/amount.d.ts +0 -14
  322. package/lib/layouts/bankcard.d.ts +0 -15
  323. package/lib/layouts/idcard.d.ts +0 -16
  324. package/lib/layouts/index.d.ts +0 -54
  325. package/lib/layouts/license-plate.d.ts +0 -35
  326. package/lib/layouts/number.d.ts +0 -14
  327. package/lib/layouts/qwerty.d.ts +0 -10
  328. package/lib/layouts/search.d.ts +0 -7
  329. package/lib/layouts/symbol.d.ts +0 -14
  330. package/lib/layouts/url.d.ts +0 -7
  331. package/lib/themes/types.d.ts +0 -118
  332. package/lib/types/index.d.ts +0 -7
  333. package/lib/types/keyboard.d.ts +0 -253
  334. package/lib/utils/device.d.ts +0 -45
  335. package/lib/utils/dom.d.ts +0 -69
  336. package/lib/utils/event-emitter.d.ts +0 -52
  337. package/lib/utils/formatters.d.ts +0 -51
  338. package/lib/utils/index.d.ts +0 -10
  339. package/lib/utils/random.d.ts +0 -71
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"bankcard.js","names":[],"sources":["../../src/layouts/bankcard.ts"],"sourcesContent":["/**\n * 银行卡键盘布局\n * @module layouts/bankcard\n */\n\n// 从类型定义文件中导入 KeyboardConfig(键盘配置)和 KeyDefinition(按键定义)类型\nimport type { KeyboardConfig, KeyDefinition } from '../types'\n// 从图标模块中导入删除键图标和清除键图标\nimport { ICON_DELETE, ICON_CLEAR } from '../icons'\n\n/**\n * 创建数字按键\n * @param num - 数字字符串(如 '0'-'9')\n * @returns 返回一个按键定义对象\n */\nfunction createNumberKey(num: string): KeyDefinition {\n return {\n id: `bankcard-${num}`, // 按键唯一标识符,格式为 bankcard-数字\n type: 'char', // 按键类型为字符键\n label: num, // 按键上显示的文本\n value: num, // 按键按下后输出的值\n className: 'key-num', // 按键的 CSS 类名,用于样式定制\n }\n}\n\n/**\n * 银行卡键盘配置 - 紧凑4x4布局\n * 布局结构:\n * 第1行: 1 2 3 [退格]\n * 第2行: 4 5 6 [清除]\n * 第3行: 7 8 9 [关闭]\n * 第4行: [ABC] 0 [确定(占2格)]\n */\nexport const bankcardLayout: KeyboardConfig = {\n type: 'bankcard', // 键盘类型标识\n name: '银行卡键盘', // 键盘的显示名称\n supportShift: false, // 不支持 Shift 切换(纯数字键盘无需切换)\n rows: [ // 键盘的行数组\n // ---- 第1行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [ // 该行包含的按键数组\n createNumberKey('1'), // 数字键 1\n createNumberKey('2'), // 数字键 2\n createNumberKey('3'), // 数字键 3\n {\n id: 'backspace', // 退格键的唯一标识\n type: 'backspace', // 按键类型为退格,删除最后一个字符\n icon: ICON_DELETE, // 使用删除图标作为显示内容\n label: '', // 无文本标签(由图标替代)\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n },\n ],\n },\n // ---- 第2行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [\n createNumberKey('4'), // 数字键 4\n createNumberKey('5'), // 数字键 5\n createNumberKey('6'), // 数字键 6\n {\n id: 'clear', // 清除键的唯一标识\n type: 'clear', // 按键类型为清除,清空所有输入\n icon: ICON_CLEAR, // 使用清除图标作为显示内容\n label: '', // 无文本标签\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n },\n ],\n },\n // ---- 第3行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [\n createNumberKey('7'), // 数字键 7\n createNumberKey('8'), // 数字键 8\n createNumberKey('9'), // 数字键 9\n {\n id: 'close', // 关闭键的唯一标识\n type: 'close', // 按键类型为关闭,收起键盘\n label: '关闭', // 按钮上显示的文本\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n },\n ],\n },\n // ---- 第4行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [\n {\n id: 'switch-qwerty', // 切换到全键盘的按键唯一标识\n type: 'tab', // 按键类型为标签页切换\n label: 'ABC', // 按钮上显示的文本,提示可切换到字母键盘\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n data: { targetType: 'qwerty' }, // 附加数据,指定切换目标为 QWERTY 全键盘\n },\n createNumberKey('0'), // 数字键 0\n {\n id: 'done', // 确定键的唯一标识\n type: 'done', // 按键类型为确定,完成输入\n label: '确定', // 按钮上显示的文本\n width: 2, // 占据 2 个键的宽度\n className: 'key-numpad-done', // 确定键的 CSS 类名\n },\n ],\n },\n ],\n data: { // 键盘的附加数据\n maxLength: 19, // 银行卡号最大输入长度为 19 位\n inputType: 'bankcard', // 输入类型标识,用于外部判断\n },\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,YAAY;EAChB,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAUO,MAAM,iBAAiC;CAC5C,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EAEJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,SAAS;IAC/B;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF"}
1
+ {"version":3,"file":"bankcard.js","names":[],"sources":["../../src/layouts/bankcard.ts"],"sourcesContent":["/**\r\n * 银行卡键盘布局\r\n * @module layouts/bankcard\r\n */\r\n\r\n// 从类型定义文件中导入 KeyboardConfig(键盘配置)和 KeyDefinition(按键定义)类型\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\n// 从图标模块中导入删除键图标和清除键图标\r\nimport { ICON_CLEAR, ICON_DELETE } from '../icons'\r\n\r\n/**\r\n * 创建数字按键\r\n * @param num - 数字字符串(如 '0'-'9')\r\n * @returns 返回一个按键定义对象\r\n */\r\nfunction createNumberKey(num: string): KeyDefinition {\r\n return {\r\n id: `bankcard-${num}`, // 按键唯一标识符,格式为 bankcard-数字\r\n type: 'char', // 按键类型为字符键\r\n label: num, // 按键上显示的文本\r\n value: num, // 按键按下后输出的值\r\n className: 'key-num', // 按键的 CSS 类名,用于样式定制\r\n }\r\n}\r\n\r\n/**\r\n * 银行卡键盘配置 - 紧凑4x4布局\r\n * 布局结构:\r\n * 第1行: 1 2 3 [退格]\r\n * 第2行: 4 5 6 [清除]\r\n * 第3行: 7 8 9 [关闭]\r\n * 第4行: [ABC] 0 [确定(占2格)]\r\n */\r\nexport const bankcardLayout: KeyboardConfig = {\r\n type: 'bankcard', // 键盘类型标识\r\n name: '银行卡键盘', // 键盘的显示名称\r\n supportShift: false, // 不支持 Shift 切换(纯数字键盘无需切换)\r\n rows: [\r\n // 键盘的行数组\r\n // ---- 第1行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n // 该行包含的按键数组\r\n createNumberKey('1'), // 数字键 1\r\n createNumberKey('2'), // 数字键 2\r\n createNumberKey('3'), // 数字键 3\r\n {\r\n id: 'backspace', // 退格键的唯一标识\r\n type: 'backspace', // 按键类型为退格,删除最后一个字符\r\n icon: ICON_DELETE, // 使用删除图标作为显示内容\r\n label: '', // 无文本标签(由图标替代)\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n },\r\n ],\r\n },\r\n // ---- 第2行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n createNumberKey('4'), // 数字键 4\r\n createNumberKey('5'), // 数字键 5\r\n createNumberKey('6'), // 数字键 6\r\n {\r\n id: 'clear', // 清除键的唯一标识\r\n type: 'clear', // 按键类型为清除,清空所有输入\r\n icon: ICON_CLEAR, // 使用清除图标作为显示内容\r\n label: '', // 无文本标签\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n },\r\n ],\r\n },\r\n // ---- 第3行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n createNumberKey('7'), // 数字键 7\r\n createNumberKey('8'), // 数字键 8\r\n createNumberKey('9'), // 数字键 9\r\n {\r\n id: 'close', // 关闭键的唯一标识\r\n type: 'close', // 按键类型为关闭,收起键盘\r\n label: '关闭', // 按钮上显示的文本\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n },\r\n ],\r\n },\r\n // ---- 第4行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n {\r\n id: 'switch-qwerty', // 切换到全键盘的按键唯一标识\r\n type: 'tab', // 按键类型为标签页切换\r\n label: 'ABC', // 按钮上显示的文本,提示可切换到字母键盘\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n data: { targetType: 'qwerty' }, // 附加数据,指定切换目标为 QWERTY 全键盘\r\n },\r\n createNumberKey('0'), // 数字键 0\r\n {\r\n id: 'done', // 确定键的唯一标识\r\n type: 'done', // 按键类型为确定,完成输入\r\n label: '确定', // 按钮上显示的文本\r\n width: 2, // 占据 2 个键的宽度\r\n className: 'key-numpad-done', // 确定键的 CSS 类名\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n // 键盘的附加数据\r\n maxLength: 19, // 银行卡号最大输入长度为 19 位\r\n inputType: 'bankcard', // 输入类型标识,用于外部判断\r\n },\r\n}\r\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,YAAY;EAChB,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAUO,MAAM,iBAAiC;CAC5C,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EAGJ;GACE,WAAW;GACX,MAAM;IAEJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,SAAS;IAC/B;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EAEJ,WAAW;EACX,WAAW;CACb;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","names":[],"sources":["../../src/layouts/email.ts"],"sourcesContent":["/**\n * 邮箱键盘布局\n * @module layouts/email\n */\n\nimport type { KeyboardConfig, KeyDefinition } from '../types'\nimport { ICON_DELETE, ICON_SHIFT } from '../icons'\n\n/**\n * 创建字符按键(支持大小写)\n */\nfunction createCharKey(char: string): KeyDefinition {\n return {\n id: `email-char-${char.toLowerCase()}`,\n type: 'char',\n label: { lower: char.toLowerCase(), upper: char.toUpperCase() },\n value: { lower: char.toLowerCase(), upper: char.toUpperCase() },\n }\n}\n\n/**\n * 创建快捷片段按键\n */\nfunction snippet(label: string, id?: string): KeyDefinition {\n return {\n id: id || `email-snippet-${label.replace(/[^a-z0-9]/gi, '')}`,\n type: 'char',\n label,\n value: label,\n className: 'key-snippet',\n }\n}\n\n/**\n * 常见邮箱后缀列表\n */\nexport const EMAIL_SUFFIXES = [\n '@qq.com',\n '@163.com',\n '@126.com',\n '@gmail.com',\n '@outlook.com',\n '@hotmail.com',\n '@sina.com',\n '@sohu.com',\n '@icloud.com',\n '@foxmail.com',\n '@yeah.net',\n '@139.com',\n]\n\nexport const emailLayout: KeyboardConfig = {\n type: 'email',\n name: '邮箱键盘',\n supportShift: true,\n defaultUpperCase: false,\n switchable: ['symbol', 'number'],\n rows: [\n // QWERTY 第一行\n {\n keys: 'qwertyuiop'.split('').map(createCharKey),\n },\n // QWERTY 第二行\n {\n keys: 'asdfghjkl'.split('').map(createCharKey),\n },\n // QWERTY 第三行 + Shift + 退格\n {\n keys: [\n {\n id: 'shift',\n type: 'shift',\n icon: ICON_SHIFT,\n label: '',\n width: 1.5,\n className: 'key-shift',\n },\n ...'zxcvbnm'.split('').map(createCharKey),\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n width: 1.5,\n className: 'key-backspace',\n },\n ],\n },\n // 底部行:切换 + @ + 常用邮箱 + 符号 + 空格 + 完成\n {\n keys: [\n { id: 'switch-number', type: 'tab', label: '123', width: 1.25, className: 'key-switch', data: { targetType: 'number' } },\n {\n id: 'email-at',\n type: 'char',\n label: '@',\n value: '@',\n className: 'key-at',\n },\n {\n id: 'email-suffix',\n type: 'char',\n label: '.com',\n value: '',\n width: 1.5,\n className: 'key-suffix',\n options: EMAIL_SUFFIXES,\n },\n snippet('.', 'email-dot'),\n snippet('-', 'email-dash'),\n snippet('_', 'email-underscore'),\n { id: 'space', type: 'space', label: '', value: ' ', width: 2, className: 'key-space' },\n { id: 'email-done', type: 'done', label: '确定', width: 1.5, className: 'key-done' },\n ],\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,cAAc,MAA6B;CAClD,OAAO;EACL,IAAI,cAAc,KAAK,YAAY;EACnC,MAAM;EACN,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;EAC9D,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;CAChE;AACF;AAKA,SAAS,QAAQ,OAAe,IAA4B;CAC1D,OAAO;EACL,IAAI,MAAM,iBAAiB,MAAM,QAAQ,eAAe,EAAE;EAC1D,MAAM;EACN;EACA,OAAO;EACP,WAAW;CACb;AACF;AAKO,MAAM,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEO,MAAM,cAA8B;CACzC,MAAM;CACN,MAAM;CACN,cAAc;CACd,kBAAkB;CAClB,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EAEJ,EACE,MAAM,aAAa,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAChD;EAEA,EACE,MAAM,YAAY,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAC/C;EAEA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,GAAG,UAAU,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa;GACxC;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;EAEA,EACE,MAAM;GACJ;IAAE,IAAI;IAAiB,MAAM;IAAO,OAAO;IAAO,OAAO;IAAM,WAAW;IAAc,MAAM,EAAE,YAAY,SAAS;GAAE;GACvH;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,WAAW;IACX,SAAS;GACX;GACA,QAAQ,KAAK,WAAW;GACxB,QAAQ,KAAK,YAAY;GACzB,QAAQ,KAAK,kBAAkB;GAC/B;IAAE,IAAI;IAAS,MAAM;IAAS,OAAO;IAAI,OAAO;IAAK,OAAO;IAAG,WAAW;GAAY;GACtF;IAAE,IAAI;IAAc,MAAM;IAAQ,OAAO;IAAM,OAAO;IAAK,WAAW;GAAW;EACnF,EACF;CACF;AACF"}
1
+ {"version":3,"file":"email.js","names":[],"sources":["../../src/layouts/email.ts"],"sourcesContent":["/**\r\n * 邮箱键盘布局\r\n * @module layouts/email\r\n */\r\n\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\nimport { ICON_DELETE, ICON_SHIFT } from '../icons'\r\n\r\n/**\r\n * 创建字符按键(支持大小写)\r\n */\r\nfunction createCharKey(char: string): KeyDefinition {\r\n return {\r\n id: `email-char-${char.toLowerCase()}`,\r\n type: 'char',\r\n label: { lower: char.toLowerCase(), upper: char.toUpperCase() },\r\n value: { lower: char.toLowerCase(), upper: char.toUpperCase() },\r\n }\r\n}\r\n\r\n/**\r\n * 创建快捷片段按键\r\n */\r\nfunction snippet(label: string, id?: string): KeyDefinition {\r\n return {\r\n id: id || `email-snippet-${label.replace(/[^a-z0-9]/gi, '')}`,\r\n type: 'char',\r\n label,\r\n value: label,\r\n className: 'key-snippet',\r\n }\r\n}\r\n\r\n/**\r\n * 常见邮箱后缀列表\r\n */\r\nexport const EMAIL_SUFFIXES = [\r\n '@qq.com',\r\n '@163.com',\r\n '@126.com',\r\n '@gmail.com',\r\n '@outlook.com',\r\n '@hotmail.com',\r\n '@sina.com',\r\n '@sohu.com',\r\n '@icloud.com',\r\n '@foxmail.com',\r\n '@yeah.net',\r\n '@139.com',\r\n]\r\n\r\nexport const emailLayout: KeyboardConfig = {\r\n type: 'email',\r\n name: '邮箱键盘',\r\n supportShift: true,\r\n defaultUpperCase: false,\r\n switchable: ['symbol', 'number'],\r\n rows: [\r\n // QWERTY 第一行\r\n {\r\n keys: 'qwertyuiop'.split('').map(createCharKey),\r\n },\r\n // QWERTY 第二行\r\n {\r\n keys: 'asdfghjkl'.split('').map(createCharKey),\r\n },\r\n // QWERTY 第三行 + Shift + 退格\r\n {\r\n keys: [\r\n {\r\n id: 'shift',\r\n type: 'shift',\r\n icon: ICON_SHIFT,\r\n label: '',\r\n width: 1.5,\r\n className: 'key-shift',\r\n },\r\n ...'zxcvbnm'.split('').map(createCharKey),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n width: 1.5,\r\n className: 'key-backspace',\r\n },\r\n ],\r\n },\r\n // 底部行:切换 + @ + 常用邮箱 + 符号 + 空格 + 完成\r\n {\r\n keys: [\r\n {\r\n id: 'switch-number',\r\n type: 'tab',\r\n label: '123',\r\n width: 1.25,\r\n className: 'key-switch',\r\n data: { targetType: 'number' },\r\n },\r\n {\r\n id: 'email-at',\r\n type: 'char',\r\n label: '@',\r\n value: '@',\r\n className: 'key-at',\r\n },\r\n {\r\n id: 'email-suffix',\r\n type: 'char',\r\n label: '.com',\r\n value: '',\r\n width: 1.5,\r\n className: 'key-suffix',\r\n options: EMAIL_SUFFIXES,\r\n },\r\n snippet('.', 'email-dot'),\r\n snippet('-', 'email-dash'),\r\n snippet('_', 'email-underscore'),\r\n {\r\n id: 'space',\r\n type: 'space',\r\n label: '',\r\n value: ' ',\r\n width: 2,\r\n className: 'key-space',\r\n },\r\n {\r\n id: 'email-done',\r\n type: 'done',\r\n label: '确定',\r\n width: 1.5,\r\n className: 'key-done',\r\n },\r\n ],\r\n },\r\n ],\r\n}\r\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,cAAc,MAA6B;CAClD,OAAO;EACL,IAAI,cAAc,KAAK,YAAY;EACnC,MAAM;EACN,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;EAC9D,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;CAChE;AACF;AAKA,SAAS,QAAQ,OAAe,IAA4B;CAC1D,OAAO;EACL,IAAI,MAAM,iBAAiB,MAAM,QAAQ,eAAe,EAAE;EAC1D,MAAM;EACN;EACA,OAAO;EACP,WAAW;CACb;AACF;AAKO,MAAM,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEO,MAAM,cAA8B;CACzC,MAAM;CACN,MAAM;CACN,cAAc;CACd,kBAAkB;CAClB,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EAEJ,EACE,MAAM,aAAa,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAChD;EAEA,EACE,MAAM,YAAY,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAC/C;EAEA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,GAAG,UAAU,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa;GACxC;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;EAEA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,WAAW;IACX,SAAS;GACX;GACA,QAAQ,KAAK,WAAW;GACxB,QAAQ,KAAK,YAAY;GACzB,QAAQ,KAAK,kBAAkB;GAC/B;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;CACF;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"idcard.js","names":[],"sources":["../../src/layouts/idcard.ts"],"sourcesContent":["/**\n * 身份证号键盘布局\n * @module layouts/idcard\n */\n\n// 从类型定义文件中导入 KeyboardConfig(键盘配置)和 KeyDefinition(按键定义)类型\nimport type { KeyboardConfig, KeyDefinition } from '../types'\n// 从图标模块中导入删除键图标和清除键图标\nimport { ICON_DELETE, ICON_CLEAR } from '../icons'\n\n/**\n * 创建数字按键\n * @param num - 数字字符串(如 '0'-'9')\n * @returns 返回一个按键定义对象\n */\nfunction createNumberKey(num: string): KeyDefinition {\n return {\n id: `idcard-${num}`, // 按键唯一标识符,格式为 idcard-数字\n type: 'char', // 按键类型为字符键\n label: num, // 按键上显示的文本\n value: num, // 按键按下后输出的值\n className: 'key-num', // 按键的 CSS 类名,用于样式定制\n }\n}\n\n/**\n * 身份证号键盘配置\n * 紧凑3x4布局,无空白位置\n * 布局结构:\n * 第1行: 1 2 3 [退格]\n * 第2行: 4 5 6 [清除]\n * 第3行: 7 8 9 X\n * 第4行: [关闭] 0 [确定(占2格)]\n */\nexport const idcardLayout: KeyboardConfig = {\n type: 'idcard', // 键盘类型标识\n name: '身份证键盘', // 键盘的显示名称\n supportShift: false, // 不支持 Shift 切换(纯数字+X键盘无需切换)\n rows: [ // 键盘的行数组\n // ---- 第1行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [ // 该行包含的按键数组\n createNumberKey('1'), // 数字键 1\n createNumberKey('2'), // 数字键 2\n createNumberKey('3'), // 数字键 3\n {\n id: 'backspace', // 退格键的唯一标识\n type: 'backspace', // 按键类型为退格,删除最后一个字符\n icon: ICON_DELETE, // 使用删除图标作为显示内容\n label: '', // 无文本标签(由图标替代)\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n },\n ],\n },\n // ---- 第2行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [\n createNumberKey('4'), // 数字键 4\n createNumberKey('5'), // 数字键 5\n createNumberKey('6'), // 数字键 6\n {\n id: 'clear', // 清除键的唯一标识\n type: 'clear', // 按键类型为清除,清空所有输入\n icon: ICON_CLEAR, // 使用清除图标作为显示内容\n label: '', // 无文本标签\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n },\n ],\n },\n // ---- 第3行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [\n createNumberKey('7'), // 数字键 7\n createNumberKey('8'), // 数字键 8\n createNumberKey('9'), // 数字键 9\n {\n id: 'idcard-x', // X 键的唯一标识\n type: 'char', // 按键类型为字符\n label: 'X', // 按钮上显示的文本(身份证尾号可能是X)\n value: 'X', // 按下后输出的值\n className: 'key-num', // 使用数字键的 CSS 类名,保持外观一致\n },\n ],\n },\n // ---- 第4行 ----\n {\n className: 'numpad-row', // 行的 CSS 类名\n keys: [\n {\n id: 'close', // 关闭键的唯一标识\n type: 'close', // 按键类型为关闭,收起键盘\n label: '关闭', // 按钮上显示的文本\n className: 'key-numpad-fn', // 功能键的 CSS 类名\n },\n createNumberKey('0'), // 数字键 0\n {\n id: 'done', // 确定键的唯一标识\n type: 'done', // 按键类型为确定,完成输入\n label: '确定', // 按钮上显示的文本\n width: 2, // 占据 2 个键的宽度\n className: 'key-numpad-done', // 确定键的 CSS 类名\n },\n ],\n },\n ],\n data: { // 键盘的附加数据\n maxLength: 18, // 身份证号最大输入长度为 18 位\n inputType: 'idcard', // 输入类型标识,用于外部判断\n },\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,UAAU;EACd,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAWO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EAEJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF"}
1
+ {"version":3,"file":"idcard.js","names":[],"sources":["../../src/layouts/idcard.ts"],"sourcesContent":["/**\r\n * 身份证号键盘布局\r\n * @module layouts/idcard\r\n */\r\n\r\n// 从类型定义文件中导入 KeyboardConfig(键盘配置)和 KeyDefinition(按键定义)类型\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\n// 从图标模块中导入删除键图标和清除键图标\r\nimport { ICON_CLEAR, ICON_DELETE } from '../icons'\r\n\r\n/**\r\n * 创建数字按键\r\n * @param num - 数字字符串(如 '0'-'9')\r\n * @returns 返回一个按键定义对象\r\n */\r\nfunction createNumberKey(num: string): KeyDefinition {\r\n return {\r\n id: `idcard-${num}`, // 按键唯一标识符,格式为 idcard-数字\r\n type: 'char', // 按键类型为字符键\r\n label: num, // 按键上显示的文本\r\n value: num, // 按键按下后输出的值\r\n className: 'key-num', // 按键的 CSS 类名,用于样式定制\r\n }\r\n}\r\n\r\n/**\r\n * 身份证号键盘配置\r\n * 紧凑3x4布局,无空白位置\r\n * 布局结构:\r\n * 第1行: 1 2 3 [退格]\r\n * 第2行: 4 5 6 [清除]\r\n * 第3行: 7 8 9 X\r\n * 第4行: [关闭] 0 [确定(占2格)]\r\n */\r\nexport const idcardLayout: KeyboardConfig = {\r\n type: 'idcard', // 键盘类型标识\r\n name: '身份证键盘', // 键盘的显示名称\r\n supportShift: false, // 不支持 Shift 切换(纯数字+X键盘无需切换)\r\n rows: [\r\n // 键盘的行数组\r\n // ---- 第1行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n // 该行包含的按键数组\r\n createNumberKey('1'), // 数字键 1\r\n createNumberKey('2'), // 数字键 2\r\n createNumberKey('3'), // 数字键 3\r\n {\r\n id: 'backspace', // 退格键的唯一标识\r\n type: 'backspace', // 按键类型为退格,删除最后一个字符\r\n icon: ICON_DELETE, // 使用删除图标作为显示内容\r\n label: '', // 无文本标签(由图标替代)\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n },\r\n ],\r\n },\r\n // ---- 第2行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n createNumberKey('4'), // 数字键 4\r\n createNumberKey('5'), // 数字键 5\r\n createNumberKey('6'), // 数字键 6\r\n {\r\n id: 'clear', // 清除键的唯一标识\r\n type: 'clear', // 按键类型为清除,清空所有输入\r\n icon: ICON_CLEAR, // 使用清除图标作为显示内容\r\n label: '', // 无文本标签\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n },\r\n ],\r\n },\r\n // ---- 第3行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n createNumberKey('7'), // 数字键 7\r\n createNumberKey('8'), // 数字键 8\r\n createNumberKey('9'), // 数字键 9\r\n {\r\n id: 'idcard-x', // X 键的唯一标识\r\n type: 'char', // 按键类型为字符\r\n label: 'X', // 按钮上显示的文本(身份证尾号可能是X)\r\n value: 'X', // 按下后输出的值\r\n className: 'key-num', // 使用数字键的 CSS 类名,保持外观一致\r\n },\r\n ],\r\n },\r\n // ---- 第4行 ----\r\n {\r\n className: 'numpad-row', // 行的 CSS 类名\r\n keys: [\r\n {\r\n id: 'close', // 关闭键的唯一标识\r\n type: 'close', // 按键类型为关闭,收起键盘\r\n label: '关闭', // 按钮上显示的文本\r\n className: 'key-numpad-fn', // 功能键的 CSS 类名\r\n },\r\n createNumberKey('0'), // 数字键 0\r\n {\r\n id: 'done', // 确定键的唯一标识\r\n type: 'done', // 按键类型为确定,完成输入\r\n label: '确定', // 按钮上显示的文本\r\n width: 2, // 占据 2 个键的宽度\r\n className: 'key-numpad-done', // 确定键的 CSS 类名\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n // 键盘的附加数据\r\n maxLength: 18, // 身份证号最大输入长度为 18 位\r\n inputType: 'idcard', // 输入类型标识,用于外部判断\r\n },\r\n}\r\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,UAAU;EACd,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAWO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EAGJ;GACE,WAAW;GACX,MAAM;IAEJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EAEJ,WAAW;EACX,WAAW;CACb;AACF"}
@@ -2,46 +2,46 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
9
9
  */
10
- import { qwertyLayout } from "./qwerty.js";
11
- import { integerLayout, numberLayout } from "./number.js";
12
- import { symbolLayout, symbolLayout2 } from "./symbol.js";
13
- import { PLATE_LETTERS, PROVINCES, licensePlateAlphanumericLayout, licensePlateLayout, licensePlateLetterLayout, licensePlateProvinceLayout } from "./license-plate.js";
14
- import { idcardLayout } from "./idcard.js";
15
- import { phoneLayout, phoneSimpleLayout } from "./phone.js";
16
10
  import { amountLayout, amountSimpleLayout } from "./amount.js";
17
11
  import { bankcardLayout } from "./bankcard.js";
18
- import { verifycodeLayout } from "./verifycode.js";
19
12
  import { EMAIL_SUFFIXES, emailLayout } from "./email.js";
20
- import { urlLayout } from "./url.js";
21
- import { searchLayout } from "./search.js";
13
+ import { idcardLayout } from "./idcard.js";
14
+ import { PLATE_LETTERS, PROVINCES, licensePlateAlphanumericLayout, licensePlateLayout, licensePlateLetterLayout, licensePlateProvinceLayout } from "./license-plate.js";
15
+ import { integerLayout, numberLayout } from "./number.js";
16
+ import { phoneLayout, phoneSimpleLayout } from "./phone.js";
22
17
  import { punctLayout } from "./punct.js";
18
+ import { qwertyLayout } from "./qwerty.js";
19
+ import { searchLayout } from "./search.js";
20
+ import { symbolLayout, symbolLayout2 } from "./symbol.js";
21
+ import { urlLayout } from "./url.js";
22
+ import { verifycodeLayout } from "./verifycode.js";
23
23
  //#region src/layouts/index.ts
24
24
  const builtinLayouts = {
25
- "qwerty": qwertyLayout,
26
- "number": numberLayout,
27
- "integer": integerLayout,
28
- "symbol": symbolLayout,
25
+ qwerty: qwertyLayout,
26
+ number: numberLayout,
27
+ integer: integerLayout,
28
+ symbol: symbolLayout,
29
29
  "symbol-2": symbolLayout2,
30
30
  "license-plate": licensePlateLayout,
31
31
  "license-plate-province": licensePlateProvinceLayout,
32
32
  "license-plate-letter": licensePlateLetterLayout,
33
33
  "license-plate-alphanumeric": licensePlateAlphanumericLayout,
34
- "idcard": idcardLayout,
35
- "phone": phoneLayout,
34
+ idcard: idcardLayout,
35
+ phone: phoneLayout,
36
36
  "phone-simple": phoneSimpleLayout,
37
- "amount": amountLayout,
37
+ amount: amountLayout,
38
38
  "amount-simple": amountSimpleLayout,
39
- "bankcard": bankcardLayout,
40
- "verifycode": verifycodeLayout,
41
- "email": emailLayout,
42
- "url": urlLayout,
43
- "search": searchLayout,
44
- "punct": punctLayout
39
+ bankcard: bankcardLayout,
40
+ verifycode: verifycodeLayout,
41
+ email: emailLayout,
42
+ url: urlLayout,
43
+ search: searchLayout,
44
+ punct: punctLayout
45
45
  };
46
46
  const customLayouts = {};
47
47
  function registerLayout(name, layout) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/layouts/index.ts"],"sourcesContent":["/**\n * 键盘布局管理\n * @module layouts\n */\n\nimport type { KeyboardConfig, KeyboardType } from '../types'\nimport { qwertyLayout } from './qwerty'\nimport { integerLayout, numberLayout } from './number'\nimport { symbolLayout, symbolLayout2 } from './symbol'\nimport {\n licensePlateAlphanumericLayout,\n licensePlateLayout,\n licensePlateLetterLayout,\n licensePlateProvinceLayout,\n PLATE_LETTERS,\n PROVINCES,\n} from './license-plate'\nimport { idcardLayout } from './idcard'\nimport { phoneLayout, phoneSimpleLayout } from './phone'\nimport { amountLayout, amountSimpleLayout } from './amount'\nimport { bankcardLayout } from './bankcard'\nimport { verifycodeLayout } from './verifycode'\nimport { emailLayout, EMAIL_SUFFIXES } from './email'\nimport { urlLayout } from './url'\nimport { searchLayout } from './search'\nimport { punctLayout } from './punct'\n\n// 导出所有布局\nexport {\n qwertyLayout,\n numberLayout,\n integerLayout,\n symbolLayout,\n symbolLayout2,\n licensePlateLayout,\n licensePlateProvinceLayout,\n licensePlateLetterLayout,\n licensePlateAlphanumericLayout,\n PROVINCES,\n PLATE_LETTERS,\n // 场景化键盘\n idcardLayout,\n phoneLayout,\n phoneSimpleLayout,\n amountLayout,\n amountSimpleLayout,\n bankcardLayout,\n verifycodeLayout,\n // 输入场景键盘\n emailLayout,\n urlLayout,\n searchLayout,\n EMAIL_SUFFIXES,\n // 标点键盘\n punctLayout,\n}\n\n/**\n * 内置布局映射\n */\nconst builtinLayouts: Record<string, KeyboardConfig> = {\n 'qwerty': qwertyLayout,\n 'number': numberLayout,\n 'integer': integerLayout,\n 'symbol': symbolLayout,\n 'symbol-2': symbolLayout2,\n 'license-plate': licensePlateLayout,\n 'license-plate-province': licensePlateProvinceLayout,\n 'license-plate-letter': licensePlateLetterLayout,\n 'license-plate-alphanumeric': licensePlateAlphanumericLayout,\n // 场景化键盘\n 'idcard': idcardLayout,\n 'phone': phoneLayout,\n 'phone-simple': phoneSimpleLayout,\n 'amount': amountLayout,\n 'amount-simple': amountSimpleLayout,\n 'bankcard': bankcardLayout,\n 'verifycode': verifycodeLayout,\n // 输入场景键盘\n 'email': emailLayout,\n 'url': urlLayout,\n 'search': searchLayout,\n // 标点键盘\n 'punct': punctLayout,\n}\n\n/**\n * 自定义布局存储\n */\nconst customLayouts: Record<string, KeyboardConfig> = {}\n\n/**\n * 注册自定义布局\n * @param name - 布局名称\n * @param layout - 布局配置\n */\nexport function registerLayout(name: string, layout: KeyboardConfig): void {\n if (builtinLayouts[name]) {\n console.warn(`[Keyboard] Cannot override builtin layout \"${name}\"`)\n return\n }\n customLayouts[name] = layout\n}\n\n/**\n * 获取布局配置\n * @param type - 键盘类型或布局名称\n * @returns 布局配置,如果不存在则返回 undefined\n */\nexport function getLayout(type: KeyboardType | string): KeyboardConfig | undefined {\n return customLayouts[type] || builtinLayouts[type]\n}\n\n/**\n * 获取所有可用布局名称\n * @returns 布局名称数组\n */\nexport function getAvailableLayouts(): string[] {\n return [...Object.keys(builtinLayouts), ...Object.keys(customLayouts)]\n}\n\n/**\n * 检查布局是否存在\n * @param name - 布局名称\n * @returns 是否存在\n */\nexport function hasLayout(name: string): boolean {\n return name in builtinLayouts || name in customLayouts\n}\n\n/**\n * 移除自定义布局\n * @param name - 布局名称\n * @returns 是否成功移除\n */\nexport function unregisterLayout(name: string): boolean {\n if (name in customLayouts) {\n delete customLayouts[name]\n return true\n }\n return false\n}\n\n/**\n * 批量注册布局\n * @param layouts - 布局映射对象\n */\nexport function registerLayouts(layouts: Record<string, KeyboardConfig>): void {\n Object.entries(layouts).forEach(([name, layout]) => {\n registerLayout(name, layout)\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4DA,MAAM,iBAAiD;CACrD,UAAU;CACV,UAAU;CACV,WAAW;CACX,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,0BAA0B;CAC1B,wBAAwB;CACxB,8BAA8B;CAE9B,UAAU;CACV,SAAS;CACT,gBAAgB;CAChB,UAAU;CACV,iBAAiB;CACjB,YAAY;CACZ,cAAc;CAEd,SAAS;CACT,OAAO;CACP,UAAU;CAEV,SAAS;AACX;AAKA,MAAM,gBAAgD,CAAC;AAOhD,SAAS,eAAe,MAAc,QAA8B;CACzE,IAAI,eAAe,OAAO;EACxB,QAAQ,KAAK,8CAA8C,KAAI,EAAG;EAClE;CACF;CACA,cAAc,QAAQ;AACxB;AAOO,SAAS,UAAU,MAAyD;CACjF,OAAO,cAAc,SAAS,eAAe;AAC/C;AAMO,SAAS,sBAAgC;CAC9C,OAAO,CAAC,GAAG,OAAO,KAAK,cAAc,GAAG,GAAG,OAAO,KAAK,aAAa,CAAC;AACvE;AAOO,SAAS,UAAU,MAAuB;CAC/C,OAAO,QAAQ,kBAAkB,QAAQ;AAC3C;AAOO,SAAS,iBAAiB,MAAuB;CACtD,IAAI,QAAQ,eAAe;EACzB,OAAO,cAAc;EACrB,OAAO;CACT;CACA,OAAO;AACT;AAMO,SAAS,gBAAgB,SAA+C;CAC7E,OAAO,QAAQ,OAAO,CAAA,CAAE,SAAS,CAAC,MAAM,YAAY;EAClD,eAAe,MAAM,MAAM;CAC7B,CAAC;AACH"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/layouts/index.ts"],"sourcesContent":["/**\r\n * 键盘布局管理\r\n * @module layouts\r\n */\r\n\r\nimport type { KeyboardConfig, KeyboardType } from '../types'\r\nimport { amountLayout, amountSimpleLayout } from './amount'\r\nimport { bankcardLayout } from './bankcard'\r\nimport { EMAIL_SUFFIXES, emailLayout } from './email'\r\nimport { idcardLayout } from './idcard'\r\nimport {\r\n licensePlateAlphanumericLayout,\r\n licensePlateLayout,\r\n licensePlateLetterLayout,\r\n licensePlateProvinceLayout,\r\n PLATE_LETTERS,\r\n PROVINCES,\r\n} from './license-plate'\r\nimport { integerLayout, numberLayout } from './number'\r\nimport { phoneLayout, phoneSimpleLayout } from './phone'\r\nimport { punctLayout } from './punct'\r\nimport { qwertyLayout } from './qwerty'\r\nimport { searchLayout } from './search'\r\nimport { symbolLayout, symbolLayout2 } from './symbol'\r\nimport { urlLayout } from './url'\r\nimport { verifycodeLayout } from './verifycode'\r\n\r\n// 导出所有布局\r\nexport {\r\n amountLayout,\r\n amountSimpleLayout,\r\n bankcardLayout,\r\n EMAIL_SUFFIXES,\r\n // 输入场景键盘\r\n emailLayout,\r\n // 场景化键盘\r\n idcardLayout,\r\n integerLayout,\r\n licensePlateAlphanumericLayout,\r\n licensePlateLayout,\r\n licensePlateLetterLayout,\r\n licensePlateProvinceLayout,\r\n numberLayout,\r\n phoneLayout,\r\n phoneSimpleLayout,\r\n PLATE_LETTERS,\r\n PROVINCES,\r\n // 标点键盘\r\n punctLayout,\r\n qwertyLayout,\r\n searchLayout,\r\n symbolLayout,\r\n symbolLayout2,\r\n urlLayout,\r\n verifycodeLayout,\r\n}\r\n\r\n/**\r\n * 内置布局映射\r\n */\r\nconst builtinLayouts: Record<string, KeyboardConfig> = {\r\n qwerty: qwertyLayout,\r\n number: numberLayout,\r\n integer: integerLayout,\r\n symbol: symbolLayout,\r\n 'symbol-2': symbolLayout2,\r\n 'license-plate': licensePlateLayout,\r\n 'license-plate-province': licensePlateProvinceLayout,\r\n 'license-plate-letter': licensePlateLetterLayout,\r\n 'license-plate-alphanumeric': licensePlateAlphanumericLayout,\r\n // 场景化键盘\r\n idcard: idcardLayout,\r\n phone: phoneLayout,\r\n 'phone-simple': phoneSimpleLayout,\r\n amount: amountLayout,\r\n 'amount-simple': amountSimpleLayout,\r\n bankcard: bankcardLayout,\r\n verifycode: verifycodeLayout,\r\n // 输入场景键盘\r\n email: emailLayout,\r\n url: urlLayout,\r\n search: searchLayout,\r\n // 标点键盘\r\n punct: punctLayout,\r\n}\r\n\r\n/**\r\n * 自定义布局存储\r\n */\r\nconst customLayouts: Record<string, KeyboardConfig> = {}\r\n\r\n/**\r\n * 注册自定义布局\r\n * @param name - 布局名称\r\n * @param layout - 布局配置\r\n */\r\nexport function registerLayout(name: string, layout: KeyboardConfig): void {\r\n if (builtinLayouts[name]) {\r\n console.warn(`[Keyboard] Cannot override builtin layout \"${name}\"`)\r\n return\r\n }\r\n customLayouts[name] = layout\r\n}\r\n\r\n/**\r\n * 获取布局配置\r\n * @param type - 键盘类型或布局名称\r\n * @returns 布局配置,如果不存在则返回 undefined\r\n */\r\nexport function getLayout(\r\n type: KeyboardType | string\r\n): KeyboardConfig | undefined {\r\n return customLayouts[type] || builtinLayouts[type]\r\n}\r\n\r\n/**\r\n * 获取所有可用布局名称\r\n * @returns 布局名称数组\r\n */\r\nexport function getAvailableLayouts(): string[] {\r\n return [...Object.keys(builtinLayouts), ...Object.keys(customLayouts)]\r\n}\r\n\r\n/**\r\n * 检查布局是否存在\r\n * @param name - 布局名称\r\n * @returns 是否存在\r\n */\r\nexport function hasLayout(name: string): boolean {\r\n return name in builtinLayouts || name in customLayouts\r\n}\r\n\r\n/**\r\n * 移除自定义布局\r\n * @param name - 布局名称\r\n * @returns 是否成功移除\r\n */\r\nexport function unregisterLayout(name: string): boolean {\r\n if (name in customLayouts) {\r\n delete customLayouts[name]\r\n return true\r\n }\r\n return false\r\n}\r\n\r\n/**\r\n * 批量注册布局\r\n * @param layouts - 布局映射对象\r\n */\r\nexport function registerLayouts(layouts: Record<string, KeyboardConfig>): void {\r\n Object.entries(layouts).forEach(([name, layout]) => {\r\n registerLayout(name, layout)\r\n })\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4DA,MAAM,iBAAiD;CACrD,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,iBAAiB;CACjB,0BAA0B;CAC1B,wBAAwB;CACxB,8BAA8B;CAE9B,QAAQ;CACR,OAAO;CACP,gBAAgB;CAChB,QAAQ;CACR,iBAAiB;CACjB,UAAU;CACV,YAAY;CAEZ,OAAO;CACP,KAAK;CACL,QAAQ;CAER,OAAO;AACT;AAKA,MAAM,gBAAgD,CAAC;AAOhD,SAAS,eAAe,MAAc,QAA8B;CACzE,IAAI,eAAe,OAAO;EACxB,QAAQ,KAAK,8CAA8C,KAAI,EAAG;EAClE;CACF;CACA,cAAc,QAAQ;AACxB;AAOO,SAAS,UACd,MAC4B;CAC5B,OAAO,cAAc,SAAS,eAAe;AAC/C;AAMO,SAAS,sBAAgC;CAC9C,OAAO,CAAC,GAAG,OAAO,KAAK,cAAc,GAAG,GAAG,OAAO,KAAK,aAAa,CAAC;AACvE;AAOO,SAAS,UAAU,MAAuB;CAC/C,OAAO,QAAQ,kBAAkB,QAAQ;AAC3C;AAOO,SAAS,iBAAiB,MAAuB;CACtD,IAAI,QAAQ,eAAe;EACzB,OAAO,cAAc;EACrB,OAAO;CACT;CACA,OAAO;AACT;AAMO,SAAS,gBAAgB,SAA+C;CAC7E,OAAO,QAAQ,OAAO,CAAA,CAAE,SAAS,CAAC,MAAM,YAAY;EAClD,eAAe,MAAM,MAAM;CAC7B,CAAC;AACH"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"license-plate.js","names":[],"sources":["../../src/layouts/license-plate.ts"],"sourcesContent":["/**\n * 车牌号键盘布局\n * @module layouts/license-plate\n * 省份键盘类似26键布局,点击省份后自动切换到字母数字键盘\n */\n\nimport type { KeyboardConfig, KeyDefinition } from '../types'\nimport { ICON_DELETE } from '../icons'\n\n/**\n * 省份简称列表(按地理区域排列,10列布局)\n */\nexport const PROVINCES = [\n '京', '津', '沪', '渝', '冀', '豫', '云', '辽', '黑', '湘',\n '皖', '鲁', '新', '苏', '浙', '赣', '鄂', '桂', '甘', '晋',\n '蒙', '陕', '吉', '闽', '贵', '粤', '青', '藏', '川', '宁',\n '琼', '港', '澳',\n]\n\n/**\n * 车牌字母(排除 I 和 O,避免与数字混淆)\n */\nexport const PLATE_LETTERS = [\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K',\n 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',\n 'W', 'X', 'Y', 'Z',\n]\n\n/**\n * 创建省份按键(点击后自动切换到字母数字键盘)\n */\nfunction createProvinceKey(province: string): KeyDefinition {\n return {\n id: `province-${province}`,\n type: 'char',\n label: province,\n value: province,\n className: 'key-plate-province',\n data: { switchAfterInput: 'license-plate-alphanumeric' },\n }\n}\n\n/**\n * 创建字母按键\n */\nfunction createLetterKey(letter: string): KeyDefinition {\n return {\n id: `letter-${letter}`,\n type: 'char',\n label: letter,\n value: letter,\n className: 'key-plate-letter',\n }\n}\n\n/**\n * 创建数字按键\n */\nfunction createNumberKey(num: string): KeyDefinition {\n return {\n id: `num-${num}`,\n type: 'char',\n label: num,\n value: num,\n className: 'key-plate-number',\n }\n}\n\n/**\n * 省份键盘配置 - 类似26键布局\n * 10列布局,更紧凑美观\n */\nexport const licensePlateProvinceLayout: KeyboardConfig = {\n type: 'license-plate-province',\n name: '省份简称',\n supportShift: false,\n rows: [\n {\n className: 'plate-keyboard-row',\n keys: PROVINCES.slice(0, 10).map(createProvinceKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: PROVINCES.slice(10, 20).map(createProvinceKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: PROVINCES.slice(20, 30).map(createProvinceKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: [\n ...PROVINCES.slice(30, 33).map(createProvinceKey),\n {\n id: 'plate-xue',\n type: 'char',\n label: '学',\n value: '学',\n className: 'key-plate-special',\n data: { switchAfterInput: 'license-plate-alphanumeric' },\n },\n {\n id: 'plate-jing',\n type: 'char',\n label: '警',\n value: '警',\n className: 'key-plate-special',\n data: { switchAfterInput: 'license-plate-alphanumeric' },\n },\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n width: 1.5,\n className: 'key-plate-fn',\n },\n {\n id: 'done',\n type: 'done',\n label: '确定',\n width: 2.5,\n className: 'key-plate-done',\n },\n ],\n },\n ],\n data: {\n maxLength: 8,\n inputType: 'license-plate',\n },\n}\n\n/**\n * 字母数字键盘配置(车牌第2-8位)\n * 10列布局\n */\nexport const licensePlateAlphanumericLayout: KeyboardConfig = {\n type: 'license-plate-alphanumeric',\n name: '字母数字',\n supportShift: false,\n rows: [\n {\n className: 'plate-keyboard-row',\n keys: '1234567890'.split('').map(createNumberKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: PLATE_LETTERS.slice(0, 10).map(createLetterKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: [\n ...PLATE_LETTERS.slice(10, 19).map(createLetterKey),\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n className: 'key-plate-fn',\n },\n ],\n },\n {\n className: 'plate-keyboard-row',\n keys: [\n {\n id: 'switch-province',\n type: 'tab',\n label: '省份',\n width: 1.5,\n className: 'key-plate-switch',\n data: { targetType: 'license-plate-province' },\n },\n ...PLATE_LETTERS.slice(19, 24).map(createLetterKey),\n {\n id: 'plate-xue',\n type: 'char',\n label: '学',\n value: '学',\n className: 'key-plate-special',\n },\n {\n id: 'plate-jing',\n type: 'char',\n label: '警',\n value: '警',\n className: 'key-plate-special',\n },\n {\n id: 'done',\n type: 'done',\n label: '确定',\n width: 1.5,\n className: 'key-plate-done',\n },\n ],\n },\n ],\n data: {\n maxLength: 8,\n inputType: 'license-plate',\n },\n}\n\n/**\n * 纯字母键盘配置(车牌第2位,只能输入字母)\n * 6列布局,排除 I 和 O\n */\nexport const licensePlateLetterLayout: KeyboardConfig = {\n type: 'license-plate-letter',\n name: '字母',\n supportShift: false,\n rows: [\n {\n className: 'plate-keyboard-row',\n keys: PLATE_LETTERS.slice(0, 8).map(createLetterKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: PLATE_LETTERS.slice(8, 16).map(createLetterKey),\n },\n {\n className: 'plate-keyboard-row',\n keys: [\n ...PLATE_LETTERS.slice(16, 24).map(createLetterKey),\n ],\n },\n {\n className: 'plate-keyboard-row',\n keys: [\n {\n id: 'switch-province',\n type: 'tab',\n label: '省份',\n width: 2,\n className: 'key-plate-switch',\n data: { targetType: 'license-plate-province' },\n },\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n width: 2,\n className: 'key-plate-fn',\n },\n {\n id: 'done',\n type: 'done',\n label: '确定',\n width: 2,\n className: 'key-plate-done',\n },\n ],\n },\n ],\n data: {\n maxLength: 8,\n inputType: 'license-plate',\n },\n}\n\n/**\n * 完整车牌号键盘(自动切换模式)\n * 默认显示省份键盘,点击省份后自动切换到字母数字键盘\n */\nexport const licensePlateLayout: KeyboardConfig = {\n type: 'license-plate',\n name: '车牌号键盘',\n supportShift: false,\n data: {\n autoSwitch: true,\n maxLength: 8,\n inputType: 'license-plate',\n },\n rows: licensePlateProvinceLayout.rows,\n}\n"],"mappings":";;;;;;;;;;;AAYO,MAAM,YAAY;CACvB;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC7C;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC7C;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC7C;CAAK;CAAK;AACZ;AAKO,MAAM,gBAAgB;CAC3B;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC7C;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC7C;CAAK;CAAK;CAAK;AACjB;AAKA,SAAS,kBAAkB,UAAiC;CAC1D,OAAO;EACL,IAAI,YAAY;EAChB,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;EACX,MAAM,EAAE,kBAAkB,6BAA6B;CACzD;AACF;AAKA,SAAS,gBAAgB,QAA+B;CACtD,OAAO;EACL,IAAI,UAAU;EACd,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAKA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,OAAO;EACX,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAMO,MAAM,6BAA6C;CACxD,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM,UAAU,MAAM,GAAG,EAAE,CAAA,CAAE,IAAI,iBAAiB;EACpD;EACA;GACE,WAAW;GACX,MAAM,UAAU,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,iBAAiB;EACrD;EACA;GACE,WAAW;GACX,MAAM,UAAU,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,iBAAiB;EACrD;EACA;GACE,WAAW;GACX,MAAM;IACJ,GAAG,UAAU,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,iBAAiB;IAChD;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,kBAAkB,6BAA6B;IACzD;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,kBAAkB,6BAA6B;IACzD;IACA;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAMO,MAAM,iCAAiD;CAC5D,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM,aAAa,MAAM,EAAE,CAAA,CAAE,IAAI,eAAe;EAClD;EACA;GACE,WAAW;GACX,MAAM,cAAc,MAAM,GAAG,EAAE,CAAA,CAAE,IAAI,eAAe;EACtD;EACA;GACE,WAAW;GACX,MAAM,CACJ,GAAG,cAAc,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,eAAe,GAClD;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,WAAW;GACb,CACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,yBAAyB;IAC/C;IACA,GAAG,cAAc,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,eAAe;IAClD;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAMO,MAAM,2BAA2C;CACtD,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM,cAAc,MAAM,GAAG,CAAC,CAAA,CAAE,IAAI,eAAe;EACrD;EACA;GACE,WAAW;GACX,MAAM,cAAc,MAAM,GAAG,EAAE,CAAA,CAAE,IAAI,eAAe;EACtD;EACA;GACE,WAAW;GACX,MAAM,CACJ,GAAG,cAAc,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,eAAe,CACpD;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,yBAAyB;IAC/C;IACA;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAMO,MAAM,qBAAqC;CAChD,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ,YAAY;EACZ,WAAW;EACX,WAAW;CACb;CACA,MAAM,2BAA2B;AACnC"}
1
+ {"version":3,"file":"license-plate.js","names":[],"sources":["../../src/layouts/license-plate.ts"],"sourcesContent":["/**\r\n * 车牌号键盘布局\r\n * @module layouts/license-plate\r\n * 省份键盘类似26键布局,点击省份后自动切换到字母数字键盘\r\n */\r\n\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\nimport { ICON_DELETE } from '../icons'\r\n\r\n/**\r\n * 省份简称列表(按地理区域排列,10列布局)\r\n */\r\nexport const PROVINCES = [\r\n '京',\r\n '津',\r\n '沪',\r\n '渝',\r\n '冀',\r\n '豫',\r\n '云',\r\n '辽',\r\n '黑',\r\n '湘',\r\n '皖',\r\n '鲁',\r\n '新',\r\n '苏',\r\n '浙',\r\n '赣',\r\n '鄂',\r\n '桂',\r\n '甘',\r\n '晋',\r\n '蒙',\r\n '陕',\r\n '吉',\r\n '闽',\r\n '贵',\r\n '粤',\r\n '青',\r\n '藏',\r\n '川',\r\n '宁',\r\n '琼',\r\n '港',\r\n '澳',\r\n]\r\n\r\n/**\r\n * 车牌字母(排除 I 和 O,避免与数字混淆)\r\n */\r\nexport const PLATE_LETTERS = [\r\n 'A',\r\n 'B',\r\n 'C',\r\n 'D',\r\n 'E',\r\n 'F',\r\n 'G',\r\n 'H',\r\n 'J',\r\n 'K',\r\n 'L',\r\n 'M',\r\n 'N',\r\n 'P',\r\n 'Q',\r\n 'R',\r\n 'S',\r\n 'T',\r\n 'U',\r\n 'V',\r\n 'W',\r\n 'X',\r\n 'Y',\r\n 'Z',\r\n]\r\n\r\n/**\r\n * 创建省份按键(点击后自动切换到字母数字键盘)\r\n */\r\nfunction createProvinceKey(province: string): KeyDefinition {\r\n return {\r\n id: `province-${province}`,\r\n type: 'char',\r\n label: province,\r\n value: province,\r\n className: 'key-plate-province',\r\n data: { switchAfterInput: 'license-plate-alphanumeric' },\r\n }\r\n}\r\n\r\n/**\r\n * 创建字母按键\r\n */\r\nfunction createLetterKey(letter: string): KeyDefinition {\r\n return {\r\n id: `letter-${letter}`,\r\n type: 'char',\r\n label: letter,\r\n value: letter,\r\n className: 'key-plate-letter',\r\n }\r\n}\r\n\r\n/**\r\n * 创建数字按键\r\n */\r\nfunction createNumberKey(num: string): KeyDefinition {\r\n return {\r\n id: `num-${num}`,\r\n type: 'char',\r\n label: num,\r\n value: num,\r\n className: 'key-plate-number',\r\n }\r\n}\r\n\r\n/**\r\n * 省份键盘配置 - 类似26键布局\r\n * 10列布局,更紧凑美观\r\n */\r\nexport const licensePlateProvinceLayout: KeyboardConfig = {\r\n type: 'license-plate-province',\r\n name: '省份简称',\r\n supportShift: false,\r\n rows: [\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: PROVINCES.slice(0, 10).map(createProvinceKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: PROVINCES.slice(10, 20).map(createProvinceKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: PROVINCES.slice(20, 30).map(createProvinceKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: [\r\n ...PROVINCES.slice(30, 33).map(createProvinceKey),\r\n {\r\n id: 'plate-xue',\r\n type: 'char',\r\n label: '学',\r\n value: '学',\r\n className: 'key-plate-special',\r\n data: { switchAfterInput: 'license-plate-alphanumeric' },\r\n },\r\n {\r\n id: 'plate-jing',\r\n type: 'char',\r\n label: '警',\r\n value: '警',\r\n className: 'key-plate-special',\r\n data: { switchAfterInput: 'license-plate-alphanumeric' },\r\n },\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n width: 1.5,\r\n className: 'key-plate-fn',\r\n },\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '确定',\r\n width: 2.5,\r\n className: 'key-plate-done',\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n maxLength: 8,\r\n inputType: 'license-plate',\r\n },\r\n}\r\n\r\n/**\r\n * 字母数字键盘配置(车牌第2-8位)\r\n * 10列布局\r\n */\r\nexport const licensePlateAlphanumericLayout: KeyboardConfig = {\r\n type: 'license-plate-alphanumeric',\r\n name: '字母数字',\r\n supportShift: false,\r\n rows: [\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: '1234567890'.split('').map(createNumberKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: PLATE_LETTERS.slice(0, 10).map(createLetterKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: [\r\n ...PLATE_LETTERS.slice(10, 19).map(createLetterKey),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n className: 'key-plate-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: [\r\n {\r\n id: 'switch-province',\r\n type: 'tab',\r\n label: '省份',\r\n width: 1.5,\r\n className: 'key-plate-switch',\r\n data: { targetType: 'license-plate-province' },\r\n },\r\n ...PLATE_LETTERS.slice(19, 24).map(createLetterKey),\r\n {\r\n id: 'plate-xue',\r\n type: 'char',\r\n label: '学',\r\n value: '学',\r\n className: 'key-plate-special',\r\n },\r\n {\r\n id: 'plate-jing',\r\n type: 'char',\r\n label: '警',\r\n value: '警',\r\n className: 'key-plate-special',\r\n },\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '确定',\r\n width: 1.5,\r\n className: 'key-plate-done',\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n maxLength: 8,\r\n inputType: 'license-plate',\r\n },\r\n}\r\n\r\n/**\r\n * 纯字母键盘配置(车牌第2位,只能输入字母)\r\n * 6列布局,排除 I 和 O\r\n */\r\nexport const licensePlateLetterLayout: KeyboardConfig = {\r\n type: 'license-plate-letter',\r\n name: '字母',\r\n supportShift: false,\r\n rows: [\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: PLATE_LETTERS.slice(0, 8).map(createLetterKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: PLATE_LETTERS.slice(8, 16).map(createLetterKey),\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: [...PLATE_LETTERS.slice(16, 24).map(createLetterKey)],\r\n },\r\n {\r\n className: 'plate-keyboard-row',\r\n keys: [\r\n {\r\n id: 'switch-province',\r\n type: 'tab',\r\n label: '省份',\r\n width: 2,\r\n className: 'key-plate-switch',\r\n data: { targetType: 'license-plate-province' },\r\n },\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n width: 2,\r\n className: 'key-plate-fn',\r\n },\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '确定',\r\n width: 2,\r\n className: 'key-plate-done',\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n maxLength: 8,\r\n inputType: 'license-plate',\r\n },\r\n}\r\n\r\n/**\r\n * 完整车牌号键盘(自动切换模式)\r\n * 默认显示省份键盘,点击省份后自动切换到字母数字键盘\r\n */\r\nexport const licensePlateLayout: KeyboardConfig = {\r\n type: 'license-plate',\r\n name: '车牌号键盘',\r\n supportShift: false,\r\n data: {\r\n autoSwitch: true,\r\n maxLength: 8,\r\n inputType: 'license-plate',\r\n },\r\n rows: licensePlateProvinceLayout.rows,\r\n}\r\n"],"mappings":";;;;;;;;;;;AAYO,MAAM,YAAY;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKO,MAAM,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,SAAS,kBAAkB,UAAiC;CAC1D,OAAO;EACL,IAAI,YAAY;EAChB,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;EACX,MAAM,EAAE,kBAAkB,6BAA6B;CACzD;AACF;AAKA,SAAS,gBAAgB,QAA+B;CACtD,OAAO;EACL,IAAI,UAAU;EACd,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAKA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,OAAO;EACX,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAMO,MAAM,6BAA6C;CACxD,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM,UAAU,MAAM,GAAG,EAAE,CAAA,CAAE,IAAI,iBAAiB;EACpD;EACA;GACE,WAAW;GACX,MAAM,UAAU,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,iBAAiB;EACrD;EACA;GACE,WAAW;GACX,MAAM,UAAU,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,iBAAiB;EACrD;EACA;GACE,WAAW;GACX,MAAM;IACJ,GAAG,UAAU,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,iBAAiB;IAChD;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,kBAAkB,6BAA6B;IACzD;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,kBAAkB,6BAA6B;IACzD;IACA;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAMO,MAAM,iCAAiD;CAC5D,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM,aAAa,MAAM,EAAE,CAAA,CAAE,IAAI,eAAe;EAClD;EACA;GACE,WAAW;GACX,MAAM,cAAc,MAAM,GAAG,EAAE,CAAA,CAAE,IAAI,eAAe;EACtD;EACA;GACE,WAAW;GACX,MAAM,CACJ,GAAG,cAAc,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,eAAe,GAClD;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,WAAW;GACb,CACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,yBAAyB;IAC/C;IACA,GAAG,cAAc,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,eAAe;IAClD;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAMO,MAAM,2BAA2C;CACtD,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM,cAAc,MAAM,GAAG,CAAC,CAAA,CAAE,IAAI,eAAe;EACrD;EACA;GACE,WAAW;GACX,MAAM,cAAc,MAAM,GAAG,EAAE,CAAA,CAAE,IAAI,eAAe;EACtD;EACA;GACE,WAAW;GACX,MAAM,CAAC,GAAG,cAAc,MAAM,IAAI,EAAE,CAAA,CAAE,IAAI,eAAe,CAAC;EAC5D;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,yBAAyB;IAC/C;IACA;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAMO,MAAM,qBAAqC;CAChD,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ,YAAY;EACZ,WAAW;EACX,WAAW;CACb;CACA,MAAM,2BAA2B;AACnC"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"number.js","names":[],"sources":["../../src/layouts/number.ts"],"sourcesContent":["/**\n * 数字键盘布局\n * @module layouts/number\n */\n\nimport type { KeyboardConfig, KeyDefinition } from '../types'\nimport { ICON_DELETE, ICON_CLEAR } from '../icons'\n\n/**\n * 创建数字按键\n */\nfunction createNumberKey(num: string): KeyDefinition {\n return {\n id: `num-${num}`,\n type: 'char',\n label: num,\n value: num,\n className: 'key-num',\n }\n}\n\n/**\n * 数字键盘配置 - 紧凑4x4布局\n */\nexport const numberLayout: KeyboardConfig = {\n type: 'number',\n name: '数字键盘',\n supportShift: false,\n switchable: ['qwerty', 'symbol'],\n rows: [\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('1'),\n createNumberKey('2'),\n createNumberKey('3'),\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('4'),\n createNumberKey('5'),\n createNumberKey('6'),\n {\n id: 'clear',\n type: 'clear',\n icon: ICON_CLEAR,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('7'),\n createNumberKey('8'),\n createNumberKey('9'),\n {\n id: 'close',\n type: 'close',\n label: '关闭',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n {\n id: 'decimal',\n type: 'char',\n label: '.',\n value: '.',\n className: 'key-num',\n },\n createNumberKey('0'),\n {\n id: 'done',\n type: 'done',\n label: '确定',\n width: 2,\n className: 'key-numpad-done',\n },\n ],\n },\n ],\n}\n\n/**\n * 纯整数键盘 - 紧凑4x4布局\n */\nexport const integerLayout: KeyboardConfig = {\n type: 'integer',\n name: '整数键盘',\n supportShift: false,\n switchable: ['qwerty'],\n rows: [\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('1'),\n createNumberKey('2'),\n createNumberKey('3'),\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('4'),\n createNumberKey('5'),\n createNumberKey('6'),\n {\n id: 'clear',\n type: 'clear',\n icon: ICON_CLEAR,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('7'),\n createNumberKey('8'),\n createNumberKey('9'),\n {\n id: 'close',\n type: 'close',\n label: '关闭',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n {\n id: 'switch-qwerty',\n type: 'tab',\n label: 'ABC',\n className: 'key-numpad-fn',\n data: { targetType: 'qwerty' },\n },\n createNumberKey('0'),\n {\n id: 'done',\n type: 'done',\n label: '确定',\n width: 2,\n className: 'key-numpad-done',\n },\n ],\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,OAAO;EACX,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAKO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;AACF;AAKO,MAAM,gBAAgC;CAC3C,MAAM;CACN,MAAM;CACN,cAAc;CACd,YAAY,CAAC,QAAQ;CACrB,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,SAAS;IAC/B;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"number.js","names":[],"sources":["../../src/layouts/number.ts"],"sourcesContent":["/**\r\n * 数字键盘布局\r\n * @module layouts/number\r\n */\r\n\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\nimport { ICON_CLEAR, ICON_DELETE } from '../icons'\r\n\r\n/**\r\n * 创建数字按键\r\n */\r\nfunction createNumberKey(num: string): KeyDefinition {\r\n return {\r\n id: `num-${num}`,\r\n type: 'char',\r\n label: num,\r\n value: num,\r\n className: 'key-num',\r\n }\r\n}\r\n\r\n/**\r\n * 数字键盘配置 - 紧凑4x4布局\r\n */\r\nexport const numberLayout: KeyboardConfig = {\r\n type: 'number',\r\n name: '数字键盘',\r\n supportShift: false,\r\n switchable: ['qwerty', 'symbol'],\r\n rows: [\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('1'),\r\n createNumberKey('2'),\r\n createNumberKey('3'),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('4'),\r\n createNumberKey('5'),\r\n createNumberKey('6'),\r\n {\r\n id: 'clear',\r\n type: 'clear',\r\n icon: ICON_CLEAR,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('7'),\r\n createNumberKey('8'),\r\n createNumberKey('9'),\r\n {\r\n id: 'close',\r\n type: 'close',\r\n label: '关闭',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n {\r\n id: 'decimal',\r\n type: 'char',\r\n label: '.',\r\n value: '.',\r\n className: 'key-num',\r\n },\r\n createNumberKey('0'),\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '确定',\r\n width: 2,\r\n className: 'key-numpad-done',\r\n },\r\n ],\r\n },\r\n ],\r\n}\r\n\r\n/**\r\n * 纯整数键盘 - 紧凑4x4布局\r\n */\r\nexport const integerLayout: KeyboardConfig = {\r\n type: 'integer',\r\n name: '整数键盘',\r\n supportShift: false,\r\n switchable: ['qwerty'],\r\n rows: [\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('1'),\r\n createNumberKey('2'),\r\n createNumberKey('3'),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('4'),\r\n createNumberKey('5'),\r\n createNumberKey('6'),\r\n {\r\n id: 'clear',\r\n type: 'clear',\r\n icon: ICON_CLEAR,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('7'),\r\n createNumberKey('8'),\r\n createNumberKey('9'),\r\n {\r\n id: 'close',\r\n type: 'close',\r\n label: '关闭',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n {\r\n id: 'switch-qwerty',\r\n type: 'tab',\r\n label: 'ABC',\r\n className: 'key-numpad-fn',\r\n data: { targetType: 'qwerty' },\r\n },\r\n createNumberKey('0'),\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '确定',\r\n width: 2,\r\n className: 'key-numpad-done',\r\n },\r\n ],\r\n },\r\n ],\r\n}\r\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,OAAO;EACX,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAKO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;AACF;AAKO,MAAM,gBAAgC;CAC3C,MAAM;CACN,MAAM;CACN,cAAc;CACd,YAAY,CAAC,QAAQ;CACrB,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;KACX,MAAM,EAAE,YAAY,SAAS;IAC/B;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"phone.js","names":[],"sources":["../../src/layouts/phone.ts"],"sourcesContent":["/**\n * 手机号键盘布局\n * @module layouts/phone\n */\n\nimport type { KeyboardConfig, KeyDefinition } from '../types'\nimport { ICON_DELETE, ICON_CLEAR } from '../icons'\n\n/**\n * 创建数字按键\n */\nfunction createNumberKey(num: string): KeyDefinition {\n return {\n id: `phone-${num}`,\n type: 'char',\n label: num,\n value: num,\n className: 'key-num',\n }\n}\n\n/**\n * 手机号键盘配置\n * 紧凑4x4布局\n */\nexport const phoneLayout: KeyboardConfig = {\n type: 'phone',\n name: '手机号键盘',\n supportShift: false,\n rows: [\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('1'),\n createNumberKey('2'),\n createNumberKey('3'),\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('4'),\n createNumberKey('5'),\n createNumberKey('6'),\n {\n id: 'clear',\n type: 'clear',\n icon: ICON_CLEAR,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('7'),\n createNumberKey('8'),\n createNumberKey('9'),\n {\n id: 'close',\n type: 'close',\n label: '关闭',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n {\n id: 'phone-plus',\n type: 'char',\n label: '+',\n value: '+',\n className: 'key-num',\n },\n createNumberKey('0'),\n {\n id: 'done',\n type: 'done',\n label: '确定',\n width: 2,\n className: 'key-numpad-done',\n },\n ],\n },\n ],\n data: {\n maxLength: 11,\n inputType: 'phone',\n },\n}\n\n/**\n * 简洁版拨号键盘(带 * #)\n */\nexport const phoneSimpleLayout: KeyboardConfig = {\n type: 'phone-simple',\n name: '拨号键盘',\n supportShift: false,\n rows: [\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('1'),\n createNumberKey('2'),\n createNumberKey('3'),\n {\n id: 'backspace',\n type: 'backspace',\n icon: ICON_DELETE,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('4'),\n createNumberKey('5'),\n createNumberKey('6'),\n {\n id: 'clear',\n type: 'clear',\n icon: ICON_CLEAR,\n label: '',\n className: 'key-numpad-fn',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n createNumberKey('7'),\n createNumberKey('8'),\n createNumberKey('9'),\n {\n id: 'phone-hash',\n type: 'char',\n label: '#',\n value: '#',\n className: 'key-num',\n },\n ],\n },\n {\n className: 'numpad-row',\n keys: [\n {\n id: 'phone-star',\n type: 'char',\n label: '*',\n value: '*',\n className: 'key-num',\n },\n createNumberKey('0'),\n {\n id: 'done',\n type: 'done',\n label: '拨打',\n width: 2,\n className: 'key-numpad-done',\n },\n ],\n },\n ],\n data: {\n maxLength: 13,\n inputType: 'phone',\n },\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,SAAS;EACb,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAMO,MAAM,cAA8B;CACzC,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAKO,MAAM,oBAAoC;CAC/C,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF"}
1
+ {"version":3,"file":"phone.js","names":[],"sources":["../../src/layouts/phone.ts"],"sourcesContent":["/**\r\n * 手机号键盘布局\r\n * @module layouts/phone\r\n */\r\n\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\nimport { ICON_CLEAR, ICON_DELETE } from '../icons'\r\n\r\n/**\r\n * 创建数字按键\r\n */\r\nfunction createNumberKey(num: string): KeyDefinition {\r\n return {\r\n id: `phone-${num}`,\r\n type: 'char',\r\n label: num,\r\n value: num,\r\n className: 'key-num',\r\n }\r\n}\r\n\r\n/**\r\n * 手机号键盘配置\r\n * 紧凑4x4布局\r\n */\r\nexport const phoneLayout: KeyboardConfig = {\r\n type: 'phone',\r\n name: '手机号键盘',\r\n supportShift: false,\r\n rows: [\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('1'),\r\n createNumberKey('2'),\r\n createNumberKey('3'),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('4'),\r\n createNumberKey('5'),\r\n createNumberKey('6'),\r\n {\r\n id: 'clear',\r\n type: 'clear',\r\n icon: ICON_CLEAR,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('7'),\r\n createNumberKey('8'),\r\n createNumberKey('9'),\r\n {\r\n id: 'close',\r\n type: 'close',\r\n label: '关闭',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n {\r\n id: 'phone-plus',\r\n type: 'char',\r\n label: '+',\r\n value: '+',\r\n className: 'key-num',\r\n },\r\n createNumberKey('0'),\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '确定',\r\n width: 2,\r\n className: 'key-numpad-done',\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n maxLength: 11,\r\n inputType: 'phone',\r\n },\r\n}\r\n\r\n/**\r\n * 简洁版拨号键盘(带 * #)\r\n */\r\nexport const phoneSimpleLayout: KeyboardConfig = {\r\n type: 'phone-simple',\r\n name: '拨号键盘',\r\n supportShift: false,\r\n rows: [\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('1'),\r\n createNumberKey('2'),\r\n createNumberKey('3'),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('4'),\r\n createNumberKey('5'),\r\n createNumberKey('6'),\r\n {\r\n id: 'clear',\r\n type: 'clear',\r\n icon: ICON_CLEAR,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n createNumberKey('7'),\r\n createNumberKey('8'),\r\n createNumberKey('9'),\r\n {\r\n id: 'phone-hash',\r\n type: 'char',\r\n label: '#',\r\n value: '#',\r\n className: 'key-num',\r\n },\r\n ],\r\n },\r\n {\r\n className: 'numpad-row',\r\n keys: [\r\n {\r\n id: 'phone-star',\r\n type: 'char',\r\n label: '*',\r\n value: '*',\r\n className: 'key-num',\r\n },\r\n createNumberKey('0'),\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '拨打',\r\n width: 2,\r\n className: 'key-numpad-done',\r\n },\r\n ],\r\n },\r\n ],\r\n data: {\r\n maxLength: 13,\r\n inputType: 'phone',\r\n },\r\n}\r\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,gBAAgB,KAA4B;CACnD,OAAO;EACL,IAAI,SAAS;EACb,MAAM;EACN,OAAO;EACP,OAAO;EACP,WAAW;CACb;AACF;AAMO,MAAM,cAA8B;CACzC,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF;AAKO,MAAM,oBAAoC;CAC/C,MAAM;CACN,MAAM;CACN,cAAc;CACd,MAAM;EACJ;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;EACA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA,gBAAgB,GAAG;IACnB;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;CACA,MAAM;EACJ,WAAW;EACX,WAAW;CACb;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"punct.js","names":[],"sources":["../../src/layouts/punct.ts"],"sourcesContent":["/**\n * 标点符号键盘布局 (中文)\n * @module layouts/punct\n */\n\n// 导入键盘配置和按键定义的类型\nimport type { KeyboardConfig, KeyDefinition } from '../types'\n// 导入删除和确认图标资源\nimport { ICON_DELETE, ICON_CHECK } from '../icons'\n\n/**\n * 创建标点符号按键的快捷函数\n * @param label - 按键显示文本(同时也是默认输出值)\n * @param value - 可选,按键输出值,不传则与label相同\n * @returns 返回一个标点按键定义对象\n */\nfunction p(label: string, value?: string): KeyDefinition {\n return { id: `punct-${label}`, type: 'char', label, value: value ?? label, className: 'key-num' }\n}\n\n// 导出中文标点键盘布局配置\nexport const punctLayout: KeyboardConfig = {\n type: 'punct', // 布局类型标识为 punct\n name: '中文标点', // 布局显示名称\n supportShift: false, // 不支持Shift切换(标点键盘无需大小写)\n switchable: ['qwerty', 'punct-en'], // 可切换到QWERTY键盘和英文标点键盘\n rows: [\n // 第一行:常用中文标点符号\n {\n className: 'virtual-keyboard__row', // 行的CSS类名\n keys: [',', '。', '?', '!', ':', ';', '\"', '\"'].map(s => p(s)), // 逗号、句号、问号、感叹号、冒号、分号、左右双引号\n },\n // 第二行:括号类标点符号\n {\n className: 'virtual-keyboard__row', // 行的CSS类名\n keys: ['(', ')', '【', '】', '《', '》', '……', '——'].map(s => p(s)), // 小括号、中括号、书名号、省略号、破折号\n },\n // 第三行:其他标点 + 退格键\n {\n className: 'virtual-keyboard__row', // 行的CSS类名\n keys: [\n p('·'), // 间隔号(中间点)\n p('、'), // 顿号\n p('「'), // 左单书名号\n p('」'), // 右单书名号\n p('『'), // 左双书名号\n p('』'), // 右双书名号\n p('~'), // 波浪号\n { id: 'backspace', type: 'backspace', icon: ICON_DELETE, label: '', className: 'key-numpad-fn' }, // 退格键\n ],\n },\n // 底部行:切换键盘 + 空格 + 确认\n {\n className: 'virtual-keyboard__row', // 行的CSS类名\n keys: [\n { id: 'switch-punct-en', type: 'tab', label: '英', data: { targetType: 'punct-en' }, className: 'key-numpad-fn' }, // 切换到英文标点键盘\n { id: 'switch-qwerty', type: 'tab', label: 'ABC', data: { targetType: 'qwerty' }, className: 'key-numpad-fn' }, // 切换到QWERTY字母键盘\n { id: 'space', type: 'space', label: '空格', value: ' ', width: 4, className: 'key-num' }, // 空格键,宽度4倍\n { id: 'done', type: 'done', icon: ICON_CHECK, label: '', width: 2, className: 'key-numpad-done' }, // 确认/完成按钮,宽度2倍\n ],\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAS,EAAE,OAAe,OAA+B;CACvD,OAAO;EAAE,IAAI,SAAS;EAAS,MAAM;EAAQ;EAAO,OAAO,SAAS;EAAO,WAAW;CAAU;AAClG;AAGO,MAAM,cAA8B;CACzC,MAAM;CACN,MAAM;CACN,cAAc;CACd,YAAY,CAAC,UAAU,UAAU;CACjC,MAAM;EAEJ;GACE,WAAW;GACX,MAAM;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;GAAG,CAAA,CAAE,KAAI,MAAK,EAAE,CAAC,CAAC;EAC9D;EAEA;GACE,WAAW;GACX,MAAM;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAM;GAAI,CAAA,CAAE,KAAI,MAAK,EAAE,CAAC,CAAC;EAChE;EAEA;GACE,WAAW;GACX,MAAM;IACJ,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL;KAAE,IAAI;KAAa,MAAM;KAAa,MAAM;KAAa,OAAO;KAAI,WAAW;IAAgB;GACjG;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ;KAAE,IAAI;KAAmB,MAAM;KAAO,OAAO;KAAK,MAAM,EAAE,YAAY,WAAW;KAAG,WAAW;IAAgB;IAC/G;KAAE,IAAI;KAAiB,MAAM;KAAO,OAAO;KAAO,MAAM,EAAE,YAAY,SAAS;KAAG,WAAW;IAAgB;IAC7G;KAAE,IAAI;KAAS,MAAM;KAAS,OAAO;KAAM,OAAO;KAAK,OAAO;KAAG,WAAW;IAAU;IACtF;KAAE,IAAI;KAAQ,MAAM;KAAQ,MAAM;KAAY,OAAO;KAAI,OAAO;KAAG,WAAW;IAAkB;GAClG;EACF;CACF;AACF"}
1
+ {"version":3,"file":"punct.js","names":[],"sources":["../../src/layouts/punct.ts"],"sourcesContent":["/**\r\n * 标点符号键盘布局 (中文)\r\n * @module layouts/punct\r\n */\r\n\r\n// 导入键盘配置和按键定义的类型\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\n// 导入删除和确认图标资源\r\nimport { ICON_CHECK, ICON_DELETE } from '../icons'\r\n\r\n/**\r\n * 创建标点符号按键的快捷函数\r\n * @param label - 按键显示文本(同时也是默认输出值)\r\n * @param value - 可选,按键输出值,不传则与label相同\r\n * @returns 返回一个标点按键定义对象\r\n */\r\nfunction p(label: string, value?: string): KeyDefinition {\r\n return {\r\n id: `punct-${label}`,\r\n type: 'char',\r\n label,\r\n value: value ?? label,\r\n className: 'key-num',\r\n }\r\n}\r\n\r\n// 导出中文标点键盘布局配置\r\nexport const punctLayout: KeyboardConfig = {\r\n type: 'punct', // 布局类型标识为 punct\r\n name: '中文标点', // 布局显示名称\r\n supportShift: false, // 不支持Shift切换(标点键盘无需大小写)\r\n switchable: ['qwerty', 'punct-en'], // 可切换到QWERTY键盘和英文标点键盘\r\n rows: [\r\n // 第一行:常用中文标点符号\r\n {\r\n className: 'virtual-keyboard__row', // 行的CSS类名\r\n keys: [',', '。', '?', '!', ':', ';', '\"', '\"'].map(s => p(s)), // 逗号、句号、问号、感叹号、冒号、分号、左右双引号\r\n },\r\n // 第二行:括号类标点符号\r\n {\r\n className: 'virtual-keyboard__row', // 行的CSS类名\r\n keys: ['(', ')', '【', '】', '《', '》', '……', '——'].map(s => p(s)), // 小括号、中括号、书名号、省略号、破折号\r\n },\r\n // 第三行:其他标点 + 退格键\r\n {\r\n className: 'virtual-keyboard__row', // 行的CSS类名\r\n keys: [\r\n p('·'), // 间隔号(中间点)\r\n p('、'), // 顿号\r\n p('「'), // 左单书名号\r\n p('」'), // 右单书名号\r\n p('『'), // 左双书名号\r\n p('』'), // 右双书名号\r\n p('~'), // 波浪号\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n icon: ICON_DELETE,\r\n label: '',\r\n className: 'key-numpad-fn',\r\n }, // 退格键\r\n ],\r\n },\r\n // 底部行:切换键盘 + 空格 + 确认\r\n {\r\n className: 'virtual-keyboard__row', // 行的CSS类名\r\n keys: [\r\n {\r\n id: 'switch-punct-en',\r\n type: 'tab',\r\n label: '英',\r\n data: { targetType: 'punct-en' },\r\n className: 'key-numpad-fn',\r\n }, // 切换到英文标点键盘\r\n {\r\n id: 'switch-qwerty',\r\n type: 'tab',\r\n label: 'ABC',\r\n data: { targetType: 'qwerty' },\r\n className: 'key-numpad-fn',\r\n }, // 切换到QWERTY字母键盘\r\n {\r\n id: 'space',\r\n type: 'space',\r\n label: '空格',\r\n value: ' ',\r\n width: 4,\r\n className: 'key-num',\r\n }, // 空格键,宽度4倍\r\n {\r\n id: 'done',\r\n type: 'done',\r\n icon: ICON_CHECK,\r\n label: '',\r\n width: 2,\r\n className: 'key-numpad-done',\r\n }, // 确认/完成按钮,宽度2倍\r\n ],\r\n },\r\n ],\r\n}\r\n"],"mappings":";;;;;;;;;;;AAgBA,SAAS,EAAE,OAAe,OAA+B;CACvD,OAAO;EACL,IAAI,SAAS;EACb,MAAM;EACN;EACA,OAAO,SAAS;EAChB,WAAW;CACb;AACF;AAGO,MAAM,cAA8B;CACzC,MAAM;CACN,MAAM;CACN,cAAc;CACd,YAAY,CAAC,UAAU,UAAU;CACjC,MAAM;EAEJ;GACE,WAAW;GACX,MAAM;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;GAAG,CAAA,CAAE,KAAI,MAAK,EAAE,CAAC,CAAC;EAC9D;EAEA;GACE,WAAW;GACX,MAAM;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAM;GAAI,CAAA,CAAE,KAAI,MAAK,EAAE,CAAC,CAAC;EAChE;EAEA;GACE,WAAW;GACX,MAAM;IACJ,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL,EAAE,GAAG;IACL;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;IACb;GACF;EACF;EAEA;GACE,WAAW;GACX,MAAM;IACJ;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,MAAM,EAAE,YAAY,WAAW;KAC/B,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,MAAM,EAAE,YAAY,SAAS;KAC7B,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,OAAO;KACP,OAAO;KACP,OAAO;KACP,WAAW;IACb;IACA;KACE,IAAI;KACJ,MAAM;KACN,MAAM;KACN,OAAO;KACP,OAAO;KACP,WAAW;IACb;GACF;EACF;CACF;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"qwerty.js","names":[],"sources":["../../src/layouts/qwerty.ts"],"sourcesContent":["/**\n * QWERTY 标准字母键盘布局\n * @module layouts/qwerty\n */\n\nimport type { KeyboardConfig, KeyDefinition } from '../types'\n\n/**\n * 创建字符按键\n */\nfunction createCharKey(char: string): KeyDefinition {\n return {\n id: `char-${char.toLowerCase()}`,\n type: 'char',\n label: { lower: char.toLowerCase(), upper: char.toUpperCase() },\n value: { lower: char.toLowerCase(), upper: char.toUpperCase() },\n }\n}\n\n/**\n * QWERTY 键盘配置\n */\nexport const qwertyLayout: KeyboardConfig = {\n type: 'qwerty',\n name: '字母键盘',\n supportShift: true,\n defaultUpperCase: false,\n switchable: ['number', 'symbol'],\n rows: [\n {\n keys: [\n createCharKey('Q'),\n createCharKey('W'),\n createCharKey('E'),\n createCharKey('R'),\n createCharKey('T'),\n createCharKey('Y'),\n createCharKey('U'),\n createCharKey('I'),\n createCharKey('O'),\n createCharKey('P'),\n ],\n },\n {\n keys: [\n createCharKey('A'),\n createCharKey('S'),\n createCharKey('D'),\n createCharKey('F'),\n createCharKey('G'),\n createCharKey('H'),\n createCharKey('J'),\n createCharKey('K'),\n createCharKey('L'),\n ],\n },\n {\n keys: [\n {\n id: 'shift',\n type: 'shift',\n label: '⇧',\n width: 1.5,\n className: 'key-shift',\n },\n createCharKey('Z'),\n createCharKey('X'),\n createCharKey('C'),\n createCharKey('V'),\n createCharKey('B'),\n createCharKey('N'),\n createCharKey('M'),\n {\n id: 'backspace',\n type: 'backspace',\n label: '⌫',\n width: 1.5,\n className: 'key-backspace',\n },\n ],\n },\n {\n keys: [\n {\n id: 'switch-number',\n type: 'tab',\n label: '123',\n width: 1.5,\n className: 'key-switch',\n data: { targetType: 'number' },\n },\n {\n id: 'switch-symbol',\n type: 'tab',\n label: '#+=',\n width: 1.25,\n className: 'key-switch',\n data: { targetType: 'symbol' },\n },\n {\n id: 'space',\n type: 'space',\n label: '空格',\n value: ' ',\n width: 4,\n className: 'key-space',\n },\n {\n id: 'done',\n type: 'done',\n label: '完成',\n width: 2,\n className: 'key-done',\n },\n ],\n },\n ],\n}\n"],"mappings":";;;;;;;;;;AAUA,SAAS,cAAc,MAA6B;CAClD,OAAO;EACL,IAAI,QAAQ,KAAK,YAAY;EAC7B,MAAM;EACN,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;EAC9D,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;CAChE;AACF;AAKO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,kBAAkB;CAClB,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EACJ,EACE,MAAM;GACJ,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;EACnB,EACF;EACA,EACE,MAAM;GACJ,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;EACnB,EACF;EACA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;EACA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;CACF;AACF"}
1
+ {"version":3,"file":"qwerty.js","names":[],"sources":["../../src/layouts/qwerty.ts"],"sourcesContent":["/**\r\n * QWERTY 标准字母键盘布局\r\n * @module layouts/qwerty\r\n */\r\n\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\n\r\n/**\r\n * 创建字符按键\r\n */\r\nfunction createCharKey(char: string): KeyDefinition {\r\n return {\r\n id: `char-${char.toLowerCase()}`,\r\n type: 'char',\r\n label: { lower: char.toLowerCase(), upper: char.toUpperCase() },\r\n value: { lower: char.toLowerCase(), upper: char.toUpperCase() },\r\n }\r\n}\r\n\r\n/**\r\n * QWERTY 键盘配置\r\n */\r\nexport const qwertyLayout: KeyboardConfig = {\r\n type: 'qwerty',\r\n name: '字母键盘',\r\n supportShift: true,\r\n defaultUpperCase: false,\r\n switchable: ['number', 'symbol'],\r\n rows: [\r\n {\r\n keys: [\r\n createCharKey('Q'),\r\n createCharKey('W'),\r\n createCharKey('E'),\r\n createCharKey('R'),\r\n createCharKey('T'),\r\n createCharKey('Y'),\r\n createCharKey('U'),\r\n createCharKey('I'),\r\n createCharKey('O'),\r\n createCharKey('P'),\r\n ],\r\n },\r\n {\r\n keys: [\r\n createCharKey('A'),\r\n createCharKey('S'),\r\n createCharKey('D'),\r\n createCharKey('F'),\r\n createCharKey('G'),\r\n createCharKey('H'),\r\n createCharKey('J'),\r\n createCharKey('K'),\r\n createCharKey('L'),\r\n ],\r\n },\r\n {\r\n keys: [\r\n {\r\n id: 'shift',\r\n type: 'shift',\r\n label: '⇧',\r\n width: 1.5,\r\n className: 'key-shift',\r\n },\r\n createCharKey('Z'),\r\n createCharKey('X'),\r\n createCharKey('C'),\r\n createCharKey('V'),\r\n createCharKey('B'),\r\n createCharKey('N'),\r\n createCharKey('M'),\r\n {\r\n id: 'backspace',\r\n type: 'backspace',\r\n label: '⌫',\r\n width: 1.5,\r\n className: 'key-backspace',\r\n },\r\n ],\r\n },\r\n {\r\n keys: [\r\n {\r\n id: 'switch-number',\r\n type: 'tab',\r\n label: '123',\r\n width: 1.5,\r\n className: 'key-switch',\r\n data: { targetType: 'number' },\r\n },\r\n {\r\n id: 'switch-symbol',\r\n type: 'tab',\r\n label: '#+=',\r\n width: 1.25,\r\n className: 'key-switch',\r\n data: { targetType: 'symbol' },\r\n },\r\n {\r\n id: 'space',\r\n type: 'space',\r\n label: '空格',\r\n value: ' ',\r\n width: 4,\r\n className: 'key-space',\r\n },\r\n {\r\n id: 'done',\r\n type: 'done',\r\n label: '完成',\r\n width: 2,\r\n className: 'key-done',\r\n },\r\n ],\r\n },\r\n ],\r\n}\r\n"],"mappings":";;;;;;;;;;AAUA,SAAS,cAAc,MAA6B;CAClD,OAAO;EACL,IAAI,QAAQ,KAAK,YAAY;EAC7B,MAAM;EACN,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;EAC9D,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;CAChE;AACF;AAKO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,kBAAkB;CAClB,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EACJ,EACE,MAAM;GACJ,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;EACnB,EACF;EACA,EACE,MAAM;GACJ,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;EACnB,EACF;EACA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB,cAAc,GAAG;GACjB;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;EACA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;CACF;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","names":[],"sources":["../../src/layouts/search.ts"],"sourcesContent":["/**\n * 搜索键盘布局\n * @module layouts/search\n */\n\n// 导入键盘配置和按键定义的类型\nimport type { KeyboardConfig, KeyDefinition } from '../types'\n// 导入删除、Shift和语音图标资源\nimport { ICON_DELETE, ICON_SHIFT, ICON_VOICE } from '../icons'\n\n/**\n * 创建字符按键(支持大小写)\n * @param char - 字符,用于生成大小写标签和值\n * @returns 返回一个按键定义对象\n */\nfunction createCharKey(char: string): KeyDefinition {\n return {\n id: `search-char-${char.toLowerCase()}`, // 按键唯一标识,格式为 search-char-x\n type: 'char', // 按键类型为字符键\n label: { lower: char.toLowerCase(), upper: char.toUpperCase() }, // 显示标签:小写/大写\n value: { lower: char.toLowerCase(), upper: char.toUpperCase() }, // 输出值:小写/大写\n }\n}\n\n// 导出搜索键盘布局配置\nexport const searchLayout: KeyboardConfig = {\n type: 'search', // 布局类型标识为 search\n name: '搜索键盘', // 布局显示名称\n supportShift: true, // 支持Shift切换大小写\n defaultUpperCase: false, // 默认为小写状态\n switchable: ['symbol', 'number'], // 可切换到符号键盘和数字键盘\n rows: [\n // QWERTY 第一行:q w e r t y u i o p\n {\n keys: 'qwertyuiop'.split('').map(createCharKey), // 将字符串拆分为字符数组,逐个创建按键\n },\n // QWERTY 第二行:a s d f g h j k l\n {\n keys: 'asdfghjkl'.split('').map(createCharKey), // 将字符串拆分为字符数组,逐个创建按键\n },\n // QWERTY 第三行 + Shift + 退格\n {\n keys: [\n {\n id: 'shift', // Shift键标识\n type: 'shift', // 按键类型为Shift\n icon: ICON_SHIFT, // 使用Shift图标\n label: '', // 无文字标签,仅显示图标\n width: 1.5, // 宽度为1.5倍\n className: 'key-shift', // CSS类名\n },\n ...'zxcvbnm'.split('').map(createCharKey), // 展开第三行字母 z x c v b n m 的按键定义\n {\n id: 'backspace', // 退格键标识\n type: 'backspace', // 按键类型为退格\n icon: ICON_DELETE, // 使用删除图标\n label: '', // 无文字标签,仅显示图标\n width: 1.5, // 宽度为1.5倍\n className: 'key-backspace', // CSS类名\n },\n ],\n },\n // 底部行:切换 + 空格 + 语音 + 搜索\n {\n keys: [\n { id: 'switch-number', type: 'tab', label: '123', width: 1.25, className: 'key-switch', data: { targetType: 'number' } }, // 切换到数字键盘,宽度1.25倍\n { id: 'switch-symbol', type: 'tab', label: '#+=', width: 1.25, className: 'key-switch', data: { targetType: 'symbol' } }, // 切换到符号键盘,宽度1.25倍\n { id: 'space', type: 'space', label: '', value: ' ', width: 4, className: 'key-space' }, // 空格键,宽度4倍\n { id: 'voice', type: 'custom', icon: ICON_VOICE, label: '', width: 1, className: 'key-voice', data: { action: 'voice' } }, // 语音输入按钮,宽度1倍\n { id: 'search-done', type: 'done', label: '搜索', width: 2, className: 'key-done' }, // 搜索/完成按钮,宽度2倍\n ],\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,cAAc,MAA6B;CAClD,OAAO;EACL,IAAI,eAAe,KAAK,YAAY;EACpC,MAAM;EACN,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;EAC9D,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;CAChE;AACF;AAGO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,kBAAkB;CAClB,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EAEJ,EACE,MAAM,aAAa,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAChD;EAEA,EACE,MAAM,YAAY,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAC/C;EAEA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,GAAG,UAAU,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa;GACxC;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;EAEA,EACE,MAAM;GACJ;IAAE,IAAI;IAAiB,MAAM;IAAO,OAAO;IAAO,OAAO;IAAM,WAAW;IAAc,MAAM,EAAE,YAAY,SAAS;GAAE;GACvH;IAAE,IAAI;IAAiB,MAAM;IAAO,OAAO;IAAO,OAAO;IAAM,WAAW;IAAc,MAAM,EAAE,YAAY,SAAS;GAAE;GACvH;IAAE,IAAI;IAAS,MAAM;IAAS,OAAO;IAAI,OAAO;IAAK,OAAO;IAAG,WAAW;GAAY;GACtF;IAAE,IAAI;IAAS,MAAM;IAAU,MAAM;IAAY,OAAO;IAAI,OAAO;IAAG,WAAW;IAAa,MAAM,EAAE,QAAQ,QAAQ;GAAE;GACxH;IAAE,IAAI;IAAe,MAAM;IAAQ,OAAO;IAAM,OAAO;IAAG,WAAW;GAAW;EAClF,EACF;CACF;AACF"}
1
+ {"version":3,"file":"search.js","names":[],"sources":["../../src/layouts/search.ts"],"sourcesContent":["/**\r\n * 搜索键盘布局\r\n * @module layouts/search\r\n */\r\n\r\n// 导入键盘配置和按键定义的类型\r\nimport type { KeyboardConfig, KeyDefinition } from '../types'\r\n// 导入删除、Shift和语音图标资源\r\nimport { ICON_DELETE, ICON_SHIFT, ICON_VOICE } from '../icons'\r\n\r\n/**\r\n * 创建字符按键(支持大小写)\r\n * @param char - 字符,用于生成大小写标签和值\r\n * @returns 返回一个按键定义对象\r\n */\r\nfunction createCharKey(char: string): KeyDefinition {\r\n return {\r\n id: `search-char-${char.toLowerCase()}`, // 按键唯一标识,格式为 search-char-x\r\n type: 'char', // 按键类型为字符键\r\n label: { lower: char.toLowerCase(), upper: char.toUpperCase() }, // 显示标签:小写/大写\r\n value: { lower: char.toLowerCase(), upper: char.toUpperCase() }, // 输出值:小写/大写\r\n }\r\n}\r\n\r\n// 导出搜索键盘布局配置\r\nexport const searchLayout: KeyboardConfig = {\r\n type: 'search', // 布局类型标识为 search\r\n name: '搜索键盘', // 布局显示名称\r\n supportShift: true, // 支持Shift切换大小写\r\n defaultUpperCase: false, // 默认为小写状态\r\n switchable: ['symbol', 'number'], // 可切换到符号键盘和数字键盘\r\n rows: [\r\n // QWERTY 第一行:q w e r t y u i o p\r\n {\r\n keys: 'qwertyuiop'.split('').map(createCharKey), // 将字符串拆分为字符数组,逐个创建按键\r\n },\r\n // QWERTY 第二行:a s d f g h j k l\r\n {\r\n keys: 'asdfghjkl'.split('').map(createCharKey), // 将字符串拆分为字符数组,逐个创建按键\r\n },\r\n // QWERTY 第三行 + Shift + 退格\r\n {\r\n keys: [\r\n {\r\n id: 'shift', // Shift键标识\r\n type: 'shift', // 按键类型为Shift\r\n icon: ICON_SHIFT, // 使用Shift图标\r\n label: '', // 无文字标签,仅显示图标\r\n width: 1.5, // 宽度为1.5倍\r\n className: 'key-shift', // CSS类名\r\n },\r\n ...'zxcvbnm'.split('').map(createCharKey), // 展开第三行字母 z x c v b n m 的按键定义\r\n {\r\n id: 'backspace', // 退格键标识\r\n type: 'backspace', // 按键类型为退格\r\n icon: ICON_DELETE, // 使用删除图标\r\n label: '', // 无文字标签,仅显示图标\r\n width: 1.5, // 宽度为1.5倍\r\n className: 'key-backspace', // CSS类名\r\n },\r\n ],\r\n },\r\n // 底部行:切换 + 空格 + 语音 + 搜索\r\n {\r\n keys: [\r\n {\r\n id: 'switch-number',\r\n type: 'tab',\r\n label: '123',\r\n width: 1.25,\r\n className: 'key-switch',\r\n data: { targetType: 'number' },\r\n }, // 切换到数字键盘,宽度1.25倍\r\n {\r\n id: 'switch-symbol',\r\n type: 'tab',\r\n label: '#+=',\r\n width: 1.25,\r\n className: 'key-switch',\r\n data: { targetType: 'symbol' },\r\n }, // 切换到符号键盘,宽度1.25倍\r\n {\r\n id: 'space',\r\n type: 'space',\r\n label: '',\r\n value: ' ',\r\n width: 4,\r\n className: 'key-space',\r\n }, // 空格键,宽度4倍\r\n {\r\n id: 'voice',\r\n type: 'custom',\r\n icon: ICON_VOICE,\r\n label: '',\r\n width: 1,\r\n className: 'key-voice',\r\n data: { action: 'voice' },\r\n }, // 语音输入按钮,宽度1倍\r\n {\r\n id: 'search-done',\r\n type: 'done',\r\n label: '搜索',\r\n width: 2,\r\n className: 'key-done',\r\n }, // 搜索/完成按钮,宽度2倍\r\n ],\r\n },\r\n ],\r\n}\r\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,cAAc,MAA6B;CAClD,OAAO;EACL,IAAI,eAAe,KAAK,YAAY;EACpC,MAAM;EACN,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;EAC9D,OAAO;GAAE,OAAO,KAAK,YAAY;GAAG,OAAO,KAAK,YAAY;EAAE;CAChE;AACF;AAGO,MAAM,eAA+B;CAC1C,MAAM;CACN,MAAM;CACN,cAAc;CACd,kBAAkB;CAClB,YAAY,CAAC,UAAU,QAAQ;CAC/B,MAAM;EAEJ,EACE,MAAM,aAAa,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAChD;EAEA,EACE,MAAM,YAAY,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa,EAC/C;EAEA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,GAAG,UAAU,MAAM,EAAE,CAAA,CAAE,IAAI,aAAa;GACxC;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;EAEA,EACE,MAAM;GACJ;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,YAAY,SAAS;GAC/B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA;IACE,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM,EAAE,QAAQ,QAAQ;GAC1B;GACA;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,OAAO;IACP,WAAW;GACb;EACF,EACF;CACF;AACF"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/keyboard-core v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:33:29 *
5
+ * Build time: 2024-10-12 17:29:15 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************