@scrabble-solver/scrabble-solver 2.15.23 → 2.15.24

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 (151) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +4 -4
  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/prerender-manifest.json +4 -4
  15. package/.next/routes-manifest.json +1 -1
  16. package/.next/server/chunks/712.js +1 -1
  17. package/.next/server/middleware-build-manifest.js +1 -1
  18. package/.next/server/pages/404.html +1 -1
  19. package/.next/server/pages/500.html +1 -1
  20. package/.next/server/pages/index.html +1 -1
  21. package/.next/server/pages/index.js +1 -1
  22. package/.next/server/pages/index.json +1 -1
  23. package/.next/server/pages/not-found.html +1 -1
  24. package/.next/static/chunks/pages/{_app-a3061a79f91b3796.js → _app-369e5cb907606ad4.js} +5 -5
  25. package/.next/static/chunks/pages/{index-6c5b582e7afc063c.js → index-08b3b0a754095919.js} +1 -1
  26. package/.next/static/{zFnoNsMXUha-MKjuZn6AN → f_g0t0jBAscXxDrNYOuV0}/_buildManifest.js +1 -1
  27. package/.next/trace +21 -21
  28. package/.next/trace-build +1 -1
  29. package/package.json +9 -9
  30. package/src/app-layout/useAppLayoutValue.ts +4 -4
  31. package/src/components/Alert/Alert.tsx +1 -1
  32. package/src/components/Board/Board.tsx +4 -4
  33. package/src/components/Board/BoardPure.tsx +4 -4
  34. package/src/components/Board/components/Actions/Actions.tsx +5 -5
  35. package/src/components/Board/components/Actions/lib.ts +2 -2
  36. package/src/components/Board/components/Cell/Cell.tsx +1 -1
  37. package/src/components/Board/components/InputPrompt/InputPrompt.tsx +3 -3
  38. package/src/components/Board/components/ToggleDirectionButton/ToggleDirectionButton.tsx +4 -4
  39. package/src/components/Board/hooks/useBackgroundImage.tsx +13 -12
  40. package/src/components/Board/hooks/useBoardStyle.ts +4 -4
  41. package/src/components/Board/hooks/useFloatingActions.ts +2 -2
  42. package/src/components/Board/hooks/useFloatingInputPrompt.ts +1 -1
  43. package/src/components/Board/hooks/useGrid.ts +5 -5
  44. package/src/components/Board/lib.ts +2 -2
  45. package/src/components/Board/selectors.ts +2 -2
  46. package/src/components/Dictionary/Dictionary.tsx +2 -2
  47. package/src/components/DictionaryInput/DictionaryInput.tsx +2 -2
  48. package/src/components/EmptyState/EmptyState.tsx +13 -5
  49. package/src/components/Keys/Arrows/Arrows.tsx +1 -1
  50. package/src/components/Keys/index.tsx +2 -2
  51. package/src/components/Loading/Loading.tsx +2 -2
  52. package/src/components/Logo/Logo.tsx +2 -2
  53. package/src/components/Modal/Modal.tsx +3 -3
  54. package/src/components/NavButtons/NavButtons.tsx +4 -4
  55. package/src/components/NavButtons/selectors.ts +1 -1
  56. package/src/components/NotFound/NotFound.tsx +1 -1
  57. package/src/components/PlainTiles/lib.ts +1 -1
  58. package/src/components/Progress/Progress.tsx +2 -2
  59. package/src/components/Rack/Rack.tsx +4 -4
  60. package/src/components/Rack/components/InputPrompt/InputPrompt.tsx +2 -2
  61. package/src/components/Rack/components/InputPrompt/lib.ts +1 -3
  62. package/src/components/Rack/components/RackTile/RackTile.tsx +2 -2
  63. package/src/components/Rack/selectors.ts +2 -2
  64. package/src/components/Results/Cell.tsx +2 -2
  65. package/src/components/Results/Header.tsx +5 -5
  66. package/src/components/Results/HeaderButton.tsx +3 -3
  67. package/src/components/Results/Result.tsx +6 -6
  68. package/src/components/Results/Results.tsx +4 -4
  69. package/src/components/Results/SolveButton.tsx +2 -2
  70. package/src/components/ResultsInput/ResultsInput.tsx +2 -2
  71. package/src/components/Solver/Solver.tsx +3 -3
  72. package/src/components/Solver/components/InsertButton/InsertButton.tsx +2 -2
  73. package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +2 -2
  74. package/src/components/Spinner/Spinner.tsx +1 -1
  75. package/src/components/Tile/Tile.tsx +3 -3
  76. package/src/components/Tile/TilePure.tsx +1 -1
  77. package/src/components/Tooltip/TooltipContent.tsx +1 -1
  78. package/src/hooks/useColumns.ts +3 -3
  79. package/src/hooks/useDirection.ts +1 -1
  80. package/src/hooks/useLanguage.ts +1 -1
  81. package/src/hooks/useLocalStorage.ts +1 -1
  82. package/src/hooks/useMediaQuery.ts +1 -1
  83. package/src/i18n/constants.ts +1 -1
  84. package/src/i18n/i18n.ts +1 -1
  85. package/src/i18n/languages/english.json +1 -1
  86. package/src/i18n/languages/french.json +1 -1
  87. package/src/i18n/languages/german.json +1 -1
  88. package/src/i18n/languages/polish.json +1 -1
  89. package/src/i18n/languages/romanian.json +1 -1
  90. package/src/i18n/languages/spanish.json +1 -1
  91. package/src/i18n/languages/turkish.json +1 -1
  92. package/src/lib/createComparator.ts +1 -1
  93. package/src/lib/createKeyComparator.ts +1 -1
  94. package/src/lib/createStringComparator.ts +1 -1
  95. package/src/lib/getTileSizes.ts +1 -1
  96. package/src/lib/numberComparator.ts +1 -1
  97. package/src/lib/reverseComparator.ts +1 -1
  98. package/src/lib/zipCharactersAndTiles.ts +1 -1
  99. package/src/modals/DictionaryModal/DictionaryModal.tsx +2 -2
  100. package/src/modals/KeyMapModal/KeyMapModal.tsx +2 -2
  101. package/src/modals/MenuModal/MenuModal.tsx +5 -5
  102. package/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +5 -5
  103. package/src/modals/RemainingTilesModal/components/Character/Character.tsx +5 -5
  104. package/src/modals/RemainingTilesModal/lib.ts +1 -1
  105. package/src/modals/RemainingTilesModal/selectors.ts +1 -1
  106. package/src/modals/ResultsModal/ResultsModal.tsx +4 -4
  107. package/src/modals/SettingsModal/SettingsModal.tsx +3 -3
  108. package/src/modals/SettingsModal/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +2 -2
  109. package/src/modals/SettingsModal/components/AutoGroupTilesSetting/lib.ts +1 -1
  110. package/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.tsx +2 -2
  111. package/src/modals/SettingsModal/components/InputModeSetting/InputModeSetting.tsx +2 -2
  112. package/src/modals/SettingsModal/components/InputModeSetting/lib.ts +1 -1
  113. package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +3 -3
  114. package/src/modals/SettingsModal/components/RemoveCellFiltersSetting/RemoveCellFiltersSetting.tsx +2 -2
  115. package/src/modals/SettingsModal/components/RemoveCellFiltersSetting/lib.ts +1 -1
  116. package/src/modals/SettingsModal/components/ShowCoordinatesSetting/ShowCoordinatesSetting.tsx +2 -2
  117. package/src/modals/WordsModal/WordsModal.tsx +3 -3
  118. package/src/pages/_app.tsx +3 -3
  119. package/src/pages/api/dictionary/[locale]/[word].ts +1 -1
  120. package/src/pages/api/dictionary/[locale]/index.ts +1 -1
  121. package/src/pages/api/solve.ts +2 -2
  122. package/src/pages/api/verify.ts +1 -1
  123. package/src/pages/api/visit.ts +1 -1
  124. package/src/pages/index.tsx +6 -6
  125. package/src/pages/not-found.tsx +1 -1
  126. package/src/parameters/index.ts +1 -1
  127. package/src/service-worker/routeSolveRequests.ts +1 -1
  128. package/src/service-worker/routeVerifyRequests.ts +1 -1
  129. package/src/state/board/slice.ts +24 -1
  130. package/src/state/cellFilters/lib.ts +1 -1
  131. package/src/state/cellFilters/selectors.ts +1 -1
  132. package/src/state/cellFilters/slice.ts +1 -1
  133. package/src/state/cellFilters/types.ts +1 -1
  134. package/src/state/lib.ts +2 -2
  135. package/src/state/localStorage.ts +1 -1
  136. package/src/state/rack/slice.ts +2 -2
  137. package/src/state/rack/types.ts +1 -1
  138. package/src/state/results/initialState.ts +1 -1
  139. package/src/state/results/lib.ts +9 -2
  140. package/src/state/results/selectors.ts +1 -1
  141. package/src/state/results/slice.ts +1 -1
  142. package/src/state/results/types.ts +1 -1
  143. package/src/state/sagas.ts +3 -3
  144. package/src/state/selectors.ts +1 -1
  145. package/src/state/settings/selectors.ts +1 -1
  146. package/src/state/settings/slice.ts +1 -1
  147. package/src/state/settings/types.ts +1 -1
  148. package/src/state/useTranslate.ts +1 -1
  149. package/tsconfig.json +1 -15
  150. package/tsconfig.tsbuildinfo +1 -1
  151. /package/.next/static/{zFnoNsMXUha-MKjuZn6AN → f_g0t0jBAscXxDrNYOuV0}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-typescript","duration":1926354,"timestamp":430470878,"id":13,"parentId":1,"tags":{},"startTime":1775678234571,"traceId":"dfda121f630d27e7"},{"name":"run-webpack","duration":6504061,"timestamp":432399576,"id":15,"parentId":1,"tags":{},"startTime":1775678236500,"traceId":"dfda121f630d27e7"},{"name":"static-check","duration":195373,"timestamp":438980589,"id":2016,"parentId":1,"tags":{},"startTime":1775678243081,"traceId":"dfda121f630d27e7"},{"name":"static-generation","duration":873316,"timestamp":439183871,"id":2034,"parentId":1,"tags":{},"startTime":1775678243284,"traceId":"dfda121f630d27e7"},{"name":"collect-build-traces","duration":3881714,"timestamp":439176421,"id":2031,"parentId":1,"tags":{},"startTime":1775678243277,"traceId":"dfda121f630d27e7"},{"name":"telemetry-flush","duration":20,"timestamp":443059296,"id":2046,"parentId":1,"tags":{},"startTime":1775678247160,"traceId":"dfda121f630d27e7"},{"name":"next-build","duration":12832915,"timestamp":430226405,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1775678234327,"traceId":"dfda121f630d27e7"}]
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"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/scrabble-solver",
3
- "version": "2.15.23",
3
+ "version": "2.15.24",
4
4
  "description": "Scrabble Solver 2 - App",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,13 +28,13 @@
