scrabble-solver 2.15.13 → 2.15.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/.nx/workspace-data/file-map.json +443 -443
  2. package/.nx/workspace-data/lockfile.hash +1 -1
  3. package/.nx/workspace-data/nx_files.nxt +0 -0
  4. package/.nx/workspace-data/parsed-lock-file.json +1012 -723
  5. package/.nx/workspace-data/project-graph.json +924 -748
  6. package/lerna.json +1 -1
  7. package/package.json +22 -22
  8. package/packages/configs/package.json +3 -3
  9. package/packages/constants/package.json +1 -1
  10. package/packages/dictionaries/package.json +4 -4
  11. package/packages/logger/package.json +1 -1
  12. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  13. package/packages/scrabble-solver/.next/build-manifest.json +15 -15
  14. package/packages/scrabble-solver/.next/cache/.previewinfo +1 -1
  15. package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
  16. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  17. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  18. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  19. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
  20. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
  21. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  22. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  23. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  24. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  25. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
  26. package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
  27. package/packages/scrabble-solver/.next/next-minimal-server.js.nft.json +1 -1
  28. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  29. package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
  30. package/packages/scrabble-solver/.next/required-server-files.json +10 -11
  31. package/packages/scrabble-solver/.next/routes-manifest.json +5 -5
  32. package/packages/scrabble-solver/.next/server/chunks/30.js +3 -3
  33. package/packages/scrabble-solver/.next/server/chunks/318.js +1 -1
  34. package/packages/scrabble-solver/.next/server/chunks/717.js +1 -0
  35. package/packages/scrabble-solver/.next/server/chunks/791.js +19 -0
  36. package/packages/scrabble-solver/.next/server/chunks/829.js +1 -0
  37. package/packages/scrabble-solver/.next/server/chunks/929.js +1 -1
  38. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  39. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  40. package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
  41. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  42. package/packages/scrabble-solver/.next/server/pages/_app.js +1 -1
  43. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  44. package/packages/scrabble-solver/.next/server/pages/_document.js +1 -1
  45. package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
  46. package/packages/scrabble-solver/.next/server/pages/_error.js +1 -1
  47. package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
  48. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +2 -2
  49. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  50. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +1 -1
  51. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  52. package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
  53. package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
  54. package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -1
  55. package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
  56. package/packages/scrabble-solver/.next/server/pages/api/visit.js +1 -1
  57. package/packages/scrabble-solver/.next/server/pages/api/visit.js.nft.json +1 -1
  58. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  59. package/packages/scrabble-solver/.next/server/pages/index.js +1 -1
  60. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  61. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  62. package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -1
  63. package/packages/scrabble-solver/.next/static/{MhrqAqLI9_L8obb7tgjvi → UHBG2hxudxuZNMubluQ6A}/_buildManifest.js +1 -1
  64. package/packages/scrabble-solver/.next/static/chunks/framework-e4d8bdda7b6c00b3.js +1 -0
  65. package/packages/scrabble-solver/.next/static/chunks/main-40732898df2b5947.js +1 -0
  66. package/packages/scrabble-solver/.next/static/chunks/pages/404-3ab23f01145bda71.js +1 -0
  67. package/packages/scrabble-solver/.next/static/chunks/pages/_app-ca98ddb1c33cb8b1.js +1 -0
  68. package/packages/scrabble-solver/.next/static/chunks/pages/{_error-a9800cedd835bcad.js → _error-e7f663d1e0f43380.js} +1 -1
  69. package/packages/scrabble-solver/.next/static/chunks/pages/index-5c4af5351329bef5.js +1 -0
  70. package/packages/scrabble-solver/.next/static/css/d611d31bf52b6e25.css +2 -0
  71. package/packages/scrabble-solver/.next/trace +24 -24
  72. package/packages/scrabble-solver/.next/types/routes.d.ts +57 -0
  73. package/packages/scrabble-solver/.next/types/validator.ts +107 -0
  74. package/packages/scrabble-solver/next-env.d.ts +1 -0
  75. package/packages/scrabble-solver/package.json +20 -20
  76. package/packages/scrabble-solver/public/service-worker.js +1 -1
  77. package/packages/scrabble-solver/src/components/Results/Result.tsx +13 -17
  78. package/packages/scrabble-solver/src/components/Results/Results.tsx +23 -24
  79. package/packages/solver/package.json +5 -5
  80. package/packages/types/package.json +2 -2
  81. package/packages/word-definitions/build/languages/romanian.js +1 -1
  82. package/packages/word-definitions/package.json +4 -4
  83. package/packages/word-definitions/src/__tests__/input/ro-RO.aciua.html +27 -29
  84. package/packages/word-definitions/src/languages/romanian.ts +1 -1
  85. package/packages/word-lists/package.json +4 -4
  86. package/packages/scrabble-solver/.next/server/chunks/106.js +0 -1
  87. package/packages/scrabble-solver/.next/server/chunks/50.js +0 -19
  88. package/packages/scrabble-solver/.next/server/chunks/974.js +0 -1
  89. package/packages/scrabble-solver/.next/static/chunks/framework-aad31c68dd0bb0ea.js +0 -1
  90. package/packages/scrabble-solver/.next/static/chunks/main-eab5847b41f0af4a.js +0 -1
  91. package/packages/scrabble-solver/.next/static/chunks/pages/404-04457ede98c6b53e.js +0 -1
  92. package/packages/scrabble-solver/.next/static/chunks/pages/_app-bf81f201c021fdc1.js +0 -1
  93. package/packages/scrabble-solver/.next/static/chunks/pages/index-79a390f3c2a2499f.js +0 -1
  94. package/packages/scrabble-solver/.next/static/css/1fae874a25934f54.css +0 -2
  95. /package/packages/scrabble-solver/.next/static/{MhrqAqLI9_L8obb7tgjvi → UHBG2hxudxuZNMubluQ6A}/_ssgManifest.js +0 -0
