Skip to content

Commit 77937db

Browse files
docs: Bump t-rex to stable with Docusaurus 3.7 (#3516)
## Description CI won't work untill t-rex is bumped - [x] Prepare docs - [x] Bump `@swmansion/t-rex-ui` to `1.0.0` - [x] Add bash to supported prism langs ## Test plan <!-- Describe how did you test this change here. -->
1 parent 436ae51 commit 77937db

File tree

9 files changed

+6086
-6084
lines changed

9 files changed

+6086
-6084
lines changed

packages/docs-gesture-handler/docs/fundamentals/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ Setting up `react-native-gesture-handler` is pretty straightforward:
2929

3030
<Tabs groupId="package-managers">
3131
<TabItem value="expo" label="EXPO" default>
32-
32+
```bash
3333
npx expo install react-native-gesture-handler
34-
34+
```
3535
</TabItem>
3636
<TabItem value="npm" label="NPM">
37-
37+
```bash
3838
npm install react-native-gesture-handler
39-
39+
```
4040
</TabItem>
4141
<TabItem value="yarn" label="YARN">
42-
42+
```bash
4343
yarn add react-native-gesture-handler
44-
44+
```
4545
</TabItem>
4646
</Tabs>
4747

packages/docs-gesture-handler/docusaurus.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const config = {
113113
'All trademarks and copyrights belong to their respective owners.',
114114
},
115115
prism: {
116+
additionalLanguages: ['bash'],
116117
theme: lightCodeTheme,
117118
darkTheme: darkCodeTheme,
118119
},
@@ -143,15 +144,18 @@ const config = {
143144
new webpack.DefinePlugin({
144145
...processMock,
145146
__DEV__: 'false',
146-
setImmediate: () => {},
147147
}),
148148
],
149149
module: {
150150
rules: [
151151
{
152-
test: /\.txt/,
152+
test: /\.txt$/,
153153
type: 'asset/source',
154154
},
155+
{
156+
test: /\.tsx?$/,
157+
use: 'babel-loader',
158+
},
155159
],
156160
},
157161
resolve: {

packages/docs-gesture-handler/package.json

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,45 +19,47 @@
1919
"dependencies": {
2020
"@babel/plugin-proposal-class-properties": "^7.18.6",
2121
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
22-
"@babel/preset-env": "^7.20.2",
22+
"@babel/preset-env": "^7.24.4",
2323
"@babel/preset-react": "^7.18.6",
2424
"@babel/preset-typescript": "^7.21.0",
25-
"@docusaurus/core": "^2.4.3",
26-
"@docusaurus/plugin-debug": "^2.4.3",
27-
"@docusaurus/preset-classic": "^2.4.3",
28-
"@emotion/react": "^11.10.6",
29-
"@emotion/styled": "^11.10.6",
30-
"@mdx-js/react": "^1.6.22",
31-
"@mui/material": "^5.12.0",
32-
"@swmansion/t-rex-ui": "^0.0.13",
25+
"@docusaurus/core": "3.7.0",
26+
"@docusaurus/plugin-debug": "3.7.0",
27+
"@docusaurus/preset-classic": "3.7.0",
28+
"@emotion/react": "^11.14.0",
29+
"@emotion/styled": "^11.14.0",
30+
"@mdx-js/react": "^3.0.0",
31+
"@mui/material": "^7.1.0",
32+
"@swmansion/t-rex-ui": "1.0.0",
3333
"@vercel/og": "^0.6.2",
34+
"prism-react-renderer": "^2.1.0",
3435
"babel-polyfill": "^6.26.0",
3536
"babel-preset-expo": "^9.2.2",
3637
"babel-preset-react-native": "^4.0.1",
37-
"clsx": "^1.2.1",
38+
"clsx": "^2.1.0",
3839
"raf": "^3.4.1",
3940
"raw-loader": "^4.0.2",
40-
"react": "^17.0.2",
41+
"react": "^18.2.0",
4142
"react-colorful": "^5.6.1",
42-
"react-dom": "^17.0.2",
43+
"react-dom": "^18.2.0",
4344
"react-draggable": "^4.4.5",
4445
"react-native": "^0.71.4",
45-
"react-native-gesture-handler": "^2.16.0",
46-
"react-native-reanimated": "^3.8.1",
46+
"react-native-gesture-handler": "^2.24.0",
47+
"react-native-reanimated": "4.0.0-nightly-20250325-d67e51599",
4748
"react-native-web": "^0.18.12",
49+
"react-native-worklets": "^0.1.0",
4850
"source-map": "^0.7.4",
4951
"source-map-loader": "^4.0.1",
5052
"usehooks-ts": "^2.9.1"
5153
},
5254
"devDependencies": {
53-
"@docusaurus/module-type-aliases": "^2.4.3",
54-
"@tsconfig/docusaurus": "^1.0.7",
55+
"@docusaurus/module-type-aliases": "3.7.0",
56+
"@docusaurus/tsconfig": "3.7.0",
5557
"copy-webpack-plugin": "^11.0.0",
5658
"esbuild": "^0.25.0",
5759
"esbuild-register": "^3.5.0",
5860
"eslint-plugin-mdx": "^2.2.0",
5961
"prettier": "^3.3.3",
60-
"typescript": "^4.7.4",
62+
"typescript": "~5.2.2",
6163
"webpack-cli": "^5.0.1"
6264
},
6365
"browserslist": {
@@ -73,7 +75,7 @@
7375
]
7476
},
7577
"engines": {
76-
"node": ">=16.14"
78+
"node": ">=18.0"
7779
},
7880
"packageManager": "[email protected]"
7981
}

