@iyulab/modern-app 0.19.2 → 0.19.3
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.md +12 -0
- package/dist/layouts/SidebarLayout.js +14 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.19.3] - 2026-09-13
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **The "shell has no sized ancestor" dev-mode warning was a complete no-op** — its own guard used
|
|
8
|
+
`import.meta.env.DEV`, which Vite resolves statically at this package's own build time, so the
|
|
9
|
+
published dist always shipped with the check baked to `false` and the warning removed entirely
|
|
10
|
+
by dead-code elimination. Replaced with `process.env.NODE_ENV !== 'production'`. The
|
|
11
|
+
`@iyulab/components` peer floor moves to `>=1.40.3`, which fixes the identical defect in the
|
|
12
|
+
shared `createDevWarner` helper this warning calls into — installing 0.19.3 without that
|
|
13
|
+
components fix would still produce no warning.
|
|
14
|
+
|
|
3
15
|
## [0.19.2] - 2026-09-13
|
|
4
16
|
|
|
5
17
|
### Changed
|
|
@@ -19,17 +19,16 @@ import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
|
19
19
|
import { createDevWarner as g } from "@iyulab/components/dist/utilities/devWarning.js";
|
|
20
20
|
import { UProgressBar as _ } from "@iyulab/components/dist/components/progress-bar/UProgressBar.js";
|
|
21
21
|
//#region src/layouts/SidebarLayout.ts
|
|
22
|
-
g("@iyulab/modern-app");
|
|
23
|
-
|
|
24
|
-
function y(e) {
|
|
22
|
+
var v = g("@iyulab/modern-app"), y = 0;
|
|
23
|
+
function b(e) {
|
|
25
24
|
let t = e.tagName;
|
|
26
25
|
if (t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable) return !0;
|
|
27
26
|
let n = e.getAttribute("role");
|
|
28
27
|
return n === "textbox" || n === "searchbox" || n === "combobox" || n === "spinbutton";
|
|
29
28
|
}
|
|
30
|
-
var
|
|
29
|
+
var x = class extends i {
|
|
31
30
|
constructor(...t) {
|
|
32
|
-
super(...t), this.state = "default", this.locale = "", this.context = null, this.unsizedWarnKey = `unsized:${++
|
|
31
|
+
super(...t), this.state = "default", this.locale = "", this.context = null, this.unsizedWarnKey = `unsized:${++y}`, this.isMatchedLink = (e) => !this.context || !e ? !1 : (e = typeof e == "string" ? new URLPattern(e, window.location.origin) : e, e.test(this.context.path, window.location.origin)), this.handleBrandLogoClick = (t) => () => {
|
|
33
32
|
e.navigate(t ?? "");
|
|
34
33
|
}, this.handleToggleButtonClick = () => {
|
|
35
34
|
let t = e.screen ?? "large";
|
|
@@ -52,7 +51,7 @@ var b = class extends i {
|
|
|
52
51
|
}, 300);
|
|
53
52
|
}, this._handleMainKeydown = (e) => {
|
|
54
53
|
let t = e.composedPath()[0];
|
|
55
|
-
if (t instanceof HTMLElement &&
|
|
54
|
+
if (t instanceof HTMLElement && b(t)) return;
|
|
56
55
|
let n = this.shadowRoot?.querySelector(".main");
|
|
57
56
|
if (!n) return;
|
|
58
57
|
let r = n.clientHeight;
|
|
@@ -102,7 +101,13 @@ var b = class extends i {
|
|
|
102
101
|
firstUpdated(e) {
|
|
103
102
|
super.firstUpdated(e), this.warnIfUnsized();
|
|
104
103
|
}
|
|
105
|
-
warnIfUnsized() {
|
|
104
|
+
warnIfUnsized() {
|
|
105
|
+
process.env.NODE_ENV !== "production" && requestAnimationFrame(() => {
|
|
106
|
+
if (!this.isConnected) return;
|
|
107
|
+
let e = this.getBoundingClientRect().height;
|
|
108
|
+
e >= 200 || v(this.unsizedWarnKey, `u-sidebar-layout is only ${Math.round(e)}px tall — its height: 100% found no sized ancestor, so the shell sits at its own chrome height and the route area has almost no room. Give the root element a height (e.g. #app { height: 100vh } — app.load() does this for document.body).`);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
106
111
|
render() {
|
|
107
112
|
return this.config ? s`
|
|
108
113
|
<!-- Mobile Header -->
|
|
@@ -252,6 +257,6 @@ var b = class extends i {
|
|
|
252
257
|
r([u({
|
|
253
258
|
type: String,
|
|
254
259
|
reflect: !0
|
|
255
|
-
}), n("design:type", Object)],
|
|
260
|
+
}), n("design:type", Object)], x.prototype, "state", void 0), r([u({ type: Object }), n("design:type", Object)], x.prototype, "config", void 0), r([u({ type: String }), n("design:type", Object)], x.prototype, "locale", void 0), r([d("u-progress-bar"), n("design:type", _ === void 0 ? Object : _)], x.prototype, "progressBarEl", void 0), r([f(), n("design:type", Object)], x.prototype, "context", void 0), x = r([l("u-sidebar-layout")], x);
|
|
256
261
|
//#endregion
|
|
257
|
-
export {
|
|
262
|
+
export { x as SidebarLayout };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/modern-app",
|
|
3
3
|
"description": "web-framework by iyulab based on lit-element",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-framework",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"lit": "^3.3.3"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@iyulab/components": ">=1.40.
|
|
68
|
+
"@iyulab/components": ">=1.40.3",
|
|
69
69
|
"@lit/react": ">=1.0.8",
|
|
70
70
|
"react": ">=18.0.0"
|
|
71
71
|
},
|