@dxos/plugin-chess 0.8.4-main.1068cf700f → 0.8.4-main.1c7ec43d41

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 (229) hide show
  1. package/dist/lib/browser/blueprints/index.mjs +9 -6
  2. package/dist/lib/browser/chunk-5FHUZILG.mjs +63 -0
  3. package/dist/lib/browser/chunk-5FHUZILG.mjs.map +7 -0
  4. package/dist/lib/browser/chunk-BCTL5GYK.mjs +88 -0
  5. package/dist/lib/browser/chunk-BCTL5GYK.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-ORLWKOYE.mjs +26 -0
  7. package/dist/lib/browser/chunk-ORLWKOYE.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-YER5TC5N.mjs +35 -0
  9. package/dist/lib/browser/chunk-YER5TC5N.mjs.map +7 -0
  10. package/dist/lib/browser/index.mjs +27 -85
  11. package/dist/lib/browser/index.mjs.map +4 -4
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/move-BH3WZUJH.mjs +39 -0
  14. package/dist/lib/browser/move-BH3WZUJH.mjs.map +7 -0
  15. package/dist/lib/browser/operations/index.mjs +17 -0
  16. package/dist/lib/browser/operations/index.mjs.map +7 -0
  17. package/dist/lib/browser/play-IM4BDFSY.mjs +48 -0
  18. package/dist/lib/browser/play-IM4BDFSY.mjs.map +7 -0
  19. package/dist/lib/browser/print-M3ZO2XZT.mjs +30 -0
  20. package/dist/lib/browser/print-M3ZO2XZT.mjs.map +7 -0
  21. package/dist/lib/browser/translations.mjs +34 -0
  22. package/dist/lib/browser/translations.mjs.map +7 -0
  23. package/dist/lib/browser/types/index.mjs +1 -1
  24. package/dist/lib/node-esm/blueprints/index.mjs +9 -6
  25. package/dist/lib/node-esm/chunk-A3P4HC7O.mjs +89 -0
  26. package/dist/lib/node-esm/chunk-A3P4HC7O.mjs.map +7 -0
  27. package/dist/lib/node-esm/chunk-B42KRPBJ.mjs +37 -0
  28. package/dist/lib/node-esm/chunk-B42KRPBJ.mjs.map +7 -0
  29. package/dist/lib/node-esm/chunk-WSHXDK3W.mjs +27 -0
  30. package/dist/lib/node-esm/chunk-WSHXDK3W.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-YRW4LYGF.mjs +64 -0
  32. package/dist/lib/node-esm/chunk-YRW4LYGF.mjs.map +7 -0
  33. package/dist/lib/node-esm/index.mjs +27 -85
  34. package/dist/lib/node-esm/index.mjs.map +4 -4
  35. package/dist/lib/node-esm/meta.json +1 -1
  36. package/dist/lib/node-esm/move-53HLCSAL.mjs +40 -0
  37. package/dist/lib/node-esm/move-53HLCSAL.mjs.map +7 -0
  38. package/dist/lib/node-esm/operations/index.mjs +18 -0
  39. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  40. package/dist/lib/node-esm/play-YXXPG5SO.mjs +49 -0
  41. package/dist/lib/node-esm/play-YXXPG5SO.mjs.map +7 -0
  42. package/dist/lib/node-esm/print-L2LUM3IW.mjs +31 -0
  43. package/dist/lib/node-esm/print-L2LUM3IW.mjs.map +7 -0
  44. package/dist/lib/node-esm/translations.mjs +35 -0
  45. package/dist/lib/node-esm/translations.mjs.map +7 -0
  46. package/dist/lib/node-esm/types/index.mjs +1 -1
  47. package/dist/types/src/ChessPlugin.d.ts +1 -0
  48. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  49. package/dist/types/src/ChessPlugin.node.d.ts +8 -0
  50. package/dist/types/src/ChessPlugin.node.d.ts.map +1 -0
  51. package/dist/types/src/ChessPlugin.test.d.ts +2 -0
  52. package/dist/types/src/ChessPlugin.test.d.ts.map +1 -0
  53. package/dist/types/src/blueprints/chess-blueprint.d.ts +3 -20
  54. package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -1
  55. package/dist/types/src/blueprints/index.d.ts +2 -2
  56. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  58. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  59. package/dist/types/src/capabilities/game-variant.d.ts +6 -0
  60. package/dist/types/src/capabilities/game-variant.d.ts.map +1 -0
  61. package/dist/types/src/capabilities/index.d.ts +5 -2
  62. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/node.d.ts +10 -0
  64. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  65. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  66. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  67. package/dist/types/src/components/{Chessboard.d.ts → Chessboard/Chessboard.d.ts} +10 -11
  68. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
  69. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +57 -0
  70. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
  71. package/dist/types/src/components/{Info.d.ts → Chessboard/Info.d.ts} +5 -6
  72. package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -0
  73. package/dist/types/src/components/Chessboard/index.d.ts +2 -0
  74. package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
  75. package/dist/types/src/components/Chessboard/types.d.ts +8 -0
  76. package/dist/types/src/components/Chessboard/types.d.ts.map +1 -0
  77. package/dist/types/src/components/index.d.ts +0 -1
  78. package/dist/types/src/components/index.d.ts.map +1 -1
  79. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +5 -0
  80. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
  81. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +56 -0
  82. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
  83. package/dist/types/src/containers/ChessArticle/index.d.ts +2 -0
  84. package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
  85. package/dist/types/src/containers/ChessCard/ChessCard.d.ts +5 -0
  86. package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
  87. package/dist/types/src/{components/Card.stories.d.ts → containers/ChessCard/ChessCard.stories.d.ts} +1 -1
  88. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
  89. package/dist/types/src/containers/ChessCard/index.d.ts +2 -0
  90. package/dist/types/src/containers/ChessCard/index.d.ts.map +1 -0
  91. package/dist/types/src/containers/index.d.ts +4 -0
  92. package/dist/types/src/containers/index.d.ts.map +1 -0
  93. package/dist/types/src/index.d.ts +2 -3
  94. package/dist/types/src/index.d.ts.map +1 -1
  95. package/dist/types/src/operations/definitions.d.ts +24 -0
  96. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  97. package/dist/types/src/operations/index.d.ts +4 -0
  98. package/dist/types/src/operations/index.d.ts.map +1 -0
  99. package/dist/types/src/operations/move.d.ts +5 -0
  100. package/dist/types/src/operations/move.d.ts.map +1 -0
  101. package/dist/types/src/operations/play.d.ts +5 -0
  102. package/dist/types/src/operations/play.d.ts.map +1 -0
  103. package/dist/types/src/operations/print.d.ts +5 -0
  104. package/dist/types/src/operations/print.d.ts.map +1 -0
  105. package/dist/types/src/translations.d.ts +32 -23
  106. package/dist/types/src/translations.d.ts.map +1 -1
  107. package/dist/types/src/types/Chess.d.ts +10 -19
  108. package/dist/types/src/types/Chess.d.ts.map +1 -1
  109. package/dist/types/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +66 -48
  111. package/src/ChessPlugin.node.ts +23 -0
  112. package/src/ChessPlugin.test.ts +49 -0
  113. package/src/ChessPlugin.tsx +14 -23
  114. package/src/blueprints/chess-blueprint.ts +14 -9
  115. package/src/blueprints/index.ts +2 -2
  116. package/src/capabilities/blueprint-definition.ts +19 -0
  117. package/src/capabilities/game-variant.ts +42 -0
  118. package/src/capabilities/index.ts +10 -2
  119. package/src/capabilities/node.ts +18 -0
  120. package/src/capabilities/operation-handler.ts +14 -0
  121. package/src/components/Chessboard/Chessboard.stories.tsx +94 -0
  122. package/src/components/{Chessboard.tsx → Chessboard/Chessboard.tsx} +21 -31
  123. package/src/components/{Info.tsx → Chessboard/Info.tsx} +24 -77
  124. package/src/components/Chessboard/index.ts +5 -0
  125. package/src/components/Chessboard/types.ts +18 -0
  126. package/src/components/index.ts +1 -5
  127. package/src/{components/Chessboard.stories.tsx → containers/ChessArticle/ChessArticle.stories.tsx} +16 -10
  128. package/src/containers/ChessArticle/ChessArticle.tsx +108 -0
  129. package/src/containers/ChessArticle/index.ts +5 -0
  130. package/src/containers/ChessCard/ChessCard.stories.tsx +47 -0
  131. package/src/containers/ChessCard/ChessCard.tsx +27 -0
  132. package/src/containers/ChessCard/index.ts +5 -0
  133. package/src/containers/index.ts +8 -0
  134. package/src/index.ts +5 -3
  135. package/src/meta.ts +1 -1
  136. package/src/operations/definitions.ts +83 -0
  137. package/src/operations/index.ts +15 -0
  138. package/src/operations/move.ts +37 -0
  139. package/src/operations/play.ts +46 -0
  140. package/src/operations/print.ts +28 -0
  141. package/src/translations.ts +18 -21
  142. package/src/types/Chess.ts +25 -24
  143. package/dist/lib/browser/ChessboardContainer-GNSIZKY7.mjs +0 -80
  144. package/dist/lib/browser/ChessboardContainer-GNSIZKY7.mjs.map +0 -7
  145. package/dist/lib/browser/blueprint-definition-YUKJZPOL.mjs +0 -19
  146. package/dist/lib/browser/blueprint-definition-YUKJZPOL.mjs.map +0 -7
  147. package/dist/lib/browser/chunk-66H3V2YV.mjs +0 -64
  148. package/dist/lib/browser/chunk-66H3V2YV.mjs.map +0 -7
  149. package/dist/lib/browser/chunk-H3NUMCQ6.mjs +0 -21
  150. package/dist/lib/browser/chunk-H3NUMCQ6.mjs.map +0 -7
  151. package/dist/lib/browser/chunk-MABHE5SS.mjs +0 -277
  152. package/dist/lib/browser/chunk-MABHE5SS.mjs.map +0 -7
  153. package/dist/lib/browser/chunk-PBRN5Q4R.mjs +0 -227
  154. package/dist/lib/browser/chunk-PBRN5Q4R.mjs.map +0 -7
  155. package/dist/lib/browser/chunk-QGVMZ4PK.mjs +0 -8
  156. package/dist/lib/browser/chunk-QGVMZ4PK.mjs.map +0 -7
  157. package/dist/lib/browser/cli/index.mjs +0 -29
  158. package/dist/lib/browser/cli/index.mjs.map +0 -7
  159. package/dist/lib/browser/react-surface-C52R6BRL.mjs +0 -38
  160. package/dist/lib/browser/react-surface-C52R6BRL.mjs.map +0 -7
  161. package/dist/lib/node-esm/ChessboardContainer-5OVYZMIW.mjs +0 -81
  162. package/dist/lib/node-esm/ChessboardContainer-5OVYZMIW.mjs.map +0 -7
  163. package/dist/lib/node-esm/blueprint-definition-4HZ2HWWC.mjs +0 -20
  164. package/dist/lib/node-esm/blueprint-definition-4HZ2HWWC.mjs.map +0 -7
  165. package/dist/lib/node-esm/chunk-3MAU6WHB.mjs +0 -228
  166. package/dist/lib/node-esm/chunk-3MAU6WHB.mjs.map +0 -7
  167. package/dist/lib/node-esm/chunk-F5OMIM4F.mjs +0 -23
  168. package/dist/lib/node-esm/chunk-F5OMIM4F.mjs.map +0 -7
  169. package/dist/lib/node-esm/chunk-IFK6UAKF.mjs +0 -10
  170. package/dist/lib/node-esm/chunk-IFK6UAKF.mjs.map +0 -7
  171. package/dist/lib/node-esm/chunk-OUNGNJFP.mjs +0 -65
  172. package/dist/lib/node-esm/chunk-OUNGNJFP.mjs.map +0 -7
  173. package/dist/lib/node-esm/chunk-V6MKXXPO.mjs +0 -278
  174. package/dist/lib/node-esm/chunk-V6MKXXPO.mjs.map +0 -7
  175. package/dist/lib/node-esm/cli/index.mjs +0 -30
  176. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  177. package/dist/lib/node-esm/react-surface-NW33JZ6J.mjs +0 -39
  178. package/dist/lib/node-esm/react-surface-NW33JZ6J.mjs.map +0 -7
  179. package/dist/types/src/blueprints/functions/create.d.ts +0 -15
  180. package/dist/types/src/blueprints/functions/create.d.ts.map +0 -1
  181. package/dist/types/src/blueprints/functions/index.d.ts +0 -5
  182. package/dist/types/src/blueprints/functions/index.d.ts.map +0 -1
  183. package/dist/types/src/blueprints/functions/move.d.ts +0 -16
  184. package/dist/types/src/blueprints/functions/move.d.ts.map +0 -1
  185. package/dist/types/src/blueprints/functions/play.d.ts +0 -17
  186. package/dist/types/src/blueprints/functions/play.d.ts.map +0 -1
  187. package/dist/types/src/blueprints/functions/print.d.ts +0 -8
  188. package/dist/types/src/blueprints/functions/print.d.ts.map +0 -1
  189. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +0 -12
  190. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
  191. package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
  192. package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
  193. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -10
  194. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  195. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  196. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  197. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  198. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  199. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  200. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  201. package/dist/types/src/cli/index.d.ts +0 -2
  202. package/dist/types/src/cli/index.d.ts.map +0 -1
  203. package/dist/types/src/cli/plugin.d.ts +0 -3
  204. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  205. package/dist/types/src/components/Card.stories.d.ts.map +0 -1
  206. package/dist/types/src/components/Chessboard.d.ts.map +0 -1
  207. package/dist/types/src/components/Chessboard.stories.d.ts +0 -46
  208. package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
  209. package/dist/types/src/components/ChessboardArticle.d.ts +0 -6
  210. package/dist/types/src/components/ChessboardArticle.d.ts.map +0 -1
  211. package/dist/types/src/components/ChessboardContainer.d.ts +0 -7
  212. package/dist/types/src/components/ChessboardContainer.d.ts.map +0 -1
  213. package/dist/types/src/components/Info.d.ts.map +0 -1
  214. package/src/blueprints/functions/create.ts +0 -38
  215. package/src/blueprints/functions/index.ts +0 -8
  216. package/src/blueprints/functions/move.ts +0 -48
  217. package/src/blueprints/functions/play.ts +0 -58
  218. package/src/blueprints/functions/print.ts +0 -42
  219. package/src/capabilities/artifact-definition/artifact-definition.ts +0 -135
  220. package/src/capabilities/artifact-definition/index.ts +0 -7
  221. package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -24
  222. package/src/capabilities/blueprint-definition/index.ts +0 -7
  223. package/src/capabilities/react-surface/index.ts +0 -7
  224. package/src/capabilities/react-surface/react-surface.tsx +0 -28
  225. package/src/cli/index.ts +0 -5
  226. package/src/cli/plugin.ts +0 -27
  227. package/src/components/Card.stories.tsx +0 -47
  228. package/src/components/ChessboardArticle.tsx +0 -70
  229. package/src/components/ChessboardContainer.tsx +0 -40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-chess",
