@dxos/plugin-chess 0.8.4-main.422d1c7879 → 0.8.4-main.4f23b4e393

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 (194) hide show
  1. package/dist/lib/neutral/ChessArticle-QLLKZGPH.mjs +88 -0
  2. package/dist/lib/neutral/ChessArticle-QLLKZGPH.mjs.map +7 -0
  3. package/dist/lib/neutral/ChessCard-I5RSZZIP.mjs +19 -0
  4. package/dist/lib/neutral/ChessCard-I5RSZZIP.mjs.map +7 -0
  5. package/dist/lib/neutral/ChessPlugin.mjs +30 -0
  6. package/dist/lib/neutral/ChessPlugin.mjs.map +7 -0
  7. package/dist/lib/neutral/ChessPlugin.node.mjs +23 -0
  8. package/dist/lib/neutral/ChessPlugin.node.mjs.map +7 -0
  9. package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs +15 -0
  10. package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs.map +7 -0
  11. package/dist/lib/neutral/blueprints/index.mjs +8 -0
  12. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  13. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-5UOTTW6U.mjs +8 -0
  15. package/dist/lib/neutral/chunk-5UOTTW6U.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-E4LZPHAQ.mjs +148 -0
  17. package/dist/lib/neutral/chunk-E4LZPHAQ.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-FFXSIHW6.mjs +21 -0
  19. package/dist/lib/neutral/chunk-FFXSIHW6.mjs.map +7 -0
  20. package/dist/lib/{browser/chunk-MC7L6JNC.mjs → neutral/chunk-XWKNXG62.mjs} +8 -10
  21. package/dist/lib/neutral/chunk-XWKNXG62.mjs.map +7 -0
  22. package/dist/lib/{browser → neutral/components}/index.mjs +8 -158
  23. package/dist/lib/neutral/components/index.mjs.map +7 -0
  24. package/dist/lib/neutral/containers/index.mjs +11 -0
  25. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  26. package/dist/lib/neutral/game-variant-24UKIBRM.mjs +40 -0
  27. package/dist/lib/neutral/game-variant-24UKIBRM.mjs.map +7 -0
  28. package/dist/lib/neutral/index.mjs +18 -0
  29. package/dist/lib/neutral/meta.json +1 -0
  30. package/dist/lib/neutral/meta.mjs +8 -0
  31. package/dist/lib/neutral/move-RQZ7BJY3.mjs +37 -0
  32. package/dist/lib/neutral/move-RQZ7BJY3.mjs.map +7 -0
  33. package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs +13 -0
  34. package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs.map +7 -0
  35. package/dist/lib/{browser/types → neutral/operations}/index.mjs +3 -3
  36. package/dist/lib/neutral/play-GDGCEPQL.mjs +46 -0
  37. package/dist/lib/neutral/play-GDGCEPQL.mjs.map +7 -0
  38. package/dist/lib/neutral/plugin.mjs +16 -0
  39. package/dist/lib/neutral/plugin.mjs.map +7 -0
  40. package/dist/lib/{browser/print-EW7LPW4D.mjs → neutral/print-ZQA74KZI.mjs} +5 -6
  41. package/dist/lib/neutral/print-ZQA74KZI.mjs.map +7 -0
  42. package/dist/lib/neutral/translations.mjs +34 -0
  43. package/dist/lib/neutral/translations.mjs.map +7 -0
  44. package/dist/lib/neutral/types/index.mjs +10 -0
  45. package/dist/types/src/ChessPlugin.d.ts +1 -0
  46. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  47. package/dist/types/src/ChessPlugin.node.d.ts +8 -0
  48. package/dist/types/src/ChessPlugin.node.d.ts.map +1 -0
  49. package/dist/types/src/blueprints/chess-blueprint.d.ts +2 -2
  50. package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -1
  51. package/dist/types/src/blueprints/index.d.ts +0 -1
  52. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  53. package/dist/types/src/capabilities/blueprint-definition.d.ts +2 -2
  54. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  55. package/dist/types/src/capabilities/game-variant.d.ts +6 -0
  56. package/dist/types/src/capabilities/game-variant.d.ts.map +1 -0
  57. package/dist/types/src/capabilities/index.d.ts +3 -3
  58. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  59. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  60. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  61. package/dist/types/src/components/Chessboard/Chessboard.d.ts +6 -2
  62. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -1
  63. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +32 -23
  64. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -1
  65. package/dist/types/src/components/Chessboard/Info.d.ts +4 -5
  66. package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -1
  67. package/dist/types/src/components/Chessboard/types.d.ts +2 -2
  68. package/dist/types/src/components/Chessboard/types.d.ts.map +1 -1
  69. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +3 -4
  70. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -1
  71. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +32 -23
  72. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -1
  73. package/dist/types/src/containers/ChessCard/ChessCard.d.ts +3 -4
  74. package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -1
  75. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -1
  76. package/dist/types/src/index.d.ts +0 -2
  77. package/dist/types/src/index.d.ts.map +1 -1
  78. package/dist/types/src/operations/index.d.ts +2 -3
  79. package/dist/types/src/operations/index.d.ts.map +1 -1
  80. package/dist/types/src/operations/move.d.ts +3 -3
  81. package/dist/types/src/operations/move.d.ts.map +1 -1
  82. package/dist/types/src/operations/play.d.ts +3 -3
  83. package/dist/types/src/operations/play.d.ts.map +1 -1
  84. package/dist/types/src/operations/print.d.ts +3 -3
  85. package/dist/types/src/operations/print.d.ts.map +1 -1
  86. package/dist/types/src/{cli/plugin.d.ts → plugin.d.ts} +1 -0
  87. package/dist/types/src/plugin.d.ts.map +1 -0
  88. package/dist/types/src/translations.d.ts +32 -24
  89. package/dist/types/src/translations.d.ts.map +1 -1
  90. package/dist/types/src/types/Chess.d.ts +10 -19
  91. package/dist/types/src/types/Chess.d.ts.map +1 -1
  92. package/dist/types/src/types/ChessOperation.d.ts +24 -0
  93. package/dist/types/src/types/ChessOperation.d.ts.map +1 -0
  94. package/dist/types/src/types/index.d.ts +1 -0
  95. package/dist/types/src/types/index.d.ts.map +1 -1
  96. package/dist/types/tsconfig.tsbuildinfo +1 -1
  97. package/package.json +91 -68
  98. package/src/ChessPlugin.node.ts +23 -0
  99. package/src/ChessPlugin.test.ts +8 -10
  100. package/src/ChessPlugin.tsx +11 -34
  101. package/src/blueprints/chess-blueprint.ts +6 -9
  102. package/src/blueprints/index.ts +0 -1
  103. package/src/capabilities/blueprint-definition.ts +2 -0
  104. package/src/capabilities/game-variant.ts +42 -0
  105. package/src/capabilities/index.ts +3 -2
  106. package/src/capabilities/operation-handler.ts +3 -3
  107. package/src/components/Chessboard/Chessboard.stories.tsx +3 -3
  108. package/src/components/Chessboard/Chessboard.tsx +4 -4
  109. package/src/components/Chessboard/Info.tsx +3 -63
  110. package/src/components/Chessboard/types.ts +1 -1
  111. package/src/containers/ChessArticle/ChessArticle.stories.tsx +9 -3
  112. package/src/containers/ChessArticle/ChessArticle.tsx +45 -10
  113. package/src/containers/ChessCard/ChessCard.stories.tsx +7 -2
  114. package/src/containers/ChessCard/ChessCard.tsx +10 -5
  115. package/src/index.ts +0 -3
  116. package/src/operations/index.ts +2 -7
  117. package/src/operations/move.ts +13 -13
  118. package/src/operations/play.ts +14 -14
  119. package/src/operations/print.ts +3 -3
  120. package/src/plugin.ts +11 -0
  121. package/src/translations.ts +6 -10
  122. package/src/types/Chess.ts +19 -22
  123. package/src/{operations/definitions.ts → types/ChessOperation.ts} +10 -34
  124. package/src/types/index.ts +1 -0
  125. package/dist/lib/browser/blueprints/index.mjs +0 -14
  126. package/dist/lib/browser/chunk-2TJN26DN.mjs +0 -67
  127. package/dist/lib/browser/chunk-2TJN26DN.mjs.map +0 -7
  128. package/dist/lib/browser/chunk-JZMN24DY.mjs +0 -28
  129. package/dist/lib/browser/chunk-JZMN24DY.mjs.map +0 -7
  130. package/dist/lib/browser/chunk-MC7L6JNC.mjs.map +0 -7
  131. package/dist/lib/browser/chunk-XAJZK6Z2.mjs +0 -110
  132. package/dist/lib/browser/chunk-XAJZK6Z2.mjs.map +0 -7
  133. package/dist/lib/browser/cli/index.mjs +0 -34
  134. package/dist/lib/browser/cli/index.mjs.map +0 -7
  135. package/dist/lib/browser/create-AJHN4QT4.mjs +0 -24
  136. package/dist/lib/browser/create-AJHN4QT4.mjs.map +0 -7
  137. package/dist/lib/browser/index.mjs.map +0 -7
  138. package/dist/lib/browser/meta.json +0 -1
  139. package/dist/lib/browser/move-T2NLRBR4.mjs +0 -36
  140. package/dist/lib/browser/move-T2NLRBR4.mjs.map +0 -7
  141. package/dist/lib/browser/operations/index.mjs +0 -19
  142. package/dist/lib/browser/play-7VTMD3SJ.mjs +0 -45
  143. package/dist/lib/browser/play-7VTMD3SJ.mjs.map +0 -7
  144. package/dist/lib/browser/print-EW7LPW4D.mjs.map +0 -7
  145. package/dist/lib/node-esm/blueprints/index.mjs +0 -15
  146. package/dist/lib/node-esm/chunk-4HZWCKMR.mjs +0 -38
  147. package/dist/lib/node-esm/chunk-4HZWCKMR.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  149. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  150. package/dist/lib/node-esm/chunk-LQEDIKCV.mjs +0 -29
  151. package/dist/lib/node-esm/chunk-LQEDIKCV.mjs.map +0 -7
  152. package/dist/lib/node-esm/chunk-NYU5JVXP.mjs +0 -111
  153. package/dist/lib/node-esm/chunk-NYU5JVXP.mjs.map +0 -7
  154. package/dist/lib/node-esm/chunk-OIRJVY2R.mjs +0 -68
  155. package/dist/lib/node-esm/chunk-OIRJVY2R.mjs.map +0 -7
  156. package/dist/lib/node-esm/cli/index.mjs +0 -35
  157. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  158. package/dist/lib/node-esm/create-QSETDT4N.mjs +0 -25
  159. package/dist/lib/node-esm/create-QSETDT4N.mjs.map +0 -7
  160. package/dist/lib/node-esm/index.mjs +0 -390
  161. package/dist/lib/node-esm/index.mjs.map +0 -7
  162. package/dist/lib/node-esm/meta.json +0 -1
  163. package/dist/lib/node-esm/move-5F2ANDTE.mjs +0 -37
  164. package/dist/lib/node-esm/move-5F2ANDTE.mjs.map +0 -7
  165. package/dist/lib/node-esm/operations/index.mjs +0 -20
  166. package/dist/lib/node-esm/play-W4DQCQRX.mjs +0 -46
  167. package/dist/lib/node-esm/play-W4DQCQRX.mjs.map +0 -7
  168. package/dist/lib/node-esm/print-UJHXAXMS.mjs +0 -31
  169. package/dist/lib/node-esm/print-UJHXAXMS.mjs.map +0 -7
  170. package/dist/lib/node-esm/types/index.mjs +0 -9
  171. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  172. package/dist/types/src/capabilities/artifact-definition.d.ts +0 -12
  173. package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
  174. package/dist/types/src/capabilities/react-surface.d.ts +0 -5
  175. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  176. package/dist/types/src/cli/index.d.ts +0 -2
  177. package/dist/types/src/cli/index.d.ts.map +0 -1
  178. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  179. package/dist/types/src/operations/create.d.ts +0 -5
  180. package/dist/types/src/operations/create.d.ts.map +0 -1
  181. package/dist/types/src/operations/definitions.d.ts +0 -51
  182. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  183. package/src/capabilities/artifact-definition.ts +0 -135
  184. package/src/capabilities/react-surface.tsx +0 -35
  185. package/src/cli/index.ts +0 -5
  186. package/src/cli/plugin.ts +0 -37
  187. package/src/operations/create.ts +0 -21
  188. /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
  189. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  190. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  191. /package/dist/lib/{browser/operations → neutral}/index.mjs.map +0 -0
  192. /package/dist/lib/{browser/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
  193. /package/dist/lib/{node-esm/blueprints → neutral/operations}/index.mjs.map +0 -0
  194. /package/dist/lib/{node-esm/operations → 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.422d1c7879",
3
+ "version": "0.8.4-main.4f23b4e393",
4
4
  "description": "Chess for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -13,44 +13,71 @@
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"
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"
36
30
  },
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"
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"
42
35
  },