packages/docs-gesture-handler/src/theme/CodeBlock/highlighting-dark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const darkTheme = require('prism-react-renderer/themes/github');
1+
const darkTheme = require('prism-react-renderer').themes.github;
22

33
module.exports = {
44
...darkTheme,

packages/docs-gesture-handler/src/theme/CodeBlock/highlighting-light.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const lightTheme = require('prism-react-renderer/themes/github');
1+
const lightTheme = require('prism-react-renderer').themes.github;
22

33
module.exports = {
44
...lightTheme,

packages/docs-gesture-handler/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
// This file is not used in compilation. It is here just for a nice editor experience.
3-
"extends": "@tsconfig/docusaurus/tsconfig.json",
3+
"extends": "@docusaurus/tsconfig",
44
"compilerOptions": {
55
"baseUrl": "."
66
}

packages/docs-gesture-handler/versioned_docs/version-1.x/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In a nutshell, the library provides:
2727
| 1.1.0+ | 0.57.2+ |
2828
| &lt;1.1.0 | 0.50.0+ |
2929

30-
It may be possible to use newer versions of react-native-gesture-handler on React Native with version <= 0.59 by reverse Jetifying.
30+
It may be possible to use newer versions of react-native-gesture-handler on React Native with version &lt;= 0.59 by reverse Jetifying.
3131
Read more on that here https://github.com/mikehardy/jetifier#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries
3232

3333
Note that if you wish to use [`React.createRef()`](https://reactjs.org/docs/refs-and-the-dom.html) support for [interactions](interactions.md) you need to use v16.3 of [React](https://reactjs.org/)
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
2-
"version-1.x/docs": [
2+
"docs": [
33
{
44
"collapsed": true,
55
"type": "category",
66
"label": "Basics",
77
"items": [
88
{
99
"type": "doc",
10-
"id": "version-1.x/getting-started"
10+
"id": "getting-started"
1111
},
1212
{
1313
"type": "doc",
14-
"id": "version-1.x/about-handlers"
14+
"id": "about-handlers"
1515
},
1616
{
1717
"type": "doc",
18-
"id": "version-1.x/state"
18+
"id": "state"
1919
},
2020
{
2121
"type": "doc",
22-
"id": "version-1.x/interactions"
22+
"id": "interactions"
2323
},
2424
{
2525
"type": "doc",
26-
"id": "version-1.x/example"
26+
"id": "example"
2727
}
2828
]
2929
},
@@ -39,43 +39,43 @@
3939
"items": [
4040
{
4141
"type": "doc",
42-
"id": "version-1.x/api/gesture-handlers/common-gh"
42+
"id": "api/gesture-handlers/common-gh"
4343
},
4444
{
4545
"type": "doc",
46-
"id": "version-1.x/api/gesture-handlers/pan-gh"
46+
"id": "api/gesture-handlers/pan-gh"
4747
},
4848
{
4949
"type": "doc",
50-
"id": "version-1.x/api/gesture-handlers/tap-gh"
50+
"id": "api/gesture-handlers/tap-gh"
5151
},
5252
{
5353
"type": "doc",
54-
"id": "version-1.x/api/gesture-handlers/longpress-gh"
54+
"id": "api/gesture-handlers/longpress-gh"
5555
},
5656
{
5757
"type": "doc",
58-
"id": "version-1.x/api/gesture-handlers/rotation-gh"
58+
"id": "api/gesture-handlers/rotation-gh"
5959
},
6060
{
6161
"type": "doc",
62-
"id": "version-1.x/api/gesture-handlers/fling-gh"
62+
"id": "api/gesture-handlers/fling-gh"
6363
},
6464
{
6565
"type": "doc",
66-
"id": "version-1.x/api/gesture-handlers/pinch-gh"
66+
"id": "api/gesture-handlers/pinch-gh"
6767
},
6868
{
6969
"type": "doc",
70-
"id": "version-1.x/api/gesture-handlers/force-gh"
70+
"id": "api/gesture-handlers/force-gh"
7171
},
7272
{
7373
"type": "doc",
74-
"id": "version-1.x/api/gesture-handlers/nativeview-gh"
74+
"id": "api/gesture-handlers/nativeview-gh"
7575
},
7676
{
7777
"type": "doc",
78-
"id": "version-1.x/api/gesture-handlers/create-native-wrapper"
78+
"id": "api/gesture-handlers/create-native-wrapper"
7979
}
8080
]
8181
},
@@ -86,19 +86,19 @@
8686
"items": [
8787
{
8888
"type": "doc",
89-
"id": "version-1.x/api/components/buttons"
89+
"id": "api/components/buttons"
9090
},
9191
{
9292
"type": "doc",
93-
"id": "version-1.x/api/components/swipeable"
93+
"id": "api/components/swipeable"
9494
},
9595
{
9696
"type": "doc",
97-
"id": "version-1.x/api/components/touchables"
97+
"id": "api/components/touchables"
9898
},
9999
{
100100
"type": "doc",
101-
"id": "version-1.x/api/components/drawer-layout"
101+
"id": "api/components/drawer-layout"
102102
}
103103
]
104104
}
@@ -111,21 +111,21 @@
111111
"items": [
112112
{
113113
"type": "doc",
114-
"id": "version-1.x/contributing"
114+
"id": "contributing"
115115
},
116116
{
117117
"type": "doc",
118-
"id": "version-1.x/troubleshooting"
118+
"id": "troubleshooting"
119119
},
120120
{
121121
"type": "doc",
122-
"id": "version-1.x/resources"
122+
"id": "resources"
123123
},
124124
{
125125
"type": "doc",
126-
"id": "version-1.x/credits"
126+
"id": "credits"
127127
}
128128
]
129129
}
130130
]
131-
}
131+
}

0 commit comments

Comments
 (0)