scrabble-solver 2.13.12 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/.eslintrc.js +13 -4
  2. package/.github/workflows/build.yml +6 -14
  3. package/.github/workflows/cypress.yml +28 -0
  4. package/.github/workflows/eslint.yml +9 -16
  5. package/.github/workflows/jest.yml +21 -0
  6. package/.nx/cache/nx_files.nxt +0 -0
  7. package/.nx/workspace-data/file-map.json +639 -543
  8. package/.nx/workspace-data/lockfile.hash +1 -1
  9. package/.nx/workspace-data/parsed-lock-file.json +6131 -5552
  10. package/.nx/workspace-data/project-graph.json +4276 -2896
  11. package/README.md +5 -3
  12. package/bin/scrabble-solver.js +0 -0
  13. package/cypress/e2e/app.spec.cy.ts +118 -0
  14. package/cypress/e2e/bugs/112-character-bonus.ts +40 -0
  15. package/cypress/e2e/bugs/129-esc-sidebar.ts +23 -0
  16. package/cypress/e2e/bugs/2-q-tile-in-english.ts +33 -0
  17. package/cypress/e2e/bugs/3-x-tile-in-polish.ts +33 -0
  18. package/cypress/e2e/bugs/30-click-inside-radio-icon.ts +26 -0
  19. package/cypress/e2e/bugs/333-disabled-radio-cursor.ts +24 -0
  20. package/cypress/e2e/bugs/342-results-sorting.ts +48 -0
  21. package/cypress/e2e/bugs/348-results-word-padding.ts +74 -0
  22. package/cypress/e2e/bugs.spec.cy.ts +8 -0
  23. package/cypress/support/commands.ts +4 -0
  24. package/cypress/support/e2e.ts +1 -0
  25. package/cypress/support/index.ts +1 -0
  26. package/cypress/support/lib/actions.ts +57 -0
  27. package/cypress/support/lib/index.ts +2 -0
  28. package/cypress/support/lib/selectors.ts +70 -0
  29. package/cypress/tsconfig.json +9 -0
  30. package/cypress.config.ts +9 -0
  31. package/jest.config.js +2 -3
  32. package/lerna.json +1 -1
  33. package/package.json +29 -22
  34. package/packages/configs/package.json +3 -3
  35. package/packages/constants/package.json +1 -1
  36. package/packages/dictionaries/package-lock.json +2 -2
  37. package/packages/dictionaries/package.json +4 -4
  38. package/packages/logger/package-lock.json +3 -3
  39. package/packages/logger/package.json +2 -2
  40. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  41. package/packages/scrabble-solver/.next/build-manifest.json +14 -14
  42. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  43. package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
  44. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  45. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  46. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
  47. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
  48. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  49. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  50. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  51. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  52. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
  53. package/packages/scrabble-solver/.next/prerender-manifest.js +1 -1
  54. package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
  55. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  56. package/packages/scrabble-solver/.next/server/chunks/807.js +1 -1
  57. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  58. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  59. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  60. package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
  61. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  62. package/packages/scrabble-solver/.next/server/pages/index.js +1 -1
  63. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  64. package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -1
  65. package/packages/scrabble-solver/.next/static/{N8hSsS6Ppzlj3ebHMSZvI → TxfjxrH5h31sPQxPhrJzG}/_buildManifest.js +1 -1
  66. package/packages/scrabble-solver/.next/static/chunks/{main-b5b360c6afb66b05.js → main-8b0b4e610892a916.js} +1 -1
  67. package/packages/scrabble-solver/.next/static/chunks/pages/{404-0c9f3e0f8b15f487.js → 404-b0c2ccded2455be0.js} +1 -1
  68. package/packages/scrabble-solver/.next/static/chunks/pages/_app-2912876c7b6e698e.js +17 -0
  69. package/packages/scrabble-solver/.next/static/chunks/pages/index-86d9ad372c48c8b7.js +1 -0
  70. package/packages/scrabble-solver/.next/static/chunks/webpack-c4acd79e87956a0e.js +1 -0
  71. package/packages/scrabble-solver/.next/static/css/14625ff7b4d265d0.css +2 -0
  72. package/packages/scrabble-solver/.next/trace +45 -45
  73. package/packages/scrabble-solver/package-lock.json +6 -6
  74. package/packages/scrabble-solver/package.json +13 -13
  75. package/packages/scrabble-solver/public/service-worker.js +1 -1
  76. package/packages/scrabble-solver/src/components/Alert/Alert.tsx +1 -1
  77. package/packages/scrabble-solver/src/components/Board/Board.module.scss +3 -9
  78. package/packages/scrabble-solver/src/components/Board/Board.tsx +2 -2
  79. package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +4 -3
  80. package/packages/scrabble-solver/src/components/Board/components/ToggleDirectionButton/ToggleDirectionButton.tsx +2 -0
  81. package/packages/scrabble-solver/src/components/Board/hooks/useBackgroundImage.tsx +2 -6
  82. package/packages/scrabble-solver/src/components/Board/hooks/useBoardStyle.ts +10 -4
  83. package/packages/scrabble-solver/src/components/Button/Button.tsx +1 -1
  84. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.module.scss +10 -7
  85. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.tsx +38 -36
  86. package/packages/scrabble-solver/src/components/IconButton/IconButton.tsx +1 -1
  87. package/packages/scrabble-solver/src/components/IconButton/Link.tsx +1 -1
  88. package/packages/scrabble-solver/src/components/Keys/Arrows/Arrows.tsx +4 -4
  89. package/packages/scrabble-solver/src/components/Loading/Loading.module.scss +1 -0
  90. package/packages/scrabble-solver/src/components/Loading/Loading.tsx +1 -1
  91. package/packages/scrabble-solver/src/components/Modal/components/Section/Section.tsx +3 -2
  92. package/packages/scrabble-solver/src/components/NavButtons/NavButtons.tsx +1 -0
  93. package/packages/scrabble-solver/src/components/NotFound/NotFound.tsx +1 -1
  94. package/packages/scrabble-solver/src/components/Rack/Rack.tsx +1 -0
  95. package/packages/scrabble-solver/src/components/Radio/Radio.tsx +1 -1
  96. package/packages/scrabble-solver/src/components/Results/Cell.tsx +7 -3
  97. package/packages/scrabble-solver/src/components/Results/Header.tsx +99 -0
  98. package/packages/scrabble-solver/src/components/Results/HeaderButton.tsx +18 -13
  99. package/packages/scrabble-solver/src/components/Results/Result.tsx +23 -16
  100. package/packages/scrabble-solver/src/components/Results/Results.module.scss +27 -18
  101. package/packages/scrabble-solver/src/components/Results/Results.tsx +3 -9
  102. package/packages/scrabble-solver/src/components/Results/types.ts +0 -8
  103. package/packages/scrabble-solver/src/components/Solver/Solver.tsx +1 -1
  104. package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +1 -1
  105. package/packages/scrabble-solver/src/components/Tile/TilePure.tsx +2 -1
  106. package/packages/scrabble-solver/src/hooks/index.ts +1 -0
  107. package/packages/scrabble-solver/src/hooks/useAppLayout.ts +12 -1
  108. package/packages/scrabble-solver/src/hooks/useColumns.ts +47 -0
  109. package/packages/scrabble-solver/src/icons/GeoAlt.svg +5 -0
  110. package/packages/scrabble-solver/src/icons/OneTwoThree.svg +4 -0
  111. package/packages/scrabble-solver/src/icons/SquareA.svg +6 -0
  112. package/packages/scrabble-solver/src/icons/SquareB.svg +6 -0
  113. package/packages/scrabble-solver/src/icons/Squares.svg +34 -0
  114. package/packages/scrabble-solver/src/icons/Words.svg +22 -0
  115. package/packages/scrabble-solver/src/icons/index.ts +6 -0
  116. package/packages/scrabble-solver/src/lib/groupResults.ts +1 -1
  117. package/packages/scrabble-solver/src/lib/index.ts +0 -1
  118. package/packages/scrabble-solver/src/lib/sortResults.ts +10 -10
  119. package/packages/scrabble-solver/src/modals/KeyMapModal/KeyMapModal.tsx +8 -9
  120. package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.tsx +1 -1
  121. package/packages/scrabble-solver/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +1 -0
  122. package/packages/scrabble-solver/src/modals/SettingsModal/SettingsModal.tsx +5 -5
  123. package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +1 -1
  124. package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.tsx +4 -2
  125. package/packages/scrabble-solver/src/parameters/index.ts +12 -0
  126. package/packages/scrabble-solver/src/state/selectors.ts +26 -1
  127. package/packages/scrabble-solver/src/state/slices/resultsInitialState.ts +2 -2
  128. package/packages/scrabble-solver/src/state/slices/resultsSlice.ts +2 -2
  129. package/packages/scrabble-solver/src/state/useTranslate.ts +5 -1
  130. package/packages/scrabble-solver/src/styles/variables.scss +1 -0
  131. package/packages/scrabble-solver/src/types/index.ts +11 -2
  132. package/packages/solver/package-lock.json +2 -2
  133. package/packages/solver/package.json +5 -5
  134. package/packages/types/package.json +2 -2
  135. package/packages/word-definitions/build/lib/request.d.ts +0 -1
  136. package/packages/word-definitions/package-lock.json +2 -2
  137. package/packages/word-definitions/package.json +2 -2
  138. package/packages/word-lists/package-lock.json +3 -3
  139. package/packages/word-lists/package.json +3 -3
  140. package/tsconfig.jest.json +2 -1
  141. package/.github/workflows/test.yml +0 -28
  142. package/packages/scrabble-solver/.next/static/chunks/pages/_app-8246f5b39b6a5e59.js +0 -17
  143. package/packages/scrabble-solver/.next/static/chunks/pages/index-65bfe83d121535ab.js +0 -1
  144. package/packages/scrabble-solver/.next/static/chunks/webpack-6ef43a8d4a395f49.js +0 -1
  145. package/packages/scrabble-solver/.next/static/css/2f727b21d1331ea5.css +0 -2
  146. package/packages/scrabble-solver/src/components/Results/getCoordinatesColumn.ts +0 -14
  147. package/packages/scrabble-solver/src/components/Results/getLocaleColumns.ts +0 -58
  148. package/packages/scrabble-solver/src/components/Results/useColumns.ts +0 -44
  149. package/packages/scrabble-solver/src/lib/dataUrlToBlob.ts +0 -20
  150. /package/packages/scrabble-solver/.next/static/{N8hSsS6Ppzlj3ebHMSZvI → TxfjxrH5h31sPQxPhrJzG}/_ssgManifest.js +0 -0