43
- "./operations": {
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"
48
54
  },
49
- "./types": {
55
+ "#translations": {
56
+ "source": "./src/translations.ts",
57
+ "types": "./dist/types/src/translations.d.ts",
58
+ "default": "./dist/lib/neutral/translations.mjs"
59
+ },
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"
64
+ }
65
+ },
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
+ "./translations": {
78
+ "source": "./src/translations.ts",
79
+ "types": "./dist/types/src/translations.d.ts",
80
+ "default": "./dist/lib/neutral/translations.mjs"
54
81
  }
55
82
  },
56
83
  "types": "dist/types/src/index.d.ts",
@@ -59,56 +86,52 @@
59
86
  "src"
60
87
  ],
61
88
  "dependencies": {
62
- "@automerge/automerge": "3.2.3",
89
+ "@automerge/automerge": "3.2.6",
63
90
  "@effect-atom/atom-react": "^0.5.0",
64
91
  "chess.js": "^1.0.0",
65
92
  "effect": "3.20.0",
66
- "@dxos/ai": "0.8.4-main.422d1c7879",
67
- "@dxos/app-framework": "0.8.4-main.422d1c7879",
68
- "@dxos/app-toolkit": "0.8.4-main.422d1c7879",
69
- "@dxos/assistant": "0.8.4-main.422d1c7879",
70
- "@dxos/async": "0.8.4-main.422d1c7879",
71
- "@dxos/blueprints": "0.8.4-main.422d1c7879",
72
- "@dxos/display-name": "0.8.4-main.422d1c7879",
73
- "@dxos/echo-db": "0.8.4-main.422d1c7879",
74
- "@dxos/echo": "0.8.4-main.422d1c7879",
75
- "@dxos/echo-react": "0.8.4-main.422d1c7879",
76
- "@dxos/functions": "0.8.4-main.422d1c7879",
77
- "@dxos/log": "0.8.4-main.422d1c7879",
78
- "@dxos/invariant": "0.8.4-main.422d1c7879",
79
- "@dxos/plugin-client": "0.8.4-main.422d1c7879",
80
- "@dxos/operation": "0.8.4-main.422d1c7879",
81
- "@dxos/plugin-graph": "0.8.4-main.422d1c7879",
82
- "@dxos/plugin-markdown": "0.8.4-main.422d1c7879",
83
- "@dxos/plugin-space": "0.8.4-main.422d1c7879",
84
- "@dxos/react-client": "0.8.4-main.422d1c7879",
85
- "@dxos/react-ui-mosaic": "0.8.4-main.422d1c7879",
86
- "@dxos/react-ui-gameboard": "0.8.4-main.422d1c7879",
87
- "@dxos/react-ui-stack": "0.8.4-main.422d1c7879",
88
- "@dxos/react-ui-sfx": "0.8.4-main.422d1c7879",
89
- "@dxos/schema": "0.8.4-main.422d1c7879",
90
- "@dxos/types": "0.8.4-main.422d1c7879",
91
- "@dxos/util": "0.8.4-main.422d1c7879"
93
+ "@dxos/ai": "0.8.4-main.4f23b4e393",
94
+ "@dxos/app-toolkit": "0.8.4-main.4f23b4e393",
95
+ "@dxos/assistant": "0.8.4-main.4f23b4e393",
96
+ "@dxos/async": "0.8.4-main.4f23b4e393",
97
+ "@dxos/compute": "0.8.4-main.4f23b4e393",
98
+ "@dxos/display-name": "0.8.4-main.4f23b4e393",
99
+ "@dxos/echo": "0.8.4-main.4f23b4e393",
100
+ "@dxos/echo-db": "0.8.4-main.4f23b4e393",
101
+ "@dxos/echo-react": "0.8.4-main.4f23b4e393",
102
+ "@dxos/invariant": "0.8.4-main.4f23b4e393",
103
+ "@dxos/log": "0.8.4-main.4f23b4e393",
104
+ "@dxos/app-framework": "0.8.4-main.4f23b4e393",
105
+ "@dxos/plugin-client": "0.8.4-main.4f23b4e393",
106
+ "@dxos/plugin-game": "0.8.4-main.4f23b4e393",
107
+ "@dxos/plugin-graph": "0.8.4-main.4f23b4e393",
108
+ "@dxos/plugin-markdown": "0.8.4-main.4f23b4e393",
109
+ "@dxos/plugin-space": "0.8.4-main.4f23b4e393",
110
+ "@dxos/react-client": "0.8.4-main.4f23b4e393",
111
+ "@dxos/react-ui-gameboard": "0.8.4-main.4f23b4e393",
112
+ "@dxos/react-ui-mosaic": "0.8.4-main.4f23b4e393",
113
+ "@dxos/react-ui-sfx": "0.8.4-main.4f23b4e393",
114
+ "@dxos/schema": "0.8.4-main.4f23b4e393",
115
+ "@dxos/types": "0.8.4-main.4f23b4e393",
116
+ "@dxos/react-ui-stack": "0.8.4-main.4f23b4e393",
117
+ "@dxos/util": "0.8.4-main.4f23b4e393"
92
118
  },
