Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7b665cd
feat(extractor): compile Devup UI elements to React Native styles
owjs3901 Nov 19, 2026
c352820
test(extractor): cover the React Native target and wire codeExtractNa…
owjs3901 Nov 19, 2026
5c2691a
fix(extractor): convert style values read at runtime on React Native …
owjs3901 Nov 19, 2026
200d61d
test(extractor): drop the needless raw string hashes and note runtime…
owjs3901 Nov 19, 2026
f0c31ad
feat(metro-plugin): compile Devup UI for React Native in Metro
owjs3901 Nov 19, 2026
694249c
Merge remote-tracking branch 'origin/main' into feat/react-native-metro
owjs3901 Nov 19, 2026
2717c03
ci: drop the react-native-core pull request branch now that it is merged
owjs3901 Nov 19, 2026
6bf5393
feat(native): theme tokens, multiple themes and the React Native runtime
owjs3901 Nov 20, 2026
140a470
ci: load the React Native runtime entry with a react-native stand-in
owjs3901 Nov 20, 2026
065a54c
test(native): cover theme merges and a typography a theme lacks
owjs3901 Nov 20, 2026
b61c854
feat(native): responsive values, responsive tokens and orientation on…
owjs3901 Nov 21, 2026
4daea34
fix(verify-dist): give the react-native stand-in Dimensions
owjs3901 Nov 21, 2026
6c2b6f2
feat(native): press styles through Pressable on React Native
owjs3901 Nov 21, 2026
0fd0de6
wip(native): css() and className on React Native
owjs3901 Nov 21, 2026
33b23f3
wip(native): drop a probe test
owjs3901 Nov 21, 2026
90bd808
fix(native): apply theme, orientation and press blocks after the othe…
owjs3901 Nov 21, 2026
a62bbc4
Merge branch 'feat/react-native-pressed' into feat/react-native-css
owjs3901 Nov 21, 2026
3ba5930
test(native): cover a static style checked against one kept in order
owjs3901 Nov 21, 2026
897e66c
feat(native): css() as CSS text, README and changepack
owjs3901 Nov 21, 2026
ed6ec74
Merge branch 'feat/react-native-pressed' into feat/react-native-css
owjs3901 Nov 21, 2026
4f8a95a
test(native): pass classes to style_code in the merged test
owjs3901 Nov 21, 2026
fb7882a
test(native): cover css() parts around state blocks and empty objects
owjs3901 Nov 21, 2026
7d52b64
test(native): cover a static style checked against a state block
owjs3901 Nov 21, 2026
5078394
Merge branch 'feat/react-native-pressed' into feat/react-native-css
owjs3901 Nov 21, 2026
044555e
feat(native): styled() on React Native
owjs3901 Nov 21, 2026
8f4f040
feat(native): css() and className on React Native (#1046)
owjs3901 Nov 25, 2026
d69078d
feat(native): responsive values, responsive tokens and orientation on…
owjs3901 Nov 25, 2026
adb6e46
Merge origin/main into feat/react-native-themes
owjs3901 Nov 28, 2026
dfba63b
Merge origin/feat/react-native-themes into feat/react-native-pressed
owjs3901 Nov 28, 2026
1803ed6
Merge origin/feat/react-native-pressed into feat/react-native-styled
owjs3901 Nov 28, 2026
93a45bd
Merge origin/main into feat/react-native-pressed
owjs3901 Nov 28, 2026
0c97325
Merge origin/main into feat/react-native-pressed
owjs3901 Nov 28, 2026
41b5c85
Merge origin/feat/react-native-pressed into feat/react-native-styled
owjs3901 Nov 28, 2026
34caf28
Merge origin/main into feat/react-native-pressed
owjs3901 Nov 28, 2026
44b7337
Merge origin/feat/react-native-pressed into feat/react-native-styled
owjs3901 Nov 28, 2026
15d61a8
feat(native): hover, focus and disabled styles on React Native (#1048)
owjs3901 Nov 28, 2026
5b9e58b
Merge origin/main into feat/react-native-styled
owjs3901 Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_react_native_focused_runtime.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"packages/react/package.json": "Patch"
},
"note": "`@devup-ui/react/native` adds `Focused` (internal), which renders a `TextInput` with the style the build compiles for whether it has focus, following its `onFocus` and `onBlur` and still calling the ones it is given. The runtime grows from 630 B to 702 B min+gzip.",
"date": "2026-11-21T00:00:00.000Z"
}
8 changes: 8 additions & 0 deletions .changepacks/changepack_log_react_native_states.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"changes": {
"bindings/devup-ui-binding/package.json": "Patch",
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "`codeExtractNative` compiles `_hover`, `_focus` and `_disabled` for React Native (part of #411): `_hover` and `_focus` read the `hovered` and `focused` that `Pressable` gives its style function, an `Input` with `_focus` renders through the runtime's `Focused`, and `_disabled` applies while the element's `disabled` prop is true. In `css()` these and `_active` are build errors. Web output is unchanged.",
"date": "2026-11-21T00:00:00.000Z"
}
8 changes: 8 additions & 0 deletions .changepacks/changepack_log_react_native_styled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"changes": {
"bindings/devup-ui-binding/package.json": "Patch",
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "`codeExtractNative` compiles `styled()` for React Native (part of #411): `styled(Target)(...parts)`, `` styled(Target)`css text` `` and `styled(Target, styles)` compile to a function component rendering its target with the styles it describes, before the `style` it is given. It takes the parts `css()` takes; a function in them is called with the component's props, as a value or as a part giving what `css()` gives. A Devup UI target keeps the styles it declares first, and a styled `Box` with a press style becomes a `Pressable`. The hooks its styles read are called in the component. Web output is unchanged.",
"date": "2026-11-21T00:00:00.000Z"
}
11 changes: 6 additions & 5 deletions apps/expo/check-bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
// the breakpoint and the orientation, so it calls each of those hooks of the
// runtime; src/Badge.tsx is styled the same in every theme and at every
// width, so it must not use the runtime. Its buttons take press styles, which
// React Native's `Pressable` applies through a function for `style`.
// React Native's `Pressable` applies through a function for `style`, and its
// input a focus style, which the runtime's `Focused` applies.
import { readdirSync, readFileSync } from 'node:fs'
import { join } from 'node:path'

