@scrabble-solver/scrabble-solver 2.15.9 → 2.15.10

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 (309) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +9 -9
  3. package/.next/cache/.rscinfo +1 -1
  4. package/.next/cache/.tsbuildinfo +1 -1
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  8. package/.next/cache/webpack/edge-server-production/0.pack +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/next-minimal-server.js.nft.json +1 -1
  16. package/.next/next-server.js.nft.json +1 -1
  17. package/.next/prerender-manifest.json +4 -4
  18. package/.next/required-server-files.json +1 -2
  19. package/.next/routes-manifest.json +1 -1
  20. package/.next/server/chunks/60.js +1 -1
  21. package/.next/server/chunks/812.js +1 -1
  22. package/.next/server/chunks/974.js +1 -1
  23. package/.next/server/middleware-build-manifest.js +1 -1
  24. package/.next/server/pages/404.html +1 -1
  25. package/.next/server/pages/404.js.nft.json +1 -1
  26. package/.next/server/pages/500.html +1 -1
  27. package/.next/server/pages/_app.js.nft.json +1 -1
  28. package/.next/server/pages/api/dictionary/[locale]/[word].js +2 -2
  29. package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  30. package/.next/server/pages/api/dictionary/[locale].js +1 -1
  31. package/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  32. package/.next/server/pages/api/solve.js +1 -1
  33. package/.next/server/pages/api/solve.js.nft.json +1 -1
  34. package/.next/server/pages/api/verify.js +1 -1
  35. package/.next/server/pages/api/verify.js.nft.json +1 -1
  36. package/.next/server/pages/api/visit.js +1 -1
  37. package/.next/server/pages/index.html +1 -1
  38. package/.next/server/pages/index.js +1 -1
  39. package/.next/server/pages/index.js.nft.json +1 -1
  40. package/.next/server/pages/index.json +1 -1
  41. package/.next/server/webpack-api-runtime.js +1 -1
  42. package/.next/static/chunks/{main-b934e2c3dd3b55b5.js → main-016492249b3393e2.js} +1 -1
  43. package/.next/static/chunks/pages/{404-7451dd58396eaa39.js → 404-590e2a3839c1d9e0.js} +1 -1
  44. package/.next/static/chunks/pages/_app-ac93a74c390f2ab8.js +1 -0
  45. package/.next/static/chunks/pages/index-e5f1caa581e6d3b8.js +1 -0
  46. package/.next/static/{3MlxnccTCLyz9bgD30zY2 → ylO_ttKeJTuoqDYywao5A}/_buildManifest.js +1 -1
  47. package/.next/trace +23 -23
  48. package/next.config.js +3 -0
  49. package/package.json +10 -10
  50. package/src/api/getServerLoggingData.ts +1 -3
  51. package/src/api/index.ts +5 -5
  52. package/src/api/isBoardValid.ts +3 -5
  53. package/src/api/isCellValid.ts +4 -6
  54. package/src/api/isCharacterValid.ts +2 -3
  55. package/src/api/isRowValid.ts +3 -5
  56. package/src/components/Alert/Alert.tsx +1 -3
  57. package/src/components/Alert/index.ts +1 -1
  58. package/src/components/Badge/Badge.tsx +1 -3
  59. package/src/components/Badge/index.ts +1 -1
  60. package/src/components/Board/Board.tsx +2 -4
  61. package/src/components/Board/BoardPure.tsx +2 -2
  62. package/src/components/Board/components/Actions/Actions.tsx +3 -5
  63. package/src/components/Board/components/Actions/index.ts +1 -1
  64. package/src/components/Board/components/Cell/Cell.tsx +3 -5
  65. package/src/components/Board/components/Cell/index.ts +1 -1
  66. package/src/components/Board/components/InputPrompt/InputPrompt.tsx +3 -5
  67. package/src/components/Board/components/InputPrompt/index.ts +1 -1
  68. package/src/components/Board/components/ToggleDirectionButton/ToggleDirectionButton.tsx +2 -4
  69. package/src/components/Board/components/ToggleDirectionButton/index.ts +1 -1
  70. package/src/components/Board/components/index.ts +4 -4
  71. package/src/components/Board/hooks/index.ts +6 -6
  72. package/src/components/Board/hooks/useBackgroundImage.tsx +7 -9
  73. package/src/components/Board/hooks/useBoardStyle.ts +7 -9
  74. package/src/components/Board/hooks/useFloatingActions.ts +1 -3
  75. package/src/components/Board/hooks/useFloatingFocus.ts +1 -3
  76. package/src/components/Board/hooks/useFloatingInputPrompt.ts +1 -3
  77. package/src/components/Board/hooks/useGrid.ts +2 -4
  78. package/src/components/Board/index.ts +1 -1
  79. package/src/components/Board/lib/getBonusColor.ts +1 -3
  80. package/src/components/Board/lib/getPositionInGrid.ts +1 -3
  81. package/src/components/Board/lib/index.ts +2 -2
  82. package/src/components/Button/Button.tsx +3 -3
  83. package/src/components/Button/Link.tsx +1 -3
  84. package/src/components/Button/index.ts +1 -1
  85. package/src/components/Dictionary/Dictionary.tsx +3 -5
  86. package/src/components/Dictionary/index.ts +1 -1
  87. package/src/components/DictionaryInput/DictionaryInput.tsx +1 -3
  88. package/src/components/DictionaryInput/index.ts +1 -1
  89. package/src/components/EmptyState/EmptyState.tsx +2 -4
  90. package/src/components/EmptyState/index.ts +1 -1
  91. package/src/components/IconButton/IconButton.tsx +3 -3
  92. package/src/components/IconButton/Link.tsx +1 -3
  93. package/src/components/IconButton/index.ts +1 -1
  94. package/src/components/Key/Key.tsx +1 -3
  95. package/src/components/Key/index.ts +1 -1
  96. package/src/components/Keys/Arrows/Arrows.tsx +2 -4
  97. package/src/components/Keys/Arrows/index.ts +1 -1
  98. package/src/components/{keys.tsx → Keys/index.tsx} +3 -1
  99. package/src/components/Loading/Loading.tsx +2 -4
  100. package/src/components/Loading/index.ts +1 -1
  101. package/src/components/Logo/Logo.tsx +1 -3
  102. package/src/components/Logo/LogoBlueprint.tsx +2 -4
  103. package/src/components/Logo/index.ts +1 -1
  104. package/src/components/Modal/Modal.tsx +3 -3
  105. package/src/components/Modal/components/Section/Section.tsx +1 -3
  106. package/src/components/Modal/components/Section/index.ts +1 -1
  107. package/src/components/Modal/components/index.ts +1 -1
  108. package/src/components/Modal/index.ts +1 -1
  109. package/src/components/NavButtons/NavButtons.tsx +3 -3
  110. package/src/components/NavButtons/index.ts +1 -1
  111. package/src/components/NotFound/NotFound.tsx +2 -4
  112. package/src/components/NotFound/index.ts +1 -1
  113. package/src/components/PlainTiles/PlainTiles.tsx +10 -4
  114. package/src/components/PlainTiles/Tile.tsx +1 -3
  115. package/src/components/PlainTiles/index.ts +1 -1
  116. package/src/components/PlainTiles/lib/createPlainTile.ts +10 -6
  117. package/src/components/PlainTiles/lib/createPlainTiles.ts +2 -4
  118. package/src/components/PlainTiles/lib/getViewbox.ts +1 -3
  119. package/src/components/PlainTiles/lib/getX.ts +1 -3
  120. package/src/components/PlainTiles/lib/getY.ts +1 -3
  121. package/src/components/PlainTiles/lib/index.ts +6 -6
  122. package/src/components/PlainTiles/lib/randomize.ts +1 -3
  123. package/src/components/Progress/Progress.tsx +1 -3
  124. package/src/components/Progress/index.ts +1 -1
  125. package/src/components/Rack/Rack.tsx +2 -4
  126. package/src/components/Rack/components/InputPrompt/InputPrompt.tsx +2 -2
  127. package/src/components/Rack/components/InputPrompt/index.ts +1 -1
  128. package/src/components/Rack/components/RackTile/RackTile.tsx +4 -7
  129. package/src/components/Rack/components/RackTile/index.ts +1 -1
  130. package/src/components/Rack/components/index.ts +2 -2
  131. package/src/components/Rack/index.ts +1 -1
  132. package/src/components/Radio/Radio.tsx +1 -3
  133. package/src/components/Radio/index.ts +1 -1
  134. package/src/components/Results/Cell.tsx +9 -3
  135. package/src/components/Results/Header.tsx +2 -4
  136. package/src/components/Results/HeaderButton.tsx +1 -3
  137. package/src/components/Results/Result.tsx +2 -4
  138. package/src/components/Results/Results.tsx +7 -9
  139. package/src/components/Results/SolveButton.tsx +2 -4
  140. package/src/components/Results/index.ts +1 -1
  141. package/src/components/ResultsInput/ResultsInput.tsx +1 -3
  142. package/src/components/ResultsInput/index.ts +1 -1
  143. package/src/components/SeoMessage/SeoMessage.tsx +4 -6
  144. package/src/components/SeoMessage/index.ts +1 -1
  145. package/src/components/Solver/Solver.tsx +8 -8
  146. package/src/components/Solver/components/InsertButton/InsertButton.tsx +2 -4
  147. package/src/components/Solver/components/InsertButton/index.ts +1 -1
  148. package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +4 -6
  149. package/src/components/Solver/components/ResultCandidatePicker/index.ts +1 -1
  150. package/src/components/Solver/components/index.ts +2 -2
  151. package/src/components/Solver/index.ts +1 -1
  152. package/src/components/Spinner/Spinner.tsx +1 -3
  153. package/src/components/Spinner/index.ts +1 -1
  154. package/src/components/Tile/Tile.tsx +2 -4
  155. package/src/components/Tile/TilePure.tsx +2 -2
  156. package/src/components/Tile/index.ts +1 -1
  157. package/src/components/Tooltip/TooltipTrigger.tsx +5 -3
  158. package/src/components/index.ts +24 -25
  159. package/src/hooks/index.ts +13 -13
  160. package/src/hooks/useAppLayout.ts +19 -15
  161. package/src/hooks/useColumns.ts +2 -4
  162. package/src/hooks/useDirection.ts +1 -3
  163. package/src/hooks/useEffectOnce.ts +2 -4
  164. package/src/hooks/useIsTouchDevice.ts +2 -4
  165. package/src/hooks/useLanguage.ts +1 -3
  166. package/src/hooks/useLatest.ts +1 -3
  167. package/src/hooks/useLocalStorage.ts +1 -3
  168. package/src/hooks/useMedia.ts +1 -3
  169. package/src/hooks/useMediaQueries.ts +2 -4
  170. package/src/hooks/useMediaQuery.ts +2 -4
  171. package/src/hooks/useOnWindowResize.ts +1 -3
  172. package/src/hooks/useViewportSize.ts +2 -4
  173. package/src/i18n/i18n.ts +1 -3
  174. package/src/i18n/index.ts +1 -1
  175. package/src/lib/arrayEquals.ts +1 -3
  176. package/src/lib/createArray.ts +1 -3
  177. package/src/lib/createComparator.ts +3 -5
  178. package/src/lib/createGridOf.ts +2 -4
  179. package/src/lib/createKeyComparator.ts +6 -5
  180. package/src/lib/createKeyboardNavigation.ts +2 -4
  181. package/src/lib/createNullMovingComparator.test.ts +1 -1
  182. package/src/lib/createNullMovingComparator.ts +1 -3
  183. package/src/lib/createRegExp.ts +1 -3
  184. package/src/lib/createStringComparator.ts +5 -3
  185. package/src/lib/detectLocale.ts +1 -3
  186. package/src/lib/extractCharacters.test.ts +1 -1
  187. package/src/lib/extractCharacters.ts +1 -3
  188. package/src/lib/extractCharactersByCase.test.ts +1 -1
  189. package/src/lib/extractCharactersByCase.ts +2 -4
  190. package/src/lib/extractInputValue.ts +1 -3
  191. package/src/lib/findCell.ts +1 -3
  192. package/src/lib/getCellSize.ts +3 -5
  193. package/src/lib/getCoordinate.ts +1 -3
  194. package/src/lib/getCoordinates.ts +2 -4
  195. package/src/lib/getRemainingTiles.ts +8 -5
  196. package/src/lib/getRemainingTilesCount.ts +1 -3
  197. package/src/lib/getRemainingTilesGroups.ts +3 -5
  198. package/src/lib/getTileSizes.ts +1 -3
  199. package/src/lib/getTotalRemainingTilesCount.ts +1 -3
  200. package/src/lib/groupResults.ts +3 -5
  201. package/src/lib/guessLocale.ts +2 -4
  202. package/src/lib/index.ts +39 -39
  203. package/src/lib/inverseDirection.ts +1 -3
  204. package/src/lib/isCtrl.ts +1 -3
  205. package/src/lib/isMac.ts +3 -4
  206. package/src/lib/isRegExp.ts +1 -3
  207. package/src/lib/isStringArray.ts +1 -3
  208. package/src/lib/isUpperCase.ts +1 -3
  209. package/src/lib/memoize.ts +18 -20
  210. package/src/lib/noop.ts +1 -3
  211. package/src/lib/numberComparator.ts +1 -3
  212. package/src/lib/resultMatchesCellFilter.ts +1 -3
  213. package/src/lib/reverseComparator.ts +1 -3
  214. package/src/lib/sortGroupedResults.ts +2 -4
  215. package/src/lib/sortResults.ts +5 -7
  216. package/src/lib/unorderedArraysEqual.ts +2 -4
  217. package/src/lib/zipCharactersAndTiles.ts +1 -3
  218. package/src/modals/DictionaryModal/DictionaryModal.tsx +2 -2
  219. package/src/modals/DictionaryModal/index.ts +1 -1
  220. package/src/modals/KeyMapModal/KeyMapModal.tsx +2 -2
  221. package/src/modals/KeyMapModal/components/Mapping/Mapping.tsx +1 -3
  222. package/src/modals/KeyMapModal/components/Mapping/index.ts +1 -1
  223. package/src/modals/KeyMapModal/components/index.ts +1 -1
  224. package/src/modals/KeyMapModal/index.ts +1 -1
  225. package/src/modals/MenuModal/MenuModal.tsx +2 -2
  226. package/src/modals/MenuModal/index.ts +1 -1
  227. package/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +2 -2
  228. package/src/modals/RemainingTilesModal/components/Character/Character.tsx +1 -3
  229. package/src/modals/RemainingTilesModal/components/Character/index.ts +1 -1
  230. package/src/modals/RemainingTilesModal/components/index.ts +1 -1
  231. package/src/modals/RemainingTilesModal/index.ts +1 -1
  232. package/src/modals/ResultsModal/ResultsModal.tsx +2 -2
  233. package/src/modals/ResultsModal/index.ts +1 -1
  234. package/src/modals/SettingsModal/SettingsModal.tsx +2 -2
  235. package/src/modals/SettingsModal/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +1 -3
  236. package/src/modals/SettingsModal/components/AutoGroupTilesSetting/index.ts +1 -1
  237. package/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.tsx +4 -10
  238. package/src/modals/SettingsModal/components/ConfigSetting/index.ts +1 -1
  239. package/src/modals/SettingsModal/components/ConfigSetting/lib.ts +19 -0
  240. package/src/modals/SettingsModal/components/InputModeSetting/InputModeSetting.tsx +1 -3
  241. package/src/modals/SettingsModal/components/InputModeSetting/index.ts +1 -1
  242. package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +1 -3
  243. package/src/modals/SettingsModal/components/LocaleSetting/index.ts +1 -1
  244. package/src/modals/SettingsModal/components/ShowCoordinatesSetting/ShowCoordinatesSetting.tsx +1 -3
  245. package/src/modals/SettingsModal/components/ShowCoordinatesSetting/index.ts +1 -1
  246. package/src/modals/SettingsModal/components/index.ts +5 -5
  247. package/src/modals/SettingsModal/index.ts +1 -1
  248. package/src/modals/WordsModal/WordsModal.tsx +2 -2
  249. package/src/modals/WordsModal/index.ts +1 -1
  250. package/src/modals/index.ts +7 -7
  251. package/src/pages/_app.tsx +2 -1
  252. package/src/pages/api/dictionary/[locale]/[word].ts +1 -1
  253. package/src/pages/api/dictionary/[locale]/index.ts +1 -1
  254. package/src/pages/api/solve.ts +6 -4
  255. package/src/pages/api/verify.ts +6 -4
  256. package/src/pages/api/visit.ts +2 -2
  257. package/src/pages/index.tsx +7 -0
  258. package/src/sdk/fetch.ts +1 -3
  259. package/src/sdk/fetchJson.ts +2 -4
  260. package/src/sdk/findWordDefinitions.ts +2 -4
  261. package/src/sdk/getDictionary.ts +2 -4
  262. package/src/sdk/index.ts +4 -4
  263. package/src/sdk/solve.ts +2 -4
  264. package/src/sdk/verify.ts +2 -4
  265. package/src/sdk/visit.ts +1 -3
  266. package/src/service-worker/average.ts +1 -3
  267. package/src/service-worker/dictionaries/expirationManager.ts +1 -3
  268. package/src/service-worker/dictionaries/getDictionary.ts +3 -5
  269. package/src/service-worker/dictionaries/getDictionaryUrl.ts +1 -3
  270. package/src/service-worker/dictionaries/index.ts +2 -2
  271. package/src/service-worker/dictionaries/revalidateDictionary.ts +3 -5
  272. package/src/service-worker/getTrie.ts +1 -3
  273. package/src/service-worker/index.ts +4 -2
  274. package/src/service-worker/routeSolveRequests.ts +17 -11
  275. package/src/service-worker/routeVerifyRequests.ts +7 -5
  276. package/src/serviceWorkerManager.ts +4 -4
  277. package/src/state/index.ts +4 -4
  278. package/src/state/localStorage.ts +10 -12
  279. package/src/state/sagas.ts +4 -1
  280. package/src/state/selectors.ts +2 -5
  281. package/src/state/slices/boardInitialState.ts +6 -7
  282. package/src/state/slices/boardSlice.ts +5 -7
  283. package/src/state/slices/cellFilterInitialState.ts +1 -3
  284. package/src/state/slices/cellFilterSlice.ts +2 -4
  285. package/src/state/slices/dictionaryInitialState.ts +2 -4
  286. package/src/state/slices/dictionarySlice.ts +2 -4
  287. package/src/state/slices/index.ts +16 -16
  288. package/src/state/slices/rackInitialState.ts +2 -4
  289. package/src/state/slices/rackSlice.ts +2 -4
  290. package/src/state/slices/resultsInitialState.ts +1 -3
  291. package/src/state/slices/resultsSlice.ts +2 -4
  292. package/src/state/slices/settingsInitialState.ts +2 -4
  293. package/src/state/slices/settingsSlice.ts +2 -4
  294. package/src/state/slices/solveInitialState.ts +3 -5
  295. package/src/state/slices/solveSlice.ts +2 -4
  296. package/src/state/slices/verifyInitialState.ts +2 -4
  297. package/src/state/slices/verifySlice.ts +2 -4
  298. package/src/state/store.ts +1 -3
  299. package/src/state/useTranslate.ts +2 -4
  300. package/src/state/useTypedSelector.ts +1 -3
  301. package/src/types/api.ts +15 -0
  302. package/src/types/index.ts +2 -0
  303. package/tsconfig.json +1 -1
  304. package/.next/cache/eslint/.cache_8dgz12 +0 -1
  305. package/.next/static/chunks/pages/_app-735105409cfdb48f.js +0 -1
  306. package/.next/static/chunks/pages/index-d492616d9bc42176.js +0 -1
  307. package/src/components/Keys/index.ts +0 -1
  308. package/tsconfig.jest.json +0 -7
  309. /package/.next/static/{3MlxnccTCLyz9bgD30zY2 → ylO_ttKeJTuoqDYywao5A}/_ssgManifest.js +0 -0
