@scrabble-solver/scrabble-solver 2.8.3 → 2.8.5

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 (53) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +10 -10
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_8dgz12 +1 -1
  5. package/.next/cache/next-server.js.nft.json +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/server-production/0.pack +0 -0
  9. package/.next/cache/webpack/server-production/index.pack +0 -0
  10. package/.next/next-server.js.nft.json +1 -1
  11. package/.next/prerender-manifest.json +1 -1
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/chunks/206.js +98 -97
  14. package/.next/server/chunks/413.js +5 -4
  15. package/.next/server/chunks/515.js +135 -53
  16. package/.next/server/chunks/907.js +2 -2
  17. package/.next/server/middleware-build-manifest.js +1 -1
  18. package/.next/server/pages/404.html +5 -1
  19. package/.next/server/pages/404.js.nft.json +1 -1
  20. package/.next/server/pages/500.html +2 -2
  21. package/.next/server/pages/_app.js.nft.json +1 -1
  22. package/.next/server/pages/_error.js.nft.json +1 -1
  23. package/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
  24. package/.next/server/pages/api/solve.js +50 -94
  25. package/.next/server/pages/index.html +17 -1
  26. package/.next/server/pages/index.js +5 -12
  27. package/.next/server/pages/index.js.nft.json +1 -1
  28. package/.next/server/pages/index.json +1 -1
  29. package/.next/static/TzKQ3IntkvaYmHBkWpfoi/_buildManifest.js +1 -0
  30. package/.next/static/{OhUvTNKwyrrzmNwKBnpUU → TzKQ3IntkvaYmHBkWpfoi}/_ssgManifest.js +0 -0
  31. package/.next/static/chunks/56-2d34867599a0ac66.js +1 -0
  32. package/.next/static/chunks/pages/{404-02d949d2fe59e960.js → 404-30c06e61d256c5b2.js} +1 -1
  33. package/.next/static/chunks/pages/_app-6ffa2ab900772b67.js +1 -0
  34. package/.next/static/chunks/pages/{index-75517525489ab316.js → index-13ea7770a65c69ee.js} +1 -1
  35. package/.next/static/css/{d676d43c6b9c9a57.css → 551d09cac435debb.css} +1 -1
  36. package/.next/static/css/{6a9e5ba3f77c27f2.css → cdbc9e0afcff5473.css} +1 -1
  37. package/.next/trace +42 -42
  38. package/package.json +14 -14
  39. package/src/components/Board/hooks/useGrid.ts +9 -0
  40. package/src/components/KeyMap/KeyMap.tsx +1 -1
  41. package/src/components/KeyMap/components/Mapping/Mapping.module.scss +4 -0
  42. package/src/components/KeyMap/components/Mapping/Mapping.tsx +16 -12
  43. package/src/components/PlainTiles/PlainTiles.tsx +4 -0
  44. package/src/components/SvgFontCss/SvgFontCss.tsx +12 -0
  45. package/src/components/SvgFontCss/index.ts +1 -0
  46. package/src/components/Tile/TilePure.tsx +1 -1
  47. package/src/components/index.ts +1 -0
  48. package/src/lib/createKeyboardNavigation.ts +3 -0
  49. package/src/pages/index.tsx +5 -14
  50. package/src/styles/global.scss +3 -0
  51. package/.next/static/OhUvTNKwyrrzmNwKBnpUU/_buildManifest.js +0 -1
  52. package/.next/static/chunks/195-4b75c9c697b7b455.js +0 -1
  53. package/.next/static/chunks/pages/_app-72522bfb306a8aef.js +0 -1
