@dxos/plugin-chess 0.8.4-main.b97322e → 0.8.4-main.bc2380dfbc

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 (235) 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/ChessPlugin.workerd.mjs +21 -0
  11. package/dist/lib/neutral/ChessPlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs +15 -0
  13. package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs.map +7 -0
  14. package/dist/lib/neutral/blueprints/index.mjs +8 -0
  15. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  16. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-5UOTTW6U.mjs +8 -0
  18. package/dist/lib/neutral/chunk-5UOTTW6U.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-E4LZPHAQ.mjs +148 -0
  20. package/dist/lib/neutral/chunk-E4LZPHAQ.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-HVIKFYAW.mjs +29 -0
  22. package/dist/lib/neutral/chunk-HVIKFYAW.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  24. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-NYIJLMS3.mjs +25 -0
  26. package/dist/lib/neutral/chunk-NYIJLMS3.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-XWKNXG62.mjs +34 -0
  28. package/dist/lib/neutral/chunk-XWKNXG62.mjs.map +7 -0
  29. package/dist/lib/neutral/components/index.mjs +239 -0
  30. package/dist/lib/neutral/components/index.mjs.map +7 -0
  31. package/dist/lib/neutral/containers/index.mjs +11 -0
  32. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  33. package/dist/lib/neutral/game-variant-24UKIBRM.mjs +40 -0
  34. package/dist/lib/neutral/game-variant-24UKIBRM.mjs.map +7 -0
  35. package/dist/lib/neutral/index.mjs +18 -0
  36. package/dist/lib/neutral/index.mjs.map +7 -0
  37. package/dist/lib/neutral/meta.json +1 -0
  38. package/dist/lib/neutral/meta.mjs +8 -0
  39. package/dist/lib/neutral/meta.mjs.map +7 -0
  40. package/dist/lib/neutral/move-RQZ7BJY3.mjs +37 -0
  41. package/dist/lib/neutral/move-RQZ7BJY3.mjs.map +7 -0
  42. package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs +13 -0
  43. package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs.map +7 -0
  44. package/dist/lib/neutral/operations/index.mjs +8 -0
  45. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  46. package/dist/lib/neutral/play-GDGCEPQL.mjs +46 -0
  47. package/dist/lib/neutral/play-GDGCEPQL.mjs.map +7 -0
  48. package/dist/lib/neutral/plugin.mjs +16 -0
  49. package/dist/lib/neutral/plugin.mjs.map +7 -0
  50. package/dist/lib/neutral/print-ZQA74KZI.mjs +29 -0
  51. package/dist/lib/neutral/print-ZQA74KZI.mjs.map +7 -0
  52. package/dist/lib/neutral/testing.mjs +8 -0
  53. package/dist/lib/neutral/testing.mjs.map +7 -0
  54. package/dist/lib/neutral/translations.mjs +34 -0
  55. package/dist/lib/neutral/translations.mjs.map +7 -0
  56. package/dist/lib/neutral/types/index.mjs +10 -0
  57. package/dist/lib/neutral/types/index.mjs.map +7 -0
  58. package/dist/types/src/ChessPlugin.d.ts +3 -1
  59. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  60. package/dist/types/src/ChessPlugin.node.d.ts +8 -0
  61. package/dist/types/src/ChessPlugin.node.d.ts.map +1 -0
  62. package/dist/types/src/ChessPlugin.test.d.ts +2 -0
  63. package/dist/types/src/ChessPlugin.test.d.ts.map +1 -0
  64. package/dist/types/src/ChessPlugin.workerd.d.ts +4 -0
  65. package/dist/types/src/ChessPlugin.workerd.d.ts.map +1 -0
  66. package/dist/types/src/blueprints/chess-blueprint.d.ts +4 -0
  67. package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -0
  68. package/dist/types/src/blueprints/index.d.ts +2 -0
  69. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  70. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  71. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  72. package/dist/types/src/capabilities/game-variant.d.ts +6 -0
  73. package/dist/types/src/capabilities/game-variant.d.ts.map +1 -0
  74. package/dist/types/src/capabilities/index.d.ts +5 -3
  75. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  76. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  77. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  78. package/dist/types/src/components/Chessboard/Chessboard.d.ts +38 -0
  79. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
  80. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +57 -0
  81. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
  82. package/dist/types/src/components/Chessboard/Info.d.ts +20 -0
  83. package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -0
  84. package/dist/types/src/components/Chessboard/index.d.ts +2 -0
  85. package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
  86. package/dist/types/src/components/Chessboard/types.d.ts +8 -0
  87. package/dist/types/src/components/Chessboard/types.d.ts.map +1 -0
  88. package/dist/types/src/components/index.d.ts +1 -5
  89. package/dist/types/src/components/index.d.ts.map +1 -1
  90. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +5 -0
  91. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
  92. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +56 -0
  93. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
  94. package/dist/types/src/containers/ChessArticle/index.d.ts +2 -0
  95. package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
  96. package/dist/types/src/containers/ChessCard/ChessCard.d.ts +5 -0
  97. package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
  98. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts +15 -0
  99. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
  100. package/dist/types/src/containers/ChessCard/index.d.ts +2 -0
  101. package/dist/types/src/containers/ChessCard/index.d.ts.map +1 -0
  102. package/dist/types/src/containers/index.d.ts +4 -0
  103. package/dist/types/src/containers/index.d.ts.map +1 -0
  104. package/dist/types/src/index.d.ts +2 -3
  105. package/dist/types/src/index.d.ts.map +1 -1
  106. package/dist/types/src/meta.d.ts +2 -3
  107. package/dist/types/src/meta.d.ts.map +1 -1
  108. package/dist/types/src/operations/index.d.ts +3 -0
  109. package/dist/types/src/operations/index.d.ts.map +1 -0
  110. package/dist/types/src/operations/move.d.ts +5 -0
  111. package/dist/types/src/operations/move.d.ts.map +1 -0
  112. package/dist/types/src/operations/play.d.ts +5 -0
  113. package/dist/types/src/operations/play.d.ts.map +1 -0
  114. package/dist/types/src/operations/print.d.ts +5 -0
  115. package/dist/types/src/operations/print.d.ts.map +1 -0
  116. package/dist/types/src/plugin.d.ts +4 -0
  117. package/dist/types/src/plugin.d.ts.map +1 -0
  118. package/dist/types/src/testing.d.ts +2 -0
  119. package/dist/types/src/testing.d.ts.map +1 -0
  120. package/dist/types/src/translations.d.ts +32 -14
  121. package/dist/types/src/translations.d.ts.map +1 -1
  122. package/dist/types/src/types/Chess.d.ts +18 -0
  123. package/dist/types/src/types/Chess.d.ts.map +1 -0
  124. package/dist/types/src/types/ChessOperation.d.ts +24 -0
  125. package/dist/types/src/types/ChessOperation.d.ts.map +1 -0
  126. package/dist/types/src/types/index.d.ts +2 -2
  127. package/dist/types/src/types/index.d.ts.map +1 -1
  128. package/dist/types/tsconfig.tsbuildinfo +1 -1
  129. package/package.json +117 -51
  130. package/src/ChessPlugin.node.ts +23 -0
  131. package/src/ChessPlugin.test.ts +50 -0
  132. package/src/ChessPlugin.tsx +20 -54
  133. package/src/ChessPlugin.workerd.ts +18 -0
  134. package/src/blueprints/chess-blueprint.ts +32 -0
  135. package/src/blueprints/index.ts +5 -0
  136. package/src/capabilities/blueprint-definition.ts +19 -0
  137. package/src/capabilities/game-variant.ts +42 -0
  138. package/src/capabilities/index.ts +9 -4
  139. package/src/capabilities/operation-handler.ts +14 -0
  140. package/src/components/Chessboard/Chessboard.stories.tsx +94 -0
  141. package/src/components/Chessboard/Chessboard.tsx +180 -0
  142. package/src/components/Chessboard/Info.tsx +193 -0
  143. package/src/components/Chessboard/index.ts +5 -0
  144. package/src/components/Chessboard/types.ts +18 -0
  145. package/src/components/index.ts +2 -6
  146. package/src/containers/ChessArticle/ChessArticle.stories.tsx +59 -0
  147. package/src/containers/ChessArticle/ChessArticle.tsx +108 -0
  148. package/src/containers/ChessArticle/index.ts +5 -0
  149. package/src/containers/ChessCard/ChessCard.stories.tsx +47 -0
  150. package/src/containers/ChessCard/ChessCard.tsx +27 -0
  151. package/src/containers/ChessCard/index.ts +5 -0
  152. package/src/containers/index.ts +8 -0
  153. package/src/index.ts +2 -4
  154. package/src/meta.ts +11 -7
  155. package/src/operations/index.ts +11 -0
  156. package/src/operations/move.ts +36 -0
  157. package/src/operations/play.ts +45 -0
  158. package/src/operations/print.ts +28 -0
  159. package/src/plugin.ts +11 -0
  160. package/src/testing.ts +7 -0
  161. package/src/translations.ts +18 -12
  162. package/src/types/Chess.ts +59 -0
  163. package/src/types/ChessOperation.ts +85 -0
  164. package/src/types/index.ts +2 -2
  165. package/dist/lib/browser/ChessContainer-SC4ZV6XZ.mjs +0 -129
  166. package/dist/lib/browser/ChessContainer-SC4ZV6XZ.mjs.map +0 -7
  167. package/dist/lib/browser/artifact-definition-A2FSM255.mjs +0 -182
  168. package/dist/lib/browser/artifact-definition-A2FSM255.mjs.map +0 -7
  169. package/dist/lib/browser/chunk-A3WEUKPK.mjs +0 -61
  170. package/dist/lib/browser/chunk-A3WEUKPK.mjs.map +0 -7
  171. package/dist/lib/browser/chunk-KDADGLPC.mjs +0 -8
  172. package/dist/lib/browser/chunk-KDADGLPC.mjs.map +0 -7
  173. package/dist/lib/browser/chunk-ZXH3N4NA.mjs +0 -66
  174. package/dist/lib/browser/chunk-ZXH3N4NA.mjs.map +0 -7
  175. package/dist/lib/browser/index.mjs +0 -98
  176. package/dist/lib/browser/index.mjs.map +0 -7
  177. package/dist/lib/browser/intent-resolver-KQYYX44R.mjs +0 -28
  178. package/dist/lib/browser/intent-resolver-KQYYX44R.mjs.map +0 -7
  179. package/dist/lib/browser/meta.json +0 -1
  180. package/dist/lib/browser/react-surface-PLUCWIYP.mjs +0 -36
  181. package/dist/lib/browser/react-surface-PLUCWIYP.mjs.map +0 -7
  182. package/dist/lib/browser/types/index.mjs +0 -11
  183. package/dist/lib/node-esm/ChessContainer-7GLY5KLY.mjs +0 -130
  184. package/dist/lib/node-esm/ChessContainer-7GLY5KLY.mjs.map +0 -7
  185. package/dist/lib/node-esm/artifact-definition-2H7OUBZO.mjs +0 -183
  186. package/dist/lib/node-esm/artifact-definition-2H7OUBZO.mjs.map +0 -7
  187. package/dist/lib/node-esm/chunk-27D3JA3K.mjs +0 -68
  188. package/dist/lib/node-esm/chunk-27D3JA3K.mjs.map +0 -7
  189. package/dist/lib/node-esm/chunk-IS3Y25PL.mjs +0 -63
  190. package/dist/lib/node-esm/chunk-IS3Y25PL.mjs.map +0 -7
  191. package/dist/lib/node-esm/chunk-QFINI7CC.mjs +0 -10
  192. package/dist/lib/node-esm/chunk-QFINI7CC.mjs.map +0 -7
  193. package/dist/lib/node-esm/index.mjs +0 -99
  194. package/dist/lib/node-esm/index.mjs.map +0 -7
  195. package/dist/lib/node-esm/intent-resolver-GXK2JROQ.mjs +0 -29
  196. package/dist/lib/node-esm/intent-resolver-GXK2JROQ.mjs.map +0 -7
  197. package/dist/lib/node-esm/meta.json +0 -1
  198. package/dist/lib/node-esm/react-surface-NGLNIWN3.mjs +0 -37
  199. package/dist/lib/node-esm/react-surface-NGLNIWN3.mjs.map +0 -7
  200. package/dist/lib/node-esm/types/index.mjs +0 -12
  201. package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
  202. package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
  203. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  204. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  205. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  206. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  207. package/dist/types/src/components/Chess.d.ts +0 -14
  208. package/dist/types/src/components/Chess.d.ts.map +0 -1
  209. package/dist/types/src/components/ChessContainer.d.ts +0 -8
  210. package/dist/types/src/components/ChessContainer.d.ts.map +0 -1
  211. package/dist/types/src/components/ChessContainer.stories.d.ts +0 -23
  212. package/dist/types/src/components/ChessContainer.stories.d.ts.map +0 -1
  213. package/dist/types/src/components/ChessPanel.d.ts +0 -11
  214. package/dist/types/src/components/ChessPanel.d.ts.map +0 -1
  215. package/dist/types/src/components/Chessboard.stories.d.ts +0 -8
  216. package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
  217. package/dist/types/src/components/PlayerSelector.d.ts +0 -8
  218. package/dist/types/src/components/PlayerSelector.d.ts.map +0 -1
  219. package/dist/types/src/types/schema.d.ts +0 -29
  220. package/dist/types/src/types/schema.d.ts.map +0 -1
  221. package/dist/types/src/types/types.d.ts +0 -32
  222. package/dist/types/src/types/types.d.ts.map +0 -1
  223. package/src/capabilities/artifact-definition.ts +0 -124
  224. package/src/capabilities/intent-resolver.ts +0 -26
  225. package/src/capabilities/react-surface.tsx +0 -23
  226. package/src/components/Chess.tsx +0 -60
  227. package/src/components/ChessContainer.stories.tsx +0 -110
  228. package/src/components/ChessContainer.tsx +0 -71
  229. package/src/components/ChessPanel.tsx +0 -67
  230. package/src/components/Chessboard.stories.tsx +0 -41
  231. package/src/components/PlayerSelector.tsx +0 -82
  232. package/src/types/schema.ts +0 -34
  233. package/src/types/types.ts +0 -20
  234. /package/dist/lib/{browser/types/index.mjs.map → neutral/ChessPlugin.mjs.map} +0 -0
  235. /package/dist/lib/{node-esm/types → neutral/blueprints}/index.mjs.map +0 -0
