@dxos/plugin-chess 0.8.3 → 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 (230) hide show
  1. package/dist/lib/browser/blueprints/index.mjs +14 -0
  2. package/dist/lib/browser/blueprints/index.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-5FHUZILG.mjs +63 -0
  4. package/dist/lib/browser/chunk-5FHUZILG.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-BCTL5GYK.mjs +88 -0
  6. package/dist/lib/browser/chunk-BCTL5GYK.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  8. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-ORLWKOYE.mjs +26 -0
  10. package/dist/lib/browser/chunk-ORLWKOYE.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-YER5TC5N.mjs +35 -0
  12. package/dist/lib/browser/chunk-YER5TC5N.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +31 -86
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/move-BH3WZUJH.mjs +39 -0
  17. package/dist/lib/browser/move-BH3WZUJH.mjs.map +7 -0
  18. package/dist/lib/browser/operations/index.mjs +17 -0
  19. package/dist/lib/browser/operations/index.mjs.map +7 -0
  20. package/dist/lib/browser/play-IM4BDFSY.mjs +48 -0
  21. package/dist/lib/browser/play-IM4BDFSY.mjs.map +7 -0
  22. package/dist/lib/browser/print-M3ZO2XZT.mjs +30 -0
  23. package/dist/lib/browser/print-M3ZO2XZT.mjs.map +7 -0
  24. package/dist/lib/browser/translations.mjs +34 -0
  25. package/dist/lib/browser/translations.mjs.map +7 -0
  26. package/dist/lib/browser/types/index.mjs +4 -9
  27. package/dist/lib/node-esm/blueprints/index.mjs +15 -0
  28. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  29. package/dist/lib/node-esm/chunk-A3P4HC7O.mjs +89 -0
  30. package/dist/lib/node-esm/chunk-A3P4HC7O.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-B42KRPBJ.mjs +37 -0
  32. package/dist/lib/node-esm/chunk-B42KRPBJ.mjs.map +7 -0
  33. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  34. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-WSHXDK3W.mjs +27 -0
  36. package/dist/lib/node-esm/chunk-WSHXDK3W.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-YRW4LYGF.mjs +64 -0
  38. package/dist/lib/node-esm/chunk-YRW4LYGF.mjs.map +7 -0
  39. package/dist/lib/node-esm/index.mjs +31 -86
  40. package/dist/lib/node-esm/index.mjs.map +4 -4
  41. package/dist/lib/node-esm/meta.json +1 -1
  42. package/dist/lib/node-esm/move-53HLCSAL.mjs +40 -0
  43. package/dist/lib/node-esm/move-53HLCSAL.mjs.map +7 -0
  44. package/dist/lib/node-esm/operations/index.mjs +18 -0
  45. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  46. package/dist/lib/node-esm/play-YXXPG5SO.mjs +49 -0
  47. package/dist/lib/node-esm/play-YXXPG5SO.mjs.map +7 -0
  48. package/dist/lib/node-esm/print-L2LUM3IW.mjs +31 -0
  49. package/dist/lib/node-esm/print-L2LUM3IW.mjs.map +7 -0
  50. package/dist/lib/node-esm/translations.mjs +35 -0
  51. package/dist/lib/node-esm/translations.mjs.map +7 -0
  52. package/dist/lib/node-esm/types/index.mjs +4 -9
  53. package/dist/types/src/ChessPlugin.d.ts +3 -1
  54. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  55. package/dist/types/src/ChessPlugin.node.d.ts +8 -0
  56. package/dist/types/src/ChessPlugin.node.d.ts.map +1 -0
  57. package/dist/types/src/ChessPlugin.test.d.ts +2 -0
  58. package/dist/types/src/ChessPlugin.test.d.ts.map +1 -0
  59. package/dist/types/src/blueprints/chess-blueprint.d.ts +4 -0
  60. package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -0
  61. package/dist/types/src/blueprints/index.d.ts +3 -0
  62. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  63. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  64. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  65. package/dist/types/src/capabilities/game-variant.d.ts +6 -0
  66. package/dist/types/src/capabilities/game-variant.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/index.d.ts +5 -3
  68. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  69. package/dist/types/src/capabilities/node.d.ts +10 -0
  70. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  71. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  72. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  73. package/dist/types/src/components/Chessboard/Chessboard.d.ts +38 -0
  74. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
  75. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +57 -0
  76. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
  77. package/dist/types/src/components/Chessboard/Info.d.ts +20 -0
  78. package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -0
  79. package/dist/types/src/components/Chessboard/index.d.ts +2 -0
  80. package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
  81. package/dist/types/src/components/Chessboard/types.d.ts +8 -0
  82. package/dist/types/src/components/Chessboard/types.d.ts.map +1 -0
  83. package/dist/types/src/components/index.d.ts +1 -5
  84. package/dist/types/src/components/index.d.ts.map +1 -1
  85. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +5 -0
  86. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
  87. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +56 -0
  88. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
  89. package/dist/types/src/containers/ChessArticle/index.d.ts +2 -0
  90. package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
  91. package/dist/types/src/containers/ChessCard/ChessCard.d.ts +5 -0
  92. package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
  93. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts +15 -0
  94. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
  95. package/dist/types/src/containers/ChessCard/index.d.ts +2 -0
  96. package/dist/types/src/containers/ChessCard/index.d.ts.map +1 -0
  97. package/dist/types/src/containers/index.d.ts +4 -0
  98. package/dist/types/src/containers/index.d.ts.map +1 -0
  99. package/dist/types/src/index.d.ts +4 -3
  100. package/dist/types/src/index.d.ts.map +1 -1
  101. package/dist/types/src/meta.d.ts +2 -3
  102. package/dist/types/src/meta.d.ts.map +1 -1
  103. package/dist/types/src/operations/definitions.d.ts +24 -0
  104. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  105. package/dist/types/src/operations/index.d.ts +4 -0
  106. package/dist/types/src/operations/index.d.ts.map +1 -0
  107. package/dist/types/src/operations/move.d.ts +5 -0
  108. package/dist/types/src/operations/move.d.ts.map +1 -0
  109. package/dist/types/src/operations/play.d.ts +5 -0
  110. package/dist/types/src/operations/play.d.ts.map +1 -0
  111. package/dist/types/src/operations/print.d.ts +5 -0
  112. package/dist/types/src/operations/print.d.ts.map +1 -0
  113. package/dist/types/src/translations.d.ts +34 -23
  114. package/dist/types/src/translations.d.ts.map +1 -1
  115. package/dist/types/src/types/Chess.d.ts +18 -0
  116. package/dist/types/src/types/Chess.d.ts.map +1 -0
  117. package/dist/types/src/types/index.d.ts +1 -2
  118. package/dist/types/src/types/index.d.ts.map +1 -1
  119. package/dist/types/tsconfig.tsbuildinfo +1 -1
  120. package/package.json +86 -42
  121. package/src/ChessPlugin.node.ts +23 -0
  122. package/src/ChessPlugin.test.ts +49 -0
  123. package/src/ChessPlugin.tsx +20 -54
  124. package/src/blueprints/chess-blueprint.ts +33 -0
  125. package/src/blueprints/index.ts +6 -0
  126. package/src/capabilities/blueprint-definition.ts +19 -0
  127. package/src/capabilities/game-variant.ts +42 -0
  128. package/src/capabilities/index.ts +9 -4
  129. package/src/capabilities/node.ts +18 -0
  130. package/src/capabilities/operation-handler.ts +14 -0
  131. package/src/components/Chessboard/Chessboard.stories.tsx +94 -0
  132. package/src/components/Chessboard/Chessboard.tsx +180 -0
  133. package/src/components/Chessboard/Info.tsx +193 -0
  134. package/src/components/Chessboard/index.ts +5 -0
  135. package/src/components/Chessboard/types.ts +18 -0
  136. package/src/components/index.ts +2 -6
  137. package/src/containers/ChessArticle/ChessArticle.stories.tsx +59 -0
  138. package/src/containers/ChessArticle/ChessArticle.tsx +108 -0
  139. package/src/containers/ChessArticle/index.ts +5 -0
  140. package/src/containers/ChessCard/ChessCard.stories.tsx +47 -0
  141. package/src/containers/ChessCard/ChessCard.tsx +27 -0
  142. package/src/containers/ChessCard/index.ts +5 -0
  143. package/src/containers/index.ts +8 -0
  144. package/src/index.ts +7 -3
  145. package/src/meta.ts +9 -7
  146. package/src/operations/definitions.ts +83 -0
  147. package/src/operations/index.ts +15 -0
  148. package/src/operations/move.ts +37 -0
  149. package/src/operations/play.ts +46 -0
  150. package/src/operations/print.ts +28 -0
  151. package/src/translations.ts +22 -14
  152. package/src/types/Chess.ts +59 -0
  153. package/src/types/index.ts +1 -2
  154. package/dist/lib/browser/ChessContainer-S72CLKGK.mjs +0 -101
  155. package/dist/lib/browser/ChessContainer-S72CLKGK.mjs.map +0 -7
  156. package/dist/lib/browser/artifact-definition-NLIDMZ42.mjs +0 -182
  157. package/dist/lib/browser/artifact-definition-NLIDMZ42.mjs.map +0 -7
  158. package/dist/lib/browser/chunk-5QBQW62M.mjs +0 -8
  159. package/dist/lib/browser/chunk-5QBQW62M.mjs.map +0 -7
  160. package/dist/lib/browser/chunk-6XPI4FTK.mjs +0 -61
  161. package/dist/lib/browser/chunk-6XPI4FTK.mjs.map +0 -7
  162. package/dist/lib/browser/chunk-KA3H3Z76.mjs +0 -65
  163. package/dist/lib/browser/chunk-KA3H3Z76.mjs.map +0 -7
  164. package/dist/lib/browser/intent-resolver-65W3KVTW.mjs +0 -28
  165. package/dist/lib/browser/intent-resolver-65W3KVTW.mjs.map +0 -7
  166. package/dist/lib/browser/react-surface-GYE5E74A.mjs +0 -42
  167. package/dist/lib/browser/react-surface-GYE5E74A.mjs.map +0 -7
  168. package/dist/lib/node/ChessContainer-EQUVXDJC.cjs +0 -123
  169. package/dist/lib/node/ChessContainer-EQUVXDJC.cjs.map +0 -7
  170. package/dist/lib/node/artifact-definition-VHJ54X2P.cjs +0 -196
  171. package/dist/lib/node/artifact-definition-VHJ54X2P.cjs.map +0 -7
  172. package/dist/lib/node/chunk-OTMP6HPY.cjs +0 -93
  173. package/dist/lib/node/chunk-OTMP6HPY.cjs.map +0 -7
  174. package/dist/lib/node/chunk-R6JAL3RE.cjs +0 -40
  175. package/dist/lib/node/chunk-R6JAL3RE.cjs.map +0 -7
  176. package/dist/lib/node/chunk-THN2FKB3.cjs +0 -86
  177. package/dist/lib/node/chunk-THN2FKB3.cjs.map +0 -7
  178. package/dist/lib/node/index.cjs +0 -121
  179. package/dist/lib/node/index.cjs.map +0 -7
  180. package/dist/lib/node/intent-resolver-BQGAQM27.cjs +0 -43
  181. package/dist/lib/node/intent-resolver-BQGAQM27.cjs.map +0 -7
  182. package/dist/lib/node/meta.json +0 -1
  183. package/dist/lib/node/react-surface-TZDWBTEY.cjs +0 -62
  184. package/dist/lib/node/react-surface-TZDWBTEY.cjs.map +0 -7
  185. package/dist/lib/node/types/index.cjs +0 -35
  186. package/dist/lib/node/types/index.cjs.map +0 -7
  187. package/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs +0 -102
  188. package/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs.map +0 -7
  189. package/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs +0 -183
  190. package/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs.map +0 -7
  191. package/dist/lib/node-esm/chunk-4V3WNUDH.mjs +0 -67
  192. package/dist/lib/node-esm/chunk-4V3WNUDH.mjs.map +0 -7
  193. package/dist/lib/node-esm/chunk-KHMDMPR2.mjs +0 -10
  194. package/dist/lib/node-esm/chunk-KHMDMPR2.mjs.map +0 -7
  195. package/dist/lib/node-esm/chunk-MVMMCPHE.mjs +0 -63
  196. package/dist/lib/node-esm/chunk-MVMMCPHE.mjs.map +0 -7
  197. package/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs +0 -29
  198. package/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs.map +0 -7
  199. package/dist/lib/node-esm/react-surface-LRFYFOFF.mjs +0 -43
  200. package/dist/lib/node-esm/react-surface-LRFYFOFF.mjs.map +0 -7
  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/ChessComponent.d.ts +0 -6
  208. package/dist/types/src/components/ChessComponent.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/ChessPanel.d.ts +0 -11
  212. package/dist/types/src/components/ChessPanel.d.ts.map +0 -1
  213. package/dist/types/src/components/Chessboard.stories.d.ts +0 -8
  214. package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
  215. package/dist/types/src/components/PlayerSelector.d.ts +0 -8
  216. package/dist/types/src/components/PlayerSelector.d.ts.map +0 -1
  217. package/dist/types/src/types/schema.d.ts +0 -29
  218. package/dist/types/src/types/schema.d.ts.map +0 -1
  219. package/dist/types/src/types/types.d.ts +0 -40
  220. package/dist/types/src/types/types.d.ts.map +0 -1
  221. package/src/capabilities/artifact-definition.ts +0 -124
  222. package/src/capabilities/intent-resolver.ts +0 -26
  223. package/src/capabilities/react-surface.tsx +0 -29
  224. package/src/components/ChessComponent.tsx +0 -54
  225. package/src/components/ChessContainer.tsx +0 -35
  226. package/src/components/ChessPanel.tsx +0 -67
  227. package/src/components/Chessboard.stories.tsx +0 -39
  228. package/src/components/PlayerSelector.tsx +0 -80
  229. package/src/types/schema.ts +0 -34
  230. package/src/types/types.ts +0 -26
