@dxos/plugin-chess 0.7.5-labs.a279d8c → 0.7.5-labs.a8b535d

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 (139) hide show
  1. package/dist/lib/browser/ChessContainer-XERPODLK.mjs +86 -0
  2. package/dist/lib/browser/ChessContainer-XERPODLK.mjs.map +7 -0
  3. package/dist/lib/browser/{artifact-YWAB5JJL.mjs → artifact-definition-D2SD45UX.mjs} +34 -28
  4. package/dist/lib/browser/artifact-definition-D2SD45UX.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-VYBCAEUF.mjs → chunk-NNA3W3LX.mjs} +8 -5
  6. package/dist/lib/browser/{chunk-VYBCAEUF.mjs.map → chunk-NNA3W3LX.mjs.map} +3 -3
  7. package/dist/lib/browser/chunk-R26FYVUS.mjs +8 -0
  8. package/dist/lib/browser/chunk-R26FYVUS.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-VRWXC5L2.mjs +42 -0
  10. package/dist/lib/browser/chunk-VRWXC5L2.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +25 -31
  12. package/dist/lib/browser/index.mjs.map +3 -3
  13. package/dist/lib/browser/{intent-resolver-UZRNSQFI.mjs → intent-resolver-KBIH2KYC.mjs} +16 -13
  14. package/dist/lib/browser/intent-resolver-KBIH2KYC.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-surface-EP4LXPH7.mjs → react-surface-2PI2KNSU.mjs} +7 -15
  17. package/dist/lib/browser/react-surface-2PI2KNSU.mjs.map +7 -0
  18. package/dist/lib/browser/types/index.mjs +1 -1
  19. package/dist/lib/node/ChessContainer-LEPLNICP.cjs +108 -0
  20. package/dist/lib/node/ChessContainer-LEPLNICP.cjs.map +7 -0
  21. package/dist/lib/node/{artifact-YWL3LBIO.cjs → artifact-definition-YDPYM4NV.cjs} +41 -36
  22. package/dist/lib/node/artifact-definition-YDPYM4NV.cjs.map +7 -0
  23. package/dist/lib/node/{ChessContainer-P4BZ62FN.cjs → chunk-CSRNUKOH.cjs} +38 -16
  24. package/dist/lib/node/chunk-CSRNUKOH.cjs.map +7 -0
  25. package/dist/lib/node/{chunk-6F6WTM5L.cjs → chunk-ITDMCBQQ.cjs} +5 -5
  26. package/dist/lib/node/chunk-ITDMCBQQ.cjs.map +7 -0
  27. package/dist/lib/node/{chunk-J5YKJRP3.cjs → chunk-VXYRI6VA.cjs} +9 -6
  28. package/dist/lib/node/{chunk-J5YKJRP3.cjs.map → chunk-VXYRI6VA.cjs.map} +3 -3
  29. package/dist/lib/node/index.cjs +36 -42
  30. package/dist/lib/node/index.cjs.map +3 -3
  31. package/dist/lib/node/{intent-resolver-AENA6D5K.cjs → intent-resolver-TZFKPQOV.cjs} +19 -16
  32. package/dist/lib/node/intent-resolver-TZFKPQOV.cjs.map +7 -0
  33. package/dist/lib/node/meta.json +1 -1
  34. package/dist/lib/node/{react-surface-JMOSMAIC.cjs → react-surface-OHQIPHSN.cjs} +13 -21
  35. package/dist/lib/node/react-surface-OHQIPHSN.cjs.map +7 -0
  36. package/dist/lib/node/types/index.cjs +5 -5
  37. package/dist/lib/node/types/index.cjs.map +1 -1
  38. package/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs +87 -0
  39. package/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs.map +7 -0
  40. package/dist/lib/node-esm/{artifact-B6IEF7U5.mjs → artifact-definition-LHQK5BBZ.mjs} +34 -28
  41. package/dist/lib/node-esm/artifact-definition-LHQK5BBZ.mjs.map +7 -0
  42. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs +44 -0
  43. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map +7 -0
  44. package/dist/lib/node-esm/{chunk-QXDXLFXD.mjs → chunk-B72CIN6T.mjs} +2 -2
  45. package/dist/lib/node-esm/chunk-B72CIN6T.mjs.map +7 -0
  46. package/dist/lib/node-esm/{chunk-TXUWVQWY.mjs → chunk-IP66EHSW.mjs} +8 -5
  47. package/dist/lib/node-esm/{chunk-TXUWVQWY.mjs.map → chunk-IP66EHSW.mjs.map} +3 -3
  48. package/dist/lib/node-esm/index.mjs +25 -31
  49. package/dist/lib/node-esm/index.mjs.map +3 -3
  50. package/dist/lib/node-esm/{intent-resolver-T7NNHOYR.mjs → intent-resolver-WBUS64KC.mjs} +16 -13
  51. package/dist/lib/node-esm/intent-resolver-WBUS64KC.mjs.map +7 -0
  52. package/dist/lib/node-esm/meta.json +1 -1
  53. package/dist/lib/node-esm/{react-surface-ENB7VY45.mjs → react-surface-XX4VFNRS.mjs} +7 -15
  54. package/dist/lib/node-esm/react-surface-XX4VFNRS.mjs.map +7 -0
  55. package/dist/lib/node-esm/types/index.mjs +1 -1
  56. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/{artifact.d.ts → artifact-definition.d.ts} +1 -1
  58. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
  59. package/dist/types/src/capabilities/index.d.ts +3 -3
  60. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  61. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  63. package/dist/types/src/components/ChessComponent.d.ts +5 -0
  64. package/dist/types/src/components/ChessComponent.d.ts.map +1 -0
  65. package/dist/types/src/components/ChessContainer.d.ts +4 -4
  66. package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
  67. package/dist/types/src/components/ChessPanel.d.ts +11 -0
  68. package/dist/types/src/components/ChessPanel.d.ts.map +1 -0
  69. package/dist/types/src/components/Chessboard.stories.d.ts +8 -0
  70. package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -0
  71. package/dist/types/src/components/PlayerSelector.d.ts +7 -0
  72. package/dist/types/src/components/PlayerSelector.d.ts.map +1 -0
  73. package/dist/types/src/components/index.d.ts +4 -4
  74. package/dist/types/src/components/index.d.ts.map +1 -1
  75. package/dist/types/src/meta.d.ts +1 -0
  76. package/dist/types/src/meta.d.ts.map +1 -1
  77. package/dist/types/src/types/schema.d.ts +1 -1
  78. package/dist/types/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +22 -24
  80. package/src/ChessPlugin.tsx +21 -21
  81. package/src/capabilities/{artifact.ts → artifact-definition.ts} +19 -13
  82. package/src/capabilities/index.ts +1 -1
  83. package/src/capabilities/intent-resolver.ts +10 -8
  84. package/src/capabilities/react-surface.tsx +3 -12
  85. package/src/components/ChessComponent.tsx +49 -0
  86. package/src/components/ChessContainer.tsx +14 -4
  87. package/src/components/ChessPanel.tsx +67 -0
  88. package/src/components/Chessboard.stories.tsx +39 -0
  89. package/src/components/{Chess.tsx → PlayerSelector.tsx} +2 -50
  90. package/src/components/index.ts +1 -2
  91. package/src/meta.ts +3 -1
  92. package/dist/lib/browser/ChessContainer-G736GS2V.mjs +0 -26
  93. package/dist/lib/browser/ChessContainer-G736GS2V.mjs.map +0 -7
  94. package/dist/lib/browser/artifact-YWAB5JJL.mjs.map +0 -7
  95. package/dist/lib/browser/chunk-JUAC2NNR.mjs +0 -548
  96. package/dist/lib/browser/chunk-JUAC2NNR.mjs.map +0 -7
  97. package/dist/lib/browser/chunk-LAYER2WV.mjs +0 -8
  98. package/dist/lib/browser/chunk-LAYER2WV.mjs.map +0 -7
  99. package/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map +0 -7
  100. package/dist/lib/browser/react-surface-EP4LXPH7.mjs.map +0 -7
  101. package/dist/lib/node/ChessContainer-P4BZ62FN.cjs.map +0 -7
  102. package/dist/lib/node/artifact-YWL3LBIO.cjs.map +0 -7
  103. package/dist/lib/node/chunk-6F6WTM5L.cjs.map +0 -7
  104. package/dist/lib/node/chunk-HPYER4GF.cjs +0 -574
  105. package/dist/lib/node/chunk-HPYER4GF.cjs.map +0 -7
  106. package/dist/lib/node/intent-resolver-AENA6D5K.cjs.map +0 -7
  107. package/dist/lib/node/react-surface-JMOSMAIC.cjs.map +0 -7
  108. package/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs +0 -27
  109. package/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs.map +0 -7
  110. package/dist/lib/node-esm/artifact-B6IEF7U5.mjs.map +0 -7
  111. package/dist/lib/node-esm/chunk-OMGVSBVI.mjs +0 -550
  112. package/dist/lib/node-esm/chunk-OMGVSBVI.mjs.map +0 -7
  113. package/dist/lib/node-esm/chunk-QXDXLFXD.mjs.map +0 -7
  114. package/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs.map +0 -7
  115. package/dist/lib/node-esm/react-surface-ENB7VY45.mjs.map +0 -7
  116. package/dist/types/src/capabilities/artifact.d.ts.map +0 -1
  117. package/dist/types/src/components/Chess.d.ts +0 -9
  118. package/dist/types/src/components/Chess.d.ts.map +0 -1
  119. package/dist/types/src/components/Chessboard/Chessboard.d.ts +0 -37
  120. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +0 -1
  121. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +0 -24
  122. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +0 -1
  123. package/dist/types/src/components/Chessboard/index.d.ts +0 -2
  124. package/dist/types/src/components/Chessboard/index.d.ts.map +0 -1
  125. package/dist/types/src/components/Chessboard/pieces/custom.d.ts +0 -3
  126. package/dist/types/src/components/Chessboard/pieces/custom.d.ts.map +0 -1
  127. package/dist/types/src/components/Chessboard/pieces/index.d.ts +0 -4
  128. package/dist/types/src/components/Chessboard/pieces/index.d.ts.map +0 -1
  129. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts +0 -3
  130. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts.map +0 -1
  131. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts +0 -3
  132. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts.map +0 -1
  133. package/src/components/Chessboard/Chessboard.stories.tsx +0 -56
  134. package/src/components/Chessboard/Chessboard.tsx +0 -182
  135. package/src/components/Chessboard/index.ts +0 -5
  136. package/src/components/Chessboard/pieces/custom.tsx +0 -82
  137. package/src/components/Chessboard/pieces/index.ts +0 -7
  138. package/src/components/Chessboard/pieces/phosphor.tsx +0 -71
  139. package/src/components/Chessboard/pieces/riohacha.tsx +0 -166
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":1411,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","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":586,"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.ts":{"bytes":17413,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","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-schema","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/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2531,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","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/Chessboard/pieces/custom.tsx":{"bytes":32344,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytes":6674,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytes":30948,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytes":704,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx","kind":"import-statement","original":"./custom"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx","kind":"import-statement","original":"./phosphor"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx","kind":"import-statement","original":"./riohacha"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytes":18372,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-dnd-html5-backend","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts","kind":"import-statement","original":"./pieces"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytes":529,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytes":14324,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","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},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":2405,"imports":[{"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/Chess.tsx","kind":"import-statement","original":"./Chess"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":977,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chess.tsx","kind":"import-statement","original":"./Chess"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"},{"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":4798,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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/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":1296,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact.ts","kind":"dynamic-import","original":"./artifact"},{"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":1825,"imports":[{"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":7326,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","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":790,"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":4729},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["Artifact","CHESS_PLUGIN","Chess","ChessContainer","ChessPanel","ChessPieces","ChessPlugin","Chessboard","IntentResolver","ReactSurface","boardStyles","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":252},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1474},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2743},"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-VYBCAEUF.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-YWAB5JJL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7574},"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","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-schema","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.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytesInOutput":5454}},"bytes":5673},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1277},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","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":464}},"bytes":704},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1207},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":491}},"bytes":708},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2316},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":956}},"bytes":1314},"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":424},"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.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-VYBCAEUF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3470},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":247}},"bytes":1700},"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":48772},"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-dnd-html5-backend","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","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":["Chess","ChessPanel","ChessPieces","Chessboard","boardStyles"],"inputs":{"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":4712},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx":{"bytesInOutput":12536},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytesInOutput":1678},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytesInOutput":11516},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytesInOutput":4053},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":35074}}}
1
+ {"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","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":586,"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":18402,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","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-schema","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":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","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":4522,"imports":[{"path":"chess.js","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-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"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":3335,"imports":[{"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":908,"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":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":1365,"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":1825,"imports":[{"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":7895,"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":790,"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":5064},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-D2SD45UX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.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}],"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":1623},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2825},"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-NNA3W3LX.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-D2SD45UX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8015},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-D2SD45UX.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","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-schema","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":5714}},"bytes":5974},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","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":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"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":"@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":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.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-NNA3W3LX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3767},"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1966},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs":{"imports":[{"path":"chess.js","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-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":990}},"bytes":1131}}}
@@ -1,17 +1,16 @@
1
1
  import {
2
2
  ChessContainer
3
- } from "./chunk-LAYER2WV.mjs";
3
+ } from "./chunk-R26FYVUS.mjs";
4
4
  import {
5
5
  CHESS_PLUGIN,
6
6
  ChessType,
7
7
  isObject
8
- } from "./chunk-VYBCAEUF.mjs";
8
+ } from "./chunk-NNA3W3LX.mjs";
9
9
  import {
10
- Chessboard
11
- } from "./chunk-JUAC2NNR.mjs";
10
+ ChessComponent
11
+ } from "./chunk-VRWXC5L2.mjs";
12
12
 
