Skip to content

Commit dcb8673

Browse files
committed
chore: move to ui alpha.24 and inertia 0.0.18
1 parent 7fe2b3b commit dcb8673

8 files changed

Lines changed: 48 additions & 100 deletions

File tree

‎app/+html.tsx‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,10 @@ export default function Root({ children }: PropsWithChildren) {
6464
return (
6565
<html lang="en">
6666
<head>
67-
{shellTags({ preconnect: PRECONNECT })}
68-
{/* `shellTags` writes one theme colour, and this page has two. A browser
69-
uses the first `theme-color` whose media matches, so each tag names
70-
its scheme. */}
71-
<meta name="theme-color" media="(prefers-color-scheme: light)" content={LIGHT_BACKGROUND} />
72-
<meta name="theme-color" media="(prefers-color-scheme: dark)" content={DARK_BACKGROUND} />
67+
{shellTags({
68+
preconnect: PRECONNECT,
69+
themeColor: { light: LIGHT_BACKGROUND, dark: DARK_BACKGROUND },
70+
})}
7371
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
7472
<ScrollViewStyleReset />
7573
<style dangerouslySetInnerHTML={{ __html: themeGuardCss }} />

‎app/+not-found.tsx‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Column, Row, Typography } from '@rootnative/components'
1+
import { Button, Column, Typography } from '@rootnative/components'
22
import { useTheme } from '@rootnative/core'
33
import { PageHead } from '@rootnative/seo/expo-router'
44
import { Link } from 'expo-router'
@@ -30,14 +30,13 @@ export default function NotFoundScreen() {
3030
This address has no page. The libraries and their docs start from the home page.
3131
</Typography>
3232
{/* `Button` sets `alignSelf: 'flex-start'` on its own wrapper, which wins
33-
over the column's `align="center"`. A row centres it. */}
34-
<Row justify="center">
35-
<Link href="/" replace asChild>
36-
<Button variant="filled" leadingIcon="arrow-left">
37-
Back to Root Native
38-
</Button>
39-
</Link>
40-
</Row>
33+
over the column's `align="center"`. An `alignSelf` in `style` goes to
34+
that wrapper, so the button needs its own. */}
35+
<Link href="/" replace asChild>
36+
<Button variant="filled" leadingIcon="arrow-left" style={styles.button}>
37+
Back to Root Native
38+
</Button>
39+
</Link>
4140
</Column>
4241
</>
4342
)
@@ -50,4 +49,7 @@ const styles = StyleSheet.create({
5049
text: {
5150
textAlign: 'center',
5251
},
52+
button: {
53+
alignSelf: 'center',
54+
},
5355
})

‎app/index.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ const FOOTER_TRAVEL = 20
4646
* separation is the depth cue. The order runs top to bottom, and the amounts
4747
* fall, so the badge leads and the tagline trails.
4848
*
49-
* The chips and the buttons take no drift at all. They are the hero's only
50-
* interactive rows, and a faded-but-still-clickable button is a worse trade
51-
* than a row that simply scrolls.
49+
* The chips and the buttons take no drift at all. The buttons are the hero's
50+
* only interactive row, and a faded-but-still-clickable button is a worse
51+
* trade than a row that simply scrolls. The chips have no action, so they
52+
* render as labels and that rule does not bind them.
5253
*/
5354
const HERO_DRIFT = { badge: 88, mark: 68, title: 48, tagline: 32 }
5455

