@scrabble-solver/scrabble-solver 2.13.0 → 2.13.1

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 (39) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/next-server.js.nft.json +1 -1
  4. package/.next/cache/webpack/client-production/0.pack +0 -0
  5. package/.next/cache/webpack/client-production/index.pack +0 -0
  6. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  7. package/.next/cache/webpack/edge-server-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/277.js +17 -14
  14. package/.next/server/chunks/44.js +22 -27
  15. package/.next/server/chunks/{131.js → 907.js} +924 -2
  16. package/.next/server/chunks/911.js +17 -14
  17. package/.next/server/middleware-build-manifest.js +1 -1
  18. package/.next/server/pages/404.html +1 -1
  19. package/.next/server/pages/404.js.nft.json +1 -1
  20. package/.next/server/pages/500.html +1 -1
  21. package/.next/server/pages/_app.js.nft.json +1 -1
  22. package/.next/server/pages/_document.js.nft.json +1 -1
  23. package/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
  24. package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  25. package/.next/server/pages/api/dictionary/[locale].js +1 -1
  26. package/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  27. package/.next/server/pages/api/solve.js +1 -1
  28. package/.next/server/pages/api/solve.js.nft.json +1 -1
  29. package/.next/server/pages/api/verify.js +1 -1
  30. package/.next/server/pages/api/verify.js.nft.json +1 -1
  31. package/.next/server/pages/index.html +1 -1
  32. package/.next/server/pages/index.js.nft.json +1 -1
  33. package/.next/server/pages/index.json +1 -1
  34. package/.next/server/pages-manifest.json +1 -1
  35. package/.next/static/chunks/pages/{_app-9c8edd7786319b76.js → _app-b92880dde164b954.js} +1 -1
  36. package/.next/trace +51 -51
  37. package/package.json +9 -9
  38. /package/.next/static/{CltG6_MGtxzoDJ0EuX7kt → RJ5_dKU0dHcryeTVO6SSX}/_buildManifest.js +0 -0
  39. /package/.next/static/{CltG6_MGtxzoDJ0EuX7kt → RJ5_dKU0dHcryeTVO6SSX}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":null,"dataRoute":"/_next/data/CltG6_MGtxzoDJ0EuX7kt/index.json"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"81a4fbf3cd5f952536d9c94781b19e44","previewModeSigningKey":"fa32113261f23038b6f670debb868bdf0f232107a8528a7da79cde6cef97c168","previewModeEncryptionKey":"a98aa45e242ba97165e43472c93f1f61f06355cd59cf205988e598f33fe13a34"}}
1
+ {"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":null,"dataRoute":"/_next/data/RJ5_dKU0dHcryeTVO6SSX/index.json"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"ccf4f8795679d187e798dceaa4c11f7d","previewModeSigningKey":"960ad9870a2bafbe84738c67fd359ef31fd7d0020361a88a7393c44aba54c794","previewModeEncryptionKey":"2782480b0f2ccd50f451915f6d7bc3bea80c62d99eefa3359cfc2b20afe6c820"}}
@@ -1 +1 @@
1
- {"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/api/dictionary/[locale]","regex":"^/api/dictionary/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)(?:/)?$"},{"page":"/api/dictionary/[locale]/[word]","regex":"^/api/dictionary/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale","nextParamword":"nextParamword"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)/(?<nextParamword>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/CltG6_MGtxzoDJ0EuX7kt/index.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","contentTypeHeader":"text/x-component"},"rewrites":[]}
1
+ {"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/api/dictionary/[locale]","regex":"^/api/dictionary/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)(?:/)?$"},{"page":"/api/dictionary/[locale]/[word]","regex":"^/api/dictionary/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale","nextParamword":"nextParamword"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)/(?<nextParamword>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/RJ5_dKU0dHcryeTVO6SSX/index.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","contentTypeHeader":"text/x-component"},"rewrites":[]}
@@ -1060,29 +1060,32 @@ const roRo = [
1060
1060
  new types_1.Config({
1061
1061
  ...games_1.scrabble,
1062
1062
  locale: types_1.Locale.RO_RO,
1063
+ /**
1064
+ * @see https://frsc1.fortunecity.ws/reg6scr.htm#vallit
1065
+ */
1063
1066
  tiles: [
1064
- { character: 'a', count: 10, score: 1 },
1065
- { character: 'b', count: 2, score: 5 },
1067
+ { character: 'a', count: 11, score: 1 },
1068
+ { character: 'b', count: 2, score: 9 },
1066
1069
  { character: 'c', count: 5, score: 1 },
1067
- { character: 'd', count: 4, score: 3 },
1070
+ { character: 'd', count: 4, score: 2 },
1068
1071
  { character: 'e', count: 9, score: 1 },
1069
- { character: 'f', count: 2, score: 4 },
1070
- { character: 'g', count: 2, score: 6 },
1071
- { character: 'h', count: 1, score: 8 },
1072
- { character: 'i', count: 11, score: 1 },
1072
+ { character: 'f', count: 2, score: 8 },
1073
+ { character: 'g', count: 2, score: 9 },
1074
+ { character: 'h', count: 1, score: 10 },
1075
+ { character: 'i', count: 10, score: 1 },
1073
1076
  { character: 'j', count: 1, score: 10 },
1074
- { character: 'l', count: 5, score: 1 },
1077
+ { character: 'l', count: 4, score: 1 },
1075
1078
  { character: 'm', count: 3, score: 4 },
1076
1079
  { character: 'n', count: 6, score: 1 },
1077
- { character: 'o', count: 5, score: 2 },
1080
+ { character: 'o', count: 5, score: 1 },
1078
1081
  { character: 'p', count: 4, score: 2 },
1079
- { character: 'r', count: 6, score: 1 },
1080
- { character: 's', count: 6, score: 1 },
1082
+ { character: 'r', count: 7, score: 1 },
1083
+ { character: 's', count: 5, score: 1 },
1081
1084
  { character: 't', count: 7, score: 1 },
1082
- { character: 'u', count: 5, score: 1 },
1083
- { character: 'v', count: 2, score: 4 },
1085
+ { character: 'u', count: 6, score: 1 },
1086
+ { character: 'v', count: 2, score: 8 },
1084
1087
  { character: 'x', count: 1, score: 10 },
1085
- { character: 'z', count: 1, score: 8 },
1088
+ { character: 'z', count: 1, score: 10 },
1086
1089
  ],
1087
1090
  }),
1088
1091
  ];
@@ -1368,20 +1368,24 @@ exports["default"] = getEnUsWordList;
1368
1368
  /***/ }),
