@sungen/driver-ui 3.2.34 → 3.3.0-alpha.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.
Files changed (89) hide show
  1. package/dist/app-profile-presets.d.ts +12 -0
  2. package/dist/app-profile-presets.d.ts.map +1 -0
  3. package/dist/app-profile-presets.js +85 -0
  4. package/dist/app-profile-presets.js.map +1 -0
  5. package/dist/index.d.ts +37 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +93 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/patterns/assertion-patterns.d.ts +13 -0
  10. package/dist/patterns/assertion-patterns.d.ts.map +1 -0
  11. package/dist/patterns/assertion-patterns.js +903 -0
  12. package/dist/patterns/assertion-patterns.js.map +1 -0
  13. package/dist/patterns/capture-patterns.d.ts +21 -0
  14. package/dist/patterns/capture-patterns.d.ts.map +1 -0
  15. package/dist/patterns/capture-patterns.js +174 -0
  16. package/dist/patterns/capture-patterns.js.map +1 -0
  17. package/dist/patterns/focus-patterns.d.ts +22 -0
  18. package/dist/patterns/focus-patterns.d.ts.map +1 -0
  19. package/dist/patterns/focus-patterns.js +79 -0
  20. package/dist/patterns/focus-patterns.js.map +1 -0
  21. package/dist/patterns/form-patterns.d.ts +6 -0
  22. package/dist/patterns/form-patterns.d.ts.map +1 -0
  23. package/dist/patterns/form-patterns.js +239 -0
  24. package/dist/patterns/form-patterns.js.map +1 -0
  25. package/dist/patterns/interaction-patterns.d.ts +20 -0
  26. package/dist/patterns/interaction-patterns.d.ts.map +1 -0
  27. package/dist/patterns/interaction-patterns.js +633 -0
  28. package/dist/patterns/interaction-patterns.js.map +1 -0
  29. package/dist/patterns/keyboard-patterns.d.ts +7 -0
  30. package/dist/patterns/keyboard-patterns.d.ts.map +1 -0
  31. package/dist/patterns/keyboard-patterns.js +57 -0
  32. package/dist/patterns/keyboard-patterns.js.map +1 -0
  33. package/dist/patterns/navigation-patterns.d.ts +6 -0
  34. package/dist/patterns/navigation-patterns.d.ts.map +1 -0
  35. package/dist/patterns/navigation-patterns.js +185 -0
  36. package/dist/patterns/navigation-patterns.js.map +1 -0
  37. package/dist/patterns/scope-patterns.d.ts +7 -0
  38. package/dist/patterns/scope-patterns.d.ts.map +1 -0
  39. package/dist/patterns/scope-patterns.js +36 -0
  40. package/dist/patterns/scope-patterns.js.map +1 -0
  41. package/dist/patterns/scroll-patterns.d.ts +7 -0
  42. package/dist/patterns/scroll-patterns.d.ts.map +1 -0
  43. package/dist/patterns/scroll-patterns.js +25 -0
  44. package/dist/patterns/scroll-patterns.js.map +1 -0
  45. package/dist/patterns/setup-patterns.d.ts +6 -0
  46. package/dist/patterns/setup-patterns.d.ts.map +1 -0
  47. package/dist/patterns/setup-patterns.js +75 -0
  48. package/dist/patterns/setup-patterns.js.map +1 -0
  49. package/dist/patterns/storage-patterns.d.ts +26 -0
  50. package/dist/patterns/storage-patterns.d.ts.map +1 -0
  51. package/dist/patterns/storage-patterns.js +142 -0
  52. package/dist/patterns/storage-patterns.js.map +1 -0
  53. package/dist/patterns/table-pagination-patterns.d.ts +42 -0
  54. package/dist/patterns/table-pagination-patterns.d.ts.map +1 -0
  55. package/dist/patterns/table-pagination-patterns.js +93 -0
  56. package/dist/patterns/table-pagination-patterns.js.map +1 -0
  57. package/dist/patterns/table-patterns.d.ts +19 -0
  58. package/dist/patterns/table-patterns.d.ts.map +1 -0
  59. package/dist/patterns/table-patterns.js +594 -0
  60. package/dist/patterns/table-patterns.js.map +1 -0
  61. package/dist/trace-identity/aria-snapshot-head.d.ts +23 -0
  62. package/dist/trace-identity/aria-snapshot-head.d.ts.map +1 -0
  63. package/dist/trace-identity/aria-snapshot-head.js +26 -0
  64. package/dist/trace-identity/aria-snapshot-head.js.map +1 -0
  65. package/dist/trace-identity/playwright-identity-resolver.d.ts +10 -0
  66. package/dist/trace-identity/playwright-identity-resolver.d.ts.map +1 -0
  67. package/dist/trace-identity/playwright-identity-resolver.js +130 -0
  68. package/dist/trace-identity/playwright-identity-resolver.js.map +1 -0
  69. package/dist/trace-identity/trace-run-record-reporter.d.ts +41 -0
  70. package/dist/trace-identity/trace-run-record-reporter.d.ts.map +1 -0
  71. package/dist/trace-identity/trace-run-record-reporter.js +113 -0
  72. package/dist/trace-identity/trace-run-record-reporter.js.map +1 -0
  73. package/dist/utils/column-header.d.ts +37 -0
  74. package/dist/utils/column-header.d.ts.map +1 -0
  75. package/dist/utils/column-header.js +46 -0
  76. package/dist/utils/column-header.js.map +1 -0
  77. package/dist/utils/row-index.d.ts +18 -0
  78. package/dist/utils/row-index.d.ts.map +1 -0
  79. package/dist/utils/row-index.js +39 -0
  80. package/dist/utils/row-index.js.map +1 -0
  81. package/dist/utils/url-path-regex.d.ts +45 -0
  82. package/dist/utils/url-path-regex.d.ts.map +1 -0
  83. package/dist/utils/url-path-regex.js +68 -0
  84. package/dist/utils/url-path-regex.js.map +1 -0
  85. package/package.json +7 -3
  86. package/src/index.ts +10 -1
  87. package/src/trace-identity/aria-snapshot-head.ts +33 -0
  88. package/src/trace-identity/playwright-identity-resolver.ts +123 -0
  89. package/src/trace-identity/trace-run-record-reporter.ts +105 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * App-profile presets shipped with the UI driver (spec: sungen_app_profile_spec.md §3).
