@svelte-vitals/core 0.55.2 → 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.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as formatGithubReport, Q as formatMarkdownReport, St as Value, Tt as defineConfig, _t as RuleSetting, at as summarize, bt as Severity, ct as Config, ft as Presence, gt as RuleOverride, ht as RuleOptions, it as hasFailureAtOrAbove, lt as Detection, mt as Result, n as RuleEvidence, o as ScoreModel, ot as CATEGORIES, st as Category, t as JsonReport, tt as Summary, ut as Fix, vt as RuleSettingObject, xt as TreatDynamicAs } from "./json-BQf9Qb2D.js";
1
+ import { Ct as Severity, Ot as defineConfig, Tt as Value, _t as Result, bt as RuleSetting, ct as summarize, dt as Config, ft as Detection, ht as Presence, it as Summary, lt as CATEGORIES, n as RuleEvidence, nt as formatGithubReport, pt as Fix, s as ScoreModel, st as hasFailureAtOrAbove, t as JsonReport, tt as formatMarkdownReport, ut as Category, vt as RuleOptions, wt as TreatDynamicAs, xt as RuleSettingObject, yt as RuleOverride } from "./json-DmLgFEwV.js";
2
2
  export { CATEGORIES, type Category, type Config, type Detection, type Fix, type JsonReport, type Presence, type Result, type RuleEvidence, type RuleOptions, type RuleOverride, type RuleSetting, type RuleSettingObject, type ScoreModel, type Severity, type Summary, type TreatDynamicAs, type Value, defineConfig, formatGithubReport, formatMarkdownReport, hasFailureAtOrAbove, summarize };
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
- import { Or as CATEGORIES, Tr as summarize, c as formatGithubReport, jr as defineConfig, t as formatMarkdownReport, wr as hasFailureAtOrAbove } from "./markdown-DgHBAvYl.js";
2
- export { CATEGORIES, defineConfig, formatGithubReport, formatMarkdownReport, hasFailureAtOrAbove, summarize };
1
+ export { Lr as CATEGORIES, Br as defineConfig, l as formatGithubReport, t as formatMarkdownReport, Nr as hasFailureAtOrAbove, Pr as summarize } from "./markdown-CsQNXeWj.js";
@@ -1,12 +1,16 @@
1
- import { $ as formatGithubReport, A as routeNeverSsr, At as EachBlockFact, B as NAMING_ATTRS, C as compileOverrides, Ct as defaultConfig, D as withFailedRulesOff, Dt as ResolvedHead, E as settingSeverity, Et as HeadTag, F as ANCESTRY_DEPENDENT_TAGS, Ft as collectComponentFacts, G as isTopFragment, H as SECTIONING_TAGS, I as ASIDE_DEMOTING_TAGS, It as emptyComponentFacts, J as stripTextDirective, K as resolveLandmark, L as BranchStep, Lt as skippedFileWarnings, M as ResolvedHeadings, Mt as OrphanEffectFact, N as A11yOccurrenceInfo, Nt as SourceSpan, O as withIndexableOff, Ot as isClassicScriptType, P as A11ySkipCause, Pt as SuppressionDirective, Q as formatMarkdownReport, R as IDREF_ATTRS, Rt as Runtime, S as SEARCH_RESULT_RULES, St as Value, T as selectRules, U as decodeFragmentId, V as ResolvedA11y, W as foldOccurrences, X as ResolvedImages, Y as ImageInfo, Z as isSvgSrc, _ as isPlainObject, a as HealthResult, at as summarize, b as validateRuleSetting, bt as Severity, c as ScoreResult, ct as Config, d as Rule, dt as KitAlias, et as Classification, f as RuleContext, g as RuleOptionsSpec, h as RuleOptionSpec, i as formatJsonReport, it as hasFailureAtOrAbove, j as HeadingInfo, jt as EffectFact, k as KitModuleFacts, kt as ComponentFacts, l as computeHealth, m as isPenalized, mt as Result, nt as classify, p as docsUrlFor, pt as Project, q as splitTokens, r as buildJsonReport, rt as effectiveSeverity, s as ScoreOptions, st as Category, t as JsonReport, u as computeScore, ut as Fix, v as resolveRuleOptions, w as formatFailedRuleWarning, wt as defaultProject, x as CompiledOverride, y as shouldSkipRangeCheck, yt as Scope, z as LandmarkInput, zt as withReadLimit } from "./json-BQf9Qb2D.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$1 = any;
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>;
5
9
  /**
6
10
  * Export names of a module's constant lists — `export const X = [ … ]`, or a local one exported by
7
11
  * name — that the module itself never writes (correctness/each-key, correctness/each-index-key).
8
12
  */
9
- export declare function collectConstantListExports(program: Node$1): Set<string>;
13
+ export declare function collectConstantListExports(program: Node$2): Set<string>;
10
14
  /** What the per-file parsers produce — `ComponentFacts` minus `file`, with `suppressions` always present. */