13
13
  // packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
14
- import { Chess } from "chess.js";
15
14
  import React from "react";
16
15
  import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
17
16
  import { isInstanceOf } from "@dxos/echo-schema";
@@ -32,19 +31,12 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
32
31
  id: "plugin-chess",
33
32
  role: "canvas-node",
34
33
  filter: (data) => isInstanceOf(ChessType, data),
35
- component: ({ data }) => /* @__PURE__ */ React.createElement(Chessboard, {
36
- model: {
37
- chess: new Chess(data.fen)
38
- },
39
- onUpdate: (move) => {
40
- const board = new Chess(data.fen);
41
- board.move(move);
42
- data.value = board.fen();
43
- }
34
+ component: ({ data }) => /* @__PURE__ */ React.createElement(ChessComponent, {
35
+ game: data
44
36
  })
45
37
  })
46
38
  ]);
47
39
  export {
48
40
  react_surface_default as default
49
41
  };
50
- //# sourceMappingURL=react-surface-EP4LXPH7.mjs.map
42
+ //# sourceMappingURL=react-surface-2PI2KNSU.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\n\nimport { ChessContainer } from '../components';\nimport { ChessComponent } from '../components/ChessComponent';\nimport { CHESS_PLUGIN } from '../meta';\nimport { ChessType, isObject } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: CHESS_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: ChessType } => isObject(data.subject),\n component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,\n }),\n createSurface({\n id: 'plugin-chess',\n role: 'canvas-node',\n filter: (data): data is any => isInstanceOf(ChessType, data),\n component: ({ data }) => <ChessComponent game={data} />,\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,oBAAoB;AAO7B,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC;IACJC,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAAyCC,SAASD,KAAKE,OAAO;IACvEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,sBAAA,cAACM,gBAAAA;MAAeC,MAAML,KAAKE;MAASJ;;EACrE,CAAA;EACAH,cAAc;IACZC,IAAI;IACJE,MAAM;IACNC,QAAQ,CAACC,SAAsBM,aAAaC,WAAWP,IAAAA;IACvDG,WAAW,CAAC,EAAEH,KAAI,MAAO,sBAAA,cAACQ,gBAAAA;MAAeH,MAAML;;EACjD,CAAA;CACD;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "isInstanceOf", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game", "isInstanceOf", "ChessType", "ChessComponent"]
7
+ }
@@ -3,7 +3,7 @@ import {
3
3
  ChessType,
4
4
  MoveSchema,
5
5
  isObject
6
- } from "../chunk-VYBCAEUF.mjs";
6
+ } from "../chunk-NNA3W3LX.mjs";
7
7
  export {
8
8
  ChessAction,
9
9
  ChessType,
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var ChessContainer_LEPLNICP_exports = {};
30
+ __export(ChessContainer_LEPLNICP_exports, {
31
+ default: () => ChessContainer_default
32
+ });
33
+ module.exports = __toCommonJS(ChessContainer_LEPLNICP_exports);
34
+ var import_chunk_CSRNUKOH = require("./chunk-CSRNUKOH.cjs");
35
+ var import_react = __toESM(require("react"));
36
+ var import_echo = require("@dxos/react-client/echo");
37
+ var import_react_ui_stack = require("@dxos/react-ui-stack");
38
+ var import_react2 = require("@phosphor-icons/react");
39
+ var import_react3 = __toESM(require("react"));
40
+ var import_display_name = require("@dxos/display-name");
41
+ var import_echo2 = require("@dxos/react-client/echo");
42
+ var import_react_ui = require("@dxos/react-ui");
43
+ var import_react_ui_theme = require("@dxos/react-ui-theme");
44
+ var PlayerSelector = ({ space, game }) => {
45
+ const members = (0, import_echo2.useMembers)(space.key);
46
+ return /* @__PURE__ */ import_react3.default.createElement("div", {
47
+ role: "none",
48
+ className: "grid grid-cols-2 gap-8"
49
+ }, /* @__PURE__ */ import_react3.default.createElement("div", {
50
+ role: "none",
51
+ className: "flex flex-row-reverse items-center gap-2"
52
+ }, /* @__PURE__ */ import_react3.default.createElement(PlayerSelect, {
53
+ side: "white",
54
+ value: game.playerWhite,
55
+ onValueChange: (player) => game.playerWhite = player,
56
+ members
57
+ })), /* @__PURE__ */ import_react3.default.createElement("div", {
58
+ role: "none",
59
+ className: "flex flex-row items-center gap-2"
60
+ }, /* @__PURE__ */ import_react3.default.createElement(PlayerSelect, {
61
+ side: "black",
62
+ value: game.playerBlack,
63
+ onValueChange: (player) => game.playerBlack = player,
64
+ members
65
+ })));
66
+ };
67
+ var PlayerSelect = ({ side, value, onValueChange, members }) => {
68
+ const { themeMode } = (0, import_react_ui.useThemeContext)();
69
+ const iconFillMode = side === "black" && themeMode === "light" || side === "white" && themeMode === "dark" ? "fill" : void 0;
70
+ return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Root, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Label, null, /* @__PURE__ */ import_react3.default.createElement(import_react2.CrownCross, {
71
+ className: (0, import_react_ui_theme.mx)((0, import_react_ui_theme.getSize)(6)),
72
+ weight: iconFillMode,
73
+ "aria-label": `Chess icon for side ${side}`
74
+ })), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Root, {
75
+ value,
76
+ onValueChange
77
+ }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.TriggerButton, {
78
+ placeholder: "Select player"
79
+ }), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Portal, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Content, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Viewport, null, members.map((member) => {
80
+ const memberKey = member.identity.identityKey.toHex();
81
+ const displayName = member.identity?.profile?.displayName || (0, import_display_name.generateName)(memberKey);
82
+ return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Option, {
83
+ key: memberKey,
84
+ value: memberKey
85
+ }, displayName);
86
+ }))))));
87
+ };
88
+ var ChessContainer = ({ game }) => {
89
+ const space = (0, import_echo.getSpace)(game);
90
+ if (!space) {
91
+ return null;
92
+ }
93
+ return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
94
+ toolbar: false
95
+ }, /* @__PURE__ */ import_react.default.createElement("div", {
96
+ role: "none",
97
+ className: "grid grid-rows-[60px_1fr_60px] grow overflow-hidden"
98
+ }, /* @__PURE__ */ import_react.default.createElement("div", null), /* @__PURE__ */ import_react.default.createElement("div", {
99
+ className: "flex m-4 overflow-hidden"
100
+ }, /* @__PURE__ */ import_react.default.createElement(import_chunk_CSRNUKOH.ChessComponent, {
101
+ game
102
+ })), /* @__PURE__ */ import_react.default.createElement(PlayerSelector, {
103
+ space,
104
+ game
105
+ })));
106
+ };
107
+ var ChessContainer_default = ChessContainer;
108
+ //# sourceMappingURL=ChessContainer-LEPLNICP.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ChessContainer.tsx", "../../../src/components/PlayerSelector.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { ChessComponent } from './ChessComponent';\nimport { PlayerSelector } from './PlayerSelector';\nimport { type ChessType } from '../types';\n\nconst ChessContainer = ({ game }: { game: ChessType; role?: string }) => {\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n return (\n <StackItem.Content toolbar={false}>\n <div role='none' className='grid grid-rows-[60px_1fr_60px] grow overflow-hidden'>\n <div />\n\n <div className='flex m-4 overflow-hidden'>\n <ChessComponent game={game} />\n </div>\n\n <PlayerSelector space={space} game={game} />\n </div>\n </StackItem.Content>\n );\n};\n\nexport default ChessContainer;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { CrownCross } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { generateName } from '@dxos/display-name';\nimport { useMembers, type Space, type SpaceMember } from '@dxos/react-client/echo';\nimport { Input, Select, useThemeContext } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { type ChessType } from '../types';\n\nexport const PlayerSelector = ({ space, game }: { space: Space; game: ChessType }) => {\n const members = useMembers(space.key);\n\n return (\n <div role='none' className='grid grid-cols-2 gap-8'>\n <div role='none' className='flex flex-row-reverse items-center gap-2'>\n <PlayerSelect\n side='white'\n value={game.playerWhite}\n onValueChange={(player) => (game.playerWhite = player)}\n members={members}\n />\n </div>\n <div role='none' className='flex flex-row items-center gap-2'>\n <PlayerSelect\n side='black'\n value={game.playerBlack}\n onValueChange={(player) => (game.playerBlack = player)}\n members={members}\n />\n </div>\n </div>\n );\n};\n\nconst PlayerSelect = ({\n side,\n value,\n onValueChange,\n members,\n}: {\n side: 'white' | 'black';\n value: string | undefined;\n onValueChange: (player: string) => void;\n members: SpaceMember[];\n}) => {\n const { themeMode } = useThemeContext();\n const iconFillMode =\n (side === 'black' && themeMode === 'light') || (side === 'white' && themeMode === 'dark') ? 'fill' : undefined;\n\n return (\n <Input.Root>\n <Input.Label>\n <CrownCross className={mx(getSize(6))} weight={iconFillMode} aria-label={`Chess icon for side ${side}`} />\n </Input.Label>\n <Select.Root value={value} onValueChange={onValueChange}>\n <Select.TriggerButton placeholder={'Select player'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {members.map((member) => {\n const memberKey = member.identity.identityKey.toHex();\n const displayName = member.identity?.profile?.displayName || generateName(memberKey);\n return (\n <Select.Option key={memberKey} value={memberKey}>\n {displayName}\n </Select.Option>\n );\n })}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Input.Root>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,kBAAyB;AACzB,4BAA0B;ACH1B,IAAAA,gBAA2B;AAC3B,IAAAA,gBAAkB;AAElB,0BAA6B;AAC7B,IAAAC,eAAyD;AACzD,sBAA+C;AAC/C,4BAA4B;AAIrB,IAAMC,iBAAiB,CAAC,EAAEC,OAAOC,KAAI,MAAqC;AAC/E,QAAMC,cAAUC,yBAAWH,MAAMI,GAAG;AAEpC,SACE,8BAAAC,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,8BAAAH,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,8BAAAH,QAAA,cAACI,cAAAA;IACCC,MAAK;IACLC,OAAOV,KAAKW;IACZC,eAAe,CAACC,WAAYb,KAAKW,cAAcE;IAC/CZ;OAGJ,8BAAAG,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,8BAAAH,QAAA,cAACI,cAAAA;IACCC,MAAK;IACLC,OAAOV,KAAKc;IACZF,eAAe,CAACC,WAAYb,KAAKc,cAAcD;IAC/CZ;;AAKV;AAEA,IAAMO,eAAe,CAAC,EACpBC,MACAC,OACAE,eACAX,QAAO,MAMR;AACC,QAAM,EAAEc,UAAS,QAAKC,iCAAAA;AACtB,QAAMC,eACHR,SAAS,WAAWM,cAAc,WAAaN,SAAS,WAAWM,cAAc,SAAU,SAASG;AAEvG,SACE,8BAAAd,QAAA,cAACe,sBAAMC,MAAI,MACT,8BAAAhB,QAAA,cAACe,sBAAME,OAAK,MACV,8BAAAjB,QAAA,cAACkB,0BAAAA;IAAWf,eAAWgB,8BAAGC,+BAAQ,CAAA,CAAA;IAAKC,QAAQR;IAAcS,cAAY,uBAAuBjB,IAAAA;OAElG,8BAAAL,QAAA,cAACuB,uBAAOP,MAAI;IAACV;IAAcE;KACzB,8BAAAR,QAAA,cAACuB,uBAAOC,eAAa;IAACC,aAAa;MACnC,8BAAAzB,QAAA,cAACuB,uBAAOG,QAAM,MACZ,8BAAA1B,QAAA,cAACuB,uBAAOI,SAAO,MACb,8BAAA3B,QAAA,cAACuB,uBAAOK,UAAQ,MACb/B,QAAQgC,IAAI,CAACC,WAAAA;AACZ,UAAMC,YAAYD,OAAOE,SAASC,YAAYC,MAAK;AACnD,UAAMC,cAAcL,OAAOE,UAAUI,SAASD,mBAAeE,kCAAaN,SAAAA;AAC1E,WACE,8BAAA/B,QAAA,cAACuB,uBAAOe,QAAM;MAACvC,KAAKgC;MAAWzB,OAAOyB;OACnCI,WAAAA;EAGP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAOd;ADlEA,IAAMI,iBAAiB,CAAC,EAAE3C,KAAI,MAAsC;AAClE,QAAMD,YAAQ6C,sBAAS5C,IAAAA;AACvB,MAAI,CAACD,OAAO;AACV,WAAO;EACT;AAEA,SACEK,6BAAAA,QAAA,cAACyC,gCAAUd,SAAO;IAACe,SAAS;KAC1B1C,6BAAAA,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzBH,6BAAAA,QAAA,cAACC,OAAAA,IAAAA,GAEDD,6BAAAA,QAAA,cAACC,OAAAA;IAAIE,WAAU;KACbH,6BAAAA,QAAA,cAAC2C,sCAAAA;IAAe/C;OAGlBI,6BAAAA,QAAA,cAACN,gBAAAA;IAAeC;IAAcC;;AAItC;AAEA,IAAA,yBAAe2C;",
6
+ "names": ["import_react", "import_echo", "PlayerSelector", "space", "game", "members", "useMembers", "key", "React", "div", "role", "className", "PlayerSelect", "side", "value", "playerWhite", "onValueChange", "player", "playerBlack", "themeMode", "useThemeContext", "iconFillMode", "undefined", "Input", "Root", "Label", "CrownCross", "mx", "getSize", "weight", "aria-label", "Select", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "map", "member", "memberKey", "identity", "identityKey", "toHex", "displayName", "profile", "generateName", "Option", "ChessContainer", "getSpace", "StackItem", "toolbar", "ChessComponent"]
7
+ }
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var artifact_YWL3LBIO_exports = {};
20
- __export(artifact_YWL3LBIO_exports, {
21
- default: () => artifact_default
19
+ var artifact_definition_YDPYM4NV_exports = {};
20
+ __export(artifact_definition_YDPYM4NV_exports, {
21
+ default: () => artifact_definition_default
22
22
  });
23
- module.exports = __toCommonJS(artifact_YWL3LBIO_exports);
24
- var import_chunk_J5YKJRP3 = require("./chunk-J5YKJRP3.cjs");
23
+ module.exports = __toCommonJS(artifact_definition_YDPYM4NV_exports);
24
+ var import_chunk_VXYRI6VA = require("./chunk-VXYRI6VA.cjs");
25
25
  var import_chess = require("chess.js");
26
26
  var import_effect = require("effect");
27
27
  var import_app_framework = require("@dxos/app-framework");
@@ -31,19 +31,21 @@ var import_echo_schema = require("@dxos/echo-schema");
31
31
  var import_invariant = require("@dxos/invariant");
32
32
  var import_types = require("@dxos/plugin-space/types");
33
33
  var import_echo = require("@dxos/react-client/echo");
34
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact.ts";
35
- var artifact_default = () => {
34
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts";
35
+ var artifact_definition_default = () => {
36
36
  const definition = (0, import_artifact.defineArtifact)({
37
- id: "plugin-chess",
37
+ id: import_chunk_VXYRI6VA.meta.id,
38
+ name: import_chunk_VXYRI6VA.meta.name,
39
+ description: "Provides a simple chess engine.",
38
40
  instructions: `
39
- Chess:
40
- - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.
41
- `,
42
- schema: import_chunk_J5YKJRP3.ChessType,
41
+ - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.
42
+ `,
43
+ schema: import_chunk_VXYRI6VA.ChessType,
43
44
  tools: [
44
- (0, import_artifact.defineTool)({
45
- name: "chess_new",
46
- description: "Create a new chess game. Returns the artifact definition for the game",
45
+ (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
46
+ name: "create",
47
+ description: "Create a new chess game. Returns the artifact definition for the game.",
48
+ caption: "Creating chess game...",
47
49
  schema: import_echo_schema.S.Struct({
48
50
  fen: import_echo_schema.S.String.annotations({
49
51
  description: "The state of the chess game in the FEN format."
@@ -52,7 +54,7 @@ var artifact_default = () => {
52
54
  execute: async ({ fen }, { extensions }) => {
53
55
  (0, import_invariant.invariant)(extensions?.space, "No space", {
54
56
  F: __dxlog_file,
55
- L: 42,
57
+ L: 45,
56
58
  S: void 0,
57
59
  A: [
58
60
  "extensions?.space",
@@ -61,14 +63,14 @@ var artifact_default = () => {
61
63
  });
62
64
  (0, import_invariant.invariant)(extensions?.dispatch, "No intent dispatcher", {
63
65
  F: __dxlog_file,
64
- L: 43,
66
+ L: 46,
65
67
  S: void 0,
66
68
  A: [
67
69
  "extensions?.dispatch",
68
70
  "'No intent dispatcher'"
69
71
  ]
70
72
  });
71
- const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(import_chunk_J5YKJRP3.ChessAction.Create, {
73
+ const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(import_chunk_VXYRI6VA.ChessAction.Create, {
72
74
  fen
73
75
  }), (0, import_app_framework.chain)(import_types.SpaceAction.AddObject, {
74
76
  target: extensions.space
@@ -80,24 +82,25 @@ var artifact_default = () => {
80
82
  return import_artifact.ToolResult.Success((0, import_assistant.createArtifactElement)(data.id));
81
83
  }
82
84
  }),
83
- (0, import_artifact.defineTool)({
84
- name: "chess_query",
85
+ (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
86
+ name: "list",
85
87
  description: "Query all active chess games.",
88
+ caption: "Getting games...",
86
89
  schema: import_echo_schema.S.Struct({}),
87
90
  execute: async (_, { extensions }) => {
88
91
  (0, import_invariant.invariant)(extensions?.space, "No space", {
89
92
  F: __dxlog_file,
90
- L: 61,
93
+ L: 65,
91
94
  S: void 0,
92
95
  A: [
93
96
  "extensions?.space",
94
97
  "'No space'"
95
98
  ]
96
99
  });
97
- const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_J5YKJRP3.ChessType)).run();
100
+ const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
98
101
  (0, import_invariant.invariant)(games.length > 0, "No chess games found", {
99
102
  F: __dxlog_file,
100
- L: 63,
103
+ L: 67,
101
104
  S: void 0,
102
105
  A: [
103
106
  "games.length > 0",
@@ -107,27 +110,28 @@ var artifact_default = () => {
107
110
  return import_artifact.ToolResult.Success(games);
108
111
  }
109
112
  }),
110
- (0, import_artifact.defineTool)({
111
- name: "chess_inspect",
113
+ (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
114
+ name: "inspect",
112
115
  description: "Get the current state of the chess game.",
116
+ caption: "Inspecting game...",
113
117
  schema: import_echo_schema.S.Struct({
114
118
  id: import_echo_schema.ObjectId
115
119
  }),
116
120
  execute: async ({ id }, { extensions }) => {
117
121
  (0, import_invariant.invariant)(extensions?.space, "No space", {
118
122
  F: __dxlog_file,
119
- L: 72,
123
+ L: 77,
120
124
  S: void 0,
121
125
  A: [
122
126
  "extensions?.space",
123
127
  "'No space'"
124
128
  ]
125
129
  });
126
- const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_J5YKJRP3.ChessType)).run();
130
+ const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
127
131
  const game = games.find((game2) => game2.id === id);
128
- (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_J5YKJRP3.ChessType, game), void 0, {
132
+ (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_VXYRI6VA.ChessType, game), void 0, {
129
133
  F: __dxlog_file,
130
- L: 75,
134
+ L: 80,
131
135
  S: void 0,
132
136
  A: [
133
137
  "isInstanceOf(ChessType, game)",
@@ -137,9 +141,10 @@ var artifact_default = () => {
137
141
  return import_artifact.ToolResult.Success(game.fen);
138
142
  }
139
143
  }),
140
- (0, import_artifact.defineTool)({
141
- name: "chess_move",
144
+ (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
145
+ name: "move",
142
146
  description: "Make a move in the chess game.",
147
+ caption: "Making chess move...",
143
148
  schema: import_echo_schema.S.Struct({
144
149
  id: import_echo_schema.ObjectId,
145
150
  move: import_echo_schema.S.String.annotations({
@@ -153,18 +158,18 @@ var artifact_default = () => {
153
158
  execute: async ({ id, move }, { extensions }) => {
154
159
  (0, import_invariant.invariant)(extensions?.space, "No space", {
155
160
  F: __dxlog_file,
156
- L: 90,
161
+ L: 96,
157
162
  S: void 0,
158
163
  A: [
159
164
  "extensions?.space",
160
165
  "'No space'"
161
166
  ]
162
167
  });
163
- const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_J5YKJRP3.ChessType)).run();
168
+ const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
164
169
  const game = games.find((game2) => game2.id === id);
165
- (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_J5YKJRP3.ChessType, game), void 0, {
170
+ (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_VXYRI6VA.ChessType, game), void 0, {
166
171
  F: __dxlog_file,
167
- L: 93,
172
+ L: 99,
168
173
  S: void 0,
169
174
  A: [
170
175
  "isInstanceOf(ChessType, game)",
@@ -186,4 +191,4 @@ var artifact_default = () => {
186
191
  });
187
192
  return (0, import_app_framework.contributes)(import_app_framework.Capabilities.ArtifactDefinition, definition);
188
193
  };
189
- //# sourceMappingURL=artifact-YWL3LBIO.cjs.map
194
+ //# sourceMappingURL=artifact-definition-YDPYM4NV.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/artifact-definition.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport { pipe } from 'effect';\n\nimport { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';\nimport { defineArtifact, defineTool, ToolResult } from '@dxos/artifact';\nimport { createArtifactElement } from '@dxos/assistant';\nimport { isInstanceOf, ObjectId, S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter, type Space } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\nimport { ChessAction, ChessType } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n space?: Space;\n dispatch?: PromiseIntentDispatcher;\n }\n}\n\nexport default () => {\n const definition = defineArtifact({\n id: meta.id,\n name: meta.name,\n description: 'Provides a simple chess engine.',\n instructions: `\n - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.\n `,\n schema: ChessType,\n tools: [\n defineTool(meta.id, {\n name: 'create',\n description: 'Create a new chess game. Returns the artifact definition for the game.',\n caption: 'Creating chess game...',\n schema: S.Struct({\n fen: S.String.annotations({ description: 'The state of the chess game in the FEN format.' }),\n }),\n execute: async ({ fen }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n invariant(extensions?.dispatch, 'No intent dispatcher');\n const intent = pipe(\n createIntent(ChessAction.Create, { fen }),\n chain(SpaceAction.AddObject, { target: extensions.space }),\n );\n const { data, error } = await extensions.dispatch(intent);\n if (!data || error) {\n return ToolResult.Error(error?.message ?? 'Failed to create chess game');\n }\n\n return ToolResult.Success(createArtifactElement(data.id));\n },\n }),\n defineTool(meta.id, {\n name: 'list',\n description: 'Query all active chess games.',\n caption: 'Getting games...',\n schema: S.Struct({}),\n execute: async (_, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n invariant(games.length > 0, 'No chess games found');\n return ToolResult.Success(games);\n },\n }),\n defineTool(meta.id, {\n name: 'inspect',\n description: 'Get the current state of the chess game.',\n caption: 'Inspecting game...',\n schema: S.Struct({ id: ObjectId }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n const game = games.find((game) => game.id === id);\n invariant(isInstanceOf(ChessType, game));\n return ToolResult.Success(game.fen);\n },\n }),\n defineTool(meta.id, {\n name: 'move',\n description: 'Make a move in the chess game.',\n caption: 'Making chess move...',\n schema: S.Struct({\n id: ObjectId,\n move: S.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n execute: async ({ id, move }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n const game = games.find((game) => game.id === id);\n invariant(isInstanceOf(ChessType, game));\n const board = new Chess(game.fen);\n try {\n board.move(move);\n } catch (error: any) {\n return ToolResult.Error(error.message);\n }\n game.pgn = board.pgn();\n game.fen = board.fen();\n return ToolResult.Success(game.fen);\n },\n }),\n ],\n });\n\n return contributes(Capabilities.ArtifactDefinition, definition);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,oBAAqB;AAErB,2BAA6F;AAC7F,sBAAuD;AACvD,uBAAsC;AACtC,yBAA0C;AAC1C,uBAA0B;AAC1B,mBAA4B;AAC5B,kBAAmC;;AAanC,IAAA,8BAAe,MAAA;AACb,QAAMA,iBAAaC,gCAAe;IAChCC,IAAIC,2BAAKD;IACTE,MAAMD,2BAAKC;IACXC,aAAa;IACbC,cAAc;;;IAGdC,QAAQC;IACRC,OAAO;UACLC,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO;UACfC,KAAKF,qBAAEG,OAAOC,YAAY;YAAEX,aAAa;UAAiD,CAAA;QAC5F,CAAA;QACAY,SAAS,OAAO,EAAEH,IAAG,GAAI,EAAEI,WAAU,MAAE;AACrCC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7BD,0CAAUD,YAAYG,UAAU,wBAAA;;;;;;;;;AAChC,gBAAMC,aAASC,wBACbC,mCAAaC,kCAAYC,QAAQ;YAAEZ;UAAI,CAAA,OACvCa,4BAAMC,yBAAYC,WAAW;YAAEC,QAAQZ,WAAWE;UAAM,CAAA,CAAA;AAE1D,gBAAM,EAAEW,MAAMC,MAAK,IAAK,MAAMd,WAAWG,SAASC,MAAAA;AAClD,cAAI,CAACS,QAAQC,OAAO;AAClB,mBAAOC,2BAAWC,MAAMF,OAAOG,WAAW,6BAAA;UAC5C;AAEA,iBAAOF,2BAAWG,YAAQC,wCAAsBN,KAAK7B,EAAE,CAAA;QACzD;MACF,CAAA;UACAQ,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO,CAAC,CAAA;QAClBI,SAAS,OAAOqB,GAAG,EAAEpB,WAAU,MAAE;AAC/BC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOpC,OAAOC,+BAAAA,CAAAA,EAAYoC,IAAG;AACxFzB,0CAAUqB,MAAMK,SAAS,GAAG,wBAAA;;;;;;;;;AAC5B,iBAAOZ,2BAAWG,QAAQI,KAAAA;QAC5B;MACF,CAAA;UACA9B,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO;UAAEX,IAAI4C;QAAS,CAAA;QAChC7B,SAAS,OAAO,EAAEf,GAAE,GAAI,EAAEgB,WAAU,MAAE;AACpCC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOpC,OAAOC,+BAAAA,CAAAA,EAAYoC,IAAG;AACxF,gBAAMG,OAAOP,MAAMQ,KAAK,CAACD,UAASA,MAAK7C,OAAOA,EAAAA;AAC9CiB,8CAAU8B,iCAAazC,iCAAWuC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAClC,iBAAOd,2BAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;UACAJ,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO;UACfX,IAAI4C;UACJI,MAAMtC,qBAAEG,OAAOC,YAAY;YACzBX,aAAa;YACb8C,UAAU;cAAC;cAAM;;UACnB,CAAA;QACF,CAAA;QACAlC,SAAS,OAAO,EAAEf,IAAIgD,KAAI,GAAI,EAAEhC,WAAU,MAAE;AAC1CC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOpC,OAAOC,+BAAAA,CAAAA,EAAYoC,IAAG;AACxF,gBAAMG,OAAOP,MAAMQ,KAAK,CAACD,UAASA,MAAK7C,OAAOA,EAAAA;AAC9CiB,8CAAU8B,iCAAazC,iCAAWuC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAClC,gBAAMK,QAAQ,IAAIC,mBAAMN,KAAKjC,GAAG;AAChC,cAAI;AACFsC,kBAAMF,KAAKA,IAAAA;UACb,SAASlB,OAAY;AACnB,mBAAOC,2BAAWC,MAAMF,MAAMG,OAAO;UACvC;AACAY,eAAKO,MAAMF,MAAME,IAAG;AACpBP,eAAKjC,MAAMsC,MAAMtC,IAAG;AACpB,iBAAOmB,2BAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;;EAEJ,CAAA;AAEA,aAAOyC,kCAAYC,kCAAaC,oBAAoBzD,UAAAA;AACtD;",
6
+ "names": ["definition", "defineArtifact", "id", "meta", "name", "description", "instructions", "schema", "ChessType", "tools", "defineTool", "caption", "S", "Struct", "fen", "String", "annotations", "execute", "extensions", "invariant", "space", "dispatch", "intent", "pipe", "createIntent", "ChessAction", "Create", "chain", "SpaceAction", "AddObject", "target", "data", "error", "ToolResult", "Error", "message", "Success", "createArtifactElement", "_", "objects", "games", "db", "query", "Filter", "run", "length", "ObjectId", "game", "find", "isInstanceOf", "move", "examples", "board", "Chess", "pgn", "contributes", "Capabilities", "ArtifactDefinition"]
7
+ }
@@ -26,27 +26,49 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var ChessContainer_P4BZ62FN_exports = {};
30
- __export(ChessContainer_P4BZ62FN_exports, {
31
- default: () => ChessContainer_default
29
+ var chunk_CSRNUKOH_exports = {};
30
+ __export(chunk_CSRNUKOH_exports, {
31
+ ChessComponent: () => ChessComponent
32
32
  });
33
- module.exports = __toCommonJS(ChessContainer_P4BZ62FN_exports);
34
- var import_chunk_HPYER4GF = require("./chunk-HPYER4GF.cjs");
33
+ module.exports = __toCommonJS(chunk_CSRNUKOH_exports);
34
+ var import_chess = require("chess.js");
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_echo = require("@dxos/react-client/echo");
37
- var import_react_ui_stack = require("@dxos/react-ui-stack");
38
- var ChessContainer = ({ game, role }) => {
37
+ var import_react_ui_gameboard = require("@dxos/react-ui-gameboard");
38
+ var ChessComponent = ({ game }) => {
39
+ const model = (0, import_react.useMemo)(() => new import_react_ui_gameboard.ChessModel(), []);
40
+ (0, import_react.useEffect)(() => {
41
+ if (!model || game.pgn !== model?.game.pgn()) {
42
+ const chess = new import_chess.Chess();
43
+ if (game.pgn) {
44
+ chess.loadPgn(game.pgn);
45
+ }
46
+ model.initialize(chess.fen());
47
+ }
48
+ }, [
49
+ game.pgn
50
+ ]);
39
51
  const space = (0, import_echo.getSpace)(game);
40
52
  if (!space) {
41
53
  return null;
42
54
  }
43
- return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
44
- toolbar: false
45
- }, /* @__PURE__ */ import_react.default.createElement(import_chunk_HPYER4GF.Chess, {
46
- game,
47
- space,
48
- playerSelector: role === "article"
49
- }));
55
+ const handleDrop = (0, import_react.useCallback)((move) => {
56
+ if (model.makeMove(move)) {
57
+ game.pgn = model.game.pgn();
58
+ game.fen = model.game.fen();
59
+ return true;
60
+ }
61
+ return false;
62
+ }, [
63
+ model
64
+ ]);
65
+ return /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Board.Root, {
66
+ model,
67
+ onDrop: handleDrop
68
+ }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Chessboard, null));
50
69
  };
51
- var ChessContainer_default = ChessContainer;
52
- //# sourceMappingURL=ChessContainer-P4BZ62FN.cjs.map
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ ChessComponent
73
+ });
74
+ //# sourceMappingURL=chunk-CSRNUKOH.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ChessComponent.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n chess.loadPgn(game.pgn);\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n game.fen = model.game.fen();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,mBAAuD;AAEvD,kBAAyB;AACzB,gCAAmE;AAI5D,IAAMA,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;AAC1D,QAAMC,YAAQC,sBAAQ,MAAM,IAAIC,qCAAAA,GAAc,CAAA,CAAE;AAChDC,8BAAU,MAAA;AACR,QAAI,CAACH,SAASD,KAAKK,QAAQJ,OAAOD,KAAKK,IAAAA,GAAO;AAC5C,YAAMC,QAAQ,IAAIC,mBAAAA;AAClB,UAAIP,KAAKK,KAAK;AACZC,cAAME,QAAQR,KAAKK,GAAG;MACxB;AAEAJ,YAAMQ,WAAWH,MAAMI,IAAG,CAAA;IAC5B;EACF,GAAG;IAACV,KAAKK;GAAI;AAEb,QAAMM,YAAQC,sBAASZ,IAAAA;AACvB,MAAI,CAACW,OAAO;AACV,WAAO;EACT;AAEA,QAAME,iBAAaC,0BACjB,CAACC,SAAAA;AACC,QAAId,MAAMe,SAASD,IAAAA,GAAO;AACxBf,WAAKK,MAAMJ,MAAMD,KAAKK,IAAG;AACzBL,WAAKU,MAAMT,MAAMD,KAAKU,IAAG;AACzB,aAAO;IACT;AAEA,WAAO;EACT,GACA;IAACT;GAAM;AAGT,SACE,6BAAAgB,QAAA,cAACC,gCAAMC,MAAI;IAAClB;IAAcmB,QAAQP;KAChC,6BAAAI,QAAA,cAACI,sCAAAA,IAAAA,CAAAA;AAGP;",
6
+ "names": ["ChessComponent", "game", "model", "useMemo", "ChessModel", "useEffect", "pgn", "chess", "Chess", "loadPgn", "initialize", "fen", "space", "getSpace", "handleDrop", "useCallback", "move", "makeMove", "React", "Board", "Root", "onDrop", "Chessboard"]
7
+ }