claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
70 lines • 2.31 kB
TypeScript
/**
* TherapeuticAnchor Types
* Type definitions for therapeutic anchor component
*/
export type AnchorType = 'grounding' | 'motivation' | 'comfort' | 'focus' | 'calm' | 'energy' | 'confidence' | 'clarity' | 'custom';
export type AnchorSize = 'sm' | 'md' | 'lg';
export type AnchorVariant = 'default' | 'outlined' | 'filled' | 'minimal';
export type InteractionPattern = 'hover' | 'click' | 'breathing' | 'pulse' | 'glow' | 'none';
export interface BreathingConfig {
/** Duration of one complete breathing cycle in milliseconds */
cycleDuration?: number;
/** Breathing pattern: inhale/hold/exhale durations */
pattern?: [number, number, number];
/** Visual guidance text */
guidance?: string[];
}
export interface TherapeuticAnchorProps {
/** Type of therapeutic anchor */
type: AnchorType;
/** Size variant */
size?: AnchorSize;
/** Visual variant */
variant?: AnchorVariant;
/** Interaction pattern */
interaction?: InteractionPattern;
/** Custom title text */
title?: string;
/** Custom description text */
description?: string;
/** Custom icon or emoji */
icon?: string;
/** Whether the anchor is active/highlighted */
active?: boolean;
/** Whether the anchor is disabled */
disabled?: boolean;
/** Whether to show text labels */
showLabel?: boolean;
/** Whether to show description */
showDescription?: boolean;
/** Breathing exercise configuration */
breathingConfig?: BreathingConfig;
/** Custom color scheme */
customColor?: {
primary: string;
secondary: string;
background: string;
};
/** Additional CSS classes */
class?: string;
/** Callback when anchor is activated */
onActivate?: () => void;
/** Callback for breathing exercise events */
onBreathingPhase?: (phase: 'inhale' | 'hold' | 'exhale') => void;
}
export interface AnchorConfig {
title: string;
description: string;
icon: string;
primaryColor: string;
secondaryColor: string;
backgroundColor: string;
keywords: string[];
therapeutic: {
purpose: string;
usage: string;
benefits: string[];
};
}
export type AnchorTypeConfig = Record<AnchorType, AnchorConfig>;
//# sourceMappingURL=types.d.ts.map