scrabble-solver 2.15.9 → 2.15.11

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 (593) hide show
  1. package/.nx/workspace-data/file-map.json +1341 -1333
  2. package/.nx/workspace-data/lockfile.hash +1 -1
  3. package/.nx/workspace-data/nx_files.nxt +0 -0
  4. package/.nx/workspace-data/parsed-lock-file.json +454 -251
  5. package/.nx/workspace-data/project-graph.json +480 -254
  6. package/.nx/workspace-data/source-maps.json +32 -0
  7. package/README.md +1 -1
  8. package/cypress/support/lib/actions.ts +2 -2
  9. package/cypress/support/lib/selectors.ts +9 -9
  10. package/cypress/tsconfig.json +2 -1
  11. package/cypress.config.ts +1 -0
  12. package/eslint.config.mjs +31 -8
  13. package/lerna.json +1 -1
  14. package/package.json +15 -12
  15. package/packages/configs/build/games/index.d.ts +2 -0
  16. package/packages/configs/build/games/index.js +2 -0
  17. package/packages/configs/build/games/kelimelik.d.ts +5 -2
  18. package/packages/configs/build/games/kelimelik.js +3 -2
  19. package/packages/configs/build/games/letterLeague.d.ts +19 -0
  20. package/packages/configs/build/games/letterLeague.js +161 -0
  21. package/packages/configs/build/games/literaki.d.ts +5 -2
  22. package/packages/configs/build/games/literaki.js +3 -2
  23. package/packages/configs/build/games/scrabble.d.ts +5 -2
  24. package/packages/configs/build/games/scrabble.js +3 -2
  25. package/packages/configs/build/games/scrabbleDuel.d.ts +19 -0
  26. package/packages/configs/build/games/scrabbleDuel.js +50 -0
  27. package/packages/configs/build/games/superScrabble.d.ts +5 -2
  28. package/packages/configs/build/games/superScrabble.js +3 -2
  29. package/packages/configs/build/languages/english.d.ts +6 -2
  30. package/packages/configs/build/languages/english.js +164 -36
  31. package/packages/configs/package.json +3 -3
  32. package/packages/configs/src/games/index.ts +2 -0
  33. package/packages/configs/src/games/kelimelik.ts +3 -2
  34. package/packages/configs/src/games/letterLeague.ts +177 -0
  35. package/packages/configs/src/games/literaki.ts +3 -2
  36. package/packages/configs/src/games/scrabble.ts +3 -2
  37. package/packages/configs/src/games/scrabbleDuel.ts +56 -0
  38. package/packages/configs/src/games/superScrabble.ts +3 -2
  39. package/packages/configs/src/languages/english.ts +169 -37
  40. package/packages/constants/package.json +1 -1
  41. package/packages/dictionaries/build/Dictionaries.d.ts +1 -2
  42. package/packages/dictionaries/build/Dictionaries.js +6 -5
  43. package/packages/dictionaries/build/index.d.ts +1 -1
  44. package/packages/dictionaries/build/index.js +2 -5
  45. package/packages/dictionaries/build/lib/DiskCache.d.ts +1 -2
  46. package/packages/dictionaries/build/lib/DiskCache.js +7 -6
  47. package/packages/dictionaries/build/lib/LayeredCache.d.ts +1 -2
  48. package/packages/dictionaries/build/lib/LayeredCache.js +7 -9
  49. package/packages/dictionaries/build/lib/MemoryCache.d.ts +1 -2
  50. package/packages/dictionaries/build/lib/MemoryCache.js +2 -1
  51. package/packages/dictionaries/build/lib/createAsyncProxy.d.ts +2 -2
  52. package/packages/dictionaries/build/lib/createAsyncProxy.js +2 -1
  53. package/packages/dictionaries/build/lib/createCacheTimestampComparator.d.ts +1 -2
  54. package/packages/dictionaries/build/lib/createCacheTimestampComparator.js +2 -1
  55. package/packages/dictionaries/build/lib/downloadDictionary.d.ts +1 -2
  56. package/packages/dictionaries/build/lib/downloadDictionary.js +5 -7
  57. package/packages/dictionaries/build/lib/getDictionaryFilepath.d.ts +1 -2
  58. package/packages/dictionaries/build/lib/getDictionaryFilepath.js +2 -1
  59. package/packages/dictionaries/build/lib/index.d.ts +7 -7
  60. package/packages/dictionaries/build/lib/index.js +7 -10
  61. package/packages/dictionaries/build/{types/Cache.d.ts → types.d.ts} +1 -2
  62. package/packages/dictionaries/package.json +4 -4
  63. package/packages/dictionaries/src/Dictionaries.ts +3 -4
  64. package/packages/dictionaries/src/index.ts +2 -1
  65. package/packages/dictionaries/src/lib/DiskCache.ts +2 -4
  66. package/packages/dictionaries/src/lib/LayeredCache.ts +4 -6
  67. package/packages/dictionaries/src/lib/MemoryCache.ts +2 -3
  68. package/packages/dictionaries/src/lib/createAsyncProxy.ts +1 -3
  69. package/packages/dictionaries/src/lib/createCacheTimestampComparator.ts +1 -3
  70. package/packages/dictionaries/src/lib/downloadDictionary.ts +2 -4
  71. package/packages/dictionaries/src/lib/getDictionaryFilepath.ts +1 -3
  72. package/packages/dictionaries/src/lib/index.ts +7 -7
  73. package/packages/dictionaries/src/{types/Cache.ts → types.ts} +1 -3
  74. package/packages/logger/build/index.d.ts +1 -1
  75. package/packages/logger/build/index.js +2 -5
  76. package/packages/logger/build/logger.d.ts +1 -2
  77. package/packages/logger/build/logger.js +2 -2
  78. package/packages/logger/package.json +1 -1
  79. package/packages/logger/src/index.ts +1 -1
  80. package/packages/logger/src/logger.ts +1 -3
  81. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  82. package/packages/scrabble-solver/.next/build-manifest.json +9 -9
  83. package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
  84. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  85. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  86. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  87. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
  88. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
  89. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  90. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  91. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  92. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  93. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
  94. package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
  95. package/packages/scrabble-solver/.next/next-minimal-server.js.nft.json +1 -1
  96. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  97. package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
  98. package/packages/scrabble-solver/.next/required-server-files.json +1 -2
  99. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  100. package/packages/scrabble-solver/.next/server/chunks/60.js +1 -1
  101. package/packages/scrabble-solver/.next/server/chunks/812.js +1 -1
  102. package/packages/scrabble-solver/.next/server/chunks/974.js +1 -1
  103. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  104. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  105. package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
  106. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  107. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  108. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +2 -2
  109. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  110. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +1 -1
  111. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  112. package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
  113. package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
  114. package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -1
  115. package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
  116. package/packages/scrabble-solver/.next/server/pages/api/visit.js +1 -1
  117. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  118. package/packages/scrabble-solver/.next/server/pages/index.js +1 -1
  119. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  120. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  121. package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -1
  122. package/packages/scrabble-solver/.next/server/webpack-api-runtime.js +1 -1
  123. package/packages/scrabble-solver/.next/static/{3MlxnccTCLyz9bgD30zY2 → 47JHul8F9NSWCNSEuahuL}/_buildManifest.js +1 -1
  124. package/packages/scrabble-solver/.next/static/chunks/{main-b934e2c3dd3b55b5.js → main-016492249b3393e2.js} +1 -1
  125. package/packages/scrabble-solver/.next/static/chunks/pages/{404-7451dd58396eaa39.js → 404-590e2a3839c1d9e0.js} +1 -1
  126. package/packages/scrabble-solver/.next/static/chunks/pages/_app-0e951de0aebb6505.js +1 -0
  127. package/packages/scrabble-solver/.next/static/chunks/pages/index-c1d5a66d0f4794a6.js +1 -0
  128. package/packages/scrabble-solver/.next/trace +23 -23
  129. package/packages/scrabble-solver/next.config.js +3 -0
  130. package/packages/scrabble-solver/package.json +11 -10
  131. package/packages/scrabble-solver/public/service-worker.js +2 -2
  132. package/packages/scrabble-solver/public/service-worker.js.map +1 -1
  133. package/packages/scrabble-solver/src/api/getServerLoggingData.ts +1 -3
  134. package/packages/scrabble-solver/src/api/index.ts +5 -5
  135. package/packages/scrabble-solver/src/api/isBoardValid.ts +3 -5
  136. package/packages/scrabble-solver/src/api/isCellValid.ts +4 -6
  137. package/packages/scrabble-solver/src/api/isCharacterValid.ts +2 -3
  138. package/packages/scrabble-solver/src/api/isRowValid.ts +3 -5
  139. package/packages/scrabble-solver/src/components/Alert/Alert.tsx +1 -3
  140. package/packages/scrabble-solver/src/components/Alert/index.ts +1 -1
  141. package/packages/scrabble-solver/src/components/Badge/Badge.tsx +1 -3
  142. package/packages/scrabble-solver/src/components/Badge/index.ts +1 -1
  143. package/packages/scrabble-solver/src/components/Board/Board.tsx +2 -4
  144. package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +3 -3
  145. package/packages/scrabble-solver/src/components/Board/components/Actions/Actions.tsx +3 -5
  146. package/packages/scrabble-solver/src/components/Board/components/Actions/index.ts +1 -1
  147. package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.tsx +3 -5
  148. package/packages/scrabble-solver/src/components/Board/components/Cell/index.ts +1 -1
  149. package/packages/scrabble-solver/src/components/Board/components/InputPrompt/InputPrompt.tsx +3 -5
  150. package/packages/scrabble-solver/src/components/Board/components/InputPrompt/index.ts +1 -1
  151. package/packages/scrabble-solver/src/components/Board/components/ToggleDirectionButton/ToggleDirectionButton.tsx +2 -4
  152. package/packages/scrabble-solver/src/components/Board/components/ToggleDirectionButton/index.ts +1 -1
  153. package/packages/scrabble-solver/src/components/Board/components/index.ts +4 -4
  154. package/packages/scrabble-solver/src/components/Board/hooks/index.ts +6 -6
  155. package/packages/scrabble-solver/src/components/Board/hooks/useBackgroundImage.tsx +7 -9
  156. package/packages/scrabble-solver/src/components/Board/hooks/useBoardStyle.ts +7 -9
  157. package/packages/scrabble-solver/src/components/Board/hooks/useFloatingActions.ts +1 -3
  158. package/packages/scrabble-solver/src/components/Board/hooks/useFloatingFocus.ts +1 -3
  159. package/packages/scrabble-solver/src/components/Board/hooks/useFloatingInputPrompt.ts +1 -3
  160. package/packages/scrabble-solver/src/components/Board/hooks/useGrid.ts +2 -4
  161. package/packages/scrabble-solver/src/components/Board/index.ts +1 -1
  162. package/packages/scrabble-solver/src/components/Board/lib/getBonusColor.ts +1 -3
  163. package/packages/scrabble-solver/src/components/Board/lib/getPositionInGrid.ts +1 -3
  164. package/packages/scrabble-solver/src/components/Board/lib/index.ts +2 -2
  165. package/packages/scrabble-solver/src/components/Button/Button.tsx +3 -3
  166. package/packages/scrabble-solver/src/components/Button/Link.tsx +1 -3
  167. package/packages/scrabble-solver/src/components/Button/index.ts +1 -1
  168. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.tsx +3 -5
  169. package/packages/scrabble-solver/src/components/Dictionary/index.ts +1 -1
  170. package/packages/scrabble-solver/src/components/DictionaryInput/DictionaryInput.tsx +1 -3
  171. package/packages/scrabble-solver/src/components/DictionaryInput/index.ts +1 -1
  172. package/packages/scrabble-solver/src/components/EmptyState/EmptyState.tsx +2 -4
  173. package/packages/scrabble-solver/src/components/EmptyState/index.ts +1 -1
  174. package/packages/scrabble-solver/src/components/IconButton/IconButton.tsx +3 -3
  175. package/packages/scrabble-solver/src/components/IconButton/Link.tsx +1 -3
  176. package/packages/scrabble-solver/src/components/IconButton/index.ts +1 -1
  177. package/packages/scrabble-solver/src/components/Key/Key.tsx +1 -3
  178. package/packages/scrabble-solver/src/components/Key/index.ts +1 -1
  179. package/packages/scrabble-solver/src/components/Keys/Arrows/Arrows.tsx +2 -4
  180. package/packages/scrabble-solver/src/components/Keys/Arrows/index.ts +1 -1
  181. package/packages/scrabble-solver/src/components/{keys.tsx → Keys/index.tsx} +3 -1
  182. package/packages/scrabble-solver/src/components/Loading/Loading.tsx +2 -4
  183. package/packages/scrabble-solver/src/components/Loading/index.ts +1 -1
  184. package/packages/scrabble-solver/src/components/Logo/Logo.tsx +1 -3
  185. package/packages/scrabble-solver/src/components/Logo/LogoBlueprint.tsx +2 -4
  186. package/packages/scrabble-solver/src/components/Logo/index.ts +1 -1
  187. package/packages/scrabble-solver/src/components/Modal/Modal.tsx +3 -3
  188. package/packages/scrabble-solver/src/components/Modal/components/Section/Section.tsx +1 -3
  189. package/packages/scrabble-solver/src/components/Modal/components/Section/index.ts +1 -1
  190. package/packages/scrabble-solver/src/components/Modal/components/index.ts +1 -1
  191. package/packages/scrabble-solver/src/components/Modal/index.ts +1 -1
  192. package/packages/scrabble-solver/src/components/NavButtons/NavButtons.tsx +16 -13
  193. package/packages/scrabble-solver/src/components/NavButtons/index.ts +1 -1
  194. package/packages/scrabble-solver/src/components/NotFound/NotFound.tsx +2 -4
  195. package/packages/scrabble-solver/src/components/NotFound/index.ts +1 -1
  196. package/packages/scrabble-solver/src/components/PlainTiles/PlainTiles.tsx +10 -4
  197. package/packages/scrabble-solver/src/components/PlainTiles/Tile.tsx +1 -3
  198. package/packages/scrabble-solver/src/components/PlainTiles/index.ts +1 -1
  199. package/packages/scrabble-solver/src/components/PlainTiles/lib/createPlainTile.ts +10 -6
  200. package/packages/scrabble-solver/src/components/PlainTiles/lib/createPlainTiles.ts +2 -4
  201. package/packages/scrabble-solver/src/components/PlainTiles/lib/getViewbox.ts +1 -3
  202. package/packages/scrabble-solver/src/components/PlainTiles/lib/getX.ts +1 -3
  203. package/packages/scrabble-solver/src/components/PlainTiles/lib/getY.ts +1 -3
  204. package/packages/scrabble-solver/src/components/PlainTiles/lib/index.ts +6 -6
  205. package/packages/scrabble-solver/src/components/PlainTiles/lib/randomize.ts +1 -3
  206. package/packages/scrabble-solver/src/components/Progress/Progress.tsx +1 -3
  207. package/packages/scrabble-solver/src/components/Progress/index.ts +1 -1
  208. package/packages/scrabble-solver/src/components/Rack/Rack.tsx +2 -4
  209. package/packages/scrabble-solver/src/components/Rack/components/InputPrompt/InputPrompt.tsx +2 -2
  210. package/packages/scrabble-solver/src/components/Rack/components/InputPrompt/index.ts +1 -1
  211. package/packages/scrabble-solver/src/components/Rack/components/RackTile/RackTile.tsx +4 -7
  212. package/packages/scrabble-solver/src/components/Rack/components/RackTile/index.ts +1 -1
  213. package/packages/scrabble-solver/src/components/Rack/components/index.ts +2 -2
  214. package/packages/scrabble-solver/src/components/Rack/index.ts +1 -1
  215. package/packages/scrabble-solver/src/components/Radio/Radio.tsx +1 -3
  216. package/packages/scrabble-solver/src/components/Radio/index.ts +1 -1
  217. package/packages/scrabble-solver/src/components/Results/Cell.tsx +9 -3
  218. package/packages/scrabble-solver/src/components/Results/Header.tsx +2 -4
  219. package/packages/scrabble-solver/src/components/Results/HeaderButton.tsx +1 -3
  220. package/packages/scrabble-solver/src/components/Results/Result.tsx +2 -4
  221. package/packages/scrabble-solver/src/components/Results/Results.tsx +7 -9
  222. package/packages/scrabble-solver/src/components/Results/SolveButton.tsx +2 -4
  223. package/packages/scrabble-solver/src/components/Results/index.ts +1 -1
  224. package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.tsx +1 -3
  225. package/packages/scrabble-solver/src/components/ResultsInput/index.ts +1 -1
  226. package/packages/scrabble-solver/src/components/SeoMessage/SeoMessage.tsx +5 -6
  227. package/packages/scrabble-solver/src/components/SeoMessage/index.ts +1 -1
  228. package/packages/scrabble-solver/src/components/Solver/Solver.tsx +8 -8
  229. package/packages/scrabble-solver/src/components/Solver/components/InsertButton/InsertButton.tsx +2 -4
  230. package/packages/scrabble-solver/src/components/Solver/components/InsertButton/index.ts +1 -1
  231. package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +4 -6
  232. package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/index.ts +1 -1
  233. package/packages/scrabble-solver/src/components/Solver/components/index.ts +2 -2
  234. package/packages/scrabble-solver/src/components/Solver/index.ts +1 -1
  235. package/packages/scrabble-solver/src/components/Spinner/Spinner.tsx +1 -3
  236. package/packages/scrabble-solver/src/components/Spinner/index.ts +1 -1
  237. package/packages/scrabble-solver/src/components/Tile/Tile.tsx +2 -4
  238. package/packages/scrabble-solver/src/components/Tile/TilePure.tsx +2 -2
  239. package/packages/scrabble-solver/src/components/Tile/index.ts +1 -1
  240. package/packages/scrabble-solver/src/components/Tooltip/TooltipTrigger.tsx +5 -3
  241. package/packages/scrabble-solver/src/components/index.ts +24 -25
  242. package/packages/scrabble-solver/src/hooks/index.ts +13 -13
  243. package/packages/scrabble-solver/src/hooks/useAppLayout.ts +19 -15
  244. package/packages/scrabble-solver/src/hooks/useColumns.ts +2 -4
  245. package/packages/scrabble-solver/src/hooks/useDirection.ts +1 -3
  246. package/packages/scrabble-solver/src/hooks/useEffectOnce.ts +2 -4
  247. package/packages/scrabble-solver/src/hooks/useIsTouchDevice.ts +2 -4
  248. package/packages/scrabble-solver/src/hooks/useLanguage.ts +1 -3
  249. package/packages/scrabble-solver/src/hooks/useLatest.ts +1 -3
  250. package/packages/scrabble-solver/src/hooks/useLocalStorage.ts +1 -3
  251. package/packages/scrabble-solver/src/hooks/useMedia.ts +1 -3
  252. package/packages/scrabble-solver/src/hooks/useMediaQueries.ts +2 -4
  253. package/packages/scrabble-solver/src/hooks/useMediaQuery.ts +2 -4
  254. package/packages/scrabble-solver/src/hooks/useOnWindowResize.ts +1 -3
  255. package/packages/scrabble-solver/src/hooks/useViewportSize.ts +2 -4
  256. package/packages/scrabble-solver/src/i18n/i18n.ts +1 -3
  257. package/packages/scrabble-solver/src/i18n/index.ts +1 -1
  258. package/packages/scrabble-solver/src/lib/arrayEquals.ts +1 -3
  259. package/packages/scrabble-solver/src/lib/createArray.ts +1 -3
  260. package/packages/scrabble-solver/src/lib/createComparator.ts +3 -5
  261. package/packages/scrabble-solver/src/lib/createGridOf.ts +2 -4
  262. package/packages/scrabble-solver/src/lib/createKeyComparator.ts +6 -5
  263. package/packages/scrabble-solver/src/lib/createKeyboardNavigation.ts +2 -4
  264. package/packages/scrabble-solver/src/lib/createNullMovingComparator.test.ts +1 -1
  265. package/packages/scrabble-solver/src/lib/createNullMovingComparator.ts +1 -3
  266. package/packages/scrabble-solver/src/lib/createRegExp.ts +1 -3
  267. package/packages/scrabble-solver/src/lib/createStringComparator.ts +5 -3
  268. package/packages/scrabble-solver/src/lib/detectLocale.ts +1 -3
  269. package/packages/scrabble-solver/src/lib/extractCharacters.test.ts +1 -1
  270. package/packages/scrabble-solver/src/lib/extractCharacters.ts +1 -3
  271. package/packages/scrabble-solver/src/lib/extractCharactersByCase.test.ts +1 -1
  272. package/packages/scrabble-solver/src/lib/extractCharactersByCase.ts +2 -4
  273. package/packages/scrabble-solver/src/lib/extractInputValue.ts +1 -3
  274. package/packages/scrabble-solver/src/lib/findCell.ts +1 -3
  275. package/packages/scrabble-solver/src/lib/getCellSize.ts +3 -5
  276. package/packages/scrabble-solver/src/lib/getCoordinate.test.ts +22 -0
  277. package/packages/scrabble-solver/src/lib/getCoordinate.ts +10 -4
  278. package/packages/scrabble-solver/src/lib/getCoordinates.ts +2 -4
  279. package/packages/scrabble-solver/src/lib/getRemainingTiles.ts +8 -5
  280. package/packages/scrabble-solver/src/lib/getRemainingTilesCount.ts +8 -4
  281. package/packages/scrabble-solver/src/lib/getRemainingTilesGroups.ts +3 -5
  282. package/packages/scrabble-solver/src/lib/getTileSizes.ts +1 -3
  283. package/packages/scrabble-solver/src/lib/getTotalRemainingTilesCount.ts +8 -4
  284. package/packages/scrabble-solver/src/lib/groupResults.ts +3 -5
  285. package/packages/scrabble-solver/src/lib/guessLocale.ts +2 -4
  286. package/packages/scrabble-solver/src/lib/index.ts +39 -39
  287. package/packages/scrabble-solver/src/lib/inverseDirection.ts +1 -3
  288. package/packages/scrabble-solver/src/lib/isCtrl.ts +1 -3
  289. package/packages/scrabble-solver/src/lib/isMac.ts +3 -4
  290. package/packages/scrabble-solver/src/lib/isRegExp.ts +1 -3
  291. package/packages/scrabble-solver/src/lib/isStringArray.ts +1 -3
  292. package/packages/scrabble-solver/src/lib/isUpperCase.ts +1 -3
  293. package/packages/scrabble-solver/src/lib/memoize.ts +18 -20
  294. package/packages/scrabble-solver/src/lib/noop.ts +1 -3
  295. package/packages/scrabble-solver/src/lib/numberComparator.ts +1 -3
  296. package/packages/scrabble-solver/src/lib/resultMatchesCellFilter.ts +1 -3
  297. package/packages/scrabble-solver/src/lib/reverseComparator.ts +1 -3
  298. package/packages/scrabble-solver/src/lib/sortGroupedResults.ts +2 -4
  299. package/packages/scrabble-solver/src/lib/sortResults.ts +5 -7
  300. package/packages/scrabble-solver/src/lib/unorderedArraysEqual.ts +2 -4
  301. package/packages/scrabble-solver/src/lib/zipCharactersAndTiles.ts +1 -3
  302. package/packages/scrabble-solver/src/modals/DictionaryModal/DictionaryModal.tsx +2 -2
  303. package/packages/scrabble-solver/src/modals/DictionaryModal/index.ts +1 -1
  304. package/packages/scrabble-solver/src/modals/KeyMapModal/KeyMapModal.tsx +2 -2
  305. package/packages/scrabble-solver/src/modals/KeyMapModal/components/Mapping/Mapping.tsx +1 -3
  306. package/packages/scrabble-solver/src/modals/KeyMapModal/components/Mapping/index.ts +1 -1
  307. package/packages/scrabble-solver/src/modals/KeyMapModal/components/index.ts +1 -1
  308. package/packages/scrabble-solver/src/modals/KeyMapModal/index.ts +1 -1
  309. package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.tsx +2 -2
  310. package/packages/scrabble-solver/src/modals/MenuModal/index.ts +1 -1
  311. package/packages/scrabble-solver/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +2 -2
  312. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/Character.tsx +6 -3
  313. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/index.ts +1 -1
  314. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/index.ts +1 -1
  315. package/packages/scrabble-solver/src/modals/RemainingTilesModal/index.ts +1 -1
  316. package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.tsx +2 -2
  317. package/packages/scrabble-solver/src/modals/ResultsModal/index.ts +1 -1
  318. package/packages/scrabble-solver/src/modals/SettingsModal/SettingsModal.tsx +2 -2
  319. package/packages/scrabble-solver/src/modals/SettingsModal/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +1 -3
  320. package/packages/scrabble-solver/src/modals/SettingsModal/components/AutoGroupTilesSetting/index.ts +1 -1
  321. package/packages/scrabble-solver/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.tsx +4 -10
  322. package/packages/scrabble-solver/src/modals/SettingsModal/components/ConfigSetting/index.ts +1 -1
  323. package/packages/scrabble-solver/src/modals/SettingsModal/components/ConfigSetting/lib.ts +19 -0
  324. package/packages/scrabble-solver/src/modals/SettingsModal/components/InputModeSetting/InputModeSetting.tsx +1 -3
  325. package/packages/scrabble-solver/src/modals/SettingsModal/components/InputModeSetting/index.ts +1 -1
  326. package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +1 -3
  327. package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/index.ts +1 -1
  328. package/packages/scrabble-solver/src/modals/SettingsModal/components/ShowCoordinatesSetting/ShowCoordinatesSetting.tsx +1 -3
  329. package/packages/scrabble-solver/src/modals/SettingsModal/components/ShowCoordinatesSetting/index.ts +1 -1
  330. package/packages/scrabble-solver/src/modals/SettingsModal/components/index.ts +5 -5
  331. package/packages/scrabble-solver/src/modals/SettingsModal/index.ts +1 -1
  332. package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.tsx +2 -2
  333. package/packages/scrabble-solver/src/modals/WordsModal/index.ts +1 -1
  334. package/packages/scrabble-solver/src/modals/index.ts +7 -7
  335. package/packages/scrabble-solver/src/pages/_app.tsx +3 -1
  336. package/packages/scrabble-solver/src/pages/api/dictionary/[locale]/[word].ts +1 -1
  337. package/packages/scrabble-solver/src/pages/api/dictionary/[locale]/index.ts +1 -1
  338. package/packages/scrabble-solver/src/pages/api/solve.ts +6 -4
  339. package/packages/scrabble-solver/src/pages/api/verify.ts +6 -4
  340. package/packages/scrabble-solver/src/pages/api/visit.ts +2 -2
  341. package/packages/scrabble-solver/src/pages/index.tsx +12 -2
  342. package/packages/scrabble-solver/src/sdk/fetch.ts +1 -3
  343. package/packages/scrabble-solver/src/sdk/fetchJson.ts +2 -4
  344. package/packages/scrabble-solver/src/sdk/findWordDefinitions.ts +2 -4
  345. package/packages/scrabble-solver/src/sdk/getDictionary.ts +2 -4
  346. package/packages/scrabble-solver/src/sdk/index.ts +4 -4
  347. package/packages/scrabble-solver/src/sdk/solve.ts +2 -4
  348. package/packages/scrabble-solver/src/sdk/verify.ts +2 -4
  349. package/packages/scrabble-solver/src/sdk/visit.ts +1 -3
  350. package/packages/scrabble-solver/src/service-worker/average.ts +1 -3
  351. package/packages/scrabble-solver/src/service-worker/dictionaries/expirationManager.ts +1 -3
  352. package/packages/scrabble-solver/src/service-worker/dictionaries/getDictionary.ts +3 -5
  353. package/packages/scrabble-solver/src/service-worker/dictionaries/getDictionaryUrl.ts +1 -3
  354. package/packages/scrabble-solver/src/service-worker/dictionaries/index.ts +2 -2
  355. package/packages/scrabble-solver/src/service-worker/dictionaries/revalidateDictionary.ts +3 -5
  356. package/packages/scrabble-solver/src/service-worker/getTrie.ts +1 -3
  357. package/packages/scrabble-solver/src/service-worker/index.ts +4 -2
  358. package/packages/scrabble-solver/src/service-worker/routeSolveRequests.ts +17 -11
  359. package/packages/scrabble-solver/src/service-worker/routeVerifyRequests.ts +7 -5
  360. package/packages/scrabble-solver/src/serviceWorkerManager.ts +4 -4
  361. package/packages/scrabble-solver/src/state/index.ts +4 -4
  362. package/packages/scrabble-solver/src/state/localStorage.ts +10 -12
  363. package/packages/scrabble-solver/src/state/sagas.ts +4 -1
  364. package/packages/scrabble-solver/src/state/selectors.ts +3 -6
  365. package/packages/scrabble-solver/src/state/slices/boardInitialState.ts +6 -7
  366. package/packages/scrabble-solver/src/state/slices/boardSlice.ts +5 -7
  367. package/packages/scrabble-solver/src/state/slices/cellFilterInitialState.ts +1 -3
  368. package/packages/scrabble-solver/src/state/slices/cellFilterSlice.ts +2 -4
  369. package/packages/scrabble-solver/src/state/slices/dictionaryInitialState.ts +2 -4
  370. package/packages/scrabble-solver/src/state/slices/dictionarySlice.ts +2 -4
  371. package/packages/scrabble-solver/src/state/slices/index.ts +16 -16
  372. package/packages/scrabble-solver/src/state/slices/rackInitialState.ts +2 -4
  373. package/packages/scrabble-solver/src/state/slices/rackSlice.ts +2 -4
  374. package/packages/scrabble-solver/src/state/slices/resultsInitialState.ts +1 -3
  375. package/packages/scrabble-solver/src/state/slices/resultsSlice.ts +2 -4
  376. package/packages/scrabble-solver/src/state/slices/settingsInitialState.ts +2 -4
  377. package/packages/scrabble-solver/src/state/slices/settingsSlice.ts +2 -4
  378. package/packages/scrabble-solver/src/state/slices/solveInitialState.ts +3 -5
  379. package/packages/scrabble-solver/src/state/slices/solveSlice.ts +2 -4
  380. package/packages/scrabble-solver/src/state/slices/verifyInitialState.ts +2 -4
  381. package/packages/scrabble-solver/src/state/slices/verifySlice.ts +2 -4
  382. package/packages/scrabble-solver/src/state/store.ts +1 -3
  383. package/packages/scrabble-solver/src/state/useTranslate.ts +2 -4
  384. package/packages/scrabble-solver/src/state/useTypedSelector.ts +1 -3
  385. package/packages/scrabble-solver/src/types/api.ts +15 -0
  386. package/packages/scrabble-solver/src/types/index.ts +3 -1
  387. package/packages/scrabble-solver/tsconfig.json +1 -1
  388. package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -0
  389. package/packages/solver/build/areDigraphsValid.d.ts +1 -2
  390. package/packages/solver/build/areDigraphsValid.js +2 -1
  391. package/packages/solver/build/fillPattern.d.ts +1 -2
  392. package/packages/solver/build/fillPattern.js +2 -2
  393. package/packages/solver/build/generateEndIndices.d.ts +1 -2
  394. package/packages/solver/build/generateEndIndices.js +2 -1
  395. package/packages/solver/build/generateHorizontalPatterns.d.ts +1 -2
  396. package/packages/solver/build/generateHorizontalPatterns.js +7 -8
  397. package/packages/solver/build/generatePattern.d.ts +1 -2
  398. package/packages/solver/build/generatePattern.js +6 -8
  399. package/packages/solver/build/generatePatterns.d.ts +1 -2
  400. package/packages/solver/build/generatePatterns.js +6 -8
  401. package/packages/solver/build/generateStartIndices.d.ts +1 -2
  402. package/packages/solver/build/generateStartIndices.js +2 -1
  403. package/packages/solver/build/generateVectors.d.ts +2 -2
  404. package/packages/solver/build/generateVectors.js +2 -1
  405. package/packages/solver/build/generateVerticalPatterns.d.ts +1 -2
  406. package/packages/solver/build/generateVerticalPatterns.js +7 -8
  407. package/packages/solver/build/getCellsScore.d.ts +1 -2
  408. package/packages/solver/build/getCellsScore.js +2 -1
  409. package/packages/solver/build/getPatternHash.d.ts +1 -2
  410. package/packages/solver/build/getPatternHash.js +2 -1
  411. package/packages/solver/build/getPatternScore.d.ts +1 -2
  412. package/packages/solver/build/getPatternScore.js +16 -9
  413. package/packages/solver/build/getUniquePatterns.d.ts +1 -2
  414. package/packages/solver/build/getUniquePatterns.js +4 -6
  415. package/packages/solver/build/index.d.ts +14 -14
  416. package/packages/solver/build/index.js +14 -17
  417. package/packages/solver/build/solve.d.ts +1 -2
  418. package/packages/solver/build/solve.js +12 -14
  419. package/packages/solver/package.json +5 -5
  420. package/packages/solver/src/areDigraphsValid.ts +1 -3
  421. package/packages/solver/src/fillPattern.test.ts +1 -1
  422. package/packages/solver/src/fillPattern.ts +1 -3
  423. package/packages/solver/src/generateEndIndices.test.ts +1 -1
  424. package/packages/solver/src/generateEndIndices.ts +1 -3
  425. package/packages/solver/src/generateHorizontalPatterns.test.ts +3 -2
  426. package/packages/solver/src/generateHorizontalPatterns.ts +5 -6
  427. package/packages/solver/src/generatePattern.ts +3 -5
  428. package/packages/solver/src/generatePatterns.test.ts +2 -2
  429. package/packages/solver/src/generatePatterns.ts +3 -5
  430. package/packages/solver/src/generateStartIndices.test.ts +1 -1
  431. package/packages/solver/src/generateStartIndices.ts +1 -3
  432. package/packages/solver/src/generateVectors.test.ts +1 -1
  433. package/packages/solver/src/generateVectors.ts +1 -3
  434. package/packages/solver/src/generateVerticalPatterns.test.ts +3 -2
  435. package/packages/solver/src/generateVerticalPatterns.ts +5 -6
  436. package/packages/solver/src/getCellsScore.ts +1 -3
  437. package/packages/solver/src/getPatternHash.test.ts +1 -1
  438. package/packages/solver/src/getPatternHash.ts +1 -3
  439. package/packages/solver/src/getPatternScore.test.ts +140 -54
  440. package/packages/solver/src/getPatternScore.ts +17 -9
  441. package/packages/solver/src/getUniquePatterns.ts +2 -4
  442. package/packages/solver/src/index.ts +14 -14
  443. package/packages/solver/src/solve.test.ts +1 -1
  444. package/packages/solver/src/solve.ts +6 -8
  445. package/packages/types/build/Bingo.d.ts +10 -0
  446. package/packages/types/build/Bingo.js +16 -0
  447. package/packages/types/build/Board.d.ts +5 -6
  448. package/packages/types/build/Board.js +17 -16
  449. package/packages/types/build/BoardJson.d.ts +2 -3
  450. package/packages/types/build/Bonus.d.ts +5 -6
  451. package/packages/types/build/Bonus.js +2 -1
  452. package/packages/types/build/BonusJson.d.ts +1 -2
  453. package/packages/types/build/BonusValue.d.ts +1 -2
  454. package/packages/types/build/Cell.d.ts +4 -5
  455. package/packages/types/build/Cell.js +13 -15
  456. package/packages/types/build/CellJson.d.ts +2 -3
  457. package/packages/types/build/CellJson.js +2 -5
  458. package/packages/types/build/CharacterBonus.d.ts +5 -6
  459. package/packages/types/build/CharacterBonus.js +4 -6
  460. package/packages/types/build/Collision.d.ts +2 -3
  461. package/packages/types/build/CollisionJson.d.ts +2 -3
  462. package/packages/types/build/Config.d.ts +15 -13
  463. package/packages/types/build/Config.js +19 -15
  464. package/packages/types/build/ConfigJson.d.ts +9 -8
  465. package/packages/types/build/Dictionary.d.ts +2 -3
  466. package/packages/types/build/FinalPattern.d.ts +2 -3
  467. package/packages/types/build/FinalPattern.js +4 -6
  468. package/packages/types/build/Game.d.ts +3 -2
  469. package/packages/types/build/Game.js +4 -3
  470. package/packages/types/build/HorizontalPattern.d.ts +2 -3
  471. package/packages/types/build/HorizontalPattern.js +5 -7
  472. package/packages/types/build/Locale.d.ts +1 -2
  473. package/packages/types/build/Locale.js +2 -3
  474. package/packages/types/build/Pattern.d.ts +5 -6
  475. package/packages/types/build/Pattern.js +2 -1
  476. package/packages/types/build/PatternJson.d.ts +2 -3
  477. package/packages/types/build/Result.d.ts +6 -6
  478. package/packages/types/build/Result.js +11 -13
  479. package/packages/types/build/ResultJson.d.ts +3 -4
  480. package/packages/types/build/ShowCoordinates.d.ts +1 -2
  481. package/packages/types/build/Tile.d.ts +3 -4
  482. package/packages/types/build/Tile.js +11 -10
  483. package/packages/types/build/TileConfig.d.ts +2 -3
  484. package/packages/types/build/TileJson.d.ts +1 -2
  485. package/packages/types/build/TileJson.js +2 -5
  486. package/packages/types/build/VerticalPattern.d.ts +2 -3
  487. package/packages/types/build/VerticalPattern.js +5 -7
  488. package/packages/types/build/WordBonus.d.ts +3 -4
  489. package/packages/types/build/WordBonus.js +4 -6
  490. package/packages/types/build/WordDefinition.d.ts +3 -4
  491. package/packages/types/build/WordDefinition.js +13 -12
  492. package/packages/types/build/WordDefinitionJson.d.ts +1 -2
  493. package/packages/types/build/index.d.ts +32 -31
  494. package/packages/types/build/index.js +24 -23
  495. package/packages/types/build/isError.d.ts +1 -2
  496. package/packages/types/build/isError.js +4 -6
  497. package/packages/types/build/isObject.d.ts +1 -2
  498. package/packages/types/build/isObject.js +2 -1
  499. package/packages/types/package.json +2 -2
  500. package/packages/types/src/Bingo.ts +19 -0
  501. package/packages/types/src/Board.ts +14 -13
  502. package/packages/types/src/BoardJson.ts +2 -4
  503. package/packages/types/src/Bonus.ts +5 -7
  504. package/packages/types/src/BonusJson.ts +1 -3
  505. package/packages/types/src/BonusValue.ts +1 -3
  506. package/packages/types/src/Cell.ts +5 -7
  507. package/packages/types/src/CellJson.ts +3 -5
  508. package/packages/types/src/CharacterBonus.ts +5 -7
  509. package/packages/types/src/Collision.ts +2 -4
  510. package/packages/types/src/CollisionJson.ts +2 -4
  511. package/packages/types/src/Config.ts +27 -20
  512. package/packages/types/src/ConfigJson.ts +9 -9
  513. package/packages/types/src/Dictionary.ts +2 -4
  514. package/packages/types/src/FinalPattern.ts +2 -4
  515. package/packages/types/src/Game.ts +3 -3
  516. package/packages/types/src/HorizontalPattern.ts +2 -4
  517. package/packages/types/src/Locale.ts +1 -3
  518. package/packages/types/src/Pattern.ts +5 -7
  519. package/packages/types/src/PatternJson.ts +2 -4
  520. package/packages/types/src/Result.ts +6 -8
  521. package/packages/types/src/ResultJson.ts +3 -5
  522. package/packages/types/src/ShowCoordinates.ts +1 -3
  523. package/packages/types/src/Tile.ts +4 -6
  524. package/packages/types/src/TileConfig.ts +2 -4
  525. package/packages/types/src/TileJson.ts +2 -4
  526. package/packages/types/src/VerticalPattern.ts +2 -4
  527. package/packages/types/src/WordBonus.ts +3 -5
  528. package/packages/types/src/WordDefinition.ts +4 -6
  529. package/packages/types/src/WordDefinitionJson.ts +1 -3
  530. package/packages/types/src/index.ts +32 -31
  531. package/packages/types/src/isError.ts +2 -4
  532. package/packages/types/src/isObject.ts +1 -3
  533. package/packages/word-definitions/build/languages/turkish.js +1 -1
  534. package/packages/word-definitions/build/lib/index.d.ts +3 -3
  535. package/packages/word-definitions/build/lib/index.js +7 -17
  536. package/packages/word-definitions/build/lib/request.js +2 -1
  537. package/packages/word-definitions/package.json +2 -2
  538. package/packages/word-definitions/src/languages/turkish.ts +3 -3
  539. package/packages/word-definitions/src/lib/index.ts +3 -3
  540. package/packages/word-definitions/src/lib/request.ts +2 -1
  541. package/packages/word-definitions/src/parse.test.ts +1 -1
  542. package/packages/word-lists/build/languages/polish.js +1 -1
  543. package/packages/word-lists/build/lib/downloadFile.d.ts +1 -2
  544. package/packages/word-lists/build/lib/downloadFile.js +4 -3
  545. package/packages/word-lists/build/lib/downloadHtml.d.ts +1 -2
  546. package/packages/word-lists/build/lib/downloadHtml.js +2 -1
  547. package/packages/word-lists/build/lib/extractWords.d.ts +1 -2
  548. package/packages/word-lists/build/lib/extractWords.js +4 -6
  549. package/packages/word-lists/build/lib/findFirstWordIndex.d.ts +1 -2
  550. package/packages/word-lists/build/lib/findFirstWordIndex.js +2 -1
  551. package/packages/word-lists/build/lib/getHash.d.ts +1 -2
  552. package/packages/word-lists/build/lib/getHash.js +2 -1
  553. package/packages/word-lists/build/lib/getTempFilepath.d.ts +1 -2
  554. package/packages/word-lists/build/lib/getTempFilepath.js +4 -3
  555. package/packages/word-lists/build/lib/getTxtWordList.d.ts +1 -2
  556. package/packages/word-lists/build/lib/getTxtWordList.js +6 -5
  557. package/packages/word-lists/build/lib/index.d.ts +10 -10
  558. package/packages/word-lists/build/lib/index.js +10 -13
  559. package/packages/word-lists/build/lib/transliterateDiacritics.d.ts +1 -2
  560. package/packages/word-lists/build/lib/transliterateDiacritics.js +4 -6
  561. package/packages/word-lists/build/lib/unique.d.ts +1 -2
  562. package/packages/word-lists/build/lib/unique.js +2 -1
  563. package/packages/word-lists/build/lib/unzip.d.ts +1 -2
  564. package/packages/word-lists/build/lib/unzip.js +2 -1
  565. package/packages/word-lists/package.json +2 -2
  566. package/packages/word-lists/src/languages/polish.ts +1 -1
  567. package/packages/word-lists/src/lib/downloadFile.ts +2 -4
  568. package/packages/word-lists/src/lib/downloadHtml.ts +1 -3
  569. package/packages/word-lists/src/lib/extractWords.ts +2 -4
  570. package/packages/word-lists/src/lib/findFirstWordIndex.ts +1 -3
  571. package/packages/word-lists/src/lib/getHash.ts +1 -3
  572. package/packages/word-lists/src/lib/getTempFilepath.ts +2 -4
  573. package/packages/word-lists/src/lib/getTxtWordList.ts +3 -5
  574. package/packages/word-lists/src/lib/index.ts +10 -10
  575. package/packages/word-lists/src/lib/transliterateDiacritics.ts +2 -4
  576. package/packages/word-lists/src/lib/unique.ts +1 -3
  577. package/packages/word-lists/src/lib/unzip.ts +3 -5
  578. package/tsconfig.jest.json +1 -2
  579. package/tsconfig.json +2 -1
  580. package/.eslintrc.js +0 -559
  581. package/packages/dictionaries/build/types/index.d.ts +0 -1
  582. package/packages/dictionaries/build/types/index.js +0 -2
  583. package/packages/dictionaries/src/types/index.ts +0 -1
  584. package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +0 -1
  585. package/packages/scrabble-solver/.next/static/chunks/pages/_app-735105409cfdb48f.js +0 -1
  586. package/packages/scrabble-solver/.next/static/chunks/pages/index-d492616d9bc42176.js +0 -1
  587. package/packages/scrabble-solver/src/components/Keys/index.ts +0 -1
  588. package/packages/scrabble-solver/tsconfig.jest.json +0 -7
  589. /package/packages/dictionaries/build/{constants/index.d.ts → constants.d.ts} +0 -0
  590. /package/packages/dictionaries/build/{constants/index.js → constants.js} +0 -0
  591. /package/packages/dictionaries/build/{types/Cache.js → types.js} +0 -0
  592. /package/packages/dictionaries/src/{constants/index.ts → constants.ts} +0 -0
  593. /package/packages/scrabble-solver/.next/static/{3MlxnccTCLyz9bgD30zY2 → 47JHul8F9NSWCNSEuahuL}/_ssgManifest.js +0 -0
