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
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
**(boolean)** - works with [Expo Go](https://docs.expo.dev/get-started/expo-go/) — an open-source sandbox app, without using [dev clients](https://docs.expo.dev/develop/development-builds/introduction/) or [prebuild](https://docs.expo.dev/workflow/continuous-native-generation/).
- #### `fireos`
**(boolean)** - works on Amazon Fire OS.
- #### `vegaos`
**(boolean)** - works with [Vega OS](https://developer.amazon.com/docs/react-native-vega/0.72/react_overview.html).

> [!TIP]
> **Any** library can be used with Expo, if you use dev clients or prebuild.
Expand Down Expand Up @@ -173,7 +175,7 @@ You should be able to visit `localhost:3000` in your browser.

- Visit https://github.com/settings/developers to get your keys (don't worry about the callback URL, put whatever you want).
- Load the `GITHUB_TOKEN` environment variable into your shell.
- Set `ONLY_WRITE_LOCAL_DATA_FILE` to `true` in *scripts/build-and-score-data.ts* to skip fetching and updating store blob from Vercel and instead use and update the local `assets/data.json` file.
- Set `ONLY_WRITE_LOCAL_DATA_FILE` to `true` in *scripts/build-and-score-data.ts* to skip fetching and updating store blob from Vercel and instead use and update the local `assets/data.json` file.

This command creates site data in `./assets/data.json`

Expand Down Expand Up @@ -202,28 +204,28 @@ https://reactnative.directory/api/libraries
```
https://reactnative.directory/api/libraries?search=webgl
```
- Returns a list of all libraries in `JSON` format that have the keyword `webgl`.

- Returns a list of all libraries in `JSON` format that have the keyword `webgl`.

```
https://reactnative.directory/api/libraries?search=webgl&expoGo=true
```
- Returns a list of all libraries in `JSON` format that have the keyword `webgl` and work with Expo Go app.

- Returns a list of all libraries in `JSON` format that have the keyword `webgl` and work with Expo Go app.

```
https://reactnative.directory/api/libraries?search=webgl&expoGo=true&android=true
```
- Returns a list of all libraries in `JSON` format that have the keyword `webgl`, work with Expo Go app and Android.

- Returns a list of all libraries in `JSON` format that have the keyword `webgl`, work with Expo Go app and Android.

```
https://reactnative.directory/api/libraries?search=webgl&expoGo=true&android=true&isPopular=true
```
- Returns a list of all libraries in `JSON` format that have the keyword `webgl`, work with Expo Go app, Android and are popular based on the scoring criterion.
All the possible query parameters represents [`Query` type](https://github.com/react-native-community/directory/blob/main/types/index.ts#L14-L36).

- Returns a list of all libraries in `JSON` format that have the keyword `webgl`, work with Expo Go app, Android and are popular based on the scoring criterion.

All the possible query parameters represents [`Query` type](https://github.com/react-native-community/directory/blob/main/types/index.ts#L14-L36).
</details>

## I don't like how you calculate scores.
Expand All @@ -240,4 +242,4 @@ https://reactnative.directory/api/libraries
```sh
# once environment variables are configured, install Vercel and deploy
bunx vercel
```
```
3 changes: 2 additions & 1 deletion components/CompatibilityTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function CompatibilityTags({ library }: Props) {
/>
) : null
)}
{(library.expoGo || library.fireos) && (
{(library.expoGo || library.fireos || library.vegaos) && (
<Tooltip
side="bottom"
trigger={
Expand All @@ -77,6 +77,7 @@ export function CompatibilityTags({ library }: Props) {
<ul style={styles.compatibilityList}>
{library.expoGo && <li>Works with Expo Go</li>}
{library.fireos && <li>Works with Fire OS</li>}
{library.vegaos && <li>Works with Vega OS</li>}
</ul>
</Tooltip>
)}
Expand Down
4 changes: 4 additions & 0 deletions components/Filters/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ export const FILTER_COMPATIBILITY: FilterParamsType[] = [
param: 'fireos',
title: 'Works with Fire OS',
},
{
param: 'vegaos',
title: 'Works with Vega OS',
},
];

export const FILTER_TYPE: FilterParamsType[] = [
Expand Down
1 change: 1 addition & 0 deletions pages/api/libraries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
fireos: parsedQuery.fireos,
tvos: parsedQuery.tvos,
visionos: parsedQuery.visionos,
vegaos: parsedQuery.vegaos,
},
hasExample: parsedQuery.hasExample,
hasImage: parsedQuery.hasImage,
Expand Down
9 changes: 8 additions & 1 deletion react-native-libraries.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
true
]
},
"vegaos": {
"$id": "#/items/properties/vegaos",
"type": "boolean",
"title": "Package is compatible with Vega OS",
"default": false,
"examples": [true]
},
"expoGo": {
"$id": "#/items/properties/expo",
"type": "boolean",
Expand Down Expand Up @@ -218,4 +225,4 @@
}
}
}
}
}
2 changes: 2 additions & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type Query = {
fireos?: string;
tvos?: string;
visionos?: string;
vegaos?: string;
web?: string;
windows?: string;
order?: QueryOrder;
Expand Down Expand Up @@ -135,6 +136,7 @@ export type LibraryDataEntryType = {
fireos?: boolean;
tvos?: boolean;
visionos?: boolean;
vegaos?: boolean;
unmaintained?: boolean;
dev?: boolean;
template?: boolean;
Expand Down
1 change: 1 addition & 0 deletions util/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const VALID_ENTRY_KEYS = new Set([
'fireos',
'tvos',
'visionos',
'vegaos',
'unmaintained',
'dev',
'template',
Expand Down
4 changes: 4 additions & 0 deletions util/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export function handleFilterLibraries({
return false;
}

if (support.vegaos && !library.vegaos) {
return false;
}

if (support.fireos && !library.fireos) {
return false;
}
Expand Down