@svelte-vitals/core 0.55.1 → 0.55.3

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.
@@ -1,6 +1,16 @@
1
- import { $ as formatMarkdownReport, A as A11yOccurrenceInfo, At as OrphanEffectFact, B as decodeFragmentId, C as compileOverrides, Ct as Value, D as withFailedRulesOff, Dt as ComponentFacts, E as settingSeverity, F as IDREF_ATTRS, Ft as skippedFileWarnings, G as stripTextDirective, H as isTopFragment, I as LandmarkInput, It as Runtime, J as ImageInfo, K as HeadingInfo, L as NAMING_ATTRS, Lt as withReadLimit, M as ANCESTRY_DEPENDENT_TAGS, Mt as SuppressionDirective, N as ASIDE_DEMOTING_TAGS, Nt as collectComponentFacts, O as withIndexableOff, Ot as EachBlockFact, P as BranchStep, Pt as emptyComponentFacts, Q as isClassicScriptType, R as ResolvedA11y, S as SEARCH_RESULT_RULES, T as selectRules, Tt as defaultProject, U as resolveLandmark, V as foldOccurrences, W as splitTokens, X as HeadTag, Y as ResolvedImages, Z as ResolvedHead, _ as isPlainObject, a as HealthResult, at as hasFailureAtOrAbove, b as validateRuleSetting, bt as Scope, c as ScoreResult, ct as Category, d as Rule, dt as Fix, et as formatGithubReport, f as RuleContext, ft as KitAlias, g as RuleOptionsSpec, h as RuleOptionSpec, ht as Result, i as formatJsonReport, it as effectiveSeverity, j as A11ySkipCause, jt as SourceSpan, k as KitModuleFacts, kt as EffectFact, l as computeHealth, lt as Config, m as isPenalized, mt as Project, ot as summarize, p as docsUrlFor, q as ResolvedHeadings, r as buildJsonReport, rt as classify, s as ScoreOptions, t as JsonReport, tt as Classification, u as computeScore, v as resolveRuleOptions, w as formatFailedRuleWarning, wt as defaultConfig, x as CompiledOverride, xt as Severity, y as shouldSkipRangeCheck, z as SECTIONING_TAGS } from "./json-TIGneC1p.js";
1
+ import { $ as ResolvedImages, A as KitModuleFacts, At as ResolvedHead, B as BranchStep, Bt as emptyComponentFacts, C as SEARCH_RESULT_RULES, Ct as Severity, D as settingSeverity, Dt as defaultProject, E as selectRules, Et as defaultConfig, F as ResolvedHeadings, Ft as EffectFact, G as SECTIONING_TAGS, H as LandmarkInput, Ht as Runtime, I as A11yOccurrenceInfo, It as OrphanEffectFact, J as isTopFragment, K as decodeFragmentId, L as A11ySkipCause, Lt as SourceSpan, M as pageRendersOnlyWhenBuilding, Mt as isClassicScriptType, N as routeNeverSsr, Nt as ComponentFacts, O as withFailedRulesOff, P as HeadingInfo, Pt as EachBlockFact, Q as ImageInfo, R as ANCESTRY_DEPENDENT_TAGS, Rt as SuppressionDirective, S as CompiledOverride, St as Scope, T as formatFailedRuleWarning, Tt as Value, U as NAMING_ATTRS, Ut as withReadLimit, V as IDREF_ATTRS, Vt as skippedFileWarnings, W as ResolvedA11y, X as splitTokens, Y as resolveLandmark, Z as stripTextDirective, _ as RuleOptionsSpec, _t as Result, a as formatJsonReportChunks, at as classify, b as shouldSkipRangeCheck, c as ScoreOptions, ct as summarize, d as computeScore, dt as Config, et as isSvgSrc, f as Rule, g as RuleOptionSpec, gt as Project, h as isPenalized, i as formatJsonReport, j as layoutNeverRenders, jt as hasRel, k as withIndexableOff, kt as HeadTag, l as ScoreResult, m as docsUrlFor, mt as KitAlias, nt as formatGithubReport, o as HealthResult, ot as effectiveSeverity, p as RuleContext, pt as Fix, q as foldOccurrences, r as buildJsonReport, rt as Classification, st as hasFailureAtOrAbove, t as JsonReport, tt as formatMarkdownReport, u as computeHealth, ut as Category, v as isPlainObject, w as compileOverrides, x as validateRuleSetting, y as resolveRuleOptions, z as ASIDE_DEMOTING_TAGS, zt as collectComponentFacts } from "./json-DmLgFEwV.js";
2
2
  import { AST } from "svelte/compiler";
3
3
  //#region src/component-parse.d.ts
4
+ type Node$2 = any;
5
+ /** A component's script `const` lists that nothing in its scripts or template can change. */
6
+ export declare function collectComponentConstantLists(ast: Node$2, opts?: {
7
+ sets?: boolean;
8
+ }): Set<string>;
9
+ /**
10
+ * Export names of a module's constant lists — `export const X = [ … ]`, or a local one exported by
11
+ * name — that the module itself never writes (correctness/each-key, correctness/each-index-key).
12
+ */
13
+ export declare function collectConstantListExports(program: Node$2): Set<string>;
4
14
  /** What the per-file parsers produce — `ComponentFacts` minus `file`, with `suppressions` always present. */
