sootsim 0.1.154 → 0.1.156

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 (152) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-YZ3N3YJJ.js → agent-6SII2ADM.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-CMPQ23XZ.js → agent-wrapper-KCFNAXBX.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-RNCU3SYT.js → app-fonts-HA6TURSC.js} +2 -2
  5. package/dist-cli/chunks/{assert-K753THTP.js → assert-NFD4XONC.js} +2 -2
  6. package/dist-cli/chunks/auto-bootstrap-DAU4P4W3.js +2 -0
  7. package/dist-cli/chunks/beta-EWOOAHUB.js +2 -0
  8. package/dist-cli/chunks/{camera-O5GTOOKJ.js → camera-EIXCV6T7.js} +2 -2
  9. package/dist-cli/chunks/{chunk-KF2HTRT7.js → chunk-2IFYJBKM.js} +1 -1
  10. package/dist-cli/chunks/{chunk-WWAODHWG.js → chunk-3KS5W6VS.js} +2 -2
  11. package/dist-cli/chunks/{chunk-OYRHRMGS.js → chunk-5FLC7DTX.js} +2 -2
  12. package/dist-cli/chunks/{chunk-EBUTVJVS.js → chunk-5JOGV2HQ.js} +2 -2
  13. package/dist-cli/chunks/chunk-5KJC63UI.js +1 -0
  14. package/dist-cli/chunks/{chunk-VUT2Q6HH.js → chunk-6DN4FY5V.js} +1 -1
  15. package/dist-cli/chunks/{chunk-6CNF2TAZ.js → chunk-734YKCKK.js} +1 -1
  16. package/dist-cli/chunks/{chunk-ZH7IFFWD.js → chunk-7CFLQ5RQ.js} +1 -1
  17. package/dist-cli/chunks/{chunk-EIZ3VJB4.js → chunk-AF3ZSUJT.js} +2 -2
  18. package/dist-cli/chunks/{chunk-LLJVOK67.js → chunk-AG4VJEME.js} +1 -1
  19. package/dist-cli/chunks/chunk-B6A7ZJMT.js +1 -0
  20. package/dist-cli/chunks/{chunk-Q6RU7N3T.js → chunk-BUPUMQEH.js} +1 -1
  21. package/dist-cli/chunks/{chunk-KFPDSWRL.js → chunk-C6XY53D4.js} +2 -2
  22. package/dist-cli/chunks/chunk-CAHWX2CJ.js +2 -0
  23. package/dist-cli/chunks/{chunk-MAZKCKLQ.js → chunk-CGRV5ZGV.js} +1 -1
  24. package/dist-cli/chunks/{chunk-KKWBHGX4.js → chunk-DSPYCLAV.js} +3 -3
  25. package/dist-cli/chunks/{chunk-Q4HIQJLD.js → chunk-EUW6WLU3.js} +1 -1
  26. package/dist-cli/chunks/{chunk-E7MAIECK.js → chunk-FOLKDVFM.js} +2 -2
  27. package/dist-cli/chunks/{chunk-2CEEGWFN.js → chunk-FZSEG2L4.js} +1 -1
  28. package/dist-cli/chunks/{chunk-3JFFSOYP.js → chunk-FZWSY6PU.js} +1 -1
  29. package/dist-cli/chunks/{chunk-JGQOVPYM.js → chunk-GTKPFFNK.js} +2 -2
  30. package/dist-cli/chunks/{chunk-DOWB4AVO.js → chunk-IDVRZVWW.js} +2 -2
  31. package/dist-cli/chunks/{chunk-FDNBPACW.js → chunk-IDXOP3UM.js} +1 -1
  32. package/dist-cli/chunks/{chunk-H26B2F6V.js → chunk-J53MOMRD.js} +2 -2
  33. package/dist-cli/chunks/{chunk-XVO4EA3M.js → chunk-JQGIMV75.js} +2 -2
  34. package/dist-cli/chunks/{chunk-PWIYNKOL.js → chunk-JT47D7AS.js} +2 -2
  35. package/dist-cli/chunks/{chunk-J5AU4VEY.js → chunk-LEPF5QPE.js} +2 -2
  36. package/dist-cli/chunks/{chunk-AJWXRYS4.js → chunk-MAZZU3SS.js} +1 -1
  37. package/dist-cli/chunks/{chunk-HJUMEN5Y.js → chunk-MK4D3LRG.js} +1 -1
  38. package/dist-cli/chunks/{chunk-WEB4WAR5.js → chunk-MY7FJWXJ.js} +3 -3
  39. package/dist-cli/chunks/{chunk-4ACXKKEJ.js → chunk-NL5LGUY6.js} +1 -1
  40. package/dist-cli/chunks/{chunk-SYEEQW7G.js → chunk-OQ4PEGZM.js} +2 -2
  41. package/dist-cli/chunks/{chunk-SSZ3QI26.js → chunk-PIVH54LG.js} +2 -2
  42. package/dist-cli/chunks/chunk-QH3FJHUA.js +1 -0
  43. package/dist-cli/chunks/{chunk-MRL7GB3I.js → chunk-R3K7I6OA.js} +2 -2
  44. package/dist-cli/chunks/{chunk-CUEP4LEK.js → chunk-TCWXT3TN.js} +2 -2
  45. package/dist-cli/chunks/{chunk-O6IT53ZW.js → chunk-TJIHZA53.js} +2 -2
  46. package/dist-cli/chunks/{chunk-BZX7M7PH.js → chunk-TNN276C7.js} +3 -3
  47. package/dist-cli/chunks/{chunk-3FJVQDOV.js → chunk-UJ4B2V2Y.js} +1 -1
  48. package/dist-cli/chunks/{chunk-N3S34V2C.js → chunk-UUUBY2MO.js} +2 -2
  49. package/dist-cli/chunks/{chunk-S4632WPL.js → chunk-VNPT6T3W.js} +2 -2
  50. package/dist-cli/chunks/{chunk-H7JH2VZG.js → chunk-WTYDDLVC.js} +2 -2
  51. package/dist-cli/chunks/{chunk-WE7FZSES.js → chunk-XNK3USYL.js} +1 -1
  52. package/dist-cli/chunks/{chunk-WBRVGBR3.js → chunk-XTTBLKSO.js} +1 -1
  53. package/dist-cli/chunks/{chunk-ST37ZL42.js → chunk-ZFPDGGM2.js} +2 -2
  54. package/dist-cli/chunks/cli-version-26ALCPQY.js +2 -0
  55. package/dist-cli/chunks/{compat-CHPPBI6B.js → compat-GMFJB2QI.js} +3 -3
  56. package/dist-cli/chunks/{config-MBTESWDI.js → config-VN63ZIQQ.js} +2 -2
  57. package/dist-cli/chunks/{control-PT7FI7T2.js → control-26SFJCEB.js} +2 -2
  58. package/dist-cli/chunks/{cpu-profile-BUEJUMK7.js → cpu-profile-TPSUYM3P.js} +2 -2
  59. package/dist-cli/chunks/{daemon-J3UKADSZ.js → daemon-XLZOQISP.js} +2 -2
  60. package/dist-cli/chunks/{debug-RFDSFWY7.js → debug-J3SO6XXZ.js} +3 -3
  61. package/dist-cli/chunks/{detox-4RUCAUGQ.js → detox-OUXMHQ66.js} +2 -2
  62. package/dist-cli/chunks/{device-ZASI5KEM.js → device-MRE7PGNT.js} +2 -2
  63. package/dist-cli/chunks/{diagnose-D2GBOZJT.js → diagnose-IBGOIBXB.js} +2 -2
  64. package/dist-cli/chunks/drivers-UDWSV2BD.js +2 -0
  65. package/dist-cli/chunks/{electron-F6U2DVFR.js → electron-GM7P45K6.js} +3 -3
  66. package/dist-cli/chunks/flow-2627URQN.js +2 -0
  67. package/dist-cli/chunks/help-V2AWDI3R.js +2 -0
  68. package/dist-cli/chunks/{hints-S3GLUH55.js → hints-ZXJEZ7VA.js} +2 -2
  69. package/dist-cli/chunks/{home-paths-UTBAAKUV.js → home-paths-R2BX3P5C.js} +2 -2
  70. package/dist-cli/chunks/{inspect-G2JVRONS.js → inspect-Q5DVSR33.js} +3 -3
  71. package/dist-cli/chunks/install-T7X3R2JD.js +2 -0
  72. package/dist-cli/chunks/{install-desktop-LJXYOO2A.js → install-desktop-P33GKIJF.js} +3 -3
  73. package/dist-cli/chunks/{keys-OHQRWZXF.js → keys-DWT4BLAF.js} +2 -2
  74. package/dist-cli/chunks/{launch-HNNRKSLY.js → launch-ARXODF7Y.js} +3 -3
  75. package/dist-cli/chunks/{login-KWBKKXMQ.js → login-IOYQ6NED.js} +4 -4
  76. package/dist-cli/chunks/{logout-JPJ44VQY.js → logout-PX2G2SXA.js} +2 -2
  77. package/dist-cli/chunks/{maestro-NZCUMSV5.js → maestro-GGSUWKYF.js} +2 -2
  78. package/dist-cli/chunks/optional-demo-registry-EUADUL22.js +2 -0
  79. package/dist-cli/chunks/{preview-J4GSU6XR.js → preview-BQUWNLPH.js} +2 -2
  80. package/dist-cli/chunks/{profile-AWFOXW2R.js → profile-XVN2QFUN.js} +2 -2
  81. package/dist-cli/chunks/{react-KRWTLQSA.js → react-IARLUSNE.js} +2 -2
  82. package/dist-cli/chunks/{record-M76PRRB6.js → record-HFSXL4SG.js} +10 -10
  83. package/dist-cli/chunks/runtime-DKE54MC6.js +2 -0
  84. package/dist-cli/chunks/{runtime-delivery-EWQNUCQS.js → runtime-delivery-DELLWFH7.js} +2 -2
  85. package/dist-cli/chunks/{screenshot-ORY2KU4C.js → screenshot-V5F65B2V.js} +2 -2
  86. package/dist-cli/chunks/{screenshot-mode-PCMZC73C.js → screenshot-mode-JS2NQ6VV.js} +2 -2
  87. package/dist-cli/chunks/{screenshots-MC32I2K6.js → screenshots-PFVIDRRE.js} +2 -2
  88. package/dist-cli/chunks/{server-ZQ6VUGB5.js → server-YBXIAWME.js} +3 -3
  89. package/dist-cli/chunks/setup-repo-E7MPL5GG.js +2 -0
  90. package/dist-cli/chunks/{skills-O2P5IASE.js → skills-2N75NKCV.js} +2 -2
  91. package/dist-cli/chunks/{slides-5V365XZG.js → slides-ECMGLFWX.js} +2 -2
  92. package/dist-cli/chunks/{start-HP5IW2V2.js → start-5CZXOX5G.js} +4 -4
  93. package/dist-cli/chunks/store-E6OLJAZN.js +2 -0
  94. package/dist-cli/chunks/telemetry-ANL2YCIC.js +2 -0
  95. package/dist-cli/chunks/{test-EL2B3TVN.js → test-W4ZCCSHY.js} +3 -3
  96. package/dist-cli/chunks/{three-mode-XBR6DHIQ.js → three-mode-KG3C4Q23.js} +2 -2
  97. package/dist-cli/chunks/{timeline-D3U6AW2H.js → timeline-WK62L3NA.js} +2 -2
  98. package/dist-cli/chunks/{upgrade-Q3NLQB4N.js → upgrade-7UVLOEVQ.js} +2 -2
  99. package/dist-cli/chunks/upload-NPVSF5B7.js +2 -0
  100. package/dist-cli/chunks/{version-7HW2OI7T.js → version-EVZ4PR3Y.js} +2 -2
  101. package/dist-cli/chunks/{web-2N3UKXZF.js → web-DDAK4ZLY.js} +2 -2
  102. package/dist-cli/chunks/{what-happened-QC355I37.js → what-happened-RSHNHEZ3.js} +2 -2
  103. package/dist-cli/chunks/{whoami-YL6OPCRZ.js → whoami-LPQ5MGZQ.js} +2 -2
  104. package/dist-lib/agent-daemon-client.cjs +1 -1
  105. package/dist-lib/agent-events.cjs +1 -1
  106. package/dist-lib/agent-sessions.cjs +1 -1
  107. package/dist-lib/attached-projects.cjs +1 -1
  108. package/dist-lib/auth/shared-session.cjs +1 -1
  109. package/dist-lib/backend-origin.cjs +1 -1
  110. package/dist-lib/beta.cjs +1 -1
  111. package/dist-lib/beta.mjs +1 -1
  112. package/dist-lib/bridge-constants.cjs +1 -1
  113. package/dist-lib/cli-constants.cjs +1 -1
  114. package/dist-lib/config.cjs +1 -1
  115. package/dist-lib/detox/index.cjs +1 -1
  116. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  117. package/dist-lib/home-paths.cjs +1 -1
  118. package/dist-lib/host/bridge-host.cjs +1 -1
  119. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  120. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  121. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  122. package/dist-lib/host/websocket-proxy.cjs +1 -1
  123. package/dist-lib/index.cjs +1 -1
  124. package/dist-lib/menu.cjs +468 -0
  125. package/dist-lib/menu.mjs +434 -0
  126. package/dist-lib/metro.cjs +1 -1
  127. package/dist-lib/profiles.cjs +1 -1
  128. package/dist-lib/render-mode.cjs +1 -1
  129. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  130. package/dist-lib/sdk.cjs +1 -1
  131. package/dist-lib/sdk.mjs +1 -1
  132. package/dist-lib/skills.cjs +1 -1
  133. package/dist-lib/vite.cjs +1 -1
  134. package/package.json +7 -1
  135. package/src/menu.ts +578 -0
  136. package/dist-cli/chunks/auto-bootstrap-YLTKWTZX.js +0 -2
  137. package/dist-cli/chunks/beta-VKIPKOLB.js +0 -2
  138. package/dist-cli/chunks/chunk-A46SK2PQ.js +0 -1
  139. package/dist-cli/chunks/chunk-BIWI3V47.js +0 -2
  140. package/dist-cli/chunks/chunk-CGH6JMFB.js +0 -1
  141. package/dist-cli/chunks/chunk-SZMDKZYL.js +0 -1
  142. package/dist-cli/chunks/cli-version-ES2WEE5A.js +0 -2
  143. package/dist-cli/chunks/drivers-LQSB4JTL.js +0 -2
  144. package/dist-cli/chunks/flow-IDSU4MLV.js +0 -2
  145. package/dist-cli/chunks/help-2MGPQJCL.js +0 -2
  146. package/dist-cli/chunks/install-CDJAF2XK.js +0 -2
  147. package/dist-cli/chunks/optional-demo-registry-C4CGGJVD.js +0 -2
  148. package/dist-cli/chunks/runtime-ORANRGJV.js +0 -2
  149. package/dist-cli/chunks/setup-repo-ER6REBKB.js +0 -2
  150. package/dist-cli/chunks/store-AW7RMWCL.js +0 -2
  151. package/dist-cli/chunks/telemetry-MM6JBCD6.js +0 -2
  152. package/dist-cli/chunks/upload-S2IBROET.js +0 -2
