@wakastellar/ui 1.0.12 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +163 -193
  2. package/dist/charts.cjs.js +1 -0
  3. package/dist/charts.es.js +16 -0
  4. package/dist/cn-B-fTneHh.js +1 -0
  5. package/dist/cn-DzRe1GWm.mjs +21 -0
  6. package/dist/components/index.d.ts +122 -0
  7. package/dist/components/waka-3d-pie-chart/index.d.ts +67 -0
  8. package/dist/components/waka-achievement-unlock/index.d.ts +83 -0
  9. package/dist/components/waka-activity-feed/index.d.ts +78 -0
  10. package/dist/components/waka-address-autocomplete/index.d.ts +124 -0
  11. package/dist/components/waka-alert-stack/index.d.ts +58 -0
  12. package/dist/components/waka-allocation-matrix/index.d.ts +193 -0
  13. package/dist/components/waka-approval-chain/index.d.ts +43 -0
  14. package/dist/components/waka-audit-log/index.d.ts +142 -0
  15. package/dist/components/waka-badge-showcase/index.d.ts +51 -0
  16. package/dist/components/waka-biometric-prompt/index.d.ts +84 -0
  17. package/dist/components/waka-bottom-sheet/index.d.ts +61 -0
  18. package/dist/components/waka-breadcrumb-path/index.d.ts +46 -0
  19. package/dist/components/waka-budget-burn/index.d.ts +154 -0
  20. package/dist/components/waka-capacity-planner/index.d.ts +132 -0
  21. package/dist/components/waka-cart-summary/index.d.ts +154 -0
  22. package/dist/components/waka-challenge-timer/index.d.ts +86 -0
  23. package/dist/components/waka-chat-bubble/index.d.ts +127 -0
  24. package/dist/components/waka-checklist/index.d.ts +123 -0
  25. package/dist/components/waka-checkout-stepper/index.d.ts +154 -0
  26. package/dist/components/waka-cohort-table/index.d.ts +130 -0
  27. package/dist/components/waka-combo-counter/index.d.ts +53 -0
  28. package/dist/components/waka-command-bar/index.d.ts +45 -0
  29. package/dist/components/waka-compare-period/index.d.ts +122 -0
  30. package/dist/components/waka-connection-matrix/index.d.ts +117 -0
  31. package/dist/components/waka-contribution-graph/index.d.ts +34 -0
  32. package/dist/components/waka-cost-breakdown/index.d.ts +50 -0
  33. package/dist/components/waka-coupon-input/index.d.ts +105 -0
  34. package/dist/components/waka-credit-card-input/index.d.ts +95 -0
  35. package/dist/components/waka-daily-reward/index.d.ts +76 -0
  36. package/dist/components/waka-deployment-lane/index.d.ts +43 -0
  37. package/dist/components/waka-device-trust/index.d.ts +95 -0
  38. package/dist/components/waka-dock/index.d.ts +44 -0
  39. package/dist/components/waka-empty-state/index.d.ts +85 -0
  40. package/dist/components/waka-error-shake/index.d.ts +49 -0
  41. package/dist/components/waka-feature-announcement/index.d.ts +112 -0
  42. package/dist/components/waka-floating-nav/index.d.ts +51 -0
  43. package/dist/components/waka-flow-diagram/index.d.ts +71 -0
  44. package/dist/components/waka-funnel-chart/index.d.ts +108 -0
  45. package/dist/components/waka-glow-card/index.d.ts +32 -0
  46. package/dist/components/waka-goal-progress/index.d.ts +139 -0
  47. package/dist/components/waka-haptic-button/index.d.ts +45 -0
  48. package/dist/components/waka-health-pulse/index.d.ts +28 -0
  49. package/dist/components/waka-heatmap/index.d.ts +135 -0
  50. package/dist/components/waka-hotspot/index.d.ts +106 -0
  51. package/dist/components/waka-incident-timeline/index.d.ts +38 -0
  52. package/dist/components/waka-invoice-preview/index.d.ts +137 -0
  53. package/dist/components/waka-kpi-dashboard/index.d.ts +80 -0
  54. package/dist/components/waka-leaderboard/index.d.ts +85 -0
  55. package/dist/components/waka-level-progress/index.d.ts +89 -0
  56. package/dist/components/waka-liquid-button/index.d.ts +41 -0
  57. package/dist/components/waka-loading-orbit/index.d.ts +90 -0
  58. package/dist/components/waka-loot-box/index.d.ts +87 -0
  59. package/dist/components/waka-magic-link/index.d.ts +34 -0
  60. package/dist/components/waka-magnetic-button/index.d.ts +56 -0
  61. package/dist/components/waka-mention-input/index.d.ts +106 -0
  62. package/dist/components/waka-metric-sparkline/index.d.ts +46 -0
  63. package/dist/components/waka-milestone-road/index.d.ts +91 -0
  64. package/dist/components/waka-morph-button/index.d.ts +62 -0
  65. package/dist/components/waka-network-topology/index.d.ts +35 -0
  66. package/dist/components/waka-orbital-menu/index.d.ts +61 -0
  67. package/dist/components/waka-order-tracker/index.d.ts +121 -0
  68. package/dist/components/waka-password-strength/index.d.ts +98 -0
  69. package/dist/components/waka-payment-method-picker/index.d.ts +88 -0
  70. package/dist/components/waka-permission-matrix/index.d.ts +197 -0
  71. package/dist/components/waka-phone-input/index.d.ts +93 -0
  72. package/dist/components/waka-pipeline-view/index.d.ts +49 -0
  73. package/dist/components/waka-player-card/index.d.ts +36 -0
  74. package/dist/components/waka-points-popup/index.d.ts +75 -0
  75. package/dist/components/waka-power-up/index.d.ts +103 -0
  76. package/dist/components/waka-presence-indicator/index.d.ts +188 -0
  77. package/dist/components/waka-pricing-table/index.d.ts +77 -0
  78. package/dist/components/waka-product-card/index.d.ts +81 -0
  79. package/dist/components/waka-progress-onboarding/index.d.ts +97 -0
  80. package/dist/components/waka-pull-to-refresh/index.d.ts +45 -0
  81. package/dist/components/waka-quest-card/index.d.ts +110 -0
  82. package/dist/components/waka-quota-bar/index.d.ts +100 -0
  83. package/dist/components/waka-radar-score/index.d.ts +95 -0
  84. package/dist/components/waka-rank-badge/index.d.ts +58 -0
  85. package/dist/components/waka-rating-input/index.d.ts +110 -0
  86. package/dist/components/waka-reaction-picker/index.d.ts +77 -0
  87. package/dist/components/waka-region-map/index.d.ts +27 -0
  88. package/dist/components/waka-resource-gauge/index.d.ts +78 -0
  89. package/dist/components/waka-resource-pool/index.d.ts +81 -0
  90. package/dist/components/waka-rollback-slider/index.d.ts +79 -0
  91. package/dist/components/waka-sankey-diagram/index.d.ts +120 -0
  92. package/dist/components/waka-schedule-picker/index.d.ts +100 -0
  93. package/dist/components/waka-scratch-card/index.d.ts +87 -0
  94. package/dist/components/waka-season-pass/index.d.ts +65 -0
  95. package/dist/components/waka-security-score/index.d.ts +124 -0
  96. package/dist/components/waka-server-rack/index.d.ts +44 -0
  97. package/dist/components/waka-session-manager/index.d.ts +116 -0
  98. package/dist/components/waka-signature-pad/index.d.ts +87 -0
  99. package/dist/components/waka-skeleton-wave/index.d.ts +79 -0
  100. package/dist/components/waka-skill-tree/index.d.ts +78 -0
  101. package/dist/components/waka-sla-tracker/index.d.ts +65 -0
  102. package/dist/components/waka-slider-range/index.d.ts +88 -0
  103. package/dist/components/waka-spin-wheel/index.d.ts +51 -0
  104. package/dist/components/waka-spotlight/index.d.ts +47 -0
  105. package/dist/components/waka-stats-hexagon/index.d.ts +149 -0
  106. package/dist/components/waka-status-matrix/index.d.ts +38 -0
  107. package/dist/components/waka-streak-counter/index.d.ts +27 -0
  108. package/dist/components/waka-success-explosion/index.d.ts +51 -0
  109. package/dist/components/waka-swipe-card/index.d.ts +64 -0
  110. package/dist/components/waka-tabs-morph/index.d.ts +66 -0
  111. package/dist/components/waka-tag-input/index.d.ts +134 -0
  112. package/dist/components/waka-team-banner/index.d.ts +122 -0
  113. package/dist/components/waka-terminal-output/index.d.ts +48 -0
  114. package/dist/components/waka-thread-view/index.d.ts +101 -0
  115. package/dist/components/waka-tilt-card/index.d.ts +36 -0
  116. package/dist/components/waka-tooltip-tour/index.d.ts +118 -0
  117. package/dist/components/waka-tour-guide/index.d.ts +122 -0
  118. package/dist/components/waka-tournament-bracket/index.d.ts +101 -0
  119. package/dist/components/waka-treemap-chart/index.d.ts +104 -0
  120. package/dist/components/waka-two-factor-setup/index.d.ts +93 -0
  121. package/dist/components/waka-typewriter/index.d.ts +98 -0
  122. package/dist/components/waka-typing-indicator/index.d.ts +64 -0
  123. package/dist/components/waka-versus-card/index.d.ts +117 -0
  124. package/dist/components/waka-video-call/index.d.ts +170 -0
  125. package/dist/components/waka-voice-message/index.d.ts +117 -0
  126. package/dist/components/waka-welcome-modal/index.d.ts +120 -0
  127. package/dist/components/waka-xp-bar/index.d.ts +54 -0
  128. package/dist/export.cjs.js +1 -0
  129. package/dist/export.d.ts +3 -1
  130. package/dist/export.es.js +5 -0
  131. package/dist/index-B9GTFkji.js +1 -0
  132. package/dist/index-c0jcWyEL.mjs +466 -0
  133. package/dist/index.cjs.js +2530 -22
  134. package/dist/index.d.ts +1 -0
  135. package/dist/index.es.js +72081 -19512
  136. package/dist/rich-text.cjs.js +1 -0
  137. package/dist/rich-text.es.js +4 -0
  138. package/dist/types-BOWIoR7j.mjs +1111 -0
  139. package/dist/types-D2yCJ91P.js +1 -0
  140. package/dist/useDataTableImport-D8R2HQl6.mjs +229 -0
  141. package/dist/useDataTableImport-S_hhA5Wo.js +9 -0
  142. package/package.json +57 -20
  143. package/src/styles/base.css +108 -0
  144. package/src/styles/code-highlight.css +82 -86
  145. package/src/styles/globals-v3.css +9 -0
  146. package/src/styles/globals.css +57 -74
  147. package/src/styles/tailwind.preset.js +69 -0
