@scrabble-solver/scrabble-solver 2.13.7 → 2.13.9
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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +11 -11
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_8dgz12 +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/577.js +1 -1
- package/.next/server/chunks/807.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/static/chunks/{main-6e708370ad13b1f9.js → main-b5b360c6afb66b05.js} +1 -1
- package/.next/static/chunks/pages/{404-9d5621b1ca024a45.js → 404-01653a877b233143.js} +1 -1
- package/.next/static/chunks/pages/_app-735b5863675c1b5d.js +17 -0
- package/.next/static/chunks/pages/{index-710b5c27542027be.js → index-36c448d585a58425.js} +1 -1
- package/.next/static/css/6682db14f926d4c7.css +1 -0
- package/.next/static/css/841a5b5f0b2fb131.css +2 -0
- package/.next/static/eLvYNd4B2hzSgBZ_PuZcQ/_buildManifest.js +1 -0
- package/.next/trace +44 -44
- package/LICENSE +1 -1
- package/package.json +12 -12
- package/src/components/Alert/Alert.module.scss +3 -12
- package/src/components/Board/Board.module.scss +1 -4
- package/src/components/Board/Board.tsx +3 -3
- package/src/components/Board/BoardPure.tsx +27 -19
- package/src/components/Board/components/Actions/Actions.module.scss +7 -27
- package/src/components/Board/components/Actions/Actions.tsx +8 -12
- package/src/components/Board/components/Actions/lib.ts +30 -0
- package/src/components/Board/components/Cell/Cell.module.scss +5 -32
- package/src/components/Board/components/InputPrompt/InputPrompt.module.scss +4 -18
- package/src/components/Board/hooks/useBackgroundImage.tsx +18 -28
- package/src/components/Button/Button.module.scss +1 -8
- package/src/components/Dictionary/Dictionary.module.scss +1 -8
- package/src/components/Loading/Loading.module.scss +1 -4
- package/src/components/Modal/Modal.module.scss +2 -16
- package/src/components/Rack/Rack.module.scss +4 -18
- package/src/components/Rack/components/InputPrompt/InputPrompt.module.scss +1 -4
- package/src/components/Radio/Radio.module.scss +2 -1
- package/src/components/Results/Results.module.scss +7 -39
- package/src/components/Results/useColumns.ts +1 -1
- package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +9 -40
- package/src/components/Tile/Tile.module.scss +6 -28
- package/src/components/Tile/Tile.tsx +1 -15
- package/src/components/Tooltip/Tooltip.module.scss +1 -0
- package/src/components/index.ts +0 -1
- package/src/hooks/useAppLayout.ts +0 -1
- package/src/i18n/languages/english.json +2 -1
- package/src/i18n/languages/french.json +2 -1
- package/src/i18n/languages/german.json +3 -2
- package/src/i18n/languages/persian.json +2 -1
- package/src/i18n/languages/polish.json +2 -1
- package/src/i18n/languages/romanian.json +2 -1
- package/src/i18n/languages/spanish.json +2 -1
- package/src/icons/Ban.svg +4 -0
- package/src/icons/index.ts +1 -2
- package/src/lib/groupResults.ts +4 -7
- package/src/lib/index.ts +1 -0
- package/src/lib/resultMatchesCellFilter.ts +23 -0
- package/src/modals/KeyMapModal/components/Mapping/Mapping.module.scss +2 -2
- package/src/modals/MenuModal/MenuModal.module.scss +2 -15
- package/src/modals/RemainingTilesModal/RemainingTilesModal.module.scss +1 -7
- package/src/modals/WordsModal/WordsModal.module.scss +2 -15
- package/src/parameters/index.ts +0 -9
- package/src/state/sagas.ts +4 -4
- package/src/state/selectors.ts +5 -8
- package/src/state/slices/cellFilterInitialState.ts +2 -2
- package/src/state/slices/cellFilterSlice.ts +29 -4
- package/src/styles/mixins.scss +2 -5
- package/src/types/index.ts +10 -1
- package/.next/static/QbBIK_mEs1LhYSpQwv6rZ/_buildManifest.js +0 -1
- package/.next/static/chunks/pages/_app-7bc3bf713c40526a.js +0 -17
- package/.next/static/css/11366b7489cf90ac.css +0 -1
- package/.next/static/css/fe70298e6f597553.css +0 -2
- package/src/components/Checkbox/Checkbox.module.scss +0 -45
- package/src/components/Checkbox/Checkbox.tsx +0 -38
- package/src/components/Checkbox/index.ts +0 -1
- package/src/icons/CheckboxChecked.svg +0 -4
- package/src/icons/CheckboxEmpty.svg +0 -4
- /package/.next/static/{QbBIK_mEs1LhYSpQwv6rZ → eLvYNd4B2hzSgBZ_PuZcQ}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
|
|
3
|
-
import { Point } from 'types';
|
|
3
|
+
import { CellFilterType, Point } from 'types';
|
|
4
4
|
|
|
5
5
|
import cellFilterInitialState from './cellFilterInitialState';
|
|
6
6
|
|
|
@@ -10,17 +10,42 @@ const cellFilterSlice = createSlice({
|
|
|
10
10
|
reducers: {
|
|
11
11
|
toggle: (state, action: PayloadAction<Point>) => {
|
|
12
12
|
const { x, y } = action.payload;
|
|
13
|
-
const
|
|
13
|
+
const currentEntry = state.find((point) => point.x === x && point.y === y);
|
|
14
|
+
const has = Boolean(currentEntry);
|
|
15
|
+
const nextType = currentEntry ? toggleCellFilterState(currentEntry.type) : 'include';
|
|
14
16
|
|
|
15
|
-
if (
|
|
17
|
+
if (nextType === null) {
|
|
16
18
|
return state.filter((point) => point.x !== x || point.y !== y);
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
if (!has) {
|
|
22
|
+
return [...state, { ...action.payload, type: nextType }];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return state.map((entry) => {
|
|
26
|
+
if (entry.x === x && entry.y === y) {
|
|
27
|
+
return { ...entry, type: nextType };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return entry;
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
cancel: (state, action: PayloadAction<Point>) => {
|
|
35
|
+
const { x, y } = action.payload;
|
|
36
|
+
|
|
37
|
+
return state.filter((point) => point.x !== x || point.y !== y);
|
|
20
38
|
},
|
|
21
39
|
|
|
22
40
|
reset: () => cellFilterInitialState,
|
|
23
41
|
},
|
|
24
42
|
});
|
|
25
43
|
|
|
44
|
+
const toggleCellFilterState = (type: CellFilterType): CellFilterType | null => {
|
|
45
|
+
const chain: (CellFilterType | null)[] = ['include', 'exclude', null];
|
|
46
|
+
const index = chain.indexOf(type);
|
|
47
|
+
const nextIndex = (index + 1) % chain.length;
|
|
48
|
+
return chain[nextIndex];
|
|
49
|
+
};
|
|
50
|
+
|
|
26
51
|
export default cellFilterSlice;
|
package/src/styles/mixins.scss
CHANGED
|
@@ -14,7 +14,7 @@ $media-expressions: (
|
|
|
14
14
|
|
|
15
15
|
@mixin scrollbars {
|
|
16
16
|
scrollbar-color: var(--scrollbar--thumb--color) var(--scrollbar--thumb--track);
|
|
17
|
-
scrollbar-width:
|
|
17
|
+
scrollbar-width: thin;
|
|
18
18
|
|
|
19
19
|
&::-webkit-scrollbar {
|
|
20
20
|
width: var(--scrollbar--size);
|
|
@@ -44,10 +44,7 @@ $media-expressions: (
|
|
|
44
44
|
|
|
45
45
|
&::after {
|
|
46
46
|
position: absolute;
|
|
47
|
-
|
|
48
|
-
right: 0;
|
|
49
|
-
bottom: 0;
|
|
50
|
-
left: 0;
|
|
47
|
+
inset: 0;
|
|
51
48
|
z-index: var(--z-index--focus-effect);
|
|
52
49
|
transition: var(--transition);
|
|
53
50
|
border-radius: var(--border--radius);
|
package/src/types/index.ts
CHANGED
|
@@ -2,6 +2,14 @@ export type Comparator<T> = (a: T, B: T) => number;
|
|
|
2
2
|
|
|
3
3
|
export type AutoGroupTiles = 'left' | 'right' | null;
|
|
4
4
|
|
|
5
|
+
export type CellFilterType = 'include' | 'exclude';
|
|
6
|
+
|
|
7
|
+
export type CellFilterEntry = {
|
|
8
|
+
x: Point['x'];
|
|
9
|
+
y: Point['y'];
|
|
10
|
+
type: CellFilterType;
|
|
11
|
+
};
|
|
12
|
+
|
|
5
13
|
export type Direction = 'horizontal' | 'vertical';
|
|
6
14
|
|
|
7
15
|
export type InputMode = 'keyboard' | 'touchscreen';
|
|
@@ -49,7 +57,8 @@ export enum ResultColumn {
|
|
|
49
57
|
}
|
|
50
58
|
export type TranslationKey =
|
|
51
59
|
| 'cell.enter-word'
|
|
52
|
-
| 'cell.filter-cell'
|
|
60
|
+
| 'cell.filter-cell.exclude'
|
|
61
|
+
| 'cell.filter-cell.include'
|
|
53
62
|
| 'cell.set-blank'
|
|
54
63
|
| 'cell.set-not-blank'
|
|
55
64
|
| 'cell.toggle-direction'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/css/11366b7489cf90ac.css","static/chunks/pages/index-710b5c27542027be.js"],"/404":["static/chunks/pages/404-9d5621b1ca024a45.js"],"/_error":["static/chunks/pages/_error-6f16571cf9224b25.js"],sortedPages:["/","/404","/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|