11
15
  type ParsedFacts = Omit<ComponentFacts, 'file' | 'suppressions'> & {
12
16
  suppressions: SuppressionDirective[];
@@ -18,8 +22,472 @@ type ParsedFacts = Omit<ComponentFacts, 'file' | 'suppressions'> & {
18
22
  */
19
23
  export declare function parseComponentFacts(source: string, filename: string): ParsedFacts;
20
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
21
464
  //#region src/module-ast.d.ts
22
- type Node = any;
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;
23
491
  /**
24
492
  * Inline `svelte-vitals-disable-next-line` directives (issue #92). A plain text scan, not an
25
493
  * AST walk, so `<script>` (`//`) and template (`<!-- -->`) comments are covered uniformly. The
@@ -37,7 +505,7 @@ export declare function collectSuppressions(source: string): SuppressionDirectiv
37
505
  * runes-module facts (correctness/orphan-effect) and the Kit-module facts (the security kit-module rules).
38
506
  */
39
507
  type ParsedModule = {
40
- program: Node | undefined;
508
+ program: Node$1 | undefined;
41
509
  wrapped: string;
42
510
  };
43
511
  export declare function parseModuleProgram(source: string, filename: string): ParsedModule;
@@ -82,6 +550,9 @@ export declare function unknownDirectiveIds(index: DirectiveIndex, rules: readon
82
550
  export declare function collectSourceFiles(rt: Runtime, cwd: string): Promise<string[]>;
83
551
  //#endregion
84
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>;
85
556
  /**
86
557
  * Resolve an import specifier to a path relative to the analyzed project's root (the
87
558
  * cwd svelte-vitals runs from — not necessarily a repo root; in a monorepo the project
@@ -155,6 +626,8 @@ export declare function resolveKitAliases(viteConfig: {
155
626
  * which leaves the specifier unresolved as before.
156
627
  */
157
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;
158
631
  /**
159
632
  * The project's effective `kit.paths.base`, following SvelteKit's precedence: the `sveltekit()`
160
633
  * plugin config when it carries one, otherwise `svelte.config`. `file` is the config the base
@@ -222,7 +695,7 @@ export declare function withInstalledPackages(aliases: KitAlias[] | undefined, p
222
695
  * the text scan's imprecision cannot reach it. A file that does not parse is already a hard failure,
223
696
  * which the retry can only improve on.
224
697
  */
225
- export declare function parseSvelte(source: string, filename: string): AST.Root;
698
+ export declare function parseSvelte(raw: string, filename: string): AST.Root;
226
699
  /** A template fragment's child node relevant to value classification: literal text or a `{expr}`. */
227
700
  type TextOrExpr = AST.Text | AST.ExpressionTag;
228
701
  /**
@@ -265,8 +738,11 @@ export declare const ROBOTS_SOURCE_PATHS: readonly ["static/robots.txt", "src/ro
265
738
  /** Locations that satisfy the sitemap.xml project rule (seo/sitemap-xml). */
266
739
  export declare const SITEMAP_SOURCE_PATHS: readonly ["static/sitemap.xml", "src/routes/sitemap.xml/+server.ts", "src/routes/sitemap.xml/+server.js"];
267
740
  /** The `+server` endpoints above, wherever (group) directories nest them — filter with `servesRootFile`. */
268
- export declare const ROOT_FILE_ENDPOINT_GLOB = "src/routes/**/{robots.txt,sitemap.xml}/+server.{ts,js}";
269
- /** Whether a `+server` endpoint serves `/<file>`: (group) directories add no URL segment. */
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
+ */
270
746
  export declare function servesRootFile(rel: string, file: 'robots.txt' | 'sitemap.xml'): boolean;
271
747
  /** Vite's own config resolution order — only the first existing file is the one Vite loads. */
272
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"];
@@ -700,8 +1176,8 @@ export declare const performanceMinifyDisabled: Rule;
700
1176
  /**
701
1177
  * performance/load-waterfall — dependent await chains in universal loads. Server loads are exempt:
702
1178
  * a dependent chain cannot be parallelized, and on the server there is no better
703
- * placement to suggest. csr = false files are exempt too — without a client
704
- * 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.
705
1181
  */
706
1182
  export declare const performanceLoadWaterfall: Rule;
707
1183
  //#endregion
@@ -1037,4 +1513,4 @@ export declare function formatHtmlReport(results: Result[], config: Config, meta
1037
1513
  coreVersion?: string;
1038
1514
  }): string;
1039
1515
  //#endregion
1040
- 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, formatMarkdownReport, hasFailureAtOrAbove, isClassicScriptType, isPenalized, isPlainObject, isSvgSrc, isTopFragment, resolveLandmark, resolveRuleOptions, routeNeverSsr, 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 };