5
15
  type ParsedFacts = Omit<ComponentFacts, 'file' | 'suppressions'> & {
6
16
  suppressions: SuppressionDirective[];
@@ -12,7 +22,472 @@ type ParsedFacts = Omit<ComponentFacts, 'file' | 'suppressions'> & {
12
22
  */
13
23
  export declare function parseComponentFacts(source: string, filename: string): ParsedFacts;
14
24
  //#endregion
25
+ //#region ../../node_modules/.pnpm/@types+estree@1.0.9/node_modules/@types/estree/index.d.ts
26
+ // This definition file follows a somewhat unusual format. ESTree allows
27
+ // runtime type checks based on the `type` parameter. In order to explain this
28
+ // to typescript we want to use discriminated union types:
29
+ // https://github.com/Microsoft/TypeScript/pull/9163
30
+ //
31
+ // For ESTree this is a bit tricky because the high level interfaces like
32
+ // Node or Function are pulling double duty. We want to pass common fields down
33
+ // to the interfaces that extend them (like Identifier or
34
+ // ArrowFunctionExpression), but you can't extend a type union or enforce
35
+ // common fields on them. So we've split the high level interfaces into two
36
+ // types, a base type which passes down inherited fields, and a type union of
37
+ // all types which extend the base type. Only the type union is exported, and
38
+ // the union is how other types refer to the collection of inheriting types.
39
+ //
40
+ // This makes the definitions file here somewhat more difficult to maintain,
41
+ // but it has the notable advantage of making ESTree much easier to use as
42
+ // an end user.
43
+ interface BaseNodeWithoutComments {
44
+ // Every leaf interface that extends BaseNode must specify a type property.
45
+ // The type property should be a string literal. For example, Identifier
46
+ // has: `type: "Identifier"`
47
+ type: string;
48
+ loc?: SourceLocation | null | undefined;
49
+ range?: [number, number] | undefined;
50
+ }
51
+ interface BaseNode extends BaseNodeWithoutComments {
52
+ leadingComments?: Comment[] | undefined;
53
+ trailingComments?: Comment[] | undefined;
54
+ }
55
+ interface Comment extends BaseNodeWithoutComments {
56
+ type: "Line" | "Block";
57
+ value: string;
58
+ }
59
+ interface SourceLocation {
60
+ source?: string | null | undefined;
61
+ start: Position;
62
+ end: Position;
63
+ }
64
+ interface Position {
65
+ /** >= 1 */
66
+ line: number;
67
+ /** >= 0 */
68
+ column: number;
69
+ }
70
+ interface BaseFunction extends BaseNode {
71
+ params: Pattern[];
72
+ generator?: boolean | undefined;
73
+ async?: boolean | undefined;
74
+ // The body is either BlockStatement or Expression because arrow functions
75
+ // can have a body that's either. FunctionDeclarations and
76
+ // FunctionExpressions have only BlockStatement bodies.
77
+ body: BlockStatement | Expression;
78
+ }
79
+ type Statement = ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration;
80
+ interface BaseStatement extends BaseNode {}
81
+ interface EmptyStatement extends BaseStatement {
82
+ type: "EmptyStatement";
83
+ }
84
+ interface BlockStatement extends BaseStatement {
85
+ type: "BlockStatement";
86
+ body: Statement[];
87
+ innerComments?: Comment[] | undefined;
88
+ }
89
+ interface StaticBlock extends Omit<BlockStatement, "type"> {
90
+ type: "StaticBlock";
91
+ }
92
+ interface ExpressionStatement extends BaseStatement {
93
+ type: "ExpressionStatement";
94
+ expression: Expression;
95
+ }
96
+ interface IfStatement extends BaseStatement {
97
+ type: "IfStatement";
98
+ test: Expression;
99
+ consequent: Statement;
100
+ alternate?: Statement | null | undefined;
101
+ }
102
+ interface LabeledStatement extends BaseStatement {
103
+ type: "LabeledStatement";
104
+ label: Identifier;
105
+ body: Statement;
106
+ }
107
+ interface BreakStatement extends BaseStatement {
108
+ type: "BreakStatement";
109
+ label?: Identifier | null | undefined;
110
+ }
111
+ interface ContinueStatement extends BaseStatement {
112
+ type: "ContinueStatement";
113
+ label?: Identifier | null | undefined;
114
+ }
115
+ interface WithStatement extends BaseStatement {
116
+ type: "WithStatement";
117
+ object: Expression;
118
+ body: Statement;
119
+ }
120
+ interface SwitchStatement extends BaseStatement {
121
+ type: "SwitchStatement";
122
+ discriminant: Expression;
123
+ cases: SwitchCase[];
124
+ }
125
+ interface ReturnStatement extends BaseStatement {
126
+ type: "ReturnStatement";
127
+ argument?: Expression | null | undefined;
128
+ }
129
+ interface ThrowStatement extends BaseStatement {
130
+ type: "ThrowStatement";
131
+ argument: Expression;
132
+ }
133
+ interface TryStatement extends BaseStatement {
134
+ type: "TryStatement";
135
+ block: BlockStatement;
136
+ handler?: CatchClause | null | undefined;
137
+ finalizer?: BlockStatement | null | undefined;
138
+ }
139
+ interface WhileStatement extends BaseStatement {
140
+ type: "WhileStatement";
141
+ test: Expression;
142
+ body: Statement;
143
+ }
144
+ interface DoWhileStatement extends BaseStatement {
145
+ type: "DoWhileStatement";
146
+ body: Statement;
147
+ test: Expression;
148
+ }
149
+ interface ForStatement extends BaseStatement {
150
+ type: "ForStatement";
151
+ init?: VariableDeclaration | Expression | null | undefined;
152
+ test?: Expression | null | undefined;
153
+ update?: Expression | null | undefined;
154
+ body: Statement;
155
+ }
156
+ interface BaseForXStatement extends BaseStatement {
157
+ left: VariableDeclaration | Pattern;
158
+ right: Expression;
159
+ body: Statement;
160
+ }
161
+ interface ForInStatement extends BaseForXStatement {
162
+ type: "ForInStatement";
163
+ }
164
+ interface DebuggerStatement extends BaseStatement {
165
+ type: "DebuggerStatement";
166
+ }
167
+ type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
168
+ interface BaseDeclaration extends BaseStatement {}
169
+ interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
170
+ type: "FunctionDeclaration";
171
+ /** It is null when a function declaration is a part of the `export default function` statement */
172
+ id: Identifier | null;
173
+ body: BlockStatement;
174
+ }
175
+ interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
176
+ id: Identifier;
177
+ }
178
+ interface VariableDeclaration extends BaseDeclaration {
179
+ type: "VariableDeclaration";
180
+ declarations: VariableDeclarator[];
181
+ kind: "var" | "let" | "const" | "using" | "await using";
182
+ }
183
+ interface VariableDeclarator extends BaseNode {
184
+ type: "VariableDeclarator";
185
+ id: Pattern;
186
+ init?: Expression | null | undefined;
187
+ }
188
+ interface ExpressionMap {
189
+ ArrayExpression: ArrayExpression;
190
+ ArrowFunctionExpression: ArrowFunctionExpression;
191
+ AssignmentExpression: AssignmentExpression;
192
+ AwaitExpression: AwaitExpression;
193
+ BinaryExpression: BinaryExpression;
194
+ CallExpression: CallExpression;
195
+ ChainExpression: ChainExpression;
196
+ ClassExpression: ClassExpression;
197
+ ConditionalExpression: ConditionalExpression;
198
+ FunctionExpression: FunctionExpression;
199
+ Identifier: Identifier;
200
+ ImportExpression: ImportExpression;
201
+ Literal: Literal;
202
+ LogicalExpression: LogicalExpression;
203
+ MemberExpression: MemberExpression;
204
+ MetaProperty: MetaProperty;
205
+ NewExpression: NewExpression;
206
+ ObjectExpression: ObjectExpression;
207
+ SequenceExpression: SequenceExpression;
208
+ TaggedTemplateExpression: TaggedTemplateExpression;
209
+ TemplateLiteral: TemplateLiteral;
210
+ ThisExpression: ThisExpression;
211
+ UnaryExpression: UnaryExpression;
212
+ UpdateExpression: UpdateExpression;
213
+ YieldExpression: YieldExpression;
214
+ }
215
+ type Expression = ExpressionMap[keyof ExpressionMap];
216
+ interface BaseExpression extends BaseNode {}
217
+ type ChainElement = SimpleCallExpression | MemberExpression;
218
+ interface ChainExpression extends BaseExpression {
219
+ type: "ChainExpression";
220
+ expression: ChainElement;
221
+ }
222
+ interface ThisExpression extends BaseExpression {
223
+ type: "ThisExpression";
224
+ }
225
+ interface ArrayExpression extends BaseExpression {
226
+ type: "ArrayExpression";
227
+ elements: Array<Expression | SpreadElement | null>;
228
+ }
229
+ interface ObjectExpression extends BaseExpression {
230
+ type: "ObjectExpression";
231
+ properties: Array<Property | SpreadElement>;
232
+ }
233
+ interface PrivateIdentifier extends BaseNode {
234
+ type: "PrivateIdentifier";
235
+ name: string;
236
+ }
237
+ interface Property extends BaseNode {
238
+ type: "Property";
239
+ key: Expression;
240
+ value: Expression | Pattern; // Could be an AssignmentProperty
241
+ kind: "init" | "get" | "set";
242
+ method: boolean;
243
+ shorthand: boolean;
244
+ computed: boolean;
245
+ }
246
+ interface PropertyDefinition extends BaseNode {
247
+ type: "PropertyDefinition";
248
+ key: Expression | PrivateIdentifier;
249
+ value?: Expression | null | undefined;
250
+ computed: boolean;
251
+ static: boolean;
252
+ }
253
+ interface FunctionExpression extends BaseFunction, BaseExpression {
254
+ id?: Identifier | null | undefined;
255
+ type: "FunctionExpression";
256
+ body: BlockStatement;
257
+ }
258
+ interface SequenceExpression extends BaseExpression {
259
+ type: "SequenceExpression";
260
+ expressions: Expression[];
261
+ }
262
+ interface UnaryExpression extends BaseExpression {
263
+ type: "UnaryExpression";
264
+ operator: UnaryOperator;
265
+ prefix: true;
266
+ argument: Expression;
267
+ }
268
+ interface BinaryExpression extends BaseExpression {
269
+ type: "BinaryExpression";
270
+ operator: BinaryOperator;
271
+ left: Expression | PrivateIdentifier;
272
+ right: Expression;
273
+ }
274
+ interface AssignmentExpression extends BaseExpression {
275
+ type: "AssignmentExpression";
276
+ operator: AssignmentOperator;
277
+ left: Pattern | MemberExpression;
278
+ right: Expression;
279
+ }
280
+ interface UpdateExpression extends BaseExpression {
281
+ type: "UpdateExpression";
282
+ operator: UpdateOperator;
283
+ argument: Expression;
284
+ prefix: boolean;
285
+ }
286
+ interface LogicalExpression extends BaseExpression {
287
+ type: "LogicalExpression";
288
+ operator: LogicalOperator;
289
+ left: Expression;
290
+ right: Expression;
291
+ }
292
+ interface ConditionalExpression extends BaseExpression {
293
+ type: "ConditionalExpression";
294
+ test: Expression;
295
+ alternate: Expression;
296
+ consequent: Expression;
297
+ }
298
+ interface BaseCallExpression extends BaseExpression {
299
+ callee: Expression | Super;
300
+ arguments: Array<Expression | SpreadElement>;
301
+ }
302
+ type CallExpression = SimpleCallExpression | NewExpression;
303
+ interface SimpleCallExpression extends BaseCallExpression {
304
+ type: "CallExpression";
305
+ optional: boolean;
306
+ }
307
+ interface NewExpression extends BaseCallExpression {
308
+ type: "NewExpression";
309
+ }
310
+ interface MemberExpression extends BaseExpression, BasePattern {
311
+ type: "MemberExpression";
312
+ object: Expression | Super;
313
+ property: Expression | PrivateIdentifier;
314
+ computed: boolean;
315
+ optional: boolean;
316
+ }
317
+ type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
318
+ interface BasePattern extends BaseNode {}
319
+ interface SwitchCase extends BaseNode {
320
+ type: "SwitchCase";
321
+ test?: Expression | null | undefined;
322
+ consequent: Statement[];
323
+ }
324
+ interface CatchClause extends BaseNode {
325
+ type: "CatchClause";
326
+ param: Pattern | null;
327
+ body: BlockStatement;
328
+ }
329
+ interface Identifier extends BaseNode, BaseExpression, BasePattern {
330
+ type: "Identifier";
331
+ name: string;
332
+ }
333
+ type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
334
+ interface SimpleLiteral extends BaseNode, BaseExpression {
335
+ type: "Literal";
336
+ value: string | boolean | number | null;
337
+ raw?: string | undefined;
338
+ }
339
+ interface RegExpLiteral extends BaseNode, BaseExpression {
340
+ type: "Literal";
341
+ value?: RegExp | null | undefined;
342
+ regex: {
343
+ pattern: string;
344
+ flags: string;
345
+ };
346
+ raw?: string | undefined;
347
+ }
348
+ interface BigIntLiteral extends BaseNode, BaseExpression {
349
+ type: "Literal";
350
+ value?: bigint | null | undefined;
351
+ bigint: string;
352
+ raw?: string | undefined;
353
+ }
354
+ type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
355
+ type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof";
356
+ type LogicalOperator = "||" | "&&" | "??";
357
+ type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
358
+ type UpdateOperator = "++" | "--";
359
+ interface ForOfStatement extends BaseForXStatement {
360
+ type: "ForOfStatement";
361
+ await: boolean;
362
+ }
363
+ interface Super extends BaseNode {
364
+ type: "Super";
365
+ }
366
+ interface SpreadElement extends BaseNode {
367
+ type: "SpreadElement";
368
+ argument: Expression;
369
+ }
370
+ interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
371
+ type: "ArrowFunctionExpression";
372
+ expression: boolean;
373
+ body: BlockStatement | Expression;
374
+ }
375
+ interface YieldExpression extends BaseExpression {
376
+ type: "YieldExpression";
377
+ argument?: Expression | null | undefined;
378
+ delegate: boolean;
379
+ }
380
+ interface TemplateLiteral extends BaseExpression {
381
+ type: "TemplateLiteral";
382
+ quasis: TemplateElement[];
383
+ expressions: Expression[];
384
+ }
385
+ interface TaggedTemplateExpression extends BaseExpression {
386
+ type: "TaggedTemplateExpression";
387
+ tag: Expression;
388
+ quasi: TemplateLiteral;
389
+ }
390
+ interface TemplateElement extends BaseNode {
391
+ type: "TemplateElement";
392
+ tail: boolean;
393
+ value: {
394
+ /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
395
+ cooked?: string | null | undefined;
396
+ raw: string;
397
+ };
398
+ }
399
+ interface AssignmentProperty extends Property {
400
+ value: Pattern;
401
+ kind: "init";
402
+ method: boolean; // false
403
+ }
404
+ interface ObjectPattern extends BasePattern {
405
+ type: "ObjectPattern";
406
+ properties: Array<AssignmentProperty | RestElement>;
407
+ }
408
+ interface ArrayPattern extends BasePattern {
409
+ type: "ArrayPattern";
410
+ elements: Array<Pattern | null>;
411
+ }
412
+ interface RestElement extends BasePattern {
413
+ type: "RestElement";
414
+ argument: Pattern;
415
+ }
416
+ interface AssignmentPattern extends BasePattern {
417
+ type: "AssignmentPattern";
418
+ left: Pattern;
419
+ right: Expression;
420
+ }
421
+ interface BaseClass extends BaseNode {
422
+ superClass?: Expression | null | undefined;
423
+ body: ClassBody;
424
+ }
425
+ interface ClassBody extends BaseNode {
426
+ type: "ClassBody";
427
+ body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
428
+ }
429
+ interface MethodDefinition extends BaseNode {
430
+ type: "MethodDefinition";
431
+ key: Expression | PrivateIdentifier;
432
+ value: FunctionExpression;
433
+ kind: "constructor" | "method" | "get" | "set";
434
+ computed: boolean;
435
+ static: boolean;
436
+ }
437
+ interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
438
+ type: "ClassDeclaration";
439
+ /** It is null when a class declaration is a part of the `export default class` statement */
440
+ id: Identifier | null;
441
+ }
442
+ interface ClassDeclaration extends MaybeNamedClassDeclaration {
443
+ id: Identifier;
444
+ }
445
+ interface ClassExpression extends BaseClass, BaseExpression {
446
+ type: "ClassExpression";
447
+ id?: Identifier | null | undefined;
448
+ }
449
+ interface MetaProperty extends BaseExpression {
450
+ type: "MetaProperty";
451
+ meta: Identifier;
452
+ property: Identifier;
453
+ }
454
+ interface ImportExpression extends BaseExpression {
455
+ type: "ImportExpression";
456
+ source: Expression;
457
+ options?: Expression | null | undefined;
458
+ }
459
+ interface AwaitExpression extends BaseExpression {
460
+ type: "AwaitExpression";
461
+ argument: Expression;
462
+ }
463
+ //#endregion
15
464
  //#region src/module-ast.d.ts
