diff --git a/API.md b/API.md index 58f2705c7..77d326656 100644 --- a/API.md +++ b/API.md @@ -25,13 +25,14 @@ Return a list of libraries from the dataset. Supports sorting, full-text search, - `search` - full-text search string (`relevance` sorting is used automatically when searching). - `owner` - filter by owner name. - `topic` - filter by topic or tag. - - Platform support filters (booleans): `ios`, `android`, `web`, `windows`, `macos`, `expoGo`, `fireos`, `horizon`, `tvos`, `visionos`, `vegaos`. + - Platform support filters (booleans): `ios`, `android`, `web`, `windows`, `macos`, `expoGo`, `fireos`, `harmony`, `horizon`, `tvos`, `visionos`, `vegaos`. - Feature filters (booleans): `hasExample`, `hasImage`, `hasTypes`, `hasNativeCode`, `configPlugin`. - Quality filters (booleans): `isMaintained`, `isPopular`, `wasRecentlyUpdated`. - Architecture filters (booleans): `newArchitecture`, `expoModule`, `nitroModule`, `turboModule`. - - Skip categories (booleans): `skipLibs`, `skipTools`, `skipTemplates`. + - Skip categories (booleans): `skipLibs`, `skipTools`. - Numeric filters: `minPopularity`, `minMonthlyDownloads`. - `nightlyProgram` - boolean flag for Nightly Program participation. + - `dev` - boolean flag to filter out Development Tools only. - `bookmarks` - when set, the server reads browser cookie bookmarks and returns only bookmarked libraries (see Notes below). - Pagination: `offset` (number, default `0`), `limit` (number, default `20`). diff --git a/README.md b/README.md index 81fba7538..fafd2840e 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ "visionos": false, "expoGo": false, "fireos": false, + "harmony": false, "horizon": false, "vegaos": false, "newArchitecture": false, diff --git a/components/Filters/helpers.ts b/components/Filters/helpers.ts index 87324a5d0..19a6d6c79 100644 --- a/components/Filters/helpers.ts +++ b/components/Filters/helpers.ts @@ -75,6 +75,10 @@ export const FILTER_STATUS: FilterParamsType[] = [ param: 'wasRecentlyUpdated', title: 'Recently updated', }, + { + param: 'dev', + title: 'Development Tool', + }, ]; export const FILTER_COMPATIBILITY: FilterParamsType[] = [ diff --git a/pages/api/libraries/index.ts b/pages/api/libraries/index.ts index 0ccbaab5c..7de9e5ae0 100644 --- a/pages/api/libraries/index.ts +++ b/pages/api/libraries/index.ts @@ -96,6 +96,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) { newArchitecture: parsedQuery.newArchitecture, skipLibs: parsedQuery.skipLibs, skipTools: parsedQuery.skipTools, + dev: parsedQuery.dev, expoModule: parsedQuery.expoModule, nitroModule: parsedQuery.nitroModule, turboModule: parsedQuery.turboModule, diff --git a/types/index.ts b/types/index.ts index c5c3efcac..805913873 100644 --- a/types/index.ts +++ b/types/index.ts @@ -33,6 +33,7 @@ export type Query = { harmony?: string; web?: string; windows?: string; + dev?: string; order?: QueryOrder; direction?: QueryOrderDirection; search?: string; diff --git a/util/search.ts b/util/search.ts index 37a0e3b8e..66e4ada7e 100644 --- a/util/search.ts +++ b/util/search.ts @@ -119,6 +119,7 @@ export function handleFilterLibraries({ minPopularity, minMonthlyDownloads, newArchitecture, + dev, skipLibs, skipTools, expoModule, @@ -161,6 +162,10 @@ export function handleFilterLibraries({ return false; } + if (dev === 'true' && !library.dev) { + return false; + } + for (const param of SUPPORT_PARAMS) { if (support[param] === 'true' && !library[param as keyof LibraryType]) { return false;