@stacksjs/defaults 0.75.288 → 0.75.290

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.
@@ -123,6 +123,11 @@ On a failed step, execution stops and the report retains its number and error,
123
123
  the completed steps, final page state and requested screenshot.
124
124
  Use `{"action":"assert","selector":"...","absent":true}` to verify that an element is missing or hidden after an interaction.
125
125
  Use `{"action":"assert","selector":"button","text":"Save","focused":true}` to verify keyboard focus and focus restoration.
126
+ `press` sends native virtual key codes for Enter, Escape, Tab, the arrow keys,
127
+ Home, End, PageUp, PageDown, Backspace, Delete and Insert. Focus a scrollable
128
+ region before pressing its navigation keys to exercise browser scrolling;
129
+ an evaluated assignment to `scrollTop` does not verify keyboard input.
130
+ Unsupported named keys fail the scenario instead of reporting a successful press.
126
131
  For asynchronous results, use `{"action":"assert","selector":"button","text":"Sound on","timeoutMs":2000}`. This observes the actual visible result until it matches or the bounded budget expires. Ordinary assertions remain immediate. Only assertions accept `timeoutMs`, an integer from 0 to 30000; protocol and evaluation failures are not retried.
127
132
 
128
133
  ### Crawl (whole-site browser audit)
@@ -701,7 +701,15 @@ export async function runScenarioStep(cdp: Pick<Cdp, 'send'>, step: ScenarioStep
701
701
 
702
702
  if (step.action === 'press') {
703
703
  const key = step.key || ''
704
- const keyCode = key.length === 1 ? key.charCodeAt(0) : ({ Enter: 13, Escape: 27, Tab: 9 }[key] || 0)
704
+ // CDP's key name alone does not perform native navigation or scrolling.
705
+ // Supply the matching virtual key on both events, as a real keyboard does.
706
+ const keyCode = key.length === 1 ? key.charCodeAt(0) : ({
707
+ Backspace: 8, Tab: 9, Enter: 13, Escape: 27,
708
+ PageUp: 33, PageDown: 34, End: 35, Home: 36,
709
+ ArrowLeft: 37, ArrowUp: 38, ArrowRight: 39, ArrowDown: 40,
710
+ Insert: 45, Delete: 46,
711
+ }[key] || 0)
712
+ if (!keyCode) throw new Error(`Unsupported scenario key: ${JSON.stringify(key)}`)
705
713
  // Enter's text generates the keypress that activates native buttons/forms.
706
714
  const text = key === 'Enter' ? '\r' : undefined
707
715
  await cdp.send('Input.dispatchKeyEvent', { type: 'keyDown', key, code: key, windowsVirtualKeyCode: keyCode, text, unmodifiedText: text })
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.288",
5
+ "version": "0.75.290",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.288",
5
+ "version": "0.75.290",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,9 +45,9 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.288",
49
- "@stacksjs/sanitizer": "0.2.679",
50
- "@stacksjs/stx": "0.2.679",
48
+ "@stacksjs/mobile": "0.75.290",
49
+ "@stacksjs/sanitizer": "0.2.682",
50
+ "@stacksjs/stx": "0.2.682",
51
51
  "@xterm/addon-fit": "^0.11.0",
52
52
  "@xterm/xterm": "^6.0.0",
53
53
  "ts-qr-codes": "^0.1.8"