@herdingbits/trailhead-core 0.0.11 → 0.0.12
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/shell.d.ts +0 -11
- package/dist/shell.d.ts.map +1 -1
- package/dist/shell.js +2 -20
- package/package.json +1 -1
package/dist/shell.d.ts
CHANGED
|
@@ -15,23 +15,12 @@ export declare class Trailhead {
|
|
|
15
15
|
readonly basePath: string;
|
|
16
16
|
private readonly shellResourceUrl;
|
|
17
17
|
readonly adapter: DesignSystemAdapter;
|
|
18
|
-
private readyPromise;
|
|
19
|
-
private readyResolve;
|
|
20
18
|
constructor(config: ShellConfig);
|
|
21
19
|
/**
|
|
22
20
|
* Get navigation items loaded from navigation.json
|
|
23
21
|
* @returns Array of navigation items
|
|
24
22
|
*/
|
|
25
23
|
getNavigation(): NavItem[];
|
|
26
|
-
/**
|
|
27
|
-
* Wait for shell to be ready (adapter has rendered)
|
|
28
|
-
* @returns Promise that resolves when shell is ready
|
|
29
|
-
*/
|
|
30
|
-
waitForReady(): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Notify that shell is ready (called by adapter after rendering)
|
|
33
|
-
*/
|
|
34
|
-
notifyReady(): void;
|
|
35
24
|
/**
|
|
36
25
|
* Initialize shell
|
|
37
26
|
*/
|
package/dist/shell.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI/D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM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/dist/shell.js
CHANGED
|
@@ -7,9 +7,6 @@ export class Trailhead {
|
|
|
7
7
|
this.basePath = config.basePath || "";
|
|
8
8
|
this.shellResourceUrl = config.shellResourceUrl || this.basePath;
|
|
9
9
|
this.adapter = config.adapter;
|
|
10
|
-
this.readyPromise = new Promise((resolve) => {
|
|
11
|
-
this.readyResolve = resolve;
|
|
12
|
-
});
|
|
13
10
|
this.init(config.apiUrl);
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
@@ -19,19 +16,6 @@ export class Trailhead {
|
|
|
19
16
|
getNavigation() {
|
|
20
17
|
return this.navigation;
|
|
21
18
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Wait for shell to be ready (adapter has rendered)
|
|
24
|
-
* @returns Promise that resolves when shell is ready
|
|
25
|
-
*/
|
|
26
|
-
waitForReady() {
|
|
27
|
-
return this.readyPromise;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Notify that shell is ready (called by adapter after rendering)
|
|
31
|
-
*/
|
|
32
|
-
notifyReady() {
|
|
33
|
-
this.readyResolve();
|
|
34
|
-
}
|
|
35
19
|
/**
|
|
36
20
|
* Initialize shell
|
|
37
21
|
*/
|
|
@@ -49,10 +33,8 @@ export class Trailhead {
|
|
|
49
33
|
this.setupRouting();
|
|
50
34
|
// Render navigation
|
|
51
35
|
this.renderNavigation();
|
|
52
|
-
//
|
|
53
|
-
this.
|
|
54
|
-
this.handleRoute();
|
|
55
|
-
});
|
|
36
|
+
// Load initial route
|
|
37
|
+
this.handleRoute();
|
|
56
38
|
}
|
|
57
39
|
/**
|
|
58
40
|
* Initialize design system adapter
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herdingbits/trailhead-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Simple application shell that orchestrates multiple SPAs. No webpack magic, just the browser's native module system.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|