@ankhorage/zora-tabletop 0.1.0 → 0.1.2
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 +45 -1
- package/dist/features/game-presentations/adapters/inbound/PokerTrainingTable.d.ts +16 -0
- package/dist/features/game-presentations/adapters/inbound/PokerTrainingTable.d.ts.map +1 -0
- package/dist/features/game-presentations/adapters/inbound/PokerTrainingTable.js +20 -0
- package/dist/features/game-presentations/adapters/inbound/PokerTrainingTable.js.map +1 -0
- package/dist/features/game-presentations/adapters/inbound/createPokerTrainingTableState.d.ts +13 -0
- package/dist/features/game-presentations/adapters/inbound/createPokerTrainingTableState.d.ts.map +1 -0
- package/dist/features/game-presentations/adapters/inbound/createPokerTrainingTableState.js +98 -0
- package/dist/features/game-presentations/adapters/inbound/createPokerTrainingTableState.js.map +1 -0
- package/dist/features/game-presentations/adapters/inbound/pokerTrainingTableMeta.d.ts +110 -0
- package/dist/features/game-presentations/adapters/inbound/pokerTrainingTableMeta.d.ts.map +1 -0
- package/dist/features/game-presentations/adapters/inbound/pokerTrainingTableMeta.js +81 -0
- package/dist/features/game-presentations/adapters/inbound/pokerTrainingTableMeta.js.map +1 -0
- package/dist/features/game-presentations/domain/createTabletopGameSeats.d.ts +25 -0
- package/dist/features/game-presentations/domain/createTabletopGameSeats.d.ts.map +1 -0
- package/dist/features/game-presentations/domain/createTabletopGameSeats.js +33 -0
- package/dist/features/game-presentations/domain/createTabletopGameSeats.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin.d.ts +116 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +2 -1
- package/dist/plugin.js.map +1 -1
- package/dist/registry.d.ts +222 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +11 -2
- package/dist/registry.js.map +1 -1
- package/dist/types/gamePresentation.d.ts +16 -0
- package/dist/types/gamePresentation.d.ts.map +1 -0
- package/dist/types/gamePresentation.js +2 -0
- package/dist/types/gamePresentation.js.map +1 -0
- package/dist/types/pokerTraining.d.ts +42 -0
- package/dist/types/pokerTraining.d.ts.map +1 -0
- package/dist/types/pokerTraining.js +2 -0
- package/dist/types/pokerTraining.js.map +1 -0
- package/package.json +2 -3
- package/src/features/game-presentations/adapters/inbound/PokerTrainingTable.tsx +41 -0
- package/src/features/game-presentations/adapters/inbound/createPokerTrainingTableState.test.ts +130 -0
- package/src/features/game-presentations/adapters/inbound/createPokerTrainingTableState.ts +133 -0
- package/src/features/game-presentations/adapters/inbound/pokerTrainingTableMeta.ts +80 -0
- package/src/features/game-presentations/domain/createTabletopGameSeats.test.ts +55 -0
- package/src/features/game-presentations/domain/createTabletopGameSeats.ts +43 -0
- package/src/index.ts +17 -0
- package/src/meta.test.ts +39 -0
- package/src/plugin.ts +2 -1
- package/src/registry.ts +12 -2
- package/src/types/gamePresentation.ts +19 -0
- package/src/types/pokerTraining.ts +51 -0
package/dist/plugin.d.ts
CHANGED
|
@@ -1,14 +1,126 @@
|
|
|
1
1
|
import { TabletopTable } from './components/tabletop-table';
|
|
2
|
+
import { PokerTrainingTable } from './features/game-presentations/adapters/inbound/PokerTrainingTable';
|
|
2
3
|
export declare const ZORA_TABLETOP_COMPONENT_REGISTRY: {
|
|
4
|
+
readonly PokerTrainingTable: typeof PokerTrainingTable;
|
|
3
5
|
readonly TabletopTable: typeof TabletopTable;
|
|
4
6
|
};
|
|
5
7
|
export declare const ZORA_TABLETOP_PLUGIN: {
|
|
6
8
|
readonly componentRegistry: {
|
|
9
|
+
readonly PokerTrainingTable: typeof PokerTrainingTable;
|
|
7
10
|
readonly TabletopTable: typeof TabletopTable;
|
|
8
11
|
};
|
|
9
12
|
readonly packageName: "@ankhorage/zora-tabletop";
|
|
10
13
|
readonly displayName: "ZORA Tabletop";
|
|
11
14
|
readonly componentMeta: {
|
|
15
|
+
readonly PokerTrainingTable: {
|
|
16
|
+
readonly name: "PokerTrainingTable";
|
|
17
|
+
readonly category: "pattern";
|
|
18
|
+
readonly description: "Reconstructs a complete nine-seat poker table from sparse training task data.";
|
|
19
|
+
readonly directManifestNode: true;
|
|
20
|
+
readonly allowedChildren: readonly [];
|
|
21
|
+
readonly blueprint: {
|
|
22
|
+
readonly label: "Poker training table";
|
|
23
|
+
readonly defaultProps: {
|
|
24
|
+
readonly task: {};
|
|
25
|
+
readonly defaultStackBigBlinds: 100;
|
|
26
|
+
readonly shape: "oval";
|
|
27
|
+
readonly cardSize: "small";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly bindings: {
|
|
31
|
+
readonly props: {
|
|
32
|
+
readonly task: {
|
|
33
|
+
readonly label: "Poker training task";
|
|
34
|
+
readonly description: "Table-relevant fields from a poker training task.";
|
|
35
|
+
readonly value: {
|
|
36
|
+
readonly type: "object";
|
|
37
|
+
readonly fields: readonly [{
|
|
38
|
+
readonly path: "blinds";
|
|
39
|
+
readonly type: "object";
|
|
40
|
+
readonly label: "Blinds";
|
|
41
|
+
}, {
|
|
42
|
+
readonly path: "heroPosition";
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly label: "Hero position";
|
|
45
|
+
}, {
|
|
46
|
+
readonly path: "heroCards";
|
|
47
|
+
readonly type: "array";
|
|
48
|
+
readonly label: "Hero cards";
|
|
49
|
+
}, {
|
|
50
|
+
readonly path: "communityCards";
|
|
51
|
+
readonly type: "array";
|
|
52
|
+
readonly label: "Community cards";
|
|
53
|
+
}, {
|
|
54
|
+
readonly path: "pot";
|
|
55
|
+
readonly type: "number";
|
|
56
|
+
readonly label: "Pot";
|
|
57
|
+
}, {
|
|
58
|
+
readonly path: "players";
|
|
59
|
+
readonly type: "array";
|
|
60
|
+
readonly label: "Players";
|
|
61
|
+
}];
|
|
62
|
+
};
|
|
63
|
+
readonly acceptsFallback: true;
|
|
64
|
+
};
|
|
65
|
+
readonly disabled: {
|
|
66
|
+
readonly label: "Disabled";
|
|
67
|
+
readonly value: {
|
|
68
|
+
readonly type: "boolean";
|
|
69
|
+
};
|
|
70
|
+
readonly acceptsFallback: true;
|
|
71
|
+
readonly acceptsTransforms: true;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
readonly props: {
|
|
76
|
+
readonly defaultStackBigBlinds: {
|
|
77
|
+
readonly type: "number";
|
|
78
|
+
readonly category: "Players";
|
|
79
|
+
readonly label: "Default stack in big blinds";
|
|
80
|
+
readonly default: 100;
|
|
81
|
+
readonly authoring: {
|
|
82
|
+
readonly authority: "instance";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly shape: {
|
|
86
|
+
readonly type: "enum";
|
|
87
|
+
readonly category: "Table";
|
|
88
|
+
readonly label: "Shape";
|
|
89
|
+
readonly enum: readonly ["circle", "oval", "rounded"];
|
|
90
|
+
readonly default: "oval";
|
|
91
|
+
readonly authoring: {
|
|
92
|
+
readonly authority: "instance";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly cardSize: {
|
|
96
|
+
readonly type: "enum";
|
|
97
|
+
readonly category: "Cards";
|
|
98
|
+
readonly label: "Card size";
|
|
99
|
+
readonly enum: readonly ["small", "medium", "large"];
|
|
100
|
+
readonly default: "small";
|
|
101
|
+
readonly authoring: {
|
|
102
|
+
readonly authority: "instance";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly disabled: {
|
|
106
|
+
readonly type: "boolean";
|
|
107
|
+
readonly category: "State";
|
|
108
|
+
readonly label: "Disabled";
|
|
109
|
+
readonly default: false;
|
|
110
|
+
readonly authoring: {
|
|
111
|
+
readonly authority: "instance";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly accessibilityLabel: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly category: "Accessibility";
|
|
117
|
+
readonly label: "Accessibility label";
|
|
118
|
+
readonly authoring: {
|
|
119
|
+
readonly authority: "instance";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
12
124
|
readonly TabletopTable: {
|
|
13
125
|
readonly name: "TabletopTable";
|
|
14
126
|
readonly category: "component";
|
|
@@ -155,8 +267,11 @@ export declare const ZORA_TABLETOP_PLUGIN: {
|
|
|
155
267
|
};
|
|
156
268
|
};
|
|
157
269
|
readonly placements: readonly [{
|
|
270
|
+
readonly child: "PokerTrainingTable";
|
|
271
|
+
readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
|
|
272
|
+
}, {
|
|
158
273
|
readonly child: "TabletopTable";
|
|
159
|
-
readonly parents: readonly ["
|
|
274
|
+
readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
|
|
160
275
|
}];
|
|
161
276
|
};
|
|
162
277
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mEAAmE,CAAC;AAGvG,eAAO,MAAM,gCAAgC;;;CAAiD,CAAC;AAE/F,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvB,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TabletopTable } from './components/tabletop-table';
|
|
2
|
+
import { PokerTrainingTable } from './features/game-presentations/adapters/inbound/PokerTrainingTable';
|
|
2
3
|
import { ZORA_PLUGIN_METADATA } from './registry';
|
|
3
|
-
export const ZORA_TABLETOP_COMPONENT_REGISTRY = { TabletopTable };
|
|
4
|
+
export const ZORA_TABLETOP_COMPONENT_REGISTRY = { PokerTrainingTable, TabletopTable };
|
|
4
5
|
export const ZORA_TABLETOP_PLUGIN = {
|
|
5
6
|
...ZORA_PLUGIN_METADATA,
|
|
6
7
|
componentRegistry: ZORA_TABLETOP_COMPONENT_REGISTRY,
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,aAAa,EAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mEAAmE,CAAC;AACvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,kBAAkB,EAAE,aAAa,EAAW,CAAC;AAE/F,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,GAAG,oBAAoB;IACvB,iBAAiB,EAAE,gCAAgC;CAC3C,CAAC","sourcesContent":["import { TabletopTable } from './components/tabletop-table';\nimport { PokerTrainingTable } from './features/game-presentations/adapters/inbound/PokerTrainingTable';\nimport { ZORA_PLUGIN_METADATA } from './registry';\n\nexport const ZORA_TABLETOP_COMPONENT_REGISTRY = { PokerTrainingTable, TabletopTable } as const;\n\nexport const ZORA_TABLETOP_PLUGIN = {\n ...ZORA_PLUGIN_METADATA,\n componentRegistry: ZORA_TABLETOP_COMPONENT_REGISTRY,\n} as const;\n"]}
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,4 +1,113 @@
|
|
|
1
1
|
export declare const ZORA_TABLETOP_COMPONENT_META: {
|
|
2
|
+
readonly PokerTrainingTable: {
|
|
3
|
+
readonly name: "PokerTrainingTable";
|
|
4
|
+
readonly category: "pattern";
|
|
5
|
+
readonly description: "Reconstructs a complete nine-seat poker table from sparse training task data.";
|
|
6
|
+
readonly directManifestNode: true;
|
|
7
|
+
readonly allowedChildren: readonly [];
|
|
8
|
+
readonly blueprint: {
|
|
9
|
+
readonly label: "Poker training table";
|
|
10
|
+
readonly defaultProps: {
|
|
11
|
+
readonly task: {};
|
|
12
|
+
readonly defaultStackBigBlinds: 100;
|
|
13
|
+
readonly shape: "oval";
|
|
14
|
+
readonly cardSize: "small";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly bindings: {
|
|
18
|
+
readonly props: {
|
|
19
|
+
readonly task: {
|
|
20
|
+
readonly label: "Poker training task";
|
|
21
|
+
readonly description: "Table-relevant fields from a poker training task.";
|
|
22
|
+
readonly value: {
|
|
23
|
+
readonly type: "object";
|
|
24
|
+
readonly fields: readonly [{
|
|
25
|
+
readonly path: "blinds";
|
|
26
|
+
readonly type: "object";
|
|
27
|
+
readonly label: "Blinds";
|
|
28
|
+
}, {
|
|
29
|
+
readonly path: "heroPosition";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly label: "Hero position";
|
|
32
|
+
}, {
|
|
33
|
+
readonly path: "heroCards";
|
|
34
|
+
readonly type: "array";
|
|
35
|
+
readonly label: "Hero cards";
|
|
36
|
+
}, {
|
|
37
|
+
readonly path: "communityCards";
|
|
38
|
+
readonly type: "array";
|
|
39
|
+
readonly label: "Community cards";
|
|
40
|
+
}, {
|
|
41
|
+
readonly path: "pot";
|
|
42
|
+
readonly type: "number";
|
|
43
|
+
readonly label: "Pot";
|
|
44
|
+
}, {
|
|
45
|
+
readonly path: "players";
|
|
46
|
+
readonly type: "array";
|
|
47
|
+
readonly label: "Players";
|
|
48
|
+
}];
|
|
49
|
+
};
|
|
50
|
+
readonly acceptsFallback: true;
|
|
51
|
+
};
|
|
52
|
+
readonly disabled: {
|
|
53
|
+
readonly label: "Disabled";
|
|
54
|
+
readonly value: {
|
|
55
|
+
readonly type: "boolean";
|
|
56
|
+
};
|
|
57
|
+
readonly acceptsFallback: true;
|
|
58
|
+
readonly acceptsTransforms: true;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
readonly props: {
|
|
63
|
+
readonly defaultStackBigBlinds: {
|
|
64
|
+
readonly type: "number";
|
|
65
|
+
readonly category: "Players";
|
|
66
|
+
readonly label: "Default stack in big blinds";
|
|
67
|
+
readonly default: 100;
|
|
68
|
+
readonly authoring: {
|
|
69
|
+
readonly authority: "instance";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
readonly shape: {
|
|
73
|
+
readonly type: "enum";
|
|
74
|
+
readonly category: "Table";
|
|
75
|
+
readonly label: "Shape";
|
|
76
|
+
readonly enum: readonly ["circle", "oval", "rounded"];
|
|
77
|
+
readonly default: "oval";
|
|
78
|
+
readonly authoring: {
|
|
79
|
+
readonly authority: "instance";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly cardSize: {
|
|
83
|
+
readonly type: "enum";
|
|
84
|
+
readonly category: "Cards";
|
|
85
|
+
readonly label: "Card size";
|
|
86
|
+
readonly enum: readonly ["small", "medium", "large"];
|
|
87
|
+
readonly default: "small";
|
|
88
|
+
readonly authoring: {
|
|
89
|
+
readonly authority: "instance";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly disabled: {
|
|
93
|
+
readonly type: "boolean";
|
|
94
|
+
readonly category: "State";
|
|
95
|
+
readonly label: "Disabled";
|
|
96
|
+
readonly default: false;
|
|
97
|
+
readonly authoring: {
|
|
98
|
+
readonly authority: "instance";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly accessibilityLabel: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly category: "Accessibility";
|
|
104
|
+
readonly label: "Accessibility label";
|
|
105
|
+
readonly authoring: {
|
|
106
|
+
readonly authority: "instance";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
2
111
|
readonly TabletopTable: {
|
|
3
112
|
readonly name: "TabletopTable";
|
|
4
113
|
readonly category: "component";
|
|
@@ -148,6 +257,115 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
148
257
|
readonly packageName: "@ankhorage/zora-tabletop";
|
|
149
258
|
readonly displayName: "ZORA Tabletop";
|
|
150
259
|
readonly componentMeta: {
|
|
260
|
+
readonly PokerTrainingTable: {
|
|
261
|
+
readonly name: "PokerTrainingTable";
|
|
262
|
+
readonly category: "pattern";
|
|
263
|
+
readonly description: "Reconstructs a complete nine-seat poker table from sparse training task data.";
|
|
264
|
+
readonly directManifestNode: true;
|
|
265
|
+
readonly allowedChildren: readonly [];
|
|
266
|
+
readonly blueprint: {
|
|
267
|
+
readonly label: "Poker training table";
|
|
268
|
+
readonly defaultProps: {
|
|
269
|
+
readonly task: {};
|
|
270
|
+
readonly defaultStackBigBlinds: 100;
|
|
271
|
+
readonly shape: "oval";
|
|
272
|
+
readonly cardSize: "small";
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
readonly bindings: {
|
|
276
|
+
readonly props: {
|
|
277
|
+
readonly task: {
|
|
278
|
+
readonly label: "Poker training task";
|
|
279
|
+
readonly description: "Table-relevant fields from a poker training task.";
|
|
280
|
+
readonly value: {
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly fields: readonly [{
|
|
283
|
+
readonly path: "blinds";
|
|
284
|
+
readonly type: "object";
|
|
285
|
+
readonly label: "Blinds";
|
|
286
|
+
}, {
|
|
287
|
+
readonly path: "heroPosition";
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
readonly label: "Hero position";
|
|
290
|
+
}, {
|
|
291
|
+
readonly path: "heroCards";
|
|
292
|
+
readonly type: "array";
|
|
293
|
+
readonly label: "Hero cards";
|
|
294
|
+
}, {
|
|
295
|
+
readonly path: "communityCards";
|
|
296
|
+
readonly type: "array";
|
|
297
|
+
readonly label: "Community cards";
|
|
298
|
+
}, {
|
|
299
|
+
readonly path: "pot";
|
|
300
|
+
readonly type: "number";
|
|
301
|
+
readonly label: "Pot";
|
|
302
|
+
}, {
|
|
303
|
+
readonly path: "players";
|
|
304
|
+
readonly type: "array";
|
|
305
|
+
readonly label: "Players";
|
|
306
|
+
}];
|
|
307
|
+
};
|
|
308
|
+
readonly acceptsFallback: true;
|
|
309
|
+
};
|
|
310
|
+
readonly disabled: {
|
|
311
|
+
readonly label: "Disabled";
|
|
312
|
+
readonly value: {
|
|
313
|
+
readonly type: "boolean";
|
|
314
|
+
};
|
|
315
|
+
readonly acceptsFallback: true;
|
|
316
|
+
readonly acceptsTransforms: true;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly props: {
|
|
321
|
+
readonly defaultStackBigBlinds: {
|
|
322
|
+
readonly type: "number";
|
|
323
|
+
readonly category: "Players";
|
|
324
|
+
readonly label: "Default stack in big blinds";
|
|
325
|
+
readonly default: 100;
|
|
326
|
+
readonly authoring: {
|
|
327
|
+
readonly authority: "instance";
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly shape: {
|
|
331
|
+
readonly type: "enum";
|
|
332
|
+
readonly category: "Table";
|
|
333
|
+
readonly label: "Shape";
|
|
334
|
+
readonly enum: readonly ["circle", "oval", "rounded"];
|
|
335
|
+
readonly default: "oval";
|
|
336
|
+
readonly authoring: {
|
|
337
|
+
readonly authority: "instance";
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
readonly cardSize: {
|
|
341
|
+
readonly type: "enum";
|
|
342
|
+
readonly category: "Cards";
|
|
343
|
+
readonly label: "Card size";
|
|
344
|
+
readonly enum: readonly ["small", "medium", "large"];
|
|
345
|
+
readonly default: "small";
|
|
346
|
+
readonly authoring: {
|
|
347
|
+
readonly authority: "instance";
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
readonly disabled: {
|
|
351
|
+
readonly type: "boolean";
|
|
352
|
+
readonly category: "State";
|
|
353
|
+
readonly label: "Disabled";
|
|
354
|
+
readonly default: false;
|
|
355
|
+
readonly authoring: {
|
|
356
|
+
readonly authority: "instance";
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
readonly accessibilityLabel: {
|
|
360
|
+
readonly type: "string";
|
|
361
|
+
readonly category: "Accessibility";
|
|
362
|
+
readonly label: "Accessibility label";
|
|
363
|
+
readonly authoring: {
|
|
364
|
+
readonly authority: "instance";
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
};
|
|
151
369
|
readonly TabletopTable: {
|
|
152
370
|
readonly name: "TabletopTable";
|
|
153
371
|
readonly category: "component";
|
|
@@ -294,8 +512,11 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
294
512
|
};
|
|
295
513
|
};
|
|
296
514
|
readonly placements: readonly [{
|
|
515
|
+
readonly child: "PokerTrainingTable";
|
|
516
|
+
readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
|
|
517
|
+
}, {
|
|
297
518
|
readonly child: "TabletopTable";
|
|
298
|
-
readonly parents: readonly ["
|
|
519
|
+
readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
|
|
299
520
|
}];
|
|
300
521
|
};
|
|
301
522
|
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG/B,CAAC;AAIX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcvB,CAAC"}
|
package/dist/registry.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
+
import { pokerTrainingTableMeta } from './features/game-presentations/adapters/inbound/pokerTrainingTableMeta';
|
|
1
2
|
import { tabletopTableMeta } from './meta';
|
|
2
|
-
export const ZORA_TABLETOP_COMPONENT_META = {
|
|
3
|
+
export const ZORA_TABLETOP_COMPONENT_META = {
|
|
4
|
+
PokerTrainingTable: pokerTrainingTableMeta,
|
|
5
|
+
TabletopTable: tabletopTableMeta,
|
|
6
|
+
};
|
|
7
|
+
const TABLETOP_PLACEMENT_PARENTS = ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'];
|
|
3
8
|
export const ZORA_PLUGIN_METADATA = {
|
|
4
9
|
packageName: '@ankhorage/zora-tabletop',
|
|
5
10
|
displayName: 'ZORA Tabletop',
|
|
6
11
|
componentMeta: ZORA_TABLETOP_COMPONENT_META,
|
|
7
12
|
placements: [
|
|
13
|
+
{
|
|
14
|
+
child: 'PokerTrainingTable',
|
|
15
|
+
parents: TABLETOP_PLACEMENT_PARENTS,
|
|
16
|
+
},
|
|
8
17
|
{
|
|
9
18
|
child: 'TabletopTable',
|
|
10
|
-
parents:
|
|
19
|
+
parents: TABLETOP_PLACEMENT_PARENTS,
|
|
11
20
|
},
|
|
12
21
|
],
|
|
13
22
|
};
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,aAAa,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uEAAuE,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,kBAAkB,EAAE,sBAAsB;IAC1C,aAAa,EAAE,iBAAiB;CACxB,CAAC;AAEX,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAU,CAAC;AAEhG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,4BAA4B;IAC3C,UAAU,EAAE;QACV;YACE,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE,0BAA0B;SACpC;QACD;YACE,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,0BAA0B;SACpC;KACF;CACO,CAAC","sourcesContent":["import { pokerTrainingTableMeta } from './features/game-presentations/adapters/inbound/pokerTrainingTableMeta';\nimport { tabletopTableMeta } from './meta';\n\nexport const ZORA_TABLETOP_COMPONENT_META = {\n PokerTrainingTable: pokerTrainingTableMeta,\n TabletopTable: tabletopTableMeta,\n} as const;\n\nconst TABLETOP_PLACEMENT_PARENTS = ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'] as const;\n\nexport const ZORA_PLUGIN_METADATA = {\n packageName: '@ankhorage/zora-tabletop',\n displayName: 'ZORA Tabletop',\n componentMeta: ZORA_TABLETOP_COMPONENT_META,\n placements: [\n {\n child: 'PokerTrainingTable',\n parents: TABLETOP_PLACEMENT_PARENTS,\n },\n {\n child: 'TabletopTable',\n parents: TABLETOP_PLACEMENT_PARENTS,\n },\n ],\n} as const;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TabletopSeatState } from '../types';
|
|
2
|
+
export type TabletopGameSeatPresentation = Omit<TabletopSeatState, 'id'>;
|
|
3
|
+
export interface TabletopGameSeatDefinition {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly defaultState: TabletopGameSeatPresentation;
|
|
6
|
+
}
|
|
7
|
+
export interface TabletopGameParticipantState {
|
|
8
|
+
readonly seatId: string;
|
|
9
|
+
readonly state: Partial<TabletopGameSeatPresentation>;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateTabletopGameSeatsInput {
|
|
12
|
+
readonly seats: readonly TabletopGameSeatDefinition[];
|
|
13
|
+
readonly participants: readonly TabletopGameParticipantState[];
|
|
14
|
+
readonly missingParticipantState?: Partial<TabletopGameSeatPresentation>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=gamePresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gamePresentation.d.ts","sourceRoot":"","sources":["../../src/types/gamePresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAEzE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,4BAA4B,CAAC;CACrD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACtD,QAAQ,CAAC,YAAY,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC/D,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAC1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gamePresentation.js","sourceRoot":"","sources":["../../src/types/gamePresentation.ts"],"names":[],"mappings":"","sourcesContent":["import type { TabletopSeatState } from '../types';\n\nexport type TabletopGameSeatPresentation = Omit<TabletopSeatState, 'id'>;\n\nexport interface TabletopGameSeatDefinition {\n readonly id: string;\n readonly defaultState: TabletopGameSeatPresentation;\n}\n\nexport interface TabletopGameParticipantState {\n readonly seatId: string;\n readonly state: Partial<TabletopGameSeatPresentation>;\n}\n\nexport interface CreateTabletopGameSeatsInput {\n readonly seats: readonly TabletopGameSeatDefinition[];\n readonly participants: readonly TabletopGameParticipantState[];\n readonly missingParticipantState?: Partial<TabletopGameSeatPresentation>;\n}\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { TabletopColorOverrides } from '../colors';
|
|
2
|
+
import type { PlayingCardValue, TabletopCardSize, TabletopSeatState, TabletopShape } from '../types';
|
|
3
|
+
export interface PokerTrainingPlayer {
|
|
4
|
+
readonly position: string;
|
|
5
|
+
readonly stack?: number;
|
|
6
|
+
readonly bet?: number;
|
|
7
|
+
readonly cards?: readonly PlayingCardValue[];
|
|
8
|
+
readonly folded?: boolean;
|
|
9
|
+
readonly isHero?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface PokerTrainingTaskTableData {
|
|
12
|
+
readonly blinds?: {
|
|
13
|
+
readonly small: number;
|
|
14
|
+
readonly big: number;
|
|
15
|
+
};
|
|
16
|
+
readonly heroPosition?: string;
|
|
17
|
+
readonly heroCards?: readonly PlayingCardValue[];
|
|
18
|
+
readonly communityCards?: readonly PlayingCardValue[];
|
|
19
|
+
readonly pot?: number;
|
|
20
|
+
readonly players?: readonly PokerTrainingPlayer[];
|
|
21
|
+
}
|
|
22
|
+
export interface CreatePokerTrainingTableStateOptions {
|
|
23
|
+
readonly defaultStackBigBlinds?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PokerTrainingTableState {
|
|
26
|
+
readonly seats: readonly TabletopSeatState[];
|
|
27
|
+
readonly centerCards: readonly PlayingCardValue[];
|
|
28
|
+
readonly centerLabel?: string;
|
|
29
|
+
readonly centerSublabel?: string;
|
|
30
|
+
readonly accessibilityLabel: string;
|
|
31
|
+
}
|
|
32
|
+
export interface PokerTrainingTableProps {
|
|
33
|
+
readonly task?: PokerTrainingTaskTableData;
|
|
34
|
+
readonly defaultStackBigBlinds?: number;
|
|
35
|
+
readonly shape?: TabletopShape;
|
|
36
|
+
readonly cardSize?: TabletopCardSize;
|
|
37
|
+
readonly disabled?: boolean;
|
|
38
|
+
readonly colorScheme?: TabletopColorOverrides;
|
|
39
|
+
readonly accessibilityLabel?: string;
|
|
40
|
+
readonly testID?: string;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=pokerTraining.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pokerTraining.d.ts","sourceRoot":"","sources":["../../src/types/pokerTraining.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACtD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pokerTraining.js","sourceRoot":"","sources":["../../src/types/pokerTraining.ts"],"names":[],"mappings":"","sourcesContent":["import type { TabletopColorOverrides } from '../colors';\nimport type {\n PlayingCardValue,\n TabletopCardSize,\n TabletopSeatState,\n TabletopShape,\n} from '../types';\n\nexport interface PokerTrainingPlayer {\n readonly position: string;\n readonly stack?: number;\n readonly bet?: number;\n readonly cards?: readonly PlayingCardValue[];\n readonly folded?: boolean;\n readonly isHero?: boolean;\n}\n\nexport interface PokerTrainingTaskTableData {\n readonly blinds?: {\n readonly small: number;\n readonly big: number;\n };\n readonly heroPosition?: string;\n readonly heroCards?: readonly PlayingCardValue[];\n readonly communityCards?: readonly PlayingCardValue[];\n readonly pot?: number;\n readonly players?: readonly PokerTrainingPlayer[];\n}\n\nexport interface CreatePokerTrainingTableStateOptions {\n readonly defaultStackBigBlinds?: number;\n}\n\nexport interface PokerTrainingTableState {\n readonly seats: readonly TabletopSeatState[];\n readonly centerCards: readonly PlayingCardValue[];\n readonly centerLabel?: string;\n readonly centerSublabel?: string;\n readonly accessibilityLabel: string;\n}\n\nexport interface PokerTrainingTableProps {\n readonly task?: PokerTrainingTaskTableData;\n readonly defaultStackBigBlinds?: number;\n readonly shape?: TabletopShape;\n readonly cardSize?: TabletopCardSize;\n readonly disabled?: boolean;\n readonly colorScheme?: TabletopColorOverrides;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora-tabletop",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"description": "Tabletop and card-game UI primitives for React Native and React Native Web, built on ZORA.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora-tabletop#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@ankhorage/devtools": "^1.11.11",
|
|
78
78
|
"@ankhorage/paradox": "^0.1.24",
|
|
79
|
-
"@ankhorage/zora": "^
|
|
80
|
-
"@react-native-picker/picker": "2.11.4",
|
|
79
|
+
"@ankhorage/zora": "^19.0.1",
|
|
81
80
|
"@react-native-vector-icons/fontawesome": "^13.1.3",
|
|
82
81
|
"@react-native-vector-icons/fontawesome5": "^13.1.3",
|
|
83
82
|
"@react-native-vector-icons/fontawesome6": "^13.1.3",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { TabletopTable } from '../../../../components/tabletop-table';
|
|
4
|
+
import type { PokerTrainingTableProps } from '../../../../types/pokerTraining';
|
|
5
|
+
import { createPokerTrainingTableState } from './createPokerTrainingTableState';
|
|
6
|
+
|
|
7
|
+
/***
|
|
8
|
+
* Manifest-ready poker training pattern that reconstructs a complete table from task data.
|
|
9
|
+
*
|
|
10
|
+
* Bind the raw training task object to `task`; the pattern maps sparse active-player data to a
|
|
11
|
+
* full nine-seat presentation while leaving API execution in the generated application.
|
|
12
|
+
*
|
|
13
|
+
* @readme
|
|
14
|
+
* @example Training task binding
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <PokerTrainingTable task={task} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export function PokerTrainingTable({
|
|
20
|
+
task = {},
|
|
21
|
+
defaultStackBigBlinds = 100,
|
|
22
|
+
accessibilityLabel,
|
|
23
|
+
...tableProps
|
|
24
|
+
}: PokerTrainingTableProps) {
|
|
25
|
+
const state = React.useMemo(
|
|
26
|
+
() => createPokerTrainingTableState(task, { defaultStackBigBlinds }),
|
|
27
|
+
[defaultStackBigBlinds, task],
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<TabletopTable
|
|
32
|
+
{...tableProps}
|
|
33
|
+
accessibilityLabel={accessibilityLabel ?? state.accessibilityLabel}
|
|
34
|
+
centerCards={state.centerCards}
|
|
35
|
+
centerLabel={state.centerLabel}
|
|
36
|
+
centerSublabel={state.centerSublabel}
|
|
37
|
+
seatCount={9}
|
|
38
|
+
seats={state.seats}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
}
|