@iyulab/modern-app 0.47.0 → 0.47.1
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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.47.1] - 2026-10-08
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **The default fallback titles the tab like the screen** — "You don’t have access", "Page not found" or
|
|
8
|
+
"Couldn’t open this page" (localized). The tab showed the router's diagnostic message instead
|
|
9
|
+
(`Page not found: http://…/x`, `Access denied: /admin`). Requires `@iyulab/router` 0.21, whose `fallback.title`
|
|
10
|
+
may be a function of the failure; the dependency range is now `^0.21.0`.
|
|
11
|
+
- A route whose `render()` throws `NotFoundError` (the record does not exist) now gets the `not-found` screen —
|
|
12
|
+
router 0.21 passes a `RouteError` from `render()` through instead of wrapping it as a load failure.
|
|
13
|
+
|
|
3
14
|
## [0.47.0] - 2026-10-08
|
|
4
15
|
|
|
5
16
|
### Changed
|
|
@@ -7,9 +7,11 @@ import { EmptyStateVariant } from '../components/EmptyState.js';
|
|
|
7
7
|
* 남의 외형이었고, 권한 거부(403)도 «장애» 처럼 보였다.
|
|
8
8
|
*
|
|
9
9
|
* - 403 → `no-access`(라우트 가드의 거부) · 404 → `not-found` · 그 밖 → `error`(오류 메시지가 설명).
|
|
10
|
-
* - 판정은 클래스가 아니라 **코드**로 한다 — `AccessDeniedError`·`NotFoundError` 가 403·404 를 싣고,
|
|
11
|
-
* `{ status: 404 }` 류도 router 가 같은 코드의 `RouteError` 로
|
|
12
|
-
* 코드로 내지 않고
|
|
10
|
+
* - 판정은 클래스가 아니라 **코드**로 한다 — `AccessDeniedError`·`NotFoundError` 가 403·404 를 싣고, 가드가 던진
|
|
11
|
+
* `{ status: 404 }` 류도 router 가 같은 코드의 `RouteError` 로 감싸며, `render()` 가 던진 `NotFoundError`
|
|
12
|
+
* (레코드 없음)는 router 0.21 부터 그대로 닿는다. 진단 코드(`OUTLET_MISSING` 등)는 화면에 코드로 내지 않고
|
|
13
|
+
* 메시지를 설명으로 쓴다.
|
|
14
|
+
* - 탭 제목은 화면 제목과 같다 — 오류 메시지(`Page not found: http://…`)는 진단이지 제목이 아니다.
|
|
13
15
|
* - 소비자가 `fallback` 을 주면 그것이 그대로 이긴다(이 모듈은 쓰이지 않는다).
|
|
14
16
|
*/
|
|
15
17
|
export declare function variantOf(error: Pick<RouteError, 'code'>): EmptyStateVariant;
|
|
@@ -8,9 +8,20 @@ function n(e) {
|
|
|
8
8
|
default: return "error";
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
function r(t) {
|
|
12
|
+
let r = e();
|
|
13
|
+
switch (n(t.error)) {
|
|
14
|
+
case "no-access": return r.noAccessTitle;
|
|
15
|
+
case "not-found": return r.notFoundTitle;
|
|
16
|
+
default: return r.routeErrorTitle;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
var i = {
|
|
20
|
+
title: r,
|
|
21
|
+
render: (e) => {
|
|
22
|
+
let i = new t();
|
|
23
|
+
return i.variant = n(e.error), i.variant === "error" && (i.title = r(e), i.description = e.error.message), i;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
15
26
|
//#endregion
|
|
16
|
-
export {
|
|
27
|
+
export { i as defaultFallback, n as variantOf };
|
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.47.
|
|
4
|
+
"version": "0.47.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-framework",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"test:react-types": "tsc -p tsconfig.react-smoke.json"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@iyulab/router": "^0.
|
|
63
|
+
"@iyulab/router": "^0.21.0",
|
|
64
64
|
"i18next": "^26.3.6",
|
|
65
65
|
"lit": "^3.3.3"
|
|
66
66
|
},
|