@sungen/driver-ui 3.2.33 → 3.2.34-beta.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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sungen/driver-ui",
3
- "version": "3.2.33",
3
+ "version": "3.2.34-beta.1",
4
4
  "description": "Sungen UI capability (Playwright) — step patterns, viewpoint gate, and phase hooks. Plugs into @sun-asterisk/sungen via the capability SPI.",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -13,7 +13,7 @@
13
13
  "author": "eqe team (engineer & quality) — Sun Asterisk",
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@sun-asterisk/sungen": "3.2.33"
16
+ "@sun-asterisk/sungen": "3.2.34-beta.1"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@playwright/test": "^1.57.0"
package/src/index.ts CHANGED
@@ -47,6 +47,10 @@ export interface UiGateInput {
47
47
  viewpoints: ViewpointEntry[];
48
48
  catalog: Catalog;
49
49
  focus: Parameters<typeof assertionDepth>[2];
50
+ /** `platform: mobile` — makes `mobile-*` page types candidates (#864). */
51
+ isMobile?: boolean;
52
+ /** The viewpoint text, so a declared `page-type:` wins over keyword detection (#864). */
53
+ viewpointText?: string;
50
54
  }
51
55
  export interface UiGateResult {
52
56
  gate: GateResult;
@@ -58,7 +62,7 @@ export interface UiGateResult {
58
62
  * functions verbatim, so the produced gate/depth (and therefore the score) are byte-identical.
59
63
  */
60
64
  const uiGateProvider = (input: UiGateInput): UiGateResult => {
61
- const gate = viewpointGate(input.scenarios, input.viewpoints, input.catalog);
65
+ const gate = viewpointGate(input.scenarios, input.viewpoints, input.catalog, input.isMobile ?? false, input.viewpointText ?? '');
62
66
  const depth = assertionDepth(input.scenarios, dataThemesFor(input.catalog, gate.pageType), input.focus);
63
67
  return { gate, depth };
64
68
  };