93
119
  "devDependencies": {
94
120
  "@types/react": "~19.2.7",
95
121
  "@types/react-dom": "~19.2.3",
96
122
  "react": "~19.2.3",
97
123
  "react-dom": "~19.2.3",
98
- "vite": "^7.1.11",
99
- "@dxos/plugin-testing": "0.8.4-main.422d1c7879",
100
- "@dxos/plugin-theme": "0.8.4-main.422d1c7879",
101
- "@dxos/ui-theme": "0.8.4-main.422d1c7879",
102
- "@dxos/react-ui": "0.8.4-main.422d1c7879",
103
- "@dxos/storybook-utils": "0.8.4-main.422d1c7879"
124
+ "vite": "^8.0.10",
125
+ "@dxos/plugin-testing": "0.8.4-main.4f23b4e393",
126
+ "@dxos/react-ui": "0.8.4-main.4f23b4e393",
127
+ "@dxos/plugin-theme": "0.8.4-main.4f23b4e393",
128
+ "@dxos/ui-theme": "0.8.4-main.4f23b4e393",
129
+ "@dxos/storybook-utils": "0.8.4-main.4f23b4e393"
104
130
  },
105
131
  "peerDependencies": {
106
132
  "react": "~19.2.3",
107
133
  "react-dom": "~19.2.3",
108
- "@dxos/react-ui": "0.8.4-main.422d1c7879",
109
- "@dxos/ui-theme": "0.8.4-main.422d1c7879"
110
- },
111
- "publishConfig": {
112
- "access": "public"
134
+ "@dxos/react-ui": "0.8.4-main.4f23b4e393",
135
+ "@dxos/ui-theme": "0.8.4-main.4f23b4e393"
113
136
  }
