feat(analytics): self-hosted openpanel with a typed event catalogue
Replaces Vercel Analytics with OpenPanel, driven entirely by env vars so the whole layer is inert until NEXT_PUBLIC_OPENPANEL_CLIENT_ID is set. Zero initial load cost. next/script emits a rel=preload even on lazyOnload, which pulls the sdk during the first paint, so the component skips it: it inlines the 416 byte official stub (window.op queues calls immediately) and appends the real script itself on window load plus requestIdleCallback. The built html carries no preload and no script src for the analytics host. Events live in one typed catalogue (lib/analytics/events.ts) and track() is keyed to it, so a wrong name or payload is a type error rather than a silent bad row. Emitters sit in the hooks that already own the behaviour instead of being sprinkled through components: - useShowState covers every favourite and watchlist toggle - useInfiniteList covers pagination for all six lists - useTorrents covers all three providers - Preview, Person and useSearch use a shared useTrackOnce hook Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0186c793f2
commit
d67a0d4df6
26 files changed
+504
-89
No files matched your search
@@ -5,6 +5,7 @@ import { atom, getDefaultStore, useAtom } from 'jotai';
|
||||
|
||||
import randomQuery from '@/data/queries/random';
|
||||
import useInfiniteList from '@/hooks/useInfiniteList';
|
||||
import { track } from '@/lib/analytics';
|
||||
|
||||
const indexAtom = atom(0);
|
||||
|
||||
@@ -17,7 +18,11 @@ interface Props {
|
||||
const useRandomMovie = ({ page }: Props) => {
|
||||
const [index, setIndex] = useAtom(indexAtom);
|
||||
|
||||
const { shows: movies, fetchNextPage } = useInfiniteList({ ...randomQuery({ page }), mode: 'default' });
|
||||
const { shows: movies, fetchNextPage } = useInfiniteList({
|
||||
...randomQuery({ page }),
|
||||
mode: 'default',
|
||||
list: 'random'
|
||||
});
|
||||
|
||||
if (movies.length && !movies[index]) {
|
||||
setIndex(0);
|
||||
@@ -29,6 +34,7 @@ const useRandomMovie = ({ page }: Props) => {
|
||||
fetchNextPage,
|
||||
onIndexChange: useCallback(
|
||||
(index: number) => {
|
||||
track('random_shuffled', { index });
|
||||
startTransition(() => setIndex(index));
|
||||
},
|
||||
[setIndex]
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
import popularQuery from '@/data/queries/popular';
|
||||
import useInfiniteList from '@/hooks/useInfiniteList';
|
||||
|
||||
const usePopular = () => useInfiniteList({ ...popularQuery(), mode: 'default' });
|
||||
const usePopular = () => useInfiniteList({ ...popularQuery(), mode: 'default', list: 'popular' });
|
||||
|
||||
export default usePopular;
|
||||
@@ -3,6 +3,7 @@
|
||||
import popularQuery from '@/data/queries/popular';
|
||||
import useInfiniteList from '@/hooks/useInfiniteList';
|
||||
|
||||
const useTop = () => useInfiniteList({ ...popularQuery({ sortBy: 'vote_average.desc' }), mode: 'default' });
|
||||
const useTop = () =>
|
||||
useInfiniteList({ ...popularQuery({ sortBy: 'vote_average.desc' }), mode: 'default', list: 'top' });
|
||||
|
||||
export default useTop;
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import { Analytics } from '@vercel/analytics/next';
|
||||
import type { Metadata, Viewport } from 'next';
|
||||
import { Jost } from 'next/font/google';
|
||||
|
||||
import Analytics from '@/components/Analytics';
|
||||
import Header from '@/components/Header';
|
||||
import ThemeColor from '@/components/ThemeColor';
|
||||
import { SITE_URL, TITLE } from '@/env';
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { getInitSnippet } from '@openpanel/web';
|
||||
|
||||
import { OPENPANEL_API_URL, OPENPANEL_CLIENT_ID, OPENPANEL_SCRIPT_URL } from '@/env';
|
||||
|
||||
const SCRIPT_ID = 'openpanel-sdk';
|
||||
|
||||
const SRC = OPENPANEL_SCRIPT_URL || 'https://openpanel.dev/op1.js';
|
||||
|
||||
const OPTIONS = {
|
||||
clientId: OPENPANEL_CLIENT_ID,
|
||||
apiUrl: OPENPANEL_API_URL,
|
||||
trackScreenViews: true,
|
||||
trackOutgoingLinks: true
|
||||
};
|
||||
|
||||
/**
|
||||
* next/script emits a `rel=preload` even on `lazyOnload`, which pulls the sdk during the
|
||||
* initial load. The inline stub below is a few hundred bytes and makes `window.op` queue
|
||||
* calls immediately, so the real script can wait until the page is loaded and idle.
|
||||
*/
|
||||
const Analytics = () => {
|
||||
useEffect(() => {
|
||||
if (!OPENPANEL_CLIENT_ID) return;
|
||||
|
||||
let cancelled = false;
|
||||
|
||||
const append = () => {
|
||||
if (cancelled || document.getElementById(SCRIPT_ID)) return;
|
||||
|
||||
const script = document.createElement('script');
|
||||
|
||||
script.id = SCRIPT_ID;
|
||||
script.src = SRC;
|
||||
script.async = true;
|
||||
|
||||
document.body.appendChild(script);
|
||||
};
|
||||
|
||||
const schedule = () =>
|
||||
typeof window.requestIdleCallback === 'function'
|
||||
? window.requestIdleCallback(append, { timeout: 5000 })
|
||||
: window.setTimeout(append, 2000);
|
||||
|
||||
if (document.readyState === 'complete') schedule();
|
||||
else window.addEventListener('load', schedule, { once: true });
|
||||
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, []);
|
||||
|
||||
if (!OPENPANEL_CLIENT_ID) return null;
|
||||
|
||||
return (
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `${getInitSnippet()}window.op('init', ${JSON.stringify(OPTIONS)});`
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Analytics;
|
||||
@@ -2,11 +2,18 @@ import { useRef } from 'react';
|
||||
|
||||
import searchQuery, { SearchQueryProps } from '@/data/queries/search';
|
||||
import useInfiniteList from '@/hooks/useInfiniteList';
|
||||
import useTrackOnce from '@/lib/analytics/useTrackOnce';
|
||||
|
||||
const useSearch = (props: SearchQueryProps) => {
|
||||
const previousRef = useRef<Show[]>([]);
|
||||
|
||||
const infiniteQuery = useInfiniteList({ ...searchQuery(props), mode: 'default' });
|
||||
const infiniteQuery = useInfiniteList({ ...searchQuery(props), mode: 'default', list: 'search' });
|
||||
|
||||
useTrackOnce(
|
||||
'search_performed',
|
||||
props.query && infiniteQuery.isFetched ? `${props.type}:${props.query}` : undefined,
|
||||
() => ({ query: props.query, showType: props.type, results: infiniteQuery.shows.length })
|
||||
);
|
||||
|
||||
if (infiniteQuery.isFetched) {
|
||||
previousRef.current = infiniteQuery.shows;
|
||||
|
||||
@@ -5,6 +5,7 @@ import sessionMutation from '@/data/mutations/session';
|
||||
import tokenMutation from '@/data/mutations/token';
|
||||
import { useSetSession } from '@/hooks/useSession';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { track } from '@/lib/analytics';
|
||||
|
||||
const AUTH_RETRIES = 10;
|
||||
|
||||
@@ -24,6 +25,7 @@ const useAuth = () => {
|
||||
const session = useMutation({
|
||||
...sessionMutation(),
|
||||
onSuccess({ session_id }) {
|
||||
track('auth_completed', {});
|
||||
setSession(session_id);
|
||||
clearInterval(intervalRef.current);
|
||||
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { useSetSession } from '@/hooks/useSession';
|
||||
import { clearIdentity, track } from '@/lib/analytics';
|
||||
|
||||
const useLogOut = () => {
|
||||
const setSession = useSetSession();
|
||||
|
||||
return useCallback(() => setSession(undefined), [setSession]);
|
||||
return useCallback(() => {
|
||||
track('auth_signed_out', {});
|
||||
clearIdentity();
|
||||
setSession(undefined);
|
||||
}, [setSession]);
|
||||
};
|
||||
|
||||
export default useLogOut;
|
||||
@@ -4,6 +4,7 @@ import { FC } from 'react';
|
||||
|
||||
import List from '@/components/List';
|
||||
import NoResults from '@/components/NoResults';
|
||||
import useTrackOnce from '@/lib/analytics/useTrackOnce';
|
||||
import { formatDate } from '@/lib/utils';
|
||||
|
||||
import Biography from './components/Biography';
|
||||
@@ -23,6 +24,8 @@ const lifespan = ({ birthday, deathday }: Profile) => {
|
||||
const Person: FC<Props> = ({ personId }) => {
|
||||
const { data: profile, isError } = useProfile({ personId });
|
||||
|
||||
useTrackOnce('person_viewed', profile ? personId : undefined, () => ({ personId }));
|
||||
|
||||
if (isError) return <NoResults />;
|
||||
|
||||
if (!profile) return <PersonSkeleton />;
|
||||
|
||||
+6
-1
@@ -2,6 +2,7 @@ import { useMemo, useRef } from 'react';
|
||||
import { CaptionOption, useCaptionOptions } from '@vidstack/react';
|
||||
import { ClosedCaptionsIcon, ClosedCaptionsOnIcon } from '@vidstack/react/icons';
|
||||
|
||||
import { track as track_ } from '@/lib/analytics';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import PlayerMenu from '../Menu';
|
||||
@@ -30,7 +31,11 @@ const CaptionsMenu = () => {
|
||||
options={captions.map((track) => ({
|
||||
label: track.label,
|
||||
value: track.value,
|
||||
onSelect: (value) => (live.current.find((option) => option.value === value) ?? track).select()
|
||||
onSelect: (value) => {
|
||||
track_('subtitles_selected', { language: value });
|
||||
|
||||
return (live.current.find((option) => option.value === value) ?? track).select();
|
||||
}
|
||||
}))}
|
||||
>
|
||||
{tracks.selectedTrack ? (
|
||||
|
||||
@@ -16,6 +16,8 @@ import { NextIcon } from '@vidstack/react/icons';
|
||||
import { PlyrLayout, plyrLayoutIcons } from '@vidstack/react/player/layouts/plyr';
|
||||
|
||||
import { useSetCanPlay } from '@/hooks/useCanPlay';
|
||||
import { track } from '@/lib/analytics';
|
||||
import useTrackOnce from '@/lib/analytics/useTrackOnce';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import Audio from './components/Audio';
|
||||
@@ -76,6 +78,7 @@ const Player: FC<Props> = ({ magnet, playlist, subtitles, show, episodes, onStre
|
||||
const { tracks: audioTracks, audio, setAudio, resolvedSrc, error } = useGstAudio(source?.src);
|
||||
|
||||
const resumeTime = useRef(0);
|
||||
const startedRef = useRef<string>();
|
||||
|
||||
const changeAudio = (track: number) => {
|
||||
resumeTime.current = player.current?.currentTime ?? 0;
|
||||
@@ -86,6 +89,12 @@ const Player: FC<Props> = ({ magnet, playlist, subtitles, show, episodes, onStre
|
||||
onStreamError?.(error);
|
||||
}, [error, onStreamError]);
|
||||
|
||||
useTrackOnce('playback_failed', error && show ? `${magnet}:${error}` : undefined, () => ({
|
||||
showId: show!.id,
|
||||
showType: show!.type,
|
||||
reason: error!
|
||||
}));
|
||||
|
||||
const playerSrc = useMemo(
|
||||
() => (source && !error ? ({ ...source, src: resolvedSrc } as VideoSrc) : []),
|
||||
[source, resolvedSrc, error]
|
||||
@@ -115,6 +124,10 @@ const Player: FC<Props> = ({ magnet, playlist, subtitles, show, episodes, onStre
|
||||
onProviderChange={onProviderChange}
|
||||
onCanPlay={() => {
|
||||
setCanPlay(true);
|
||||
if (show && startedRef.current !== magnet) {
|
||||
startedRef.current = magnet;
|
||||
track('playback_started', { showId: show.id, showType: show.type });
|
||||
}
|
||||
if (resumeTime.current) {
|
||||
player.current!.currentTime = resumeTime.current;
|
||||
resumeTime.current = 0;
|
||||
|
||||
+12
-1
@@ -8,6 +8,7 @@ import ButtonsGroup from '@/components/ui/buttons-group';
|
||||
import { Quality } from '@/data/parsers/yts/models';
|
||||
import { useM3UUrl } from '@/hooks/useM3UStreamUrl';
|
||||
import { useStreamUrl } from '@/hooks/useStreamUrl';
|
||||
import { track } from '@/lib/analytics';
|
||||
import { cn, detectSafari, getMagnetHash, isStandaloneApp, seasonFromEpisodes, torrentKey } from '@/lib/utils';
|
||||
|
||||
import usePinnedTorrents from '../../../../usePinnedTorrents';
|
||||
@@ -63,7 +64,17 @@ const Actions: FC<Props> = ({ torrent, title, provider, show }) => {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [pinned, magnet, key, torrent.magnet]);
|
||||
|
||||
const pinPlayed = () => pin(key);
|
||||
const pinPlayed = () => {
|
||||
track('torrent_selected', {
|
||||
provider,
|
||||
seeders: torrent.seeders,
|
||||
quality: torrent.quality,
|
||||
source: torrent.source,
|
||||
codec: torrent.codec
|
||||
});
|
||||
|
||||
pin(key);
|
||||
};
|
||||
|
||||
const supportedForCast = prefix && !prefix.includes('{host}');
|
||||
|
||||
|
||||
@@ -52,26 +52,31 @@ const showTorrentsModal = create(({ onResolve, ...show }: Props) => {
|
||||
|
||||
const isSeries = show.type === 'tv';
|
||||
|
||||
const tracked = { id: show.id, type: show.type };
|
||||
|
||||
const yts = useTorrents({
|
||||
query: isSeries ? '' : show.title,
|
||||
queryFn: providers.yts.queryFn,
|
||||
sort,
|
||||
key: providers.yts.key,
|
||||
imdbID: show.imdb_id!
|
||||
imdbID: show.imdb_id!,
|
||||
show: tracked
|
||||
});
|
||||
const tpb = useTorrents({
|
||||
query,
|
||||
queryFn: providers.tpb.queryFn,
|
||||
sort,
|
||||
key: providers.tpb.key,
|
||||
imdbID: show.imdb_id!
|
||||
imdbID: show.imdb_id!,
|
||||
show: tracked
|
||||
});
|
||||
const tlk = useTorrents({
|
||||
query,
|
||||
queryFn: providers.tlk.queryFn,
|
||||
sort,
|
||||
key: providers.tlk.key,
|
||||
imdbID: show.imdb_id!
|
||||
imdbID: show.imdb_id!,
|
||||
show: tracked
|
||||
});
|
||||
|
||||
const queries = { yts, tpb, tlk };
|
||||
|
||||
@@ -1,25 +1,37 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
import { Sort } from '@/data/parsers';
|
||||
import useTrackOnce from '@/lib/analytics/useTrackOnce';
|
||||
|
||||
const useTorrents = ({
|
||||
query,
|
||||
sort,
|
||||
imdbID,
|
||||
key,
|
||||
queryFn
|
||||
queryFn,
|
||||
show
|
||||
}: {
|
||||
key: string;
|
||||
query: string;
|
||||
sort: Sort;
|
||||
imdbID: string;
|
||||
show: { id: Show['id']; type: Show['type'] };
|
||||
queryFn: (params: { query: string; sort: Sort; imdbID: string }) => Promise<Torrent[]>;
|
||||
}) => {
|
||||
return useQuery({
|
||||
const result = useQuery({
|
||||
enabled: Boolean(query),
|
||||
queryKey: [key, query, sort, imdbID],
|
||||
queryFn: () => queryFn({ query, sort, imdbID })
|
||||
});
|
||||
|
||||
useTrackOnce('torrents_searched', result.data ? `${key}:${query}` : undefined, () => ({
|
||||
showId: show.id,
|
||||
showType: show.type,
|
||||
provider: key,
|
||||
results: result.data?.length ?? 0
|
||||
}));
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
export default useTorrents;
|
||||
@@ -7,6 +7,7 @@ import Poster from '@/components/Poster';
|
||||
import Credits from '@/components/Preview/components/Credits';
|
||||
import useDetails from '@/components/Preview/useDetails';
|
||||
import { Modal } from '@/components/ui/dialog';
|
||||
import useTrackOnce from '@/lib/analytics/useTrackOnce';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import Actions from './components/Actions';
|
||||
@@ -38,12 +39,19 @@ const Preview: FC<Props> = ({
|
||||
}) => {
|
||||
const { data: detailedShow } = useDetails({ showId: showId || baseShow?.id, showType: showType || baseShow?.type });
|
||||
|
||||
if (!baseShow && !detailedShow) return null;
|
||||
|
||||
const show: Show & Partial<Details> = (detailedShow || baseShow)!;
|
||||
const show = (detailedShow || baseShow) as (Show & Partial<Details>) | undefined;
|
||||
|
||||
const isModal = Boolean(onClose);
|
||||
|
||||
useTrackOnce('show_viewed', show?.id, () => ({
|
||||
showId: show!.id,
|
||||
showType: show!.type,
|
||||
title: show!.title,
|
||||
surface: isModal ? 'modal' : 'page'
|
||||
}));
|
||||
|
||||
if (!show) return null;
|
||||
|
||||
const Title = heading ? 'h1' : 'span';
|
||||
|
||||
return (
|
||||
|
||||
@@ -4,6 +4,7 @@ import { FC, useState } from 'react';
|
||||
|
||||
import useSimilar from '@/components/Trending/useSimilar';
|
||||
import Nav from '@/components/ui/nav';
|
||||
import { track } from '@/lib/analytics';
|
||||
|
||||
import Gallery from './components/Gallery';
|
||||
import { tabs as initialTabs } from './constants';
|
||||
@@ -41,7 +42,15 @@ const Trending: FC<Props> = ({ showId, showType, preview }) => {
|
||||
return (
|
||||
(streaming.isFetched || similar.isFetched) && (
|
||||
<div className='hidden md:block'>
|
||||
<Nav tabs={tabs} active={active} onChange={(active) => setActive(active)} className='mb-3' />
|
||||
<Nav
|
||||
tabs={tabs}
|
||||
active={active}
|
||||
onChange={(active) => {
|
||||
track('gallery_tab_changed', { tab: active.type });
|
||||
setActive(active);
|
||||
}}
|
||||
className='mb-3'
|
||||
/>
|
||||
{!tab.isPending && <Gallery key={active.type} shows={tab.data || []} />}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -12,6 +12,10 @@ OPENSUBTITLES_USERNAME=your_opensubtitles_username
|
||||
OPENSUBTITLES_PASSWORD=your_opensubtitles_password
|
||||
# Comma-separated preferred subtitle languages (ISO 639-1)
|
||||
SUBTITLE_LANGUAGES=en,uk
|
||||
# Optional: self-hosted OpenPanel analytics. Unset means analytics is a no-op and no script loads.
|
||||
NEXT_PUBLIC_OPENPANEL_CLIENT_ID=your_openpanel_client_id
|
||||
NEXT_PUBLIC_OPENPANEL_API_URL=https://analytics.example.org/api
|
||||
NEXT_PUBLIC_OPENPANEL_SCRIPT_URL=https://analytics.example.org/op1.js
|
||||
# Optional: persists the Toloka session across serverless cold starts (falls back to in-memory)
|
||||
UPSTASH_REDIS_REST_URL=https://your-db.upstash.io
|
||||
UPSTASH_REDIS_REST_TOKEN=your_upstash_token
|
||||
@@ -25,5 +25,9 @@ export const OPENSUBTITLES_USERNAME = process.env.OPENSUBTITLES_USERNAME;
|
||||
export const OPENSUBTITLES_PASSWORD = process.env.OPENSUBTITLES_PASSWORD;
|
||||
export const SUBTITLE_LANGUAGES = process.env.SUBTITLE_LANGUAGES || 'en,uk';
|
||||
|
||||
export const OPENPANEL_CLIENT_ID = process.env.NEXT_PUBLIC_OPENPANEL_CLIENT_ID;
|
||||
export const OPENPANEL_API_URL = process.env.NEXT_PUBLIC_OPENPANEL_API_URL;
|
||||
export const OPENPANEL_SCRIPT_URL = process.env.NEXT_PUBLIC_OPENPANEL_SCRIPT_URL;
|
||||
|
||||
export const UPSTASH_REDIS_REST_URL = process.env.UPSTASH_REDIS_REST_URL || process.env.KV_REST_API_URL;
|
||||
export const UPSTASH_REDIS_REST_TOKEN = process.env.UPSTASH_REDIS_REST_TOKEN || process.env.KV_REST_API_TOKEN;
|
||||
@@ -1,6 +1,9 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { QueryKey, useInfiniteQuery, useSuspenseInfiniteQuery } from '@tanstack/react-query';
|
||||
|
||||
import { track } from '@/lib/analytics';
|
||||
import type { ListName } from '@/lib/analytics/events';
|
||||
|
||||
interface Props {
|
||||
enabled?: boolean;
|
||||
queryKey: QueryKey;
|
||||
@@ -8,6 +11,7 @@ interface Props {
|
||||
initialPageParam?: string;
|
||||
getNextPageParam?: () => string | undefined;
|
||||
mode?: 'suspense' | 'default';
|
||||
list?: ListName;
|
||||
}
|
||||
|
||||
const useInfiniteList = ({
|
||||
@@ -16,7 +20,8 @@ const useInfiniteList = ({
|
||||
initialPageParam,
|
||||
getNextPageParam,
|
||||
mode = 'suspense',
|
||||
enabled
|
||||
enabled,
|
||||
list
|
||||
}: Props) => {
|
||||
const { data, hasNextPage, fetchNextPage, isFetched, isLoading } = (
|
||||
mode === 'suspense' ? useSuspenseInfiniteQuery : useInfiniteQuery
|
||||
@@ -43,7 +48,15 @@ const useInfiniteList = ({
|
||||
);
|
||||
}, [data?.pages]);
|
||||
|
||||
return { shows, fetchNextPage: hasNextPage ? fetchNextPage : undefined, isFetched, isLoading };
|
||||
const pages = data?.pages.length ?? 0;
|
||||
|
||||
const loadNextPage = useCallback(() => {
|
||||
if (list) track('list_loaded_more', { list, page: pages + 1 });
|
||||
|
||||
return fetchNextPage();
|
||||
}, [list, pages, fetchNextPage]);
|
||||
|
||||
return { shows, fetchNextPage: hasNextPage ? loadNextPage : undefined, isFetched, isLoading };
|
||||
};
|
||||
|
||||
export default useInfiniteList;
|
||||
@@ -3,6 +3,7 @@ import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
||||
import statesMutation from '@/data/mutations/accountStates';
|
||||
import statesQuery from '@/data/queries/accountStates';
|
||||
import { KEY as USERS_SHOWS_KEY } from '@/data/queries/usersShows';
|
||||
import { track } from '@/lib/analytics';
|
||||
|
||||
import { useFavorites, useFavoritesStateToggle, useWatchList, useWatchListStateToggle } from './useLocalUsersLists';
|
||||
import { useSession } from './useSession';
|
||||
@@ -51,6 +52,8 @@ export const useMutateShowState = (show: Show) => {
|
||||
list: mutation.variables?.list,
|
||||
isPending: session ? mutation.isPending : false,
|
||||
mutate: ({ list, value }: { list: 'favorite' | 'watchlist'; value: boolean }) => {
|
||||
track('library_toggled', { showId: show.id, showType: show.type, list, value });
|
||||
|
||||
if (session) return mutation.mutate({ showId: show.id, showType: show.type, list, value });
|
||||
|
||||
if (list === 'favorite') return toggleFavorite();
|
||||
|
||||
@@ -26,7 +26,7 @@ const useUsersShows = ({
|
||||
const { shows: favorite } = useFavorites();
|
||||
const { shows: watchlist } = useWatchList();
|
||||
|
||||
const query = useInfiniteList({ ...usersShowsQuery({ showType, list, session }), mode });
|
||||
const query = useInfiniteList({ ...usersShowsQuery({ showType, list, session }), mode, list });
|
||||
|
||||
return session
|
||||
? query
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
type ShowRef = { showId: Show['id']; showType: Show['type'] };
|
||||
|
||||
export type ListName = 'popular' | 'top' | 'search' | 'favorite' | 'watchlist' | 'random';
|
||||
|
||||
/**
|
||||
* The whole analytics surface of the app. Adding an event means adding a line here first,
|
||||
* which keeps names and payloads consistent and makes `track` calls type checked.
|
||||
*/
|
||||
export type AnalyticsEvents = {
|
||||
show_viewed: ShowRef & { title: string; surface: 'page' | 'modal' };
|
||||
person_viewed: { personId: string };
|
||||
list_loaded_more: { list: ListName; page: number };
|
||||
random_shuffled: { index: number };
|
||||
|
||||
search_performed: { query: string; showType: Show['type']; results: number };
|
||||
gallery_tab_changed: { tab: string };
|
||||
|
||||
library_toggled: ShowRef & { list: 'favorite' | 'watchlist'; value: boolean };
|
||||
auth_completed: EmptyPayload;
|
||||
auth_signed_out: EmptyPayload;
|
||||
|
||||
torrents_searched: ShowRef & { provider: string; results: number };
|
||||
torrent_selected: { provider: string; seeders: number; quality?: string; source?: string; codec?: string };
|
||||
playback_started: ShowRef & { quality?: string };
|
||||
playback_failed: ShowRef & { reason: string };
|
||||
subtitles_selected: { language: string };
|
||||
};
|
||||
|
||||
export type EmptyPayload = Record<string, never>;
|
||||
|
||||
export type AnalyticsEvent = keyof AnalyticsEvents;
|
||||
@@ -0,0 +1,30 @@
|
||||
import { OPENPANEL_CLIENT_ID } from '@/env';
|
||||
|
||||
import type { AnalyticsEvents } from './events';
|
||||
|
||||
// The sdk declares `window.op` itself, so this reads it without redeclaring the global.
|
||||
// It is defined by the inline stub in components/Analytics and queues calls until the real
|
||||
// script loads, so events fired before then are kept rather than dropped.
|
||||
const op = () => (window as unknown as { op?: (method: string, ...args: unknown[]) => void }).op;
|
||||
|
||||
const ready = () => Boolean(OPENPANEL_CLIENT_ID) && typeof window !== 'undefined';
|
||||
|
||||
export const track = <Name extends keyof AnalyticsEvents>(name: Name, properties: AnalyticsEvents[Name]) => {
|
||||
if (!ready()) return;
|
||||
|
||||
op()?.('track', name, properties);
|
||||
};
|
||||
|
||||
export const identify = (profileId: string) => {
|
||||
if (!ready()) return;
|
||||
|
||||
op()?.('identify', { profileId });
|
||||
};
|
||||
|
||||
export const clearIdentity = () => {
|
||||
if (!ready()) return;
|
||||
|
||||
op()?.('clear');
|
||||
};
|
||||
|
||||
export type { AnalyticsEvents, ListName } from './events';
|
||||
@@ -0,0 +1,30 @@
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
import type { AnalyticsEvents } from './events';
|
||||
import { track } from '.';
|
||||
|
||||
/**
|
||||
* Fires an event once per distinct `key`, skipping while it is nullish. Keeps view style
|
||||
* events (a show opened, a search resolved) to a single line at the call site instead of an
|
||||
* effect plus a ref in every component that needs one.
|
||||
*/
|
||||
const useTrackOnce = <Name extends keyof AnalyticsEvents>(
|
||||
name: Name,
|
||||
key: string | number | null | undefined,
|
||||
payload: () => AnalyticsEvents[Name]
|
||||
) => {
|
||||
const payloadRef = useRef(payload);
|
||||
const sentRef = useRef<string | number | null>(null);
|
||||
|
||||
payloadRef.current = payload;
|
||||
|
||||
useEffect(() => {
|
||||
if (key == null || sentRef.current === key) return;
|
||||
|
||||
sentRef.current = key;
|
||||
|
||||
track(name, payloadRef.current());
|
||||
}, [name, key]);
|
||||
};
|
||||
|
||||
export default useTrackOnce;
|
||||
Generated
+214
-67
@@ -11,6 +11,7 @@
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@openpanel/web": "^1.4.1",
|
||||
"@radix-ui/react-dialog": "^1.1.1",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
||||
"@radix-ui/react-tabs": "^1.0.4",
|
||||
@@ -19,7 +20,6 @@
|
||||
"@tanstack/react-query-next-experimental": "^5.59.16",
|
||||
"@types/cheerio": "^0.22.35",
|
||||
"@upstash/redis": "^1.38.2",
|
||||
"@vercel/analytics": "^2.0.1",
|
||||
"@vidstack/react": "^1.12.13",
|
||||
"axios": "^1.7.7",
|
||||
"axios-cookiejar-support": "^5.0.3",
|
||||
@@ -2205,6 +2205,23 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@openpanel/sdk": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@openpanel/sdk/-/sdk-1.3.1.tgz",
|
||||
"integrity": "sha512-mQ5xaBUGXnyRg3qYxwnbVaUYyW7w8u+munrWk/ClnqxEeR2j+FYPiA6noHbHMCFC2aZutYD5OoRzEvw3FBNFxw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@openpanel/web": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@openpanel/web/-/web-1.4.1.tgz",
|
||||
"integrity": "sha512-DgUWeocZw+b57YiJjefZPg+6sceR7TdOF8x7Ut75lu3CwcwqGi5jZNPXjikNemGL37aNWXCB4buhcoNan2j7RA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@openpanel/sdk": "1.3.1",
|
||||
"@rrweb/types": "2.0.0-alpha.20",
|
||||
"rrweb": "2.0.0-alpha.20"
|
||||
}
|
||||
},
|
||||
"node_modules/@pkgjs/parseargs": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||
@@ -4251,6 +4268,18 @@
|
||||
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rrweb/types": {
|
||||
"version": "2.0.0-alpha.20",
|
||||
"resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0-alpha.20.tgz",
|
||||
"integrity": "sha512-RbnDgKxA/odwB1R4gF7eUUj+rdSrq6ROQJsnMw7MIsGzlbSYvJeZN8YY4XqU0G6sKJvXI6bSzk7w/G94jNwzhw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rrweb/utils": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.1.1.tgz",
|
||||
"integrity": "sha512-x2SgJAD3YJ9eVcLZ5l6OqWMtczdA3VfS5XqPeqpZdQgV9oh6Id5GK2cDN4bimnkqryOcIJdz8cTvV0yNvqQ+nA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rushstack/eslint-patch": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.1.tgz",
|
||||
@@ -4381,6 +4410,12 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/css-font-loading-module": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/css-font-loading-module/-/css-font-loading-module-0.0.7.tgz",
|
||||
"integrity": "sha512-nl09VhutdjINdWyXxHWN/w9zlNCfr60JUqJbd24YXUuCwgeL0TpFSdElCwb6cxfB6ybE19Gjj4g0jsgkXxKv1Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
@@ -4610,48 +4645,6 @@
|
||||
"uncrypto": "^0.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@vercel/analytics": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-2.0.1.tgz",
|
||||
"integrity": "sha512-MTQG6V9qQrt1tsDeF+2Uoo5aPjqbVPys1xvnIftXSJYG2SrwXRHnqEvVoYID7BTruDz4lCd2Z7rM1BdkUehk2g==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@remix-run/react": "^2",
|
||||
"@sveltejs/kit": "^1 || ^2",
|
||||
"next": ">= 13",
|
||||
"nuxt": ">= 3",
|
||||
"react": "^18 || ^19 || ^19.0.0-rc",
|
||||
"svelte": ">= 4",
|
||||
"vue": "^3",
|
||||
"vue-router": "^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@remix-run/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@sveltejs/kit": {
|
||||
"optional": true
|
||||
},
|
||||
"next": {
|
||||
"optional": true
|
||||
},
|
||||
"nuxt": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"svelte": {
|
||||
"optional": true
|
||||
},
|
||||
"vue": {
|
||||
"optional": true
|
||||
},
|
||||
"vue-router": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@vidstack/react": {
|
||||
"version": "1.12.13",
|
||||
"resolved": "https://registry.npmjs.org/@vidstack/react/-/react-1.12.13.tgz",
|
||||
@@ -4830,6 +4823,12 @@
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@xstate/fsm": {
|
||||
"version": "1.6.5",
|
||||
"resolved": "https://registry.npmjs.org/@xstate/fsm/-/fsm-1.6.5.tgz",
|
||||
"integrity": "sha512-b5o1I6aLNeYlU/3CPlj/Z91ybk1gUsKT+5NAJI+2W4UjvS5KLG28K9v5UvNoFVjHV8PajVZ00RH3vnjyQO7ZAw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@xtuc/ieee754": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
|
||||
@@ -9248,6 +9247,12 @@
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/mitt": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
|
||||
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -9266,15 +9271,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"version": "3.3.18",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
|
||||
"integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
@@ -9903,9 +9909,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
||||
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw=="
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.1",
|
||||
@@ -10663,6 +10670,68 @@
|
||||
"randombytes": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rrdom": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.1.1.tgz",
|
||||
"integrity": "sha512-VBkTF3bGNqcZjqnbo/gKi9GVQPIxiG0dofw7CQdAZQFQ2juJdt2YKIf3oS9QudL8HTpGh9bz5TUN+3amBn1Geg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"rrweb-snapshot": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/rrweb": {
|
||||
"version": "2.0.0-alpha.20",
|
||||
"resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0-alpha.20.tgz",
|
||||
"integrity": "sha512-CZKDlm+j1VA50Ko3gnMbpvguCAleljsTNXPnVk9aeNP8o6T6kolRbISHyDZpqZ4G+bdDLlQOignPP3jEsXs8Gg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rrweb/types": "^2.0.0-alpha.20",
|
||||
"@rrweb/utils": "^2.0.0-alpha.20",
|
||||
"@types/css-font-loading-module": "0.0.7",
|
||||
"@xstate/fsm": "^1.4.0",
|
||||
"base64-arraybuffer": "^1.0.1",
|
||||
"mitt": "^3.0.0",
|
||||
"rrdom": "^2.0.0-alpha.20",
|
||||
"rrweb-snapshot": "^2.0.0-alpha.20"
|
||||
}
|
||||
},
|
||||
"node_modules/rrweb-snapshot": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.1.1.tgz",
|
||||
"integrity": "sha512-al4Kx7Am7YlIn/5Yb2EMr7cdmjGiK+cLhdilJEXqkFXgpnys8t/yMJumXy2Ormgirpg3MBnFha0GTgny+iIL2w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"postcss": "^8.4.38"
|
||||
}
|
||||
},
|
||||
"node_modules/rrweb-snapshot/node_modules/postcss": {
|
||||
"version": "8.5.26",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
|
||||
"integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.17",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/run-applescript": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz",
|
||||
@@ -11010,9 +11079,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -14014,6 +14084,21 @@
|
||||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@openpanel/sdk": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@openpanel/sdk/-/sdk-1.3.1.tgz",
|
||||
"integrity": "sha512-mQ5xaBUGXnyRg3qYxwnbVaUYyW7w8u+munrWk/ClnqxEeR2j+FYPiA6noHbHMCFC2aZutYD5OoRzEvw3FBNFxw=="
|
||||
},
|
||||
"@openpanel/web": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@openpanel/web/-/web-1.4.1.tgz",
|
||||
"integrity": "sha512-DgUWeocZw+b57YiJjefZPg+6sceR7TdOF8x7Ut75lu3CwcwqGi5jZNPXjikNemGL37aNWXCB4buhcoNan2j7RA==",
|
||||
"requires": {
|
||||
"@openpanel/sdk": "1.3.1",
|
||||
"@rrweb/types": "2.0.0-alpha.20",
|
||||
"rrweb": "2.0.0-alpha.20"
|
||||
}
|
||||
},
|
||||
"@pkgjs/parseargs": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||
@@ -14985,6 +15070,16 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@rrweb/types": {
|
||||
"version": "2.0.0-alpha.20",
|
||||
"resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0-alpha.20.tgz",
|
||||
"integrity": "sha512-RbnDgKxA/odwB1R4gF7eUUj+rdSrq6ROQJsnMw7MIsGzlbSYvJeZN8YY4XqU0G6sKJvXI6bSzk7w/G94jNwzhw=="
|
||||
},
|
||||
"@rrweb/utils": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.1.1.tgz",
|
||||
"integrity": "sha512-x2SgJAD3YJ9eVcLZ5l6OqWMtczdA3VfS5XqPeqpZdQgV9oh6Id5GK2cDN4bimnkqryOcIJdz8cTvV0yNvqQ+nA=="
|
||||
},
|
||||
"@rushstack/eslint-patch": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.1.tgz",
|
||||
@@ -15073,6 +15168,11 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/css-font-loading-module": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/css-font-loading-module/-/css-font-loading-module-0.0.7.tgz",
|
||||
"integrity": "sha512-nl09VhutdjINdWyXxHWN/w9zlNCfr60JUqJbd24YXUuCwgeL0TpFSdElCwb6cxfB6ybE19Gjj4g0jsgkXxKv1Q=="
|
||||
},
|
||||
"@types/estree": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
@@ -15247,12 +15347,6 @@
|
||||
"uncrypto": "^0.1.3"
|
||||
}
|
||||
},
|
||||
"@vercel/analytics": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-2.0.1.tgz",
|
||||
"integrity": "sha512-MTQG6V9qQrt1tsDeF+2Uoo5aPjqbVPys1xvnIftXSJYG2SrwXRHnqEvVoYID7BTruDz4lCd2Z7rM1BdkUehk2g==",
|
||||
"requires": {}
|
||||
},
|
||||
"@vidstack/react": {
|
||||
"version": "1.12.13",
|
||||
"resolved": "https://registry.npmjs.org/@vidstack/react/-/react-1.12.13.tgz",
|
||||
@@ -15408,6 +15502,11 @@
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"@xstate/fsm": {
|
||||
"version": "1.6.5",
|
||||
"resolved": "https://registry.npmjs.org/@xstate/fsm/-/fsm-1.6.5.tgz",
|
||||
"integrity": "sha512-b5o1I6aLNeYlU/3CPlj/Z91ybk1gUsKT+5NAJI+2W4UjvS5KLG28K9v5UvNoFVjHV8PajVZ00RH3vnjyQO7ZAw=="
|
||||
},
|
||||
"@xtuc/ieee754": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
|
||||
@@ -18411,6 +18510,11 @@
|
||||
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
||||
"dev": true
|
||||
},
|
||||
"mitt": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
|
||||
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -18428,9 +18532,9 @@
|
||||
}
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
|
||||
"version": "3.3.18",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
|
||||
"integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w=="
|
||||
},
|
||||
"natural-compare": {
|
||||
"version": "1.4.0",
|
||||
@@ -18832,9 +18936,9 @@
|
||||
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
|
||||
},
|
||||
"picocolors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
||||
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw=="
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "2.3.1",
|
||||
@@ -19310,6 +19414,49 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"rrdom": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.1.1.tgz",
|
||||
"integrity": "sha512-VBkTF3bGNqcZjqnbo/gKi9GVQPIxiG0dofw7CQdAZQFQ2juJdt2YKIf3oS9QudL8HTpGh9bz5TUN+3amBn1Geg==",
|
||||
"requires": {
|
||||
"rrweb-snapshot": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"rrweb": {
|
||||
"version": "2.0.0-alpha.20",
|
||||
"resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0-alpha.20.tgz",
|
||||
"integrity": "sha512-CZKDlm+j1VA50Ko3gnMbpvguCAleljsTNXPnVk9aeNP8o6T6kolRbISHyDZpqZ4G+bdDLlQOignPP3jEsXs8Gg==",
|
||||
"requires": {
|
||||
"@rrweb/types": "^2.0.0-alpha.20",
|
||||
"@rrweb/utils": "^2.0.0-alpha.20",
|
||||
"@types/css-font-loading-module": "0.0.7",
|
||||
"@xstate/fsm": "^1.4.0",
|
||||
"base64-arraybuffer": "^1.0.1",
|
||||
"mitt": "^3.0.0",
|
||||
"rrdom": "^2.0.0-alpha.20",
|
||||
"rrweb-snapshot": "^2.0.0-alpha.20"
|
||||
}
|
||||
},
|
||||
"rrweb-snapshot": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.1.1.tgz",
|
||||
"integrity": "sha512-al4Kx7Am7YlIn/5Yb2EMr7cdmjGiK+cLhdilJEXqkFXgpnys8t/yMJumXy2Ormgirpg3MBnFha0GTgny+iIL2w==",
|
||||
"requires": {
|
||||
"postcss": "^8.4.38"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss": {
|
||||
"version": "8.5.26",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
|
||||
"integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
|
||||
"requires": {
|
||||
"nanoid": "^3.3.17",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"run-applescript": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz",
|
||||
@@ -19532,9 +19679,9 @@
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||
},
|
||||
"source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.21",
|
||||
|
||||
+1
-1
@@ -25,6 +25,7 @@
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@openpanel/web": "^1.4.1",
|
||||
"@radix-ui/react-dialog": "^1.1.1",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
||||
"@radix-ui/react-tabs": "^1.0.4",
|
||||
@@ -33,7 +34,6 @@
|
||||
"@tanstack/react-query-next-experimental": "^5.59.16",
|
||||
"@types/cheerio": "^0.22.35",
|
||||
"@upstash/redis": "^1.38.2",
|
||||
"@vercel/analytics": "^2.0.1",
|
||||
"@vidstack/react": "^1.12.13",
|
||||
"axios": "^1.7.7",
|
||||
"axios-cookiejar-support": "^5.0.3",
|
||||
|
||||
Reference in new issue
Block a user