@tomaszjarosz/react-visualizers 0.2.11 → 0.2.13
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.
- package/dist/index.cjs +11096 -4225
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +192 -0
- package/dist/index.js +11096 -4225
- package/dist/index.js.map +1 -1
- package/dist/react-visualizers.css +3190 -0
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,36 @@ declare interface BlockingQueueVisualizerProps {
|
|
|
46
46
|
className?: string;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
export declare const BloomFilterInterviewVisualizer: default_2.NamedExoticComponent<BloomFilterInterviewVisualizerProps>;
|
|
50
|
+
|
|
51
|
+
declare interface BloomFilterInterviewVisualizerProps {
|
|
52
|
+
showControls?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare const BloomFilterVisualizer: default_2.NamedExoticComponent<BloomFilterVisualizerProps>;
|
|
57
|
+
|
|
58
|
+
declare interface BloomFilterVisualizerProps {
|
|
59
|
+
showControls?: boolean;
|
|
60
|
+
showCode?: boolean;
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export declare const BTreeInterviewVisualizer: default_2.NamedExoticComponent<BTreeInterviewVisualizerProps>;
|
|
65
|
+
|
|
66
|
+
declare interface BTreeInterviewVisualizerProps {
|
|
67
|
+
showControls?: boolean;
|
|
68
|
+
className?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare const BTreeVisualizer: default_2.NamedExoticComponent<BTreeVisualizerProps>;
|
|
72
|
+
|
|
73
|
+
declare interface BTreeVisualizerProps {
|
|
74
|
+
showControls?: boolean;
|
|
75
|
+
showCode?: boolean;
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
49
79
|
export declare const CodePanel: default_2.FC<CodePanelProps>;
|
|
50
80
|
|
|
51
81
|
declare interface CodePanelProps {
|
|
@@ -62,6 +92,21 @@ declare interface ConcurrentHashMapVisualizerProps {
|
|
|
62
92
|
className?: string;
|
|
63
93
|
}
|
|
64
94
|
|
|
95
|
+
export declare const ConsistentHashingInterviewVisualizer: default_2.NamedExoticComponent<ConsistentHashingInterviewVisualizerProps>;
|
|
96
|
+
|
|
97
|
+
declare interface ConsistentHashingInterviewVisualizerProps {
|
|
98
|
+
showControls?: boolean;
|
|
99
|
+
className?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare const ConsistentHashingVisualizer: default_2.NamedExoticComponent<ConsistentHashingVisualizerProps>;
|
|
103
|
+
|
|
104
|
+
declare interface ConsistentHashingVisualizerProps {
|
|
105
|
+
showControls?: boolean;
|
|
106
|
+
showCode?: boolean;
|
|
107
|
+
className?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
65
110
|
export declare const ControlPanel: default_2.FC<ControlPanelProps>;
|
|
66
111
|
|
|
67
112
|
export declare interface ControlPanelProps {
|
|
@@ -89,6 +134,13 @@ declare interface CopyOnWriteVisualizerProps {
|
|
|
89
134
|
className?: string;
|
|
90
135
|
}
|
|
91
136
|
|
|
137
|
+
export declare const DijkstraInterviewVisualizer: default_2.NamedExoticComponent<DijkstraInterviewVisualizerProps>;
|
|
138
|
+
|
|
139
|
+
declare interface DijkstraInterviewVisualizerProps {
|
|
140
|
+
showControls?: boolean;
|
|
141
|
+
className?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
92
144
|
export declare const DijkstraVisualizer: default_2.NamedExoticComponent<DijkstraVisualizerProps>;
|
|
93
145
|
|
|
94
146
|
declare interface DijkstraVisualizerProps {
|
|
@@ -97,6 +149,13 @@ declare interface DijkstraVisualizerProps {
|
|
|
97
149
|
className?: string;
|
|
98
150
|
}
|
|
99
151
|
|
|
152
|
+
export declare const DPInterviewVisualizer: default_2.NamedExoticComponent<DPInterviewVisualizerProps>;
|
|
153
|
+
|
|
154
|
+
declare interface DPInterviewVisualizerProps {
|
|
155
|
+
showControls?: boolean;
|
|
156
|
+
className?: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
100
159
|
export declare const DPVisualizer: default_2.NamedExoticComponent<DPVisualizerProps>;
|
|
101
160
|
|
|
102
161
|
declare interface DPVisualizerProps {
|
|
@@ -121,6 +180,13 @@ declare interface GCVisualizerProps {
|
|
|
121
180
|
className?: string;
|
|
122
181
|
}
|
|
123
182
|
|
|
183
|
+
export declare const GraphInterviewVisualizer: default_2.NamedExoticComponent<GraphInterviewVisualizerProps>;
|
|
184
|
+
|
|
185
|
+
declare interface GraphInterviewVisualizerProps {
|
|
186
|
+
showControls?: boolean;
|
|
187
|
+
className?: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
124
190
|
export declare const GraphVisualizer: default_2.NamedExoticComponent<GraphVisualizerProps>;
|
|
125
191
|
|
|
126
192
|
declare interface GraphVisualizerProps {
|
|
@@ -131,6 +197,13 @@ declare interface GraphVisualizerProps {
|
|
|
131
197
|
className?: string;
|
|
132
198
|
}
|
|
133
199
|
|
|
200
|
+
export declare const HashMapInterviewVisualizer: default_2.NamedExoticComponent<HashMapInterviewVisualizerProps>;
|
|
201
|
+
|
|
202
|
+
declare interface HashMapInterviewVisualizerProps {
|
|
203
|
+
showControls?: boolean;
|
|
204
|
+
className?: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
134
207
|
export declare const HashMapVisualizer: default_2.NamedExoticComponent<HashMapVisualizerProps>;
|
|
135
208
|
|
|
136
209
|
declare interface HashMapVisualizerProps {
|
|
@@ -157,6 +230,59 @@ declare interface ImmutableCollectionsVisualizerProps {
|
|
|
157
230
|
className?: string;
|
|
158
231
|
}
|
|
159
232
|
|
|
233
|
+
export declare const InterviewModePanel: default_2.FC<InterviewModePanelProps>;
|
|
234
|
+
|
|
235
|
+
declare interface InterviewModePanelProps {
|
|
236
|
+
currentQuestion: InterviewQuestion | null;
|
|
237
|
+
currentQuestionIndex: number;
|
|
238
|
+
totalQuestions: number;
|
|
239
|
+
selectedAnswer: number | null;
|
|
240
|
+
showExplanation: boolean;
|
|
241
|
+
showHint: boolean;
|
|
242
|
+
isAnswered: boolean;
|
|
243
|
+
isComplete: boolean;
|
|
244
|
+
score: {
|
|
245
|
+
correct: number;
|
|
246
|
+
total: number;
|
|
247
|
+
percentage: number;
|
|
248
|
+
};
|
|
249
|
+
onSelectAnswer: (index: number) => void;
|
|
250
|
+
onNextQuestion: () => void;
|
|
251
|
+
onPreviousQuestion: () => void;
|
|
252
|
+
onUseHint: () => void;
|
|
253
|
+
onRestart: () => void;
|
|
254
|
+
accentColor?: 'indigo' | 'green' | 'purple' | 'orange' | 'blue' | 'cyan';
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export declare interface InterviewQuestion {
|
|
258
|
+
id: string;
|
|
259
|
+
question: string;
|
|
260
|
+
options: string[];
|
|
261
|
+
correctAnswer: number;
|
|
262
|
+
explanation: string;
|
|
263
|
+
hint?: string;
|
|
264
|
+
difficulty: 'easy' | 'medium' | 'hard';
|
|
265
|
+
topic: string;
|
|
266
|
+
relatedStep?: number;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare interface InterviewResult {
|
|
270
|
+
questionId: string;
|
|
271
|
+
selectedAnswer: number | null;
|
|
272
|
+
isCorrect: boolean;
|
|
273
|
+
timeSpent: number;
|
|
274
|
+
usedHint: boolean;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export declare interface InterviewSession {
|
|
278
|
+
questions: InterviewQuestion[];
|
|
279
|
+
results: InterviewResult[];
|
|
280
|
+
currentQuestionIndex: number;
|
|
281
|
+
isComplete: boolean;
|
|
282
|
+
startTime: number;
|
|
283
|
+
totalTime: number;
|
|
284
|
+
}
|
|
285
|
+
|
|
160
286
|
export declare const Legend: default_2.FC<LegendProps>;
|
|
161
287
|
|
|
162
288
|
export declare interface LegendItem {
|
|
@@ -186,6 +312,13 @@ declare interface LinkedListVisualizerProps {
|
|
|
186
312
|
className?: string;
|
|
187
313
|
}
|
|
188
314
|
|
|
315
|
+
export declare const ListComparisonVisualizer: default_2.NamedExoticComponent<ListComparisonVisualizerProps>;
|
|
316
|
+
|
|
317
|
+
declare interface ListComparisonVisualizerProps {
|
|
318
|
+
showControls?: boolean;
|
|
319
|
+
className?: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
189
322
|
export declare const PriorityQueueVisualizer: default_2.NamedExoticComponent<PriorityQueueVisualizerProps>;
|
|
190
323
|
|
|
191
324
|
declare interface PriorityQueueVisualizerProps {
|
|
@@ -194,6 +327,21 @@ declare interface PriorityQueueVisualizerProps {
|
|
|
194
327
|
className?: string;
|
|
195
328
|
}
|
|
196
329
|
|
|
330
|
+
export declare const RaftInterviewVisualizer: default_2.NamedExoticComponent<RaftInterviewVisualizerProps>;
|
|
331
|
+
|
|
332
|
+
declare interface RaftInterviewVisualizerProps {
|
|
333
|
+
showControls?: boolean;
|
|
334
|
+
className?: string;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export declare const RaftVisualizer: default_2.NamedExoticComponent<RaftVisualizerProps>;
|
|
338
|
+
|
|
339
|
+
declare interface RaftVisualizerProps {
|
|
340
|
+
showControls?: boolean;
|
|
341
|
+
showCode?: boolean;
|
|
342
|
+
className?: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
197
345
|
/**
|
|
198
346
|
* Shared constants for sorting algorithm visualizers.
|
|
199
347
|
* Centralizes algorithm metadata to avoid duplication.
|
|
@@ -208,6 +356,13 @@ declare interface SortingComparisonVisualizerProps {
|
|
|
208
356
|
className?: string;
|
|
209
357
|
}
|
|
210
358
|
|
|
359
|
+
export declare const SortingInterviewVisualizer: default_2.NamedExoticComponent<SortingInterviewVisualizerProps>;
|
|
360
|
+
|
|
361
|
+
declare interface SortingInterviewVisualizerProps {
|
|
362
|
+
showControls?: boolean;
|
|
363
|
+
className?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
211
366
|
export declare const SortingVisualizer: default_2.NamedExoticComponent<SortingVisualizerProps>;
|
|
212
367
|
|
|
213
368
|
declare interface SortingVisualizerProps {
|
|
@@ -257,6 +412,13 @@ export declare interface StepHistoryProps {
|
|
|
257
412
|
|
|
258
413
|
declare type TraversalAlgorithm = 'dfs' | 'bfs';
|
|
259
414
|
|
|
415
|
+
export declare const TreeSetInterviewVisualizer: default_2.NamedExoticComponent<TreeSetInterviewVisualizerProps>;
|
|
416
|
+
|
|
417
|
+
declare interface TreeSetInterviewVisualizerProps {
|
|
418
|
+
showControls?: boolean;
|
|
419
|
+
className?: string;
|
|
420
|
+
}
|
|
421
|
+
|
|
260
422
|
export declare const TreeSetVisualizer: default_2.NamedExoticComponent<TreeSetVisualizerProps>;
|
|
261
423
|
|
|
262
424
|
declare interface TreeSetVisualizerProps {
|
|
@@ -265,6 +427,36 @@ declare interface TreeSetVisualizerProps {
|
|
|
265
427
|
className?: string;
|
|
266
428
|
}
|
|
267
429
|
|
|
430
|
+
export declare function useInterviewMode(options: UseInterviewModeOptions): UseInterviewModeReturn;
|
|
431
|
+
|
|
432
|
+
export declare interface UseInterviewModeOptions {
|
|
433
|
+
questions: InterviewQuestion[];
|
|
434
|
+
timeLimit?: number;
|
|
435
|
+
shuffleQuestions?: boolean;
|
|
436
|
+
onComplete?: (session: InterviewSession) => void;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export declare interface UseInterviewModeReturn {
|
|
440
|
+
session: InterviewSession;
|
|
441
|
+
currentQuestion: InterviewQuestion | null;
|
|
442
|
+
isComplete: boolean;
|
|
443
|
+
score: {
|
|
444
|
+
correct: number;
|
|
445
|
+
total: number;
|
|
446
|
+
percentage: number;
|
|
447
|
+
};
|
|
448
|
+
timeRemaining: number | null;
|
|
449
|
+
selectAnswer: (answerIndex: number) => void;
|
|
450
|
+
nextQuestion: () => void;
|
|
451
|
+
previousQuestion: () => void;
|
|
452
|
+
useHint: () => void;
|
|
453
|
+
restartSession: () => void;
|
|
454
|
+
selectedAnswer: number | null;
|
|
455
|
+
showExplanation: boolean;
|
|
456
|
+
showHint: boolean;
|
|
457
|
+
isAnswered: boolean;
|
|
458
|
+
}
|
|
459
|
+
|
|
268
460
|
export declare function useUrlState(options?: UseUrlStateOptions): UseUrlStateReturn;
|
|
269
461
|
|
|
270
462
|
export declare interface UseUrlStateOptions {
|