@@ -1,17 +1,17 @@
1
1
  import classNames from 'classnames';
2
- import { type FunctionComponent, useEffect, useMemo, useState } from 'react';
3
- import { FixedSizeList } from 'react-window';
2
+ import { useEffect, useMemo, type FunctionComponent } from 'react';
3
+ import { List, useListRef } from 'react-window';
4
4
  import { useDebounce } from 'use-debounce';
5
5
 
6
- import { useAppLayout, useLatest } from 'hooks';
6
+ import { useLatest } from 'hooks';
7
7
  import { LOCALE_FEATURES } from 'i18n';
8
- import { BORDER_WIDTH, RESULTS_HEADER_HEIGHT, RESULTS_ITEM_HEIGHT, TEXT_INPUT_HEIGHT } from 'parameters';
8
+ import { RESULTS_ITEM_HEIGHT } from 'parameters';
9
9
  import {
10
10
  selectAreResultsOutdated,
11
- selectSolveIsLoading,
12
11
  selectLocale,
13
12
  selectProcessedResults,
14
13
  selectSolveError,
14
+ selectSolveIsLoading,
15
15
  useTranslate,
16
16
  useTypedSelector,
17
17
  } from 'state';
@@ -36,7 +36,6 @@ const IS_LOADING_DEBOUNCE = 100;
36
36
 