@@ -0,0 +1,14 @@
1
+ import {
2
+ chess_blueprint_default
3
+ } from "../chunk-YER5TC5N.mjs";
4
+ import {
5
+ operations_exports
6
+ } from "../chunk-ORLWKOYE.mjs";
7
+ import "../chunk-BCTL5GYK.mjs";
8
+ import "../chunk-5FHUZILG.mjs";
9
+ import "../chunk-J5LGTIGS.mjs";
10
+ export {
11
+ chess_blueprint_default as ChessBlueprint,
12
+ operations_exports as ChessFunctions
13
+ };
14
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,63 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
4
+
5
+ // src/types/Chess.ts
6
+ var Chess_exports = {};
7
+ __export(Chess_exports, {
8
+ BLUEPRINT_KEY: () => BLUEPRINT_KEY,
9
+ State: () => State,
10
+ make: () => make
11
+ });
12
+ import { Chess as ChessJS } from "chess.js";
13
+ import * as Schema from "effect/Schema";
14
+ import { BlueprintsAnnotation } from "@dxos/app-toolkit";
15
+ import { Annotation, Obj, Type } from "@dxos/echo";
16
+ import { FormInputAnnotation, SystemTypeAnnotation } from "@dxos/echo/internal";
17
+ import { log } from "@dxos/log";
18
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-chess/src/types/Chess.ts";
19
+ var BLUEPRINT_KEY = "org.dxos.blueprint.chess";
20
+ var State = Schema.Struct({
21
+ pgn: Schema.String.annotations({
22
+ description: "Portable Game Notation."
23
+ }).pipe(FormInputAnnotation.set(false), Schema.optional),
24
+ fen: Schema.String.annotations({
25
+ description: "Forsyth-Edwards Notation."
26
+ }).pipe(FormInputAnnotation.set(false), Schema.optional)
27
+ }).pipe(
28
+ Type.object({
29
+ typename: "org.dxos.type.chess.state",
30
+ version: "0.1.0"
31
+ }),
32
+ Annotation.IconAnnotation.set({
33
+ icon: "ph--shield-chevron--regular",
34
+ hue: "amber"
35
+ }),
36
+ BlueprintsAnnotation.set([
37
+ BLUEPRINT_KEY
38
+ ]),
39
+ // Implementation detail of the unified `Game` schema. The user-facing object is `Game`;
40
+ // this state is only ever referenced via `Game.variant`. SystemType keeps it out of the
41
+ // navtree's typed branches so an orphaned state object doesn't reappear after the
42
+ // wrapping Game is deleted.
43
+ SystemTypeAnnotation.set(true)
44
+ );
45
+ var make = ({ pgn, fen } = {}) => {
46
+ const chess = new ChessJS();
47
+ if (pgn) {
48
+ try {
49
+ chess.loadPgn(pgn);
50
+ } catch {
51
+ log.warn(pgn, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 40, S: void 0 });
52
+ }
53
+ }
54
+ return Obj.make(State, {
55
+ pgn,
56
+ fen
57
+ });
58
+ };
59
+
60
+ export {
61
+ Chess_exports
62
+ };
63
+ //# sourceMappingURL=chunk-5FHUZILG.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/Chess.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Schema from 'effect/Schema';\n\nimport { BlueprintsAnnotation } from '@dxos/app-toolkit';\nimport { Annotation, Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation, SystemTypeAnnotation } from '@dxos/echo/internal';\nimport { log } from '@dxos/log';\n\nexport const BLUEPRINT_KEY = 'org.dxos.blueprint.chess';\n\n/**\n * Chess variant state. Referenced by the base `Game` object via `Game.variant`.\n * Players, name, and other game-shared fields live on the base `Game`.\n */\nexport const State = Schema.Struct({\n pgn: Schema.String.annotations({\n description: 'Portable Game Notation.',\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n fen: Schema.String.annotations({\n description: 'Forsyth-Edwards Notation.',\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.chess.state',\n version: '0.1.0',\n }),\n Annotation.IconAnnotation.set({\n icon: 'ph--shield-chevron--regular',\n hue: 'amber',\n }),\n BlueprintsAnnotation.set([BLUEPRINT_KEY]),\n // Implementation detail of the unified `Game` schema. The user-facing object is `Game`;\n // this state is only ever referenced via `Game.variant`. SystemType keeps it out of the\n // navtree's typed branches so an orphaned state object doesn't reappear after the\n // wrapping Game is deleted.\n SystemTypeAnnotation.set(true),\n);\n\nexport interface State extends Schema.Schema.Type<typeof State> {}\n\nexport const make = ({ pgn, fen }: { pgn?: string; fen?: string } = {}): State => {\n const chess = new ChessJS();\n if (pgn) {\n try {\n chess.loadPgn(pgn);\n } catch {\n log.warn(pgn);\n }\n }\n\n return Obj.make(State, {\n pgn,\n fen,\n });\n};\n"],
5
+ "mappings": ";;;;;AAAA;;;;;;AAIA,SAASA,SAASC,eAAe;AACjC,YAAYC,YAAY;AAExB,SAASC,4BAA4B;AACrC,SAASC,YAAYC,KAAKC,YAAY;AACtC,SAASC,qBAAqBC,4BAA4B;AAC1D,SAASC,WAAW;AAEpB,IAAA,eAAaC;;AAQTC,IAAAA,QAAa,cAAA;EACf,KAAQJ,cAAAA,YAAuB;IAC/BK,aAAYC;UACVF,oBAAa,IAAA,KAAA,GAAA,eAAA;EACf,KAAQJ,cAAAA,YAAuB;IAE/BD,aAAY;EACVQ,CAAAA,EAAAA,KAAAA,oBAAU,IAAA,KAAA,GAAA,eAAA;;EACVC,KAAS,OAAA;IAEXX,UAAAA;IACEY,SAAM;;EACNC,WAAK,eAAA,IAAA;IAEPd,MAAAA;IAA0BO,KAAAA;GAAc;EACxC,qBAAA,IAAA;IACA;EACA,CAAA;;;;;uBAQc,IAAIT,IAAAA;AAAAA;AAClB,IAAS,OAAA,CAAA,EAAA,KAAA,IAAA,IAAA,CAAA,MAAA;QACP,QAAI,IAAA,QAAA;WACFiB;AACF,QAAE;AACAT,YAAIU,QAAKC,GAAAA;IACX,QAAA;AACF,UAAA,KAAA,KAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,OAAA,CAAA;IAEA;;SAEER,IAAAA,KAAAA,OAAAA;IACF;IACA;;;",
6
+ "names": ["Chess", "ChessJS", "Schema", "BlueprintsAnnotation", "Annotation", "Obj", "Type", "FormInputAnnotation", "SystemTypeAnnotation", "log", "BLUEPRINT_KEY", "description", "fen", "String", "typename", "version", "icon", "hue", "chess", "warn", "pgn"]
7
+ }
@@ -0,0 +1,88 @@
1
+ import {
2
+ Chess_exports
3
+ } from "./chunk-5FHUZILG.mjs";
4
+
5
+ // src/operations/definitions.ts
6
+ import * as Schema from "effect/Schema";
7
+ import { Operation } from "@dxos/compute";
8
+ import { Database } from "@dxos/echo";
9
+ import { GameRef } from "@dxos/plugin-game/types";
10
+ var Move = Operation.make({
11
+ meta: {
12
+ key: "org.dxos.function.chess.move",
13
+ name: "Move",
14
+ description: "Makes a move in the given chess game."
15
+ },
16
+ input: Schema.Struct({
17
+ game: GameRef(Chess_exports.State).annotations({
18
+ description: "The ID of the game object (variant must be Chess)."
19
+ }),
20
+ move: Schema.String.annotations({
21
+ description: "The move to make in the chess game.",
22
+ examples: [
23
+ "e4",
24
+ "Bf3"
25
+ ]
26
+ })
27
+ }),
28
+ output: Schema.Struct({
29
+ pgn: Schema.String.annotations({
30
+ description: "The PGN of the game after the move was played."
31
+ })
32
+ }),
33
+ services: [
34
+ Database.Service
35
+ ]
36
+ });
37
+ var Play = Operation.make({
38
+ meta: {
39
+ key: "org.dxos.function.chess.play",
40
+ name: "Play",
41
+ description: "Uses the chess engine to play the next move."
42
+ },
43
+ input: Schema.Struct({
44
+ game: GameRef(Chess_exports.State).annotations({
45
+ description: "The ID of the game object (variant must be Chess)."
46
+ }),
47
+ side: Schema.optional(Schema.Literal("white", "black", "any")).annotations({
48
+ description: "The side to play.",
49
+ defaultValue: "any"
50
+ })
51
+ }),
52
+ output: Schema.Struct({
53
+ pgn: Schema.String.annotations({
54
+ description: "The PGN of the game after the move was played."
55
+ }),
56
+ move: Schema.optional(Schema.String).annotations({
57
+ description: "The move that was played."
58
+ })
59
+ }),
60
+ services: [
61
+ Database.Service
62
+ ]
63
+ });
64
+ var Print = Operation.make({
65
+ meta: {
66
+ key: "org.dxos.function.chess.print",
67
+ name: "Print game",
68
+ description: "Prints the chess game to ASCII."
69
+ },
70
+ input: Schema.Struct({
71
+ pgn: Schema.optional(Schema.String.annotations({
72
+ description: "Portable Game Notation."
73
+ })),
74
+ fen: Schema.optional(Schema.String.annotations({
75
+ description: "Forsyth-Edwards Notation."
76
+ }))
77
+ }),
78
+ output: Schema.Struct({
79
+ ascii: Schema.String
80
+ })
81
+ });
82
+
83
+ export {
84
+ Move,
85
+ Play,
86
+ Print
87
+ };
88
+ //# sourceMappingURL=chunk-BCTL5GYK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\nimport { GameRef } from '@dxos/plugin-game/types';\n\nimport { Chess } from '../types';\n\nexport const Move = Operation.make({\n meta: {\n key: 'org.dxos.function.chess.move',\n name: 'Move',\n description: 'Makes a move in the given chess game.',\n },\n input: Schema.Struct({\n game: GameRef(Chess.State).annotations({\n description: 'The ID of the game object (variant must be Chess).',\n }),\n move: Schema.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n output: Schema.Struct({\n pgn: Schema.String.annotations({\n description: 'The PGN of the game after the move was played.',\n }),\n }),\n services: [Database.Service],\n});\n\nexport const Play = Operation.make({\n meta: {\n key: 'org.dxos.function.chess.play',\n name: 'Play',\n description: 'Uses the chess engine to play the next move.',\n },\n input: Schema.Struct({\n game: GameRef(Chess.State).annotations({\n description: 'The ID of the game object (variant must be Chess).',\n }),\n side: Schema.optional(Schema.Literal('white', 'black', 'any')).annotations({\n description: 'The side to play.',\n defaultValue: 'any',\n }),\n }),\n output: Schema.Struct({\n pgn: Schema.String.annotations({\n description: 'The PGN of the game after the move was played.',\n }),\n move: Schema.optional(Schema.String).annotations({\n description: 'The move that was played.',\n }),\n }),\n services: [Database.Service],\n});\n\nexport const Print = Operation.make({\n meta: {\n key: 'org.dxos.function.chess.print',\n name: 'Print game',\n description: 'Prints the chess game to ASCII.',\n },\n input: Schema.Struct({\n pgn: Schema.optional(\n Schema.String.annotations({\n description: 'Portable Game Notation.',\n }),\n ),\n fen: Schema.optional(\n Schema.String.annotations({\n description: 'Forsyth-Edwards Notation.',\n }),\n ),\n }),\n output: Schema.Struct({\n ascii: Schema.String,\n }),\n});\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,eAAe;AAIjB,IAAMC,OAAOC,UAAUC,KAAK;EACjCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,MAAMC,QAAQC,cAAMC,KAAK,EAAEC,YAAY;MACrCP,aAAa;IACf,CAAA;IACAQ,MAAaC,cAAOF,YAAY;MAC9BP,aAAa;MACbU,UAAU;QAAC;QAAM;;IACnB,CAAA;EACF,CAAA;EACAC,QAAeT,cAAO;IACpBU,KAAYH,cAAOF,YAAY;MAC7BP,aAAa;IACf,CAAA;EACF,CAAA;EACAa,UAAU;IAACC,SAASC;;AACtB,CAAA;AAEO,IAAMC,OAAOrB,UAAUC,KAAK;EACjCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,MAAMC,QAAQC,cAAMC,KAAK,EAAEC,YAAY;MACrCP,aAAa;IACf,CAAA;IACAiB,MAAaC,gBAAgBC,eAAQ,SAAS,SAAS,KAAA,CAAA,EAAQZ,YAAY;MACzEP,aAAa;MACboB,cAAc;IAChB,CAAA;EACF,CAAA;EACAT,QAAeT,cAAO;IACpBU,KAAYH,cAAOF,YAAY;MAC7BP,aAAa;IACf,CAAA;IACAQ,MAAaU,gBAAgBT,aAAM,EAAEF,YAAY;MAC/CP,aAAa;IACf,CAAA;EACF,CAAA;EACAa,UAAU;IAACC,SAASC;;AACtB,CAAA;AAEO,IAAMM,QAAQ1B,UAAUC,KAAK;EAClCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBU,KAAYM,gBACHT,cAAOF,YAAY;MACxBP,aAAa;IACf,CAAA,CAAA;IAEFsB,KAAYJ,gBACHT,cAAOF,YAAY;MACxBP,aAAa;IACf,CAAA,CAAA;EAEJ,CAAA;EACAW,QAAeT,cAAO;IACpBqB,OAAcd;EAChB,CAAA;AACF,CAAA;",
6
+ "names": ["Schema", "Operation", "Database", "GameRef", "Move", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "game", "GameRef", "Chess", "State", "annotations", "move", "String", "examples", "output", "pgn", "services", "Database", "Service", "Play", "side", "optional", "Literal", "defaultValue", "Print", "fen", "ascii"]
7
+ }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ import {
2
+ Move,
3
+ Play,
4
+ Print
5
+ } from "./chunk-BCTL5GYK.mjs";
6
+ import {
7
+ __export
8
+ } from "./chunk-J5LGTIGS.mjs";
9
+
10
+ // src/operations/index.ts
11
+ var operations_exports = {};
12
+ __export(operations_exports, {
13
+ ChessHandlers: () => ChessHandlers,
14
+ Move: () => Move,
15
+ Play: () => Play,
16
+ Print: () => Print
17
+ });
18
+ import { OperationHandlerSet } from "@dxos/compute";
19
+ var Handlers = OperationHandlerSet.lazy(() => import("./move-BH3WZUJH.mjs"), () => import("./play-IM4BDFSY.mjs"), () => import("./print-M3ZO2XZT.mjs"));
20
+ var ChessHandlers = Handlers;
21
+
22
+ export {
23
+ ChessHandlers,
24
+ operations_exports
25
+ };
26
+ //# sourceMappingURL=chunk-ORLWKOYE.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nconst Handlers = OperationHandlerSet.lazy(\n () => import('./move'),\n () => import('./play'),\n () => import('./print'),\n);\n\nexport { Move, Play, Print } from './definitions';\n\nexport const ChessHandlers = Handlers;\n"],
5
+ "mappings": ";;;;;;;;;;AAAA;;;;;;;AAIA,SAASA,2BAA2B;AAEpC,IAAMC,WAAWD,oBAAoBE,KACnC,MAAM,OAAO,qBAAA,GACb,MAAM,OAAO,qBAAA,GACb,MAAM,OAAO,sBAAA,CAAA;AAKR,IAAMC,gBAAgBF;",
6
+ "names": ["OperationHandlerSet", "Handlers", "lazy", "ChessHandlers"]
7
+ }
@@ -0,0 +1,35 @@
1
+ // src/blueprints/chess-blueprint.ts
2
+ import { Blueprint, Template } from "@dxos/compute";
3
+ import { trim } from "@dxos/util";
4
+ import { Move, Play, Print } from "#operations";
5
+ import { Chess } from "#types";
6
+ var operations = [
7
+ Move,
8
+ Play,
9
+ Print
10
+ ];
11
+ var make = () => Blueprint.make({
12
+ key: Chess.BLUEPRINT_KEY,
13
+ name: "Chess",
14
+ tools: Blueprint.toolDefinitions({
15
+ operations
16
+ }),
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
+ var blueprint = {
27
+ key: Chess.BLUEPRINT_KEY,
28
+ make
29
+ };
30
+ var chess_blueprint_default = blueprint;
31
+
32
+ export {
33
+ chess_blueprint_default
34
+ };
35
+ //# sourceMappingURL=chunk-YER5TC5N.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/chess-blueprint.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Blueprint, Template } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nimport { Move, Play, Print } from '#operations';\nimport { Chess } from '#types';\n\nconst operations = [Move, Play, Print];\n\nconst make = () =>\n Blueprint.make({\n key: Chess.BLUEPRINT_KEY,\n name: 'Chess',\n tools: Blueprint.toolDefinitions({ operations }),\n instructions: Template.make({\n source: trim`\n You are an expert chess player.\n To analyze a game you can access the \"pgn\" property by loading the context object that represents the current game.\n You could suggest a good next move or offer to play a move.\n Don't actually make a move unless you are asked to.\n `,\n }),\n });\n\nconst blueprint: Blueprint.Definition = {\n key: Chess.BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n"],
5
+ "mappings": ";AAIA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;AAErB,SAASC,MAAMC,MAAMC,aAAa;AAClC,SAASC,aAAa;AAEtB,IAAMC,aAAa;EAACJ;EAAMC;EAAMC;;AAEhC,IAAMG,OAAO,MACXR,UAAUQ,KAAK;EACbC,KAAKH,MAAMI;EACXC,MAAM;EACNC,OAAOZ,UAAUa,gBAAgB;IAAEN;EAAW,CAAA;EAC9CO,cAAcb,SAASO,KAAK;IAC1BO,QAAQb;;;;;;EAMV,CAAA;AACF,CAAA;AAEF,IAAMc,YAAkC;EACtCP,KAAKH,MAAMI;EACXF;AACF;AAEA,IAAA,0BAAeQ;",
6
+ "names": ["Blueprint", "Template", "trim", "Move", "Play", "Print", "Chess", "operations", "make", "key", "BLUEPRINT_KEY", "name", "tools", "toolDefinitions", "instructions", "source", "blueprint"]
7
+ }
@@ -1,97 +1,42 @@
1
1
  import {
2
- ChessContainer
3
- } from "./chunk-5QBQW62M.mjs";
2
+ chess_blueprint_default
3
+ } from "./chunk-YER5TC5N.mjs";
4
4
  import {
5
- CHESS_PLUGIN,
6
- ChessAction,
7
- ChessType,
8
- meta
9
- } from "./chunk-KA3H3Z76.mjs";
5
+ operations_exports
6
+ } from "./chunk-ORLWKOYE.mjs";
7
+ import "./chunk-BCTL5GYK.mjs";
10
8
  import {
11
- ChessComponent
12
- } from "./chunk-6XPI4FTK.mjs";
13
-
14
- // packages/plugins/plugin-chess/src/capabilities/index.ts
15
- import { lazy } from "@dxos/app-framework";
16
- var ArtifactDefinition = lazy(() => import("./artifact-definition-NLIDMZ42.mjs"));
17
- var IntentResolver = lazy(() => import("./intent-resolver-65W3KVTW.mjs"));
18
- var ReactSurface = lazy(() => import("./react-surface-GYE5E74A.mjs"));
9
+ Chess_exports
10
+ } from "./chunk-5FHUZILG.mjs";
11
+ import "./chunk-J5LGTIGS.mjs";
19
12
 