package/.eslintrc.js CHANGED
@@ -1,7 +1,5 @@
1
1
  module.exports = {
2
- parser: 'babel-eslint',
3
-
4
- extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
2
+ extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:cypress/recommended'],
5
3
 
6
4
  parserOptions: {
7
5
  ecmaVersion: 6,
@@ -20,13 +18,14 @@ module.exports = {
20
18
  jquery: true,
21
19
  },
22
20
 
23
- plugins: ['@typescript-eslint', 'react', 'react-hooks', 'import'],
21
+ plugins: ['@typescript-eslint', 'react', 'react-hooks', 'import', 'cypress', 'mocha'],
24
22
 
25
23
  globals: {
26
24
  RequestInfo: true,
27
25
  RequestInit: true,
28
26
  ServiceWorkerGlobalScope: true,
29
27
  beforeAll: true,
28
+ cy: true,
30
29
  define: true,
31
30
  describe: true,
32
31
  expect: true,
@@ -59,6 +58,13 @@ module.exports = {
59
58
  '@typescript-eslint/no-non-null-assertion': 'off',
60
59
  },
61
60
  },
61
+
62
+ {
63
+ files: ['*.spec.cy.ts'],
64
+ rules: {
65
+ 'max-statements': 'off',
66
+ },
67
+ },
62
68
  ],
63
69
 
64
70
  settings: {
@@ -543,5 +549,8 @@ module.exports = {
543
549
  ],
544
550
  'react/jsx-uses-react': 'error',
545
551
  'react/jsx-uses-vars': 'error',
552
+
553
+ 'mocha/no-exclusive-tests': 'error',
554
+ 'mocha/no-skipped-tests': 'error',
546
555
  },
547
556
  };
