@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.
Files changed (78) hide show
  1. package/eslint.config.js +18 -0
  2. package/lib/tsdoc-metadata.json +1 -1
  3. package/package.json +22 -21
  4. package/.test-failures-catalog.md +0 -470
  5. package/CHANGELOG.md +0 -11
  6. package/CSS_MODULES_MIGRATION_SUMMARY.md +0 -189
  7. package/dist/ts-sudoku-ui.d.ts +0 -668
  8. package/etc/ts-sudoku-ui.api.md +0 -481
  9. package/lib/test/fixtures/killerSudokuPuzzles.d.ts +0 -36
  10. package/lib/test/fixtures/killerSudokuPuzzles.d.ts.map +0 -1
  11. package/lib/test/fixtures/killerSudokuPuzzles.js +0 -57
  12. package/lib/test/fixtures/killerSudokuPuzzles.js.map +0 -1
  13. package/lib/test/unit/components/SudokuGridEntry.testHelpers.d.ts +0 -22
  14. package/lib/test/unit/components/SudokuGridEntry.testHelpers.d.ts.map +0 -1
  15. package/lib/test/unit/components/SudokuGridEntry.testHelpers.js +0 -116
  16. package/lib/test/unit/components/SudokuGridEntry.testHelpers.js.map +0 -1
  17. package/lib-commonjs/components/CageOverlay.js +0 -138
  18. package/lib-commonjs/components/CageOverlay.js.map +0 -1
  19. package/lib-commonjs/components/CageSumIndicator.js +0 -71
  20. package/lib-commonjs/components/CageSumIndicator.js.map +0 -1
  21. package/lib-commonjs/components/CombinationCard.js +0 -68
  22. package/lib-commonjs/components/CombinationCard.js.map +0 -1
  23. package/lib-commonjs/components/CombinationGrid.js +0 -56
  24. package/lib-commonjs/components/CombinationGrid.js.map +0 -1
  25. package/lib-commonjs/components/CompactControlRibbon.js +0 -146
  26. package/lib-commonjs/components/CompactControlRibbon.js.map +0 -1
  27. package/lib-commonjs/components/DualKeypad.js +0 -142
  28. package/lib-commonjs/components/DualKeypad.js.map +0 -1
  29. package/lib-commonjs/components/KillerCombinationsExplorer.js +0 -74
  30. package/lib-commonjs/components/KillerCombinationsExplorer.js.map +0 -1
  31. package/lib-commonjs/components/KillerCombinationsModal.js +0 -140
  32. package/lib-commonjs/components/KillerCombinationsModal.js.map +0 -1
  33. package/lib-commonjs/components/KillerCombinationsPanel.js +0 -84
  34. package/lib-commonjs/components/KillerCombinationsPanel.js.map +0 -1
  35. package/lib-commonjs/components/NumberKeypad.js +0 -186
  36. package/lib-commonjs/components/NumberKeypad.js.map +0 -1
  37. package/lib-commonjs/components/SudokuCell.js +0 -245
  38. package/lib-commonjs/components/SudokuCell.js.map +0 -1
  39. package/lib-commonjs/components/SudokuControls.js +0 -145
  40. package/lib-commonjs/components/SudokuControls.js.map +0 -1
  41. package/lib-commonjs/components/SudokuGrid.js +0 -182
  42. package/lib-commonjs/components/SudokuGrid.js.map +0 -1
  43. package/lib-commonjs/components/SudokuGridEntry.js +0 -378
  44. package/lib-commonjs/components/SudokuGridEntry.js.map +0 -1
  45. package/lib-commonjs/components/ValidationDisplay.js +0 -100
  46. package/lib-commonjs/components/ValidationDisplay.js.map +0 -1
  47. package/lib-commonjs/contexts/DiagnosticLoggerContext.js +0 -104
  48. package/lib-commonjs/contexts/DiagnosticLoggerContext.js.map +0 -1
  49. package/lib-commonjs/contexts/index.js +0 -32
  50. package/lib-commonjs/contexts/index.js.map +0 -1
  51. package/lib-commonjs/hooks/useCombinationElimination.js +0 -126
  52. package/lib-commonjs/hooks/useCombinationElimination.js.map +0 -1
  53. package/lib-commonjs/hooks/useKeyboardShortcut.js +0 -58
  54. package/lib-commonjs/hooks/useKeyboardShortcut.js.map +0 -1
  55. package/lib-commonjs/hooks/useKillerCombinations.js +0 -68
  56. package/lib-commonjs/hooks/useKillerCombinations.js.map +0 -1
  57. package/lib-commonjs/hooks/useLongPress.js +0 -72
  58. package/lib-commonjs/hooks/useLongPress.js.map +0 -1
  59. package/lib-commonjs/hooks/usePuzzleSession.js +0 -401
  60. package/lib-commonjs/hooks/usePuzzleSession.js.map +0 -1
  61. package/lib-commonjs/hooks/useResponsiveLayout.js +0 -142
  62. package/lib-commonjs/hooks/useResponsiveLayout.js.map +0 -1
  63. package/lib-commonjs/index.browser.js +0 -29
  64. package/lib-commonjs/index.browser.js.map +0 -1
  65. package/lib-commonjs/index.js +0 -73
  66. package/lib-commonjs/index.js.map +0 -1
  67. package/lib-commonjs/test/fixtures/killerSudokuPuzzles.js +0 -60
  68. package/lib-commonjs/test/fixtures/killerSudokuPuzzles.js.map +0 -1
  69. package/lib-commonjs/test/unit/components/SudokuGridEntry.testHelpers.js +0 -125
  70. package/lib-commonjs/test/unit/components/SudokuGridEntry.testHelpers.js.map +0 -1
  71. package/lib-commonjs/types/index.js +0 -26
  72. package/lib-commonjs/types/index.js.map +0 -1
  73. package/lib-commonjs/utils/CageLookupManager.js +0 -287
  74. package/lib-commonjs/utils/CageLookupManager.js.map +0 -1
  75. package/lib-commonjs/utils/CagePatternManager.js +0 -143
  76. package/lib-commonjs/utils/CagePatternManager.js.map +0 -1
  77. package/lib-commonjs/utils/puzzleDefinitionHelper.js +0 -103
  78. package/lib-commonjs/utils/puzzleDefinitionHelper.js.map +0 -1