package/package.json CHANGED
@@ -1,78 +1,144 @@
1
1
  {
2
2
  "name": "@dxos/plugin-chess",
3
- "version": "0.8.4-main.b97322e",
3
+ "version": "0.8.4-main.bc2380dfbc",
4
4
  "description": "Chess for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
- "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
11
+ "license": "FSL-1.1-Apache-2.0",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#blueprints": {
17
+ "source": "./src/blueprints/index.ts",
18
+ "types": "./dist/types/src/blueprints/index.d.ts",
19
+ "default": "./dist/lib/neutral/blueprints/index.mjs"
20
+ },
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"
25
+ },
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": {
42
+ "source": "./src/operations/index.ts",
43
+ "types": "./dist/types/src/operations/index.d.ts",
44
+ "default": "./dist/lib/neutral/operations/index.mjs"
45
+ },
46
+ "#plugin": {
47
+ "source": {
48
+ "workerd": "./src/ChessPlugin.workerd.ts",
49
+ "node": "./src/ChessPlugin.node.ts",
50
+ "default": "./src/ChessPlugin.tsx"
51
+ },
52
+ "types": "./dist/types/src/ChessPlugin.d.ts",
53
+ "workerd": "./dist/lib/neutral/ChessPlugin.workerd.mjs",
54
+ "node": "./dist/lib/neutral/ChessPlugin.node.mjs",
55
+ "default": "./dist/lib/neutral/ChessPlugin.mjs"
56
+ },
57
+ "#translations": {
58
+ "source": "./src/translations.ts",
59
+ "types": "./dist/types/src/translations.d.ts",
60
+ "default": "./dist/lib/neutral/translations.mjs"
61
+ },
62
+ "#types": {
63
+ "source": "./src/types/index.ts",
64
+ "types": "./dist/types/src/types/index.d.ts",
65
+ "default": "./dist/lib/neutral/types/index.mjs"
66
+ }
67
+ },
11
68
  "exports": {
12
69
  ".": {
70
+ "source": "./src/index.ts",
13
71
  "types": "./dist/types/src/index.d.ts",
14
- "browser": "./dist/lib/browser/index.mjs",
15
- "node": "./dist/lib/node-esm/index.mjs"
72
+ "default": "./dist/lib/neutral/index.mjs"
16
73
  },
17
- "./types": {
18
- "types": "./dist/types/src/types/index.d.ts",
19
- "browser": "./dist/lib/browser/types/index.mjs",
20
- "node": "./dist/lib/node-esm/types/index.mjs"
74
+ "./plugin": {
75
+ "source": "./src/plugin.ts",
76
+ "types": "./dist/types/src/plugin.d.ts",
77
+ "default": "./dist/lib/neutral/plugin.mjs"
78
+ },
79
+ "./testing": {
80
+ "source": "./src/testing.ts",
81
+ "types": "./dist/types/src/testing.d.ts",
82
+ "default": "./dist/lib/neutral/testing.mjs"
83
+ },
84
+ "./translations": {
85
+ "source": "./src/translations.ts",
86
+ "types": "./dist/types/src/translations.d.ts",
87
+ "default": "./dist/lib/neutral/translations.mjs"
21
88
  }
22
89
  },
23
90
  "types": "dist/types/src/index.d.ts",
24
- "typesVersions": {
25
- "*": {
26
- "types": [
27
- "dist/types/src/types/index.d.ts"
28
- ]
29
- }
30
- },
31
91
  "files": [
32
92
  "dist",
33
93
  "src"
34
94
  ],
35
95
  "dependencies": {
36
- "@preact-signals/safe-react": "^0.9.0",
37
- "@preact/signals-core": "^1.9.0",
96
+ "@automerge/automerge": "3.2.6",
97
+ "@effect-atom/atom-react": "^0.5.0",
38
98
  "chess.js": "^1.0.0",
39
- "effect": "3.17.0",
40
- "@dxos/ai": "0.8.4-main.b97322e",
41
- "@dxos/assistant": "0.8.4-main.b97322e",
42
- "@dxos/app-framework": "0.8.4-main.b97322e",
43
- "@dxos/blueprints": "0.8.4-main.b97322e",
44
- "@dxos/async": "0.8.4-main.b97322e",
45
- "@dxos/echo": "0.8.4-main.b97322e",
46
- "@dxos/display-name": "0.8.4-main.b97322e",
47
- "@dxos/echo-schema": "0.8.4-main.b97322e",
48
- "@dxos/invariant": "0.8.4-main.b97322e",
49
- "@dxos/live-object": "0.8.4-main.b97322e",
50
- "@dxos/log": "0.8.4-main.b97322e",
51
- "@dxos/plugin-client": "0.8.4-main.b97322e",
52
- "@dxos/plugin-graph": "0.8.4-main.b97322e",
53
- "@dxos/plugin-space": "0.8.4-main.b97322e",
54
- "@dxos/react-client": "0.8.4-main.b97322e",
55
- "@dxos/react-ui-gameboard": "0.8.4-main.b97322e",
56
- "@dxos/react-ui-stack": "0.8.4-main.b97322e"
99
+ "effect": "3.20.0",
100
+ "@dxos/ai": "0.8.4-main.bc2380dfbc",
101
+ "@dxos/app-framework": "0.8.4-main.bc2380dfbc",
102
+ "@dxos/assistant": "0.8.4-main.bc2380dfbc",
103
+ "@dxos/app-toolkit": "0.8.4-main.bc2380dfbc",
104
+ "@dxos/async": "0.8.4-main.bc2380dfbc",
105
+ "@dxos/compute": "0.8.4-main.bc2380dfbc",
106
+ "@dxos/display-name": "0.8.4-main.bc2380dfbc",
107
+ "@dxos/echo": "0.8.4-main.bc2380dfbc",
108
+ "@dxos/echo-react": "0.8.4-main.bc2380dfbc",
109
+ "@dxos/invariant": "0.8.4-main.bc2380dfbc",
110
+ "@dxos/plugin-client": "0.8.4-main.bc2380dfbc",
111
+ "@dxos/echo-db": "0.8.4-main.bc2380dfbc",
112
+ "@dxos/log": "0.8.4-main.bc2380dfbc",
113
+ "@dxos/plugin-graph": "0.8.4-main.bc2380dfbc",
114
+ "@dxos/plugin-markdown": "0.8.4-main.bc2380dfbc",
115
+ "@dxos/plugin-game": "0.8.4-main.bc2380dfbc",
116
+ "@dxos/plugin-space": "0.8.4-main.bc2380dfbc",
117
+ "@dxos/react-ui-gameboard": "0.8.4-main.bc2380dfbc",
118
+ "@dxos/react-client": "0.8.4-main.bc2380dfbc",
119
+ "@dxos/react-ui-mosaic": "0.8.4-main.bc2380dfbc",
120
+ "@dxos/react-ui-sfx": "0.8.4-main.bc2380dfbc",
121
+ "@dxos/schema": "0.8.4-main.bc2380dfbc",
122
+ "@dxos/util": "0.8.4-main.bc2380dfbc",
123
+ "@dxos/react-ui-stack": "0.8.4-main.bc2380dfbc",
124
+ "@dxos/types": "0.8.4-main.bc2380dfbc"
57
125
  },
58
126
  "devDependencies": {
59
- "@types/react": "~18.2.0",
60
- "@types/react-dom": "~18.2.0",
61
- "react": "~18.2.0",
62
- "react-dom": "~18.2.0",
63
- "vite": "5.4.7",
64
- "@dxos/plugin-theme": "0.8.4-main.b97322e",
65
- "@dxos/react-ui": "0.8.4-main.b97322e",
66
- "@dxos/react-ui-theme": "0.8.4-main.b97322e",
67
- "@dxos/storybook-utils": "0.8.4-main.b97322e"
127
+ "@types/react": "~19.2.7",
128
+ "@types/react-dom": "~19.2.3",
129
+ "react": "~19.2.3",
130
+ "react-dom": "~19.2.3",
131
+ "vite": "^8.0.13",
132
+ "@dxos/plugin-testing": "0.8.4-main.bc2380dfbc",
133
+ "@dxos/plugin-theme": "0.8.4-main.bc2380dfbc",
134
+ "@dxos/storybook-utils": "0.8.4-main.bc2380dfbc",
135
+ "@dxos/ui-theme": "0.8.4-main.bc2380dfbc",
136
+ "@dxos/react-ui": "0.8.4-main.bc2380dfbc"
68
137
  },
69
138
  "peerDependencies": {
70
- "react": "~18.2.0",
71
- "react-dom": "~18.2.0",
72
- "@dxos/react-ui": "0.8.4-main.b97322e",
73
- "@dxos/react-ui-theme": "0.8.4-main.b97322e"
74
- },
75
- "publishConfig": {
76
- "access": "public"
139
+ "react": "~19.2.3",
140
+ "react-dom": "~19.2.3",
141
+ "@dxos/ui-theme": "0.8.4-main.bc2380dfbc",
142
+ "@dxos/react-ui": "0.8.4-main.bc2380dfbc"
77
143
  }
78
144
  }
