diff --git a/src/lib/schemas.js b/src/lib/schemas.js index 55d645b8e..2895cf047 100644 --- a/src/lib/schemas.js +++ b/src/lib/schemas.js @@ -1,11 +1,11 @@ import { z } from 'zod'; import { packageNameRegex } from 'package-name-regex'; -export const PACKAGES_TAGS = /** @type {const} */ ([ +const PACKAGES_TAGS = /** @type {const} */ ([ 'animations', 'async-data', 'async-loading', - 'audio', + 'audio-and-video', 'auth', 'bundler-plugins', 'charts', @@ -22,7 +22,6 @@ export const PACKAGES_TAGS = /** @type {const} */ ([ 'fonts-and-icons', 'forms-and-validation', 'graphql', - 'icons', 'images', 'in-page-navigation', 'inputs-and-widgets', @@ -51,7 +50,6 @@ export const PACKAGES_TAGS = /** @type {const} */ ([ 'time-and-date', 'typescript', 'user-interaction', - 'video', 'viewport' ]); @@ -62,11 +60,11 @@ export const packagesSchema = z.array( url: z.string().url().optional(), repository: z.string().url(), description: z.string().max(250), - tags: z.array(z.enum(PACKAGES_TAGS)).max(6) + tags: z.array(z.enum(PACKAGES_TAGS)).min(1).max(6) }) ); -export const TEMPLATES_TAGS = /** @type {const} */ ([ +const TEMPLATES_TAGS = /** @type {const} */ ([ 'blog', 'code-splitting', 'component-sets', @@ -97,6 +95,6 @@ export const templatesSchema = z.array( url: z.string().url().optional(), repository: z.string().url(), description: z.string().max(250), - tags: z.array(z.enum(TEMPLATES_TAGS)).max(6) + tags: z.array(z.enum(TEMPLATES_TAGS)).min(1).max(6) }) ); diff --git a/src/routes/packages/packages.json b/src/routes/packages/packages.json index f5c7f18f3..785827bf0 100644 --- a/src/routes/packages/packages.json +++ b/src/routes/packages/packages.json @@ -218,7 +218,7 @@ "description": "An icon library for svelte based on Remix Icon. Consists of more than 2000 icons.", "repository": "https://github.com/aantusahaa/svelte-remixicon", "npm": "svelte-remixicon", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"] + "tags": ["components-and-libraries", "fonts-and-icons"] }, { "title": "svelte-fast-marquee", @@ -344,7 +344,7 @@ { "description": "Font Awesome 5 for Svelte", "npm": "fa-svelte", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "fa-svelte", "repository": "https://github.com/alphapeter/fa-svelte" }, @@ -450,7 +450,7 @@ { "description": "SVG icons for popular brands", "npm": "svelte-simple-icons", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "svelte-simple-icons", "repository": "https://github.com/beyonk-group/svelte-simple-icons" }, @@ -513,7 +513,7 @@ { "description": "Tiny FontAwesome 5 component for Svelte", "npm": "svelte-fa", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "svelte-fa", "repository": "https://github.com/Cweili/svelte-fa" }, @@ -548,7 +548,7 @@ { "description": "Feather icons for Svelte", "npm": "svelte-feather-icons", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "svelte-feather-icons", "repository": "https://github.com/dylanblokhuis/svelte-feather-icons" }, @@ -611,7 +611,7 @@ { "description": "Icon components for Svelte, featuring many icon sets", "npm": "svelte-icons", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "svelte-icons", "repository": "https://github.com/Introvertuous/svelte-icons" }, @@ -807,7 +807,7 @@ { "description": "A custom component that adds a favicon and a badge that you can use to show for example number of unread messages.", "npm": "svelte-favicon-badge", - "tags": ["components-and-libraries", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "svelte-favicon-badge", "repository": "https://github.com/kevmodrome/svelte-favicon-badge" }, @@ -1121,7 +1121,7 @@ { "description": "Awesome SVG icon component for Svelte JS, built with Font Awesome icons", "npm": "svelte-awesome", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "svelte-awesome", "repository": "https://github.com/RobBrazier/svelte-awesome" }, @@ -1337,7 +1337,7 @@ { "description": "Focused on making embedding and using media elements for the web simple.", "npm": "@vime/svelte", - "tags": ["video", "audio", "components-and-libraries", "inputs-and-widgets", "multimedia"], + "tags": ["audio-and-video", "components-and-libraries", "inputs-and-widgets", "multimedia"], "title": "Vime", "repository": "https://github.com/vime-js/vime" }, @@ -1466,7 +1466,7 @@ { "description": "SVG icons from feather icons, maki icons and octicons", "npm": "@svelte-parts/icons", - "tags": ["components-and-libraries", "fonts-and-icons", "icons"], + "tags": ["components-and-libraries", "fonts-and-icons"], "title": "@svelte-parts/icons", "url": "https://svelte-parts.surge.sh/icons", "repository": "https://github.com/idris-maps/svelte-parts" @@ -1658,7 +1658,7 @@ "repository": "https://github.com/paolotiu/svelte-boring-avatars", "description": "Svelte port of Boring Avatars", "npm": "svelte-boring-avatars", - "tags": ["components-and-libraries", "images", "typescript", "ssr", "fonts-and-icons", "icons"] + "tags": ["components-and-libraries", "images", "typescript", "ssr", "fonts-and-icons"] }, { "title": "filedrop-svelte", @@ -1979,7 +1979,7 @@ "repository": "https://github.com/macfja/svelte-scroll-video#readme", "npm": "@macfja/svelte-scroll-video", "tags": [ - "video", + "audio-and-video", "images", "inputs-and-widgets", "interactions", @@ -2224,7 +2224,7 @@ "repository": "https://github.com/TwicPics/components", "description": "Images and videos components - Context aware resizing and cropping, lazy-loading, LQIP, Next-Gen format, compression, CDN.", "npm": "@twicpics/components", - "tags": ["components-and-libraries", "images", "video", "multimedia"] + "tags": ["components-and-libraries", "images", "audio-and-video", "multimedia"] }, { "title": "Svane", @@ -2889,7 +2889,7 @@ "repository": "https://github.com/elron/svelte-audio-store", "description": "A Svelte store for managing and playing audio", "npm": "@elron/svelte-audio-store", - "tags": ["audio", "stores-and-state"] + "tags": ["audio-and-video", "stores-and-state"] }, { "title": "Svelte Color Select",