Skip to content

Commit 1ef9863

Browse files
committed
Merge branch 'main' into v0.4.0-rc1-with-merged-main
2 parents 79a314d + c0c6f0a commit 1ef9863

File tree

20 files changed

+7579
-5480
lines changed

20 files changed

+7579
-5480
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ body:
4848
Issues without a reproduction are likely to stale.
4949
placeholder: Link to a Snack or a GitHub repository
5050
validations:
51-
required: true
51+
required: false
5252

5353
- type: input
5454
id: react-native-executorch-version

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
merge_group:
1010
types:
1111
- checks_requested
12-
12+
workflow_dispatch:
1313
jobs:
1414
lint:
1515
runs-on: ubuntu-latest

.github/workflows/docs-build-check.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ on:
66
- main
77
paths:
88
- 'docs/**'
9+
- '.github/workflows/docs-build-check.yml'
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- 'docs/**'
15+
- '.github/workflows/docs-build-check.yml'
916
workflow_dispatch:
10-
1117
jobs:
1218
check:
1319
if: github.repository == 'software-mansion/react-native-executorch'
@@ -18,17 +24,15 @@ jobs:
1824
env:
1925
WORKING_DIRECTORY: docs
2026
steps:
21-
- name: checkout
22-
uses: actions/checkout@v2
27+
- name: Checkout repository
28+
uses: actions/checkout@v3
2329
- name: Use Node.js 18
2430
uses: actions/setup-node@v2
2531
with:
2632
node-version: 18
27-
cache: 'yarn'
2833
- name: Install node dependencies
2934
working-directory: ${{ env.WORKING_DIRECTORY }}
30-
# the mkdir is a workaround to avoid this: https://github.com/actions/setup-node/issues/317
31-
run: mkdir -p .yarn/cache && yarn
35+
run: yarn install --immutable
3236
- name: Generate docs
3337
working-directory: ${{ env.WORKING_DIRECTORY }}
3438
run: yarn build

.github/workflows/publish_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
7+
workflow_dispatch:
88
jobs:
99
publish:
1010
if: github.repository == 'software-mansion/react-native-executorch'

android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/RecognizerUtils.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ class RecognizerUtils {
335335
cords.x *= originalPaddings["resizeRatio"]!! as Float
336336
cords.y *= originalPaddings["resizeRatio"]!! as Float
337337

338+
cords.x = cords.x.coerceIn(0.0, (image.cols() - 1).toDouble())
339+
cords.y = cords.y.coerceIn(0.0, (image.rows() - 1).toDouble())
340+
338341
points[i] = Point(cords.x, cords.y)
339342
}
340343

docs/docusaurus.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const config = {
1212

1313
baseUrl: '/react-native-executorch/',
1414

15+
trailingSlash: false,
16+
1517
organizationName: 'software-mansion',
1618
projectName: 'react-native-executorch',
1719

@@ -69,6 +71,12 @@ const config = {
6971
label: 'Docs',
7072
position: 'right',
7173
},
74+
{
75+
'href': 'https://discord.gg/ZGqqY55qkP',
76+
'position': 'right',
77+
'className': 'header-discord',
78+
'aria-label': 'Discord server',
79+
},
7280
{
7381
'href':
7482
'https://github.com/software-mansion/react-native-executorch',
@@ -85,6 +93,7 @@ const config = {
8593
'All trademarks and copyrights belong to their respective owners.',
8694
},
8795
prism: {
96+
additionalLanguages: ['bash'],
8897
theme: lightCodeTheme,
8998
darkTheme: darkCodeTheme,
9099
},

docs/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "2.4.3",
19-
"@docusaurus/plugin-sitemap": "2.4.3",
20-
"@docusaurus/preset-classic": "2.4.3",
21-
"@mdx-js/react": "^1.6.22",
22-
"@swmansion/t-rex-ui": "^0.0.14",
23-
"clsx": "^1.2.1",
24-
"prism-react-renderer": "^1.3.5",
25-
"react": "^17.0.2",
26-
"react-dom": "^17.0.2"
18+
"@docusaurus/core": "3.7.0",
19+
"@docusaurus/plugin-sitemap": "3.7.0",
20+
"@docusaurus/preset-classic": "3.7.0",
21+
"@mdx-js/react": "^3.0.0",
22+
"@swmansion/t-rex-ui": "1.0.0",
23+
"clsx": "^2.1.0",
24+
"prism-react-renderer": "^2.1.0",
25+
"react": "^18.2.0",
26+
"react-dom": "^18.2.0"
2727
},
2828
"devDependencies": {
29-
"@docusaurus/module-type-aliases": "2.4.3",
30-
"@tsconfig/docusaurus": "^1.0.5",
31-
"typescript": "^4.7.4"
29+
"@docusaurus/module-type-aliases": "3.7.0",
30+
"@docusaurus/tsconfig": "3.7.0",
31+
"typescript": "~5.2.2"
3232
},
3333
"browserslist": {
3434
"production": [
@@ -43,6 +43,6 @@
4343
]
4444
},
4545
"engines": {
46-
"node": ">=16.14"
46+
"node": ">=18.0"
4747
}
4848
}

docs/src/css/overrides.css

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ table thead tr {
6666
height: 24px;
6767
width: 24px;
6868

69-
mask: url(/static/img/github.svg) no-repeat 100% 100%;
70-
mask-size: cover;
69+
mask: url(/static/img/github.svg) no-repeat center;
70+
mask-size: contain;
7171
content: '';
7272

7373
background-color: var(--ifm-navbar-link-color);
@@ -84,6 +84,35 @@ table thead tr {
8484
background-color: var(--ifm-navbar-link-hover-color);
8585
}
8686

87+
@media (min-width: 996px) {
88+
.header-discord {
89+
margin-left: 1.5em;
90+
}
91+
}
92+
93+
.header-discord:before {
94+
display: flex;
95+
height: 24px;
96+
width: 24px;
97+
98+
mask: url(/static/img/discord.svg) no-repeat center;
99+
mask-size: contain;
100+
content: '';
101+
102+
background-color: var(--ifm-navbar-link-color);
103+
}
104+
105+
@media (max-height: 420px) {
106+
.header-discord:before {
107+
height: 20px;
108+
width: 20px;
109+
}
110+
}
111+
112+
.header-discord:hover:before {
113+
background-color: var(--ifm-navbar-link-hover-color);
114+
}
115+
87116
.community-holder-container {
88117
display: flex;
89118
flex-wrap: wrap;

docs/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,

docs/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,

0 commit comments

Comments
 (0)