114
137
  }
@@ -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;
@@ -6,13 +6,13 @@ import { describe, test } from 'vitest';
6
6
 
7
7
  import { ActivationEvents } from '@dxos/app-framework';
8
8
  import { AppActivationEvents } from '@dxos/app-toolkit';
9
- // Use the CLI variant — the main ClientPlugin references capabilities that resolve to undefined under Node.
10
- import { ClientPlugin } from '@dxos/plugin-client/cli';
9
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
11
10
  import { createComposerTestApp } from '@dxos/plugin-testing/harness';
12
11
 
13
- import { ChessPlugin } from './ChessPlugin';
12
+ import { ChessPlugin } from '#plugin';
13
+
14
14
  import { meta } from './meta';
15
- import { Print } from './operations';
15
+ import { ChessOperation } from './types';
16
16
 
17
17
  const moduleId = (name: string) => `${meta.id}.module.${name}`;
18
18
 
@@ -22,10 +22,8 @@ describe('ChessPlugin', () => {
22
22
  plugins: [ClientPlugin({}), ChessPlugin()],
23
23
  });
24
24
 
25
- // Modules expected to be active after a normal startup.
26
- expect(harness.manager.getActive()).toEqual(
27
- expect.arrayContaining([moduleId('metadata'), moduleId('schema'), moduleId('ReactSurface')]),
28
- );
25
+ // Modules expected to be active after a normal startup (headless/node variant).
26
+ expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('schema')]));
29
27
 
