@dxos/plugin-chess 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934

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.
Files changed (205) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/ChessArticle-QLLKZGPH.mjs +88 -0
  4. package/dist/lib/neutral/ChessArticle-QLLKZGPH.mjs.map +7 -0
  5. package/dist/lib/neutral/ChessCard-I5RSZZIP.mjs +19 -0
  6. package/dist/lib/neutral/ChessCard-I5RSZZIP.mjs.map +7 -0
  7. package/dist/lib/neutral/ChessPlugin.mjs +10 -0
  8. package/dist/lib/neutral/ChessPlugin.node.mjs +23 -0
  9. package/dist/lib/neutral/ChessPlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs +15 -0
  11. package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs.map +7 -0
  12. package/dist/lib/neutral/blueprints/index.mjs +8 -0
  13. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  14. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-5UOTTW6U.mjs +8 -0
  16. package/dist/lib/neutral/chunk-5UOTTW6U.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-E4LZPHAQ.mjs +148 -0
  18. package/dist/lib/neutral/chunk-E4LZPHAQ.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-HVIKFYAW.mjs +29 -0
  20. package/dist/lib/neutral/chunk-HVIKFYAW.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-NYIJLMS3.mjs +25 -0
  22. package/dist/lib/neutral/chunk-NYIJLMS3.mjs.map +7 -0
  23. package/dist/lib/{browser/chunk-MC7L6JNC.mjs → neutral/chunk-XWKNXG62.mjs} +8 -10
  24. package/dist/lib/neutral/chunk-XWKNXG62.mjs.map +7 -0
  25. package/dist/lib/{browser → neutral/components}/index.mjs +8 -158
  26. package/dist/lib/neutral/components/index.mjs.map +7 -0
  27. package/dist/lib/neutral/containers/index.mjs +11 -0
  28. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  29. package/dist/lib/neutral/game-variant-24UKIBRM.mjs +40 -0
  30. package/dist/lib/neutral/game-variant-24UKIBRM.mjs.map +7 -0
  31. package/dist/lib/neutral/index.mjs +18 -0
  32. package/dist/lib/neutral/meta.json +1 -0
  33. package/dist/lib/neutral/meta.mjs +8 -0
  34. package/dist/lib/neutral/move-RQZ7BJY3.mjs +37 -0
  35. package/dist/lib/neutral/move-RQZ7BJY3.mjs.map +7 -0
  36. package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs +13 -0
  37. package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs.map +7 -0
  38. package/dist/lib/{browser/types → neutral/operations}/index.mjs +3 -3
  39. package/dist/lib/neutral/play-GDGCEPQL.mjs +46 -0
  40. package/dist/lib/neutral/play-GDGCEPQL.mjs.map +7 -0
  41. package/dist/lib/neutral/plugin.mjs +16 -0
  42. package/dist/lib/neutral/plugin.mjs.map +7 -0
  43. package/dist/lib/{browser/print-EW7LPW4D.mjs → neutral/print-ZQA74KZI.mjs} +5 -6
  44. package/dist/lib/neutral/print-ZQA74KZI.mjs.map +7 -0
  45. package/dist/lib/neutral/testing.mjs +8 -0
  46. package/dist/lib/neutral/translations.mjs +34 -0
  47. package/dist/lib/neutral/translations.mjs.map +7 -0
  48. package/dist/lib/neutral/types/index.mjs +10 -0
  49. package/dist/types/src/ChessPlugin.d.ts +1 -0
  50. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  51. package/dist/types/src/ChessPlugin.node.d.ts +8 -0
  52. package/dist/types/src/ChessPlugin.node.d.ts.map +1 -0
  53. package/dist/types/src/ChessPlugin.test.d.ts +2 -0
  54. package/dist/types/src/ChessPlugin.test.d.ts.map +1 -0
  55. package/dist/types/src/blueprints/chess-blueprint.d.ts +2 -2
  56. package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -1
  57. package/dist/types/src/blueprints/index.d.ts +0 -1
  58. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  59. package/dist/types/src/capabilities/blueprint-definition.d.ts +2 -2
  60. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  61. package/dist/types/src/capabilities/game-variant.d.ts +6 -0
  62. package/dist/types/src/capabilities/game-variant.d.ts.map +1 -0
  63. package/dist/types/src/capabilities/index.d.ts +3 -3
  64. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  65. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  66. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  67. package/dist/types/src/components/Chessboard/Chessboard.d.ts +6 -2
  68. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -1
  69. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +32 -23
  70. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -1
  71. package/dist/types/src/components/Chessboard/Info.d.ts +4 -5
  72. package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -1
  73. package/dist/types/src/components/Chessboard/types.d.ts +2 -2
  74. package/dist/types/src/components/Chessboard/types.d.ts.map +1 -1
  75. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +3 -4
  76. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -1
  77. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +32 -23
  78. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -1
  79. package/dist/types/src/containers/ChessCard/ChessCard.d.ts +3 -4
  80. package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -1
  81. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -1
  82. package/dist/types/src/index.d.ts +0 -2
  83. package/dist/types/src/index.d.ts.map +1 -1
  84. package/dist/types/src/meta.d.ts.map +1 -1
  85. package/dist/types/src/operations/index.d.ts +2 -3
  86. package/dist/types/src/operations/index.d.ts.map +1 -1
  87. package/dist/types/src/operations/move.d.ts +3 -3
  88. package/dist/types/src/operations/move.d.ts.map +1 -1
  89. package/dist/types/src/operations/play.d.ts +3 -3
  90. package/dist/types/src/operations/play.d.ts.map +1 -1
  91. package/dist/types/src/operations/print.d.ts +3 -3
  92. package/dist/types/src/operations/print.d.ts.map +1 -1
  93. package/dist/types/src/{cli/plugin.d.ts → plugin.d.ts} +1 -0
  94. package/dist/types/src/plugin.d.ts.map +1 -0
  95. package/dist/types/src/testing.d.ts +2 -0
  96. package/dist/types/src/testing.d.ts.map +1 -0
  97. package/dist/types/src/translations.d.ts +32 -24
  98. package/dist/types/src/translations.d.ts.map +1 -1
  99. package/dist/types/src/types/Chess.d.ts +10 -19
  100. package/dist/types/src/types/Chess.d.ts.map +1 -1
  101. package/dist/types/src/types/ChessOperation.d.ts +24 -0
  102. package/dist/types/src/types/ChessOperation.d.ts.map +1 -0
  103. package/dist/types/src/types/index.d.ts +1 -0
  104. package/dist/types/src/types/index.d.ts.map +1 -1
  105. package/dist/types/tsconfig.tsbuildinfo +1 -1
  106. package/package.json +96 -74
  107. package/src/ChessPlugin.node.ts +23 -0
  108. package/src/ChessPlugin.test.ts +50 -0
  109. package/src/ChessPlugin.tsx +11 -34
  110. package/src/blueprints/chess-blueprint.ts +6 -9
  111. package/src/blueprints/index.ts +0 -1
  112. package/src/capabilities/blueprint-definition.ts +2 -0
  113. package/src/capabilities/game-variant.ts +42 -0
  114. package/src/capabilities/index.ts +3 -2
  115. package/src/capabilities/operation-handler.ts +3 -3
  116. package/src/components/Chessboard/Chessboard.stories.tsx +3 -3
  117. package/src/components/Chessboard/Chessboard.tsx +4 -4
  118. package/src/components/Chessboard/Info.tsx +3 -63
  119. package/src/components/Chessboard/types.ts +1 -1
  120. package/src/containers/ChessArticle/ChessArticle.stories.tsx +9 -3
  121. package/src/containers/ChessArticle/ChessArticle.tsx +45 -10
  122. package/src/containers/ChessCard/ChessCard.stories.tsx +7 -2
  123. package/src/containers/ChessCard/ChessCard.tsx +10 -5
  124. package/src/index.ts +0 -3
  125. package/src/meta.ts +2 -0
  126. package/src/operations/index.ts +2 -7
  127. package/src/operations/move.ts +13 -13
  128. package/src/operations/play.ts +14 -14
  129. package/src/operations/print.ts +3 -3
  130. package/src/plugin.ts +11 -0
  131. package/src/testing.ts +7 -0
  132. package/src/translations.ts +6 -10
  133. package/src/types/Chess.ts +19 -22
  134. package/src/{operations/definitions.ts → types/ChessOperation.ts} +10 -34
  135. package/src/types/index.ts +1 -0
  136. package/dist/lib/browser/blueprints/index.mjs +0 -14
  137. package/dist/lib/browser/chunk-2TJN26DN.mjs +0 -67
  138. package/dist/lib/browser/chunk-2TJN26DN.mjs.map +0 -7
  139. package/dist/lib/browser/chunk-MC7L6JNC.mjs.map +0 -7
  140. package/dist/lib/browser/chunk-SBRUTOHG.mjs +0 -28
  141. package/dist/lib/browser/chunk-SBRUTOHG.mjs.map +0 -7
  142. package/dist/lib/browser/chunk-XAJZK6Z2.mjs +0 -110
  143. package/dist/lib/browser/chunk-XAJZK6Z2.mjs.map +0 -7
  144. package/dist/lib/browser/cli/index.mjs +0 -34
  145. package/dist/lib/browser/cli/index.mjs.map +0 -7
  146. package/dist/lib/browser/create-AJHN4QT4.mjs +0 -24
  147. package/dist/lib/browser/create-AJHN4QT4.mjs.map +0 -7
  148. package/dist/lib/browser/index.mjs.map +0 -7
  149. package/dist/lib/browser/meta.json +0 -1
  150. package/dist/lib/browser/move-CN7BGBOR.mjs +0 -36
  151. package/dist/lib/browser/move-CN7BGBOR.mjs.map +0 -7
  152. package/dist/lib/browser/operations/index.mjs +0 -19
  153. package/dist/lib/browser/play-YRKSZF5U.mjs +0 -45
  154. package/dist/lib/browser/play-YRKSZF5U.mjs.map +0 -7
  155. package/dist/lib/browser/print-EW7LPW4D.mjs.map +0 -7
  156. package/dist/lib/node-esm/blueprints/index.mjs +0 -15
  157. package/dist/lib/node-esm/chunk-4HZWCKMR.mjs +0 -38
  158. package/dist/lib/node-esm/chunk-4HZWCKMR.mjs.map +0 -7
  159. package/dist/lib/node-esm/chunk-7W2LXAM5.mjs +0 -29
  160. package/dist/lib/node-esm/chunk-7W2LXAM5.mjs.map +0 -7
  161. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  162. package/dist/lib/node-esm/chunk-NYU5JVXP.mjs +0 -111
  163. package/dist/lib/node-esm/chunk-NYU5JVXP.mjs.map +0 -7
  164. package/dist/lib/node-esm/chunk-OIRJVY2R.mjs +0 -68
  165. package/dist/lib/node-esm/chunk-OIRJVY2R.mjs.map +0 -7
  166. package/dist/lib/node-esm/cli/index.mjs +0 -35
  167. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  168. package/dist/lib/node-esm/create-QSETDT4N.mjs +0 -25
  169. package/dist/lib/node-esm/create-QSETDT4N.mjs.map +0 -7
  170. package/dist/lib/node-esm/index.mjs +0 -390
  171. package/dist/lib/node-esm/index.mjs.map +0 -7
  172. package/dist/lib/node-esm/meta.json +0 -1
  173. package/dist/lib/node-esm/move-OTEYBHVI.mjs +0 -37
  174. package/dist/lib/node-esm/move-OTEYBHVI.mjs.map +0 -7
  175. package/dist/lib/node-esm/operations/index.mjs +0 -20
  176. package/dist/lib/node-esm/play-ZLDAXADK.mjs +0 -46
  177. package/dist/lib/node-esm/play-ZLDAXADK.mjs.map +0 -7
  178. package/dist/lib/node-esm/print-UJHXAXMS.mjs +0 -31
  179. package/dist/lib/node-esm/print-UJHXAXMS.mjs.map +0 -7
  180. package/dist/lib/node-esm/types/index.mjs +0 -9
  181. package/dist/types/src/capabilities/artifact-definition.d.ts +0 -12
  182. package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
  183. package/dist/types/src/capabilities/react-surface.d.ts +0 -5
  184. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  185. package/dist/types/src/cli/index.d.ts +0 -2
  186. package/dist/types/src/cli/index.d.ts.map +0 -1
  187. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  188. package/dist/types/src/operations/create.d.ts +0 -5
  189. package/dist/types/src/operations/create.d.ts.map +0 -1
  190. package/dist/types/src/operations/definitions.d.ts +0 -51
  191. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  192. package/src/capabilities/artifact-definition.ts +0 -135
  193. package/src/capabilities/react-surface.tsx +0 -35
  194. package/src/cli/index.ts +0 -5
  195. package/src/cli/plugin.ts +0 -37
  196. package/src/operations/create.ts +0 -21
  197. /package/dist/lib/{browser/blueprints/index.mjs.map → neutral/ChessPlugin.mjs.map} +0 -0
  198. /package/dist/lib/{browser/operations → neutral/blueprints}/index.mjs.map +0 -0
  199. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  200. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  201. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  202. /package/dist/lib/{node-esm/blueprints/index.mjs.map → neutral/meta.mjs.map} +0 -0
  203. /package/dist/lib/{node-esm → neutral}/operations/index.mjs.map +0 -0
  204. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/testing.mjs.map} +0 -0
  205. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-chess",
