scrabble-solver 2.15.23 → 2.15.25

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 (195) hide show
  1. package/.claude/settings.local.json +28 -1
  2. package/.github/workflows/oxfmt.yml +20 -0
  3. package/.github/workflows/{eslint.yml → oxlint.yml} +2 -2
  4. package/.nx/workspace-data/file-map.json +1369 -1365
  5. package/.nx/workspace-data/lockfile-dependencies.hash +1 -1
  6. package/.nx/workspace-data/lockfile-nodes.hash +1 -1
  7. package/.nx/workspace-data/nx_files.nxt +0 -0
  8. package/.nx/workspace-data/parsed-lock-file.dependencies.json +442 -502
  9. package/.nx/workspace-data/parsed-lock-file.nodes.json +854 -577
  10. package/.nx/workspace-data/project-graph.json +1257 -1125
  11. package/.oxfmtrc.json +17 -0
  12. package/.oxlintrc.json +316 -0
  13. package/README.md +6 -3
  14. package/cypress/e2e/bugs/401-board-state-on-game-change.ts +36 -0
  15. package/cypress/e2e/bugs.spec.cy.ts +1 -0
  16. package/jest.config.js +5 -0
  17. package/lerna.json +1 -1
  18. package/package.json +14 -23
  19. package/packages/configs/build/games/literaki.d.ts +1 -1
  20. package/packages/configs/package.json +4 -4
  21. package/packages/constants/package.json +2 -2
  22. package/packages/dictionaries/package.json +5 -5
  23. package/packages/logger/package.json +2 -2
  24. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  25. package/packages/scrabble-solver/.next/build-manifest.json +8 -8
  26. package/packages/scrabble-solver/.next/cache/.previewinfo +1 -1
  27. package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
  28. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  29. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  30. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  31. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
  32. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  33. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  34. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  35. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  36. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
  37. package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
  38. package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
  39. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  40. package/packages/scrabble-solver/.next/server/chunks/30.js +1 -1
  41. package/packages/scrabble-solver/.next/server/chunks/712.js +1 -1
  42. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  43. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  44. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  45. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  46. package/packages/scrabble-solver/.next/server/pages/index.js +1 -1
  47. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  48. package/packages/scrabble-solver/.next/server/pages/not-found.html +1 -1
  49. package/packages/scrabble-solver/.next/static/{zFnoNsMXUha-MKjuZn6AN → FDUqldlsD7FXe6iWhIJmu}/_buildManifest.js +1 -1
  50. package/packages/scrabble-solver/.next/static/chunks/{main-ca07941c8a544c9a.js → main-65a5015b46ca9827.js} +1 -1
  51. package/packages/scrabble-solver/.next/static/chunks/pages/{_app-a3061a79f91b3796.js → _app-c0932b8ca24945cb.js} +5 -5
  52. package/packages/scrabble-solver/.next/static/chunks/pages/{index-6c5b582e7afc063c.js → index-08b3b0a754095919.js} +1 -1
  53. package/packages/scrabble-solver/.next/trace +21 -21
  54. package/packages/scrabble-solver/.next/trace-build +1 -1
  55. package/packages/scrabble-solver/package.json +10 -10
  56. package/packages/scrabble-solver/public/service-worker.js +1 -1
  57. package/packages/scrabble-solver/src/app-layout/useAppLayoutValue.ts +4 -4
  58. package/packages/scrabble-solver/src/components/Alert/Alert.tsx +1 -1
  59. package/packages/scrabble-solver/src/components/Board/Board.tsx +4 -4
  60. package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +4 -4
  61. package/packages/scrabble-solver/src/components/Board/components/Actions/Actions.tsx +5 -5
  62. package/packages/scrabble-solver/src/components/Board/components/Actions/lib.ts +2 -2
  63. package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.tsx +1 -1
  64. package/packages/scrabble-solver/src/components/Board/components/InputPrompt/InputPrompt.tsx +3 -3
  65. package/packages/scrabble-solver/src/components/Board/components/ToggleDirectionButton/ToggleDirectionButton.tsx +4 -4
  66. package/packages/scrabble-solver/src/components/Board/hooks/useBackgroundImage.tsx +13 -12
  67. package/packages/scrabble-solver/src/components/Board/hooks/useBoardStyle.ts +4 -4
  68. package/packages/scrabble-solver/src/components/Board/hooks/useFloatingActions.ts +2 -2
  69. package/packages/scrabble-solver/src/components/Board/hooks/useFloatingInputPrompt.ts +1 -1
  70. package/packages/scrabble-solver/src/components/Board/hooks/useGrid.ts +5 -5
  71. package/packages/scrabble-solver/src/components/Board/lib.ts +2 -2
  72. package/packages/scrabble-solver/src/components/Board/selectors.ts +2 -2
  73. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.tsx +2 -2
  74. package/packages/scrabble-solver/src/components/DictionaryInput/DictionaryInput.tsx +2 -2
  75. package/packages/scrabble-solver/src/components/EmptyState/EmptyState.tsx +13 -5
  76. package/packages/scrabble-solver/src/components/Keys/Arrows/Arrows.tsx +1 -1
  77. package/packages/scrabble-solver/src/components/Keys/index.tsx +2 -2
  78. package/packages/scrabble-solver/src/components/Loading/Loading.tsx +2 -2
  79. package/packages/scrabble-solver/src/components/Logo/Logo.tsx +2 -2
  80. package/packages/scrabble-solver/src/components/Modal/Modal.tsx +3 -4
  81. package/packages/scrabble-solver/src/components/NavButtons/NavButtons.tsx +4 -4
  82. package/packages/scrabble-solver/src/components/NavButtons/selectors.ts +1 -1
  83. package/packages/scrabble-solver/src/components/NotFound/NotFound.tsx +1 -1
  84. package/packages/scrabble-solver/src/components/PlainTiles/lib.ts +1 -1
  85. package/packages/scrabble-solver/src/components/Progress/Progress.tsx +2 -2
  86. package/packages/scrabble-solver/src/components/Rack/Rack.tsx +4 -4
  87. package/packages/scrabble-solver/src/components/Rack/components/InputPrompt/InputPrompt.tsx +2 -2
  88. package/packages/scrabble-solver/src/components/Rack/components/InputPrompt/lib.ts +1 -3
  89. package/packages/scrabble-solver/src/components/Rack/components/RackTile/RackTile.tsx +2 -2
  90. package/packages/scrabble-solver/src/components/Rack/selectors.ts +2 -2
  91. package/packages/scrabble-solver/src/components/Results/Cell.tsx +2 -2
  92. package/packages/scrabble-solver/src/components/Results/Header.tsx +5 -5
  93. package/packages/scrabble-solver/src/components/Results/HeaderButton.tsx +3 -3
  94. package/packages/scrabble-solver/src/components/Results/Result.tsx +6 -6
  95. package/packages/scrabble-solver/src/components/Results/Results.tsx +4 -4
  96. package/packages/scrabble-solver/src/components/Results/SolveButton.tsx +2 -2
  97. package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.tsx +2 -2
  98. package/packages/scrabble-solver/src/components/Solver/Solver.tsx +3 -3
  99. package/packages/scrabble-solver/src/components/Solver/components/InsertButton/InsertButton.tsx +2 -2
  100. package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +2 -2
  101. package/packages/scrabble-solver/src/components/Spinner/Spinner.tsx +1 -1
  102. package/packages/scrabble-solver/src/components/Tile/Tile.tsx +3 -3
  103. package/packages/scrabble-solver/src/components/Tile/TilePure.tsx +1 -1
  104. package/packages/scrabble-solver/src/components/Tooltip/TooltipContent.tsx +1 -1
  105. package/packages/scrabble-solver/src/hooks/useColumns.ts +3 -3
  106. package/packages/scrabble-solver/src/hooks/useDirection.ts +1 -1
  107. package/packages/scrabble-solver/src/hooks/useLanguage.ts +1 -1
  108. package/packages/scrabble-solver/src/hooks/useLocalStorage.ts +1 -1
  109. package/packages/scrabble-solver/src/hooks/useMedia.ts +0 -1
  110. package/packages/scrabble-solver/src/hooks/useMediaQuery.ts +1 -1
  111. package/packages/scrabble-solver/src/i18n/constants.ts +1 -1
  112. package/packages/scrabble-solver/src/i18n/i18n.ts +1 -1
  113. package/packages/scrabble-solver/src/i18n/languages/english.json +1 -1
  114. package/packages/scrabble-solver/src/i18n/languages/french.json +1 -1
  115. package/packages/scrabble-solver/src/i18n/languages/german.json +1 -1
  116. package/packages/scrabble-solver/src/i18n/languages/polish.json +1 -1
  117. package/packages/scrabble-solver/src/i18n/languages/romanian.json +1 -1
  118. package/packages/scrabble-solver/src/i18n/languages/spanish.json +1 -1
  119. package/packages/scrabble-solver/src/i18n/languages/turkish.json +1 -1
  120. package/packages/scrabble-solver/src/lib/createComparator.ts +1 -1
  121. package/packages/scrabble-solver/src/lib/createKeyComparator.ts +1 -1
  122. package/packages/scrabble-solver/src/lib/createStringComparator.ts +1 -1
  123. package/packages/scrabble-solver/src/lib/getTileSizes.ts +1 -1
  124. package/packages/scrabble-solver/src/lib/numberComparator.ts +1 -1
  125. package/packages/scrabble-solver/src/lib/reverseComparator.ts +1 -1
  126. package/packages/scrabble-solver/src/lib/zipCharactersAndTiles.ts +1 -1
  127. package/packages/scrabble-solver/src/modals/DictionaryModal/DictionaryModal.tsx +2 -2
  128. package/packages/scrabble-solver/src/modals/KeyMapModal/KeyMapModal.tsx +2 -2
  129. package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.tsx +5 -5
  130. package/packages/scrabble-solver/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +5 -5
  131. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/Character.tsx +5 -5
  132. package/packages/scrabble-solver/src/modals/RemainingTilesModal/lib.ts +1 -1
  133. package/packages/scrabble-solver/src/modals/RemainingTilesModal/selectors.ts +1 -1
  134. package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.tsx +4 -4
  135. package/packages/scrabble-solver/src/modals/SettingsModal/SettingsModal.tsx +3 -3
  136. package/packages/scrabble-solver/src/modals/SettingsModal/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +2 -2
  137. package/packages/scrabble-solver/src/modals/SettingsModal/components/AutoGroupTilesSetting/lib.ts +1 -1
  138. package/packages/scrabble-solver/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.tsx +2 -2
  139. package/packages/scrabble-solver/src/modals/SettingsModal/components/InputModeSetting/InputModeSetting.tsx +2 -2
  140. package/packages/scrabble-solver/src/modals/SettingsModal/components/InputModeSetting/lib.ts +1 -1
  141. package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +3 -3
  142. package/packages/scrabble-solver/src/modals/SettingsModal/components/RemoveCellFiltersSetting/RemoveCellFiltersSetting.tsx +2 -2
  143. package/packages/scrabble-solver/src/modals/SettingsModal/components/RemoveCellFiltersSetting/lib.ts +1 -1
  144. package/packages/scrabble-solver/src/modals/SettingsModal/components/ShowCoordinatesSetting/ShowCoordinatesSetting.tsx +2 -2
  145. package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.tsx +3 -3
  146. package/packages/scrabble-solver/src/pages/_app.tsx +3 -4
  147. package/packages/scrabble-solver/src/pages/api/dictionary/[locale]/[word].ts +1 -1
  148. package/packages/scrabble-solver/src/pages/api/dictionary/[locale]/index.ts +1 -1
  149. package/packages/scrabble-solver/src/pages/api/solve.ts +2 -2
  150. package/packages/scrabble-solver/src/pages/api/verify.ts +1 -1
  151. package/packages/scrabble-solver/src/pages/api/visit.ts +1 -1
  152. package/packages/scrabble-solver/src/pages/index.tsx +6 -6
  153. package/packages/scrabble-solver/src/pages/not-found.tsx +1 -1
  154. package/packages/scrabble-solver/src/parameters/index.ts +4 -4
  155. package/packages/scrabble-solver/src/sdk/fetchJson.ts +3 -7
  156. package/packages/scrabble-solver/src/service-worker/index.ts +0 -1
  157. package/packages/scrabble-solver/src/service-worker/routeSolveRequests.ts +19 -13
  158. package/packages/scrabble-solver/src/service-worker/routeVerifyRequests.ts +1 -1
  159. package/packages/scrabble-solver/src/state/board/slice.ts +30 -5
  160. package/packages/scrabble-solver/src/state/cellFilters/lib.ts +1 -1
  161. package/packages/scrabble-solver/src/state/cellFilters/selectors.ts +1 -1
  162. package/packages/scrabble-solver/src/state/cellFilters/slice.ts +1 -1
  163. package/packages/scrabble-solver/src/state/cellFilters/types.ts +1 -1
  164. package/packages/scrabble-solver/src/state/lib.ts +2 -2
  165. package/packages/scrabble-solver/src/state/localStorage.ts +1 -1
  166. package/packages/scrabble-solver/src/state/rack/slice.ts +2 -2
  167. package/packages/scrabble-solver/src/state/rack/types.ts +1 -1
  168. package/packages/scrabble-solver/src/state/results/initialState.ts +1 -1
  169. package/packages/scrabble-solver/src/state/results/lib.ts +9 -2
  170. package/packages/scrabble-solver/src/state/results/selectors.ts +1 -1
  171. package/packages/scrabble-solver/src/state/results/slice.ts +1 -1
  172. package/packages/scrabble-solver/src/state/results/types.ts +1 -1
  173. package/packages/scrabble-solver/src/state/sagas.ts +4 -5
  174. package/packages/scrabble-solver/src/state/selectors.ts +1 -1
  175. package/packages/scrabble-solver/src/state/settings/selectors.ts +1 -1
  176. package/packages/scrabble-solver/src/state/settings/slice.ts +1 -1
  177. package/packages/scrabble-solver/src/state/settings/types.ts +1 -1
  178. package/packages/scrabble-solver/src/state/useTranslate.ts +1 -1
  179. package/packages/scrabble-solver/tsconfig.json +1 -16
  180. package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -1
  181. package/packages/solver/build/fillPattern.d.ts +1 -3
  182. package/packages/solver/package.json +6 -6
  183. package/packages/solver/src/getPatternScore.test.ts +52 -4
  184. package/packages/types/build/Result.d.ts +1 -1
  185. package/packages/types/package.json +3 -3
  186. package/packages/word-definitions/build/languages/english.js +1 -3
  187. package/packages/word-definitions/package.json +4 -4
  188. package/packages/word-definitions/src/languages/english.ts +0 -1
  189. package/packages/word-lists/package.json +4 -4
  190. package/tsconfig.jest.json +4 -1
  191. package/tsconfig.json +1 -0
  192. package/.prettierignore +0 -8
  193. package/.prettierrc +0 -11
  194. package/eslint.config.mjs +0 -722
  195. /package/packages/scrabble-solver/.next/static/{zFnoNsMXUha-MKjuZn6AN → FDUqldlsD7FXe6iWhIJmu}/_ssgManifest.js +0 -0
