diff --git a/.changeset/outline-styles.md b/.changeset/outline-styles.md new file mode 100644 index 00000000..c83b567f --- /dev/null +++ b/.changeset/outline-styles.md @@ -0,0 +1,7 @@ +--- +'@plextv/react-lightning': minor +'@plextv/react-lightning-plugin-css-transform': minor +'@plextv/react-lightning-plugin-reanimated': patch +--- + +Support css outlines. `outlineWidth` / `outlineColor` / `outlineOffset` now paint a ring outside the node (the border shader can draw outside its bounds with a gap), so a focus ring no longer needs an extra absolutely-positioned view. A border and an outline share the one shader an element gets, so the border still wins and a dev warning says so. Also: a partial style push (reanimated, or an imperative `style.x =`) now resolves its shader against the merged style, so pushing only a `borderColor` or `outlineColor` keeps the width it already had, and an `outlineColor` transition animates the shader. diff --git a/.changeset/reanimated-css-pseudo-selectors.md b/.changeset/reanimated-css-pseudo-selectors.md new file mode 100644 index 00000000..fa61594e --- /dev/null +++ b/.changeset/reanimated-css-pseudo-selectors.md @@ -0,0 +1,5 @@ +--- +'@plextv/react-lightning-plugin-reanimated': minor +--- + +Support reanimated's CSS transitions and pseudo selectors. A `CSSStyle` on an animated component now works: `transitionProperty` / `transitionDuration` / `transitionTimingFunction` / `transitionDelay` (and the `transition` shorthand) become a Lightning transition on the node, and per-property values keyed by `default` / `:focus` / `:focus-within` swap on focus without a re-render. `:hover`, `:active` and `:active-deepest` need pointer or press state that Lightning doesn't have, so they're ignored with a dev warning, as are CSS animations (`animationName` and friends) for now. diff --git a/apps/react-native-lightning-example/src/index.tsx b/apps/react-native-lightning-example/src/index.tsx index 32a4a689..947b21f4 100644 --- a/apps/react-native-lightning-example/src/index.tsx +++ b/apps/react-native-lightning-example/src/index.tsx @@ -22,6 +22,7 @@ import { AnimationTest } from './pages/AnimationTest'; import { ComponentTest } from './pages/ComponentTest'; import { LayoutTest } from './pages/LayoutTest'; import { LibraryTest } from './pages/LibraryTest'; +import { PseudoSelectorTest } from './pages/PseudoSelectorTest'; import { SimpleTest } from './pages/SimpleTest'; import { VirtualizedListTest } from './pages/VirtualizedListTest'; @@ -56,6 +57,7 @@ const screens = { Library: 'library', Simple: 'simple', Components: 'components', + PseudoSelectors: 'pseudoSelectors', NestedLayouts: 'nestedLayouts', VirtualizedList: 'virtualizedList', }; @@ -119,6 +121,11 @@ const MainApp = () => { color={'rgba(55, 55, 22, 1)'} onPress={() => nav.navigate('VirtualizedList')} /> +