@nice2dev/templates 1.0.10

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.
@@ -0,0 +1,1213 @@
1
+ import { default as default_2 } from 'react';
2
+ import { EventEmitter } from 'events';
3
+
4
+ export declare type AccountId = string;
5
+
6
+ /** Account types */
7
+ export declare type AccountType = 'checking' | 'savings' | 'credit-card' | 'investment' | 'loan' | 'mortgage' | 'cash' | 'crypto';
8
+
9
+ export declare function AddTorrentDialog({ isOpen, onClose, onAdd, className, }: AddTorrentDialogProps): default_2.ReactElement | null;
10
+
11
+ export declare interface AddTorrentDialogProps {
12
+ isOpen: boolean;
13
+ onClose: () => void;
14
+ onAdd: (source: string, options: {
15
+ path?: string;
16
+ paused?: boolean;
17
+ }) => void;
18
+ className?: string;
19
+ }
20
+
21
+ /** Bill */
22
+ export declare interface Bill {
23
+ id: BillId;
24
+ name: string;
25
+ payee: string;
26
+ amount: number;
27
+ dueDate: number;
28
+ frequency: 'weekly' | 'bi-weekly' | 'monthly' | 'quarterly' | 'yearly';
29
+ categoryId: string;
30
+ accountId?: AccountId;
31
+ autoPay: boolean;
32
+ reminder: boolean;
33
+ reminderDays: number;
34
+ lastPaid?: Date;
35
+ }
36
+
37
+ export declare type BillId = string;
38
+
39
+ /** Budget */
40
+ export declare interface Budget {
41
+ id: BudgetId;
42
+ name: string;
43
+ categoryId: string;
44
+ amount: number;
45
+ period: 'weekly' | 'monthly' | 'yearly';
46
+ spent: number;
47
+ rollover: boolean;
48
+ }
49
+
50
+ export declare type BudgetId = string;
51
+
52
+ export declare function createHealthService(): HealthService;
53
+
54
+ export declare function createLifeDashboardService(): LifeDashboardService;
55
+
56
+ export declare function createPersonalFinanceService(): PersonalFinanceService;
57
+
58
+ export declare function createTaskManagerService(): TaskManagerService;
59
+
60
+ /** Dashboard widget */
61
+ export declare interface DashboardWidget {
62
+ id: string;
63
+ type: 'kpi' | 'goals' | 'habits' | 'mood' | 'finance' | 'calendar' | 'quote';
64
+ title: string;
65
+ size: 'small' | 'medium' | 'large';
66
+ position: {
67
+ row: number;
68
+ col: number;
69
+ };
70
+ config?: Record<string, unknown>;
71
+ }
72
+
73
+ /** Energy levels */
74
+ export declare type EnergyLevel = 'low' | 'medium' | 'high';
75
+
76
+ /** Workout exercise */
77
+ export declare interface Exercise {
78
+ id: string;
79
+ name: string;
80
+ type: ExerciseType;
81
+ sets?: number;
82
+ reps?: number;
83
+ weight?: number;
84
+ weightUnit?: 'kg' | 'lbs';
85
+ duration?: number;
86
+ distance?: number;
87
+ distanceUnit?: 'km' | 'mi';
88
+ calories?: number;
89
+ notes?: string;
90
+ }
91
+
92
+ /** Exercise types */
93
+ export declare type ExerciseType = 'cardio' | 'strength' | 'flexibility' | 'balance' | 'hiit' | 'sports' | 'other';
94
+
95
+ export declare function FilterBar({ className, style }: FilterBarProps): default_2.ReactElement;
96
+
97
+ export declare interface FilterBarProps {
98
+ className?: string;
99
+ style?: default_2.CSSProperties;
100
+ }
101
+
102
+ declare interface FinanceContextValue {
103
+ service: PersonalFinanceService;
104
+ refresh: () => void;
105
+ }
106
+
107
+ /** Finance summary */
108
+ export declare interface FinanceSummary {
109
+ netWorth: number;
110
+ monthlyIncome: number;
111
+ monthlyExpenses: number;
112
+ savings: number;
113
+ savingsRate: number;
114
+ debts: number;
115
+ investments: number;
116
+ budgetUsed: number;
117
+ budgetTotal: number;
118
+ categories: {
119
+ name: string;
120
+ amount: number;
121
+ budget: number;
122
+ }[];
123
+ }
124
+
125
+ /** Financial account */
126
+ export declare interface FinancialAccount {
127
+ id: AccountId;
128
+ name: string;
129
+ type: AccountType;
130
+ institution: string;
131
+ balance: number;
132
+ currency: string;
133
+ lastSync?: Date;
134
+ accountNumber?: string;
135
+ color: string;
136
+ isHidden: boolean;
137
+ }
138
+
139
+ /** Food item */
140
+ export declare interface FoodItem {
141
+ id: string;
142
+ name: string;
143
+ servingSize: number;
144
+ servingUnit: string;
145
+ calories: number;
146
+ protein: number;
147
+ carbs: number;
148
+ fat: number;
149
+ fiber?: number;
150
+ sugar?: number;
151
+ sodium?: number;
152
+ }
153
+
154
+ export declare function formatBytes(bytes: number, decimals?: number): string;
155
+
156
+ export declare function formatETA(seconds?: number): string;
157
+
158
+ export declare function formatRatio(ratio: number): string;
159
+
160
+ export declare function formatSpeed(bytesPerSecond: number): string;
161
+
162
+ export declare function getStatusColor(status: TorrentStatus, theme: TorrentUITheme): string;
163
+
164
+ export declare type GoalId = string;
165
+
166
+ /** Goal milestone */
167
+ export declare interface GoalMilestone {
168
+ id: string;
169
+ title: string;
170
+ targetDate: Date;
171
+ completed: boolean;
172
+ completedDate?: Date;
173
+ }
174
+
175
+ /** Goal status */
176
+ export declare type GoalStatus = 'not-started' | 'in-progress' | 'completed' | 'abandoned';
177
+
178
+ /** Habit */
179
+ export declare interface Habit {
180
+ id: HabitId;
181
+ name: string;
182
+ description?: string;
183
+ frequency: HabitFrequency;
184
+ customDays?: number[];
185
+ targetPerPeriod: number;
186
+ streak: number;
187
+ longestStreak: number;
188
+ category: string;
189
+ color: string;
190
+ icon?: string;
191
+ completions: HabitCompletion[];
192
+ createdAt: Date;
193
+ }
194
+
195
+ /** Habit completion */
196
+ export declare interface HabitCompletion {
197
+ date: Date;
198
+ count: number;
199
+ note?: string;
200
+ }
201
+
202
+ /** Habit frequency */
203
+ export declare type HabitFrequency = 'daily' | 'weekly' | 'monthly' | 'custom';
204
+
205
+ export declare type HabitId = string;
206
+
207
+ declare interface HealthContextValue {
208
+ service: HealthService;
209
+ refresh: () => void;
210
+ }
211
+
212
+ /** Health goals */
213
+ export declare interface HealthGoal {
214
+ id: string;
215
+ type: 'weight' | 'steps' | 'calories' | 'water' | 'sleep' | 'exercise';
216
+ target: number;
217
+ unit: string;
218
+ period: 'daily' | 'weekly';
219
+ current: number;
220
+ }
221
+
222
+ export declare class HealthService {
223
+ private workouts;
224
+ private meals;
225
+ private sleep;
226
+ private medicalRecords;
227
+ private medications;
228
+ private medicationLogs;
229
+ private vitals;
230
+ private goals;
231
+ private foodDatabase;
232
+ addWorkout(workout: Omit<Workout, 'id'>): Workout;
233
+ updateWorkout(id: WorkoutId, updates: Partial<Workout>): void;
234
+ deleteWorkout(id: WorkoutId): void;
235
+ getAllWorkouts(): Workout[];
236
+ getWorkoutsForPeriod(startDate: Date, endDate: Date): Workout[];
237
+ getWorkoutStats(days?: number): {
238
+ totalWorkouts: number;
239
+ totalDuration: number;
240
+ totalCalories: number;
241
+ avgDuration: number;
242
+ byType: {
243
+ type: ExerciseType;
244
+ count: number;
245
+ }[];
246
+ };
247
+ addMeal(meal: Omit<Meal, 'id' | 'totalCalories' | 'totalProtein' | 'totalCarbs' | 'totalFat'>): Meal;
248
+ private calculateMealTotals;
249
+ deleteMeal(id: MealId): void;
250
+ getAllMeals(): Meal[];
251
+ getMealsForDate(date: Date): Meal[];
252
+ getDailyNutrition(date: Date): {
253
+ calories: number;
254
+ protein: number;
255
+ carbs: number;
256
+ fat: number;
257
+ meals: number;
258
+ };
259
+ searchFoods(query: string): FoodItem[];
260
+ addCustomFood(food: Omit<FoodItem, 'id'>): FoodItem;
261
+ addSleepEntry(entry: Omit<SleepEntry, 'id' | 'duration'>): SleepEntry;
262
+ updateSleepEntry(id: SleepId, updates: Partial<SleepEntry>): void;
263
+ deleteSleepEntry(id: SleepId): void;
264
+ getAllSleepEntries(): SleepEntry[];
265
+ getSleepStats(days?: number): {
266
+ avgDuration: number;
267
+ avgQuality: number;
268
+ totalEntries: number;
269
+ qualityDistribution: {
270
+ quality: SleepQuality;
271
+ count: number;
272
+ }[];
273
+ };
274
+ addMedicalRecord(record: Omit<MedicalRecord, 'id'>): MedicalRecord;
275
+ updateMedicalRecord(id: MedicalRecordId, updates: Partial<MedicalRecord>): void;
276
+ deleteMedicalRecord(id: MedicalRecordId): void;
277
+ getAllMedicalRecords(): MedicalRecord[];
278
+ getMedicalRecordsByType(type: MedicalRecordType): MedicalRecord[];
279
+ getUpcomingFollowUps(days?: number): MedicalRecord[];
280
+ addMedication(medication: Omit<Medication, 'id'>): Medication;
281
+ updateMedication(id: MedicationId, updates: Partial<Medication>): void;
282
+ deleteMedication(id: MedicationId): void;
283
+ getAllMedications(): Medication[];
284
+ getActiveMedications(): Medication[];
285
+ logMedication(medicationId: MedicationId, scheduledTime: Date, taken: boolean, notes?: string): void;
286
+ getMedicationLogsForDate(date: Date): MedicationLog[];
287
+ getTodayMedicationSchedule(): {
288
+ medication: Medication;
289
+ time: string;
290
+ taken: boolean;
291
+ }[];
292
+ recordVitals(vitals: VitalSigns): void;
293
+ getVitalsHistory(): VitalSigns[];
294
+ getLatestVitals(): VitalSigns | undefined;
295
+ getWeightHistory(days?: number): {
296
+ date: Date;
297
+ weight: number;
298
+ }[];
299
+ setGoal(goal: HealthGoal): void;
300
+ getGoals(): HealthGoal[];
301
+ updateGoalProgress(goalId: string, current: number): void;
302
+ private generateId;
303
+ clear(): void;
304
+ }
305
+
306
+ /** Torrent info hash (20-byte SHA-1 as hex string) */
307
+ declare type InfoHash = string;
308
+
309
+ /** Investment holding */
310
+ export declare interface InvestmentHolding {
311
+ id: InvestmentId;
312
+ accountId: AccountId;
313
+ symbol: string;
314
+ name: string;
315
+ type: 'stock' | 'etf' | 'mutual-fund' | 'bond' | 'crypto' | 'other';
316
+ shares: number;
317
+ costBasis: number;
318
+ currentPrice: number;
319
+ currentValue: number;
320
+ gain: number;
321
+ gainPercent: number;
322
+ }
323
+
324
+ export declare type InvestmentId = string;
325
+
326
+ export declare type KPIId = string;
327
+
328
+ /** KPI types */
329
+ export declare type KPIType = 'number' | 'currency' | 'percentage' | 'time' | 'rating';
330
+
331
+ declare interface LifeDashboardContextValue {
332
+ service: LifeDashboardService;
333
+ refresh: () => void;
334
+ }
335
+
336
+ export declare class LifeDashboardService {
337
+ private kpis;
338
+ private goals;
339
+ private habits;
340
+ private moodEntries;
341
+ private financeSummary;
342
+ addKPI(kpi: Omit<PersonalKPI, 'id'>): PersonalKPI;
343
+ updateKPI(id: KPIId, updates: Partial<PersonalKPI>): void;
344
+ recordKPIValue(id: KPIId, value: number): void;
345
+ getAllKPIs(): PersonalKPI[];
346
+ getKPIsByCategory(category: string): PersonalKPI[];
347
+ calculateKPIProgress(kpi: PersonalKPI): number;
348
+ addGoal(goal: Omit<LifeGoal, 'id'>): LifeGoal;
349
+ updateGoal(id: GoalId, updates: Partial<LifeGoal>): void;
350
+ completeGoalMilestone(goalId: GoalId, milestoneId: string): void;
351
+ calculateGoalProgress(goal: LifeGoal): number;
352
+ getAllGoals(): LifeGoal[];
353
+ getActiveGoals(): LifeGoal[];
354
+ getGoalsByCategory(category: string): LifeGoal[];
355
+ getUpcomingDeadlines(days?: number): LifeGoal[];
356
+ addHabit(habit: Omit<Habit, 'id' | 'streak' | 'longestStreak' | 'completions' | 'createdAt'>): Habit;
357
+ completeHabit(id: HabitId, count?: number, note?: string): void;
358
+ private updateStreak;
359
+ getAllHabits(): Habit[];
360
+ getHabitCompletionRate(id: HabitId, days?: number): number;
361
+ getTodayHabitStatus(): {
362
+ habit: Habit;
363
+ completed: boolean;
364
+ count: number;
365
+ }[];
366
+ addMoodEntry(entry: Omit<MoodEntry, 'id'>): MoodEntry;
367
+ getAllMoodEntries(): MoodEntry[];
368
+ getMoodEntriesForPeriod(startDate: Date, endDate: Date): MoodEntry[];
369
+ getAverageMood(days?: number): number;
370
+ getAverageSleep(days?: number): number;
371
+ getMoodCorrelations(): {
372
+ factor: string;
373
+ correlation: number;
374
+ }[];
375
+ private calculateCorrelation;
376
+ setFinanceSummary(summary: FinanceSummary): void;
377
+ getFinanceSummary(): FinanceSummary;
378
+ calculateFinanceHealth(): {
379
+ score: number;
380
+ factors: {
381
+ name: string;
382
+ score: number;
383
+ }[];
384
+ };
385
+ generateDailyInsights(): string[];
386
+ private generateId;
387
+ clear(): void;
388
+ }
389
+
390
+ /** Life goal */
391
+ export declare interface LifeGoal {
392
+ id: GoalId;
393
+ title: string;
394
+ description?: string;
395
+ category: string;
396
+ status: GoalStatus;
397
+ startDate: Date;
398
+ targetDate: Date;
399
+ completedDate?: Date;
400
+ progress: number;
401
+ milestones: GoalMilestone[];
402
+ parentGoalId?: GoalId;
403
+ tags: string[];
404
+ }
405
+
406
+ /** Meal entry */
407
+ export declare interface Meal {
408
+ id: MealId;
409
+ date: Date;
410
+ type: MealType;
411
+ foods: {
412
+ item: FoodItem;
413
+ servings: number;
414
+ }[];
415
+ totalCalories: number;
416
+ totalProtein: number;
417
+ totalCarbs: number;
418
+ totalFat: number;
419
+ notes?: string;
420
+ photo?: string;
421
+ }
422
+
423
+ export declare type MealId = string;
424
+
425
+ /** Meal types */
426
+ export declare type MealType = 'breakfast' | 'lunch' | 'dinner' | 'snack';
427
+
428
+ /** Medical record */
429
+ export declare interface MedicalRecord {
430
+ id: MedicalRecordId;
431
+ date: Date;
432
+ type: MedicalRecordType;
433
+ title: string;
434
+ provider?: string;
435
+ facility?: string;
436
+ description?: string;
437
+ results?: Record<string, string | number>;
438
+ attachments?: string[];
439
+ followUp?: Date;
440
+ }
441
+
442
+ export declare type MedicalRecordId = string;
443
+
444
+ /** Medical record types */
445
+ export declare type MedicalRecordType = 'appointment' | 'lab-result' | 'vaccination' | 'prescription' | 'procedure' | 'diagnosis' | 'note';
446
+
447
+ /** Medication */
448
+ export declare interface Medication {
449
+ id: MedicationId;
450
+ name: string;
451
+ dosage: string;
452
+ frequency: string;
453
+ times: string[];
454
+ startDate: Date;
455
+ endDate?: Date;
456
+ prescribedBy?: string;
457
+ pharmacy?: string;
458
+ refillDate?: Date;
459
+ notes?: string;
460
+ isActive: boolean;
461
+ reminders: boolean;
462
+ }
463
+
464
+ export declare type MedicationId = string;
465
+
466
+ /** Medication log */
467
+ export declare interface MedicationLog {
468
+ id: string;
469
+ medicationId: MedicationId;
470
+ scheduledTime: Date;
471
+ takenTime?: Date;
472
+ skipped: boolean;
473
+ notes?: string;
474
+ }
475
+
476
+ /** Mood/health entry */
477
+ export declare interface MoodEntry {
478
+ id: MoodEntryId;
479
+ date: Date;
480
+ mood: MoodLevel;
481
+ energy: EnergyLevel;
482
+ sleep: number;
483
+ stress: number;
484
+ notes?: string;
485
+ activities: string[];
486
+ gratitude: string[];
487
+ healthSymptoms: string[];
488
+ }
489
+
490
+ export declare type MoodEntryId = string;
491
+
492
+ /** Mood levels */
493
+ export declare type MoodLevel = 1 | 2 | 3 | 4 | 5;
494
+
495
+ /** Net worth snapshot */
496
+ export declare interface NetWorthSnapshot {
497
+ date: Date;
498
+ assets: number;
499
+ liabilities: number;
500
+ netWorth: number;
501
+ }
502
+
503
+ export declare function NiceHealth({ service, className, style }: NiceHealthProps): default_2.ReactElement;
504
+
505
+ export declare interface NiceHealthProps {
506
+ service: HealthService;
507
+ className?: string;
508
+ style?: default_2.CSSProperties;
509
+ }
510
+
511
+ export declare function NiceLifeDashboard({ service, className, style, }: NiceLifeDashboardProps): default_2.ReactElement;
512
+
513
+ export declare interface NiceLifeDashboardProps {
514
+ service: LifeDashboardService;
515
+ className?: string;
516
+ style?: default_2.CSSProperties;
517
+ }
518
+
519
+ export declare function NicePersonalFinance({ service, className, style, }: NicePersonalFinanceProps): default_2.ReactElement;
520
+
521
+ export declare interface NicePersonalFinanceProps {
522
+ service: PersonalFinanceService;
523
+ className?: string;
524
+ style?: default_2.CSSProperties;
525
+ }
526
+
527
+ export declare function NiceTaskManager({ service, className, style, }: NiceTaskManagerProps): default_2.ReactElement;
528
+
529
+ export declare interface NiceTaskManagerProps {
530
+ service: TaskManagerService;
531
+ className?: string;
532
+ style?: default_2.CSSProperties;
533
+ }
534
+
535
+ declare class NiceTorrentClient extends EventEmitter {
536
+ private config;
537
+ private peerId;
538
+ private torrents;
539
+ private dht?;
540
+ private pex;
541
+ private utp;
542
+ private isRunning;
543
+ constructor(config: TorrentClientConfig);
544
+ private generatePeerId;
545
+ private setupEventHandlers;
546
+ /** Start the client */
547
+ start(): Promise<void>;
548
+ /** Stop the client */
549
+ stop(): Promise<void>;
550
+ /** Add torrent from magnet URI or .torrent file */
551
+ addTorrent(source: string | Buffer, options?: {
552
+ path?: string;
553
+ paused?: boolean;
554
+ }): Promise<TorrentInstance>;
555
+ private parseMagnetURI;
556
+ private parseTorrentFile;
557
+ /** Start downloading a torrent */
558
+ startTorrent(infoHash: InfoHash): Promise<void>;
559
+ /** Pause a torrent */
560
+ pauseTorrent(infoHash: InfoHash): Promise<void>;
561
+ /** Remove a torrent */
562
+ removeTorrent(infoHash: InfoHash, options?: {
563
+ deleteFiles?: boolean;
564
+ }): Promise<void>;
565
+ private announceToTrackers;
566
+ private httpAnnounce;
567
+ private addPeer;
568
+ private connectToPeer;
569
+ private disconnectPeer;
570
+ private handlePeerData;
571
+ /** Get torrent by info hash */
572
+ getTorrent(infoHash: InfoHash): TorrentInstance | undefined;
573
+ /** Get all torrents */
574
+ getAllTorrents(): TorrentInstance[];
575
+ /** Get client statistics */
576
+ getStats(): {
577
+ activeTorrents: number;
578
+ totalDownloadSpeed: number;
579
+ totalUploadSpeed: number;
580
+ dhtNodes: number;
581
+ globalPeers: number;
582
+ };
583
+ /** Set global download speed limit */
584
+ setDownloadLimit(bytesPerSecond: number): void;
585
+ /** Set global upload speed limit */
586
+ setUploadLimit(bytesPerSecond: number): void;
587
+ /** Generate .torrent file from directory */
588
+ createTorrent(sourcePath: string, options?: {
589
+ name?: string;
590
+ trackers?: string[][];
591
+ comment?: string;
592
+ isPrivate?: boolean;
593
+ pieceLength?: number;
594
+ }): Promise<Buffer>;
595
+ }
596
+
597
+ export declare function NiceTorrentUI({ client, config, className, style, }: NiceTorrentUIProps): default_2.ReactElement;
598
+
599
+ export declare interface NiceTorrentUIProps {
600
+ client: NiceTorrentClient;
601
+ config?: TorrentUIConfig;
602
+ className?: string;
603
+ style?: default_2.CSSProperties;
604
+ }
605
+
606
+ /** Peer identifier */
607
+ declare type PeerId = string;
608
+
609
+ /** Peer connection state */
610
+ declare interface PeerState {
611
+ id: PeerId;
612
+ ip: string;
613
+ port: number;
614
+ client: string;
615
+ progress: number;
616
+ downloadSpeed: number;
617
+ uploadSpeed: number;
618
+ flags: string;
619
+ source: 'tracker' | 'dht' | 'pex' | 'lsd' | 'manual';
620
+ isEncrypted: boolean;
621
+ isUTP: boolean;
622
+ }
623
+
624
+ export declare class PersonalFinanceService {
625
+ private accounts;
626
+ private transactions;
627
+ private budgets;
628
+ private bills;
629
+ private investments;
630
+ private categories;
631
+ private netWorthHistory;
632
+ addAccount(account: Omit<FinancialAccount, 'id'>): FinancialAccount;
633
+ updateAccount(id: AccountId, updates: Partial<FinancialAccount>): void;
634
+ deleteAccount(id: AccountId): void;
635
+ getAllAccounts(): FinancialAccount[];
636
+ getAccountsByType(type: AccountType): FinancialAccount[];
637
+ calculateTotalAssets(): number;
638
+ calculateTotalLiabilities(): number;
639
+ calculateNetWorth(): number;
640
+ recordNetWorthSnapshot(): void;
641
+ getNetWorthHistory(): NetWorthSnapshot[];
642
+ addTransaction(transaction: Omit<Transaction, 'id'>): Transaction;
643
+ updateTransaction(id: TransactionId, updates: Partial<Transaction>): void;
644
+ deleteTransaction(id: TransactionId): void;
645
+ getAllTransactions(): Transaction[];
646
+ getTransactionsForAccount(accountId: AccountId): Transaction[];
647
+ getTransactionsForPeriod(startDate: Date, endDate: Date): Transaction[];
648
+ getTransactionsByCategory(categoryId: string): Transaction[];
649
+ /** Auto-categorize transaction based on description */
650
+ autoCategorize(description: string): string | undefined;
651
+ getAllCategories(): TransactionCategory[];
652
+ getTopLevelCategories(): TransactionCategory[];
653
+ getSubCategories(parentId: string): TransactionCategory[];
654
+ addCategory(category: TransactionCategory): void;
655
+ addBudget(budget: Omit<Budget, 'id' | 'spent'>): Budget;
656
+ updateBudget(id: BudgetId, updates: Partial<Budget>): void;
657
+ deleteBudget(id: BudgetId): void;
658
+ getAllBudgets(): Budget[];
659
+ getBudgetByCategory(categoryId: string): Budget | undefined;
660
+ resetBudgetSpending(): void;
661
+ calculateBudgetStatus(): {
662
+ total: number;
663
+ used: number;
664
+ remaining: number;
665
+ overBudget: Budget[];
666
+ };
667
+ addBill(bill: Omit<Bill, 'id'>): Bill;
668
+ updateBill(id: BillId, updates: Partial<Bill>): void;
669
+ deleteBill(id: BillId): void;
670
+ markBillPaid(id: BillId): void;
671
+ getAllBills(): Bill[];
672
+ getUpcomingBills(days?: number): Bill[];
673
+ calculateMonthlyBillTotal(): number;
674
+ addInvestment(investment: Omit<InvestmentHolding, 'id' | 'currentValue' | 'gain' | 'gainPercent'>): InvestmentHolding;
675
+ updateInvestmentPrice(id: InvestmentId, price: number): void;
676
+ deleteInvestment(id: InvestmentId): void;
677
+ getAllInvestments(): InvestmentHolding[];
678
+ getInvestmentsByAccount(accountId: AccountId): InvestmentHolding[];
679
+ calculateTotalInvestmentValue(): number;
680
+ calculateTotalGain(): number;
681
+ getPortfolioAllocation(): {
682
+ type: string;
683
+ value: number;
684
+ percentage: number;
685
+ }[];
686
+ getSpendingSummary(startDate: Date, endDate: Date): SpendingSummary[];
687
+ getMonthlyIncome(): number;
688
+ getMonthlyExpenses(): number;
689
+ getSavingsRate(): number;
690
+ private generateId;
691
+ clear(): void;
692
+ /**
693
+ * Export all data to JSON
694
+ */
695
+ exportData(): string;
696
+ }
697
+
698
+ /** Personal KPI */
699
+ export declare interface PersonalKPI {
700
+ id: KPIId;
701
+ name: string;
702
+ description?: string;
703
+ type: KPIType;
704
+ currentValue: number;
705
+ targetValue: number;
706
+ unit?: string;
707
+ trend: 'up' | 'down' | 'stable';
708
+ category: string;
709
+ color?: string;
710
+ history: {
711
+ date: Date;
712
+ value: number;
713
+ }[];
714
+ }
715
+
716
+ export declare interface PriorityMatrix {
717
+ doFirst: PriorityMatrixQuadrant;
718
+ schedule: PriorityMatrixQuadrant;
719
+ delegate: PriorityMatrixQuadrant;
720
+ eliminate: PriorityMatrixQuadrant;
721
+ }
722
+
723
+ export declare interface PriorityMatrixQuadrant {
724
+ name: string;
725
+ description: string;
726
+ tasks: Task[];
727
+ }
728
+
729
+ export declare function ProgressBar({ progress, status, showLabel, height, className, style, }: ProgressBarProps): default_2.ReactElement;
730
+
731
+ export declare interface ProgressBarProps {
732
+ progress: number;
733
+ status: TorrentStatus;
734
+ showLabel?: boolean;
735
+ height?: string;
736
+ className?: string;
737
+ style?: default_2.CSSProperties;
738
+ }
739
+
740
+ /** Project */
741
+ export declare interface Project {
742
+ id: ProjectId;
743
+ name: string;
744
+ description?: string;
745
+ color: string;
746
+ icon?: string;
747
+ isActive: boolean;
748
+ isFavorite: boolean;
749
+ order: number;
750
+ createdAt: Date;
751
+ }
752
+
753
+ export declare type ProjectId = string;
754
+
755
+ /** Recurrence pattern */
756
+ export declare type RecurrencePattern = 'daily' | 'weekdays' | 'weekly' | 'bi-weekly' | 'monthly' | 'yearly' | 'custom';
757
+
758
+ /** Recurrence settings */
759
+ export declare interface RecurrenceSettings {
760
+ pattern: RecurrencePattern;
761
+ interval: number;
762
+ endDate?: Date;
763
+ endAfterOccurrences?: number;
764
+ daysOfWeek?: number[];
765
+ dayOfMonth?: number;
766
+ }
767
+
768
+ /** Sleep entry */
769
+ export declare interface SleepEntry {
770
+ id: SleepId;
771
+ date: Date;
772
+ bedtime: Date;
773
+ wakeTime: Date;
774
+ duration: number;
775
+ quality: SleepQuality;
776
+ deepSleep?: number;
777
+ remSleep?: number;
778
+ lightSleep?: number;
779
+ awakenings?: number;
780
+ notes?: string;
781
+ factors?: string[];
782
+ }
783
+
784
+ export declare type SleepId = string;
785
+
786
+ /** Sleep quality */
787
+ export declare type SleepQuality = 'poor' | 'fair' | 'good' | 'excellent';
788
+
789
+ /** Spending summary */
790
+ export declare interface SpendingSummary {
791
+ categoryId: string;
792
+ categoryName: string;
793
+ amount: number;
794
+ percentage: number;
795
+ transactions: number;
796
+ trend: 'up' | 'down' | 'stable';
797
+ }
798
+
799
+ export declare function StatusBadge({ status, className, style }: StatusBadgeProps): default_2.ReactElement;
800
+
801
+ export declare interface StatusBadgeProps {
802
+ status: TorrentStatus;
803
+ className?: string;
804
+ style?: default_2.CSSProperties;
805
+ }
806
+
807
+ /** Tag */
808
+ export declare interface Tag {
809
+ id: TagId;
810
+ name: string;
811
+ color: string;
812
+ }
813
+
814
+ export declare type TagId = string;
815
+
816
+ /** Task */
817
+ export declare interface Task {
818
+ id: TaskId;
819
+ title: string;
820
+ description?: string;
821
+ status: TaskStatus;
822
+ priority: TaskPriority;
823
+ projectId?: ProjectId;
824
+ parentTaskId?: TaskId;
825
+ tags: TagId[];
826
+ dueDate?: Date;
827
+ scheduledDate?: Date;
828
+ completedDate?: Date;
829
+ estimatedMinutes?: number;
830
+ actualMinutes?: number;
831
+ recurrence?: RecurrenceSettings;
832
+ timeBlocks: TimeBlock[];
833
+ subtasks: Task[];
834
+ notes: string;
835
+ attachments: string[];
836
+ createdAt: Date;
837
+ updatedAt: Date;
838
+ }
839
+
840
+ /** Filter settings */
841
+ export declare interface TaskFilter {
842
+ status?: TaskStatus[];
843
+ priority?: TaskPriority[];
844
+ projectId?: ProjectId | null;
845
+ tags?: TagId[];
846
+ dueDateRange?: {
847
+ start?: Date;
848
+ end?: Date;
849
+ };
850
+ search?: string;
851
+ }
852
+
853
+ export declare type TaskId = string;
854
+
855
+ declare interface TaskManagerContextValue {
856
+ service: TaskManagerService;
857
+ refresh: () => void;
858
+ }
859
+
860
+ export declare class TaskManagerService {
861
+ private tasks;
862
+ private projects;
863
+ private tags;
864
+ private timeBlocks;
865
+ addTask(task: Omit<Task, 'id' | 'createdAt' | 'updatedAt' | 'subtasks'>): Task;
866
+ updateTask(id: TaskId, updates: Partial<Omit<Task, 'id' | 'createdAt'>>): void;
867
+ deleteTask(id: TaskId): void;
868
+ getTask(id: TaskId): Task | undefined;
869
+ getAllTasks(): Task[];
870
+ /** Quick add task from text with natural language parsing */
871
+ quickAddTask(text: string): Task;
872
+ private parseQuickAdd;
873
+ /** Complete a task */
874
+ completeTask(id: TaskId): void;
875
+ private createRecurringTask;
876
+ private calculateNextRecurrence;
877
+ filterTasks(filter: TaskFilter): Task[];
878
+ sortTasks(tasks: Task[], field?: TaskSortField, direction?: TaskSortDirection): Task[];
879
+ getInbox(): Task[];
880
+ getToday(): Task[];
881
+ getUpcoming(days?: number): Task[];
882
+ getOverdue(): Task[];
883
+ getPriorityMatrix(): PriorityMatrix;
884
+ addTimeBlock(block: Omit<TimeBlock, 'id'>): TimeBlock;
885
+ updateTimeBlock(id: string, updates: Partial<TimeBlock>): void;
886
+ deleteTimeBlock(id: string): void;
887
+ getTimeBlocksForDate(date: Date): TimeBlock[];
888
+ addProject(project: Omit<Project, 'id' | 'createdAt' | 'order'>): Project;
889
+ updateProject(id: ProjectId, updates: Partial<Project>): void;
890
+ deleteProject(id: ProjectId): void;
891
+ getAllProjects(): Project[];
892
+ getProjectTasks(projectId: ProjectId): Task[];
893
+ getProjectProgress(projectId: ProjectId): {
894
+ total: number;
895
+ completed: number;
896
+ percentage: number;
897
+ };
898
+ addTag(tag: Omit<Tag, 'id'>): Tag;
899
+ deleteTag(id: TagId): void;
900
+ getAllTags(): Tag[];
901
+ getStatistics(): {
902
+ total: number;
903
+ completed: number;
904
+ overdue: number;
905
+ dueToday: number;
906
+ inProgress: number;
907
+ completionRate: number;
908
+ };
909
+ private generateId;
910
+ clear(): void;
911
+ }
912
+
913
+ /** Task priority */
914
+ export declare type TaskPriority = 'urgent' | 'high' | 'medium' | 'low' | 'none';
915
+
916
+ export declare type TaskSortDirection = 'asc' | 'desc';
917
+
918
+ /** Sort options */
919
+ export declare type TaskSortField = 'dueDate' | 'priority' | 'createdAt' | 'title' | 'status';
920
+
921
+ /** Task status */
922
+ export declare type TaskStatus = 'inbox' | 'todo' | 'in-progress' | 'waiting' | 'done' | 'cancelled';
923
+
924
+ /** Time block */
925
+ export declare interface TimeBlock {
926
+ id: string;
927
+ taskId?: TaskId;
928
+ title: string;
929
+ start: Date;
930
+ end: Date;
931
+ color?: string;
932
+ isBlocked: boolean;
933
+ }
934
+
935
+ declare interface TorrentClientConfig {
936
+ /** Client identifier */
937
+ peerId?: PeerId;
938
+ /** Download directory */
939
+ downloadPath: string;
940
+ /** Maximum download speed (bytes/sec, 0 = unlimited) */
941
+ maxDownloadSpeed?: number;
942
+ /** Maximum upload speed (bytes/sec, 0 = unlimited) */
943
+ maxUploadSpeed?: number;
944
+ /** Maximum concurrent torrents */
945
+ maxConcurrentTorrents?: number;
946
+ /** Maximum peers per torrent */
947
+ maxPeersPerTorrent?: number;
948
+ /** Maximum global connections */
949
+ maxGlobalConnections?: number;
950
+ /** Enable DHT (Distributed Hash Table) */
951
+ enableDHT?: boolean;
952
+ /** Enable PEX (Peer Exchange) */
953
+ enablePEX?: boolean;
954
+ /** Enable µTP (Micro Transport Protocol) */
955
+ enableUTP?: boolean;
956
+ /** Enable LSD (Local Service Discovery) */
957
+ enableLSD?: boolean;
958
+ /** Listen port range */
959
+ portRange?: [number, number];
960
+ /** Enable encryption */
961
+ enableEncryption?: boolean;
962
+ /** Require encryption */
963
+ requireEncryption?: boolean;
964
+ /** Seed ratio limit (0 = unlimited) */
965
+ seedRatioLimit?: number;
966
+ /** Seed time limit (seconds, 0 = unlimited) */
967
+ seedTimeLimit?: number;
968
+ /** Enable web seeds */
969
+ enableWebSeeds?: boolean;
970
+ /** Temporary directory for incomplete files */
971
+ tempPath?: string;
972
+ /** Pre-allocate files */
973
+ preAllocateFiles?: boolean;
974
+ /** Verify on completion */
975
+ verifyOnComplete?: boolean;
976
+ }
977
+
978
+ export declare interface TorrentColumnConfig {
979
+ id: string;
980
+ label: string;
981
+ width?: string;
982
+ sortable?: boolean;
983
+ visible?: boolean;
984
+ }
985
+
986
+ export declare function TorrentDetails({ infoHash, className, style, }: TorrentDetailsProps): default_2.ReactElement | null;
987
+
988
+ export declare interface TorrentDetailsProps {
989
+ infoHash: InfoHash;
990
+ className?: string;
991
+ style?: default_2.CSSProperties;
992
+ }
993
+
994
+ /** File within a torrent */
995
+ declare interface TorrentFile {
996
+ path: string;
997
+ name: string;
998
+ size: number;
999
+ offset: number;
1000
+ priority: 'skip' | 'low' | 'normal' | 'high';
1001
+ progress: number;
1002
+ }
1003
+
1004
+ export declare type TorrentFilter = 'all' | 'downloading' | 'seeding' | 'paused' | 'checking' | 'error' | 'completed' | 'active';
1005
+
1006
+ /** Torrent instance */
1007
+ declare interface TorrentInstance {
1008
+ metadata: TorrentMetadata;
1009
+ status: TorrentStatus;
1010
+ stats: TorrentStats;
1011
+ peers: PeerState[];
1012
+ trackers: TrackerState[];
1013
+ files: TorrentFile[];
1014
+ path: string;
1015
+ addedAt: Date;
1016
+ completedAt?: Date;
1017
+ error?: string;
1018
+ }
1019
+
1020
+ export declare function TorrentList({ onTorrentSelect, onTorrentDoubleClick, className, style, }: TorrentListProps): default_2.ReactElement;
1021
+
1022
+ export declare interface TorrentListProps {
1023
+ onTorrentSelect?: (hash: InfoHash) => void;
1024
+ onTorrentDoubleClick?: (hash: InfoHash) => void;
1025
+ className?: string;
1026
+ style?: default_2.CSSProperties;
1027
+ }
1028
+
1029
+ /** Torrent file/magnet metadata */
1030
+ declare interface TorrentMetadata {
1031
+ name: string;
1032
+ infoHash: InfoHash;
1033
+ size: number;
1034
+ pieceLength: number;
1035
+ pieceCount: number;
1036
+ files: TorrentFile[];
1037
+ comment?: string;
1038
+ createdBy?: string;
1039
+ createdAt?: Date;
1040
+ isPrivate: boolean;
1041
+ trackers: string[][];
1042
+ magnetURI: string;
1043
+ }
1044
+
1045
+ /** Torrent statistics */
1046
+ declare interface TorrentStats {
1047
+ progress: number;
1048
+ downloaded: number;
1049
+ uploaded: number;
1050
+ downloadSpeed: number;
1051
+ uploadSpeed: number;
1052
+ peers: number;
1053
+ seeds: number;
1054
+ leechers: number;
1055
+ ratio: number;
1056
+ eta?: number;
1057
+ availability: number;
1058
+ piecesComplete: number;
1059
+ piecesTotal: number;
1060
+ wastedBytes: number;
1061
+ hashFailures: number;
1062
+ }
1063
+
1064
+ /** Torrent status */
1065
+ declare type TorrentStatus = 'checking' | 'downloading' | 'seeding' | 'paused' | 'queued' | 'error';
1066
+
1067
+ export declare interface TorrentUIConfig {
1068
+ theme?: Partial<TorrentUITheme>;
1069
+ locale?: string;
1070
+ dateFormat?: string;
1071
+ speedUnit?: 'auto' | 'B' | 'KB' | 'MB';
1072
+ showCategories?: boolean;
1073
+ showLabels?: boolean;
1074
+ columns?: TorrentColumnConfig[];
1075
+ refreshInterval?: number;
1076
+ confirmBeforeDelete?: boolean;
1077
+ defaultSortBy?: keyof TorrentInstance | keyof TorrentStats;
1078
+ defaultSortOrder?: 'asc' | 'desc';
1079
+ }
1080
+
1081
+ declare interface TorrentUIContextValue {
1082
+ client: NiceTorrentClient | null;
1083
+ config: TorrentUIConfig;
1084
+ theme: TorrentUITheme;
1085
+ torrents: TorrentInstance[];
1086
+ selectedTorrent: InfoHash | null;
1087
+ setSelectedTorrent: (hash: InfoHash | null) => void;
1088
+ filter: TorrentFilter;
1089
+ setFilter: (filter: TorrentFilter) => void;
1090
+ searchQuery: string;
1091
+ setSearchQuery: (query: string) => void;
1092
+ refresh: () => void;
1093
+ }
1094
+
1095
+ export declare function TorrentUIProvider({ client, config, children, }: TorrentUIProviderProps): default_2.ReactElement;
1096
+
1097
+ export declare interface TorrentUIProviderProps {
1098
+ client: NiceTorrentClient;
1099
+ config?: TorrentUIConfig;
1100
+ children: default_2.ReactNode;
1101
+ }
1102
+
1103
+ export declare interface TorrentUITheme {
1104
+ colors: {
1105
+ background: string;
1106
+ surface: string;
1107
+ primary: string;
1108
+ secondary: string;
1109
+ success: string;
1110
+ warning: string;
1111
+ error: string;
1112
+ text: string;
1113
+ textSecondary: string;
1114
+ border: string;
1115
+ };
1116
+ spacing: {
1117
+ xs: string;
1118
+ sm: string;
1119
+ md: string;
1120
+ lg: string;
1121
+ xl: string;
1122
+ };
1123
+ borderRadius: string;
1124
+ fontFamily: string;
1125
+ }
1126
+
1127
+ /** Tracker state */
1128
+ declare interface TrackerState {
1129
+ url: string;
1130
+ status: 'idle' | 'working' | 'updating' | 'error';
1131
+ peers: number;
1132
+ seeds: number;
1133
+ leechers: number;
1134
+ lastAnnounce?: Date;
1135
+ nextAnnounce?: Date;
1136
+ errorMessage?: string;
1137
+ }
1138
+
1139
+ /** Transaction */
1140
+ export declare interface Transaction {
1141
+ id: TransactionId;
1142
+ accountId: AccountId;
1143
+ date: Date;
1144
+ type: TransactionType;
1145
+ amount: number;
1146
+ description: string;
1147
+ categoryId?: string;
1148
+ merchant?: string;
1149
+ notes?: string;
1150
+ tags: string[];
1151
+ isRecurring: boolean;
1152
+ transferToAccountId?: AccountId;
1153
+ cleared: boolean;
1154
+ }
1155
+
1156
+ /** Transaction category */
1157
+ export declare interface TransactionCategory {
1158
+ id: string;
1159
+ name: string;
1160
+ icon: string;
1161
+ color: string;
1162
+ parent?: string;
1163
+ budget?: number;
1164
+ }
1165
+
1166
+ export declare type TransactionId = string;
1167
+
1168
+ /** Transaction types */
1169
+ export declare type TransactionType = 'income' | 'expense' | 'transfer';
1170
+
1171
+ export declare function useHealth(): HealthContextValue;
1172
+
1173
+ export declare function useLifeDashboard(): LifeDashboardContextValue;
1174
+
1175
+ export declare function usePersonalFinance(): FinanceContextValue;
1176
+
1177
+ export declare function useTaskManager(): TaskManagerContextValue;
1178
+
1179
+ export declare function useTorrentUI(): TorrentUIContextValue;
1180
+
1181
+ /** Vital signs */
1182
+ export declare interface VitalSigns {
1183
+ date: Date;
1184
+ weight?: number;
1185
+ weightUnit?: 'kg' | 'lbs';
1186
+ bloodPressureSystolic?: number;
1187
+ bloodPressureDiastolic?: number;
1188
+ heartRate?: number;
1189
+ temperature?: number;
1190
+ temperatureUnit?: 'C' | 'F';
1191
+ bloodSugar?: number;
1192
+ oxygenSaturation?: number;
1193
+ }
1194
+
1195
+ /** Workout session */
1196
+ export declare interface Workout {
1197
+ id: WorkoutId;
1198
+ date: Date;
1199
+ name: string;
1200
+ type: ExerciseType;
1201
+ duration: number;
1202
+ exercises: Exercise[];
1203
+ caloriesBurned: number;
1204
+ heartRateAvg?: number;
1205
+ heartRateMax?: number;
1206
+ notes?: string;
1207
+ mood?: 1 | 2 | 3 | 4 | 5;
1208
+ intensity?: 'low' | 'moderate' | 'high';
1209
+ }
1210
+
1211
+ export declare type WorkoutId = string;
1212
+
1213
+ export { }