@ankhorage/templates 1.2.20 → 1.2.21
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.screens.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"chess.screens.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAU,MAAM,sBAAsB,CAAC;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAkBrD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,cAAc,GACxB,WAAW,CAAC,SAAS,CAAC,CA0HxB"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { createScreen,
|
|
1
|
+
import { createScreen, createSettingsSection, createZoraNode } from '../../../shared';
|
|
2
2
|
import { chessContent } from './chess.content';
|
|
3
3
|
const INITIAL_CHESS_FEN = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1';
|
|
4
|
+
function createNode(id, type, props, children) {
|
|
5
|
+
return {
|
|
6
|
+
id,
|
|
7
|
+
type,
|
|
8
|
+
...(props ? { props } : {}),
|
|
9
|
+
...(children && children.length > 0 ? { children: [...children] } : {}),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
4
12
|
export function createChessScreens(seed, idPrefix, screenIds) {
|
|
5
13
|
return {
|
|
6
14
|
[screenIds.home]: createScreen({
|
|
@@ -8,22 +16,61 @@ export function createChessScreens(seed, idPrefix, screenIds) {
|
|
|
8
16
|
name: 'Home',
|
|
9
17
|
title: chessContent.home.title,
|
|
10
18
|
description: chessContent.home.description,
|
|
11
|
-
root:
|
|
12
|
-
|
|
19
|
+
root: createNode(`${idPrefix}-home-screen`, 'Screen', { width: 'default' }, [
|
|
20
|
+
createNode(`${idPrefix}-home-header`, 'SectionHeader', {
|
|
13
21
|
eyebrow: chessContent.home.eyebrow,
|
|
14
22
|
title: chessContent.home.title,
|
|
15
23
|
description: 'Study and play from the board.',
|
|
16
24
|
}),
|
|
17
|
-
|
|
25
|
+
createNode(`${idPrefix}-home-board-section`, 'ScreenSection', {
|
|
18
26
|
title: 'Board',
|
|
27
|
+
description: 'Play through the position, then review candidate book moves below.',
|
|
19
28
|
}, [
|
|
20
|
-
|
|
29
|
+
createNode(`${idPrefix}-home-chessboard`, 'ChessBoard', {
|
|
21
30
|
fen: INITIAL_CHESS_FEN,
|
|
22
31
|
orientation: 'white',
|
|
23
32
|
showCoordinates: true,
|
|
24
33
|
validateMoves: true,
|
|
25
34
|
testID: `${idPrefix}-home-chessboard`,
|
|
26
35
|
}),
|
|
36
|
+
createNode(`${idPrefix}-home-opening-book`, 'OpeningBook', {
|
|
37
|
+
title: 'Opening book',
|
|
38
|
+
emptyText: 'Make a legal move to load matching opening-book candidates.',
|
|
39
|
+
selectedMove: null,
|
|
40
|
+
moves: [
|
|
41
|
+
{
|
|
42
|
+
san: 'e4',
|
|
43
|
+
uci: 'e2e4',
|
|
44
|
+
eco: 'B00',
|
|
45
|
+
name: 'King Pawn Game',
|
|
46
|
+
games: 42000,
|
|
47
|
+
whiteWinRate: 0.39,
|
|
48
|
+
drawRate: 0.31,
|
|
49
|
+
blackWinRate: 0.3,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
san: 'd4',
|
|
53
|
+
uci: 'd2d4',
|
|
54
|
+
eco: 'D00',
|
|
55
|
+
name: 'Queen Pawn Game',
|
|
56
|
+
games: 38000,
|
|
57
|
+
whiteWinRate: 0.38,
|
|
58
|
+
drawRate: 0.33,
|
|
59
|
+
blackWinRate: 0.29,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
san: 'Nf3',
|
|
63
|
+
uci: 'g1f3',
|
|
64
|
+
eco: 'A04',
|
|
65
|
+
name: 'Reti Opening',
|
|
66
|
+
games: 19000,
|
|
67
|
+
whiteWinRate: 0.36,
|
|
68
|
+
drawRate: 0.35,
|
|
69
|
+
blackWinRate: 0.29,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
testID: `${idPrefix}-home-opening-book`,
|
|
73
|
+
}),
|
|
27
74
|
]),
|
|
28
75
|
]),
|
|
29
76
|
}),
|
|
@@ -32,7 +79,7 @@ export function createChessScreens(seed, idPrefix, screenIds) {
|
|
|
32
79
|
name: 'Settings',
|
|
33
80
|
title: chessContent.settings.title,
|
|
34
81
|
description: chessContent.settings.description,
|
|
35
|
-
root:
|
|
82
|
+
root: createNode(`${idPrefix}-settings-screen`, 'Screen', { width: 'default' }, [
|
|
36
83
|
createZoraNode(`${idPrefix}-settings-header`, 'SectionHeader', {
|
|
37
84
|
eyebrow: chessContent.settings.eyebrow,
|
|
38
85
|
title: chessContent.settings.title,
|
|
@@ -57,10 +104,16 @@ export function createChessScreens(seed, idPrefix, screenIds) {
|
|
|
57
104
|
description: 'Use chess.js-backed validation from the chess extension component.',
|
|
58
105
|
meta: 'enabled',
|
|
59
106
|
},
|
|
107
|
+
{
|
|
108
|
+
id: 'opening-book-row',
|
|
109
|
+
title: 'Opening book',
|
|
110
|
+
description: 'Display a presentational opening-book panel below the board; dynamic data binding is wired by the generated app runtime.',
|
|
111
|
+
meta: 'below board',
|
|
112
|
+
},
|
|
60
113
|
{
|
|
61
114
|
id: 'scope-row',
|
|
62
115
|
title: 'Category',
|
|
63
|
-
description: `${seed.categoryLabel} uses
|
|
116
|
+
description: `${seed.categoryLabel} uses external ZORA extension components.`,
|
|
64
117
|
meta: 'extension',
|
|
65
118
|
},
|
|
66
119
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.screens.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.screens.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"chess.screens.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.screens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,iBAAiB,GAAG,0DAA0D,CAAC;AAErF,SAAS,UAAU,CACjB,EAAU,EACV,IAAY,EACZ,KAA+B,EAC/B,QAA4B;IAE5B,OAAO;QACL,EAAE;QACF,IAAI;QACJ,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3B,GAAG,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,IAAkB,EAClB,QAAgB,EAChB,SAAyB;IAEzB,OAAO;QACL,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;YAC7B,EAAE,EAAE,SAAS,CAAC,IAAI;YAClB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK;YAC9B,WAAW,EAAE,YAAY,CAAC,IAAI,CAAC,WAAW;YAC1C,IAAI,EAAE,UAAU,CAAC,GAAG,QAAQ,cAAc,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;gBAC1E,UAAU,CAAC,GAAG,QAAQ,cAAc,EAAE,eAAe,EAAE;oB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