@scrabble-solver/scrabble-solver 2.15.24 → 2.16.0-alpha.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 (95) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +9 -9
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  9. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  10. package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  11. package/.next/cache/webpack/server-production/0.pack +0 -0
  12. package/.next/cache/webpack/server-production/index.pack +0 -0
  13. package/.next/cache/webpack/server-production/index.pack.old +0 -0
  14. package/.next/diagnostics/framework.json +1 -1
  15. package/.next/prerender-manifest.json +4 -4
  16. package/.next/required-server-files.js +2 -1
  17. package/.next/required-server-files.json +2 -1
  18. package/.next/routes-manifest.json +1 -1
  19. package/.next/server/chunks/30.js +1 -1
  20. package/.next/server/chunks/712.js +1 -1
  21. package/.next/server/middleware-build-manifest.js +1 -1
  22. package/.next/server/pages/404.html +1 -1
  23. package/.next/server/pages/500.html +1 -1
  24. package/.next/server/pages/_app.js.nft.json +1 -1
  25. package/.next/server/pages/_error.js.nft.json +1 -1
  26. package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  27. package/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  28. package/.next/server/pages/api/solve.js +1 -1
  29. package/.next/server/pages/api/solve.js.nft.json +1 -1
  30. package/.next/server/pages/api/verify.js.nft.json +1 -1
  31. package/.next/server/pages/api/visit.js.nft.json +1 -1
  32. package/.next/server/pages/index.html +1 -1
  33. package/.next/server/pages/index.js.nft.json +1 -1
  34. package/.next/server/pages/index.json +1 -1
  35. package/.next/server/pages/not-found.html +1 -1
  36. package/.next/server/webpack-api-runtime.js +1 -1
  37. package/.next/static/{f_g0t0jBAscXxDrNYOuV0 → HFiEUpdZIGYd_XKb5mCLZ}/_buildManifest.js +1 -1
  38. package/.next/static/chunks/{main-ca07941c8a544c9a.js → main-65a5015b46ca9827.js} +1 -1
  39. package/.next/static/chunks/pages/{_app-369e5cb907606ad4.js → _app-9c9aaea7b6881765.js} +4 -4
  40. package/.next/static/chunks/pages/{index-08b3b0a754095919.js → index-e9ea63e97865edcf.js} +1 -1
  41. package/.next/static/css/{500cdc9a24075d91.css → 78726ae7cf7a5497.css} +1 -1
  42. package/.next/trace +21 -21
  43. package/.next/trace-build +1 -1
  44. package/README.md +3 -3
  45. package/next.config.js +1 -0
  46. package/package.json +12 -11
  47. package/src/@types/scss.d.ts +5 -0
  48. package/src/components/Board/Board.module.scss +2 -2
  49. package/src/components/Board/components/Actions/Actions.module.scss +1 -1
  50. package/src/components/Board/components/Cell/Cell.module.scss +26 -6
  51. package/src/components/Board/components/InputPrompt/InputPrompt.module.scss +1 -1
  52. package/src/components/Button/Button.module.scss +1 -1
  53. package/src/components/Dictionary/Dictionary.module.scss +1 -1
  54. package/src/components/DictionaryInput/DictionaryInput.module.scss +1 -1
  55. package/src/components/IconButton/IconButton.module.scss +1 -1
  56. package/src/components/Loading/Loading.module.scss +1 -1
  57. package/src/components/Modal/Modal.module.scss +1 -1
  58. package/src/components/Modal/Modal.tsx +0 -1
  59. package/src/components/NotFound/NotFound.module.scss +1 -1
  60. package/src/components/PlainTiles/PlainTiles.module.scss +1 -1
  61. package/src/components/Rack/Rack.module.scss +11 -6
  62. package/src/components/Rack/components/InputPrompt/InputPrompt.module.scss +1 -1
  63. package/src/components/Rack/components/RackTile/RackTile.module.scss +1 -1
  64. package/src/components/Radio/Radio.module.scss +1 -1
  65. package/src/components/Results/Results.module.scss +1 -1
  66. package/src/components/ResultsInput/ResultsInput.module.scss +1 -1
  67. package/src/components/Solver/Solver.module.scss +1 -1
  68. package/src/components/Solver/components/InsertButton/InsertButton.module.scss +1 -1
  69. package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +1 -1
  70. package/src/components/Spinner/Spinner.module.scss +1 -1
  71. package/src/components/Tile/Tile.module.scss +1 -1
  72. package/src/hooks/useLocalStorage.ts +4 -52
  73. package/src/hooks/useMedia.ts +0 -1
  74. package/src/lib/isMac.ts +1 -1
  75. package/src/modals/MenuModal/MenuModal.module.scss +1 -1
  76. package/src/modals/RemainingTilesModal/components/Character/Character.module.scss +1 -1
  77. package/src/modals/ResultsModal/ResultsModal.module.scss +1 -1
  78. package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +1 -1
  79. package/src/pages/_app.tsx +0 -1
  80. package/src/parameters/index.ts +48 -47
  81. package/src/sdk/fetchJson.ts +3 -7
  82. package/src/service-worker/index.ts +0 -1
  83. package/src/service-worker/routeSolveRequests.ts +18 -12
  84. package/src/state/board/slice.ts +6 -4
  85. package/src/state/localStorage.ts +42 -52
  86. package/src/state/sagas.ts +1 -2
  87. package/src/state/settings/initialState.ts +7 -7
  88. package/src/styles/_tokens.scss +59 -0
  89. package/src/styles/global.scss +3 -3
  90. package/src/styles/mixins.scss +13 -12
  91. package/src/styles/variables.module.scss +53 -0
  92. package/src/styles/variables.scss +44 -41
  93. package/tsconfig.json +0 -1
  94. package/tsconfig.tsbuildinfo +1 -1
  95. /package/.next/static/{f_g0t0jBAscXxDrNYOuV0 → HFiEUpdZIGYd_XKb5mCLZ}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-typescript","duration":1924166,"timestamp":5612708199,"id":13,"parentId":1,"tags":{},"startTime":1776200797413,"traceId":"a247f46abd30b936"},{"name":"run-webpack","duration":6261220,"timestamp":5614634557,"id":15,"parentId":1,"tags":{},"startTime":1776200799339,"traceId":"a247f46abd30b936"},{"name":"static-check","duration":185822,"timestamp":5620982865,"id":2016,"parentId":1,"tags":{},"startTime":1776200805688,"traceId":"a247f46abd30b936"},{"name":"static-generation","duration":834210,"timestamp":5621177262,"id":2034,"parentId":1,"tags":{},"startTime":1776200805882,"traceId":"a247f46abd30b936"},{"name":"collect-build-traces","duration":3625253,"timestamp":5621169330,"id":2031,"parentId":1,"tags":{},"startTime":1776200805874,"traceId":"a247f46abd30b936"},{"name":"telemetry-flush","duration":18,"timestamp":5624795666,"id":2046,"parentId":1,"tags":{},"startTime":1776200809500,"traceId":"a247f46abd30b936"},{"name":"next-build","duration":12329041,"timestamp":5612466647,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1776200797171,"traceId":"a247f46abd30b936"}]