3
- "version": "0.8.4-main.1068cf700f",
3
+ "version": "0.8.4-main.1c7ec43d41",
4
4
  "description": "Chess for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -12,6 +12,25 @@
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
+ "imports": {
16
+ "#blueprints": "./src/blueprints/index.ts",
17
+ "#capabilities": {
18
+ "browser": "./src/capabilities/index.ts",
19
+ "node": "./src/capabilities/node.ts",
20
+ "default": "./src/capabilities/index.ts"
21
+ },
22
+ "#components": "./src/components/index.ts",
23
+ "#containers": "./src/containers/index.ts",
24
+ "#meta": "./src/meta.ts",
25
+ "#operations": "./src/operations/index.ts",
26
+ "#translations": "./src/translations.ts",
27
+ "#plugin": {
28
+ "browser": "./src/ChessPlugin.tsx",
29
+ "node": "./src/ChessPlugin.node.ts",
30
+ "default": "./src/ChessPlugin.tsx"
31
+ },
32
+ "#types": "./src/types/index.ts"
33
+ },
15
34
  "exports": {
16
35
  ".": {
17
36
  "source": "./src/index.ts",
@@ -25,11 +44,17 @@
25
44
  "browser": "./dist/lib/browser/blueprints/index.mjs",
26
45
  "node": "./dist/lib/node-esm/blueprints/index.mjs"
27
46
  },
28
- "./cli": {
29
- "source": "./src/cli/index.ts",
30
- "types": "./dist/types/src/cli/index.d.ts",
31
- "browser": "./dist/lib/browser/cli/index.mjs",
32
- "node": "./dist/lib/node-esm/cli/index.mjs"
47
+ "./operations": {
48
+ "source": "./src/operations/index.ts",
49
+ "types": "./dist/types/src/operations/index.d.ts",
50
+ "browser": "./dist/lib/browser/operations/index.mjs",
51
+ "node": "./dist/lib/node-esm/operations/index.mjs"
52
+ },
53
+ "./translations": {
54
+ "source": "./src/translations.ts",
55
+ "types": "./dist/types/src/translations.d.ts",
56
+ "browser": "./dist/lib/browser/translations.mjs",
57
+ "node": "./dist/lib/node-esm/translations.mjs"
33
58
  },
34
59
  "./types": {
35
60
  "source": "./src/types/index.ts",
@@ -39,65 +64,58 @@
39
64
  }
40
65
  },
41
66
  "types": "dist/types/src/index.d.ts",
42
- "typesVersions": {
43
- "*": {
44
- "types": [
45
- "dist/types/src/types/index.d.ts"
46
- ]
47
- }
48
- },
49
67
  "files": [
50
68
  "dist",
51
69
  "src"
52
70
  ],
53
71
  "dependencies": {
54
- "@automerge/automerge": "3.2.3",
72
+ "@automerge/automerge": "3.2.6",
55
73
  "@effect-atom/atom-react": "^0.5.0",
56
74
  "chess.js": "^1.0.0",
57
- "effect": "3.19.16",
58
- "@dxos/ai": "0.8.4-main.1068cf700f",
59
- "@dxos/app-toolkit": "0.8.4-main.1068cf700f",
60
- "@dxos/app-framework": "0.8.4-main.1068cf700f",
61
- "@dxos/assistant": "0.8.4-main.1068cf700f",
62
- "@dxos/blueprints": "0.8.4-main.1068cf700f",
63
- "@dxos/display-name": "0.8.4-main.1068cf700f",
64
- "@dxos/async": "0.8.4-main.1068cf700f",
65
- "@dxos/echo": "0.8.4-main.1068cf700f",
66
- "@dxos/echo-react": "0.8.4-main.1068cf700f",
67
- "@dxos/functions": "0.8.4-main.1068cf700f",
68
- "@dxos/echo-db": "0.8.4-main.1068cf700f",
69
- "@dxos/invariant": "0.8.4-main.1068cf700f",
70
- "@dxos/operation": "0.8.4-main.1068cf700f",
71
- "@dxos/plugin-client": "0.8.4-main.1068cf700f",
72
- "@dxos/log": "0.8.4-main.1068cf700f",
73
- "@dxos/plugin-graph": "0.8.4-main.1068cf700f",
74
- "@dxos/plugin-markdown": "0.8.4-main.1068cf700f",
75
- "@dxos/react-client": "0.8.4-main.1068cf700f",
76
- "@dxos/plugin-space": "0.8.4-main.1068cf700f",
77
- "@dxos/react-ui-gameboard": "0.8.4-main.1068cf700f",
78
- "@dxos/react-ui-sfx": "0.8.4-main.1068cf700f",
79
- "@dxos/react-ui-mosaic": "0.8.4-main.1068cf700f",
80
- "@dxos/react-ui-stack": "0.8.4-main.1068cf700f",
81
- "@dxos/util": "0.8.4-main.1068cf700f",
82
- "@dxos/schema": "0.8.4-main.1068cf700f",
83
- "@dxos/types": "0.8.4-main.1068cf700f"
75
+ "effect": "3.20.0",
76
+ "@dxos/ai": "0.8.4-main.1c7ec43d41",
77
+ "@dxos/app-toolkit": "0.8.4-main.1c7ec43d41",
78
+ "@dxos/app-framework": "0.8.4-main.1c7ec43d41",
79
+ "@dxos/assistant": "0.8.4-main.1c7ec43d41",
80
+ "@dxos/async": "0.8.4-main.1c7ec43d41",
81
+ "@dxos/compute": "0.8.4-main.1c7ec43d41",
82
+ "@dxos/echo": "0.8.4-main.1c7ec43d41",
83
+ "@dxos/display-name": "0.8.4-main.1c7ec43d41",
84
+ "@dxos/echo-db": "0.8.4-main.1c7ec43d41",
85
+ "@dxos/echo-react": "0.8.4-main.1c7ec43d41",
86
+ "@dxos/log": "0.8.4-main.1c7ec43d41",
87
+ "@dxos/plugin-client": "0.8.4-main.1c7ec43d41",
88
+ "@dxos/invariant": "0.8.4-main.1c7ec43d41",
89
+ "@dxos/plugin-graph": "0.8.4-main.1c7ec43d41",
90
+ "@dxos/plugin-space": "0.8.4-main.1c7ec43d41",
91
+ "@dxos/plugin-game": "0.8.4-main.1c7ec43d41",
92
+ "@dxos/react-client": "0.8.4-main.1c7ec43d41",
93
+ "@dxos/plugin-markdown": "0.8.4-main.1c7ec43d41",
94
+ "@dxos/react-ui-gameboard": "0.8.4-main.1c7ec43d41",
95
+ "@dxos/react-ui-sfx": "0.8.4-main.1c7ec43d41",
96
+ "@dxos/react-ui-mosaic": "0.8.4-main.1c7ec43d41",
97
+ "@dxos/schema": "0.8.4-main.1c7ec43d41",
98
+ "@dxos/react-ui-stack": "0.8.4-main.1c7ec43d41",
99
+ "@dxos/util": "0.8.4-main.1c7ec43d41",
100
+ "@dxos/types": "0.8.4-main.1c7ec43d41"
84
101
  },
85
102
  "devDependencies": {
86
103
  "@types/react": "~19.2.7",
87
104
  "@types/react-dom": "~19.2.3",
88
105
  "react": "~19.2.3",
89
106
  "react-dom": "~19.2.3",
90
- "vite": "7.1.9",
91
- "@dxos/plugin-theme": "0.8.4-main.1068cf700f",
92
- "@dxos/react-ui": "0.8.4-main.1068cf700f",
93
- "@dxos/storybook-utils": "0.8.4-main.1068cf700f",
94
- "@dxos/ui-theme": "0.8.4-main.1068cf700f"
107
+ "vite": "^8.0.10",
108
+ "@dxos/plugin-testing": "0.8.4-main.1c7ec43d41",
109
+ "@dxos/react-ui": "0.8.4-main.1c7ec43d41",
110
+ "@dxos/storybook-utils": "0.8.4-main.1c7ec43d41",
111
+ "@dxos/ui-theme": "0.8.4-main.1c7ec43d41",
112
+ "@dxos/plugin-theme": "0.8.4-main.1c7ec43d41"
95
113
  },
96
114
  "peerDependencies": {
97
115
  "react": "~19.2.3",
98
116
  "react-dom": "~19.2.3",
99
- "@dxos/react-ui": "0.8.4-main.1068cf700f",
100
- "@dxos/ui-theme": "0.8.4-main.1068cf700f"
117
+ "@dxos/ui-theme": "0.8.4-main.1c7ec43d41",
118
+ "@dxos/react-ui": "0.8.4-main.1c7ec43d41"
101
119
  },
102
120
  "publishConfig": {
103
121
  "access": "public"
@@ -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,49 @@
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/events';
9
+ import { ClientPlugin } from '@dxos/plugin-client';
10
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
11
+
12
+ import { ChessPlugin } from '#plugin';
13
+
14
+ import { meta } from './meta';
15
+ import { Print } from './operations';
16
+
17
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
18
+
19
+ describe('ChessPlugin', () => {
20
+ test('modules activate on the expected events', async ({ expect }) => {
21
+ await using harness = await createComposerTestApp({
22
+ plugins: [ClientPlugin({}), ChessPlugin()],
23
+ });
24
+
25
+ // Modules expected to be active after a normal startup (headless/node variant).
26
+ expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('schema')]));
27
+
28
+ // SetupArtifactDefinition is fired by AssistantPlugin, which can't be included here due to a workspace cycle.
29
+ await harness.fire(AppActivationEvents.SetupArtifactDefinition);
30
+ expect(harness.manager.getActive()).toContain(moduleId('BlueprintDefinition'));
31
+
32
+ // Operation handlers are not loaded on startup — SetupOperationHandler fires lazily when an operation is invoked.
33
+ await harness.fire(ActivationEvents.SetupOperationHandler);
34
+ expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
35
+ });
36
+
37
+ test('invokes the Print operation via the invoker capability', async ({ expect }) => {
38
+ await using harness = await createComposerTestApp({ plugins: [ChessPlugin()] });
39
+ const result = await harness.invoke(Print, {});
40
+ // Empty input returns empty ASCII (handler swallows errors for malformed FEN).
41
+ expect(typeof result.ascii).toBe('string');
42
+ });
43
+
44
+ test('Print renders a PGN to ASCII board', async ({ expect }) => {
45
+ await using harness = await createComposerTestApp({ plugins: [ChessPlugin()] });
46
+ const { ascii } = await harness.invoke(Print, { pgn: '1. e4 e5' });
47
+ expect(ascii).toContain('a b c d e f g h');
48
+ });
49
+ });
@@ -2,34 +2,25 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import * as Effect from 'effect/Effect';
6
-
7
5
  import { Plugin } from '@dxos/app-framework';
