@wcstack/router 1.29.0 → 1.31.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/dist/auto.min.js +1 -1
- package/dist/auto.min.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +23 -18
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ type BuiltinParamTypes = "int" | "float" | "bool" | "uuid" | "slug" | "isoDate"
|
|
|
74
74
|
* This is the main entry point for setting up the router.
|
|
75
75
|
* @param config - Optional partial configuration to override defaults
|
|
76
76
|
*/
|
|
77
|
-
declare function bootstrapRouter(config?: Partial<IWritableConfig
|
|
77
|
+
declare function bootstrapRouter(config?: Partial<IWritableConfig>, registry?: CustomElementRegistry): void;
|
|
78
78
|
|
|
79
79
|
declare function getConfig(): IConfig;
|
|
80
80
|
|
package/dist/index.esm.js
CHANGED
|
@@ -2282,28 +2282,33 @@ class Head extends HTMLElement {
|
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
2284
2284
|
|
|
2285
|
-
|
|
2285
|
+
/**
|
|
2286
|
+
* Register this package's tags. Pass a scoped `CustomElementRegistry` to define
|
|
2287
|
+
* them for a single shadow tree -- scoped registries do not inherit the global
|
|
2288
|
+
* one, so a tree using one needs its own definitions.
|
|
2289
|
+
*/
|
|
2290
|
+
function registerComponents(registry = customElements) {
|
|
2286
2291
|
// Register custom element
|
|
2287
|
-
if (!
|
|
2288
|
-
|
|
2292
|
+
if (!registry.get(config.tagNames.layout)) {
|
|
2293
|
+
registry.define(config.tagNames.layout, Layout);
|
|
2289
2294
|
}
|
|
2290
|
-
if (!
|
|
2291
|
-
|
|
2295
|
+
if (!registry.get(config.tagNames.layoutOutlet)) {
|
|
2296
|
+
registry.define(config.tagNames.layoutOutlet, LayoutOutlet);
|
|
2292
2297
|
}
|
|
2293
|
-
if (!
|
|
2294
|
-
|
|
2298
|
+
if (!registry.get(config.tagNames.outlet)) {
|
|
2299
|
+
registry.define(config.tagNames.outlet, Outlet);
|
|
2295
2300
|
}
|
|
2296
|
-
if (!
|
|
2297
|
-
|
|
2301
|
+
if (!registry.get(config.tagNames.route)) {
|
|
2302
|
+
registry.define(config.tagNames.route, Route);
|
|
2298
2303
|
}
|
|
2299
|
-
if (!
|
|
2300
|
-
|
|
2304
|
+
if (!registry.get(config.tagNames.router)) {
|
|
2305
|
+
registry.define(config.tagNames.router, Router);
|
|
2301
2306
|
}
|
|
2302
|
-
if (!
|
|
2303
|
-
|
|
2307
|
+
if (!registry.get(config.tagNames.link)) {
|
|
2308
|
+
registry.define(config.tagNames.link, Link);
|
|
2304
2309
|
}
|
|
2305
|
-
if (!
|
|
2306
|
-
|
|
2310
|
+
if (!registry.get(config.tagNames.head)) {
|
|
2311
|
+
registry.define(config.tagNames.head, Head);
|
|
2307
2312
|
}
|
|
2308
2313
|
}
|
|
2309
2314
|
|
|
@@ -2312,14 +2317,14 @@ function registerComponents() {
|
|
|
2312
2317
|
* This is the main entry point for setting up the router.
|
|
2313
2318
|
* @param config - Optional partial configuration to override defaults
|
|
2314
2319
|
*/
|
|
2315
|
-
function bootstrapRouter(config) {
|
|
2320
|
+
function bootstrapRouter(config, registry) {
|
|
2316
2321
|
if (config) {
|
|
2317
2322
|
setConfig(config);
|
|
2318
2323
|
}
|
|
2319
|
-
registerComponents();
|
|
2324
|
+
registerComponents(registry);
|
|
2320
2325
|
}
|
|
2321
2326
|
|
|
2322
|
-
var version = "1.
|
|
2327
|
+
var version = "1.31.0";
|
|
2323
2328
|
var pkg = {
|
|
2324
2329
|
version: version};
|
|
2325
2330
|
|