3
- "version": "0.8.4-main.74a063c4e0",
3
+ "version": "0.8.4-main.765dc60934",
4
4
  "description": "Chess for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -8,113 +8,135 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/dxos/dxos"
10
10
  },
11
- "license": "MIT",
11
+ "license": "FSL-1.1-Apache-2.0",
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
15
  "imports": {
16
- "#blueprints": "./src/blueprints/index.ts",
17
- "#capabilities": "./src/capabilities/index.ts",
18
- "#components": "./src/components/index.ts",
19
- "#containers": "./src/containers/index.ts",
20
- "#meta": "./src/meta.ts",
21
- "#operations": "./src/operations/index.ts",
22
- "#types": "./src/types/index.ts"
23
- },
24
- "exports": {
25
- ".": {
26
- "source": "./src/index.ts",
27
- "types": "./dist/types/src/index.d.ts",
28
- "browser": "./dist/lib/browser/index.mjs",
29
- "node": "./dist/lib/node-esm/index.mjs"
30
- },
31
- "./blueprints": {
16
+ "#blueprints": {
32
17
  "source": "./src/blueprints/index.ts",
33
18
  "types": "./dist/types/src/blueprints/index.d.ts",
34
- "browser": "./dist/lib/browser/blueprints/index.mjs",
35
- "node": "./dist/lib/node-esm/blueprints/index.mjs"
19
+ "default": "./dist/lib/neutral/blueprints/index.mjs"
36
20
  },
37
- "./cli": {
38
- "source": "./src/cli/index.ts",
39
- "types": "./dist/types/src/cli/index.d.ts",
40
- "browser": "./dist/lib/browser/cli/index.mjs",
41
- "node": "./dist/lib/node-esm/cli/index.mjs"
21
+ "#capabilities": {
22
+ "source": "./src/capabilities/index.ts",
23
+ "types": "./dist/types/src/capabilities/index.d.ts",
24
+ "default": "./dist/lib/neutral/capabilities/index.mjs"
42
25
  },
43
- "./operations": {
26
+ "#components": {
27
+ "source": "./src/components/index.ts",
28
+ "types": "./dist/types/src/components/index.d.ts",
29
+ "default": "./dist/lib/neutral/components/index.mjs"
30
+ },
31
+ "#containers": {
32
+ "source": "./src/containers/index.ts",
33
+ "types": "./dist/types/src/containers/index.d.ts",
34
+ "default": "./dist/lib/neutral/containers/index.mjs"
35
+ },
36
+ "#meta": {
37
+ "source": "./src/meta.ts",
38
+ "types": "./dist/types/src/meta.d.ts",
39
+ "default": "./dist/lib/neutral/meta.mjs"
40
+ },
41
+ "#operations": {
44
42
  "source": "./src/operations/index.ts",
45
43
  "types": "./dist/types/src/operations/index.d.ts",
46
- "browser": "./dist/lib/browser/operations/index.mjs",
47
- "node": "./dist/lib/node-esm/operations/index.mjs"
44
+ "default": "./dist/lib/neutral/operations/index.mjs"
45
+ },
46
+ "#plugin": {
47
+ "source": {
48
+ "node": "./src/ChessPlugin.node.ts",
49
+ "default": "./src/ChessPlugin.tsx"
50
+ },
51
+ "types": "./dist/types/src/ChessPlugin.d.ts",
52
+ "node": "./dist/lib/neutral/ChessPlugin.node.mjs",
53
+ "default": "./dist/lib/neutral/ChessPlugin.mjs"
54
+ },
55
+ "#translations": {
56
+ "source": "./src/translations.ts",
57
+ "types": "./dist/types/src/translations.d.ts",
58
+ "default": "./dist/lib/neutral/translations.mjs"
48
59
  },
49
- "./types": {
60
+ "#types": {
50
61
  "source": "./src/types/index.ts",
51
62
  "types": "./dist/types/src/types/index.d.ts",
52
- "browser": "./dist/lib/browser/types/index.mjs",
53
- "node": "./dist/lib/node-esm/types/index.mjs"
63
+ "default": "./dist/lib/neutral/types/index.mjs"
54
64
  }
55
65
  },
56
- "types": "dist/types/src/index.d.ts",
57
- "typesVersions": {
58
- "*": {
59
- "types": [
60
- "dist/types/src/types/index.d.ts"
61
- ]
66
+ "exports": {
67
+ ".": {
68
+ "source": "./src/index.ts",
69
+ "types": "./dist/types/src/index.d.ts",
70
+ "default": "./dist/lib/neutral/index.mjs"
71
+ },
72
+ "./plugin": {
73
+ "source": "./src/plugin.ts",
74
+ "types": "./dist/types/src/plugin.d.ts",
75
+ "default": "./dist/lib/neutral/plugin.mjs"
76
+ },
77
+ "./testing": {
78
+ "source": "./src/testing.ts",
79
+ "types": "./dist/types/src/testing.d.ts",
80
+ "default": "./dist/lib/neutral/testing.mjs"
81
+ },
82
+ "./translations": {
83
+ "source": "./src/translations.ts",
84
+ "types": "./dist/types/src/translations.d.ts",
85
+ "default": "./dist/lib/neutral/translations.mjs"
62
86
  }
63
87
  },
88
+ "types": "dist/types/src/index.d.ts",
64
89
  "files": [
65
90
  "dist",
66
91
  "src"
67
92
  ],
68
93
  "dependencies": {
69
- "@automerge/automerge": "3.2.3",
94
+ "@automerge/automerge": "3.2.6",
70
95
  "@effect-atom/atom-react": "^0.5.0",
71
96
  "chess.js": "^1.0.0",
72
97
  "effect": "3.20.0",
73
- "@dxos/ai": "0.8.4-main.74a063c4e0",
74
- "@dxos/assistant": "0.8.4-main.74a063c4e0",
75
- "@dxos/app-toolkit": "0.8.4-main.74a063c4e0",
76
- "@dxos/async": "0.8.4-main.74a063c4e0",
77
- "@dxos/blueprints": "0.8.4-main.74a063c4e0",
78
- "@dxos/display-name": "0.8.4-main.74a063c4e0",
79
- "@dxos/echo": "0.8.4-main.74a063c4e0",
80
- "@dxos/echo-db": "0.8.4-main.74a063c4e0",
81
- "@dxos/functions": "0.8.4-main.74a063c4e0",
82
- "@dxos/echo-react": "0.8.4-main.74a063c4e0",
83
- "@dxos/invariant": "0.8.4-main.74a063c4e0",
84
- "@dxos/log": "0.8.4-main.74a063c4e0",
85
- "@dxos/plugin-client": "0.8.4-main.74a063c4e0",
86
- "@dxos/plugin-graph": "0.8.4-main.74a063c4e0",
87
- "@dxos/plugin-markdown": "0.8.4-main.74a063c4e0",
88
- "@dxos/plugin-space": "0.8.4-main.74a063c4e0",
89
- "@dxos/react-ui-gameboard": "0.8.4-main.74a063c4e0",
90
- "@dxos/operation": "0.8.4-main.74a063c4e0",
91
- "@dxos/app-framework": "0.8.4-main.74a063c4e0",
92
- "@dxos/react-client": "0.8.4-main.74a063c4e0",
93
- "@dxos/react-ui-sfx": "0.8.4-main.74a063c4e0",
94
- "@dxos/react-ui-mosaic": "0.8.4-main.74a063c4e0",
95
- "@dxos/react-ui-stack": "0.8.4-main.74a063c4e0",
96
- "@dxos/schema": "0.8.4-main.74a063c4e0",
97
- "@dxos/types": "0.8.4-main.74a063c4e0",
98
- "@dxos/util": "0.8.4-main.74a063c4e0"
98
+ "@dxos/ai": "0.8.4-main.765dc60934",
99
+ "@dxos/app-framework": "0.8.4-main.765dc60934",
100
+ "@dxos/assistant": "0.8.4-main.765dc60934",
101
+ "@dxos/compute": "0.8.4-main.765dc60934",
102
+ "@dxos/display-name": "0.8.4-main.765dc60934",
103
+ "@dxos/echo": "0.8.4-main.765dc60934",
104
+ "@dxos/async": "0.8.4-main.765dc60934",
105
+ "@dxos/echo-db": "0.8.4-main.765dc60934",
106
+ "@dxos/echo-react": "0.8.4-main.765dc60934",
107
+ "@dxos/invariant": "0.8.4-main.765dc60934",
108
+ "@dxos/log": "0.8.4-main.765dc60934",
109
+ "@dxos/plugin-game": "0.8.4-main.765dc60934",
110
+ "@dxos/app-toolkit": "0.8.4-main.765dc60934",
111
+ "@dxos/plugin-graph": "0.8.4-main.765dc60934",
112
+ "@dxos/plugin-markdown": "0.8.4-main.765dc60934",
113
+ "@dxos/plugin-client": "0.8.4-main.765dc60934",
114
+ "@dxos/plugin-space": "0.8.4-main.765dc60934",
115
+ "@dxos/react-client": "0.8.4-main.765dc60934",
116
+ "@dxos/react-ui-gameboard": "0.8.4-main.765dc60934",
117
+ "@dxos/react-ui-mosaic": "0.8.4-main.765dc60934",
118
+ "@dxos/react-ui-sfx": "0.8.4-main.765dc60934",
119
+ "@dxos/types": "0.8.4-main.765dc60934",
120
+ "@dxos/react-ui-stack": "0.8.4-main.765dc60934",
121
+ "@dxos/schema": "0.8.4-main.765dc60934",
122
+ "@dxos/util": "0.8.4-main.765dc60934"
99
123
  },
100
124
  "devDependencies": {
101
125
  "@types/react": "~19.2.7",
102
126
  "@types/react-dom": "~19.2.3",
103
127
  "react": "~19.2.3",
104
128
  "react-dom": "~19.2.3",
105
- "vite": "^7.1.11",
106
- "@dxos/storybook-utils": "0.8.4-main.74a063c4e0",
107
- "@dxos/plugin-theme": "0.8.4-main.74a063c4e0",
108
- "@dxos/react-ui": "0.8.4-main.74a063c4e0",
109
- "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
129
+ "vite": "^8.0.13",
130
+ "@dxos/plugin-testing": "0.8.4-main.765dc60934",
131
+ "@dxos/plugin-theme": "0.8.4-main.765dc60934",
132
+ "@dxos/react-ui": "0.8.4-main.765dc60934",
133
+ "@dxos/storybook-utils": "0.8.4-main.765dc60934",
134
+ "@dxos/ui-theme": "0.8.4-main.765dc60934"
110
135
  },
111
136
  "peerDependencies": {
112
137
  "react": "~19.2.3",
113
138
  "react-dom": "~19.2.3",
114
- "@dxos/react-ui": "0.8.4-main.74a063c4e0",
115
- "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
116
- },
117
- "publishConfig": {
118
- "access": "public"
139
+ "@dxos/ui-theme": "0.8.4-main.765dc60934",
140
+ "@dxos/react-ui": "0.8.4-main.765dc60934"
119
141
  }
120
142
  }
@@ -0,0 +1,23 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
7
+
8
+ import { BlueprintDefinition, OperationHandler } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { Chess } from '#types';
11
+
12
+ /**
13
+ * Headless variant of ChessPlugin (no React surfaces / GameVariant).
14
+ * Used in node contexts (CLI, agents) where rendering is unavailable.
15
+ */
16
+ export const ChessPlugin = Plugin.define(meta).pipe(
17
+ AppPlugin.addSchemaModule({ schema: [Chess.State] }),
18
+ AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
19
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
20
+ Plugin.make,
21
+ );
22
+
23
+ export default ChessPlugin;
@@ -0,0 +1,50 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { ActivationEvents } from '@dxos/app-framework';
8
+ import { AppActivationEvents } from '@dxos/app-toolkit';
9
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
10
+ import { GamePlugin } from '@dxos/plugin-game/plugin';
11
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
12
+
13
+ import { ChessPlugin } from '#plugin';
14
+
15
+ import { meta } from './meta';
16
+ import { ChessOperation } from './types';
17
+
18
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
19
+
20
+ describe('ChessPlugin', () => {
21
+ test('modules activate on the expected events', async ({ expect }) => {
22
+ await using harness = await createComposerTestApp({
23
+ plugins: [ClientPlugin({}), GamePlugin(), ChessPlugin()],
24
+ });
25
+
26
+ // Modules expected to be active after a normal startup (headless/node variant).
27
+ expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('schema')]));
28
+
29
+ // SetupArtifactDefinition is fired by AssistantPlugin, which can't be included here due to a workspace cycle.
30
+ await harness.fire(AppActivationEvents.SetupArtifactDefinition);
31
+ expect(harness.manager.getActive()).toContain(moduleId('BlueprintDefinition'));
32
+
33
+ // Operation handlers are not loaded on startup — SetupOperationHandler fires lazily when an operation is invoked.
34
+ await harness.fire(ActivationEvents.SetupOperationHandler);
35
+ expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
36
+ });
37
+
38
+ test('invokes the Print operation via the invoker capability', async ({ expect }) => {
39
+ await using harness = await createComposerTestApp({ plugins: [GamePlugin(), ChessPlugin()] });
40
+ const result = await harness.invoke(ChessOperation.Print, {});
41
+ // Empty input returns empty ASCII (handler swallows errors for malformed FEN).
42
+ expect(typeof result.ascii).toBe('string');
43
+ });
44
+
45
+ test('Print renders a PGN to ASCII board', async ({ expect }) => {
46
+ await using harness = await createComposerTestApp({ plugins: [GamePlugin(), ChessPlugin()] });
47
+ const { ascii } = await harness.invoke(ChessOperation.Print, { pgn: '1. e4 e5' });
48
+ expect(ascii).toContain('a b c d e f g h');
49
+ });
50
+ });
@@ -2,48 +2,25 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import * as Effect from 'effect/Effect';
6
- import * as Option from 'effect/Option';
7
-
8
5
  import { Plugin } from '@dxos/app-framework';
9
- import { AppPlugin } from '@dxos/app-toolkit';
10
- import { Annotation } from '@dxos/echo';
11
- import { Operation } from '@dxos/operation';
12
- import { SpaceOperation } from '@dxos/plugin-space/operations';
13
- import { type CreateObject } from '@dxos/plugin-space/types';
6
+ import { AppPlugin, AppActivationEvents } from '@dxos/app-toolkit';
14
7
 
15
- import { ChessBlueprint } from '#blueprints';
16
- import { BlueprintDefinition, OperationHandler, ReactSurface } from '#capabilities';
8
+ import { BlueprintDefinition, GameVariant, OperationHandler } from '#capabilities';
17
9
  import { meta } from '#meta';
10
+ import { translations } from '#translations';
18
11
  import { Chess } from '#types';
19
12
 
20
- import { translations } from './translations';
21
-
22
13
  export const ChessPlugin = Plugin.define(meta).pipe(
14
+ Plugin.addModule({
15
+ id: 'game-variant',
16
+ activatesOn: AppActivationEvents.SetupSchema,
17
+ activate: GameVariant,
18
+ }),
23
19
  AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
24
20
  AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
25
- AppPlugin.addMetadataModule({
26
- metadata: {
27
- id: Chess.Game.typename,
28
- metadata: {
29
- icon: Annotation.IconAnnotation.get(Chess.Game).pipe(Option.getOrThrow).icon,
30
- iconHue: Annotation.IconAnnotation.get(Chess.Game).pipe(Option.getOrThrow).hue ?? 'white',
31
- blueprints: [ChessBlueprint.key],
32
- createObject: ((props, options) =>
33
- Effect.gen(function* () {
34
- const object = Chess.make(props);
35
- return yield* Operation.invoke(SpaceOperation.AddObject, {
36
- object,
37
- target: options.target,
38
- hidden: true,
39
- targetNodeId: options.targetNodeId,
40
- });
41
- })) satisfies CreateObject,
42
- },
43
- },
44
- }),
45
- AppPlugin.addSchemaModule({ schema: [Chess.Game] }),
46
- AppPlugin.addSurfaceModule({ activate: ReactSurface }),
21
+ AppPlugin.addSchemaModule({ schema: [Chess.State] }),
47
22
  AppPlugin.addTranslationsModule({ translations }),
48
23
  Plugin.make,
49
24
  );
25
+
26
+ export default ChessPlugin;
@@ -2,19 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type AppCapabilities } from '@dxos/app-toolkit';
6
- import { Blueprint, Template } from '@dxos/blueprints';
5
+ import { Blueprint, Template } from '@dxos/compute';
7
6
  import { trim } from '@dxos/util';
8
7
 
9
- import { Create, Move, Play, Print } from '#operations';
8
+ import { Chess, ChessOperation } from '#types';
10
9
 
11
- const BLUEPRINT_KEY = 'org.dxos.blueprint.chess';
12
-
13
- const operations = [Create, Move, Play, Print];
10
+ const operations = [ChessOperation.Move, ChessOperation.Play, ChessOperation.Print];
14
11
 
15
12
  const make = () =>
16
13
  Blueprint.make({
17
- key: BLUEPRINT_KEY,
14
+ key: Chess.BLUEPRINT_KEY,
18
15
  name: 'Chess',
19
16
  tools: Blueprint.toolDefinitions({ operations }),
20
17
  instructions: Template.make({
@@ -27,8 +24,8 @@ const make = () =>
27
24
  }),
28
25
  });
29
26
 
30
- const blueprint: AppCapabilities.BlueprintDefinition = {
31
- key: BLUEPRINT_KEY,
27
+ const blueprint: Blueprint.Definition = {
28
+ key: Chess.BLUEPRINT_KEY,
32
29
  make,
33
30
  };
34
31
 
@@ -3,4 +3,3 @@
3
3
  //
4
4
 
5
5
  export { default as ChessBlueprint } from './chess-blueprint';
6
- export * as ChessFunctions from '../operations';
@@ -6,6 +6,8 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capability } from '@dxos/app-framework';
8
8
  import { AppCapabilities } from '@dxos/app-toolkit';
9
+ // eslint-disable-next-line unused-imports/no-unused-imports
10
+ import type { Blueprint } from '@dxos/compute';
9
11
 
10
12
  import { ChessBlueprint } from '#blueprints';
11
13
 
@@ -0,0 +1,42 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Schema from 'effect/Schema';
7
+
8
+ import { Capability } from '@dxos/app-framework';
9
+ import { GameCapabilities, type GameVariant } from '@dxos/plugin-game';
10
+
11
+ import { ChessArticle, ChessCard } from '#containers';
12
+ import { Chess } from '#types';
13
+
14
+ const CreateChessInput = Schema.Struct({
15
+ name: Schema.optional(
16
+ Schema.String.annotations({
17
+ title: 'Name',
18
+ description: 'Optional name for the game.',
19
+ }),
20
+ ),
21
+ pgn: Schema.optional(
22
+ Schema.String.annotations({
23
+ title: 'PGN',
24
+ description: 'Optional Portable Game Notation to start from.',
25
+ }),
26
+ ),
27
+ });
28
+
29
+ const variant: GameVariant = {
30
+ id: Chess.State.typename,
31
+ label: 'Chess',
32
+ icon: 'ph--shield-chevron--regular',
33
+ variantSchema: Chess.State,
34
+ inputSchema: CreateChessInput,
35
+ roles: ['white', 'black'] as const,
36
+ createVariant: (input) =>
37
+ Effect.sync(() => Chess.make({ pgn: typeof input.pgn === 'string' ? input.pgn : undefined })),
38
+ card: ChessCard,
39
+ article: ChessArticle,
40
+ };
41
+
42
+ export default Capability.makeModule(() => Effect.succeed(Capability.contributes(GameCapabilities.Variant, variant)));
@@ -3,11 +3,12 @@
3
3
  //
4
4
 
5
5
  import { Capability } from '@dxos/app-framework';
6
- import { OperationHandlerSet } from '@dxos/operation';
6
+ // eslint-disable-next-line unused-imports/no-unused-imports
7
+ import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
7
8
 
8
9
  export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
10
+ export const GameVariant = Capability.lazy('GameVariant', () => import('./game-variant'));
9
11
  export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
10
12
  'OperationHandler',
11
13
  () => import('./operation-handler'),
12
14
  );