@@ -13,7 +13,7 @@ interface Props {
13
13
  onChange: ChangeEventHandler<HTMLInputElement>;
14
14
  }
15
15
 
16
- const Radio: FunctionComponent<Props> = ({ checked, children, className, disabled, name, value, onChange }) => (
16
+ export const Radio: FunctionComponent<Props> = ({ checked, children, className, disabled, name, value, onChange }) => (
17
17
  <label
18
18
  className={classNames(styles.radio, className, {
19
19
  [styles.checked]: checked,
@@ -37,5 +37,3 @@ const Radio: FunctionComponent<Props> = ({ checked, children, className, disable
37
37
  <div className={styles.content}>{children}</div>
38
38
  </label>
39
39
  );
40
-
41
- export default Radio;
@@ -1 +1 @@
1
- export { default } from './Radio';
1
+ export { Radio } from './Radio';
@@ -18,7 +18,15 @@ interface Props {
18
18
  value: string | number;
19
19
  }
20
20
 
21
- const Cell: FunctionComponent<Props> = ({ children, className, dataTestId, style, translationKey, tooltip, value }) => {
21
+ export const Cell: FunctionComponent<Props> = ({
22
+ children,
23
+ className,
24
+ dataTestId,
25
+ style,
26
+ translationKey,
27
+ tooltip,
28
+ value,
29
+ }) => {
22
30
  const translate = useTranslate();
23
31
  const locale = useTypedSelector(selectLocale);
24
32
  const formattedValue = value.toLocaleString(locale);
@@ -31,5 +39,3 @@ const Cell: FunctionComponent<Props> = ({ children, className, dataTestId, style
31
39
  </Tooltip>
32
40
  );
33
41
  };
34
-
35
- export default Cell;
@@ -5,10 +5,10 @@ import { GeoAlt, OneTwoThree, Square, SquareA, SquareB, Squares, Words } from 'i
5
5
  import { RESULTS_COLUMN_WIDTH } from 'parameters';
6
6
  import { ResultColumnId } from 'types';
7
7
 
8
- import HeaderButton from './HeaderButton';
8
+ import { HeaderButton } from './HeaderButton';
9
9
  import styles from './Results.module.scss';
10
10
 
11
- const Results: FunctionComponent = () => {
11
+ export const Header: FunctionComponent = () => {
12
12
  const { resultWordWidth } = useAppLayout();
13
13
  const columns = useColumns();
14
14
 
@@ -95,5 +95,3 @@ const Results: FunctionComponent = () => {
95
95
  </div>
96
96
  );
97
97
  };
98
-
99
- export default Results;
@@ -18,7 +18,7 @@ interface Props {
18
18
  style?: CSSProperties;
19
19
  }
20
20
 
21
- const HeaderButton = ({ className, Icon, id, translationKey, style }: Props): ReactElement => {
21
+ export const HeaderButton = ({ className, Icon, id, translationKey, style }: Props): ReactElement => {
22
22
  const dispatch = useDispatch();
23
23
  const translate = useTranslate();
24
24
  const sort = useTypedSelector(selectResultsSort);
@@ -52,5 +52,3 @@ const HeaderButton = ({ className, Icon, id, translationKey, style }: Props): Re
52
52
  </Tooltip>
53
53
  );
54
54
  };
55
-
56
- export default HeaderButton;
@@ -14,7 +14,7 @@ import {
14
14
  } from 'state';
15
15
  import { ResultColumnId } from 'types';
16
16
 
17
- import Cell from './Cell';
17
+ import { Cell } from './Cell';
18
18
  import styles from './Results.module.scss';
19
19
  import { ResultData } from './types';
20
20
 
@@ -24,7 +24,7 @@ interface Props {
24
24
  style?: CSSProperties;
25
25
  }
26
26
 
27
- const Result = ({ data, index, style }: Props): ReactElement => {
27
+ export const Result = ({ data, index, style }: Props): ReactElement => {
28
28
  const {
29
29
  highlightedIndex,
30
30
  results = [],
@@ -118,5 +118,3 @@ const Result = ({ data, index, style }: Props): ReactElement => {
118
118
  </button>
119
119
  );
120
120
  };
121
-
122
- export default Result;
@@ -16,14 +16,14 @@ import {
16
16
  useTypedSelector,
17
17
  } from 'state';
18
18
 
19
- import EmptyState from '../EmptyState';
20
- import Loading from '../Loading';
21
- import ResultsInput from '../ResultsInput';
19
+ import { EmptyState } from '../EmptyState';
20
+ import { Loading } from '../Loading';
21
+ import { ResultsInput } from '../ResultsInput';
22
22
 
23
- import Header from './Header';
24
- import Result from './Result';
23
+ import { Header } from './Header';
24
+ import { Result } from './Result';
25
25
  import styles from './Results.module.scss';
26
- import SolveButton from './SolveButton';
26
+ import { SolveButton } from './SolveButton';
27
27
  import { ResultCallbacks, ResultData } from './types';
28
28
 
29
29
  interface Props {
@@ -34,7 +34,7 @@ interface Props {
34
34
 
35
35
  const IS_LOADING_DEBOUNCE = 100;
36
36
 
37
- const Results: FunctionComponent<Props> = ({ callbacks, className, highlightedIndex }) => {
37
+ export const Results: FunctionComponent<Props> = ({ callbacks, className, highlightedIndex }) => {
38
38
  const translate = useTranslate();
39
39
  const { resultsHeight, resultsWidth } = useAppLayout();
40
40
  const locale = useTypedSelector(selectLocale);
@@ -130,5 +130,3 @@ const Results: FunctionComponent<Props> = ({ callbacks, className, highlightedIn
130
130
  </div>
131
131
  );
132
132
  };
133
-
134
- export default Results;
@@ -11,13 +11,13 @@ import {
11
11
  useTypedSelector,
12
12
  } from 'state';
13
13
 
14
- import Button from '../Button';
14
+ import { Button } from '../Button';
15
15
 
16
16
  interface Props {
17
17
  className?: string;
18
18
  }
19
19
 
20
- const SolveButton: FunctionComponent<Props> = ({ className }) => {
20
+ export const SolveButton: FunctionComponent<Props> = ({ className }) => {
21
21
  const dispatch = useDispatch();
22
22
  const translate = useTranslate();
23
23
  const isLoading = useTypedSelector(selectIsLoading);
@@ -43,5 +43,3 @@ const SolveButton: FunctionComponent<Props> = ({ className }) => {
43
43
  </Button>
44
44
  );
45
45
  };
46
-
47
- export default SolveButton;
@@ -1 +1 @@
1
- export { default } from './Results';
1
+ export { Results } from './Results';
@@ -11,7 +11,7 @@ interface Props {
11
11
  className?: string;
12
12
  }
13
13
 
14
- const ResultsInput: FunctionComponent<Props> = ({ className }) => {
14
+ export const ResultsInput: FunctionComponent<Props> = ({ className }) => {
15
15
  const dispatch = useDispatch();
16
16
  const translate = useTranslate();
17
17
  const value = useTypedSelector(selectResultsQuery);
@@ -43,5 +43,3 @@ const ResultsInput: FunctionComponent<Props> = ({ className }) => {
43
43
  </form>
44
44
  );
45
45
  };
46
-
47
- export default ResultsInput;
@@ -1 +1 @@
1
- export { default } from './ResultsInput';
1
+ export { ResultsInput } from './ResultsInput';
@@ -8,12 +8,10 @@ const INVISIBLE_STYLE: CSSProperties = {
8
8
  transform: 'translateY(-9999px)',
9
9
  };
10
10
 
11
- const SeoMessage: FunctionComponent = () => (
11
+ export const SeoMessage: FunctionComponent = () => (
12
12
  <p style={INVISIBLE_STYLE}>
13
- Scrabble Solver 2 is a free and open-source analysis tool for Scrabble, Super Scrabble &amp; Literaki. Quickly find
14
- top scoring words using given letters and board state. Available in English, French, German, Polish & Spanish.
15
- Source code is available on GitHub - contributions are welcome!
13
+ Scrabble Solver 2 is a free and open-source analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Literaki, and
14
+ Kelimelik. Quickly find top scoring words using given letters and board state. Available in English, French, German,
15
+ Persian, Polish, Romanian, Spanish, and Turkish. Source code is available on GitHub - contributions are welcome!
16
16
  </p>
17
17
  );
18
-
19
- export default SeoMessage;
@@ -1 +1 @@
1
- export { default } from './SeoMessage';
1
+ export { SeoMessage } from './SeoMessage';
@@ -15,12 +15,12 @@ import {
15
15
  useTypedSelector,
16
16
  } from 'state';
17
17
 
18
- import Alert from '../Alert';
19
- import Board from '../Board';
20
- import Dictionary from '../Dictionary';
21
- import DictionaryInput from '../DictionaryInput';
22
- import Rack from '../Rack';
23
- import Results from '../Results';
18
+ import { Alert } from '../Alert';
19
+ import { Board } from '../Board';
20
+ import { Dictionary } from '../Dictionary';
21
+ import { DictionaryInput } from '../DictionaryInput';
22
+ import { Rack } from '../Rack';
23
+ import { Results } from '../Results';
24
24
 
25
25
  import { ResultCandidatePicker } from './components';
26
26
  import styles from './Solver.module.scss';
@@ -30,7 +30,7 @@ interface Props {
30
30
  onShowResults: () => void;
31
31
  }
32
32
 
33
- const Solver: FunctionComponent<Props> = ({ className, onShowResults }) => {
33
+ const SolverBase: FunctionComponent<Props> = ({ className, onShowResults }) => {
34
34
  const dispatch = useDispatch();
35
35
  const translate = useTranslate();
36
36
  const isTouchDevice = useIsTouchDevice();
@@ -138,4 +138,4 @@ const Solver: FunctionComponent<Props> = ({ className, onShowResults }) => {
138
138
  );
139
139
  };
140
140
 
141
- export default memo(Solver);
141
+ export const Solver = memo(SolverBase);
@@ -5,7 +5,7 @@ import { useDispatch } from 'react-redux';
5
5
  import { Check } from 'icons';
6
6
  import { resultsSlice, selectAreResultsOutdated, selectResultCandidate, useTranslate, useTypedSelector } from 'state';
7
7
 
8
- import Button from '../../../Button';
8
+ import { Button } from '../../../Button';
9
9
 
10
10
  import styles from './InsertButton.module.scss';
11
11
 
@@ -13,7 +13,7 @@ interface Props {
13
13
  className?: string;
14
14
  }
15
15
 
16
- const InsertButton: FunctionComponent<Props> = ({ className }) => {
16
+ export const InsertButton: FunctionComponent<Props> = ({ className }) => {
17
17
  const dispatch = useDispatch();
18
18
  const translate = useTranslate();
19
19
  const resultCandidate = useTypedSelector(selectResultCandidate);
@@ -38,5 +38,3 @@ const InsertButton: FunctionComponent<Props> = ({ className }) => {
38
38
  />
39
39
  );
40
40
  };
41
-
42
- export default InsertButton;
@@ -1 +1 @@
1
- export { default } from './InsertButton';
1
+ export { InsertButton } from './InsertButton';
@@ -14,9 +14,9 @@ import {
14
14
  useTypedSelector,
15
15
  } from 'state';
16
16
 
17
- import Button from '../../../Button';
18
- import Spinner from '../../../Spinner';
19
- import InsertButton from '../InsertButton';
17
+ import { Button } from '../../../Button';
18
+ import { Spinner } from '../../../Spinner';
19
+ import { InsertButton } from '../InsertButton';
20
20
 
21
21
  import styles from './ResultCandidatePicker.module.scss';
22
22
 
@@ -24,7 +24,7 @@ interface Props extends HTMLProps<HTMLDivElement> {
24
24
  onResultClick: MouseEventHandler<HTMLButtonElement>;
25
25
  }
26
26
 
27
- const ResultCandidatePicker: FunctionComponent<Props> = ({ className, onResultClick, ...props }) => {
27
+ export const ResultCandidatePicker: FunctionComponent<Props> = ({ className, onResultClick, ...props }) => {
28
28
  const dispatch = useDispatch();
29
29
  const translate = useTranslate();
30
30
  const locale = useTypedSelector(selectLocale);
@@ -98,5 +98,3 @@ const ResultCandidatePicker: FunctionComponent<Props> = ({ className, onResultCl
98
98
  </div>
99
99
  );
100
100
  };
101
-
102
- export default ResultCandidatePicker;
@@ -1 +1 @@
1
- export { default } from './ResultCandidatePicker';
1
+ export { ResultCandidatePicker } from './ResultCandidatePicker';
@@ -1,2 +1,2 @@
1
- export { default as InsertButton } from './InsertButton';
2
- export { default as ResultCandidatePicker } from './ResultCandidatePicker';
1
+ export { InsertButton } from './InsertButton';
2
+ export { ResultCandidatePicker } from './ResultCandidatePicker';
@@ -1 +1 @@
1
- export { default } from './Solver';
1
+ export { Solver } from './Solver';
@@ -9,11 +9,9 @@ interface Props {
9
9
  className?: string;
10
10
  }
11
11
 
12
- const Spinner: FunctionComponent<Props> = ({ className }) => {
12
+ export const Spinner: FunctionComponent<Props> = ({ className }) => {
13
13
  const translate = useTranslate();
14
14
  const translation = translate('common.loading');
15
15
 
16
16
  return <div aria-label={translation} className={classNames(styles.spinner, className)} role="status" />;
17
17
  };
18
-
19
- export default Spinner;
@@ -1 +1 @@
1
- export { default } from './Spinner';
1
+ export { Spinner } from './Spinner';
@@ -17,7 +17,7 @@ import { useAppLayout } from 'hooks';
17
17
  import { getTileSizes, noop } from 'lib';
18
18
  import { selectLocale, useTypedSelector } from 'state';
19
19
 
20
- import TilePure from './TilePure';
20
+ import { TilePure } from './TilePure';
21
21
 
22
22
  interface Props {
23
23
  'aria-label': string;
@@ -41,7 +41,7 @@ interface Props {
41
41
  onTouchStart?: TouchEventHandler<HTMLInputElement>;
42
42
  }
43
43
 
44
- const Tile: FunctionComponent<Props> = ({
44
+ export const Tile: FunctionComponent<Props> = ({
45
45
  'aria-label': ariaLabel,
46
46
  autoFocus,
47
47
  className,
@@ -108,5 +108,3 @@ const Tile: FunctionComponent<Props> = ({
108
108
  />
109
109
  );
110
110
  };
111
-
112
- export default Tile;
@@ -40,7 +40,7 @@ interface Props {
40
40
  onTouchStart?: TouchEventHandler<HTMLInputElement>;
41
41
  }
42
42
 
43
- const TilePure: FunctionComponent<Props> = ({
43
+ const TilePureBase: FunctionComponent<Props> = ({
44
44
  'aria-label': ariaLabel,
45
45
  autoFocus,
46
46
  canShowPoints,
@@ -111,4 +111,4 @@ const TilePure: FunctionComponent<Props> = ({
111
111
  </div>
112
112
  );
113
113
 
114
- export default memo(TilePure);
114
+ export const TilePure = memo(TilePureBase);
@@ -1 +1 @@
1
- export { default } from './Tile';
1
+ export { Tile } from './Tile';
@@ -1,6 +1,6 @@
1
1
  import { useMergeRefs } from '@floating-ui/react';
2
2
  import { isObject } from '@scrabble-solver/types';
3
- import { HTMLProps, cloneElement, forwardRef, isValidElement } from 'react';
3
+ import { HTMLProps, ReactElement, RefObject, cloneElement, forwardRef, isValidElement } from 'react';
4
4
 
5
5
  import { useTooltipContext } from './context';
6
6
 
@@ -8,8 +8,10 @@ type Props = HTMLProps<HTMLElement>;
8
8
 
9
9
  export const TooltipTrigger = forwardRef<HTMLElement, Props>(({ children, ...props }, ref) => {
10
10
  const state = useTooltipContext();
11
- const childrenElement = children as any; // eslint-disable-line @typescript-eslint/no-explicit-any
12
- const finalRef = useMergeRefs([state.refs.setReference, ref, childrenElement.ref]);
11
+ const childrenElement = children as ReactElement<{
12
+ ref: RefObject<HTMLElement>;
13
+ }>;
14
+ const finalRef = useMergeRefs([state.refs.setReference, ref, childrenElement.props.ref]);
13
15
 
14
16
  if (!isValidElement(children)) {
15
17
  throw new Error("TooltipTrigger's children are not a valid element");
@@ -1,27 +1,26 @@
1
- export { default as Alert } from './Alert';
2
- export { default as Badge } from './Badge';
3
- export { default as Board } from './Board';
4
- export { default as Button } from './Button';
5
- export { default as Dictionary } from './Dictionary';
6
- export { default as DictionaryInput } from './DictionaryInput';
7
- export { default as EmptyState } from './EmptyState';
8
- export { default as IconButton } from './IconButton';
9
- export { default as Key } from './Key';
10
- export { default as Loading } from './Loading';
11
- export { default as Logo } from './Logo';
12
- export { default as Modal } from './Modal';
13
- export { default as NavButtons } from './NavButtons';
14
- export { default as NotFound } from './NotFound';
15
- export { default as PlainTiles } from './PlainTiles';
16
- export { default as Progress } from './Progress';
17
- export { default as Rack } from './Rack';
18
- export { default as Radio } from './Radio';
19
- export { default as Results } from './Results';
20
- export { default as ResultsInput } from './ResultsInput';
21
- export { default as SeoMessage } from './SeoMessage';
22
- export { default as Solver } from './Solver';
23
- export { default as Spinner } from './Spinner';
24
- export { default as Tile } from './Tile';
25
- export * from './keys';
1
+ export { Alert } from './Alert';
2
+ export { Badge } from './Badge';
3
+ export { Board } from './Board';
4
+ export { Button } from './Button';
5
+ export { Dictionary } from './Dictionary';
6
+ export { DictionaryInput } from './DictionaryInput';
7
+ export { EmptyState } from './EmptyState';
8
+ export { IconButton } from './IconButton';
9
+ export { Key } from './Key';
10
+ export { Loading } from './Loading';
11
+ export { Logo } from './Logo';
12
+ export { Modal } from './Modal';
13
+ export { NavButtons } from './NavButtons';
14
+ export { NotFound } from './NotFound';
15
+ export { PlainTiles } from './PlainTiles';
16
+ export { Progress } from './Progress';
17
+ export { Rack } from './Rack';
18
+ export { Radio } from './Radio';
19
+ export { Results } from './Results';
20
+ export { ResultsInput } from './ResultsInput';
21
+ export { SeoMessage } from './SeoMessage';
22
+ export { Solver } from './Solver';
23
+ export { Spinner } from './Spinner';
24
+ export { Tile } from './Tile';
26
25
  export * from './Keys';
27
26
  export * from './Tooltip';
@@ -1,13 +1,13 @@
1
- export { default as useAppLayout } from './useAppLayout';
2
- export { default as useColumns } from './useColumns';
3
- export { default as useDirection } from './useDirection';
4
- export { default as useEffectOnce } from './useEffectOnce';
5
- export { default as useIsTouchDevice } from './useIsTouchDevice';
6
- export { default as useLanguage } from './useLanguage';
7
- export { default as useLatest } from './useLatest';
8
- export { default as useLocalStorage } from './useLocalStorage';
9
- export { default as useMedia } from './useMedia';
10
- export { default as useMediaQueries } from './useMediaQueries';
11
- export { default as useMediaQuery } from './useMediaQuery';
12
- export { default as useOnWindowResize } from './useOnWindowResize';
13
- export { default as useViewportSize } from './useViewportSize';
1
+ export { useAppLayout } from './useAppLayout';
2
+ export { useColumns } from './useColumns';
3
+ export { useDirection } from './useDirection';
4
+ export { useEffectOnce } from './useEffectOnce';
5
+ export { useIsTouchDevice } from './useIsTouchDevice';
6
+ export { useLanguage } from './useLanguage';
7
+ export { useLatest } from './useLatest';
8
+ export { useLocalStorage } from './useLocalStorage';
9
+ export { useMedia } from './useMedia';
10
+ export { useMediaQueries } from './useMediaQueries';
11
+ export { useMediaQuery } from './useMediaQuery';
12
+ export { useOnWindowResize } from './useOnWindowResize';
13
+ export { useViewportSize } from './useViewportSize';
@@ -22,12 +22,12 @@ import {
22
22
  import { selectConfig, selectShowCoordinates, useTypedSelector } from 'state';
23
23
  import { ResultColumnId } from 'types';
24
24
 
25
- import useColumns from './useColumns';
26
- import useIsTouchDevice from './useIsTouchDevice';
27
- import useMediaQueries from './useMediaQueries';
28
- import useViewportSize from './useViewportSize';
25
+ import { useColumns } from './useColumns';
26
+ import { useIsTouchDevice } from './useIsTouchDevice';
27
+ import { useMediaQueries } from './useMediaQueries';
28
+ import { useViewportSize } from './useViewportSize';
29
29
 
30
- const useAppLayout = () => {
30
+ export const useAppLayout = () => {
31
31
  const { viewportHeight, viewportWidth } = useViewportSize();
32
32
  const config = useTypedSelector(selectConfig);
33
33
  const showCoordinates = useTypedSelector(selectShowCoordinates);
@@ -54,17 +54,22 @@ const useAppLayout = () => {
54
54
  const coordinatesSizeRatio = showCoordinates === 'hidden' ? 0 : 0.5;
55
55
  const coordinatesBorderWidth = showCoordinates === 'hidden' ? 0 : 1;
56
56
  const cellWidth =
57
- (maxBoardWidth - (config.boardSize + 1 + coordinatesBorderWidth) * BORDER_WIDTH) /
58
- (config.boardSize + coordinatesSizeRatio);
57
+ (maxBoardWidth - (config.boardWidth + 1 + coordinatesBorderWidth) * BORDER_WIDTH) /
58
+ (config.boardWidth + coordinatesSizeRatio);
59
59
  const cellHeight =
60
- (maxBoardHeight - (config.boardSize + 1 + coordinatesBorderWidth) * BORDER_WIDTH) /
61
- (config.boardSize + coordinatesSizeRatio);
60
+ (maxBoardHeight - (config.boardHeight + 1 + coordinatesBorderWidth) * BORDER_WIDTH) /
61
+ (config.boardHeight + coordinatesSizeRatio);
62
62
  const cellSize = Math.min(Math.min(cellWidth, cellHeight), BOARD_TILE_SIZE_MAX);
63
63
  const coordinatesSize = coordinatesSizeRatio * cellSize;
64
- const boardSize =
65
- (cellSize + BORDER_WIDTH) * config.boardSize +
64
+ const boardWidth =
65
+ (cellSize + BORDER_WIDTH) * config.boardWidth +
66
66
  BORDER_WIDTH +
67
67
  (showCoordinates === 'hidden' ? 0 : coordinatesSize + BORDER_WIDTH);
68
+ const boardHeight =
69
+ (cellSize + BORDER_WIDTH) * config.boardHeight +
70
+ BORDER_WIDTH +
71
+ (showCoordinates === 'hidden' ? 0 : coordinatesSize + BORDER_WIDTH);
72
+
68
73
  const maxControlsWidth = tileSize * config.rackSize + 2 * BORDER_WIDTH;
69
74
  const showResultsInModal = isLessThanL;
70
75
  const dictionaryHeight = showResultsInModal ? DICTIONARY_HEIGHT_MOBILE : DICTIONARY_HEIGHT;
@@ -72,7 +77,7 @@ const useAppLayout = () => {
72
77
  const modalWidth = isLessThanS ? viewportWidth : MODAL_WIDTH;
73
78
  const resultsHeight = isLessThanL
74
79
  ? viewportHeight - dictionaryHeight - BUTTON_HEIGHT - MODAL_HEADER_HEIGHT - 5 * componentsSpacing
75
- : boardSize - componentsSpacing - dictionaryHeight;
80
+ : boardHeight - componentsSpacing - dictionaryHeight;
76
81
  const rackWidth = tileSize * config.rackSize;
77
82
  const resultsWidth = isLessThanL ? modalWidth - 2 * componentsSpacing : SOLVER_COLUMN_WIDTH;
78
83
  const columnsWidth = Object.keys(columns).reduce(
@@ -83,7 +88,8 @@ const useAppLayout = () => {
83
88
 
84
89
  return {
85
90
  actionsWidth: 2 * BUTTON_HEIGHT - BORDER_WIDTH,
86
- boardSize,
91
+ boardHeight,
92
+ boardWidth,
87
93
  cellSize,
88
94
  coordinatesFontSize: coordinatesSize * 0.6,
89
95
  coordinatesSize,
@@ -106,5 +112,3 @@ const useAppLayout = () => {
106
112
  tileSize,
107
113
  };
108
114
  };
109
-
110
- export default useAppLayout;
@@ -3,7 +3,7 @@ import { useMemo } from 'react';
3
3
  import { selectColumns, useTypedSelector } from 'state';
4
4
  import { ResultColumnId } from 'types';
5
5
 
6
- import useMediaQueries from './useMediaQueries';
6
+ import { useMediaQueries } from './useMediaQueries';
7
7
 
8
8
  const COLUMNS_XS = [ResultColumnId.Coordinates, ResultColumnId.Word, ResultColumnId.Points];
9
9
 
@@ -13,7 +13,7 @@ const COLUMNS_M = [...COLUMNS_XS];
13
13
 
14
14
  const COLUMNS_L = [...COLUMNS_XS];
15
15
 
16
- const useColumns = (): Partial<Record<ResultColumnId, boolean>> => {
16
+ export const useColumns = (): Partial<Record<ResultColumnId, boolean>> => {
17
17
  const columns = useTypedSelector(selectColumns);
18
18
  const { isLessThanXs, isLessThanS, isLessThanM, isLessThanL } = useMediaQueries();
19
19
 
@@ -43,5 +43,3 @@ const useColumns = (): Partial<Record<ResultColumnId, boolean>> => {
43
43
 
44
44
  return columnsMap;
45
45
  };
46
-
47
- export default useColumns;
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
2
2
 
3
3
  import { noop } from 'lib';
4
4
 
5
- const useDirection = (direction: 'ltr' | 'rtl') => {
5
+ export const useDirection = (direction: 'ltr' | 'rtl') => {
6
6
  useEffect(() => {
7
7
  const html = document.body.parentElement;
8
8
 
@@ -18,5 +18,3 @@ const useDirection = (direction: 'ltr' | 'rtl') => {
18
18
  };
19
19
  }, [direction]);
20
20
  };
21
-
22
- export default useDirection;
@@ -1,13 +1,11 @@
1
1
  import { EffectCallback, useEffect } from 'react';
2
2
 
3
- import useLatest from './useLatest';
3
+ import { useLatest } from './useLatest';
4
4
 
5
- const useEffectOnce = (effect: EffectCallback) => {
5
+ export const useEffectOnce = (effect: EffectCallback) => {
6
6
  const effectRef = useLatest(effect);
7
7
 
8
8
  return useEffect(() => {
9
9
  effectRef.current();
10
10
  }, [effectRef]);
11
11
  };
12
-
13
- export default useEffectOnce;
@@ -1,7 +1,5 @@
1
- import useMedia from './useMedia';
1
+ import { useMedia } from './useMedia';
2
2
 
3
- const useIsTouchDevice = () => {
3
+ export const useIsTouchDevice = () => {
4
4
  return useMedia('(hover: none)', false);
5
5
  };
6
-
7
- export default useIsTouchDevice;
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
2
2
 
3
3
  import { noop } from 'lib';
4
4
 
5
- const useLanguage = (language: string) => {
5
+ export const useLanguage = (language: string) => {
6
6
  useEffect(() => {
7
7
  const html = document.body.parentElement;
8
8
 
@@ -18,5 +18,3 @@ const useLanguage = (language: string) => {
18
18
  };
19
19
  }, [language]);
20
20
  };
21
-
22
- export default useLanguage;
@@ -4,10 +4,8 @@ interface Latest<T> {
4
4
  readonly current: T;
5
5
  }
6
6
 
7
- const useLatest = <T>(value: T): Latest<T> => {
7
+ export const useLatest = <T>(value: T): Latest<T> => {
8
8
  const ref = useRef(value);
9
9
  ref.current = value;
10
10
  return ref;
11
11
  };
12
-
13
- export default useLatest;