@scrabble-solver/scrabble-solver 2.11.0 → 2.11.2
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 +7 -7
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_8dgz12 +1 -1
- package/.next/cache/next-server.js.nft.json +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/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/277.js +523 -611
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_app.js +0 -24
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/api/dictionary/[locale]/[word].js +0 -1
- package/.next/server/pages/api/dictionary/[locale].js +0 -1
- package/.next/server/pages/api/solve.js +28 -8
- package/.next/server/pages/api/verify.js +0 -1
- package/.next/server/pages/api/visit.js +0 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/index.js +49 -90
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/static/Mdvi3FY0PqkILKLbPlVBU/_buildManifest.js +1 -0
- package/.next/static/chunks/pages/{404-e0f30450e9920dc3.js → 404-448ba28510855455.js} +1 -1
- package/.next/static/chunks/pages/_app-495e6f4ccc278bb2.js +28 -0
- package/.next/static/chunks/pages/index-5ecc51900ca29685.js +1 -0
- package/.next/static/css/17b0a2db8742105f.css +1 -0
- package/.next/static/css/e1ffeb2558330c55.css +2 -0
- package/.next/trace +54 -55
- package/package.json +9 -14
- package/src/components/{Solver/components/EmptyState/EmptyState.module.scss → Alert/Alert.module.scss} +11 -7
- package/src/components/{Solver/components/EmptyState/EmptyState.tsx → Alert/Alert.tsx} +8 -6
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Board/Board.module.scss +55 -0
- package/src/components/Board/BoardPure.tsx +4 -0
- package/src/components/Board/components/Cell/Cell.module.scss +51 -2
- package/src/components/Board/components/Cell/Cell.tsx +12 -0
- package/src/components/Board/components/Cell/CellPure.tsx +12 -0
- package/src/components/Board/hooks/useGrid.ts +9 -26
- package/src/components/Board/lib/getPositionInGrid.ts +1 -1
- package/src/components/Dictionary/Dictionary.module.scss +4 -0
- package/src/components/DictionaryInput/DictionaryInput.module.scss +1 -0
- package/src/components/EmptyState/EmptyState.module.scss +2 -1
- package/src/components/EmptyState/EmptyState.tsx +1 -2
- package/src/components/Loading/Loading.module.scss +1 -1
- package/src/components/Logo/Logo.tsx +5 -0
- package/src/components/LogoSplashScreen/LogoSplashScreen.module.scss +4 -1
- package/src/components/Modal/Modal.module.scss +14 -0
- package/src/components/Modal/Modal.tsx +4 -1
- package/src/components/PlainTiles/PlainTiles.module.scss +1 -1
- package/src/components/PlainTiles/Tile.tsx +3 -3
- package/src/components/Rack/Rack.module.scss +25 -0
- package/src/components/Rack/Rack.tsx +5 -4
- package/src/components/Rack/RackTile.tsx +6 -13
- package/src/components/Results/HeaderButton.tsx +5 -12
- package/src/components/Results/Result.tsx +5 -3
- package/src/components/Results/Results.module.scss +41 -1
- package/src/components/Results/Results.tsx +29 -43
- package/src/components/Results/types.ts +1 -1
- package/src/components/ResultsInput/ResultsInput.module.scss +1 -0
- package/src/components/Solver/Solver.module.scss +9 -4
- package/src/components/Solver/Solver.tsx +17 -19
- package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +5 -6
- package/src/components/Solver/components/index.ts +0 -1
- package/src/components/Tile/Tile.module.scss +42 -61
- package/src/components/Tile/Tile.tsx +4 -3
- package/src/components/Tile/TilePure.tsx +4 -13
- package/src/components/Tooltip/Tooltip.module.scss +1 -72
- package/src/components/Tooltip/useTooltip.tsx +25 -35
- package/src/components/index.ts +1 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useAppLayout.ts +3 -1
- package/src/i18n/de.json +0 -1
- package/src/i18n/en.json +0 -1
- package/src/i18n/es.json +0 -1
- package/src/i18n/fa.json +0 -1
- package/src/i18n/fr.json +0 -1
- package/src/i18n/pl.json +0 -1
- package/src/lib/createRegExp.ts +13 -0
- package/src/lib/groupResults.ts +38 -0
- package/src/lib/guessLocale.ts +22 -0
- package/src/lib/index.ts +4 -2
- package/src/lib/sortResults.ts +6 -10
- package/src/modals/DictionaryModal/DictionaryModal.module.scss +6 -2
- package/src/modals/KeyMapModal/KeyMapModal.tsx +5 -21
- package/src/modals/KeyMapModal/components/Mapping/Mapping.module.scss +4 -0
- package/src/modals/MenuModal/MenuModal.module.scss +7 -0
- package/src/modals/RemainingTilesModal/components/Character/Character.module.scss +1 -0
- package/src/modals/ResultsModal/ResultsModal.module.scss +3 -3
- package/src/modals/ResultsModal/ResultsModal.tsx +23 -11
- package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +2 -0
- package/src/modals/WordsModal/WordsModal.module.scss +8 -1
- package/src/pages/api/dictionary/[locale]/[word].ts +0 -1
- package/src/pages/api/dictionary/[locale]/index.ts +0 -1
- package/src/pages/api/solve.ts +0 -1
- package/src/pages/api/verify.ts +0 -1
- package/src/pages/api/visit.ts +0 -1
- package/src/pages/index.tsx +13 -15
- package/src/parameters/index.ts +2 -2
- package/src/state/createAppStore.ts +26 -10
- package/src/state/sagas.ts +1 -0
- package/src/state/selectors.ts +37 -37
- package/src/state/slices/boardInitialState.ts +3 -1
- package/src/state/slices/cellFilterInitialState.ts +3 -3
- package/src/state/slices/cellFilterSlice.ts +3 -1
- package/src/state/slices/dictionaryInitialState.ts +2 -2
- package/src/state/slices/rackInitialState.ts +3 -1
- package/src/state/slices/resultsInitialState.ts +11 -4
- package/src/state/slices/settingsInitialState.ts +10 -21
- package/src/state/slices/solveInitialState.ts +2 -2
- package/src/state/slices/solveSlice.ts +2 -0
- package/src/state/slices/verifyInitialState.ts +13 -4
- package/src/state/types.ts +20 -2
- package/src/styles/mixins.scss +25 -1
- package/src/styles/variables.scss +17 -1
- package/src/types/index.ts +10 -2
- package/.next/static/45ye7793DY705HOcuK9lJ/_buildManifest.js +0 -1
- package/.next/static/chunks/pages/_app-d7acee5e526752d9.js +0 -28
- package/.next/static/chunks/pages/index-35d2c1c79a201ae2.js +0 -1
- package/.next/static/css/a48caa6f57de6e98.css +0 -1
- package/.next/static/css/c49bbe944ddd1b39.css +0 -2
- package/src/components/Board/types/index.ts +0 -4
- package/src/components/Solver/components/EmptyState/index.ts +0 -1
- package/src/components/Tooltip/constants.ts +0 -28
- package/src/hooks/useUniqueId.ts +0 -9
- package/src/lib/isCtrl.ts +0 -7
- package/src/state/rootReducer.ts +0 -25
- /package/.next/static/{45ye7793DY705HOcuK9lJ → Mdvi3FY0PqkILKLbPlVBU}/_ssgManifest.js +0 -0
package/src/state/types.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
boardSlice,
|
|
3
|
+
cellFilterSlice,
|
|
4
|
+
dictionarySlice,
|
|
5
|
+
rackSlice,
|
|
6
|
+
resultsSlice,
|
|
7
|
+
settingsSlice,
|
|
8
|
+
solveSlice,
|
|
9
|
+
verifySlice,
|
|
10
|
+
} from './slices';
|
|
2
11
|
|
|
3
|
-
export type RootState =
|
|
12
|
+
export type RootState = {
|
|
13
|
+
board: ReturnType<typeof boardSlice.reducer>;
|
|
14
|
+
cellFilter: ReturnType<typeof cellFilterSlice.reducer>;
|
|
15
|
+
dictionary: ReturnType<typeof dictionarySlice.reducer>;
|
|
16
|
+
rack: ReturnType<typeof rackSlice.reducer>;
|
|
17
|
+
results: ReturnType<typeof resultsSlice.reducer>;
|
|
18
|
+
settings: ReturnType<typeof settingsSlice.reducer>;
|
|
19
|
+
solve: ReturnType<typeof solveSlice.reducer>;
|
|
20
|
+
verify: ReturnType<typeof verifySlice.reducer>;
|
|
21
|
+
};
|
package/src/styles/mixins.scss
CHANGED
|
@@ -12,6 +12,28 @@ $media-expressions: (
|
|
|
12
12
|
touch: '(hover: none)',
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
+
@mixin scrollbars {
|
|
16
|
+
scrollbar-color: var(--scrollbar--thumb--color) var(--scrollbar--thumb--track);
|
|
17
|
+
scrollbar-width: auto;
|
|
18
|
+
|
|
19
|
+
&::-webkit-scrollbar {
|
|
20
|
+
width: var(--scrollbar--size);
|
|
21
|
+
background-color: var(--scrollbar--track--color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&::-webkit-scrollbar-thumb {
|
|
25
|
+
background-color: var(--scrollbar--thumb--color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
scrollbar-color: var(--scrollbar--thumb--color--highlight) var(--scrollbar--track--color);
|
|
30
|
+
|
|
31
|
+
&::-webkit-scrollbar-thumb {
|
|
32
|
+
background-color: var(--scrollbar--thumb--color--highlight);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
15
37
|
/**
|
|
16
38
|
* It does not work when applied on input elements.
|
|
17
39
|
*/
|
|
@@ -21,7 +43,6 @@ $media-expressions: (
|
|
|
21
43
|
position: relative;
|
|
22
44
|
|
|
23
45
|
&::after {
|
|
24
|
-
content: '';
|
|
25
46
|
position: absolute;
|
|
26
47
|
top: 0;
|
|
27
48
|
right: 0;
|
|
@@ -41,6 +62,7 @@ $media-expressions: (
|
|
|
41
62
|
}
|
|
42
63
|
|
|
43
64
|
&::after {
|
|
65
|
+
content: '';
|
|
44
66
|
box-shadow: 0 0 0 var(--focus-effect--size) var(--color--focus);
|
|
45
67
|
}
|
|
46
68
|
}
|
|
@@ -129,6 +151,7 @@ $media-expressions: (
|
|
|
129
151
|
&:nth-child(3) {
|
|
130
152
|
input {
|
|
131
153
|
left: -200%;
|
|
154
|
+
right: 0;
|
|
132
155
|
clip-path: polygon((200% / 3) (100% / 3), 100% (100% / 3), 100% (200% / 3), (200% / 3) (200% / 3));
|
|
133
156
|
}
|
|
134
157
|
}
|
|
@@ -138,6 +161,7 @@ $media-expressions: (
|
|
|
138
161
|
&:nth-last-child(3) {
|
|
139
162
|
input {
|
|
140
163
|
left: 0;
|
|
164
|
+
right: -200%;
|
|
141
165
|
clip-path: polygon(0 (100% / 3), (100% / 3) (100% / 3), (100% / 3) (200% / 3), 0 (200% / 3));
|
|
142
166
|
}
|
|
143
167
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'styles/mixins';
|
|
2
|
+
|
|
1
3
|
$easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
2
4
|
|
|
3
5
|
:root {
|
|
@@ -8,7 +10,7 @@ $easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
8
10
|
--border--width: 1px;
|
|
9
11
|
|
|
10
12
|
--box-shadow: 0 0 var(--box-shadow--blur) var(--box-shadow--spread) var(--box-shadow--color);
|
|
11
|
-
--box-shadow--blur:
|
|
13
|
+
--box-shadow--blur: 8px;
|
|
12
14
|
--box-shadow--color: rgba(0, 0, 0, 0.15);
|
|
13
15
|
--box-shadow--spread: 1px;
|
|
14
16
|
--box-shadow--null: 0 0 var(--box-shadow--blur) var(--box-shadow--spread) transparent;
|
|
@@ -39,6 +41,7 @@ $easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
39
41
|
--color--success: #00a900;
|
|
40
42
|
--color--warning: hsl(35, 90%, 60%);
|
|
41
43
|
--color--primary: var(--color--violet);
|
|
44
|
+
--color--primary--light: var(--color--violet--light);
|
|
42
45
|
--color--primary--opposite: var(--color--white);
|
|
43
46
|
|
|
44
47
|
--color--bonus--character--1: var(--color--yellow--light);
|
|
@@ -74,6 +77,11 @@ $easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
74
77
|
--spacing--xl: 40px;
|
|
75
78
|
--spacing--xxl: 80px;
|
|
76
79
|
|
|
80
|
+
--scrollbar--size: 5px;
|
|
81
|
+
--scrollbar--thumb--color: var(--border--color);
|
|
82
|
+
--scrollbar--thumb--color--highlight: var(--color--foreground--secondary);
|
|
83
|
+
--scrollbar--track--color: transparent;
|
|
84
|
+
|
|
77
85
|
--transition: all var(--transition--duration) var(--transition--easing);
|
|
78
86
|
--transition--long: all var(--transition--duration--long) var(--transition--easing);
|
|
79
87
|
--transition--duration: 100ms;
|
|
@@ -92,4 +100,12 @@ $easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
92
100
|
--solver-column--width: 580px;
|
|
93
101
|
--square-button--size: 32px;
|
|
94
102
|
--text-input--height: 40px;
|
|
103
|
+
|
|
104
|
+
@include media('<s') {
|
|
105
|
+
--box-shadow--blur: 5px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@include media('<xs') {
|
|
109
|
+
--box-shadow--blur: 3px;
|
|
110
|
+
}
|
|
95
111
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -2,6 +2,16 @@ export type Comparator<T> = (a: T, B: T) => number;
|
|
|
2
2
|
|
|
3
3
|
export type Direction = 'horizontal' | 'vertical';
|
|
4
4
|
|
|
5
|
+
export interface Point {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Sort {
|
|
11
|
+
column: ResultColumn;
|
|
12
|
+
direction: SortDirection;
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
export enum SortDirection {
|
|
6
16
|
Ascending = 'ascending',
|
|
7
17
|
Descending = 'descending',
|
|
@@ -30,7 +40,6 @@ export enum ResultColumn {
|
|
|
30
40
|
Word = 'word',
|
|
31
41
|
WordsCount = 'words-count',
|
|
32
42
|
}
|
|
33
|
-
|
|
34
43
|
export type TranslationKey =
|
|
35
44
|
| 'cell.filter-cell'
|
|
36
45
|
| 'cell.set-blank'
|
|
@@ -78,7 +87,6 @@ export type TranslationKey =
|
|
|
78
87
|
| 'rack.tile.location'
|
|
79
88
|
| 'remaining-tiles'
|
|
80
89
|
| 'results'
|
|
81
|
-
| 'results.empty-state.no-filtered-results'
|
|
82
90
|
| 'results.empty-state.no-results'
|
|
83
91
|
| 'results.empty-state.outdated'
|
|
84
92
|
| 'results.empty-state.uninitialized'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/css/a48caa6f57de6e98.css","static/chunks/pages/index-35d2c1c79a201ae2.js"],"/404":["static/chunks/pages/404-e0f30450e9920dc3.js"],"/_error":["static/chunks/pages/_error-54de1933a164a1ff.js"],sortedPages:["/","/404","/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|