Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Added Edit & Delete features, fixed extra re-renders, added UTM params for custom domains

Steven Tey72dbf3ef7973
diff --git a/app/ui/home/footer.tsx b/app/ui/home/footer.tsx
index 5af0d100d5..5dac2f9c7f 100644
--- a/app/ui/home/footer.tsx
+++ b/app/ui/home/footer.tsx
@@ -13,7 +13,13 @@ export default function Footer() {
<span className="sr-only">Twitter</span>
<Twitter className="h-6 w-6 text-gray-600" />
</a>
- <Link href={domain === "dub.sh" ? "/" : `https://dub.sh`}>
+ <Link
+ href={
+ domain === "dub.sh"
+ ? "/"
+ : `https://dub.sh?utm_source=${domain}&utm_medium=referral&utm_campaign=custom-domain`
+ }
+ >
<span className="sr-only">Dub.sh Logo</span>
<Logo className="h-7 w-7 text-gray-600" />
</Link>
diff --git a/app/ui/home/nav.tsx b/app/ui/home/nav.tsx
index 394fb69dad..d5d47ed357 100644
--- a/app/ui/home/nav.tsx
+++ b/app/ui/home/nav.tsx
@@ -24,7 +24,13 @@ export default function Nav() {
>
<div className="mx-auto w-full max-w-screen-xl px-5 md:px-20">
<div className="flex h-16 items-center justify-between">
- <Link href={domain === "dub.sh" ? "/" : `https://dub.sh`}>
+ <Link
+ href={
+ domain === "dub.sh"
+ ? "/"
+ : `https://dub.sh?utm_source=${domain}&utm_medium=referral&utm_campaign=custom-domain`
+ }
+ >
<Image
src="/_static/logotype.svg"
alt="Dub.sh logo"
@@ -37,7 +43,9 @@ export default function Nav() {
<div className="flex items-center space-x-6">
<Link
href={
- domain === "dub.sh" ? "/metatags" : `https://dub.sh/metatags`
+ domain === "dub.sh"
+ ? "/metatags"
+ : `https://dub.sh/metatags?utm_source=${domain}&utm_medium=referral&utm_campaign=custom-domain`
}
className={`hidden rounded-md text-sm font-medium ${
segment === "metatags" ? "text-black" : "text-gray-500"
@@ -47,7 +55,9 @@ export default function Nav() {
</Link>
<Link
href={
- domain === "dub.sh" ? "/changelog" : `https://dub.sh/changelog`
+ domain === "dub.sh"
+ ? "/changelog"
+ : `https://dub.sh/changelog?utm_source=${domain}&utm_medium=referral&utm_campaign=custom-domain`
}
className={`rounded-md text-sm font-medium ${
segment === "changelog" ? "text-black" : "text-gray-500"
diff --git a/components/app/links/link-card.tsx b/components/app/links/link-card.tsx
index 31d0b6f4cf..cd78294e8d 100644
--- a/components/app/links/link-card.tsx
+++ b/components/app/links/link-card.tsx
@@ -96,27 +96,40 @@ export default function LinkCard({ props }: { props: LinkProps }) {
});
const [openPopover, setOpenPopover] = useState(false);
const [selected, setSelected] = useState(false);
- // if clicked on linkRef, setSelected to true
- // else setSelected to false
- // do this via event listener
- const onClick = (e: any) => {
+ useEffect(() => {
+ // if there's an existing modal backdrop and the link is selected, unselect it
const existingModalBackdrop = document.getElementById("modal-backdrop");
- if (!existingModalBackdrop) {
- if (linkRef.current && !linkRef.current.contains(e.target)) {
- setSelected(false);
- } else {
- setSelected(!selected);
- }
+ if (existingModalBackdrop && selected) {
+ setSelected(false);
+ }
+ });
+
+ const handlClickOnLinkCard = (e: any) => {
+ // if clicked on linkRef, setSelected to true
+ // else setSelected to false
+ // do this via event listener
+ if (linkRef.current && !linkRef.current.contains(e.target)) {
+ setSelected(false);
+ } else {
+ setSelected(!selected);
}
};
+ useEffect(() => {
+ document.addEventListener("click", handlClickOnLinkCard);
+ return () => {
+ document.removeEventListener("click", handlClickOnLinkCard);
+ };
+ }, [handlClickOnLinkCard]);
+
const shortcuts = slug ? ["e", "d", "t", "a", "x"] : ["e", "d", "a", "x"];
const onKeyDown = (e: any) => {
// only run shortcut logic if:
// - usage is not exceeded
// - link is selected or the 3 dots menu is open
// - the key pressed is one of the shortcuts
+ // - there is no existing modal backdrop
if (
!exceededUsage &&
(selected || openPopover) &&
@@ -144,13 +157,11 @@ export default function LinkCard({ props }: { props: LinkProps }) {
};
useEffect(() => {
- document.addEventListener("click", onClick);
document.addEventListener("keydown", onKeyDown);
return () => {
- document.removeEventListener("click", onClick);
document.removeEventListener("keydown", onKeyDown);
};
- }, [onClick, onKeyDown]);
+ }, [onKeyDown]);
return (
<div
diff --git a/components/app/links/link-filters.tsx b/components/app/links/link-filters.tsx
index a95db4ed7e..09392d145c 100644
--- a/components/app/links/link-filters.tsx
+++ b/components/app/links/link-filters.tsx
@@ -34,8 +34,9 @@ export default function LinkFilters() {
const { data: tagsCount } = useLinksCount({ groupBy: "tagId" });
const router = useRouter();
- const { slug, search, domain, userId, tagId } = router.query as {
+ const { slug, sort, search, domain, userId, tagId } = router.query as {
slug: string;
+ sort?: string;
search?: string;
domain?: string;
userId?: string;
@@ -48,7 +49,7 @@ export default function LinkFilters() {
<div className="grid gap-3 py-6">
<div className="flex items-center justify-between">
<h3 className="ml-1 mt-2 font-semibold">Filter Links</h3>
- {(search || domain || userId || tagId) && (
+ {(sort || search || domain || userId || tagId) && (
<ClearButton searchInputRef={searchInputRef} />
)}
</div>
@@ -248,12 +249,12 @@ const TagsFilter = ({ tags, tagsCount }) => {
color: tags?.find((tag) => tag.id === tagId)?.color || "blue",
count: _count,
}));
- if (search.length > 0) {
- return initialOptions.filter(({ name }) =>
- name.toLowerCase().includes(search.toLowerCase()),
- );
- }
- return initialOptions;
+ // filter options based on search
+ return search.length > 0
+ ? initialOptions.filter(({ name }) =>
+ name.toLowerCase().includes(search.toLowerCase()),
+ )
+ : initialOptions;
}, [tagsCount, tags, search]);
return (
@@ -277,20 +278,42 @@ const TagsFilter = ({ tags, tagsCount }) => {
className="mt-4 grid gap-2"
{...SWIPE_REVEAL_ANIMATION_SETTINGS}
>
- <div className="relative mb-1">
- <div className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
- <Search className="h-4 w-4 text-gray-400" />
- </div>
- <input
- type="text"
- className="peer w-full rounded-md border border-gray-300 py-1.5 pl-10 text-sm text-black placeholder:text-gray-400 focus:border-black focus:ring-0"
- placeholder="Filter tags"
- value={search}
- onChange={(e) => setSearch(e.target.value)}
- />
- </div>
- {(showMore ? options : options.slice(0, 4)).map(
- ({ id, name, color, count }) => (
+ {tags?.length === 0 ? ( // if the project has no tags
+ <p className="text-center text-sm text-gray-500">
+ No tags yet.{" "}
+ <a
+ className="font-medium underline underline-offset-4 transition-colors hover:text-black"
+ href="https://dub.sh/guides/how-to-use-tags"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ Add one.
+ </a>
+ </p>
+ ) : (
+ <>
+ <div className="relative mb-1">
+ <div className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
+ <Search className="h-4 w-4 text-gray-400" />
+ </div>
+ <input
+ type="text"
+ className="peer w-full rounded-md border border-gray-300 py-1.5 pl-10 text-sm text-black placeholder:text-gray-400 focus:border-black focus:ring-0"
+ placeholder="Filter tags"
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ />
+ </div>
+ {options.length === 0 && (
+ <p className="text-center text-sm text-gray-500">
+ No tags match your search.
+ </p>
+ )}
+ </>
+ )}
+ {options
+ .slice(0, showMore ? options.length : 4)
+ .map(({ id, name, color, count }) => (
<div
key={id}
className="relative flex cursor-pointer items-center space-x-3 rounded-md bg-gray-50 transition-all hover:bg-gray-100"
@@ -313,8 +336,7 @@ const TagsFilter = ({ tags, tagsCount }) => {
<p className="text-gray-500">{nFormatter(count)}</p>
</label>
</div>
- ),
- )}
+ ))}
{options.length > 4 && (
<button
onClick={() => setShowMore(!showMore)}
diff --git a/components/app/links/links-container.tsx b/components/app/links/links-container.tsx
index 9f62e6ab51..e17f2d4715 100644
--- a/components/app/links/links-container.tsx
+++ b/components/app/links/links-container.tsx
@@ -24,7 +24,7 @@ export default function LinksContainer({
<LinkSort />
</div>
<div className="grid grid-cols-1 gap-5 lg:grid-cols-7">
- <div className="sticky top-32 col-span-2 hidden max-h-[calc(100vh-150px)] self-start overflow-scroll rounded-lg border border-gray-100 bg-white shadow lg:block">
+ <div className="sticky top-32 col-span-2 hidden max-h-[calc(100vh-150px)] self-start overflow-auto rounded-lg border border-gray-100 bg-white shadow scrollbar-hide lg:block">
<LinkFilters />
</div>
<ul className="col-span-1 grid auto-rows-min grid-cols-1 gap-3 lg:col-span-5">
diff --git a/components/app/modals/add-edit-link-modal/index.tsx b/components/app/modals/add-edit-link-modal/index.tsx
index 0a8e3fa01d..db7c03ff9f 100644
--- a/components/app/modals/add-edit-link-modal/index.tsx
+++ b/components/app/modals/add-edit-link-modal/index.tsx
@@ -133,8 +133,9 @@ function AddEditLinkModal({
* Only generate metatags if:
* - modal is open
* - custom OG proxy is not enabled
+ * - url is not empty
**/
- if (showAddEditLinkModal && !proxy) {
+ if (showAddEditLinkModal && !proxy && debouncedUrl.length > 0) {
setData((prev) => ({
...prev,
title: null,
@@ -251,7 +252,7 @@ function AddEditLinkModal({
setShowModal={setShowAddEditLinkModal}
closeWithX={homepageDemo ? false : true}
>
- <div className="relative grid max-h-[min(906px,_90vh)] w-full divide-x divide-gray-100 overflow-scroll bg-white shadow-xl transition-all scrollbar-hide md:max-w-screen-lg md:grid-cols-2 md:overflow-hidden md:rounded-2xl md:border md:border-gray-200">
+ <div className="relative grid max-h-[min(906px,_90vh)] w-full divide-x divide-gray-100 overflow-auto bg-white shadow-xl transition-all scrollbar-hide md:max-w-screen-lg md:grid-cols-2 md:overflow-hidden md:rounded-2xl md:border md:border-gray-200">
{!hideXButton && !homepageDemo && (
<button
onClick={() => setShowAddEditLinkModal(false)}
@@ -262,7 +263,7 @@ function AddEditLinkModal({
)}
<div
- className="rounded-l-2xl md:max-h-[min(906px,_90vh)] md:overflow-scroll"
+ className="rounded-l-2xl scrollbar-hide md:max-h-[min(906px,_90vh)] md:overflow-auto"
onScroll={handleScroll}
>
<div className="z-10 flex flex-col items-center justify-center space-y-3 border-b border-gray-200 bg-white px-4 pb-8 pt-8 transition-all md:sticky md:top-0 md:px-16">
@@ -539,7 +540,7 @@ function AddEditLinkModal({
</div>
</form>
</div>
- <div className="rounded-r-2xl md:max-h-[min(906px,_90vh)] md:overflow-scroll">
+ <div className="rounded-r-2xl scrollbar-hide md:max-h-[min(906px,_90vh)] md:overflow-auto">
<Preview data={data} generatingMetatags={generatingMetatags} />
</div>
</div>
diff --git a/components/app/modals/tag-link-modal.tsx b/components/app/modals/tag-link-modal.tsx
index 763137b2ae..2a2b553fb3 100644
--- a/components/app/modals/tag-link-modal.tsx
+++ b/components/app/modals/tag-link-modal.tsx
@@ -12,17 +12,20 @@ import {
import { mutate } from "swr";
import BlurImage from "#/ui/blur-image";
import Modal from "@/components/shared/modal";
-import { LinkProps } from "@/lib/types";
+import { LinkProps, TagProps } from "@/lib/types";
import { getApexDomain, getQueryString, linkConstructor } from "@/lib/utils";
import { GOOGLE_FAVICON_URL } from "@/lib/constants";
import { toast } from "sonner";
-import { Check, ChevronDown, Search, X } from "lucide-react";
+import { Check, ChevronDown, Search, Trash, X } from "lucide-react";
import { Command } from "cmdk";
import Button from "#/ui/button";
import useTags from "@/lib/swr/use-tags";
-import Badge from "@/components/shared/badge";
+import Badge, { COLORS_LIST } from "@/components/shared/badge";
import va from "@vercel/analytics";
-import useWindowSize from "#/lib/hooks/use-window-size";
+import { ThreeDots } from "@/components/shared/icons";
+import Popover from "@/components/shared/popover";
+import IconMenu from "@/components/shared/icon-menu";
+import { LoadingCircle } from "#/ui/icons";
function TagLinkModal({
showTagLinkModal,
@@ -45,6 +48,14 @@ function TagLinkModal({
tags?.find((t) => t.id === tagId)?.name || "",
);
+ const saveDisabled = useMemo(() => {
+ return tagging ||
+ // if the tagId's value is the same as the tagValue, then we don't need to save
+ (tagId && tags?.find((t) => t.id === tagId)?.name === tagValue)
+ ? true
+ : false;
+ }, [tagging, tagId, tags, tagValue]);
+
const shortlink = useMemo(() => {
return linkConstructor({
key,
@@ -94,23 +105,31 @@ function TagLinkModal({
const commandRef = useRef<HTMLDivElement | null>(null);
const [open, setOpen] = useState(false);
- const { width } = useWindowSize();
+
useEffect(() => {
const handleClickOutside = (e) => {
- if (commandRef.current && !commandRef.current.contains(e.target)) {
+ if (
+ commandRef.current &&
+ !commandRef.current.contains(e.target) &&
+ // if the target is not part of a div that has
+ // the data-exclude-click attribute
+ e.target.closest("[data-exclude-click]") === null
+ ) {
setOpen(false);
}
};
- // only for desktop
- if (width > 768) {
- document.addEventListener("mousedown", handleClickOutside);
- return () =>
- document.removeEventListener("mousedown", handleClickOutside);
+ if (showTagLinkModal && open) {
+ document.addEventListener("click", handleClickOutside);
+ return () => document.removeEventListener("click", handleClickOutside);
}
- }, [commandRef, width]);
+ }, [commandRef, showTagLinkModal, open]);
return (
- <Modal showModal={showTagLinkModal} setShowModal={setShowTagLinkModal}>
+ <Modal
+ showModal={showTagLinkModal}
+ setShowModal={setShowTagLinkModal}
+ pauseTrap={open}
+ >
<div className="inline-block w-full bg-white align-middle shadow-xl transition-all sm:max-w-md sm:rounded-2xl sm:border sm:border-gray-200">
<div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-4 pt-8 text-center sm:px-16">
<BlurImage
@@ -142,6 +161,7 @@ function TagLinkModal({
<Search className="absolute inset-y-0 left-0 my-auto h-7 w-7 pl-3 text-gray-400" />
<Command.Input
placeholder="Choose tag"
+ // only show the dropdown if there are tags and the tagValue is not empty
onFocus={() => tags && tags.length > 0 && setOpen(true)}
value={tagValue}
onValueChange={setTagValue}
@@ -157,7 +177,8 @@ function TagLinkModal({
// if dropdown is already closed, submit form
handleSubmit();
}
- } else {
+ // if it's a letter or a number and there's no meta key pressed, open dropdown
+ } else if (e.key.match(/^[a-z0-9]$/i) && !e.metaKey) {
setOpen(true);
}
}}
@@ -165,7 +186,8 @@ function TagLinkModal({
/>
{tagValue ? (
<button
- onClick={() => {
+ onClick={(e) => {
+ e.stopPropagation();
setTagValue("");
setOpen(true);
}}
@@ -179,10 +201,11 @@ function TagLinkModal({
</div>
{open && (
<Command.List
+ data-exclude-click
style={{
animationFillMode: "forwards", // to keep the last frame of the animation
}}
- className="absolute z-10 h-[300px] w-full animate-input-select-slide-up overflow-auto rounded-md border border-gray-200 bg-white p-2 transition-all sm:h-auto sm:max-h-[300px] sm:animate-input-select-slide-down"
+ className="absolute z-10 h-[300px] w-full animate-input-select-slide-up overflow-auto rounded-md border border-gray-200 bg-white p-2 shadow-md transition-all sm:h-auto sm:max-h-[300px] sm:animate-input-select-slide-down"
>
<Command.Empty>
<button
@@ -210,25 +233,157 @@ function TagLinkModal({
setTagValue(tag.name);
setOpen(false);
}}
- className="flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-selected:bg-gray-100 aria-selected:text-gray-900"
+ className="group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-selected:bg-gray-100 aria-selected:text-gray-900"
>
<Badge {...tag} />
- {tagValue === tag.name && (
- <Check className="h-4 w-4 text-gray-500" />
- )}
+ <TagPopover key={tag.id} tag={tag} />
</Command.Item>
))}
</Command.List>
)}
</Command>
- <Button loading={tagging} text="Confirm selection" />
+ <Button
+ loading={tagging}
+ disabled={saveDisabled}
+ text="Save changes"
+ />
</form>
</div>
</Modal>
);
}
+const TagPopover = ({ tag }: { tag: TagProps }) => {
+ const router = useRouter();
+ const { slug } = router.query as { slug: string };
+ const [data, setData] = useState(tag);
+ const [openPopover, setOpenPopover] = useState(false);
+ const [processing, setProcessing] = useState(false);
+
+ const handleEdit = async (e) => {
+ e.stopPropagation();
+ e.preventDefault();
+ setProcessing(true);
+ fetch(`/api/projects/${slug}/tags/${tag.id}`, {
+ method: "PUT",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify(data),
+ }).then((res) => {
+ setProcessing(false);
+ if (res.ok) {
+ toast.success("Tag updated");
+ mutate(`/api/projects/${slug}/tags`);
+ } else {
+ toast.error("Something went wrong");
+ }
+ });
+ };
+
+ const handleDelete = async () => {
+ setProcessing(true);
+ fetch(`/api/projects/${slug}/tags/${tag.id}`, {
+ method: "DELETE",
+ }).then((res) => {
+ setProcessing(false);
+ if (res.ok) {
+ toast.success("Tag deleted");
+ mutate(`/api/projects/${slug}/tags`);
+ } else {
+ toast.error("Something went wrong");
+ }
+ });
+ };
+
+ return processing ? (
+ <LoadingCircle />
+ ) : (
+ <Popover
+ content={
+ <div
+ data-exclude-click
+ className="flex w-48 flex-col divide-y divide-gray-200"
+ >
+ <div className="p-2">
+ <form
+ onClick={(e) => e.stopPropagation()} // prevent triggering <Command.Item> onClick
+ onKeyDown={(e) => e.stopPropagation()} // prevent triggering <Command.Item> onKeyDown
+ onSubmit={handleEdit}
+ className="relative py-1"
+ >
+ <div className="my-2 flex items-center justify-between px-3">
+ <p className="text-xs text-gray-500">Edit Tag</p>
+ {data !== tag && (
+ <button className="text-xs text-gray-500">Save</button>
+ )}
+ </div>
+ <input
+ type="text"
+ autoFocus
+ required
+ value={data.name}
+ onChange={(e) => setData({ ...data, name: e.target.value })}
+ className="block w-full rounded-md border-gray-300 py-1 pr-7 text-sm text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500"
+ />
+ <div className="grid grid-cols-3 gap-3 p-3 pb-0">
+ {COLORS_LIST.map(({ color, css }) => (
+ <button
+ key={color}
+ type="button"
+ className={`mx-auto flex h-6 w-6 items-center justify-center rounded-full transition-all duration-75 hover:scale-110 active:scale-90 ${css}`}
+ onClick={(e) => {
+ e.stopPropagation();
+ setData({ ...data, color });
+ }}
+ >
+ {data.color === color && <Check className="h-4 w-4" />}
+ </button>
+ ))}
+ </div>
+ </form>
+ </div>
+ <div className="p-2">
+ <button
+ onClick={() => {
+ confirm(
+ "Are you sure you want to delete this tag? All tagged links will be untagged, but they won't be deleted.",
+ ) && handleDelete();
+ }}
+ className="flex w-full items-center space-x-2 rounded-md p-2 text-red-600 transition-colors hover:bg-red-100 active:bg-red-200"
+ >
+ <IconMenu
+ text="Delete Tag"
+ icon={<Trash className="h-4 w-4 text-red-600" />}
+ />
+ </button>
+ </div>
+ </div>
+ }
+ align="end"
+ desktopOnly
+ openPopover={openPopover}
+ setOpenPopover={setOpenPopover}
+ >
+ <button
+ type="button"
+ onClick={(e) => {
+ e.stopPropagation();
+ setOpenPopover(!openPopover);
+ }}
+ className={`${
+ openPopover
+ ? "bg-gray-200"
+ : "hidden hover:bg-gray-200 group-hover:block"
+ } rounded-md p-1 transition-colors`}
+ >
+ <ThreeDots className="h-4 w-4 text-gray-500" />
+ </button>
+ </Popover>
+ );
+};
+
export function useTagLinkModal({ props }: { props: LinkProps }) {
const [showTagLinkModal, setShowTagLinkModal] = useState(false);
diff --git a/components/layout/app/index.tsx b/components/layout/app/index.tsx
index c0b95f3573..84347a3f05 100644
--- a/components/layout/app/index.tsx
+++ b/components/layout/app/index.tsx
@@ -54,7 +54,7 @@ export default function AppLayout({
plan,
...(stripeId && { stripeId }),
});
- if (plan === "free" && !Cookies.get("hideProBanner")) {
+ if (plan === "free" && Cookies.get("hideProBanner") !== slug) {
Crisp.chat.hide();
setShowProBanner(true);
} else {
diff --git a/components/layout/app/pro-banner.tsx b/components/layout/app/pro-banner.tsx
index c9d0f6aee3..fe55b31f8c 100644
--- a/components/layout/app/pro-banner.tsx
+++ b/components/layout/app/pro-banner.tsx
@@ -24,7 +24,7 @@ export default function ProBanner({
onClick={() => {
setShowProBanner(false);
va.track("Hid Pro Banner");
- Cookies.set("hideProBanner", true, { expires: 7 });
+ Cookies.set("hideProBanner", slug, { expires: 7 });
}}
className="w-full rounded-md border border-gray-300 p-2 text-center text-sm font-medium text-gray-500 transition-all hover:border-gray-700 hover:text-gray-600"
>
diff --git a/components/layout/meta.tsx b/components/layout/meta.tsx
index 6ee5e83540..10f32b78e3 100644
--- a/components/layout/meta.tsx
+++ b/components/layout/meta.tsx
@@ -17,7 +17,7 @@ export default function Meta({
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover"
- ></meta>
+ />
<link
rel="apple-touch-icon"
sizes="180x180"
diff --git a/components/shared/badge.tsx b/components/shared/badge.tsx
index ff49923972..787941f022 100644
--- a/components/shared/badge.tsx
+++ b/components/shared/badge.tsx
@@ -32,15 +32,38 @@ export default function Badge({
);
}
+export const COLORS_LIST: { color: TagColorProps; css: string }[] = [
+ {
+ color: "red",
+ css: "bg-red-100 text-red-600",
+ },
+ {
+ color: "yellow",
+ css: "bg-yellow-100 text-yellow-600",
+ },
+ {
+ color: "green",
+ css: "bg-green-100 text-green-600",
+ },
+ {
+ color: "blue",
+ css: "bg-blue-100 text-blue-600",
+ },
+ {
+ color: "purple",
+ css: "bg-purple-100 text-purple-600",
+ },
+ {
+ color: "pink",
+ css: "bg-pink-100 text-pink-600",
+ },
+ {
+ color: "brown",
+ css: "bg-brown-100 text-brown-600",
+ },
+];
+
export function randomBadgeColor() {
- const colors = [
- "red",
- "yellow",
- "green",
- "blue",
- "purple",
- "pink",
- "brown",
- ] as const;
- return colors[Math.floor(Math.random() * colors.length)];
+ const randomIndex = Math.floor(Math.random() * COLORS_LIST.length);
+ return COLORS_LIST[randomIndex].color;
}
diff --git a/components/shared/modal.tsx b/components/shared/modal.tsx
index 22047a1154..6d7aabaf38 100644
--- a/components/shared/modal.tsx
+++ b/components/shared/modal.tsx
@@ -16,6 +16,7 @@ export default function Modal({
bgColor = "bg-white",
closeWithX,
mobileOnly,
+ pauseTrap,
}: {
children: React.ReactNode;
showModal: boolean;
@@ -23,6 +24,7 @@ export default function Modal({
bgColor?: string;
closeWithX?: boolean;
mobileOnly?: boolean;
+ pauseTrap?: boolean;
}) {
const router = useRouter();
const { key } = router.query;
@@ -78,6 +80,7 @@ export default function Modal({
<AnimatePresence>
{showModal && (
<FocusTrap
+ active={!pauseTrap}
focusTrapOptions={{
initialFocus: false,
onActivate: () => {
diff --git a/components/shared/popover.tsx b/components/shared/popover.tsx
index 7af57b3ecf..97a92e21ff 100644
--- a/components/shared/popover.tsx
+++ b/components/shared/popover.tsx
@@ -2,18 +2,20 @@ import { useRouter } from "next/router";
import { ReactNode, useEffect, useRef } from "react";
import * as PopoverPrimitive from "@radix-ui/react-popover";
import { AnimatePresence, motion, useAnimation } from "framer-motion";
-import useWindowSize from "#/lib/hooks/use-window-size";
+import clsx from "clsx";
export default function Popover({
children,
content,
align = "center",
+ desktopOnly,
openPopover,
setOpenPopover,
}: {
children: ReactNode;
content: ReactNode | string;
align?: "center" | "start" | "end";
+ desktopOnly?: boolean;
openPopover: boolean;
setOpenPopover: (open: boolean) => void;
}) {
@@ -35,7 +37,6 @@ export default function Popover({
controls.start({ y: 0, transition: transitionProps });
}
}
- const { width } = useWindowSize();
// workaround to make popover close when route changes on desktop
useEffect(() => {
@@ -44,63 +45,75 @@ export default function Popover({
return (
<>
- <div className="md:hidden">{children}</div>
- <AnimatePresence>
- {openPopover && (
- <>
- <motion.div
- ref={mobileTooltipRef}
- key="mobile-tooltip"
- className="group fixed inset-x-0 bottom-0 z-40 w-screen cursor-grab active:cursor-grabbing md:hidden"
- initial={{ y: "100%" }}
- animate={{
- y: openPopover ? 0 : "100%",
- transition: transitionProps,
- }}
- exit={{ y: "100%" }}
- transition={transitionProps}
- drag="y"
- dragDirectionLock
- onDragEnd={handleDragEnd}
- dragElastic={{ top: 0, bottom: 1 }}
- dragConstraints={{ top: 0, bottom: 0 }}
- >
- <div
- className={`rounded-t-4xl -mb-1 flex h-7 w-full items-center justify-center border-t border-gray-200 bg-white`}
- >
- <div className="-mr-1 h-1 w-6 rounded-full bg-gray-300 transition-all group-active:rotate-12" />
- <div className="h-1 w-6 rounded-full bg-gray-300 transition-all group-active:-rotate-12" />
- </div>
- <div className="flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl">
- {content}
- </div>
- </motion.div>
- <motion.div
- key="mobile-tooltip-backdrop"
- className="fixed inset-0 z-30 bg-gray-100 bg-opacity-10 backdrop-blur md:hidden"
- initial={{ opacity: 0 }}
- animate={{ opacity: 1 }}
- exit={{ opacity: 0 }}
- onClick={() => setOpenPopover(false)}
- />
- </>
- )}
- </AnimatePresence>
- <PopoverPrimitive.Root
- // workaround to make popover work on mobile (without this it'll automatically close on click without changing route)
- open={width > 640 && openPopover}
- onOpenChange={width > 640 ? setOpenPopover : undefined}
- >
- <PopoverPrimitive.Trigger className="hidden md:inline-flex" asChild>
+ {!desktopOnly && (
+ <>
+ <div className="md:hidden">{children}</div>
+ <AnimatePresence>
+ {openPopover && (
+ <>
+ <motion.div
+ ref={mobileTooltipRef}
+ key="mobile-tooltip"
+ className="group fixed inset-x-0 bottom-0 z-40 w-screen cursor-grab active:cursor-grabbing md:hidden"
+ initial={{ y: "100%" }}
+ animate={{
+ y: openPopover ? 0 : "100%",
+ transition: transitionProps,
+ }}
+ exit={{ y: "100%" }}
+ transition={transitionProps}
+ drag="y"
+ dragDirectionLock
+ onDragEnd={handleDragEnd}
+ dragElastic={{ top: 0, bottom: 1 }}
+ dragConstraints={{ top: 0, bottom: 0 }}
+ >
+ <div
+ className={`rounded-t-4xl -mb-1 flex h-7 w-full items-center justify-center border-t border-gray-200 bg-white`}
+ >
+ <div className="-mr-1 h-1 w-6 rounded-full bg-gray-300 transition-all group-active:rotate-12" />
+ <div className="h-1 w-6 rounded-full bg-gray-300 transition-all group-active:-rotate-12" />
+ </div>
+ <div className="flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl">
+ {content}
+ </div>
+ </motion.div>
+ <motion.div
+ key="mobile-tooltip-backdrop"
+ className="fixed inset-0 z-30 bg-gray-100 bg-opacity-10 backdrop-blur md:hidden"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ onClick={() => setOpenPopover(false)}
+ />
+ </>
+ )}
+ </AnimatePresence>
+ </>
+ )}
+ <PopoverPrimitive.Root modal>
+ <PopoverPrimitive.Trigger
+ {...(!desktopOnly && {
+ className: "hidden md:inline-flex",
+ })}
+ asChild
+ >
{children}
</PopoverPrimitive.Trigger>
- <PopoverPrimitive.Content
- sideOffset={4}
- align={align}
- className="z-20 hidden animate-slide-up-fade items-center rounded-md border border-gray-200 bg-white drop-shadow-lg md:block"
- >
- {content}
- </PopoverPrimitive.Content>
+ <PopoverPrimitive.Portal>
+ <PopoverPrimitive.Content
+ sideOffset={4}
+ align={align}
+ className={clsx(
+ "z-40 animate-slide-up-fade items-center rounded-md border border-gray-200 bg-white drop-shadow-lg",
+ {
+ "hidden md:block": !desktopOnly,
+ },
+ )}
+ >
+ {content}
+ </PopoverPrimitive.Content>
+ </PopoverPrimitive.Portal>
</PopoverPrimitive.Root>
</>
);
diff --git a/package.json b/package.json
index 3dbd4df5eb..9ad97d7ee6 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
"@prisma/client": "^4.13.0",
"@radix-ui/react-accordion": "^1.0.1",
"@radix-ui/react-navigation-menu": "^1.1.2",
- "@radix-ui/react-popover": "^1.0.2",
+ "@radix-ui/react-popover": "^1.0.5",
"@radix-ui/react-slider": "^1.1.0",
"@radix-ui/react-switch": "^1.0.1",
"@radix-ui/react-tooltip": "^1.0.2",
@@ -48,14 +48,14 @@
"contentlayer": "^0.3.2",
"crisp-sdk-web": "^1.0.18",
"focus-trap-react": "^10.0.1",
- "framer-motion": "^10.12.10",
+ "framer-motion": "^10.12.12",
"html-escaper": "^3.0.3",
"i": "^0.3.7",
"js-cookie": "^3.0.5",
"lucide-react": "^0.192.0",
"mailing-core": "^0.9.1",
"ms": "^2.1.3",
- "next": "^13.4.4-canary.0",
+ "next": "^13.4.4-canary.3",
"next-auth": "^4.22.1",
"next-contentlayer": "^0.3.2",
"node-html-parser": "^6.1.4",
diff --git a/pages/api/projects/[slug]/tags/[id].ts b/pages/api/projects/[slug]/tags/[id].ts
new file mode 100644
index 0000000000..da793e992c
--- /dev/null
+++ b/pages/api/projects/[slug]/tags/[id].ts
@@ -0,0 +1,32 @@
+import { withProjectAuth } from "@/lib/auth";
+import prisma from "@/lib/prisma";
+
+export default withProjectAuth(async (req, res) => {
+ const { id } = req.query as { id: string };
+ // PUT /api/projects/[slug]/tags/[id] – update a tag for a project
+ if (req.method === "PUT") {
+ const { name, color } = req.body;
+ const response = await prisma.tag.update({
+ where: {
+ id,
+ },
+ data: {
+ name,
+ color,
+ },
+ });
+ return res.status(200).json(response);
+
+ // DELETE /api/projects/[slug]/tags/[id] – delete a tag for a project
+ } else if (req.method === "DELETE") {
+ const response = await prisma.tag.delete({
+ where: {
+ id,
+ },
+ });
+ return res.status(200).json(response);
+ } else {
+ res.setHeader("Allow", ["PUT", "DELETE"]);
+ return res.status(405).json({ error: `Method ${req.method} Not Allowed` });
+ }
+});
diff --git a/pages/api/projects/[slug]/tags/index.ts b/pages/api/projects/[slug]/tags/index.ts
index f2822c5630..5648430f9a 100644
--- a/pages/api/projects/[slug]/tags/index.ts
+++ b/pages/api/projects/[slug]/tags/index.ts
@@ -1,5 +1,4 @@
import { withProjectAuth } from "@/lib/auth";
-import { removeDomainFromVercel, deleteDomainLinks } from "@/lib/api/domains";
import prisma from "@/lib/prisma";
export default withProjectAuth(async (req, res, project) => {
@@ -19,11 +18,8 @@ export default withProjectAuth(async (req, res, project) => {
},
});
return res.status(200).json(tags);
-
- // PUT /api/projects/[slug]/tags – create a new tag for a project
- } else if (req.method === "POST") {
} else {
- res.setHeader("Allow", ["GET", "POST"]);
+ res.setHeader("Allow", ["GET"]);
return res.status(405).json({ error: `Method ${req.method} Not Allowed` });
}
});
diff --git a/yarn.lock b/yarn.lock
index 64d09fc525..9a4cff62ef 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -699,10 +699,10 @@
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.1.6.tgz#c4925609f16142ded1a5cb833359ab17359b7a93"
integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.4-canary.0.tgz#2de1f8788094a2afd12c02923984dd7f7ab4f906"
- integrity sha512-SicydEJnucnwFzBjKX9bxw8zmjqSNMFGcja4QA6YUcRu1a3/BkMf10OsIzZffYjpK95rPREZrDAfiGjFYLQiAw==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.4-canary.3.tgz#0e7f4465e32fa8a4bca310c99b7c2f4115dc10b4"
+ integrity sha512-JxJhwQ9XRR558jlgoJYPccM6XgfPwOmZwtJ4Ie+n6Irhc6pJyATTAjgZFJHL85TWuCia5CI9nVAxlt/LPNc8RA==
version "13.1.6"
@@ -719,20 +719,20 @@
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz#ec1b90fd9bf809d8b81004c5182e254dced4ad96"
integrity sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.4-canary.0.tgz#e8447c4400e40e6813e65d58d76f080e356de459"
- integrity sha512-ZbiA6c1lDPngCs0IinQHT0fBFfeFGs7S2d2EX0c5dxLCX922JfTg+J1M5tuJPxXtG61UnIXp7GLPvzkehrisvw==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.4-canary.3.tgz#b287e9042c020e7e8c140abda702bbb29158adc0"
+ integrity sha512-LANaPyvgv+Rb+0PuCqC5ga+IQvcg5VXp/IGL64RPHhDmc1lSPlNh6tse3DTjtLtHo1wbFA5sc3BuAkM/URwrsg==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz#e869ac75d16995eee733a7d1550322d9051c1eb4"
integrity sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.4-canary.0.tgz#c61e665bbf002ea8bc11c2f86c8d2182c8e4edaf"
- integrity sha512-3eG0Tp6gp/wyFatCr5BUwIYGdtFVw57EDO6n5ftIrHlghBMiRk/X4LCVrAVy9LDGXIVcMeq2otTBACvaEfXUGg==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.4-canary.3.tgz#ba99f8a121d86c9d75dec0e8fde05c931a3bfb8c"
+ integrity sha512-Z0CxnvU3MZVawExMqBBSyiLO+rqAGFeqEuTkHBmNATyuPLnknVPJxZtPcGx0uVqmX4GYfA1+PtsZnfhYfKCGfQ==
version "13.1.6"
@@ -749,70 +749,70 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz#87a71db21cded3f7c63d1d19079845c59813c53d"
integrity sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.4-canary.0.tgz#1e6a9c69102f4c55fa947682786791ec5e0f8109"
- integrity sha512-xRxS91oYyw2nj7vwww+ctAL2F8KqMjBQI61rr4KheORe3Z5Oq5BZwRGxN1VcuvRQl+yGzXPIrecBcu0dhCKXLg==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.4-canary.3.tgz#7285ef9e9acad22c7fa8d262175a49672ed70aad"
+ integrity sha512-fmLaBf0BYVsapLQsUtTPjKNukFIPACEJuqjdjAW+RPaoUP6EOeu5Y62qFz8Biy6x06RHez6aOZ/VQvCdo0RbdA==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz#c5aac8619331b9fd030603bbe2b36052011e11de"
integrity sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.4-canary.0.tgz#cd8951617434320e238fd3b279083afc658c9165"
- integrity sha512-aZiWguod67WUL+KE1lOXingKwhVzML+SQj00+YcqJCa296o/ZjvWtD8xxidg1y4RLCS3Sw8KklcDI/6ScwB+9Q==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.4-canary.3.tgz#54099dea03f5c309720681c36d69beb53048991b"
+ integrity sha512-sy/nagNqorb/TF/LmSalIsbLP3PvHkTU12I3123GNI9Vb7TV6E9MaEIFlYueDmfV+sAQD4B4x7JLqxNqr2dThQ==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz#9513d36d540bbfea575576746736054c31aacdea"
integrity sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.4-canary.0.tgz#982cd183efdaa9a99a94573dc1f8a62693f570d2"
- integrity sha512-kGZleO3G7AmeVil/sihr/AkHU1soMtEFqjzOKwGguE97ZrJeRx0YJU039kaJDONwkN5oL2W1CXq55LAz9mpLqQ==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.4-canary.3.tgz#3894b8b1182fc1b31fca92714ee9040f40913014"
+ integrity sha512-I60UpiaoOxLLDDBVH6n4pCTXg+kqRFQj5uFJ2VIFyG2WZTwj5D6R7qSe8U+kVLnDTtV/EmvBCfGJY6KUqB6BSw==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz#d61fc6884899f5957251f4ce3f522e34a2c479b7"
integrity sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.4-canary.0.tgz#a39013fa7b75c5fae99613dee00f708a223c2100"
- integrity sha512-rdqyY0RHWladaK5Y85pxegUDMxmw6JV6R+ACDV8cz5eOvlpc97sVdYQTkMoOQGZwgJCAvRNOfxQPesuPY5jPzw==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.4-canary.3.tgz#b5dc388eb51b483f1480feff702c899d492b0ee7"
+ integrity sha512-FASYC/TgQdlgNhHiJjiuqMSx4LRqm85V0R1hAxesXVsGxpMIPiJNdduiErnINzid9W/ixryqHizop+92p7TIcg==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz#fac2077a8ae9768e31444c9ae90807e64117cda7"
integrity sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.4-canary.0.tgz#7603a60f6a54c683811b73cd1d680fea4df06b4b"
- integrity sha512-q36nbkcBN+FF+lroHqLUUJ5ZUcM2iFXwt3iRT29R7rR7tQEeOqbkYWn5Ounyx1vmGlho6dae4Lok1xgNnW0OhQ==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.4-canary.3.tgz#a628b177c7d8e587e10f5f89c365673316a7c083"
+ integrity sha512-unpD/F42HEWlubjnaOS+FKXcuytfIbSJMxv7sLzwVURcQaUpSE4/hdCmqk+5zeh9RJhDoVUyW+yKJqkBzsygtw==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz#498bc11c91b4c482a625bf4b978f98ae91111e46"
integrity sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.4-canary.0.tgz#d3165e805dfb53e65f24574a62ff6acaaf0f512e"
- integrity sha512-8hmfHUF5G9Gf3KBsrwGfuCt7wiaV3x7WRHBNDeP7p4xBkGLFzgLPYlJyIpyyQ5CsSSrayLCWNbDtcKWF5B88MQ==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.4-canary.3.tgz#1f7a8f2a1f87a6a8a8bd6532faed7381742abbbe"
+ integrity sha512-7iEppmgbpFORfecsiQLOtt+x7uqNv8m43vSDj0C7ICaFgU9XzpOwE2Ckk0akDit+dZ6o39mYrDQwKEW0PaR0Mw==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz#17ed919c723426b7d0ce1cd73d40ce3dcd342089"
integrity sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA==
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.4-canary.0.tgz#f4bcd8e84602d86446a2a19f1e94e9401c1a359f"
- integrity sha512-MJbh2UA45vvk9X3LWwjhHZj5h5EZhchcSrHJD9GoKeKae7l4CTJN7qiUc2p5EdzBjrVH0g0MdjxooSyLFNmBsA==
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.4-canary.3.tgz#629d5cb8f17db1f8dd51b39f870838db85442c15"
+ integrity sha512-Z/J5EZDOe+SfXtpt5CCc3YGhYpm0pM9Fx9Ea1v4mZU4qdWb3a05Q5INN7JWIzPumJGD30QRq+11jR08wqMsZ8A==
"@nodelib/[email protected]":
version "2.1.5"
@@ -1315,6 +1315,14 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-primitive" "1.0.1"
+"@radix-ui/[email protected]":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz#93b0ff95f65e2264a05b14ef1031ec798243dd6f"
+ integrity sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/react-primitive" "1.0.2"
+
"@radix-ui/[email protected]":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@radix-ui/react-collapsible/-/react-collapsible-1.0.1.tgz#7184312ce18e703628b9ef75cdc44b896d6f06b1"
@@ -1447,14 +1455,14 @@
"@radix-ui/react-primitive" "1.0.0"
"@radix-ui/react-use-callback-ref" "1.0.0"
-"@radix-ui/[email protected]":
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.1.tgz#faea8c25f537c5a5c38c50914b63722db0e7f951"
- integrity sha512-Ej2MQTit8IWJiS2uuujGUmxXjF/y5xZptIIQnyd2JHLwtV0R2j9NRVoRj/1j/gJ7e3REdaBw4Hjf4a1ImhkZcQ==
+"@radix-ui/[email protected]":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.2.tgz#5fe129cbdb5986d0a3ae16d14c473c243fe3bc79"
+ integrity sha512-spwXlNTfeIprt+kaEWE/qYuYT3ZAqJiAGjN/JgdvgVDTu8yc+HuX+WOWXrKliKnLnwck0F6JDkqIERncnih+4A==
dependencies:
"@babel/runtime" "^7.13.10"
"@radix-ui/react-compose-refs" "1.0.0"
- "@radix-ui/react-primitive" "1.0.1"
+ "@radix-ui/react-primitive" "1.0.2"
"@radix-ui/react-use-callback-ref" "1.0.0"
"@radix-ui/[email protected]":
@@ -1486,23 +1494,23 @@
"@radix-ui/react-use-previous" "1.0.0"
"@radix-ui/react-visually-hidden" "1.0.2"
-"@radix-ui/react-popover@^1.0.2":
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/@radix-ui/react-popover/-/react-popover-1.0.2.tgz#f761c8aafb61519522b8e80501c589e619073a2c"
- integrity sha512-4tqZEl9w95R5mlZ/sFdgBnfhCBOEPepLIurBA5kt/qaAhldJ1tNQd0ngr0ET0AHbPotT4mwxMPr7a+MA/wbK0g==
+"@radix-ui/react-popover@^1.0.5":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-popover/-/react-popover-1.0.5.tgz#9c58100ed6809eb611c0acbf032f9ab58c0b55d1"
+ integrity sha512-GRHZ8yD12MrN2NLobHPE8Rb5uHTxd9x372DE9PPNnBjpczAQHcZ5ne0KXG4xpf+RDdXSzdLv9ym6mYJCDTaUZg==
dependencies:
"@babel/runtime" "^7.13.10"
"@radix-ui/primitive" "1.0.0"
"@radix-ui/react-compose-refs" "1.0.0"
"@radix-ui/react-context" "1.0.0"
- "@radix-ui/react-dismissable-layer" "1.0.2"
+ "@radix-ui/react-dismissable-layer" "1.0.3"
"@radix-ui/react-focus-guards" "1.0.0"
- "@radix-ui/react-focus-scope" "1.0.1"
+ "@radix-ui/react-focus-scope" "1.0.2"
"@radix-ui/react-id" "1.0.0"
- "@radix-ui/react-popper" "1.0.1"
- "@radix-ui/react-portal" "1.0.1"
+ "@radix-ui/react-popper" "1.1.1"
+ "@radix-ui/react-portal" "1.0.2"
"@radix-ui/react-presence" "1.0.0"
- "@radix-ui/react-primitive" "1.0.1"
+ "@radix-ui/react-primitive" "1.0.2"
"@radix-ui/react-slot" "1.0.1"
"@radix-ui/react-use-controllable-state" "1.0.0"
aria-hidden "^1.1.1"
@@ -1524,6 +1532,23 @@
"@radix-ui/react-use-size" "1.0.0"
"@radix-ui/rect" "1.0.0"
+"@radix-ui/[email protected]":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.1.1.tgz#54f060941c981e965ff5d6b64e152d6298d2326e"
+ integrity sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@floating-ui/react-dom" "0.7.2"
+ "@radix-ui/react-arrow" "1.0.2"
+ "@radix-ui/react-compose-refs" "1.0.0"
+ "@radix-ui/react-context" "1.0.0"
+ "@radix-ui/react-primitive" "1.0.2"
+ "@radix-ui/react-use-callback-ref" "1.0.0"
+ "@radix-ui/react-use-layout-effect" "1.0.0"
+ "@radix-ui/react-use-rect" "1.0.0"
+ "@radix-ui/react-use-size" "1.0.0"
+ "@radix-ui/rect" "1.0.0"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.0.0.tgz#7220b66743394fabb50c55cb32381395cc4a276b"
@@ -1540,6 +1565,14 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-primitive" "1.0.1"
+"@radix-ui/[email protected]":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.0.2.tgz#102370b1027a767a371cab0243be4bc664f72330"
+ integrity sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/react-primitive" "1.0.2"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.0.0.tgz#814fe46df11f9a468808a6010e3f3ca7e0b2e84a"
@@ -4300,10 +4333,10 @@ fraction.js@^4.2.0:
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950"
integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==
-framer-motion@^10.12.10:
- version "10.12.10"
- resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.12.10.tgz#39aff293d8c520f6d9a4a34bf25121a8f1a12d6d"
- integrity sha512-f/VkrpxfG4xSmBi105/NCfcTt219IgglQEUR0BsuFZAg+be6N3QAcujFyBEvBvbDOSP9Ccv6OMiaY0HFMnBoMA==
+framer-motion@^10.12.12:
+ version "10.12.12"
+ resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.12.12.tgz#24c3620520f225e446972c42cad1c94d6ce70bbc"
+ integrity sha512-DDCqp60U6hR7aUrXj/BXc/t0Sd/U4ep6w/NZQkw898K+u7s+Vv/P8yxq4WTNA86kU9QCsqOgn1Qhz2DpYK0Oag==
dependencies:
tslib "^2.4.0"
optionalDependencies:
@@ -6807,12 +6840,12 @@ [email protected]:
"@next/swc-win32-ia32-msvc" "13.1.6"
"@next/swc-win32-x64-msvc" "13.1.6"
-next@^13.4.4-canary.0:
- version "13.4.4-canary.0"
- resolved "https://registry.yarnpkg.com/next/-/next-13.4.4-canary.0.tgz#9118d8300e5c8400a7dd6129d3b5a709b88300a2"
- integrity sha512-B5eXkpvJTlmMvygNkTEacxJY2b0PWw5T9TVln4LTdBNKyK8ZyrPhtNCiuwJtYdaoFAIakVg67ZMApssalwlN9g==
+next@^13.4.4-canary.3:
+ version "13.4.4-canary.3"
+ resolved "https://registry.yarnpkg.com/next/-/next-13.4.4-canary.3.tgz#5a57c9e9ca9a8a759b3b14c0c254c25ebe07636f"
+ integrity sha512-gC0fKmS3HNW4OLc88hjXy3OxeBgiKcfT9MqmOJ98sLGhJSfF/UKTJy/dZ7gDHU6X7B+YyjQyVEKR9KqPInLryA==
dependencies:
- "@next/env" "13.4.4-canary.0"
+ "@next/env" "13.4.4-canary.3"
"@swc/helpers" "0.5.1"
busboy "1.6.0"
caniuse-lite "^1.0.30001406"
@@ -6820,15 +6853,15 @@ next@^13.4.4-canary.0:
styled-jsx "5.1.1"
zod "3.21.4"
optionalDependencies:
- "@next/swc-darwin-arm64" "13.4.4-canary.0"
- "@next/swc-darwin-x64" "13.4.4-canary.0"
- "@next/swc-linux-arm64-gnu" "13.4.4-canary.0"
- "@next/swc-linux-arm64-musl" "13.4.4-canary.0"
- "@next/swc-linux-x64-gnu" "13.4.4-canary.0"
- "@next/swc-linux-x64-musl" "13.4.4-canary.0"
- "@next/swc-win32-arm64-msvc" "13.4.4-canary.0"
- "@next/swc-win32-ia32-msvc" "13.4.4-canary.0"
- "@next/swc-win32-x64-msvc" "13.4.4-canary.0"
+ "@next/swc-darwin-arm64" "13.4.4-canary.3"
+ "@next/swc-darwin-x64" "13.4.4-canary.3"
+ "@next/swc-linux-arm64-gnu" "13.4.4-canary.3"
+ "@next/swc-linux-arm64-musl" "13.4.4-canary.3"
+ "@next/swc-linux-x64-gnu" "13.4.4-canary.3"
+ "@next/swc-linux-x64-musl" "13.4.4-canary.3"
+ "@next/swc-win32-arm64-msvc" "13.4.4-canary.3"
+ "@next/swc-win32-ia32-msvc" "13.4.4-canary.3"
+ "@next/swc-win32-x64-msvc" "13.4.4-canary.3"
no-case@^2.2.0:
version "2.3.2"