scrabble-solver 2.8.10 → 2.9.0

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 (100) hide show
  1. package/.eslintrc.js +2 -1
  2. package/README.md +9 -11
  3. package/lerna.json +1 -1
  4. package/package.json +1 -1
  5. package/packages/configs/package.json +3 -3
  6. package/packages/constants/package.json +1 -1
  7. package/packages/dictionaries/package-lock.json +2 -2
  8. package/packages/dictionaries/package.json +4 -4
  9. package/packages/logger/package-lock.json +2 -2
  10. package/packages/logger/package.json +1 -1
  11. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  12. package/packages/scrabble-solver/.next/InjectManifest.js.nft.json +1 -0
  13. package/packages/scrabble-solver/.next/build-manifest.json +9 -9
  14. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  15. package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
  16. package/packages/scrabble-solver/.next/cache/next-server.js.nft.json +1 -1
  17. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  18. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  19. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
  20. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  21. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  22. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  23. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  24. package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
  25. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  26. package/packages/scrabble-solver/.next/server/InjectManifest.js.nft.json +1 -0
  27. package/packages/scrabble-solver/.next/server/chunks/413.js +44 -17
  28. package/packages/scrabble-solver/.next/server/chunks/452.js +894 -0
  29. package/packages/scrabble-solver/.next/server/chunks/515.js +82 -45
  30. package/packages/scrabble-solver/.next/server/chunks/911.js +0 -887
  31. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  32. package/packages/scrabble-solver/.next/server/pages/404.html +3 -3
  33. package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
  34. package/packages/scrabble-solver/.next/server/pages/500.html +2 -2
  35. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  36. package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
  37. package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
  38. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
  39. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  40. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +200 -0
  41. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -0
  42. package/packages/scrabble-solver/.next/server/pages/api/solve.js +32 -2
  43. package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
  44. package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -1
  45. package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
  46. package/packages/scrabble-solver/.next/server/pages/index.html +7 -7
  47. package/packages/scrabble-solver/.next/server/pages/index.js +74 -29
  48. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  49. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  50. package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -0
  51. package/packages/scrabble-solver/.next/static/BiJ0RS1mh1CdONVQg_p20/_buildManifest.js +1 -0
  52. package/packages/scrabble-solver/.next/static/{A8A_Lmg8cM-Bkf-Jo1CLh → BiJ0RS1mh1CdONVQg_p20}/_ssgManifest.js +0 -0
  53. package/packages/scrabble-solver/.next/static/chunks/317-c5d262202c17d519.js +1 -0
  54. package/packages/scrabble-solver/.next/static/chunks/{758-eff80059a1365d5d.js → 546-447e243fc9de2c59.js} +1 -1
  55. package/packages/scrabble-solver/.next/static/chunks/pages/{404-90c624da3c83fd17.js → 404-7082923654d5996f.js} +1 -1
  56. package/packages/scrabble-solver/.next/static/chunks/pages/_app-1878e12521f2d115.js +1 -0
  57. package/packages/scrabble-solver/.next/static/chunks/pages/index-14d33636a0746c22.js +1 -0
  58. package/packages/scrabble-solver/.next/trace +52 -42
  59. package/packages/scrabble-solver/next.config.js +11 -0
  60. package/packages/scrabble-solver/package-lock.json +3992 -133
  61. package/packages/scrabble-solver/package.json +16 -10
  62. package/packages/scrabble-solver/src/components/Board/components/Cell/CellPure.tsx +33 -31
  63. package/packages/scrabble-solver/src/components/Board/hooks/useGrid.ts +23 -18
  64. package/packages/scrabble-solver/src/components/Sidebar/Sidebar.tsx +20 -1
  65. package/packages/scrabble-solver/src/components/SvgFontCss/SvgFontCss.tsx +2 -1
  66. package/packages/scrabble-solver/src/pages/api/dictionary/[locale]/index.ts +53 -0
  67. package/packages/scrabble-solver/src/pages/api/solve.ts +6 -0
  68. package/packages/scrabble-solver/src/pages/index.tsx +8 -1
  69. package/packages/scrabble-solver/src/sdk/fetch.ts +30 -0
  70. package/packages/scrabble-solver/src/sdk/fetchJson.ts +10 -31
  71. package/packages/scrabble-solver/src/sdk/getDictionary.ts +11 -0
  72. package/packages/scrabble-solver/src/service-worker/dictionaries/constants.ts +3 -0
  73. package/packages/scrabble-solver/src/service-worker/dictionaries/expirationManager.ts +9 -0
  74. package/packages/scrabble-solver/src/service-worker/dictionaries/getDictionary.ts +22 -0
  75. package/packages/scrabble-solver/src/service-worker/dictionaries/getDictionaryUrl.ts +7 -0
  76. package/packages/scrabble-solver/src/service-worker/dictionaries/index.ts +2 -0
  77. package/packages/scrabble-solver/src/service-worker/dictionaries/revalidateDictionary.ts +35 -0
  78. package/packages/scrabble-solver/src/service-worker/getTrie.ts +26 -0
  79. package/packages/scrabble-solver/src/service-worker/index.ts +22 -0
  80. package/packages/scrabble-solver/src/service-worker/routeSolveRequests.ts +37 -0
  81. package/packages/scrabble-solver/src/service-worker/routeVerifyRequests.ts +35 -0
  82. package/packages/scrabble-solver/src/serviceWorkerManager.ts +26 -0
  83. package/packages/scrabble-solver/src/state/sagas.ts +7 -0
  84. package/packages/scrabble-solver/src/state/slices/rackSlice.ts +0 -5
  85. package/packages/scrabble-solver/src/state/slices/settingsInitialState.ts +20 -1
  86. package/packages/scrabble-solver/tsconfig.json +1 -0
  87. package/packages/solver/build/index.d.ts +12 -0
  88. package/packages/solver/build/index.js +25 -1
  89. package/packages/solver/package-lock.json +2 -2
  90. package/packages/solver/package.json +5 -5
  91. package/packages/solver/src/index.ts +12 -0
  92. package/packages/types/package.json +2 -2
  93. package/packages/word-definitions/package-lock.json +8 -8
  94. package/packages/word-definitions/package.json +2 -2
  95. package/packages/word-lists/package-lock.json +2 -2
  96. package/packages/word-lists/package.json +2 -2
  97. package/packages/scrabble-solver/.next/static/A8A_Lmg8cM-Bkf-Jo1CLh/_buildManifest.js +0 -1
  98. package/packages/scrabble-solver/.next/static/chunks/317-95ab9051449362fa.js +0 -1
  99. package/packages/scrabble-solver/.next/static/chunks/pages/_app-0e358b5622cf9e66.js +0 -1
  100. package/packages/scrabble-solver/.next/static/chunks/pages/index-0cc5e6eda5adac73.js +0 -1