465
+ type Node$1 = any;
466
+ interface TSSatisfiesExpression {
467
+ type: 'TSSatisfiesExpression';
468
+ start: number;
469
+ end: number;
470
+ expression: TsExpression;
471
+ }
472
+ interface TSAsExpression {
473
+ type: 'TSAsExpression';
474
+ start: number;
475
+ end: number;
476
+ expression: TsExpression;
477
+ }
478
+ interface TSNonNullExpression {
479
+ type: 'TSNonNullExpression';
480
+ start: number;
481
+ end: number;
482
+ expression: TsExpression;
483
+ }
484
+ /** An estree `Expression`, optionally wrapped in one or more of the three TS wrappers above. */
485
+ type TsExpression = Expression | TSSatisfiesExpression | TSAsExpression | TSNonNullExpression;
486
+ /** Unwrap TS wrapper expressions (`x satisfies T`, `x as T`, `x!`) to the underlying expression. Shared with the Kit-module and Vite-config parsers. */
487
+ export declare function unwrapTs(expr: TsExpression): Expression;
488
+ export declare function unwrapTs(expr: TsExpression | undefined): Expression | undefined;
489
+ /** Generic ESTree walk over a `<script>` program: visit every node with a `.type`. */
490
+ export declare function walkEstree(node: Node$1, visit: (n: Node$1) => void): void;
16
491
  /**
17
492
  * Inline `svelte-vitals-disable-next-line` directives (issue #92). A plain text scan, not an
18
493
  * AST walk, so `<script>` (`//`) and template (`<!-- -->`) comments are covered uniformly. The
@@ -20,6 +495,20 @@ export declare function parseComponentFacts(source: string, filename: string): P
20
495
  * Shared with the Kit-module parser (the security kit-module rules).
21
496
  */
