claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
88 lines • 2.54 kB
TypeScript
export interface CollaborativeUser {
id: string;
name: string;
color: string;
cursor?: {
x: number;
y: number;
};
selection?: {
type: 'data' | 'annotation';
id: string;
};
lastActive: number;
}
export interface ChartAnnotation {
id: string;
type: 'point' | 'line' | 'area' | 'text';
userId: string;
timestamp: number;
data: {
x: number;
y: number;
width?: number;
height?: number;
text?: string;
color?: string;
};
metadata?: Record<string, any>;
}
export interface CollaborativeState {
data: any[];
annotations: ChartAnnotation[];
users: Record<string, CollaborativeUser>;
version: number;
lastModified: number;
}
type $$ComponentProps = {
data?: any[];
width?: number;
height?: number;
title?: string;
documentId: string;
serverUrl?: string;
userId: string;
userName: string;
userColor?: string;
enableAnnotations?: boolean;
enableCursors?: boolean;
enableRealTimeSync?: boolean;
maxUsers?: number;
autoSave?: boolean;
saveInterval?: number;
token?: string | null;
room?: string;
};
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
$$bindings?: Bindings;
} & Exports;
(internal: unknown, props: Props & {
$$events?: Events;
$$slots?: Slots;
}): Exports & {
$set?: any;
$on?: any;
};
z_$$bindings?: Bindings;
}
declare const CollaborativeChart: $$__sveltets_2_IsomorphicComponent<$$ComponentProps, {
chartUpdate: CustomEvent<any>;
dataSync: CustomEvent<any>;
annotationsSync: CustomEvent<any>;
usersSync: CustomEvent<any>;
connected: CustomEvent<any>;
disconnected: CustomEvent<any>;
synced: CustomEvent<any>;
statusChange: CustomEvent<any>;
message: CustomEvent<any>;
annotationCreated: CustomEvent<any>;
annotationDeleted: CustomEvent<any>;
autoSave: CustomEvent<any>;
exported: CustomEvent<any>;
} & {
[evt: string]: CustomEvent<any>;
}, {}, {}, "">;
type CollaborativeChart = InstanceType<typeof CollaborativeChart>;
export default CollaborativeChart;
//# sourceMappingURL=CollaborativeChart.svelte.d.ts.map