@mirasen/chessboard 1.3.1 → 1.3.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# @mirasen/chessboard
|
|
2
2
|
|
|
3
|
+
## 1.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b249a16: main-renderer: fix `setConfig` spuriously marking `Board` and `Coordinates` layers dirty (and requesting a render) when only unrelated fields like `drag` or `animation` were patched, or when called with `{}`.
|
|
8
|
+
|
|
9
|
+
The check relied on reference-equality of nested config objects across `toMerged` calls — which held under es-toolkit ≤ 1.47.1 by accident (a bug where `toMerged` reused references from `base` for untouched branches). es-toolkit 1.49.0 fixed that, exposing our bad assumption. Switched to structural equality via `isEqual`.
|
|
10
|
+
|
|
11
|
+
- 7f72b26: dependabot: directory '/', update @ktarmyshov/assert
|
|
12
|
+
- 7f72b26: dependabot: directory '/', update @sveltejs/kit
|
|
13
|
+
- 7f72b26: dependabot: directory '/', update @vitest/browser-playwright
|
|
14
|
+
- 7f72b26: dependabot: directory '/', update @vitest/coverage-istanbul
|
|
15
|
+
- 7f72b26: dependabot: directory '/', update eslint-plugin-svelte
|
|
16
|
+
- 7f72b26: dependabot: directory '/', update eslint
|
|
17
|
+
- 7f72b26: dependabot: directory '/', update prettier-plugin-svelte
|
|
18
|
+
- 7f72b26: dependabot: directory '/', update svelte-check
|
|
19
|
+
- 7f72b26: dependabot: directory '/', update svelte
|
|
20
|
+
- 7f72b26: dependabot: directory '/', update type-fest
|
|
21
|
+
- 7f72b26: dependabot: directory '/', update typescript-eslint
|
|
22
|
+
- 7f72b26: dependabot: directory '/', update vite
|
|
23
|
+
- 7f72b26: dependabot: directory '/', update vitest
|
|
24
|
+
- eb0ccf2: dependabot: directory '/', update @sveltejs/kit
|
|
25
|
+
- eb0ccf2: dependabot: directory '/', update @tailwindcss/typography
|
|
26
|
+
- eb0ccf2: dependabot: directory '/', update @types/node
|
|
27
|
+
- eb0ccf2: dependabot: directory '/', update prettier
|
|
28
|
+
- eb0ccf2: dependabot: directory '/', update svelte
|
|
29
|
+
- eb0ccf2: dependabot: directory '/', update typescript-eslint
|
|
30
|
+
- 8633b5a: dependabot: directory '/', update @playwright/test
|
|
31
|
+
- 8633b5a: dependabot: directory '/', update @sveltejs/kit
|
|
32
|
+
- 8633b5a: dependabot: directory '/', update @tailwindcss/vite
|
|
33
|
+
- 8633b5a: dependabot: directory '/', update @vitest/browser-playwright
|
|
34
|
+
- 8633b5a: dependabot: directory '/', update @vitest/coverage-istanbul
|
|
35
|
+
- 8633b5a: dependabot: directory '/', update es-toolkit
|
|
36
|
+
- 8633b5a: dependabot: directory '/', update eslint
|
|
37
|
+
- 8633b5a: dependabot: directory '/', update playwright
|
|
38
|
+
- 8633b5a: dependabot: directory '/', update prettier-plugin-svelte
|
|
39
|
+
- 8633b5a: dependabot: directory '/', update tailwindcss
|
|
40
|
+
- 8633b5a: dependabot: directory '/', update typescript-eslint
|
|
41
|
+
- 8633b5a: dependabot: directory '/', update vitest
|
|
42
|
+
- b249a16: dependabot: directory '/', update @playwright/test
|
|
43
|
+
- b249a16: dependabot: directory '/', update @sveltejs/kit
|
|
44
|
+
- b249a16: dependabot: directory '/', update es-toolkit
|
|
45
|
+
- b249a16: dependabot: directory '/', update globals
|
|
46
|
+
- b249a16: dependabot: directory '/', update playwright
|
|
47
|
+
- b249a16: dependabot: directory '/', update svelte-check
|
|
48
|
+
- b249a16: dependabot: directory '/', update svelte
|
|
49
|
+
- b249a16: dependabot: directory '/', update typescript-eslint
|
|
50
|
+
- b249a16: dependabot: directory '/', update vite
|
|
51
|
+
- 47d3b59: dependabot: directory '/', update @types/node from 25.9.3 to 26.0.1
|
|
52
|
+
|
|
53
|
+
## 1.3.2
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- 41c2799: dependabot: directory '/', update @sveltejs/kit
|
|
58
|
+
- 41c2799: dependabot: directory '/', update es-toolkit
|
|
59
|
+
- 41c2799: dependabot: directory '/', update eslint-plugin-svelte
|
|
60
|
+
- 41c2799: dependabot: directory '/', update svelte
|
|
61
|
+
- 41c2799: dependabot: directory '/', update typescript-eslint
|
|
62
|
+
- 00b1e4f: dependabot: directory '/', update vite
|
|
63
|
+
- 857a1b5: dependabot: directory '/examples/sveltekit', update prettier-plugin-svelte from 3.5.2 to 4.0.1
|
|
64
|
+
- 1226db9: Fix mobile lifted-piece drag clipping near board edges.
|
|
65
|
+
|
|
66
|
+
Scaled mobile drag visuals can intentionally extend outside the board viewport so the dragged piece stays visible under the user's finger. The root SVG and SvelteKit example container now allow those board-local overlay visuals to remain visible without changing layout geometry, pointer mapping, or drag behavior.
|
|
67
|
+
|
|
3
68
|
## 1.3.1
|
|
4
69
|
|
|
5
70
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# @mirasen/chessboard
|
|
8
8
|
|
|
9
|
-
A framework-agnostic TypeScript chessboard platform with real chess interaction built in and an extension-driven architecture.
|
|
9
|
+
A production-grade, framework-agnostic TypeScript chessboard platform with real chess interaction built in and an extension-driven architecture.
|
|
10
10
|
|
|
11
11
|
## Try it live (including annotations)
|
|
12
12
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isEqual } from 'es-toolkit/predicate';
|
|
1
2
|
import { extensionCreateInternalBase, extensionDestroyBase, extensionMountBase, extensionUnmountBase } from '../common/helpers.js';
|
|
2
3
|
import { createMainRendererAnimation } from './animation/factory.js';
|
|
3
4
|
import { createMainRendererBoard } from './board/factory.js';
|
|
@@ -54,10 +55,10 @@ function createMainRendererInstancePublic(state) {
|
|
|
54
55
|
const previous = state.config;
|
|
55
56
|
state.config = normalizeMainRendererConfig(safeInput, state.config);
|
|
56
57
|
let dirty = 0;
|
|
57
|
-
if (state.config.colors.board
|
|
58
|
+
if (!isEqual(state.config.colors.board, previous.colors.board)) {
|
|
58
59
|
dirty |= DirtyLayer.Board;
|
|
59
60
|
}
|
|
60
|
-
if (state.config.colors.coordinates
|
|
61
|
+
if (!isEqual(state.config.colors.coordinates, previous.colors.coordinates)) {
|
|
61
62
|
dirty |= DirtyLayer.Coordinates;
|
|
62
63
|
}
|
|
63
64
|
if (dirty !== 0) {
|
|
@@ -7,6 +7,9 @@ export function createSvgRoots(options) {
|
|
|
7
7
|
svgRoot.style.setProperty('touch-action', 'pinch-zoom');
|
|
8
8
|
svgRoot.style.setProperty('-webkit-touch-callout', 'none');
|
|
9
9
|
svgRoot.style.setProperty('-webkit-tap-highlight-color', 'transparent');
|
|
10
|
+
// Don't clip board-local overlay visuals (e.g. mobile lifted drag piece
|
|
11
|
+
// scaled above the top rank) at the SVG viewport.
|
|
12
|
+
svgRoot.style.setProperty('overflow', 'visible');
|
|
10
13
|
// Create children in the correct order
|
|
11
14
|
const board = createSvgElement(svgRoot, 'g', { 'data-chessboard-id': 'board-root' });
|
|
12
15
|
const coordinates = createSvgElement(svgRoot, 'g', {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirasen/chessboard",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "1.3.
|
|
3
|
+
"description": "Production-grade framework-agnostic TypeScript chessboard platform with real chess interaction built in.",
|
|
4
|
+
"version": "1.3.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Mirasen"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@changesets/cli": "^2.28.1",
|
|
86
86
|
"@eslint/compat": "^2.0.2",
|
|
87
87
|
"@eslint/js": "^10.0.1",
|
|
88
|
-
"@types/node": "^
|
|
88
|
+
"@types/node": "^26.0.1",
|
|
89
89
|
"@vitest/coverage-istanbul": "^4.1.0",
|
|
90
90
|
"chess.js": "^1.4.0",
|
|
91
91
|
"eslint": "^10.0.2",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"rimraf": "^6.0.1",
|
|
98
98
|
"serve": "^14.2.6",
|
|
99
99
|
"typescript": "^6.0.3",
|
|
100
|
-
"typescript-eslint": "^8.
|
|
100
|
+
"typescript-eslint": "^8.60.0",
|
|
101
101
|
"vitest": "^4.0.18"
|
|
102
102
|
},
|
|
103
103
|
"engines": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@ktarmyshov/assert": "^0.1.9",
|
|
108
|
-
"es-toolkit": "^1.
|
|
108
|
+
"es-toolkit": "^1.47.0",
|
|
109
109
|
"type-fest": "^5.5.0"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|