@scrabble-solver/scrabble-solver 2.10.6 → 2.10.7
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 +9 -9
- 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/176.js +329 -359
- package/.next/server/chunks/290.js +3 -1
- package/.next/server/chunks/579.js +24 -16
- 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 +2 -2
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/api/dictionary/[locale]/[word].js +18 -16
- package/.next/server/pages/index.html +2 -2
- package/.next/server/pages/index.js +14 -7
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/server/pages-manifest.json +3 -3
- package/.next/static/6RggBFm8kHrh-k1-CG3um/_buildManifest.js +1 -0
- package/.next/static/chunks/509-6ad4482d4351452c.js +1 -0
- package/.next/static/chunks/pages/{404-ff35a4cf7f1ec85a.js → 404-67383848027ec49b.js} +1 -1
- package/.next/static/chunks/pages/_app-c58cfa832b76cc87.js +24 -0
- package/.next/static/chunks/pages/index-146039f501e49c08.js +1 -0
- package/.next/static/css/9d1013ec684361b9.css +1 -0
- package/.next/trace +55 -55
- package/package.json +9 -9
- package/src/components/Board/components/Cell/Button.tsx +1 -0
- package/src/components/Board/components/Cell/Cell.tsx +6 -0
- package/src/components/Board/components/Cell/CellPure.tsx +10 -1
- package/src/components/Button/Button.tsx +1 -0
- package/src/components/Button/Link.tsx +1 -0
- package/src/components/{SquareButton/SquareButton.module.scss → IconButton/IconButton.module.scss} +1 -1
- package/src/components/{SquareButton/SquareButton.tsx → IconButton/IconButton.tsx} +7 -6
- package/src/components/{SquareButton → IconButton}/Link.tsx +3 -2
- package/src/components/IconButton/index.ts +1 -0
- package/src/components/Logo/Logo.svg +44 -15
- package/src/components/Modal/Modal.tsx +3 -2
- package/src/components/NavButtons/NavButtons.tsx +37 -9
- package/src/components/Rack/RackTile.tsx +5 -0
- package/src/components/Results/HeaderButton.tsx +1 -0
- package/src/components/Results/Result.tsx +1 -0
- package/src/components/Results/Results.module.scss +0 -1
- package/src/components/Results/SolveButton.tsx +1 -0
- package/src/components/Solver/Solver.module.scss +4 -0
- package/src/components/Solver/Solver.tsx +26 -8
- package/src/components/Solver/components/EmptyState/EmptyState.module.scss +0 -2
- package/src/components/Solver/components/InsertButton/InsertButton.module.scss +15 -0
- package/src/components/Solver/components/{ApplyButton/ApplyButton.tsx → InsertButton/InsertButton.tsx} +10 -6
- package/src/components/Solver/components/InsertButton/index.ts +1 -0
- package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +30 -7
- package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +39 -16
- package/src/components/Solver/components/SolveButton/SolveButton.tsx +11 -1
- package/src/components/Solver/components/index.ts +1 -2
- package/src/components/Tile/Tile.tsx +3 -0
- package/src/components/Tile/TilePure.tsx +3 -0
- package/src/components/Tooltip/useTooltip.tsx +14 -2
- package/src/components/index.ts +1 -1
- package/src/i18n/de.json +5 -0
- package/src/i18n/en.json +5 -0
- package/src/i18n/es.json +5 -0
- package/src/i18n/fa.json +5 -0
- package/src/i18n/fr.json +5 -0
- package/src/i18n/pl.json +5 -0
- package/src/icons/ArrowDown.svg +1 -1
- package/src/icons/ArrowLeft.svg +1 -1
- package/src/icons/ArrowRight.svg +1 -1
- package/src/icons/ArrowUp.svg +1 -1
- package/src/icons/ChevronDown.svg +1 -1
- package/src/icons/ChevronLeft.svg +1 -1
- package/src/icons/ChevronRight.svg +1 -1
- package/src/icons/List.svg +1 -1
- package/src/modals/MenuModal/MenuModal.tsx +9 -3
- package/src/modals/RemainingTilesModal/components/Character/Character.tsx +1 -0
- package/src/modals/SettingsModal/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +2 -2
- package/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.tsx +2 -2
- package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +2 -2
- package/src/pages/api/dictionary/[locale]/[word].ts +3 -1
- package/src/pages/index.tsx +10 -6
- package/src/state/sagas.ts +5 -2
- package/src/state/useTranslate.ts +5 -2
- package/src/types/index.ts +6 -1
- package/.next/static/chunks/791-93aa8b8c22e488ac.js +0 -1
- package/.next/static/chunks/pages/_app-fa0661b072fc6af9.js +0 -24
- package/.next/static/chunks/pages/index-ded620fd5df96be0.js +0 -1
- package/.next/static/css/a943dd97164732d4.css +0 -1
- package/.next/static/iL0av55MV28b0MXfhKKt2/_buildManifest.js +0 -1
- package/src/components/Solver/components/ApplyButton/ApplyButton.module.scss +0 -5
- package/src/components/Solver/components/ApplyButton/index.ts +0 -1
- package/src/components/Solver/components/MobileControls/MobileControls.tsx +0 -62
- package/src/components/Solver/components/MobileControls/index.ts +0 -1
- package/src/components/SquareButton/index.ts +0 -1
- /package/.next/static/{iL0av55MV28b0MXfhKKt2 → 6RggBFm8kHrh-k1-CG3um}/_ssgManifest.js +0 -0
|
@@ -1,20 +1,23 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
1
2
|
import { FunctionComponent } from 'react';
|
|
2
3
|
import { useDispatch } from 'react-redux';
|
|
3
4
|
|
|
4
5
|
import { Check } from 'icons';
|
|
5
|
-
import { resultsSlice, selectResultCandidate, useTypedSelector } from 'state';
|
|
6
|
+
import { resultsSlice, selectAreResultsOutdated, selectResultCandidate, useTranslate, useTypedSelector } from 'state';
|
|
6
7
|
|
|
7
8
|
import Button from '../../../Button';
|
|
8
9
|
|
|
9
|
-
import styles from './
|
|
10
|
+
import styles from './InsertButton.module.scss';
|
|
10
11
|
|
|
11
12
|
interface Props {
|
|
12
13
|
className?: string;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
const
|
|
16
|
+
const InsertButton: FunctionComponent<Props> = ({ className }) => {
|
|
16
17
|
const dispatch = useDispatch();
|
|
18
|
+
const translate = useTranslate();
|
|
17
19
|
const resultCandidate = useTypedSelector(selectResultCandidate);
|
|
20
|
+
const isOutdated = useTypedSelector(selectAreResultsOutdated);
|
|
18
21
|
|
|
19
22
|
const handleClick = () => {
|
|
20
23
|
if (resultCandidate) {
|
|
@@ -24,8 +27,9 @@ const ApplyButton: FunctionComponent<Props> = ({ className }) => {
|
|
|
24
27
|
|
|
25
28
|
return (
|
|
26
29
|
<Button
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
aria-label={translate('results.insert')}
|
|
31
|
+
className={classNames(styles.insertButton, className)}
|
|
32
|
+
disabled={isOutdated || !resultCandidate}
|
|
29
33
|
Icon={Check}
|
|
30
34
|
iconClassName={styles.icon}
|
|
31
35
|
type="submit"
|
|
@@ -35,4 +39,4 @@ const ApplyButton: FunctionComponent<Props> = ({ className }) => {
|
|
|
35
39
|
);
|
|
36
40
|
};
|
|
37
41
|
|
|
38
|
-
export default
|
|
42
|
+
export default InsertButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './InsertButton';
|
package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss
CHANGED
|
@@ -4,22 +4,20 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
gap: var(--spacing--l);
|
|
7
|
+
|
|
8
|
+
@include media('<xs') {
|
|
9
|
+
gap: var(--spacing--m);
|
|
10
|
+
}
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
.buttons {
|
|
10
14
|
flex: 0 0 auto;
|
|
11
15
|
display: flex;
|
|
12
16
|
border-radius: var(--border--radius);
|
|
13
|
-
box-shadow: var(--box-shadow);
|
|
14
|
-
|
|
15
|
-
@include media('<xs') {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
.button {
|
|
21
20
|
padding: var(--spacing--m);
|
|
22
|
-
box-shadow: none;
|
|
23
21
|
|
|
24
22
|
&:focus-within {
|
|
25
23
|
z-index: 1;
|
|
@@ -79,10 +77,20 @@
|
|
|
79
77
|
|
|
80
78
|
[dir='ltr'] & {
|
|
81
79
|
border-right: var(--border);
|
|
80
|
+
|
|
81
|
+
@include media('<xs') {
|
|
82
|
+
border-right: none;
|
|
83
|
+
padding-right: var(--spacing--xs);
|
|
84
|
+
}
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
[dir='rtl'] & {
|
|
85
88
|
border-left: var(--border);
|
|
89
|
+
|
|
90
|
+
@include media('<xs') {
|
|
91
|
+
border-left: none;
|
|
92
|
+
padding-left: var(--spacing--xs);
|
|
93
|
+
}
|
|
86
94
|
}
|
|
87
95
|
}
|
|
88
96
|
|
|
@@ -92,6 +100,21 @@
|
|
|
92
100
|
flex: 1;
|
|
93
101
|
text-transform: uppercase;
|
|
94
102
|
text-align: center;
|
|
103
|
+
white-space: pre-wrap;
|
|
104
|
+
|
|
105
|
+
[dir='ltr'] & {
|
|
106
|
+
@include media('<xs') {
|
|
107
|
+
padding: var(--spacing--m);
|
|
108
|
+
text-align: left;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[dir='rtl'] & {
|
|
113
|
+
@include media('<xs') {
|
|
114
|
+
padding: var(--spacing--m);
|
|
115
|
+
text-align: right;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
95
118
|
}
|
|
96
119
|
|
|
97
120
|
.iconContainer {
|
|
@@ -115,6 +138,6 @@
|
|
|
115
138
|
color: var(--color--inactive);
|
|
116
139
|
}
|
|
117
140
|
|
|
118
|
-
.
|
|
141
|
+
.insert {
|
|
119
142
|
flex: 0 0 auto;
|
|
120
143
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { FunctionComponent, HTMLProps } from 'react';
|
|
2
|
+
import { FunctionComponent, HTMLProps, MouseEventHandler } from 'react';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
|
4
4
|
|
|
5
5
|
import { ChevronDown, ChevronLeft, ChevronRight } from 'icons';
|
|
@@ -9,29 +9,31 @@ import {
|
|
|
9
9
|
selectLocale,
|
|
10
10
|
selectResultCandidate,
|
|
11
11
|
selectSortedResults,
|
|
12
|
+
useTranslate,
|
|
12
13
|
useTypedSelector,
|
|
13
14
|
} from 'state';
|
|
14
15
|
|
|
15
16
|
import Button from '../../../Button';
|
|
16
|
-
import
|
|
17
|
+
import InsertButton from '../InsertButton';
|
|
17
18
|
|
|
18
19
|
import styles from './ResultCandidatePicker.module.scss';
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
interface Props extends HTMLProps<HTMLDivElement> {
|
|
22
|
+
onResultClick: MouseEventHandler<HTMLButtonElement>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const ResultCandidatePicker: FunctionComponent<Props> = ({ className, onResultClick, ...props }) => {
|
|
21
26
|
const dispatch = useDispatch();
|
|
27
|
+
const translate = useTranslate();
|
|
22
28
|
const locale = useTypedSelector(selectLocale);
|
|
23
29
|
const isOutdated = useTypedSelector(selectAreResultsOutdated);
|
|
24
30
|
const sortedResults = useTypedSelector(selectSortedResults);
|
|
25
31
|
const results = sortedResults || [];
|
|
26
32
|
const resultCandidate = useTypedSelector(selectResultCandidate);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const index = results.findIndex((result) => result.id === resultCandidate.id);
|
|
33
|
-
const isPreviousDisabled = index <= 0;
|
|
34
|
-
const isNextDisabled = index >= results.length - 1;
|
|
33
|
+
const index = resultCandidate ? results.findIndex((result) => result.id === resultCandidate.id) : -1;
|
|
34
|
+
const disabled = isOutdated || !resultCandidate;
|
|
35
|
+
const isPreviousDisabled = index <= 0 || disabled;
|
|
36
|
+
const isNextDisabled = index >= results.length - 1 || disabled;
|
|
35
37
|
|
|
36
38
|
const handleNextClick = () => {
|
|
37
39
|
if (!isNextDisabled) {
|
|
@@ -51,23 +53,44 @@ const ResultCandidatePicker: FunctionComponent<HTMLProps<HTMLDivElement>> = ({ c
|
|
|
51
53
|
<div className={classNames(styles.resultCandidatePicker, className)} {...props}>
|
|
52
54
|
<div className={styles.buttons}>
|
|
53
55
|
<Button
|
|
56
|
+
aria-label={translate('common.previous')}
|
|
54
57
|
className={styles.button}
|
|
55
58
|
disabled={isPreviousDisabled}
|
|
56
59
|
Icon={ChevronLeft}
|
|
57
60
|
onClick={handlePreviousClick}
|
|
58
61
|
/>
|
|
59
|
-
|
|
62
|
+
|
|
63
|
+
<Button
|
|
64
|
+
aria-label={translate('common.next')}
|
|
65
|
+
className={styles.button}
|
|
66
|
+
disabled={isNextDisabled}
|
|
67
|
+
Icon={ChevronRight}
|
|
68
|
+
onClick={handleNextClick}
|
|
69
|
+
/>
|
|
60
70
|
</div>
|
|
61
71
|
|
|
62
|
-
<button
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
<button
|
|
73
|
+
aria-label={translate('results')}
|
|
74
|
+
className={styles.resultCandidate}
|
|
75
|
+
disabled={disabled}
|
|
76
|
+
type="button"
|
|
77
|
+
onClick={onResultClick}
|
|
78
|
+
>
|
|
79
|
+
{resultCandidate && (
|
|
80
|
+
<>
|
|
81
|
+
<div className={styles.points}>{resultCandidate.points.toLocaleString(locale)}</div>
|
|
82
|
+
<div className={styles.word}>{resultCandidate.word}</div>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
{!resultCandidate && <div className={styles.word}> </div>}
|
|
87
|
+
|
|
65
88
|
<div className={styles.iconContainer}>
|
|
66
89
|
<ChevronDown className={styles.icon} />
|
|
67
90
|
</div>
|
|
68
91
|
</button>
|
|
69
92
|
|
|
70
|
-
<
|
|
93
|
+
<InsertButton className={styles.insert} />
|
|
71
94
|
</div>
|
|
72
95
|
);
|
|
73
96
|
};
|
|
@@ -4,7 +4,14 @@ import { useDispatch } from 'react-redux';
|
|
|
4
4
|
|
|
5
5
|
import { Search } from 'icons';
|
|
6
6
|
import { noop } from 'lib';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
selectAreResultsOutdated,
|
|
9
|
+
selectIsLoading,
|
|
10
|
+
selectRack,
|
|
11
|
+
solveSlice,
|
|
12
|
+
useTranslate,
|
|
13
|
+
useTypedSelector,
|
|
14
|
+
} from 'state';
|
|
8
15
|
|
|
9
16
|
import Button from '../../../Button';
|
|
10
17
|
|
|
@@ -17,6 +24,7 @@ interface Props {
|
|
|
17
24
|
|
|
18
25
|
const SolveButton: FunctionComponent<Props> = ({ className, onClick = noop }) => {
|
|
19
26
|
const dispatch = useDispatch();
|
|
27
|
+
const translate = useTranslate();
|
|
20
28
|
const isLoading = useTypedSelector(selectIsLoading);
|
|
21
29
|
const isOutdated = useTypedSelector(selectAreResultsOutdated);
|
|
22
30
|
const rack = useTypedSelector(selectRack);
|
|
@@ -29,10 +37,12 @@ const SolveButton: FunctionComponent<Props> = ({ className, onClick = noop }) =>
|
|
|
29
37
|
|
|
30
38
|
return (
|
|
31
39
|
<Button
|
|
40
|
+
aria-label={translate('results.solve')}
|
|
32
41
|
className={classNames(styles.solveButton, className)}
|
|
33
42
|
disabled={isLoading || !isOutdated || !hasTiles}
|
|
34
43
|
Icon={Search}
|
|
35
44
|
iconClassName={styles.icon}
|
|
45
|
+
tooltip={translate('results.solve')}
|
|
36
46
|
type="submit"
|
|
37
47
|
variant="primary"
|
|
38
48
|
onClick={handleClick}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { default as ApplyButton } from './ApplyButton';
|
|
2
1
|
export { default as EmptyState } from './EmptyState';
|
|
3
|
-
export { default as
|
|
2
|
+
export { default as InsertButton } from './InsertButton';
|
|
4
3
|
export { default as ResultCandidatePicker } from './ResultCandidatePicker';
|
|
5
4
|
export { default as SolveButton } from './SolveButton';
|
|
@@ -16,6 +16,7 @@ import { selectLocale, useTypedSelector } from 'state';
|
|
|
16
16
|
import TilePure from './TilePure';
|
|
17
17
|
|
|
18
18
|
interface Props {
|
|
19
|
+
'aria-label': string;
|
|
19
20
|
autoFocus?: boolean;
|
|
20
21
|
character?: string;
|
|
21
22
|
className?: string;
|
|
@@ -35,6 +36,7 @@ interface Props {
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
const Tile: FunctionComponent<Props> = ({
|
|
39
|
+
'aria-label': ariaLabel,
|
|
38
40
|
autoFocus,
|
|
39
41
|
className,
|
|
40
42
|
character = '',
|
|
@@ -75,6 +77,7 @@ const Tile: FunctionComponent<Props> = ({
|
|
|
75
77
|
|
|
76
78
|
return (
|
|
77
79
|
<TilePure
|
|
80
|
+
aria-label={ariaLabel}
|
|
78
81
|
autoFocus={autoFocus}
|
|
79
82
|
canShowPoints={canShowPoints}
|
|
80
83
|
character={character}
|
|
@@ -14,6 +14,7 @@ import { ExclamationSquareFill } from 'icons';
|
|
|
14
14
|
import styles from './Tile.module.scss';
|
|
15
15
|
|
|
16
16
|
interface Props {
|
|
17
|
+
'aria-label': string;
|
|
17
18
|
autoFocus?: boolean;
|
|
18
19
|
canShowPoints?: boolean;
|
|
19
20
|
character?: string;
|
|
@@ -37,6 +38,7 @@ interface Props {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
const TilePure: FunctionComponent<Props> = ({
|
|
41
|
+
'aria-label': ariaLabel,
|
|
40
42
|
autoFocus,
|
|
41
43
|
canShowPoints,
|
|
42
44
|
character,
|
|
@@ -75,6 +77,7 @@ const TilePure: FunctionComponent<Props> = ({
|
|
|
75
77
|
style={style}
|
|
76
78
|
>
|
|
77
79
|
<input
|
|
80
|
+
aria-label={ariaLabel}
|
|
78
81
|
autoCapitalize="none"
|
|
79
82
|
autoComplete="off"
|
|
80
83
|
autoCorrect="off"
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { usePopper } from 'react-popper';
|
|
13
13
|
import { useMountedState, useRafLoop } from 'react-use';
|
|
14
14
|
|
|
15
|
-
import { usePortal, useUniqueId } from 'hooks';
|
|
15
|
+
import { useIsTouchDevice, usePortal, useUniqueId } from 'hooks';
|
|
16
16
|
import { noop } from 'lib';
|
|
17
17
|
|
|
18
18
|
import { MODIFIERS } from './constants';
|
|
@@ -36,11 +36,13 @@ interface TriggerProps {
|
|
|
36
36
|
onMouseOver?: MouseEventHandler;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
// eslint-disable-next-line max-statements
|
|
39
40
|
const useTooltip = (
|
|
40
41
|
tooltip: ReactNode,
|
|
41
42
|
{ className, placement = 'top', onBlur = noop, onFocus = noop, onMouseOut = noop, onMouseOver = noop }: Props = {},
|
|
42
43
|
): TriggerProps => {
|
|
43
44
|
const id = useUniqueId();
|
|
45
|
+
const isTouchDevice = useIsTouchDevice();
|
|
44
46
|
const isEnabled = Boolean(tooltip) || tooltip === 0;
|
|
45
47
|
const isMounted = useMountedState();
|
|
46
48
|
const [isShown, setIsShown] = useState<boolean>(false);
|
|
@@ -90,7 +92,7 @@ const useTooltip = (
|
|
|
90
92
|
[onMouseOver],
|
|
91
93
|
);
|
|
92
94
|
|
|
93
|
-
const
|
|
95
|
+
const mouseTriggerProps = useMemo(
|
|
94
96
|
() => ({
|
|
95
97
|
...ariaAttributes,
|
|
96
98
|
ref: setReferenceElement,
|
|
@@ -102,6 +104,16 @@ const useTooltip = (
|
|
|
102
104
|
[ariaAttributes, handleBlur, handleFocus, handleMouseOut, handleMouseOver],
|
|
103
105
|
);
|
|
104
106
|
|
|
107
|
+
const touchTriggerProps = useMemo(
|
|
108
|
+
() => ({
|
|
109
|
+
...ariaAttributes,
|
|
110
|
+
ref: setReferenceElement,
|
|
111
|
+
}),
|
|
112
|
+
[ariaAttributes],
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const triggerProps = isTouchDevice ? touchTriggerProps : mouseTriggerProps;
|
|
116
|
+
|
|
105
117
|
useRafLoop(() => {
|
|
106
118
|
if (isMounted() && update) {
|
|
107
119
|
update();
|
package/src/components/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as Checkbox } from './Checkbox';
|
|
|
5
5
|
export { default as Dictionary } from './Dictionary';
|
|
6
6
|
export { default as DictionaryInput } from './DictionaryInput';
|
|
7
7
|
export { default as EmptyState } from './EmptyState';
|
|
8
|
+
export { default as IconButton } from './IconButton';
|
|
8
9
|
export { default as Key } from './Key';
|
|
9
10
|
export { default as Loading } from './Loading';
|
|
10
11
|
export { default as Logo } from './Logo';
|
|
@@ -21,7 +22,6 @@ export { default as ResultsInput } from './ResultsInput';
|
|
|
21
22
|
export { default as Sizer } from './Sizer';
|
|
22
23
|
export { default as Solver } from './Solver';
|
|
23
24
|
export { default as SplashScreen } from './SplashScreen';
|
|
24
|
-
export { default as SquareButton } from './SquareButton';
|
|
25
25
|
export { default as SvgFontCss } from './SvgFontCss';
|
|
26
26
|
export { default as SvgFontFix } from './SvgFontFix';
|
|
27
27
|
export { default as Tile } from './Tile';
|
package/src/i18n/de.json
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
"cell.filter-cell": "Zielort - klicken zum Wechseln",
|
|
3
3
|
"cell.set-blank": "Als Blanko markieren",
|
|
4
4
|
"cell.set-not-blank": "Nicht als Blanko markieren",
|
|
5
|
+
"cell.tile.location": "Brett: Stein ({{x}}, {{y}})",
|
|
5
6
|
"cell.toggle-direction": "Schreibrichtung - klicken zum Wechseln",
|
|
6
7
|
"common.blanks": "Blankos",
|
|
7
8
|
"common.clear": "Löschen",
|
|
8
9
|
"common.close": "Schließen",
|
|
9
10
|
"common.consonants": "Konsonanten",
|
|
10
11
|
"common.loading": "Laden",
|
|
12
|
+
"common.next": "Weiter",
|
|
11
13
|
"common.points": "Punkte",
|
|
14
|
+
"common.previous": "Zurück",
|
|
12
15
|
"common.tiles": "Steine",
|
|
13
16
|
"common.two-letter-tiles": "Zwei-Buchstaben",
|
|
14
17
|
"common.vowels": "Vokale",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"keyMap.rack.insert-blank": "Blanko hinzufügen (Leertaste)",
|
|
38
41
|
"menu": "Menü",
|
|
39
42
|
"rack.placeholder": "Steine…",
|
|
43
|
+
"rack.tile.location": "Ablage: Stein ({{index}})",
|
|
40
44
|
"remaining-tiles": "Restliche Steine",
|
|
41
45
|
"results": "Ergebnisse",
|
|
42
46
|
"results.empty-state.no-filtered-results": "Keine Ergebnisse für diese Anfrage.",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"results.empty-state.outdated": "Ergebnisse sind alt. Klicken zum Aktualisieren.",
|
|
45
49
|
"results.empty-state.uninitialized": "Wörter die aus deinen Buchstaben generiert wurden erscheinen hier.",
|
|
46
50
|
"results.input.placeholder": "Suchergebnisse... (RegExp)",
|
|
51
|
+
"results.insert": "Hinzufügen",
|
|
47
52
|
"results.solve": "Lösen",
|
|
48
53
|
"settings": "Einstellungen",
|
|
49
54
|
"settings.autoGroupTiles": "Restliche Steine gruppieren",
|
package/src/i18n/en.json
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
"cell.filter-cell": "Target destination - click to toggle",
|
|
3
3
|
"cell.set-blank": "Mark it a blank",
|
|
4
4
|
"cell.set-not-blank": "Mark it not a blank",
|
|
5
|
+
"cell.tile.location": "Board: tile ({{x}}, {{y}})",
|
|
5
6
|
"cell.toggle-direction": "Typing direction - click to toggle",
|
|
6
7
|
"common.blanks": "Blanks",
|
|
7
8
|
"common.clear": "Clear",
|
|
8
9
|
"common.close": "Close",
|
|
9
10
|
"common.consonants": "Consonants",
|
|
10
11
|
"common.loading": "Loading",
|
|
12
|
+
"common.next": "Next",
|
|
11
13
|
"common.points": "Points",
|
|
14
|
+
"common.previous": "Previous",
|
|
12
15
|
"common.tiles": "Tiles",
|
|
13
16
|
"common.two-letter-tiles": "Two-letter",
|
|
14
17
|
"common.vowels": "Vowels",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"keyMap.rack.insert-blank": "Insert blank (spacebar)",
|
|
38
41
|
"menu": "Menu",
|
|
39
42
|
"rack.placeholder": "Letters",
|
|
43
|
+
"rack.tile.location": "Rack: tile ({{index}})",
|
|
40
44
|
"remaining-tiles": "Remaining tiles",
|
|
41
45
|
"results": "Results",
|
|
42
46
|
"results.empty-state.no-filtered-results": "No result matches this query.",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"results.empty-state.outdated": "Results are outdated. Click below to update.",
|
|
45
49
|
"results.empty-state.uninitialized": "Words generated from your letters will be shown here.",
|
|
46
50
|
"results.input.placeholder": "Search results... (RegExp)",
|
|
51
|
+
"results.insert": "Insert",
|
|
47
52
|
"results.solve": "Solve",
|
|
48
53
|
"settings": "Settings",
|
|
49
54
|
"settings.autoGroupTiles": "Group remaining tiles",
|
package/src/i18n/es.json
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
"cell.filter-cell": "Destino objetivo: haga clic para alternar",
|
|
3
3
|
"cell.set-blank": "Marcar como en blanco",
|
|
4
4
|
"cell.set-not-blank": "Marcar como no en blanco",
|
|
5
|
+
"cell.tile.location": "Tablero: espacio ({{x}}, {{y}})",
|
|
5
6
|
"cell.toggle-direction": "Dirección de escritura: haga clic para alternar",
|
|
6
7
|
"common.blanks": "Blancos",
|
|
7
8
|
"common.clear": "Borrar",
|
|
8
9
|
"common.close": "Cerrar",
|
|
9
10
|
"common.consonants": "Consonantes",
|
|
10
11
|
"common.loading": "Cargando",
|
|
12
|
+
"common.next": "Siguiente",
|
|
11
13
|
"common.points": "Puntos",
|
|
14
|
+
"common.previous": "Anterior",
|
|
12
15
|
"common.tiles": "Longitud",
|
|
13
16
|
"common.two-letter-tiles": "Dos letras",
|
|
14
17
|
"common.vowels": "Vocales",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"keyMap.rack.insert-blank": "Insertar espacio en blanco (barra espaciadora)",
|
|
38
41
|
"menu": "Menú",
|
|
39
42
|
"rack.placeholder": "Letras…",
|
|
43
|
+
"rack.tile.location": "Estante: espacio ({{index}})",
|
|
40
44
|
"remaining-tiles": "Casillas restantes",
|
|
41
45
|
"results": "Resultados",
|
|
42
46
|
"results.empty-state.no-filtered-results": "Ningún resultado coincide con esta consulta.",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"results.empty-state.outdated": "Los resultados están desactualizados. Haga clic a continuación para actualizar.",
|
|
45
49
|
"results.empty-state.uninitialized": "Aquí se mostrarán las palabras generadas a partir de sus letras.",
|
|
46
50
|
"results.input.placeholder": "Busque una solución... (RegExp)",
|
|
51
|
+
"results.insert": "Insertar",
|
|
47
52
|
"results.solve": "Resolver",
|
|
48
53
|
"settings": "Configuración",
|
|
49
54
|
"settings.autoGroupTiles": "Agrupar casillas restantes",
|
package/src/i18n/fa.json
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
"cell.set-blank": "علامت گذاری به عنوان خالی",
|
|
4
4
|
"cell.set-not-blank": "علامت گذاری به عنوان غیر خالی",
|
|
5
5
|
"cell.toggle-direction": "جهت تایپ - کلیک برای تغییر",
|
|
6
|
+
"cell.tile.location": "({{x}}، {{y}}) کاشی: صفحه",
|
|
6
7
|
"common.blanks": "خالی",
|
|
7
8
|
"common.clear": "پاک کردن",
|
|
8
9
|
"common.close": "بستن",
|
|
9
10
|
"common.consonants": "حروف صامت",
|
|
10
11
|
"common.loading": "در حال بارگزاری",
|
|
12
|
+
"common.next": "بعدی",
|
|
11
13
|
"common.points": "امتیازات",
|
|
14
|
+
"common.previous": "قبلی",
|
|
12
15
|
"common.tiles": "کاشی ها",
|
|
13
16
|
"common.two-letter-tiles": "دو حرفی",
|
|
14
17
|
"common.vowels": "حروف مصوت",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"keyMap.rack.insert-blank": "وارد کردن کاشی خالی (دکمه اسپیس)",
|
|
38
41
|
"menu": "منو",
|
|
39
42
|
"rack.placeholder": "لیستحرف",
|
|
43
|
+
"rack.tile.location": "({{index}}) کاشی: طاقچه",
|
|
40
44
|
"remaining-tiles": "کاشی های باقی مانده",
|
|
41
45
|
"results": "نتایج",
|
|
42
46
|
"results.empty-state.no-filtered-results": "پاسخی یافت نشد.",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"results.empty-state.outdated": "نتایج به روز نیستند، برای بروز رسانی کلیک کنید.",
|
|
45
49
|
"results.empty-state.uninitialized": "کلمات تولید شده از حروف شما اینجا نمایش داده خواهد شد.",
|
|
46
50
|
"results.input.placeholder": "جستجو در نتایج (RegExp)",
|
|
51
|
+
"results.insert": "وارد کردن",
|
|
47
52
|
"results.solve": "حل کن",
|
|
48
53
|
"settings": "تنظیمات",
|
|
49
54
|
"settings.autoGroupTiles": "کاشی های باقی مانده ی طاقچه را کنار هم قرار بده",
|
package/src/i18n/fr.json
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
"cell.filter-cell": "Destination cible - cliquer pour changer",
|
|
3
3
|
"cell.set-blank": "Marquer comme vide",
|
|
4
4
|
"cell.set-not-blank": "Marquer comme non vide",
|
|
5
|
+
"cell.tile.location": "Plateau: la case ({{x}}, {{y}})",
|
|
5
6
|
"cell.toggle-direction": "Direction d'écriture - cliquer pour changer",
|
|
6
7
|
"common.blanks": "Cases vides",
|
|
7
8
|
"common.clear": "Effacer",
|
|
8
9
|
"common.close": "Fermer",
|
|
9
10
|
"common.consonants": "Consonnes",
|
|
10
11
|
"common.loading": "Chargement",
|
|
12
|
+
"common.next": "Suivant",
|
|
11
13
|
"common.points": "Points",
|
|
14
|
+
"common.previous": "Précédent",
|
|
12
15
|
"common.tiles": "Cases",
|
|
13
16
|
"common.two-letter-tiles": "Deux lettres",
|
|
14
17
|
"common.vowels": "Voyelles",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"keyMap.rack.insert-blank": "Inserer une case vide (spacebar)",
|
|
38
41
|
"menu": "Menu",
|
|
39
42
|
"rack.placeholder": "Lettres",
|
|
43
|
+
"rack.tile.location": "Chevalet: la case ({{index}})",
|
|
40
44
|
"remaining-tiles": "Cases restantes",
|
|
41
45
|
"results": "Résultats",
|
|
42
46
|
"results.empty-state.no-filtered-results": "Aucun résultat ne correspond à cette requête",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"results.empty-state.outdated": "Les résultats sont dépassé. Cliquer ci-dessous pour mettre à jour.",
|
|
45
49
|
"results.empty-state.uninitialized": "Les mots générés à partir de vos lettres seront affichés ici.",
|
|
46
50
|
"results.input.placeholder": "Rechercher les résultats... (RegExp)",
|
|
51
|
+
"results.insert": "Inserer",
|
|
47
52
|
"results.solve": "Résoudre",
|
|
48
53
|
"settings": "Options",
|
|
49
54
|
"settings.autoGroupTiles": "Grouper les cases restantes",
|
package/src/i18n/pl.json
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
"cell.filter-cell": "Miejsce docelowe - kliknij aby zmienić",
|
|
3
3
|
"cell.set-blank": "Oznacz jako blank",
|
|
4
4
|
"cell.set-not-blank": "Oznacz jako nie blank",
|
|
5
|
+
"cell.tile.location": "Plansza: płytka ({{x}}, {{y}})",
|
|
5
6
|
"cell.toggle-direction": "Kierunek wpisywania - kliknij aby zmienić",
|
|
6
7
|
"common.blanks": "Blanki",
|
|
7
8
|
"common.clear": "Wyczyść",
|
|
8
9
|
"common.close": "Zamknij",
|
|
9
10
|
"common.consonants": "Spółgłoski",
|
|
10
11
|
"common.loading": "Ładowanie",
|
|
12
|
+
"common.next": "Następne",
|
|
11
13
|
"common.points": "Punkty",
|
|
14
|
+
"common.previous": "Poprzednie",
|
|
12
15
|
"common.tiles": "Płytki",
|
|
13
16
|
"common.two-letter-tiles": "Dwuliterowe",
|
|
14
17
|
"common.vowels": "Samogłoski",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"keyMap.rack.insert-blank": "Wstaw blanka (spacja)",
|
|
38
41
|
"menu": "Menu",
|
|
39
42
|
"rack.placeholder": "Literki",
|
|
43
|
+
"rack.tile.location": "Stojak: płytka ({{index}})",
|
|
40
44
|
"remaining-tiles": "Pozostałe płytki",
|
|
41
45
|
"results": "Wyniki",
|
|
42
46
|
"results.empty-state.no-filtered-results": "Żaden wynik nie pasuje do tej kwerendy.",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"results.empty-state.outdated": "Wyniki są nieaktualne. Kliknij poniżej, aby zaktualizować.",
|
|
45
49
|
"results.empty-state.uninitialized": "Tu zostaną wyświetlone słowa wygenerowane z Twoich liter.",
|
|
46
50
|
"results.input.placeholder": "Szukaj rozwiązania... (RegExp)",
|
|
51
|
+
"results.insert": "Wstaw",
|
|
47
52
|
"results.solve": "Rozwiąż",
|
|
48
53
|
"settings": "Opcje",
|
|
49
54
|
"settings.autoGroupTiles": "Grupuj pozostałe płytki",
|
package/src/icons/ArrowDown.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/arrow-down/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z" fill="currentColor"
|
|
3
|
+
<path d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z" fill="currentColor" />
|
|
4
4
|
</svg>
|
package/src/icons/ArrowLeft.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/arrow-left/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z" fill="currentColor"
|
|
3
|
+
<path d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z" fill="currentColor" />
|
|
4
4
|
</svg>
|
package/src/icons/ArrowRight.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/arrow-right/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z" fill="currentColor"
|
|
3
|
+
<path d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z" fill="currentColor" />
|
|
4
4
|
</svg>
|
package/src/icons/ArrowUp.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/arrow-up/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z" fill="currentColor"
|
|
3
|
+
<path d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z" fill="currentColor" />
|
|
4
4
|
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/chevron-down/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path
|
|
3
|
+
<path 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
4
|
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/chevron-left/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" fill="currentColor"
|
|
3
|
+
<path d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" fill="currentColor" />
|
|
4
4
|
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/chevron-right/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" fill="currentColor"
|
|
3
|
+
<path d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" fill="currentColor" />
|
|
4
4
|
</svg>
|
package/src/icons/List.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<!-- https://icons.getbootstrap.com/icons/list/ -->
|
|
2
2
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" >
|
|
3
|
-
<path
|
|
3
|
+
<path 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
4
|
</svg>
|