scrabble-solver 2.18.1 → 2.18.3
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.
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +1721 -1473
- package/.nx/workspace-data/lockfile-dependencies.hash +1 -1
- package/.nx/workspace-data/lockfile-nodes.hash +1 -1
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/parsed-lock-file.dependencies.json +184 -209
- package/.nx/workspace-data/parsed-lock-file.nodes.json +374 -419
- package/.nx/workspace-data/project-graph.json +610 -653
- package/.nx/workspace-data/source-maps.json +68 -0
- package/CLAUDE.md +13 -11
- package/README.md +3 -3
- package/bun.lock +115 -130
- package/e2e/bugs/398-digraphs-in-created-words.spec.ts +2 -2
- package/e2e/bugs/445-tile-text-selection.spec.ts +38 -0
- package/e2e/bugs/451-results-list-gap-hover.spec.ts +35 -0
- package/e2e/bugs/452-stale-translations-cache.spec.ts +32 -0
- package/e2e/features/427-highlight-created-words.spec.ts +86 -0
- package/e2e/features/430-highlight-unreachable-cells-results.spec.ts +75 -0
- package/e2e/features/91-hover-remaining-tile-highlights.spec.ts +22 -0
- package/e2e/features/result-candidate-picker.spec.ts +21 -0
- package/e2e/features/results-interactions.spec.ts +170 -0
- package/e2e/features/words-dictionary-search.spec.ts +36 -0
- package/e2e/features/words-empty-state.spec.ts +42 -0
- package/e2e/features/words-interactions.spec.ts +179 -0
- package/e2e/features/words-preview.spec.ts +140 -0
- package/e2e/features/words-table-filtering.spec.ts +22 -0
- package/e2e/features/words-table-sorting.spec.ts +33 -0
- package/e2e/lib/actions.ts +76 -6
- package/e2e/lib/selectors.ts +40 -3
- package/lerna.json +1 -1
- package/package.json +10 -10
- package/packages/configs/build/games/index.d.ts +1 -0
- package/packages/configs/build/games/index.js +1 -0
- package/packages/configs/build/games/wyrazy.d.ts +19 -0
- package/packages/configs/build/games/wyrazy.js +73 -0
- package/packages/configs/build/languages/polish.d.ts +1 -0
- package/packages/configs/build/languages/polish.js +39 -1
- package/packages/configs/package.json +5 -4
- package/packages/configs/src/games/index.ts +1 -0
- package/packages/configs/src/games/wyrazy.ts +71 -0
- package/packages/configs/src/languages/polish.ts +40 -1
- package/packages/constants/package.json +1 -1
- package/packages/dictionaries/package.json +4 -4
- package/packages/logger/package.json +1 -1
- package/packages/logger/scripts/stats.js +52 -31
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +14 -14
- package/packages/scrabble-solver/.next/cache/.previewinfo +1 -1
- package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
- package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
- package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
- package/packages/scrabble-solver/.next/dynamic-css-manifest.json +2 -2
- package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
- package/packages/scrabble-solver/.next/react-loadable-manifest.json +37 -37
- package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
- package/packages/scrabble-solver/.next/server/chunks/309.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/344.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/371.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/392.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/465.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/546.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/641.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/67.js +1 -0
- package/packages/scrabble-solver/.next/server/chunks/712.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/812.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/846.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/886.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/942.js +1 -0
- package/packages/scrabble-solver/.next/server/chunks/953.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/961.js +1 -1
- package/packages/scrabble-solver/.next/server/dynamic-css-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/404.html +3 -3
- package/packages/scrabble-solver/.next/server/pages/500.html +3 -3
- package/packages/scrabble-solver/.next/server/pages/_app.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/_document.js +2 -2
- package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/_error.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.html +3 -3
- package/packages/scrabble-solver/.next/server/pages/index.js +4 -4
- package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/not-found.html +3 -3
- package/packages/scrabble-solver/.next/server/pages/not-found.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -1
- package/packages/scrabble-solver/.next/static/{5KOWzYqfY1Z2rjrzptr8D → 8WnIUTe-yJvPD6stltvYI}/_buildManifest.js +1 -1
- package/packages/scrabble-solver/.next/static/chunks/100.305bdf9c75b1758f.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/256.6a20b23a766cfebd.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/{307.67f52f13e3d60d4e.js → 307.89e6100f58443679.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/{363.01eed3233f92b6a4.js → 363.cec65b1f9668a75e.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/{422.1559ae6756912ca5.js → 422.3e55b4c94e328701.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/{663.d2c9ca36b26695b8.js → 663.bd2c45413fbca518.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/693.677c88e0eb1340b5.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/{820.97b82f751ca49579.js → 820.823e9e885ebb66af.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/827.c81b92b383a748c9.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/{865.a9b563a45848a83c.js → 865.59baba8296c9b116.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/912.077603e4f0bc6cca.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/{939.19b33a3d3c351d73.js → 939.2ad86b50405c7897.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/980.7ce17464fc56648a.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/{main-b92e08f3fc96dd8d.js → main-7e52da35a4beea0b.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/_app-e3fe880e24c024ab.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/index-b073a1686818dd26.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/webpack-d7138f1ef6b8c9d6.js +1 -0
- package/packages/scrabble-solver/.next/static/css/65bcc9440e067113.css +1 -0
- package/packages/scrabble-solver/.next/static/css/{4dbcacc1122ac6b9.css → 92f85ce358a0a468.css} +1 -1
- package/packages/scrabble-solver/.next/static/css/a691348b788f8bc0.css +1 -0
- package/packages/scrabble-solver/.next/static/css/cd4d7f2458487399.css +1 -0
- package/packages/scrabble-solver/.next/trace +22 -21
- package/packages/scrabble-solver/.next/trace-build +1 -1
- package/packages/scrabble-solver/AGENTS.md +9 -0
- package/packages/scrabble-solver/CLAUDE.md +1 -0
- package/packages/scrabble-solver/package.json +13 -11
- package/packages/scrabble-solver/public/llms.txt +1 -1
- package/packages/scrabble-solver/public/service-worker.js +1 -1
- package/packages/scrabble-solver/src/components/Board/Board.tsx +3 -1
- package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +26 -20
- package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.tsx +4 -4
- package/packages/scrabble-solver/src/components/Board/lib.test.ts +106 -0
- package/packages/scrabble-solver/src/components/Board/lib.ts +34 -3
- package/packages/scrabble-solver/src/components/Board/selectors.ts +17 -5
- package/packages/scrabble-solver/src/components/Button/Button.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Modal/Modal.module.scss +0 -4
- package/packages/scrabble-solver/src/components/Results/Header.tsx +30 -5
- package/packages/scrabble-solver/src/components/Results/Result.tsx +45 -55
- package/packages/scrabble-solver/src/components/Results/Results.module.scss +0 -126
- package/packages/scrabble-solver/src/components/Results/Results.module.scss.d.ts +0 -10
- package/packages/scrabble-solver/src/components/Results/Results.tsx +25 -5
- package/packages/scrabble-solver/src/components/Solver/Solver.module.scss +4 -4
- package/packages/scrabble-solver/src/components/Solver/Solver.tsx +5 -3
- package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +5 -1
- package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss.d.ts +1 -0
- package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +5 -2
- package/packages/scrabble-solver/src/components/Table/Cell.tsx +42 -0
- package/packages/scrabble-solver/src/components/Table/Header.tsx +11 -0
- package/packages/scrabble-solver/src/components/{Results → Table}/HeaderButton.tsx +22 -14
- package/packages/scrabble-solver/src/components/Table/Row.tsx +59 -0
- package/packages/scrabble-solver/src/components/{ResultsInput/ResultsInput.tsx → Table/Search.tsx} +9 -11
- package/packages/scrabble-solver/src/components/Table/Table.module.scss +147 -0
- package/packages/scrabble-solver/src/components/Table/Table.module.scss.d.ts +19 -0
- package/packages/scrabble-solver/src/components/Table/index.ts +5 -0
- package/packages/scrabble-solver/src/components/Tile/Tile.module.scss +2 -1
- package/packages/scrabble-solver/src/hooks/useColumns.ts +7 -5
- package/packages/scrabble-solver/src/hooks/useIsCompactLayout.ts +14 -0
- package/packages/scrabble-solver/src/i18n/languages/english.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/french.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/german.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/persian.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/polish.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/romanian.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/spanish.json +6 -1
- package/packages/scrabble-solver/src/i18n/languages/turkish.json +6 -1
- package/packages/scrabble-solver/src/icons/QuestionSquare.svg +5 -0
- package/packages/scrabble-solver/src/lib/createCoordinatesComparator.ts +23 -0
- package/packages/scrabble-solver/src/lib/createKeyComparator.ts +1 -4
- package/packages/scrabble-solver/src/lib/createSortComparator.ts +22 -0
- package/packages/scrabble-solver/src/lib/getCoordinates.test.ts +21 -0
- package/packages/scrabble-solver/src/lib/getCoordinates.ts +16 -0
- package/packages/scrabble-solver/src/lib/getNextSort.ts +12 -0
- package/packages/scrabble-solver/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +3 -1
- package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/Character.tsx +8 -9
- package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.tsx +14 -10
- package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.module.scss +16 -27
- package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.module.scss.d.ts +3 -6
- package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.tsx +56 -42
- package/packages/scrabble-solver/src/modals/WordsModal/components/WordsTable/WordRow.tsx +92 -0
- package/packages/scrabble-solver/src/modals/WordsModal/components/WordsTable/WordsTable.module.scss +69 -0
- package/packages/scrabble-solver/src/modals/WordsModal/components/WordsTable/WordsTable.module.scss.d.ts +16 -0
- package/packages/scrabble-solver/src/modals/WordsModal/components/WordsTable/WordsTable.tsx +137 -0
- package/packages/scrabble-solver/src/modals/WordsModal/components/WordsTable/index.ts +1 -0
- package/packages/scrabble-solver/src/modals/WordsModal/components/index.ts +1 -0
- package/packages/scrabble-solver/src/pages/api/verify.ts +7 -6
- package/packages/scrabble-solver/src/pages/index.tsx +29 -4
- package/packages/scrabble-solver/src/parameters/index.ts +2 -0
- package/packages/scrabble-solver/src/sdk/verify.ts +3 -2
- package/packages/scrabble-solver/src/solver-worker/client.test.ts +10 -3
- package/packages/scrabble-solver/src/solver-worker/index.worker.ts +7 -7
- package/packages/scrabble-solver/src/solver-worker/messages.ts +3 -3
- package/packages/scrabble-solver/src/state/hoveredWord/index.ts +4 -0
- package/packages/scrabble-solver/src/state/hoveredWord/initialState.ts +5 -0
- package/packages/scrabble-solver/src/state/hoveredWord/selectors.ts +5 -0
- package/packages/scrabble-solver/src/state/hoveredWord/slice.ts +18 -0
- package/packages/scrabble-solver/src/state/hoveredWord/types.ts +5 -0
- package/packages/scrabble-solver/src/state/index.ts +1 -0
- package/packages/scrabble-solver/src/state/localStorage.ts +13 -2
- package/packages/scrabble-solver/src/state/results/lib.ts +9 -26
- package/packages/scrabble-solver/src/state/results/selectors.ts +9 -1
- package/packages/scrabble-solver/src/state/results/slice.ts +4 -16
- package/packages/scrabble-solver/src/state/sagas.ts +26 -1
- package/packages/scrabble-solver/src/state/selectors.ts +18 -1
- package/packages/scrabble-solver/src/state/store.ts +2 -0
- package/packages/scrabble-solver/src/state/types.ts +2 -0
- package/packages/scrabble-solver/src/state/verify/initialState.ts +7 -0
- package/packages/scrabble-solver/src/state/verify/lib.test.ts +55 -0
- package/packages/scrabble-solver/src/state/verify/lib.ts +49 -0
- package/packages/scrabble-solver/src/state/verify/selectors.ts +37 -0
- package/packages/scrabble-solver/src/state/verify/slice.ts +13 -2
- package/packages/scrabble-solver/src/state/verify/types.ts +6 -2
- package/packages/scrabble-solver/src/styles/_tokens.scss +2 -0
- package/packages/scrabble-solver/src/styles/mixins.scss +5 -0
- package/packages/scrabble-solver/src/styles/variables.module.scss +1 -0
- package/packages/scrabble-solver/src/styles/variables.module.scss.d.ts +1 -0
- package/packages/scrabble-solver/src/styles/variables.scss +1 -1
- package/packages/scrabble-solver/src/types/index.ts +24 -11
- package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -1
- package/packages/solver/package.json +5 -5
- package/packages/types/build/Bingo.d.ts +0 -3
- package/packages/types/build/Bingo.js +0 -14
- package/packages/types/build/Board.d.ts +3 -1
- package/packages/types/build/Board.js +5 -40
- package/packages/types/build/BoardJson.d.ts +0 -1
- package/packages/types/build/BoardJson.js +0 -19
- package/packages/types/build/BoardWord.d.ts +7 -0
- package/packages/types/build/BoardWord.js +2 -0
- package/packages/types/build/CellJson.d.ts +0 -1
- package/packages/types/build/CellJson.js +0 -11
- package/packages/types/build/Game.d.ts +2 -2
- package/packages/types/build/Game.js +2 -4
- package/packages/types/build/Locale.d.ts +0 -1
- package/packages/types/build/Locale.js +1 -4
- package/packages/types/build/Result.js +3 -3
- package/packages/types/build/TileJson.d.ts +0 -1
- package/packages/types/build/TileJson.js +0 -6
- package/packages/types/build/index.d.ts +9 -8
- package/packages/types/build/index.js +14 -17
- package/packages/types/build/lib/getBoardWords.d.ts +3 -0
- package/packages/types/build/lib/getBoardWords.js +10 -0
- package/packages/types/build/lib/getCells.d.ts +4 -0
- package/packages/types/build/lib/getCells.js +27 -0
- package/packages/types/build/lib/getCollidingWords.d.ts +3 -0
- package/packages/types/build/lib/getCollidingWords.js +19 -0
- package/packages/types/build/lib/getCollision.d.ts +3 -0
- package/packages/types/build/lib/getCollision.js +31 -0
- package/packages/types/build/lib/getCollisions.d.ts +3 -0
- package/packages/types/build/lib/getCollisions.js +17 -0
- package/packages/types/build/lib/getPlacedCell.d.ts +3 -0
- package/packages/types/build/lib/getPlacedCell.js +10 -0
- package/packages/types/build/lib/getWordThrough.d.ts +4 -0
- package/packages/types/build/lib/getWordThrough.js +23 -0
- package/packages/types/build/lib/getWordsInRows.d.ts +8 -0
- package/packages/types/build/lib/getWordsInRows.js +29 -0
- package/packages/types/build/lib/index.d.ts +5 -0
- package/packages/types/build/lib/index.js +21 -0
- package/packages/types/build/lib/isSameBoardWord.d.ts +2 -0
- package/packages/types/build/lib/isSameBoardWord.js +6 -0
- package/packages/types/build/lib/toBoardWord.d.ts +4 -0
- package/packages/types/build/lib/toBoardWord.js +11 -0
- package/packages/types/build/lib/transpose.d.ts +1 -0
- package/packages/types/build/lib/transpose.js +16 -0
- package/packages/types/build/type-guards/index.d.ts +10 -0
- package/packages/types/build/type-guards/index.js +23 -0
- package/packages/types/build/type-guards/isBingo.d.ts +2 -0
- package/packages/types/build/type-guards/isBingo.js +9 -0
- package/packages/types/build/type-guards/isBoardJson.d.ts +2 -0
- package/packages/types/build/type-guards/isBoardJson.js +21 -0
- package/packages/types/build/type-guards/isCellJson.d.ts +2 -0
- package/packages/types/build/type-guards/isCellJson.js +13 -0
- package/packages/types/build/type-guards/isGame.d.ts +2 -0
- package/packages/types/build/type-guards/isGame.js +7 -0
- package/packages/types/build/type-guards/isLocale.d.ts +2 -0
- package/packages/types/build/type-guards/isLocale.js +7 -0
- package/packages/types/build/type-guards/isMultiplierBingo.d.ts +2 -0
- package/packages/types/build/type-guards/isMultiplierBingo.js +8 -0
- package/packages/types/build/type-guards/isScoreBingo.d.ts +2 -0
- package/packages/types/build/type-guards/isScoreBingo.js +8 -0
- package/packages/types/build/type-guards/isTileJson.d.ts +2 -0
- package/packages/types/build/type-guards/isTileJson.js +8 -0
- package/packages/types/package.json +2 -2
- package/packages/types/src/Bingo.ts +0 -14
- package/packages/types/src/Board.test.ts +85 -0
- package/packages/types/src/Board.ts +8 -49
- package/packages/types/src/BoardJson.ts +1 -21
- package/packages/types/src/BoardWord.ts +8 -0
- package/packages/types/src/CellJson.ts +1 -12
- package/packages/types/src/Game.ts +1 -4
- package/packages/types/src/Locale.ts +0 -4
- package/packages/types/src/Result.ts +3 -3
- package/packages/types/src/TileJson.ts +0 -6
- package/packages/types/src/index.ts +20 -8
- package/packages/types/src/lib/getBoardWords.ts +11 -0
- package/packages/types/src/lib/getCells.test.ts +127 -0
- package/packages/types/src/lib/getCells.ts +31 -0
- package/packages/types/src/lib/getCollidingWords.ts +25 -0
- package/packages/types/src/lib/getCollision.ts +38 -0
- package/packages/types/src/lib/getCollisions.test.ts +82 -0
- package/packages/types/src/lib/getCollisions.ts +22 -0
- package/packages/types/src/lib/getPlacedCell.ts +9 -0
- package/packages/types/src/lib/getWordThrough.ts +30 -0
- package/packages/types/src/lib/getWordsInRows.ts +34 -0
- package/packages/types/src/lib/index.ts +5 -0
- package/packages/types/src/lib/isSameBoardWord.ts +5 -0
- package/packages/types/src/lib/toBoardWord.ts +12 -0
- package/packages/types/src/lib/transpose.ts +15 -0
- package/packages/types/src/type-guards/index.ts +10 -0
- package/packages/types/src/type-guards/isBingo.ts +8 -0
- package/packages/types/src/type-guards/isBoardJson.test.ts +33 -0
- package/packages/types/src/type-guards/isBoardJson.ts +23 -0
- package/packages/types/src/type-guards/isCellJson.ts +14 -0
- package/packages/types/src/type-guards/isGame.ts +5 -0
- package/packages/types/src/type-guards/isLocale.ts +5 -0
- package/packages/types/src/type-guards/isMultiplierBingo.ts +7 -0
- package/packages/types/src/type-guards/isScoreBingo.ts +7 -0
- package/packages/types/src/type-guards/isTileJson.ts +7 -0
- package/packages/word-definitions/package.json +2 -2
- package/packages/word-lists/package.json +2 -2
- package/playwright-report/index.html +1 -1
- package/screencast.gif +0 -0
- package/packages/scrabble-solver/.next/server/chunks/316.js +0 -1
- package/packages/scrabble-solver/.next/server/chunks/916.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/106.e414e88694add27f.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/127.125d896a19061d71.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/18.8b91e137d239e15c.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/583.7a46807be14c377e.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/711.ba7b8f900dfd40d0.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/912.ff8037ba9d4db5c8.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/_app-2e607dcd4135f340.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/index-e0087247c995328d.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/webpack-cfb34d175e081981.js +0 -1
- package/packages/scrabble-solver/.next/static/css/b74cd7de82dabcdd.css +0 -1
- package/packages/scrabble-solver/.next/static/css/c403ce739a9c0d83.css +0 -1
- package/packages/scrabble-solver/.next/static/css/fbfdce70731d0d2b.css +0 -1
- package/packages/scrabble-solver/src/components/Results/Cell.tsx +0 -32
- package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.module.scss +0 -12
- package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.module.scss.d.ts +0 -7
- package/packages/scrabble-solver/src/components/ResultsInput/index.ts +0 -1
- package/packages/types/build/readResultCells.d.ts +0 -5
- package/packages/types/build/readResultCells.js +0 -75
- package/packages/types/src/readResultCells.test.ts +0 -140
- package/packages/types/src/readResultCells.ts +0 -90
- /package/packages/scrabble-solver/.next/static/{5KOWzYqfY1Z2rjrzptr8D → 8WnIUTe-yJvPD6stltvYI}/_ssgManifest.js +0 -0
- /package/packages/types/build/{isError.d.ts → type-guards/isError.d.ts} +0 -0
- /package/packages/types/build/{isError.js → type-guards/isError.js} +0 -0
- /package/packages/types/build/{isObject.d.ts → type-guards/isObject.d.ts} +0 -0
- /package/packages/types/build/{isObject.js → type-guards/isObject.js} +0 -0
- /package/packages/types/src/{isError.ts → type-guards/isError.ts} +0 -0
- /package/packages/types/src/{isObject.ts → type-guards/isObject.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wyrazy = void 0;
|
|
4
|
+
const constants_1 = require("@scrabble-solver/constants");
|
|
5
|
+
const types_1 = require("@scrabble-solver/types");
|
|
6
|
+
exports.wyrazy = {
|
|
7
|
+
bingo: { score: 25 },
|
|
8
|
+
blankScore: 0,
|
|
9
|
+
blanksCount: 2,
|
|
10
|
+
boardHeight: 15,
|
|
11
|
+
boardWidth: 15,
|
|
12
|
+
game: types_1.Game.Wyrazy,
|
|
13
|
+
name: 'Wyrazy',
|
|
14
|
+
rackSize: 7,
|
|
15
|
+
bonuses: [
|
|
16
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 2, y: 0 },
|
|
17
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 0 },
|
|
18
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 0 },
|
|
19
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 12, y: 0 },
|
|
20
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 1, y: 1 },
|
|
21
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 5, y: 1 },
|
|
22
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 9, y: 1 },
|
|
23
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 13, y: 1 },
|
|
24
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 2 },
|
|
25
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 4, y: 2 },
|
|
26
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 10, y: 2 },
|
|
27
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 2 },
|
|
28
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 3 },
|
|
29
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 7, y: 3 },
|
|
30
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 3 },
|
|
31
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 2, y: 4 },
|
|
32
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 4 },
|
|
33
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 4 },
|
|
34
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 12, y: 4 },
|
|
35
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 1, y: 5 },
|
|
36
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 5 },
|
|
37
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 5 },
|
|
38
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 13, y: 5 },
|
|
39
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 6 },
|
|
40
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 4, y: 6 },
|
|
41
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 10, y: 6 },
|
|
42
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 6 },
|
|
43
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 7 },
|
|
44
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 7 },
|
|
45
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 8 },
|
|
46
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 4, y: 8 },
|
|
47
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 10, y: 8 },
|
|
48
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 8 },
|
|
49
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 1, y: 9 },
|
|
50
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 9 },
|
|
51
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 9 },
|
|
52
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 13, y: 9 },
|
|
53
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 2, y: 10 },
|
|
54
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 10 },
|
|
55
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 10 },
|
|
56
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 12, y: 10 },
|
|
57
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 11 },
|
|
58
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 7, y: 11 },
|
|
59
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 11 },
|
|
60
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 12 },
|
|
61
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 4, y: 12 },
|
|
62
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 10, y: 12 },
|
|
63
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 12 },
|
|
64
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 1, y: 13 },
|
|
65
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 5, y: 13 },
|
|
66
|
+
{ multiplier: 2, type: constants_1.BONUS_WORD, x: 9, y: 13 },
|
|
67
|
+
{ multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 13, y: 13 },
|
|
68
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 2, y: 14 },
|
|
69
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 14 },
|
|
70
|
+
{ multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 14 },
|
|
71
|
+
{ multiplier: 3, type: constants_1.BONUS_WORD, x: 12, y: 14 },
|
|
72
|
+
],
|
|
73
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.polishLiteraki = exports.polishScrabble = void 0;
|
|
3
|
+
exports.polishWyrazy = exports.polishLiteraki = exports.polishScrabble = void 0;
|
|
4
4
|
const types_1 = require("@scrabble-solver/types");
|
|
5
5
|
const games_1 = require("../games");
|
|
6
6
|
exports.polishScrabble = new types_1.Config({
|
|
@@ -79,3 +79,41 @@ exports.polishLiteraki = new types_1.Config({
|
|
|
79
79
|
{ character: 'ż', count: 1, score: 5 },
|
|
80
80
|
],
|
|
81
81
|
});
|
|
82
|
+
exports.polishWyrazy = new types_1.Config({
|
|
83
|
+
...games_1.wyrazy,
|
|
84
|
+
locale: types_1.Locale.PL_PL,
|
|
85
|
+
tiles: [
|
|
86
|
+
{ character: 'a', count: 9, score: 1 },
|
|
87
|
+
{ character: 'ą', count: 1, score: 5 },
|
|
88
|
+
{ character: 'b', count: 2, score: 3 },
|
|
89
|
+
{ character: 'c', count: 3, score: 2 },
|
|
90
|
+
{ character: 'ć', count: 1, score: 5 },
|
|
91
|
+
{ character: 'd', count: 3, score: 2 },
|
|
92
|
+
{ character: 'e', count: 7, score: 1 },
|
|
93
|
+
{ character: 'ę', count: 1, score: 5 },
|
|
94
|
+
{ character: 'f', count: 1, score: 5 },
|
|
95
|
+
{ character: 'g', count: 2, score: 3 },
|
|
96
|
+
{ character: 'h', count: 2, score: 3 },
|
|
97
|
+
{ character: 'i', count: 8, score: 1 },
|
|
98
|
+
{ character: 'j', count: 2, score: 3 },
|
|
99
|
+
{ character: 'k', count: 3, score: 2 },
|
|
100
|
+
{ character: 'l', count: 3, score: 2 },
|
|
101
|
+
{ character: 'ł', count: 2, score: 3 },
|
|
102
|
+
{ character: 'm', count: 3, score: 2 },
|
|
103
|
+
{ character: 'n', count: 5, score: 1 },
|
|
104
|
+
{ character: 'ń', count: 1, score: 5 },
|
|
105
|
+
{ character: 'o', count: 6, score: 1 },
|
|
106
|
+
{ character: 'ó', count: 1, score: 5 },
|
|
107
|
+
{ character: 'p', count: 3, score: 2 },
|
|
108
|
+
{ character: 'r', count: 4, score: 1 },
|
|
109
|
+
{ character: 's', count: 4, score: 1 },
|
|
110
|
+
{ character: 'ś', count: 1, score: 5 },
|
|
111
|
+
{ character: 't', count: 3, score: 2 },
|
|
112
|
+
{ character: 'u', count: 2, score: 3 },
|
|
113
|
+
{ character: 'w', count: 4, score: 1 },
|
|
114
|
+
{ character: 'y', count: 4, score: 2 },
|
|
115
|
+
{ character: 'z', count: 5, score: 1 },
|
|
116
|
+
{ character: 'ź', count: 1, score: 5 },
|
|
117
|
+
{ character: 'ż', count: 1, score: 5 },
|
|
118
|
+
],
|
|
119
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/configs",
|
|
3
|
-
"version": "2.18.
|
|
4
|
-
"description": "Game and language configs for Scrabble Solver: board layouts, bonus squares, tile distributions, and points for
|
|
3
|
+
"version": "2.18.3",
|
|
4
|
+
"description": "Game and language configs for Scrabble Solver: board layouts, bonus squares, tile distributions, and points for 8 games and 9 locales.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"scrabble",
|
|
7
7
|
"board-game",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"game-config",
|
|
10
10
|
"literaki",
|
|
11
11
|
"kelimelik",
|
|
12
|
+
"wyrazy",
|
|
12
13
|
"super-scrabble"
|
|
13
14
|
],
|
|
14
15
|
"main": "build/index.js",
|
|
@@ -32,8 +33,8 @@
|
|
|
32
33
|
"clean": "rimraf build/"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@scrabble-solver/constants": "^2.18.
|
|
36
|
-
"@scrabble-solver/types": "^2.18.
|
|
36
|
+
"@scrabble-solver/constants": "^2.18.3",
|
|
37
|
+
"@scrabble-solver/types": "^2.18.3"
|
|
37
38
|
},
|
|
38
39
|
"gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
|
|
39
40
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { BONUS_CHARACTER, BONUS_WORD } from '@scrabble-solver/constants';
|
|
2
|
+
import { Game } from '@scrabble-solver/types';
|
|
3
|
+
|
|
4
|
+
export const wyrazy = {
|
|
5
|
+
bingo: { score: 25 },
|
|
6
|
+
blankScore: 0,
|
|
7
|
+
blanksCount: 2,
|
|
8
|
+
boardHeight: 15,
|
|
9
|
+
boardWidth: 15,
|
|
10
|
+
game: Game.Wyrazy,
|
|
11
|
+
name: 'Wyrazy',
|
|
12
|
+
rackSize: 7,
|
|
13
|
+
bonuses: [
|
|
14
|
+
{ multiplier: 3, type: BONUS_WORD, x: 2, y: 0 },
|
|
15
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 6, y: 0 },
|
|
16
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 8, y: 0 },
|
|
17
|
+
{ multiplier: 3, type: BONUS_WORD, x: 12, y: 0 },
|
|
18
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 1, y: 1 },
|
|
19
|
+
{ multiplier: 2, type: BONUS_WORD, x: 5, y: 1 },
|
|
20
|
+
{ multiplier: 2, type: BONUS_WORD, x: 9, y: 1 },
|
|
21
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 13, y: 1 },
|
|
22
|
+
{ multiplier: 3, type: BONUS_WORD, x: 0, y: 2 },
|
|
23
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 4, y: 2 },
|
|
24
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 10, y: 2 },
|
|
25
|
+
{ multiplier: 3, type: BONUS_WORD, x: 14, y: 2 },
|
|
26
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 3, y: 3 },
|
|
27
|
+
{ multiplier: 2, type: BONUS_WORD, x: 7, y: 3 },
|
|
28
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 11, y: 3 },
|
|
29
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 2, y: 4 },
|
|
30
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 6, y: 4 },
|
|
31
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 8, y: 4 },
|
|
32
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 12, y: 4 },
|
|
33
|
+
{ multiplier: 2, type: BONUS_WORD, x: 1, y: 5 },
|
|
34
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 5, y: 5 },
|
|
35
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 9, y: 5 },
|
|
36
|
+
{ multiplier: 2, type: BONUS_WORD, x: 13, y: 5 },
|
|
37
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 0, y: 6 },
|
|
38
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 4, y: 6 },
|
|
39
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 10, y: 6 },
|
|
40
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 14, y: 6 },
|
|
41
|
+
{ multiplier: 2, type: BONUS_WORD, x: 3, y: 7 },
|
|
42
|
+
{ multiplier: 2, type: BONUS_WORD, x: 11, y: 7 },
|
|
43
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 0, y: 8 },
|
|
44
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 4, y: 8 },
|
|
45
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 10, y: 8 },
|
|
46
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 14, y: 8 },
|
|
47
|
+
{ multiplier: 2, type: BONUS_WORD, x: 1, y: 9 },
|
|
48
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 5, y: 9 },
|
|
49
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 9, y: 9 },
|
|
50
|
+
{ multiplier: 2, type: BONUS_WORD, x: 13, y: 9 },
|
|
51
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 2, y: 10 },
|
|
52
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 6, y: 10 },
|
|
53
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 8, y: 10 },
|
|
54
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 12, y: 10 },
|
|
55
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 3, y: 11 },
|
|
56
|
+
{ multiplier: 2, type: BONUS_WORD, x: 7, y: 11 },
|
|
57
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 11, y: 11 },
|
|
58
|
+
{ multiplier: 3, type: BONUS_WORD, x: 0, y: 12 },
|
|
59
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 4, y: 12 },
|
|
60
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 10, y: 12 },
|
|
61
|
+
{ multiplier: 3, type: BONUS_WORD, x: 14, y: 12 },
|
|
62
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 1, y: 13 },
|
|
63
|
+
{ multiplier: 2, type: BONUS_WORD, x: 5, y: 13 },
|
|
64
|
+
{ multiplier: 2, type: BONUS_WORD, x: 9, y: 13 },
|
|
65
|
+
{ multiplier: 3, type: BONUS_CHARACTER, x: 13, y: 13 },
|
|
66
|
+
{ multiplier: 3, type: BONUS_WORD, x: 2, y: 14 },
|
|
67
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 6, y: 14 },
|
|
68
|
+
{ multiplier: 2, type: BONUS_CHARACTER, x: 8, y: 14 },
|
|
69
|
+
{ multiplier: 3, type: BONUS_WORD, x: 12, y: 14 },
|
|
70
|
+
],
|
|
71
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config, Locale } from '@scrabble-solver/types';
|
|
2
2
|
|
|
3
|
-
import { literaki, scrabble } from '../games';
|
|
3
|
+
import { literaki, scrabble, wyrazy } from '../games';
|
|
4
4
|
|
|
5
5
|
export const polishScrabble = new Config({
|
|
6
6
|
...scrabble,
|
|
@@ -79,3 +79,42 @@ export const polishLiteraki = new Config({
|
|
|
79
79
|
{ character: 'ż', count: 1, score: 5 },
|
|
80
80
|
],
|
|
81
81
|
});
|
|
82
|
+
|
|
83
|
+
export const polishWyrazy = new Config({
|
|
84
|
+
...wyrazy,
|
|
85
|
+
locale: Locale.PL_PL,
|
|
86
|
+
tiles: [
|
|
87
|
+
{ character: 'a', count: 9, score: 1 },
|
|
88
|
+
{ character: 'ą', count: 1, score: 5 },
|
|
89
|
+
{ character: 'b', count: 2, score: 3 },
|
|
90
|
+
{ character: 'c', count: 3, score: 2 },
|
|
91
|
+
{ character: 'ć', count: 1, score: 5 },
|
|
92
|
+
{ character: 'd', count: 3, score: 2 },
|
|
93
|
+
{ character: 'e', count: 7, score: 1 },
|
|
94
|
+
{ character: 'ę', count: 1, score: 5 },
|
|
95
|
+
{ character: 'f', count: 1, score: 5 },
|
|
96
|
+
{ character: 'g', count: 2, score: 3 },
|
|
97
|
+
{ character: 'h', count: 2, score: 3 },
|
|
98
|
+
{ character: 'i', count: 8, score: 1 },
|
|
99
|
+
{ character: 'j', count: 2, score: 3 },
|
|
100
|
+
{ character: 'k', count: 3, score: 2 },
|
|
101
|
+
{ character: 'l', count: 3, score: 2 },
|
|
102
|
+
{ character: 'ł', count: 2, score: 3 },
|
|
103
|
+
{ character: 'm', count: 3, score: 2 },
|
|
104
|
+
{ character: 'n', count: 5, score: 1 },
|
|
105
|
+
{ character: 'ń', count: 1, score: 5 },
|
|
106
|
+
{ character: 'o', count: 6, score: 1 },
|
|
107
|
+
{ character: 'ó', count: 1, score: 5 },
|
|
108
|
+
{ character: 'p', count: 3, score: 2 },
|
|
109
|
+
{ character: 'r', count: 4, score: 1 },
|
|
110
|
+
{ character: 's', count: 4, score: 1 },
|
|
111
|
+
{ character: 'ś', count: 1, score: 5 },
|
|
112
|
+
{ character: 't', count: 3, score: 2 },
|
|
113
|
+
{ character: 'u', count: 2, score: 3 },
|
|
114
|
+
{ character: 'w', count: 4, score: 1 },
|
|
115
|
+
{ character: 'y', count: 4, score: 2 },
|
|
116
|
+
{ character: 'z', count: 5, score: 1 },
|
|
117
|
+
{ character: 'ź', count: 1, score: 5 },
|
|
118
|
+
{ character: 'ż', count: 1, score: 5 },
|
|
119
|
+
],
|
|
120
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/dictionaries",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.3",
|
|
4
4
|
"description": "Dictionary manager for Scrabble Solver: downloads per-locale word lists and serves them as GADDAG automata with layered disk/memory caching.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"scrabble",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@kamilmielnik/gaddag": "^2.0.0",
|
|
41
|
-
"@scrabble-solver/logger": "^2.18.
|
|
42
|
-
"@scrabble-solver/types": "^2.18.
|
|
43
|
-
"@scrabble-solver/word-lists": "^2.18.
|
|
41
|
+
"@scrabble-solver/logger": "^2.18.3",
|
|
42
|
+
"@scrabble-solver/types": "^2.18.3",
|
|
43
|
+
"@scrabble-solver/word-lists": "^2.18.3"
|
|
44
44
|
},
|
|
45
45
|
"gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
|
|
46
46
|
}
|
|
@@ -4,49 +4,70 @@ const path = require('path');
|
|
|
4
4
|
const { argv } = require('process');
|
|
5
5
|
|
|
6
6
|
const DAY = 24 * 60 * 60 * 1000;
|
|
7
|
+
const EVENTS = [` message: 'visit - request',`, ` message: 'solve - request',`, ` message: 'dictionary - request',`];
|
|
8
|
+
const TIMESTAMP_PREFIX = ` timestamp: '`;
|
|
9
|
+
const DATE_LENGTH = 'YYYY-MM-DD'.length;
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
main();
|
|
12
|
+
|
|
13
|
+
async function main() {
|
|
14
|
+
const filepath = path.resolve(os.homedir(), 'desktop', 'all.log');
|
|
15
|
+
const since = argv[2] || '2021-06-01';
|
|
16
|
+
const countsPerDay = await countEventsPerDay(filepath, since);
|
|
17
|
+
|
|
18
|
+
for (const event of EVENTS) {
|
|
19
|
+
printStats(getStats(event, countsPerDay.get(event), since));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
11
22
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
async function countEventsPerDay(filepath, since) {
|
|
24
|
+
const countsPerDay = new Map(EVENTS.map((event) => [event, {}]));
|
|
25
|
+
let pendingEvent;
|
|
15
26
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const day =
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
for await (const line of readLines(filepath)) {
|
|
28
|
+
if (pendingEvent) {
|
|
29
|
+
const day = line.slice(TIMESTAMP_PREFIX.length, TIMESTAMP_PREFIX.length + DATE_LENGTH);
|
|
30
|
+
|
|
31
|
+
if (day >= since) {
|
|
32
|
+
const counts = countsPerDay.get(pendingEvent);
|
|
33
|
+
counts[day] = (counts[day] || 0) + 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
pendingEvent = undefined;
|
|
37
|
+
} else if (countsPerDay.has(line)) {
|
|
38
|
+
pendingEvent = line;
|
|
21
39
|
}
|
|
22
40
|
}
|
|
23
41
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
return countsPerDay;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function* readLines(filepath) {
|
|
46
|
+
let remainder = '';
|
|
47
|
+
|
|
48
|
+
for await (const chunk of fs.createReadStream(filepath, 'utf-8')) {
|
|
49
|
+
const lines = (remainder + chunk).split('\n');
|
|
50
|
+
remainder = lines.pop();
|
|
51
|
+
yield* lines;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (remainder) {
|
|
55
|
+
yield remainder;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
29
58
|
|
|
30
|
-
|
|
59
|
+
function getStats(event, countsPerDay, since) {
|
|
60
|
+
const daysCount = Math.ceil((Date.now() - Number(new Date(since))) / DAY);
|
|
61
|
+
const sum = Object.values(countsPerDay).reduce((result, count) => result + count, 0);
|
|
31
62
|
|
|
32
|
-
return { daysCount, event,
|
|
33
|
-
}
|
|
63
|
+
return { daysCount, event, countsPerDay, sum };
|
|
64
|
+
}
|
|
34
65
|
|
|
35
|
-
|
|
66
|
+
function printStats({ daysCount, event, countsPerDay, sum }) {
|
|
36
67
|
console.log('--------------------------------------');
|
|
37
68
|
console.log(event);
|
|
38
69
|
console.log('--------------------------------------');
|
|
39
70
|
console.log(`Sum: ${sum}`);
|
|
40
71
|
console.log(`Avg: ${sum / daysCount}`);
|
|
41
|
-
console.table(
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const filepath = path.resolve(os.homedir(), '.scrabble-solver', 'logs', 'all.log');
|
|
45
|
-
const file = fs.readFileSync(filepath, 'utf-8');
|
|
46
|
-
const lines = file.split('\n');
|
|
47
|
-
const since = argv[2] || '2021-06-01';
|
|
48
|
-
const events = [` message: 'visit - request',`, ` message: 'solve - request',`, ` message: 'dictionary - request',`];
|
|
49
|
-
|
|
50
|
-
for (const event of events) {
|
|
51
|
-
printStats(getStats(event, lines, since));
|
|
72
|
+
console.table(countsPerDay);
|
|
52
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8WnIUTe-yJvPD6stltvYI
|
|
@@ -4,37 +4,37 @@
|
|
|
4
4
|
],
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"lowPriorityFiles": [
|
|
7
|
-
"static/
|
|
8
|
-
"static/
|
|
7
|
+
"static/8WnIUTe-yJvPD6stltvYI/_buildManifest.js",
|
|
8
|
+
"static/8WnIUTe-yJvPD6stltvYI/_ssgManifest.js"
|
|
9
9
|
],
|
|
10
10
|
"rootMainFiles": [],
|
|
11
11
|
"rootMainFilesTree": {},
|
|
12
12
|
"pages": {
|
|
13
13
|
"/": [
|
|
14
|
-
"static/chunks/webpack-
|
|
14
|
+
"static/chunks/webpack-d7138f1ef6b8c9d6.js",
|
|
15
15
|
"static/chunks/framework-626cbd48ac5aca57.js",
|
|
16
|
-
"static/chunks/main-
|
|
16
|
+
"static/chunks/main-7e52da35a4beea0b.js",
|
|
17
17
|
"static/chunks/101-829ab8a8d310e7a0.js",
|
|
18
|
-
"static/css/
|
|
19
|
-
"static/chunks/pages/index-
|
|
18
|
+
"static/css/a691348b788f8bc0.css",
|
|
19
|
+
"static/chunks/pages/index-b073a1686818dd26.js"
|
|
20
20
|
],
|
|
21
21
|
"/_app": [
|
|
22
|
-
"static/chunks/webpack-
|
|
22
|
+
"static/chunks/webpack-d7138f1ef6b8c9d6.js",
|
|
23
23
|
"static/chunks/framework-626cbd48ac5aca57.js",
|
|
24
|
-
"static/chunks/main-
|
|
25
|
-
"static/css/
|
|
26
|
-
"static/chunks/pages/_app-
|
|
24
|
+
"static/chunks/main-7e52da35a4beea0b.js",
|
|
25
|
+
"static/css/92f85ce358a0a468.css",
|
|
26
|
+
"static/chunks/pages/_app-e3fe880e24c024ab.js"
|
|
27
27
|
],
|
|
28
28
|
"/_error": [
|
|
29
|
-
"static/chunks/webpack-
|
|
29
|
+
"static/chunks/webpack-d7138f1ef6b8c9d6.js",
|
|
30
30
|
"static/chunks/framework-626cbd48ac5aca57.js",
|
|
31
|
-
"static/chunks/main-
|
|
31
|
+
"static/chunks/main-7e52da35a4beea0b.js",
|
|
32
32
|
"static/chunks/pages/_error-f0290a98eb3ed0ec.js"
|
|
33
33
|
],
|
|
34
34
|
"/not-found": [
|
|
35
|
-
"static/chunks/webpack-
|
|
35
|
+
"static/chunks/webpack-d7138f1ef6b8c9d6.js",
|
|
36
36
|
"static/chunks/framework-626cbd48ac5aca57.js",
|
|
37
|
-
"static/chunks/main-
|
|
37
|
+
"static/chunks/main-7e52da35a4beea0b.js",
|
|
38
38
|
"static/css/dee878eb64099d92.css",
|
|
39
39
|
"static/chunks/pages/not-found-a59f9deeeff63d17.js"
|
|
40
40
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"previewModeId":"
|
|
1
|
+
{"previewModeId":"d56d08e80e1c264fb9d5bd2f046d21e9","previewModeSigningKey":"710dfc296ee593a012938c12ca917fa8a7e3ee8c4ee055414ad75479b6de3c74","previewModeEncryptionKey":"b8cd042dcfa5ffc82dead343e6d398a5c6e43f0914c1fcf246c66c0a019c64ed","expireAt":1788815296531}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"encryption.key":"
|
|
1
|
+
{"encryption.key":"YarGHnilucy7AOI9ayDZUAGfe4eQGgej5vNDdcCPS2k=","encryption.expire_at":1788815296528}
|