@@ -1,4 +1,5 @@
1
- import Dictionaries from './Dictionaries';
1
+ import { Dictionaries } from './Dictionaries';
2
2
 
3
3
  export * from './lib';
4
+
4
5
  export const dictionaries = new Dictionaries();
@@ -5,9 +5,9 @@ import fs from 'fs';
5
5
  import { CACHE_STALE_THRESHOLD } from '../constants';
6
6
  import { Cache } from '../types';
7
7
 
8
- import getDictionaryFilepath from './getDictionaryFilepath';
8
+ import { getDictionaryFilepath } from './getDictionaryFilepath';
9
9
 
10
- class DiskCache implements Cache<Locale, Trie> {
10
+ export class DiskCache implements Cache<Locale, Trie> {
11
11
  public async get(locale: Locale): Promise<Trie | undefined> {
12
12
  if (!this.has(locale)) {
13
13
  return undefined;
@@ -55,5 +55,3 @@ class DiskCache implements Cache<Locale, Trie> {
55
55
  await fs.promises.writeFile(filepath, trie.serialize());
56
56
  }
57
57
  }
58
-
59
- export default DiskCache;
@@ -3,11 +3,11 @@ import { Locale } from '@scrabble-solver/types';
3
3
 
4
4
  import { Cache } from '../types';
5
5
 
6
- import createCacheTimestampComparator from './createCacheTimestampComparator';
7
- import DiskCache from './DiskCache';
8
- import MemoryCache from './MemoryCache';
6
+ import { createCacheTimestampComparator } from './createCacheTimestampComparator';
7
+ import { DiskCache } from './DiskCache';
8
+ import { MemoryCache } from './MemoryCache';
9
9
 
10
- class LayeredCache implements Cache<Locale, Trie> {
10
+ export class LayeredCache implements Cache<Locale, Trie> {
11
11
  private readonly layers = [new MemoryCache(), new DiskCache()];
12
12
 
13
13
  public async get(locale: Locale): Promise<Trie | undefined> {
@@ -65,5 +65,3 @@ class LayeredCache implements Cache<Locale, Trie> {
65
65
  return cached;
66
66
  }
67
67
  }
68
-
69
- export default LayeredCache;
@@ -4,8 +4,9 @@ import { Locale } from '@scrabble-solver/types';
4
4
  import { CACHE_STALE_THRESHOLD } from '../constants';
5
5
  import { Cache } from '../types';
6
6
 
7
- class MemoryCache implements Cache<Locale, Trie> {
7
+ export class MemoryCache implements Cache<Locale, Trie> {
8
8
  private readonly cache: Partial<Record<Locale, Trie>> = {};
9
+
9
10
  private readonly cacheTimestamps: Partial<Record<Locale, number>> = {};
10
11
 
11
12
  public get(locale: Locale): Promise<Trie | undefined> {
@@ -37,5 +38,3 @@ class MemoryCache implements Cache<Locale, Trie> {
37
38
  return Promise.resolve();
38
39
  }
39
40
  }
40
-
41
- export default MemoryCache;
@@ -1,6 +1,6 @@
1
1
  type AsyncCallback<T> = () => Promise<T>;
2
2
 
3
- const createAsyncProxy = <T>(asyncCallback: AsyncCallback<T>): AsyncCallback<T> => {
3
+ export const createAsyncProxy = <T>(asyncCallback: AsyncCallback<T>): AsyncCallback<T> => {
4
4
  let promise: Promise<T> | null = null;
5
5
 
6
6
  return async (): Promise<T> => {
@@ -16,5 +16,3 @@ const createAsyncProxy = <T>(asyncCallback: AsyncCallback<T>): AsyncCallback<T>
16
16
  }
17
17
  };
18
18
  };
19
-
20
- export default createAsyncProxy;
@@ -3,7 +3,7 @@ import { Locale } from '@scrabble-solver/types';
3
3
 
4
4
  import { Cache } from '../types';
5
5
 
6
- const createCacheTimestampComparator = (locale: Locale) => {
6
+ export const createCacheTimestampComparator = (locale: Locale) => {
7
7
  return (a: Cache<Locale, Trie>, b: Cache<Locale, Trie>): number => {
8
8
  const aTimestamp = a.getLastModifiedTimestamp(locale);
9
9
  const bTimestamp = b.getLastModifiedTimestamp(locale);
@@ -23,5 +23,3 @@ const createCacheTimestampComparator = (locale: Locale) => {
23
23
  return bTimestamp - aTimestamp;
24
24
  };
25
25
  };
26
-
27
- export default createCacheTimestampComparator;
@@ -1,14 +1,12 @@
1
1
  import { Trie } from '@kamilmielnik/trie';
2
- import logger from '@scrabble-solver/logger';
2
+ import { logger } from '@scrabble-solver/logger';
3
3
  import { Locale } from '@scrabble-solver/types';
4
4
  import { getWordList } from '@scrabble-solver/word-lists';
5
5
 
6
- const downloadDictionary = async (locale: Locale): Promise<Trie> => {
6
+ export const downloadDictionary = async (locale: Locale): Promise<Trie> => {
7
7
  logger.info('downloadDictionary', { locale });
8
8
  const words = await getWordList(locale);
9
9
  logger.info('downloadDictionary - success', { locale });
10
10
  const trie = Trie.fromArray(words);
11
11
  return trie;
12
12
  };
13
-
14
- export default downloadDictionary;
@@ -3,8 +3,6 @@ import path from 'path';
3
3
 
4
4
  import { OUTPUT_DIRECTORY } from '../constants';
5
5
 
6
- const getDictionaryFilepath = (locale: Locale): string => {
6
+ export const getDictionaryFilepath = (locale: Locale): string => {
7
7
  return path.resolve(OUTPUT_DIRECTORY, `${locale}.txt`);
8
8
  };
9
-
10
- export default getDictionaryFilepath;
@@ -1,7 +1,7 @@
1
- export { default as createAsyncProxy } from './createAsyncProxy';
2
- export { default as createCacheTimestampComparator } from './createCacheTimestampComparator';
3
- export { default as DiskCache } from './DiskCache';
4
- export { default as downloadDictionary } from './downloadDictionary';
5
- export { default as getDictionaryFilepath } from './getDictionaryFilepath';
6
- export { default as LayeredCache } from './LayeredCache';
7
- export { default as MemoryCache } from './MemoryCache';
1
+ export { createAsyncProxy } from './createAsyncProxy';
2
+ export { createCacheTimestampComparator } from './createCacheTimestampComparator';
3
+ export { DiskCache } from './DiskCache';
4
+ export { downloadDictionary } from './downloadDictionary';
5
+ export { getDictionaryFilepath } from './getDictionaryFilepath';
6
+ export { LayeredCache } from './LayeredCache';
7
+ export { MemoryCache } from './MemoryCache';
@@ -1,9 +1,7 @@
1
- interface Cache<Key extends string, Value> {
1
+ export interface Cache<Key extends string, Value> {
2
2
  get(key: Key): Promise<Value | undefined>;
3
3
  getLastModifiedTimestamp(key: Key): number | undefined;
4
4
  has(key: Key): boolean;
5
5
  isStale(key: Key): boolean | undefined;
6
6
  set(key: Key, value: Value): Promise<void>;
7
7
  }
8
-
9
- export default Cache;
@@ -1 +1 @@
1
- export { default } from './logger';
1
+ export { logger } from './logger';
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
3
+ exports.logger = void 0;
7
4
  var logger_1 = require("./logger");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(logger_1).default; } });
5
+ Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
@@ -1,2 +1 @@
1
- declare const logger: import("winston").Logger;
2
- export default logger;
1
+ export declare const logger: import("winston").Logger;
@@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.logger = void 0;
6
7
  const path_1 = __importDefault(require("path"));
7
8
  const winston_1 = require("winston");
8
9
  const constants_1 = require("./constants");
9
- const logger = (0, winston_1.createLogger)({
10
+ exports.logger = (0, winston_1.createLogger)({
10
11
  level: 'info',
11
12
  format: winston_1.format.combine(winston_1.format.timestamp({
12
13
  format: 'YYYY-MM-DD HH:mm:ss',
@@ -25,4 +26,3 @@ const logger = (0, winston_1.createLogger)({
25
26
  }),
26
27
  ],
27
28
  });
28
- exports.default = logger;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/logger",
3
- "version": "2.15.9",
3
+ "version": "2.15.11",
4
4
  "description": "Scrabble Solver 2 - Logger",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1 +1 @@
1
- export { default } from './logger';
1
+ export { logger } from './logger';
@@ -3,7 +3,7 @@ import { createLogger, format, transports } from 'winston';
3
3
 
4
4
  import { OUTPUT_DIRECTORY } from './constants';
5
5
 
6
- const logger = createLogger({
6
+ export const logger = createLogger({
7
7
  level: 'info',
8
8
  format: format.combine(
9
9
  format.timestamp({
@@ -28,5 +28,3 @@ const logger = createLogger({
28
28
  }),
29
29
  ],
30
30
  });
31
-
32
- export default logger;
@@ -1 +1 @@
1
- 3MlxnccTCLyz9bgD30zY2
1
+ 47JHul8F9NSWCNSEuahuL
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/3MlxnccTCLyz9bgD30zY2/_buildManifest.js",
9
- "static/3MlxnccTCLyz9bgD30zY2/_ssgManifest.js"
8
+ "static/47JHul8F9NSWCNSEuahuL/_buildManifest.js",
9
+ "static/47JHul8F9NSWCNSEuahuL/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [],
12
12
  "rootMainFilesTree": {},
@@ -14,27 +14,27 @@
14
14
  "/": [
15
15
  "static/chunks/webpack-6224d37324e372cb.js",
16
16
  "static/chunks/framework-288d1abd95de88d9.js",
17
- "static/chunks/main-b934e2c3dd3b55b5.js",
17
+ "static/chunks/main-016492249b3393e2.js",
18
18
  "static/css/6682db14f926d4c7.css",
19
- "static/chunks/pages/index-d492616d9bc42176.js"
19
+ "static/chunks/pages/index-c1d5a66d0f4794a6.js"
20
20
  ],
21
21
  "/404": [
22
22
  "static/chunks/webpack-6224d37324e372cb.js",
23
23
  "static/chunks/framework-288d1abd95de88d9.js",
24
- "static/chunks/main-b934e2c3dd3b55b5.js",
25
- "static/chunks/pages/404-7451dd58396eaa39.js"
24
+ "static/chunks/main-016492249b3393e2.js",
25
+ "static/chunks/pages/404-590e2a3839c1d9e0.js"
26
26
  ],
27
27
  "/_app": [
28
28
  "static/chunks/webpack-6224d37324e372cb.js",
29
29
  "static/chunks/framework-288d1abd95de88d9.js",
30
- "static/chunks/main-b934e2c3dd3b55b5.js",
30
+ "static/chunks/main-016492249b3393e2.js",
31
31
  "static/css/d875648f38121a28.css",
32
- "static/chunks/pages/_app-735105409cfdb48f.js"
32
+ "static/chunks/pages/_app-0e951de0aebb6505.js"
33
33
  ],
34
34
  "/_error": [
35
35
  "static/chunks/webpack-6224d37324e372cb.js",
36
36
  "static/chunks/framework-288d1abd95de88d9.js",
37
- "static/chunks/main-b934e2c3dd3b55b5.js",
37
+ "static/chunks/main-016492249b3393e2.js",
38
38
  "static/chunks/pages/_error-7ea2d37f66343175.js"
39
39
  ]
40
40
  },
@@ -1 +1 @@
1
- {"encryption.key":"X6iSBg1WLh/c/qn3ANVgpUF7uDKYJSFjmcWdJG7BWoo=","encryption.expire_at":1743943789426}
1
+ {"encryption.key":"trtQNIXA8up0BH7rPqVtb3JN0uyZ26TFQ1vH8B/UUc4=","encryption.expire_at":1744317488656}