@a16n/web-sim 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/README.md +13 -2
  2. package/bin/cli.ts +255 -0
  3. package/bin/web-sim.js +39 -0
  4. package/overrides/@backpackapp-io/react-native-toast/overrides.ts +15 -0
  5. package/overrides/@react-native-firebase/app/overrides.ts +34 -0
  6. package/overrides/@tiktok-for-business/react-native-sdk/NativeTiktokSdk.ts +29 -0
  7. package/overrides/@tiktok-for-business/react-native-sdk/overrides.ts +9 -0
  8. package/overrides/expo-application/ExpoApplication.ts +81 -0
  9. package/overrides/expo-application/overrides.ts +16 -0
  10. package/overrides/expo-background-task/ExpoBackgroundTaskModule.ts +30 -0
  11. package/overrides/expo-background-task/overrides.ts +9 -0
  12. package/overrides/expo-constants/ExponentConstants.ts +66 -0
  13. package/overrides/expo-constants/overrides.ts +9 -0
  14. package/overrides/expo-device/ExpoDevice.ts +104 -0
  15. package/overrides/expo-device/overrides.ts +9 -0
  16. package/overrides/expo-glass-effect/GlassContainer.tsx +9 -0
  17. package/overrides/expo-glass-effect/GlassView.tsx +95 -0
  18. package/overrides/expo-glass-effect/availability.ts +14 -0
  19. package/overrides/expo-glass-effect/overrides.ts +14 -0
  20. package/overrides/expo-haptics/Haptics.ts +67 -0
  21. package/overrides/expo-haptics/overrides.ts +5 -0
  22. package/overrides/expo-mail-composer/ExpoMailComposer.ts +40 -0
  23. package/overrides/expo-mail-composer/overrides.ts +9 -0
  24. package/overrides/expo-mesh-gradient/MeshGradientView.tsx +44 -0
  25. package/overrides/expo-mesh-gradient/overrides.ts +9 -0
  26. package/overrides/expo-modules-core/overrides.ts +12 -0
  27. package/overrides/expo-navigation-bar/ExpoNavigationBar.ts +29 -0
  28. package/overrides/expo-navigation-bar/NavigationBar.ts +43 -0
  29. package/overrides/expo-navigation-bar/overrides.ts +12 -0
  30. package/overrides/expo-router/NativeStackView.tsx +74 -0
  31. package/overrides/expo-router/NativeTabsView.tsx +263 -0
  32. package/overrides/expo-router/SafeAreaProvider.ts +6 -0
  33. package/overrides/expo-router/overrides.ts +23 -0
  34. package/overrides/expo-router/statusBarRequests.ts +51 -0
  35. package/overrides/expo-screen-orientation/ExpoScreenOrientation.ts +173 -0
  36. package/overrides/expo-screen-orientation/overrides.ts +21 -0
  37. package/overrides/expo-sharing/SharingNativeModule.ts +21 -0
  38. package/overrides/expo-sharing/overrides.ts +9 -0
  39. package/overrides/expo-sms/ExpoSMS.ts +24 -0
  40. package/overrides/expo-sms/overrides.ts +9 -0
  41. package/overrides/expo-splash-screen/SplashScreen.ts +25 -0
  42. package/overrides/expo-splash-screen/overrides.ts +5 -0
  43. package/overrides/expo-status-bar/StatusBar.tsx +44 -0
  44. package/overrides/expo-status-bar/overrides.ts +5 -0
  45. package/overrides/expo-store-review/ExpoStoreReview.ts +18 -0
  46. package/overrides/expo-store-review/overrides.ts +9 -0
  47. package/overrides/expo-symbols/SymbolView.tsx +192 -0
  48. package/overrides/expo-symbols/overrides.ts +9 -0
  49. package/overrides/expo-system-ui/ExpoSystemUI.ts +34 -0
  50. package/overrides/expo-system-ui/overrides.ts +9 -0
  51. package/overrides/expo-task-manager/ExpoTaskManager.ts +39 -0
  52. package/overrides/expo-task-manager/overrides.ts +9 -0
  53. package/overrides/expo-tracking-transparency/ExpoTrackingTransparency.ts +30 -0
  54. package/overrides/expo-tracking-transparency/overrides.ts +11 -0
  55. package/overrides/expo-video/ExpoVideo.ts +16 -0
  56. package/overrides/expo-video/overrides.ts +9 -0
  57. package/overrides/lottie-react-native/LottieView.tsx +87 -0
  58. package/overrides/lottie-react-native/overrides.ts +9 -0
  59. package/overrides/react-native-pager-view/PagerViewNativeComponent.tsx +254 -0
  60. package/overrides/react-native-pager-view/overrides.ts +9 -0
  61. package/overrides/react-native-reanimated/overrides.ts +28 -0
  62. package/overrides/react-native-safe-area-context/NativeSafeAreaProvider.tsx +40 -0
  63. package/overrides/react-native-safe-area-context/overrides.ts +12 -0
  64. package/overrides/react-native-share/NativeRNShare.ts +22 -0
  65. package/overrides/react-native-share/overrides.ts +12 -0
  66. package/overrides/react-native-share/platform.ts +14 -0
  67. package/overrides/react-native-turbo-image/TurboImage.tsx +101 -0
  68. package/overrides/react-native-turbo-image/overrides.ts +9 -0
  69. package/overrides/react-native-web/RefreshControl.tsx +57 -0
  70. package/overrides/react-native-web/overrides.ts +157 -0
  71. package/overrides/react-native-web/useElementLayout.ts +152 -0
  72. package/package.json +80 -4
  73. package/plugins/battery/overrides/expo-battery/ExpoBattery.ts +57 -0
  74. package/plugins/battery/overrides/expo-battery/overrides.ts +9 -0
  75. package/plugins/battery/plugin.ts +8 -0
  76. package/plugins/battery/shell.tsx +56 -0
  77. package/plugins/battery/state.ts +11 -0
  78. package/plugins/biometrics/overrides/expo-local-authentication/ExpoLocalAuthentication.ts +90 -0
  79. package/plugins/biometrics/overrides/expo-local-authentication/overrides.ts +11 -0
  80. package/plugins/biometrics/plugin.ts +8 -0
  81. package/plugins/biometrics/shell.tsx +88 -0
  82. package/plugins/biometrics/state.ts +41 -0
  83. package/plugins/brightness/app.ts +5 -0
  84. package/plugins/brightness/overrides/expo-brightness/Brightness.ts +98 -0
  85. package/plugins/brightness/overrides/expo-brightness/overrides.ts +10 -0
  86. package/plugins/brightness/plugin.ts +9 -0
  87. package/plugins/brightness/shell.tsx +55 -0
  88. package/plugins/brightness/state.ts +19 -0
  89. package/plugins/calendar/calendar.ts +299 -0
  90. package/plugins/calendar/overrides/expo-calendar/ExpoCalendar.ts +358 -0
  91. package/plugins/calendar/overrides/expo-calendar/LegacyExpoCalendar.ts +163 -0
  92. package/plugins/calendar/overrides/expo-calendar/overrides.ts +14 -0
  93. package/plugins/calendar/plugin.ts +8 -0
  94. package/plugins/calendar/shell.tsx +123 -0
  95. package/plugins/camera/overrides/expo-camera/ExpoCamera.tsx +269 -0
  96. package/plugins/camera/overrides/expo-camera/ExpoCameraManager.ts +56 -0
  97. package/plugins/camera/overrides/expo-camera/overrides.ts +12 -0
  98. package/plugins/camera/plugin.ts +9 -0
  99. package/plugins/camera/shell.tsx +107 -0
  100. package/plugins/camera/state.ts +61 -0
  101. package/plugins/clipboard/overrides/expo-clipboard/ExpoClipboard.ts +138 -0
  102. package/plugins/clipboard/overrides/expo-clipboard/overrides.ts +9 -0
  103. package/plugins/clipboard/plugin.ts +8 -0
  104. package/plugins/clipboard/shell.tsx +122 -0
  105. package/plugins/clipboard/state.ts +93 -0
  106. package/plugins/clock/app.ts +25 -0
  107. package/plugins/clock/plugin.ts +8 -0
  108. package/plugins/clock/shell.tsx +225 -0
  109. package/plugins/clock/state.ts +12 -0
  110. package/plugins/contacts/contacts.ts +125 -0
  111. package/plugins/contacts/overrides/expo-contacts/ExpoContacts.ts +153 -0
  112. package/plugins/contacts/overrides/expo-contacts/ExpoContactsNext.ts +232 -0
  113. package/plugins/contacts/overrides/expo-contacts/overrides.ts +12 -0
  114. package/plugins/contacts/plugin.ts +8 -0
  115. package/plugins/contacts/shell.tsx +109 -0
  116. package/plugins/home-indicator/app.ts +5 -0
  117. package/plugins/home-indicator/plugin.ts +9 -0
  118. package/plugins/home-indicator/requests.ts +48 -0
  119. package/plugins/home-indicator/shell.tsx +68 -0
  120. package/plugins/home-indicator/state.ts +31 -0
  121. package/plugins/keep-awake/app.ts +5 -0
  122. package/plugins/keep-awake/overrides/expo-keep-awake/ExpoKeepAwake.ts +27 -0
  123. package/plugins/keep-awake/overrides/expo-keep-awake/overrides.ts +9 -0
  124. package/plugins/keep-awake/plugin.ts +9 -0
  125. package/plugins/keep-awake/shell.tsx +80 -0
  126. package/plugins/keep-awake/state.ts +12 -0
  127. package/plugins/keyboard/Keyboard.tsx +354 -0
  128. package/plugins/keyboard/app.ts +90 -0
  129. package/plugins/keyboard/controller.ts +384 -0
  130. package/plugins/keyboard/fields.ts +244 -0
  131. package/plugins/keyboard/icons.tsx +283 -0
  132. package/plugins/keyboard/keyboard.css +362 -0
  133. package/plugins/keyboard/layouts/android.ts +175 -0
  134. package/plugins/keyboard/layouts/index.ts +10 -0
  135. package/plugins/keyboard/layouts/ios.ts +219 -0
  136. package/plugins/keyboard/layouts/types.ts +80 -0
  137. package/plugins/keyboard/overrides/react-native-keyboard-controller/KeyboardController.tsx +470 -0
  138. package/plugins/keyboard/overrides/react-native-keyboard-controller/overrides.ts +9 -0
  139. package/plugins/keyboard/plugin.ts +13 -0
  140. package/plugins/keyboard/shell.tsx +133 -0
  141. package/plugins/keyboard/state.ts +92 -0
  142. package/plugins/keyboard/suggestions.ts +63 -0
  143. package/plugins/keyboard/taps.ts +77 -0
  144. package/plugins/keyboard/typing.ts +112 -0
  145. package/plugins/locale/app.ts +232 -0
  146. package/plugins/locale/locale.ts +143 -0
  147. package/plugins/locale/overrides/expo-localization/ExpoLocalization.ts +41 -0
  148. package/plugins/locale/overrides/expo-localization/overrides.ts +9 -0
  149. package/plugins/locale/plugin.ts +9 -0
  150. package/plugins/locale/shell.tsx +147 -0
  151. package/plugins/locale/state.ts +36 -0
  152. package/plugins/location/geo.ts +56 -0
  153. package/plugins/location/overrides/expo-location/ExpoLocation.ts +235 -0
  154. package/plugins/location/overrides/expo-location/overrides.ts +11 -0
  155. package/plugins/location/places.ts +38 -0
  156. package/plugins/location/plugin.ts +8 -0
  157. package/plugins/location/shell.tsx +188 -0
  158. package/plugins/location/state.ts +51 -0
  159. package/plugins/motion/overrides/expo-sensors/DeviceSensor.ts +169 -0
  160. package/plugins/motion/overrides/expo-sensors/ExponentPedometer.ts +54 -0
  161. package/plugins/motion/overrides/expo-sensors/overrides.ts +14 -0
  162. package/plugins/motion/plugin.ts +8 -0
  163. package/plugins/motion/sensors.ts +116 -0
  164. package/plugins/motion/shell.tsx +136 -0
  165. package/plugins/motion/state.ts +46 -0
  166. package/plugins/network/app.ts +400 -0
  167. package/plugins/network/overrides/expo-network/ExpoNetwork.ts +51 -0
  168. package/plugins/network/overrides/expo-network/overrides.ts +9 -0
  169. package/plugins/network/plugin.ts +8 -0
  170. package/plugins/network/shell.tsx +67 -0
  171. package/plugins/network/state.ts +29 -0
  172. package/plugins/notifications/center.ts +255 -0
  173. package/plugins/notifications/content.ts +36 -0
  174. package/plugins/notifications/overrides/expo-notifications/NotificationsModule.ts +175 -0
  175. package/plugins/notifications/overrides/expo-notifications/channels.ts +108 -0
  176. package/plugins/notifications/overrides/expo-notifications/getDevicePushTokenAsync.ts +19 -0
  177. package/plugins/notifications/overrides/expo-notifications/getExpoPushTokenAsync.ts +16 -0
  178. package/plugins/notifications/overrides/expo-notifications/overrides.ts +36 -0
  179. package/plugins/notifications/plugin.ts +8 -0
  180. package/plugins/notifications/shell.tsx +192 -0
  181. package/plugins/notifications/state.ts +56 -0
  182. package/plugins/notifications/tokens.ts +47 -0
  183. package/plugins/notifications/trigger.ts +107 -0
  184. package/plugins/permissions/plugin.ts +6 -0
  185. package/plugins/permissions/shell.tsx +50 -0
  186. package/plugins/permissions/state.ts +38 -0
  187. package/plugins/photos/appLibrary.ts +114 -0
  188. package/plugins/photos/library.ts +322 -0
  189. package/plugins/photos/overrides/expo-image-picker/ExponentImagePicker.ts +153 -0
  190. package/plugins/photos/overrides/expo-image-picker/overrides.ts +13 -0
  191. package/plugins/photos/overrides/expo-media-library/ExpoMediaLibrary.ts +235 -0
  192. package/plugins/photos/overrides/expo-media-library/NativeMediaLibraryModule.ts +318 -0
  193. package/plugins/photos/overrides/expo-media-library/overrides.ts +19 -0
  194. package/plugins/photos/plugin.ts +8 -0
  195. package/plugins/photos/samples.ts +367 -0
  196. package/plugins/photos/shell.tsx +164 -0
  197. package/plugins/photos/state.ts +88 -0
  198. package/plugins/storage/files.ts +351 -0
  199. package/plugins/storage/overrides/expo-file-system/ExpoFileSystem.ts +770 -0
  200. package/plugins/storage/overrides/expo-file-system/ExponentFileSystem.ts +196 -0
  201. package/plugins/storage/overrides/expo-file-system/overrides.ts +13 -0
  202. package/plugins/storage/overrides/expo-secure-store/ExpoSecureStore.ts +75 -0
  203. package/plugins/storage/overrides/expo-secure-store/overrides.ts +9 -0
  204. package/plugins/storage/plugin.ts +8 -0
  205. package/plugins/storage/reset.ts +136 -0
  206. package/plugins/storage/secure.ts +71 -0
  207. package/plugins/storage/shell.tsx +365 -0
  208. package/plugins/storage/state.ts +13 -0
  209. package/src/client/app/appDocument.ts +129 -0
  210. package/src/client/app/appFocus.ts +97 -0
  211. package/src/client/app/console.ts +118 -0
  212. package/src/client/app/fonts.ts +76 -0
  213. package/src/client/app/main.tsx +99 -0
  214. package/src/client/app/routeContext.ts +45 -0
  215. package/src/client/app/touch.ts +640 -0
  216. package/src/client/entry.ts +20 -0
  217. package/src/client/modules.d.ts +8 -0
  218. package/src/client/react-native/app.ts +57 -0
  219. package/src/client/react-native/deep.ts +13 -0
  220. package/src/client/react-native/keyboard.tsx +192 -0
  221. package/src/client/react-native/library.ts +256 -0
  222. package/src/client/shell/Cookies.tsx +95 -0
  223. package/src/client/shell/LogDrawer.tsx +415 -0
  224. package/src/client/shell/PhotoPicker.tsx +174 -0
  225. package/src/client/shell/PluginOverlays.tsx +42 -0
  226. package/src/client/shell/PluginPanels.tsx +82 -0
  227. package/src/client/shell/ResetApp.tsx +87 -0
  228. package/src/client/shell/Resizer.tsx +99 -0
  229. package/src/client/shell/Shell.tsx +531 -0
  230. package/src/client/shell/SystemBars.tsx +376 -0
  231. package/src/client/shell/SystemCamera.tsx +181 -0
  232. package/src/client/shell/SystemOverlay.tsx +422 -0
  233. package/src/client/shell/SystemSheets.tsx +462 -0
  234. package/src/client/shell/backdrop.ts +229 -0
  235. package/src/client/shell/control.ts +91 -0
  236. package/src/client/shell/events.ts +226 -0
  237. package/src/client/shell/geometry.ts +68 -0
  238. package/src/client/shell/host.ts +492 -0
  239. package/src/client/shell/icons.tsx +34 -0
  240. package/src/client/shell/logFeed.ts +102 -0
  241. package/src/client/shell/main.tsx +22 -0
  242. package/src/client/shell/permissionCopy.ts +169 -0
  243. package/src/client/shell/plugins.ts +266 -0
  244. package/src/client/shell/popout.ts +185 -0
  245. package/src/client/shell/popover.ts +27 -0
  246. package/src/client/shell/shell.css +878 -0
  247. package/src/client/shell/statusTime.ts +31 -0
  248. package/src/client/shell/tooltips.ts +104 -0
  249. package/src/client/virtual.d.ts +23 -0
  250. package/src/devices/catalog.ts +223 -0
  251. package/src/devices/types.ts +83 -0
  252. package/src/node/appInfo.ts +188 -0
  253. package/src/node/appSource.ts +140 -0
  254. package/src/node/config.ts +180 -0
  255. package/src/node/control.ts +144 -0
  256. package/src/node/doctor.ts +199 -0
  257. package/src/node/events/cli.ts +206 -0
  258. package/src/node/events/shared.ts +238 -0
  259. package/src/node/events/store.ts +266 -0
  260. package/src/node/fonts.ts +377 -0
  261. package/src/node/index.ts +5 -0
  262. package/src/node/overrides/define.ts +56 -0
  263. package/src/node/overrides/packages.ts +136 -0
  264. package/src/node/overrides/platformPatch.ts +56 -0
  265. package/src/node/overrides/plugin.ts +169 -0
  266. package/src/node/overrides/registry.ts +258 -0
  267. package/src/node/paths.ts +18 -0
  268. package/src/node/platform.ts +171 -0
  269. package/src/node/plugins.ts +98 -0
  270. package/src/node/proxy.ts +421 -0
  271. package/src/node/server.ts +254 -0
  272. package/src/node/worklets.ts +86 -0
  273. package/src/plugin/index.ts +33 -0
  274. package/src/plugin/types.ts +127 -0
  275. package/src/plugin/ui.tsx +562 -0
  276. package/src/runtime/clock.ts +112 -0
  277. package/src/runtime/draw.ts +196 -0
  278. package/src/runtime/index.ts +519 -0
  279. package/src/runtime/media.ts +379 -0
  280. package/src/runtime/records.ts +76 -0
  281. package/src/runtime/timezone.ts +81 -0
