From c109481aaeed6c010dba6496e570a36aa7a586a3 Mon Sep 17 00:00:00 2001 From: EGAMAGZ <46827955+EGAMAGZ@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:02:30 -0600 Subject: [PATCH 1/4] refactor: update icon import to use tb-icons alias --- frontend/components/GitHubRepoInput.tsx | 2 +- frontend/components/Header.tsx | 2 +- frontend/components/HomepageHero.tsx | 2 +- frontend/components/List.tsx | 2 +- frontend/components/NavOverflow.tsx | 2 +- frontend/components/Table.tsx | 2 +- frontend/deno.json | 2 +- frontend/islands/CopyButton.tsx | 2 +- frontend/islands/GithubUserLink.tsx | 2 +- frontend/islands/UserMenu.tsx | 2 +- frontend/routes/@[scope]/~/members.tsx | 2 +- frontend/routes/@[scope]/~/settings.tsx | 2 +- frontend/routes/account/tokens/(_islands)/CreateToken.tsx | 2 +- frontend/routes/account/tokens/create.tsx | 2 +- frontend/routes/account/tokens/index.tsx | 2 +- frontend/routes/admin/scopes/index.tsx | 2 +- frontend/routes/auth.tsx | 2 +- frontend/routes/docs/[...id].tsx | 2 +- frontend/routes/new.tsx | 2 +- frontend/routes/package/(_components)/PackageHeader.tsx | 4 ++-- frontend/routes/package/(_islands)/DependencyGraph.tsx | 2 +- frontend/routes/package/publish.tsx | 2 +- frontend/routes/package/score.tsx | 2 +- frontend/routes/package/source.tsx | 2 +- frontend/routes/package/versions.tsx | 2 +- frontend/routes/publishing/(_islands)/publishing.tsx | 2 +- frontend/routes/status.tsx | 2 +- 27 files changed, 28 insertions(+), 28 deletions(-) diff --git a/frontend/components/GitHubRepoInput.tsx b/frontend/components/GitHubRepoInput.tsx index 9add7562..ce5fe5e0 100644 --- a/frontend/components/GitHubRepoInput.tsx +++ b/frontend/components/GitHubRepoInput.tsx @@ -1,7 +1,7 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { Signal } from "@preact/signals"; import { useRef } from "preact/hooks"; -import TbBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import TbBrandGithub from "tb-icons/TbBrandGithub"; export interface GithubRepoInputProps { id: string; diff --git a/frontend/components/Header.tsx b/frontend/components/Header.tsx index 405c431b..8077345c 100644 --- a/frontend/components/Header.tsx +++ b/frontend/components/Header.tsx @@ -3,7 +3,7 @@ import { FullUser } from "../utils/api_types.ts"; import { GlobalSearch } from "../islands/GlobalSearch.tsx"; import { UserMenu } from "../islands/UserMenu.tsx"; -import TbBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import TbBrandGithub from "tb-icons/TbBrandGithub"; import { SearchKind } from "../util.ts"; import { HeaderLogo } from "../islands/HeaderLogo.tsx"; diff --git a/frontend/components/HomepageHero.tsx b/frontend/components/HomepageHero.tsx index 7a7d0e2e..a18d0a8b 100644 --- a/frontend/components/HomepageHero.tsx +++ b/frontend/components/HomepageHero.tsx @@ -3,7 +3,7 @@ import { asset } from "fresh/runtime"; import { GlobalSearch } from "../islands/GlobalSearch.tsx"; import { HomepageHeroParticles } from "../islands/HomepageHeroParticles.tsx"; import { AnimatedLogo } from "./AnimatedLogo.tsx"; -import TbPlus from "@preact-icons/tb/TbPlus"; +import TbPlus from "tb-icons/TbPlus"; const canvasStyle = /*css*/ `.particles-js-canvas-el { position: absolute; diff --git a/frontend/components/List.tsx b/frontend/components/List.tsx index 00e51ac0..ec0b38e4 100644 --- a/frontend/components/List.tsx +++ b/frontend/components/List.tsx @@ -1,6 +1,6 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { PaginationData } from "../util.ts"; -import TbChevronRight from "@preact-icons/tb/TbChevronRight"; +import TbChevronRight from "tb-icons/TbChevronRight"; import { ComponentChildren } from "preact"; export interface ListDisplayItem { diff --git a/frontend/components/NavOverflow.tsx b/frontend/components/NavOverflow.tsx index 4b8b3e8c..392b2759 100644 --- a/frontend/components/NavOverflow.tsx +++ b/frontend/components/NavOverflow.tsx @@ -1,5 +1,5 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. -import TbDots from "@preact-icons/tb/TbDots"; +import TbDots from "tb-icons/TbDots"; const NAV_OVERFLOW_SCRIPT = /* js */ ` (() => { diff --git a/frontend/components/Table.tsx b/frontend/components/Table.tsx index 6b46e0fe..09ac94e0 100644 --- a/frontend/components/Table.tsx +++ b/frontend/components/Table.tsx @@ -1,7 +1,7 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { ComponentChild, ComponentChildren } from "preact"; -import { TbChevronLeft, TbChevronRight } from "@preact-icons/tb"; +import { TbChevronLeft, TbChevronRight } from "tb-icons"; import { PaginationData } from "../util.ts"; interface TableProps { diff --git a/frontend/deno.json b/frontend/deno.json index 1a2fec1c..800322ea 100644 --- a/frontend/deno.json +++ b/frontend/deno.json @@ -13,7 +13,7 @@ } }, "imports": { - "@preact-icons/tb": "jsr:@preact-icons/tb@^1.0.12", + "tb-icons": "jsr:@preact-icons/tb@^1.0.12", "fresh": "jsr:@fresh/core@^2.0.0-alpha.25", "@fresh/plugin-tailwind": "jsr:@fresh/plugin-tailwind@^0.0.1-alpha.7", diff --git a/frontend/islands/CopyButton.tsx b/frontend/islands/CopyButton.tsx index 2a3262e7..169431e4 100644 --- a/frontend/islands/CopyButton.tsx +++ b/frontend/islands/CopyButton.tsx @@ -1,7 +1,7 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { useSignal } from "@preact/signals"; import { useCallback, useRef } from "preact/hooks"; -import { TbCheck, TbCopy } from "@preact-icons/tb"; +import { TbCheck, TbCopy } from "tb-icons"; interface CopyButtonProps { title: string; diff --git a/frontend/islands/GithubUserLink.tsx b/frontend/islands/GithubUserLink.tsx index 3e7d89bf..243b01b2 100644 --- a/frontend/islands/GithubUserLink.tsx +++ b/frontend/islands/GithubUserLink.tsx @@ -1,6 +1,6 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { useSignal } from "@preact/signals"; -import TbBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import TbBrandGithub from "tb-icons/TbBrandGithub"; import { useEffect } from "preact/hooks"; import { User } from "../utils/api_types.ts"; import { cachedGitHubLogin } from "../utils/github.ts"; diff --git a/frontend/islands/UserMenu.tsx b/frontend/islands/UserMenu.tsx index 107044f9..2e418ff0 100644 --- a/frontend/islands/UserMenu.tsx +++ b/frontend/islands/UserMenu.tsx @@ -7,7 +7,7 @@ import { TbPlus, TbUser, TbUserCog, -} from "@preact-icons/tb"; +} from "tb-icons"; const SHARED_ITEM_CLASSES = "flex items-center justify-start gap-2 px-4 py-2.5 focus-visible:ring-2 ring-inset outline-none"; diff --git a/frontend/routes/@[scope]/~/members.tsx b/frontend/routes/@[scope]/~/members.tsx index 32f860b8..691fb00b 100644 --- a/frontend/routes/@[scope]/~/members.tsx +++ b/frontend/routes/@[scope]/~/members.tsx @@ -15,7 +15,7 @@ import { ScopeMember, } from "../../../utils/api_types.ts"; import { scopeData } from "../../../utils/data.ts"; -import TbTrash from "@preact-icons/tb/TbTrash"; +import TbTrash from "tb-icons/TbTrash"; import { scopeIAM } from "../../../utils/iam.ts"; import { ScopeIAM } from "../../../utils/iam.ts"; diff --git a/frontend/routes/@[scope]/~/settings.tsx b/frontend/routes/@[scope]/~/settings.tsx index f65fa08e..6105ac5d 100644 --- a/frontend/routes/@[scope]/~/settings.tsx +++ b/frontend/routes/@[scope]/~/settings.tsx @@ -8,7 +8,7 @@ import { FullScope, User } from "../../../utils/api_types.ts"; import { scopeDataWithMember } from "../../../utils/data.ts"; import { path } from "../../../utils/api.ts"; import { QuotaCard } from "../../../components/QuotaCard.tsx"; -import TbCheck from "@preact-icons/tb/TbCheck"; +import TbCheck from "tb-icons/TbCheck"; import { scopeIAM } from "../../../utils/iam.ts"; export default define.page(function ScopeSettingsPage( diff --git a/frontend/routes/account/tokens/(_islands)/CreateToken.tsx b/frontend/routes/account/tokens/(_islands)/CreateToken.tsx index ec69caac..cf8d2a2a 100644 --- a/frontend/routes/account/tokens/(_islands)/CreateToken.tsx +++ b/frontend/routes/account/tokens/(_islands)/CreateToken.tsx @@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef } from "preact/hooks"; import { Signal, useComputed, useSignal } from "@preact/signals"; import { IS_BROWSER } from "fresh/runtime"; import { CopyButton } from "../../../../islands/CopyButton.tsx"; -import TbChevronLeft from "@preact-icons/tb/TbChevronLeft"; +import TbChevronLeft from "tb-icons/TbChevronLeft"; import { api, APIResponseError, path } from "../../../../utils/api.ts"; import { CreatedToken, Permission } from "../../../../utils/api_types.ts"; import { ErrorDisplay } from "../../../../components/ErrorDisplay.tsx"; diff --git a/frontend/routes/account/tokens/create.tsx b/frontend/routes/account/tokens/create.tsx index 7793780a..17f0317b 100644 --- a/frontend/routes/account/tokens/create.tsx +++ b/frontend/routes/account/tokens/create.tsx @@ -1,7 +1,7 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { HttpError } from "fresh"; import { define } from "../../../util.ts"; -import TbChevronLeft from "@preact-icons/tb/TbChevronLeft"; +import TbChevronLeft from "tb-icons/TbChevronLeft"; import { CreateToken } from "./(_islands)/CreateToken.tsx"; export default define.page(function AccountCreateTokenPage() { diff --git a/frontend/routes/account/tokens/index.tsx b/frontend/routes/account/tokens/index.tsx index 0da983a7..294e2a29 100644 --- a/frontend/routes/account/tokens/index.tsx +++ b/frontend/routes/account/tokens/index.tsx @@ -7,7 +7,7 @@ import { Token } from "../../../utils/api_types.ts"; import { AccountLayout } from "../(_components)/AccountLayout.tsx"; import twas from "twas"; import { RevokeToken } from "./(_islands)/RevokeToken.tsx"; -import TbPlus from "@preact-icons/tb/TbPlus"; +import TbPlus from "tb-icons/TbPlus"; export default define.page(function AccountTokensPage({ data, diff --git a/frontend/routes/admin/scopes/index.tsx b/frontend/routes/admin/scopes/index.tsx index 0a69565c..2b81dc79 100644 --- a/frontend/routes/admin/scopes/index.tsx +++ b/frontend/routes/admin/scopes/index.tsx @@ -6,7 +6,7 @@ import { path } from "../../../utils/api.ts"; import { AdminNav } from "../(_components)/AdminNav.tsx"; import { URLQuerySearch } from "../../../components/URLQuerySearch.tsx"; import { define } from "../../../util.ts"; -import TbArrowRight from "@preact-icons/tb/TbArrowRight"; +import TbArrowRight from "tb-icons/TbArrowRight"; export default define.page(function Scopes({ data, url }) { return ( diff --git a/frontend/routes/auth.tsx b/frontend/routes/auth.tsx index 1565e382..8ed92ce8 100644 --- a/frontend/routes/auth.tsx +++ b/frontend/routes/auth.tsx @@ -10,7 +10,7 @@ import type { Permission, PermissionPackagePublishVersion, } from "../utils/api_types.ts"; -import TbChevronRight from "@preact-icons/tb/TbChevronRight"; +import TbChevronRight from "tb-icons/TbChevronRight"; export default define.page(function AuthPage({ data }) { if (data.code === "" || data.authorization === null) { diff --git a/frontend/routes/docs/[...id].tsx b/frontend/routes/docs/[...id].tsx index 56a41289..3d5804db 100644 --- a/frontend/routes/docs/[...id].tsx +++ b/frontend/routes/docs/[...id].tsx @@ -6,7 +6,7 @@ import { define } from "../../util.ts"; import { extract } from "@std/front-matter/yaml"; import TOC, { groupsNames } from "../../docs/toc.ts"; -import TbBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import TbBrandGithub from "tb-icons/TbBrandGithub"; const groups = new Map(); for (const group of groupsNames) { diff --git a/frontend/routes/new.tsx b/frontend/routes/new.tsx index 16257201..7a798a62 100644 --- a/frontend/routes/new.tsx +++ b/frontend/routes/new.tsx @@ -1,6 +1,6 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { useSignal } from "@preact/signals"; -import { TbBrandGithub, TbFolder, TbPackage } from "@preact-icons/tb"; +import { TbBrandGithub, TbFolder, TbPackage } from "tb-icons"; import { CreatePackage, IconCircle, diff --git a/frontend/routes/package/(_components)/PackageHeader.tsx b/frontend/routes/package/(_components)/PackageHeader.tsx index 5fcd235e..3352a952 100644 --- a/frontend/routes/package/(_components)/PackageHeader.tsx +++ b/frontend/routes/package/(_components)/PackageHeader.tsx @@ -1,6 +1,6 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { Package, PackageVersionWithUser } from "../../../utils/api_types.ts"; -import TbBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import TbBrandGithub from "tb-icons/TbBrandGithub"; import { RuntimeCompatIndicator } from "../../../components/RuntimeCompatIndicator.tsx"; import { getScoreTextColorClass } from "../../../utils/score_ring_color.ts"; import { @@ -8,7 +8,7 @@ import { TbExternalLink, TbFlag, TbRosetteDiscountCheck, -} from "@preact-icons/tb"; +} from "tb-icons"; import { Tooltip } from "../../../components/Tooltip.tsx"; import twas from "twas"; import { greaterThan, parse } from "@std/semver"; diff --git a/frontend/routes/package/(_islands)/DependencyGraph.tsx b/frontend/routes/package/(_islands)/DependencyGraph.tsx index 52537c14..403d4cbf 100644 --- a/frontend/routes/package/(_islands)/DependencyGraph.tsx +++ b/frontend/routes/package/(_islands)/DependencyGraph.tsx @@ -11,7 +11,7 @@ import { TbMinus, TbPlus, TbRefresh, -} from "@preact-icons/tb"; +} from "tb-icons"; import type { DependencyGraphItem, diff --git a/frontend/routes/package/publish.tsx b/frontend/routes/package/publish.tsx index c8afc1c0..c1d6353f 100644 --- a/frontend/routes/package/publish.tsx +++ b/frontend/routes/package/publish.tsx @@ -6,7 +6,7 @@ import { packageData } from "../../utils/data.ts"; import { GitHubActionsLink } from "../../islands/GitHubActionsLink.tsx"; import { PackageNav, Params } from "./(_components)/PackageNav.tsx"; import { PackageHeader } from "./(_components)/PackageHeader.tsx"; -import TbBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import TbBrandGithub from "tb-icons/TbBrandGithub"; import { scopeIAM } from "../../utils/iam.ts"; import { CopyButton } from "../../islands/CopyButton.tsx"; diff --git a/frontend/routes/package/score.tsx b/frontend/routes/package/score.tsx index e6bd43ba..28ebe432 100644 --- a/frontend/routes/package/score.tsx +++ b/frontend/routes/package/score.tsx @@ -7,7 +7,7 @@ import { define } from "../../util.ts"; import { packageData } from "../../utils/data.ts"; import { PackageHeader } from "./(_components)/PackageHeader.tsx"; import { PackageNav, Params } from "./(_components)/PackageNav.tsx"; -import { TbAlertCircle, TbCheck, TbX } from "@preact-icons/tb"; +import { TbAlertCircle, TbCheck, TbX } from "tb-icons"; import { getScoreBgColorClass } from "../../utils/score_ring_color.ts"; import { scopeIAM } from "../../utils/iam.ts"; import { Logo } from "../../components/Logo.tsx"; diff --git a/frontend/routes/package/source.tsx b/frontend/routes/package/source.tsx index 2d08c912..baba9d96 100644 --- a/frontend/routes/package/source.tsx +++ b/frontend/routes/package/source.tsx @@ -5,7 +5,7 @@ import { define } from "../../util.ts"; import { packageDataWithSource } from "../../utils/data.ts"; import { PackageNav, Params } from "./(_components)/PackageNav.tsx"; import { PackageHeader } from "./(_components)/PackageHeader.tsx"; -import { TbFolder, TbSourceCode } from "@preact-icons/tb"; +import { TbFolder, TbSourceCode } from "tb-icons"; import { ListDisplay } from "../../components/List.tsx"; import { scopeIAM } from "../../utils/iam.ts"; diff --git a/frontend/routes/package/versions.tsx b/frontend/routes/package/versions.tsx index 25537329..a1f4b7ab 100644 --- a/frontend/routes/package/versions.tsx +++ b/frontend/routes/package/versions.tsx @@ -17,7 +17,7 @@ import { TbCheck, TbClockHour3, TbTrashX, -} from "@preact-icons/tb"; +} from "tb-icons"; import { ScopeIAM, scopeIAM } from "../../utils/iam.ts"; export default define.page(function Versions({ diff --git a/frontend/routes/publishing/(_islands)/publishing.tsx b/frontend/routes/publishing/(_islands)/publishing.tsx index ed98334f..7875cd56 100644 --- a/frontend/routes/publishing/(_islands)/publishing.tsx +++ b/frontend/routes/publishing/(_islands)/publishing.tsx @@ -6,7 +6,7 @@ import { PublishingTask, PublishingTaskStatus, } from "../../../utils/api_types.ts"; -import { TbAlertCircle, TbCheck, TbClockHour3 } from "@preact-icons/tb"; +import { TbAlertCircle, TbCheck, TbClockHour3 } from "tb-icons"; export interface VersionPublishStatus { loading: boolean; diff --git a/frontend/routes/status.tsx b/frontend/routes/status.tsx index 3115a091..f75855e5 100644 --- a/frontend/routes/status.tsx +++ b/frontend/routes/status.tsx @@ -11,7 +11,7 @@ import { PackageHeader } from "./package/(_components)/PackageHeader.tsx"; import { PackageNav } from "./package/(_components)/PackageNav.tsx"; import twas from "twas"; import PublishingTaskRequeue from "../islands/PublishingTaskRequeue.tsx"; -import { TbAlertCircle, TbCheck, TbClockHour3 } from "@preact-icons/tb"; +import { TbAlertCircle, TbCheck, TbClockHour3 } from "tb-icons"; import { scopeIAM } from "../utils/iam.ts"; export default define.page(function PackageListPage({ From 91075ad97b79aff0a086d616f9a1bbdea44b339b Mon Sep 17 00:00:00 2001 From: EGAMAGZ <46827955+EGAMAGZ@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:11:29 -0600 Subject: [PATCH 2/4] style: Formatted code --- frontend/islands/UserMenu.tsx | 8 +------- frontend/routes/package/versions.tsx | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/frontend/islands/UserMenu.tsx b/frontend/islands/UserMenu.tsx index 2e418ff0..37bf18e5 100644 --- a/frontend/islands/UserMenu.tsx +++ b/frontend/islands/UserMenu.tsx @@ -1,13 +1,7 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import { useEffect, useId, useRef, useState } from "preact/hooks"; import { FullUser } from "../utils/api_types.ts"; -import { - TbArrowRight, - TbLogout, - TbPlus, - TbUser, - TbUserCog, -} from "tb-icons"; +import { TbArrowRight, TbLogout, TbPlus, TbUser, TbUserCog } from "tb-icons"; const SHARED_ITEM_CLASSES = "flex items-center justify-start gap-2 px-4 py-2.5 focus-visible:ring-2 ring-inset outline-none"; diff --git a/frontend/routes/package/versions.tsx b/frontend/routes/package/versions.tsx index a1f4b7ab..666ec837 100644 --- a/frontend/routes/package/versions.tsx +++ b/frontend/routes/package/versions.tsx @@ -12,12 +12,7 @@ import { packageData } from "../../utils/data.ts"; import { PackageHeader } from "./(_components)/PackageHeader.tsx"; import { PackageNav, Params } from "./(_components)/PackageNav.tsx"; import { path } from "../../utils/api.ts"; -import { - TbAlertCircle, - TbCheck, - TbClockHour3, - TbTrashX, -} from "tb-icons"; +import { TbAlertCircle, TbCheck, TbClockHour3, TbTrashX } from "tb-icons"; import { ScopeIAM, scopeIAM } from "../../utils/iam.ts"; export default define.page(function Versions({ From 51793d95278f4ef235d81501e2368198b6930605 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Mon, 10 Mar 2025 05:00:59 +0100 Subject: [PATCH 3/4] chore: update reserved_scopes.json (#1009) --- api/src/reserved_scopes.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/reserved_scopes.json b/api/src/reserved_scopes.json index 63ee7b1d..0a844926 100644 --- a/api/src/reserved_scopes.json +++ b/api/src/reserved_scopes.json @@ -162,6 +162,7 @@ "dotenvexpand", "dropbox", "ejs", + "emacs", "ember", "emojiregex", "encoding", @@ -391,6 +392,7 @@ "nan", "nanoid", "neon", + "neovim", "netlify", "next", "nextjs", From 6253f857142ee942eab060db83d399378f591876 Mon Sep 17 00:00:00 2001 From: Gamaliel Garcia <46827955+EGAMAGZ@users.noreply.github.com> Date: Sun, 9 Mar 2025 22:05:05 -0600 Subject: [PATCH 4/4] fix: Removed extra " that didn't allow bg color on hover (#1003) --- frontend/routes/package/(_islands)/DependencyGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/routes/package/(_islands)/DependencyGraph.tsx b/frontend/routes/package/(_islands)/DependencyGraph.tsx index 403d4cbf..52d3ac29 100644 --- a/frontend/routes/package/(_islands)/DependencyGraph.tsx +++ b/frontend/routes/package/(_islands)/DependencyGraph.tsx @@ -369,7 +369,7 @@ function GraphControlButton(props: GraphControlButtonProps) {