@objectstack/lint 14.7.0 → 14.8.0

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.
package/dist/index.d.cts CHANGED
@@ -70,7 +70,7 @@ interface WidgetBindingFinding {
70
70
  /** How to fix (or deliberately suppress) it. */
71
71
  hint: string;
72
72
  }
73
- type AnyRec$e = Record<string, unknown>;
73
+ type AnyRec$f = Record<string, unknown>;
74
74
  /**
75
75
  * Validate every dashboard widget's dataset binding. Returns the list of
76
76
  * findings (empty = clean). Caller decides how to surface them: `error`
@@ -78,7 +78,7 @@ type AnyRec$e = Record<string, unknown>;
78
78
  * should fail validate/build; `warning` findings are advisory and must
79
79
  * never fail the build on their own.
80
80
  */
81
- declare function validateWidgetBindings(stack: AnyRec$e): WidgetBindingFinding[];
81
+ declare function validateWidgetBindings(stack: AnyRec$f): WidgetBindingFinding[];
82
82
 
83
83
  interface ExprIssue {
84
84
  where: string;
@@ -91,12 +91,12 @@ interface ExprIssue {
91
91
  */
92
92
  severity?: 'error' | 'warning';
93
93
  }
94
- type AnyRec$d = Record<string, unknown>;
94
+ type AnyRec$e = Record<string, unknown>;
95
95
  /**
96
96
  * Validate every predicate in the stack. Returns the list of issues (empty =
97
97
  * clean). Caller decides how to surface / whether to fail the build.
98
98
  */
99
- declare function validateStackExpressions(stack: AnyRec$d): ExprIssue[];
99
+ declare function validateStackExpressions(stack: AnyRec$e): ExprIssue[];
100
100
 
101
101
  type ListViewModeSeverity = 'error' | 'warning';
102
102
  interface ListViewModeFinding {
@@ -110,7 +110,7 @@ interface ListViewModeFinding {
110
110
  hint: string;
111
111
  }
112
112
  declare const LIST_VIEW_FILTERS_IN_VIEWS_MODE = "list-view-filters-in-views-mode";
113
- type AnyRec$c = Record<string, unknown>;
113
+ type AnyRec$d = Record<string, unknown>;
114
114
  /**
115
115
  * Flag ADR-0047 "views" mode violations on an object's built-in named views or a
116
116
  * `defineView` default `list` / named `listViews`: `quickFilters`, or a `tabs`
@@ -120,7 +120,7 @@ type AnyRec$c = Record<string, unknown>;
120
120
  *
121
121
  * Feed the PRE-parse stack (normalizeStackInput output) — see file header.
122
122
  */
123
- declare function validateListViewMode(stack: AnyRec$c): ListViewModeFinding[];
123
+ declare function validateListViewMode(stack: AnyRec$d): ListViewModeFinding[];
124
124
 
125
125
  type StyleSeverity = 'error' | 'warning';
126
126
  interface StyleFinding {
@@ -138,14 +138,14 @@ declare const STYLE_CLASSNAME_TAILWIND = "style-classname-tailwind";
138
138
  declare const STYLE_RESPONSIVE_NO_BASE = "style-responsive-no-base";
139
139
  declare const STYLE_UNKNOWN_CSS_PROPERTY = "style-unknown-css-property";
140
140
  declare const STYLE_UNKNOWN_TOKEN = "style-unknown-token";
141
- type AnyRec$b = Record<string, unknown>;
141
+ type AnyRec$c = Record<string, unknown>;
142
142
  /**
143
143
  * Validate every page's component tree for SDUI styling correctness (ADR-0065).
144
144
  * Returns findings (empty = clean). `error` findings describe styles that are
145
145
  * silently dropped and should fail validate/build; `warning` findings are
146
146
  * advisory (typos, drift, footguns).
147
147
  */
148
- declare function validateResponsiveStyles(stack: AnyRec$b): StyleFinding[];
148
+ declare function validateResponsiveStyles(stack: AnyRec$c): StyleFinding[];
149
149
 
150
150
  type JsxPageSeverity = 'error' | 'warning';
151
151
  interface JsxPageFinding {
@@ -158,8 +158,8 @@ interface JsxPageFinding {
158
158
  message: string;
159
159
  hint: string;
160
160
  }
161
- type AnyRec$a = Record<string, unknown>;
162
- declare function validateJsxPages(stack: AnyRec$a, opts?: {
161
+ type AnyRec$b = Record<string, unknown>;
162
+ declare function validateJsxPages(stack: AnyRec$b, opts?: {
163
163
  manifest?: Manifest;
164
164
  }): JsxPageFinding[];
165
165
 
@@ -172,8 +172,8 @@ interface ReactPageFinding {
172
172
  message: string;
173
173
  hint: string;
174
174
  }
175
- type AnyRec$9 = Record<string, unknown>;
176
- declare function validateReactPages(stack: AnyRec$9): ReactPageFinding[];
175
+ type AnyRec$a = Record<string, unknown>;
176
+ declare function validateReactPages(stack: AnyRec$a): ReactPageFinding[];
177
177
 
178
178
  type ReactPropSeverity = 'error' | 'warning';
179
179
  interface ReactPropFinding {
@@ -184,8 +184,8 @@ interface ReactPropFinding {
184
184
  message: string;
185
185
  hint: string;
186
186
  }
187
- type AnyRec$8 = Record<string, unknown>;
188
- declare function validateReactPageProps(stack: AnyRec$8): ReactPropFinding[];
187
+ type AnyRec$9 = Record<string, unknown>;
188
+ declare function validateReactPageProps(stack: AnyRec$9): ReactPropFinding[];
189
189
 
190
190
  type SourceStyleSeverity = 'error' | 'warning';
191
191
  interface SourceStyleFinding {
@@ -197,8 +197,8 @@ interface SourceStyleFinding {
197
197
  hint: string;
198
198
  }
199
199
  declare const PAGE_SOURCE_CLASSNAME = "page-source-className-tailwind";
200
- type AnyRec$7 = Record<string, unknown>;
201
- declare function validatePageSourceStyling(stack: AnyRec$7): SourceStyleFinding[];
200
+ type AnyRec$8 = Record<string, unknown>;
201
+ declare function validatePageSourceStyling(stack: AnyRec$8): SourceStyleFinding[];
202
202
 
203
203
  /**
204
204
  * Build-time record-title diagnostics (ADR-0079).
@@ -242,14 +242,14 @@ interface RecordTitleFinding {
242
242
  /** How to fix it. */
243
243
  hint: string;
244
244
  }
245
- type AnyRec$6 = Record<string, unknown>;
245
+ type AnyRec$7 = Record<string, unknown>;
246
246
  /**
247
247
  * Validate every object's record-title declaration. Returns the list of
248
248
  * findings (empty = clean). Both rules are advisory (`warning`): the caller
249
249
  * must never fail the build on them alone — auto-provision + the `Record #<id>`
250
250
  * floor guarantee a resolvable title at runtime.
251
251
  */
252
- declare function validateRecordTitle(stack: AnyRec$6): RecordTitleFinding[];
252
+ declare function validateRecordTitle(stack: AnyRec$7): RecordTitleFinding[];
253
253
 
254
254
  /**
255
255
  * Build-time semantic-role diagnostics (ADR-0085).
@@ -286,13 +286,13 @@ interface SemanticRoleFinding {
286
286
  /** How to fix it. */
287
287
  hint: string;
288
288
  }
289
- type AnyRec$5 = Record<string, unknown>;
289
+ type AnyRec$6 = Record<string, unknown>;
290
290
  /**
291
291
  * Validate every object's semantic-role pointers. Returns the list of
292
292
  * findings (empty = clean). Advisory only — the caller must never fail the
293
293
  * build on these alone.
294
294
  */
295
- declare function validateSemanticRoles(stack: AnyRec$5): SemanticRoleFinding[];
295
+ declare function validateSemanticRoles(stack: AnyRec$6): SemanticRoleFinding[];
296
296
 
297
297
  /**
298
298
  * Build-time form-layout diagnostics (#2578).
@@ -335,12 +335,67 @@ interface FormLayoutFinding {
335
335
  /** How to fix it. */
336
336
  hint: string;
337
337
  }
338
- type AnyRec$4 = Record<string, unknown>;
338
+ type AnyRec$5 = Record<string, unknown>;
339
339
  /**
340
340
  * Validate authored form-view layout. Returns findings (empty = clean).
341
341
  * Advisory only — the caller must never fail the build on these alone.
342
342
  */
343
- declare function validateFormLayout(stack: AnyRec$4): FormLayoutFinding[];
343
+ declare function validateFormLayout(stack: AnyRec$5): FormLayoutFinding[];
344
+
345
+ /**
346
+ * Build-time conditional-visibility diagnostics (ADR-0089 D3b).
347
+ *
348
+ * ADR-0089 unifies the conditional-visibility predicate under the single
349
+ * canonical key **`visibleWhen`** across data fields, view form sections/fields,
350
+ * and page components. The deprecated spellings — `visibleOn` (view form) and
351
+ * `visibility` (page component) — stay accepted and are folded into `visibleWhen`
352
+ * at the schema boundary (a zod `.transform()`). Because that fold happens during
353
+ * `parse()`, the aliases are gone from the *parsed* stack — so this rule runs on
354
+ * the **pre-parse** (normalized) stack, exactly like `validate-list-view-mode`,
355
+ * to see what the author actually wrote.
356
+ *
357
+ * Two advisory rules (both `warning` — nothing is broken, the alias still works
358
+ * and a mis-rooted predicate just never matches):
359
+ *
360
+ * - `visibility-alias-deprecated` — a `visibleOn` / `visibility` key in authored
361
+ * source. Autofix intent: rename the key to `visibleWhen` (same value).
362
+ * - `visibility-root-mislayered` — a runtime view/page visibility predicate
363
+ * rooted at `data.` (the metadata-editing-form root, ADR-0089 §Context). Runtime
364
+ * record surfaces bind `record` + `current_user` (pages also expose `page.<var>`),
365
+ * so a `data.`-rooted predicate here is almost always a wrong-layer paste that
366
+ * silently never matches.
367
+ *
368
+ * Scope: `views` (form `sections` / legacy `groups`, and their `fields`) and
369
+ * `pages` (`regions[].components[]`). Data-field `visibleWhen` is already covered
370
+ * by `validate-expressions` and is not re-checked here.
371
+ */
372
+ declare const VISIBILITY_ALIAS_DEPRECATED = "visibility-alias-deprecated";
373
+ declare const VISIBILITY_ROOT_MISLAYERED = "visibility-root-mislayered";
374
+ type VisibilitySeverity = 'error' | 'warning';
375
+ interface VisibilityFinding {
376
+ /** Always `warning` today — both rules are advisory (see module note). */
377
+ severity: VisibilitySeverity;
378
+ /** Diagnostic rule id, e.g. `visibility-alias-deprecated`. */
379
+ rule: string;
380
+ /** Human-readable location, e.g. `view "contact_form"`. */
381
+ where: string;
382
+ /** Config path, e.g. `views[2].sections[0].fields[3]`. */
383
+ path: string;
384
+ /** What is wrong. */
385
+ message: string;
386
+ /** How to fix it. */
387
+ hint: string;
388
+ }
389
+ type AnyRec$4 = Record<string, unknown>;
390
+ /**
391
+ * Validate conditional-visibility keys across authored views and pages.
392
+ *
393
+ * Runs on the **pre-parse** (normalized) stack so it can see the deprecated
394
+ * `visibleOn` / `visibility` aliases before the schema folds them into
395
+ * `visibleWhen`. Returns findings (empty = clean); all advisory (`warning`) —
396
+ * the caller must never fail the build on these alone.
397
+ */
398
+ declare function validateVisibilityPredicates(stack: AnyRec$4): VisibilityFinding[];
344
399
 
345
400
  declare const CAPABILITY_REFERENCE_UNKNOWN = "capability-reference-unknown";
346
401
  type CapabilityRefSeverity = 'error' | 'warning';
@@ -450,4 +505,4 @@ declare function buildAccessMatrix(stack: AnyRec): AccessMatrix;
450
505
  */
451
506
  declare function diffAccessMatrix(before: AccessMatrix, after: AccessMatrix): string[];
452
507
 
453
- export { APPROVAL_APPROVER_TYPE_UNKNOWN, APPROVAL_ESCALATION_REASSIGN_NO_TARGET, APPROVAL_ROLE_NOT_MEMBERSHIP_TIER, type ApprovalApproverFinding, type ApprovalApproverSeverity, CAPABILITY_REFERENCE_UNKNOWN, CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type CapabilityRefFinding, type CapabilityRefSeverity, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SECURITY_ANCHOR_HIGH_PRIVILEGE, SECURITY_BOOK_AUDIENCE_UNKNOWN_SET, SECURITY_DELEGATION_MISSING_REASON, SECURITY_EXTERNAL_WIDER, SECURITY_GRANT_EXPIRED_AT_AUTHORING, SECURITY_MASTER_DETAIL_UNGRANTED, SECURITY_OWD_ALIAS, SECURITY_OWD_UNSET, SECURITY_PRIVATE_NO_READSCOPE, SECURITY_ROLE_WORD, SECURITY_WILDCARD_VAMA, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SecurityFinding, type SecuritySeverity, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, buildAccessMatrix, diffAccessMatrix, validateApprovalApprovers, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
508
+ export { APPROVAL_APPROVER_TYPE_UNKNOWN, APPROVAL_ESCALATION_REASSIGN_NO_TARGET, APPROVAL_ROLE_NOT_MEMBERSHIP_TIER, type ApprovalApproverFinding, type ApprovalApproverSeverity, CAPABILITY_REFERENCE_UNKNOWN, CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type CapabilityRefFinding, type CapabilityRefSeverity, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SECURITY_ANCHOR_HIGH_PRIVILEGE, SECURITY_BOOK_AUDIENCE_UNKNOWN_SET, SECURITY_DELEGATION_MISSING_REASON, SECURITY_EXTERNAL_WIDER, SECURITY_GRANT_EXPIRED_AT_AUTHORING, SECURITY_MASTER_DETAIL_UNGRANTED, SECURITY_OWD_ALIAS, SECURITY_OWD_UNSET, SECURITY_PRIVATE_NO_READSCOPE, SECURITY_ROLE_WORD, SECURITY_WILDCARD_VAMA, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SecurityFinding, type SecuritySeverity, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, VISIBILITY_ALIAS_DEPRECATED, VISIBILITY_ROOT_MISLAYERED, type VisibilityFinding, type VisibilitySeverity, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, buildAccessMatrix, diffAccessMatrix, validateApprovalApprovers, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateVisibilityPredicates, validateWidgetBindings };
package/dist/index.d.ts CHANGED
@@ -70,7 +70,7 @@ interface WidgetBindingFinding {
70
70
  /** How to fix (or deliberately suppress) it. */
71
71
  hint: string;
72
72
  }
73
- type AnyRec$e = Record<string, unknown>;
73
+ type AnyRec$f = Record<string, unknown>;
74
74
  /**
75
75
  * Validate every dashboard widget's dataset binding. Returns the list of
76
76
  * findings (empty = clean). Caller decides how to surface them: `error`
@@ -78,7 +78,7 @@ type AnyRec$e = Record<string, unknown>;
78
78
  * should fail validate/build; `warning` findings are advisory and must
79
79
  * never fail the build on their own.
80
80
  */
81
- declare function validateWidgetBindings(stack: AnyRec$e): WidgetBindingFinding[];
81
+ declare function validateWidgetBindings(stack: AnyRec$f): WidgetBindingFinding[];
82
82
 
83
83
  interface ExprIssue {
84
84
  where: string;
@@ -91,12 +91,12 @@ interface ExprIssue {
91
91
  */
92
92
  severity?: 'error' | 'warning';
93
93
  }
94
- type AnyRec$d = Record<string, unknown>;
94
+ type AnyRec$e = Record<string, unknown>;
95
95
  /**
96
96
  * Validate every predicate in the stack. Returns the list of issues (empty =
97
97
  * clean). Caller decides how to surface / whether to fail the build.
98
98
  */
99
- declare function validateStackExpressions(stack: AnyRec$d): ExprIssue[];
99
+ declare function validateStackExpressions(stack: AnyRec$e): ExprIssue[];
100
100
 
101
101
  type ListViewModeSeverity = 'error' | 'warning';
102
102
  interface ListViewModeFinding {
@@ -110,7 +110,7 @@ interface ListViewModeFinding {
110
110
  hint: string;
111
111
  }
112
112
  declare const LIST_VIEW_FILTERS_IN_VIEWS_MODE = "list-view-filters-in-views-mode";
113
- type AnyRec$c = Record<string, unknown>;
113
+ type AnyRec$d = Record<string, unknown>;
114
114
  /**
115
115
  * Flag ADR-0047 "views" mode violations on an object's built-in named views or a
116
116
  * `defineView` default `list` / named `listViews`: `quickFilters`, or a `tabs`
@@ -120,7 +120,7 @@ type AnyRec$c = Record<string, unknown>;
120
120
  *
121
121
  * Feed the PRE-parse stack (normalizeStackInput output) — see file header.
122
122
  */
123
- declare function validateListViewMode(stack: AnyRec$c): ListViewModeFinding[];
123
+ declare function validateListViewMode(stack: AnyRec$d): ListViewModeFinding[];
124
124
 
125
125
  type StyleSeverity = 'error' | 'warning';
126
126
  interface StyleFinding {
@@ -138,14 +138,14 @@ declare const STYLE_CLASSNAME_TAILWIND = "style-classname-tailwind";
138
138
  declare const STYLE_RESPONSIVE_NO_BASE = "style-responsive-no-base";
139
139
  declare const STYLE_UNKNOWN_CSS_PROPERTY = "style-unknown-css-property";
140
140
  declare const STYLE_UNKNOWN_TOKEN = "style-unknown-token";
141
- type AnyRec$b = Record<string, unknown>;
141
+ type AnyRec$c = Record<string, unknown>;
142
142
  /**
143
143
  * Validate every page's component tree for SDUI styling correctness (ADR-0065).
144
144
  * Returns findings (empty = clean). `error` findings describe styles that are
145
145
  * silently dropped and should fail validate/build; `warning` findings are
146
146
  * advisory (typos, drift, footguns).
147
147
  */
148
- declare function validateResponsiveStyles(stack: AnyRec$b): StyleFinding[];
148
+ declare function validateResponsiveStyles(stack: AnyRec$c): StyleFinding[];
149
149
 
150
150
  type JsxPageSeverity = 'error' | 'warning';
151
151
  interface JsxPageFinding {
@@ -158,8 +158,8 @@ interface JsxPageFinding {
158
158
  message: string;
159
159
  hint: string;
160
160
  }
161
- type AnyRec$a = Record<string, unknown>;
162
- declare function validateJsxPages(stack: AnyRec$a, opts?: {
161
+ type AnyRec$b = Record<string, unknown>;
162
+ declare function validateJsxPages(stack: AnyRec$b, opts?: {
163
163
  manifest?: Manifest;
164
164
  }): JsxPageFinding[];
165
165
 
@@ -172,8 +172,8 @@ interface ReactPageFinding {
172
172
  message: string;
173
173
  hint: string;
174
174
  }
175
- type AnyRec$9 = Record<string, unknown>;
176
- declare function validateReactPages(stack: AnyRec$9): ReactPageFinding[];
175
+ type AnyRec$a = Record<string, unknown>;
176
+ declare function validateReactPages(stack: AnyRec$a): ReactPageFinding[];
177
177
 
178
178
  type ReactPropSeverity = 'error' | 'warning';
179
179
  interface ReactPropFinding {
@@ -184,8 +184,8 @@ interface ReactPropFinding {
184
184
  message: string;
185
185
  hint: string;
186
186
  }
187
- type AnyRec$8 = Record<string, unknown>;
188
- declare function validateReactPageProps(stack: AnyRec$8): ReactPropFinding[];
187
+ type AnyRec$9 = Record<string, unknown>;
188
+ declare function validateReactPageProps(stack: AnyRec$9): ReactPropFinding[];
189
189
 
190
190
  type SourceStyleSeverity = 'error' | 'warning';
191
191
  interface SourceStyleFinding {
@@ -197,8 +197,8 @@ interface SourceStyleFinding {
197
197
  hint: string;
198
198
  }
199
199
  declare const PAGE_SOURCE_CLASSNAME = "page-source-className-tailwind";
200
- type AnyRec$7 = Record<string, unknown>;
201
- declare function validatePageSourceStyling(stack: AnyRec$7): SourceStyleFinding[];
200
+ type AnyRec$8 = Record<string, unknown>;
201
+ declare function validatePageSourceStyling(stack: AnyRec$8): SourceStyleFinding[];
202
202
 
203
203
  /**
204
204
  * Build-time record-title diagnostics (ADR-0079).
@@ -242,14 +242,14 @@ interface RecordTitleFinding {
242
242
  /** How to fix it. */
243
243
  hint: string;
244
244
  }
245
- type AnyRec$6 = Record<string, unknown>;
245
+ type AnyRec$7 = Record<string, unknown>;
246
246
  /**
247
247
  * Validate every object's record-title declaration. Returns the list of
248
248
  * findings (empty = clean). Both rules are advisory (`warning`): the caller
249
249
  * must never fail the build on them alone — auto-provision + the `Record #<id>`
250
250
  * floor guarantee a resolvable title at runtime.
251
251
  */
252
- declare function validateRecordTitle(stack: AnyRec$6): RecordTitleFinding[];
252
+ declare function validateRecordTitle(stack: AnyRec$7): RecordTitleFinding[];
253
253
 
254
254
  /**
255
255
  * Build-time semantic-role diagnostics (ADR-0085).
@@ -286,13 +286,13 @@ interface SemanticRoleFinding {
286
286
  /** How to fix it. */
287
287
  hint: string;
288
288
  }
289
- type AnyRec$5 = Record<string, unknown>;
289
+ type AnyRec$6 = Record<string, unknown>;
290
290
  /**
291
291
  * Validate every object's semantic-role pointers. Returns the list of
292
292
  * findings (empty = clean). Advisory only — the caller must never fail the
293
293
  * build on these alone.
294
294
  */
295
- declare function validateSemanticRoles(stack: AnyRec$5): SemanticRoleFinding[];
295
+ declare function validateSemanticRoles(stack: AnyRec$6): SemanticRoleFinding[];
296
296
 
297
297
  /**
298
298
  * Build-time form-layout diagnostics (#2578).
@@ -335,12 +335,67 @@ interface FormLayoutFinding {
335
335
  /** How to fix it. */
336
336
  hint: string;
337
337
  }
338
- type AnyRec$4 = Record<string, unknown>;
338
+ type AnyRec$5 = Record<string, unknown>;
339
339
  /**
340
340
  * Validate authored form-view layout. Returns findings (empty = clean).
341
341
  * Advisory only — the caller must never fail the build on these alone.
342
342
  */
343
- declare function validateFormLayout(stack: AnyRec$4): FormLayoutFinding[];
343
+ declare function validateFormLayout(stack: AnyRec$5): FormLayoutFinding[];
344
+
345
+ /**
346
+ * Build-time conditional-visibility diagnostics (ADR-0089 D3b).
347
+ *
348
+ * ADR-0089 unifies the conditional-visibility predicate under the single
349
+ * canonical key **`visibleWhen`** across data fields, view form sections/fields,
350
+ * and page components. The deprecated spellings — `visibleOn` (view form) and
351
+ * `visibility` (page component) — stay accepted and are folded into `visibleWhen`
352
+ * at the schema boundary (a zod `.transform()`). Because that fold happens during
353
+ * `parse()`, the aliases are gone from the *parsed* stack — so this rule runs on
354
+ * the **pre-parse** (normalized) stack, exactly like `validate-list-view-mode`,
355
+ * to see what the author actually wrote.
356
+ *
357
+ * Two advisory rules (both `warning` — nothing is broken, the alias still works
358
+ * and a mis-rooted predicate just never matches):
359
+ *
360
+ * - `visibility-alias-deprecated` — a `visibleOn` / `visibility` key in authored
361
+ * source. Autofix intent: rename the key to `visibleWhen` (same value).
362
+ * - `visibility-root-mislayered` — a runtime view/page visibility predicate
363
+ * rooted at `data.` (the metadata-editing-form root, ADR-0089 §Context). Runtime
364
+ * record surfaces bind `record` + `current_user` (pages also expose `page.<var>`),
365
+ * so a `data.`-rooted predicate here is almost always a wrong-layer paste that
366
+ * silently never matches.
367
+ *
368
+ * Scope: `views` (form `sections` / legacy `groups`, and their `fields`) and
369
+ * `pages` (`regions[].components[]`). Data-field `visibleWhen` is already covered
370
+ * by `validate-expressions` and is not re-checked here.
371
+ */
372
+ declare const VISIBILITY_ALIAS_DEPRECATED = "visibility-alias-deprecated";
373
+ declare const VISIBILITY_ROOT_MISLAYERED = "visibility-root-mislayered";
374
+ type VisibilitySeverity = 'error' | 'warning';
375
+ interface VisibilityFinding {
376
+ /** Always `warning` today — both rules are advisory (see module note). */
377
+ severity: VisibilitySeverity;
378
+ /** Diagnostic rule id, e.g. `visibility-alias-deprecated`. */
379
+ rule: string;
380
+ /** Human-readable location, e.g. `view "contact_form"`. */
381
+ where: string;
382
+ /** Config path, e.g. `views[2].sections[0].fields[3]`. */
383
+ path: string;
384
+ /** What is wrong. */
385
+ message: string;
386
+ /** How to fix it. */
387
+ hint: string;
388
+ }
389
+ type AnyRec$4 = Record<string, unknown>;
390
+ /**
391
+ * Validate conditional-visibility keys across authored views and pages.
392
+ *
393
+ * Runs on the **pre-parse** (normalized) stack so it can see the deprecated
394
+ * `visibleOn` / `visibility` aliases before the schema folds them into
395
+ * `visibleWhen`. Returns findings (empty = clean); all advisory (`warning`) —
396
+ * the caller must never fail the build on these alone.
397
+ */
398
+ declare function validateVisibilityPredicates(stack: AnyRec$4): VisibilityFinding[];
344
399
 
345
400
  declare const CAPABILITY_REFERENCE_UNKNOWN = "capability-reference-unknown";
346
401
  type CapabilityRefSeverity = 'error' | 'warning';
@@ -450,4 +505,4 @@ declare function buildAccessMatrix(stack: AnyRec): AccessMatrix;
450
505
  */
451
506
  declare function diffAccessMatrix(before: AccessMatrix, after: AccessMatrix): string[];
452
507
 
453
- export { APPROVAL_APPROVER_TYPE_UNKNOWN, APPROVAL_ESCALATION_REASSIGN_NO_TARGET, APPROVAL_ROLE_NOT_MEMBERSHIP_TIER, type ApprovalApproverFinding, type ApprovalApproverSeverity, CAPABILITY_REFERENCE_UNKNOWN, CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type CapabilityRefFinding, type CapabilityRefSeverity, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SECURITY_ANCHOR_HIGH_PRIVILEGE, SECURITY_BOOK_AUDIENCE_UNKNOWN_SET, SECURITY_DELEGATION_MISSING_REASON, SECURITY_EXTERNAL_WIDER, SECURITY_GRANT_EXPIRED_AT_AUTHORING, SECURITY_MASTER_DETAIL_UNGRANTED, SECURITY_OWD_ALIAS, SECURITY_OWD_UNSET, SECURITY_PRIVATE_NO_READSCOPE, SECURITY_ROLE_WORD, SECURITY_WILDCARD_VAMA, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SecurityFinding, type SecuritySeverity, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, buildAccessMatrix, diffAccessMatrix, validateApprovalApprovers, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
508
+ export { APPROVAL_APPROVER_TYPE_UNKNOWN, APPROVAL_ESCALATION_REASSIGN_NO_TARGET, APPROVAL_ROLE_NOT_MEMBERSHIP_TIER, type ApprovalApproverFinding, type ApprovalApproverSeverity, CAPABILITY_REFERENCE_UNKNOWN, CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type CapabilityRefFinding, type CapabilityRefSeverity, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SECURITY_ANCHOR_HIGH_PRIVILEGE, SECURITY_BOOK_AUDIENCE_UNKNOWN_SET, SECURITY_DELEGATION_MISSING_REASON, SECURITY_EXTERNAL_WIDER, SECURITY_GRANT_EXPIRED_AT_AUTHORING, SECURITY_MASTER_DETAIL_UNGRANTED, SECURITY_OWD_ALIAS, SECURITY_OWD_UNSET, SECURITY_PRIVATE_NO_READSCOPE, SECURITY_ROLE_WORD, SECURITY_WILDCARD_VAMA, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SecurityFinding, type SecuritySeverity, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, VISIBILITY_ALIAS_DEPRECATED, VISIBILITY_ROOT_MISLAYERED, type VisibilityFinding, type VisibilitySeverity, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, buildAccessMatrix, diffAccessMatrix, validateApprovalApprovers, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateVisibilityPredicates, validateWidgetBindings };