37
37
  export const Results: FunctionComponent<Props> = ({ callbacks, className, highlightedIndex }) => {
38
38
  const translate = useTranslate();
39
- const { resultsHeight, resultsWidth } = useAppLayout();
40
39
  const locale = useTypedSelector(selectLocale);
41
40
  const { direction } = LOCALE_FEATURES[locale];
42
41
  const results = useTypedSelector(selectProcessedResults);
@@ -44,22 +43,25 @@ export const Results: FunctionComponent<Props> = ({ callbacks, className, highli
44
43
  const [isLoadingDebounced] = useDebounce(isLoading, IS_LOADING_DEBOUNCE);
45
44
  const isOutdated = useTypedSelector(selectAreResultsOutdated);
46
45
  const error = useTypedSelector(selectSolveError);
47
- const itemData = useMemo(() => ({ ...callbacks, highlightedIndex, results }), [callbacks, highlightedIndex, results]);
48
- const [listRef, setListRef] = useState<FixedSizeList<ResultData> | null>(null);
46
+ const itemData = useMemo<ResultData>(
47
+ () => ({ ...callbacks, highlightedIndex, results }),
48
+ [callbacks, highlightedIndex, results],
49
+ );
50
+ const listRef = useListRef(null);
49
51
  const scrollToIndex = typeof highlightedIndex === 'number' ? highlightedIndex : 0;
50
52
  const scrollToIndexRef = useLatest(scrollToIndex);
51
53
  const hasResults = typeof error === 'undefined' && typeof results !== 'undefined';
52
54
  const showInput = hasResults && results.length > 0 && !isOutdated;
53
- const height = resultsHeight - RESULTS_HEADER_HEIGHT - (showInput ? TEXT_INPUT_HEIGHT : 0) - 2 * BORDER_WIDTH;
54
- const width = resultsWidth - 2 * BORDER_WIDTH;
55
55
 
56
56
  useEffect(() => {
57
57
  // without setTimeout, the initial scrolling offset is calculated
58
58
  // incorrectly, as the list is not fully rendered by the browser yet
59
59
  const timeout = globalThis.setTimeout(() => {
60
- if (listRef) {
61
- listRef.scrollToItem(scrollToIndexRef.current, 'center');
62
- }
60
+ listRef.current?.scrollToRow({
61
+ align: 'center',
62
+ behavior: 'instant',
63
+ index: scrollToIndexRef.current,
64
+ });
63
65
  }, 0);
64
66
 
65
67
  return () => {
@@ -104,20 +106,17 @@ export const Results: FunctionComponent<Props> = ({ callbacks, className, highli
104
106
 
105
107
  {!isOutdated && results.length > 0 && (
106
108
  <div className={styles.listContainer}>
107
- <FixedSizeList
109
+ <List
108
110
  className={classNames(styles.list, {
109
111
  [styles.outdated]: isOutdated,
110
112
  })}
111
- direction={direction}
112
- height={height}
113
- itemCount={results.length}
114
- itemData={itemData}
115
- itemSize={RESULTS_ITEM_HEIGHT}
116
- ref={setListRef}
117
- width={width}
118
- >
119
- {Result}
120
- </FixedSizeList>
113
+ dir={direction}
114
+ listRef={listRef}
115
+ rowComponent={Result}
116
+ rowCount={results.length}
117
+ rowHeight={RESULTS_ITEM_HEIGHT}
118
+ rowProps={itemData}
119
+ />
121
120
  </div>
122
121
  )}
123
122
  </>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/solver",
3
- "version": "2.15.13",
3
+ "version": "2.15.14",
4
4
  "description": "Scrabble Solver 2 - Solver",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@kamilmielnik/trie": "^4.0.0",
27
- "@scrabble-solver/types": "^2.15.13"
27
+ "@scrabble-solver/types": "^2.15.14"
28
28
  },
29
29
  "devDependencies": {
30
- "@scrabble-solver/configs": "^2.15.13",
31
- "@scrabble-solver/constants": "^2.15.13",
32
- "@scrabble-solver/dictionaries": "^2.15.13"
30
+ "@scrabble-solver/configs": "^2.15.14",
31
+ "@scrabble-solver/constants": "^2.15.14",
32
+ "@scrabble-solver/dictionaries": "^2.15.14"
33
33
  },
34
34
  "gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
35
35
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/types",
3
- "version": "2.15.13",
3
+ "version": "2.15.14",
4
4
  "description": "Scrabble Solver 2 - Types",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "clean": "rimraf build/"
24
24
  },
25
25
  "dependencies": {
26
- "@scrabble-solver/constants": "^2.15.13"
26
+ "@scrabble-solver/constants": "^2.15.14"
27
27
  },
28
28
  "gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
29
29
  }
@@ -15,7 +15,7 @@ const parse = (html) => {
15
15
  const $ = (0, cheerio_1.load)(html);
16
16
  const $activeTab = $('.tab-pane.show.active');
17
17
  $('.type-example').remove();
18
- const $definitions = $activeTab.find('li.type-meaning.depth-0 > .meaningContainer .def.html');
18
+ const $definitions = $activeTab.find('li.type-meaning.depth-0 > .meaningContainer .tree-def.html');
19
19
  $definitions.find('.meaningTree').remove();
20
20
  const definitions = Array.from($definitions).map((definition) => $(definition).text().replace(/\n/g, ''));
21
21
  return {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/word-definitions",
3
- "version": "2.15.13",
3
+ "version": "2.15.14",
4
4
  "description": "Scrabble Solver 2 - Word definitions",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,9 +23,9 @@
23
23
  "clean": "rimraf build/"
24
24
  },
25
25
  "dependencies": {
26
- "@scrabble-solver/types": "^2.15.13",
27
- "cheerio": "^1.1.0",
28
- "follow-redirects": "^1.15.9",
26
+ "@scrabble-solver/types": "^2.15.14",
27
+ "cheerio": "^1.1.2",
28
+ "follow-redirects": "^1.15.11",
29
29
  "striptags": "^3.2.0"
30
30
  },
31
31
  "devDependencies": {