3
+ * A preset is itself an AppProfile-shaped object that a project's `qa/app.yaml` pulls in
4
+ * via `extends: <name>` (or `extends: "@sungen/app-<name>"`). The project file always
5
+ * wins over the preset; per-element `variant:`/`scope:` in selectors.yaml wins over both.
6
+ *
7
+ * Keep presets truthful and minimal — every key must be consumed by a compiler slice
8
+ * (portal_roles → dialog-scope exemption; feedback.toast → name policy; widgets → the
9
+ * P3 recipe engine reads these when it lands).
10
+ */
11
+ export declare const APP_PROFILE_PRESETS: Record<string, unknown>;
12
+ //# sourceMappingURL=app-profile-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-profile-presets.d.ts","sourceRoot":"","sources":["../src/app-profile-presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAyEvD,CAAC"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APP_PROFILE_PRESETS = void 0;
4
+ /**
5
+ * App-profile presets shipped with the UI driver (spec: sungen_app_profile_spec.md §3).
6
+ * A preset is itself an AppProfile-shaped object that a project's `qa/app.yaml` pulls in
7
+ * via `extends: <name>` (or `extends: "@sungen/app-<name>"`). The project file always
8
+ * wins over the preset; per-element `variant:`/`scope:` in selectors.yaml wins over both.
9
+ *
10
+ * Keep presets truthful and minimal — every key must be consumed by a compiler slice
11
+ * (portal_roles → dialog-scope exemption; feedback.toast → name policy; widgets → the
12
+ * P3 recipe engine reads these when it lands).
13
+ */
14
+ exports.APP_PROFILE_PRESETS = {
15
+ // Reserved base layer — ALWAYS merged first by the loader (not listed in extends).
16
+ // Ships the built-in widget recipes so a per-element `variant: radix-select` works
17
+ // even in a project with no qa/app.yaml at all.
18
+ builtin: {
19
+ recipes: {
20
+ // Radix UI Select (incl. shadcn/ui): options portal to body with proper ARIA roles.
21
+ 'radix-select': {
22
+ select: [
23
+ { click: '$trigger' },
24
+ { clickText: { role: 'option', text: '$value', exact: true } },
25
+ ],
26
+ // The trigger is a <button role="combobox"> — it has no DOM `value`, so the selected
27
+ // option is read from its text (Radix renders it into <SelectValue> inside the button).
28
+ assertValue: [
29
+ { expectText: { locator: '$trigger', value: '$value', exact: true } },
30
+ ],
31
+ },
32
+ // Ant Design Select: closed panels stay in the DOM hidden — scope every lookup
33
+ // to the VISIBLE dropdown panel. `waitFor: attached` first because a select that
34
+ // already holds a value collapses its input to ~0px (the chip covers the click
35
+ // target). `clickText` scrolls the target option into view before clicking, which
36
+ // nudges a lazily-rendered / below-the-fold option list.
37
+ 'antd-select': {
38
+ select: [
39
+ { waitFor: { target: '$trigger', state: 'attached' } },
40
+ { click: '$trigger' },
41
+ { waitFor: '.ant-select-dropdown:not(.ant-select-dropdown-hidden)' },
42
+ { clickText: { within: '.ant-select-dropdown:not(.ant-select-dropdown-hidden)', text: '$value' } },
43
+ ],
44
+ // AntD keeps the chosen label in `.ant-select-selection-item` inside the trigger, not in
45
+ // a form value — assert the trigger's text, never toHaveValue().
46
+ assertValue: [
47
+ { expectText: { locator: '$trigger', value: '$value', exact: true } },
48
+ ],
49
+ },
50
+ // Ant Design DatePicker (typed input + panel): after typing, the panel keeps
51
+ // blocking pointer events; a single blur dismisses it (Escape/force-click are
52
+ // unreliable). Enter commits the typed value first.
53
+ 'antd-datepicker': {
54
+ fill: [
55
+ { click: '$trigger' },
56
+ { type: '$value' },
57
+ { press: 'Enter' },
58
+ { blur: '$trigger' },
59
+ ],
60
+ },
61
+ },
62
+ },
63
+ // Classic server-rendered / native-widget apps: no portals anywhere, native <select>.
64
+ native: {
65
+ app: { ui_library: 'native' },
66
+ layers: { portal_roles: [] },
67
+ widgets: { select: 'native' },
68
+ },
69
+ // Radix UI (incl. shadcn/ui): Select/Menu/Tooltip render through portals onto
70
+ // document.body; Toast has no accessible label by default (name derives from content).
71
+ radix: {
72
+ app: { ui_library: 'radix' },
73
+ layers: { portal_roles: ['option', 'listbox', 'menu', 'menuitem', 'tooltip'] },
74
+ feedback: { toast: { role: 'status', named_by: 'content' } },
75
+ widgets: { select: 'radix-select' },
76
+ },
77
+ // Ant Design: dropdown/picker panels portal to document.body (and closed panels stay
78
+ // in the DOM hidden — recipes must scope to the VISIBLE panel, handled in P3).
79
+ antd: {
80
+ app: { ui_library: 'antd' },
81
+ layers: { portal_roles: ['option', 'listbox', 'menu', 'menuitem', 'tooltip'] },
82
+ widgets: { select: 'antd-select' },
83
+ },
84
+ };
85
+ //# sourceMappingURL=app-profile-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-profile-presets.js","sourceRoot":"","sources":["../src/app-profile-presets.ts"],"names":[],"mappings":";;;AAAA;;;;;;;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EAAE,IAAI,EAAE,UAAU,EAAE;iBACrB;aACF;SACF;KACF;IAED,sFAAsF;IACtF,MAAM,EAAE;QACN,GAAG,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC7B,MAAM,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;QAC5B,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;KAC9B;IAED,8EAA8E;IAC9E,uFAAuF;IACvF,KAAK,EAAE;QACL,GAAG,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE;QAC5B,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE;QAC9E,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;QAC5D,OAAO,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;KACpC;IAED,qFAAqF;IACrF,+EAA+E;IAC/E,IAAI,EAAE;QACJ,GAAG,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;QAC3B,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE;QAC9E,OAAO,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;KACnC;CACF,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @sungen/driver-ui — Sungen UI capability (Playwright).
3
+ *
4
+ * The default/implicit capability: a scenario with no capability tag is UI. Owns the step-pattern
5
+ * vocabulary, the universal viewpoint catalog, the coverage-gate + assertion-depth computation, and
6
+ * the screen/flow discovery + context hooks. Plugs into core via the capability SPI; core discovers
7
+ * and calls `register()` at runtime (core never imports this package).
8
+ *
9
+ * Relocated from core in R5.4 (was `src/capabilities/builtins.ts` + the in-core pattern files).
10
+ * Note: the base Playwright spec templates (`specs-base`/`specs-locale`) remain in core for now —
11
+ * they're emitted by the core generator/initializer, not through this capability; disentangling them
12
+ * needs the generator abstraction (Orchestration Engine, #287).
13
+ */
14
+ import type { CapabilityRegistry, ScenarioInfo, ViewpointEntry, Catalog, GateResult, DepthResult } from '@sun-asterisk/sungen';
15
+ import { assertionDepth } from '@sun-asterisk/sungen';
16
+ /** Inputs the UI gate computation needs (passed by the audit engine via `gateProvider`). */
17
+ export interface UiGateInput {
18
+ scenarios: ScenarioInfo[];
19
+ viewpoints: ViewpointEntry[];
20
+ catalog: Catalog;
21
+ focus: Parameters<typeof assertionDepth>[2];
22
+ /** `platform: mobile` — makes `mobile-*` page types candidates (#864). */
23
+ isMobile?: boolean;
24
+ /** The viewpoint text, so a declared `page-type:` wins over keyword detection (#864). */
25
+ viewpointText?: string;
26
+ }
27
+ export interface UiGateResult {
28
+ gate: GateResult;
29
+ depth: DepthResult;
30
+ }
31
+ /** Register the UI capability — the default/implicit capability. */
32
+ export declare function register(registry: CapabilityRegistry): void;
33
+ export declare const sungenDriver: {
34
+ readonly capability: "ui";
35
+ readonly register: typeof register;
36
+ };
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EACV,kBAAkB,EAMlB,YAAY,EACZ,cAAc,EACd,OAAO,EACP,UAAU,EACV,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA8B,cAAc,EAAiB,MAAM,sBAAsB,CAAC;AAiBjG,4FAA4F;AAC5F,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB;AA2CD,oEAAoE;AACpE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAgC3D;AAED,eAAO,MAAM,YAAY;;;CAA0C,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sungenDriver = void 0;
4
+ exports.register = register;
5
+ const sungen_1 = require("@sun-asterisk/sungen");
6
+ const app_profile_presets_1 = require("./app-profile-presets");
7
+ const setup_patterns_1 = require("./patterns/setup-patterns");
8
+ const navigation_patterns_1 = require("./patterns/navigation-patterns");
9
+ const form_patterns_1 = require("./patterns/form-patterns");
10
+ const interaction_patterns_1 = require("./patterns/interaction-patterns");
11
+ const assertion_patterns_1 = require("./patterns/assertion-patterns");
12
+ const keyboard_patterns_1 = require("./patterns/keyboard-patterns");
13
+ const scroll_patterns_1 = require("./patterns/scroll-patterns");
14
+ const scope_patterns_1 = require("./patterns/scope-patterns");
15
+ const table_patterns_1 = require("./patterns/table-patterns");
16
+ const table_pagination_patterns_1 = require("./patterns/table-pagination-patterns");
17
+ const capture_patterns_1 = require("./patterns/capture-patterns");
18
+ const storage_patterns_1 = require("./patterns/storage-patterns");
19
+ const focus_patterns_1 = require("./patterns/focus-patterns");
20
+ /**
21
+ * UI score-bearing gate computation: viewpoint coverage + assertion depth. Wraps the shared sensor
22
+ * functions verbatim, so the produced gate/depth (and therefore the score) are byte-identical.
23
+ */
24
+ const uiGateProvider = (input) => {
25
+ const gate = (0, sungen_1.viewpointGate)(input.scenarios, input.viewpoints, input.catalog, input.isMobile ?? false, input.viewpointText ?? '');
26
+ const depth = (0, sungen_1.assertionDepth)(input.scenarios, (0, sungen_1.dataThemesFor)(input.catalog, gate.pageType), input.focus);
27
+ return { gate, depth };
28
+ };
29
+ /**
30
+ * UI viewpoint gate sensor: surfaces the universal-viewpoint theme gaps the coverage gate found
31
+ * (a low-priority reminder — does NOT affect the score or gate verdict).
32
+ */
33
+ const uiViewpointGateSensor = {
34
+ id: 'ui-viewpoint',
35
+ capability: 'ui',
36
+ kind: 'gate',
37
+ run: ({ universalGaps }) => universalGaps && universalGaps.length
38
+ ? [{ sensorId: 'ui-viewpoint', capability: 'ui', message: `UNIVERSAL: missing theme(s): ${universalGaps.join(', ')} (low priority reminder).`, severity: 'info' }]
39
+ : [],
40
+ };
41
+ // UI phase hooks (the pipeline consumes these incrementally; full capture-mode wiring lands later).
42
+ const uiDiscovery = {
43
+ appliesTo: (t) => t.kind === 'screen' || t.kind === 'flow',
44
+ discover: async (target) => ({ target: { ...target, capability: 'ui' }, sources: {}, facts: {} }),
45
+ };
46
+ const uiContextMapper = {
47
+ decompose: (ctx) => {
48
+ const f = (ctx.facts || {});
49
+ const units = [];
50
+ for (const s of f.screens ?? [])
51
+ units.push({ mode: 'screen', targetSlice: s });
52
+ for (const fl of f.flows ?? [])
53
+ units.push({ mode: 'flow', targetSlice: fl });
54
+ if (!units.length)
55
+ units.push({ mode: ctx.target.kind === 'flow' ? 'flow' : 'screen', targetSlice: ctx.target });
56
+ return units;
57
+ },
58
+ };
59
+ /** Register the UI capability — the default/implicit capability. */
60
+ function register(registry) {
61
+ registry.register({
62
+ id: 'ui',
63
+ default: true,
64
+ annotations: [],
65
+ patterns: [
66
+ ...setup_patterns_1.setupPatterns,
67
+ ...navigation_patterns_1.navigationPatterns,
68
+ ...form_patterns_1.formPatterns,
69
+ ...interaction_patterns_1.interactionPatterns,
70
+ ...assertion_patterns_1.assertionPatterns,
71
+ ...keyboard_patterns_1.keyboardPatterns,
72
+ ...scroll_patterns_1.scrollPatterns,
73
+ ...scope_patterns_1.scopePatterns,
74
+ ...table_patterns_1.tablePatterns,
75
+ ...table_pagination_patterns_1.tablePaginationPatterns,
76
+ ...capture_patterns_1.capturePatterns,
77
+ ...storage_patterns_1.storagePatterns,
78
+ ...focus_patterns_1.focusPatterns,
79
+ ],
80
+ discovery: uiDiscovery,
81
+ contextMapper: uiContextMapper,
82
+ viewpoints: sungen_1.loadCatalog, // UI owns the 17-pattern universal viewpoint catalog
83
+ gateProvider: uiGateProvider, // viewpoint coverage + depth
84
+ sensors: [uiViewpointGateSensor],
85
+ appProfilePresets: app_profile_presets_1.APP_PROFILE_PRESETS, // qa/app.yaml `extends: native|radix|antd`
86
+ // Trace target identity (SPI §4.5, DOS-14.5) — required on first use, so registering the UI
87
+ // capability never loads Playwright. A typed `require`, not `import()`: under the tsx-run CLI a
88
+ // dynamic import is real ESM and cannot resolve an extension-less TypeScript path.
89
+ traceIdentity: (input) => require('./trace-identity/playwright-identity-resolver').resolveTraceIdentities(input),
90
+ });
91
+ }
92
+ exports.sungenDriver = { capability: 'ui', register };
93
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAqGA,4BAgCC;AA3GD,iDAAiG;AAEjG,+DAA4D;AAC5D,8DAA0D;AAC1D,wEAAoE;AACpE,4DAAwD;AACxD,0EAAsE;AACtE,sEAAkE;AAClE,oEAAgE;AAChE,gEAA4D;AAC5D,8DAA0D;AAC1D,8DAA0D;AAC1D,oFAA+E;AAC/E,kEAA8D;AAC9D,kEAA8D;AAC9D,8DAA0D;AAkB1D;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,KAAkB,EAAgB,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAA,sBAAa,EAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,EAAE,KAAK,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IACjI,MAAM,KAAK,GAAG,IAAA,u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AAK,EAAE,EAAE,CACtB,OAAO,CAAC,+CAA+C,CAAoE,CAAC,sBAAsB,CAAC,KAAK,CAAC;KAC7J,CAAC,CAAC;AACL,CAAC;AAEY,QAAA,YAAY,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { StepPattern } from '@sun-asterisk/sungen';
2
+ /**
3
+ * INVARIANT — a pattern whose generated code accounts for a trailing state clause (`… is hidden`)
4
+ * MUST declare it in `states`. Undeclared, the clause reaches SG-E021 and the step compiles to a
5
+ * `throw`; over-declared, the clause is silently dropped and the assertion reads as something it is
6
+ * not. Determine the truth from the TEMPLATE the resolver names, never from the matcher.
7
+ *
8
+ * Deliberately NOT declared, because each really does drop the clause today: `page-assertion`
9
+ * (a page has no state — this was the original defect), `wait-for-page`, `table-row-exists`,
10
+ * `table-column-exists`, `see-with-variable`, `alert-text-assertion`, `all-contain-element`.
11
+ */
12
+ export declare const assertionPatterns: StepPattern[];
13
+ //# sourceMappingURL=assertion-patterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion-patterns.d.ts","sourceRoot":"","sources":["../../src/patterns/assertion-patterns.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkC,MAAM,sBAAsB,CAAC;AA4CnF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,EAm6B1C,CAAC"}