28
28
  "@floating-ui/react": "^0.27.19",
29
29
  "@kamilmielnik/trie": "^4.0.0",
30
30
  "@reduxjs/toolkit": "^2.11.2",
31
- "@scrabble-solver/configs": "^2.15.23",
32
- "@scrabble-solver/constants": "^2.15.23",
33
- "@scrabble-solver/dictionaries": "^2.15.23",
34
- "@scrabble-solver/logger": "^2.15.23",
35
- "@scrabble-solver/solver": "^2.15.23",
36
- "@scrabble-solver/types": "^2.15.23",
37
- "@scrabble-solver/word-definitions": "^2.15.23",
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",
38
38
  "classnames": "^2.5.1",
39
39
  "env-cmd": "^11.0.0",
40
40
  "include-media": "^2.0.0",
@@ -69,5 +69,5 @@
69
69
  "@types/redux": "^3.6.31",
70
70
  "sass": "^1.99.0"
71
71
  },
72
- "gitHead": "1414493526a57ebb4fd93fdb006badcc9d6afb6a"
72
+ "gitHead": "28330eeb094266d16a0e2c80f3333f534c70dea1"
73
73
  }
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable max-statements */
2
2
 
3
- import { useColumns, useIsTouchDevice, useMediaQueries, useViewportSize } from 'hooks';
3
+ import { useColumns, useIsTouchDevice, useMediaQueries, useViewportSize } from '@/hooks';
4
4
  import {
5
5
  BOARD_TILE_SIZE_MAX,
6
6
  BORDER_WIDTH,
@@ -19,9 +19,9 @@ import {
19
19
  RESULTS_COLUMN_WIDTH,
20
20
  SOLVER_COLUMN_WIDTH,
21
21
  TEXT_INPUT_HEIGHT,
22
- } from 'parameters';
23
- import { selectConfig, selectShowCoordinates, useTypedSelector } from 'state';
24
- import { type ResultColumnId } from 'types';
22
+ } from '@/parameters';
23
+ import { selectConfig, selectShowCoordinates, useTypedSelector } from '@/state';
24
+ import { type ResultColumnId } from '@/types';
25
25
 
