UNPKG

aura-glass

Version:

A comprehensive glassmorphism design system for React applications with 142+ production-ready components

63 lines 2.12 kB
import React from "react"; export type DrawingTool = "pen" | "eraser" | "rectangle" | "circle" | "line" | "text" | "select"; export type DrawingColor = "var(--glass-white)" | "var(--glass-black)" | "#ff0000" | "#00ff00" | "#0000ff" | "#ffff00" | "#ff00ff" | "#00ffff"; export interface DrawingPath { id: string; tool: DrawingTool; points: Array<{ x: number; y: number; }>; color: DrawingColor; width: number; opacity: number; timestamp: number; } export interface DrawingShape { id: string; type: "rectangle" | "circle" | "line" | "text"; startX: number; startY: number; endX: number; endY: number; color: DrawingColor; width: number; opacity: number; text?: string; timestamp: number; } export interface GlassWhiteboardProps extends React.HTMLAttributes<HTMLDivElement> { /** Initial drawing data */ initialData?: Array<DrawingPath | DrawingShape>; /** Whether the whiteboard is collaborative */ collaborative?: boolean; /** Current user's ID (for collaborative mode) */ userId?: string; /** Drawing tools to enable */ enabledTools?: DrawingTool[]; /** Available colors */ availableColors?: DrawingColor[]; /** Canvas width */ width?: number; /** Canvas height */ height?: number; /** Background pattern */ backgroundPattern?: "none" | "grid" | "dots" | "lines"; /** Whether to show toolbar */ showToolbar?: boolean; /** Whether to show mini-map */ showMinimap?: boolean; /** Custom className */ className?: string; /** Drawing change handler */ onDrawingChange?: (data: Array<DrawingPath | DrawingShape>) => void; /** Tool change handler */ onToolChange?: (tool: DrawingTool) => void; /** Color change handler */ onColorChange?: (color: DrawingColor) => void; "data-testid"?: string; "aria-label"?: string; } declare const GlassWhiteboard: React.ForwardRefExoticComponent<GlassWhiteboardProps & React.RefAttributes<HTMLDivElement>>; export { GlassWhiteboard }; //# sourceMappingURL=GlassWhiteboard.d.ts.map