@@ -0,0 +1,123 @@
1
+ import * as React from "react";
2
+ export type TaskStatus = "pending" | "completed" | "skipped";
3
+ export interface ChecklistTask {
4
+ /** Unique identifier */
5
+ id: string;
6
+ /** Task title */
7
+ title: string;
8
+ /** Task description (shown when expanded) */
9
+ description?: string;
10
+ /** Category/group the task belongs to */
11
+ category?: string;
12
+ /** Action button label */
13
+ actionLabel?: string;
14
+ /** Callback when action is triggered */
15
+ onAction?: () => void;
16
+ /** Whether the task can be skipped */
17
+ skippable?: boolean;
18
+ /** Custom icon */
19
+ icon?: React.ReactNode;
20
+ /** Reward points for completing this task */
21
+ points?: number;
22
+ /** Whether this task is required */
23
+ required?: boolean;
24
+ }
25
+ export interface ChecklistCategory {
26
+ /** Category identifier */
27
+ id: string;
28
+ /** Category label */
29
+ label: string;
30
+ /** Category description */
31
+ description?: string;
32
+ /** Custom icon */
33
+ icon?: React.ReactNode;
34
+ }
35
+ export interface ChecklistState {
36
+ /** Map of task ID to status */
37
+ tasks: Record<string, TaskStatus>;
38
+ /** Whether the checklist is collapsed */
39
+ collapsed: boolean;
40
+ /** Set of expanded task IDs */
41
+ expandedTasks: Set<string>;
42
+ }
43
+ export interface WakaChecklistProps {
44
+ /** Checklist identifier for localStorage persistence */
45
+ checklistId: string;
46
+ /** List of tasks */
47
+ tasks: ChecklistTask[];
48
+ /** Category definitions */
49
+ categories?: ChecklistCategory[];
50
+ /** Title of the checklist */
51
+ title?: string;
52
+ /** Subtitle/description */
53
+ subtitle?: string;
54
+ /** Show progress bar */
55
+ showProgress?: boolean;
56
+ /** Show completion percentage */
57
+ showPercentage?: boolean;
58
+ /** Enable localStorage persistence */
59
+ persistent?: boolean;
60
+ /** Show celebration on completion */
61
+ showCelebration?: boolean;
62
+ /** Callback when all tasks are completed */
63
+ onComplete?: () => void;
64
+ /** Callback when a task status changes */
65
+ onTaskChange?: (taskId: string, status: TaskStatus) => void;
66
+ /** Initially collapsed */
67
+ defaultCollapsed?: boolean;
68
+ /** Allow collapsing the checklist */
69
+ collapsible?: boolean;
70
+ /** Size variant */
71
+ size?: "sm" | "default" | "lg";
72
+ /** Custom className */
73
+ className?: string;
74
+ }
75
+ export interface UseChecklistOptions {
76
+ /** Checklist identifier for localStorage */
77
+ checklistId: string;
78
+ /** List of tasks */
79
+ tasks: ChecklistTask[];
80
+ /** Enable localStorage persistence */
81
+ persistent?: boolean;
82
+ /** Initially collapsed */
83
+ defaultCollapsed?: boolean;
84
+ /** Callback when all tasks are completed */
85
+ onComplete?: () => void;
86
+ /** Callback when a task status changes */
87
+ onTaskChange?: (taskId: string, status: TaskStatus) => void;
88
+ }
89
+ export interface UseChecklistReturn {
90
+ /** Current state of all tasks */
91
+ taskStates: Record<string, TaskStatus>;
92
+ /** Whether checklist is collapsed */
93
+ isCollapsed: boolean;
94
+ /** Set of expanded task IDs */
95
+ expandedTasks: Set<string>;
96
+ /** Mark a task as completed */
97
+ completeTask: (taskId: string) => void;
98
+ /** Skip a task */
99
+ skipTask: (taskId: string) => void;
100
+ /** Reset a task to pending */
101
+ resetTask: (taskId: string) => void;
102
+ /** Toggle task expansion */
103
+ toggleTaskExpanded: (taskId: string) => void;
104
+ /** Toggle checklist collapse */
105
+ toggleCollapsed: () => void;
106
+ /** Reset entire checklist */
107
+ resetChecklist: () => void;
108
+ /** Completion progress (0-100) */
109
+ progress: number;
110
+ /** Number of completed tasks */
111
+ completedCount: number;
112
+ /** Number of skipped tasks */
113
+ skippedCount: number;
114
+ /** Total number of tasks */
115
+ totalCount: number;
116
+ /** Whether all tasks are completed or skipped */
117
+ isComplete: boolean;
118
+ /** Get status of a specific task */
119
+ getTaskStatus: (taskId: string) => TaskStatus;
120
+ }
121
+ export declare function useChecklist({ checklistId, tasks, persistent, defaultCollapsed, onComplete, onTaskChange, }: UseChecklistOptions): UseChecklistReturn;
122
+ export declare function WakaChecklist({ checklistId, tasks, categories, title, subtitle, showProgress, showPercentage, persistent, showCelebration, onComplete, onTaskChange, defaultCollapsed, collapsible, size, className, }: WakaChecklistProps): import("react/jsx-runtime").JSX.Element;
123
+ export default WakaChecklist;
@@ -0,0 +1,154 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+ import * as React from "react";
3
+ export type CheckoutStepId = "cart" | "shipping" | "payment" | "review" | "confirmation";
4
+ export type CheckoutStepStatus = "pending" | "current" | "completed" | "error" | "skipped";
5
+ export interface CheckoutStepValidation {
6
+ /** Whether the step is valid */
7
+ isValid: boolean;
8
+ /** Error message if invalid */
9
+ errorMessage?: string;
10
+ /** Field-level errors */
11
+ fieldErrors?: Record<string, string>;
12
+ }
13
+ export interface CheckoutStep {
14
+ /** Unique step identifier */
15
+ id: CheckoutStepId | string;
16
+ /** Step title */
17
+ title: string;
18
+ /** Step description */
19
+ description?: string;
20
+ /** Custom icon (optional) */
21
+ icon?: LucideIcon;
22
+ /** Step content component */
23
+ content?: React.ReactNode;
24
+ /** Whether step is optional (can be skipped) */
25
+ optional?: boolean;
26
+ /** Whether step is disabled */
27
+ disabled?: boolean;
28
+ /** Validation function for the step */
29
+ validate?: () => CheckoutStepValidation | Promise<CheckoutStepValidation>;
30
+ /** Summary data for the sidebar */
31
+ summary?: React.ReactNode;
32
+ }
33
+ export interface CheckoutStepperProps {
34
+ /** List of checkout steps */
35
+ steps: CheckoutStep[];
36
+ /** Current step index (0-indexed) */
37
+ currentStep?: number;
38
+ /** Callback when step changes */
39
+ onStepChange?: (stepIndex: number, stepId: string) => void;
40
+ /** Callback when checkout is completed */
41
+ onComplete?: () => void;
42
+ /** Layout orientation */
43
+ orientation?: "horizontal" | "vertical";
44
+ /** Size variant */
45
+ size?: "sm" | "md" | "lg";
46
+ /** Allow clicking on steps to navigate */
47
+ clickable?: boolean;
48
+ /** Only allow navigation to previous steps */
49
+ allowPreviousOnly?: boolean;
50
+ /** Show step content */
51
+ showContent?: boolean;
52
+ /** Show summary sidebar */
53
+ showSummary?: boolean;
54
+ /** Summary sidebar position */
55
+ summaryPosition?: "left" | "right";
56
+ /** Enable animated transitions */
57
+ animated?: boolean;
58
+ /** Animation direction */
59
+ animationDirection?: "slide" | "fade" | "scale";
60
+ /** Loading state */
61
+ isLoading?: boolean;
62
+ /** Custom class name */
63
+ className?: string;
64
+ /** Navigation labels */
65
+ labels?: {
66
+ back?: string;
67
+ next?: string;
68
+ skip?: string;
69
+ complete?: string;
70
+ processing?: string;
71
+ };
72
+ }
73
+ export interface UseCheckoutStepperOptions {
74
+ /** Initial step index */
75
+ initialStep?: number;
76
+ /** List of steps */
77
+ steps: CheckoutStep[];
78
+ /** Callback when step changes */
79
+ onStepChange?: (stepIndex: number, stepId: string) => void;
80
+ /** Callback when checkout completes */
81
+ onComplete?: () => void;
82
+ /** Validate before proceeding */
83
+ validateOnNext?: boolean;
84
+ }
85
+ export interface UseCheckoutStepperReturn {
86
+ /** Current step index */
87
+ currentStep: number;
88
+ /** Current step data */
89
+ currentStepData: CheckoutStep | undefined;
90
+ /** All steps with status */
91
+ stepsWithStatus: (CheckoutStep & {
92
+ status: CheckoutStepStatus;
93
+ })[];
94
+ /** Total number of steps */
95
+ totalSteps: number;
96
+ /** Whether on first step */
97
+ isFirstStep: boolean;
98
+ /** Whether on last step */
99
+ isLastStep: boolean;
100
+ /** Whether checkout is complete */
101
+ isComplete: boolean;
102
+ /** Whether currently validating */
103
+ isValidating: boolean;
104
+ /** Current validation error */
105
+ validationError: string | null;
106
+ /** Go to specific step */
107
+ goToStep: (index: number) => Promise<boolean>;
108
+ /** Go to next step */
109
+ nextStep: () => Promise<boolean>;
110
+ /** Go to previous step */
111
+ prevStep: () => void;
112
+ /** Skip current step (if optional) */
113
+ skipStep: () => void;
114
+ /** Complete checkout */
115
+ completeCheckout: () => Promise<boolean>;
116
+ /** Reset stepper */
117
+ reset: () => void;
118
+ /** Get step status */
119
+ getStepStatus: (index: number) => CheckoutStepStatus;
120
+ /** Skipped steps */
121
+ skippedSteps: Set<number>;
122
+ /** Mark step as completed manually */
123
+ markStepCompleted: (index: number) => void;
124
+ }
125
+ export interface CheckoutStepperContextValue extends UseCheckoutStepperReturn {
126
+ orientation: "horizontal" | "vertical";
127
+ size: "sm" | "md" | "lg";
128
+ clickable: boolean;
129
+ allowPreviousOnly: boolean;
130
+ animated: boolean;
131
+ animationDirection: "slide" | "fade" | "scale";
132
+ isLoading: boolean;
133
+ }
134
+ export declare function useCheckoutStepper({ initialStep, steps, onStepChange, onComplete, validateOnNext, }: UseCheckoutStepperOptions): UseCheckoutStepperReturn;
135
+ export declare function useCheckoutStepperContext(): CheckoutStepperContextValue;
136
+ export interface CheckoutNavigationProps {
137
+ /** Custom class name */
138
+ className?: string;
139
+ /** Custom labels */
140
+ labels?: {
141
+ back?: string;
142
+ next?: string;
143
+ skip?: string;
144
+ complete?: string;
145
+ processing?: string;
146
+ };
147
+ }
148
+ export declare function CheckoutNavigation({ className, labels, }: CheckoutNavigationProps): import("react/jsx-runtime").JSX.Element;
149
+ export interface CheckoutProgressBarProps {
150
+ className?: string;
151
+ }
152
+ export declare function CheckoutProgressBar({ className }: CheckoutProgressBarProps): import("react/jsx-runtime").JSX.Element;
153
+ export declare function WakaCheckoutStepper({ steps, currentStep: controlledStep, onStepChange, onComplete, orientation, size, clickable, allowPreviousOnly, showContent, showSummary, summaryPosition, animated, animationDirection, isLoading, className, labels, }: CheckoutStepperProps): import("react/jsx-runtime").JSX.Element;
154
+ export default WakaCheckoutStepper;
@@ -0,0 +1,130 @@
1
+ import * as React from "react";
2
+ export type CohortPeriod = "day" | "week" | "month" | "quarter" | "year";
3
+ export type CohortMetric = "retention" | "churn" | "revenue" | "engagement" | "custom";
4
+ export interface CohortDataPoint {
5
+ /** Value for this period (0-100 for percentages, or raw value) */
6
+ value: number;
7
+ /** Number of users/items at this point */
8
+ count?: number;
9
+ /** Additional metadata */
10
+ metadata?: Record<string, unknown>;
11
+ }
12
+ export interface CohortRow {
13
+ /** Unique identifier for the cohort */
14
+ id: string;
15
+ /** Cohort label (e.g., "Jan 2024", "Week 1") */
16
+ label: string;
17
+ /** Cohort start date */
18
+ date: Date;
19
+ /** Initial cohort size */
20
+ size: number;
21
+ /** Data points for each period */
22
+ data: CohortDataPoint[];
23
+ }
24
+ export interface CohortColorScale {
25
+ /** Minimum value color (e.g., for 0% retention) */
26
+ min: string;
27
+ /** Maximum value color (e.g., for 100% retention) */
28
+ max: string;
29
+ /** Optional midpoint color for gradient */
30
+ mid?: string;
31
+ /** Midpoint value (defaults to 50) */
32
+ midValue?: number;
33
+ }
34
+ export interface CohortExportOptions {
35
+ /** Export format */
36
+ format: "csv" | "json";
37
+ /** Include metadata in export */
38
+ includeMetadata?: boolean;
39
+ /** Custom filename */
40
+ filename?: string;
41
+ }
42
+ export interface WakaCohortTableProps {
43
+ /** Cohort data rows */
44
+ data: CohortRow[];
45
+ /** Period type for columns */
46
+ period?: CohortPeriod;
47
+ /** Metric being displayed */
48
+ metric?: CohortMetric;
49
+ /** Custom metric label */
50
+ metricLabel?: string;
51
+ /** Whether to show as percentage */
52
+ showAsPercentage?: boolean;
53
+ /** Number of decimal places */
54
+ decimalPlaces?: number;
55
+ /** Color scale configuration */
56
+ colorScale?: CohortColorScale;
57
+ /** Show cohort size column */
58
+ showCohortSize?: boolean;
59
+ /** Show average row */
60
+ showAverageRow?: boolean;
61
+ /** Show trend indicators */
62
+ showTrends?: boolean;
63
+ /** Enable cell hover highlighting */
64
+ highlightOnHover?: boolean;
65
+ /** Show color scale legend */
66
+ showLegend?: boolean;
67
+ /** Enable export functionality */
68
+ enableExport?: boolean;
69
+ /** Callback when cell is clicked */
70
+ onCellClick?: (row: CohortRow, periodIndex: number, value: CohortDataPoint) => void;
71
+ /** Callback when export is triggered */
72
+ onExport?: (options: CohortExportOptions) => void;
73
+ /** Custom cell renderer */
74
+ renderCell?: (value: CohortDataPoint, row: CohortRow, periodIndex: number) => React.ReactNode;
75
+ /** Custom tooltip renderer */
76
+ renderTooltip?: (value: CohortDataPoint, row: CohortRow, periodIndex: number) => React.ReactNode;
77
+ /** Custom className */
78
+ className?: string;
79
+ /** Table className */
80
+ tableClassName?: string;
81
+ /** Header cell className */
82
+ headerClassName?: string;
83
+ /** Body cell className */
84
+ cellClassName?: string;
85
+ }
86
+ export declare function WakaCohortTable({ data, period, metric, metricLabel, showAsPercentage, decimalPlaces, colorScale, showCohortSize, showAverageRow, showTrends, highlightOnHover, showLegend, enableExport, onCellClick, onExport, renderCell, renderTooltip, className, tableClassName, headerClassName, cellClassName, }: WakaCohortTableProps): import("react/jsx-runtime").JSX.Element;
87
+ export interface UseCohortTableOptions {
88
+ /** Initial cohort data */
89
+ initialData?: CohortRow[];
90
+ /** Default period type */
91
+ defaultPeriod?: CohortPeriod;
92
+ /** Default metric */
93
+ defaultMetric?: CohortMetric;
94
+ }
95
+ export interface CohortStatistics {
96
+ /** Total number of cohorts */
97
+ totalCohorts: number;
98
+ /** Total users across all cohorts */
99
+ totalUsers: number;
100
+ /** Average initial cohort size */
101
+ averageCohortSize: number;
102
+ /** Average retention at each period */
103
+ averageRetentionByPeriod: number[];
104
+ /** Overall average retention */
105
+ overallAverageRetention: number;
106
+ /** Best performing cohort */
107
+ bestCohort: CohortRow | null;
108
+ /** Worst performing cohort */
109
+ worstCohort: CohortRow | null;
110
+ }
111
+ export declare function useCohortTable({ initialData, defaultPeriod, defaultMetric, }?: UseCohortTableOptions): {
112
+ data: CohortRow[];
113
+ period: CohortPeriod;
114
+ metric: CohortMetric;
115
+ selectedCohort: string | null;
116
+ statistics: CohortStatistics;
117
+ setData: React.Dispatch<React.SetStateAction<CohortRow[]>>;
118
+ setPeriod: React.Dispatch<React.SetStateAction<CohortPeriod>>;
119
+ setMetric: React.Dispatch<React.SetStateAction<CohortMetric>>;
120
+ setSelectedCohort: React.Dispatch<React.SetStateAction<string | null>>;
121
+ addCohort: (cohort: CohortRow) => void;
122
+ updateCohort: (id: string, updates: Partial<CohortRow>) => void;
123
+ removeCohort: (id: string) => void;
124
+ updateDataPoint: (cohortId: string, periodIndex: number, value: Partial<CohortDataPoint>) => void;
125
+ sortCohorts: (sortBy: "date" | "size" | "retention", order?: "asc" | "desc") => void;
126
+ filterByDateRange: (startDate: Date, endDate: Date) => CohortRow[];
127
+ getCohortById: (id: string) => CohortRow | undefined;
128
+ reset: () => void;
129
+ };
130
+ export default WakaCohortTable;
@@ -0,0 +1,53 @@
1
+ export interface WakaComboCounterProps {
2
+ /** Current combo count */
3
+ combo: number;
4
+ /** Current multiplier (e.g., 2 for x2) */
5
+ multiplier?: number;
6
+ /** Maximum multiplier cap */
7
+ maxMultiplier?: number;
8
+ /** Time remaining to maintain combo (0-100 percentage) */
9
+ timeRemaining?: number;
10
+ /** Callback when combo breaks (timer runs out) */
11
+ onComboBreak?: () => void;
12
+ /** Milestone numbers to celebrate */
13
+ milestones?: number[];
14
+ /** Callback when a milestone is reached */
15
+ onMilestone?: (milestone: number) => void;
16
+ /** Size variant */
17
+ size?: "sm" | "md" | "lg" | "xl";
18
+ /** Show the timer bar */
19
+ showTimer?: boolean;
20
+ /** Show the multiplier badge */
21
+ showMultiplier?: boolean;
22
+ /** Visual intensity level */
23
+ intensity?: "low" | "medium" | "high" | "extreme";
24
+ /** Enable animations */
25
+ animated?: boolean;
26
+ /** Custom className */
27
+ className?: string;
28
+ /** Sound effect hooks */
29
+ onPlayIncrementSound?: () => void;
30
+ onPlayMilestoneSound?: () => void;
31
+ onPlayBreakSound?: () => void;
32
+ }
33
+ export declare function WakaComboCounter({ combo, multiplier, maxMultiplier, timeRemaining, onComboBreak, milestones, onMilestone, size, showTimer, showMultiplier, intensity, animated, className, onPlayIncrementSound, onPlayMilestoneSound, onPlayBreakSound, }: WakaComboCounterProps): import("react/jsx-runtime").JSX.Element;
34
+ export interface UseComboCounterOptions {
35
+ initialCombo?: number;
36
+ initialMultiplier?: number;
37
+ maxMultiplier?: number;
38
+ timerDuration?: number;
39
+ multiplierThresholds?: number[];
40
+ autoDecay?: boolean;
41
+ decayRate?: number;
42
+ }
43
+ export interface UseComboCounterReturn {
44
+ combo: number;
45
+ multiplier: number;
46
+ timeRemaining: number;
47
+ increment: (amount?: number) => void;
48
+ reset: () => void;
49
+ pause: () => void;
50
+ resume: () => void;
51
+ isPaused: boolean;
52
+ }
53
+ export declare function useComboCounter({ initialCombo, initialMultiplier, maxMultiplier, timerDuration, multiplierThresholds, autoDecay, decayRate, }?: UseComboCounterOptions): UseComboCounterReturn;
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ export interface CommandItem {
3
+ id: string;
4
+ label: string;
5
+ description?: string;
6
+ icon?: React.ReactNode;
7
+ shortcut?: string[];
8
+ category?: string;
9
+ action?: () => void;
10
+ href?: string;
11
+ keywords?: string[];
12
+ }
13
+ export interface CommandCategory {
14
+ id: string;
15
+ label: string;
16
+ items: CommandItem[];
17
+ }
18
+ export interface WakaCommandBarProps {
19
+ /** Whether the command bar is open */
20
+ open: boolean;
21
+ /** Callback when open state changes */
22
+ onOpenChange: (open: boolean) => void;
23
+ /** Command items or categories */
24
+ items: CommandItem[] | CommandCategory[];
25
+ /** Placeholder text */
26
+ placeholder?: string;
27
+ /** Called when an item is selected */
28
+ onSelect?: (item: CommandItem) => void;
29
+ /** Custom empty state */
30
+ emptyMessage?: string;
31
+ /** Show recent items */
32
+ recentItems?: CommandItem[];
33
+ /** Custom footer content */
34
+ footer?: React.ReactNode;
35
+ /** Keyboard shortcut to open (default: cmd+k) */
36
+ shortcut?: string[];
37
+ }
38
+ export declare function WakaCommandBar({ open, onOpenChange, items, placeholder, onSelect, emptyMessage, recentItems, footer, shortcut, }: WakaCommandBarProps): import("react/jsx-runtime").JSX.Element | null;
39
+ export declare function useCommandBar(): {
40
+ open: boolean;
41
+ onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
42
+ openCommandBar: () => void;
43
+ closeCommandBar: () => void;
44
+ toggleCommandBar: () => void;
45
+ };
@@ -0,0 +1,122 @@
1
+ import * as React from "react";
2
+ export type PeriodPreset = "last_week" | "last_month" | "last_quarter" | "last_year" | "custom";
3
+ export type TrendDirection = "up" | "down" | "neutral";
4
+ export interface PeriodRange {
5
+ /** Start date of the period */
6
+ start: Date;
7
+ /** End date of the period */
8
+ end: Date;
9
+ /** Optional label for display */
10
+ label?: string;
11
+ }
12
+ export interface MetricValue {
13
+ /** Current period value */
14
+ current: number;
15
+ /** Previous period value */
16
+ previous: number;
17
+ }
18
+ export interface Metric {
19
+ /** Unique identifier for the metric */
20
+ id: string;
21
+ /** Display name */
22
+ name: string;
23
+ /** Metric values for current and previous periods */
24
+ value: MetricValue;
25
+ /** Format function for displaying the value */
26
+ format?: (value: number) => string;
27
+ /** Unit suffix (e.g., "%", "k", "ms") */
28
+ unit?: string;
29
+ /** Invert trend colors (lower is better) */
30
+ invertTrend?: boolean;
31
+ /** Custom icon */
32
+ icon?: React.ReactNode;
33
+ /** Color theme for the metric */
34
+ color?: "default" | "blue" | "green" | "purple" | "orange" | "red";
35
+ }
36
+ export interface ComparePeriodSummary {
37
+ /** Total metrics improving */
38
+ improving: number;
39
+ /** Total metrics declining */
40
+ declining: number;
41
+ /** Total metrics unchanged */
42
+ unchanged: number;
43
+ /** Average percentage change */
44
+ averageChange: number;
45
+ /** Best performing metric ID */
46
+ bestMetricId?: string;
47
+ /** Worst performing metric ID */
48
+ worstMetricId?: string;
49
+ }
50
+ export interface WakaComparePeriodProps {
51
+ /** Array of metrics to compare */
52
+ metrics: Metric[];
53
+ /** Current period range */
54
+ currentPeriod: PeriodRange;
55
+ /** Previous period range */
56
+ previousPeriod: PeriodRange;
57
+ /** Selected period preset */
58
+ periodPreset?: PeriodPreset;
59
+ /** Callback when period preset changes */
60
+ onPeriodChange?: (preset: PeriodPreset, current: PeriodRange, previous: PeriodRange) => void;
61
+ /** Show period selector dropdown */
62
+ showPeriodSelector?: boolean;
63
+ /** Show visual comparison bars */
64
+ showComparisonBars?: boolean;
65
+ /** Show summary statistics */
66
+ showSummary?: boolean;
67
+ /** Enable animated value transitions */
68
+ animated?: boolean;
69
+ /** Layout variant */
70
+ variant?: "grid" | "list" | "compact";
71
+ /** Number of columns for grid layout */
72
+ columns?: 2 | 3 | 4;
73
+ /** Additional CSS classes */
74
+ className?: string;
75
+ }
76
+ export declare function WakaComparePeriod({ metrics, currentPeriod, previousPeriod, periodPreset, onPeriodChange, showPeriodSelector, showComparisonBars, showSummary, animated, variant, columns, className, }: WakaComparePeriodProps): import("react/jsx-runtime").JSX.Element;
77
+ export interface UseComparePeriodOptions {
78
+ /** Initial period preset */
79
+ initialPreset?: PeriodPreset;
80
+ /** Initial metrics data */
81
+ initialMetrics?: Metric[];
82
+ /** Reference date for calculations */
83
+ referenceDate?: Date;
84
+ /** Auto-refresh interval in milliseconds */
85
+ autoRefreshInterval?: number;
86
+ /** Callback to fetch new metric data */
87
+ onRefresh?: () => Promise<Metric[]>;
88
+ }
89
+ export interface UseComparePeriodReturn {
90
+ /** Current period preset */
91
+ preset: PeriodPreset;
92
+ /** Current period range */
93
+ currentPeriod: PeriodRange;
94
+ /** Previous period range */
95
+ previousPeriod: PeriodRange;
96
+ /** Metrics array */
97
+ metrics: Metric[];
98
+ /** Calculated summary */
99
+ summary: ComparePeriodSummary;
100
+ /** Loading state */
101
+ isLoading: boolean;
102
+ /** Error state */
103
+ error: Error | null;
104
+ /** Set period preset */
105
+ setPreset: (preset: PeriodPreset) => void;
106
+ /** Set custom period ranges */
107
+ setCustomPeriods: (current: PeriodRange, previous: PeriodRange) => void;
108
+ /** Update metrics data */
109
+ setMetrics: React.Dispatch<React.SetStateAction<Metric[]>>;
110
+ /** Update a single metric */
111
+ updateMetric: (id: string, value: MetricValue) => void;
112
+ /** Trigger manual refresh */
113
+ refresh: () => Promise<void>;
114
+ /** Get change for a specific metric */
115
+ getMetricChange: (id: string) => {
116
+ percentage: number;
117
+ absolute: number;
118
+ direction: TrendDirection;
119
+ } | null;
120
+ }
121
+ export declare function useComparePeriod(options?: UseComparePeriodOptions): UseComparePeriodReturn;
122
+ export default WakaComparePeriod;