26
26
  export const useAppLayoutValue = () => {
27
27
  const { viewportHeight, viewportWidth } = useViewportSize();
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { type FunctionComponent, type HTMLProps, type ReactNode, type SVGAttributes } from 'react';
3
3
 
4
- import { Check, CrossCircleFill, ExclamationTriangleFill, InfoCircleFill } from 'icons';
4
+ import { Check, CrossCircleFill, ExclamationTriangleFill, InfoCircleFill } from '@/icons';
5
5
 
6
6
  import styles from './Alert.module.scss';
7
7
 
@@ -7,9 +7,9 @@ import { type CSSProperties, type FocusEventHandler, type FunctionComponent, use
7
7
  import useOnclickOutside from 'react-cool-onclickoutside';
8
8
  import { useDispatch } from 'react-redux';
9
9
 
10
- import { useAppLayout } from 'app-layout';
11
- import { LOCALE_FEATURES } from 'i18n';
12
- import { TRANSITION } from 'parameters';
10
+ import { useAppLayout } from '@/app-layout';
11
+ import { LOCALE_FEATURES } from '@/i18n';
12
+ import { TRANSITION } from '@/parameters';
13
13
  import {
14
14
  boardSlice,
15
15
  cellFiltersSlice,
@@ -19,7 +19,7 @@ import {
19
19
  selectShowCoordinates,
20
20
  solveSlice,
21
21
  useTypedSelector,
22
- } from 'state';
22
+ } from '@/state';
23
23
 
24
24
  import styles from './Board.module.scss';
25
25
  import { BoardPure } from './BoardPure';
@@ -12,10 +12,10 @@ import {
12
12
  memo,
13
13
  } from 'react';
14
14
 
15
- import { Ban, FlagFill } from 'icons';
16
- import { getCoordinate } from 'lib';
17
- import { BORDER_WIDTH } from 'parameters';
18
- import { type CellFilter } from 'types';
15
+ import { Ban, FlagFill } from '@/icons';
16
+ import { getCoordinate } from '@/lib';
17
+ import { BORDER_WIDTH } from '@/parameters';
18
+ import { type CellFilter } from '@/types';
19
19
 
20
20
  import styles from './Board.module.scss';
21
21
  import { Cell } from './components';
@@ -3,11 +3,11 @@ import { type Cell } from '@scrabble-solver/types';
3
3
  import classNames from 'classnames';
4
4
  import { forwardRef, type HTMLProps, type MouseEventHandler } from 'react';
5
5
 
6
- import { useIsTouchDevice } from 'hooks';
7
- import { Keyboard, Square, SquareFill } from 'icons';
8
- import { findCell, isMac } from 'lib';
9
- import { selectCellFilter, selectInputMode, selectResultCandidateCells, useTranslate, useTypedSelector } from 'state';
10
- import { type Direction } from 'types';
6
+ import { useIsTouchDevice } from '@/hooks';
7
+ import { Keyboard, Square, SquareFill } from '@/icons';
8
+ import { findCell, isMac } from '@/lib';
9
+ import { selectCellFilter, selectInputMode, selectResultCandidateCells, useTranslate, useTypedSelector } from '@/state';
10
+ import { type Direction } from '@/types';
11
11
 
12
12
  import { Button } from '../../../Button';
13
13
  import { ToggleDirectionButton } from '../ToggleDirectionButton';
@@ -1,7 +1,7 @@
1
1
  import { type FunctionComponent, type SVGAttributes } from 'react';
2
2
 
3
- import { Ban, Eraser, FlagFill } from 'icons';
4
- import { type CellFilter, type TranslationKey } from 'types';
3
+ import { Ban, Eraser, FlagFill } from '@/icons';
4
+ import { type CellFilter, type TranslationKey } from '@/types';
5
5
 
6
6
  export const getNextCellFilter = (
7
7
  filter: CellFilter | undefined,
@@ -19,7 +19,7 @@ import {
19
19
  selectTilePoints,
20
20
  useTranslate,
21
21
  useTypedSelector,
22
- } from 'state';
22
+ } from '@/state';
23
23
 
24
24
  import { Tile } from '../../../Tile';
25
25
 
@@ -8,9 +8,9 @@ import {
8
8
  useState,
9
9
  } from 'react';
10
10
 
11
- import { Check } from 'icons';
12
- import { useTranslate } from 'state';
13
- import { type Direction } from 'types';
11
+ import { Check } from '@/icons';
12
+ import { useTranslate } from '@/state';
13
+ import { type Direction } from '@/types';
14
14
 
15
15
  import { Button } from '../../../Button';
16
16
  import { ToggleDirectionButton } from '../ToggleDirectionButton';
@@ -1,10 +1,10 @@
1
1
  import classNames from 'classnames';
2
2
  import { type ButtonHTMLAttributes, type FunctionComponent } from 'react';
3
3
 
4
- import { useIsTouchDevice } from 'hooks';
5
- import { ArrowDown } from 'icons';
6
- import { useTranslate } from 'state';
7
- import { type Direction } from 'types';
4
+ import { useIsTouchDevice } from '@/hooks';
5
+ import { ArrowDown } from '@/icons';
6
+ import { useTranslate } from '@/state';
7
+ import { type Direction } from '@/types';
8
8
 
9
9
  import { Button } from '../../../Button';
10
10
 
@@ -5,14 +5,14 @@ import { useCallback, useMemo } from 'react';
5
5
  import { renderToString } from 'react-dom/server';
6
6
  import { Provider } from 'react-redux';
7
7
 
8
- import { useAppLayout } from 'app-layout';
9
- import { useMediaQueries } from 'hooks';
10
- import { LOCALE_FEATURES } from 'i18n';
11
- import { Star } from 'icons';
12
- import { getTileSizes } from 'lib';
13
- import { BORDER_COLOR_LIGHT, BORDER_RADIUS, BORDER_WIDTH, COLOR_BACKGROUND, COLOR_BONUS_START } from 'parameters';
14
- import { selectConfig, selectLocale, selectShowCoordinates, store, useTypedSelector } from 'state';
15
- import { type Point } from 'types';
8
+ import { useAppLayout } from '@/app-layout';
9
+ import { useMediaQueries } from '@/hooks';
10
+ import { LOCALE_FEATURES } from '@/i18n';
11
+ import { Star } from '@/icons';
12
+ import { getTileSizes } from '@/lib';
13
+ import { BORDER_COLOR_LIGHT, BORDER_RADIUS, BORDER_WIDTH, COLOR_BACKGROUND, COLOR_BONUS_START } from '@/parameters';
14
+ import { selectConfig, selectLocale, selectShowCoordinates, store, useTypedSelector } from '@/state';
15
+ import { type Point } from '@/types';
16
16
 
17
17
  import { getBonusColor } from '../lib';
18
18
 
@@ -109,7 +109,7 @@ export const useBackgroundImage = () => {
109
109
  x={fontOffset}
110
110
  y={fontOffset}
111
111
  >
112
- x2
112
+ ×2
113
113
  </text>
114
114
  </symbol>
115
115
 
@@ -126,7 +126,7 @@ export const useBackgroundImage = () => {
126
126
  x={fontOffset}
127
127
  y={fontOffset}
128
128
  >
129
- x3
129
+ ×3
130
130
  </text>
131
131
  </symbol>
132
132
 
@@ -143,7 +143,7 @@ export const useBackgroundImage = () => {
143
143
  x={fontOffset}
144
144
  y={fontOffset}
145
145
  >
146
- x4
146
+ ×4
147
147
  </text>
148
148
  </symbol>
149
149
  </defs>
@@ -273,6 +273,7 @@ export const useBackgroundImage = () => {
273
273
  ],
274
274
  );
275
275
 
276
- const dataUrl = useMemo(() => `data:image/svg+xml;base64,${globalThis.btoa(backgroundSvg)}`, [backgroundSvg]);
276
+ const dataUrl = useMemo(() => `data:image/svg+xml,${encodeURIComponent(backgroundSvg)}`, [backgroundSvg]);
277
+
277
278
  return dataUrl;
278
279
  };
@@ -1,9 +1,9 @@
1
1
  import { type CSSProperties, useMemo } from 'react';
2
2
 
3
- import { useAppLayout } from 'app-layout';
4
- import { getTileSizes } from 'lib';
5
- import { BORDER_WIDTH } from 'parameters';
6
- import { selectConfig, selectShowCoordinates, useTypedSelector } from 'state';
3
+ import { useAppLayout } from '@/app-layout';
4
+ import { getTileSizes } from '@/lib';
5
+ import { BORDER_WIDTH } from '@/parameters';
6
+ import { selectConfig, selectShowCoordinates, useTypedSelector } from '@/state';
7
7
 
8
8
  import { useBackgroundImage } from './useBackgroundImage';
9
9
 
@@ -1,7 +1,7 @@
1
1
  import { autoUpdate, offset, shift, useFloating } from '@floating-ui/react';
2
2
 
3
- import { useAppLayout } from 'app-layout';
4
- import { BOARD_CELL_ACTIONS_OFFSET } from 'parameters';
3
+ import { useAppLayout } from '@/app-layout';
4
+ import { BOARD_CELL_ACTIONS_OFFSET } from '@/parameters';
5
5
 
6
6
  export const useFloatingActions = () => {
7
7
  const { actionsWidth } = useAppLayout();
@@ -1,6 +1,6 @@
1
1
  import { autoUpdate, offset, shift, useFloating } from '@floating-ui/react';
2
2
 
3
- import { BOARD_CELL_ACTIONS_OFFSET } from 'parameters';
3
+ import { BOARD_CELL_ACTIONS_OFFSET } from '@/parameters';
4
4
 
5
5
  export const useFloatingInputPrompt = () => {
6
6
  return useFloating({
@@ -15,11 +15,11 @@ import {
15
15
  } from 'react';
16
16
  import { useDispatch } from 'react-redux';
17
17
 
18
- import { useLatest } from 'hooks';
19
- import { LOCALE_FEATURES } from 'i18n';
20
- import { createKeyboardNavigation, extractCharacters, extractInputValue, isCtrl } from 'lib';
21
- import { boardSlice, cellFiltersSlice, selectConfig, selectLocale, useTypedSelector } from 'state';
22
- import { type Direction, type Point } from 'types';
18
+ import { useLatest } from '@/hooks';
19
+ import { LOCALE_FEATURES } from '@/i18n';
20
+ import { createKeyboardNavigation, extractCharacters, extractInputValue, isCtrl } from '@/lib';
21
+ import { boardSlice, cellFiltersSlice, selectConfig, selectLocale, useTypedSelector } from '@/state';
22
+ import { type Direction, type Point } from '@/types';
23
23
 
24
24
  import { createGrid, getPositionInGrid } from '../lib';
25
25
 
@@ -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
 
@@ -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