@synopackageland/ui 0.25.20 → 0.25.21

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
@@ -2,6 +2,26 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.25.21 (2026-11-15)
6
+
7
+ Three style passes on a sheet's opening path no longer run in script. On Studio's ordering sheet on an Android phone (Chrome, 3 alternating rounds of 5 opens against the previous release, 31.4–31.5°C, thermal status 0), the frame that ends the slide takes 17 ms (median; was 50 ms). The time to the sheet's first frame (155–168 ms), to the start of the slide (344–384 ms either way) and the longest gap during the slide (67–84 ms) are unchanged. The priming wait is unchanged: what holds the slide is the app's own work after the first frame (about 150–200 ms), and the slide already starts in the first frame after it.
8
+
9
+ ### Dialog, Sheet, BottomSheet
10
+
11
+ - **The page's scroll lock reads the scrollbar in the next frame.** A modal overlay that locks the document (`overflow: hidden`, the scrollbar's width as `padding-right` and `--scrollbar-width`) used to read `document.documentElement.clientWidth` in the task that opened it, which made the browser compute the style and layout of the just-mounted overlay there (11–23 ms on the phone). The lock now lands at the start of the next frame, before it is drawn, where the browser computes them anyway. Closing before that frame leaves the page untouched. This is a Reka patch (`build/reka-patches.json`); the installed Reka is not modified.
12
+
13
+ ### BottomSheet
14
+
15
+ - **Touch focus after the slide no longer lengthens its last frame.** At `animationend` the page's style is out of date, so focusing the panel there computed it inside the event (33–46 ms on the phone, most of it the tapped card losing focus). The panel now takes focus in a task after the frame that ends the slide has painted, one frame later than before. A field the user focused first still keeps focus; with a mouse, or after a key press, focus moves at once as before.
16
+
17
+ ### FormItem
18
+
19
+ - **No layout read when it mounts.** The automatic stacking (`direction: 'auto'`) takes the item's first width from a ResizeObserver delivery in the next frame, instead of `getBoundingClientRect()` at mount (10–16 ms on the phone inside a sheet that has just opened). The width is still drawn in that first frame. `useElementWidth` takes the new option `observeFirst` for this; its other users still read at mount.
20
+
21
+ ### Combobox
22
+
23
+ - **A closed input shows the selected option's current label.** When the options change, for example when they arrive after mount or an option is renamed, the closed input now shows the label from the new options instead of the old label or the stored value. A search in progress is left as typed, and the label update emits no `update:modelValue`.
24
+
5
25
  ## 0.25.20 (2026-11-14)
6
26
 
7
27
  ### BottomSheet
@@ -3,8 +3,15 @@ import { Ref } from 'vue';
3
3
  * resize the document viewport. Zero is unknown (e.g. hidden tab or SSR).
4
4
  * `after` holds the first measurement until it is true (a containing layout
5
5
  * that has not drawn its own measured layout yet); `onMeasured` runs once the
6
- * first measurement has been drawn. */
6
+ * first measurement has been drawn.
7
+ *
8
+ * `observeFirst` takes the first width from a ResizeObserver delivery instead
9
+ * of reading it at mount. A read at mount forces the browser to compute the
10
+ * style and layout of everything changed so far in that task (a sheet that has
11
+ * just opened, say); the delivery comes in the next frame's own layout, and the
12
+ * width it commits is drawn in that same frame. */
7
13
  export declare function useElementWidth(element: Readonly<Ref<HTMLElement | null | undefined>>, options?: {
8
14
  after?: Readonly<Ref<boolean>>;
9
15
  onMeasured?: () => void;
16
+ observeFirst?: boolean;
10
17
  }): Ref<number, number>;