@@ -1,8 +1,8 @@
1
1
  import { BONUS_WORD } from '@scrabble-solver/constants';
2
2
  import { type Bonus } from '@scrabble-solver/types';
3
3
 
4
- import { COLOR_BONUS_CHARACTER, COLOR_BONUS_CHARACTER_MULTIPLIER, COLOR_BONUS_WORD } from 'parameters';
5
- import { type Point } from 'types';
4
+ import { COLOR_BONUS_CHARACTER, COLOR_BONUS_CHARACTER_MULTIPLIER, COLOR_BONUS_WORD } from '@/parameters';
5
+ import { type Point } from '@/types';
6
6
 
7
7
  export const createGrid = <T>(width: number, height: number, getInitialValue: (x: number, y: number) => T): T[][] => {
8
8
  return Array.from({ length: height }).map((_row, y) => {
@@ -1,7 +1,7 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
2
 
3
- import { findCell } from 'lib';
4
- import { selectBoard, selectResultCandidateCells } from 'state';
3
+ import { findCell } from '@/lib';
4
+ import { selectBoard, selectResultCandidateCells } from '@/state';
5
5
 
6
6
  export const selectRowsWithCandidate = createSelector([selectBoard, selectResultCandidateCells], (board, cells) => {
7
7
  return board.rows.map((row, y) => row.map((cell, x) => findCell(cells, x, y) || cell));
@@ -1,14 +1,14 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent } from 'react';
3
3
 
4
- import { useAppLayout } from 'app-layout';
4
+ import { useAppLayout } from '@/app-layout';
5
5
  import {
6
6
  selectDictionaryError,
7
7
  selectDictionaryIsLoading,
8
8
  selectDictionaryResults,
9
9
  useTranslate,
10
10
  useTypedSelector,
11
- } from 'state';
11
+ } from '@/state';
12
12
 
13
13
  import { EmptyState } from '../EmptyState';
14
14
  import { Loading } from '../Loading';
@@ -2,8 +2,8 @@ import classNames from 'classnames';
2
2
  import { type ChangeEvent, type FunctionComponent, type SubmitEvent } from 'react';
3
3
  import { useDispatch } from 'react-redux';
4
4
 
5
- import { LOCALE_FEATURES } from 'i18n';
6
- import { dictionarySlice, selectDictionary, selectLocale, useTranslate, useTypedSelector } from 'state';
5
+ import { LOCALE_FEATURES } from '@/i18n';
6
+ import { dictionarySlice, selectDictionary, selectLocale, useTranslate, useTypedSelector } from '@/state';
7
7
 
8
8
  import styles from './DictionaryInput.module.scss';
9
9
 
@@ -1,10 +1,10 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent, type ReactNode, useMemo } from 'react';
3
3
 
4
- import { LOCALE_FEATURES } from 'i18n';
5
- import { COLOR_BLUE, COLOR_GREEN, COLOR_RED, COLOR_YELLOW } from 'parameters';
6
- import { selectLocale, useTranslate, useTypedSelector } from 'state';
7
- import { type Translations } from 'types';
4
+ import { LOCALE_FEATURES } from '@/i18n';
5
+ import { COLOR_BLUE, COLOR_GREEN, COLOR_RED, COLOR_YELLOW } from '@/parameters';
6
+ import { selectLocale, useTranslate, useTypedSelector } from '@/state';
7
+ import { type Translations } from '@/types';
8
8
 
9
9
  import { PlainTiles } from '../PlainTiles';
10
10
 
@@ -30,12 +30,20 @@ const COLORS_PER_TYPE: Record<Props['variant'], string> = {
30
30
  warning: COLOR_YELLOW,
31
31
  };
32
32
 
33
+ const graphemeSegmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
34
+
35
+ const reverseGraphemes = (value: string): string => {
36
+ return Array.from(graphemeSegmenter.segment(value), (segment) => segment.segment)
37
+ .reverse()
38
+ .join('');
39
+ };
40
+
33
41
  export const EmptyState: FunctionComponent<Props> = ({ children, className, variant }) => {
34
42
  const translate = useTranslate();
35
43
  const locale = useTypedSelector(selectLocale);
36
44
  const { direction } = LOCALE_FEATURES[locale];
37
45
  const title = translate(TITLE_KEY_PER_TYPE[variant]);
38
- const message = direction === 'ltr' ? title : title.split('').reverse().join('');
46
+ const message = direction === 'ltr' ? title : reverseGraphemes(title);
39
47
  const content = useMemo(() => [message.toUpperCase().split(' ')], [message]);
40
48
 
41
49
  return (
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent } from 'react';
3
3
 
4
- import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp } from 'icons';
4
+ import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp } from '@/icons';
5
5
 
6
6
  import { Key } from '../../Key';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
 
3
- import { isMac } from 'lib';
4
- import { useTranslate } from 'state';
3
+ import { isMac } from '@/lib';
4
+ import { useTranslate } from '@/state';
5
5
 
6
6
  import { Key } from '../Key';
7
7
 
@@ -1,8 +1,8 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent, useMemo } from 'react';
3
3
 
