@microsoft/fast-router 1.0.0-alpha.3 → 1.0.0-alpha.6

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/CHANGELOG.json CHANGED
@@ -1,6 +1,57 @@
1
1
  {
2
2
  "name": "@microsoft/fast-router",
3
3
  "entries": [
4
+ {
5
+ "date": "Thu, 01 Sep 2022 21:53:34 GMT",
6
+ "tag": "@microsoft/fast-router_v1.0.0-alpha.6",
7
+ "version": "1.0.0-alpha.6",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@microsoft/fast-router",
13
+ "comment": "Bump @microsoft/fast-element to v2.0.0-beta.6",
14
+ "commit": "6b0f08574475d8b28cc2df67bf72b9041c2ad285"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Thu, 18 Aug 2022 20:46:10 GMT",
21
+ "tag": "@microsoft/fast-router_v1.0.0-alpha.5",
22
+ "version": "1.0.0-alpha.5",
23
+ "comments": {
24
+ "prerelease": [
25
+ {
26
+ "author": "beachball",
27
+ "package": "@microsoft/fast-router",
28
+ "comment": "Bump @microsoft/fast-element to v2.0.0-beta.5",
29
+ "commit": "0b57f1bc812e8e6371b7d27bb625f99a25bfaa66"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Mon, 18 Jul 2022 21:10:01 GMT",
36
+ "tag": "@microsoft/fast-router_v1.0.0-alpha.4",
37
+ "version": "1.0.0-alpha.4",
38
+ "comments": {
39
+ "prerelease": [
40
+ {
41
+ "author": "roeisenb@microsoft.com",
42
+ "package": "@microsoft/fast-router",
43
+ "commit": "f164aa75e62ed71c9386902051c021f1fdfba364",
44
+ "comment": "refactor: reduce duplication in style normalization code scenarios"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@microsoft/fast-router",
49
+ "comment": "Bump @microsoft/fast-element to v2.0.0-beta.4",
50
+ "commit": "2ff46a32cdd9af12b236d0e2f3436a4de782e8ee"
51
+ }
52
+ ]
53
+ }
54
+ },
4
55
  {
5
56
  "date": "Wed, 22 Jun 2022 20:17:50 GMT",
6
57
  "tag": "@microsoft/fast-router_v1.0.0-alpha.3",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,34 @@
1
1
  # Change Log - @microsoft/fast-router
2
2
 
3
- This log was last generated on Wed, 22 Jun 2022 20:17:50 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 01 Sep 2022 21:53:34 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.0.0-alpha.6
8
+
9
+ Thu, 01 Sep 2022 21:53:34 GMT
10
+
11
+ ### Changes
12
+
13
+ - Bump @microsoft/fast-element to v2.0.0-beta.6
14
+
15
+ ## 1.0.0-alpha.5
16
+
17
+ Thu, 18 Aug 2022 20:46:10 GMT
18
+
19
+ ### Changes
20
+
21
+ - Bump @microsoft/fast-element to v2.0.0-beta.5
22
+
23
+ ## 1.0.0-alpha.4
24
+
25
+ Mon, 18 Jul 2022 21:10:01 GMT
26
+
27
+ ### Changes
28
+
29
+ - refactor: reduce duplication in style normalization code scenarios (roeisenb@microsoft.com)
30
+ - Bump @microsoft/fast-element to v2.0.0-beta.4
31
+
7
32
  ## 1.0.0-alpha.3
8
33
 
9
34
  Wed, 22 Jun 2022 20:17:50 GMT
@@ -48,7 +48,7 @@ export declare class FASTElementLayout implements Layout {
48
48
  private readonly template;
49
49
  private runBeforeCommit;
50
50
  private styles;
51
- constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | null, runBeforeCommit?: boolean);
51
+ constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | undefined, runBeforeCommit?: boolean);
52
52
  beforeCommit(routerElement: HTMLElement): Promise<void>;
53
53
  afterCommit(routerElement: HTMLElement): Promise<void>;
54
54
  private apply;
package/dist/esm/view.js CHANGED
@@ -33,17 +33,11 @@ export const Transition = Object.freeze({
33
33
  * @beta
34
34
  */
35
35
  export class FASTElementLayout {
36
- constructor(template = null, styles = null, runBeforeCommit = true) {
36
+ constructor(template = null, styles = undefined, runBeforeCommit = true) {
37
+ var _a;
37
38
  this.template = template;
38
39
  this.runBeforeCommit = runBeforeCommit;
39
- this.styles =
40
- styles === void 0 || styles === null
41
- ? null
42
- : Array.isArray(styles)
43
- ? new ElementStyles(styles)
44
- : styles instanceof ElementStyles
45
- ? styles
46
- : new ElementStyles([styles]);
40
+ this.styles = (_a = ElementStyles.normalize(styles)) !== null && _a !== void 0 ? _a : null;
47
41
  }
48
42
  beforeCommit(routerElement) {
49
43
  return __awaiter(this, void 0, void 0, function* () {
@@ -2410,7 +2410,7 @@
2410
2410
  },
2411
2411
  {
2412
2412
  "kind": "Content",
2413
- "text": "[] | null"
2413
+ "text": "[] | undefined"
2414
2414
  },
2415
2415
  {
2416
2416
  "kind": "Content",
@@ -199,7 +199,7 @@ export declare class FASTElementLayout implements Layout {
199
199
  private readonly template;
200
200
  private runBeforeCommit;
201
201
  private styles;
202
- constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | null, runBeforeCommit?: boolean);
202
+ constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | undefined, runBeforeCommit?: boolean);
203
203
  beforeCommit(routerElement: HTMLElement): Promise<void>;
204
204
  afterCommit(routerElement: HTMLElement): Promise<void>;
205
205
  private apply;
@@ -202,7 +202,7 @@ export declare class FASTElementLayout implements Layout {
202
202
  private readonly template;
203
203
  private runBeforeCommit;
204
204
  private styles;
205
- constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | null, runBeforeCommit?: boolean);
205
+ constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | undefined, runBeforeCommit?: boolean);
206
206
  beforeCommit(routerElement: HTMLElement): Promise<void>;
207
207
  afterCommit(routerElement: HTMLElement): Promise<void>;
208
208
  private apply;
@@ -152,7 +152,7 @@ export type FASTElementConstructor = new () => FASTElement;
152
152
 
153
153
  // @beta (undocumented)
154
154
  export class FASTElementLayout implements Layout {
155
- constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | null, runBeforeCommit?: boolean);
155
+ constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | undefined, runBeforeCommit?: boolean);
156
156
  // (undocumented)
157
157
  afterCommit(routerElement: HTMLElement): Promise<void>;
158
158
  // (undocumented)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@microsoft/fast-router",
3
3
  "description": "A web-components-based router.",
4
4
  "sideEffects": false,
5
- "version": "1.0.0-alpha.3",
5
+ "version": "1.0.0-alpha.6",
6
6
  "author": {
7
7
  "name": "Microsoft",
8
8
  "url": "https://discord.gg/FcSNfg4"
@@ -80,6 +80,6 @@
80
80
  "webpack-cli": "^4.9.2"
81
81
  },
82
82
  "dependencies": {
83
- "@microsoft/fast-element": "^2.0.0-beta.3"
83
+ "@microsoft/fast-element": "^2.0.0-beta.6"
84
84
  }
85
85
  }