Skip to content

Commit

Permalink
Merge more tags
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed Dec 30, 2023
1 parent 2a41518 commit 3ede42b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
12 changes: 5 additions & 7 deletions src/lib/schemas.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -51,7 +50,6 @@ export const PACKAGES_TAGS = /** @type {const} */ ([
'time-and-date',
'typescript',
'user-interaction',
'video',
'viewport'
]);

Expand All @@ -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',
Expand Down Expand Up @@ -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)
})
);
28 changes: 14 additions & 14 deletions src/routes/packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 3ede42b

Please sign in to comment.