From 75f2e4ae7c14dc07eb7b9ca8b661ad2556cd63a1 Mon Sep 17 00:00:00 2001 From: Marcio Ikematsu <37047+xixa@users.noreply.github.com> Date: Mon, 30 Nov 2026 01:00:37 -0300 Subject: [PATCH] fix: Preserve StyleX type constraints in published declarations --- packages/react-strict-dom/src/native/index.js | 21 +++++++------------ packages/react-strict-dom/src/web/index.js | 21 +++++++------------ 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/packages/react-strict-dom/src/native/index.js b/packages/react-strict-dom/src/native/index.js index 8906cce1..9a99547c 100644 --- a/packages/react-strict-dom/src/native/index.js +++ b/packages/react-strict-dom/src/native/index.js @@ -7,14 +7,6 @@ * @flow */ -import type { - StyleXStyles, - StyleXStylesWithout, - StaticStyles, - Theme, - VarGroup -} from '@stylexjs/stylex'; - import typeof * as TStyleX from '@stylexjs/stylex'; import * as React from 'react'; @@ -27,11 +19,6 @@ import { useViewportScale } from './modules/ContextViewportScale'; -type StyleTheme = Theme; -type StyleVars = VarGroup; -type Styles = StyleXStyles; -type StylesWithout = StyleXStylesWithout; - type ProviderValue = Readonly<{ [string]: string | number }>; type ProviderProps = Readonly<{ @@ -39,7 +26,13 @@ type ProviderProps = Readonly<{ customProperties: ProviderValue }>; -export type { StaticStyles, StyleTheme, StyleVars, Styles, StylesWithout }; +export type { + StaticStyles, + Theme as StyleTheme, + VarGroup as StyleVars, + StyleXStyles as Styles, + StyleXStylesWithout as StylesWithout +} from '@stylexjs/stylex'; export type { StrictChangeEvent, StrictClickEvent, diff --git a/packages/react-strict-dom/src/web/index.js b/packages/react-strict-dom/src/web/index.js index dc5274b7..96ba6861 100644 --- a/packages/react-strict-dom/src/web/index.js +++ b/packages/react-strict-dom/src/web/index.js @@ -7,23 +7,16 @@ * @flow strict */ -import type { - StyleXStyles, - StyleXStylesWithout, - StaticStyles, - Theme, - VarGroup -} from '@stylexjs/stylex'; - import * as html from './html'; import * as css from '@stylexjs/stylex'; -type StyleTheme = Theme; -type StyleVars = VarGroup; -type Styles = StyleXStyles; -type StylesWithout = StyleXStylesWithout; - -export type { StaticStyles, StyleTheme, StyleVars, Styles, StylesWithout }; +export type { + StaticStyles, + Theme as StyleTheme, + VarGroup as StyleVars, + StyleXStyles as Styles, + StyleXStylesWithout as StylesWithout +} from '@stylexjs/stylex'; export type { StrictChangeEvent, StrictClickEvent,