package/.eslintrc.js CHANGED
@@ -25,6 +25,7 @@ module.exports = {
25
25
  globals: {
26
26
  RequestInfo: true,
27
27
  RequestInit: true,
28
+ ServiceWorkerGlobalScope: true,
28
29
  beforeAll: true,
29
30
  define: true,
30
31
  describe: true,
@@ -373,7 +374,7 @@ module.exports = {
373
374
  'space-in-parens': ['error', 'never'],
374
375
  'space-infix-ops': 'error',
375
376
  'space-unary-ops': 'error',
376
- 'spaced-comment': ['error', 'always'],
377
+ 'spaced-comment': 'off',
377
378
  'unicode-bom': ['error', 'never'],
378
379
  'wrap-regex': 'off',
379
380
 
package/README.md CHANGED
@@ -23,9 +23,7 @@ Available at https://scrabble-solver.org in 6 languages:
23
23
  - 🇵🇱 Polish
24
24
  - 🇪🇸 Spanish
25
25
 
26
- Run it locally for better performance (your machine surely is faster than that server).
27
-
28
- It's cross-platform - all you need is [Node.js](https://nodejs.org/).
26
+ You can run it on your machine. It's cross-platform - all you need is [Node.js](https://nodejs.org/).
29
27
 
30
28
  ![alt User Interface](https://raw.githubusercontent.com/kamilmielnik/scrabble-solver/master/img/screencast.gif)
31
29
 
@@ -63,14 +61,14 @@ rm -rf $HOME/.scrabble-solver
63
61
 
64
62
  ## Dictionaries
65
63
 
66
- | Language | Word list | Word list source | Word definitions |
67
- | ---------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- |
68
- | 🇬🇧 English | [SOWPODS](https://en.wikipedia.org/wiki/Collins_Scrabble_Words) | [Download](https://www.wordgamedictionary.com/sowpods/download/sowpods.txt) | [Merriam-Webster](https://www.merriam-webster.com/) |
69
- | 🇺🇸 English | [TWL06](https://en.wikipedia.org/wiki/NASPA_Word_List) | [Download](https://www.wordgamedictionary.com/twl06/download/twl06.txt) | [Merriam-Webster](https://www.merriam-webster.com/) |
70
- | 🇫🇷 French | [hbenbel/French-Dictionary](https://github.com/hbenbel/French-Dictionary/) | [Download](https://raw.githubusercontent.com/hbenbel/French-Dictionary/a573eab10cc798d7d5da7daab4d2ac0259bb46a3/dictionary/dictionary.txt) | [CNRTL](https://www.cnrtl.fr/) |
71
- | 🇩🇪 German | [enz/german-wordlist](https://github.com/enz/german-wordlist) | [Download](https://raw.githubusercontent.com/enz/german-wordlist/master/words) | [DWDS](https://www.dwds.de) |
72
- | 🇵🇱 Polish | [SJP.PL](https://sjp.pl/slownik/dp.phtml) | [Download](https://sjp.pl/slownik/growy/) | [SJP.PL](https://sjp.pl) |
73
- | 🇪🇸 Spanish | [FISE-2](https://fisescrabble.org/) | [Download](https://github.com/kamilmielnik/fise-2/blob/master/fise-2.txt) | [Diccionarios.com](https://www.diccionarios.com/) |
64
+ | Language | Word list | Word list source | Word definitions | [Highest-scoring word](https://codesandbox.io/s/highest-scoring-words-in-scrabble-vbj1ns?file=/src/index.js) |
65
+ |------------|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
66
+ | 🇬🇧 English | [SOWPODS](https://en.wikipedia.org/wiki/Collins_Scrabble_Words) | [Download](https://www.wordgamedictionary.com/sowpods/download/sowpods.txt) | [Merriam-Webster](https://www.merriam-webster.com/) | quizzifications (1566) |
67
+ | 🇺🇸 English | [TWL06](https://en.wikipedia.org/wiki/NASPA_Word_List) | [Download](https://www.wordgamedictionary.com/twl06/download/twl06.txt) | [Merriam-Webster](https://www.merriam-webster.com/) | oxyphenbutazone (1458) |
68
+ | 🇫🇷 French | [hbenbel/French-Dictionary](https://github.com/hbenbel/French-Dictionary/) | [Download](https://raw.githubusercontent.com/hbenbel/French-Dictionary/a573eab10cc798d7d5da7daab4d2ac0259bb46a3/dictionary/dictionary.txt) | [CNRTL](https://www.cnrtl.fr/) | encyclopediques (1512) |
69
+ | 🇩🇪 German | [enz/german-wordlist](https://github.com/enz/german-wordlist) | [Download](https://raw.githubusercontent.com/enz/german-wordlist/master/words) | [DWDS](https://www.dwds.de) | gynäkologischem (1431) |
70
+ | 🇵🇱 Polish | [SJP.PL](https://sjp.pl/slownik/dp.phtml) | [Download](https://sjp.pl/slownik/growy/) | [SJP.PL](https://sjp.pl) | współposiądźmyż (1512) |
71
+ | 🇪🇸 Spanish | [FISE-2](https://fisescrabble.org/) | [Download](https://github.com/kamilmielnik/fise-2/blob/master/fise-2.txt) | [Diccionarios.com](https://www.diccionarios.com/) | flexibilizabais (1323) |
74
72
 
75
73
  ## Tech stack
76
74
 
package/lerna.json CHANGED
@@ -6,5 +6,5 @@
6
6
  "access": "public"
7
7
  },
8
8
  "tagVersionPrefix": "",
9
- "version": "2.8.10"
9
+ "version": "2.9.0"
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scrabble-solver",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "description": "Scrabble Solver 2 - Free and open-source analysis tool for Scrabble and Literaki. Quickly find top scoring words using given letters and board state. Available in English, French, German, Polish & Spanish.",
5
5
  "keywords": [
6
6
  "Scrabble",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/configs",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "description": "Scrabble Solver 2 - Configs",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  "clean:force": "npm run clean && rimraf package-lock.json"
25
25
  },
26
26
  "dependencies": {
27
- "@scrabble-solver/constants": "^2.8.10",
28
- "@scrabble-solver/types": "^2.8.10"
27
+ "@scrabble-solver/constants": "^2.9.0",
28
+ "@scrabble-solver/types": "^2.9.0"
29
29
  },
30
30
  "gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
31
31
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/constants",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "description": "Scrabble Solver 2 - Constants",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@scrabble-solver/dictionaries",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@scrabble-solver/dictionaries",
9
- "version": "2.8.10",
9
+ "version": "2.9.0",
10
10
  "license": "CC-BY-NC-ND-4.0",
11
11
  "dependencies": {
12
12
  "@kamilmielnik/trie": "^2.0.1"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/dictionaries",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "description": "Scrabble Solver 2 - Dictionaries",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -31,9 +31,9 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@kamilmielnik/trie": "^2.0.1",
34
- "@scrabble-solver/logger": "^2.8.10",
35
- "@scrabble-solver/types": "^2.8.10",
36
- "@scrabble-solver/word-lists": "^2.8.10"
34
+ "@scrabble-solver/logger": "^2.9.0",
35
+ "@scrabble-solver/types": "^2.9.0",
36
+ "@scrabble-solver/word-lists": "^2.9.0"
37
37
  },
38
38
  "gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
39
39
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@scrabble-solver/logger",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@scrabble-solver/logger",
9
- "version": "2.8.10",
9
+ "version": "2.9.0",
10
10
  "license": "CC-BY-NC-ND-4.0",
11
11
  "dependencies": {
12
12
  "winston": "^3.8.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/logger",
3
- "version": "2.8.10",
3
+ "version": "2.9.0",
4
4
  "description": "Scrabble Solver 2 - Logger",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1 +1 @@
1
- A8A_Lmg8cM-Bkf-Jo1CLh
1
+ BiJ0RS1mh1CdONVQg_p20
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../public/service-worker.js","../public/service-worker.js.map","../package.json"]}
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/A8A_Lmg8cM-Bkf-Jo1CLh/_buildManifest.js",
9
- "static/A8A_Lmg8cM-Bkf-Jo1CLh/_ssgManifest.js"
8
+ "static/BiJ0RS1mh1CdONVQg_p20/_buildManifest.js",
9
+ "static/BiJ0RS1mh1CdONVQg_p20/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [],
12
12
  "pages": {
@@ -14,27 +14,27 @@
14
14
  "static/chunks/webpack-5752944655d749a0.js",
15
15
  "static/chunks/framework-4556c45dd113b893.js",
16
16
  "static/chunks/main-a75cf611e061d8f8.js",
17
- "static/chunks/758-eff80059a1365d5d.js",
17
+ "static/chunks/546-447e243fc9de2c59.js",
18
18
  "static/css/9ac903004135f4b1.css",
19
- "static/chunks/317-95ab9051449362fa.js",
19
+ "static/chunks/317-c5d262202c17d519.js",
20
20
  "static/css/751e8a14776d05d8.css",
21
- "static/chunks/pages/index-0cc5e6eda5adac73.js"
21
+ "static/chunks/pages/index-14d33636a0746c22.js"
22
22
  ],
23
23
  "/404": [
24
24
  "static/chunks/webpack-5752944655d749a0.js",
25
25
  "static/chunks/framework-4556c45dd113b893.js",
26
26
  "static/chunks/main-a75cf611e061d8f8.js",
27
- "static/chunks/758-eff80059a1365d5d.js",
27
+ "static/chunks/546-447e243fc9de2c59.js",
28
28
  "static/css/9ac903004135f4b1.css",
29
- "static/chunks/317-95ab9051449362fa.js",
30
- "static/chunks/pages/404-90c624da3c83fd17.js"
29
+ "static/chunks/317-c5d262202c17d519.js",
30
+ "static/chunks/pages/404-7082923654d5996f.js"
31
31
  ],
32
32
  "/_app": [
33
33
  "static/chunks/webpack-5752944655d749a0.js",
34
34
  "static/chunks/framework-4556c45dd113b893.js",
35
35
  "static/chunks/main-a75cf611e061d8f8.js",
36
36
  "static/css/ad2a08918868cad8.css",
37
- "static/chunks/pages/_app-0e358b5622cf9e66.js"
37
+ "static/chunks/pages/_app-1878e12521f2d115.js"
38
38
  ],
39
39
  "/_error": [
40
40
  "static/chunks/webpack-5752944655d749a0.js",