@microsoft/fast-router 0.4.0 → 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.eslintrc.json +0 -4
  2. package/CHANGELOG.json +195 -1
  3. package/CHANGELOG.md +35 -2
  4. package/README.md +3 -32
  5. package/dist/dts/commands.d.ts +5 -5
  6. package/dist/dts/configuration.d.ts +1 -1
  7. package/dist/dts/contributors.d.ts +24 -6
  8. package/dist/dts/events.d.ts +2 -2
  9. package/dist/dts/fast-router.d.ts +1 -1
  10. package/dist/dts/links.d.ts +2 -2
  11. package/dist/dts/navigation.d.ts +7 -7
  12. package/dist/dts/phases.d.ts +6 -6
  13. package/dist/dts/process.d.ts +2 -2
  14. package/dist/dts/query-string.d.ts +2 -2
  15. package/dist/dts/recognizer.d.ts +6 -6
  16. package/dist/dts/router.d.ts +6 -6
  17. package/dist/dts/routes.d.ts +26 -26
  18. package/dist/dts/titles.d.ts +2 -2
  19. package/dist/dts/view.d.ts +8 -8
  20. package/dist/esm/commands.js +10 -8
  21. package/dist/esm/configuration.js +1 -1
  22. package/dist/esm/contributors.js +9 -9
  23. package/dist/esm/events.js +1 -1
  24. package/dist/esm/fast-router.js +1 -1
  25. package/dist/esm/links.js +1 -1
  26. package/dist/esm/navigation.js +4 -4
  27. package/dist/esm/process.js +1 -1
  28. package/dist/esm/query-string.js +1 -1
  29. package/dist/esm/recognizer.js +16 -16
  30. package/dist/esm/router.js +4 -19
  31. package/dist/esm/routes.js +1 -1
  32. package/dist/esm/titles.js +1 -1
  33. package/dist/esm/view.js +8 -8
  34. package/dist/fast-router.api.json +9818 -4
  35. package/dist/fast-router.d.ts +101 -83
  36. package/dist/fast-router.untrimmed.d.ts +825 -0
  37. package/dist/tsdoc-metadata.json +1 -1
  38. package/docs/api-report.md +90 -86
  39. package/karma.conf.cjs +6 -17
  40. package/package.json +11 -15
  41. package/dist/dts/index-rollup.d.ts +0 -2
  42. package/dist/esm/index-rollup.js +0 -2
  43. package/dist/fast-router.js +0 -6779
  44. package/dist/fast-router.min.js +0 -15
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.8.1"
8
+ "packageVersion": "7.24.2"
9
9
  }
10
10
  ]
11
11
  }
@@ -4,11 +4,14 @@
4
4
 