13
- export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -3,12 +3,12 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { Capabilities, Capability } from '@dxos/app-framework';
6
- import type { OperationHandlerSet } from '@dxos/operation';
6
+ import type { OperationHandlerSet } from '@dxos/compute';
7
7
 
8
- import { ChessHandlers } from '#operations';
8
+ import { ChessOperationHandlerSet } from '#operations';
9
9
 
10
10
  export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
11
11
  Effect.fnUntraced(function* () {
12
- return Capability.contributes(Capabilities.OperationHandler, ChessHandlers);
12
+ return Capability.contributes(Capabilities.OperationHandler, ChessOperationHandlerSet);
13
13
  }),
14
14
  );
@@ -9,9 +9,9 @@ import { withClientProvider } from '@dxos/react-client/testing';
9
9
  import { type Player } from '@dxos/react-ui-gameboard';
10
10
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
11
 
12
+ import { translations } from '#translations';
12
13
  import { Chess } from '#types';
13
14
 
14
- import { translations } from '../../translations';
15
15
  import { Chessboard, type ChessboardController, type ChessboardInfoProps } from './Chessboard';
16
16
 
17
17
  const SAMPLE_PGN =
@@ -25,7 +25,7 @@ type DefaultStoryProps = {
25
25
  };
26
26
 