22
497
  export declare function collectSuppressions(source: string): SuppressionDirective[];
498
+ /**
499
+ * Parse a plain TS/JS module source by wrapping it in a `<script lang="ts">` tag —
500
+ * the Svelte script parser handles TS natively, so no extra parser dependency is
501
+ * needed. Literal "</script" occurrences are neutralised with a same-length
502
+ * placeholder first (string contents don't affect fact extraction; offsets are
503
+ * preserved). Returns the ESTree Program and the wrapped source — wrapped line
504
+ * numbers are +1 relative to the input, so callers subtract 1. Shared by the
505
+ * runes-module facts (correctness/orphan-effect) and the Kit-module facts (the security kit-module rules).
506
+ */
507
+ type ParsedModule = {
508
+ program: Node$1 | undefined;
509
+ wrapped: string;
510
+ };
511
+ export declare function parseModuleProgram(source: string, filename: string): ParsedModule;
23
512
  //#endregion
24
513
  //#region src/inline-directives.d.ts
25
514
  /** File-relative-path → the inline directives collected from that file. */
@@ -61,6 +550,9 @@ export declare function unknownDirectiveIds(index: DirectiveIndex, rules: readon
61
550
  export declare function collectSourceFiles(rt: Runtime, cwd: string): Promise<string[]>;
62
551
  //#endregion
63
552
  //#region src/kit-module-parse.d.ts
553
+ type Node = any;
554
+ /** `parseFalseExports` over a parsed module. */
555
+ export declare function collectFalseExports(program: Node): Set<string>;
64
556
  /**
65
557
  * Resolve an import specifier to a path relative to the analyzed project's root (the
66
558
  * cwd svelte-vitals runs from — not necessarily a repo root; in a monorepo the project
@@ -68,8 +560,12 @@ export declare function collectSourceFiles(rt: Runtime, cwd: string): Promise<st
68
560
  * be a project-local module: the caller's `aliases` list decides which non-relative
69
561
  * specifiers resolve, defaulting to `$lib` → `src/lib`; `./`/`../` resolve against the
70
562
  * importing file's directory; bare packages and other aliases are skipped (they can't
71
- * be resolved to a project-local path at all). Also undefined when a relative
72
- * specifier's `..` segments escape the project root (see `normalizePosix`), or when a
563
+ * be resolved to a project-local path at all). A path above the project root (a leading `../`
564
+ * run) resolves only inside a directory a `kit.alias` value itself names above the root
565
+ * (`$plugins: '../../plugins'` in a monorepo app): the user's config says the app builds from
566
+ * there, so it is read like `src/` — likewise inside a workspace package's directory an entry
567
+ * names as its `root` — and anywhere else above the root is undefined, as nothing says the app
568
+ * reaches it. Also undefined when a
73
569
  * matched alias's value is itself absolute (e.g. `/opt/shared/src`, or a posixified Windows
74
570
  * drive-letter path like `C:/shared/src`): an absolute target is outside the analyzed project by
75
571
  * definition, and without this check `normalizePosix` would quietly drop the leading empty
@@ -78,7 +574,7 @@ export declare function collectSourceFiles(rt: Runtime, cwd: string): Promise<st
78
574
  * Exported from the package's public barrel because `architecture/private-scope-import`
79
575
  * and `architecture/route-component-import` (inside `packages/core`) both need resolution
80
576
  * that is not restricted to runes modules, unlike `resolveRunesModuleSpecifier` — and
81
- * because `resolveComponentPath` (`packages/cli/src/providers/source/resolve.ts`), which
577
+ * because component resolution (`packages/cli/src/providers/source/resolve.ts`), which
82
578
  * drives transitive `<head>`/heading resolution, delegates its alias/`$lib`/relative
83
579
  * mapping here too, rather than duplicating it. This is the single site for every
84
580
  * repo-local specifier resolution in the repo.
@@ -122,6 +618,16 @@ export declare function resolveKitAliases(viteConfig: {
122
618
  } | undefined, svelteConfig: {
123
619
  source: string;
124
620
  } | undefined): KitAlias[] | undefined;
621
+ /**
622
+ * `aliases` followed by the project's package.json `imports` entries (`"#lib/*": "./src/lib/*"`),
623
+ * after Kit's own: Vite's alias plugin resolves before Node-style subpath imports. The entries are
624
+ * ordered by Node's precedence — exact keys, then patterns by longest prefix — because the alias
625
+ * resolver takes the first match. Only a project-relative target counts; anything else is skipped,
626
+ * which leaves the specifier unresolved as before.
627
+ */
628
+ export declare function withPackageImports(aliases: KitAlias[] | undefined, packageJsonSource: string | undefined): KitAlias[] | undefined;
629
+ /** Whether `kit.router.type` is the literal `'hash'` in a config whose value is known. */
630
+ export declare function findKitHashRouterInSvelteConfig(source: string): boolean;
125
631
  /**
126
632
  * The project's effective `kit.paths.base`, following SvelteKit's precedence: the `sveltekit()`
127
633
  * plugin config when it carries one, otherwise `svelte.config`. `file` is the config the base
@@ -138,6 +644,44 @@ export declare function resolveKitPathsBase(viteConfig: {
138
644
  file: string;
139
645
  } | undefined;
140
646
  //#endregion
647
+ //#region src/workspace-packages.d.ts
648
+ /** A package the app declares, from its repository or its `node_modules`: `dir` is relative to the app. */
649
+ interface WorkspacePackage {
650
+ name: string;
651
+ dir: string;
652
+ /** The package's `package.json` source. */
653
+ manifest: string;
654
+ }
655
+ /**
656
+ * The app's dependencies that link a package of the same repository, name → range: a `workspace:`
657
+ * version range, or a `link:`/`file:` path. A `workspace:` range that renames (`workspace:other@*`)
658
+ * or names a path is left out, since the specifier would not be the package's own name.
659
+ */
660
+ export declare function declaredLocalPackages(packageJsonSource: string | undefined): Map<string, string>;
661
+ /** The `packages:` globs of a `pnpm-workspace.yaml`, in block (`- 'apps/*'`) or flow (`[a, b]`) form. */
662
+ export declare function pnpmWorkspaceGlobs(yaml: string): string[];
663
+ /** A root `package.json`'s `workspaces` globs (an array, or `{ packages }`); undefined when it declares none. */
664
+ export declare function packageJsonWorkspaceGlobs(source: string | undefined): string[] | undefined;
665
+ /**
666
+ * `aliases` widened with the app's workspace packages, the way the bundler sees them: an alias
667
+ * whose value points into `node_modules/<package>` names the package's own directory (the link a
668
+ * workspace install creates, readable whether or not it was installed), and every package's
669
+ * `exports` follows the aliases, as Vite resolves a bare specifier only after its alias plugin.
670
+ */
671
+ export declare function withWorkspacePackages(aliases: KitAlias[] | undefined, packages: readonly WorkspacePackage[]): KitAlias[] | undefined;
672
+ /**
673
+ * The app's dependencies that an install puts in `node_modules`: every declared name whose range is
674
+ * not a local protocol (`workspace:`, `link:`, `file:`, `portal:`). Those are the workspace
675
+ * resolver's, whose bounds must not be sidestepped through their `node_modules` link.
676
+ */
677
+ export declare function declaredInstalledPackages(packageJsonSource: string | undefined): string[];
678
+ /**
679
+ * `aliases` widened with the Svelte packages installed in `node_modules` (`dir` is the textual
680
+ * `node_modules/<name>` path, relative to the app), compiled like workspace packages. Packages that
681
+ * publish no Svelte marker get no entries: nothing they export is a component.
682
+ */
683
+ export declare function withInstalledPackages(aliases: KitAlias[] | undefined, packages: readonly WorkspacePackage[]): KitAlias[] | undefined;
684
+ //#endregion
141
685
  //#region src/svelte-ast.d.ts
142
686
  /**
143
687
  * Parse a `.svelte` source, tolerating style blocks written in a CSS dialect.
@@ -151,7 +695,7 @@ export declare function resolveKitPathsBase(viteConfig: {
151
695
  * the text scan's imprecision cannot reach it. A file that does not parse is already a hard failure,
152
696
  * which the retry can only improve on.
153
697
  */
154
- export declare function parseSvelte(source: string, filename: string): AST.Root;
698
+ export declare function parseSvelte(raw: string, filename: string): AST.Root;
155
699
  /** A template fragment's child node relevant to value classification: literal text or a `{expr}`. */
156
700
  type TextOrExpr = AST.Text | AST.ExpressionTag;
157
701
  /**
@@ -193,6 +737,13 @@ export declare function attrTextOf(attr: AST.Attribute): string | undefined;
193
737
  export declare const ROBOTS_SOURCE_PATHS: readonly ["static/robots.txt", "src/routes/robots.txt/+server.ts", "src/routes/robots.txt/+server.js"];
194
738
  /** Locations that satisfy the sitemap.xml project rule (seo/sitemap-xml). */
195
739
  export declare const SITEMAP_SOURCE_PATHS: readonly ["static/sitemap.xml", "src/routes/sitemap.xml/+server.ts", "src/routes/sitemap.xml/+server.js"];
740
+ /** The `+server` endpoints above, wherever (group) directories nest them — filter with `servesRootFile`. */
741
+ export declare const ROOT_FILE_ENDPOINT_GLOB = "src/routes/**/{robots.txt,sitemap*.xml}/+server.{ts,js}";
742
+ /**
743
+ * Whether a `+server` endpoint serves `/<file>`: (group) directories add no URL segment, and an optional
744
+ * parameter in the name (`sitemap[[page]].xml`) still answers the bare name.
745
+ */
746
+ export declare function servesRootFile(rel: string, file: 'robots.txt' | 'sitemap.xml'): boolean;
196
747
  /** Vite's own config resolution order — only the first existing file is the one Vite loads. */
197
748
  export declare const VITE_CONFIG_FILES: readonly ["vite.config.js", "vite.config.mjs", "vite.config.ts", "vite.config.cjs", "vite.config.mts", "vite.config.cts"];
198
749
  /** SvelteKit's config resolution order (`@sveltejs/kit` checks js before ts). */
@@ -375,19 +926,6 @@ export declare const seoImageAlt: Rule;
375
926
  export declare const seoHreflang: Rule;
376
927
  //#endregion
377
928
  //#region src/rules/seo/single-h1.d.ts
378
- /**
379
- * seo/single-h1 — Heading hierarchy (single H1). Reads the per-route page-body headings
380
- * channel (collected by both providers), counting `headings` plus `componentHeadings`
381
- * (static mode only — headings found transitively in rendered child components) as one
382
- * combined list. Zero <h1> (no primary heading) is a `warning`: defensible, a page needs
383
- * a primary heading. Two or more is only `info`: a single <h1> is the conventional
384
- * signal, but no official source documents a ranking penalty for several (2026-08-09 v1
385
- * rule-validity review, P2 #11) — so it's flagged as a style nit, not a defect. Exactly
386
- * one passes. A route whose headings were not collected (channel unset) emits nothing, as does
387
- * one whose `dynamicHeading` flag says an undeterminable `<svelte:element>` may be its <h1>. A
388
- * global `rules: { 'seo/single-h1': <severity> }` override flattens both arms to one
389
- * severity (design, `applyRuleSeverities`).
390
- */
391
929
  export declare const seoSingleH1: Rule;
392
930
  //#endregion
393
931
  //#region src/rules/seo/duplicate-title.d.ts
@@ -638,8 +1176,8 @@ export declare const performanceMinifyDisabled: Rule;
638
1176
  /**
639
1177
  * performance/load-waterfall — dependent await chains in universal loads. Server loads are exempt:
640
1178
  * a dependent chain cannot be parallelized, and on the server there is no better
641
- * placement to suggest. csr = false files are exempt too — without a client
642
- * runtime the universal load only runs during SSR.
1179
+ * placement to suggest. Loads on a route with `csr = false` (its own or a layout's) are exempt
1180
+ * too — without a client runtime the universal load only runs during SSR.
643
1181
  */
644
1182
  export declare const performanceLoadWaterfall: Rule;
645
1183
  //#endregion
@@ -975,4 +1513,4 @@ export declare function formatHtmlReport(results: Result[], config: Config, meta
975
1513
  coreVersion?: string;
976
1514
  }): string;
