lit-ui-router 1.11.0 → 1.11.2
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/README.md +6 -0
- package/dist/dev-warn.js +1 -6
- package/dist/dev-warn.js.map +1 -1
- package/dist/development/dev-warn.js.map +1 -1
- package/package.json +1 -1
- package/src/dev-warn.ts +2 -0
package/README.md
CHANGED
|
@@ -45,6 +45,12 @@ registries or custom tag names) without touching the global registry, and pair
|
|
|
45
45
|
it with `lit-ui-router/register` — or a single `*.register` entry — to opt
|
|
46
46
|
into registration explicitly.
|
|
47
47
|
|
|
48
|
+
## Development and Production Builds
|
|
49
|
+
|
|
50
|
+
Every entry point above publishes twice: `dist/development/*.js` alongside `dist/*.js`, picked by the `development` export condition, which bundlers resolve automatically. Nothing to configure.
|
|
51
|
+
|
|
52
|
+
The development build carries three console warnings — `uiSref` writing an inert `href`, `uiSrefActive` taking over an `aria-current` it did not set, and any binding finding no `<ui-router>` ancestor. Each is gated on lit's own development build as well, and none of them, message text included, is present in a production bundle. See the [Development & Production Builds guide](https://lit-ui-router.dev/guides/development-builds) for what each warning means and how the split is verified.
|
|
53
|
+
|
|
48
54
|
## Component Styles
|
|
49
55
|
|
|
50
56
|
| Style | Best For | Example |
|
package/dist/dev-warn.js
CHANGED
|
@@ -2,10 +2,5 @@ import { UIRouterLitElement } from "./ui-router.js";
|
|
|
2
2
|
export function inLitDevMode() {
|
|
3
3
|
return typeof UIRouterLitElement.enableWarning === "function";
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
export function warnMissingRouter(element, subject, consequence) {
|
|
7
|
-
if (!inLitDevMode() || warnedMissingRouter.has(element)) return;
|
|
8
|
-
warnedMissingRouter.add(element);
|
|
9
|
-
console.warn(`lit-ui-router: ${subject} found no <ui-router> ancestor, so it ${consequence}. Wrap this subtree in <ui-router>, or pass a router explicitly.`, element);
|
|
10
|
-
}
|
|
5
|
+
export function warnMissingRouter(element, subject, consequence) {}
|
|
11
6
|
//# sourceMappingURL=dev-warn.js.map
|
package/dist/dev-warn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-warn.js","mappings":"AAAA,SAAS,0BAA0B;AAUnC,OAAO,SAAS,eAAwB;CACtC,OAAO,OAAO,mBAAmB,kBAAkB;AACrD;
|
|
1
|
+
{"version":3,"file":"dev-warn.js","mappings":"AAAA,SAAS,0BAA0B;AAUnC,OAAO,SAAS,eAAwB;CACtC,OAAO,OAAO,mBAAmB,kBAAkB;AACrD;AA2BA,OAAO,SAAS,kBACd,SACA,SACA,aACM,CAYR","names":[],"ignoreList":[],"sources":["../src/dev-warn.ts"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-warn.js","mappings":"AAAA,SAAS,0BAA0B;AAUnC,OAAO,SAAS,eAAwB;CACtC,OAAO,OAAO,mBAAmB,kBAAkB;AACrD;AAUA,MAAM,sBAAsB,IAAI,QAAiB;AAiBjD,OAAO,SAAS,kBACd,SACA,SACA,aACM;
|
|
1
|
+
{"version":3,"file":"dev-warn.js","mappings":"AAAA,SAAS,0BAA0B;AAUnC,OAAO,SAAS,eAAwB;CACtC,OAAO,OAAO,mBAAmB,kBAAkB;AACrD;AAUA,MAAM,sBAAsB,IAAI,QAAiB;AAiBjD,OAAO,SAAS,kBACd,SACA,SACA,aACM;CAGN,IAAI,CAAC,aAAa,KAAK,oBAAoB,IAAI,OAAO,GACpD;CAEF,oBAAoB,IAAI,OAAO;CAC/B,QAAQ,KACN,kBAAkB,QAAQ,wCAAwC,YAAY,mEAE9E,OACF;AACF","names":[],"ignoreList":[],"sources":["../../src/dev-warn.ts"]}
|
package/package.json
CHANGED
package/src/dev-warn.ts
CHANGED
|
@@ -42,6 +42,8 @@ export function warnMissingRouter(
|
|
|
42
42
|
subject: string,
|
|
43
43
|
consequence: string,
|
|
44
44
|
): void {
|
|
45
|
+
// DEV folds the whole body out of dist/*.js (check:dev-split); inLitDevMode() is the runtime probe.
|
|
46
|
+
if (!import.meta.env.DEV) return;
|
|
45
47
|
if (!inLitDevMode() || warnedMissingRouter.has(element)) {
|
|
46
48
|
return;
|
|
47
49
|
}
|