@iyulab/modern-app 0.19.1 → 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 +25 -0
- package/dist/components/SidebarLink.styles.js +1 -1
- package/dist/components/SidebarSection.styles.js +1 -1
- package/dist/layouts/SidebarLayout.d.ts +3 -1
- package/dist/layouts/SidebarLayout.js +16 -8
- package/dist/layouts/SidebarLayout.styles.js +1 -1
- package/package.json +2 -2
- package/skills/modern-app/references/api.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
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
|
+
|
|
15
|
+
## [0.19.2] - 2026-09-13
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **The development-mode "shell has no sized ancestor" warning now goes through
|
|
20
|
+
`@iyulab/components`' shared `createDevWarner`** instead of an inline copy — same message, same
|
|
21
|
+
`[@iyulab/modern-app]` prefix, once per layout, compiled out of production builds. The
|
|
22
|
+
`@iyulab/components` peer floor moves to `>=1.40.2`, the version that exports the helper.
|
|
23
|
+
- **Docs: `RouteConfig` snippets now show `key` instead of the removed `force`** (`docs/routing.md`,
|
|
24
|
+
`docs/configuration.md`, the skill's `api.md`) — they were still describing the option
|
|
25
|
+
`@iyulab/router` deprecated in 0.12.0 and removed in 0.13.0, and did not yet mention its
|
|
26
|
+
replacement.
|
|
27
|
+
|
|
3
28
|
## [0.19.1] - 2026-09-13
|
|
4
29
|
|
|
5
30
|
### Added
|
|
@@ -20,7 +20,7 @@ var t = e`
|
|
|
20
20
|
WCAG AA(4.5:1)에 미달한다. 현행 두 값은 6.19:1 · 4.61:1 로 통과한다.
|
|
21
21
|
⇒ 역할 층에 AA 를 넘는 보조 텍스트 단이 생기면 그때 옮긴다. */
|
|
22
22
|
/*
|
|
23
|
-
* ★크기·굵기·자간은 스케일의 단으로 옮겼다(용도 배정
|
|
23
|
+
* ★크기·굵기·자간은 스케일의 단으로 옮겼다(용도 배정). 위 주석은 **색**에
|
|
24
24
|
* 대한 것이고 그대로 유효하다: 두 색은 여전히 팔레트를 직접 읽는다.
|
|
25
25
|
* ⚠ overline 에 대문자 변환을 붙이지 않는다 — 이 줄에 ellipsis 가 있어 잘림이 늘고,
|
|
26
26
|
* 섹션 이름은 소비자가 쓴 글자다(CJK 에는 효과도 없다).
|
|
@@ -26,11 +26,13 @@ export declare class SidebarLayout extends StyledElement<SidebarParts> {
|
|
|
26
26
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
27
27
|
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
28
28
|
/**
|
|
29
|
-
* 개발 모드 사용
|
|
29
|
+
* 개발 모드 사용 안내: 이 셸은 `:host { height: 100% }` 로 부모를 채우는데, 부모(커스텀
|
|
30
30
|
* root)에 높이가 없으면 걸릴 곳이 없어 자기 크롬 높이(실측 약 133px)로 앉는다 — 오류도 경고도 없이
|
|
31
31
|
* 라우트 콘텐츠 영역이 몇 줄짜리 띠가 된다. 첫 배치 뒤 한 번 재서 알린다.
|
|
32
32
|
* 임계값은 규칙이라 손으로 쓴다 — 앱 셸이 200px 보다 낮은 것이 의도인 경우는 없다.
|
|
33
|
+
* 경고 자체는 components 의 공유 규약(네임스페이스 · DEV 한정 · 키당 한 번)을 쓴다.
|
|
33
34
|
*/
|
|
35
|
+
private readonly unsizedWarnKey;
|
|
34
36
|
private warnIfUnsized;
|
|
35
37
|
render(): typeof nothing | import('lit-html').TemplateResult<1>;
|
|
36
38
|
/** 사이드바 아이템 렌더링 */
|
|
@@ -16,17 +16,19 @@ import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
|
16
16
|
import { unsafeHTML as p } from "lit/directives/unsafe-html.js";
|
|
17
17
|
import { repeat as m } from "lit/directives/repeat.js";
|
|
18
18
|
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
19
|
-
import {
|
|
19
|
+
import { createDevWarner as g } from "@iyulab/components/dist/utilities/devWarning.js";
|
|
20
|
+
import { UProgressBar as _ } from "@iyulab/components/dist/components/progress-bar/UProgressBar.js";
|
|
20
21
|
//#region src/layouts/SidebarLayout.ts
|
|
21
|
-
|
|
22
|
+
var v = g("@iyulab/modern-app"), y = 0;
|
|
23
|
+
function b(e) {
|
|
22
24
|
let t = e.tagName;
|
|
23
25
|
if (t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable) return !0;
|
|
24
26
|
let n = e.getAttribute("role");
|
|
25
27
|
return n === "textbox" || n === "searchbox" || n === "combobox" || n === "spinbutton";
|
|
26
28
|
}
|
|
27
|
-
var
|
|
29
|
+
var x = class extends i {
|
|
28
30
|
constructor(...t) {
|
|
29
|
-
super(...t), this.state = "default", this.locale = "", this.context = null, 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) => () => {
|
|
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) => () => {
|
|
30
32
|
e.navigate(t ?? "");
|
|
31
33
|
}, this.handleToggleButtonClick = () => {
|
|
32
34
|
let t = e.screen ?? "large";
|
|
@@ -49,7 +51,7 @@ var v = class extends i {
|
|
|
49
51
|
}, 300);
|
|
50
52
|
}, this._handleMainKeydown = (e) => {
|
|
51
53
|
let t = e.composedPath()[0];
|
|
52
|
-
if (t instanceof HTMLElement &&
|
|
54
|
+
if (t instanceof HTMLElement && b(t)) return;
|
|
53
55
|
let n = this.shadowRoot?.querySelector(".main");
|
|
54
56
|
if (!n) return;
|
|
55
57
|
let r = n.clientHeight;
|
|
@@ -99,7 +101,13 @@ var v = class extends i {
|
|
|
99
101
|
firstUpdated(e) {
|
|
100
102
|
super.firstUpdated(e), this.warnIfUnsized();
|
|
101
103
|
}
|
|
102
|
-
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
|
+
}
|
|
103
111
|
render() {
|
|
104
112
|
return this.config ? s`
|
|
105
113
|
<!-- Mobile Header -->
|
|
@@ -249,6 +257,6 @@ var v = class extends i {
|
|
|
249
257
|
r([u({
|
|
250
258
|
type: String,
|
|
251
259
|
reflect: !0
|
|
252
|
-
}), 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);
|
|
253
261
|
//#endregion
|
|
254
|
-
export {
|
|
262
|
+
export { x as SidebarLayout };
|
|
@@ -30,7 +30,7 @@ var t = e`
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/*
|
|
33
|
-
* ★단 배정은 «관측값 근사»가 아니라 «용도»로 한다
|
|
33
|
+
* ★단 배정은 «관측값 근사»가 아니라 «용도»로 한다 — 이 자리는 앱의 제목이다.
|
|
34
34
|
* 종전 18px 은 스케일에 없는 값이었고, 같은 판정을 이미 u-dialog·u-drawer 제목에
|
|
35
35
|
* 내린 적이 있다(L2-3, 18px → subtitle).
|
|
36
36
|
* ⚠줄 박스는 바뀌지 않는다: 16 x 1.5 = 24px = 종전 line-height. 헤더 높이 불변.
|
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.
|
|
68
|
+
"@iyulab/components": ">=1.40.3",
|
|
69
69
|
"@lit/react": ">=1.0.8",
|
|
70
70
|
"react": ">=18.0.0"
|
|
71
71
|
},
|
|
@@ -105,8 +105,8 @@ interface RouteConfig {
|
|
|
105
105
|
/** Sets `document.title` when the route activates. */
|
|
106
106
|
title?: string;
|
|
107
107
|
|
|
108
|
-
/**
|
|
109
|
-
|
|
108
|
+
/** When to remount — content is kept while `key(ctx)` is unchanged. Default `ctx => ctx.href` (leaf) / constant (has `children`). */
|
|
109
|
+
key?: (ctx: RouteContext) => string;
|
|
110
110
|
|
|
111
111
|
/** Case-insensitive path matching. Defaults to `false`. */
|
|
112
112
|
ignoreCase?: boolean;
|