@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.
- package/README.md +156 -37
- package/dist/index.js +1540 -1395
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2981 -1
- package/dist/index.min.js.map +1 -0
- package/es/.dts-output-manifest.json +1 -0
- package/es/.dts.tsbuildinfo +1 -0
- package/es/icons.d.ts +0 -1
- package/es/icons.js +1 -1
- package/es/icons.js.map +1 -1
- package/es/index.d.ts +3 -4
- package/es/index.js +15 -15
- package/es/layouts/amount.d.ts +0 -1
- package/es/layouts/amount.js +1 -1
- package/es/layouts/amount.js.map +1 -1
- package/es/layouts/bankcard.d.ts +0 -1
- package/es/layouts/bankcard.js +1 -1
- package/es/layouts/bankcard.js.map +1 -1
- package/es/layouts/email.d.ts +0 -1
- package/es/layouts/email.js +1 -1
- package/es/layouts/email.js.map +1 -1
- package/es/layouts/idcard.d.ts +0 -1
- package/es/layouts/idcard.js +1 -1
- package/es/layouts/idcard.js.map +1 -1
- package/es/layouts/index.d.ts +11 -12
- package/es/layouts/index.js +23 -23
- package/es/layouts/index.js.map +1 -1
- package/es/layouts/license-plate.d.ts +0 -1
- package/es/layouts/license-plate.js +1 -1
- package/es/layouts/license-plate.js.map +1 -1
- package/es/layouts/number.d.ts +0 -1
- package/es/layouts/number.js +1 -1
- package/es/layouts/number.js.map +1 -1
- package/es/layouts/phone.d.ts +0 -1
- package/es/layouts/phone.js +1 -1
- package/es/layouts/phone.js.map +1 -1
- package/es/layouts/punct.d.ts +0 -1
- package/es/layouts/punct.js +1 -1
- package/es/layouts/punct.js.map +1 -1
- package/es/layouts/qwerty.d.ts +0 -1
- package/es/layouts/qwerty.js +1 -1
- package/es/layouts/qwerty.js.map +1 -1
- package/es/layouts/search.d.ts +0 -1
- package/es/layouts/search.js +1 -1
- package/es/layouts/search.js.map +1 -1
- package/es/layouts/symbol.d.ts +0 -1
- package/es/layouts/symbol.js +1 -1
- package/es/layouts/symbol.js.map +1 -1
- package/es/layouts/url.d.ts +0 -1
- package/es/layouts/url.js +1 -1
- package/es/layouts/url.js.map +1 -1
- package/es/layouts/verifycode.d.ts +0 -1
- package/es/layouts/verifycode.js +1 -1
- package/es/layouts/verifycode.js.map +1 -1
- package/es/managers/index.d.ts +1 -2
- package/es/managers/index.js +1 -1
- package/es/managers/keyboard-manager.d.ts +2 -1
- package/es/managers/keyboard-manager.js +79 -22
- package/es/managers/keyboard-manager.js.map +1 -1
- package/es/managers/keyboard-renderer.d.ts +3 -2
- package/es/managers/keyboard-renderer.js +81 -39
- package/es/managers/keyboard-renderer.js.map +1 -1
- package/es/managers/position-manager.d.ts +4 -3
- package/es/managers/position-manager.js +42 -21
- package/es/managers/position-manager.js.map +1 -1
- package/es/themes/index.d.ts +1 -2
- package/es/themes/index.js +2 -1
- package/es/themes/index.js.map +1 -1
- package/es/themes/presets.d.ts +0 -1
- package/es/themes/presets.js +1 -1
- package/es/themes/presets.js.map +1 -1
- package/es/themes/types.d.ts +1 -1
- package/es/themes/types.js +1 -1
- package/es/types/index.d.ts +0 -1
- package/es/types/index.js +1 -1
- package/es/types/keyboard.d.ts +0 -1
- package/es/types/keyboard.js +1 -1
- package/es/types/position.d.ts +0 -1
- package/es/types/position.js +1 -1
- package/es/utils/device.d.ts +0 -1
- package/es/utils/device.js +11 -7
- package/es/utils/device.js.map +1 -1
- package/es/utils/dom.d.ts +4 -1
- package/es/utils/dom.js +25 -7
- package/es/utils/dom.js.map +1 -1
- package/es/utils/event-emitter.d.ts +0 -1
- package/es/utils/event-emitter.js +2 -1
- package/es/utils/event-emitter.js.map +1 -1
- package/es/utils/formatters.d.ts +0 -1
- package/es/utils/formatters.js +4 -4
- package/es/utils/formatters.js.map +1 -1
- package/es/utils/index.d.ts +2 -3
- package/es/utils/index.js +5 -5
- package/es/utils/random.d.ts +4 -1
- package/es/utils/random.js +2 -2
- package/es/utils/random.js.map +1 -1
- package/esm/icons.js +1 -1
- package/esm/icons.js.map +1 -1
- package/esm/index.js +15 -15
- package/esm/layouts/amount.js +1 -1
- package/esm/layouts/amount.js.map +1 -1
- package/esm/layouts/bankcard.js +1 -1
- package/esm/layouts/bankcard.js.map +1 -1
- package/esm/layouts/email.js +1 -1
- package/esm/layouts/email.js.map +1 -1
- package/esm/layouts/idcard.js +1 -1
- package/esm/layouts/idcard.js.map +1 -1
- package/esm/layouts/index.js +23 -23
- package/esm/layouts/index.js.map +1 -1
- package/esm/layouts/license-plate.js +1 -1
- package/esm/layouts/license-plate.js.map +1 -1
- package/esm/layouts/number.js +1 -1
- package/esm/layouts/number.js.map +1 -1
- package/esm/layouts/phone.js +1 -1
- package/esm/layouts/phone.js.map +1 -1
- package/esm/layouts/punct.js +1 -1
- package/esm/layouts/punct.js.map +1 -1
- package/esm/layouts/qwerty.js +1 -1
- package/esm/layouts/qwerty.js.map +1 -1
- package/esm/layouts/search.js +1 -1
- package/esm/layouts/search.js.map +1 -1
- package/esm/layouts/symbol.js +1 -1
- package/esm/layouts/symbol.js.map +1 -1
- package/esm/layouts/url.js +1 -1
- package/esm/layouts/url.js.map +1 -1
- package/esm/layouts/verifycode.js +1 -1
- package/esm/layouts/verifycode.js.map +1 -1
- package/esm/managers/index.js +1 -1
- package/esm/managers/keyboard-manager.js +79 -22
- package/esm/managers/keyboard-manager.js.map +1 -1
- package/esm/managers/keyboard-renderer.js +81 -39
- package/esm/managers/keyboard-renderer.js.map +1 -1
- package/esm/managers/position-manager.js +42 -21
- package/esm/managers/position-manager.js.map +1 -1
- package/esm/themes/index.js +2 -1
- package/esm/themes/index.js.map +1 -1
- package/esm/themes/presets.js +1 -1
- package/esm/themes/presets.js.map +1 -1
- package/esm/utils/device.js +11 -7
- package/esm/utils/device.js.map +1 -1
- package/esm/utils/dom.js +25 -7
- package/esm/utils/dom.js.map +1 -1
- package/esm/utils/event-emitter.js +2 -1
- package/esm/utils/event-emitter.js.map +1 -1
- package/esm/utils/formatters.js +4 -4
- package/esm/utils/formatters.js.map +1 -1
- package/esm/utils/random.js +2 -2
- package/esm/utils/random.js.map +1 -1
- package/lib/icons.cjs +1 -1
- package/lib/icons.cjs.map +1 -1
- package/{esm/icons.d.ts → lib/icons.d.cts} +0 -1
- package/lib/index.cjs +14 -13
- package/{esm/index.d.ts → lib/index.d.cts} +3 -4
- package/lib/layouts/amount.cjs +1 -1
- package/lib/layouts/amount.cjs.map +1 -1
- package/{esm/layouts/amount.d.ts → lib/layouts/amount.d.cts} +0 -1
- package/lib/layouts/bankcard.cjs +1 -1
- package/lib/layouts/bankcard.cjs.map +1 -1
- package/{esm/layouts/bankcard.d.ts → lib/layouts/bankcard.d.cts} +0 -1
- package/lib/layouts/email.cjs +1 -1
- package/lib/layouts/email.cjs.map +1 -1
- package/lib/layouts/{email.d.ts → email.d.cts} +0 -1
- package/lib/layouts/idcard.cjs +1 -1
- package/lib/layouts/idcard.cjs.map +1 -1
- package/{esm/layouts/idcard.d.ts → lib/layouts/idcard.d.cts} +0 -1
- package/lib/layouts/index.cjs +23 -23
- package/lib/layouts/index.cjs.map +1 -1
- package/{esm/layouts/index.d.ts → lib/layouts/index.d.cts} +11 -12
- package/lib/layouts/license-plate.cjs +1 -1
- package/lib/layouts/license-plate.cjs.map +1 -1
- package/{esm/layouts/license-plate.d.ts → lib/layouts/license-plate.d.cts} +0 -1
- package/lib/layouts/number.cjs +1 -1
- package/lib/layouts/number.cjs.map +1 -1
- package/{esm/layouts/number.d.ts → lib/layouts/number.d.cts} +0 -1
- package/lib/layouts/phone.cjs +1 -1
- package/lib/layouts/phone.cjs.map +1 -1
- package/lib/layouts/{phone.d.ts → phone.d.cts} +0 -1
- package/lib/layouts/punct.cjs +1 -1
- package/lib/layouts/punct.cjs.map +1 -1
- package/lib/layouts/{punct.d.ts → punct.d.cts} +0 -1
- package/lib/layouts/qwerty.cjs +1 -1
- package/lib/layouts/qwerty.cjs.map +1 -1
- package/{esm/layouts/qwerty.d.ts → lib/layouts/qwerty.d.cts} +0 -1
- package/lib/layouts/search.cjs +1 -1
- package/lib/layouts/search.cjs.map +1 -1
- package/{esm/layouts/search.d.ts → lib/layouts/search.d.cts} +0 -1
- package/lib/layouts/symbol.cjs +1 -1
- package/lib/layouts/symbol.cjs.map +1 -1
- package/{esm/layouts/symbol.d.ts → lib/layouts/symbol.d.cts} +0 -1
- package/lib/layouts/url.cjs +1 -1
- package/lib/layouts/url.cjs.map +1 -1
- package/{esm/layouts/url.d.ts → lib/layouts/url.d.cts} +0 -1
- package/lib/layouts/verifycode.cjs +1 -1
- package/lib/layouts/verifycode.cjs.map +1 -1
- package/lib/layouts/{verifycode.d.ts → verifycode.d.cts} +0 -1
- package/lib/managers/index.cjs +1 -1
- package/lib/managers/{index.d.ts → index.d.cts} +1 -2
- package/lib/managers/keyboard-manager.cjs +79 -22
- package/lib/managers/keyboard-manager.cjs.map +1 -1
- package/lib/managers/{keyboard-manager.d.ts → keyboard-manager.d.cts} +2 -1
- package/lib/managers/keyboard-renderer.cjs +80 -38
- package/lib/managers/keyboard-renderer.cjs.map +1 -1
- package/lib/managers/{keyboard-renderer.d.ts → keyboard-renderer.d.cts} +3 -2
- package/lib/managers/position-manager.cjs +42 -21
- package/lib/managers/position-manager.cjs.map +1 -1
- package/lib/managers/{position-manager.d.ts → position-manager.d.cts} +4 -3
- package/lib/themes/index.cjs +2 -1
- package/lib/themes/index.cjs.map +1 -1
- package/lib/themes/{index.d.ts → index.d.cts} +1 -2
- package/lib/themes/presets.cjs +1 -1
- package/lib/themes/presets.cjs.map +1 -1
- package/lib/themes/{presets.d.ts → presets.d.cts} +0 -1
- package/lib/themes/types.cjs +1 -1
- package/{esm/themes/types.d.ts → lib/themes/types.d.cts} +1 -1
- package/lib/types/index.cjs +1 -1
- package/{esm/types/index.d.ts → lib/types/index.d.cts} +0 -1
- package/lib/types/keyboard.cjs +1 -1
- package/{esm/types/keyboard.d.ts → lib/types/keyboard.d.cts} +0 -1
- package/lib/types/position.cjs +1 -1
- package/lib/types/{position.d.ts → position.d.cts} +0 -1
- package/lib/utils/device.cjs +11 -7
- package/lib/utils/device.cjs.map +1 -1
- package/{esm/utils/device.d.ts → lib/utils/device.d.cts} +0 -1
- package/lib/utils/dom.cjs +25 -6
- package/lib/utils/dom.cjs.map +1 -1
- package/{esm/utils/dom.d.ts → lib/utils/dom.d.cts} +4 -1
- package/lib/utils/event-emitter.cjs +2 -1
- package/lib/utils/event-emitter.cjs.map +1 -1
- package/{esm/utils/event-emitter.d.ts → lib/utils/event-emitter.d.cts} +0 -1
- package/lib/utils/formatters.cjs +4 -4
- package/lib/utils/formatters.cjs.map +1 -1
- package/{esm/utils/formatters.d.ts → lib/utils/formatters.d.cts} +0 -1
- package/lib/utils/index.cjs +4 -3
- package/{esm/utils/index.d.ts → lib/utils/index.d.cts} +2 -3
- package/lib/utils/random.cjs +2 -2
- package/lib/utils/random.cjs.map +1 -1
- package/{esm/utils/random.d.ts → lib/utils/random.d.cts} +4 -1
- package/package.json +28 -14
- package/es/icons.d.ts.map +0 -1
- package/es/index.d.ts.map +0 -1
- package/es/layouts/amount.d.ts.map +0 -1
- package/es/layouts/bankcard.d.ts.map +0 -1
- package/es/layouts/email.d.ts.map +0 -1
- package/es/layouts/idcard.d.ts.map +0 -1
- package/es/layouts/index.d.ts.map +0 -1
- package/es/layouts/license-plate.d.ts.map +0 -1
- package/es/layouts/number.d.ts.map +0 -1
- package/es/layouts/phone.d.ts.map +0 -1
- package/es/layouts/punct.d.ts.map +0 -1
- package/es/layouts/qwerty.d.ts.map +0 -1
- package/es/layouts/search.d.ts.map +0 -1
- package/es/layouts/symbol.d.ts.map +0 -1
- package/es/layouts/url.d.ts.map +0 -1
- package/es/layouts/verifycode.d.ts.map +0 -1
- package/es/managers/index.d.ts.map +0 -1
- package/es/managers/keyboard-manager.d.ts.map +0 -1
- package/es/managers/keyboard-renderer.d.ts.map +0 -1
- package/es/managers/position-manager.d.ts.map +0 -1
- package/es/themes/index.d.ts.map +0 -1
- package/es/themes/presets.d.ts.map +0 -1
- package/es/themes/types.d.ts.map +0 -1
- package/es/types/index.d.ts.map +0 -1
- package/es/types/keyboard.d.ts.map +0 -1
- package/es/types/position.d.ts.map +0 -1
- package/es/utils/device.d.ts.map +0 -1
- package/es/utils/dom.d.ts.map +0 -1
- package/es/utils/event-emitter.d.ts.map +0 -1
- package/es/utils/formatters.d.ts.map +0 -1
- package/es/utils/index.d.ts.map +0 -1
- package/es/utils/random.d.ts.map +0 -1
- package/esm/icons.d.ts.map +0 -1
- package/esm/index.d.ts.map +0 -1
- package/esm/layouts/amount.d.ts.map +0 -1
- package/esm/layouts/bankcard.d.ts.map +0 -1
- package/esm/layouts/email.d.ts +0 -11
- package/esm/layouts/email.d.ts.map +0 -1
- package/esm/layouts/idcard.d.ts.map +0 -1
- package/esm/layouts/index.d.ts.map +0 -1
- package/esm/layouts/license-plate.d.ts.map +0 -1
- package/esm/layouts/number.d.ts.map +0 -1
- package/esm/layouts/phone.d.ts +0 -15
- package/esm/layouts/phone.d.ts.map +0 -1
- package/esm/layouts/punct.d.ts +0 -7
- package/esm/layouts/punct.d.ts.map +0 -1
- package/esm/layouts/qwerty.d.ts.map +0 -1
- package/esm/layouts/search.d.ts.map +0 -1
- package/esm/layouts/symbol.d.ts.map +0 -1
- package/esm/layouts/url.d.ts.map +0 -1
- package/esm/layouts/verifycode.d.ts +0 -15
- package/esm/layouts/verifycode.d.ts.map +0 -1
- package/esm/managers/index.d.ts +0 -8
- package/esm/managers/index.d.ts.map +0 -1
- package/esm/managers/keyboard-manager.d.ts +0 -130
- package/esm/managers/keyboard-manager.d.ts.map +0 -1
- package/esm/managers/keyboard-renderer.d.ts +0 -115
- package/esm/managers/keyboard-renderer.d.ts.map +0 -1
- package/esm/managers/position-manager.d.ts +0 -72
- package/esm/managers/position-manager.d.ts.map +0 -1
- package/esm/themes/index.d.ts +0 -70
- package/esm/themes/index.d.ts.map +0 -1
- package/esm/themes/presets.d.ts +0 -39
- package/esm/themes/presets.d.ts.map +0 -1
- package/esm/themes/types.d.ts.map +0 -1
- package/esm/themes/types.js +0 -10
- package/esm/types/index.d.ts.map +0 -1
- package/esm/types/index.js +0 -10
- package/esm/types/keyboard.d.ts.map +0 -1
- package/esm/types/keyboard.js +0 -10
- package/esm/types/position.d.ts +0 -139
- package/esm/types/position.d.ts.map +0 -1
- package/esm/types/position.js +0 -10
- package/esm/utils/device.d.ts.map +0 -1
- package/esm/utils/dom.d.ts.map +0 -1
- package/esm/utils/event-emitter.d.ts.map +0 -1
- package/esm/utils/formatters.d.ts.map +0 -1
- package/esm/utils/index.d.ts.map +0 -1
- package/esm/utils/index.js +0 -16
- package/esm/utils/random.d.ts.map +0 -1
- package/lib/icons.d.ts +0 -58
- package/lib/index.d.ts +0 -12
- package/lib/layouts/amount.d.ts +0 -14
- package/lib/layouts/bankcard.d.ts +0 -15
- package/lib/layouts/idcard.d.ts +0 -16
- package/lib/layouts/index.d.ts +0 -54
- package/lib/layouts/license-plate.d.ts +0 -35
- package/lib/layouts/number.d.ts +0 -14
- package/lib/layouts/qwerty.d.ts +0 -10
- package/lib/layouts/search.d.ts +0 -7
- package/lib/layouts/symbol.d.ts +0 -14
- package/lib/layouts/url.d.ts +0 -7
- package/lib/themes/types.d.ts +0 -118
- package/lib/types/index.d.ts +0 -7
- package/lib/types/keyboard.d.ts +0 -253
- package/lib/utils/device.d.ts +0 -45
- package/lib/utils/dom.d.ts +0 -69
- package/lib/utils/event-emitter.d.ts +0 -52
- package/lib/utils/formatters.d.ts +0 -51
- package/lib/utils/index.d.ts +0 -10
- package/lib/utils/random.d.ts +0 -71
package/esm/types/position.d.ts
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 弹出位置类型定义
|
|
3
|
-
* @module types/position
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 设备类型
|
|
7
|
-
*/
|
|
8
|
-
export type DeviceType = 'mobile' | 'desktop';
|
|
9
|
-
/**
|
|
10
|
-
* 弹出位置
|
|
11
|
-
*/
|
|
12
|
-
export type PopupPlacement = 'bottom' | 'top' | 'bottom-sheet';
|
|
13
|
-
/**
|
|
14
|
-
* 位置坐标
|
|
15
|
-
*/
|
|
16
|
-
export interface Position {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* 尺寸
|
|
22
|
-
*/
|
|
23
|
-
export interface Size {
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* 边界矩形
|
|
29
|
-
*/
|
|
30
|
-
export interface BoundingRect extends Position, Size {
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 弹出层位置配置
|
|
34
|
-
*/
|
|
35
|
-
export interface PopupPositionConfig {
|
|
36
|
-
/**
|
|
37
|
-
* 偏移量
|
|
38
|
-
*/
|
|
39
|
-
offset?: {
|
|
40
|
-
x?: number;
|
|
41
|
-
y?: number;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* 是否自动调整位置以适应视口
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
autoAdjust?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 与视口边缘的最小距离
|
|
50
|
-
* @default 8
|
|
51
|
-
*/
|
|
52
|
-
viewportPadding?: number;
|
|
53
|
-
/**
|
|
54
|
-
* PC 端弹出位置
|
|
55
|
-
* @default 'bottom'
|
|
56
|
-
*/
|
|
57
|
-
desktopPlacement?: Exclude<PopupPlacement, 'bottom-sheet'>;
|
|
58
|
-
/**
|
|
59
|
-
* 移动端弹出位置
|
|
60
|
-
* @default 'bottom-sheet'
|
|
61
|
-
*/
|
|
62
|
-
mobilePlacement?: PopupPlacement;
|
|
63
|
-
/**
|
|
64
|
-
* 是否显示遮罩层(移动端)
|
|
65
|
-
* @default true
|
|
66
|
-
*/
|
|
67
|
-
showMask?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* 遮罩层点击关闭
|
|
70
|
-
* @default true
|
|
71
|
-
*/
|
|
72
|
-
maskClosable?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* 动画时长(毫秒)
|
|
75
|
-
* @default 300
|
|
76
|
-
*/
|
|
77
|
-
animationDuration?: number;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* 弹出层计算结果
|
|
81
|
-
*/
|
|
82
|
-
export interface PopupPositionResult {
|
|
83
|
-
/**
|
|
84
|
-
* 计算后的位置
|
|
85
|
-
*/
|
|
86
|
-
position: Position;
|
|
87
|
-
/**
|
|
88
|
-
* 实际使用的弹出位置
|
|
89
|
-
*/
|
|
90
|
-
placement: PopupPlacement;
|
|
91
|
-
/**
|
|
92
|
-
* 是否需要翻转位置
|
|
93
|
-
*/
|
|
94
|
-
flipped: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* 最大可用高度
|
|
97
|
-
*/
|
|
98
|
-
maxHeight?: number;
|
|
99
|
-
/**
|
|
100
|
-
* 最大可用宽度
|
|
101
|
-
*/
|
|
102
|
-
maxWidth?: number;
|
|
103
|
-
/**
|
|
104
|
-
* CSS transform 样式
|
|
105
|
-
*/
|
|
106
|
-
transform?: string;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* 视口信息
|
|
110
|
-
*/
|
|
111
|
-
export interface ViewportInfo {
|
|
112
|
-
/**
|
|
113
|
-
* 视口宽度
|
|
114
|
-
*/
|
|
115
|
-
width: number;
|
|
116
|
-
/**
|
|
117
|
-
* 视口高度
|
|
118
|
-
*/
|
|
119
|
-
height: number;
|
|
120
|
-
/**
|
|
121
|
-
* 滚动位置
|
|
122
|
-
*/
|
|
123
|
-
scrollX: number;
|
|
124
|
-
scrollY: number;
|
|
125
|
-
/**
|
|
126
|
-
* 是否为移动设备
|
|
127
|
-
*/
|
|
128
|
-
isMobile: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* 安全区域(针对刘海屏等)
|
|
131
|
-
*/
|
|
132
|
-
safeArea?: {
|
|
133
|
-
top: number;
|
|
134
|
-
right: number;
|
|
135
|
-
bottom: number;
|
|
136
|
-
left: number;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
//# sourceMappingURL=position.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../src/types/position.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE7C;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,KAAK,GACL,cAAc,CAAA;AAElB;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,QAAQ,EAAE,IAAI;CAAG;AAEvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IAED;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;IAE1D;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,CAAA;IAEhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAA;IAElB;;OAEG;IACH,SAAS,EAAE,cAAc,CAAA;IAEzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;CACF"}
|
package/esm/types/position.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ***********************************
|
|
3
|
-
* @composy/keyboard-core v0.0.1 *
|
|
4
|
-
* Built with rollup *
|
|
5
|
-
* Build time: 2024-08-17 11:33:29 *
|
|
6
|
-
* Build mode: production *
|
|
7
|
-
* Minified: No *
|
|
8
|
-
* ***********************************
|
|
9
|
-
*/
|
|
10
|
-
/*! End of @composy/keyboard-core | Powered by @composy/builder */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/utils/device.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAYxD;;GAEG;AACH,wBA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QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;IAkCjE;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,GAAG,MAAM;CAW9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,GAAE,MAAU,GAAG,MAAM,CAqB7E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAE1E;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;AAUzD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAElF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAExE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlE"}
|
package/esm/utils/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA"}
|
package/esm/utils/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ***********************************
|
|
3
|
-
* @composy/keyboard-core v0.0.1 *
|
|
4
|
-
* Built with rollup *
|
|
5
|
-
* Build time: 2024-08-17 11:33:29 *
|
|
6
|
-
* Build mode: production *
|
|
7
|
-
* Minified: No *
|
|
8
|
-
* ***********************************
|
|
9
|
-
*/
|
|
10
|
-
import { EventEmitter } from "./event-emitter.js";
|
|
11
|
-
import { getDeviceType, getSafeAreaInsets, getViewportInfo, isMobile, isMobileUA, isTouchDevice, onViewportChange, supportsVibrate, vibrate } from "./device.js";
|
|
12
|
-
import { createElement, deleteCharBeforeCursor, getBoundingRect, getElementOffset, getInputCursorPosition, insertTextAtCursor, isClickOutside, isElementInViewport, onClickOutside, preventDefaultAndStopPropagation, scrollIntoViewIfNeeded, setInputCursorPosition, setStyles, toggleClass } from "./dom.js";
|
|
13
|
-
import { createRandomLetterLayout, createRandomMixedLayout, createRandomNumberLayout, createRandomPinLayout, getRandomAlphanumeric, getRandomLetters, getRandomNumbers, refreshRandomLayout, shuffleArray } from "./random.js";
|
|
14
|
-
import { applyFormatter, formatAmount, formatBankCard, formatIdCard, formatLicensePlate, formatPhone, formatVerifyCode, getFormatter, registerFormatter } from "./formatters.js";
|
|
15
|
-
export { EventEmitter, applyFormatter, createElement, createRandomLetterLayout, createRandomMixedLayout, createRandomNumberLayout, createRandomPinLayout, deleteCharBeforeCursor, formatAmount, formatBankCard, formatIdCard, formatLicensePlate, formatPhone, formatVerifyCode, getBoundingRect, getDeviceType, getElementOffset, getFormatter, getInputCursorPosition, getRandomAlphanumeric, getRandomLetters, getRandomNumbers, getSafeAreaInsets, getViewportInfo, insertTextAtCursor, isClickOutside, isElementInViewport, isMobile, isMobileUA, isTouchDevice, onClickOutside, onViewportChange, preventDefaultAndStopPropagation, refreshRandomLayout, registerFormatter, scrollIntoViewIfNeeded, setInputCursorPosition, setStyles, shuffleArray, supportsVibrate, toggleClass, vibrate };
|
|
16
|
-
/*! End of @composy/keyboard-core | Powered by @composy/builder */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/utils/random.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA8B,MAAM,UAAU,CAAA;AAE1E;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAO/C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAE3C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAK3C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAMhD;AA0BD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE;IACjD,YAAY;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,cAAc;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,cAAc;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,GAAG,cAAc,CAgEjB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE;IAC9C,cAAc;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,cAAc;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,GAAG,cAAc,CA6EjB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE;IACjD,WAAW;IACX,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B,GAAG,cAAc,CA+DjB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE;IAChD,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B,GAAG,cAAc,CA4DjB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAe1E"}
|
package/lib/icons.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 键盘图标 SVG
|
|
3
|
-
* 使用 Lucide 图标的 SVG 路径
|
|
4
|
-
* @module icons
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* 删除图标 (Delete/Backspace)
|
|
8
|
-
*/
|
|
9
|
-
export declare const ICON_DELETE = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z\"/><path d=\"m12 9 6 6\"/><path d=\"m18 9-6 6\"/></svg>";
|
|
10
|
-
/**
|
|
11
|
-
* 清空图标 (X Circle)
|
|
12
|
-
*/
|
|
13
|
-
export declare const ICON_CLEAR = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></svg>";
|
|
14
|
-
/**
|
|
15
|
-
* 关闭图标 (X)
|
|
16
|
-
*/
|
|
17
|
-
export declare const ICON_CLOSE = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
18
|
-
/**
|
|
19
|
-
* 确认图标 (Check)
|
|
20
|
-
*/
|
|
21
|
-
export declare const ICON_CHECK = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"/></svg>";
|
|
22
|
-
/**
|
|
23
|
-
* 换行图标 (Corner Down Left)
|
|
24
|
-
*/
|
|
25
|
-
export declare const ICON_ENTER = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"9 10 4 15 9 20\"/><path d=\"M20 4v7a4 4 0 0 1-4 4H4\"/></svg>";
|
|
26
|
-
/**
|
|
27
|
-
* Shift 图标 (Arrow Big Up)
|
|
28
|
-
*/
|
|
29
|
-
export declare const ICON_SHIFT = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18v-6H5l7-7 7 7h-4v6H9z\"/></svg>";
|
|
30
|
-
/**
|
|
31
|
-
* 空格图标 (Space)
|
|
32
|
-
*/
|
|
33
|
-
export declare const ICON_SPACE = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1\"/></svg>";
|
|
34
|
-
/**
|
|
35
|
-
* 键盘图标 (Keyboard)
|
|
36
|
-
*/
|
|
37
|
-
export declare const ICON_KEYBOARD = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"/><path d=\"M6 8h.001\"/><path d=\"M10 8h.001\"/><path d=\"M14 8h.001\"/><path d=\"M18 8h.001\"/><path d=\"M8 12h.001\"/><path d=\"M12 12h.001\"/><path d=\"M16 12h.001\"/><path d=\"M7 16h10\"/></svg>";
|
|
38
|
-
/**
|
|
39
|
-
* 语音图标 (Mic)
|
|
40
|
-
*/
|
|
41
|
-
export declare const ICON_VOICE = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z\"/><path d=\"M19 10v2a7 7 0 0 1-14 0v-2\"/><line x1=\"12\" x2=\"12\" y1=\"19\" y2=\"22\"/></svg>";
|
|
42
|
-
/**
|
|
43
|
-
* 所有图标映射
|
|
44
|
-
*/
|
|
45
|
-
export declare const ICONS: {
|
|
46
|
-
readonly delete: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z\"/><path d=\"m12 9 6 6\"/><path d=\"m18 9-6 6\"/></svg>";
|
|
47
|
-
readonly clear: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></svg>";
|
|
48
|
-
readonly close: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
49
|
-
readonly check: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"/></svg>";
|
|
50
|
-
readonly enter: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"9 10 4 15 9 20\"/><path d=\"M20 4v7a4 4 0 0 1-4 4H4\"/></svg>";
|
|
51
|
-
readonly shift: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18v-6H5l7-7 7 7h-4v6H9z\"/></svg>";
|
|
52
|
-
readonly space: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1\"/></svg>";
|
|
53
|
-
readonly keyboard: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"/><path d=\"M6 8h.001\"/><path d=\"M10 8h.001\"/><path d=\"M14 8h.001\"/><path d=\"M18 8h.001\"/><path d=\"M8 12h.001\"/><path d=\"M12 12h.001\"/><path d=\"M16 12h.001\"/><path d=\"M7 16h10\"/></svg>";
|
|
54
|
-
readonly voice: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z\"/><path d=\"M19 10v2a7 7 0 0 1-14 0v-2\"/><line x1=\"12\" x2=\"12\" y1=\"19\" y2=\"22\"/></svg>";
|
|
55
|
-
};
|
|
56
|
-
/** IconName - 图标名称类型 */
|
|
57
|
-
export type IconName = keyof typeof ICONS;
|
|
58
|
-
//# sourceMappingURL=icons.d.ts.map
|
package/lib/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @composy/keyboard-core
|
|
3
|
-
* LDesign 虚拟键盘 - 框架无关的核心模块
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
export * from './managers';
|
|
7
|
-
export * from './layouts';
|
|
8
|
-
export * from './types';
|
|
9
|
-
export * from './utils';
|
|
10
|
-
export * from './themes';
|
|
11
|
-
export * from './icons';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/layouts/amount.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 金额键盘布局
|
|
3
|
-
* @module layouts/amount
|
|
4
|
-
*/
|
|
5
|
-
import type { KeyboardConfig } from '../types';
|
|
6
|
-
/**
|
|
7
|
-
* 金额键盘配置 - 紧凑4x4布局
|
|
8
|
-
*/
|
|
9
|
-
export declare const amountLayout: KeyboardConfig;
|
|
10
|
-
/**
|
|
11
|
-
* 简洁金额键盘 - 紧凑4x4布局
|
|
12
|
-
*/
|
|
13
|
-
export declare const amountSimpleLayout: KeyboardConfig;
|
|
14
|
-
//# sourceMappingURL=amount.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 银行卡键盘布局
|
|
3
|
-
* @module layouts/bankcard
|
|
4
|
-
*/
|
|
5
|
-
import type { KeyboardConfig } from '../types';
|
|
6
|
-
/**
|
|
7
|
-
* 银行卡键盘配置 - 紧凑4x4布局
|
|
8
|
-
* 布局结构:
|
|
9
|
-
* 第1行: 1 2 3 [退格]
|
|
10
|
-
* 第2行: 4 5 6 [清除]
|
|
11
|
-
* 第3行: 7 8 9 [关闭]
|
|
12
|
-
* 第4行: [ABC] 0 [确定(占2格)]
|
|
13
|
-
*/
|
|
14
|
-
export declare const bankcardLayout: KeyboardConfig;
|
|
15
|
-
//# sourceMappingURL=bankcard.d.ts.map
|
package/lib/layouts/idcard.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 身份证号键盘布局
|
|
3
|
-
* @module layouts/idcard
|
|
4
|
-
*/
|
|
5
|
-
import type { KeyboardConfig } from '../types';
|
|
6
|
-
/**
|
|
7
|
-
* 身份证号键盘配置
|
|
8
|
-
* 紧凑3x4布局,无空白位置
|
|
9
|
-
* 布局结构:
|
|
10
|
-
* 第1行: 1 2 3 [退格]
|
|
11
|
-
* 第2行: 4 5 6 [清除]
|
|
12
|
-
* 第3行: 7 8 9 X
|
|
13
|
-
* 第4行: [关闭] 0 [确定(占2格)]
|
|
14
|
-
*/
|
|
15
|
-
export declare const idcardLayout: KeyboardConfig;
|
|
16
|
-
//# sourceMappingURL=idcard.d.ts.map
|
package/lib/layouts/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 键盘布局管理
|
|
3
|
-
* @module layouts
|
|
4
|
-
*/
|
|
5
|
-
import type { KeyboardConfig, KeyboardType } from '../types';
|
|
6
|
-
import { qwertyLayout } from './qwerty';
|
|
7
|
-
import { integerLayout, numberLayout } from './number';
|
|
8
|
-
import { symbolLayout, symbolLayout2 } from './symbol';
|
|
9
|
-
import { licensePlateAlphanumericLayout, licensePlateLayout, licensePlateLetterLayout, licensePlateProvinceLayout, PLATE_LETTERS, PROVINCES } from './license-plate';
|
|
10
|
-
import { idcardLayout } from './idcard';
|
|
11
|
-
import { phoneLayout, phoneSimpleLayout } from './phone';
|
|
12
|
-
import { amountLayout, amountSimpleLayout } from './amount';
|
|
13
|
-
import { bankcardLayout } from './bankcard';
|
|
14
|
-
import { verifycodeLayout } from './verifycode';
|
|
15
|
-
import { emailLayout, EMAIL_SUFFIXES } from './email';
|
|
16
|
-
import { urlLayout } from './url';
|
|
17
|
-
import { searchLayout } from './search';
|
|
18
|
-
import { punctLayout } from './punct';
|
|
19
|
-
export { qwertyLayout, numberLayout, integerLayout, symbolLayout, symbolLayout2, licensePlateLayout, licensePlateProvinceLayout, licensePlateLetterLayout, licensePlateAlphanumericLayout, PROVINCES, PLATE_LETTERS, idcardLayout, phoneLayout, phoneSimpleLayout, amountLayout, amountSimpleLayout, bankcardLayout, verifycodeLayout, emailLayout, urlLayout, searchLayout, EMAIL_SUFFIXES, punctLayout, };
|
|
20
|
-
/**
|
|
21
|
-
* 注册自定义布局
|
|
22
|
-
* @param name - 布局名称
|
|
23
|
-
* @param layout - 布局配置
|
|
24
|
-
*/
|
|
25
|
-
export declare function registerLayout(name: string, layout: KeyboardConfig): void;
|
|
26
|
-
/**
|
|
27
|
-
* 获取布局配置
|
|
28
|
-
* @param type - 键盘类型或布局名称
|
|
29
|
-
* @returns 布局配置,如果不存在则返回 undefined
|
|
30
|
-
*/
|
|
31
|
-
export declare function getLayout(type: KeyboardType | string): KeyboardConfig | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* 获取所有可用布局名称
|
|
34
|
-
* @returns 布局名称数组
|
|
35
|
-
*/
|
|
36
|
-
export declare function getAvailableLayouts(): string[];
|
|
37
|
-
/**
|
|
38
|
-
* 检查布局是否存在
|
|
39
|
-
* @param name - 布局名称
|
|
40
|
-
* @returns 是否存在
|
|
41
|
-
*/
|
|
42
|
-
export declare function hasLayout(name: string): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 移除自定义布局
|
|
45
|
-
* @param name - 布局名称
|
|
46
|
-
* @returns 是否成功移除
|
|
47
|
-
*/
|
|
48
|
-
export declare function unregisterLayout(name: string): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* 批量注册布局
|
|
51
|
-
* @param layouts - 布局映射对象
|
|
52
|
-
*/
|
|
53
|
-
export declare function registerLayouts(layouts: Record<string, KeyboardConfig>): void;
|
|
54
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 车牌号键盘布局
|
|
3
|
-
* @module layouts/license-plate
|
|
4
|
-
* 省份键盘类似26键布局,点击省份后自动切换到字母数字键盘
|
|
5
|
-
*/
|
|
6
|
-
import type { KeyboardConfig } from '../types';
|
|
7
|
-
/**
|
|
8
|
-
* 省份简称列表(按地理区域排列,10列布局)
|
|
9
|
-
*/
|
|
10
|
-
export declare const PROVINCES: string[];
|
|
11
|
-
/**
|
|
12
|
-
* 车牌字母(排除 I 和 O,避免与数字混淆)
|
|
13
|
-
*/
|
|
14
|
-
export declare const PLATE_LETTERS: string[];
|
|
15
|
-
/**
|
|
16
|
-
* 省份键盘配置 - 类似26键布局
|
|
17
|
-
* 10列布局,更紧凑美观
|
|
18
|
-
*/
|
|
19
|
-
export declare const licensePlateProvinceLayout: KeyboardConfig;
|
|
20
|
-
/**
|
|
21
|
-
* 字母数字键盘配置(车牌第2-8位)
|
|
22
|
-
* 10列布局
|
|
23
|
-
*/
|
|
24
|
-
export declare const licensePlateAlphanumericLayout: KeyboardConfig;
|
|
25
|
-
/**
|
|
26
|
-
* 纯字母键盘配置(车牌第2位,只能输入字母)
|
|
27
|
-
* 6列布局,排除 I 和 O
|
|
28
|
-
*/
|
|
29
|
-
export declare const licensePlateLetterLayout: KeyboardConfig;
|
|
30
|
-
/**
|
|
31
|
-
* 完整车牌号键盘(自动切换模式)
|
|
32
|
-
* 默认显示省份键盘,点击省份后自动切换到字母数字键盘
|
|
33
|
-
*/
|
|
34
|
-
export declare const licensePlateLayout: KeyboardConfig;
|
|
35
|
-
//# sourceMappingURL=license-plate.d.ts.map
|
package/lib/layouts/number.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 数字键盘布局
|
|
3
|
-
* @module layouts/number
|
|
4
|
-
*/
|
|
5
|
-
import type { KeyboardConfig } from '../types';
|
|
6
|
-
/**
|
|
7
|
-
* 数字键盘配置 - 紧凑4x4布局
|
|
8
|
-
*/
|
|
9
|
-
export declare const numberLayout: KeyboardConfig;
|
|
10
|
-
/**
|
|
11
|
-
* 纯整数键盘 - 紧凑4x4布局
|
|
12
|
-
*/
|
|
13
|
-
export declare const integerLayout: KeyboardConfig;
|
|
14
|
-
//# sourceMappingURL=number.d.ts.map
|
package/lib/layouts/qwerty.d.ts
DELETED
package/lib/layouts/search.d.ts
DELETED
package/lib/layouts/symbol.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 符号键盘布局
|
|
3
|
-
* @module layouts/symbol
|
|
4
|
-
*/
|
|
5
|
-
import type { KeyboardConfig } from '../types';
|
|
6
|
-
/**
|
|
7
|
-
* 符号键盘配置
|
|
8
|
-
*/
|
|
9
|
-
export declare const symbolLayout: KeyboardConfig;
|
|
10
|
-
/**
|
|
11
|
-
* 符号键盘第二页
|
|
12
|
-
*/
|
|
13
|
-
export declare const symbolLayout2: KeyboardConfig;
|
|
14
|
-
//# sourceMappingURL=symbol.d.ts.map
|
package/lib/layouts/url.d.ts
DELETED
package/lib/themes/types.d.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 主题系统类型定义
|
|
3
|
-
* @module themes/types
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 预设主题名称
|
|
7
|
-
*/
|
|
8
|
-
export type ThemeName = 'miui' | 'ios' | 'material' | 'minimal' | 'dark' | 'custom';
|
|
9
|
-
/**
|
|
10
|
-
* 主题色彩配置
|
|
11
|
-
*/
|
|
12
|
-
export interface ThemeColors {
|
|
13
|
-
/** 键盘背景色 */
|
|
14
|
-
background: string;
|
|
15
|
-
/** 按键背景色 */
|
|
16
|
-
keyBackground: string;
|
|
17
|
-
/** 按键文字颜色 */
|
|
18
|
-
keyColor: string;
|
|
19
|
-
/** 按键按下背景色 */
|
|
20
|
-
keyActiveBackground: string;
|
|
21
|
-
/** 功能键背景色 */
|
|
22
|
-
fnKeyBackground: string;
|
|
23
|
-
/** 功能键文字颜色 */
|
|
24
|
-
fnKeyColor: string;
|
|
25
|
-
/** 功能键按下背景色 */
|
|
26
|
-
fnKeyActiveBackground: string;
|
|
27
|
-
/** 主色调(确认/完成键) */
|
|
28
|
-
primaryBackground: string;
|
|
29
|
-
/** 主色调按下 */
|
|
30
|
-
primaryActiveBackground: string;
|
|
31
|
-
/** 主色调文字 */
|
|
32
|
-
primaryColor: string;
|
|
33
|
-
/** 边框颜色(可选) */
|
|
34
|
-
borderColor?: string;
|
|
35
|
-
/** 分割线颜色 */
|
|
36
|
-
dividerColor?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 主题尺寸配置
|
|
40
|
-
*/
|
|
41
|
-
export interface ThemeSizes {
|
|
42
|
-
/** 按键高度 */
|
|
43
|
-
keyHeight: number;
|
|
44
|
-
/** 按键圆角 */
|
|
45
|
-
keyRadius: number;
|
|
46
|
-
/** 按键间距 */
|
|
47
|
-
keyGap: number;
|
|
48
|
-
/** 字体大小 */
|
|
49
|
-
fontSize: number;
|
|
50
|
-
/** 功能键字体大小 */
|
|
51
|
-
fnFontSize: number;
|
|
52
|
-
/** 键盘内边距 */
|
|
53
|
-
padding: number;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* 主题效果配置
|
|
57
|
-
*/
|
|
58
|
-
export interface ThemeEffects {
|
|
59
|
-
/** 按键阴影 */
|
|
60
|
-
keyShadow: string;
|
|
61
|
-
/** 按键按下阴影 */
|
|
62
|
-
keyActiveShadow: string;
|
|
63
|
-
/** 按键按下缩放 */
|
|
64
|
-
keyActiveScale: number;
|
|
65
|
-
/** 动画时长 (ms) */
|
|
66
|
-
transitionDuration: number;
|
|
67
|
-
/** 是否启用毛玻璃效果 */
|
|
68
|
-
enableBlur: boolean;
|
|
69
|
-
/** 毛玻璃模糊度 */
|
|
70
|
-
blurAmount: number;
|
|
71
|
-
/** 是否启用涟漪效果 */
|
|
72
|
-
enableRipple: boolean;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* 完整主题配置
|
|
76
|
-
*/
|
|
77
|
-
export interface ThemeConfig {
|
|
78
|
-
/** 主题名称 */
|
|
79
|
-
name: ThemeName | string;
|
|
80
|
-
/** 显示名称 */
|
|
81
|
-
displayName: string;
|
|
82
|
-
/** 主题描述 */
|
|
83
|
-
description?: string;
|
|
84
|
-
/** 色彩配置 */
|
|
85
|
-
colors: ThemeColors;
|
|
86
|
-
/** 尺寸配置 */
|
|
87
|
-
sizes: ThemeSizes;
|
|
88
|
-
/** 效果配置 */
|
|
89
|
-
effects: ThemeEffects;
|
|
90
|
-
/** 是否为深色主题 */
|
|
91
|
-
isDark: boolean;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* 主题CSS变量映射
|
|
95
|
-
*/
|
|
96
|
-
export interface ThemeCSSVariables {
|
|
97
|
-
'--keyboard-bg': string;
|
|
98
|
-
'--keyboard-key-bg': string;
|
|
99
|
-
'--keyboard-key-color': string;
|
|
100
|
-
'--keyboard-key-active-bg': string;
|
|
101
|
-
'--keyboard-fn-key-bg': string;
|
|
102
|
-
'--keyboard-fn-key-color': string;
|
|
103
|
-
'--keyboard-fn-key-active-bg': string;
|
|
104
|
-
'--keyboard-primary-bg': string;
|
|
105
|
-
'--keyboard-primary-active-bg': string;
|
|
106
|
-
'--keyboard-primary-color': string;
|
|
107
|
-
'--keyboard-key-height': string;
|
|
108
|
-
'--keyboard-key-radius': string;
|
|
109
|
-
'--keyboard-key-gap': string;
|
|
110
|
-
'--keyboard-font-size': string;
|
|
111
|
-
'--keyboard-fn-font-size': string;
|
|
112
|
-
'--keyboard-padding': string;
|
|
113
|
-
'--keyboard-key-shadow': string;
|
|
114
|
-
'--keyboard-transition-duration': string;
|
|
115
|
-
'--keyboard-border-color'?: string;
|
|
116
|
-
'--keyboard-divider-color'?: string;
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=types.d.ts.map
|