Files
tools/vue/primitives/jsr.json
T
robonen ea96d720f2
Publish to NPM / Check version changes and publish (push) Successful in 9m38s
perf(primitives): place the select panel in one layout pass
`position()` interleaved geometry reads with inline-style writes: the horizontal
branch wrote `minWidth`/`left` and the vertical branch then read `scrollHeight`,
`getComputedStyle`, `offsetHeight` and `offsetTop`, and a second write of
`bottom` was followed by a read of `clientHeight`. Each read after a write
forces a synchronous layout, so a single placement cost at least two — and
placement runs on mount, on resize and while scrolling an expanding panel.

Split it into measure, compute and commit: every read now happens before the
first write, and the result is applied as one object rather than nine separate
property assignments.

The commit also always writes both edges of each axis. A resize can flip the
vertical branch from `bottom` to `top`, and the previous code left the old edge
in place, over-constraining the box.

No behavioural change — the arithmetic is untouched, and the placement tests
pass unchanged.
2026-08-10 04:37:43 +07:00

8 lines
174 B
JSON

{
"$schema": "https://jsr.io/schema/config-file.v1.json",
"name": "@robonen/primitives",
"license": "Apache-2.0",
"version": "0.0.5",
"exports": "./src/index.ts"
}