30
28
  // SetupArtifactDefinition is fired by AssistantPlugin, which can't be included here due to a workspace cycle.
31
29
  await harness.fire(AppActivationEvents.SetupArtifactDefinition);
@@ -38,14 +36,14 @@ describe('ChessPlugin', () => {
38
36
 
39
37
  test('invokes the Print operation via the invoker capability', async ({ expect }) => {
40
38
  await using harness = await createComposerTestApp({ plugins: [ChessPlugin()] });
41
- const result = await harness.invoke(Print, {});
39
+ const result = await harness.invoke(ChessOperation.Print, {});
42
40
  // Empty input returns empty ASCII (handler swallows errors for malformed FEN).
43
41
  expect(typeof result.ascii).toBe('string');
44
42
  });
45
43
 
46
44
  test('Print renders a PGN to ASCII board', async ({ expect }) => {
47
45
  await using harness = await createComposerTestApp({ plugins: [ChessPlugin()] });
48
- const { ascii } = await harness.invoke(Print, { pgn: '1. e4 e5' });
46
+ const { ascii } = await harness.invoke(ChessOperation.Print, { pgn: '1. e4 e5' });
49
47
  expect(ascii).toContain('a b c d e f g h');
50
48
  });
51
49
  });
@@ -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
  }
@@ -5,12 +5,14 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React, { useMemo } from 'react';
7
7
 
8
+ import { type Obj } from '@dxos/echo';
9
+ import { make as makeGame } from '@dxos/plugin-game';
8
10
  import { withClientProvider } from '@dxos/react-client/testing';
9
11
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
10
12
 
13
+ import { translations } from '#translations';
11
14
  import { Chess } from '#types';
12
15
 
13
- import { translations } from '../../translations';
14
16
  import { ChessArticle } from './ChessArticle';
15
17
 
16
18
  type DefaultStoryProps = {
@@ -18,8 +20,12 @@ type DefaultStoryProps = {
18
20
  };
19
21
 
20
22
  const DefaultStory = ({ pgn }: DefaultStoryProps) => {
21
- const game = useMemo(() => Chess.make(pgn ? { pgn } : undefined), [pgn]);
22
- return <ChessArticle role='article' subject={game} attendableId='story' />;
23
+ const { game, state } = useMemo(() => {
24
+ const state = Chess.make(pgn ? { pgn } : undefined);
25
+ const game = makeGame({ name: 'Story game', variant: state as Obj.Unknown });
26
+ return { game, state };
27
+ }, [pgn]);
28
+ return <ChessArticle role='article' attendableId='story' game={game} variant={state} />;
23
29
  };
24
30
 
25
31
  const meta = {