4
- import { LOCALE_FEATURES } from 'i18n';
5
- import { selectLocale, useTranslate, useTypedSelector } from 'state';
4
+ import { LOCALE_FEATURES } from '@/i18n';
5
+ import { selectLocale, useTranslate, useTypedSelector } from '@/state';
6
6
 
7
7
  import { PlainTiles } from '../PlainTiles';
8
8
 
@@ -1,8 +1,8 @@
1
1
  import Image from 'next/image';
2
2
  import { forwardRef } from 'react';
3
3
 
4
- import { useAppLayout } from 'app-layout';
5
- import { LOGO_SRC } from 'parameters';
4
+ import { useAppLayout } from '@/app-layout';
5
+ import { LOGO_SRC } from '@/parameters';
6
6
 
7
7
  interface Props {
8
8
  className?: string;
@@ -2,9 +2,9 @@ import classNames from 'classnames';
2
2
  import { type FunctionComponent, type ReactNode, useCallback, useEffect, useState } from 'react';
3
3
  import ReactModal from 'react-modal';
4
4
 
5
- import { CrossSquareFill } from 'icons';
6
- import { TRANSITION_DURATION_LONG } from 'parameters';
7
- import { useTranslate } from 'state';
5
+ import { CrossSquareFill } from '@/icons';
6
+ import { TRANSITION_DURATION_LONG } from '@/parameters';
7
+ import { useTranslate } from '@/state';
8
8
 
9
9
  import { IconButton } from '../IconButton';
10
10
 
@@ -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,10 +1,10 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent, memo } from 'react';
3
3
 