5
5
  ```ts
6
6
 
7
+ import { AddViewBehaviorFactory } from '@microsoft/fast-element';
8
+ import { Behavior } from '@microsoft/fast-element';
7
9
  import { ComposableStyles } from '@microsoft/fast-element';
8
10
  import { Constructable } from '@microsoft/fast-element';
9
11
  import { ExecutionContext } from '@microsoft/fast-element';
10
12
  import { FASTElement } from '@microsoft/fast-element';
11
13
  import { HTMLDirective } from '@microsoft/fast-element';
14
+ import { ViewBehaviorTargets } from '@microsoft/fast-element';
12
15
  import { ViewTemplate } from '@microsoft/fast-element';
13
16
 
14
17
  // Warning: (ae-internal-missing-underscore) The name "childRouteParameter" should be prefixed with an underscore because the declaration is marked as @internal
@@ -16,13 +19,13 @@ import { ViewTemplate } from '@microsoft/fast-element';
16
19
  // @internal (undocumented)
17
20
  export const childRouteParameter = "fast-child-route";
18
21
 
19
- // @alpha (undocumented)
22
+ // @beta (undocumented)
20
23
  export type CommandFallbackRouteDefinition<TSettings = any> = HasCommand & SupportsSettings<TSettings> & HasTitle;
21
24
 
22
- // @alpha (undocumented)
25
+ // @beta (undocumented)
23
26
  export type CommandRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & HasCommand & HasTitle;
24
27
 
25
- // @alpha (undocumented)
28
+ // @beta (undocumented)
26
29
  export class ConfigurableRoute implements Route {
27
30
  constructor(path: string, name: string, caseSensitive: boolean);
28
31
  // (undocumented)
@@ -33,26 +36,26 @@ export class ConfigurableRoute implements Route {
33
36
  readonly path: string;
34
37
  }
35
38
 
36
- // @alpha (undocumented)
39
+ // @beta (undocumented)
37
40
  export type ContributorOptions = {
38
41
  lifecycle?: boolean;
39
42
  parameters?: boolean;
40
43
  };
41
44
 
42
- // @alpha (undocumented)
45
+ // @beta (undocumented)
43
46
  export type ConverterObject = {
44
47
  convert: RouteParameterConverter;
45
48
  };
46
49
 
47
- // @alpha (undocumented)
50
+ // @beta (undocumented)
48
51
  export class DefaultLinkHandler implements LinkHandler {
49
52
  // (undocumented)
50
53
  connect(): void;
51
54
  // (undocumented)
52
55
  disconnect(): void;
53
- }
56
+ }
54
57
 
55
- // @alpha (undocumented)
58
+ // @beta (undocumented)
56
59
  export class DefaultNavigationProcess<TSettings> {
57
60
  // Warning: (ae-forgotten-export) The symbol "NavigationPhaseImpl" needs to be exported by the entry point index.d.ts
58
61
  //
@@ -62,7 +65,7 @@ export class DefaultNavigationProcess<TSettings> {
62
65
  run(router: Router, message: NavigationMessage): Promise<void>;
63
66
  }
64
67
 
65
- // @alpha (undocumented)
68
+ // @beta (undocumented)
66
69
  export class DefaultNavigationQueue implements NavigationQueue, NavigationHandler {
67
70
  // (undocumented)
68
71
  connect(): void;
@@ -74,9 +77,9 @@ export class DefaultNavigationQueue implements NavigationQueue, NavigationHandle
74
77
  handleEvent(event: PopStateEvent): void;
75
78
  // (undocumented)
76
79
  receive(): Promise<NavigationMessage>;
77
- }
80
+ }
78
81
 
79
- // @alpha (undocumented)
82
+ // @beta (undocumented)
80
83
  export class DefaultRouter implements Router {
81
84
  constructor(host: HTMLElement);
82
85
  // (undocumented)
@@ -105,9 +108,9 @@ export class DefaultRouter implements Router {
105
108
  route: RecognizedRoute | null;
106
109
  // (undocumented)
107
110
  shouldRender(route: RecognizedRoute): boolean;
108
- }
111
+ }
109
112
 
110
- // @alpha (undocumented)
113
+ // @beta (undocumented)
111
114
  export class DefaultRouteRecognizer<TSettings> implements RouteRecognizer<TSettings> {
112
115
  // (undocumented)
113
116
  add(routeOrRoutes: Route | readonly Route[], settings?: TSettings): void;
@@ -115,18 +118,18 @@ export class DefaultRouteRecognizer<TSettings> implements RouteRecognizer<TSetti
115
118
  generateFromPath(path: string, params: object): string | null;
116
119
  // (undocumented)
117
120
  recognize(path: string, converters?: Readonly<Record<string, RouteParameterConverter>>): Promise<RecognizedRoute<TSettings> | null>;
118
- }
121
+ }
119
122
 
120
- // @alpha (undocumented)
123
+ // @beta (undocumented)
121
124
  export type DefinitionCallback = () => Promise<FallbackRouteDefinition> | FallbackRouteDefinition;
122
125
 
123
- // @alpha (undocumented)
126
+ // @beta (undocumented)
124
127
  export type ElementFallbackRouteDefinition<TSettings = any> = LayoutAndTransitionRouteDefinition & HasElement & SupportsSettings<TSettings> & HasTitle;
125
128
 
126
- // @alpha (undocumented)
129
+ // @beta (undocumented)
127
130
  export type ElementRouteDefinition<TSettings = any> = NavigableRouteDefinition<TSettings> & HasElement;
128
131
 
129
- // @alpha (undocumented)
132
+ // @beta (undocumented)
130
133
  export class Endpoint<TSettings = any> {
131
134
  constructor(route: ConfigurableRoute, paramNames: readonly string[], paramTypes: readonly string[], settings: TSettings | null);
132
135
  // (undocumented)
@@ -141,51 +144,51 @@ export class Endpoint<TSettings = any> {
141
144
  readonly settings: TSettings | null;
142
145
  }
143
146
 
144
- // @alpha (undocumented)
147
+ // @beta (undocumented)
145
148
  export type FallbackRouteDefinition<TSettings = any> = ElementFallbackRouteDefinition<TSettings> | TemplateFallbackRouteDefinition<TSettings> | Pick<RedirectRouteDefinition<TSettings>, "redirect"> | CommandFallbackRouteDefinition<TSettings>;
146
149
 
147
- // @alpha (undocumented)
150
+ // @beta (undocumented)
148
151
  export type FASTElementConstructor = new () => FASTElement;
149
152
 
150
- // @alpha (undocumented)
153
+ // @beta (undocumented)
151
154
  export class FASTElementLayout implements Layout {
152
155
  constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | null, runBeforeCommit?: boolean);
153
156
  // (undocumented)
154
157
  afterCommit(routerElement: HTMLElement): Promise<void>;
155
158
  // (undocumented)
156
159
  beforeCommit(routerElement: HTMLElement): Promise<void>;
157
- }
160
+ }
158
161
 
159
162
  // Warning: (ae-forgotten-export) The symbol "FASTRouter_base" needs to be exported by the entry point index.d.ts
160
163
  //
161
- // @alpha (undocumented)
164
+ // @beta (undocumented)
162
165
  export class FASTRouter extends FASTRouter_base {
163
166
  }
164
167
 
165
- // @alpha (undocumented)
168
+ // @beta (undocumented)
166
169
  export type HasCommand = {
167
170
  command: NavigationCommand;
168
171
  };
169
172
 
170
- // @alpha (undocumented)
173
+ // @beta (undocumented)
171
174
  export type HasElement = {
172
175
  element: string | FASTElementConstructor | HTMLElement | (() => Promise<string | FASTElementConstructor | HTMLElement>);
173
176
  };
174
177
 
175
- // @alpha (undocumented)
178
+ // @beta (undocumented)
176
179
  export type HasTemplate = {
177
180
  template: ViewTemplate | (() => Promise<ViewTemplate>);
178
181
  };
179
182
 
180
- // @alpha (undocumented)
183
+ // @beta (undocumented)
181
184
  export type HasTitle = {
182
185
  title?: string;
183
186
  };
184
187
 
185
- // @alpha (undocumented)
188
+ // @beta (undocumented)
186
189
  export type IgnorableRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings>;
187
190
 
188
- // @alpha (undocumented)
191
+ // @beta (undocumented)
189
192
  export class Ignore implements NavigationCommand {
190
193
  // (undocumented)
191
194
  createContributor(): Promise<{
@@ -193,13 +196,13 @@ export class Ignore implements NavigationCommand {
193
196
  }>;
194
197
  }
195
198
 
196
- // @alpha (undocumented)
199
+ // @beta (undocumented)
197
200
  export function isFASTElementHost(host: HTMLElement): host is HTMLElement & FASTElement;
198
201
 
199
- // @alpha (undocumented)
202
+ // @beta (undocumented)
200
203
  export function isNavigationPhaseContributor<T extends NavigationPhaseName>(object: any, phase: T): object is Record<T, NavigationPhaseHook>;
201
204
 
202
- // @alpha (undocumented)
205
+ // @beta (undocumented)
203
206
  export interface Layout {
204
207
  // (undocumented)
205
208
  afterCommit(routerElement: HTMLElement): Promise<void>;
@@ -207,18 +210,18 @@ export interface Layout {
207
210
  beforeCommit(routerElement: HTMLElement): Promise<void>;
208
211
  }
209
212
 
210
- // @alpha (undocumented)
213
+ // @beta (undocumented)
211
214
  export const Layout: Readonly<{
212
215
  default: Readonly<Layout>;
213
216
  }>;
214
217
 
215
- // @alpha (undocumented)
218
+ // @beta (undocumented)
216
219
  export type LayoutAndTransitionRouteDefinition = {
217
220
  layout?: Layout | ViewTemplate;
218
221
  transition?: Transition;
219
222
  };
220
223
 
221
- // @alpha (undocumented)
224
+ // @beta (undocumented)
222
225
  export interface LinkHandler {
223
226
  // (undocumented)
224
227
  connect(): void;
@@ -226,57 +229,59 @@ export interface LinkHandler {
226
229
  disconnect(): void;
227
230
  }
228
231
 
229
- // @alpha (undocumented)
232
+ // @beta (undocumented)
230
233
  export type MappableRouteDefinition<TSettings = any> = RenderableRouteDefinition<TSettings> | RedirectRouteDefinition<TSettings> | CommandRouteDefinition<TSettings> | ParentRouteDefinition<TSettings>;
231
234
 
232
- // @alpha (undocumented)
235
+ // @beta (undocumented)
233
236
  export type NavigableRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & LayoutAndTransitionRouteDefinition & HasTitle & {
234
237
  childRouters?: boolean;
235
238
  };
236
239
 
237
- // @alpha (undocumented)
240
+ // @beta (undocumented)
238
241
  export interface NavigationCommand {
239
242
  // (undocumented)
240
243
  createContributor(router: Router, route: RecognizedRoute): Promise<NavigationContributor>;
241
244
  }
242
245
 
243
- // @alpha (undocumented)
246
+ // @beta (undocumented)
244
247
  export interface NavigationCommitPhase<TSettings = any> extends Omit<NavigationPhase<TSettings>, "cancel" | "canceled" | "onCancel"> {
245
248
  // (undocumented)
246
249
  setTitle(title: string): any;
247
250
  }
248
251
 
249
- // @alpha (undocumented)
252
+ // @beta (undocumented)
250
253
  export type NavigationCommitPhaseHook<TSettings = any> = (phase: NavigationCommitPhase<TSettings>) => Promise<any> | any;
251
254
 
252
- // @alpha (undocumented)
255
+ // @beta (undocumented)
253
256
  export type NavigationContributor<TSettings = any> = Partial<Record<Exclude<NavigationPhaseName, "commit">, NavigationPhaseHook<TSettings>>> & {
254
257
  commit?: NavigationCommitPhaseHook<TSettings>;
255
258
  };
256
259
 
257
- // @alpha (undocumented)
258
- export function navigationContributor(options?: ContributorOptions): HTMLDirective;
260
+ // Warning: (ae-forgotten-export) The symbol "NavigationContributorDirective" needs to be exported by the entry point index.d.ts
261
+ //
262
+ // @beta (undocumented)
263
+ export function navigationContributor(options?: ContributorOptions): NavigationContributorDirective;
259
264
 
260
- // @alpha (undocumented)
265
+ // @beta (undocumented)
261
266
  export interface NavigationHandler {
262
267
  // (undocumented)
263
268
  enqueue(msg: NavigationMessage): void;
264
269
  }
265
270
 
266
- // @alpha (undocumented)
271
+ // @beta (undocumented)
267
272
  export const NavigationHandler: Readonly<{
268
273
  register(handler: NavigationHandler): void;
269
274
  unregister(handler: NavigationHandler): void;
270
275
  }>;
271
276
 
272
- // @alpha (undocumented)
277
+ // @beta (undocumented)
273
278
  export class NavigationMessage {
274
279
  constructor(path: string);
275
280
  // (undocumented)
276
281
  path: string;
277
282
  }
278
283
 
279
- // @alpha (undocumented)
284
+ // @beta (undocumented)
280
285
  export interface NavigationPhase<TSettings = any> {
281
286
  // (undocumented)
282
287
  cancel(callback?: NavigationPhaseFollowupAction): void;
@@ -296,22 +301,22 @@ export interface NavigationPhase<TSettings = any> {
296
301
  readonly router: Router<TSettings>;
297
302
  }
298
303
 
299
- // @alpha (undocumented)
304
+ // @beta (undocumented)
300
305
  export type NavigationPhaseFollowupAction = () => Promise<any> | any;
301
306
 
302
- // @alpha (undocumented)
307
+ // @beta (undocumented)
303
308
  export type NavigationPhaseHook<TSettings = any> = (phase: NavigationPhase<TSettings>) => Promise<any> | any;
304
309
 
305
- // @alpha (undocumented)
310
+ // @beta (undocumented)
306
311
  export type NavigationPhaseName = "navigate" | "leave" | "construct" | "enter" | "commit";
307
312
 
308
- // @alpha (undocumented)
313
+ // @beta (undocumented)
309
314
  export interface NavigationProcess {
310
315
  // (undocumented)
311
316
  run(router: Router, message: NavigationMessage): Promise<void>;
312
317
  }
313
318
 
314
- // @alpha (undocumented)
319
+ // @beta (undocumented)
315
320
  export interface NavigationQueue {
316
321
  // (undocumented)
317
322
  connect(): void;
@@ -321,21 +326,21 @@ export interface NavigationQueue {
321
326
  receive(): Promise<NavigationMessage>;
322
327
  }
323
328
 
324
- // @alpha (undocumented)
329
+ // @beta (undocumented)
325
330
  export type ParameterConverter = RouteParameterConverter | ConverterObject | Constructable<ConverterObject>;
326
331
 
327
- // @alpha (undocumented)
332
+ // @beta (undocumented)
328
333
  export type ParentRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & LayoutAndTransitionRouteDefinition & {
329
334
  children: MappableRouteDefinition<TSettings>[];
330
335
  };
331
336
 
332
- // @alpha (undocumented)
337
+ // @beta (undocumented)
333
338
  export type PathedRouteDefinition<TSettings = any> = SupportsSettings<TSettings> & Route;
334
339
 
335
- // @alpha (undocumented)
340
+ // @beta (undocumented)
336
341
  export const QueryString: Readonly<{
337
342
  readonly current: string;
338
- build(params: Object, traditional?: boolean | undefined): string;
343
+ build(params: Object, traditional?: boolean): string;
339
344
  separate(path: string): Readonly<{
340
345
  path: string;
341
346
  queryString: string;
@@ -343,7 +348,7 @@ export const QueryString: Readonly<{
343
348
  parse(queryString: string): Readonly<Record<string, string>>;
344
349
  }>;
345
350
 
346
- // @alpha (undocumented)
351
+ // @beta (undocumented)
347
352
  export class RecognizedRoute<TSettings = any> {
348
353
  constructor(endpoint: Endpoint<TSettings>, params: Readonly<Record<string, string | undefined>>, typedParams: Readonly<Record<string, any>>, queryParams: Readonly<Record<string, string>>);
349
354
  // (undocumented)
@@ -362,21 +367,21 @@ export class RecognizedRoute<TSettings = any> {
362
367
  readonly typedParams: Readonly<Record<string, any>>;
363
368
  }
364
369
 
365
- // @alpha (undocumented)
370
+ // @beta (undocumented)
366
371
  export class Redirect implements NavigationCommand {
367
372
  constructor(redirect: string);
368
373
  // (undocumented)
369
374
  createContributor(): Promise<{
370
375
  navigate(phase: NavigationPhase): Promise<void>;
371
376
  }>;
372
- }
377
+ }
373
378
 
374
- // @alpha (undocumented)
379
+ // @beta (undocumented)
375
380
  export type RedirectRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & {
376
381
  redirect: string;
377
382
  };
378
383
 
379
- // @alpha (undocumented)
384
+ // @beta (undocumented)
380
385
  export class Render implements RenderCommand {
381
386
  constructor(owner: RouterConfiguration, createView: () => Promise<RouteView>);
382
387
  // Warning: (ae-forgotten-export) The symbol "RenderContributor" needs to be exported by the entry point index.d.ts
@@ -395,12 +400,12 @@ export class Render implements RenderCommand {
395
400
  // (undocumented)
396
401
  get transition(): Transition;
397
402
  set transition(value: Transition);
398
- }
403
+ }
399
404
 
400
- // @alpha (undocumented)
405
+ // @beta (undocumented)
401
406
  export type RenderableRouteDefinition<TSettings = any> = ElementRouteDefinition<TSettings> | TemplateRouteDefinition<TSettings>;
402
407
 
403
- // @alpha (undocumented)
408
+ // @beta (undocumented)
404
409
  export interface RenderCommand extends NavigationCommand {
405
410
  // (undocumented)
406
411
  createView(): Promise<RouteView>;
@@ -410,7 +415,7 @@ export interface RenderCommand extends NavigationCommand {
410
415
  transition: Transition;
411
416
  }
412
417
 
413
- // @alpha (undocumented)
418
+ // @beta (undocumented)
414
419
  export interface RenderOperation {
415
420
  // (undocumented)
416
421
  commit(): Promise<void>;
@@ -418,7 +423,7 @@ export interface RenderOperation {
418
423
  rollback(): Promise<void>;
419
424
  }
420
425
 
421
- // @alpha (undocumented)
426
+ // @beta (undocumented)
422
427
  export interface Route {
423
428
  // (undocumented)
424
429
  readonly caseSensitive?: boolean;
@@ -428,7 +433,7 @@ export interface Route {
428
433
  readonly path: string;
429
434
  }
430
435
 
431
- // @alpha (undocumented)
436
+ // @beta (undocumented)
432
437
  export const Route: Readonly<{
433
438
  path: Readonly<{
434
439
  readonly current: string;
@@ -445,7 +450,7 @@ export const Route: Readonly<{
445
450
  }>;
446
451
  }>;
447
452
 
448
- // @alpha (undocumented)
453
+ // @beta (undocumented)
449
454
  export class RouteCollection<TSettings = any> {
450
455
  constructor(owner: RouterConfiguration);
451
456
  // (undocumented)
@@ -460,18 +465,18 @@ export class RouteCollection<TSettings = any> {
460
465
  map(...routes: MappableRouteDefinition<TSettings>[]): void;
461
466
  // (undocumented)
462
467
  recognize(path: string): Promise<RouteMatch<TSettings> | null>;
463
- }
468
+ }
464
469
 
465
- // @alpha (undocumented)
470
+ // @beta (undocumented)
466
471
  export type RouteMatch<TSettings = any> = {
467
472
  route: RecognizedRoute<TSettings>;
468
473
  command: NavigationCommand;
469
474
  };
470
475
 
471
- // @alpha (undocumented)
476
+ // @beta (undocumented)
472
477
  export type RouteParameterConverter = (value: string | undefined) => any | Promise<any>;
473
478
 
474
- // @alpha (undocumented)
479
+ // @beta (undocumented)
475
480
  export interface Router<TSettings = any> {
476
481
  // (undocumented)
477
482
  addContributor(contributor: NavigationContributor): void;
@@ -495,7 +500,7 @@ export interface Router<TSettings = any> {
495
500
  shouldRender(route: RecognizedRoute<TSettings>): boolean;
496
501
  }
497
502
 
498
- // @alpha (undocumented)
503
+ // @beta (undocumented)
499
504
  export const Router: Readonly<{
500
505
  getOrCreateFor(element: HTMLElement): Router<any> | DefaultRouter;
501
506
  find(element: HTMLElement): Router | null;
@@ -505,7 +510,7 @@ export const Router: Readonly<{
505
510
  }>(BaseType: TBase): new () => InstanceType<TBase> & RouterElement;
506
511
  }>;
507
512
 
508
- // @alpha (undocumented)
513
+ // @beta (undocumented)
509
514
  export abstract class RouterConfiguration<TSettings = any> {
510
515
  // (undocumented)
511
516
  protected cached(ElementType: new () => HTMLElement): () => Promise<HTMLElement>;
@@ -549,7 +554,7 @@ export abstract class RouterConfiguration<TSettings = any> {
549
554
  title: string;
550
555
  }
551
556
 
552
- // @alpha (undocumented)
557
+ // @beta (undocumented)
553
558
  export interface RouteRecognizer<TSettings> {
554
559
  // (undocumented)
555
560
  add(routeOrRoutes: Route | readonly Route[], settings?: TSettings): void;
@@ -561,7 +566,7 @@ export interface RouteRecognizer<TSettings> {
561
566
  recognize(path: string, converters?: Readonly<Record<string, RouteParameterConverter>>): Promise<RecognizedRoute<TSettings> | null>;
562
567
  }
563
568
 
564
- // @alpha (undocumented)
569
+ // @beta (undocumented)
565
570
  export interface RouterElement extends HTMLElement {
566
571
  // Warning: (ae-forgotten-export) The symbol "routerProperty" needs to be exported by the entry point index.d.ts
567
572
  //
@@ -575,17 +580,17 @@ export interface RouterElement extends HTMLElement {
575
580
  disconnectedCallback(): any;
576
581
  }
577
582
 
578
- // @alpha (undocumented)
583
+ // @beta (undocumented)
579
584
  export type RouterExecutionContext = ExecutionContext & {
580
585
  router: Router;
581
586
  };
582
587
 
583
- // @alpha (undocumented)
588
+ // @beta (undocumented)
584
589
  export const RouterExecutionContext: Readonly<{
585
590
  create(router: Router): any;
586
591
  }>;
587
592
 
588
- // @alpha (undocumented)
593
+ // @beta (undocumented)
589
594
  export interface RouteView {
590
595
  // (undocumented)
591
596
  appendTo(host: HTMLElement): void;
@@ -595,18 +600,18 @@ export interface RouteView {
595
600
  dispose(): void;
596
601
  }
597
602
 
598
- // @alpha (undocumented)
603
+ // @beta (undocumented)
599
604
  export type SupportsSettings<TSettings = any> = {
600
605
  settings?: TSettings;
601
606
  };
602
607
 
603
- // @alpha (undocumented)
608
+ // @beta (undocumented)
604
609
  export type TemplateFallbackRouteDefinition<TSettings = any> = LayoutAndTransitionRouteDefinition & HasTemplate & SupportsSettings<TSettings> & HasTitle;
605
610
 
606
- // @alpha (undocumented)
611
+ // @beta (undocumented)
607
612
  export type TemplateRouteDefinition<TSettings = any> = NavigableRouteDefinition<TSettings> & HasTemplate;
608
613
 
609
- // @alpha (undocumented)
614
+ // @beta (undocumented)
610
615
  export interface Transition {
611
616
  // (undocumented)
612
617
  begin(host: HTMLElement, prev: RouteView | null, next: RouteView): Promise<void>;
@@ -616,12 +621,11 @@ export interface Transition {
616
621
  rollback(host: HTMLElement, prev: RouteView | null, next: RouteView): Promise<void>;
617
622
  }
618
623
 
619
- // @alpha (undocumented)
624
+ // @beta (undocumented)
620
625
  export const Transition: Readonly<{
621
626
  default: Readonly<Transition>;
622
627
  }>;
623
628
 
624
-
625
629
  // (No @packageDocumentation comment for this package)
626
630
 
627
631
  ```
