@scrabble-solver/scrabble-solver 2.10.3 → 2.10.4

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 (188) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +13 -13
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_8dgz12 +1 -1
  5. package/.next/cache/next-server.js.nft.json +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/edge-server-production/0.pack +0 -0
  9. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  10. package/.next/cache/webpack/server-production/0.pack +0 -0
  11. package/.next/cache/webpack/server-production/index.pack +0 -0
  12. package/.next/next-server.js.nft.json +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/176.js +1269 -1559
  16. package/.next/server/chunks/579.js +50 -26
  17. package/.next/server/middleware-build-manifest.js +1 -1
  18. package/.next/server/pages/404.html +2 -2
  19. package/.next/server/pages/404.js.nft.json +1 -1
  20. package/.next/server/pages/500.html +2 -2
  21. package/.next/server/pages/_app.js.nft.json +1 -1
  22. package/.next/server/pages/api/solve.js +22 -6
  23. package/.next/server/pages/index.html +2 -2
  24. package/.next/server/pages/index.js +1539 -52
  25. package/.next/server/pages/index.js.nft.json +1 -1
  26. package/.next/server/pages/index.json +1 -1
  27. package/.next/server/pages-manifest.json +3 -3
  28. package/.next/static/P7XhuDLmwJJqC8kgPjX42/_buildManifest.js +1 -0
  29. package/.next/static/{FJkPF91uL-OCAJKTTpVSP → P7XhuDLmwJJqC8kgPjX42}/_ssgManifest.js +0 -0
  30. package/.next/static/chunks/490-d29992f1c264d70e.js +5 -0
  31. package/.next/static/chunks/528-9942ddad0031ff79.js +1 -0
  32. package/.next/static/chunks/pages/{404-24f9617eeb8d6dc1.js → 404-6c99a0c91257c60b.js} +1 -1
  33. package/.next/static/chunks/pages/_app-fa0661b072fc6af9.js +24 -0
  34. package/.next/static/chunks/pages/index-d761f0af070273d2.js +1 -0
  35. package/.next/static/css/78e42ad01f580f64.css +1 -0
  36. package/.next/static/css/97eb6ee0c4300c83.css +1 -0
  37. package/.next/static/css/dcca0c1a39cf5ef5.css +1 -0
  38. package/.next/trace +55 -52
  39. package/package.json +11 -9
  40. package/src/components/Badge/Badge.module.scss +4 -5
  41. package/src/components/Board/BoardPure.tsx +5 -5
  42. package/src/components/Button/Button.module.scss +10 -38
  43. package/src/components/Button/Button.tsx +6 -5
  44. package/src/components/Dictionary/Dictionary.module.scss +1 -2
  45. package/src/components/Dictionary/Dictionary.tsx +2 -6
  46. package/src/components/DictionaryInput/DictionaryInput.module.scss +1 -3
  47. package/src/components/EmptyState/EmptyState.module.scss +6 -7
  48. package/src/components/EmptyState/EmptyState.tsx +6 -6
  49. package/src/components/Key/Key.module.scss +0 -1
  50. package/src/components/{Splash/Splash.module.scss → LogoSplashScreen/LogoSplashScreen.module.scss} +1 -1
  51. package/src/components/{Splash/Splash.tsx → LogoSplashScreen/LogoSplashScreen.tsx} +7 -7
  52. package/src/components/LogoSplashScreen/index.ts +1 -0
  53. package/src/components/{Sidebar/Sidebar.module.scss → Modal/Modal.module.scss} +25 -20
  54. package/src/components/{Sidebar/Sidebar.tsx → Modal/Modal.tsx} +9 -9
  55. package/src/components/{Sidebar → Modal}/components/Section/Section.module.scss +0 -0
  56. package/src/components/{Sidebar → Modal}/components/Section/Section.tsx +0 -0
  57. package/src/components/{Sidebar → Modal}/components/Section/index.ts +0 -0
  58. package/src/components/{Sidebar → Modal}/components/index.ts +0 -0
  59. package/src/components/Modal/index.ts +1 -0
  60. package/src/components/NavButtons/NavButtons.tsx +22 -3
  61. package/src/components/Progress/Progress.module.scss +9 -0
  62. package/src/components/Progress/Progress.tsx +38 -0
  63. package/src/components/Progress/index.ts +1 -0
  64. package/src/components/Rack/Rack.module.scss +2 -0
  65. package/src/components/Rack/Rack.tsx +3 -1
  66. package/src/components/Rack/RackTile.tsx +3 -2
  67. package/src/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +76 -0
  68. package/src/components/ResultCandidatePicker/ResultCandidatePicker.tsx +38 -0
  69. package/src/components/ResultCandidatePicker/index.ts +1 -0
  70. package/src/components/Results/Result.tsx +64 -43
  71. package/src/components/Results/Results.module.scss +9 -16
  72. package/src/components/Results/Results.tsx +45 -28
  73. package/src/components/Results/SolveButton.tsx +9 -7
  74. package/src/components/Results/{getColumns.ts → getLocaleColumns.ts} +2 -2
  75. package/src/components/Results/types.ts +16 -0
  76. package/src/components/Results/useColumns.ts +44 -0
  77. package/src/components/ResultsInput/ResultsInput.module.scss +1 -3
  78. package/src/components/Sizer/Sizer.module.scss +10 -0
  79. package/src/components/Sizer/Sizer.tsx +10 -0
  80. package/src/components/Sizer/index.ts +1 -0
  81. package/src/components/Solver/Solver.module.scss +83 -27
  82. package/src/components/Solver/Solver.tsx +157 -24
  83. package/src/components/Solver/components/ApplyButton/ApplyButton.module.scss +5 -0
  84. package/src/components/Solver/components/ApplyButton/ApplyButton.tsx +37 -0
  85. package/src/components/Solver/components/ApplyButton/index.ts +1 -0
  86. package/src/components/Solver/components/EmptyState/EmptyState.module.scss +59 -0
  87. package/src/components/Solver/components/EmptyState/EmptyState.tsx +41 -0
  88. package/src/components/Solver/components/EmptyState/index.ts +1 -0
  89. package/src/components/Solver/components/SolveButton/SolveButton.module.scss +4 -0
  90. package/src/components/Solver/components/SolveButton/SolveButton.tsx +42 -0
  91. package/src/components/Solver/components/SolveButton/index.ts +1 -0
  92. package/src/components/Solver/components/index.ts +3 -0
  93. package/src/components/{Screen/Screen.module.scss → SplashScreen/SplashScreen.module.scss} +2 -12
  94. package/src/components/{Screen/Screen.tsx → SplashScreen/SplashScreen.tsx} +4 -4
  95. package/src/components/SplashScreen/index.ts +1 -0
  96. package/src/components/SquareButton/SquareButton.module.scss +3 -3
  97. package/src/components/Tile/Tile.module.scss +7 -15
  98. package/src/components/Tooltip/Tooltip.module.scss +0 -1
  99. package/src/components/index.ts +6 -7
  100. package/src/hooks/index.ts +1 -1
  101. package/src/hooks/useMediaQuery.ts +11 -0
  102. package/src/hooks/usePortal.tsx +1 -1
  103. package/src/i18n/de.json +2 -0
  104. package/src/i18n/en.json +2 -0
  105. package/src/i18n/es.json +2 -0
  106. package/src/i18n/fa.json +2 -0
  107. package/src/i18n/fr.json +2 -0
  108. package/src/i18n/pl.json +2 -0
  109. package/src/icons/CardChecklist.svg +5 -0
  110. package/src/icons/Check.svg +2 -2
  111. package/src/icons/ChevronDown.svg +4 -0
  112. package/src/icons/CrossCircleFill.svg +4 -0
  113. package/src/icons/{CrossFill.svg → CrossSquareFill.svg} +0 -0
  114. package/src/icons/ExclamationTriangleFill.svg +4 -0
  115. package/src/icons/InfoCircleFill.svg +4 -0
  116. package/src/icons/List.svg +4 -0
  117. package/src/icons/Search.svg +4 -0
  118. package/src/icons/index.ts +8 -2
  119. package/src/{components/KeyMap/KeyMap.tsx → modals/KeyMapModal/KeyMapModal.tsx} +11 -13
  120. package/src/{components/KeyMap → modals/KeyMapModal}/components/Mapping/Mapping.module.scss +0 -0
  121. package/src/{components/KeyMap → modals/KeyMapModal}/components/Mapping/Mapping.tsx +0 -0
  122. package/src/{components/KeyMap → modals/KeyMapModal}/components/Mapping/index.ts +0 -0
  123. package/src/{components/KeyMap → modals/KeyMapModal}/components/index.ts +0 -0
  124. package/src/modals/KeyMapModal/index.ts +1 -0
  125. package/src/{components/KeyMap → modals/KeyMapModal}/keys.tsx +1 -2
  126. package/src/modals/MenuModal/MenuModal.module.scss +46 -0
  127. package/src/modals/MenuModal/MenuModal.tsx +54 -0
  128. package/src/modals/MenuModal/index.ts +1 -0
  129. package/src/modals/RemainingTilesModal/RemainingTilesModal.module.scss +28 -0
  130. package/src/{components/RemainingTiles/RemainingTiles.tsx → modals/RemainingTilesModal/RemainingTilesModal.tsx} +14 -12
  131. package/src/{components/RemainingTiles → modals/RemainingTilesModal/components/Character}/Character.module.scss +6 -2
  132. package/src/{components/RemainingTiles → modals/RemainingTilesModal/components/Character}/Character.tsx +11 -3
  133. package/src/modals/RemainingTilesModal/components/Character/index.ts +1 -0
  134. package/src/modals/RemainingTilesModal/components/index.ts +1 -0
  135. package/src/modals/RemainingTilesModal/index.ts +1 -0
  136. package/src/modals/ResultsModal/ResultsModal.module.scss +7 -0
  137. package/src/modals/ResultsModal/ResultsModal.tsx +58 -0
  138. package/src/modals/ResultsModal/index.ts +1 -0
  139. package/src/modals/SettingsModal/SettingsModal.tsx +34 -0
  140. package/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/AutoGroupTilesSetting.module.scss +0 -0
  141. package/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +1 -2
  142. package/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/constants.ts +0 -0
  143. package/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/index.ts +0 -0
  144. package/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/lib.ts +0 -0
  145. package/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/ConfigSetting.module.scss +0 -0
  146. package/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/ConfigSetting.tsx +1 -2
  147. package/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/index.ts +0 -0
  148. package/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/options.ts +0 -0
  149. package/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/types.ts +0 -0
  150. package/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/LocaleSetting.module.scss +0 -0
  151. package/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/LocaleSetting.tsx +1 -2
  152. package/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/index.ts +0 -0
  153. package/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/options.ts +0 -0
  154. package/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/types.ts +0 -0
  155. package/src/{components/Settings → modals/SettingsModal}/components/index.ts +0 -0
  156. package/src/modals/SettingsModal/index.ts +1 -0
  157. package/src/{components/Words/Words.module.scss → modals/WordsModal/WordsModal.module.scss} +7 -1
  158. package/src/{components/Words/Words.tsx → modals/WordsModal/WordsModal.tsx} +10 -12
  159. package/src/modals/WordsModal/index.ts +1 -0
  160. package/src/modals/index.ts +6 -0
  161. package/src/pages/index.module.scss +6 -4
  162. package/src/pages/index.tsx +63 -26
  163. package/src/parameters/index.ts +28 -6
  164. package/src/state/createAppStore.ts +7 -4
  165. package/src/styles/mixins.scss +15 -13
  166. package/src/styles/variables.scss +15 -17
  167. package/src/types/index.ts +2 -0
  168. package/tsconfig.json +1 -0
  169. package/.next/cache/webpack/client-development/7.pack_ +0 -0
  170. package/.next/static/FJkPF91uL-OCAJKTTpVSP/_buildManifest.js +0 -1
  171. package/.next/static/chunks/361-d16f336a9752a55a.js +0 -1
  172. package/.next/static/chunks/724-eb48df4d1ba3df8b.js +0 -5
  173. package/.next/static/chunks/pages/_app-959e495f0f221247.js +0 -24
  174. package/.next/static/chunks/pages/index-1e30dafa41bddb80.js +0 -1
  175. package/.next/static/css/aafd07997120f1e4.css +0 -1
  176. package/.next/static/css/cb5b206454513f3c.css +0 -1
  177. package/.next/static/css/eb9d57f7103525ab.css +0 -1
  178. package/src/components/KeyMap/index.ts +0 -1
  179. package/src/components/RemainingTiles/RemainingTiles.module.scss +0 -16
  180. package/src/components/RemainingTiles/index.ts +0 -1
  181. package/src/components/Screen/index.ts +0 -1
  182. package/src/components/Settings/Settings.tsx +0 -35
  183. package/src/components/Settings/index.ts +0 -1
  184. package/src/components/Sidebar/index.ts +0 -1
  185. package/src/components/Splash/index.ts +0 -1
  186. package/src/components/Words/index.ts +0 -1
  187. package/src/hooks/useIsTablet.ts +0 -10
  188. package/src/icons/Play.svg +0 -4
