Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ body:
Issues without a reproduction are likely to stale.
placeholder: Link to a Snack or a GitHub repository
validations:
required: true
required: false

- type: input
id: react-native-executorch-version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-android-llm-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- third-party/android/**
- examples/llm/package.json
- examples/llm/android/**
workflow_dispatch:
jobs:
build:
if: github.repository == 'software-mansion/react-native-executorch'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-ios-llm-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- '*.podspec'
- 'examples/llm/ios/**'
- 'examples/llm/package.json'
workflow_dispatch:
jobs:
build:
if: github.repository == 'software-mansion/react-native-executorch'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
merge_group:
types:
- checks_requested

workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/docs-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ on:
- main
paths:
- 'docs/**'
- '.github/workflows/docs-build-check.yml'
pull_request:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs-build-check.yml'
workflow_dispatch:

jobs:
check:
if: github.repository == 'software-mansion/react-native-executorch'
Expand All @@ -18,17 +24,15 @@ jobs:
env:
WORKING_DIRECTORY: docs
steps:
- name: checkout
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v2
with:
node-version: 18
cache: 'yarn'
- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
# the mkdir is a workaround to avoid this: https://github.com/actions/setup-node/issues/317
run: mkdir -p .yarn/cache && yarn
run: yarn install --immutable
- name: Generate docs
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember, the publish docs job shouldn't automatically run on push to main, only workflow_dispatch should be present here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the main branch we still have publish on push

branches:
- main

workflow_dispatch:
jobs:
publish:
if: github.repository == 'software-mansion/react-native-executorch'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ class RecognizerUtils {
cords.x *= originalPaddings["resizeRatio"]!! as Float
cords.y *= originalPaddings["resizeRatio"]!! as Float

cords.x = cords.x.coerceIn(0.0, (image.cols() - 1).toDouble())
cords.y = cords.y.coerceIn(0.0, (image.rows() - 1).toDouble())

points[i] = Point(cords.x, cords.y)
}

Expand Down
9 changes: 9 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const config = {

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

trailingSlash: false,

organizationName: 'software-mansion',
projectName: 'react-native-executorch',

Expand Down Expand Up @@ -69,6 +71,12 @@ const config = {
label: 'Docs',
position: 'right',
},
{
'href': 'https://discord.gg/ZGqqY55qkP',
'position': 'right',
'className': 'header-discord',
'aria-label': 'Discord server',
},
{
'href':
'https://github.com/software-mansion/react-native-executorch',
Expand All @@ -85,6 +93,7 @@ const config = {
'All trademarks and copyrights belong to their respective owners.',
},
prism: {
additionalLanguages: ['bash'],
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
Expand Down
26 changes: 13 additions & 13 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "2.4.3",
"@docusaurus/plugin-sitemap": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@mdx-js/react": "^1.6.22",
"@swmansion/t-rex-ui": "^0.0.14",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@docusaurus/core": "3.7.0",
"@docusaurus/plugin-sitemap": "3.7.0",
"@docusaurus/preset-classic": "3.7.0",
"@mdx-js/react": "^3.0.0",
"@swmansion/t-rex-ui": "1.0.0",
"clsx": "^2.1.0",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.7.4"
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/tsconfig": "3.7.0",
"typescript": "~5.2.2"
},
"browserslist": {
"production": [
Expand All @@ -43,6 +43,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
33 changes: 31 additions & 2 deletions docs/src/css/overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ table thead tr {
height: 24px;
width: 24px;

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

background-color: var(--ifm-navbar-link-color);
Expand All @@ -84,6 +84,35 @@ table thead tr {
background-color: var(--ifm-navbar-link-hover-color);
}

@media (min-width: 996px) {
.header-discord {
margin-left: 1.5em;
}
}

.header-discord:before {
display: flex;
height: 24px;
width: 24px;

mask: url(/static/img/discord.svg) no-repeat center;
mask-size: contain;
content: '';

background-color: var(--ifm-navbar-link-color);
}

@media (max-height: 420px) {
.header-discord:before {
height: 20px;
width: 20px;
}
}

.header-discord:hover:before {
background-color: var(--ifm-navbar-link-hover-color);
}

.community-holder-container {
display: flex;
flex-wrap: wrap;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/theme/CodeBlock/highlighting-dark.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const darkTheme = require('prism-react-renderer/themes/github');
const darkTheme = require('prism-react-renderer').themes.github;

module.exports = {
...darkTheme,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/theme/CodeBlock/highlighting-light.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const lightTheme = require('prism-react-renderer/themes/github');
const lightTheme = require('prism-react-renderer').themes.github;

module.exports = {
...lightTheme,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/theme/MDXComponents/Details.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MDXDetails = (props) => {
// Split summary item from the rest to pass it as a separate prop to the
// Details theme component
const summary = items.find(
(item) => React.isValidElement(item) && item.props?.mdxType === 'summary'
(item) => React.isValidElement(item) && item.type === 'summary'
);

const children = <>{items.filter((item) => item !== summary)}</>;
Expand Down
1 change: 1 addition & 0 deletions docs/static/img/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
Expand Down
Loading
Loading