@@ -0,0 +1,283 @@
1
+ import type { ReactNode } from 'react'
2
+
3
+ type IconProps = {
4
+ width: number
5
+ height: number
6
+ viewBox: string
7
+ children: ReactNode
8
+ }
9
+
10
+ function Icon({ width, height, viewBox, children }: IconProps) {
11
+ return (
12
+ <svg
13
+ width={width}
14
+ height={height}
15
+ viewBox={viewBox}
16
+ fill="none"
17
+ stroke="currentColor"
18
+ strokeLinecap="round"
19
+ strokeLinejoin="round"
20
+ aria-hidden
21
+ >
22
+ {children}
23
+ </svg>
24
+ )
25
+ }
26
+
27
+ export function ShiftIcon({ state }: { state: 'off' | 'on' | 'locked' }) {
28
+ if (state === 'locked') {
29
+ return (
30
+ <Icon width={20} height={17} viewBox="0 0 20 17">
31
+ <path d="M10 0.9 L19.1 7.9 H14.4 V12 H5.6 V7.9 H0.9 Z" fill="currentColor" strokeWidth={1.6} />
32
+ <rect x={5.6} y={14.4} width={8.8} height={2.2} rx={0.7} fill="currentColor" stroke="none" />
33
+ </Icon>
34
+ )
35
+ }
36
+ return (
37
+ <Icon width={20} height={17} viewBox="0 0 20 17">
38
+ <path
39
+ d="M10 0.9 L19.1 8.6 H14.4 V16.1 H5.6 V8.6 H0.9 Z"
40
+ fill={state === 'on' ? 'currentColor' : 'none'}
41
+ strokeWidth={1.6}
42
+ />
43
+ </Icon>
44
+ )
45
+ }
46
+
47
+ export function DeleteIcon() {
48
+ return (
49
+ <Icon width={20.3} height={17} viewBox="0 0 20.3 17">
50
+ <path
51
+ d="M7 0.85 H17.5 A2 2 0 0 1 19.5 2.85 V14.15 A2 2 0 0 1 17.5 16.15 H7 A1.8 1.8 0 0 1 5.7 15.6 L1 9.3 A1.4 1.4 0 0 1 1 7.7 L5.7 1.4 A1.8 1.8 0 0 1 7 0.85 Z"
52
+ strokeWidth={1.6}
53
+ />
54
+ <path d="M9.6 5.6 L15.2 11.4 M15.2 5.6 L9.6 11.4" strokeWidth={1.6} />
55
+ </Icon>
56
+ )
57
+ }
58
+
59
+ export function ReturnIcon() {
60
+ return (
61
+ <Icon width={19.7} height={17} viewBox="0 0 19.7 17">
62
+ <path d="M10.8 0.9 H16.8 A2 2 0 0 1 18.8 2.9 V6.8 A3 3 0 0 1 15.8 9.8 H1.3" strokeWidth={1.7} />
63
+ <path d="M6.8 4.1 L1.1 9.8 L6.8 15.5" strokeWidth={1.7} />
64
+ </Icon>
65
+ )
66
+ }
67
+
68
+ export function SearchIcon() {
69
+ return (
70
+ <Icon width={21} height={21} viewBox="0 0 24 24">
71
+ <circle cx={10} cy={10} r={7} strokeWidth={2.2} />
72
+ <path d="M15.2 15.2 L21.5 21.5" strokeWidth={2.6} />
73
+ </Icon>
74
+ )
75
+ }
76
+
77
+ export function ArrowRightIcon() {
78
+ return (
79
+ <Icon width={21} height={21} viewBox="0 0 24 24">
80
+ <path d="M3 12 H20 M13.5 5.5 L20 12 L13.5 18.5" strokeWidth={2.2} />
81
+ </Icon>
82
+ )
83
+ }
84
+
85
+ export function ArrowUpIcon() {
86
+ return (
87
+ <Icon width={21} height={21} viewBox="0 0 24 24">
88
+ <path d="M12 21 V4 M5.5 10.5 L12 4 L18.5 10.5" strokeWidth={2.2} />
89
+ </Icon>
90
+ )
91
+ }
92
+
93
+ export function CheckmarkIcon() {
94
+ return (
95
+ <Icon width={21} height={21} viewBox="0 0 24 24">
96
+ <path d="M4 12.5 L9.5 18 L20 6" strokeWidth={2.4} />
97
+ </Icon>
98
+ )
99
+ }
100
+
101
+ export function EmojiIcon() {
102
+ return (
103
+ <Icon width={26.7} height={26.7} viewBox="0 0 26.7 26.7">
104
+ <circle className="icon-fillable" cx={13.35} cy={13.35} r={12.4} strokeWidth={1.9} />
105
+ <g className="icon-cutout">
106
+ <ellipse cx={9.4} cy={9.9} rx={1.75} ry={2.4} stroke="none" />
107
+ <ellipse cx={17.3} cy={9.9} rx={1.75} ry={2.4} stroke="none" />
108
+ <path d="M6.6 14.3 H20.1 A6.75 6.75 0 0 1 6.6 14.3 Z" strokeWidth={1.4} />
109
+ </g>
110
+ <path
111
+ className="icon-teeth"
112
+ d="M7.9 15.7 H18.8 A6.3 6.3 0 0 1 18.2 17.2 H8.5 A6.3 6.3 0 0 1 7.9 15.7 Z"
113
+ stroke="none"
114
+ />
115
+ </Icon>
116
+ )
117
+ }
118
+
119
+ export function MicIcon() {
120
+ return (
121
+ <Icon width={18.3} height={27.7} viewBox="0 0 18.3 27.7">
122
+ <rect className="icon-fillable" x={4.45} y={0.9} width={9.4} height={17.4} rx={4.7} strokeWidth={1.8} />
123
+ <path d="M0.9 12.6 A8.25 8.25 0 0 0 17.4 12.6" strokeWidth={1.8} />
124
+ <path d="M9.15 20.9 V26.8 M4.9 26.8 H13.4" strokeWidth={1.8} />
125
+ </Icon>
126
+ )
127
+ }
128
+
129
+ /* Gboard's icons, after Material Symbols (rounded, 24dp grid). */
130
+
131
+ function Material({ size = 22, children }: { size?: number; children: ReactNode }) {
132
+ return (
133
+ <svg width={size} height={size} viewBox="0 0 24 24" fill="currentColor" aria-hidden>
134
+ {children}
135
+ </svg>
136
+ )
137
+ }
138
+
139
+ export function MaterialShift({ state }: { state: 'off' | 'on' | 'locked' }) {
140
+ const arrow = 'M12 3.6 3.4 12.6h4.9V19h7.4v-6.4h4.9Z'
141
+ return (
142
+ <Material>
143
+ <path d={arrow} fill={state === 'off' ? 'none' : 'currentColor'} stroke="currentColor" strokeWidth={1.8} strokeLinejoin="round" />
144
+ {state === 'locked' && <rect x={8.3} y={20.6} width={7.4} height={1.9} rx={0.6} />}
145
+ </Material>
146
+ )
147
+ }
148
+
149
+ export function MaterialBackspace() {
150
+ return (
151
+ <Material>
152
+ <path
153
+ d="M8.2 5h11.3A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5H8.2a1.5 1.5 0 0 1-1.2-.6L2.7 12.6a1 1 0 0 1 0-1.2L7 5.6A1.5 1.5 0 0 1 8.2 5Z"
154
+ fill="none"
155
+ stroke="currentColor"
156
+ strokeWidth={1.8}
157
+ strokeLinejoin="round"
158
+ />
159
+ <path d="m10.5 9 6 6m0-6-6 6" stroke="currentColor" strokeWidth={1.8} strokeLinecap="round" />
160
+ </Material>
161
+ )
162
+ }
163
+
164
+ export function MaterialReturn() {
165
+ return (
166
+ <Material>
167
+ <path d="M19 6v5.5a2 2 0 0 1-2 2H6m4-4.5-4.5 4.5L10 18" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
168
+ </Material>
169
+ )
170
+ }
171
+
172
+ export function MaterialSearch() {
173
+ return (
174
+ <Material>
175
+ <circle cx={10} cy={10} r={6} fill="none" stroke="currentColor" strokeWidth={2} />
176
+ <path d="m14.5 14.5 5.5 5.5" stroke="currentColor" strokeWidth={2.2} strokeLinecap="round" />
177
+ </Material>
178
+ )
179
+ }
180
+
181
+ export function MaterialArrow() {
182
+ return (
183
+ <Material>
184
+ <path d="M4 12h15m-6-6.5 6.5 6.5-6.5 6.5" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
185
+ </Material>
186
+ )
187
+ }
188
+
189
+ export function MaterialNext() {
190
+ return (
191
+ <Material>
192
+ <path d="M5 12h12m-5-5 5 5-5 5M20 6v12" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
193
+ </Material>
194
+ )
195
+ }
196
+
197
+ export function MaterialSend() {
198
+ return (
199
+ <Material>
200
+ <path d="M4 19.5V14l7-2-7-2V4.5L21 12Z" />
201
+ </Material>
202
+ )
203
+ }
204
+
205
+ export function MaterialCheck() {
206
+ return (
207
+ <Material>
208
+ <path d="m5 12.5 4.5 4.5L19.5 7" fill="none" stroke="currentColor" strokeWidth={2.2} strokeLinecap="round" strokeLinejoin="round" />
209
+ </Material>
210
+ )
211
+ }
212
+
213
+ export function MaterialEmoji() {
214
+ return (
215
+ <Material>
216
+ <circle cx={12} cy={12} r={8.6} fill="none" stroke="currentColor" strokeWidth={1.8} />
217
+ <circle cx={9} cy={10} r={1.25} />
218
+ <circle cx={15} cy={10} r={1.25} />
219
+ <path d="M8.4 14a4.2 4.2 0 0 0 7.2 0" fill="none" stroke="currentColor" strokeWidth={1.8} strokeLinecap="round" />
220
+ </Material>
221
+ )
222
+ }
223
+
224
+ export function MaterialMic() {
225
+ return (
226
+ <Material>
227
+ <rect x={9} y={3.5} width={6} height={11} rx={3} />
228
+ <path d="M5.8 11.5a6.2 6.2 0 0 0 12.4 0M12 17.7v3" fill="none" stroke="currentColor" strokeWidth={1.8} strokeLinecap="round" />
229
+ </Material>
230
+ )
231
+ }
232
+
233
+ export function MaterialApps() {
234
+ return (
235
+ <Material>
236
+ {[5, 12, 19].flatMap((x) => [5, 12, 19].map((y) => <circle key={`${x}${y}`} cx={x} cy={y} r={1.9} />))}
237
+ </Material>
238
+ )
239
+ }
240
+
241
+ export function MaterialSticker() {
242
+ return (
243
+ <Material>
244
+ <path d="M12 3.5a8.5 8.5 0 1 0 8.5 8.5V12l-8.5-8.5Z" fill="none" stroke="currentColor" strokeWidth={1.8} strokeLinejoin="round" />
245
+ <path d="M12 3.5V9a3 3 0 0 0 3 3h5.5" fill="none" stroke="currentColor" strokeWidth={1.8} strokeLinejoin="round" />
246
+ </Material>
247
+ )
248
+ }
249
+
250
+ export function MaterialGif() {
251
+ return (
252
+ <Material>
253
+ <rect x={2.8} y={5.5} width={18.4} height={13} rx={2.5} fill="none" stroke="currentColor" strokeWidth={1.8} />
254
+ <text x={12} y={15.2} textAnchor="middle" fontSize={7.4} fontWeight={700} fontFamily="Roboto, system-ui, sans-serif">
255
+ GIF
256
+ </text>
257
+ </Material>
258
+ )
259
+ }
260
+
261
+ export function MaterialClipboard() {
262
+ return (
263
+ <Material>
264
+ <rect x={5} y={5} width={14} height={16} rx={2} fill="none" stroke="currentColor" strokeWidth={1.8} />
265
+ <rect x={8.5} y={3} width={7} height={4} rx={1.2} />
266
+ </Material>
267
+ )
268
+ }
269
+
270
+ export function MaterialSettings() {
271
+ return (
272
+ <Material>
273
+ <path
274
+ d="M12 2.8l2 2.1 2.9-.4.8 2.8 2.6 1.4-1 2.7 1 2.7-2.6 1.4-.8 2.8-2.9-.4-2 2.1-2-2.1-2.9.4-.8-2.8-2.6-1.4 1-2.7-1-2.7 2.6-1.4.8-2.8 2.9.4Z"
275
+ fill="none"
276
+ stroke="currentColor"
277
+ strokeWidth={1.7}
278
+ strokeLinejoin="round"
279
+ />
280
+ <circle cx={12} cy={12} r={3} fill="none" stroke="currentColor" strokeWidth={1.7} />
281
+ </Material>
282
+ )
283
+ }
@@ -0,0 +1,362 @@
1
+ /* The keyboard plugin's drawn keyboard (plugins/keyboard/Keyboard.tsx). */
2
+
3
+ .wsk-keyboard {
4
+ position: absolute;
5
+ left: 0;
6
+ bottom: 0;
7
+ pointer-events: auto;
8
+ user-select: none;
9
+ -webkit-user-select: none;
10
+ touch-action: none;
11
+ cursor: default;
12
+ transition-property: transform;
13
+ --wsk-scale: 1;
14
+ }
15
+
16
+ .wsk-panel {
17
+ position: absolute;
18
+ inset: 0;
19
+ }
20
+
21
+ .wsk-key {
22
+ position: absolute;
23
+ }
24
+
25
+ .wsk-label {
26
+ position: absolute;
27
+ left: 50%;
28
+ top: 50%;
29
+ line-height: 1;
30
+ white-space: nowrap;
31
+ transform: translate(-50%, calc(-50% + var(--label-offset, 0px)));
32
+ }
33
+
34
+ .wsk-icon {
35
+ position: absolute;
36
+ inset: 0;
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ }
41
+
42
+ .wsk-icon svg {
43
+ display: block;
44
+ }
45
+
46
+ .wsk-suggestion {
47
+ position: absolute;
48
+ height: 40px;
49
+ transform: translateY(-50%);
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ white-space: nowrap;
54
+ overflow: hidden;
55
+ }
56
+
57
+ .wsk-suggestion-divider {
58
+ position: absolute;
59
+ width: 1px;
60
+ }
61
+
62
+ /* iOS 26 */
63
+
64
+ .wsk-ios {
65
+ --kb-panel: #e2e3e8;
66
+ --kb-panel-top: #eaebf0;
67
+ --kb-edge: rgba(0, 0, 0, 0.16);
68
+ --kb-key: #ffffff;
69
+ --kb-key-pressed: #b9bcc4;
70
+ --kb-text: #000000;
71
+ --kb-suggestion: #48484a;
72
+ --kb-divider: #d3d4d9;
73
+ --kb-accent: #007aff;
74
+ --kb-accent-pressed: #0062d1;
75
+ --kb-popup: #ffffff;
76
+ --kb-popup-shadow: rgba(0, 0, 0, 0.28);
77
+ font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
78
+ color: var(--kb-text);
79
+ }
80
+
81
+ .wsk-ios[data-scheme='dark'] {
82
+ --kb-panel: #202020;
83
+ --kb-panel-top: #282828;
84
+ --kb-edge: rgba(255, 255, 255, 0.14);
85
+ --kb-key: #444444;
86
+ --kb-key-pressed: #6c6c6c;
87
+ --kb-text: #ffffff;
88
+ --kb-suggestion: #a6a6a8;
89
+ --kb-divider: #38383a;
90
+ --kb-popup: #6c6c6c;
91
+ --kb-popup-shadow: rgba(0, 0, 0, 0.5);
92
+ }
93
+
94
+ .wsk-ios .wsk-panel {
95
+ border-radius: 26px 26px 0 0;
96
+ background: linear-gradient(to bottom, var(--kb-panel-top) 0, var(--kb-panel) 20px);
97
+ box-shadow: 0 0 0 0.5px var(--kb-edge);
98
+ }
99
+
100
+ .wsk-ios .wsk-key {
101
+ background: var(--kb-key);
102
+ }
103
+
104
+ .wsk-ios .wsk-key-bare {
105
+ background: transparent;
106
+ }
107
+
108
+ .wsk-ios .wsk-key-pressed {
109
+ background: var(--kb-key-pressed);
110
+ }
111
+
112
+ .wsk-ios .wsk-key-bare.wsk-key-pressed {
113
+ background: transparent;
114
+ opacity: 0.45;
115
+ }
116
+
117
+ .wsk-ios .wsk-key-accent {
118
+ background: var(--kb-accent);
119
+ color: #ffffff;
120
+ }
121
+
122
+ .wsk-ios .wsk-key-accent.wsk-key-pressed {
123
+ background: var(--kb-accent-pressed);
124
+ }
125
+
126
+ .wsk-ios .wsk-letter-upper {
127
+ font-size: calc(22px * var(--wsk-scale));
128
+ --label-offset: -1.3px;
129
+ }
130
+
131
+ .wsk-ios .wsk-letter-lower {
132
+ font-size: calc(25px * var(--wsk-scale));
133
+ --label-offset: -2.4px;
134
+ }
135
+
136
+ .wsk-ios .wsk-character {
137
+ font-size: calc(22px * var(--wsk-scale));
138
+ --label-offset: -1.3px;
139
+ }
140
+
141
+ .wsk-ios .wsk-layer {
142
+ font-size: calc(18.5px * var(--wsk-scale));
143
+ --label-offset: -1px;
144
+ }
145
+
146
+ .wsk-ios .wsk-layer-small {
147
+ font-size: calc(14px * var(--wsk-scale));
148
+ --label-offset: -1px;
149
+ }
150
+
151
+ .wsk-ios .wsk-pad-digit {
152
+ font-size: 24px;
153
+ top: 39%;
154
+ }
155
+
156
+ .wsk-ios .wsk-pad-letters {
157
+ font-size: 9.5px;
158
+ font-weight: 600;
159
+ letter-spacing: 2px;
160
+ padding-left: 2px;
161
+ top: 80%;
162
+ }
163
+
164
+ .wsk-ios .wsk-pad-symbol {
165
+ font-size: 24px;
166
+ letter-spacing: 3px;
167
+ padding-left: 3px;
168
+ --label-offset: -2px;
169
+ }
170
+
171
+ .wsk-ios .icon-cutout {
172
+ fill: currentColor;
173
+ stroke: currentColor;
174
+ }
175
+
176
+ .wsk-ios .icon-teeth {
177
+ fill: var(--kb-panel);
178
+ }
179
+
180
+ .wsk-ios[data-scheme='dark'] .icon-fillable {
181
+ fill: currentColor;
182
+ }
183
+
184
+ .wsk-ios[data-scheme='dark'] .icon-cutout {
185
+ fill: var(--kb-panel);
186
+ stroke: var(--kb-panel);
187
+ }
188
+
189
+ .wsk-ios[data-scheme='dark'] .icon-teeth {
190
+ fill: currentColor;
191
+ }
192
+
193
+ .wsk-ios .wsk-key-number-pad .wsk-icon svg {
194
+ transform: scale(1.25);
195
+ }
196
+
197
+ .wsk-ios .wsk-suggestion {
198
+ font-size: 17.5px;
199
+ color: var(--kb-suggestion);
200
+ }
201
+
202
+ .wsk-ios .wsk-suggestion-divider {
203
+ background: var(--kb-divider);
204
+ }
205
+
206
+ .wsk-popup {
207
+ position: absolute;
208
+ left: 0;
209
+ top: 0;
210
+ overflow: visible;
211
+ pointer-events: none;
212
+ filter: drop-shadow(0 0.5px 0 var(--kb-popup-shadow)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
213
+ }
214
+
215
+ .wsk-popup path {
216
+ fill: var(--kb-popup);
217
+ }
218
+
219
+ .wsk-popup-label {
220
+ position: absolute;
221
+ font-size: calc(36px * var(--wsk-scale));
222
+ line-height: 1;
223
+ pointer-events: none;
224
+ transform: translate(-50%, calc(-50% - 1.5px));
225
+ }
226
+
227
+ .wsk-popup-label-lower {
228
+ font-size: calc(40px * var(--wsk-scale));
229
+ transform: translate(-50%, calc(-50% - 4px));
230
+ }
231
+
232
+ /* Android: Gboard, Material 3 */
233
+
234
+ .wsk-android {
235
+ --kb-panel: #eef1f8;
236
+ --kb-key: #ffffff;
237
+ --kb-key-pressed: #d3d9e4;
238
+ --kb-function: #d8dfeb;
239
+ --kb-function-pressed: #c2cad8;
240
+ --kb-accent: #0b57d0;
241
+ --kb-accent-pressed: #0842a0;
242
+ --kb-accent-text: #ffffff;
243
+ --kb-text: #1f1f1f;
244
+ --kb-muted: #444746;
245
+ --kb-hint: #5f6368;
246
+ --kb-preview: #ffffff;
247
+ font-family: 'Google Sans', Roboto, system-ui, sans-serif;
248
+ color: var(--kb-text);
249
+ }
250
+
251
+ .wsk-android[data-scheme='dark'] {
252
+ --kb-panel: #1b1c1f;
253
+ --kb-key: #3a3b3f;
254
+ --kb-key-pressed: #55575c;
255
+ --kb-function: #2c3440;
256
+ --kb-function-pressed: #3f4958;
257
+ --kb-accent: #a8c7fa;
258
+ --kb-accent-pressed: #c6dafc;
259
+ --kb-accent-text: #062e6f;
260
+ --kb-text: #e3e3e3;
261
+ --kb-muted: #c4c7c5;
262
+ --kb-hint: #a8abaf;
263
+ --kb-preview: #55575c;
264
+ }
265
+
266
+ .wsk-android .wsk-panel {
267
+ background: var(--kb-panel);
268
+ }
269
+
270
+ .wsk-android .wsk-key-character {
271
+ background: var(--kb-key);
272
+ }
273
+
274
+ .wsk-android .wsk-key-function {
275
+ background: var(--kb-function);
276
+ }
277
+
278
+ .wsk-android .wsk-key-accent {
279
+ background: var(--kb-accent);
280
+ color: var(--kb-accent-text);
281
+ }
282
+
283
+ .wsk-android .wsk-key-character.wsk-key-pressed {
284
+ background: var(--kb-key-pressed);
285
+ }
286
+
287
+ .wsk-android .wsk-key-function.wsk-key-pressed {
288
+ background: var(--kb-function-pressed);
289
+ }
290
+
291
+ .wsk-android .wsk-key-accent.wsk-key-pressed {
292
+ background: var(--kb-accent-pressed);
293
+ }
294
+
295
+ .wsk-android .wsk-character {
296
+ font-size: calc(23px * var(--wsk-scale));
297
+ --label-offset: -0.5px;
298
+ }
299
+
300
+ .wsk-android .wsk-layer {
301
+ font-size: calc(15px * var(--wsk-scale));
302
+ font-weight: 500;
303
+ }
304
+
305
+ .wsk-android .wsk-hint {
306
+ position: absolute;
307
+ top: 3px;
308
+ right: 5px;
309
+ font-size: calc(11px * var(--wsk-scale));
310
+ line-height: 1;
311
+ color: var(--kb-hint);
312
+ }
313
+
314
+ .wsk-android .wsk-pad-digit {
315
+ font-size: 24px;
316
+ top: 40%;
317
+ }
318
+
319
+ .wsk-android .wsk-pad-letters {
320
+ font-size: 9px;
321
+ letter-spacing: 1px;
322
+ color: var(--kb-hint);
323
+ top: 78%;
324
+ }
325
+
326
+ .wsk-android .wsk-space-bar {
327
+ font-size: 20px;
328
+ color: var(--kb-muted);
329
+ }
330
+
331
+ .wsk-android .wsk-suggestion {
332
+ font-size: 17px;
333
+ color: var(--kb-text);
334
+ }
335
+
336
+ .wsk-android .wsk-suggestion-best {
337
+ font-weight: 600;
338
+ }
339
+
340
+ .wsk-android .wsk-suggestion-divider {
341
+ background: var(--kb-function);
342
+ }
343
+
344
+ .wsk-tool {
345
+ position: absolute;
346
+ display: flex;
347
+ align-items: center;
348
+ justify-content: center;
349
+ color: var(--kb-muted);
350
+ }
351
+
352
+ .wsk-preview {
353
+ position: absolute;
354
+ display: flex;
355
+ align-items: center;
356
+ justify-content: center;
357
+ border-radius: 12px;
358
+ background: var(--kb-preview);
359
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
360
+ font-size: calc(28px * var(--wsk-scale));
361
+ pointer-events: none;
362
+ }