@fgv/ts-sudoku-ui 5.1.0-2 → 5.1.0-21
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/eslint.config.js +18 -0
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +22 -21
- package/.test-failures-catalog.md +0 -470
- package/CHANGELOG.md +0 -11
- package/CSS_MODULES_MIGRATION_SUMMARY.md +0 -189
- package/dist/ts-sudoku-ui.d.ts +0 -668
- package/etc/ts-sudoku-ui.api.md +0 -481
- package/lib/test/fixtures/killerSudokuPuzzles.d.ts +0 -36
- package/lib/test/fixtures/killerSudokuPuzzles.d.ts.map +0 -1
- package/lib/test/fixtures/killerSudokuPuzzles.js +0 -57
- package/lib/test/fixtures/killerSudokuPuzzles.js.map +0 -1
- package/lib/test/unit/components/SudokuGridEntry.testHelpers.d.ts +0 -22
- package/lib/test/unit/components/SudokuGridEntry.testHelpers.d.ts.map +0 -1
- package/lib/test/unit/components/SudokuGridEntry.testHelpers.js +0 -116
- package/lib/test/unit/components/SudokuGridEntry.testHelpers.js.map +0 -1
- package/lib-commonjs/components/CageOverlay.js +0 -138
- package/lib-commonjs/components/CageOverlay.js.map +0 -1
- package/lib-commonjs/components/CageSumIndicator.js +0 -71
- package/lib-commonjs/components/CageSumIndicator.js.map +0 -1
- package/lib-commonjs/components/CombinationCard.js +0 -68
- package/lib-commonjs/components/CombinationCard.js.map +0 -1
- package/lib-commonjs/components/CombinationGrid.js +0 -56
- package/lib-commonjs/components/CombinationGrid.js.map +0 -1
- package/lib-commonjs/components/CompactControlRibbon.js +0 -146
- package/lib-commonjs/components/CompactControlRibbon.js.map +0 -1
- package/lib-commonjs/components/DualKeypad.js +0 -142
- package/lib-commonjs/components/DualKeypad.js.map +0 -1
- package/lib-commonjs/components/KillerCombinationsExplorer.js +0 -74
- package/lib-commonjs/components/KillerCombinationsExplorer.js.map +0 -1
- package/lib-commonjs/components/KillerCombinationsModal.js +0 -140
- package/lib-commonjs/components/KillerCombinationsModal.js.map +0 -1
- package/lib-commonjs/components/KillerCombinationsPanel.js +0 -84
- package/lib-commonjs/components/KillerCombinationsPanel.js.map +0 -1
- package/lib-commonjs/components/NumberKeypad.js +0 -186
- package/lib-commonjs/components/NumberKeypad.js.map +0 -1
- package/lib-commonjs/components/SudokuCell.js +0 -245
- package/lib-commonjs/components/SudokuCell.js.map +0 -1
- package/lib-commonjs/components/SudokuControls.js +0 -145
- package/lib-commonjs/components/SudokuControls.js.map +0 -1
- package/lib-commonjs/components/SudokuGrid.js +0 -182
- package/lib-commonjs/components/SudokuGrid.js.map +0 -1
- package/lib-commonjs/components/SudokuGridEntry.js +0 -378
- package/lib-commonjs/components/SudokuGridEntry.js.map +0 -1
- package/lib-commonjs/components/ValidationDisplay.js +0 -100
- package/lib-commonjs/components/ValidationDisplay.js.map +0 -1
- package/lib-commonjs/contexts/DiagnosticLoggerContext.js +0 -104
- package/lib-commonjs/contexts/DiagnosticLoggerContext.js.map +0 -1
- package/lib-commonjs/contexts/index.js +0 -32
- package/lib-commonjs/contexts/index.js.map +0 -1
- package/lib-commonjs/hooks/useCombinationElimination.js +0 -126
- package/lib-commonjs/hooks/useCombinationElimination.js.map +0 -1
- package/lib-commonjs/hooks/useKeyboardShortcut.js +0 -58
- package/lib-commonjs/hooks/useKeyboardShortcut.js.map +0 -1
- package/lib-commonjs/hooks/useKillerCombinations.js +0 -68
- package/lib-commonjs/hooks/useKillerCombinations.js.map +0 -1
- package/lib-commonjs/hooks/useLongPress.js +0 -72
- package/lib-commonjs/hooks/useLongPress.js.map +0 -1
- package/lib-commonjs/hooks/usePuzzleSession.js +0 -401
- package/lib-commonjs/hooks/usePuzzleSession.js.map +0 -1
- package/lib-commonjs/hooks/useResponsiveLayout.js +0 -142
- package/lib-commonjs/hooks/useResponsiveLayout.js.map +0 -1
- package/lib-commonjs/index.browser.js +0 -29
- package/lib-commonjs/index.browser.js.map +0 -1
- package/lib-commonjs/index.js +0 -73
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/test/fixtures/killerSudokuPuzzles.js +0 -60
- package/lib-commonjs/test/fixtures/killerSudokuPuzzles.js.map +0 -1
- package/lib-commonjs/test/unit/components/SudokuGridEntry.testHelpers.js +0 -125
- package/lib-commonjs/test/unit/components/SudokuGridEntry.testHelpers.js.map +0 -1
- package/lib-commonjs/types/index.js +0 -26
- package/lib-commonjs/types/index.js.map +0 -1
- package/lib-commonjs/utils/CageLookupManager.js +0 -287
- package/lib-commonjs/utils/CageLookupManager.js.map +0 -1
- package/lib-commonjs/utils/CagePatternManager.js +0 -143
- package/lib-commonjs/utils/CagePatternManager.js.map +0 -1
- package/lib-commonjs/utils/puzzleDefinitionHelper.js +0 -103
- package/lib-commonjs/utils/puzzleDefinitionHelper.js.map +0 -1
package/dist/ts-sudoku-ui.d.ts
DELETED
|
@@ -1,668 +0,0 @@
|
|
|
1
|
-
import { CellId } from '@fgv/ts-sudoku-lib';
|
|
2
|
-
import { ICage } from '@fgv/ts-sudoku-lib';
|
|
3
|
-
import { ICellContents } from '@fgv/ts-sudoku-lib';
|
|
4
|
-
import { IPuzzleDefinition } from '@fgv/ts-sudoku-lib';
|
|
5
|
-
import { Logging } from '@fgv/ts-utils';
|
|
6
|
-
import { NavigationDirection } from '@fgv/ts-sudoku-lib';
|
|
7
|
-
import { NavigationWrap } from '@fgv/ts-sudoku-lib';
|
|
8
|
-
import { PuzzleSession } from '@fgv/ts-sudoku-lib';
|
|
9
|
-
import { default as React_2 } from 'react';
|
|
10
|
-
import { ReactNode } from 'react';
|
|
11
|
-
import { Result } from '@fgv/ts-utils';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Component for rendering cage boundaries and sum indicators in Killer Sudoku
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export declare const CageOverlay: React_2.FC<ICageOverlayProps>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Component for displaying the target sum of a cage in Killer Sudoku
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export declare const CageSumIndicator: React_2.FC<ICageSumIndicatorProps>;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Individual combination card component with toggle functionality
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export declare const CombinationCard: React_2.NamedExoticComponent<ICombinationCardProps>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Grid layout component for displaying combination cards
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
export declare const CombinationGrid: React_2.FC<ICombinationGridProps>;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Compact control ribbon with icon-only badges for actions and status indicator
|
|
39
|
-
* @public
|
|
40
|
-
*/
|
|
41
|
-
export declare const CompactControlRibbon: React_2.FC<ICompactControlRibbonProps>;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Default diagnostic logger (no-op for production).
|
|
45
|
-
* @public
|
|
46
|
-
*/
|
|
47
|
-
export declare const DefaultDiagnosticLogger: Logging.LogReporter<unknown>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Device type detection result
|
|
51
|
-
* @public
|
|
52
|
-
*/
|
|
53
|
-
export declare type DeviceType = 'mobile' | 'tablet' | 'desktop';
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* React context for diagnostic logging.
|
|
57
|
-
* Provides access to diagnostic logger throughout the component tree.
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
export declare const DiagnosticLoggerContext: React_2.Context<Logging.LogReporter<unknown>>;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Provider component that makes diagnostic logger available to all child components.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```tsx
|
|
67
|
-
* // Basic usage with default no-op logger
|
|
68
|
-
* <DiagnosticLoggerProvider>
|
|
69
|
-
* <SudokuGrid />
|
|
70
|
-
* </DiagnosticLoggerProvider>
|
|
71
|
-
*
|
|
72
|
-
* // Console logging for development
|
|
73
|
-
* const consoleLogger = new Logging.LogReporter({
|
|
74
|
-
* logger: new Logging.ConsoleLogger('info')
|
|
75
|
-
* });
|
|
76
|
-
* <DiagnosticLoggerProvider logger={consoleLogger}>
|
|
77
|
-
* <SudokuGrid />
|
|
78
|
-
* </DiagnosticLoggerProvider>
|
|
79
|
-
*
|
|
80
|
-
* // In-memory logger for tests
|
|
81
|
-
* const testLogger = new Logging.LogReporter({
|
|
82
|
-
* logger: new Logging.InMemoryLogger('detail')
|
|
83
|
-
* });
|
|
84
|
-
* <DiagnosticLoggerProvider logger={testLogger}>
|
|
85
|
-
* <SudokuGrid />
|
|
86
|
-
* </DiagnosticLoggerProvider>
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @param props - Provider configuration
|
|
90
|
-
* @returns JSX provider element
|
|
91
|
-
* @public
|
|
92
|
-
*/
|
|
93
|
-
export declare const DiagnosticLoggerProvider: React_2.FC<IDiagnosticLoggerProviderProps>;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Dual keypad component with responsive layout for mobile and desktop sudoku input
|
|
97
|
-
* @public
|
|
98
|
-
*/
|
|
99
|
-
export declare const DualKeypad: React_2.FC<IDualKeypadProps>;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Display information for a cage in Killer Sudoku
|
|
103
|
-
* @public
|
|
104
|
-
*/
|
|
105
|
-
export declare interface ICageDisplayInfo {
|
|
106
|
-
readonly cage: ICage;
|
|
107
|
-
readonly isHighlighted: boolean;
|
|
108
|
-
readonly currentSum?: number;
|
|
109
|
-
readonly isComplete: boolean;
|
|
110
|
-
readonly isValid: boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Props for the CageOverlay component
|
|
115
|
-
* @public
|
|
116
|
-
*/
|
|
117
|
-
export declare interface ICageOverlayProps {
|
|
118
|
-
readonly cages: ICageDisplayInfo[];
|
|
119
|
-
readonly gridSize: {
|
|
120
|
-
width: number;
|
|
121
|
-
height: number;
|
|
122
|
-
};
|
|
123
|
-
readonly cellSize: number;
|
|
124
|
-
readonly numRows?: number;
|
|
125
|
-
readonly numColumns?: number;
|
|
126
|
-
readonly className?: string;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Props for the CageSumIndicator component
|
|
131
|
-
* @public
|
|
132
|
-
*/
|
|
133
|
-
export declare interface ICageSumIndicatorProps {
|
|
134
|
-
readonly cage: ICage;
|
|
135
|
-
readonly currentSum?: number;
|
|
136
|
-
readonly isComplete: boolean;
|
|
137
|
-
readonly isValid: boolean;
|
|
138
|
-
readonly position: {
|
|
139
|
-
top: number;
|
|
140
|
-
left: number;
|
|
141
|
-
};
|
|
142
|
-
readonly className?: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Display information for a single cell
|
|
147
|
-
* @public
|
|
148
|
-
*/
|
|
149
|
-
export declare interface ICellDisplayInfo {
|
|
150
|
-
readonly id: CellId;
|
|
151
|
-
readonly row: number;
|
|
152
|
-
readonly column: number;
|
|
153
|
-
readonly contents: ICellContents;
|
|
154
|
-
readonly isImmutable: boolean;
|
|
155
|
-
readonly hasValidationError: boolean;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Props for the CombinationCard component
|
|
160
|
-
* @public
|
|
161
|
-
*/
|
|
162
|
-
export declare interface ICombinationCardProps {
|
|
163
|
-
readonly combination: ICombinationDisplayInfo;
|
|
164
|
-
readonly onToggle: (signature: string) => void;
|
|
165
|
-
readonly className?: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Display information for a single combination
|
|
170
|
-
* @public
|
|
171
|
-
*/
|
|
172
|
-
export declare interface ICombinationDisplayInfo {
|
|
173
|
-
readonly combination: number[];
|
|
174
|
-
readonly signature: string;
|
|
175
|
-
readonly isEliminated: boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Props for the CombinationGrid component
|
|
180
|
-
* @public
|
|
181
|
-
*/
|
|
182
|
-
export declare interface ICombinationGridProps {
|
|
183
|
-
readonly combinations: ICombinationDisplayInfo[];
|
|
184
|
-
readonly onToggle: (signature: string) => void;
|
|
185
|
-
readonly mode: IKillerCombinationsMode;
|
|
186
|
-
readonly className?: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Props for the CompactControlRibbon component
|
|
191
|
-
* @public
|
|
192
|
-
*/
|
|
193
|
-
export declare interface ICompactControlRibbonProps {
|
|
194
|
-
/** Whether undo is available */
|
|
195
|
-
readonly canUndo: boolean;
|
|
196
|
-
/** Whether redo is available */
|
|
197
|
-
readonly canRedo: boolean;
|
|
198
|
-
/** Whether reset is available */
|
|
199
|
-
readonly canReset: boolean;
|
|
200
|
-
/** Whether the puzzle is valid */
|
|
201
|
-
readonly isValid: boolean;
|
|
202
|
-
/** Whether the puzzle is solved */
|
|
203
|
-
readonly isSolved: boolean;
|
|
204
|
-
/** Validation errors for error count display */
|
|
205
|
-
readonly validationErrors: ReadonlyArray<{
|
|
206
|
-
readonly type: string;
|
|
207
|
-
readonly cellId: string;
|
|
208
|
-
readonly message: string;
|
|
209
|
-
}>;
|
|
210
|
-
/** Callback for undo action */
|
|
211
|
-
readonly onUndo: () => void;
|
|
212
|
-
/** Callback for redo action */
|
|
213
|
-
readonly onRedo: () => void;
|
|
214
|
-
/** Callback for reset action */
|
|
215
|
-
readonly onReset: () => void;
|
|
216
|
-
/** Callback for export action */
|
|
217
|
-
readonly onExport: () => void;
|
|
218
|
-
/** Whether to show combinations button (for killer sudoku) */
|
|
219
|
-
readonly showCombinations?: boolean;
|
|
220
|
-
/** Whether combinations button should be enabled */
|
|
221
|
-
readonly canShowCombinations?: boolean;
|
|
222
|
-
/** Callback for combinations action */
|
|
223
|
-
readonly onCombinations?: () => void;
|
|
224
|
-
/** Additional CSS class name */
|
|
225
|
-
readonly className?: string;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Props for the DiagnosticLoggerProvider component.
|
|
230
|
-
* @public
|
|
231
|
-
*/
|
|
232
|
-
export declare interface IDiagnosticLoggerProviderProps {
|
|
233
|
-
/** Child components that will have access to the diagnostic logger */
|
|
234
|
-
children: ReactNode;
|
|
235
|
-
/** Optional logger to provide (defaults to no-op logger) */
|
|
236
|
-
logger?: Logging.LogReporter<unknown>;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Props for the DualKeypad component
|
|
241
|
-
* @public
|
|
242
|
-
*/
|
|
243
|
-
export declare interface IDualKeypadProps {
|
|
244
|
-
/** Current input mode */
|
|
245
|
-
readonly inputMode: InputMode;
|
|
246
|
-
/** Callback when input mode changes */
|
|
247
|
-
readonly onInputModeChange: (mode: InputMode) => void;
|
|
248
|
-
/** Callback when a number is pressed for notes */
|
|
249
|
-
readonly onNotePress: (number: number) => void;
|
|
250
|
-
/** Callback when a number is pressed for values */
|
|
251
|
-
readonly onValuePress: (number: number) => void;
|
|
252
|
-
/** Callback when clear notes is pressed */
|
|
253
|
-
readonly onClearNotes: () => void;
|
|
254
|
-
/** Callback when clear values is pressed */
|
|
255
|
-
readonly onClearValues: () => void;
|
|
256
|
-
/** Whether any cells are selected */
|
|
257
|
-
readonly hasCellSelection: boolean;
|
|
258
|
-
/** Number of selected cells */
|
|
259
|
-
readonly selectedCellCount: number;
|
|
260
|
-
/** Whether the keypad is disabled */
|
|
261
|
-
readonly disabled?: boolean;
|
|
262
|
-
/** Additional CSS class name */
|
|
263
|
-
readonly className?: string;
|
|
264
|
-
/** Force a specific layout mode (overrides responsive detection) */
|
|
265
|
-
readonly forceLayoutMode?: KeypadLayoutMode;
|
|
266
|
-
/** Whether to show the overlay toggle for desktop */
|
|
267
|
-
readonly showOverlayToggle?: boolean;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* State management for combination elimination
|
|
272
|
-
* @public
|
|
273
|
-
*/
|
|
274
|
-
export declare interface IEliminationState {
|
|
275
|
-
readonly eliminatedSignatures: Set<string>;
|
|
276
|
-
readonly toggleElimination: (signature: string) => void;
|
|
277
|
-
readonly clearAll: () => void;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Options for keyboard shortcut configuration
|
|
282
|
-
* @public
|
|
283
|
-
*/
|
|
284
|
-
export declare interface IKeyboardShortcutOptions {
|
|
285
|
-
readonly ctrl?: boolean;
|
|
286
|
-
readonly meta?: boolean;
|
|
287
|
-
readonly shift?: boolean;
|
|
288
|
-
readonly preventDefault?: boolean;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Props for the KillerCombinationsExplorer component
|
|
293
|
-
* @public
|
|
294
|
-
*/
|
|
295
|
-
export declare interface IKillerCombinationsExplorerProps {
|
|
296
|
-
readonly selectedCage: ICage | null;
|
|
297
|
-
readonly puzzleId?: string;
|
|
298
|
-
readonly isOpen: boolean;
|
|
299
|
-
readonly onClose: () => void;
|
|
300
|
-
readonly mobileBreakpoint?: number;
|
|
301
|
-
readonly className?: string;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Props for the KillerCombinationsModal component
|
|
306
|
-
*/
|
|
307
|
-
declare interface IKillerCombinationsModalProps {
|
|
308
|
-
readonly cage: ICage;
|
|
309
|
-
readonly combinations: ICombinationDisplayInfo[];
|
|
310
|
-
readonly onToggle: (signature: string) => void;
|
|
311
|
-
readonly onClose: () => void;
|
|
312
|
-
readonly isOpen: boolean;
|
|
313
|
-
readonly className?: string;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Display mode for killer combinations explorer
|
|
318
|
-
* @public
|
|
319
|
-
*/
|
|
320
|
-
export declare type IKillerCombinationsMode = 'panel' | 'modal';
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Props for the KillerCombinationsPanel component
|
|
324
|
-
*/
|
|
325
|
-
declare interface IKillerCombinationsPanelProps {
|
|
326
|
-
readonly cage: ICage;
|
|
327
|
-
readonly combinations: ICombinationDisplayInfo[];
|
|
328
|
-
readonly onToggle: (signature: string) => void;
|
|
329
|
-
readonly onClose: () => void;
|
|
330
|
-
readonly isOpen: boolean;
|
|
331
|
-
readonly className?: string;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Input mode for cell interactions
|
|
336
|
-
* @public
|
|
337
|
-
*/
|
|
338
|
-
declare type InputMode = 'value' | 'notes';
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Props for the NumberKeypad component
|
|
342
|
-
* @public
|
|
343
|
-
*/
|
|
344
|
-
export declare interface INumberKeypadProps {
|
|
345
|
-
/** Type of keypad - affects styling and behavior */
|
|
346
|
-
readonly keypadType: 'notes' | 'values';
|
|
347
|
-
/** Current input mode */
|
|
348
|
-
readonly inputMode: InputMode;
|
|
349
|
-
/** Whether this keypad is currently active */
|
|
350
|
-
readonly isActive: boolean;
|
|
351
|
-
/** Callback when a number is pressed */
|
|
352
|
-
readonly onNumberPress: (number: number) => void;
|
|
353
|
-
/** Callback when clear is pressed */
|
|
354
|
-
readonly onClear: () => void;
|
|
355
|
-
/** Whether the keypad is disabled */
|
|
356
|
-
readonly disabled?: boolean;
|
|
357
|
-
/** Additional CSS class name */
|
|
358
|
-
readonly className?: string;
|
|
359
|
-
/** Compact mode for smaller screens */
|
|
360
|
-
readonly compact?: boolean;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Responsive layout information
|
|
365
|
-
* @public
|
|
366
|
-
*/
|
|
367
|
-
export declare interface IResponsiveLayoutInfo {
|
|
368
|
-
/** Device type based on screen size and touch capability */
|
|
369
|
-
readonly deviceType: DeviceType;
|
|
370
|
-
/** Current screen orientation */
|
|
371
|
-
readonly orientation: ScreenOrientation_2;
|
|
372
|
-
/** Recommended keypad layout mode */
|
|
373
|
-
readonly keypadLayoutMode: KeypadLayoutMode;
|
|
374
|
-
/** Screen width in pixels */
|
|
375
|
-
readonly screenWidth: number;
|
|
376
|
-
/** Screen height in pixels */
|
|
377
|
-
readonly screenHeight: number;
|
|
378
|
-
/** Whether touch is supported */
|
|
379
|
-
readonly isTouchDevice: boolean;
|
|
380
|
-
/** Whether the screen is considered small */
|
|
381
|
-
readonly isSmallScreen: boolean;
|
|
382
|
-
/** Whether the screen has enough space for dual keypads */
|
|
383
|
-
readonly hasSpaceForDualKeypads: boolean;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Props for the SudokuCell component
|
|
388
|
-
* @public
|
|
389
|
-
*/
|
|
390
|
-
export declare interface ISudokuCellProps {
|
|
391
|
-
readonly cellInfo: ICellDisplayInfo;
|
|
392
|
-
readonly isSelected: boolean;
|
|
393
|
-
readonly inputMode: InputMode;
|
|
394
|
-
readonly puzzleDimensions?: {
|
|
395
|
-
readonly numRows: number;
|
|
396
|
-
readonly numColumns: number;
|
|
397
|
-
readonly cageHeight: number;
|
|
398
|
-
readonly cageWidth: number;
|
|
399
|
-
};
|
|
400
|
-
readonly onSelect: (event?: React.MouseEvent) => void;
|
|
401
|
-
readonly onLongPressToggle?: (event: React.TouchEvent | React.MouseEvent) => void;
|
|
402
|
-
readonly onValueChange: (value: number | undefined) => void;
|
|
403
|
-
readonly onNoteToggle: (note: number) => void;
|
|
404
|
-
readonly onClearAllNotes: () => void;
|
|
405
|
-
readonly onDragOver?: () => void;
|
|
406
|
-
readonly className?: string;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Props for the SudokuControls component
|
|
411
|
-
* @public
|
|
412
|
-
*/
|
|
413
|
-
export declare interface ISudokuControlsProps {
|
|
414
|
-
readonly canUndo: boolean;
|
|
415
|
-
readonly canRedo: boolean;
|
|
416
|
-
readonly canReset: boolean;
|
|
417
|
-
readonly isValid: boolean;
|
|
418
|
-
readonly isSolved: boolean;
|
|
419
|
-
readonly onUndo: () => void;
|
|
420
|
-
readonly onRedo: () => void;
|
|
421
|
-
readonly onReset: () => void;
|
|
422
|
-
readonly onExport: () => void;
|
|
423
|
-
readonly className?: string;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Props for the main SudokuGridEntry component
|
|
428
|
-
* @public
|
|
429
|
-
*/
|
|
430
|
-
export declare interface ISudokuGridEntryProps {
|
|
431
|
-
/**
|
|
432
|
-
* Optional initial puzzle session to load. If not provided, an empty puzzle is created.
|
|
433
|
-
*/
|
|
434
|
-
readonly initialPuzzleDescription?: IPuzzleDefinition;
|
|
435
|
-
/**
|
|
436
|
-
* Callback fired when the puzzle state changes
|
|
437
|
-
*/
|
|
438
|
-
readonly onStateChange?: (isValid: boolean, isSolved: boolean) => void;
|
|
439
|
-
/**
|
|
440
|
-
* Callback fired when validation errors occur
|
|
441
|
-
*/
|
|
442
|
-
readonly onValidationErrors?: (errors: IValidationError[]) => void;
|
|
443
|
-
/**
|
|
444
|
-
* Optional CSS class name for styling
|
|
445
|
-
*/
|
|
446
|
-
readonly className?: string;
|
|
447
|
-
/**
|
|
448
|
-
* Optional forced layout mode for testing (overrides responsive detection)
|
|
449
|
-
*/
|
|
450
|
-
readonly forceLayoutMode?: KeypadLayoutMode;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Props for the SudokuGrid component
|
|
455
|
-
* @public
|
|
456
|
-
*/
|
|
457
|
-
export declare interface ISudokuGridProps {
|
|
458
|
-
readonly numRows: number;
|
|
459
|
-
readonly numColumns: number;
|
|
460
|
-
readonly cells: ICellDisplayInfo[];
|
|
461
|
-
readonly cages?: ICageDisplayInfo[];
|
|
462
|
-
readonly selectedCell: CellId | null;
|
|
463
|
-
readonly selectedCells: CellId[];
|
|
464
|
-
readonly inputMode: InputMode;
|
|
465
|
-
readonly puzzleType?: string;
|
|
466
|
-
readonly puzzleDimensions?: {
|
|
467
|
-
readonly cageHeightInCells: number;
|
|
468
|
-
readonly cageWidthInCells: number;
|
|
469
|
-
readonly boardWidthInCages: number;
|
|
470
|
-
readonly boardHeightInCages: number;
|
|
471
|
-
readonly totalRows: number;
|
|
472
|
-
readonly totalColumns: number;
|
|
473
|
-
readonly maxValue: number;
|
|
474
|
-
readonly totalCages: number;
|
|
475
|
-
readonly basicCageTotal: number;
|
|
476
|
-
};
|
|
477
|
-
readonly onCellSelect: (cellId: CellId, event?: React.MouseEvent) => void;
|
|
478
|
-
readonly onLongPressToggle?: (cellId: CellId, event: React.TouchEvent | React.MouseEvent) => void;
|
|
479
|
-
readonly onCellValueChange: (cellId: CellId, value: number | undefined) => void;
|
|
480
|
-
readonly onNoteToggle: (cellId: CellId, note: number) => void;
|
|
481
|
-
readonly onClearAllNotes: (cellId: CellId) => void;
|
|
482
|
-
readonly onNavigate: (direction: NavigationDirection) => void;
|
|
483
|
-
readonly onDragOver?: (cellId: CellId) => void;
|
|
484
|
-
readonly onDragEnd?: () => void;
|
|
485
|
-
readonly isDragging?: boolean;
|
|
486
|
-
readonly className?: string;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Props for the ValidationDisplay component
|
|
491
|
-
* @public
|
|
492
|
-
*/
|
|
493
|
-
export declare interface IValidationDisplayProps {
|
|
494
|
-
readonly errors: IValidationError[];
|
|
495
|
-
readonly isValid: boolean;
|
|
496
|
-
readonly isSolved: boolean;
|
|
497
|
-
readonly className?: string;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Validation error for display in the UI
|
|
502
|
-
* @public
|
|
503
|
-
*/
|
|
504
|
-
export declare interface IValidationError {
|
|
505
|
-
readonly cellId: CellId;
|
|
506
|
-
readonly type: 'duplicate-row' | 'duplicate-column' | 'duplicate-section' | 'duplicate-diagonal' | 'invalid-value';
|
|
507
|
-
readonly conflictingCells: CellId[];
|
|
508
|
-
readonly message: string;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Layout mode for dual keypad
|
|
513
|
-
* @public
|
|
514
|
-
*/
|
|
515
|
-
export declare type KeypadLayoutMode = 'side-by-side' | 'stacked' | 'overlay' | 'hidden';
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Main killer combinations explorer container component
|
|
519
|
-
* Automatically switches between panel (desktop) and modal (mobile) based on screen size
|
|
520
|
-
* @public
|
|
521
|
-
*/
|
|
522
|
-
export declare const KillerCombinationsExplorer: React_2.FC<IKillerCombinationsExplorerProps>;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Mobile modal variant for killer combinations explorer
|
|
526
|
-
* @public
|
|
527
|
-
*/
|
|
528
|
-
export declare const KillerCombinationsModal: React_2.FC<IKillerCombinationsModalProps>;
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Desktop panel variant for killer combinations explorer
|
|
532
|
-
* @public
|
|
533
|
-
*/
|
|
534
|
-
export declare const KillerCombinationsPanel: React_2.FC<IKillerCombinationsPanelProps>;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Reusable number keypad component for sudoku input
|
|
538
|
-
* @public
|
|
539
|
-
*/
|
|
540
|
-
export declare const NumberKeypad: React_2.FC<INumberKeypadProps>;
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* Screen orientation
|
|
544
|
-
* @public
|
|
545
|
-
*/
|
|
546
|
-
declare type ScreenOrientation_2 = 'portrait' | 'landscape';
|
|
547
|
-
export { ScreenOrientation_2 as ScreenOrientation }
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Individual Sudoku cell component with input handling and validation display
|
|
551
|
-
* @public
|
|
552
|
-
*/
|
|
553
|
-
export declare const SudokuCell: React_2.FC<ISudokuCellProps>;
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* Control panel for grid-wide operations
|
|
557
|
-
* @public
|
|
558
|
-
*/
|
|
559
|
-
export declare const SudokuControls: React_2.FC<ISudokuControlsProps>;
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* Grid component that renders the 9x9 Sudoku grid with proper visual structure
|
|
563
|
-
* @public
|
|
564
|
-
*/
|
|
565
|
-
export declare const SudokuGrid: React_2.FC<ISudokuGridProps>;
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Main container component that orchestrates puzzle entry
|
|
569
|
-
* @public
|
|
570
|
-
*/
|
|
571
|
-
export declare const SudokuGridEntry: React_2.FC<ISudokuGridEntryProps>;
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* Hook for managing combination elimination state with session storage persistence
|
|
575
|
-
* @param puzzleId - Unique identifier for the puzzle
|
|
576
|
-
* @param cageId - Unique identifier for the cage
|
|
577
|
-
* @returns Elimination state with toggle and clear operations
|
|
578
|
-
* @public
|
|
579
|
-
*/
|
|
580
|
-
export declare function useCombinationElimination(puzzleId: string | undefined, cageId: string | undefined): IEliminationState;
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Hook to access the current diagnostic logger.
|
|
584
|
-
*
|
|
585
|
-
* Provides access to diagnostic logging for development and debugging.
|
|
586
|
-
*
|
|
587
|
-
* @example
|
|
588
|
-
* ```tsx
|
|
589
|
-
* function CageOverlay({ cages }: ICageOverlayProps) {
|
|
590
|
-
* const log = useDiagnosticLogger();
|
|
591
|
-
*
|
|
592
|
-
* useEffect(() => {
|
|
593
|
-
* log.info('CageOverlay rendered', {
|
|
594
|
-
* cageCount: cages.length,
|
|
595
|
-
* cages: cages.map((c) => ({ id: c.cage.id, cellIds: c.cage.cellIds }))
|
|
596
|
-
* });
|
|
597
|
-
* }, [cages, log]);
|
|
598
|
-
*
|
|
599
|
-
* return <div>...</div>;
|
|
600
|
-
* }
|
|
601
|
-
* ```
|
|
602
|
-
*
|
|
603
|
-
* @returns The current diagnostic logger
|
|
604
|
-
* @public
|
|
605
|
-
*/
|
|
606
|
-
export declare const useDiagnosticLogger: () => Logging.LogReporter<unknown>;
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Hook for registering global keyboard shortcuts
|
|
610
|
-
* @param key - The key to listen for (e.g., 'k', 'Escape')
|
|
611
|
-
* @param callback - Function to call when shortcut is activated
|
|
612
|
-
* @param options - Optional modifier keys and behavior
|
|
613
|
-
* @public
|
|
614
|
-
*/
|
|
615
|
-
export declare function useKeyboardShortcut(key: string, callback: () => void, options?: IKeyboardShortcutOptions): void;
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
* Hook to get all valid killer cage combinations for a selected cage
|
|
619
|
-
* @param cage - The selected killer cage
|
|
620
|
-
* @returns Result containing combination display information
|
|
621
|
-
* @public
|
|
622
|
-
*/
|
|
623
|
-
export declare function useKillerCombinations(cage: ICage | null): Result<ICombinationDisplayInfo[]>;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Hook for managing puzzle session state and operations
|
|
627
|
-
* @public
|
|
628
|
-
*/
|
|
629
|
-
export declare function usePuzzleSession(initialPuzzleDescription?: IPuzzleDefinition): {
|
|
630
|
-
session: PuzzleSession | null;
|
|
631
|
-
selectedCell: CellId | null;
|
|
632
|
-
selectedCells: CellId[];
|
|
633
|
-
inputMode: InputMode;
|
|
634
|
-
setSelectedCell: (cell: CellId | null) => void;
|
|
635
|
-
setSelectedCells: (cells: CellId[]) => void;
|
|
636
|
-
setInputMode: (mode: InputMode) => void;
|
|
637
|
-
cellDisplayInfo: ICellDisplayInfo[];
|
|
638
|
-
cageDisplayInfo: ICageDisplayInfo[];
|
|
639
|
-
validationErrors: IValidationError[];
|
|
640
|
-
isValid: boolean;
|
|
641
|
-
isSolved: boolean;
|
|
642
|
-
canUndo: boolean;
|
|
643
|
-
canRedo: boolean;
|
|
644
|
-
error: string | null;
|
|
645
|
-
updateCellValue: (cellId: CellId, value: number | undefined) => void;
|
|
646
|
-
toggleCellNote: (cellId: CellId, note: number) => void;
|
|
647
|
-
clearCellNotes: (cellId: CellId) => void;
|
|
648
|
-
navigateToCell: (direction: NavigationDirection, wrap?: NavigationWrap) => void;
|
|
649
|
-
undo: () => void;
|
|
650
|
-
redo: () => void;
|
|
651
|
-
reset: () => void;
|
|
652
|
-
exportPuzzle: () => IPuzzleDefinition | null;
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* Hook to detect responsive layout information for optimal keypad display
|
|
657
|
-
* @param forceLayoutMode - Optional layout mode override for testing
|
|
658
|
-
* @public
|
|
659
|
-
*/
|
|
660
|
-
export declare function useResponsiveLayout(forceLayoutMode?: KeypadLayoutMode): IResponsiveLayoutInfo;
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* Component to display validation errors and puzzle status
|
|
664
|
-
* @public
|
|
665
|
-
*/
|
|
666
|
-
export declare const ValidationDisplay: React_2.FC<IValidationDisplayProps>;
|
|
667
|
-
|
|
668
|
-
export { }
|