@iyulab/modern-app 0.56.0 → 0.56.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.56.2] - 2026-10-17
4
+
5
+ ### Fixed
6
+
7
+ - The unsaved-changes guard still asks when its dialog cannot load — a deployment replaced the hashed chunk while a tab
8
+ with an edited form stayed open, or the network is gone. The import failure reached the router as «the guard threw»,
9
+ so the screen stayed and every navigation was silently blocked; it now asks the same question with `window.confirm`
10
+ (and warns). The dialog module also loads when the first screen registers a check, not at the moment of asking.
11
+
12
+ ## [0.56.1] - 2026-10-17
13
+
14
+ ### Fixed
15
+
16
+ - `u-info-field appearance="tile"`: the corner is the card step (`--u-radius-xl`, as `u-card` and `u-group-box`) — 0.56.0
17
+ drew it a step smaller (`--u-radius-lg`, the control step).
18
+ - `u-info-field`: the `trend-icon` slot keeps a gap before the caption and sits on its middle — 0.56.0 set the icon
19
+ against the first letter.
20
+
3
21
  ## [0.56.0] - 2026-10-17
4
22
 
5
23
  ### Added
@@ -47,7 +47,7 @@ var t = e`
47
47
  :host([appearance="tile"]) {
48
48
  padding: var(--u-space-md, 12px);
49
49
  border: 1px solid var(--u-border-color, #E0E0E0);
50
- border-radius: var(--u-radius-lg, 6px);
50
+ border-radius: var(--u-radius-xl, 8px);
51
51
  background-color: var(--u-bg-color, #FFFFFF);
52
52
  box-sizing: border-box;
53
53
  }
@@ -126,6 +126,11 @@ var t = e`
126
126
  font-size: var(--u-text-caption-size, 12px);
127
127
  margin-top: var(--u-space-3xs, 2px);
128
128
  }
129
+
130
+ ::slotted([slot="trend-icon"]) {
131
+ margin-inline-end: 0.3em;
132
+ vertical-align: -0.125em;
133
+ }
129
134
 
130
135
 
131
136
  .description {
package/dist/unsaved.js CHANGED
@@ -4,7 +4,7 @@ var t = /* @__PURE__ */ new Set(), n = (e) => {
4
4
  i() && (e.preventDefault(), e.returnValue = "");
5
5
  };
6
6
  function r(e) {
7
- return t.size === 0 && typeof window < "u" && window.addEventListener("beforeunload", n), t.add(e), () => {
7
+ return t.size === 0 && typeof window < "u" && (window.addEventListener("beforeunload", n), s().catch(() => {})), t.add(e), () => {
8
8
  t.delete(e) && t.size === 0 && typeof window < "u" && window.removeEventListener("beforeunload", n);
9
9
  };
10
10
  }
@@ -17,18 +17,29 @@ function i() {
17
17
  return !1;
18
18
  }
19
19
  async function a(t) {
20
- let n = e(), { Dialog: r } = await import("@iyulab/components/dist/utilities/Dialog.js");
21
- return r.confirm(t?.message ?? n.discardMessage, {
22
- title: t?.title ?? n.discardTitle,
20
+ let n = e(), r = t?.title ?? n.discardTitle, i = t?.message ?? n.discardMessage, a;
21
+ try {
22
+ ({Dialog: a} = await s());
23
+ } catch (e) {
24
+ return console.warn("[@iyulab/modern-app] the discard-changes dialog could not load — asking with window.confirm instead:", e), typeof window < "u" && typeof window.confirm == "function" && window.confirm(`${r}\n\n${i}`);
25
+ }
26
+ return a.confirm(i, {
27
+ title: r,
23
28
  confirmLabel: t?.confirmLabel ?? n.discardConfirm,
24
29
  cancelLabel: t?.cancelLabel ?? n.discardCancel,
25
30
  confirmColor: "danger"
26
31
  });
27
32
  }
28
- function o(e) {
33
+ var o;
34
+ function s() {
35
+ return o ??= import("@iyulab/components/dist/utilities/Dialog.js").catch((e) => {
36
+ throw o = void 0, e;
37
+ }), o;
38
+ }
39
+ function c(e) {
29
40
  return !i() || a();
30
41
  }
31
- var s = class {
42
+ var l = class {
32
43
  constructor(e, t) {
33
44
  this.isDirty = t, this.clean = !1, this.check = () => !this.clean && this.isDirty(), e.addController(this);
34
45
  }
@@ -46,4 +57,4 @@ var s = class {
46
57
  }
47
58
  };
48
59
  //#endregion
49
- export { s as UnsavedChangesController, a as confirmDiscardChanges, i as hasUnsavedChanges, r as trackUnsavedChanges, o as unsavedChangesGuard };
60
+ export { l as UnsavedChangesController, a as confirmDiscardChanges, i as hasUnsavedChanges, r as trackUnsavedChanges, c as unsavedChangesGuard };
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.56.0",
4
+ "version": "0.56.2",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-framework",