@synopackageland/ui 0.25.2 → 0.25.4
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 +31 -1
- package/dist/cli.js +0 -0
- package/dist/grid-core/renderer/layout.d.ts +7 -1
- package/dist/grid.js +1 -1
- package/dist/index.js +13 -5
- package/dist/json-preview/preview.js +178 -170
- package/dist/reka-runtime.json +1 -1
- package/dist/rich-text.js +1 -1
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/dist/virtual/galleryColumns.d.ts +5 -2
- package/docs/app-local-modal.md +11 -4
- package/package.json +91 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.25.4 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
A local change no longer restyles the whole App. Adding a row, showing a notice or opening a dialog used to make Chrome restyle every element of the App (100–500 ms per click on a busy machine); now only what the change reaches is restyled. Pages look the same: a computed-style comparison of every element and property over the component gallery and the visual pages found no difference. No API change.
|
|
6
|
+
|
|
7
|
+
Measured with `pnpm trace:restyle` (a 1,200-element settings page in a DSM window, Chrome at 4× CPU slowdown, median of 7; development build, so script time is high): opening a dialog restyles 36 elements instead of 816 (style 16 ms instead of 160 ms; first paint about 125 ms instead of 270 ms); a notice at the top of a settings page restyles 5 elements instead of 1,269 (style 3 ms instead of 185 ms); a row at the top of a form group restyles 19 elements instead of 80.
|
|
8
|
+
|
|
9
|
+
### Theme
|
|
10
|
+
|
|
11
|
+
- **Form groups and the rich text editor** space every child after the first with `:not(:first-child)` instead of `* + *` (same elements, same zero specificity). Adding a row to a `FormGroup` restyled the subtrees of all the rows after it
|
|
12
|
+
- **Settings pages** space each visible block after the first visible one with `:nth-child(n + 2 of :not([hidden]))` instead of a `~` rule. Showing a notice at the top of a `SettingsPage` restyled the whole page
|
|
13
|
+
- **The phone's aside button** hides under an open record sheet by asking the App root (`[data-ui-app]:has(…)`), not the document root
|
|
14
|
+
- **The DSM window theme** (`themes/dsm7-embedded.css`) scopes each rule to the App as `:where([data-ui-app])X, :where([data-ui-app]) X` instead of `:where([data-ui-app], [data-ui-app] *)X` (same elements, same specificity). A full restyle of an App about 25 levels deep takes about a third less time. The file is larger (57 KB instead of 47 KB gzipped)
|
|
15
|
+
|
|
16
|
+
### Dialogs and sheets (app-local modal)
|
|
17
|
+
|
|
18
|
+
- **Opening a dialog no longer makes the App's background `inert`.** Chrome restyles every element under an element whose `inert` changes, which made a dialog's first frame wait for a restyle of the whole App. The background is `aria-hidden`; the mask still takes presses, wheel and touch, Tab still loops in the dialog, focus that reaches the background goes back to the dialog, and Escape closes it. Focus left on the background when a dialog skips autofocus is released, as `inert` would. A nested dialog still makes the one under it inert
|
|
19
|
+
|
|
20
|
+
### Card grid
|
|
21
|
+
|
|
22
|
+
- **Two cards across on a tablet.** `VirtualCardGrid` gained its second column at a 640px container, so a gallery beside a sidebar on a portrait iPad (about 470px) showed one card per row. `GALLERY_BREAKPOINTS` is now `[440, 720, 1024, 1280, 1536]`: two columns from 440px, three from 720px, the wider steps unchanged. A phone (390px) keeps one. No API change
|
|
23
|
+
|
|
24
|
+
### Migration notes
|
|
25
|
+
|
|
26
|
+
- A test that checked `[data-ui-background]` for `inert` while a dialog is open should check `aria-hidden="true"` instead
|
|
27
|
+
- An App that rewrote these selectors in its own build can drop that rewrite
|
|
28
|
+
|
|
29
|
+
## 0.25.3 (2026-11-09)
|
|
30
|
+
|
|
31
|
+
### Grid
|
|
32
|
+
|
|
33
|
+
- **Cell text follows a short pan.** The canvas grid (`@synopackageland/ui/grid`) redrew its cached cell text only when the visible rows or columns changed, while backgrounds, lines and column headers followed every frame. A pan that stayed within the same columns (a finger on a tablet, a short trackpad move) left the text behind its column, so headers and cells no longer lined up. Any change of the scroll offset now redraws the cell text. No API change
|
|
4
34
|
|
|
5
35
|
## 0.25.2 (2026-11-09)
|
|
6
36
|
|
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -118,7 +118,13 @@ export declare const drawRowDraggingRegion: (ctx: CanvasRenderingContext2D, p: I
|
|
|
118
118
|
export declare const drawColumnFreezeHandler: (ctx: CanvasRenderingContext2D, p: IResolvedProps) => void;
|
|
119
119
|
/** Line after the frozen columns; a soft shadow once the body scrolls under it. */
|
|
120
120
|
export declare const drawFreezeRegionDivider: (ctx: CanvasRenderingContext2D, p: IResolvedProps) => void;
|
|
121
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Whether cached cell content must be redrawn. Any scroll offset counts, not
|
|
123
|
+
* only a change of the visible cell range: the cache holds the text at the
|
|
124
|
+
* offset it was drawn at, while backgrounds, lines and headers follow every
|
|
125
|
+
* frame, so a pan that stays within the same columns (a finger on a tablet)
|
|
126
|
+
* left the text behind its column.
|
|
127
|
+
*/
|
|
122
128
|
export declare const computeShouldRerender: (current: IGridRenderProps, last?: IGridRenderProps) => boolean;
|
|
123
129
|
/**
|
|
124
130
|
* Paints one frame. `mainCanvas` is the visible canvas; `cacheCanvas` is an
|
package/dist/grid.js
CHANGED
|
@@ -680,7 +680,7 @@ const ro = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
680
680
|
return;
|
|
681
681
|
}
|
|
682
682
|
e.save(), e.beginPath(), e.shadowColor = r, e.shadowBlur = 5, e.shadowOffsetX = 3, e.strokeStyle = r, e.moveTo(a + 0.5, 0), e.lineTo(a + 0.5, s), e.stroke(), e.restore();
|
|
683
|
-
}, ta = (e, t) => t == null ? !0 : !(e.theme === t.theme && e.columns === t.columns && e.getLinearRow === t.getLinearRow && e.real2RowIndex === t.real2RowIndex && e.drawCell === t.drawCell && e.coordInstance === t.coordInstance && e.visibleRegion === t.visibleRegion && e.forceRenderFlag === t.forceRenderFlag), na = (e, t) => {
|
|
683
|
+
}, ta = (e, t) => t == null ? !0 : !(e.scrollState.scrollLeft === t.scrollState.scrollLeft && e.scrollState.scrollTop === t.scrollState.scrollTop && e.theme === t.theme && e.columns === t.columns && e.getLinearRow === t.getLinearRow && e.real2RowIndex === t.real2RowIndex && e.drawCell === t.drawCell && e.coordInstance === t.coordInstance && e.visibleRegion === t.visibleRegion && e.forceRenderFlag === t.forceRenderFlag), na = (e, t) => {
|
|
684
684
|
const { containerWidth: n, containerHeight: o, pixelRatio: i, shouldRerender: a, draw: s } = t, r = Math.ceil(n * i), c = Math.ceil(o * i);
|
|
685
685
|
(e.width !== r || e.height !== c) && (e.width = r, e.height = c);
|
|
686
686
|
const l = e.getContext("2d");
|
package/dist/index.js
CHANGED
|
@@ -3795,10 +3795,18 @@ class Lw {
|
|
|
3795
3795
|
a.has(o) || (i(), this.hidden.delete(o));
|
|
3796
3796
|
for (const o of a) {
|
|
3797
3797
|
if (this.hidden.has(o)) continue;
|
|
3798
|
-
const i = Uc(o, "
|
|
3799
|
-
|
|
3800
|
-
i
|
|
3801
|
-
|
|
3798
|
+
const i = Uc(o, "aria-hidden", "true");
|
|
3799
|
+
if (o === t)
|
|
3800
|
+
this.hidden.set(o, i), Fe(() => {
|
|
3801
|
+
const l = o.ownerDocument.activeElement;
|
|
3802
|
+
this.hidden.has(o) && l && o.contains(l) && l.blur();
|
|
3803
|
+
});
|
|
3804
|
+
else {
|
|
3805
|
+
const l = Uc(o, "inert", "");
|
|
3806
|
+
this.hidden.set(o, () => {
|
|
3807
|
+
l(), i();
|
|
3808
|
+
});
|
|
3809
|
+
}
|
|
3802
3810
|
}
|
|
3803
3811
|
}
|
|
3804
3812
|
keydown = (n) => {
|
|
@@ -40215,7 +40223,7 @@ const bG = F3, V3 = ["aria-label", "data-ui-alignment", "data-ui-phone"], N3 = [
|
|
|
40215
40223
|
_: 3
|
|
40216
40224
|
}, 8, ["data-layout", "aria-busy"]));
|
|
40217
40225
|
}
|
|
40218
|
-
}), G3 = [
|
|
40226
|
+
}), G3 = [440, 720, 1024, 1280, 1536];
|
|
40219
40227
|
function Pp(e) {
|
|
40220
40228
|
return e > 0 ? 1 + G3.filter((n) => e >= n).length : 0;
|
|
40221
40229
|
}
|