diff --git a/.changeset/pre.json b/.changeset/pre.json index 083a38e0..8bd9cae1 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -18,5 +18,38 @@ "@plextv/vite-plugin-react-native-lightning": "0.4.3", "@plextv/vite-plugin-react-reanimated-lightning": "0.4.3" }, - "changesets": [] + "changesets": [ + "css-transform-keyword-colors", + "flatten-exit-animation-materialize", + "flatten-layout-views", + "flatten-scroll-fold-through", + "flexbox-layout-benchmark", + "flexbox-logical-position-insets", + "flexbox-missing-glyph-fallback", + "flexbox-reset-dropped-style-props", + "flexbox-sync-flush-settled", + "focus-skip-empty-groups", + "lightning-animated-transform-and-resting-styles", + "lightning-aspect-ratio", + "lightning-border-shader-clear", + "lightning-find-node-handle", + "lightning-flex-nonzero-sizing", + "lightning-flex-shrink-on-child-removal", + "lightning-focus-engine", + "lightning-image-border-paint", + "lightning-input-events", + "lightning-pressable-focused-state", + "lightning-same-parent-reorder", + "lightning-shader-partial-update", + "lightning-text-intrinsic-sizing", + "lightning-virtuallist-parity", + "lightning-worker-font-url", + "percent-translate-own-size", + "reanimated-dep-inference", + "rounded-clipping-option", + "two-geese-stand", + "virtuallist-pin-cross-axis", + "virtuallist-pin-section-cross-axis", + "virtuallist-reveal-on-settled" + ] } diff --git a/apps/react-lightning-example/CHANGELOG.md b/apps/react-lightning-example/CHANGELOG.md index b9d2f571..54b2099b 100644 --- a/apps/react-lightning-example/CHANGELOG.md +++ b/apps/react-lightning-example/CHANGELOG.md @@ -1,5 +1,43 @@ # @plextv/react-lightning-example +## 0.4.4-alpha.0 + +### Patch Changes + +- Updated dependencies [6ced46f] +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [658f68e] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [0647e88] +- Updated dependencies [7f54f81] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning-plugin-css-transform@0.4.3-alpha.0 + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + - @plextv/react-lightning-components@0.4.4-alpha.0 + ## 0.4.3 ### Patch Changes diff --git a/apps/react-lightning-example/package.json b/apps/react-lightning-example/package.json index 0536266f..a5a43417 100644 --- a/apps/react-lightning-example/package.json +++ b/apps/react-lightning-example/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-example", - "version": "0.4.3", + "version": "0.4.4-alpha.0", "private": true, "description": "Sample implementation of @plextv/react-lightning in a React app", "bugs": { diff --git a/apps/react-native-lightning-example/CHANGELOG.md b/apps/react-native-lightning-example/CHANGELOG.md index 486cbf86..0a7ecd3f 100644 --- a/apps/react-native-lightning-example/CHANGELOG.md +++ b/apps/react-native-lightning-example/CHANGELOG.md @@ -1,5 +1,49 @@ # @plextv/react-native-lightning-example +## 0.4.4-alpha.0 + +### Patch Changes + +- Updated dependencies [6ced46f] +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [58a3c4d] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [48f2025] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [658f68e] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [e1a8ad2] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [0647e88] +- Updated dependencies [7f54f81] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning-plugin-css-transform@0.4.3-alpha.0 + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-reanimated@0.4.3-alpha.0 + - @plextv/react-native-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-components@0.4.4-alpha.0 + - @plextv/react-native-lightning-components@0.4.3-alpha.0 + ## 0.4.3 ### Patch Changes diff --git a/apps/react-native-lightning-example/package.json b/apps/react-native-lightning-example/package.json index de9735c7..76743b92 100644 --- a/apps/react-native-lightning-example/package.json +++ b/apps/react-native-lightning-example/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-native-lightning-example", - "version": "0.4.3", + "version": "0.4.4-alpha.0", "private": true, "description": "Sample implementation of @plextv/react-native-lightning in a React Native app", "bugs": { diff --git a/apps/storybook/CHANGELOG.md b/apps/storybook/CHANGELOG.md index 3e7490b3..38ab8398 100644 --- a/apps/storybook/CHANGELOG.md +++ b/apps/storybook/CHANGELOG.md @@ -1,5 +1,50 @@ # @plextv/react-lightning-storybook +## 0.4.4-alpha.0 + +### Patch Changes + +- Updated dependencies [6ced46f] +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [58a3c4d] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [48f2025] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [658f68e] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [e1a8ad2] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [0647e88] +- Updated dependencies [7f54f81] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning-plugin-css-transform@0.4.3-alpha.0 + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-reanimated@0.4.3-alpha.0 + - @plextv/react-native-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-components@0.4.4-alpha.0 + - @plextv/react-lightning-plugin-flexbox-lite@0.4.3-alpha.0 + - @plextv/react-native-lightning-components@0.4.3-alpha.0 + ## 0.4.3 ### Patch Changes diff --git a/apps/storybook/package.json b/apps/storybook/package.json index 9599cec6..7a0a550e 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-storybook", - "version": "0.4.3", + "version": "0.4.4-alpha.0", "private": true, "description": "Documentation for react-lightning", "bugs": { diff --git a/packages/plugin-css-transform/CHANGELOG.md b/packages/plugin-css-transform/CHANGELOG.md index 8eb45294..ec9f9876 100644 --- a/packages/plugin-css-transform/CHANGELOG.md +++ b/packages/plugin-css-transform/CHANGELOG.md @@ -1,5 +1,39 @@ # @plextv/react-lightning-plugin-css-transform +## 0.4.3-alpha.0 + +### Patch Changes + +- 6ced46f: Drop unresolvable CSS keyword colors (`inherit`, `currentColor`, `initial`, `unset`, `revert`) instead of throwing. They have no fixed value to resolve, so they reached the invalid-hex throw and took the whole screen down via the error boundary. Now the property is omitted. Also keep zero-valued transform values (`if (value != null)`), which the previous truthy check dropped. +- 8d993ca: Resolve percentage translateX/translateY against the node's own size (RN semantics). The css-transform converter used parseInt, which stripped the % and treated the number as pixels; the flexbox plugin now stashes the percentage and resolves it at layout readback, once the node's computed size is known, and keeps emitting the node on passes that don't dirty yoga. +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/plugin-css-transform/package.json b/packages/plugin-css-transform/package.json index c4b5a62f..c1d6f5a6 100644 --- a/packages/plugin-css-transform/package.json +++ b/packages/plugin-css-transform/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-plugin-css-transform", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "Transforms CSS properties to lightning properties. Requires @plextv/react-lightning-plugin-flexbox", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/plugin-flexbox-lite/CHANGELOG.md b/packages/plugin-flexbox-lite/CHANGELOG.md index fc0b576e..dda8f8c0 100644 --- a/packages/plugin-flexbox-lite/CHANGELOG.md +++ b/packages/plugin-flexbox-lite/CHANGELOG.md @@ -1,5 +1,25 @@ # @plextv/react-lightning-plugin-flexbox-lite +## 0.4.3-alpha.0 + +### Patch Changes + +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [3a9a0c7] +- Updated dependencies [01a42e4] +- Updated dependencies [7005125] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] + - @plextv/react-lightning@0.4.3-alpha.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/plugin-flexbox-lite/package.json b/packages/plugin-flexbox-lite/package.json index 829dde3c..316fc010 100644 --- a/packages/plugin-flexbox-lite/package.json +++ b/packages/plugin-flexbox-lite/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-plugin-flexbox-lite", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "A less featured but more efficient flex layout support to @plextv/react-lightning", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/plugin-flexbox/CHANGELOG.md b/packages/plugin-flexbox/CHANGELOG.md index 9f34b775..8891c6c8 100644 --- a/packages/plugin-flexbox/CHANGELOG.md +++ b/packages/plugin-flexbox/CHANGELOG.md @@ -1,5 +1,57 @@ # @plextv/react-lightning-plugin-flexbox +## 0.4.3-alpha.0 + +### Patch Changes + +- df7da6a: Add a deterministic layout benchmark (synthetic home/details/grid/epg pages run through the real managers) with a baseline gate, so layout changes are checked instead of eyeballed. +- 69653c6: Logical `start`/`end` position insets now map to yoga's `EDGE_START`/`EDGE_END` (LTR), matching the existing logical margin/padding handling. Previously they were silently dropped, so an absolutely positioned box pinned with `end: 0` fell back to the left edge. +- 5e69f9c: Measure missing glyphs at the ? fallback advance so text boxes match painted output +- c34f03c: Reset yoga props to their defaults when a style re-apply drops them +- ec4f817: Add a synchronous flushLayout() that lays out to a fixpoint, and a settled event that fires once layout converges. Deterministic replacement for the timer-based "has it settled yet" guesses in VirtualList. +- 4a7e3a4: fix(reanimated): apply animated transforms and replay resting styles to late-attached nodes + + Two gaps stopped a reanimated `transform` (e.g. a scroll-linked `translateY`) from reaching a laid-out node. The flexbox worker proxy filtered every non-flex style key before postMessage, so `transform` was dropped even though the worker-side Yoga already applies it as a top/left offset (and the serializer special-cases transform objects) — let it through. And `useAnimatedStyle` only pushed styles when a shared value changed, so a view that registers after the fact (recycled cell, re-created node) never got the current resting value; `AnimatedStyle` now exposes `applyToView`, which `createAnimatedComponent` calls on registration to replay the last-applied styles. Replay-only on purpose: computing a fresh value at attach time pushed states the normal flow never emitted and broke focus on some nodes. + +- f31d1d1: fix(flexbox): parse string `aspectRatio` values so ratio-sized nodes get a box + + React Native accepts `aspectRatio` as a number (`1.5`), a ratio string (`'3/2'`), or a numeric string (`'1.5'`), but the value was passed straight to Yoga's `setAspectRatio`, which only takes a number. String forms became `NaN` and the ratio was silently dropped — so a node sized only by `aspectRatio` plus one dimension (e.g. an image with `aspectRatio: '3/2'` and `height: '65%'` but no width) resolved to zero width and never painted. String ratios are now parsed to a number before being applied. + +- 7005125: fix(flexbox): withhold paint until first layout to avoid the async-flex origin flash + + Flex layout is computed asynchronously (in a worker), so a definite-sized node mounts and paints at its pre-layout origin (0,0) for a frame or two before the layout result moves it. A node now keeps its rendered alpha at 0 from mount until its first layout resolves, then restores the styled alpha (`withholdPaintUntilLayout` / `releaseWithheldPaint`). Zero-sized and already-invisible nodes are skipped, and subtrees detached from flex layout are released so they can never be stranded invisible. + +- 15fb74a: fix(flexbox): detach removed nodes from the yoga parent so shrink-fit containers shrink + + `removeNode` freed the child's yoga node and spliced the ManagerNode children array, but never called `parent.node.removeChild(child.node)` on the yoga nodes themselves (unlike `detachChildNode`). The freed child stayed in the parent's yoga child list, so on the next layout the parent kept laying it out and a shrink-to-content container never shrank back. Visible as buttons that grow to fit a label on focus but stay expanded after blur once the label is removed. Now the child is detached from its yoga parent before it's freed. + +- b2492c6: Handle same-parent insertChild as a move so reordered children re-layout in the new order +- 660ae8d: feat(flexbox): measure text synchronously in Yoga for wrapping and intrinsic sizing + + Text leaves are now measured during Yoga layout (via msdf font metrics passed through the new `fonts` option) instead of relying solely on the renderer's async texture measurement, so text wraps and sizes correctly within flex layouts. The text node's explicit width/height is cleared when it becomes a measured leaf so the measure function — not a stale renderer-set width — drives its size, and `react-lightning` emits a `textChanged` signal so recycled/updated text re-measures. + +- dded826: fix(flexbox): resolve font atlas URLs before they cross into the Yoga worker + + The Yoga worker is bundled inline (`?worker&inline`), so in a production build its `self.location` is a `blob:` URL. A root-relative atlas URL like `/fonts/x.msdf.json` (what `import.meta.env.BASE_URL` produces) can't resolve against a blob base, so the worker's `fetch` threw "is not a valid URL" and font metrics never loaded — text fell back to single-line, unmeasured layout. It only reproduced in built apps; the dev server serves the worker as a real module, so root-relative URLs resolved fine. Atlas URLs are now resolved to absolute against the document URL on the main thread, before the options cross `postMessage`. + +- 8d993ca: Resolve percentage translateX/translateY against the node's own size (RN semantics). The css-transform converter used parseInt, which stripped the % and treated the number as pixels; the flexbox plugin now stashes the percentage and resolves it at layout readback, once the node's computed size is known, and keeps emitting the node on passes that don't dirty yoga. +- f2f0c11: Reveal VirtualList cells off Yoga's `settled` signal instead of wall-clock timers. A cell now reads its final size once layout has converged to a fixpoint and reports it as authoritative, so the LayoutManager skips its stability window and the RevealGate skips its quiet window. Cuts content-paint latency on the main-thread (worker-off) path; worker mode never emits `settled`, so it falls back to the existing timers. +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [3a9a0c7] +- Updated dependencies [01a42e4] +- Updated dependencies [7005125] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] + - @plextv/react-lightning@0.4.3-alpha.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/plugin-flexbox/package.json b/packages/plugin-flexbox/package.json index aa926a89..ccfdcad8 100644 --- a/packages/plugin-flexbox/package.json +++ b/packages/plugin-flexbox/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-plugin-flexbox", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "Adds FlexBox layout support to @plextv/react-lightning using yoga", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/plugin-reanimated/CHANGELOG.md b/packages/plugin-reanimated/CHANGELOG.md index d0a842dd..8a6a7320 100644 --- a/packages/plugin-reanimated/CHANGELOG.md +++ b/packages/plugin-reanimated/CHANGELOG.md @@ -1,5 +1,47 @@ # @plextv/react-lightning-plugin-reanimated +## 0.4.3-alpha.0 + +### Patch Changes + +- 4a7e3a4: fix(reanimated): apply animated transforms and replay resting styles to late-attached nodes + + Two gaps stopped a reanimated `transform` (e.g. a scroll-linked `translateY`) from reaching a laid-out node. The flexbox worker proxy filtered every non-flex style key before postMessage, so `transform` was dropped even though the worker-side Yoga already applies it as a top/left offset (and the serializer special-cases transform objects) — let it through. And `useAnimatedStyle` only pushed styles when a shared value changed, so a view that registers after the fact (recycled cell, re-created node) never got the current resting value; `AnimatedStyle` now exposes `applyToView`, which `createAnimatedComponent` calls on registration to replay the last-applied styles. Replay-only on purpose: computing a fresh value at attach time pushed states the normal flow never emitted and broke focus on some nodes. + +- e1a8ad2: Infer reanimated hook dependencies at runtime by tracking shared-value reads. No babel plugin runs on Lightning, so `useAnimatedStyle` / `useDerivedValue` / `useAnimatedReaction` without an explicit dependency array never subscribed to their shared values and only updated on re-renders. Shared values from `useSharedValue` / `makeMutable` now report reads to the active hook, which subscribes to exactly what its updater read (re-collected on every run, so branches are handled). Explicit dependency arrays keep their old behavior. +- Updated dependencies [6ced46f] +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [58a3c4d] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [48f2025] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning-plugin-css-transform@0.4.3-alpha.0 + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + - @plextv/react-native-lightning@0.4.3-alpha.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/plugin-reanimated/package.json b/packages/plugin-reanimated/package.json index 09afc599..d396b4f8 100644 --- a/packages/plugin-reanimated/package.json +++ b/packages/plugin-reanimated/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-plugin-reanimated", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "Reanimated plugin for @plextv/react-native-lightning", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/react-lightning-components/CHANGELOG.md b/packages/react-lightning-components/CHANGELOG.md index 54130b0c..7fa566f8 100644 --- a/packages/react-lightning-components/CHANGELOG.md +++ b/packages/react-lightning-components/CHANGELOG.md @@ -1,5 +1,44 @@ # @plextv/react-lightning-components +## 0.4.4-alpha.0 + +### Patch Changes + +- 658f68e: feat(virtuallist): getLayout ref API and skipChildFocusScroll opt-out for FlashList parity + + `VirtualListRef` now exposes `getLayout(index)`, returning the scroll-space `{ x, y, width, height }` rectangle of an item (or `undefined` when out of range) — mirroring FlashList's per-item layout query for callers that interpolate row positions against the scroll offset (crossfade/parallax). A new `skipChildFocusScroll` prop opts out of VirtualList's internal focus-follow scroll: a focused child crossing a cell boundary still resolves and persists `focusedIndex`, but the list no longer scrolls the cell into view, letting the app layer own scrolling (e.g. a row that drives `scrollToIndex` from its own authoritative focused index). Both are additive — default behaviour is unchanged. + +- 0647e88: VirtualList cells now pin their FlexRoot's cross axis to the cell's cross size when the list's cross size is definite (explicit style, parent cell bounds, or the flex-allocated outer size), so flex children can fill the cell width/height like a native list cell. Content-derived cross sizes stay unpinned to avoid the measure feedback loop. +- 7f54f81: VirtualList header and footer now pin their FlexRoot's cross axis under the same definiteness rule as the cells, so flex content (e.g. a stretch Column) fills the list width instead of shrink-fitting to its widest child. +- f2f0c11: Reveal VirtualList cells off Yoga's `settled` signal instead of wall-clock timers. A cell now reads its final size once layout has converged to a fixpoint and reports it as authoritative, so the LayoutManager skips its stability window and the RevealGate skips its quiet window. Cuts content-paint latency on the main-thread (worker-off) path; worker mode never emits `settled`, so it falls back to the existing timers. +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + ## 0.4.3 ### Patch Changes diff --git a/packages/react-lightning-components/package.json b/packages/react-lightning-components/package.json index 782a3cac..0da70066 100644 --- a/packages/react-lightning-components/package.json +++ b/packages/react-lightning-components/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning-components", - "version": "0.4.3", + "version": "0.4.4-alpha.0", "description": "React components for react-lightning", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/react-lightning/CHANGELOG.md b/packages/react-lightning/CHANGELOG.md index f8c89425..1e8df663 100644 --- a/packages/react-lightning/CHANGELOG.md +++ b/packages/react-lightning/CHANGELOG.md @@ -1,5 +1,56 @@ # @plextv/react-lightning +## 0.4.3-alpha.0 + +### Patch Changes + +- e2a5e11: Fix flattened elements leaking when they run a reanimated exit animation. A layout-only view flattens to a placeholder node, and a placeholder's `animate()` is a no-op that never emits `stopped`. Reanimated defers node removal until the exit animation finishes, so on a flattened wrapper the finish never fired, the deferred destroy never ran, and the subtree (and its real image descendants) stayed on the scene forever, stacking on every remount. Materialize the element when a deferred-removal handler is attached so the exit animation runs on a real node and completes. +- 5237e31: Add a `flattenLayoutViews` render option: layout-only Views (no background, border, clip, non-neutral alpha/transform, or transition) skip renderer node creation entirely. The element keeps a lightweight placeholder, descendants attach to the nearest materialized ancestor, and layout positions accumulate across the flattened chain (folded at the layout write funnels, unwound in `getRelativePosition`/`onLayout`). A flattened element materializes a real node on the first prop that needs one (sticky, so per-focus style toggles don't churn nodes). Inert RN-layer props (handlers, testID) don't prevent flattening; visual props at neutral values (color 0, alpha 1, scale 1) don't either. Off by default. +- 8d0b8e8: Fix flattened content not scrolling: a scroll handler (or any code) that writes a flattened element's position straight through `node.x`/`node.y`, bypassing `setProps`, now folds through to the hoisted children. The placeholder's `x`/`y` are accessors that notify the owning element, which re-pushes the offset to descendants. Without this, a direct write landed on the inert placeholder and the content only jumped to its final position on the next React commit (no animation). +- 3a9a0c7: A FocusGroup with no focusable descendant is now skipped by spatial navigation and autoFocus instead of acting as a focus stop. Groups only delegate focus to their children, so a group wrapping non-interactive content (e.g. a list section header) shouldn't be a target; real leaves (Pressable, a `focusable` View) are unaffected. Effective focusability tracks `hasFocusableChildren` and propagates up the ancestor chain, so a group flips back the moment a focusable child mounts (or its last one is removed). +- 01a42e4: fix(react-lightning): clear a removed border's shader on full restyles + + The keep-shader guard (added so reanimated's partial pushes don't square off a rounded node) inferred "partial" from "no shader-relevant prop present". A full restyle that dropped a border matched that too, so a removed focus-ring border kept painting. It now gates on the PARTIAL_STYLE marker: a reconciler snapshot recomputes (and clears) the shader, while reanimated and imperative single-key style sets keep it. Imperative `el.style.x =` pushes are marked PARTIAL_STYLE too. + +- 7005125: fix(flexbox): withhold paint until first layout to avoid the async-flex origin flash + + Flex layout is computed asynchronously (in a worker), so a definite-sized node mounts and paints at its pre-layout origin (0,0) for a frame or two before the layout result moves it. A node now keeps its rendered alpha at 0 from mount until its first layout resolves, then restores the styled alpha (`withholdPaintUntilLayout` / `releaseWithheldPaint`). Zero-sized and already-invisible nodes are skipped, and subtrees detached from flex layout are released so they can never be stranded invisible. + +- 66c2c93: feat(focus): focus-when-ready, arrival-not-mount autoFocus, and destinations-on-arrival + + `FocusManager.focus()` no longer drops a request for an element that isn't registered or focusable yet — it queues it and resolves the moment the element becomes ready, so callers don't have to poll across frames. A later-mounting `autoFocus` child no longer steals live focus on registration (a new `focusCommitted` flag gates the upgrade), matching native `TVFocusGuideView`, which forwards focus on arrival rather than on mount. And `destinations` are now honoured on arrival (first visit without `focusRedirect`, every visit with it), so focus forwards to a declared destination then remembers the last-focused child. + +- 9beb550: fix(image+border): flatten array styles on Image and paint/clear border shaders on live nodes + + The RN `Image` component built its node style with an object spread (`{ ...style, w, h }`), so an RN style array (`style={[a, b]}`) became numeric-keyed garbage and its `width`/`height`/`borderRadius` were silently dropped (the array-flatten polyfill only ran when the style reached `setProps` still an array). `Image` now flattens with `flattenStyles` before spreading. + + Border shaders can now be toggled on an already-mounted node. `border` and `borderColor` were missing from the set of style props that force the shader-creating slow path, so toggling a plain border (e.g. a focus ring) fast-pathed straight onto the node and never created a `Border` shader. A node that already carries a shader now always takes the slow path, and removing the border clears the shader (resetting the node to the stage default) instead of leaving it painting. + + Updating an existing shader's props in place now keys off whether the prop exists, not whether its current value is truthy. Previously a prop whose current value was falsy (e.g. a transparent `border-color` of `0`) was skipped, so toggling a focus-ring border from transparent to a visible color on a mounted node was silently dropped and the ring never appeared. + +- 6e50057: fix(input): normalize key events and stop swallowing held-key auto-repeat + + The key pipeline no longer drops OS auto-repeat events. Holding a directional key now keeps bubbling `onKeyDown` events (with `repeat: true`) through the focus tree, so held keys keep navigating and handlers can implement held-key/long-press behavior without re-deriving repeats from raw DOM listeners. The long-press duration is now measured from the initial press (the press timestamp is no longer reset by each repeat), so a held key still resolves to `onLongPress` on release. + + Key events are also normalized into a consistent shape via a new `normalizeKeyEvent` helper: `keyCode` maps to `remoteKey` (falling back to `Keys.Unknown`), `repeat` is preserved, and `preventDefault` is now bound — previously the raw DOM method was copied unbound, so calling `event.preventDefault()` from a handler threw "Illegal invocation". `currentTarget` is now part of the `KeyEvent` type rather than bolted on during bubbling. + +- b2492c6: Handle same-parent insertChild as a move so reordered children re-layout in the new order +- 3f4ed43: fix(react-lightning): keep the rounded/border shader on partial style updates + + A partial style update (reanimated pushing just opacity/transform straight to + setProps) recomputed the node's shader from that partial style, found no + borderRadius/border, and cleared the Rounded shader. Any animated rounded node + squared off the moment reanimated touched it. Only rebuild or clear the shader + when the update actually carries a shader-relevant prop (or an explicit shader + override); otherwise keep the existing one. + +- 660ae8d: feat(flexbox): measure text synchronously in Yoga for wrapping and intrinsic sizing + + Text leaves are now measured during Yoga layout (via msdf font metrics passed through the new `fonts` option) instead of relying solely on the renderer's async texture measurement, so text wraps and sizes correctly within flex layouts. The text node's explicit width/height is cleared when it becomes a measured leaf so the measure function — not a stale renderer-set width — drives its size, and `react-lightning` emits a `textChanged` signal so recycled/updated text re-measures. + +- f6bee05: Add an opt-in `roundedClipping` render option: a node with borderRadius + clipping (overflow hidden) clips its children to the rounded rect, like the other RN platforms. Implemented via the renderer's stencil clip (`clipRadius`), so it costs no extra textures, nests, and works for text and images. +- 43594e7: fix(text): support FormattedMessage + ## 0.4.2 ### Patch Changes diff --git a/packages/react-lightning/package.json b/packages/react-lightning/package.json index e78a9f80..806a5470 100644 --- a/packages/react-lightning/package.json +++ b/packages/react-lightning/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-lightning", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "React renderer for rendering React apps with Lightning.js", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/react-native-lightning-components/CHANGELOG.md b/packages/react-native-lightning-components/CHANGELOG.md index 78847d03..e494ca0f 100644 --- a/packages/react-native-lightning-components/CHANGELOG.md +++ b/packages/react-native-lightning-components/CHANGELOG.md @@ -1,5 +1,44 @@ # @plextv/react-native-lightning-components +## 0.4.3-alpha.0 + +### Patch Changes + +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [58a3c4d] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [48f2025] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [658f68e] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [0647e88] +- Updated dependencies [7f54f81] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + - @plextv/react-native-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-components@0.4.4-alpha.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/react-native-lightning-components/package.json b/packages/react-native-lightning-components/package.json index 20fe4b03..37653abf 100644 --- a/packages/react-native-lightning-components/package.json +++ b/packages/react-native-lightning-components/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-native-lightning-components", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "React components for react-native-lightning", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/react-native-lightning/CHANGELOG.md b/packages/react-native-lightning/CHANGELOG.md index 1c3d27a5..a65fd4d4 100644 --- a/packages/react-native-lightning/CHANGELOG.md +++ b/packages/react-native-lightning/CHANGELOG.md @@ -1,5 +1,58 @@ # @plextv/react-native-lightning +## 0.4.3-alpha.0 + +### Patch Changes + +- 58a3c4d: Add a findNodeHandle export that returns the element ref instead of throwing (react-native-web's re-export throws unconditionally). Lightning focus APIs (setDestinations, focus hints) take element refs directly, so shared RN code that funnels refs through findNodeHandle now works unchanged. +- 9beb550: fix(image+border): flatten array styles on Image and paint/clear border shaders on live nodes + + The RN `Image` component built its node style with an object spread (`{ ...style, w, h }`), so an RN style array (`style={[a, b]}`) became numeric-keyed garbage and its `width`/`height`/`borderRadius` were silently dropped (the array-flatten polyfill only ran when the style reached `setProps` still an array). `Image` now flattens with `flattenStyles` before spreading. + + Border shaders can now be toggled on an already-mounted node. `border` and `borderColor` were missing from the set of style props that force the shader-creating slow path, so toggling a plain border (e.g. a focus ring) fast-pathed straight onto the node and never created a `Border` shader. A node that already carries a shader now always takes the slow path, and removing the border clears the shader (resetting the node to the stage default) instead of leaving it painting. + + Updating an existing shader's props in place now keys off whether the prop exists, not whether its current value is truthy. Previously a prop whose current value was falsy (e.g. a transparent `border-color` of `0`) was skipped, so toggling a focus-ring border from transparent to a visible color on a mounted node was silently dropped and the ring never appeared. + +- 48f2025: fix(pressable): expose `focused` to function children + + `Pressable` tracked only `{ pressed }` in state and passed that to its style/children render functions, so `focused` was always `undefined`. Every focus-driven visual built on RN's `({ focused }) => …` contract — focus rings, focus scale — was dead on Lightning. It also only wired `onFocus`/`onBlur` to the node when the consumer passed those callbacks, so a focusable with no listeners tracked nothing. + + `Pressable` now tracks `focused` in state, updates it on focus/blur regardless of whether the consumer passes `onFocus`/`onBlur` (still forwarding to them), and passes `{ focused, pressed }` to its function children — matching React Native. The `pressed` setters no longer replace the whole state object, so a keypress can't clobber `focused`. + +- Updated dependencies [6ced46f] +- Updated dependencies [e2a5e11] +- Updated dependencies [5237e31] +- Updated dependencies [8d0b8e8] +- Updated dependencies [df7da6a] +- Updated dependencies [69653c6] +- Updated dependencies [5e69f9c] +- Updated dependencies [c34f03c] +- Updated dependencies [ec4f817] +- Updated dependencies [3a9a0c7] +- Updated dependencies [4a7e3a4] +- Updated dependencies [f31d1d1] +- Updated dependencies [01a42e4] +- Updated dependencies [7005125] +- Updated dependencies [15fb74a] +- Updated dependencies [66c2c93] +- Updated dependencies [9beb550] +- Updated dependencies [6e50057] +- Updated dependencies [b2492c6] +- Updated dependencies [3f4ed43] +- Updated dependencies [660ae8d] +- Updated dependencies [658f68e] +- Updated dependencies [dded826] +- Updated dependencies [8d993ca] +- Updated dependencies [f6bee05] +- Updated dependencies [43594e7] +- Updated dependencies [0647e88] +- Updated dependencies [7f54f81] +- Updated dependencies [f2f0c11] + - @plextv/react-lightning-plugin-css-transform@0.4.3-alpha.0 + - @plextv/react-lightning@0.4.3-alpha.0 + - @plextv/react-lightning-plugin-flexbox@0.4.3-alpha.0 + - @plextv/react-lightning-components@0.4.4-alpha.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/react-native-lightning/package.json b/packages/react-native-lightning/package.json index 85078e2c..b078e500 100644 --- a/packages/react-native-lightning/package.json +++ b/packages/react-native-lightning/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/react-native-lightning", - "version": "0.4.2", + "version": "0.4.3-alpha.0", "description": "@plextv/react-lightning implementation for react-native", "bugs": { "url": "https://github.com/plexinc/react-lightning/issues/new" diff --git a/packages/vite-plugin-react-native-lightning/CHANGELOG.md b/packages/vite-plugin-react-native-lightning/CHANGELOG.md index 24b23ba8..6e66c445 100644 --- a/packages/vite-plugin-react-native-lightning/CHANGELOG.md +++ b/packages/vite-plugin-react-native-lightning/CHANGELOG.md @@ -1,5 +1,14 @@ # @plextv/vite-plugin-react-native-lightning +## 0.4.4-alpha.0 + +### Patch Changes + +- Updated dependencies [58a3c4d] +- Updated dependencies [9beb550] +- Updated dependencies [48f2025] + - @plextv/react-native-lightning@0.4.3-alpha.0 + ## 0.4.3 ### Patch Changes diff --git a/packages/vite-plugin-react-native-lightning/package.json b/packages/vite-plugin-react-native-lightning/package.json index 1c3ff6d3..b1b86cb7 100644 --- a/packages/vite-plugin-react-native-lightning/package.json +++ b/packages/vite-plugin-react-native-lightning/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/vite-plugin-react-native-lightning", - "version": "0.4.3", + "version": "0.4.4-alpha.0", "description": "Vite plugin for adding react-native-lightning support", "keywords": [ "lightning-js", diff --git a/packages/vite-plugin-react-reanimated-lightning/CHANGELOG.md b/packages/vite-plugin-react-reanimated-lightning/CHANGELOG.md index aee5dd26..df1218b5 100644 --- a/packages/vite-plugin-react-reanimated-lightning/CHANGELOG.md +++ b/packages/vite-plugin-react-reanimated-lightning/CHANGELOG.md @@ -1,5 +1,13 @@ # @plextv/vite-plugin-react-reanimated-lightning +## 0.4.4-alpha.0 + +### Patch Changes + +- Updated dependencies [4a7e3a4] +- Updated dependencies [e1a8ad2] + - @plextv/react-lightning-plugin-reanimated@0.4.3-alpha.0 + ## 0.4.3 ### Patch Changes diff --git a/packages/vite-plugin-react-reanimated-lightning/package.json b/packages/vite-plugin-react-reanimated-lightning/package.json index 713b1435..cc49e751 100644 --- a/packages/vite-plugin-react-reanimated-lightning/package.json +++ b/packages/vite-plugin-react-reanimated-lightning/package.json @@ -1,6 +1,6 @@ { "name": "@plextv/vite-plugin-react-reanimated-lightning", - "version": "0.4.3", + "version": "0.4.4-alpha.0", "description": "Vite plugin for @plextv/react-lightning-plugin-reanimated", "keywords": [ "lightning-js",