@@ -1,481 +0,0 @@
1
- ## API Report File for "@fgv/ts-sudoku-ui"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { CellId } from '@fgv/ts-sudoku-lib';
8
- import { ICage } from '@fgv/ts-sudoku-lib';
9
- import { ICellContents } from '@fgv/ts-sudoku-lib';
10
- import { IPuzzleDefinition } from '@fgv/ts-sudoku-lib';
11
- import { Logging } from '@fgv/ts-utils';
12
- import { NavigationDirection } from '@fgv/ts-sudoku-lib';
13
- import { NavigationWrap } from '@fgv/ts-sudoku-lib';
14
- import { PuzzleSession } from '@fgv/ts-sudoku-lib';
15
- import { default as React_2 } from 'react';
16
- import { ReactNode } from 'react';
17
- import { Result } from '@fgv/ts-utils';
18
-
19
- // @public
20
- export const CageOverlay: React_2.FC<ICageOverlayProps>;
21
-
22
- // @public
23
- export const CageSumIndicator: React_2.FC<ICageSumIndicatorProps>;
24
-
25
- // @public
26
- export const CombinationCard: React_2.NamedExoticComponent<ICombinationCardProps>;
27
-
28
- // @public
29
- export const CombinationGrid: React_2.FC<ICombinationGridProps>;
30
-
31
- // @public
32
- export const CompactControlRibbon: React_2.FC<ICompactControlRibbonProps>;
33
-
34
- // @public
35
- export const DefaultDiagnosticLogger: Logging.LogReporter<unknown>;
36
-
37
- // @public
38
- export type DeviceType = 'mobile' | 'tablet' | 'desktop';
39
-
40
- // @public
41
- export const DiagnosticLoggerContext: React_2.Context<Logging.LogReporter<unknown>>;
42
-
43
- // @public
44
- export const DiagnosticLoggerProvider: React_2.FC<IDiagnosticLoggerProviderProps>;
45
-
46
- // @public
47
- export const DualKeypad: React_2.FC<IDualKeypadProps>;
48
-
49
- // @public
50
- export interface ICageDisplayInfo {
51
- // (undocumented)
52
- readonly cage: ICage;
53
- // (undocumented)
54
- readonly currentSum?: number;
55
- // (undocumented)
56
- readonly isComplete: boolean;
57
- // (undocumented)
58
- readonly isHighlighted: boolean;
59
- // (undocumented)
60
- readonly isValid: boolean;
61
- }
62
-
63
- // @public
64
- export interface ICageOverlayProps {
65
- // (undocumented)
66
- readonly cages: ICageDisplayInfo[];
67
- // (undocumented)
68
- readonly cellSize: number;
69
- // (undocumented)
70
- readonly className?: string;
71
- // (undocumented)
72
- readonly gridSize: {
73
- width: number;
74
- height: number;
75
- };
76
- // (undocumented)
77
- readonly numColumns?: number;
78
- // (undocumented)
79
- readonly numRows?: number;
80
- }
81
-
82
- // @public
83
- export interface ICageSumIndicatorProps {
84
- // (undocumented)
85
- readonly cage: ICage;
86
- // (undocumented)
87
- readonly className?: string;
88
- // (undocumented)
89
- readonly currentSum?: number;
90
- // (undocumented)
91
- readonly isComplete: boolean;
92
- // (undocumented)
93
- readonly isValid: boolean;
94
- // (undocumented)
95
- readonly position: {
96
- top: number;
97
- left: number;
98
- };
99
- }
100
-
101
- // @public
102
- export interface ICellDisplayInfo {
103
- // (undocumented)
104
- readonly column: number;
105
- // (undocumented)
106
- readonly contents: ICellContents;
107
- // (undocumented)
108
- readonly hasValidationError: boolean;
109
- // (undocumented)
110
- readonly id: CellId;
111
- // (undocumented)
112
- readonly isImmutable: boolean;
113
- // (undocumented)
114
- readonly row: number;
115
- }
116
-
117
- // @public
118
- export interface ICombinationCardProps {
119
- // (undocumented)
120
- readonly className?: string;
121
- // (undocumented)
122
- readonly combination: ICombinationDisplayInfo;
123
- // (undocumented)
124
- readonly onToggle: (signature: string) => void;
125
- }
126
-
127
- // @public
128
- export interface ICombinationDisplayInfo {
129
- // (undocumented)
130
- readonly combination: number[];
131
- // (undocumented)
132
- readonly isEliminated: boolean;
133
- // (undocumented)
134
- readonly signature: string;
135
- }
136
-
137
- // @public
138
- export interface ICombinationGridProps {
139
- // (undocumented)
140
- readonly className?: string;
141
- // (undocumented)
142
- readonly combinations: ICombinationDisplayInfo[];
143
- // (undocumented)
144
- readonly mode: IKillerCombinationsMode;
145
- // (undocumented)
146
- readonly onToggle: (signature: string) => void;
147
- }
148
-
149
- // @public
150
- export interface ICompactControlRibbonProps {
151
- readonly canRedo: boolean;
152
- readonly canReset: boolean;
153
- readonly canShowCombinations?: boolean;
154
- readonly canUndo: boolean;
155
- readonly className?: string;
156
- readonly isSolved: boolean;
157
- readonly isValid: boolean;
158
- readonly onCombinations?: () => void;
159
- readonly onExport: () => void;
160
- readonly onRedo: () => void;
161
- readonly onReset: () => void;
162
- readonly onUndo: () => void;
163
- readonly showCombinations?: boolean;
164
- readonly validationErrors: ReadonlyArray<{
165
- readonly type: string;
166
- readonly cellId: string;
167
- readonly message: string;
168
- }>;
169
- }
170
-
171
- // @public
172
- export interface IDiagnosticLoggerProviderProps {
173
- children: ReactNode;
174
- logger?: Logging.LogReporter<unknown>;
175
- }
176
-
177
- // @public
178
- export interface IDualKeypadProps {
179
- readonly className?: string;
180
- readonly disabled?: boolean;
181
- readonly forceLayoutMode?: KeypadLayoutMode;
182
- readonly hasCellSelection: boolean;
183
- // Warning: (ae-forgotten-export) The symbol "InputMode" needs to be exported by the entry point index.d.ts
184
- readonly inputMode: InputMode;
185
- readonly onClearNotes: () => void;
186
- readonly onClearValues: () => void;
187
- readonly onInputModeChange: (mode: InputMode) => void;
188
- readonly onNotePress: (number: number) => void;
189
- readonly onValuePress: (number: number) => void;
190
- readonly selectedCellCount: number;
191
- readonly showOverlayToggle?: boolean;
192
- }
193
-
194
- // @public
195
- export interface IEliminationState {
196
- // (undocumented)
197
- readonly clearAll: () => void;
198
- // (undocumented)
199
- readonly eliminatedSignatures: Set<string>;
200
- // (undocumented)
201
- readonly toggleElimination: (signature: string) => void;
202
- }
203
-
204
- // @public
205
- export interface IKeyboardShortcutOptions {
206
- // (undocumented)
207
- readonly ctrl?: boolean;
208
- // (undocumented)
209
- readonly meta?: boolean;
210
- // (undocumented)
211
- readonly preventDefault?: boolean;
212
- // (undocumented)
213
- readonly shift?: boolean;
214
- }
215
-
216
- // @public
217
- export interface IKillerCombinationsExplorerProps {
218
- // (undocumented)
219
- readonly className?: string;
220
- // (undocumented)
221
- readonly isOpen: boolean;
222
- // (undocumented)
223
- readonly mobileBreakpoint?: number;
224
- // (undocumented)
225
- readonly onClose: () => void;
226
- // (undocumented)
227
- readonly puzzleId?: string;
228
- // (undocumented)
229
- readonly selectedCage: ICage | null;
230
- }
231
-
232
- // @public
233
- export type IKillerCombinationsMode = 'panel' | 'modal';
234
-
235
- // @public
236
- export interface INumberKeypadProps {
237
- readonly className?: string;
238
- readonly compact?: boolean;
239
- readonly disabled?: boolean;
240
- readonly inputMode: InputMode;
241
- readonly isActive: boolean;
242
- readonly keypadType: 'notes' | 'values';
243
- readonly onClear: () => void;
244
- readonly onNumberPress: (number: number) => void;
245
- }
246
-
247
- // @public
248
- export interface IResponsiveLayoutInfo {
249
- readonly deviceType: DeviceType;
250
- readonly hasSpaceForDualKeypads: boolean;
251
- readonly isSmallScreen: boolean;
252
- readonly isTouchDevice: boolean;
253
- readonly keypadLayoutMode: KeypadLayoutMode;
254
- readonly orientation: ScreenOrientation_2;
255
- readonly screenHeight: number;
256
- readonly screenWidth: number;
257
- }
258
-
259
- // @public
260
- export interface ISudokuCellProps {
261
- // (undocumented)
262
- readonly cellInfo: ICellDisplayInfo;
263
- // (undocumented)
264
- readonly className?: string;
265
- // (undocumented)
266
- readonly inputMode: InputMode;
267
- // (undocumented)
268
- readonly isSelected: boolean;
269
- // (undocumented)
270
- readonly onClearAllNotes: () => void;
271
- // (undocumented)
272
- readonly onDragOver?: () => void;
273
- // (undocumented)
274
- readonly onLongPressToggle?: (event: React.TouchEvent | React.MouseEvent) => void;
275
- // (undocumented)
276
- readonly onNoteToggle: (note: number) => void;
277
- // (undocumented)
278
- readonly onSelect: (event?: React.MouseEvent) => void;
279
- // (undocumented)
280
- readonly onValueChange: (value: number | undefined) => void;
281
- // (undocumented)
282
- readonly puzzleDimensions?: {
283
- readonly numRows: number;
284
- readonly numColumns: number;
285
- readonly cageHeight: number;
286
- readonly cageWidth: number;
287
- };
288
- }
289
-
290
- // @public
291
- export interface ISudokuControlsProps {
292
- // (undocumented)
293
- readonly canRedo: boolean;
294
- // (undocumented)
295
- readonly canReset: boolean;
296
- // (undocumented)
297
- readonly canUndo: boolean;
298
- // (undocumented)
299
- readonly className?: string;
300
- // (undocumented)
301
- readonly isSolved: boolean;
302
- // (undocumented)
303
- readonly isValid: boolean;
304
- // (undocumented)
305
- readonly onExport: () => void;
306
- // (undocumented)
307
- readonly onRedo: () => void;
308
- // (undocumented)
309
- readonly onReset: () => void;
310
- // (undocumented)
311
- readonly onUndo: () => void;
312
- }
313
-
314
- // @public
315
- export interface ISudokuGridEntryProps {
316
- readonly className?: string;
317
- readonly forceLayoutMode?: KeypadLayoutMode;
318
- readonly initialPuzzleDescription?: IPuzzleDefinition;
319
- readonly onStateChange?: (isValid: boolean, isSolved: boolean) => void;
320
- readonly onValidationErrors?: (errors: IValidationError[]) => void;
321
- }
322
-
323
- // @public
324
- export interface ISudokuGridProps {
325
- // (undocumented)
326
- readonly cages?: ICageDisplayInfo[];
327
- // (undocumented)
328
- readonly cells: ICellDisplayInfo[];
329
- // (undocumented)
330
- readonly className?: string;
331
- // (undocumented)
332
- readonly inputMode: InputMode;
333
- // (undocumented)
334
- readonly isDragging?: boolean;
335
- // (undocumented)
336
- readonly numColumns: number;
337
- // (undocumented)
338
- readonly numRows: number;
339
- // (undocumented)
340
- readonly onCellSelect: (cellId: CellId, event?: React.MouseEvent) => void;
341
- // (undocumented)
342
- readonly onCellValueChange: (cellId: CellId, value: number | undefined) => void;
343
- // (undocumented)
344
- readonly onClearAllNotes: (cellId: CellId) => void;
345
- // (undocumented)
346
- readonly onDragEnd?: () => void;
347
- // (undocumented)
348
- readonly onDragOver?: (cellId: CellId) => void;
349
- // (undocumented)
350
- readonly onLongPressToggle?: (cellId: CellId, event: React.TouchEvent | React.MouseEvent) => void;
351
- // (undocumented)
352
- readonly onNavigate: (direction: NavigationDirection) => void;
353
- // (undocumented)
354
- readonly onNoteToggle: (cellId: CellId, note: number) => void;
355
- // (undocumented)
356
- readonly puzzleDimensions?: {
357
- readonly cageHeightInCells: number;
358
- readonly cageWidthInCells: number;
359
- readonly boardWidthInCages: number;
360
- readonly boardHeightInCages: number;
361
- readonly totalRows: number;
362
- readonly totalColumns: number;
363
- readonly maxValue: number;
364
- readonly totalCages: number;
365
- readonly basicCageTotal: number;
366
- };
367
- // (undocumented)
368
- readonly puzzleType?: string;
369
- // (undocumented)
370
- readonly selectedCell: CellId | null;
371
- // (undocumented)
372
- readonly selectedCells: CellId[];
373
- }
374
-
375
- // @public
376
- export interface IValidationDisplayProps {
377
- // (undocumented)
378
- readonly className?: string;
379
- // (undocumented)
380
- readonly errors: IValidationError[];
381
- // (undocumented)
382
- readonly isSolved: boolean;
383
- // (undocumented)
384
- readonly isValid: boolean;
385
- }
386
-
387
- // @public
388
- export interface IValidationError {
389
- // (undocumented)
390
- readonly cellId: CellId;
391
- // (undocumented)
392
- readonly conflictingCells: CellId[];
393
- // (undocumented)
394
- readonly message: string;
395
- // (undocumented)
396
- readonly type: 'duplicate-row' | 'duplicate-column' | 'duplicate-section' | 'duplicate-diagonal' | 'invalid-value';
397
- }
398
-
399
- // @public
400
- export type KeypadLayoutMode = 'side-by-side' | 'stacked' | 'overlay' | 'hidden';
401
-
402
- // @public
403
- export const KillerCombinationsExplorer: React_2.FC<IKillerCombinationsExplorerProps>;
404
-
405
- // Warning: (ae-forgotten-export) The symbol "IKillerCombinationsModalProps" needs to be exported by the entry point index.d.ts
406
- //
407
- // @public
408
- export const KillerCombinationsModal: React_2.FC<IKillerCombinationsModalProps>;
409
-
410
- // Warning: (ae-forgotten-export) The symbol "IKillerCombinationsPanelProps" needs to be exported by the entry point index.d.ts
411
- //
412
- // @public
413
- export const KillerCombinationsPanel: React_2.FC<IKillerCombinationsPanelProps>;
414
-
415
- // @public
416
- export const NumberKeypad: React_2.FC<INumberKeypadProps>;
417
-
418
- // @public
419
- type ScreenOrientation_2 = 'portrait' | 'landscape';
420
- export { ScreenOrientation_2 as ScreenOrientation }
421
-
422
- // @public
423
- export const SudokuCell: React_2.FC<ISudokuCellProps>;
424
-
425
- // @public
426
- export const SudokuControls: React_2.FC<ISudokuControlsProps>;
427
-
428
- // @public
429
- export const SudokuGrid: React_2.FC<ISudokuGridProps>;
430
-
431
- // @public
432
- export const SudokuGridEntry: React_2.FC<ISudokuGridEntryProps>;
433
-
434
- // @public
435
- export function useCombinationElimination(puzzleId: string | undefined, cageId: string | undefined): IEliminationState;
436
-
437
- // @public
438
- export const useDiagnosticLogger: () => Logging.LogReporter<unknown>;
439
-
440
- // @public
441
- export function useKeyboardShortcut(key: string, callback: () => void, options?: IKeyboardShortcutOptions): void;
442
-
443
- // @public
444
- export function useKillerCombinations(cage: ICage | null): Result<ICombinationDisplayInfo[]>;
445
-
446
- // @public
447
- export function usePuzzleSession(initialPuzzleDescription?: IPuzzleDefinition): {
448
- session: PuzzleSession | null;
449
- selectedCell: CellId | null;
450
- selectedCells: CellId[];
451
- inputMode: InputMode;
452
- setSelectedCell: (cell: CellId | null) => void;
453
- setSelectedCells: (cells: CellId[]) => void;
454
- setInputMode: (mode: InputMode) => void;
455
- cellDisplayInfo: ICellDisplayInfo[];
456
- cageDisplayInfo: ICageDisplayInfo[];
457
- validationErrors: IValidationError[];
458
- isValid: boolean;
459
- isSolved: boolean;
460
- canUndo: boolean;
461
- canRedo: boolean;
462
- error: string | null;
463
- updateCellValue: (cellId: CellId, value: number | undefined) => void;
464
- toggleCellNote: (cellId: CellId, note: number) => void;
465
- clearCellNotes: (cellId: CellId) => void;
466
- navigateToCell: (direction: NavigationDirection, wrap?: NavigationWrap) => void;
467
- undo: () => void;
468
- redo: () => void;
469
- reset: () => void;
470
- exportPuzzle: () => IPuzzleDefinition | null;
471
- };
472
-
473
- // @public
474
- export function useResponsiveLayout(forceLayoutMode?: KeypadLayoutMode): IResponsiveLayoutInfo;
475
-
476
- // @public
477
- export const ValidationDisplay: React_2.FC<IValidationDisplayProps>;
478
-
479
- // (No @packageDocumentation comment for this package)
480
-
481
- ```
@@ -1,36 +0,0 @@
1
- /**
2
- * Stable killer sudoku puzzle definitions for testing.
3
- * These puzzles have been validated and are used across multiple test files
4
- * to ensure consistency in testing killer sudoku functionality.
5
- *
6
- * @remarks
7
- * Killer sudoku cells format: "GRID_MAPPING|CAGE_DEFINITIONS"
8
- * - GRID_MAPPING: 81 characters mapping each cell to a cage ID (A-Z, a-z)
9
- * - CAGE_DEFINITIONS: Comma-separated list of cageId+total (e.g., "A11,B09,C20")
10
- *
11
- * Example: "AABBCC....|A11,B09,C20,..."
12
- * - Cells 0-1 are in cage A with total 11
13
- * - Cells 2-3 are in cage B with total 09
14
- * - Cells 4-5 are in cage C with total 20
15
- *
16
- * @public
17
- */
18
- /**
19
- * Valid killer sudoku puzzle with complete cage definitions.
20
- * This is a standard 9x9 killer sudoku with 27 cages.
21
- */
22
- export declare const VALID_KILLER_SUDOKU: string;
23
- /**
24
- * Killer sudoku puzzle metadata.
25
- */
26
- export interface IKillerSudokuFixture {
27
- id: string;
28
- description: string;
29
- level: number;
30
- cells: string;
31
- }
32
- /**
33
- * Collection of validated killer sudoku puzzles for testing.
34
- */
35
- export declare const KILLER_SUDOKU_FIXTURES: IKillerSudokuFixture[];
36
- //# sourceMappingURL=killerSudokuPuzzles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"killerSudokuPuzzles.d.ts","sourceRoot":"","sources":["../../../src/test/fixtures/killerSudokuPuzzles.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MACuK,CAAC;AAE1M;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,oBAAoB,EAOxD,CAAC"}
@@ -1,57 +0,0 @@
1
- /*
2
- * MIT License
3
- *
4
- * Copyright (c) 2023 Erik Fortune
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
- /**
25
- * Stable killer sudoku puzzle definitions for testing.
26
- * These puzzles have been validated and are used across multiple test files
27
- * to ensure consistency in testing killer sudoku functionality.
28
- *
29
- * @remarks
30
- * Killer sudoku cells format: "GRID_MAPPING|CAGE_DEFINITIONS"
31
- * - GRID_MAPPING: 81 characters mapping each cell to a cage ID (A-Z, a-z)
32
- * - CAGE_DEFINITIONS: Comma-separated list of cageId+total (e.g., "A11,B09,C20")
33
- *
34
- * Example: "AABBCC....|A11,B09,C20,..."
35
- * - Cells 0-1 are in cage A with total 11
36
- * - Cells 2-3 are in cage B with total 09
37
- * - Cells 4-5 are in cage C with total 20
38
- *
39
- * @public
40
- */
41
- /**
42
- * Valid killer sudoku puzzle with complete cage definitions.
43
- * This is a standard 9x9 killer sudoku with 27 cages.
44
- */
45
- export const VALID_KILLER_SUDOKU = 'ABCCCDDDEABFFGGGDEHIJKGGLLLHIJKMGLNNHOPPMQQNROOSTMUVWRSSSTTUVWRXYTTTZZabXYYYcccab|A11,B09,C09,D20,E16,F17,G30,H17,I13,J09,K11,L16,M16,N11,O16,P07,Q11,R10,S14,T39,U08,V17,W16,X06,Y26,Z06,a09,b09,c11';
46
- /**
47
- * Collection of validated killer sudoku puzzles for testing.
48
- */
49
- export const KILLER_SUDOKU_FIXTURES = [
50
- {
51
- id: 'valid-killer-1',
52
- description: 'Valid Killer Sudoku Puzzle',
53
- level: 1,
54
- cells: VALID_KILLER_SUDOKU
55
- }
56
- ];
57
- //# sourceMappingURL=killerSudokuPuzzles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"killerSudokuPuzzles.js","sourceRoot":"","sources":["../../../src/test/fixtures/killerSudokuPuzzles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,uMAAuM,CAAC;AAY1M;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA2B;IAC5D;QACE,EAAE,EAAE,gBAAgB;QACpB,WAAW,EAAE,4BAA4B;QACzC,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,mBAAmB;KAC3B;CACF,CAAC","sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2023 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Stable killer sudoku puzzle definitions for testing.\n * These puzzles have been validated and are used across multiple test files\n * to ensure consistency in testing killer sudoku functionality.\n *\n * @remarks\n * Killer sudoku cells format: \"GRID_MAPPING|CAGE_DEFINITIONS\"\n * - GRID_MAPPING: 81 characters mapping each cell to a cage ID (A-Z, a-z)\n * - CAGE_DEFINITIONS: Comma-separated list of cageId+total (e.g., \"A11,B09,C20\")\n *\n * Example: \"AABBCC....|A11,B09,C20,...\"\n * - Cells 0-1 are in cage A with total 11\n * - Cells 2-3 are in cage B with total 09\n * - Cells 4-5 are in cage C with total 20\n *\n * @public\n */\n\n/**\n * Valid killer sudoku puzzle with complete cage definitions.\n * This is a standard 9x9 killer sudoku with 27 cages.\n */\nexport const VALID_KILLER_SUDOKU: string =\n 'ABCCCDDDEABFFGGGDEHIJKGGLLLHIJKMGLNNHOPPMQQNROOSTMUVWRSSSTTUVWRXYTTTZZabXYYYcccab|A11,B09,C09,D20,E16,F17,G30,H17,I13,J09,K11,L16,M16,N11,O16,P07,Q11,R10,S14,T39,U08,V17,W16,X06,Y26,Z06,a09,b09,c11';\n\n/**\n * Killer sudoku puzzle metadata.\n */\nexport interface IKillerSudokuFixture {\n id: string;\n description: string;\n level: number;\n cells: string;\n}\n\n/**\n * Collection of validated killer sudoku puzzles for testing.\n */\nexport const KILLER_SUDOKU_FIXTURES: IKillerSudokuFixture[] = [\n {\n id: 'valid-killer-1',\n description: 'Valid Killer Sudoku Puzzle',\n level: 1,\n cells: VALID_KILLER_SUDOKU\n }\n];\n"]}
@@ -1,22 +0,0 @@
1
- import { RenderResult, RenderOptions } from '@testing-library/react';
2
- import { IPuzzleDefinition } from '@fgv/ts-sudoku-lib';
3
- import { createPuzzleDefinition } from '../../../utils/puzzleDefinitionHelper';
4
- export type { IPuzzleDefinition };
5
- export { createPuzzleDefinition };
6
- export declare function customRender(ui: React.ReactElement, options?: RenderOptions): RenderResult;
7
- export declare function advanceByLongPress(ms?: number): void;
8
- export declare function setWindowDimensions(width: number, height: number): void;
9
- export declare function renderWithMobilePortrait(component: React.ReactElement, options?: RenderOptions): RenderResult;
10
- export declare function renderWithDesktop(component: React.ReactElement, options?: RenderOptions): RenderResult;
11
- export declare const mockMatchMedia: (query: string) => MediaQueryList;
12
- export declare const validPuzzleDescription: IPuzzleDefinition;
13
- export declare const simplePuzzleDescription: IPuzzleDefinition;
14
- export declare const sudokuXPuzzleDescription: IPuzzleDefinition;
15
- export declare const invalidPuzzleDescription: IPuzzleDefinition;
16
- export declare const defaultProps: {
17
- initialPuzzleDescription: undefined;
18
- onStateChange: undefined;
19
- onValidationErrors: undefined;
20
- className: undefined;
21
- };
22
- //# sourceMappingURL=SudokuGridEntry.testHelpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SudokuGridEntry.testHelpers.d.ts","sourceRoot":"","sources":["../../../../src/test/unit/components/SudokuGridEntry.testHelpers.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAU,YAAY,EAAE,aAAa,EAAO,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAGlC,wBAAgB,YAAY,CAAC,EAAE,EAAE,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,YAAY,CAE1F;AAGD,wBAAgB,kBAAkB,CAAC,EAAE,GAAE,MAAY,GAAG,IAAI,CAIzD;AAGD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAWvE;AAGD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,KAAK,CAAC,YAAY,EAC7B,OAAO,CAAC,EAAE,aAAa,GACtB,YAAY,CAGd;AAGD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,YAAY,CAGtG;AAGD,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,cAW9C,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,iBAQnC,CAAC;AAEH,eAAO,MAAM,uBAAuB,EAAE,iBAQpC,CAAC;AAEH,eAAO,MAAM,wBAAwB,EAAE,iBAQrC,CAAC;AAEH,eAAO,MAAM,wBAAwB,EAAE,iBAQrC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE;IACzB,wBAAwB,EAAE,SAAS,CAAC;IACpC,aAAa,EAAE,SAAS,CAAC;IACzB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,SAAS,EAAE,SAAS,CAAC;CAMtB,CAAC"}