sticky-horse
Version:
With StickyHorse allow your users to send feedback to your team.
53 lines (52 loc) • 1.62 kB
TypeScript
import React from 'react';
import { User, Comment, StickyNote, CursorData } from '../types';
interface ApiKeyStats {
apiKey: string;
userCount: number;
}
interface TrackingInfo {
userId: string;
page?: string;
connectionTime?: string;
origin?: string;
}
interface StickyHorseContextType {
activeUsers: User[];
comments: Comment[];
setComments: (comments: Comment[]) => void;
stickyNotes: StickyNote[];
cursors: CursorData[];
setStickyNotes: (notes: StickyNote[]) => void;
currentUserId: string;
addComment: (comment: Omit<Comment, 'id'>) => void;
addStickyNote: (note: Omit<StickyNote, 'id'>) => void;
removeComment: (id: string) => void;
removeStickyNote: (id: string) => void;
trackUser: (userId: string) => void;
stopTracking: (userId: string) => void;
allUsers: User[];
apiKeyStats: ApiKeyStats[];
currentPage?: string;
isBeingTracked: boolean;
trackingAdmin: string | null;
trackingInfo: TrackingInfo | null;
isConnected: boolean;
activateLaser: () => void;
deactivateLaser: () => void;
isLaserActive: boolean;
handleCommentMouseDown: (e: React.MouseEvent, commentId: string, position: {
x: number;
y: number;
}) => void;
isDraggingComment: string | null;
isFollowing: boolean;
scrollFollowers: () => void;
isActive: boolean;
emailLimitError: string | null;
isServiceValid: boolean;
}
export declare const StickyHorseProvider: React.FC<{
children: React.ReactNode;
}>;
export declare const useStickyHorse: () => StickyHorseContextType;
export {};