27
27
  const DefaultStory = ({ pgn }: DefaultStoryProps) => {
28
- const game = useMemo(() => Chess.make(pgn ? { pgn } : undefined), [pgn]);
28
+ const state = useMemo(() => Chess.make(pgn ? { pgn } : undefined), [pgn]);
29
29
  const [orientation, setOrientation] = useState<Player>('white');
30
30
  const [showInfo, setShowInfo] = useState(true);
31
31
  const controller = useRef<ChessboardController>(null);
@@ -35,7 +35,7 @@ const DefaultStory = ({ pgn }: DefaultStoryProps) => {
35
35
  }, []);
36
36
 
37
37
  return (
38
- <Chessboard.Root game={game} ref={controller}>
38
+ <Chessboard.Root state={state} ref={controller}>
39
39
  <div className='flex h-full w-full gap-4 p-4 overflow-hidden'>
40
40
  <Chessboard.Content classNames='grow'>
41
41
  <Chessboard.Board classNames='border rounded-xs' orientation={orientation} />
@@ -42,14 +42,14 @@ export interface ChessboardController {
42
42
  //
43
43
 
44
44
  type RootProps = PropsWithChildren<{
45
- game: Chess.Game;
45
+ state: Chess.State;
46
46
  }>;
47
47
 
48
- const Root = forwardRef<ChessboardController, RootProps>(({ game, children }, forwardedRef) => {
48
+ const Root = forwardRef<ChessboardController, RootProps>(({ state, children }, forwardedRef) => {
49
49
  const registry = useContext(RegistryContext);
50
- const model = useMemo(() => new ExtendedChessModel(registry, game), [registry]);
50
+ const model = useMemo(() => new ExtendedChessModel(registry, state), [registry]);
51
51
  const click = useSoundEffect('Click');
52
- const [pgn, updatePgn] = useObject(game, 'pgn');
52
+ const [pgn, updatePgn] = useObject(state, 'pgn');
53
53
 
54
54
  // Controller.
55
55
  useImperativeHandle(forwardedRef, () => {
@@ -5,10 +5,7 @@
5
5
  import { useAtomValue } from '@effect-atom/atom-react';
6
6
  import React, { type JSX, type PropsWithChildren, useEffect, useMemo, useRef } from 'react';
7
7
 
8
- import { generateName } from '@dxos/display-name';
9
- import { Obj } from '@dxos/echo';
10
- import { type SpaceMember, useMembers } from '@dxos/react-client/echo';
11
- import { Icon, IconButton, Select, type ThemedClassName, useTranslation } from '@dxos/react-ui';
8
+ import { Icon, IconButton, type ThemedClassName, useTranslation } from '@dxos/react-ui';
12
9
  import { type Player, useGameboardContext } from '@dxos/react-ui-gameboard';
13
10
  import { mx } from '@dxos/ui-theme';
14
11
 
@@ -29,8 +26,6 @@ export type InfoProps = ThemedClassName<
29
26
  export const Info = ({ classNames, orientation = 'white', onOrientationChange, onClose, ...props }: InfoProps) => {
30
27
  const { t } = useTranslation(meta.id);
31
28
  const { model } = useGameboardContext<ExtendedChessModel>(INFO_NAME);
32
- const db = Obj.getDatabase(model.object);
33
- const members = useMembers(db?.spaceId);
34
29
 
35
30
  return (
36
31
  <div
@@ -54,17 +49,7 @@ export const Info = ({ classNames, orientation = 'white', onOrientationChange, o
54
49
  />
55
50
  )
56
51
  }
57
- >
58
- <PlayerSelector
59
- value={model.object.players?.[orientation === 'white' ? 'black' : 'white']}
60
- onValueChange={(value) => {
61
- Obj.change(model.object, (obj) => {
62
- obj.players![orientation === 'white' ? 'black' : 'white'] = value;
63
- });
64
- }}
65
- members={members}
66
- />
67
- </PlayerIndicator>
52
+ />
68
53
 
69
54
  <History model={model} {...props} />
70
55
 
@@ -83,17 +68,7 @@ export const Info = ({ classNames, orientation = 'white', onOrientationChange, o
83
68
  />
84
69
  )
85
70
  }
86
- >
87
- <PlayerSelector
88
- value={model.object.players?.[orientation]}
89
- onValueChange={(value) => {
90
- Obj.change(model.object, (obj) => {
91
- obj.players![orientation] = value;
92
- });
93
- }}
94
- members={members}
95
- />
96
- </PlayerIndicator>
71
+ />
97
72
  </div>
98
73
  );
99
74
  };
@@ -216,38 +191,3 @@ const PlayerIndicator = ({ children, model, player, icon }: PlayerIndicatorProps
216
191
  </div>
217
192
  );
218
193
  };
219
-
220
- //
221
- // PlayerSelector
222
- //
223
-
224
- type PlayerSelectorProps = {
225
- value?: string;
226
- onValueChange: (player: string) => void;
227
- members: SpaceMember[];
228
- };
229
-
230
- const PlayerSelector = ({ value, onValueChange, members }: PlayerSelectorProps) => {
231
- const { t } = useTranslation(meta.id);
232
- return (
233
- <Select.Root value={value} onValueChange={onValueChange}>
234
- <Select.TriggerButton placeholder={t('select-player.button')} />
235
- <Select.Portal>
236
- <Select.Content>
237
- <Select.Viewport>
238
- {members.map((member) => {
239
- const memberKey = member.identity.identityKey.toHex();
240
- const displayName = member.identity?.profile?.displayName || generateName(memberKey);
241
- return (
242
- <Select.Option key={memberKey} value={memberKey}>
243
- {displayName}
244
- </Select.Option>
245
- );
246
- })}
247
- </Select.Viewport>
248
- <Select.Arrow />
249
- </Select.Content>
250
- </Select.Portal>
251
- </Select.Root>
252
- );
253
- };
@@ -11,7 +11,7 @@ import { type Chess } from '#types';
11
11
  export class ExtendedChessModel extends ChessModel {
12
12
  constructor(
13
13
  registry: Registry.Registry,
14
- readonly object: Chess.Game,
14
+ readonly object: Chess.State,
15
15
  ) {
16
16
  super(registry);
17
17
  }