const PLACEHOLDER = 'Cannot run on the runtime'
/** Names of the runtime that only code using it holds, as minified code keeps them */
const RUNTIME_NAMES =
/\b(?:defineThemes|useThemeIndex|useBreakpoint|useLandscape)\b/g
/** The hooks src/App.tsx must call */
const APP_HOOKS = ['useThemeIndex', 'useBreakpoint', 'useLandscape']
/\b(?:defineThemes|useThemeIndex|useBreakpoint|useLandscape|Focused)\b/g
/** What src/App.tsx must use from the runtime */
const APP_HOOKS = ['useThemeIndex', 'useBreakpoint', 'useLandscape', 'Focused']
/** Modules of @devup-ui/react, by the path Metro resolves */
const REACT_PACKAGE = /(^|[\\/])(@devup-ui[\\/]react|packages[\\/]react)[\\/]/
/** The React Native runtime among them */
Expand Down Expand Up @@ -144,7 +145,7 @@ for (const platform of ['ios', 'android']) {
for (const hook of APP_HOOKS) {
const callers = [...(users.get(hook) ?? [])]
if (!callers.some((source) => /src[\\/]App\.tsx$/.test(source))) {
failures.push(`${platform}/${file}: src/App.tsx does not call ${hook}`)
failures.push(`${platform}/${file}: src/App.tsx does not use ${hook}`)
}
}
const all = [
Expand Down
1 change: 1 addition & 0 deletions apps/expo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function App() {
Your name
</Text>
<Input
_focus={{ borderColor: '#5a44ff' }}
border="1px solid $border"
borderRadius="8px"
color="$text"
Expand Down
28 changes: 13 additions & 15 deletions apps/expo/src/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { Text } from '@devup-ui/react'
import { styled, Text } from '@devup-ui/react'

/** Styled the same in every theme, so it compiles without the runtime */
const Pill = styled(Text)({
bg: '#5a44ff',
borderRadius: '999px',
color: '#fff',
fontSize: '12px',
fontWeight: '600',
px: 2,
py: 1,
})

/** Styles the same in every theme, so it compiles without the runtime */
export function Badge({ label }: { label: string }) {
return (
<Text
bg="#5a44ff"
borderRadius="999px"
color="#fff"
fontSize="12px"
fontWeight="600"
px={2}
py={1}
>
{label}
</Text>
)
return <Pill>{label}</Pill>
}
Loading
Loading