4
- import { useAppLayout } from 'app-layout';
5
- import { CardChecklist, Cog, Eraser, Github, KeyboardFill, List, Sack } from 'icons';
6
- import { GITHUB_PROJECT_URL } from 'parameters';
7
- import { selectConfig, useTranslate, useTypedSelector } from 'state';
4
+ import { useAppLayout } from '@/app-layout';
5
+ import { CardChecklist, Cog, Eraser, Github, KeyboardFill, List, Sack } from '@/icons';
6
+ import { GITHUB_PROJECT_URL } from '@/parameters';
7
+ import { selectConfig, useTranslate, useTypedSelector } from '@/state';
8
8
 
9
9
  import { IconButton } from '../IconButton';
10
10
 
@@ -1,6 +1,6 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
2
 
3
- import { selectInvalidWords, selectRemainingTiles } from 'state';
3
+ import { selectInvalidWords, selectRemainingTiles } from '@/state';
4
4
 
5
5
  export const selectHasInvalidWords = createSelector([selectInvalidWords], (invalidWords) => {
6
6
  return invalidWords.length > 0;
@@ -1,6 +1,6 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
 
3
- import { DashCircleFill } from 'icons';
3
+ import { DashCircleFill } from '@/icons';
4
4
 
5
5
  import { PlainTiles } from '../PlainTiles';
6
6
 
@@ -10,7 +10,7 @@ import {
10
10
  PLAIN_TILES_TILE_MAX_ROTATE,
11
11
  PLAIN_TILES_TILE_MAX_SCATTER,
12
12
  PLAIN_TILES_TILE_SIZE,
13
- } from 'parameters';
13
+ } from '@/parameters';
14
14
 
15
15
  import type { CreatePlainTileOptions, CreatePlainTilesOptions, PlainTile } from './types';
16
16
 
@@ -1,8 +1,8 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent, type HTMLProps } from 'react';
3
3
 