@@ -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,59 +2,25 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
6
- import { ClientEvents } from '@dxos/plugin-client';
7
- import { SpaceCapabilities } from '@dxos/plugin-space';
8
- import { defineObjectForm } from '@dxos/plugin-space/types';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin, AppActivationEvents } from '@dxos/app-toolkit';
9
7
 
10
- import { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';
11
- import { meta } from './meta';
12
- import { translations } from './translations';
13
- import { ChessAction, ChessType } from './types';
8
+ import { BlueprintDefinition, GameVariant, OperationHandler } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
11
+ import { Chess } from '#types';
14
12
 
15
- export const ChessPlugin = () =>
16
- definePlugin(meta, [
17
- defineModule({
18
- id: `${meta.id}/module/translations`,
19
- activatesOn: Events.SetupTranslations,
20
- activate: () => contributes(Capabilities.Translations, translations),
21
- }),
22
- defineModule({
23
- id: `${meta.id}/module/metadata`,
24
- activatesOn: Events.SetupMetadata,
25
- activate: () =>
26
- contributes(Capabilities.Metadata, {
27
- id: ChessType.typename,
28
- metadata: {
29
- icon: 'ph--shield-chevron--regular',
30
- },
31
- }),
32
- }),
33
- defineModule({
34
- id: `${meta.id}/module/object-form`,
35
- activatesOn: ClientEvents.SetupSchema,
36
- activate: () =>
37
- contributes(
38
- SpaceCapabilities.ObjectForm,
39
- defineObjectForm({
40
- objectSchema: ChessType,
41
- getIntent: () => createIntent(ChessAction.Create),
42
- }),
43
- ),
44
- }),
45
- defineModule({
46
- id: `${meta.id}/module/react-surface`,
47
- activatesOn: Events.SetupReactSurface,
48
- activate: ReactSurface,
49
- }),
50
- defineModule({
51
- id: `${meta.id}/module/intent-resolver`,
52
- activatesOn: Events.SetupIntentResolver,
53
- activate: IntentResolver,
54
- }),
55
- defineModule({
56
- id: `${meta.id}/module/artifact-definition`,
57
- activatesOn: Events.SetupArtifactDefinition,
58
- activate: ArtifactDefinition,
59
- }),
60
- ]);
13
+ export const ChessPlugin = Plugin.define(meta).pipe(
14
+ Plugin.addModule({
15
+ id: 'game-variant',
16
+ activatesOn: AppActivationEvents.SetupSchema,
17
+ activate: GameVariant,
18
+ }),
19
+ AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
20
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
21
+ AppPlugin.addSchemaModule({ schema: [Chess.State] }),
22
+ AppPlugin.addTranslationsModule({ translations }),
23
+ Plugin.make,
24
+ );
25
+
26
+ export default ChessPlugin;
@@ -0,0 +1,18 @@
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 { OperationHandler } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { Chess } from '#types';
11
+
12
+ export const ChessPlugin = Plugin.define(meta).pipe(
13
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
14
+ AppPlugin.addSchemaModule({ schema: [Chess.State] }),
15
+ Plugin.make,
16
+ );
17
+
18
+ export default ChessPlugin;
@@ -0,0 +1,32 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Blueprint, Template } from '@dxos/compute';
6
+ import { trim } from '@dxos/util';
7
+
8
+ import { Chess, ChessOperation } from '#types';
9
+
10
+ const operations = [ChessOperation.Move, ChessOperation.Play, ChessOperation.Print];
11
+
12
+ const make = () =>
13
+ Blueprint.make({
14
+ key: Chess.BLUEPRINT_KEY,
15
+ name: 'Chess',
16
+ tools: Blueprint.toolDefinitions({ operations }),
17
+ instructions: Template.make({
18
+ source: trim`
19
+ You are an expert chess player.
20
+ To analyze a game you can access the "pgn" property by loading the context object that represents the current game.
21
+ You could suggest a good next move or offer to play a move.
22
+ Don't actually make a move unless you are asked to.
23
+ `,
24
+ }),
25
+ });
26
+
27
+ const blueprint: Blueprint.Definition = {
28
+ key: Chess.BLUEPRINT_KEY,
29
+ make,
30
+ };
31
+
32
+ export default blueprint;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { default as ChessBlueprint } from './chess-blueprint';
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+ // eslint-disable-next-line unused-imports/no-unused-imports
10
+ import type { Blueprint } from '@dxos/compute';
11
+
12
+ import { ChessBlueprint } from '#blueprints';
13
+
14
+ const blueprintDefinition = Capability.makeModule<
15
+ [],
16
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
17
+ >(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, ChessBlueprint)]));
18
+
19
+ export default blueprintDefinition;
@@ -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)));
@@ -2,8 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
+ // eslint-disable-next-line unused-imports/no-unused-imports
7
+ import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
6
8
 