@@ -8,18 +8,17 @@ exports.modules = {
8
8
  "use strict";
9
9
 
10
10
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11
- var lib_1 = __webpack_require__(19336);
11
+ const lib_1 = __webpack_require__(19336);
12
12
  /**
13
13
  * A class representing the {@link https://en.wikipedia.org/wiki/Trie | Trie data structure}.
14
14
  */
15
- var Trie = /** @class */ (function () {
15
+ class Trie {
16
16
  /**
17
17
  * Creates a new {@link Trie} with optionally given root {@link Node}.
18
18
  *
19
19
  * @param root - Root {@link Node} of the {@link Trie} to be created.
20
20
  */
21
- function Trie(root) {
22
- if (root === void 0) { root = {}; }
21
+ constructor(root = {}) {
23
22
  this.root = root;
24
23
  }
25
24
  /**
@@ -30,45 +29,45 @@ var Trie = /** @class */ (function () {
30
29
  * @param serialized - String with serialized data.
31
30
  * @returns {@link Trie} representing deserialized data.
32
31
  */
33
- Trie.deserialize = function (serialized) {
34
- return new Trie(lib_1.deserialize(serialized));
35
- };
32
+ static deserialize(serialized) {
33
+ return new Trie((0, lib_1.deserialize)(serialized));
34
+ }
36
35
  /**
37
36
  * Creates a new {@link Trie} based on array of words.
38
37
  *
39
38
  * @params words - array of words to put in the {@link Trie}.
40
39
  * @returns New {@link Trie} containing all given words.
41
40
  */
42
- Trie.fromArray = function (words) {
43
- return new Trie(lib_1.fromArray(words));
44
- };
41
+ static fromArray(words) {
42
+ return new Trie((0, lib_1.fromArray)(words));
43
+ }
45
44
  /**
46
45
  * Inserts given word into the {@link Trie}.
47
46
  *
48
47
  * @param word - Word to be inserted into the {@link Trie}.
49
48
  * @returns {@link Node} representing the end of the added word.
50
49
  */
51
- Trie.prototype.add = function (word) {
52
- return lib_1.add(this.root, word);
53
- };
50
+ add(word) {
51
+ return (0, lib_1.add)(this.root, word);
52
+ }
54
53
  /**
55
54
  * Finds {@link Node} representing given prefix in the {@link Trie}.
56
55
  *
57
56
  * @param prefix - Prefix to be found.
58
57
  * @returns {@link Node} representing a given prefix, undefined if there is no such node.
59
58
  */
60
- Trie.prototype.find = function (prefix) {
61
- return lib_1.find(this.root, prefix);
62
- };
59
+ find(prefix) {
60
+ return (0, lib_1.find)(this.root, prefix);
61
+ }
63
62
  /**
64
63
  * Tells you whether given word is in the {@link Trie}.
65
64
  *
66
65
  * @param word - Word to be found.
67
66
  * @returns true if given word is in the {@link Trie}, false otherwise.
68
67
  */
69
- Trie.prototype.has = function (word) {
70
- return lib_1.has(this.root, word);
71
- };
68
+ has(word) {
69
+ return (0, lib_1.has)(this.root, word);
70
+ }
72
71
  /**
73
72
  * Tells you whether there are any words with given prefix in the {@link Trie}.
74
73
  *
@@ -77,18 +76,18 @@ var Trie = /** @class */ (function () {
77
76
  * @param prefix - Prefix to be found.
78
77
  * @returns true if there are any words with given prefix in the {@link Trie}, false otherwise.
79
78
  */
80
- Trie.prototype.hasPrefix = function (prefix) {
81
- return lib_1.hasPrefix(this.root, prefix);
82
- };
79
+ hasPrefix(prefix) {
80
+ return (0, lib_1.hasPrefix)(this.root, prefix);
81
+ }
83
82
  /**
84
83
  * Removes given word from the {@link Trie} if it exists.
85
84
  *
86
85
  * @param word - Word to be removed.
87
86
  * @returns true if the word was removed, false otherwise.
88
87
  */
89
- Trie.prototype.remove = function (word) {
90
- return lib_1.remove(this.root, word);
91
- };
88
+ remove(word) {
89
+ return (0, lib_1.remove)(this.root, word);
90
+ }
92
91
  /**
93
92
  * Converts the {@link Trie} into a string.
94
93
  *
@@ -102,29 +101,28 @@ var Trie = /** @class */ (function () {
102
101
  *
103
102
  * @returns String with serialized data.
104
103
  */
105
- Trie.prototype.serialize = function () {
106
- return lib_1.serialize(this.root);
107
- };
104
+ serialize() {
105
+ return (0, lib_1.serialize)(this.root);
106
+ }
108
107
  /**
109
108
  * Finds all {@link Descendant | descendants} of the {@link Trie | Trie's} root and returns them as an array.
110
109
  *
111
110
  * @param options - See {@link TraverseOptions}.
112
111
  * @returns An array of {@link Descendant | descendants}.
113
112
  */
114
- Trie.prototype.toArray = function (options) {
115
- return lib_1.toArray(this.root, options);
116
- };
113
+ toArray(options) {
114
+ return (0, lib_1.toArray)(this.root, options);
115
+ }
117
116
  /**
118
117
  * Visits every descendant {@link Node} of the {@link Trie} and calls a callback.
119
118
  *
120
119
  * @param callback - Callback that will be called for each visited {@link Node}. Return true from callback to stop traversing.
121
120
  * @param options - See {@link TraverseOptions}.
122
121
  */
123
- Trie.prototype.traverse = function (callback, options) {
124
- return lib_1.traverse(this.root, callback, options);
125
- };
126
- return Trie;
127
- }());
122
+ traverse(callback, options) {
123
+ return (0, lib_1.traverse)(this.root, callback, options);
124
+ }
125
+ }
128
126
  exports["default"] = Trie;
129
127
 
130
128
 
@@ -156,7 +154,11 @@ exports.OPEN_PARENS = '(';
156
154
 
157
155
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
158
156
  if (k2 === undefined) k2 = k;
159
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
157
+ var desc = Object.getOwnPropertyDescriptor(m, k);
158
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
159
+ desc = { enumerable: true, get: function() { return m[k]; } };
160
+ }
161
+ Object.defineProperty(o, k2, desc);
160
162
  }) : (function(o, m, k, k2) {
161
163
  if (k2 === undefined) k2 = k;
162
164
  o[k2] = m[k];
@@ -169,7 +171,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
169
171
  };
170
172
  Object.defineProperty(exports, "__esModule", ({ value: true }));
171
173
  exports.Trie = void 0;
172
- var Trie_1 = __importDefault(__webpack_require__(43210));
174
+ const Trie_1 = __importDefault(__webpack_require__(43210));
173
175
  Object.defineProperty(exports, "Trie", ({ enumerable: true, get: function () { return Trie_1.default; } }));
174
176
  __exportStar(__webpack_require__(31430), exports);
175
177
  __exportStar(__webpack_require__(19336), exports);
@@ -191,10 +193,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
191
193
  * @param word - Word to be inserted into `node`.
192
194
  * @returns {@link Node} representing the end of the added word.
193
195
  */
194
- var add = function (node, word) {
195
- var currentNode = node;
196
- for (var index = 0; index < word.length; ++index) {
197
- var character = word[index];
196
+ const add = (node, word) => {
197
+ let currentNode = node;
198
+ for (let index = 0; index < word.length; ++index) {
199
+ const character = word[index];
198
200
  if (!currentNode[character]) {
199
201
  currentNode[character] = {};
200
202
  }
@@ -214,7 +216,7 @@ exports["default"] = add;
214
216
  "use strict";
215
217
 
216
218
  Object.defineProperty(exports, "__esModule", ({ value: true }));
217
- var constants_1 = __webpack_require__(31430);
219
+ const constants_1 = __webpack_require__(31430);
218
220
  /**
219
221
  * Creates a new {@link Node} by deserializing given string.
220
222
  *
@@ -223,33 +225,33 @@ var constants_1 = __webpack_require__(31430);
223
225
  * @param serialized - String with value returned by {@link serialize}.
224
226
  * @returns Instance of a root {@link Node} of deserialized string.
225
227
  */
226
- var deserialize = function (serialized) {
227
- var stack = [];
228
- var node = {};
229
- var i = 1;
228
+ const deserialize = (serialized) => {
229
+ const stack = [];
230
+ let node = {};
231
+ let i = 1;
230
232
  while (i < serialized.length - 1) {
231
- var character = serialized[i];
232
- var nextCharacter = serialized[i + 1];
233
+ const character = serialized[i];
234
+ const nextCharacter = serialized[i + 1];
233
235
  ++i;
234
236
  if (character === constants_1.CLOSE_PARENS) {
235
- var nextNode = stack.pop();
237
+ const nextNode = stack.pop();
236
238
  if (!nextNode) {
237
- throw new Error("Syntax error: misplaced \"" + constants_1.CLOSE_PARENS + "\"");
239
+ throw new Error(`Syntax error: misplaced "${constants_1.CLOSE_PARENS}"`);
238
240
  }
239
241
  node = nextNode;
240
242
  }
241
243
  else if (nextCharacter === constants_1.CLOSE_PARENS) {
242
244
  node[character] = { wordEnd: true };
243
- var nextNode = stack.pop();
245
+ const nextNode = stack.pop();
244
246
  if (!nextNode) {
245
- throw new Error("Syntax error: misplaced \"" + constants_1.CLOSE_PARENS + "\"");
247
+ throw new Error(`Syntax error: misplaced "${constants_1.CLOSE_PARENS}"`);
246
248
  }
247
249
  node = nextNode;
248
250
  ++i;
249
251
  }
250
252
  else if (nextCharacter === constants_1.OPEN_PARENS) {
251
253
  stack.push(node);
252
- var newNode = node[character] || {};
254
+ const newNode = node[character] || {};
253
255
  node[character] = newNode;
254
256
  node = newNode;
255
257
  ++i;
@@ -278,10 +280,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
278
280
  * @param prefix - Prefix to be found.
279
281
  * @returns {@link Node} representing a given prefix, undefined if there is no such node.
280
282
  */
281
- var find = function (node, prefix) {
282
- var currentNode = node;
283
- for (var index = 0; index < prefix.length; ++index) {
284
- var character = prefix[index];
283
+ const find = (node, prefix) => {
284
+ let currentNode = node;
285
+ for (let index = 0; index < prefix.length; ++index) {
286
+ const character = prefix[index];
285
287
  if (!currentNode[character]) {
286
288
  return undefined;
287
289
  }
@@ -303,16 +305,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
303
305
  return (mod && mod.__esModule) ? mod : { "default": mod };
304
306
  };
305
307
  Object.defineProperty(exports, "__esModule", ({ value: true }));
306
- var add_1 = __importDefault(__webpack_require__(3661));
308
+ const add_1 = __importDefault(__webpack_require__(3661));
307
309
  /**
308
310
  * Creates a new {@link Node} based on array of words.
309
311
  *
310
312
  * @params words - array of words to put in the {@link Node}.
311
313
  * @returns New {@link Node} containing all given words.
312
314
  */
313
- var fromArray = function (words) {
314
- var node = {};
315
- words.forEach(function (word) { return add_1.default(node, word); });
315
+ const fromArray = (words) => {
316
+ const node = {};
317
+ words.forEach((word) => (0, add_1.default)(node, word));
316
318
  return node;
317
319
  };
318
320
  exports["default"] = fromArray;
@@ -329,7 +331,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
329
331
  return (mod && mod.__esModule) ? mod : { "default": mod };
330
332
  };
331
333
  Object.defineProperty(exports, "__esModule", ({ value: true }));
332
- var find_1 = __importDefault(__webpack_require__(89129));
334
+ const find_1 = __importDefault(__webpack_require__(89129));
333
335
  /**
334
336
  * Tells you whether given word is in the {@link Node}.
335
337
  *
@@ -337,8 +339,8 @@ var find_1 = __importDefault(__webpack_require__(89129));
337
339
  * @param word - Word to be found.
338
340
  * @returns true if given word is in the {@link Node}, false otherwise.
339
341
  */
340
- var has = function (node, word) {
341
- var foundNode = find_1.default(node, word);
342
+ const has = (node, word) => {
343
+ const foundNode = (0, find_1.default)(node, word);
342
344
  return Boolean(foundNode && foundNode.wordEnd);
343
345
  };
344
346
  exports["default"] = has;
@@ -355,7 +357,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
355
357
  return (mod && mod.__esModule) ? mod : { "default": mod };
356
358
  };
357
359
  Object.defineProperty(exports, "__esModule", ({ value: true }));
358
- var find_1 = __importDefault(__webpack_require__(89129));
360
+ const find_1 = __importDefault(__webpack_require__(89129));
359
361
  /**
360
362
  * Tells you whether there are any words with given prefix in the {@link Node}.
361
363
  *
@@ -365,8 +367,8 @@ var find_1 = __importDefault(__webpack_require__(89129));
365
367
  * @param prefix - Prefix to be found.
366
368
  * @returns true if there are any words with given prefix in the {@link Node}, false otherwise.
367
369
  */
368
- var hasPrefix = function (node, prefix) {
369
- var foundNode = find_1.default(node, prefix);
370
+ const hasPrefix = (node, prefix) => {
371
+ const foundNode = (0, find_1.default)(node, prefix);
370
372
  return foundNode ? Object.keys(foundNode).length > 0 : false;
371
373
  };
372
374
  exports["default"] = hasPrefix;
@@ -424,7 +426,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
424
426
  * @param key2 - Second key to compare.
425
427
  * @returns -1 if key1 should precede key2, 0 if they're the same, 1 if key2 should precede key1.
426
428
  */
427
- var nodeKeyComparator = function (key1, key2) {
429
+ const nodeKeyComparator = (key1, key2) => {
428
430
  if (key1 === 'wordEnd') {
429
431
  return -1;
430
432
  }
@@ -451,7 +453,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
451
453
  * @param word - Word to be removed.
452
454
  * @returns true if the word was removed, false otherwise.
453
455
  */
454
- var remove = function (node, word) {
456
+ const remove = (node, word) => {
455
457
  if (word.length === 0) {
456
458
  if (node.wordEnd) {
457
459
  delete node.wordEnd;
@@ -459,12 +461,12 @@ var remove = function (node, word) {
459
461
  }
460
462
  return false;
461
463
  }
462
- var letter = word[0];
463
- var nextNode = node[letter];
464
+ const letter = word[0];
465
+ const nextNode = node[letter];
464
466
  if (!nextNode) {
465
467
  return false;
466
468
  }
467
- var removed = remove(nextNode, word.substring(1));
469
+ const removed = remove(nextNode, word.substring(1));
468
470
  if (!removed) {
469
471
  return false;
470
472
  }
@@ -484,18 +486,18 @@ exports["default"] = remove;
484
486
  "use strict";
485
487
 
486
488
  Object.defineProperty(exports, "__esModule", ({ value: true }));
487
- var constants_1 = __webpack_require__(31430);
488
- var serializeNode = function (node, character) {
489
- var letters = Object.keys(node).filter(function (key) { return key.length === 1; });
490
- var hasPrefix = letters.length > 0;
491
- var serialized = '';
489
+ const constants_1 = __webpack_require__(31430);
490
+ const serializeNode = (node, character) => {
491
+ const letters = Object.keys(node).filter((key) => key.length === 1);
492
+ const hasPrefix = letters.length > 0;
493
+ let serialized = '';
492
494
  if (node.wordEnd) {
493
495
  serialized += character;
494
496
  }
495
497
  if (hasPrefix) {
496
498
  serialized += character;
497
499
  serialized += constants_1.OPEN_PARENS;
498
- serialized += letters.map(function (letter) { return serializeNode(node[letter], letter); }).join('');
500
+ serialized += letters.map((letter) => serializeNode(node[letter], letter)).join('');
499
501
  serialized += constants_1.CLOSE_PARENS;
500
502
  }
501
503
  return serialized;
@@ -514,7 +516,7 @@ var serializeNode = function (node, character) {
514
516
  * @param node - {@link Node} to serialize.
515
517
  * @returns String with serialized data.
516
518
  */
517
- var serialize = function (node) { return serializeNode(node, ''); };
519
+ const serialize = (node) => serializeNode(node, '');
518
520
  exports["default"] = serialize;
519
521
 
520
522
 
@@ -529,7 +531,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
529
531
  return (mod && mod.__esModule) ? mod : { "default": mod };
530
532
  };
531
533
  Object.defineProperty(exports, "__esModule", ({ value: true }));
532
- var traverse_1 = __importDefault(__webpack_require__(6026));
534
+ const traverse_1 = __importDefault(__webpack_require__(6026));
533
535
  /**
534
536
  * Finds all {@link Descendant | descendants} of given {@link Node} and returns them as an array.
535
537
  *
@@ -537,12 +539,12 @@ var traverse_1 = __importDefault(__webpack_require__(6026));
537
539
  * @param options - See {@link TraverseOptions}.
538
540
  * @returns An array of {@link Descendant | descendants}.
539
541
  */
540
- var toArray = function (node, options) {
541
- var descendants = [];
542
- var callback = function (parameters) {
542
+ const toArray = (node, options) => {
543
+ const descendants = [];
544
+ const callback = (parameters) => {
543
545
  descendants.push(parameters);
544
546
  };
545
- traverse_1.default(node, callback, options);
547
+ (0, traverse_1.default)(node, callback, options);
546
548
  return descendants;
547
549
  };
548
550
  exports["default"] = toArray;
@@ -559,7 +561,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
559
561
  return (mod && mod.__esModule) ? mod : { "default": mod };
560
562
  };
561
563
  Object.defineProperty(exports, "__esModule", ({ value: true }));
562
- var nodeKeyComparator_1 = __importDefault(__webpack_require__(68693));
564
+ const nodeKeyComparator_1 = __importDefault(__webpack_require__(68693));
563
565
  /**
564
566
  * Visits every descendant {@link Node} of given {@link Node} and calls a callback.
565
567
  *
@@ -567,21 +569,20 @@ var nodeKeyComparator_1 = __importDefault(__webpack_require__(68693));
567
569
  * @param callback - Callback that will be called for each visited {@link Node}. Return true from callback to stop traversing.
568
570
  * @param options - See {@link TraverseOptions}.
569
571
  */
570
- var traverse = function (node, callback, options) {
571
- if (options === void 0) { options = {}; }
572
- var stack = [];
573
- var currentKeyIndex = 0;
574
- var currentNode = node;
575
- var currentPrefix = options.prefix || '';
572
+ const traverse = (node, callback, options = {}) => {
573
+ const stack = [];
574
+ let currentKeyIndex = 0;
575
+ let currentNode = node;
576
+ let currentPrefix = options.prefix || '';
576
577
  while (stack.length > 0 || currentNode) {
577
578
  while (currentNode) {
578
- var keys = Object.keys(currentNode);
579
+ const keys = Object.keys(currentNode);
579
580
  if (currentKeyIndex >= keys.length) {
580
581
  currentNode = undefined;
581
582
  }
582
583
  else {
583
- var sortedKeys = options.sort ? keys.sort(nodeKeyComparator_1.default) : keys;
584
- var key = sortedKeys[currentKeyIndex];
584
+ const sortedKeys = options.sort ? keys.sort(nodeKeyComparator_1.default) : keys;
585
+ const key = sortedKeys[currentKeyIndex];
585
586
  if (key === 'wordEnd') {
586
587
  ++currentKeyIndex;
587
588
  }
@@ -591,7 +592,7 @@ var traverse = function (node, callback, options) {
591
592
  currentNode = currentNode[key];
592
593
  currentPrefix += key;
593
594
  if (!options.wordsOnly || currentNode.wordEnd) {
594
- var shouldStop = callback({ node: currentNode, prefix: currentPrefix });
595
+ const shouldStop = callback({ node: currentNode, prefix: currentPrefix });
595
596
  if (shouldStop) {
596
597
  return;
597
598
  }
@@ -600,7 +601,7 @@ var traverse = function (node, callback, options) {
600
601
  }
601
602
  }
602
603
  if (stack.length > 0) {
603
- var state = stack.pop();
604
+ const state = stack.pop();
604
605
  currentKeyIndex = state.keyIndex + 1;
605
606
  currentNode = state.node;
606
607
  currentPrefix = currentPrefix.slice(0, -1);
@@ -917,7 +917,7 @@ const noop = ()=>undefined;
917
917
 
918
918
  ;// CONCATENATED MODULE: ./src/lib/createKeyboardNavigation.ts
919
919
 
920
- const createKeyboardNavigation = ({ onArrowDown =lib_noop , onArrowLeft =lib_noop , onArrowRight =lib_noop , onArrowUp =lib_noop , onBackspace =lib_noop , onDelete =lib_noop , onEnter =lib_noop , onKeyDown =lib_noop })=>{
920
+ const createKeyboardNavigation = ({ onArrowDown =lib_noop , onArrowLeft =lib_noop , onArrowRight =lib_noop , onArrowUp =lib_noop , onBackspace =lib_noop , onDelete =lib_noop , onEnter =lib_noop , onKeyDown =lib_noop , onSpace =lib_noop })=>{
921
921
  const handlers = {
922
922
  ArrowUp: onArrowUp,
923
923
  ArrowDown: onArrowDown,
@@ -925,7 +925,8 @@ const createKeyboardNavigation = ({ onArrowDown =lib_noop , onArrowLeft =lib_noo
925
925
  ArrowRight: onArrowRight,
926
926
  Backspace: onBackspace,
927
927
  Delete: onDelete,
928
- Enter: onEnter
928
+ Enter: onEnter,
929
+ " ": onSpace
929
930
  };
930
931
  const handleKeyDown = (event)=>{
931
932
  const handler = handlers[event.key] || lib_noop;
@@ -2623,7 +2624,7 @@ class Cell {
2623
2624
  };
2624
2625
  }
2625
2626
  toString() {
2626
- return String(this.tile);
2627
+ return this.tile.toString();
2627
2628
  }
2628
2629
  }
2629
2630
  Cell.Null = Object.freeze({
@@ -2901,7 +2902,7 @@ class Pattern {
2901
2902
  };
2902
2903
  }
2903
2904
  toString() {
2904
- return this.cells.map(String).join('');
2905
+ return this.cells.reduce((result, cell) => result + cell.toString(), '');
2905
2906
  }
2906
2907
  }
2907
2908
  exports["default"] = Pattern;