‎lib/motion.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const TRANSITIONS = {
3737
* A keyframe array is also safe now. Inertia 0.0.10 resolved each step of
3838
* an array to a plain number under reduced motion, handed those numbers to
3939
* `withSequence`, and threw `Cannot create property 'finished' on number`,
40-
* which took the whole page down. Inertia 0.0.11 fixes that, and the site
41-
* pins 0.0.11.
40+
* which took the whole page down. Inertia 0.0.11 fixes that, so do not pin
41+
* the site below 0.0.11.
4242
*/
4343
float: {
4444
type: 'timing',

‎package.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"android": "expo start --android",
99
"ios": "expo start --ios",
1010
"web": "expo start --web",
11-
"export:web": "expo export --platform web && node scripts/write-seo.mjs",
11+
"export:web": "expo export --platform web && rootnative-seo dist --sitemap https://rootnative.github.io/sitemap.xml --sitemap https://rootnative.github.io/ui/sitemap.xml --sitemap https://rootnative.github.io/ui/demo/sitemap.xml --sitemap https://rootnative.github.io/inertia/sitemap.xml --sitemap https://rootnative.github.io/impulse/sitemap.xml",
1212
"typecheck": "tsc --noEmit",
1313
"lint": "eslint .",
1414
"lint:fix": "eslint . --fix",
@@ -21,10 +21,10 @@
2121
"dependencies": {
2222
"@material/material-color-utilities": "^0.4.0",
2323
"@react-native-vector-icons/material-design-icons": "^13.1.4",
24-
"@rootnative/components": "0.0.0-alpha.23",
25-
"@rootnative/core": "0.0.0-alpha.23",
26-
"@rootnative/inertia": "0.0.17",
27-
"@rootnative/seo": "0.0.0-alpha.23",
24+
"@rootnative/components": "0.0.0-alpha.24",
25+
"@rootnative/core": "0.0.0-alpha.24",
26+
"@rootnative/inertia": "0.0.18",
27+
"@rootnative/seo": "0.0.0-alpha.24",
2828
"expo": "~57.0.21",
2929
"expo-constants": "~57.0.17",
3030
"expo-font": "~57.0.3",

‎scripts/write-seo.mjs‎

Lines changed: 0 additions & 48 deletions
This file was deleted.

‎types/react-native-web.d.ts‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import 'react-native'
66
*
77
* Verified against the installed react-native-web, not assumed: `View` builds
88
* its forward list from `forwardedProps`, and `dataSet` is in `defaultProps`.
9-
* `View` reads `hrefAttrs` when it has an `href`, and `Pressable` passes it
10-
* through to its `View`.
119
*
1210
* `onFocus` and `onBlur` used to be declared here too. React Native 0.86 has
13-
* both on `ViewProps` itself, so the local copy is gone.
11+
* both on `ViewProps` itself, so the local copy is gone. `hrefAttrs` went the
12+
* same way, because `@rootnative/components` declares it. A second declaration
13+
* with a different type fails with TS2717.
1414
*/
1515
declare module 'react-native' {
1616
interface ViewProps {
@@ -19,10 +19,5 @@ declare module 'react-native' {
1919
* `app/+html.tsx` can reach the animated elements with plain CSS.
2020
*/
2121
dataSet?: Record<string, string | number | undefined>
22-
/**
23-
* The `target`, `rel` and `download` of the `<a>` that a view with an
24-
* `href` renders. `components/link-button.tsx` needs it for a new tab.
25-
*/
26-
hrefAttrs?: { target?: string; rel?: string; download?: boolean | string }
2722
}
2823
}

‎yarn.lock‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,25 +1497,25 @@
14971497
invariant "^2.2.4"
14981498
nullthrows "^1.1.1"
14991499

1500-
"@rootnative/components@0.0.0-alpha.23":
1501-
version "0.0.0-alpha.23"
1502-
resolved "https://registry.yarnpkg.com/@rootnative/components/-/components-0.0.0-alpha.23.tgz#70e7d52eaac080aac96dba2afe44d50faddfcc8b"
1503-
integrity sha512-gKVSJCUwVg8lJSA7EEwFI7EfLDxxfz2nWNfDFBEs+Euag21YlGdjKhvZtS+g86km0gmEDk3uFSxo2Ui69godCw==
1504-
1505-
"@rootnative/core@0.0.0-alpha.23":
1506-
version "0.0.0-alpha.23"
1507-
resolved "https://registry.yarnpkg.com/@rootnative/core/-/core-0.0.0-alpha.23.tgz#cab9cce3ad6fa08c467fb5e2c36f3a43f2ddbdd2"
1508-
integrity sha512-tPDNyMu82izga+C52GoAtarkFPTi7SkE+f8Q/ZUUrGHYM9JvovjQI8gZxrT5A5+93dFdvrRGgkhJMDl1TCRj3w==
1509-
1510-
"@rootnative/inertia@0.0.17":
1511-
version "0.0.17"
1512-
resolved "https://registry.yarnpkg.com/@rootnative/inertia/-/inertia-0.0.17.tgz#02fbdd9f0a26ece995d56ddc8934965b197e7f80"
1513-
integrity sha512-bLWKsrO/1O9XyqrqTjg/kx6rnNsDazIW5T4gpvBohk63KStAXkpxK/FBa53hCjD1k/gkqOd3uWOIDN99vfGf0g==
1514-
1515-
"@rootnative/seo@0.0.0-alpha.23":
1516-
version "0.0.0-alpha.23"
1517-
resolved "https://registry.yarnpkg.com/@rootnative/seo/-/seo-0.0.0-alpha.23.tgz#0f75442ab017a350c4ff2d3f044812627e60c9ec"
1518-
integrity sha512-Mf9n9vta1O3Pj2zCtbwfPOuXsfY7mRRDsd9VQm8orLKfHtpVCHmLcIBlOAZbLY4K2wttOYo1f7aRwEQT/IgoIQ==
1500+
"@rootnative/components@0.0.0-alpha.24":
1501+
version "0.0.0-alpha.24"
1502+
resolved "https://registry.yarnpkg.com/@rootnative/components/-/components-0.0.0-alpha.24.tgz#e9e3d99d9db8d016868b70a970ac37d8bbbd1c25"
1503+
integrity sha512-/8QvvSdjDsiCsU5b0fLFwcbj2mnqRuOEh7/7qj7wJZPNQBPQTFHt/MweuhFCPoTKEglkE2sed/z+CheMSC85mw==
1504+
1505+
"@rootnative/core@0.0.0-alpha.24":
1506+
version "0.0.0-alpha.24"
1507+
resolved "https://registry.yarnpkg.com/@rootnative/core/-/core-0.0.0-alpha.24.tgz#f95d4e6eb2b2180ac28556b2c64028d3b8a2a150"
1508+
integrity sha512-qwykL75c2sthrYn+pHNLcfslnEgCjbZ1Ymf841+W9EbGPDhL3YZZa5IC6P3ICP5Ttf+eZQG2+qUoncSE02srkg==
1509+
1510+
"@rootnative/inertia@0.0.18":
1511+
version "0.0.18"
1512+
resolved "https://registry.yarnpkg.com/@rootnative/inertia/-/inertia-0.0.18.tgz#f8e9da5107fdd90162e186ed61f6699b9cb55364"
1513+
integrity sha512-RgoO0rKnFbeWZeLtZ56m7kwW16N2DeLt/AZkpl5QKEWHRYhnu7W0X6LBiV+16ByPhjXBaop01lOPrISU2clBCQ==
1514+
1515+
"@rootnative/seo@0.0.0-alpha.24":
1516+
version "0.0.0-alpha.24"
1517+
resolved "https://registry.yarnpkg.com/@rootnative/seo/-/seo-0.0.0-alpha.24.tgz#be60e937e7f75d699eb4b8138584bd3344b96fbe"
1518+
integrity sha512-VYYFKOYLo/u0uDfXH+aeq3bYLiuiIAqstC601JWvM4rK7KdnSenAGk2t3aGmXxPAqqkwsPs0JOyQFEHgdAqSuw==
15191519

15201520
"@rtsao/scc@^1.1.0":
15211521
version "1.1.0"

0 commit comments

Comments
 (0)