@iyulab/modern-app 0.18.3 → 0.18.5

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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.5] - 2026-08-23
4
+
5
+ ### Fixed
6
+
7
+ - **`App.load()` now initializes i18next before checking the `auth` gate.** Same ordering bug as
8
+ `0.18.4`'s theme fix, one layer down: when `auth.me()` resolves to `null`, `load()` renders the
9
+ login screen and returns before the shell is built, but `i18next.init()` used to run only after
10
+ the auth check passed. Any `renderLogin` screen that calls `i18next.t()` for its copy rendered
11
+ with i18next uninitialized (falling back to raw keys or an empty string, depending on
12
+ `returnEmptyString`/`returnNull`). i18n setup is pure display configuration independent of auth
13
+ state, so it now runs unconditionally before the gate alongside theme and icon setup — every
14
+ render path, including the pre-auth login screen, has translations available.
15
+
16
+ ## [0.18.4] - 2026-08-23
17
+
18
+ ### Fixed
19
+
20
+ - **`App.load()` now initializes the theme before checking the `auth` gate.** When `auth.me()`
21
+ resolves to `null`, `load()` calls `auth.renderLogin()` and returns before the shell is built —
22
+ but `Theme.init()` used to run only after the auth check passed, so any `renderLogin` screen
23
+ that relies on `--u-*` design tokens (background, spacing, accent colors) rendered with no
24
+ stylesheet in the document at all. `Theme.init()` and `iconBasepath` setup are pure display
25
+ configuration independent of auth state, so they now run unconditionally before the gate —
26
+ every render path, including the pre-auth login screen, has tokens available.
27
+
3
28
  ## [0.18.3] - 2026-08-22
4
29
 
5
30
  ### Fixed
package/dist/App.js CHANGED
@@ -28,7 +28,11 @@ var o = class o {
28
28
  return t;
29
29
  }
30
30
  async load(a) {
31
- if (this.unload(), this._config = a, a.auth) {
31
+ if (this.unload(), this._config = a, await i.init(a.theme), a.iconBasepath && r(a.iconBasepath), a.i18n) {
32
+ for (let e of a.i18n.plugins || []) t.use(e);
33
+ await t.init(a.i18n);
34
+ }
35
+ if (a.auth) {
32
36
  let e = await a.auth.me();
33
37
  if (e == null) {
34
38
  let e = a.root || document.body, t = a.auth.renderLogin({
@@ -42,10 +46,6 @@ var o = class o {
42
46
  }
43
47
  this._user = e, await a.auth.onAuthenticated?.(e);
44
48
  }
45
- if (await i.init(a.theme), a.iconBasepath && r(a.iconBasepath), a.i18n) {
46
- for (let e of a.i18n.plugins || []) t.use(e);
47
- await t.init(a.i18n);
48
- }
49
49
  let o = a.root || document.body;
50
50
  this._layout = await this.createLayout(o, a.layout), this._screen = new e({
51
51
  element: o,
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.18.3",
4
+ "version": "0.18.5",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-framework",