20
- // packages/plugins/plugin-chess/src/ChessPlugin.tsx
21
- import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
22
- import { ClientEvents } from "@dxos/plugin-client";
23
- import { SpaceCapabilities } from "@dxos/plugin-space";
24
- import { defineObjectForm } from "@dxos/plugin-space/types";
13
+ // src/index.ts
14
+ import { Plugin } from "@dxos/app-framework";
25
15
 
26
- // packages/plugins/plugin-chess/src/translations.ts
27
- import { Type } from "@dxos/echo";
28
- var translations_default = [
29
- {
30
- "en-US": {
31
- [Type.getTypename(ChessType)]: {
32
- "typename label": "Game",
33
- "typename label_zero": "Games",
34
- "typename label_one": "Game",
35
- "typename label_other": "Games",
36
- "object name placeholder": "New game"
37
- },
38
- [CHESS_PLUGIN]: {
39
- "plugin name": "Chess",
40
- "delete game label": "Delete"
41
- }
42
- }
43
- }
44
- ];
16
+ // src/meta.ts
17
+ import { trim } from "@dxos/util";
18
+ var meta = {
19
+ id: "org.dxos.plugin.chess",
20
+ name: "Chess",
21
+ description: trim`
22
+ Full-featured chess game supporting multiplayer matches with friends or practice sessions against AI opponents.
23
+ Track game history and analyze moves in real-time.
24
+ `,
25
+ icon: "ph--shield-chevron--regular",
26
+ iconHue: "amber",
27
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess",
28
+ screenshots: [
29
+ "https://dxos.network/plugin-details-chess-dark.png"
30
+ ]
31
+ };
45
32
 