package/karma.conf.cjs CHANGED
@@ -1,5 +1,4 @@
1
1
  const path = require("path");
2
-
3
2
  const basePath = path.resolve(__dirname);
4
3
 
5
4
  const commonChromeFlags = [
@@ -44,9 +43,9 @@ module.exports = function (config) {
44
43
  require("karma-chrome-launcher"),
45
44
  require("karma-firefox-launcher"),
46
45
  ],
47
- files: [`dist/esm/__test__/${setup}.js`],
46
+ files: [`dist/esm/__test__/${setup}.cjs`],
48
47
  preprocessors: {
49
- [`dist/esm/__test__/${setup}.js`]: ["webpack", "sourcemap"],
48
+ [`dist/esm/__test__/${setup}.cjs`]: ["webpack", "sourcemap"],
50
49
  },
51
50
  webpackMiddleware: {
52
51
  // webpack-dev-middleware configuration
@@ -54,7 +53,7 @@ module.exports = function (config) {
54
53
  stats: "errors-only",
55
54
  },
56
55
  webpack: {
57
- mode: "none",
56
+ mode: "development",
58
57
  resolve: {
59
58
  extensions: [".js"],
60
59
  modules: ["dist", "node_modules"],
@@ -65,12 +64,8 @@ module.exports = function (config) {
65
64
  hints: false,
66
65
  },
67
66
  optimization: {
68
- namedModules: false,
69
- namedChunks: false,
70
- nodeEnv: false,
71
67
  usedExports: true,
72
68
  flagIncludedChunks: false,
73
- occurrenceOrder: false,
74
69
  sideEffects: true,
75
70
  concatenateModules: true,
76
71
  splitChunks: {
@@ -89,14 +84,8 @@ module.exports = function (config) {
89
84
  },
90
85
  {
91
86
  test: /\.js$/,
92
- use: [
93
- {
94
- loader: "source-map-loader",
95
- options: {
96
- enforce: "pre",
97
- },
98
- },
99
- ],
87
+ use: ["source-map-loader"],
88
+ enforce: "pre",
100
89
  },
101
90
  ],
102
91
  },
@@ -125,7 +114,7 @@ module.exports = function (config) {
125
114
  timeout: 5000,
126
115
  },
127
116
  },
128
- logLevel: config.LOG_ERROR, // to disable the WARN 404 for image requests
117
+ logLevel: config.LOG_ERROR, // to disable the WARN 404 for image requests,
129
118
  };
130
119
 
131
120
  if (config.coverage) {