4
- import { PROGRESS_COLOR_BACKGROUND, PROGRESS_COLOR_VALUE } from 'parameters';
5
- import { selectLocale, useTypedSelector } from 'state';
4
+ import { PROGRESS_COLOR_BACKGROUND, PROGRESS_COLOR_VALUE } from '@/parameters';
5
+ import { selectLocale, useTypedSelector } from '@/state';
6
6
 
7
7
  import styles from './Progress.module.scss';
8
8
 
@@ -16,10 +16,10 @@ import {
16
16
  import useOnclickOutside from 'react-cool-onclickoutside';
17
17
  import { useDispatch } from 'react-redux';
18
18
 
19
- import { useAppLayout } from 'app-layout';
20
- import { LOCALE_FEATURES } from 'i18n';
21
- import { createKeyboardNavigation, extractCharacters, extractInputValue, getTileSizes, isCtrl } from 'lib';
22
- import { rackSlice, selectConfig, selectInputMode, selectLocale, selectRack, useTypedSelector } from 'state';
19
+ import { useAppLayout } from '@/app-layout';
20
+ import { LOCALE_FEATURES } from '@/i18n';
21
+ import { createKeyboardNavigation, extractCharacters, extractInputValue, getTileSizes, isCtrl } from '@/lib';
22
+ import { rackSlice, selectConfig, selectInputMode, selectLocale, selectRack, useTypedSelector } from '@/state';
23
23
 
24
24
  import { InputPrompt, RackTile } from './components';
25
25
  import styles from './Rack.module.scss';
@@ -10,8 +10,8 @@ import {
10
10
  } from 'react';
11
11
  import { useDispatch } from 'react-redux';
12
12
 
13
- import { useAppLayout } from 'app-layout';
14
- import { rackSlice, selectConfig, useTranslate, useTypedSelector } from 'state';
13
+ import { useAppLayout } from '@/app-layout';
14
+ import { rackSlice, selectConfig, useTranslate, useTypedSelector } from '@/state';
15
15
 
16
16
  import styles from './InputPrompt.module.scss';
17
17
  import { extractRack } from './lib';
@@ -1,8 +1,6 @@
1
1
  import { type Config } from '@scrabble-solver/types';
2
2
 
3
- // eslint-disable-next-line no-warning-comments
4
- // TODO: https://github.com/kamilmielnik/scrabble-solver/issues/393
5
- import { extractCharacters } from '../../../../lib/extractCharacters';
3
+ import { extractCharacters } from '@/lib';
6
4
 
7
5
  export const extractRack = (config: Config, value: string): (string | null)[] => {
8
6
  const charactersByCase = extractCharacters(config, value, {
@@ -15,7 +15,7 @@ import {
15
15
  } from 'react';
16
16
  import { useDispatch } from 'react-redux';
17
17
 
18
- import { createKeyboardNavigation, extractCharacters, extractInputValue, isCtrl } from 'lib';
18
+ import { createKeyboardNavigation, extractCharacters, extractInputValue, isCtrl } from '@/lib';
19
19
  import {
20
20
  rackSlice,
21
21
  selectCharacterIsValid,
@@ -25,7 +25,7 @@ import {
25
25
  selectLocale,
26
26
  useTranslate,
27
27
  useTypedSelector,
28
- } from 'state';
28
+ } from '@/state';
29
29
 
30
30
  import { Tile } from '../../../Tile';
31
31
 
@@ -1,7 +1,7 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
2
 
3
- import { zipCharactersAndTiles } from 'lib';
4
- import { selectRack, selectResultCandidateTiles } from 'state';
3
+ import { zipCharactersAndTiles } from '@/lib';
4
+ import { selectRack, selectResultCandidateTiles } from '@/state';
5
5
 
6
6
  export const selectRemainingTilesGroups = createSelector(
7
7
  [selectRack, selectResultCandidateTiles],
@@ -1,8 +1,8 @@
1
1
  import classNames from 'classnames';
2
2
  import { type CSSProperties, type FunctionComponent, type ReactNode } from 'react';
3
3
 
4
- import { selectLocale, useTranslate, useTypedSelector } from 'state';
5
- import { type TranslationKey } from 'types';
4
+ import { selectLocale, useTranslate, useTypedSelector } from '@/state';
5
+ import { type TranslationKey } from '@/types';
6
6
 
7
7
  import { Tooltip } from '../Tooltip';
8
8
 
@@ -1,10 +1,10 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
 
3
- import { useAppLayout } from 'app-layout';
4
- import { useColumns } from 'hooks';
5
- import { GeoAlt, OneTwoThree, Square, SquareA, SquareB, Squares, Words } from 'icons';
6
- import { RESULTS_COLUMN_WIDTH } from 'parameters';
7
- import { ResultColumnId } from 'types';
3
+ import { useAppLayout } from '@/app-layout';
4
+ import { useColumns } from '@/hooks';
5
+ import { GeoAlt, OneTwoThree, Square, SquareA, SquareB, Squares, Words } from '@/icons';
6
+ import { RESULTS_COLUMN_WIDTH } from '@/parameters';
7
+ import { ResultColumnId } from '@/types';
8
8
 
9
9
  import { HeaderButton } from './HeaderButton';
10
10
  import styles from './Results.module.scss';
@@ -2,9 +2,9 @@ import classNames from 'classnames';
2
2
  import { type CSSProperties, type FunctionComponent, type ReactElement, type SVGAttributes, useCallback } from 'react';
3
3
  import { useDispatch } from 'react-redux';
4
4
 
5
- import { SortDown, SortUp } from 'icons';
6
- import { resultsSlice, selectResultsSort, useTranslate, useTypedSelector } from 'state';
7
- import { type ResultColumnId, SortDirection, type TranslationKey } from 'types';
5
+ import { SortDown, SortUp } from '@/icons';
6
+ import { resultsSlice, selectResultsSort, useTranslate, useTypedSelector } from '@/state';
7
+ import { type ResultColumnId, SortDirection, type TranslationKey } from '@/types';
8
8
 
9
9
  import { Tooltip } from '../Tooltip';
10
10
 
@@ -3,18 +3,18 @@ import { type FocusEventHandler, type MouseEventHandler, type ReactElement, useR
3
3
  import Highlighter from 'react-highlight-words';
4
4
  import { type RowComponentProps } from 'react-window';
5
5
 
6
- import { useAppLayout } from 'app-layout';
7
- import { useColumns } from 'hooks';
8
- import { LOCALE_FEATURES } from 'i18n';
9
- import { noop } from 'lib';
6
+ import { useAppLayout } from '@/app-layout';
7
+ import { useColumns } from '@/hooks';
8
+ import { LOCALE_FEATURES } from '@/i18n';
9
+ import { noop } from '@/lib';
10
10
  import {
11
11
  selectIsResultMatching,
12
12
  selectLocale,
13
13
  selectResultCoordinates,
14
14
  selectResultsQuery,
15
15
  useTypedSelector,
16
- } from 'state';
17
- import { ResultColumnId } from 'types';
16
+ } from '@/state';
17
+ import { ResultColumnId } from '@/types';
18
18
 
19
19
  import { Cell } from './Cell';
20
20
  import styles from './Results.module.scss';
@@ -3,9 +3,9 @@ import { useEffect, useMemo, type FunctionComponent } from 'react';
3
3
  import { List, useListRef } from 'react-window';
4
4
  import { useDebounce } from 'use-debounce';
5
5
 
6
- import { useLatest } from 'hooks';
7
- import { LOCALE_FEATURES } from 'i18n';
8
- import { RESULTS_ITEM_HEIGHT } from 'parameters';
6
+ import { useLatest } from '@/hooks';
7
+ import { LOCALE_FEATURES } from '@/i18n';
8
+ import { RESULTS_ITEM_HEIGHT } from '@/parameters';
9
9
  import {
10
10
  selectAreResultsOutdated,
11
11
  selectLocale,
@@ -14,7 +14,7 @@ import {
14
14
  selectSolveIsLoading,
15
15
  useTranslate,
16
16
  useTypedSelector,
17
- } from 'state';
17
+ } from '@/state';
18
18
 
19
19
  import { EmptyState } from '../EmptyState';
20
20
  import { Loading } from '../Loading';
@@ -1,7 +1,7 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
  import { useDispatch } from 'react-redux';
3
3
 
4
- import { Search } from 'icons';
4
+ import { Search } from '@/icons';
5
5
  import {
6
6
  selectAreResultsOutdated,
7
7
  selectSolveIsLoading,
@@ -9,7 +9,7 @@ import {
9
9
  solveSlice,
10
10
  useTranslate,
11
11
  useTypedSelector,
12
- } from 'state';
12
+ } from '@/state';
13
13
 
14
14
  import { Button } from '../Button';
15
15
 
@@ -2,8 +2,8 @@ import classNames from 'classnames';
2
2
  import { type ChangeEvent, type FunctionComponent, type SubmitEventHandler, useState } from 'react';
3
3
  import { useDispatch } from 'react-redux';
4
4
 
5
- import { isRegExp } from 'lib';
6
- import { resultsSlice, selectResultsQuery, useTranslate, useTypedSelector } from 'state';
5
+ import { isRegExp } from '@/lib';
6
+ import { resultsSlice, selectResultsQuery, useTranslate, useTypedSelector } from '@/state';
7
7
 
8
8
  import styles from './ResultsInput.module.scss';
9
9
 
@@ -3,8 +3,8 @@ import classNames from 'classnames';
3
3
  import { type FunctionComponent, memo, type SyntheticEvent, useEffect, useMemo } from 'react';
4
4
  import { useDispatch } from 'react-redux';
5
5
 
6
- import { useAppLayout } from 'app-layout';
7
- import { useIsTouchDevice } from 'hooks';
6
+ import { useAppLayout } from '@/app-layout';
7
+ import { useIsTouchDevice } from '@/hooks';
8
8
  import {
9
9
  resultsSlice,
10
10
  selectAreResultsOutdated,
@@ -14,7 +14,7 @@ import {
14
14
  solveSlice,
15
15
  useTranslate,
16
16
  useTypedSelector,
17
- } from 'state';
17
+ } from '@/state';
18
18
 
19
19
  import { Alert } from '../Alert';
20
20
  import { Board } from '../Board';
@@ -2,8 +2,8 @@ import classNames from 'classnames';
2
2
  import { type FunctionComponent } from 'react';
3
3
  import { useDispatch } from 'react-redux';
4
4
 
5
- import { Check } from 'icons';
6
- import { resultsSlice, selectAreResultsOutdated, selectResultCandidate, useTranslate, useTypedSelector } from 'state';
5
+ import { Check } from '@/icons';
6
+ import { resultsSlice, selectAreResultsOutdated, selectResultCandidate, useTranslate, useTypedSelector } from '@/state';
7
7
 
8
8
  import { Button } from '../../../Button';
9
9
 
@@ -2,7 +2,7 @@ import classNames from 'classnames';
2
2
  import { type FunctionComponent, type HTMLProps, type MouseEventHandler } from 'react';
3
3
  import { useDispatch } from 'react-redux';
4
4
 
5
- import { ChevronDown, ChevronLeft, ChevronRight } from 'icons';
5
+ import { ChevronDown, ChevronLeft, ChevronRight } from '@/icons';
6
6
  import {
7
7
  resultsSlice,
8
8
  selectAreResultsOutdated,
@@ -12,7 +12,7 @@ import {
12
12
  selectResultCandidate,
13
13
  useTranslate,
14
14
  useTypedSelector,
15
- } from 'state';
15
+ } from '@/state';
16
16
 
17
17
  import { Button } from '../../../Button';
18
18
  import { Spinner } from '../../../Spinner';
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent } from 'react';
3
3
 
4
- import { useTranslate } from 'state';
4
+ import { useTranslate } from '@/state';
5
5
 
6
6
  import styles from './Spinner.module.scss';
7
7
 
@@ -13,9 +13,9 @@ import {
13
13
  useRef,
14
14
  } from 'react';
15
15
 
16
- import { useAppLayout } from 'app-layout';
17
- import { getTileSizes, noop } from 'lib';
18
- import { selectLocale, useTypedSelector } from 'state';
16
+ import { useAppLayout } from '@/app-layout';
17
+ import { getTileSizes, noop } from '@/lib';
18
+ import { selectLocale, useTypedSelector } from '@/state';
19
19
 
20
20
  import { TilePure } from './TilePure';
21
21
 
@@ -11,7 +11,7 @@ import {
11
11
  type TouchEventHandler,
12
12
  } from 'react';
13
13
 
14
- import { ExclamationSquareFill } from 'icons';
14
+ import { ExclamationSquareFill } from '@/icons';
15
15
 
16
16
  import styles from './Tile.module.scss';
17
17
 
@@ -1,7 +1,7 @@
1
1
  import { FloatingArrow, FloatingPortal, useDelayGroup, useMergeRefs, useTransitionStyles } from '@floating-ui/react';
2
2
  import { forwardRef, type HTMLProps } from 'react';
3
3
 
4
- import { TOOLTIP_DURATION } from 'parameters';
4
+ import { TOOLTIP_DURATION } from '@/parameters';
5
5
 
6
6
  import { useTooltipContext } from './context';
7
7
  import styles from './Tooltip.module.scss';
@@ -1,9 +1,9 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
2
  import { useMemo } from 'react';
3
3
 
4
- import { LOCALE_FEATURES } from 'i18n';
5
- import { selectLocale, selectShowCoordinates, useTypedSelector } from 'state';
6
- import { ResultColumnId } from 'types';
4
+ import { LOCALE_FEATURES } from '@/i18n';
5
+ import { selectLocale, selectShowCoordinates, useTypedSelector } from '@/state';
6
+ import { ResultColumnId } from '@/types';
7
7
 
8
8
  import { useMediaQueries } from './useMediaQueries';
9
9
 
@@ -1,6 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
 
3
- import { noop } from 'lib';
3
+ import { noop } from '@/lib';
4
4
 
5
5
  export const useDirection = (direction: 'ltr' | 'rtl') => {
6
6
  useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
 
3
- import { noop } from 'lib';
3
+ import { noop } from '@/lib';
4
4
 
5
5
  export const useLanguage = (language: string) => {
6
6
  useEffect(() => {
@@ -11,7 +11,7 @@ import {
11
11
  selectShowCoordinates,
12
12
  selectRemoveCellFilters,
13
13
  useTypedSelector,
14
- } from 'state';
14
+ } from '@/state';
15
15
 
16
16
  export const useLocalStorage = () => {
17
17
  const autoGroupTiles = useTypedSelector(selectAutoGroupTiles);
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  import { buildMediaQuery } from 'include-media-query-builder';
2
2
 
3
- import { BREAKPOINTS } from 'parameters';
3
+ import { BREAKPOINTS } from '@/parameters';
4
4
 
5
5
  import { useMedia } from './useMedia';
6
6
 
@@ -2,7 +2,7 @@ import { COMMA_ARABIC, COMMA_LATIN } from '@scrabble-solver/constants';
2
2
  import { Locale } from '@scrabble-solver/types';
3
3
  import { type FunctionComponent, type SVGAttributes } from 'react';
4
4
 
5
- import { FlagDe, FlagEs, FlagFa, FlagFr, FlagGb, FlagPl, FlagRo, FlagTr, FlagUs } from 'icons';
5
+ import { FlagDe, FlagEs, FlagFa, FlagFr, FlagGb, FlagPl, FlagRo, FlagTr, FlagUs } from '@/icons';
6
6
 
7
7
  interface LocaleFeatures {
8
8
  comma: string;
@@ -1,6 +1,6 @@
1
1
  import { Locale } from '@scrabble-solver/types';
2
2
 
3
- import { type Translations } from 'types';
3
+ import { type Translations } from '@/types';
4
4
 
5
5
  import english from './languages/english.json';
6
6
  import french from './languages/french.json';
@@ -42,7 +42,7 @@
42
42
  "keyMap.board-and-rack.insert-two-letter-tile": "Insert two-letter tile",
43
43
  "keyMap.board-and-rack.navigate": "Navigate",
44
44
  "keyMap.board-and-rack.remove-tile": "Remove tile",
45
- "keyMap.board-and-rack.submit": "Start solving",
45
+ "keyMap.board-and-rack.submit": "Solve",
46
46
  "keyMap.rack": "Rack",
47
47
  "keyMap.rack.insert-blank": "Insert blank",
48
48
  "menu": "Menu",
@@ -42,7 +42,7 @@
42
42
  "keyMap.board-and-rack.insert-two-letter-tile": "Insérer une tuile de deux lettres",
43
43
  "keyMap.board-and-rack.navigate": "Naviguer",
44
44
  "keyMap.board-and-rack.remove-tile": "Supprimer une case",
45
- "keyMap.board-and-rack.submit": "Commencer la résolution",
45
+ "keyMap.board-and-rack.submit": "Résoudre",
46
46
  "keyMap.rack": "Chevalet",
47
47
  "keyMap.rack.insert-blank": "Inserer une case vide",
48
48
  "menu": "Menu",
@@ -42,7 +42,7 @@
42
42
  "keyMap.board-and-rack.insert-two-letter-tile": "Zwei-Buchstaben Stein hinzufügen",
43
43
  "keyMap.board-and-rack.navigate": "Navigieren",
44
44
  "keyMap.board-and-rack.remove-tile": "Stein entfernen",
45
- "keyMap.board-and-rack.submit": "Lösen starten",
45
+ "keyMap.board-and-rack.submit": "Lösen",
46
46
  "keyMap.rack": "Ablage",
47
47
  "keyMap.rack.insert-blank": "Blanko hinzufügen",
48
48
  "menu": "Menü",
@@ -42,7 +42,7 @@
42
42
  "keyMap.board-and-rack.insert-two-letter-tile": "Wstaw dwuliterową płytkę",
43
43
  "keyMap.board-and-rack.navigate": "Nawigacja",
44
44
  "keyMap.board-and-rack.remove-tile": "Zdejmij płytkę",
45
- "keyMap.board-and-rack.submit": "Rozpocznij wyszukiwanie",
45
+ "keyMap.board-and-rack.submit": "Rozwiąż",
46
46
  "keyMap.rack": "Stojak",
47
47
  "keyMap.rack.insert-blank": "Wstaw blanka",
48
48
  "menu": "Menu",