diff --git a/apps/docs/.env.example b/apps/docs/.env.example index c982ad8864..67b4d8ec05 100644 --- a/apps/docs/.env.example +++ b/apps/docs/.env.example @@ -16,4 +16,8 @@ NEXT_PUBLIC_PREVIEW=true/false ## Featurebase NEXT_PUBLIC_FB_FEEDBACK_ORG= -NEXT_PUBLIC_FB_FEEDBACK_URL= \ No newline at end of file +NEXT_PUBLIC_FB_FEEDBACK_URL= + +# PostHog +NEXT_PUBLIC_POSTHOG_KEY=your-posthog-key +NEXT_PUBLIC_POSTHOG_HOST=your-posthog-host \ No newline at end of file diff --git a/apps/docs/app/providers.tsx b/apps/docs/app/providers.tsx index cda396c8ea..59bebcc743 100644 --- a/apps/docs/app/providers.tsx +++ b/apps/docs/app/providers.tsx @@ -1,10 +1,17 @@ "use client"; +import type {ReactNode} from "react"; + import * as React from "react"; import {NextUIProvider} from "@nextui-org/react"; import {ThemeProvider as NextThemesProvider} from "next-themes"; import {ThemeProviderProps} from "next-themes/dist/types"; import {useRouter} from "next/navigation"; +import {useEffect} from "react"; +import posthog from "posthog-js"; +import {PostHogProvider} from "posthog-js/react"; + +import {__PROD__} from "@/utils"; export interface ProvidersProps { children: React.ReactNode; @@ -14,9 +21,29 @@ export interface ProvidersProps { export function Providers({children, themeProps}: ProvidersProps) { const router = useRouter(); + const ProviderWrapper = ({children}: {children: ReactNode}) => { + useEffect(() => { + if (typeof window !== "undefined") { + posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, { + api_host: "/ingest", + person_profiles: "identified_only", + ui_host: process.env.NEXT_PUBLIC_POSTHOG_HOST, + }); + } + }, []); + + if (__PROD__) { + return {children}; + } + + return children; + }; + return ( - - {children} - + + + {children} + + ); } diff --git a/apps/docs/components/blog-post.tsx b/apps/docs/components/blog-post.tsx index b73b67fe75..2c723077d6 100644 --- a/apps/docs/components/blog-post.tsx +++ b/apps/docs/components/blog-post.tsx @@ -6,15 +6,17 @@ import Balancer from "react-wrap-balancer"; import {format, parseISO} from "date-fns"; import NextLink from "next/link"; import {AnimatePresence, motion} from "framer-motion"; +import {usePostHog} from "posthog-js/react"; import {useIsMounted} from "@/hooks/use-is-mounted"; -import {trackEvent} from "@/utils/va"; const BlogPostCard = (post: BlogPost) => { const isMounted = useIsMounted(); + const posthog = usePostHog(); + const handlePress = () => { - trackEvent("BlogPostCard - Selection", { + posthog.capture("BlogPostCard - Selection", { name: post.title, action: "click", category: "blog", diff --git a/apps/docs/components/cmdk.tsx b/apps/docs/components/cmdk.tsx index 25a33d03f5..7979ddb38b 100644 --- a/apps/docs/components/cmdk.tsx +++ b/apps/docs/components/cmdk.tsx @@ -15,6 +15,7 @@ import {isAppleDevice, isWebKit} from "@react-aria/utils"; import {create} from "zustand"; import {intersectionBy, isEmpty} from "lodash"; import {writeStorage, useLocalStorage} from "@rehooks/local-storage"; +import {usePostHog} from "posthog-js/react"; import { DocumentCodeBoldIcon, @@ -25,7 +26,6 @@ import { import searchData from "@/config/search-meta.json"; import {useUpdateEffect} from "@/hooks/use-update-effect"; -import {trackEvent} from "@/utils/va"; const hideOnPaths = ["examples"]; @@ -139,6 +139,8 @@ export const Cmdk: FC<{}> = () => { const {isOpen, onClose, onOpen} = useCmdkStore(); + const posthog = usePostHog(); + const [recentSearches] = useLocalStorage(RECENT_SEARCHES_KEY); const addToRecentSearches = (item: SearchResultItem) => { @@ -196,7 +198,7 @@ export const Cmdk: FC<{}> = () => { const matches = intersectionBy(...matchesForEachWord, "objectID").slice(0, MAX_RESULTS); - trackEvent("Cmdk - Search", { + posthog.capture("Cmdk - Search", { name: "cmdk - search", action: "search", category: "cmdk", @@ -219,7 +221,7 @@ export const Cmdk: FC<{}> = () => { e.preventDefault(); isOpen ? onClose() : onOpen(); - trackEvent("Cmdk - Open/Close", { + posthog.capture("Cmdk - Open/Close", { name: "cmdk - open/close", action: "keydown", category: "cmdk", @@ -241,7 +243,7 @@ export const Cmdk: FC<{}> = () => { router.push(item.url); addToRecentSearches(item); - trackEvent("Cmdk - ItemSelect", { + posthog.capture("Cmdk - ItemSelect", { name: item.content, action: "click", category: "cmdk", diff --git a/apps/docs/components/demos/custom-button.tsx b/apps/docs/components/demos/custom-button.tsx index 295da8dd7f..fddaac2b47 100644 --- a/apps/docs/components/demos/custom-button.tsx +++ b/apps/docs/components/demos/custom-button.tsx @@ -2,11 +2,11 @@ import {useRef} from "react"; import {Button} from "@nextui-org/react"; - -import {trackEvent} from "@/utils/va"; +import {usePostHog} from "posthog-js/react"; export const CustomButton = () => { const buttonRef = useRef(null); + const posthog = usePostHog(); const handleConfetti = async () => { const {clientWidth, clientHeight} = document.documentElement; @@ -29,7 +29,7 @@ export const CustomButton = () => { }, }); - trackEvent("LandingPage - Confetti Button", { + posthog.capture("LandingPage - Confetti Button", { action: "press", category: "landing-page", }); diff --git a/apps/docs/components/docs/components/component-links.tsx b/apps/docs/components/docs/components/component-links.tsx index 259a8c6ddf..838bb5f851 100644 --- a/apps/docs/components/docs/components/component-links.tsx +++ b/apps/docs/components/docs/components/component-links.tsx @@ -1,10 +1,10 @@ import {Button, ButtonProps, Code, Link, Tooltip} from "@nextui-org/react"; import {ReactNode} from "react"; import Balancer from "react-wrap-balancer"; +import {usePostHog} from "posthog-js/react"; import {GithubIcon, NpmIcon, AdobeIcon, StorybookIcon, NextJsIcon} from "@/components/icons"; import {COMPONENT_PATH, COMPONENT_THEME_PATH} from "@/libs/github/constants"; -import {trackEvent} from "@/utils/va"; export interface ComponentLinksProps { component: string; @@ -26,10 +26,12 @@ const ButtonLink = ({ href: string; tooltip?: string | ReactNode; }) => { + const posthog = usePostHog(); + const handlePress = () => { if (!href) return; - trackEvent("ComponentLinks - Click", { + posthog.capture("ComponentLinks - Click", { category: "docs", action: "click", data: href || "", diff --git a/apps/docs/components/docs/pager.tsx b/apps/docs/components/docs/pager.tsx index fb7456c773..a0c921b6d9 100644 --- a/apps/docs/components/docs/pager.tsx +++ b/apps/docs/components/docs/pager.tsx @@ -2,6 +2,7 @@ import * as React from "react"; import {Link} from "@nextui-org/react"; +import {usePostHog} from "posthog-js/react"; import {useRouter} from "next/navigation"; import {ChevronIcon} from "@nextui-org/shared-icons"; @@ -9,7 +10,6 @@ import manifest from "@/config/routes.json"; import {removeFromLast} from "@/utils"; import {Route} from "@/libs/docs/page"; import {useDocsRoute} from "@/hooks/use-docs-route"; -import {trackEvent} from "@/utils/va"; export interface FooterNavProps { currentRoute?: Route; @@ -20,8 +20,10 @@ export const DocsPager: React.FC = ({currentRoute}) => { const {prevRoute, nextRoute} = useDocsRoute(manifest.routes, currentRoute); + const posthog = usePostHog(); + const handlePress = (path: string) => { - trackEvent("DocsPager - Click", { + posthog.capture("DocsPager - Click", { category: "docs", action: "click", data: path || "", diff --git a/apps/docs/components/docs/sidebar.tsx b/apps/docs/components/docs/sidebar.tsx index e52ccdc639..cf5a8fee72 100644 --- a/apps/docs/components/docs/sidebar.tsx +++ b/apps/docs/components/docs/sidebar.tsx @@ -1,6 +1,7 @@ "use client"; import {FC, useEffect, useState} from "react"; +import {usePostHog} from "posthog-js/react"; import {ChevronIcon} from "@nextui-org/shared-icons"; import {CollectionBase, Expandable, MultipleSelection, Node, ItemProps} from "@react-types/shared"; import {BaseItem} from "@nextui-org/aria-utils"; @@ -27,7 +28,6 @@ import {getRoutePaths} from "./utils"; import {Route} from "@/libs/docs/page"; import {TreeKeyboardDelegate} from "@/utils/tree-keyboard-delegate"; -import {trackEvent} from "@/utils/va"; import {FbFeedbackButton} from "@/components/featurebase/fb-feedback-button"; import {FbChangelogButton} from "@/components/featurebase/fb-changelog-button"; import {FbRoadmapLink} from "@/components/featurebase/fb-roadmap-link"; @@ -66,6 +66,7 @@ function TreeItem(props: TreeItemProps) { const router = useRouter(); const pathname = usePathname(); + const posthog = usePostHog(); const paths = item.props.path ? getRoutePaths(item.props.path, item.props?.tag) @@ -109,7 +110,7 @@ function TreeItem(props: TreeItemProps) { } else { router.push(paths.pathname); - trackEvent("SidebarDocs", { + posthog.capture("SidebarDocs", { category: "docs", action: "click", data: paths.pathname || "", diff --git a/apps/docs/components/featurebase/fb-changelog-button.tsx b/apps/docs/components/featurebase/fb-changelog-button.tsx index 129a2b0e5f..6552cb2cc1 100644 --- a/apps/docs/components/featurebase/fb-changelog-button.tsx +++ b/apps/docs/components/featurebase/fb-changelog-button.tsx @@ -1,8 +1,7 @@ "use client"; import {useEffect} from "react"; - -import {trackEvent} from "@/utils/va"; +import {usePostHog} from "posthog-js/react"; type Props = { className?: string; @@ -10,6 +9,8 @@ type Props = { // ref: https://developers.featurebase.app/install/changelog-widget/install export const FbChangelogButton = ({className}: Props) => { + const posthog = usePostHog(); + useEffect(() => { const win = window as any; @@ -31,7 +32,7 @@ export const FbChangelogButton = ({className}: Props) => { const fbButtonOnClick = () => { (window as any).Featurebase("manually_open_changelog_popup"); - trackEvent("Featurebase - Changelog", { + posthog.capture("Featurebase - Changelog", { name: "featurebase-changelog", action: "press", category: "featurebase", diff --git a/apps/docs/components/featurebase/fb-feedback-button.tsx b/apps/docs/components/featurebase/fb-feedback-button.tsx index 900eeb5e3e..bdf2831690 100644 --- a/apps/docs/components/featurebase/fb-feedback-button.tsx +++ b/apps/docs/components/featurebase/fb-feedback-button.tsx @@ -1,8 +1,7 @@ "use client"; import {useEffect} from "react"; - -import {trackEvent} from "@/utils/va"; +import {usePostHog} from "posthog-js/react"; type Props = { className?: string; @@ -10,6 +9,8 @@ type Props = { // ref: https://developers.featurebase.app/install/feedback-widget/setup export const FbFeedbackButton = ({className}: Props) => { + const posthog = usePostHog(); + useEffect(() => { const win = window as any; @@ -27,7 +28,7 @@ export const FbFeedbackButton = ({className}: Props) => { }, []); const fbButtonOnClick = () => { - trackEvent("Featurebase - Feedback", { + posthog.capture("Featurebase - Feedback", { name: "featurebase-feedback", action: "press", category: "featurebase", diff --git a/apps/docs/components/featurebase/fb-roadmap-link.tsx b/apps/docs/components/featurebase/fb-roadmap-link.tsx index a85c040f18..1796500383 100644 --- a/apps/docs/components/featurebase/fb-roadmap-link.tsx +++ b/apps/docs/components/featurebase/fb-roadmap-link.tsx @@ -1,20 +1,21 @@ "use client"; import NextLink from "next/link"; +import {usePostHog} from "posthog-js/react"; import arrowRightUpIcon from "@iconify/icons-solar/arrow-right-up-linear"; import {Icon} from "@iconify/react/dist/offline"; import {clsx} from "@nextui-org/shared-utils"; -import {trackEvent} from "@/utils/va"; - type Props = { className?: string; innerClassName?: string; }; export const FbRoadmapLink = ({className, innerClassName}: Props) => { + const posthog = usePostHog(); + const fbLinkOnClick = () => { - trackEvent("Featurebase - Roadmap", { + posthog.capture("Featurebase - Roadmap", { name: "featurebase-roadmap", action: "press", category: "featurebase", diff --git a/apps/docs/components/figma-button.tsx b/apps/docs/components/figma-button.tsx index 2328b7b40c..facf8ad5aa 100644 --- a/apps/docs/components/figma-button.tsx +++ b/apps/docs/components/figma-button.tsx @@ -1,25 +1,28 @@ "use client"; import {Button, Link} from "@nextui-org/react"; +import {usePostHog} from "posthog-js/react"; -import {trackEvent} from "@/utils/va"; +export const FigmaButton = () => { + const posthog = usePostHog(); -export const FigmaButton = () => ( - -); + return ( + + ); +}; diff --git a/apps/docs/components/marketing/features-grid.tsx b/apps/docs/components/marketing/features-grid.tsx index 5992b2ee3b..19f4902e39 100644 --- a/apps/docs/components/marketing/features-grid.tsx +++ b/apps/docs/components/marketing/features-grid.tsx @@ -1,13 +1,12 @@ "use client"; import React, {ReactNode} from "react"; +import {usePostHog} from "posthog-js/react"; import {tv} from "tailwind-variants"; import {Card, CardHeader, CardBody, LinkProps, SlotsToClasses} from "@nextui-org/react"; import {useRouter} from "next/navigation"; import {LinkIcon} from "@nextui-org/shared-icons"; -import {trackEvent} from "@/utils/va"; - const styles = tv({ slots: { base: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", @@ -37,10 +36,12 @@ interface FeaturesGridProps { export const FeaturesGrid: React.FC = ({features, classNames, ...props}) => { const router = useRouter(); + const posthog = usePostHog(); + const slots = styles(); const handleClick = (feat: Feature) => { - trackEvent("FeaturesGrid - Click", { + posthog.capture("FeaturesGrid - Click", { name: feat.title, action: "click", category: "docs", diff --git a/apps/docs/components/marketing/hero/hero.tsx b/apps/docs/components/marketing/hero/hero.tsx index a2f108eb25..469751f195 100644 --- a/apps/docs/components/marketing/hero/hero.tsx +++ b/apps/docs/components/marketing/hero/hero.tsx @@ -4,20 +4,22 @@ import NextLink from "next/link"; import {Button, Link, Chip, Snippet} from "@nextui-org/react"; import {ArrowRightIcon} from "@nextui-org/shared-icons"; import dynamic from "next/dynamic"; +import {usePostHog} from "posthog-js/react"; import {FloatingComponents} from "./floating-components"; import {GithubIcon} from "@/components/icons"; import {title, subtitle} from "@/components/primitives"; -import {trackEvent} from "@/utils/va"; const BgLooper = dynamic(() => import("./bg-looper").then((mod) => mod.BgLooper), { ssr: false, }); export const Hero = () => { + const posthog = usePostHog(); + const handlePressAnnouncement = (name: string, url: string) => { - trackEvent("NavbarItem", { + posthog.capture("NavbarItem", { name, action: "press", category: "home - gero", @@ -68,7 +70,7 @@ export const Hero = () => { radius="full" size="lg" onPress={() => { - trackEvent("Hero - Get Started", { + posthog.capture("Hero - Get Started", { name: "Get Started", action: "click", category: "landing-page", @@ -84,7 +86,7 @@ export const Hero = () => { radius: "full", }} onCopy={() => { - trackEvent("Hero - Copy Install Command", { + posthog.capture("Hero - Copy Install Command", { name: "Copy", action: "click", category: "landing-page", @@ -105,7 +107,7 @@ export const Hero = () => { startContent={} variant="bordered" onPress={() => { - trackEvent("Hero - Github", { + posthog.capture("Hero - Github", { name: "Github", action: "click", category: "landing-page", diff --git a/apps/docs/components/marketing/install-banner.tsx b/apps/docs/components/marketing/install-banner.tsx index 3fefd170de..f76d355e38 100644 --- a/apps/docs/components/marketing/install-banner.tsx +++ b/apps/docs/components/marketing/install-banner.tsx @@ -5,13 +5,13 @@ import {ArrowRightIcon} from "@nextui-org/shared-icons"; import {clsx} from "@nextui-org/shared-utils"; import NextLink from "next/link"; import {Code} from "@nextui-org/react"; +import {usePostHog} from "posthog-js/react"; import {FeaturesGrid} from "./features-grid"; import {sectionWrapper, subtitle, title} from "@/components/primitives"; import {GithubIcon, NoteLinearIcon, NextJsIcon} from "@/components/icons"; import {useIsMounted} from "@/hooks/use-is-mounted"; -import {trackEvent} from "@/utils/va"; const bannerSuggestions = [ { @@ -36,6 +36,8 @@ const bannerSuggestions = [ export const InstallBanner = () => { const isMounted = useIsMounted(); + const posthog = usePostHog(); + return (
{ radius="full" size="md" onClick={() => { - trackEvent("InstallBanner - Get Started", { + posthog.capture("InstallBanner - Get Started", { action: "press", category: "landing-page", data: "/docs/guide/installation", @@ -90,7 +92,7 @@ export const InstallBanner = () => { startContent={} variant="bordered" onClick={() => { - trackEvent("InstallBanner - Github", { + posthog.capture("InstallBanner - Github", { action: "press", category: "landing-page", data: "https://github.com/nextui-org/nextui", diff --git a/apps/docs/components/marketing/sponsor-item.tsx b/apps/docs/components/marketing/sponsor-item.tsx index 533f379946..27be8a8ff5 100644 --- a/apps/docs/components/marketing/sponsor-item.tsx +++ b/apps/docs/components/marketing/sponsor-item.tsx @@ -1,8 +1,7 @@ "use client"; import {Link} from "@nextui-org/react"; - -import {trackEvent} from "@/utils/va"; +import {usePostHog} from "posthog-js/react"; export type Sponsor = { name: string; @@ -11,13 +10,15 @@ export type Sponsor = { }; export const SponsorItem = ({name, href, logo}: Sponsor) => { + const posthog = usePostHog(); + return ( { - trackEvent("Hero - Sponsors", { + posthog.capture("Hero - Sponsors", { name, action: "click", category: "hero", diff --git a/apps/docs/components/marketing/support.tsx b/apps/docs/components/marketing/support.tsx index 8bce9750db..3159f22a85 100644 --- a/apps/docs/components/marketing/support.tsx +++ b/apps/docs/components/marketing/support.tsx @@ -3,6 +3,7 @@ import {FC, useMemo, useRef} from "react"; import {Avatar, AvatarProps, Button, Spacer, Tooltip} from "@nextui-org/react"; import {clamp, get} from "lodash"; +import {usePostHog} from "posthog-js/react"; import {sectionWrapper, titleWrapper, title, subtitle} from "../primitives"; @@ -12,7 +13,6 @@ import {OpenCollectiveIcon, PatreonIcon, HeartBoldIcon, PlusLinearIcon} from "@/ import {Sponsor, SPONSOR_TIERS, SPONSOR_COLORS, getTier} from "@/libs/docs/sponsors"; import {SonarPulse} from "@/components/sonar-pulse"; import {useIsMobile} from "@/hooks/use-media-query"; -import {trackEvent} from "@/utils/va"; export interface SupportProps { sponsors: Sponsor[]; @@ -95,6 +95,7 @@ const getSponsorAvatarStyles = (index: number, sponsors: Sponsor[] = []) => { export const Support: FC = ({sponsors = []}) => { const sonarRef = useRef(null); const isMobile = useIsMobile(); + const posthog = usePostHog(); const handleExternalLinkClick = (href: string) => { if (!href) return; @@ -102,7 +103,7 @@ export const Support: FC = ({sponsors = []}) => { }; const handleBecomeSponsor = () => { - trackEvent("Support - Become a sponsor", { + posthog.capture("Support - Become a sponsor", { action: "click", category: "landing-page", }); diff --git a/apps/docs/components/mdx-components.tsx b/apps/docs/components/mdx-components.tsx index 1071270d37..b9a3c43cfc 100644 --- a/apps/docs/components/mdx-components.tsx +++ b/apps/docs/components/mdx-components.tsx @@ -3,6 +3,7 @@ import {clsx} from "@nextui-org/shared-utils"; import * as Components from "@nextui-org/react"; import {Language} from "prism-react-renderer"; import NextImage from "next/image"; +import {usePostHog} from "posthog-js/react"; import {ThemeSwitch} from "./theme-switch"; @@ -12,7 +13,6 @@ import * as DocsComponents from "@/components/docs/components"; import * as BlogComponents from "@/components/blog/components"; import {Codeblock} from "@/components/docs/components"; import {VirtualAnchor, virtualAnchorEncode} from "@/components/virtual-anchor"; -import {trackEvent} from "@/utils/va"; const Table: React.FC<{children?: React.ReactNode}> = ({children}) => { return ( @@ -123,6 +123,7 @@ const Code = ({ const isMultiLine = (children as string)?.split?.("\n")?.length > 2; const language = (className?.replace(/language-/, "") ?? "jsx") as Language; const codeString = String(children).trim(); + const posthog = usePostHog(); if (!className) { return {children}; @@ -146,7 +147,7 @@ const Code = ({ }} codeString={codeString} onCopy={() => { - trackEvent("MDXComponents - Copy", { + posthog.capture("MDXComponents - Copy", { category: "docs", action: "copyCode", }); @@ -159,9 +160,10 @@ const Code = ({ const Link = ({href, children}: {href?: string; children?: React.ReactNode}) => { const isExternal = href?.startsWith("http"); + const posthog = usePostHog(); const handlePress = () => { - trackEvent("MDXComponents - Click", { + posthog.capture("MDXComponents - Click", { category: "docs", action: "click", data: href || "", diff --git a/apps/docs/components/navbar.tsx b/apps/docs/components/navbar.tsx index cc2ef49a55..20fa2090dc 100644 --- a/apps/docs/components/navbar.tsx +++ b/apps/docs/components/navbar.tsx @@ -29,6 +29,7 @@ import {motion, AnimatePresence} from "framer-motion"; import {useEffect} from "react"; import {usePress} from "@react-aria/interactions"; import {useFocusRing} from "@react-aria/focus"; +import {usePostHog} from "posthog-js/react"; import {currentVersion} from "@/utils/version"; import {siteConfig} from "@/config/site"; @@ -39,7 +40,6 @@ import {useIsMounted} from "@/hooks/use-is-mounted"; import {DocsSidebar} from "@/components/docs/sidebar"; import {useCmdkStore} from "@/components/cmdk"; import {FbRoadmapLink} from "@/components/featurebase/fb-roadmap-link"; -import {trackEvent} from "@/utils/va"; export interface NavbarProps { routes: Route[]; @@ -60,6 +60,8 @@ export const Navbar: FC = ({children, routes, mobileRoutes = [], sl const cmdkStore = useCmdkStore(); + const posthog = usePostHog(); + useEffect(() => { if (isMenuOpen) { setIsMenuOpen(false); @@ -72,7 +74,7 @@ export const Navbar: FC = ({children, routes, mobileRoutes = [], sl const handleOpenCmdk = () => { cmdkStore.onOpen(); - trackEvent("Navbar - Search", { + posthog.capture("Navbar - Search", { name: "navbar - search", action: "press", category: "cmdk", @@ -127,7 +129,7 @@ export const Navbar: FC = ({children, routes, mobileRoutes = [], sl }; const handlePressNavbarItem = (name: string, url: string) => { - trackEvent("NavbarItem", { + posthog.capture("NavbarItem", { name, action: "press", category: "navbar", diff --git a/apps/docs/components/pro-banner.tsx b/apps/docs/components/pro-banner.tsx index b7230cdb6c..3adfd91d94 100644 --- a/apps/docs/components/pro-banner.tsx +++ b/apps/docs/components/pro-banner.tsx @@ -4,15 +4,17 @@ import {Icon} from "@iconify/react/dist/offline"; import arrowRightIcon from "@iconify/icons-solar/arrow-right-linear"; import {usePathname} from "next/navigation"; import {useEffect} from "react"; +import {usePostHog} from "posthog-js/react"; -import {trackEvent} from "@/utils/va"; import emitter from "@/libs/emitter"; const hideOnPaths = ["examples"]; export const ProBanner = () => { + const posthog = usePostHog(); + const handleClick = () => { - trackEvent("NextUI Pro Banner", { + posthog.capture("NextUI Pro Banner", { action: "click", category: "landing-page", }); diff --git a/apps/docs/components/scripts/script-providers.tsx b/apps/docs/components/scripts/script-providers.tsx index d14e8699f2..af9a85363a 100644 --- a/apps/docs/components/scripts/script-providers.tsx +++ b/apps/docs/components/scripts/script-providers.tsx @@ -1,8 +1,6 @@ import * as React from "react"; -import {Analytics} from "@vercel/analytics/react"; import Script from "next/script"; -import {__PROD__} from "@/utils"; export function ScriptProviders() { return ( @@ -23,7 +21,6 @@ export function ScriptProviders() { src="https://widget.kapa.ai/kapa-widget.bundle.js" strategy="afterInteractive" /> - {__PROD__ && } ); } diff --git a/apps/docs/components/theme-switch.tsx b/apps/docs/components/theme-switch.tsx index 33da930e3c..7c8f6fd59a 100644 --- a/apps/docs/components/theme-switch.tsx +++ b/apps/docs/components/theme-switch.tsx @@ -6,9 +6,9 @@ import {SwitchProps, useSwitch} from "@nextui-org/react"; import {useTheme} from "next-themes"; import {clsx} from "@nextui-org/shared-utils"; import {useIsSSR} from "@react-aria/ssr"; +import {usePostHog} from "posthog-js/react"; import {SunFilledIcon, MoonFilledIcon} from "@/components/icons"; -import {trackEvent} from "@/utils/va"; export interface ThemeSwitchProps { className?: string; @@ -18,11 +18,12 @@ export interface ThemeSwitchProps { export const ThemeSwitch: FC = ({className, classNames}) => { const {theme, setTheme} = useTheme(); const isSSR = useIsSSR(); + const posthog = usePostHog(); const onChange = () => { theme === "light" ? setTheme("dark") : setTheme("light"); - trackEvent("ThemeChange", { + posthog.capture("ThemeChange", { action: "click", category: "theme", data: theme === "light" ? "dark" : "light", diff --git a/apps/docs/next.config.js b/apps/docs/next.config.js index e3b62034b5..e27ef62736 100644 --- a/apps/docs/next.config.js +++ b/apps/docs/next.config.js @@ -22,6 +22,22 @@ const nextConfig = { "nextui.org", ], }, + rewrites: async () => { + return [ + { + destination: "https://us-assets.i.posthog.com/static/:path*", + source: "/ingest/static/:path*", + }, + { + destination: "https://us.i.posthog.com/:path*", + source: "/ingest/:path*", + }, + { + destination: "https://us.i.posthog.com/decide", + source: "/ingest/decide", + }, + ]; + }, }; module.exports = withContentlayer(nextConfig); diff --git a/apps/docs/package.json b/apps/docs/package.json index 93a2347caa..0dfb26c55f 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -49,7 +49,6 @@ "@react-stately/layout": "3.13.9", "@react-stately/tree": "3.8.1", "@rehooks/local-storage": "^2.4.5", - "@vercel/analytics": "^1.2.2", "canvas-confetti": "^1.9.2", "cmdk": "^0.2.0", "color2k": "^2.0.2", @@ -71,6 +70,7 @@ "parse-numeric-range": "1.2.0", "prism-react-renderer": "^1.2.1", "querystring": "^0.2.1", + "posthog-js": "1.187.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.10.1", diff --git a/apps/docs/utils/env.ts b/apps/docs/utils/env.ts index 2f4ec71b54..749287014b 100644 --- a/apps/docs/utils/env.ts +++ b/apps/docs/utils/env.ts @@ -2,4 +2,3 @@ export const __PROD__ = process.env.NODE_ENV === "production"; export const __DEV__ = process.env.NODE_ENV !== "production"; export const __TEST__ = process.env.NODE_ENV === "test"; export const __PREVIEW__ = process.env.IS_PREVIEW === "true"; -export const __IS_VA_ENABLED__ = process.env.IS_VA_ENABLED === "true"; diff --git a/apps/docs/utils/va.ts b/apps/docs/utils/va.ts deleted file mode 100644 index 80512da3fa..0000000000 --- a/apps/docs/utils/va.ts +++ /dev/null @@ -1,34 +0,0 @@ -import va from "@vercel/analytics"; - -export function getUniqueID(prefix: string) { - return `${prefix}-${new Date().getTime()}`; -} - -export type TrackEvent = { - category: string; - action: string; - name?: string; - data?: any; -}; - -const getSessionId = () => { - let sessionId = getUniqueID("session"); - - // save session id in local storage if it doesn't exist - if (!localStorage.getItem("sessionId")) { - localStorage.setItem("sessionId", sessionId); - - return sessionId; - } else { - return localStorage.getItem("sessionId") ?? sessionId; - } -}; - -export const trackEvent = (label: string, event: TrackEvent) => { - const sessionId = getSessionId(); - - va.track(label, { - ...event, - sessionId, - }); -}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b51699d2f0..39dcffcab6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -375,9 +375,6 @@ importers: '@rehooks/local-storage': specifier: ^2.4.5 version: 2.4.5(react@18.2.0) - '@vercel/analytics': - specifier: ^1.2.2 - version: 1.2.2(next@13.5.1(@babel/core@7.24.4)(@opentelemetry/api@1.8.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) canvas-confetti: specifier: ^1.9.2 version: 1.9.2 @@ -435,6 +432,9 @@ importers: parse-numeric-range: specifier: 1.2.0 version: 1.2.0 + posthog-js: + specifier: 1.187.1 + version: 1.187.1 prism-react-renderer: specifier: ^1.2.1 version: 1.3.5(react@18.2.0) @@ -7000,6 +7000,9 @@ packages: rollup: optional: true + '@rtsao/scc@1.1.0': + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + '@rushstack/eslint-patch@1.10.2': resolution: {integrity: sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==} @@ -7872,17 +7875,6 @@ packages: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@vercel/analytics@1.2.2': - resolution: {integrity: sha512-X0rctVWkQV1e5Y300ehVNqpOfSOufo7ieA5PIdna8yX/U7Vjz0GFsGf4qvAhxV02uQ2CVt7GYcrFfddXXK2Y4A==} - peerDependencies: - next: '>= 13' - react: ^18.2.0 - peerDependenciesMeta: - next: - optional: true - react: - optional: true - '@vitejs/plugin-react@3.1.0': resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==} engines: {node: ^14.18.0 || >=16.0.0} @@ -8995,6 +8987,9 @@ packages: core-js@3.36.1: resolution: {integrity: sha512-BTvUrwxVBezj5SZ3f10ImnX2oRByMxql3EimVqMysepbC9EeMUOpLwdy6Eoili2x6E4kf+ZUB5k/+Jv55alPfA==} + core-js@3.39.0: + resolution: {integrity: sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==} + core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -9794,6 +9789,27 @@ packages: eslint: ^6.0.0 || ^7.0.0 webpack: ^4.0.0 || ^5.0.0 + eslint-module-utils@2.12.0: + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + eslint-module-utils@2.8.1: resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} @@ -9837,6 +9853,16 @@ packages: '@typescript-eslint/parser': optional: true + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint-plugin-jest@24.7.0: resolution: {integrity: sha512-wUxdF2bAZiYSKBclsUMrYHH6WxiBreNjyDxbRv345TIvPeoCEgPNEn3Sa+ZrSqsf1Dl9SqqSREXMHExlMMu1DA==} engines: {node: '>=10'} @@ -10150,6 +10176,9 @@ packages: fetch-retry@5.0.6: resolution: {integrity: sha512-3yurQZ2hD9VISAhJJP9bpYFNQrHHBXE2JxxjY5aLEcDi46RmAzJE2OC9FAde0yis5ElW0jTTzs0zfg/Cca4XqQ==} + fflate@0.4.8: + resolution: {integrity: sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==} + figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -11029,6 +11058,10 @@ packages: is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + is-data-descriptor@1.0.1: resolution: {integrity: sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==} engines: {node: '>= 0.4'} @@ -13130,6 +13163,9 @@ packages: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} + posthog-js@1.187.1: + resolution: {integrity: sha512-d2oNtdqXWqTVGmJf131xmVepcI/waYn9L+dM7CKm/58p89ua6ABY699UJpKlAZ9YT0UBE09QsVjrDHYCK2F5Rw==} + posthtml-parser@0.10.2: resolution: {integrity: sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==} engines: {node: '>=12'} @@ -13146,6 +13182,9 @@ packages: resolution: {integrity: sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==} engines: {node: '>=12.0.0'} + preact@10.24.3: + resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} + prebuild-install@7.1.2: resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} engines: {node: '>=10'} @@ -13957,9 +13996,6 @@ packages: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} - server-only@0.0.1: - resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==} - set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -15250,6 +15286,9 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} + web-vitals@4.2.4: + resolution: {integrity: sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -18101,13 +18140,15 @@ snapshots: transitivePeerDependencies: - '@parcel/core' - '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))': + '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9)': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.9) '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9) '@parcel/logger': 2.12.0 '@parcel/utils': 2.12.0 lmdb: 2.8.5 + transitivePeerDependencies: + - '@swc/helpers' '@parcel/codeframe@2.12.0': dependencies: @@ -18167,7 +18208,7 @@ snapshots: '@parcel/core@2.12.0(@swc/helpers@0.5.9)': dependencies: '@mischnic/json-sourcemap': 0.1.1 - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9)) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9) '@parcel/diagnostic': 2.12.0 '@parcel/events': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9) @@ -18582,7 +18623,7 @@ snapshots: '@parcel/types@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9)': dependencies: - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9)) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9) '@parcel/diagnostic': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9) '@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.9))(@swc/helpers@0.5.9) @@ -19933,6 +19974,8 @@ snapshots: optionalDependencies: rollup: 3.29.4 + '@rtsao/scc@1.1.0': {} + '@rushstack/eslint-patch@1.10.2': {} '@sideway/address@4.1.5': @@ -21271,13 +21314,6 @@ snapshots: '@typescript-eslint/types': 5.62.0 eslint-visitor-keys: 3.4.3 - '@vercel/analytics@1.2.2(next@13.5.1(@babel/core@7.24.4)(@opentelemetry/api@1.8.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)': - dependencies: - server-only: 0.0.1 - optionalDependencies: - next: 13.5.1(@babel/core@7.24.4)(@opentelemetry/api@1.8.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - react: 18.2.0 - '@vitejs/plugin-react@3.1.0(vite@4.5.3(@types/node@20.5.1)(lightningcss@1.24.1)(terser@5.30.3))': dependencies: '@babel/core': 7.24.4 @@ -22553,6 +22589,8 @@ snapshots: core-js@3.36.1: {} + core-js@3.39.0: {} + core-util-is@1.0.3: {} cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@4.9.5))(ts-node@10.9.2(@swc/core@1.4.13(@swc/helpers@0.5.9))(@types/node@20.5.1)(typescript@4.9.5))(typescript@4.9.5): @@ -23333,8 +23371,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@7.32.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@7.32.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@7.32.0) eslint-plugin-react: 7.34.1(eslint@7.32.0) eslint-plugin-react-hooks: 4.6.0(eslint@7.32.0) @@ -23391,13 +23429,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@7.32.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@7.32.0): dependencies: debug: 4.3.4 enhanced-resolve: 5.16.0 eslint: 7.32.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0) fast-glob: 3.3.2 get-tsconfig: 4.7.3 is-core-module: 2.13.1 @@ -23418,6 +23456,17 @@ snapshots: schema-utils: 2.7.1 webpack: 5.91.0(@swc/core@1.4.13(@swc/helpers@0.5.9))(esbuild@0.15.18)(webpack-cli@3.3.12) + eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) + eslint: 7.32.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0) + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0): dependencies: debug: 3.2.7 @@ -23429,14 +23478,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@7.32.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@7.32.0) transitivePeerDependencies: - supports-color @@ -23479,6 +23528,35 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0): + dependencies: + '@rtsao/scc': 1.1.0 + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 7.32.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.29.1)(eslint@7.32.0))(eslint@7.32.0) + hasown: 2.0.2 + is-core-module: 2.15.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + string.prototype.trimend: 1.0.8 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5): dependencies: '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@4.9.5) @@ -23972,6 +24050,8 @@ snapshots: fetch-retry@5.0.6: {} + fflate@0.4.8: {} + figures@2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -24981,6 +25061,10 @@ snapshots: dependencies: hasown: 2.0.2 + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + is-data-descriptor@1.0.1: dependencies: hasown: 2.0.2 @@ -27731,6 +27815,13 @@ snapshots: picocolors: 1.0.0 source-map-js: 1.2.0 + posthog-js@1.187.1: + dependencies: + core-js: 3.39.0 + fflate: 0.4.8 + preact: 10.24.3 + web-vitals: 4.2.4 + posthtml-parser@0.10.2: dependencies: htmlparser2: 7.2.0 @@ -27748,6 +27839,8 @@ snapshots: posthtml-parser: 0.11.0 posthtml-render: 3.0.0 + preact@10.24.3: {} + prebuild-install@7.1.2: dependencies: detect-libc: 2.0.3 @@ -28748,8 +28841,6 @@ snapshots: transitivePeerDependencies: - supports-color - server-only@0.0.1: {} - set-blocking@2.0.0: {} set-function-length@1.2.2: @@ -30284,6 +30375,8 @@ snapshots: web-streams-polyfill@3.3.3: {} + web-vitals@4.2.4: {} + webidl-conversions@3.0.1: {} webidl-conversions@4.0.2: {}