46
- // packages/plugins/plugin-chess/src/ChessPlugin.tsx
47
- var ChessPlugin = () => definePlugin(meta, [
48
- defineModule({
49
- id: `${meta.id}/module/translations`,
50
- activatesOn: Events.SetupTranslations,
51
- activate: () => contributes(Capabilities.Translations, translations_default)
52
- }),
53
- defineModule({
54
- id: `${meta.id}/module/metadata`,
55
- activatesOn: Events.SetupMetadata,
56
- activate: () => contributes(Capabilities.Metadata, {
57
- id: ChessType.typename,
58
- metadata: {
59
- icon: "ph--shield-chevron--regular"
60
- }
61
- })
62
- }),
63
- defineModule({
64
- id: `${meta.id}/module/object-form`,
65
- activatesOn: ClientEvents.SetupSchema,
66
- activate: () => contributes(SpaceCapabilities.ObjectForm, defineObjectForm({
67
- objectSchema: ChessType,
68
- getIntent: () => createIntent(ChessAction.Create)
69
- }))
70
- }),
71
- defineModule({
72
- id: `${meta.id}/module/react-surface`,
73
- activatesOn: Events.SetupReactSurface,
74
- activate: ReactSurface
75
- }),
76
- defineModule({
77
- id: `${meta.id}/module/intent-resolver`,
78
- activatesOn: Events.SetupIntentResolver,
79
- activate: IntentResolver
80
- }),
81
- defineModule({
82
- id: `${meta.id}/module/artifact-definition`,
83
- activatesOn: Events.SetupArtifactDefinition,
84
- activate: ArtifactDefinition
85
- })
86
- ]);
33
+ // src/index.ts
34
+ var ChessPlugin = Plugin.lazy(meta, () => import("#plugin"));
87
35
  export {
88
- ArtifactDefinition,
89
- CHESS_PLUGIN,
90
- ChessComponent,
91
- ChessContainer,
36
+ Chess_exports as Chess,
37
+ chess_blueprint_default as ChessBlueprint,
38
+ operations_exports as ChessFunctions,
92
39
  ChessPlugin,
93
- IntentResolver,
94
- ReactSurface,
95
40
  meta
96
41
  };