@@ -8,19 +8,11 @@ on:
8
8
 
9
9
  jobs:
10
10
  build:
11
-
12
11
  runs-on: ubuntu-latest
13
-
14
- strategy:
15
- matrix:
16
- node-version: [20.x]
17
-
18
12
  steps:
19
- - uses: actions/checkout@v2
20
- - name: Use Node.js ${{ matrix.node-version }}
21
- uses: actions/setup-node@v1
22
- with:
23
- node-version: ${{ matrix.node-version }}
24
- - run: npm ci
25
- - run: npm run build
26
-
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 20.x
17
+ - run: npm ci
18
+ - run: npm run build
@@ -0,0 +1,28 @@
1
+ name: Cypress
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ cypress:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 20.x
17
+ - uses: cypress-io/github-action@v6
18
+ with:
19
+ build: npm run build
20
+ start: npm start
21
+ env:
22
+ CYPRESS_BASE_URL: http://localhost:3333
23
+ - uses: actions/upload-artifact@v4
24
+ if: failure()
25
+ with:
26
+ name: cypress-screenshots
27
+ path: cypress/screenshots
28
+ if-no-files-found: ignore
@@ -7,21 +7,14 @@ on:
7
7
  branches: [master]
8
8
 
9
9
  jobs:
10
- build:
11
-
10
+ eslint:
12
11
  runs-on: ubuntu-latest
13
-
14
- strategy:
15
- matrix:
16
- node-version: [20.x]
17
-
18
12
  steps:
19
- - uses: actions/checkout@v2
20
- - name: Use Node.js ${{ matrix.node-version }}
21
- uses: actions/setup-node@v1
22
- with:
23
- node-version: ${{ matrix.node-version }}
24
- - run: npm ci
25
- - run: npm run lint
26
- env:
27
- CI: true
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 20.x
17
+ - run: npm ci
18
+ - run: npm run lint
19
+ env:
20
+ CI: true
@@ -0,0 +1,21 @@
1
+ name: Jest
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ jest:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 20.x
17
+ - run: npm ci
18
+ - run: npm run build
19
+ - run: npm run test-jest
20
+ env:
21
+ CI: true
Binary file