@scrabble-solver/scrabble-solver 2.11.4 → 2.11.6
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/export-marker.json +1 -1
- 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/131.js +1 -1
- package/.next/server/chunks/277.js +851 -1179
- package/.next/server/chunks/636.js +286 -0
- package/.next/server/chunks/675.js +550 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -5
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_app.js +73 -9
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js +1 -280
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/api/solve.js +22 -2
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/index.js +381 -314
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/Jmk00rVXCbdjFgP77tKXQ/_buildManifest.js +1 -0
- package/.next/static/chunks/pages/{404-448ba28510855455.js → 404-8176f4acd0cfeb42.js} +1 -1
- package/.next/static/chunks/pages/_app-b4fa92112b8f0385.js +28 -0
- package/.next/static/chunks/pages/index-ccd762f8f5028729.js +1 -0
- package/.next/static/css/1cd302e7648d209c.css +2 -0
- package/.next/static/css/34adfcf12a7d9bb6.css +1 -0
- package/.next/trace +50 -53
- package/next.config.js +1 -0
- package/package.json +12 -13
- package/src/@types/svg.d.ts +1 -1
- package/src/components/Board/Board.tsx +48 -44
- package/src/components/Board/components/Actions/Actions.tsx +4 -2
- package/src/components/Board/components/Cell/Cell.module.scss +59 -5
- package/src/components/Board/hooks/useGrid.ts +5 -3
- package/src/components/Button/Button.module.scss +1 -1
- package/src/components/Dictionary/Dictionary.module.scss +0 -1
- package/src/components/EmptyState/EmptyState.module.scss +0 -1
- package/src/components/Key/Key.module.scss +1 -1
- package/src/components/Loading/Loading.module.scss +1 -1
- package/src/components/Loading/Loading.tsx +1 -1
- package/src/components/Logo/Logo.tsx +10 -12
- package/src/components/Logo/LogoBlueprint.tsx +21 -0
- package/src/components/Logo/index.ts +1 -1
- package/src/components/Modal/Modal.module.scss +1 -6
- package/src/components/Modal/Modal.tsx +15 -8
- package/src/components/NavButtons/NavButtons.tsx +2 -2
- package/src/components/PlainTiles/PlainTiles.tsx +0 -10
- package/src/components/PlainTiles/Tile.tsx +1 -4
- package/src/components/Rack/Rack.module.scss +59 -0
- package/src/components/Results/HeaderButton.tsx +6 -6
- package/src/components/Results/Results.module.scss +3 -1
- package/src/components/Results/Results.tsx +7 -7
- package/src/components/Results/useColumns.ts +2 -5
- package/src/components/Solver/Solver.tsx +6 -23
- package/src/components/Tile/Tile.module.scss +2 -1
- package/src/components/Tile/Tile.tsx +8 -4
- package/src/components/index.ts +0 -5
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useAppLayout.ts +62 -12
- package/src/hooks/useDirection.ts +2 -2
- package/src/hooks/useEffectOnce.ts +5 -0
- package/src/hooks/useIsTouchDevice.ts +1 -1
- package/src/hooks/useLanguage.ts +2 -2
- package/src/hooks/useLatest.ts +13 -0
- package/src/hooks/useLocalStorage.ts +51 -0
- package/src/hooks/useMedia.ts +36 -0
- package/src/hooks/useMediaQueries.ts +13 -0
- package/src/hooks/useMediaQuery.ts +2 -1
- package/src/hooks/useOnWindowResize.ts +13 -0
- package/src/hooks/useViewportSize.ts +19 -0
- package/src/i18n/constants.ts +14 -22
- package/src/lib/arrayEquals.ts +5 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/zipCharactersAndTiles.ts +3 -1
- package/src/modals/DictionaryModal/DictionaryModal.tsx +2 -2
- package/src/modals/KeyMapModal/KeyMapModal.tsx +2 -2
- package/src/modals/KeyMapModal/components/Mapping/Mapping.module.scss +0 -1
- package/src/modals/KeyMapModal/keys.tsx +0 -2
- package/src/modals/MenuModal/MenuModal.module.scss +28 -4
- package/src/modals/MenuModal/MenuModal.tsx +4 -4
- package/src/modals/RemainingTilesModal/RemainingTilesModal.tsx +2 -2
- package/src/modals/ResultsModal/ResultsModal.module.scss +1 -5
- package/src/modals/ResultsModal/ResultsModal.tsx +10 -2
- package/src/modals/SettingsModal/SettingsModal.tsx +2 -2
- package/src/modals/SettingsModal/components/AutoGroupTilesSetting/lib.ts +3 -1
- package/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.module.scss +0 -1
- package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +1 -6
- package/src/modals/WordsModal/WordsModal.tsx +2 -2
- package/src/pages/index.module.scss +3 -21
- package/src/pages/index.tsx +51 -69
- package/src/parameters/index.ts +29 -2
- package/src/state/localStorage.ts +13 -2
- package/src/state/sagas.ts +16 -8
- package/src/state/slices/boardInitialState.ts +5 -1
- package/src/state/slices/boardSlice.ts +2 -2
- package/src/state/slices/rackInitialState.ts +8 -2
- package/src/state/slices/rackSlice.ts +16 -13
- package/src/state/slices/settingsInitialState.ts +9 -4
- package/src/state/slices/settingsSlice.ts +3 -1
- package/src/styles/animations.scss +0 -20
- package/src/styles/global.scss +4 -15
- package/src/styles/mixins.scss +0 -60
- package/src/styles/variables.scss +14 -5
- package/src/types/index.ts +4 -0
- package/.next/static/MvHZRF4XuJ7g8LLLRkf8U/_buildManifest.js +0 -1
- package/.next/static/chunks/pages/_app-66d80a5594aab8dc.js +0 -28
- package/.next/static/chunks/pages/index-0858deea02b2a417.js +0 -1
- package/.next/static/css/885da289cec275b3.css +0 -1
- package/.next/static/css/ea1c8134fe9a143e.css +0 -2
- package/src/components/LogoSplashScreen/LogoSplashScreen.module.scss +0 -65
- package/src/components/LogoSplashScreen/LogoSplashScreen.tsx +0 -31
- package/src/components/LogoSplashScreen/index.ts +0 -1
- package/src/components/Sizer/Sizer.module.scss +0 -10
- package/src/components/Sizer/Sizer.tsx +0 -10
- package/src/components/Sizer/index.ts +0 -1
- package/src/components/SplashScreen/SplashScreen.module.scss +0 -14
- package/src/components/SplashScreen/SplashScreen.tsx +0 -19
- package/src/components/SplashScreen/index.ts +0 -1
- package/src/components/SvgFontCss/SvgFontCss.tsx +0 -14
- package/src/components/SvgFontCss/createCss.ts +0 -11
- package/src/components/SvgFontCss/createStyle.ts +0 -9
- package/src/components/SvgFontCss/createSvg.ts +0 -10
- package/src/components/SvgFontCss/index.ts +0 -1
- package/src/components/SvgFontFix/SvgFontFix.module.scss +0 -5
- package/src/components/SvgFontFix/SvgFontFix.tsx +0 -21
- package/src/components/SvgFontFix/index.ts +0 -1
- package/src/hooks/useLocalStorage/index.ts +0 -1
- package/src/hooks/useLocalStorage/useLocalStorage.ts +0 -13
- package/src/hooks/useLocalStorage/useLocalStorageBoard.ts +0 -29
- package/src/hooks/useLocalStorage/useLocalStorageConfigId.ts +0 -29
- package/src/hooks/useLocalStorage/useLocalStorageLocale.ts +0 -32
- package/src/hooks/useLocalStorage/useLocalStorageRack.ts +0 -29
- /package/.next/static/{MvHZRF4XuJ7g8LLLRkf8U → Jmk00rVXCbdjFgP77tKXQ}/_ssgManifest.js +0 -0
- /package/{src/components/Logo/Logo.svg → public/logo.svg} +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Board, Locale } from '@scrabble-solver/types';
|
|
2
2
|
import store2 from 'store2';
|
|
3
3
|
|
|
4
|
+
import { AutoGroupTiles, Rack } from 'types';
|
|
5
|
+
|
|
6
|
+
const AUTO_GROUP_TILES = 'auto-group-tiles';
|
|
4
7
|
const BOARD = 'board';
|
|
5
8
|
const CONFIG_ID = 'config-id';
|
|
6
9
|
const LOCALE = 'locale';
|
|
@@ -9,6 +12,14 @@ const RACK = 'rack';
|
|
|
9
12
|
const store = store2.namespace('scrabble-solver');
|
|
10
13
|
|
|
11
14
|
const localStorage = {
|
|
15
|
+
getAutoGroupTiles(): AutoGroupTiles | undefined {
|
|
16
|
+
return store.get(AUTO_GROUP_TILES);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
setAutoGroupTiles(autoGroupTiles: AutoGroupTiles | undefined): void {
|
|
20
|
+
store.set(AUTO_GROUP_TILES, autoGroupTiles, true);
|
|
21
|
+
},
|
|
22
|
+
|
|
12
23
|
getBoard(): Board | undefined {
|
|
13
24
|
const serialized = store.get(BOARD);
|
|
14
25
|
return serialized ? Board.fromJson(JSON.parse(serialized)) : serialized;
|
|
@@ -35,11 +46,11 @@ const localStorage = {
|
|
|
35
46
|
store.set(LOCALE, locale, true);
|
|
36
47
|
},
|
|
37
48
|
|
|
38
|
-
getRack():
|
|
49
|
+
getRack(): Rack | undefined {
|
|
39
50
|
return store.get(RACK);
|
|
40
51
|
},
|
|
41
52
|
|
|
42
|
-
setRack(rack:
|
|
53
|
+
setRack(rack: Rack | undefined): void {
|
|
43
54
|
store.set(RACK, rack, true);
|
|
44
55
|
},
|
|
45
56
|
};
|
package/src/state/sagas.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
|
|
1
3
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
4
|
import { COMMA_ARABIC, COMMA_LATIN } from '@scrabble-solver/constants';
|
|
3
5
|
import { Locale, Result } from '@scrabble-solver/types';
|
|
@@ -15,6 +17,7 @@ import {
|
|
|
15
17
|
selectDictionary,
|
|
16
18
|
selectLocale,
|
|
17
19
|
selectLocaleAutoGroupTiles,
|
|
20
|
+
selectRack,
|
|
18
21
|
} from './selectors';
|
|
19
22
|
import {
|
|
20
23
|
boardSlice,
|
|
@@ -105,9 +108,14 @@ function* onDictionarySubmit(): AnyGenerator {
|
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
function* onInitialize(): AnyGenerator {
|
|
111
|
+
const board = yield select(selectBoard);
|
|
112
|
+
|
|
108
113
|
yield call(visit);
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
if (!board.isEmpty()) {
|
|
116
|
+
yield* ensureProperTilesCount();
|
|
117
|
+
yield put(verifySlice.actions.submit());
|
|
118
|
+
}
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
function* onReset(): AnyGenerator {
|
|
@@ -191,13 +199,13 @@ function* onVerify(): AnyGenerator {
|
|
|
191
199
|
|
|
192
200
|
function* ensureProperTilesCount(): AnyGenerator {
|
|
193
201
|
const { config } = yield select(selectConfig);
|
|
194
|
-
const
|
|
202
|
+
const rack = yield select(selectRack);
|
|
195
203
|
|
|
196
|
-
if (config.maximumCharactersCount >
|
|
197
|
-
const differenceCount = Math.abs(config.maximumCharactersCount -
|
|
198
|
-
yield put(rackSlice.actions.init([...
|
|
199
|
-
} else if (config.maximumCharactersCount <
|
|
200
|
-
const nonNulls =
|
|
204
|
+
if (config.maximumCharactersCount > rack.length) {
|
|
205
|
+
const differenceCount = Math.abs(config.maximumCharactersCount - rack.length);
|
|
206
|
+
yield put(rackSlice.actions.init([...rack, ...Array(differenceCount).fill(null)]));
|
|
207
|
+
} else if (config.maximumCharactersCount < rack.length) {
|
|
208
|
+
const nonNulls = rack.filter(Boolean).slice(0, config.maximumCharactersCount);
|
|
201
209
|
const differenceCount = Math.abs(config.maximumCharactersCount - nonNulls.length);
|
|
202
210
|
const autoGroupTiles = yield select(selectLocaleAutoGroupTiles);
|
|
203
211
|
yield put(rackSlice.actions.init([...nonNulls, ...Array(differenceCount).fill(null)]));
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { getLocaleConfig } from '@scrabble-solver/configs';
|
|
2
2
|
import { Board } from '@scrabble-solver/types';
|
|
3
3
|
|
|
4
|
+
import localStorage from '../localStorage';
|
|
5
|
+
|
|
4
6
|
import settingsInitialState from './settingsInitialState';
|
|
5
7
|
|
|
6
8
|
export type BoardState = Board;
|
|
7
9
|
|
|
8
10
|
const { configId, locale } = settingsInitialState;
|
|
9
11
|
const { boardHeight, boardWidth } = getLocaleConfig(configId, locale);
|
|
10
|
-
const
|
|
12
|
+
export const boardDefaultState = Board.create(boardWidth, boardHeight);
|
|
13
|
+
|
|
14
|
+
const boardInitialState: BoardState = localStorage.getBoard() || boardDefaultState;
|
|
11
15
|
|
|
12
16
|
// const createOxyphenbutazone = () => {
|
|
13
17
|
// // Tiles: oypbaze
|
|
@@ -2,7 +2,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { EMPTY_CELL } from '@scrabble-solver/constants';
|
|
3
3
|
import { Board, Cell, Result, Tile } from '@scrabble-solver/types';
|
|
4
4
|
|
|
5
|
-
import boardInitialState from './boardInitialState';
|
|
5
|
+
import boardInitialState, { boardDefaultState } from './boardInitialState';
|
|
6
6
|
|
|
7
7
|
const boardSlice = createSlice({
|
|
8
8
|
initialState: boardInitialState,
|
|
@@ -43,7 +43,7 @@ const boardSlice = createSlice({
|
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
reset: () => {
|
|
46
|
-
return
|
|
46
|
+
return boardDefaultState;
|
|
47
47
|
},
|
|
48
48
|
|
|
49
49
|
toggleCellIsBlank: (state, action: PayloadAction<{ x: number; y: number }>) => {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { Rack } from 'types';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import localStorage from '../localStorage';
|
|
4
|
+
|
|
5
|
+
export type RackState = Rack;
|
|
6
|
+
|
|
7
|
+
export const rackDefaultState: RackState = [null, null, null, null, null, null, null];
|
|
8
|
+
|
|
9
|
+
const rackInitialState: RackState = localStorage.getRack() || rackDefaultState;
|
|
4
10
|
|
|
5
11
|
export default rackInitialState;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { Tile } from '@scrabble-solver/types';
|
|
3
3
|
|
|
4
|
-
import { createNullMovingComparator, inverseDirection, zipCharactersAndTiles } from 'lib';
|
|
4
|
+
import { arrayEquals, createNullMovingComparator, inverseDirection, zipCharactersAndTiles } from 'lib';
|
|
5
|
+
import { AutoGroupTiles, Rack } from 'types';
|
|
5
6
|
|
|
6
|
-
import rackInitialState from './rackInitialState';
|
|
7
|
+
import rackInitialState, { rackDefaultState } from './rackInitialState';
|
|
7
8
|
|
|
8
9
|
const rackSlice = createSlice({
|
|
9
10
|
initialState: rackInitialState,
|
|
@@ -14,28 +15,30 @@ const rackSlice = createSlice({
|
|
|
14
15
|
return [...state.slice(0, index), character, ...state.slice(index + 1)];
|
|
15
16
|
},
|
|
16
17
|
|
|
17
|
-
changeCharacters: (state, action: PayloadAction<{ characters:
|
|
18
|
+
changeCharacters: (state, action: PayloadAction<{ characters: Rack; index: number }>) => {
|
|
18
19
|
const { characters, index } = action.payload;
|
|
20
|
+
|
|
21
|
+
if (characters.length === 0) {
|
|
22
|
+
return state;
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
const expectedRackLength = state.length;
|
|
20
26
|
const rack = [...state.slice(0, index), ...characters, ...state.slice(index + characters.length)];
|
|
21
27
|
return rack.slice(0, expectedRackLength);
|
|
22
28
|
},
|
|
23
29
|
|
|
24
|
-
groupTiles: (state, action: PayloadAction<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (direction === null) {
|
|
30
|
+
groupTiles: (state, action: PayloadAction<AutoGroupTiles>) => {
|
|
31
|
+
if (action.payload === null) {
|
|
28
32
|
return state;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
const nullMovingComparator = createNullMovingComparator(inverseDirection(
|
|
35
|
+
const nullMovingComparator = createNullMovingComparator(inverseDirection(action.payload));
|
|
32
36
|
const sortedTiles = [...state].sort(nullMovingComparator);
|
|
33
|
-
return sortedTiles;
|
|
37
|
+
return arrayEquals(state, sortedTiles) ? state : sortedTiles;
|
|
34
38
|
},
|
|
35
39
|
|
|
36
|
-
init: (
|
|
37
|
-
|
|
38
|
-
return rack;
|
|
40
|
+
init: (state, action: PayloadAction<Rack>) => {
|
|
41
|
+
return arrayEquals(state, action.payload) ? state : action.payload;
|
|
39
42
|
},
|
|
40
43
|
|
|
41
44
|
removeTiles: (state, action: PayloadAction<Tile[]>) => {
|
|
@@ -45,7 +48,7 @@ const rackSlice = createSlice({
|
|
|
45
48
|
return charactersWithoutMatchingTiles;
|
|
46
49
|
},
|
|
47
50
|
|
|
48
|
-
reset: () =>
|
|
51
|
+
reset: () => rackDefaultState,
|
|
49
52
|
},
|
|
50
53
|
});
|
|
51
54
|
|
|
@@ -2,17 +2,22 @@ import { literaki, scrabble } from '@scrabble-solver/configs';
|
|
|
2
2
|
import { Locale } from '@scrabble-solver/types';
|
|
3
3
|
|
|
4
4
|
import { guessLocale } from 'lib';
|
|
5
|
+
import { AutoGroupTiles } from 'types';
|
|
6
|
+
|
|
7
|
+
import localStorage from '../localStorage';
|
|
5
8
|
|
|
6
9
|
export interface SettingsState {
|
|
7
|
-
autoGroupTiles:
|
|
10
|
+
autoGroupTiles: AutoGroupTiles;
|
|
8
11
|
configId: typeof literaki.id | typeof scrabble.id;
|
|
9
12
|
locale: Locale;
|
|
10
13
|
}
|
|
11
14
|
|
|
15
|
+
const localStorageAutoGroupTiles = localStorage.getAutoGroupTiles();
|
|
16
|
+
|
|
12
17
|
const settingsInitialState: SettingsState = {
|
|
13
|
-
autoGroupTiles: 'left',
|
|
14
|
-
configId: scrabble.id,
|
|
15
|
-
locale: guessLocale(),
|
|
18
|
+
autoGroupTiles: typeof localStorageAutoGroupTiles === 'undefined' ? 'left' : localStorageAutoGroupTiles,
|
|
19
|
+
configId: localStorage.getConfigId() || scrabble.id,
|
|
20
|
+
locale: localStorage.getLocale() || guessLocale(),
|
|
16
21
|
};
|
|
17
22
|
|
|
18
23
|
export default settingsInitialState;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { Locale } from '@scrabble-solver/types';
|
|
3
3
|
|
|
4
|
+
import { AutoGroupTiles } from 'types';
|
|
5
|
+
|
|
4
6
|
import settingsInitialState from './settingsInitialState';
|
|
5
7
|
|
|
6
8
|
const settingsSlice = createSlice({
|
|
7
9
|
initialState: settingsInitialState,
|
|
8
10
|
name: 'settings',
|
|
9
11
|
reducers: {
|
|
10
|
-
changeAutoGroupTiles: (state, action: PayloadAction<
|
|
12
|
+
changeAutoGroupTiles: (state, action: PayloadAction<AutoGroupTiles>) => {
|
|
11
13
|
const autoGroupTiles = action.payload;
|
|
12
14
|
return { ...state, autoGroupTiles };
|
|
13
15
|
},
|
|
@@ -18,16 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
@keyframes progress {
|
|
22
|
-
0% {
|
|
23
|
-
clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
100% {
|
|
27
|
-
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
21
|
@keyframes rotate {
|
|
32
22
|
0% {
|
|
33
23
|
transform: rotate(0deg);
|
|
@@ -38,16 +28,6 @@
|
|
|
38
28
|
}
|
|
39
29
|
}
|
|
40
30
|
|
|
41
|
-
@keyframes pulse {
|
|
42
|
-
0% {
|
|
43
|
-
transform: scale(1);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
100% {
|
|
47
|
-
transform: scale(1.2);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
31
|
@keyframes wave {
|
|
52
32
|
$offset: 6px;
|
|
53
33
|
|
package/src/styles/global.scss
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Open+Sans:wght@400;700&family=Vazirmatn:wght@300;400;700&family=Roboto+Mono&display=swap');
|
|
2
|
-
|
|
3
1
|
@import '~normalize.css';
|
|
4
2
|
|
|
5
3
|
@import './mixins';
|
|
@@ -11,6 +9,10 @@
|
|
|
11
9
|
box-sizing: border-box;
|
|
12
10
|
}
|
|
13
11
|
|
|
12
|
+
* {
|
|
13
|
+
font-family: var(--font--family);
|
|
14
|
+
}
|
|
15
|
+
|
|
14
16
|
html,
|
|
15
17
|
body {
|
|
16
18
|
margin: 0 auto;
|
|
@@ -20,16 +22,8 @@ body {
|
|
|
20
22
|
body {
|
|
21
23
|
background-color: var(--color--background);
|
|
22
24
|
color: var(--color--foreground);
|
|
23
|
-
font-family: var(--font--family);
|
|
24
25
|
font-size: var(--font--size--m);
|
|
25
26
|
line-height: var(--line-height);
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
html,
|
|
30
|
-
body,
|
|
31
|
-
#__next {
|
|
32
|
-
height: 100%;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
29
|
a {
|
|
@@ -51,8 +45,3 @@ h4 {
|
|
|
51
45
|
-webkit-margin-after: 0;
|
|
52
46
|
margin: 0;
|
|
53
47
|
}
|
|
54
|
-
|
|
55
|
-
[lang='fa-IR'] {
|
|
56
|
-
--font--family: 'Vazirmatn', sans-serif;
|
|
57
|
-
--font--family--title: var(--font--family);
|
|
58
|
-
}
|
package/src/styles/mixins.scss
CHANGED
|
@@ -103,69 +103,9 @@ $media-expressions: (
|
|
|
103
103
|
padding: 0 var(--spacing--l);
|
|
104
104
|
transition: var(--transition);
|
|
105
105
|
font-size: var(--font--size--m);
|
|
106
|
-
font-family: var(--font--family);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
@mixin text-stroke($color, $size: 1px) {
|
|
110
109
|
text-shadow: $size 0 $color, (-$size) 0 $color, 0 $size $color, 0 (-$size) $color, (-$size) (-$size) $color,
|
|
111
110
|
(-$size) $size $color, $size (-$size) $color, $size $size $color;
|
|
112
111
|
}
|
|
113
|
-
|
|
114
|
-
@mixin lighthouse-input-size-hack {
|
|
115
|
-
// Hack for this Lighthouse warning:
|
|
116
|
-
// > Interactive elements like buttons and links should be large enough (48x48px), and have
|
|
117
|
-
// > enough space around them, to be easy enough to tap without overlapping onto other elements.
|
|
118
|
-
|
|
119
|
-
input {
|
|
120
|
-
position: absolute;
|
|
121
|
-
top: -100%;
|
|
122
|
-
right: -100%;
|
|
123
|
-
left: -100%;
|
|
124
|
-
bottom: -100%;
|
|
125
|
-
width: 300%;
|
|
126
|
-
height: 300%;
|
|
127
|
-
clip-path: inset((100% / 3));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
[dir='ltr'] & {
|
|
131
|
-
&:nth-child(1),
|
|
132
|
-
&:nth-child(2),
|
|
133
|
-
&:nth-child(3) {
|
|
134
|
-
input {
|
|
135
|
-
left: 0;
|
|
136
|
-
clip-path: polygon(0 (100% / 3), (100% / 3) (100% / 3), (100% / 3) (200% / 3), 0 (200% / 3));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&:nth-last-child(1),
|
|
141
|
-
&:nth-last-child(2),
|
|
142
|
-
&:nth-last-child(3) {
|
|
143
|
-
input {
|
|
144
|
-
left: -200%;
|
|
145
|
-
clip-path: polygon((200% / 3) (100% / 3), 100% (100% / 3), 100% (200% / 3), (200% / 3) (200% / 3));
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
[dir='rtl'] & {
|
|
151
|
-
&:nth-child(1),
|
|
152
|
-
&:nth-child(2),
|
|
153
|
-
&:nth-child(3) {
|
|
154
|
-
input {
|
|
155
|
-
left: -200%;
|
|
156
|
-
right: 0;
|
|
157
|
-
clip-path: polygon((200% / 3) (100% / 3), 100% (100% / 3), 100% (200% / 3), (200% / 3) (200% / 3));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&:nth-last-child(1),
|
|
162
|
-
&:nth-last-child(2),
|
|
163
|
-
&:nth-last-child(3) {
|
|
164
|
-
input {
|
|
165
|
-
left: 0;
|
|
166
|
-
right: -200%;
|
|
167
|
-
clip-path: polygon(0 (100% / 3), (100% / 3) (100% / 3), (100% / 3) (200% / 3), 0 (200% / 3));
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -60,11 +60,9 @@ $easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
60
60
|
--color--tooltip--background: #222;
|
|
61
61
|
--color--tooltip--foreground: var(--color--white);
|
|
62
62
|
|
|
63
|
-
--font--family:
|
|
64
|
-
--font--family--
|
|
65
|
-
|
|
66
|
-
--font--family--monospace: 'Roboto Mono', monospace;
|
|
67
|
-
--font--family--title: 'Lato', sans-serif;
|
|
63
|
+
--font--family: system-ui, sans-serif;
|
|
64
|
+
--font--family--monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono',
|
|
65
|
+
monospace;
|
|
68
66
|
--font--size--h1: 30px;
|
|
69
67
|
--font--size--h2: 22px;
|
|
70
68
|
--font--size--h3: 18px;
|
|
@@ -108,13 +106,24 @@ $easeOutSine: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
108
106
|
|
|
109
107
|
--button--icon--size: 24px;
|
|
110
108
|
--dictionary--height: 260px;
|
|
109
|
+
--dictionary--height--mobile: 110px;
|
|
110
|
+
--logo--aspect-ratio: 682 / 166;
|
|
111
|
+
--logo--height: 60px;
|
|
111
112
|
--modal--width: 370px;
|
|
113
|
+
--nav--height: calc(var(--logo--height) + var(--nav--padding));
|
|
114
|
+
--nav--padding: var(--spacing--l);
|
|
112
115
|
--solver-column--width: 580px;
|
|
113
116
|
--square-button--size: 32px;
|
|
114
117
|
--text-input--height: 40px;
|
|
115
118
|
|
|
119
|
+
@include media('<l') {
|
|
120
|
+
--dictionary--height: var(--dictionary--height--mobile);
|
|
121
|
+
--logo--height: 48px;
|
|
122
|
+
}
|
|
123
|
+
|
|
116
124
|
@include media('<s') {
|
|
117
125
|
--box-shadow--blur: 5px;
|
|
126
|
+
--modal--width: 100%;
|
|
118
127
|
}
|
|
119
128
|
|
|
120
129
|
@include media('<xs') {
|
package/src/types/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type Comparator<T> = (a: T, B: T) => number;
|
|
2
2
|
|
|
3
|
+
export type AutoGroupTiles = 'left' | 'right' | null;
|
|
4
|
+
|
|
3
5
|
export type Direction = 'horizontal' | 'vertical';
|
|
4
6
|
|
|
5
7
|
export interface Point {
|
|
@@ -7,6 +9,8 @@ export interface Point {
|
|
|
7
9
|
y: number;
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
export type Rack = (string | null)[];
|
|
13
|
+
|
|
10
14
|
export interface Sort {
|
|
11
15
|
column: ResultColumn;
|
|
12
16
|
direction: SortDirection;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/css/885da289cec275b3.css","static/chunks/pages/index-0858deea02b2a417.js"],"/404":["static/chunks/pages/404-448ba28510855455.js"],"/_error":["static/chunks/pages/_error-54de1933a164a1ff.js"],sortedPages:["/","/404","/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|