8
- import { AppPlugin } from '@dxos/app-toolkit';
9
- import { type CreateObject } from '@dxos/plugin-space/types';
6
+ import { AppPlugin, AppActivationEvents } from '@dxos/app-toolkit';
10
7
 
11
- import { ChessBlueprint } from './blueprints';
12
- import { BlueprintDefinition, ReactSurface } from './capabilities';
13
- import { meta } from './meta';
14
- import { translations } from './translations';
15
- import { Chess } from './types';
8
+ import { BlueprintDefinition, GameVariant, OperationHandler } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
11
+ import { Chess } from '#types';
16
12
 
17
13
  export const ChessPlugin = Plugin.define(meta).pipe(
18
- AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
19
- AppPlugin.addMetadataModule({
20
- metadata: {
21
- id: Chess.Game.typename,
22
- metadata: {
23
- icon: 'ph--shield-chevron--regular',
24
- iconHue: 'amber',
25
- blueprints: [ChessBlueprint.Key],
26
- createObject: ((props) => Effect.sync(() => Chess.make(props))) satisfies CreateObject,
27
- addToCollectionOnCreate: true,
28
- },
29
- },
14
+ Plugin.addModule({
15
+ id: 'game-variant',
16
+ activatesOn: AppActivationEvents.SetupSchema,
17
+ activate: GameVariant,
30
18
  }),
31
- AppPlugin.addSchemaModule({ schema: [Chess.Game] }),
32
- AppPlugin.addSurfaceModule({ activate: ReactSurface }),
19
+ AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
20
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
21
+ AppPlugin.addSchemaModule({ schema: [Chess.State] }),
33
22
  AppPlugin.addTranslationsModule({ translations }),
34
23
  Plugin.make,
35
24
  );
25
+
26
+ export default ChessPlugin;
@@ -2,21 +2,19 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Blueprint, Template } from '@dxos/blueprints';
6
- import { type FunctionDefinition } from '@dxos/functions';
5
+ import { Blueprint, Template } from '@dxos/compute';
7
6
  import { trim } from '@dxos/util';
8
7
 
9
- import { create, move, play, print } from './functions';
8
+ import { Move, Play, Print } from '#operations';
9
+ import { Chess } from '#types';
10
10
 
11
- export const Key = 'dxos.org/blueprint/chess';
11
+ const operations = [Move, Play, Print];
12
12
 
13
- export const functions: FunctionDefinition[] = [create, move, play, print];
14
-
15
- export const make = () =>
13
+ const make = () =>
16
14
  Blueprint.make({
17
- key: Key,
15
+ key: Chess.BLUEPRINT_KEY,
18
16
  name: 'Chess',
19
- tools: Blueprint.toolDefinitions({ functions }),
17
+ tools: Blueprint.toolDefinitions({ operations }),
20
18
  instructions: Template.make({
21
19
  source: trim`
22
20
  You are an expert chess player.
@@ -26,3 +24,10 @@ export const make = () =>
26
24
  `,
27
25
  }),
28
26
  });
27
+
28
+ const blueprint: Blueprint.Definition = {
29
+ key: Chess.BLUEPRINT_KEY,
30
+ make,
31
+ };
32
+
33
+ export default blueprint;
@@ -2,5 +2,5 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * as ChessBlueprint from './chess-blueprint';
6
- export * as ChessFunctions from './functions';
5
+ export { default as ChessBlueprint } from './chess-blueprint';
6
+ export * as ChessFunctions from '../operations';
@@ -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/types';
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,5 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './blueprint-definition';
6
- export * from './react-surface';
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';
8
+
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,18 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
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';
8
+
9
+ /**
10
+ * Node-only capability exports. Excludes React/Solid-touching modules
11
+ * (game-variant pulls in container components) so the headless CLI build
12
+ * doesn't drag UI code through bun's JSX transform.
13
+ */
14
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
15
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
16
+ 'OperationHandler',
17
+ () => import('./operation-handler'),
18
+ );
@@ -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 { ChessHandlers } from '#operations';
9
+
10
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
11
+ Effect.fnUntraced(function* () {
12
+ return Capability.contributes(Capabilities.OperationHandler, ChessHandlers);
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
+ };