@microsoft/fast-router 0.2.14 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +21 -0
- package/CHANGELOG.json +69 -1
- package/CHANGELOG.md +26 -2
- package/dist/dts/commands.d.ts +7 -7
- package/dist/dts/configuration.d.ts +10 -10
- package/dist/dts/contributors.d.ts +1 -1
- package/dist/dts/events.d.ts +5 -5
- package/dist/dts/fast-router.d.ts +1 -1
- package/dist/dts/index-rollup.d.ts +1 -1
- package/dist/dts/index.d.ts +13 -13
- package/dist/dts/navigation.d.ts +1 -1
- package/dist/dts/phases.d.ts +2 -2
- package/dist/dts/process.d.ts +4 -4
- package/dist/dts/recognizer.d.ts +1 -1
- package/dist/dts/router.d.ts +4 -4
- package/dist/dts/routes.d.ts +5 -5
- package/dist/dts/view.d.ts +1 -1
- package/dist/esm/commands.js +3 -3
- package/dist/esm/configuration.js +9 -9
- package/dist/esm/contributors.js +1 -1
- package/dist/esm/fast-router.js +1 -1
- package/dist/esm/index-rollup.js +1 -1
- package/dist/esm/index.js +13 -13
- package/dist/esm/links.js +1 -1
- package/dist/esm/navigation.js +1 -1
- package/dist/esm/process.js +1 -1
- package/dist/esm/recognizer.js +1 -1
- package/dist/esm/router.js +3 -3
- package/dist/esm/routes.js +3 -3
- package/dist/esm/view.js +1 -1
- package/dist/fast-router.js +420 -342
- package/dist/fast-router.min.js +1 -1
- package/karma.conf.cjs +152 -0
- package/package.json +12 -11
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["@microsoft/eslint-config-fast-dna", "prettier"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
5
|
+
"@typescript-eslint/ban-types": [
|
|
6
|
+
"error",
|
|
7
|
+
{
|
|
8
|
+
"types": {
|
|
9
|
+
"{}": false,
|
|
10
|
+
"Function": false,
|
|
11
|
+
"Object": false
|
|
12
|
+
},
|
|
13
|
+
"extendDefaults": true
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"import/extensions": [
|
|
17
|
+
"error",
|
|
18
|
+
"always"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,75 @@
|
|
|
2
2
|
"name": "@microsoft/fast-router",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 12 Apr 2022 07:11:55 GMT",
|
|
6
|
+
"tag": "@microsoft/fast-router_v0.3.0",
|
|
7
|
+
"version": "0.3.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Convert package to type:module",
|
|
12
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
13
|
+
"commit": "349ff265636d29e45cf336755083e4b997d6e6f2",
|
|
14
|
+
"package": "@microsoft/fast-router"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"none": [
|
|
18
|
+
{
|
|
19
|
+
"comment": "Bump @microsoft/fast-element to v1.9.0",
|
|
20
|
+
"author": "yinon@hotmail.com",
|
|
21
|
+
"commit": "3e4d72447520f40d234b1df2cc70446dcef8bb47",
|
|
22
|
+
"package": "@microsoft/fast-router"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"date": "Wed, 06 Apr 2022 07:12:42 GMT",
|
|
29
|
+
"tag": "@microsoft/fast-router_v0.2.16",
|
|
30
|
+
"version": "0.2.16",
|
|
31
|
+
"comments": {
|
|
32
|
+
"patch": [
|
|
33
|
+
{
|
|
34
|
+
"comment": "Bump @microsoft/fast-element to v1.9.0",
|
|
35
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
36
|
+
"commit": "ead7f7340654236f2503359e2fc6f0b41639b507",
|
|
37
|
+
"package": "@microsoft/fast-router"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"date": "Sun, 03 Apr 2022 07:12:01 GMT",
|
|
44
|
+
"tag": "@microsoft/fast-router_v0.2.15",
|
|
45
|
+
"version": "0.2.15",
|
|
46
|
+
"comments": {
|
|
47
|
+
"none": [
|
|
48
|
+
{
|
|
49
|
+
"comment": "Bump @microsoft/fast-element to v1.8.0",
|
|
50
|
+
"author": "47367562+bheston@users.noreply.github.com",
|
|
51
|
+
"commit": "35913ce3a2dcba83bebb63cce2b8edf4e9da7df9",
|
|
52
|
+
"package": "@microsoft/fast-router"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"date": "Tue, 08 Mar 2022 07:12:45 GMT",
|
|
59
|
+
"tag": "@microsoft/fast-router_v0.2.15",
|
|
60
|
+
"version": "0.2.15",
|
|
61
|
+
"comments": {
|
|
62
|
+
"patch": [
|
|
63
|
+
{
|
|
64
|
+
"comment": "Bump @microsoft/fast-element to v1.8.0",
|
|
65
|
+
"author": "roeisenb@microsoft.com",
|
|
66
|
+
"commit": "0e506c6c67a8a7d75e4ef9cfbd000f9da810dc14",
|
|
67
|
+
"package": "@microsoft/fast-router"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"date": "Fri, 25 Feb 2022 17:09:32 GMT",
|
|
6
74
|
"tag": "@microsoft/fast-router_v0.2.14",
|
|
7
75
|
"version": "0.2.14",
|
|
8
76
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-router
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 12 Apr 2022 07:11:55 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.3.0
|
|
8
|
+
|
|
9
|
+
Tue, 12 Apr 2022 07:11:55 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Convert package to type:module (nicholasrice@users.noreply.github.com)
|
|
14
|
+
|
|
15
|
+
## 0.2.16
|
|
16
|
+
|
|
17
|
+
Wed, 06 Apr 2022 07:12:42 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Bump @microsoft/fast-element to v1.9.0 (nicholasrice@users.noreply.github.com)
|
|
22
|
+
|
|
23
|
+
## 0.2.15
|
|
24
|
+
|
|
25
|
+
Tue, 08 Mar 2022 07:12:45 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- Bump @microsoft/fast-element to v1.8.0 (roeisenb@microsoft.com)
|
|
30
|
+
|
|
7
31
|
## 0.2.14
|
|
8
32
|
|
|
9
|
-
Fri, 25 Feb 2022 17:
|
|
33
|
+
Fri, 25 Feb 2022 17:09:32 GMT
|
|
10
34
|
|
|
11
35
|
### Patches
|
|
12
36
|
|
package/dist/dts/commands.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Router } from "./router";
|
|
2
|
-
import { RouterConfiguration } from "./configuration";
|
|
3
|
-
import { Layout, RouteView, Transition } from "./view";
|
|
4
|
-
import { ElementFallbackRouteDefinition, ElementRouteDefinition, TemplateFallbackRouteDefinition, TemplateRouteDefinition } from "./routes";
|
|
5
|
-
import { RecognizedRoute } from "./recognizer";
|
|
6
|
-
import { NavigationContributor } from "./contributors";
|
|
7
|
-
import { NavigationCommitPhase, NavigationPhase } from "./phases";
|
|
1
|
+
import { Router } from "./router.js";
|
|
2
|
+
import { RouterConfiguration } from "./configuration.js";
|
|
3
|
+
import { Layout, RouteView, Transition } from "./view.js";
|
|
4
|
+
import { ElementFallbackRouteDefinition, ElementRouteDefinition, TemplateFallbackRouteDefinition, TemplateRouteDefinition } from "./routes.js";
|
|
5
|
+
import { RecognizedRoute } from "./recognizer.js";
|
|
6
|
+
import { NavigationContributor } from "./contributors.js";
|
|
7
|
+
import { NavigationCommitPhase, NavigationPhase } from "./phases.js";
|
|
8
8
|
/**
|
|
9
9
|
* @alpha
|
|
10
10
|
*/
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Constructable } from "@microsoft/fast-element";
|
|
2
|
-
import { NavigationQueue } from "./navigation";
|
|
3
|
-
import { Layout, Transition } from "./view";
|
|
4
|
-
import { RouteCollection, RouteMatch } from "./routes";
|
|
5
|
-
import { LinkHandler } from "./links";
|
|
6
|
-
import { NavigationProcess } from "./process";
|
|
7
|
-
import { TitleBuilder } from "./titles";
|
|
8
|
-
import { RoutingEventSink } from "./events";
|
|
9
|
-
import { NavigationContributor } from "./contributors";
|
|
10
|
-
import { NavigationPhaseHook, NavigationPhaseName } from "./phases";
|
|
11
|
-
import { RouteRecognizer } from "./recognizer";
|
|
2
|
+
import { NavigationQueue } from "./navigation.js";
|
|
3
|
+
import { Layout, Transition } from "./view.js";
|
|
4
|
+
import { RouteCollection, RouteMatch } from "./routes.js";
|
|
5
|
+
import { LinkHandler } from "./links.js";
|
|
6
|
+
import { NavigationProcess } from "./process.js";
|
|
7
|
+
import { TitleBuilder } from "./titles.js";
|
|
8
|
+
import { RoutingEventSink } from "./events.js";
|
|
9
|
+
import { NavigationContributor } from "./contributors.js";
|
|
10
|
+
import { NavigationPhaseHook, NavigationPhaseName } from "./phases.js";
|
|
11
|
+
import { RouteRecognizer } from "./recognizer.js";
|
|
12
12
|
/**
|
|
13
13
|
* @alpha
|
|
14
14
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLDirective } from "@microsoft/fast-element";
|
|
2
|
-
import { NavigationCommitPhaseHook, NavigationPhaseHook, NavigationPhaseName } from "./phases";
|
|
2
|
+
import { NavigationCommitPhaseHook, NavigationPhaseHook, NavigationPhaseName } from "./phases.js";
|
|
3
3
|
/**
|
|
4
4
|
* @alpha
|
|
5
5
|
*/
|
package/dist/dts/events.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NavigationCommand } from "./commands";
|
|
2
|
-
import { NavigationMessage } from "./navigation";
|
|
3
|
-
import { NavigationPhase } from "./phases";
|
|
4
|
-
import { RecognizedRoute } from "./recognizer";
|
|
5
|
-
import { Router } from "./router";
|
|
1
|
+
import { NavigationCommand } from "./commands.js";
|
|
2
|
+
import { NavigationMessage } from "./navigation.js";
|
|
3
|
+
import { NavigationPhase } from "./phases.js";
|
|
4
|
+
import { RecognizedRoute } from "./recognizer.js";
|
|
5
|
+
import { Router } from "./router.js";
|
|
6
6
|
/**
|
|
7
7
|
* @alpha
|
|
8
8
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./index";
|
|
1
|
+
export * from "./index.js";
|
|
2
2
|
export * from "@microsoft/fast-element";
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from "./commands";
|
|
2
|
-
export * from "./configuration";
|
|
3
|
-
export * from "./fast-router";
|
|
4
|
-
export * from "./links";
|
|
5
|
-
export * from "./navigation";
|
|
6
|
-
export * from "./contributors";
|
|
7
|
-
export * from "./phases";
|
|
8
|
-
export * from "./process";
|
|
9
|
-
export * from "./query-string";
|
|
10
|
-
export * from "./recognizer";
|
|
11
|
-
export * from "./router";
|
|
12
|
-
export * from "./routes";
|
|
13
|
-
export * from "./view";
|
|
1
|
+
export * from "./commands.js";
|
|
2
|
+
export * from "./configuration.js";
|
|
3
|
+
export * from "./fast-router.js";
|
|
4
|
+
export * from "./links.js";
|
|
5
|
+
export * from "./navigation.js";
|
|
6
|
+
export * from "./contributors.js";
|
|
7
|
+
export * from "./phases.js";
|
|
8
|
+
export * from "./process.js";
|
|
9
|
+
export * from "./query-string.js";
|
|
10
|
+
export * from "./recognizer.js";
|
|
11
|
+
export * from "./router.js";
|
|
12
|
+
export * from "./routes.js";
|
|
13
|
+
export * from "./view.js";
|
package/dist/dts/navigation.d.ts
CHANGED
package/dist/dts/phases.d.ts
CHANGED
package/dist/dts/process.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NavigationMessage } from "./navigation";
|
|
2
|
-
import { NavigationCommitPhase, NavigationPhaseFollowupAction, NavigationPhaseName } from "./phases";
|
|
3
|
-
import { RecognizedRoute } from "./recognizer";
|
|
4
|
-
import { Router } from "./router";
|
|
1
|
+
import { NavigationMessage } from "./navigation.js";
|
|
2
|
+
import { NavigationCommitPhase, NavigationPhaseFollowupAction, NavigationPhaseName } from "./phases.js";
|
|
3
|
+
import { RecognizedRoute } from "./recognizer.js";
|
|
4
|
+
import { Router } from "./router.js";
|
|
5
5
|
declare class NavigationPhaseImpl<TSettings = any> implements NavigationCommitPhase<TSettings> {
|
|
6
6
|
readonly name: NavigationPhaseName;
|
|
7
7
|
private readonly commitActions;
|
package/dist/dts/recognizer.d.ts
CHANGED
package/dist/dts/router.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FASTElement } from "@microsoft/fast-element";
|
|
2
|
-
import { RenderCommand } from "./commands";
|
|
3
|
-
import { RouterConfiguration } from "./configuration";
|
|
4
|
-
import { NavigationContributor } from "./contributors";
|
|
5
|
-
import { RecognizedRoute } from "./recognizer";
|
|
2
|
+
import { RenderCommand } from "./commands.js";
|
|
3
|
+
import { RouterConfiguration } from "./configuration.js";
|
|
4
|
+
import { NavigationContributor } from "./contributors.js";
|
|
5
|
+
import { RecognizedRoute } from "./recognizer.js";
|
|
6
6
|
/**
|
|
7
7
|
* @alpha
|
|
8
8
|
*/
|
package/dist/dts/routes.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Constructable, FASTElement, ViewTemplate } from "@microsoft/fast-element";
|
|
2
|
-
import { RecognizedRoute, RouteParameterConverter } from "./recognizer";
|
|
3
|
-
import { NavigationCommand } from "./commands";
|
|
4
|
-
import { Layout, Transition } from "./view";
|
|
5
|
-
import { RouterConfiguration } from "./configuration";
|
|
6
|
-
import { Route } from "./navigation";
|
|
2
|
+
import { RecognizedRoute, RouteParameterConverter } from "./recognizer.js";
|
|
3
|
+
import { NavigationCommand } from "./commands.js";
|
|
4
|
+
import { Layout, Transition } from "./view.js";
|
|
5
|
+
import { RouterConfiguration } from "./configuration.js";
|
|
6
|
+
import { Route } from "./navigation.js";
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
package/dist/dts/view.d.ts
CHANGED
package/dist/esm/commands.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { FASTElementDefinition, html, HTMLView, ViewTemplate, } from "@microsoft/fast-element";
|
|
3
|
-
import { FASTElementLayout } from "./view";
|
|
4
|
-
import { Route } from "./navigation";
|
|
5
|
-
import { navigationContributor } from "./contributors";
|
|
3
|
+
import { FASTElementLayout } from "./view.js";
|
|
4
|
+
import { Route } from "./navigation.js";
|
|
5
|
+
import { navigationContributor } from "./contributors.js";
|
|
6
6
|
/**
|
|
7
7
|
* @alpha
|
|
8
8
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { DefaultNavigationQueue } from "./navigation";
|
|
3
|
-
import { Layout, Transition } from "./view";
|
|
4
|
-
import { RouteCollection } from "./routes";
|
|
5
|
-
import { DefaultLinkHandler } from "./links";
|
|
6
|
-
import { DefaultNavigationProcess } from "./process";
|
|
7
|
-
import { DefaultTitleBuilder } from "./titles";
|
|
8
|
-
import { DefaultRoutingEventSink } from "./events";
|
|
9
|
-
import { isNavigationPhaseContributor } from "./contributors";
|
|
10
|
-
import { DefaultRouteRecognizer } from "./recognizer";
|
|
2
|
+
import { DefaultNavigationQueue } from "./navigation.js";
|
|
3
|
+
import { Layout, Transition } from "./view.js";
|
|
4
|
+
import { RouteCollection } from "./routes.js";
|
|
5
|
+
import { DefaultLinkHandler } from "./links.js";
|
|
6
|
+
import { DefaultNavigationProcess } from "./process.js";
|
|
7
|
+
import { DefaultTitleBuilder } from "./titles.js";
|
|
8
|
+
import { DefaultRoutingEventSink } from "./events.js";
|
|
9
|
+
import { isNavigationPhaseContributor } from "./contributors.js";
|
|
10
|
+
import { DefaultRouteRecognizer } from "./recognizer.js";
|
|
11
11
|
/**
|
|
12
12
|
* @alpha
|
|
13
13
|
*/
|
package/dist/esm/contributors.js
CHANGED
package/dist/esm/fast-router.js
CHANGED
package/dist/esm/index-rollup.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./index";
|
|
1
|
+
export * from "./index.js";
|
|
2
2
|
export * from "@microsoft/fast-element";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from "./commands";
|
|
2
|
-
export * from "./configuration";
|
|
3
|
-
export * from "./fast-router";
|
|
4
|
-
export * from "./links";
|
|
5
|
-
export * from "./navigation";
|
|
6
|
-
export * from "./contributors";
|
|
7
|
-
export * from "./phases";
|
|
8
|
-
export * from "./process";
|
|
9
|
-
export * from "./query-string";
|
|
10
|
-
export * from "./recognizer";
|
|
11
|
-
export * from "./router";
|
|
12
|
-
export * from "./routes";
|
|
13
|
-
export * from "./view";
|
|
1
|
+
export * from "./commands.js";
|
|
2
|
+
export * from "./configuration.js";
|
|
3
|
+
export * from "./fast-router.js";
|
|
4
|
+
export * from "./links.js";
|
|
5
|
+
export * from "./navigation.js";
|
|
6
|
+
export * from "./contributors.js";
|
|
7
|
+
export * from "./phases.js";
|
|
8
|
+
export * from "./process.js";
|
|
9
|
+
export * from "./query-string.js";
|
|
10
|
+
export * from "./recognizer.js";
|
|
11
|
+
export * from "./router.js";
|
|
12
|
+
export * from "./routes.js";
|
|
13
|
+
export * from "./view.js";
|
package/dist/esm/links.js
CHANGED
package/dist/esm/navigation.js
CHANGED
package/dist/esm/process.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { isNavigationPhaseContributor } from "./contributors";
|
|
2
|
+
import { isNavigationPhaseContributor } from "./contributors.js";
|
|
3
3
|
class NavigationPhaseImpl {
|
|
4
4
|
constructor(name, route, router, commitActions, cancelActions) {
|
|
5
5
|
this.name = name;
|
package/dist/esm/recognizer.js
CHANGED
package/dist/esm/router.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { FASTElement } from "@microsoft/fast-element";
|
|
3
|
-
import { NavigationMessage } from "./navigation";
|
|
4
|
-
import { childRouteParameter } from "./routes";
|
|
5
|
-
import { RouterExecutionContext } from "./view";
|
|
3
|
+
import { NavigationMessage } from "./navigation.js";
|
|
4
|
+
import { childRouteParameter } from "./routes.js";
|
|
5
|
+
import { RouterExecutionContext } from "./view.js";
|
|
6
6
|
const routerProperty = "$router";
|
|
7
7
|
// TODO: remove this from here and from fast-foundation
|
|
8
8
|
// TODO: move this to fast-element so router and foundation can both use it
|
package/dist/esm/routes.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { ConfigurableRoute, Endpoint, RecognizedRoute, } from "./recognizer";
|
|
3
|
-
import { Ignore, Redirect, Render } from "./commands";
|
|
4
|
-
import { QueryString } from "./query-string";
|
|
2
|
+
import { ConfigurableRoute, Endpoint, RecognizedRoute, } from "./recognizer.js";
|
|
3
|
+
import { Ignore, Redirect, Render } from "./commands.js";
|
|
4
|
+
import { QueryString } from "./query-string.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
package/dist/esm/view.js
CHANGED