7
- export const ArtifactDefinition = lazy(() => import('./artifact-definition'));
8
- export const IntentResolver = lazy(() => import('./intent-resolver'));
9
- export const ReactSurface = lazy(() => import('./react-surface'));
9
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
10
+ export const GameVariant = Capability.lazy('GameVariant', () => import('./game-variant'));
11
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
12
+ 'OperationHandler',
13
+ () => import('./operation-handler'),
14
+ );
@@ -0,0 +1,14 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { Capabilities, Capability } from '@dxos/app-framework';
6
+ import type { OperationHandlerSet } from '@dxos/compute';
7
+
8
+ import { ChessOperationHandlerSet } from '#operations';
9
+
10
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
11
+ Effect.fnUntraced(function* () {
12
+ return Capability.contributes(Capabilities.OperationHandler, ChessOperationHandlerSet);
13
+ }),
14
+ );
@@ -0,0 +1,94 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
7
+
8
+ import { withClientProvider } from '@dxos/react-client/testing';
9
+ import { type Player } from '@dxos/react-ui-gameboard';
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
+
12
+ import { translations } from '#translations';
13
+ import { Chess } from '#types';
14
+
15
+ import { Chessboard, type ChessboardController, type ChessboardInfoProps } from './Chessboard';
16
+
17
+ const SAMPLE_PGN =
18
+ '1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d4 exd4 6. cxd4 Bb4+ 7. Nc3 d5 8. exd5 Nxd5 9. O-O Be6 10. Qb3 Na5 11. Qa4+ c6 12. Bxd5 Bxc3 13. Bxe6 fxe6 *';
19
+
20
+ const PROMOTION_PGN =
21
+ '1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d4 exd4 6. cxd4 Bb4+ 7. Nc3 d5 8. exd5 Nxd5 9. O-O Be6 10. Qb3 Na5 11. Qa4+ c6 12. Bxd5 Bxc3 13. Bxe6 fxe6 14. d5 Qg5 15. dxe6 Kf8 16. e7+ Kg8 *';
22
+
23
+ type DefaultStoryProps = {
24
+ pgn?: string;
25
+ };
26
+
27
+ const DefaultStory = ({ pgn }: DefaultStoryProps) => {
28
+ const state = useMemo(() => Chess.make(pgn ? { pgn } : undefined), [pgn]);
29
+ const [orientation, setOrientation] = useState<Player>('white');
30
+ const [showInfo, setShowInfo] = useState(true);
31
+ const controller = useRef<ChessboardController>(null);
32
+
33
+ const handleSelect = useCallback<NonNullable<ChessboardInfoProps['onSelect']>>((index) => {
34
+ controller.current?.setMoveNumber(index);
35
+ }, []);
36
+
37
+ return (
38
+ <Chessboard.Root state={state} ref={controller}>
39
+ <div className='flex h-full w-full gap-4 p-4 overflow-hidden'>
40
+ <Chessboard.Content classNames='grow'>
41
+ <Chessboard.Board classNames='border rounded-xs' orientation={orientation} />
42
+ </Chessboard.Content>
43
+ {showInfo && (
44
+ <div className='flex flex-col justify-center items-center overflow-hidden'>
45
+ <Chessboard.Info
46
+ orientation={orientation}
47
+ min={8}
48
+ max={8}
49
+ onOrientationChange={setOrientation}
50
+ onClose={() => setShowInfo(false)}
51
+ onSelect={handleSelect}
52
+ />
53
+ </div>
54
+ )}
55
+ </div>
56
+ </Chessboard.Root>
57
+ );
58
+ };
59
+
60
+ const meta = {
61
+ title: 'plugins/plugin-chess/components/Chessboard',
62
+ component: DefaultStory,
63
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
64
+ parameters: {
65
+ layout: 'fullscreen',
66
+ translations,
67
+ },
68
+ } satisfies Meta<typeof DefaultStory>;
69
+
70
+ export default meta;
71
+
72
+ type Story = StoryObj<typeof meta>;
73
+
74
+ export const Default: Story = {
75
+ args: {},
76
+ };
77
+
78
+ export const WithPgn: Story = {
79
+ args: {
80
+ pgn: SAMPLE_PGN,
81
+ },
82
+ };
83
+
84
+ export const Promotion: Story = {
85
+ args: {
86
+ pgn: PROMOTION_PGN,
87
+ },
88
+ };
89
+
90
+ export const NewGame: Story = {
91
+ args: {
92
+ pgn: undefined,
93
+ },
94
+ };