@ankhorage/templates 1.2.15 → 1.2.17
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 +12 -0
- package/README.md +3 -1
- package/dist/internal/zora-nodes.d.ts +16 -10
- package/dist/internal/zora-nodes.d.ts.map +1 -1
- package/dist/internal/zora-nodes.js.map +1 -1
- package/dist/templates/starter/categories/games/chess.content.d.ts +9 -9
- package/dist/templates/starter/categories/games/chess.content.d.ts.map +1 -1
- package/dist/templates/starter/categories/games/chess.content.js +9 -9
- package/dist/templates/starter/categories/games/chess.content.js.map +1 -1
- package/dist/templates/starter/categories/games/chess.routes.d.ts +1 -1
- package/dist/templates/starter/categories/games/chess.routes.d.ts.map +1 -1
- package/dist/templates/starter/categories/games/chess.routes.js +5 -5
- package/dist/templates/starter/categories/games/chess.routes.js.map +1 -1
- package/dist/templates/starter/categories/games/chess.screens.d.ts +1 -1
- package/dist/templates/starter/categories/games/chess.screens.d.ts.map +1 -1
- package/dist/templates/starter/categories/games/chess.screens.js +99 -11
- package/dist/templates/starter/categories/games/chess.screens.js.map +1 -1
- package/dist/templates/starter/categories/games/index.js +1 -1
- package/dist/templates/starter/categories/games/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/templates
|
|
2
2
|
|
|
3
|
+
## 1.2.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1db98fd: Render a real ChessBoard node in the games chess starter home screen.
|
|
8
|
+
|
|
9
|
+
## 1.2.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 21ca5f0: Correct the games chess starter to generate Home and Settings tabs.
|
|
14
|
+
|
|
3
15
|
## 1.2.15
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -98,7 +98,9 @@ The fallback template remains available and is used only for unknown runtime cat
|
|
|
98
98
|
|
|
99
99
|
Additional variants:
|
|
100
100
|
|
|
101
|
-
- `games/chess`: Home ·
|
|
101
|
+
- `games/chess`: Home · Settings. The Home screen renders a `ChessBoard` node with a static
|
|
102
|
+
initial FEN and requires generated apps to provide `@ankhorage/zora-chess` through their
|
|
103
|
+
extension registry.
|
|
102
104
|
- `social_community/creator`: Studio · Posts · Audience · Insights · Settings
|
|
103
105
|
|
|
104
106
|
Only categories that exist in `AppCategory` are registered. New category literals should be added
|
|
@@ -13,21 +13,12 @@ type SerializablePanelProps = Omit<PanelProps, 'actions' | 'children' | 'descrip
|
|
|
13
13
|
title?: string;
|
|
14
14
|
description?: string;
|
|
15
15
|
eyebrow?: string;
|
|
16
|
-
footer?: string;
|
|
17
16
|
};
|
|
18
17
|
type SerializableCardProps = Omit<CardProps, 'actions' | 'children' | 'description' | 'eyebrow' | 'footer' | 'title'> & {
|
|
19
18
|
title?: string;
|
|
20
19
|
description?: string;
|
|
21
20
|
eyebrow?: string;
|
|
22
|
-
footer?: string;
|
|
23
21
|
};
|
|
24
|
-
type SerializableAuthLayoutProps = SerializableProps<{
|
|
25
|
-
title?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
eyebrow?: string;
|
|
28
|
-
footer?: string;
|
|
29
|
-
testID?: string;
|
|
30
|
-
}>;
|
|
31
22
|
type SerializableSectionHeaderProps = Omit<SectionHeaderProps, 'actions' | 'description' | 'eyebrow' | 'title'> & {
|
|
32
23
|
title: string;
|
|
33
24
|
description?: string;
|
|
@@ -63,10 +54,25 @@ type SerializableEmptyStateProps = Omit<EmptyStateProps, 'description' | 'eyebro
|
|
|
63
54
|
eyebrow?: string;
|
|
64
55
|
footer?: string;
|
|
65
56
|
};
|
|
57
|
+
type SerializableChessBoardProps = SerializableProps<{
|
|
58
|
+
fen: string;
|
|
59
|
+
orientation?: 'white' | 'black';
|
|
60
|
+
selectedSquare?: string | null;
|
|
61
|
+
legalTargets?: readonly string[];
|
|
62
|
+
lastMove?: {
|
|
63
|
+
from: string;
|
|
64
|
+
to: string;
|
|
65
|
+
promotion?: 'q' | 'r' | 'b' | 'n';
|
|
66
|
+
} | null;
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
showCoordinates?: boolean;
|
|
69
|
+
validateMoves?: boolean;
|
|
70
|
+
testID?: string;
|
|
71
|
+
}>;
|
|
66
72
|
export interface ZoraNodePropsByType {
|
|
67
|
-
AuthLayout: SerializableAuthLayoutProps;
|
|
68
73
|
Button: SerializableButtonProps;
|
|
69
74
|
Card: SerializableCardProps;
|
|
75
|
+
ChessBoard: SerializableChessBoardProps;
|
|
70
76
|
EmptyState: SerializableEmptyStateProps;
|
|
71
77
|
FormField: SerializableFormFieldProps;
|
|
72
78
|
Input: SerializableInputProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zora-nodes.d.ts","sourceRoot":"","sources":["../../src/internal/zora-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE5E,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACvE,KAAK,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;AACxE,KAAK,8BAA8B,GAAG,IAAI,CACxC,kBAAkB,EAClB,SAAS,GAAG,UAAU,GAAG,OAAO,G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"version":3,"file":"zora-nodes.js","sourceRoot":"","sources":["../../src/internal/zora-nodes.ts"],"names":[],"mappings":"AAwIA,MAAM,UAAU,cAAc,CAC5B,EAAU,EACV,IAAW,EACX,KAAkC,EAClC,QAAqB;IAErB,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,CAAC,CAAC,EAAE,CAAC;KACzD,CAAC;AACJ,CAAC"}
|
|
@@ -17,21 +17,21 @@ export declare const chessContent: {
|
|
|
17
17
|
}];
|
|
18
18
|
}];
|
|
19
19
|
};
|
|
20
|
-
readonly
|
|
21
|
-
readonly eyebrow: "
|
|
22
|
-
readonly title: "
|
|
20
|
+
readonly settings: {
|
|
21
|
+
readonly eyebrow: "Settings";
|
|
22
|
+
readonly title: "Settings";
|
|
23
23
|
readonly description: "Prepare board display controls and study preferences for a chess app.";
|
|
24
24
|
readonly sections: readonly [{
|
|
25
|
-
readonly title: "Board
|
|
26
|
-
readonly description: "Use this area for
|
|
25
|
+
readonly title: "Board preferences";
|
|
26
|
+
readonly description: "Use this area for board-specific controls and future ChessBoard integration settings.";
|
|
27
27
|
readonly cards: readonly [{
|
|
28
28
|
readonly eyebrow: "Board";
|
|
29
|
-
readonly title: "
|
|
30
|
-
readonly description: "
|
|
29
|
+
readonly title: "Orientation";
|
|
30
|
+
readonly description: "Reserve controls for white/black orientation and board display preferences.";
|
|
31
31
|
}, {
|
|
32
32
|
readonly eyebrow: "Controls";
|
|
33
|
-
readonly title: "
|
|
34
|
-
readonly description: "Reserve controls for
|
|
33
|
+
readonly title: "Coordinates and study mode";
|
|
34
|
+
readonly description: "Reserve controls for coordinates, interaction behavior, and study mode.";
|
|
35
35
|
}];
|
|
36
36
|
}];
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.content.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"chess.content.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDf,CAAC"}
|
|
@@ -22,24 +22,24 @@ export const chessContent = {
|
|
|
22
22
|
},
|
|
23
23
|
],
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
eyebrow: '
|
|
27
|
-
title: '
|
|
25
|
+
settings: {
|
|
26
|
+
eyebrow: 'Settings',
|
|
27
|
+
title: 'Settings',
|
|
28
28
|
description: 'Prepare board display controls and study preferences for a chess app.',
|
|
29
29
|
sections: [
|
|
30
30
|
{
|
|
31
|
-
title: 'Board
|
|
32
|
-
description: 'Use this area for
|
|
31
|
+
title: 'Board preferences',
|
|
32
|
+
description: 'Use this area for board-specific controls and future ChessBoard integration settings.',
|
|
33
33
|
cards: [
|
|
34
34
|
{
|
|
35
35
|
eyebrow: 'Board',
|
|
36
|
-
title: '
|
|
37
|
-
description: '
|
|
36
|
+
title: 'Orientation',
|
|
37
|
+
description: 'Reserve controls for white/black orientation and board display preferences.',
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
eyebrow: 'Controls',
|
|
41
|
-
title: '
|
|
42
|
-
description: 'Reserve controls for
|
|
41
|
+
title: 'Coordinates and study mode',
|
|
42
|
+
description: 'Reserve controls for coordinates, interaction behavior, and study mode.',
|
|
43
43
|
},
|
|
44
44
|
],
|
|
45
45
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.content.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.content.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,+EAA+E;QAC5F,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EACT,oFAAoF;gBACtF,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,UAAU;wBACnB,KAAK,EAAE,yBAAyB;wBAChC,WAAW,EACT,6EAA6E;qBAChF;oBACD;wBACE,OAAO,EAAE,OAAO;wBAChB,KAAK,EAAE,mBAAmB;wBAC1B,WAAW,EACT,2EAA2E;qBAC9E;iBACF;aACF;SACF;KACF;IACD,
|
|
1
|
+
{"version":3,"file":"chess.content.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.content.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,+EAA+E;QAC5F,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EACT,oFAAoF;gBACtF,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,UAAU;wBACnB,KAAK,EAAE,yBAAyB;wBAChC,WAAW,EACT,6EAA6E;qBAChF;oBACD;wBACE,OAAO,EAAE,OAAO;wBAChB,KAAK,EAAE,mBAAmB;wBAC1B,WAAW,EACT,2EAA2E;qBAC9E;iBACF;aACF;SACF;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,uEAAuE;QACpF,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EACT,uFAAuF;gBACzF,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,OAAO;wBAChB,KAAK,EAAE,aAAa;wBACpB,WAAW,EACT,6EAA6E;qBAChF;oBACD;wBACE,OAAO,EAAE,UAAU;wBACnB,KAAK,EAAE,4BAA4B;wBACnC,WAAW,EAAE,yEAAyE;qBACvF;iBACF;aACF;SACF;KACF;CACO,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
2
|
export interface ChessScreenIds {
|
|
3
3
|
home: string;
|
|
4
|
-
|
|
4
|
+
settings: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function createChessScreenIds(idPrefix: string): ChessScreenIds;
|
|
7
7
|
export declare function createChessNavigator(screenIds: ChessScreenIds): AppManifest['navigator'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.routes.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"chess.routes.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAKrE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,cAAc,GAAG,WAAW,CAAC,WAAW,CAAC,CAmBxF"}
|
|
@@ -2,7 +2,7 @@ import { createRoute } from '../../../shared';
|
|
|
2
2
|
export function createChessScreenIds(idPrefix) {
|
|
3
3
|
return {
|
|
4
4
|
home: `${idPrefix}-home`,
|
|
5
|
-
|
|
5
|
+
settings: `${idPrefix}-settings`,
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
8
|
export function createChessNavigator(screenIds) {
|
|
@@ -17,10 +17,10 @@ export function createChessNavigator(screenIds) {
|
|
|
17
17
|
icon: { provider: 'material-community', name: 'chess-king' },
|
|
18
18
|
}),
|
|
19
19
|
createRoute({
|
|
20
|
-
name: '
|
|
21
|
-
screenId: screenIds.
|
|
22
|
-
label: '
|
|
23
|
-
icon: { provider: 'material-community', name: '
|
|
20
|
+
name: 'settings',
|
|
21
|
+
screenId: screenIds.settings,
|
|
22
|
+
label: 'Settings',
|
|
23
|
+
icon: { provider: 'material-community', name: 'cog-outline' },
|
|
24
24
|
}),
|
|
25
25
|
],
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.routes.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,OAAO;QACL,IAAI,EAAE,GAAG,QAAQ,OAAO;QACxB,
|
|
1
|
+
{"version":3,"file":"chess.routes.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/chess.routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,OAAO;QACL,IAAI,EAAE,GAAG,QAAQ,OAAO;QACxB,QAAQ,EAAE,GAAG,QAAQ,WAAW;KACjC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,SAAyB;IAC5D,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,gBAAgB,EAAE,OAAO;QACzB,MAAM,EAAE;YACN,WAAW,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,SAAS,CAAC,IAAI;gBACxB,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,YAAY,EAAE;aAC7D,CAAC;YACF,WAAW,CAAC;gBACV,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,SAAS,CAAC,QAAQ;gBAC5B,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,aAAa,EAAE;aAC9D,CAAC;SACH;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
2
|
import type { TemplateSeed } from '../../starter.types';
|
|
3
3
|
import type { ChessScreenIds } from './chess.routes';
|
|
4
|
-
export declare function createChessScreens(
|
|
4
|
+
export declare function createChessScreens(seed: TemplateSeed, idPrefix: string, screenIds: ChessScreenIds): AppManifest['screens'];
|
|
5
5
|
//# sourceMappingURL=chess.screens.d.ts.map
|
|
@@ -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,EAAE,MAAM,sBAAsB,CAAC;
|
|
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,EAAE,MAAM,sBAAsB,CAAC;AASxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,cAAc,GACxB,WAAW,CAAC,SAAS,CAAC,CAoIxB"}
|
|
@@ -1,18 +1,106 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createScreen, createScreenRoot, createSection, 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
|
+
export function createChessScreens(seed, idPrefix, screenIds) {
|
|
4
5
|
return {
|
|
5
|
-
[screenIds.home]:
|
|
6
|
-
|
|
7
|
-
screenId: screenIds.home,
|
|
6
|
+
[screenIds.home]: createScreen({
|
|
7
|
+
id: screenIds.home,
|
|
8
8
|
name: 'Home',
|
|
9
|
-
|
|
9
|
+
title: chessContent.home.title,
|
|
10
|
+
description: chessContent.home.description,
|
|
11
|
+
root: createScreenRoot(`${idPrefix}-home-screen`, { width: 'wide' }, [
|
|
12
|
+
createZoraNode(`${idPrefix}-home-header`, 'SectionHeader', {
|
|
13
|
+
eyebrow: chessContent.home.eyebrow,
|
|
14
|
+
title: chessContent.home.title,
|
|
15
|
+
description: chessContent.home.description,
|
|
16
|
+
}),
|
|
17
|
+
createSection(`${idPrefix}-home-board-section`, {
|
|
18
|
+
title: 'Board',
|
|
19
|
+
description: 'Start from the initial position and wire move handling once app state is available.',
|
|
20
|
+
}, [
|
|
21
|
+
createZoraNode(`${idPrefix}-home-board-panel`, 'Panel', {
|
|
22
|
+
title: 'Interactive board',
|
|
23
|
+
description: 'Rendered by @ankhorage/zora-chess through the generated app extension registry.',
|
|
24
|
+
tone: 'subtle',
|
|
25
|
+
}, [
|
|
26
|
+
createZoraNode(`${idPrefix}-home-chessboard`, 'ChessBoard', {
|
|
27
|
+
fen: INITIAL_CHESS_FEN,
|
|
28
|
+
orientation: 'white',
|
|
29
|
+
showCoordinates: true,
|
|
30
|
+
validateMoves: true,
|
|
31
|
+
testID: `${idPrefix}-home-chessboard`,
|
|
32
|
+
}),
|
|
33
|
+
createZoraNode(`${idPrefix}-home-position-card`, 'Card', {
|
|
34
|
+
eyebrow: 'Position',
|
|
35
|
+
title: 'Initial position',
|
|
36
|
+
description: 'A static FEN is used for now. Opening-book queries and persisted study state come later via data binding.',
|
|
37
|
+
tone: 'outline',
|
|
38
|
+
}),
|
|
39
|
+
]),
|
|
40
|
+
]),
|
|
41
|
+
createSection(`${idPrefix}-home-study-section`, {
|
|
42
|
+
title: 'Study context',
|
|
43
|
+
description: 'Useful starter scaffolding around the board without hardcoding an opening-book API yet.',
|
|
44
|
+
}, [
|
|
45
|
+
createZoraNode(`${idPrefix}-home-study-panel`, 'Panel', {
|
|
46
|
+
title: 'Practice flow',
|
|
47
|
+
description: 'Keep board, position notes, and next actions together so the app can evolve into a trainer.',
|
|
48
|
+
tone: 'subtle',
|
|
49
|
+
}, [
|
|
50
|
+
createZoraNode(`${idPrefix}-home-line-card`, 'Card', {
|
|
51
|
+
eyebrow: 'Opening line',
|
|
52
|
+
title: 'Choose a repertoire branch',
|
|
53
|
+
description: 'Reserve this block for the selected opening family, variation name, and next-book moves.',
|
|
54
|
+
tone: 'outline',
|
|
55
|
+
}),
|
|
56
|
+
createZoraNode(`${idPrefix}-home-action-card`, 'Card', {
|
|
57
|
+
eyebrow: 'Next step',
|
|
58
|
+
title: 'Play, review, repeat',
|
|
59
|
+
description: 'Connect move events to local state first, then add public opening-book API data later.',
|
|
60
|
+
tone: 'outline',
|
|
61
|
+
}),
|
|
62
|
+
]),
|
|
63
|
+
]),
|
|
64
|
+
]),
|
|
10
65
|
}),
|
|
11
|
-
[screenIds.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
66
|
+
[screenIds.settings]: createScreen({
|
|
67
|
+
id: screenIds.settings,
|
|
68
|
+
name: 'Settings',
|
|
69
|
+
title: chessContent.settings.title,
|
|
70
|
+
description: chessContent.settings.description,
|
|
71
|
+
root: createScreenRoot(`${idPrefix}-settings-screen`, { width: 'default' }, [
|
|
72
|
+
createZoraNode(`${idPrefix}-settings-header`, 'SectionHeader', {
|
|
73
|
+
eyebrow: chessContent.settings.eyebrow,
|
|
74
|
+
title: chessContent.settings.title,
|
|
75
|
+
description: chessContent.settings.description,
|
|
76
|
+
}),
|
|
77
|
+
createSettingsSection(`${idPrefix}-settings`, 'Board preferences', 'Prepare board display controls and study preferences before app-specific state is wired.', [
|
|
78
|
+
{
|
|
79
|
+
id: 'orientation-row',
|
|
80
|
+
title: 'Board orientation',
|
|
81
|
+
description: 'Default to White at the bottom; expose Black orientation later.',
|
|
82
|
+
meta: 'white',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'coordinates-row',
|
|
86
|
+
title: 'Coordinates',
|
|
87
|
+
description: 'Show board coordinates by default for study and notation workflows.',
|
|
88
|
+
meta: 'enabled',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'validation-row',
|
|
92
|
+
title: 'Move validation',
|
|
93
|
+
description: 'Use chess.js-backed validation from the chess extension component.',
|
|
94
|
+
meta: 'enabled',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'scope-row',
|
|
98
|
+
title: 'Category',
|
|
99
|
+
description: `${seed.categoryLabel} uses an external ZORA extension component.`,
|
|
100
|
+
meta: 'extension',
|
|
101
|
+
},
|
|
102
|
+
]),
|
|
103
|
+
]),
|
|
16
104
|
}),
|
|
17
105
|
};
|
|
18
106
|
}
|
|
@@ -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,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,cAAc,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/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Y,CAAC,QAAQ,CAAC,WAAW;iBAC/C,CAAC;gBACF,qBAAqB,CACnB,GAAG,QAAQ,WAAW,EACtB,mBAAmB,EACnB,0FAA0F,EAC1F;oBACE;wBACE,EAAE,EAAE,iBAAiB;wBACrB,KAAK,EAAE,mBAAmB;wBAC1B,WAAW,EAAE,iEAAiE;wBAC9E,IAAI,EAAE,OAAO;qBACd;oBACD;wBACE,EAAE,EAAE,iBAAiB;wBACrB,KAAK,EAAE,aAAa;wBACpB,WAAW,EAAE,qEAAqE;wBAClF,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,EAAE,EAAE,gBAAgB;wBACpB,KAAK,EAAE,iBAAiB;wBACxB,WAAW,EAAE,oEAAoE;wBACjF,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,EAAE,EAAE,WAAW;wBACf,KAAK,EAAE,UAAU;wBACjB,WAAW,EAAE,GAAG,IAAI,CAAC,aAAa,6CAA6C;wBAC/E,IAAI,EAAE,WAAW;qBAClB;iBACF,CACF;aACF,CAAC;SACH,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -10,7 +10,7 @@ export const gamesStarterTemplates = [
|
|
|
10
10
|
{
|
|
11
11
|
id: 'chess',
|
|
12
12
|
label: 'Chess',
|
|
13
|
-
description: 'A two-tab chess starter with
|
|
13
|
+
description: 'A two-tab chess starter with Home and Settings screens.',
|
|
14
14
|
create: createChessStarterTemplate,
|
|
15
15
|
},
|
|
16
16
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,+EAA+E;QAC5F,MAAM,EAAE,0BAA0B;KACnC;IACD;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/games/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,+EAA+E;QAC5F,MAAM,EAAE,0BAA0B;KACnC;IACD;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,yDAAyD;QACtE,MAAM,EAAE,0BAA0B;KACnC;CACqD,CAAC"}
|
package/package.json
CHANGED