package/src/menu.ts ADDED
@@ -0,0 +1,578 @@
1
+ // public sootsim menu protocol. this file is deliberately pure data and pure
2
+ // functions so hosts can import it without pulling the engine or canvaskit graph.
3
+
4
+ export const SOOTSIM_ENGINE_EVENT_NAME = 'sootsim:engine-event'
5
+ export const SOOTSIM_SHELL_COMMAND_NAME = 'sootsim:shell-command'
6
+
7
+ export type SootSimMenuPlatform = 'browser' | 'electron'
8
+ export type SootSimScaleMode = 'physical' | 'point' | 'pixel' | 'fit'
9
+
10
+ export type SootSimMenuItemDef =
11
+ | { type: 'separator' }
12
+ | {
13
+ type?: 'normal' | 'checkbox' | 'radio'
14
+ label: string
15
+ accelerator?: string
16
+ browserAccelerator?: boolean
17
+ checked?: boolean
18
+ enabled?: boolean
19
+ action?: string
20
+ actionPayload?: string
21
+ shortcutLabel?: string
22
+ showInShortcutDocs?: boolean
23
+ items?: SootSimMenuItemDef[]
24
+ hiddenIn?: SootSimMenuPlatform
25
+ }
26
+
27
+ export type SootSimMenuDef = {
28
+ label: string
29
+ items: SootSimMenuItemDef[]
30
+ hiddenIn?: SootSimMenuPlatform
31
+ notMinimal?: boolean
32
+ brand?: boolean
33
+ }
34
+
35
+ export interface SootSimMenuState {
36
+ currentDevice: string
37
+ showBezels: boolean
38
+ showTopBar: boolean
39
+ screenshotMode: boolean
40
+ threeMode: boolean
41
+ stayOnTop: boolean
42
+ scaleMode: SootSimScaleMode
43
+ }
44
+
45
+ export interface SootSimMenuDeviceChoice {
46
+ model: string
47
+ label: string
48
+ platform: string
49
+ }
50
+
51
+ export interface SootSimMenuShortcutEntry {
52
+ menuLabel: string
53
+ label: string
54
+ accelerator: string
55
+ action: string
56
+ actionPayload?: string
57
+ }
58
+
59
+ export interface SootSimShortcutDocEntry {
60
+ keys: string
61
+ label: string
62
+ }
63
+
64
+ export interface SootSimShortcutDocSection {
65
+ title: string
66
+ entries: SootSimShortcutDocEntry[]
67
+ }
68
+
69
+ export type MenuItemDef = SootSimMenuItemDef
70
+ export type MenuDef = SootSimMenuDef
71
+ export type MenuState = SootSimMenuState
72
+ export type ShortcutPlatform = SootSimMenuPlatform
73
+ export type MenuShortcutEntry = SootSimMenuShortcutEntry
74
+ export type ShortcutDocEntry = SootSimShortcutDocEntry
75
+ export type ShortcutDocSection = SootSimShortcutDocSection
76
+
77
+ export function buildSootSimMenuDefs(
78
+ state: SootSimMenuState,
79
+ deviceChoices: readonly SootSimMenuDeviceChoice[],
80
+ ): SootSimMenuDef[] {
81
+ return [
82
+ appMenu(),
83
+ fileMenu(state, deviceChoices),
84
+ editMenu(),
85
+ deviceMenu(state, deviceChoices),
86
+ debugMenu(),
87
+ windowMenu(state),
88
+ helpMenu(),
89
+ ]
90
+ }
91
+
92
+ function appMenu(): SootSimMenuDef {
93
+ return {
94
+ label: 'SootSim',
95
+ brand: true,
96
+ items: [
97
+ { label: 'About SootSim', action: 'about' },
98
+ { type: 'separator' },
99
+ {
100
+ label: 'Preferences...',
101
+ accelerator: 'CmdOrCtrl+,',
102
+ action: 'preferences',
103
+ browserAccelerator: true,
104
+ shortcutLabel: 'settings',
105
+ showInShortcutDocs: true,
106
+ },
107
+ { type: 'separator' },
108
+ {
109
+ label: 'Hide SootSim',
110
+ accelerator: 'CmdOrCtrl+H',
111
+ action: 'hide',
112
+ hiddenIn: 'browser',
113
+ },
114
+ {
115
+ label: 'Hide Others',
116
+ accelerator: 'CmdOrCtrl+Alt+H',
117
+ action: 'hide-others',
118
+ hiddenIn: 'browser',
119
+ },
120
+ { label: 'Show All', action: 'unhide', hiddenIn: 'browser' },
121
+ { type: 'separator' },
122
+ {
123
+ label: 'Quit SootSim',
124
+ accelerator: 'CmdOrCtrl+Q',
125
+ action: 'quit',
126
+ hiddenIn: 'browser',
127
+ },
128
+ ],
129
+ }
130
+ }
131
+
132
+ function fileMenu(
133
+ state: SootSimMenuState,
134
+ deviceChoices: readonly SootSimMenuDeviceChoice[],
135
+ ): SootSimMenuDef {
136
+ return {
137
+ label: 'File',
138
+ notMinimal: true,
139
+ items: [
140
+ { label: 'New Window', accelerator: 'CmdOrCtrl+N', action: 'new-window' },
141
+ {
142
+ label: 'New Simulator',
143
+ hiddenIn: 'browser',
144
+ items: buildSootSimDeviceChoiceDefs(state.currentDevice, deviceChoices, {
145
+ action: 'new-simulator',
146
+ }),
147
+ },
148
+ {
149
+ label: 'Close Window',
150
+ accelerator: 'CmdOrCtrl+W',
151
+ action: 'close-window',
152
+ hiddenIn: 'browser',
153
+ },
154
+ { type: 'separator' },
155
+ { label: 'Save Screen', accelerator: 'CmdOrCtrl+S', action: 'save-screen' },
156
+ { label: 'Copy Screen', accelerator: 'CmdOrCtrl+Alt+C', action: 'copy-screen' },
157
+ { type: 'separator' },
158
+ {
159
+ label: 'Record',
160
+ accelerator: 'Ctrl+CmdOrCtrl+R',
161
+ action: 'toggle-recording',
162
+ browserAccelerator: true,
163
+ shortcutLabel: 'start/stop recording',
164
+ showInShortcutDocs: true,
165
+ },
166
+ ],
167
+ }
168
+ }
169
+
170
+ function editMenu(): SootSimMenuDef {
171
+ return {
172
+ label: 'Edit',
173
+ hiddenIn: 'browser',
174
+ items: [
175
+ { label: 'Undo', accelerator: 'CmdOrCtrl+Z', action: 'undo' },
176
+ { label: 'Redo', accelerator: 'CmdOrCtrl+Shift+Z', action: 'redo' },
177
+ { type: 'separator' },
178
+ { label: 'Cut', accelerator: 'CmdOrCtrl+X', action: 'cut' },
179
+ { label: 'Copy', accelerator: 'CmdOrCtrl+C', action: 'copy' },
180
+ { label: 'Paste', accelerator: 'CmdOrCtrl+V', action: 'paste' },
181
+ { label: 'Select All', accelerator: 'CmdOrCtrl+A', action: 'select-all' },
182
+ ],
183
+ }
184
+ }
185
+
186
+ function deviceMenu(
187
+ state: SootSimMenuState,
188
+ deviceChoices: readonly SootSimMenuDeviceChoice[],
189
+ ): SootSimMenuDef {
190
+ return {
191
+ label: 'Device',
192
+ items: [
193
+ { label: 'Restart', accelerator: 'CmdOrCtrl+R', action: 'reload' },
194
+ { label: 'Erase All Content and Settings...', action: 'erase-all' },
195
+ { type: 'separator' },
196
+ {
197
+ label: 'Home',
198
+ accelerator: 'Shift+CmdOrCtrl+H',
199
+ action: 'home',
200
+ browserAccelerator: true,
201
+ shortcutLabel: 'go home',
202
+ showInShortcutDocs: true,
203
+ },
204
+ {
205
+ label: 'Lock',
206
+ accelerator: 'CmdOrCtrl+L',
207
+ action: 'lock',
208
+ shortcutLabel: 'lock / unlock',
209
+ showInShortcutDocs: true,
210
+ },
211
+ { label: 'Shake', accelerator: 'Ctrl+CmdOrCtrl+Z', action: 'shake' },
212
+ {
213
+ label: 'App Switcher',
214
+ accelerator: 'Ctrl+Shift+CmdOrCtrl+H',
215
+ action: 'app-switcher',
216
+ browserAccelerator: true,
217
+ shortcutLabel: 'app switcher',
218
+ showInShortcutDocs: true,
219
+ },
220
+ { type: 'separator' },
221
+ { label: 'Trigger Screenshot', action: 'screenshot' },
222
+ { type: 'separator' },
223
+ ...buildSootSimDeviceChoiceDefs(state.currentDevice, deviceChoices, {
224
+ action: 'switch-device',
225
+ }),
226
+ ],
227
+ }
228
+ }
229
+
230
+ function debugMenu(): SootSimMenuDef {
231
+ return {
232
+ label: 'Debug',
233
+ items: [
234
+ {
235
+ label: 'Toggle Devtools',
236
+ accelerator: 'Alt+I',
237
+ action: 'toggle-devtools',
238
+ browserAccelerator: true,
239
+ showInShortcutDocs: true,
240
+ },
241
+ {
242
+ label: 'Inspect',
243
+ accelerator: 'CmdOrCtrl+I',
244
+ action: 'toggle-inspect',
245
+ browserAccelerator: true,
246
+ },
247
+ { type: 'separator' },
248
+ {
249
+ label: 'Open Chrome Devtools',
250
+ accelerator: 'CmdOrCtrl+Alt+I',
251
+ action: 'open-devtools',
252
+ hiddenIn: 'browser',
253
+ shortcutLabel: 'developer tools',
254
+ showInShortcutDocs: true,
255
+ },
256
+ { type: 'separator' },
257
+ {
258
+ label: 'Clear Cache and Reload',
259
+ accelerator: 'CmdOrCtrl+Shift+R',
260
+ action: 'clear-cache',
261
+ },
262
+ { label: 'Clear Local Storage', action: 'clear-localstorage' },
263
+ { label: 'Clear IndexedDB', action: 'clear-indexeddb' },
264
+ { label: 'Clear Service Workers', action: 'clear-serviceworkers' },
265
+ { type: 'separator' },
266
+ { label: 'Open User Data Folder', action: 'open-userdata', hiddenIn: 'browser' },
267
+ ],
268
+ }
269
+ }
270
+
271
+ function windowMenu(state: SootSimMenuState): SootSimMenuDef {
272
+ return {
273
+ label: 'Window',
274
+ items: [
275
+ {
276
+ label: 'Minimize',
277
+ accelerator: 'CmdOrCtrl+M',
278
+ action: 'minimize',
279
+ hiddenIn: 'browser',
280
+ },
281
+ {
282
+ label: 'Close',
283
+ accelerator: 'CmdOrCtrl+W',
284
+ action: 'close-window',
285
+ hiddenIn: 'browser',
286
+ },
287
+ { type: 'separator' },
288
+ {
289
+ label: 'Toggle Appearance',
290
+ accelerator: 'Shift+CmdOrCtrl+A',
291
+ action: 'toggle-appearance',
292
+ browserAccelerator: true,
293
+ shortcutLabel: 'toggle appearance',
294
+ showInShortcutDocs: true,
295
+ },
296
+ { type: 'separator' },
297
+ {
298
+ label: 'Show Device Bezels',
299
+ type: 'checkbox',
300
+ checked: state.showBezels,
301
+ action: 'toggle-bezels',
302
+ },
303
+ {
304
+ label: 'Show Top Bar',
305
+ type: 'checkbox',
306
+ checked: state.showTopBar,
307
+ enabled: state.showBezels,
308
+ action: 'toggle-topbar',
309
+ },
310
+ {
311
+ label: 'Screenshot',
312
+ type: 'checkbox',
313
+ checked: state.screenshotMode,
314
+ action: 'toggle-screenshot-mode',
315
+ hiddenIn: 'electron',
316
+ },
317
+ {
318
+ label: '3D',
319
+ type: 'checkbox',
320
+ checked: state.threeMode,
321
+ action: 'toggle-three-mode',
322
+ hiddenIn: 'electron',
323
+ },
324
+ {
325
+ label: 'Stay On Top',
326
+ type: 'checkbox',
327
+ checked: state.stayOnTop,
328
+ action: 'toggle-stay-on-top',
329
+ hiddenIn: 'browser',
330
+ },
331
+ { type: 'separator' },
332
+ {
333
+ label: 'Physical Size',
334
+ accelerator: 'CmdOrCtrl+1',
335
+ type: 'radio',
336
+ checked: state.scaleMode === 'physical',
337
+ action: 'scale-physical',
338
+ },
339
+ {
340
+ label: 'Point Accurate',
341
+ accelerator: 'CmdOrCtrl+2',
342
+ type: 'radio',
343
+ checked: state.scaleMode === 'point',
344
+ action: 'scale-point',
345
+ },
346
+ {
347
+ label: 'Pixel Accurate',
348
+ accelerator: 'CmdOrCtrl+3',
349
+ type: 'radio',
350
+ checked: state.scaleMode === 'pixel',
351
+ action: 'scale-pixel',
352
+ },
353
+ {
354
+ label: 'Fit Screen',
355
+ accelerator: 'CmdOrCtrl+0',
356
+ type: 'radio',
357
+ checked: state.scaleMode === 'fit',
358
+ action: 'scale-fit',
359
+ },
360
+ ],
361
+ }
362
+ }
363
+
364
+ function helpMenu(): SootSimMenuDef {
365
+ return {
366
+ label: 'Help',
367
+ notMinimal: true,
368
+ items: [
369
+ { label: 'sootsim Website', action: 'open-website' },
370
+ {
371
+ label: 'Send Feedback...',
372
+ accelerator: 'CmdOrCtrl+Shift+I',
373
+ action: 'open-devtools-report',
374
+ showInShortcutDocs: true,
375
+ },
376
+ { label: 'Show Onboarding', action: 'open-devtools-onboard' },
377
+ ],
378
+ }
379
+ }
380
+
381
+ export function buildSootSimDeviceChoiceDefs(
382
+ currentDevice: string,
383
+ deviceChoices: readonly SootSimMenuDeviceChoice[],
384
+ options: { action: 'switch-device' | 'new-simulator' },
385
+ ): SootSimMenuItemDef[] {
386
+ const items: SootSimMenuItemDef[] = []
387
+ let lastPlatform = ''
388
+ const isStateful = options.action === 'switch-device'
389
+
390
+ for (const choice of deviceChoices) {
391
+ if (lastPlatform && choice.platform !== lastPlatform) items.push({ type: 'separator' })
392
+ lastPlatform = choice.platform
393
+
394
+ if (isStateful) {
395
+ items.push({
396
+ label: choice.label,
397
+ type: 'radio',
398
+ checked: choice.model === currentDevice,
399
+ action: options.action,
400
+ actionPayload: choice.model,
401
+ })
402
+ } else {
403
+ items.push({
404
+ label: choice.label,
405
+ action: options.action,
406
+ actionPayload: choice.model,
407
+ })
408
+ }
409
+ }
410
+
411
+ return items
412
+ }
413
+
414
+ function shouldIncludeItemForPlatform(
415
+ item: Exclude<SootSimMenuItemDef, { type: 'separator' }>,
416
+ platform: SootSimMenuPlatform,
417
+ ) {
418
+ if (item.hiddenIn === platform) return false
419
+ if (!item.accelerator || !item.action) return false
420
+ if (platform === 'browser') return item.browserAccelerator === true
421
+ return true
422
+ }
423
+
424
+ function shouldIncludeItemInDocs(
425
+ item: Exclude<SootSimMenuItemDef, { type: 'separator' }>,
426
+ platform: SootSimMenuPlatform,
427
+ ) {
428
+ if (!item.showInShortcutDocs) return false
429
+ if (platform === 'browser' && !item.browserAccelerator) return false
430
+ return true
431
+ }
432
+
433
+ function collectMenuShortcutsFromDefs(
434
+ menus: readonly SootSimMenuDef[],
435
+ platform: SootSimMenuPlatform,
436
+ includeItem: (
437
+ item: Exclude<SootSimMenuItemDef, { type: 'separator' }>,
438
+ platform: SootSimMenuPlatform,
439
+ ) => boolean,
440
+ ) {
441
+ const entries: SootSimMenuShortcutEntry[] = []
442
+
443
+ const visit = (menuLabel: string, items: readonly SootSimMenuItemDef[]) => {
444
+ for (const item of items) {
445
+ if (item.type === 'separator') continue
446
+ if (item.items?.length) visit(menuLabel, item.items)
447
+ if (!includeItem(item, platform)) continue
448
+ const { accelerator, action } = item
449
+ if (!accelerator || !action) continue
450
+ entries.push({
451
+ menuLabel,
452
+ label: item.shortcutLabel ?? item.label,
453
+ accelerator,
454
+ action,
455
+ actionPayload: item.actionPayload,
456
+ })
457
+ }
458
+ }
459
+
460
+ for (const menu of menus) {
461
+ if (menu.hiddenIn === platform) continue
462
+ visit(menu.label, menu.items)
463
+ }
464
+
465
+ return entries
466
+ }
467
+
468
+ export function getMenuShortcutEntriesFromDefs(
469
+ menus: readonly SootSimMenuDef[],
470
+ platform: SootSimMenuPlatform,
471
+ ): SootSimMenuShortcutEntry[] {
472
+ return collectMenuShortcutsFromDefs(menus, platform, shouldIncludeItemForPlatform)
473
+ }
474
+
475
+ export function getMenuShortcutEntries(
476
+ state: SootSimMenuState,
477
+ deviceChoices: readonly SootSimMenuDeviceChoice[],
478
+ platform: SootSimMenuPlatform,
479
+ ): SootSimMenuShortcutEntry[] {
480
+ return getMenuShortcutEntriesFromDefs(
481
+ buildSootSimMenuDefs(state, deviceChoices),
482
+ platform,
483
+ )
484
+ }
485
+
486
+ export function getShortcutDocSections(
487
+ state: SootSimMenuState,
488
+ deviceChoices: readonly SootSimMenuDeviceChoice[],
489
+ platform: SootSimMenuPlatform,
490
+ ): SootSimShortcutDocSection[] {
491
+ return getShortcutDocSectionsFromDefs(
492
+ buildSootSimMenuDefs(state, deviceChoices),
493
+ platform,
494
+ )
495
+ }
496
+
497
+ export function getShortcutDocSectionsFromDefs(
498
+ menus: readonly SootSimMenuDef[],
499
+ platform: SootSimMenuPlatform,
500
+ ): SootSimShortcutDocSection[] {
501
+ const sections: SootSimShortcutDocSection[] = []
502
+ const byMenu = new Map<string, SootSimShortcutDocEntry[]>()
503
+
504
+ for (const entry of collectMenuShortcutsFromDefs(
505
+ menus,
506
+ platform,
507
+ shouldIncludeItemInDocs,
508
+ )) {
509
+ const items = byMenu.get(entry.menuLabel) ?? []
510
+ items.push({
511
+ keys: formatAccelerator(entry.accelerator),
512
+ label: entry.label,
513
+ })
514
+ byMenu.set(entry.menuLabel, items)
515
+ }
516
+
517
+ for (const [title, entries] of byMenu) {
518
+ sections.push({
519
+ title: title.toLowerCase(),
520
+ entries,
521
+ })
522
+ }
523
+
524
+ return sections
525
+ }
526
+
527
+ export function formatAccelerator(accel: string): string {
528
+ return accel
529
+ .replace(/CmdOrCtrl\+/g, '\u2318')
530
+ .replace(/Ctrl\+/g, '\u2303')
531
+ .replace(/Alt\+/g, '\u2325')
532
+ .replace(/Shift\+/g, '\u21e7')
533
+ .replace(/Left/g, '\u2190')
534
+ .replace(/Right/g, '\u2192')
535
+ .replace(/Up/g, '\u2191')
536
+ .replace(/Down/g, '\u2193')
537
+ }
538
+
539
+ const ARROW_KEYS: Record<string, string> = {
540
+ Left: 'arrowleft',
541
+ Right: 'arrowright',
542
+ Up: 'arrowup',
543
+ Down: 'arrowdown',
544
+ }
545
+
546
+ function normalizeAcceleratorKey(key: string) {
547
+ return ARROW_KEYS[key] ?? key.toLowerCase()
548
+ }
549
+
550
+ function normalizeEventKey(key: string) {
551
+ return key.toLowerCase()
552
+ }
553
+
554
+ type KeyboardEventLike = Pick<
555
+ KeyboardEvent,
556
+ 'altKey' | 'ctrlKey' | 'key' | 'metaKey' | 'shiftKey'
557
+ >
558
+
559
+ export function matchesAccelerator(event: KeyboardEventLike, accelerator: string) {
560
+ const tokens = accelerator.split('+')
561
+ const keyToken = tokens[tokens.length - 1]
562
+ const wantsCmdOrCtrl = tokens.includes('CmdOrCtrl')
563
+ const wantsCtrl = tokens.includes('Ctrl')
564
+ const wantsAlt = tokens.includes('Alt')
565
+ const wantsShift = tokens.includes('Shift')
566
+
567
+ if (!keyToken) return false
568
+ if (event.altKey !== wantsAlt) return false
569
+ if (event.shiftKey !== wantsShift) return false
570
+
571
+ const hasCmdOrCtrl = event.metaKey || event.ctrlKey
572
+ if (wantsCmdOrCtrl && !hasCmdOrCtrl) return false
573
+ if (!wantsCmdOrCtrl && event.metaKey) return false
574
+ if (wantsCtrl && !event.ctrlKey) return false
575
+ if (!wantsCtrl && !wantsCmdOrCtrl && event.ctrlKey) return false
576
+
577
+ return normalizeEventKey(event.key) === normalizeAcceleratorKey(keyToken)
578
+ }
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-KKWBHGX4.js";import"./chunk-EBUTVJVS.js";import"./chunk-AJWXRYS4.js";import"./chunk-WE7FZSES.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e}from"./chunk-ZH7IFFWD.js";import"./chunk-MAZKCKLQ.js";export{e as BETA_ASK_HEADLINE,c as BETA_LABEL,d as BETA_TAGLINE,b as BETA_VERSION_TARGET,a as IS_BETA};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var t="http://localhost:5173/";export{t as a};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-HJUMEN5Y.js";import"./chunk-MAZKCKLQ.js";export{a as getCliVersion};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-SZMDKZYL.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-E7MAIECK.js";import"./chunk-4ACXKKEJ.js";import"./chunk-EIZ3VJB4.js";import"./chunk-A46SK2PQ.js";import"./chunk-3FJVQDOV.js";import"./chunk-AJWXRYS4.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as c,b as d,c as e,d as f}from"./chunk-BZX7M7PH.js";import"./chunk-O6IT53ZW.js";import"./chunk-CGH6JMFB.js";import"./chunk-ST37ZL42.js";import"./chunk-H26B2F6V.js";import"./chunk-SYEEQW7G.js";import{c as a,d as b}from"./chunk-MRL7GB3I.js";import"./chunk-S4632WPL.js";import"./chunk-N3S34V2C.js";import"./chunk-SSZ3QI26.js";import"./chunk-FDNBPACW.js";import"./chunk-KF2HTRT7.js";import"./chunk-EBUTVJVS.js";import"./chunk-Q4HIQJLD.js";import"./chunk-E7MAIECK.js";import"./chunk-4ACXKKEJ.js";import"./chunk-EIZ3VJB4.js";import"./chunk-A46SK2PQ.js";import"./chunk-3FJVQDOV.js";import"./chunk-AJWXRYS4.js";import"./chunk-J5AU4VEY.js";import"./chunk-PWIYNKOL.js";import"./chunk-OYRHRMGS.js";import"./chunk-BIWI3V47.js";import"./chunk-WE7FZSES.js";import"./chunk-KFPDSWRL.js";import"./chunk-Q6RU7N3T.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-JGQOVPYM.js";import"./chunk-OYRHRMGS.js";import"./chunk-WBRVGBR3.js";import"./chunk-BIWI3V47.js";import"./chunk-WE7FZSES.js";import"./chunk-HJUMEN5Y.js";import"./chunk-ZH7IFFWD.js";import"./chunk-Q6RU7N3T.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-WWAODHWG.js";import"./chunk-LLJVOK67.js";import"./chunk-KKWBHGX4.js";import"./chunk-EBUTVJVS.js";import"./chunk-AJWXRYS4.js";import"./chunk-J5AU4VEY.js";import"./chunk-PWIYNKOL.js";import"./chunk-WE7FZSES.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-Q4HIQJLD.js";import"./chunk-MAZKCKLQ.js";export{a as loadOptionalDemoApps,b as optionalDemoAppsSync};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-WEB4WAR5.js";import"./chunk-EBUTVJVS.js";import"./chunk-AJWXRYS4.js";import"./chunk-WE7FZSES.js";import"./chunk-DOWB4AVO.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{b as formatReleaseEntry,a as runRuntime};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-WWAODHWG.js";import"./chunk-LLJVOK67.js";import"./chunk-KKWBHGX4.js";import"./chunk-EBUTVJVS.js";import"./chunk-AJWXRYS4.js";import"./chunk-J5AU4VEY.js";import"./chunk-PWIYNKOL.js";import"./chunk-WE7FZSES.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{a as runSetupRepo};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-KFPDSWRL.js";import"./chunk-Q6RU7N3T.js";import"./chunk-MAZKCKLQ.js";export{a as settingsStore};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-J5AU4VEY.js";import"./chunk-PWIYNKOL.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{b as flushCliTelemetry,a as trackCliEvent};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.154 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-H26B2F6V.js";import"./chunk-SYEEQW7G.js";import"./chunk-KF2HTRT7.js";import"./chunk-EBUTVJVS.js";import"./chunk-A46SK2PQ.js";import"./chunk-3FJVQDOV.js";import"./chunk-AJWXRYS4.js";import"./chunk-J5AU4VEY.js";import"./chunk-PWIYNKOL.js";import"./chunk-WE7FZSES.js";import"./chunk-6CNF2TAZ.js";import"./chunk-MAZKCKLQ.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};