@@ -1,6 +1,4 @@
1
- $z-index: 100;
2
-
3
- .screen {
1
+ .splashScreen {
4
2
  position: fixed;
5
3
  top: 0;
6
4
  bottom: 0;
@@ -8,15 +6,7 @@ $z-index: 100;
8
6
  right: 0;
9
7
  background-color: var(--color--background);
10
8
  opacity: 1;
11
- z-index: $z-index;
12
- }
13
-
14
- .closeButton {
15
- position: fixed;
16
- top: 0;
17
- right: 0;
18
- z-index: $z-index + 1;
19
- margin: var(--spacing--l);
9
+ z-index: var(--z-index--modal);
20
10
  }
21
11
 
22
12
  .content {
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { AnimationEventHandler, FunctionComponent, ReactNode } from 'react';
3
3
 
4
- import styles from './Screen.module.scss';
4
+ import styles from './SplashScreen.module.scss';
5
5
 
6
6
  interface Props {
7
7
  children?: ReactNode;
@@ -10,10 +10,10 @@ interface Props {
10
10
  onAnimationEnd?: AnimationEventHandler<HTMLDivElement>;
11
11
  }
12
12
 
13
- const Screen: FunctionComponent<Props> = ({ children, className, contentClassName, onAnimationEnd }) => (
14
- <div className={classNames(styles.screen, className)} onAnimationEnd={onAnimationEnd}>
13
+ const SplashScreen: FunctionComponent<Props> = ({ children, className, contentClassName, onAnimationEnd }) => (
14
+ <div className={classNames(styles.splashScreen, className)} onAnimationEnd={onAnimationEnd}>
15
15
  <div className={classNames(styles.content, contentClassName)}>{children}</div>
16
16
  </div>
17
17
  );
18
18
 
19
- export default Screen;
19
+ export default SplashScreen;
@@ -0,0 +1 @@
1
+ export { default } from './SplashScreen';
@@ -21,7 +21,7 @@
21
21
 
22
22
  &[disabled] {
23
23
  pointer-events: none;
24
- opacity: 0.25;
24
+ opacity: var(--opacity--disabled);
25
25
  }
26
26
  }
27
27
 
@@ -32,8 +32,8 @@
32
32
  }
33
33
 
34
34
  .icon {
35
- width: var(--square-button-size);
36
- height: var(--square-button-size);
35
+ width: var(--square-button--size);
36
+ height: var(--square-button--size);
37
37
  pointer-events: none;
38
38
  color: inherit;
39
39
  transition: var(--transition);
@@ -13,34 +13,24 @@
13
13
 
14
14
  &.points1 {
15
15
  --background-color: var(--color--yellow);
16
-
17
- background-color: var(--background-color);
18
16
  }
19
17
 
20
18
  &.points2 {
21
19
  --background-color: var(--color--green);
22
-
23
- background-color: var(--background-color);
24
20
  }
25
21
 
26
22
  &.points3,
27
23
  &.points4 {
28
24
  --background-color: var(--color--blue);
29
-
30
- background-color: var(--background-color);
31
25
  }
32
26
 
33
27
  &.points5 {
34
28
  --background-color: var(--color--red);
35
-
36
- background-color: var(--background-color);
37
29
  }
38
30
 
39
31
  &.blank {
40
32
  --background-color: white;
41
33
 
42
- background-color: var(--background-color);
43
-
44
34
  .character {
45
35
  color: black;
46
36
  }
@@ -49,7 +39,6 @@
49
39
  &.highlighted {
50
40
  --background-color: var(--color--primary);
51
41
 
52
- background-color: var(--background-color);
53
42
  color: white;
54
43
 
55
44
  .character {
@@ -64,7 +53,6 @@
64
53
  &.invalid {
65
54
  --background-color: var(--color--red--light);
66
55
 
67
- background-color: var(--background-color);
68
56
  color: var(--color--error);
69
57
  }
70
58
  }
@@ -86,11 +74,11 @@
86
74
  color: var(--color--inactive);
87
75
  }
88
76
 
89
- &::selection {
90
- background: transparent;
77
+ &:not(:disabled)::selection {
78
+ --background--color: transparent;
91
79
  }
92
80
 
93
- &:disabled {
81
+ &[disabled] {
94
82
  color: inherit;
95
83
  }
96
84
  }
@@ -104,6 +92,10 @@
104
92
  pointer-events: none;
105
93
  letter-spacing: -1px;
106
94
 
95
+ @include media('<xs') {
96
+ display: none;
97
+ }
98
+
107
99
  [dir='ltr'] & {
108
100
  bottom: 1%;
109
101
  right: 9%;
@@ -12,7 +12,6 @@ $arrow-size: 4px;
12
12
  border-radius: var(--border--radius);
13
13
  background-color: var(--tooltip--background);
14
14
  color: var(--tooltip--foreground);
15
- font-size: var(--font--size--s);
16
15
  z-index: 200;
17
16
 
18
17
  &.top {
@@ -6,26 +6,25 @@ export { default as Dictionary } from './Dictionary';
6
6
  export { default as DictionaryInput } from './DictionaryInput';
7
7
  export { default as EmptyState } from './EmptyState';
8
8
  export { default as Key } from './Key';
9
- export { default as KeyMap } from './KeyMap';
10
9
  export { default as Loading } from './Loading';
11
10
  export { default as Logo } from './Logo';
11
+ export { default as LogoSplashScreen } from './LogoSplashScreen';
12
+ export { default as Modal } from './Modal';
12
13
  export { default as NavButtons } from './NavButtons';
13
14
  export { default as NotFound } from './NotFound';
14
15
  export { default as PlainTiles } from './PlainTiles';
16
+ export { default as Progress } from './Progress';
15
17
  export { default as Rack } from './Rack';
16
18
  export { default as Radio } from './Radio';
17
- export { default as RemainingTiles } from './RemainingTiles';
19
+ export { default as ResultCandidatePicker } from './ResultCandidatePicker';
18
20
  export { default as Results } from './Results';
19
21
  export { default as ResultsInput } from './ResultsInput';
20
- export { default as Screen } from './Screen';
21
- export { default as Settings } from './Settings';
22
- export { default as Sidebar } from './Sidebar';
22
+ export { default as Sizer } from './Sizer';
23
23
  export { default as Solver } from './Solver';
24
- export { default as Splash } from './Splash';
24
+ export { default as SplashScreen } from './SplashScreen';
25
25
  export { default as SquareButton } from './SquareButton';
26
26
  export { default as SvgFontCss } from './SvgFontCss';
27
27
  export { default as SvgFontFix } from './SvgFontFix';
28
28
  export { default as Tile } from './Tile';
29
29
  export { useTooltip } from './Tooltip';
30
30
  export { default as Well } from './Well';
31
- export { default as Words } from './Words';
@@ -1,7 +1,7 @@
1
1
  export { default as useDirection } from './useDirection';
2
- export { default as useIsTablet } from './useIsTablet';
3
2
  export { default as useIsTouchDevice } from './useIsTouchDevice';
4
3
  export { default as useLanguage } from './useLanguage';
5
4
  export { default as useLocalStorage } from './useLocalStorage';
5
+ export { default as useMediaQuery } from './useMediaQuery';
6
6
  export { default as usePortal } from './usePortal';
7
7
  export { default as useUniqueId } from './useUniqueId';
@@ -0,0 +1,11 @@
1
+ import { buildMediaQuery } from 'include-media-query-builder';
2
+ import { useMedia } from 'react-use';
3
+
4
+ import { BREAKPOINTS } from 'parameters';
5
+
6
+ const useMediaQuery = (query: string | string[], defaultState?: boolean | undefined): boolean => {
7
+ const mediaQuery = buildMediaQuery(BREAKPOINTS, query);
8
+ return useMedia(mediaQuery, defaultState);
9
+ };
10
+
11
+ export default useMediaQuery;
@@ -29,7 +29,7 @@ const usePortal = (children: ReactNode, { disabled = false, tagName = 'div' }: P
29
29
  // "Attempted to synchronously unmount a root while React was already
30
30
  // rendering. React cannot finish unmounting the root until the current
31
31
  // render has completed, which may lead to a race condition.""
32
- setTimeout(() => {
32
+ globalThis.setTimeout(() => {
33
33
  rootRef.current = null;
34
34
  root.unmount();
35
35
  element.remove();
package/src/i18n/de.json CHANGED
@@ -35,8 +35,10 @@
35
35
  "keyMap.board-and-rack.submit": "Lösen starten",
36
36
  "keyMap.rack": "Ablage",
37
37
  "keyMap.rack.insert-blank": "Blanko hinzufügen (Leertaste)",
38
+ "menu": "Menü",
38
39
  "rack.placeholder": "Steine…",
39
40
  "remaining-tiles": "Restliche Steine",
41
+ "results": "Ergebnisse",
40
42
  "results.empty-state.no-filtered-results": "Keine Ergebnisse für diese Anfrage.",
41
43
  "results.empty-state.no-results": "Keine Ergebnisse - kein Wort konnte generiert werden.",
42
44
  "results.empty-state.outdated": "Ergebnisse sind alt. Klicken zum Aktualisieren.",
package/src/i18n/en.json CHANGED
@@ -35,8 +35,10 @@
35
35
  "keyMap.board-and-rack.submit": "Start solving",
36
36
  "keyMap.rack": "Rack",
37
37
  "keyMap.rack.insert-blank": "Insert blank (spacebar)",
38
+ "menu": "Menu",
38
39
  "rack.placeholder": "Letters",
39
40
  "remaining-tiles": "Remaining tiles",
41
+ "results": "Results",
40
42
  "results.empty-state.no-filtered-results": "No result matches this query.",
41
43
  "results.empty-state.no-results": "No results - unable to generate any words.",
42
44
  "results.empty-state.outdated": "Results are outdated. Click below to update.",
package/src/i18n/es.json CHANGED
@@ -35,8 +35,10 @@
35
35
  "keyMap.board-and-rack.submit": "Empezar a resolver",
36
36
  "keyMap.rack": "Estante",
37
37
  "keyMap.rack.insert-blank": "Insertar espacio en blanco (barra espaciadora)",
38
+ "menu": "Menú",
38
39
  "rack.placeholder": "Letras…",
39
40
  "remaining-tiles": "Casillas restantes",
41
+ "results": "Resultados",
40
42
  "results.empty-state.no-filtered-results": "Ningún resultado coincide con esta consulta.",
41
43
  "results.empty-state.no-results": "No hay resultados; no se pueden generar palabras",
42
44
  "results.empty-state.outdated": "Los resultados están desactualizados. Haga clic a continuación para actualizar.",
package/src/i18n/fa.json CHANGED
@@ -35,8 +35,10 @@
35
35
  "keyMap.board-and-rack.submit": "حل کردن",
36
36
  "keyMap.rack": "طاقچه",
37
37
  "keyMap.rack.insert-blank": "وارد کردن کاشی خالی (دکمه اسپیس)",
38
+ "menu": "منو",
38
39
  "rack.placeholder": "لیستحرف",
39
40
  "remaining-tiles": "کاشی های باقی مانده",
41
+ "results": "نتایج",
40
42
  "results.empty-state.no-filtered-results": "پاسخی یافت نشد.",
41
43
  "results.empty-state.no-results": "کلمه قابل استفاده پیدا نشد.",
42
44
  "results.empty-state.outdated": "نتایج به روز نیستند، برای بروز رسانی کلیک کنید.",
package/src/i18n/fr.json CHANGED
@@ -35,8 +35,10 @@
35
35
  "keyMap.board-and-rack.submit": "Commencer la résolution",
36
36
  "keyMap.rack": "Chevalet",
37
37
  "keyMap.rack.insert-blank": "Inserer une case vide (spacebar)",
38
+ "menu": "Menu",
38
39
  "rack.placeholder": "Lettres",
39
40
  "remaining-tiles": "Cases restantes",
41
+ "results": "Résultats",
40
42
  "results.empty-state.no-filtered-results": "Aucun résultat ne correspond à cette requête",
41
43
  "results.empty-state.no-results": "Pas de résultats - impossible de générer des mots.",
42
44
  "results.empty-state.outdated": "Les résultats sont dépassé. Cliquer ci-dessous pour mettre à jour.",
package/src/i18n/pl.json CHANGED
@@ -35,8 +35,10 @@
35
35
  "keyMap.board-and-rack.submit": "Rozpocznij wyszukiwanie",
36
36
  "keyMap.rack": "Stojak",
37
37
  "keyMap.rack.insert-blank": "Wstaw blanka (spacja)",
38
+ "menu": "Menu",
38
39
  "rack.placeholder": "Literki",
39
40
  "remaining-tiles": "Pozostałe płytki",
41
+ "results": "Wyniki",
40
42
  "results.empty-state.no-filtered-results": "Żaden wynik nie pasuje do tej kwerendy.",
41
43
  "results.empty-state.no-results": "Brak wyników - nie można wygenerować żadnego słowa.",
42
44
  "results.empty-state.outdated": "Wyniki są nieaktualne. Kliknij poniżej, aby zaktualizować.",
@@ -0,0 +1,5 @@
1
+ <!-- https://icons.getbootstrap.com/icons/card-checklist/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M14.5 3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h13zm-13-1A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2h-13z" fill="currentColor" />
4
+ <path d="M7 5.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0zM7 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z" fill="currentColor" />
5
+ </svg>
@@ -1,4 +1,4 @@
1
- <!-- https://icons.getbootstrap.com/icons/check/ -->
1
+ <!-- https://icons.getbootstrap.com/icons/check2/ -->
2
2
  <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
- <path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z" fill="currentColor" />
3
+ <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" fill="currentColor" />
4
4
  </svg>
@@ -0,0 +1,4 @@
1
+ <!-- https://icons.getbootstrap.com/icons/chevron-down/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
+ <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" fill="currentColor" />
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <!-- https://icons.getbootstrap.com/icons/x-circle-fill/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z" fill="currentColor" />
4
+ </svg>
File without changes
@@ -0,0 +1,4 @@
1
+ <!-- https://icons.getbootstrap.com/icons/exclamation-triangle-fill/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" fill="currentColor" />
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <!-- https://icons.getbootstrap.com/icons/info-circle-fill/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" fill="currentColor" />
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <!-- https://icons.getbootstrap.com/icons/list/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" >
3
+ <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z" fill="currentColor" />
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <!-- https://icons.getbootstrap.com/icons/search/ -->
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z" fill="currentColor" />
4
+ </svg>
@@ -3,15 +3,19 @@ export { default as ArrowLeft } from './ArrowLeft.svg';
3
3
  export { default as ArrowRight } from './ArrowRight.svg';
4
4
  export { default as ArrowUp } from './ArrowUp.svg';
5
5
  export { default as BookHalf } from './BookHalf.svg';
6
+ export { default as CardChecklist } from './CardChecklist.svg';
6
7
  export { default as Check } from './Check.svg';
7
8
  export { default as CheckboxChecked } from './CheckboxChecked.svg';
8
9
  export { default as CheckboxEmpty } from './CheckboxEmpty.svg';
10
+ export { default as ChevronDown } from './ChevronDown.svg';
9
11
  export { default as Cog } from './Cog.svg';
10
12
  export { default as Cross } from './Cross.svg';
11
- export { default as CrossFill } from './CrossFill.svg';
13
+ export { default as CrossCircleFill } from './CrossCircleFill.svg';
14
+ export { default as CrossSquareFill } from './CrossSquareFill.svg';
12
15
  export { default as DashCircleFill } from './DashCircleFill.svg';
13
16
  export { default as Eraser } from './Eraser.svg';
14
17
  export { default as ExclamationSquareFill } from './ExclamationSquareFill.svg';
18
+ export { default as ExclamationTriangleFill } from './ExclamationTriangleFill.svg';
15
19
  export { default as Flag } from './Flag.svg';
16
20
  export { default as FlagEs } from './FlagEs.svg';
17
21
  export { default as FlagFa } from './FlagFa.svg';
@@ -21,9 +25,11 @@ export { default as FlagPl } from './FlagPl.svg';
21
25
  export { default as FlagUs } from './FlagUs.svg';
22
26
  export { default as FlagDe } from './FlagDe.svg';
23
27
  export { default as Github } from './Github.svg';
28
+ export { default as InfoCircleFill } from './InfoCircleFill.svg';
24
29
  export { default as Keyboard } from './Keyboard.svg';
25
- export { default as Play } from './Play.svg';
30
+ export { default as List } from './List.svg';
26
31
  export { default as Sack } from './Sack.svg';
32
+ export { default as Search } from './Search.svg';
27
33
  export { default as SortDown } from './SortDown.svg';
28
34
  export { default as SortUp } from './SortUp.svg';
29
35
  export { default as Star } from './Star.svg';
@@ -1,10 +1,8 @@
1
1
  import { FunctionComponent } from 'react';
2
2
 
3
+ import { Key, Modal } from 'components';
3
4
  import { selectConfig, useTranslate, useTypedSelector } from 'state';
4
5
 
5
- import Key from '../Key';
6
- import Sidebar from '../Sidebar';
7
-
8
6
  import { Mapping } from './components';
9
7
  import { ARROWS, BACKSPACE, CTRL, DEL, ENTER, SPACE } from './keys';
10
8
 
@@ -14,13 +12,13 @@ interface Props {
14
12
  onClose: () => void;
15
13
  }
16
14
 
17
- const KeyMap: FunctionComponent<Props> = ({ className, isOpen, onClose }) => {
15
+ const KeyMapModal: FunctionComponent<Props> = ({ className, isOpen, onClose }) => {
18
16
  const translate = useTranslate();
19
17
  const config = useTypedSelector(selectConfig);
20
18
 
21
19
  return (
22
- <Sidebar className={className} isOpen={isOpen} title={translate('keyMap')} onClose={onClose}>
23
- <Sidebar.Section title={translate('keyMap.board-and-rack')}>
20
+ <Modal className={className} isOpen={isOpen} title={translate('keyMap')} onClose={onClose}>
21
+ <Modal.Section title={translate('keyMap.board-and-rack')}>
24
22
  <Mapping description={translate('keyMap.board-and-rack.navigate')} mapping={[ARROWS]} />
25
23
  <Mapping description={translate('keyMap.board-and-rack.remove-tile')} mapping={[DEL, BACKSPACE]} />
26
24
  <Mapping description={translate('keyMap.board-and-rack.submit')} mapping={[ENTER]} />
@@ -39,18 +37,18 @@ const KeyMap: FunctionComponent<Props> = ({ className, isOpen, onClose }) => {
39
37
  ]}
40
38
  />
41
39
  )}
42
- </Sidebar.Section>
40
+ </Modal.Section>
43
41
 
44
- <Sidebar.Section title={translate('keyMap.board')}>
42
+ <Modal.Section title={translate('keyMap.board')}>
45
43
  <Mapping description={translate('keyMap.board.toggle-blank')} mapping={[SPACE, [CTRL, <Key key="b">B</Key>]]} />
46
44
  <Mapping description={translate('keyMap.board.toggle-direction')} mapping={[[CTRL, ARROWS]]} />
47
- </Sidebar.Section>
45
+ </Modal.Section>
48
46
 
49
- <Sidebar.Section title={translate('keyMap.rack')}>
47
+ <Modal.Section title={translate('keyMap.rack')}>
50
48
  <Mapping description={translate('keyMap.rack.insert-blank')} mapping={[SPACE]} />
51
- </Sidebar.Section>
52
- </Sidebar>
49
+ </Modal.Section>
50
+ </Modal>
53
51
  );
54
52
  };
55
53
 
56
- export default KeyMap;
54
+ export default KeyMapModal;
@@ -0,0 +1 @@
1
+ export { default } from './KeyMapModal';
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
2
 
3
+ import { Key } from 'components';
3
4
  import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp } from 'icons';
4
5
  import { isMac } from 'lib';
5
6
 
6
- import Key from '../Key';
7
-
8
7
  export const ARROW_DOWN = (
9
8
  <Key>
10
9
  <ArrowLeft />
@@ -0,0 +1,46 @@
1
+ @import 'styles/mixins';
2
+
3
+ .button {
4
+ @include button-reset;
5
+ @include focus-effect;
6
+
7
+ width: 100%;
8
+ display: flex;
9
+ align-items: flex-start;
10
+ gap: var(--spacing--l);
11
+ margin-bottom: var(--spacing--m);
12
+ padding: var(--spacing--m);
13
+ border: var(--border);
14
+ border-radius: var(--border--radius);
15
+ background-color: var(--color--background--overlay);
16
+ transition: var(--transition);
17
+ cursor: pointer;
18
+
19
+ &:last-child {
20
+ margin-bottom: 0;
21
+ }
22
+
23
+ &:focus,
24
+ &:hover {
25
+ text-decoration: none;
26
+
27
+ .icon {
28
+ color: var(--color--foreground--secondary);
29
+ }
30
+ }
31
+ }
32
+
33
+ .icon {
34
+ $size: 24px;
35
+
36
+ width: $size;
37
+ height: $size;
38
+ flex: 0 0 auto;
39
+ color: var(--color--inactive);
40
+ transition: var(--transition);
41
+ }
42
+
43
+ .content {
44
+ flex: 1;
45
+ text-align: left;
46
+ }
@@ -0,0 +1,54 @@
1
+ import { FunctionComponent } from 'react';
2
+
3
+ import { Modal } from 'components';
4
+ import { CardChecklist, Cog, Github, Sack } from 'icons';
5
+ import { GITHUB_PROJECT_URL } from 'parameters';
6
+ import { useTranslate } from 'state';
7
+
8
+ import styles from './MenuModal.module.scss';
9
+
10
+ interface Props {
11
+ className?: string;
12
+ isOpen: boolean;
13
+ onClose: () => void;
14
+ onShowRemainingTiles: () => void;
15
+ onShowSettings: () => void;
16
+ onShowWords: () => void;
17
+ }
18
+
19
+ const Menu: FunctionComponent<Props> = ({
20
+ className,
21
+ isOpen,
22
+ onClose,
23
+ onShowRemainingTiles,
24
+ onShowSettings,
25
+ onShowWords,
26
+ }) => {
27
+ const translate = useTranslate();
28
+
29
+ return (
30
+ <Modal className={className} isOpen={isOpen} title={translate('menu')} onClose={onClose}>
31
+ <button className={styles.button} onClick={onShowRemainingTiles}>
32
+ <Sack className={styles.icon} />
33
+ <div className={styles.content}>{translate('remaining-tiles')}</div>
34
+ </button>
35
+
36
+ <button className={styles.button} onClick={onShowWords}>
37
+ <CardChecklist className={styles.icon} />
38
+ <div className={styles.content}>{translate('words')}</div>
39
+ </button>
40
+
41
+ <a className={styles.button} href={GITHUB_PROJECT_URL} rel="noopener noreferrer" target="_blank">
42
+ <Github className={styles.icon} />
43
+ <div className={styles.content}>{translate('github')}</div>
44
+ </a>
45
+
46
+ <button className={styles.button} onClick={onShowSettings}>
47
+ <Cog className={styles.icon} />
48
+ <div className={styles.content}>{translate('settings')}</div>
49
+ </button>
50
+ </Modal>
51
+ );
52
+ };
53
+
54
+ export default Menu;
@@ -0,0 +1 @@
1
+ export { default } from './MenuModal';
@@ -0,0 +1,28 @@
1
+ .title {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ flex-wrap: wrap;
6
+ }
7
+
8
+ .content {
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ gap: var(--spacing--l);
12
+ }
13
+
14
+ .badge {
15
+ [dir='ltr'] & {
16
+ margin-left: var(--spacing--m);
17
+ }
18
+
19
+ [dir='rtl'] & {
20
+ margin-right: var(--spacing--m);
21
+ }
22
+ }
23
+
24
+ .character {
25
+ display: flex;
26
+ flex: 0 1;
27
+ max-width: 50px;
28
+ }