@scrabble-solver/scrabble-solver 2.11.5 → 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/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 +133 -312
- 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.nft.json +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/index.js +0 -2
- 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-d30fe85d005ce32b.js → 404-8176f4acd0cfeb42.js} +1 -1
- package/.next/static/chunks/pages/_app-b4fa92112b8f0385.js +28 -0
- package/.next/static/chunks/pages/{index-3fd280f406cc00fd.js → index-ccd762f8f5028729.js} +1 -1
- package/.next/static/css/1cd302e7648d209c.css +2 -0
- package/.next/static/css/34adfcf12a7d9bb6.css +1 -0
- package/.next/trace +50 -50
- package/package.json +9 -9
- package/src/components/Board/components/Cell/Cell.module.scss +0 -4
- 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/PlainTiles/PlainTiles.tsx +0 -10
- package/src/components/PlainTiles/Tile.tsx +1 -4
- package/src/components/Results/Results.module.scss +0 -1
- package/src/components/index.ts +0 -2
- package/src/hooks/useDirection.ts +2 -2
- package/src/hooks/useLanguage.ts +2 -2
- package/src/i18n/constants.ts +0 -8
- package/src/modals/KeyMapModal/components/Mapping/Mapping.module.scss +0 -1
- package/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.module.scss +0 -1
- package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +0 -5
- package/src/pages/index.tsx +1 -3
- package/src/styles/global.scss +4 -8
- package/src/styles/mixins.scss +0 -1
- package/src/styles/variables.scss +3 -5
- package/.next/static/UzQCOB6CHhyOupkEq8oZM/_buildManifest.js +0 -1
- package/.next/static/chunks/pages/_app-e27464a187a58684.js +0 -28
- package/.next/static/css/4bd04cebe207859c.css +0 -1
- package/.next/static/css/5b3b78170f4c5875.css +0 -2
- 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/.next/static/{UzQCOB6CHhyOupkEq8oZM → Jmk00rVXCbdjFgP77tKXQ}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/scrabble-solver",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.6",
|
|
4
4
|
"description": "Scrabble Solver 2 - App",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16"
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"@floating-ui/react": "^0.21.1",
|
|
32
32
|
"@kamilmielnik/trie": "^2.0.1",
|
|
33
33
|
"@reduxjs/toolkit": "^1.9.3",
|
|
34
|
-
"@scrabble-solver/configs": "^2.11.
|
|
35
|
-
"@scrabble-solver/constants": "^2.11.
|
|
36
|
-
"@scrabble-solver/dictionaries": "^2.11.
|
|
37
|
-
"@scrabble-solver/logger": "^2.11.
|
|
38
|
-
"@scrabble-solver/solver": "^2.11.
|
|
39
|
-
"@scrabble-solver/types": "^2.11.
|
|
40
|
-
"@scrabble-solver/word-definitions": "^2.11.
|
|
34
|
+
"@scrabble-solver/configs": "^2.11.6",
|
|
35
|
+
"@scrabble-solver/constants": "^2.11.6",
|
|
36
|
+
"@scrabble-solver/dictionaries": "^2.11.6",
|
|
37
|
+
"@scrabble-solver/logger": "^2.11.6",
|
|
38
|
+
"@scrabble-solver/solver": "^2.11.6",
|
|
39
|
+
"@scrabble-solver/types": "^2.11.6",
|
|
40
|
+
"@scrabble-solver/word-definitions": "^2.11.6",
|
|
41
41
|
"classnames": "^2.3.2",
|
|
42
42
|
"include-media": "^2.0.0",
|
|
43
43
|
"include-media-query-builder": "^1.1.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"sass": "^1.59.3",
|
|
72
72
|
"workbox-webpack-plugin": "^6.5.4"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "7075b82ef54cfb37e153152040c432639c3b1a99"
|
|
75
75
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { CSSProperties, FunctionComponent, useMemo } from 'react';
|
|
3
3
|
|
|
4
|
-
import { LOCALE_FEATURES } from 'i18n';
|
|
5
|
-
import { selectLocale, useTypedSelector } from 'state';
|
|
6
|
-
|
|
7
|
-
import SvgFontCss from '../SvgFontCss';
|
|
8
|
-
|
|
9
4
|
import { createPlainTiles, getViewbox } from './lib';
|
|
10
5
|
import styles from './PlainTiles.module.scss';
|
|
11
6
|
import Tile from './Tile';
|
|
@@ -21,8 +16,6 @@ interface Props {
|
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
const PlainTiles: FunctionComponent<Props> = ({ className, color, content, dropShadow, showPoints, style, wave }) => {
|
|
24
|
-
const locale = useTypedSelector(selectLocale);
|
|
25
|
-
const { fontFamily } = LOCALE_FEATURES[locale];
|
|
26
19
|
const tiles = useMemo(() => createPlainTiles({ color, content, showPoints }), [color, content, showPoints]);
|
|
27
20
|
|
|
28
21
|
return (
|
|
@@ -35,14 +28,11 @@ const PlainTiles: FunctionComponent<Props> = ({ className, color, content, dropS
|
|
|
35
28
|
viewBox={getViewbox(content)}
|
|
36
29
|
xmlns="http://www.w3.org/2000/svg"
|
|
37
30
|
>
|
|
38
|
-
<SvgFontCss fontFamily={fontFamily} />
|
|
39
|
-
|
|
40
31
|
{tiles.map((tile, index) => (
|
|
41
32
|
<Tile
|
|
42
33
|
character={tile.character}
|
|
43
34
|
className={styles.tile}
|
|
44
35
|
color={tile.color}
|
|
45
|
-
fontFamily={fontFamily}
|
|
46
36
|
key={index}
|
|
47
37
|
points={tile.points}
|
|
48
38
|
size={tile.size}
|
|
@@ -4,7 +4,6 @@ interface Props {
|
|
|
4
4
|
character: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
color: string;
|
|
7
|
-
fontFamily: string;
|
|
8
7
|
points?: number;
|
|
9
8
|
size: number;
|
|
10
9
|
transform?: string;
|
|
@@ -12,13 +11,12 @@ interface Props {
|
|
|
12
11
|
y: number;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
const Tile: FunctionComponent<Props> = ({ character, className, color,
|
|
14
|
+
const Tile: FunctionComponent<Props> = ({ character, className, color, points, size, transform, x, y }) => (
|
|
16
15
|
<g className={className} transform={transform}>
|
|
17
16
|
<rect fill={color} height={size} rx={size * 0.15} width={size} x={x} y={y} />
|
|
18
17
|
|
|
19
18
|
<text
|
|
20
19
|
dominantBaseline="central"
|
|
21
|
-
fontFamily={fontFamily}
|
|
22
20
|
fontSize={size * 0.6}
|
|
23
21
|
fontWeight="bold"
|
|
24
22
|
textAnchor="middle"
|
|
@@ -31,7 +29,6 @@ const Tile: FunctionComponent<Props> = ({ character, className, color, fontFamil
|
|
|
31
29
|
{typeof points === 'number' && (
|
|
32
30
|
<text
|
|
33
31
|
dominantBaseline="text-after-edge"
|
|
34
|
-
fontFamily={fontFamily}
|
|
35
32
|
fontSize={size * 0.25}
|
|
36
33
|
fontWeight="bold"
|
|
37
34
|
textAnchor="end"
|
package/src/components/index.ts
CHANGED
|
@@ -22,7 +22,5 @@ export { default as ResultsInput } from './ResultsInput';
|
|
|
22
22
|
export { default as SeoMessage } from './SeoMessage';
|
|
23
23
|
export { default as Solver } from './Solver';
|
|
24
24
|
export { default as Spinner } from './Spinner';
|
|
25
|
-
export { default as SvgFontCss } from './SvgFontCss';
|
|
26
|
-
export { default as SvgFontFix } from './SvgFontFix';
|
|
27
25
|
export { default as Tile } from './Tile';
|
|
28
26
|
export { useTooltip } from './Tooltip';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
import { noop } from 'lib';
|
|
4
4
|
|
|
5
5
|
const useDirection = (direction: 'ltr' | 'rtl') => {
|
|
6
|
-
|
|
6
|
+
useEffect(() => {
|
|
7
7
|
const html = document.body.parentElement;
|
|
8
8
|
|
|
9
9
|
if (!html) {
|
package/src/hooks/useLanguage.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
import { noop } from 'lib';
|
|
4
4
|
|
|
5
5
|
const useLanguage = (language: string) => {
|
|
6
|
-
|
|
6
|
+
useEffect(() => {
|
|
7
7
|
const html = document.body.parentElement;
|
|
8
8
|
|
|
9
9
|
if (!html) {
|
package/src/i18n/constants.ts
CHANGED
|
@@ -7,7 +7,6 @@ import styles from './i18n.module.scss';
|
|
|
7
7
|
|
|
8
8
|
interface LocaleFeatures {
|
|
9
9
|
direction: 'ltr' | 'rtl';
|
|
10
|
-
fontFamily: string;
|
|
11
10
|
consonants: boolean;
|
|
12
11
|
vowels: boolean;
|
|
13
12
|
}
|
|
@@ -15,43 +14,36 @@ interface LocaleFeatures {
|
|
|
15
14
|
export const LOCALE_FEATURES: Record<Locale, LocaleFeatures> = {
|
|
16
15
|
[Locale.DE_DE]: {
|
|
17
16
|
direction: 'ltr',
|
|
18
|
-
fontFamily: 'Open Sans',
|
|
19
17
|
consonants: true,
|
|
20
18
|
vowels: true,
|
|
21
19
|
},
|
|
22
20
|
[Locale.EN_GB]: {
|
|
23
21
|
direction: 'ltr',
|
|
24
|
-
fontFamily: 'Open Sans',
|
|
25
22
|
consonants: true,
|
|
26
23
|
vowels: true,
|
|
27
24
|
},
|
|
28
25
|
[Locale.EN_US]: {
|
|
29
26
|
direction: 'ltr',
|
|
30
|
-
fontFamily: 'Open Sans',
|
|
31
27
|
consonants: true,
|
|
32
28
|
vowels: true,
|
|
33
29
|
},
|
|
34
30
|
[Locale.ES_ES]: {
|
|
35
31
|
direction: 'ltr',
|
|
36
|
-
fontFamily: 'Open Sans',
|
|
37
32
|
consonants: true,
|
|
38
33
|
vowels: true,
|
|
39
34
|
},
|
|
40
35
|
[Locale.FA_IR]: {
|
|
41
36
|
direction: 'rtl',
|
|
42
|
-
fontFamily: 'Vazirmatn',
|
|
43
37
|
consonants: false,
|
|
44
38
|
vowels: false,
|
|
45
39
|
},
|
|
46
40
|
[Locale.FR_FR]: {
|
|
47
41
|
direction: 'ltr',
|
|
48
|
-
fontFamily: 'Open Sans',
|
|
49
42
|
consonants: true,
|
|
50
43
|
vowels: true,
|
|
51
44
|
},
|
|
52
45
|
[Locale.PL_PL]: {
|
|
53
46
|
direction: 'ltr',
|
|
54
|
-
fontFamily: 'Open Sans',
|
|
55
47
|
consonants: true,
|
|
56
48
|
vowels: true,
|
|
57
49
|
},
|
package/src/pages/index.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { FunctionComponent, useCallback, useState } from 'react';
|
|
|
4
4
|
import ReactModal from 'react-modal';
|
|
5
5
|
import { useDispatch } from 'react-redux';
|
|
6
6
|
|
|
7
|
-
import { Logo, NavButtons, Solver
|
|
7
|
+
import { Logo, NavButtons, Solver } from 'components';
|
|
8
8
|
import { useDirection, useEffectOnce, useLanguage, useLocalStorage } from 'hooks';
|
|
9
9
|
import { LOCALE_FEATURES } from 'i18n';
|
|
10
10
|
import {
|
|
@@ -75,8 +75,6 @@ const Index: FunctionComponent<Props> = ({ version }) => {
|
|
|
75
75
|
|
|
76
76
|
return (
|
|
77
77
|
<>
|
|
78
|
-
<SvgFontFix />
|
|
79
|
-
|
|
80
78
|
<nav className={styles.nav}>
|
|
81
79
|
<div className={styles.navContent}>
|
|
82
80
|
<div className={styles.navLogo}>
|
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,7 +22,6 @@ 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
27
|
}
|
|
@@ -44,8 +45,3 @@ h4 {
|
|
|
44
45
|
-webkit-margin-after: 0;
|
|
45
46
|
margin: 0;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
[lang='fa-IR'] {
|
|
49
|
-
--font--family: 'Vazirmatn', sans-serif;
|
|
50
|
-
--font--family--title: var(--font--family);
|
|
51
|
-
}
|
package/src/styles/mixins.scss
CHANGED
|
@@ -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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/css/4bd04cebe207859c.css","static/chunks/pages/index-3fd280f406cc00fd.js"],"/404":["static/chunks/pages/404-d30fe85d005ce32b.js"],"/_error":["static/chunks/pages/_error-54de1933a164a1ff.js"],sortedPages:["/","/404","/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|