1369
1369
 
1370
1370
  /***/ 87537:
1371
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1371
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1372
1372
 
1373
1373
 
1374
+ var __importDefault = (this && this.__importDefault) || function (mod) {
1375
+ return (mod && mod.__esModule) ? mod : { "default": mod };
1376
+ };
1374
1377
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1375
1378
  const types_1 = __webpack_require__(46452);
1379
+ const latinize_1 = __importDefault(__webpack_require__(66761));
1376
1380
  const lib_1 = __webpack_require__(60337);
1377
- const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/fise-2/master/fise-2.txt';
1381
+ const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/master/spanish/fise-2.txt';
1382
+ const N_PLACEHOLDER = '---n---';
1378
1383
  const getEsEsWordList = async () => {
1379
1384
  const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.ES_ES);
1380
- return words.map(normalizeWord);
1381
- };
1382
- const normalizeWord = (word) => {
1383
- // normalization from https://stackoverflow.com/a/37511463
1384
- return word.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
1385
+ return words
1386
+ .map((word) => word.replaceAll('ñ', N_PLACEHOLDER))
1387
+ .map(latinize_1.default)
1388
+ .map((word) => word.replaceAll(N_PLACEHOLDER, 'ñ'));
1385
1389
  };
1386
1390
  exports["default"] = getEsEsWordList;
1387
1391
 
@@ -1405,20 +1409,20 @@ exports["default"] = getFaIrWordList;
1405
1409
  /***/ }),
1406
1410
 
1407
1411
  /***/ 27098:
1408
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1412
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1409
1413
 
1410
1414
 
1415
+ var __importDefault = (this && this.__importDefault) || function (mod) {
1416
+ return (mod && mod.__esModule) ? mod : { "default": mod };
1417
+ };
1411
1418
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1412
1419
  const types_1 = __webpack_require__(46452);
1420
+ const latinize_1 = __importDefault(__webpack_require__(66761));
1413
1421
  const lib_1 = __webpack_require__(60337);
1414
1422
  const FILE_URL = 'https://raw.githubusercontent.com/Thecoolsim/French-Scrabble-ODS8/main/French%20ODS%20dictionary.txt';
1415
1423
  const getFrFrWordList = async () => {
1416
1424
  const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.FR_FR);
1417
- return words.map(normalizeWord);
1418
- };
1419
- const normalizeWord = (word) => {
1420
- // normalization from https://stackoverflow.com/a/37511463
1421
- return word.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
1425
+ return words.map(latinize_1.default);
1422
1426
  };
1423
1427
  exports["default"] = getFrFrWordList;
1424
1428
 
@@ -1481,22 +1485,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
1481
1485
  return (mod && mod.__esModule) ? mod : { "default": mod };
1482
1486
  };
1483
1487
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1484
- const fs_1 = __importDefault(__webpack_require__(57147));
1488
+ const types_1 = __webpack_require__(46452);
1489
+ const latinize_1 = __importDefault(__webpack_require__(66761));
1485
1490
  const lib_1 = __webpack_require__(60337);
1486
- const FILE_URL = 'https://dexonline.ro/static/download/scrabble/loc-flexiuni-5.0.zip';
1487
- const FILE_TO_EXTRACT_FROM_ZIP = 'loc-flexiuni-5.0.txt';
1491
+ const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/master/romanian/loc-5.0.txt';
1488
1492
  const getRoRoWordList = async () => {
1489
- const tempFilepath = (0, lib_1.getTempFilepath)();
1490
- const zipTempFilename = await (0, lib_1.downloadFile)(FILE_URL);
1491
- await (0, lib_1.unzip)(zipTempFilename, FILE_TO_EXTRACT_FROM_ZIP, tempFilepath);
1492
- fs_1.default.unlinkSync(zipTempFilename);
1493
- const file = fs_1.default.readFileSync(tempFilepath, 'utf-8');
1494
- fs_1.default.unlinkSync(tempFilepath);
1495
- const words = (0, lib_1.extractWords)(replaceDiacritics(file.toLocaleString()), 'ro-RO');
1496
- return words;
1497
- };
1498
- const replaceDiacritics = (file) => {
1499
- return file.replaceAll('ă', 'a').replaceAll('â', 'a').replaceAll('î', 'i').replaceAll('ș', 's').replaceAll('ț', 't');
1493
+ const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.RO_RO);
1494
+ return words.map(latinize_1.default);
1500
1495
  };
1501
1496
  exports["default"] = getRoRoWordList;
1502
1497