977
1515
  //#endregion
978
- export { type A11yOccurrenceInfo, type A11ySkipCause, ANCESTRY_DEPENDENT_TAGS, ASIDE_DEMOTING_TAGS, type AppSnapshot, type BranchStep, type Classification, type CompiledOverride, type ComponentFacts, type ConsoleReportOptions, type DirectiveIndex, type EachBlockFact, type EffectFact, type FailedRule, type HeadTag, type HeadingInfo, type HealthResult, IDREF_ATTRS, type ImageInfo, type KitAlias, type KitModuleFacts, type LandmarkInput, NAMING_ATTRS, type OrphanEffectFact, type Palette, type Project, type ResolvedA11y, type ResolvedHead, type ResolvedHeadings, type ResolvedImages, type RouteBadge, type Rule, type RuleContext, type RuleOptionSpec, type RuleOptionsSpec, type Runtime, SEARCH_RESULT_RULES, SECTIONING_TAGS, type Scope, type ScoreOptions, type ScoreResult, type SourceSpan, type SuppressionDirective, buildJsonReport, classify, collectComponentFacts, compileOverrides, computeHealth, computeScore, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, foldOccurrences, formatFailedRuleWarning, formatGithubReport, formatJsonReport, formatMarkdownReport, hasFailureAtOrAbove, isClassicScriptType, isPenalized, isPlainObject, isTopFragment, resolveLandmark, resolveRuleOptions, selectRules, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, validateRuleSetting, withFailedRulesOff, withIndexableOff, withReadLimit };
1516
+ export { type A11yOccurrenceInfo, type A11ySkipCause, ANCESTRY_DEPENDENT_TAGS, ASIDE_DEMOTING_TAGS, type AppSnapshot, type BranchStep, type Classification, type CompiledOverride, type ComponentFacts, type ConsoleReportOptions, type DirectiveIndex, type EachBlockFact, type EffectFact, type FailedRule, type HeadTag, type HeadingInfo, type HealthResult, IDREF_ATTRS, type ImageInfo, type KitAlias, type KitModuleFacts, type LandmarkInput, NAMING_ATTRS, type OrphanEffectFact, type Palette, type Project, type ResolvedA11y, type ResolvedHead, type ResolvedHeadings, type ResolvedImages, type RouteBadge, type Rule, type RuleContext, type RuleOptionSpec, type RuleOptionsSpec, type Runtime, SEARCH_RESULT_RULES, SECTIONING_TAGS, type Scope, type ScoreOptions, type ScoreResult, type SourceSpan, type SuppressionDirective, type WorkspacePackage, buildJsonReport, classify, collectComponentFacts, compileOverrides, computeHealth, computeScore, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, foldOccurrences, formatFailedRuleWarning, formatGithubReport, formatJsonReport, formatJsonReportChunks, formatMarkdownReport, hasFailureAtOrAbove, hasRel, isClassicScriptType, isPenalized, isPlainObject, isSvgSrc, isTopFragment, layoutNeverRenders, pageRendersOnlyWhenBuilding, resolveLandmark, resolveRuleOptions, routeNeverSsr, selectRules, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, validateRuleSetting, withFailedRulesOff, withIndexableOff, withReadLimit };