1
+ [{"name":"run-typescript","duration":1832072,"timestamp":29046060526,"id":13,"parentId":1,"tags":{},"startTime":1777330632146,"traceId":"5a0863a77c30228d"},{"name":"run-webpack","duration":6043991,"timestamp":29047895951,"id":15,"parentId":1,"tags":{},"startTime":1777330633981,"traceId":"5a0863a77c30228d"},{"name":"static-check","duration":194630,"timestamp":29054008471,"id":2025,"parentId":1,"tags":{},"startTime":1777330640094,"traceId":"5a0863a77c30228d"},{"name":"static-generation","duration":826329,"timestamp":29054211309,"id":2043,"parentId":1,"tags":{},"startTime":1777330640296,"traceId":"5a0863a77c30228d"},{"name":"collect-build-traces","duration":3614152,"timestamp":29054203599,"id":2040,"parentId":1,"tags":{},"startTime":1777330640289,"traceId":"5a0863a77c30228d"},{"name":"telemetry-flush","duration":23,"timestamp":29057818939,"id":2055,"parentId":1,"tags":{},"startTime":1777330643904,"traceId":"5a0863a77c30228d"},{"name":"next-build","duration":11985326,"timestamp":29045833640,"id":1,"tags":{"buildMode":"default","version":"16.2.4","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1777330631919,"traceId":"5a0863a77c30228d"}]
package/README.md CHANGED
@@ -6,14 +6,14 @@ Available at: https://scrabble-solver.org/
6
6
 
7
7
  ## Scripts
8
8
 
9
- ### `npm run build`
9
+ ### `bun run build`
10
10
 
11
11
  Run production build and place the output in `./next/`.
12
12
 
13
- ### `npm run dev`
13
+ ### `bun run dev`
14
14
 
15
15
  Run development server with hot-reload.
16
16
 
17
- ### `npm start`
17
+ ### `bun start`
18
18
 
19
19
  Run production server.
package/next.config.js CHANGED
@@ -8,6 +8,7 @@ module.exports = {
8
8
  reactStrictMode: true,
9
9
  sassOptions: {
10
10
  loadPaths: ['./src', path.join(__dirname, '../../node_modules/include-media/dist')],
11
+ quietDeps: true,
11
12
  },
12
13
  webpack(config, { isServer, dev }) {
13
14
  config.module.rules.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/scrabble-solver",
3
- "version": "2.15.24",
3
+ "version": "2.16.0-alpha.0",
4
4
  "description": "Scrabble Solver 2 - App",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,24 +22,25 @@
22
22
  "debug": "NODE_OPTIONS='--inspect' next dev --webpack",
23
23
  "dev": "env-cmd next dev --webpack",
24
24
  "start": "env-cmd next start -p 3333",
25
- "type-check": "tsc --noEmit"
25
+ "test": "bun test --timeout 180000 src",
26
+ "type-check": "tsgo --noEmit"
26
27
  },
27
28
  "dependencies": {
28
29
  "@floating-ui/react": "^0.27.19",
29
30
  "@kamilmielnik/trie": "^4.0.0",
30
31
  "@reduxjs/toolkit": "^2.11.2",
31
- "@scrabble-solver/configs": "^2.15.24",
32
- "@scrabble-solver/constants": "^2.15.24",
33
- "@scrabble-solver/dictionaries": "^2.15.24",
34
- "@scrabble-solver/logger": "^2.15.24",
35
- "@scrabble-solver/solver": "^2.15.24",
36
- "@scrabble-solver/types": "^2.15.24",
37
- "@scrabble-solver/word-definitions": "^2.15.24",
32
+ "@scrabble-solver/configs": "^2.16.0-alpha.0",
33
+ "@scrabble-solver/constants": "^2.16.0-alpha.0",
34
+ "@scrabble-solver/dictionaries": "^2.16.0-alpha.0",
35
+ "@scrabble-solver/logger": "^2.16.0-alpha.0",
36
+ "@scrabble-solver/solver": "^2.16.0-alpha.0",
37
+ "@scrabble-solver/types": "^2.16.0-alpha.0",
38
+ "@scrabble-solver/word-definitions": "^2.16.0-alpha.0",
38
39
  "classnames": "^2.5.1",
39
40
  "env-cmd": "^11.0.0",
40
41
  "include-media": "^2.0.0",
41
42
  "include-media-query-builder": "^1.1.0",
42
- "next": "^16.2.3",
43
+ "next": "^16.2.4",
43
44
  "normalize.css": "^8.0.1",
44
45
  "react": "^19.2.5",
45
46
  "react-cool-onclickoutside": "^1.7.0",
@@ -69,5 +70,5 @@
69
70
  "@types/redux": "^3.6.31",
70
71
  "sass": "^1.99.0"
71
72
  },
72
- "gitHead": "28330eeb094266d16a0e2c80f3333f534c70dea1"
73
+ "gitHead": "c9d35d0e7f7c187fbd2b0eaf04d621595e520bd9"
73
74
  }
@@ -1,3 +1,8 @@
1
+ declare module '*.module.scss' {
2
+ const classesMap: Record<string, string>;
3
+ export default classesMap;
4
+ }
5
+
1
6
  declare module '*.scss' {
2
7
  const classesMap: Record<string, string>;
3
8
  export default classesMap;
@@ -1,5 +1,5 @@
1
- @import 'styles/animations';
2
- @import 'styles/mixins';
1
+ @use 'styles/animations';
2
+ @use 'styles/mixins' as *;
3
3
 
4
4
  .board {
5
5
  display: grid;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .actions {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  @mixin lighthouse-input-size-hack {
4
4
  // Hack for this Lighthouse warning:
@@ -10,21 +10,31 @@
10
10
  inset: -100%;
11
11
  width: 300%;
12
12
  height: 300%;
13
- clip-path: inset((100% / 3));
13
+ clip-path: inset(calc(100% / 3));
14
14
  }
15
15
 
16
16
  [dir='ltr'] & {
17
17
  &.first3 {
18
18
  input {
19
19
  left: 0;
20
- clip-path: polygon(0 (100% / 3), (100% / 3) (100% / 3), (100% / 3) (200% / 3), 0 (200% / 3));
20
+ clip-path: polygon(
21
+ 0 calc(100% / 3),
22
+ calc(100% / 3) calc(100% / 3),
23
+ calc(100% / 3) calc(200% / 3),
24
+ 0 calc(200% / 3)
25
+ );
21
26
  }
22
27
  }
23
28
 
24
29
  &.last3 {
25
30
  input {
26
31
  left: -200%;
27
- clip-path: polygon((200% / 3) (100% / 3), 100% (100% / 3), 100% (200% / 3), (200% / 3) (200% / 3));
32
+ clip-path: polygon(
33
+ calc(200% / 3) calc(100% / 3),
34
+ 100% calc(100% / 3),
35
+ 100% calc(200% / 3),
36
+ calc(200% / 3) calc(200% / 3)
37
+ );
28
38
  }
29
39
  }
30
40
  }
@@ -34,7 +44,12 @@
34
44
  input {
35
45
  left: -200%;
36
46
  right: 0;
37
- clip-path: polygon((200% / 3) (100% / 3), 100% (100% / 3), 100% (200% / 3), (200% / 3) (200% / 3));
47
+ clip-path: polygon(
48
+ calc(200% / 3) calc(100% / 3),
49
+ 100% calc(100% / 3),
50
+ 100% calc(200% / 3),
51
+ calc(200% / 3) calc(200% / 3)
52
+ );
38
53
  }
39
54
  }
40
55
 
@@ -42,7 +57,12 @@
42
57
  input {
43
58
  left: 0;
44
59
  right: -200%;
45
- clip-path: polygon(0 (100% / 3), (100% / 3) (100% / 3), (100% / 3) (200% / 3), 0 (200% / 3));
60
+ clip-path: polygon(
61
+ 0 calc(100% / 3),
62
+ calc(100% / 3) calc(100% / 3),
63
+ calc(100% / 3) calc(200% / 3),
64
+ 0 calc(200% / 3)
65
+ );
46
66
  }
47
67
  }
48
68
  }
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .inputPrompt {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .button {
4
4
  @include button-reset;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .dictionary {
4
4
  position: relative;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .dictionaryInput {
4
4
  @include focus-effect;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .iconButton {
4
4
  @include button-reset;
@@ -28,6 +28,6 @@
28
28
  }
29
29
 
30
30
  .tiles {
31
- width: 100% * 2 / 3;
31
+ width: calc(100% * 2 / 3);
32
32
  height: 100%;
33
33
  }
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .modal,
4
4
  .closeButton {
@@ -46,7 +46,6 @@ const ModalBase: FunctionComponent<Props> = ({ children, className, footer, isOp
46
46
 
47
47
  useEffect(() => {
48
48
  if (isOpen) {
49
- // eslint-disable-next-line react-hooks/set-state-in-effect
50
49
  setShouldReturnFocusAfterClose(true);
51
50
  }
52
51
  }, [isOpen]);
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .notFound {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @import 'styles/animations';
1
+ @use 'styles/animations';
2
2
 
3
3
  $delay: 150ms;
4
4
  $duration: 750ms;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  @mixin lighthouse-input-size-hack {
4
4
  // Hack for this Lighthouse warning:
@@ -13,7 +13,12 @@
13
13
  bottom: 0;
14
14
  width: 300%;
15
15
  height: 300%;
16
- clip-path: polygon((100% / 3) (200% / 3), (200% / 3) (200% / 3), (200% / 3) 100%, (100% / 3) 100%);
16
+ clip-path: polygon(
17
+ calc(100% / 3) calc(200% / 3),
18
+ calc(200% / 3) calc(200% / 3),
19
+ calc(200% / 3) 100%,
20
+ calc(100% / 3) 100%
21
+ );
17
22
  }
18
23
 
19
24
  [dir='ltr'] & {
@@ -22,7 +27,7 @@
22
27
  &:nth-child(3) {
23
28
  input {
24
29
  left: 0;
25
- clip-path: polygon(0 (200% / 3), (100% / 3) (200% / 3), (100% / 3) 100%, 0 100%);
30
+ clip-path: polygon(0 calc(200% / 3), calc(100% / 3) calc(200% / 3), calc(100% / 3) 100%, 0 100%);
26
31
  }
27
32
  }
28
33
 
@@ -31,7 +36,7 @@
31
36
  &:nth-last-child(3) {
32
37
  input {
33
38
  left: -200%;
34
- clip-path: polygon((200% / 3) (200% / 3), 100% (200% / 3), 100% 100%, (200% / 3) 100%);
39
+ clip-path: polygon(calc(200% / 3) calc(200% / 3), 100% calc(200% / 3), 100% 100%, calc(200% / 3) 100%);
35
40
  }
36
41
  }
37
42
  }
@@ -43,7 +48,7 @@
43
48
  input {
44
49
  left: -200%;
45
50
  right: 0;
46
- clip-path: polygon((200% / 3) (200% / 3), 100% (200% / 3), 100% 100%, (200% / 3) 100%);
51
+ clip-path: polygon(calc(200% / 3) calc(200% / 3), 100% calc(200% / 3), 100% 100%, calc(200% / 3) 100%);
47
52
  }
48
53
  }
49
54
 
@@ -53,7 +58,7 @@
53
58
  input {
54
59
  left: 0;
55
60
  right: -200%;
56
- clip-path: polygon(0 (200% / 3), (100% / 3) (200% / 3), (100% / 3) 100%, 0 100%);
61
+ clip-path: polygon(0 calc(200% / 3), calc(100% / 3) calc(200% / 3), calc(100% / 3) 100%, 0 100%);
57
62
  }
58
63
  }
59
64
  }
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .form {
4
4
  @include focus-effect;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .rackTile {
4
4
  @include focus-effect;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  $radio-size: 18px;
4
4
  $radio-inner-border: 2px;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
4
4
 
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .resultsInput {
4
4
  @include focus-effect;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .solver {
4
4
  --spacing: var(--spacing--xl);
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .insertButton {
4
4
  @include media('>=s') {
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .resultCandidatePicker {
4
4
  position: relative;
@@ -1,4 +1,4 @@
1
- @import 'styles/animations';
1
+ @use 'styles/animations';
2
2
 
3
3
  .spinner {
4
4
  width: var(--button--icon--size);
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .tile {
4
4
  --background-color: transparent;
@@ -1,33 +1,11 @@
1
1
  import { useEffect } from 'react';
2
2
 
3
- import {
4
- localStorage,
5
- selectAutoGroupTiles,
6
- selectBoard,
7
- selectGame,
8
- selectInputMode,
9
- selectLocale,
10
- selectRack,
11
- selectShowCoordinates,
12
- selectRemoveCellFilters,
13
- useTypedSelector,
14
- } from '@/state';
3
+ import { localStorage, selectBoard, selectRack, selectSettings, useTypedSelector } from '@/state';
15
4
 
16
5
  export const useLocalStorage = () => {
17
- const autoGroupTiles = useTypedSelector(selectAutoGroupTiles);
18
6
  const board = useTypedSelector(selectBoard);
19
- const game = useTypedSelector(selectGame);
20
- const inputMode = useTypedSelector(selectInputMode);
21
- const locale = useTypedSelector(selectLocale);
22
7
  const rack = useTypedSelector(selectRack);
23
- const showCoordinates = useTypedSelector(selectShowCoordinates);
24
- const removeCellFilters = useTypedSelector(selectRemoveCellFilters);
25
-
26
- useEffect(() => {
27
- if (autoGroupTiles) {
28
- localStorage.setAutoGroupTiles(autoGroupTiles);
29
- }
30
- }, [autoGroupTiles]);
8
+ const settings = useTypedSelector(selectSettings);
31
9
 
32
10
  useEffect(() => {
33
11
  if (board) {
@@ -35,24 +13,6 @@ export const useLocalStorage = () => {
35
13
  }
36
14
  }, [board]);
37
15
 
38
- useEffect(() => {
39
- if (game) {
40
- localStorage.setGame(game);
41
- }
42
- }, [game]);
43
-
44
- useEffect(() => {
45
- if (inputMode) {
46
- localStorage.setInputMode(inputMode);
47
- }
48
- }, [inputMode]);
49
-
50
- useEffect(() => {
51
- if (locale) {
52
- localStorage.setLocale(locale);
53
- }
54
- }, [locale]);
55
-
56
16
  useEffect(() => {
57
17
  if (rack) {
58
18
  localStorage.setRack(rack);
@@ -60,14 +20,6 @@ export const useLocalStorage = () => {
60
20
  }, [rack]);
61
21
 
62
22
  useEffect(() => {
63
- if (showCoordinates) {
64
- localStorage.setShowCoordinates(showCoordinates);
65
- }
66
- }, [showCoordinates]);
67
-
68
- useEffect(() => {
69
- if (removeCellFilters) {
70
- localStorage.setRemoveCellFilters(removeCellFilters);
71
- }
72
- }, [removeCellFilters]);
23
+ localStorage.setSettings(settings);
24
+ }, [settings]);
73
25
  };
@@ -22,7 +22,6 @@ export const useMedia = (query: string, defaultState?: boolean) => {
22
22
  setState(mediaQuery.matches);
23
23
  };
24
24
 
25
- // eslint-disable-next-line react-hooks/set-state-in-effect
26
25
  setState(mediaQuery.matches);
27
26
  mediaQuery.addEventListener('change', handleChange);
28
27
 
package/src/lib/isMac.ts CHANGED
@@ -3,5 +3,5 @@ export const isMac = (): boolean => {
3
3
  return false;
4
4
  }
5
5
 
6
- return globalThis.navigator.platform.startsWith('Mac') || globalThis.navigator.platform === 'iPhone';
6
+ return globalThis.navigator.platform.startsWith('Mac') || globalThis.navigator.platform.startsWith('iPhone');
7
7
  };
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .button {
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .character {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .content {
4
4
  position: relative;
@@ -1,4 +1,4 @@
1
- @import 'styles/mixins';
1
+ @use 'styles/mixins' as *;
2
2
 
3
3
  .option {
4
4
  & + & {
@@ -11,7 +11,6 @@ import { store } from '@/state';
11
11
  import '../styles/global.scss';
12
12
 
13
13
  const DESCRIPTION =
14
- // eslint-disable-next-line max-len
15
14
  'Scrabble Solver 2 - Free and open-source analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Crossplay, Literaki and Kelimelik. Quickly find top scoring words using given letters and board state. Available in English, French, German, Persian, Polish, Romanian, Spanish, and Turkish.';
16
15
 
17
16
  const KEYWORDS = [