97
42
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/capabilities/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ArtifactDefinition = lazy(() => import('./artifact-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ChessType,\n getIntent: () => createIntent(ChessAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Type } from '@dxos/echo';\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [Type.getTypename(ChessType)]: {\n 'typename label': 'Game',\n 'typename label_zero': 'Games',\n 'typename label_one': 'Game',\n 'typename label_other': 'Games',\n 'object name placeholder': 'New game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,qBAAqBC,KAAK,MAAM,OAAO,oCAAA,CAAA;AAC7C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACHjC,SAASC,YAAY;AAKrB,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,KAAKC,YAAYC,SAAAA,CAAAA,GAAa;QAC7B,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;MAC7B;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,qBAAqB;MACvB;IACF;EACF;;;;ADVK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,UAAUC;MACdC,UAAU;QACRC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MACRC,YACEY,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcT;MACdU,WAAW,MAAMC,aAAaC,YAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;EACA3B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;CACD;",
6
- "names": ["lazy", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "Type", "Type", "getTypename", "ChessType", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChessType", "typename", "metadata", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "ArtifactDefinition"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport * from './blueprints';\nexport * from './meta';\nexport * from './types';\n\nexport const ChessPlugin = Plugin.lazy(meta, () => import('#plugin'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.chess',\n name: 'Chess',\n description: trim`\n Full-featured chess game supporting multiplayer matches with friends or practice sessions against AI opponents.\n Track game history and analyze moves in real-time.\n `,\n icon: 'ph--shield-chevron--regular',\n iconHue: 'amber',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n screenshots: ['https://dxos.network/plugin-details-chess-dark.png'],\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa;IAAC;;AAChB;;;ADNO,IAAMC,cAAcC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "screenshots", "ChessPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2033,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":3044,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":2702,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":554,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":19082,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2692,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":5508,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":9084,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3431,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":872,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3766,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1329,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":2169,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7256,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":754,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5094},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-NLIDMZ42.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-65W3KVTW.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-GYE5E74A.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1500},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":445}},"bytes":2822},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-NLIDMZ42.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8478},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-NLIDMZ42.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5956}},"bytes":6216},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-65W3KVTW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-65W3KVTW.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":503}},"bytes":743},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-S72CLKGK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6167},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-S72CLKGK.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":978},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2608}},"bytes":3948},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-GYE5E74A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1789},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-GYE5E74A.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":715}},"bytes":1077},"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-S72CLKGK.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3763},"packages/plugins/plugin-chess/dist/lib/browser/chunk-KA3H3Z76.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":586},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":553},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1991},"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2588},"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":1601}},"bytes":1742}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1964,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/chess-blueprint.ts":{"bytes":3127,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Chess.ts":{"bytes":6313,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":422,"imports":[{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"}],"format":"esm"},"src/operations/definitions.ts":{"bytes":7902,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-game/types","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/move.ts":{"bytes":3635,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-game/types","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/play.ts":{"bytes":4895,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-game/types","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/print.ts":{"bytes":2286,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/index.ts":{"bytes":1289,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/move.ts","kind":"dynamic-import","original":"./move"},{"path":"src/operations/play.ts","kind":"dynamic-import","original":"./play"},{"path":"src/operations/print.ts","kind":"dynamic-import","original":"./print"}],"format":"esm"},"src/blueprints/index.ts":{"bytes":700,"imports":[{"path":"src/blueprints/chess-blueprint.ts","kind":"import-statement","original":"./chess-blueprint"},{"path":"src/operations/index.ts","kind":"import-statement","original":"../operations"}],"format":"esm"},"src/index.ts":{"bytes":1105,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"./blueprints"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/translations.ts":{"bytes":3118,"imports":[{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1411},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YER5TC5N.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-ORLWKOYE.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["Chess","ChessBlueprint","ChessFunctions","ChessPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":108},"src/meta.ts":{"bytesInOutput":515}},"bytes":1098},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YER5TC5N.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-ORLWKOYE.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ChessBlueprint","ChessFunctions"],"entryPoint":"src/blueprints/index.ts","inputs":{},"bytes":356},"dist/lib/browser/chunk-YER5TC5N.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1579},"dist/lib/browser/chunk-YER5TC5N.mjs":{"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["chess_blueprint_default"],"inputs":{"src/blueprints/chess-blueprint.ts":{"bytesInOutput":808},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":928},"dist/lib/browser/operations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/operations/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-ORLWKOYE.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ChessHandlers","Move","Play","Print"],"entryPoint":"src/operations/index.ts","inputs":{},"bytes":274},"dist/lib/browser/chunk-ORLWKOYE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":660},"dist/lib/browser/chunk-ORLWKOYE.mjs":{"imports":[{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"dist/lib/browser/move-BH3WZUJH.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/play-IM4BDFSY.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/print-M3ZO2XZT.mjs","kind":"dynamic-import"}],"exports":["ChessHandlers","operations_exports"],"inputs":{"src/operations/index.ts":{"bytesInOutput":399}},"bytes":637},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1492},"dist/lib/browser/translations.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":805}},"bytes":929},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Chess"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":161},"dist/lib/browser/move-BH3WZUJH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1989},"dist/lib/browser/move-BH3WZUJH.mjs":{"imports":[{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-game/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/move.ts","inputs":{"src/operations/move.ts":{"bytesInOutput":738}},"bytes":980},"dist/lib/browser/play-IM4BDFSY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2662},"dist/lib/browser/play-IM4BDFSY.mjs":{"imports":[{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-game/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/play.ts","inputs":{"src/operations/play.ts":{"bytesInOutput":1039}},"bytes":1281},"dist/lib/browser/print-M3ZO2XZT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1248},"dist/lib/browser/print-M3ZO2XZT.mjs":{"imports":[{"path":"dist/lib/browser/chunk-BCTL5GYK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/print.ts","inputs":{"src/operations/print.ts":{"bytesInOutput":438}},"bytes":659},"dist/lib/browser/chunk-BCTL5GYK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3872},"dist/lib/browser/chunk-BCTL5GYK.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5FHUZILG.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-game/types","kind":"import-statement","external":true}],"exports":["Move","Play","Print"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":2089}},"bytes":2260},"dist/lib/browser/chunk-5FHUZILG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2949},"dist/lib/browser/chunk-5FHUZILG.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Chess_exports"],"inputs":{"src/types/Chess.ts":{"bytesInOutput":1747},"src/types/index.ts":{"bytesInOutput":0}},"bytes":1894},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
@@ -0,0 +1,39 @@
1
+ import {
2
+ Move
3
+ } from "./chunk-BCTL5GYK.mjs";
4
+ import {
5
+ Chess_exports
6
+ } from "./chunk-5FHUZILG.mjs";
7
+ import "./chunk-J5LGTIGS.mjs";
8
+
9
+ // src/operations/move.ts
10
+ import { Chess as ChessJS } from "chess.js";
11
+ import * as Effect from "effect/Effect";
12
+ import { Operation } from "@dxos/compute";
13
+ import { Obj } from "@dxos/echo";
14
+ import { loadGame } from "@dxos/plugin-game/types";
15
+ var handler = Move.pipe(Operation.withHandler(Effect.fn(function* ({ game, move }) {
16
+ const { variant } = yield* loadGame(game, Chess_exports.State);
17
+ const chess = new ChessJS();
18
+ if (variant.pgn) {
19
+ chess.loadPgn(variant.pgn);
20
+ } else if (variant.fen) {
21
+ chess.load(variant.fen);
22
+ }
23
+ chess.move(move, {
24
+ strict: false
25
+ });
26
+ const pgn = chess.pgn();
27
+ Obj.update(variant, (variant2) => {
28
+ const mutable = variant2;
29
+ mutable.pgn = pgn;
30
+ });
31
+ return {
32
+ pgn
33
+ };
34
+ })));
35
+ var move_default = handler;
36
+ export {
37
+ move_default as default
38
+ };
39
+ //# sourceMappingURL=move-BH3WZUJH.mjs.map