@dxos/plugin-chess 0.7.5-main.ff8607b → 0.7.5-staging.b81e783
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.
- package/dist/lib/browser/{ChessContainer-LPMACR6Y.mjs → ChessContainer-XERPODLK.mjs} +10 -30
- package/dist/lib/browser/ChessContainer-XERPODLK.mjs.map +7 -0
- package/dist/lib/browser/artifact-definition-AEIQ7Z36.mjs +174 -0
- package/dist/lib/browser/artifact-definition-AEIQ7Z36.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KC36U5TF.mjs → chunk-GKM6RRDX.mjs} +11 -8
- package/dist/lib/browser/chunk-GKM6RRDX.mjs.map +7 -0
- package/dist/lib/browser/chunk-R26FYVUS.mjs +8 -0
- package/dist/lib/browser/chunk-R26FYVUS.mjs.map +7 -0
- package/dist/lib/browser/chunk-VRWXC5L2.mjs +42 -0
- package/dist/lib/browser/chunk-VRWXC5L2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +36 -17
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-5CPSAZSA.mjs → intent-resolver-VPK5QRXH.mjs} +16 -10
- package/dist/lib/browser/intent-resolver-VPK5QRXH.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-ITP4OMBZ.mjs +42 -0
- package/dist/lib/browser/react-surface-ITP4OMBZ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{ChessContainer-ZFOCAXZL.cjs → ChessContainer-LEPLNICP.cjs} +9 -32
- package/dist/lib/node/ChessContainer-LEPLNICP.cjs.map +7 -0
- package/dist/lib/node/artifact-definition-ZM5VDOVN.cjs +189 -0
- package/dist/lib/node/artifact-definition-ZM5VDOVN.cjs.map +7 -0
- package/dist/lib/node/{chunk-BEZSGC5V.cjs → chunk-3TTH3HKL.cjs} +14 -11
- package/dist/lib/node/chunk-3TTH3HKL.cjs.map +7 -0
- package/dist/lib/node/chunk-CSRNUKOH.cjs +74 -0
- package/dist/lib/node/chunk-CSRNUKOH.cjs.map +7 -0
- package/dist/lib/node/{react-surface-IOAB5AXZ.cjs → chunk-ITDMCBQQ.cjs} +11 -22
- package/dist/lib/node/chunk-ITDMCBQQ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +51 -31
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-2YYMQ2H5.cjs → intent-resolver-PUM2BVGU.cjs} +19 -13
- package/dist/lib/node/intent-resolver-PUM2BVGU.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-4G4PW5RU.cjs +62 -0
- package/dist/lib/node/react-surface-4G4PW5RU.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +6 -6
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{ChessContainer-DF6IFM2R.mjs → ChessContainer-S76WNBWN.mjs} +9 -30
- package/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs.map +7 -0
- package/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs +175 -0
- package/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6SEDGO5G.mjs +44 -0
- package/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-B72CIN6T.mjs +10 -0
- package/dist/lib/node-esm/chunk-B72CIN6T.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-A6KO5IFZ.mjs → chunk-GQA2DRUZ.mjs} +11 -8
- package/dist/lib/node-esm/chunk-GQA2DRUZ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +36 -17
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-XCT7HZ43.mjs → intent-resolver-IR3YUZIG.mjs} +16 -10
- package/dist/lib/node-esm/intent-resolver-IR3YUZIG.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-AEMVDP4R.mjs +43 -0
- package/dist/lib/node-esm/react-surface-AEMVDP4R.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +3 -3
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts +11 -0
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/ChessComponent.d.ts +5 -0
- package/dist/types/src/components/ChessComponent.d.ts.map +1 -0
- package/dist/types/src/components/ChessContainer.d.ts +3 -4
- package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
- package/dist/types/src/components/PlayerSelector.d.ts +4 -5
- package/dist/types/src/components/PlayerSelector.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +4 -2
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +4 -3
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +22 -18
- package/src/ChessPlugin.tsx +22 -9
- package/src/capabilities/artifact-definition.ts +109 -0
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +11 -6
- package/src/capabilities/react-surface.tsx +12 -5
- package/src/components/ChessComponent.tsx +49 -0
- package/src/components/ChessContainer.tsx +5 -32
- package/src/components/PlayerSelector.tsx +2 -2
- package/src/components/index.ts +2 -0
- package/src/index.ts +4 -1
- package/src/translations.ts +2 -2
- package/src/types/schema.ts +3 -1
- package/src/types/types.ts +6 -5
- package/dist/lib/browser/ChessContainer-LPMACR6Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-KC36U5TF.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5CPSAZSA.mjs.map +0 -7
- package/dist/lib/browser/react-surface-6J2N3V5R.mjs +0 -30
- package/dist/lib/browser/react-surface-6J2N3V5R.mjs.map +0 -7
- package/dist/lib/node/ChessContainer-ZFOCAXZL.cjs.map +0 -7
- package/dist/lib/node/chunk-BEZSGC5V.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-2YYMQ2H5.cjs.map +0 -7
- package/dist/lib/node/react-surface-IOAB5AXZ.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-A6KO5IFZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-XCT7HZ43.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-47I77M7F.mjs +0 -31
- package/dist/lib/node-esm/react-surface-47I77M7F.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2461,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":2799,"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/intent-resolver.ts":{"bytes":2167,"imports":[{"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/PlayerSelector.tsx":{"bytes":8757,"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":6004,"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},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"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":798,"imports":[{"path":"react","kind":"import-statement","external":true},{"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":2649,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":1080,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"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":1819,"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":6685,"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":592,"imports":[{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4299},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-A6KO5IFZ.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-XCT7HZ43.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-47I77M7F.mjs","kind":"dynamic-import"}],"exports":["CHESS_PLUGIN","ChessPlugin","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1336},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":324},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0}},"bytes":2339},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-A6KO5IFZ.mjs","kind":"import-statement"}],"exports":["ChessAction","GameType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":284},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-XCT7HZ43.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1072},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-XCT7HZ43.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-A6KO5IFZ.mjs","kind":"import-statement"},{"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":360}},"bytes":691},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7739},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-DF6IFM2R.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},{"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":1501},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":4197},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-47I77M7F.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1560},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-47I77M7F.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-A6KO5IFZ.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":434},"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":992},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-A6KO5IFZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3509},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-A6KO5IFZ.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","GameType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":430},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":558},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1932}}}
|
|
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":2089,"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-definition.ts":{"bytes":17463,"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":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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5065},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-B72CIN6T.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-IR3YUZIG.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-AEMVDP4R.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":2917},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":286},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7597},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.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":5487}},"bytes":5831},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-IR3YUZIG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1375},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-IR3YUZIG.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.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":843},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6189},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.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":3564},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-AEMVDP4R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1851},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-AEMVDP4R.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-B72CIN6T.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.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":1199},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-B72CIN6T.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":404},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-B72CIN6T.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":328},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3769},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-GQA2DRUZ.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":2059},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2438},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.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":1224}}}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ChessContainer
|
|
4
|
+
} from "./chunk-B72CIN6T.mjs";
|
|
5
|
+
import {
|
|
6
|
+
CHESS_PLUGIN,
|
|
7
|
+
ChessType,
|
|
8
|
+
isObject
|
|
9
|
+
} from "./chunk-GQA2DRUZ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
ChessComponent
|
|
12
|
+
} from "./chunk-6SEDGO5G.mjs";
|
|
13
|
+
|
|
14
|
+
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
15
|
+
import React from "react";
|
|
16
|
+
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
17
|
+
import { isInstanceOf } from "@dxos/echo-schema";
|
|
18
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
19
|
+
createSurface({
|
|
20
|
+
id: CHESS_PLUGIN,
|
|
21
|
+
role: [
|
|
22
|
+
"article",
|
|
23
|
+
"section"
|
|
24
|
+
],
|
|
25
|
+
filter: (data) => isObject(data.subject),
|
|
26
|
+
component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessContainer, {
|
|
27
|
+
game: data.subject,
|
|
28
|
+
role
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
createSurface({
|
|
32
|
+
id: "plugin-chess",
|
|
33
|
+
role: "canvas-node",
|
|
34
|
+
filter: (data) => isInstanceOf(ChessType, data),
|
|
35
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(ChessComponent, {
|
|
36
|
+
game: data
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
]);
|
|
40
|
+
export {
|
|
41
|
+
react_surface_default as default
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=react-surface-AEMVDP4R.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
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ChessAction,
|
|
4
|
-
|
|
4
|
+
ChessType,
|
|
5
5
|
MoveSchema,
|
|
6
6
|
isObject
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-GQA2DRUZ.mjs";
|
|
8
8
|
export {
|
|
9
9
|
ChessAction,
|
|
10
|
-
|
|
10
|
+
ChessType,
|
|
11
11
|
MoveSchema,
|
|
12
12
|
isObject
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,4CA8CpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
2
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
+
declare global {
|
|
4
|
+
interface ToolContextExtensions {
|
|
5
|
+
space?: Space;
|
|
6
|
+
dispatch?: PromiseIntentDispatcher;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/artifact").ArtifactDefinition>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=artifact-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/artifact-definition.ts"],"names":[],"mappings":"AAOA,OAAO,EAAkD,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAMnH,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAK7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,uBAAuB,CAAC;KACpC;CACF;;AAED,wBAmFE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const ArtifactDefinition: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("packages/experimental/artifact/dist/types/src").ArtifactDefinition> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
1
2
|
export declare const IntentResolver: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
2
3
|
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,kMAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,gMAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,mNAA8C,CAAC;AAC9E,eAAO,MAAM,cAAc,kMAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,gMAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;;AAKhF,wBAcI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAQ/E,wBAcK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChessComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessComponent.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,aAAc;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,mDAoC3D,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type GameType } from '../types';
|
|
1
|
+
import { type ChessType } from '../types';
|
|
3
2
|
declare const ChessContainer: ({ game }: {
|
|
4
|
-
game:
|
|
3
|
+
game: ChessType;
|
|
5
4
|
role?: string;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default ChessContainer;
|
|
8
7
|
//# sourceMappingURL=ChessContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,QAAA,MAAM,cAAc,aAAc;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,mDAmBnE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
-
import { type
|
|
4
|
-
export declare const PlayerSelector: ({
|
|
5
|
-
game: GameType;
|
|
2
|
+
import { type ChessType } from '../types';
|
|
3
|
+
export declare const PlayerSelector: ({ space, game }: {
|
|
6
4
|
space: Space;
|
|
7
|
-
|
|
5
|
+
game: ChessType;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
//# sourceMappingURL=PlayerSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayerSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlayerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayerSelector.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAc,KAAK,KAAK,EAAoB,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,oBAAqB;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,4CAuBhF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export * from './ChessComponent';
|
|
1
2
|
export declare const ChessContainer: import("react").LazyExoticComponent<({ game }: {
|
|
2
|
-
game: import("../types").
|
|
3
|
+
game: import("../types").ChessType;
|
|
3
4
|
role?: string;
|
|
4
|
-
}) => import("react").JSX.Element | null>;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null>;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,cAAc,kBAAkB,CAAC;AAEjC,eAAO,MAAM,cAAc;;QAC2K,CAAC;qDADnI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AAEvB,cAAc,eAAe,CAAC"}
|
|
@@ -8,12 +8,13 @@ export declare const MoveSchema: S.mutable<S.SchemaClass<{
|
|
|
8
8
|
readonly target?: string | undefined;
|
|
9
9
|
readonly piece?: string | undefined;
|
|
10
10
|
}, never>>;
|
|
11
|
-
declare const
|
|
11
|
+
declare const ChessType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
12
12
|
name: S.optional<typeof S.String>;
|
|
13
13
|
playerWhite: typeof S.String;
|
|
14
14
|
playerBlack: typeof S.String;
|
|
15
15
|
moves: S.mutable<S.Array$<typeof S.String>>;
|
|
16
16
|
pgn: typeof S.String;
|
|
17
|
+
fen: typeof S.String;
|
|
17
18
|
}, {
|
|
18
19
|
partial: true;
|
|
19
20
|
}>, S.Struct.Encoded<{
|
|
@@ -22,8 +23,9 @@ declare const GameType_base: import("@dxos/echo-schema").TypedObjectPrototype<im
|
|
|
22
23
|
playerBlack: typeof S.String;
|
|
23
24
|
moves: S.mutable<S.Array$<typeof S.String>>;
|
|
24
25
|
pgn: typeof S.String;
|
|
26
|
+
fen: typeof S.String;
|
|
25
27
|
}>>;
|
|
26
|
-
export declare class
|
|
28
|
+
export declare class ChessType extends ChessType_base {
|
|
27
29
|
}
|
|
28
30
|
export {};
|
|
29
31
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,UAAU;;;;;;;;UAQtB,CAAC
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,UAAU;;;;;;;;UAQtB,CAAC;;;;;;;;;;;;;;;;;;AAEF,qBAAa,SAAU,SAAQ,cAW9B;CAAG"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
import {
|
|
2
|
+
import { ChessType } from './schema';
|
|
3
3
|
export declare namespace ChessAction {
|
|
4
4
|
const Create_base: S.TaggedClass<Create, "dxos.org/plugin/chess/action/create", {
|
|
5
5
|
readonly _tag: S.tag<"dxos.org/plugin/chess/action/create">;
|
|
6
6
|
} & {
|
|
7
7
|
input: S.Struct<{
|
|
8
8
|
name: S.optional<typeof S.String>;
|
|
9
|
+
fen: S.optional<typeof S.String>;
|
|
9
10
|
}>;
|
|
10
11
|
output: S.Struct<{
|
|
11
|
-
object: typeof
|
|
12
|
+
object: typeof ChessType;
|
|
12
13
|
}>;
|
|
13
14
|
}>;
|
|
14
15
|
export class Create extends Create_base {
|
|
15
16
|
}
|
|
16
17
|
export {};
|
|
17
18
|
}
|
|
18
|
-
export declare const isObject: (object: unknown) => object is
|
|
19
|
+
export declare const isObject: (object: unknown) => object is typeof ChessType;
|
|
19
20
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,yBAAiB,WAAW,CAAC;;;;;;;;;;;;IAG3B,MAAM,OAAO,MAAO,SAAQ,WAQ1B;KAAG;;CACN;AAED,eAAO,MAAM,QAAQ,WAAY,OAAO,KAAG,MAAM,IAAI,OAAO,SAE3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-chess",
|
|
3
|
-
"version": "0.7.5-
|
|
3
|
+
"version": "0.7.5-staging.b81e783",
|
|
4
4
|
"description": "Chess for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -35,18 +36,21 @@
|
|
|
35
36
|
"@effect/schema": "^0.75.5",
|
|
36
37
|
"@preact/signals-core": "^1.6.0",
|
|
37
38
|
"chess.js": "^1.0.0",
|
|
38
|
-
"
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/plugin-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
39
|
+
"effect": "^3.12.3",
|
|
40
|
+
"@dxos/app-framework": "0.7.5-staging.b81e783",
|
|
41
|
+
"@dxos/assistant": "0.7.5-staging.b81e783",
|
|
42
|
+
"@dxos/artifact": "0.7.5-staging.b81e783",
|
|
43
|
+
"@dxos/async": "0.7.5-staging.b81e783",
|
|
44
|
+
"@dxos/display-name": "0.7.5-staging.b81e783",
|
|
45
|
+
"@dxos/echo-schema": "0.7.5-staging.b81e783",
|
|
46
|
+
"@dxos/invariant": "0.7.5-staging.b81e783",
|
|
47
|
+
"@dxos/live-object": "0.7.5-staging.b81e783",
|
|
48
|
+
"@dxos/plugin-client": "0.7.5-staging.b81e783",
|
|
49
|
+
"@dxos/plugin-graph": "0.7.5-staging.b81e783",
|
|
50
|
+
"@dxos/plugin-space": "0.7.5-staging.b81e783",
|
|
51
|
+
"@dxos/react-client": "0.7.5-staging.b81e783",
|
|
52
|
+
"@dxos/react-ui-gameboard": "0.7.5-staging.b81e783",
|
|
53
|
+
"@dxos/react-ui-stack": "0.7.5-staging.b81e783"
|
|
50
54
|
},
|
|
51
55
|
"devDependencies": {
|
|
52
56
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -55,16 +59,16 @@
|
|
|
55
59
|
"react": "~18.2.0",
|
|
56
60
|
"react-dom": "~18.2.0",
|
|
57
61
|
"vite": "5.4.7",
|
|
58
|
-
"@dxos/react-ui": "0.7.5-
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
62
|
+
"@dxos/react-ui-theme": "0.7.5-staging.b81e783",
|
|
63
|
+
"@dxos/react-ui": "0.7.5-staging.b81e783",
|
|
64
|
+
"@dxos/storybook-utils": "0.7.5-staging.b81e783"
|
|
61
65
|
},
|
|
62
66
|
"peerDependencies": {
|
|
63
67
|
"@phosphor-icons/react": "^2.1.5",
|
|
64
68
|
"react": "~18.2.0",
|
|
65
69
|
"react-dom": "~18.2.0",
|
|
66
|
-
"@dxos/react-ui
|
|
67
|
-
"@dxos/react-ui": "0.7.5-
|
|
70
|
+
"@dxos/react-ui": "0.7.5-staging.b81e783",
|
|
71
|
+
"@dxos/react-ui-theme": "0.7.5-staging.b81e783"
|
|
68
72
|
},
|
|
69
73
|
"publishConfig": {
|
|
70
74
|
"access": "public"
|
package/src/ChessPlugin.tsx
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { ClientEvents } from '@dxos/plugin-client';
|
|
7
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
8
|
+
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
7
9
|
|
|
8
|
-
import { IntentResolver, ReactSurface } from './capabilities';
|
|
10
|
+
import { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';
|
|
9
11
|
import { CHESS_PLUGIN, meta } from './meta';
|
|
10
12
|
import translations from './translations';
|
|
11
|
-
import { ChessAction,
|
|
13
|
+
import { ChessAction, ChessType } from './types';
|
|
12
14
|
|
|
13
15
|
export const ChessPlugin = () =>
|
|
14
16
|
definePlugin(meta, [
|
|
@@ -22,27 +24,38 @@ export const ChessPlugin = () =>
|
|
|
22
24
|
activatesOn: Events.SetupMetadata,
|
|
23
25
|
activate: () =>
|
|
24
26
|
contributes(Capabilities.Metadata, {
|
|
25
|
-
id:
|
|
27
|
+
id: ChessType.typename,
|
|
26
28
|
metadata: {
|
|
27
|
-
createObject: (props: { name?: string }) => createIntent(ChessAction.Create, props),
|
|
28
29
|
placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],
|
|
29
30
|
icon: 'ph--shield-chevron--regular',
|
|
30
31
|
},
|
|
31
32
|
}),
|
|
32
33
|
}),
|
|
33
34
|
defineModule({
|
|
34
|
-
id: `${meta.id}/module/
|
|
35
|
+
id: `${meta.id}/module/object-form`,
|
|
35
36
|
activatesOn: ClientEvents.SetupSchema,
|
|
36
|
-
activate: () =>
|
|
37
|
+
activate: () =>
|
|
38
|
+
contributes(
|
|
39
|
+
SpaceCapabilities.ObjectForm,
|
|
40
|
+
defineObjectForm({
|
|
41
|
+
objectSchema: ChessType,
|
|
42
|
+
getIntent: () => createIntent(ChessAction.Create),
|
|
43
|
+
}),
|
|
44
|
+
),
|
|
37
45
|
}),
|
|
38
46
|
defineModule({
|
|
39
47
|
id: `${meta.id}/module/react-surface`,
|
|
40
|
-
activatesOn: Events.
|
|
48
|
+
activatesOn: Events.SetupReactSurface,
|
|
41
49
|
activate: ReactSurface,
|
|
42
50
|
}),
|
|
43
51
|
defineModule({
|
|
44
52
|
id: `${meta.id}/module/intent-resolver`,
|
|
45
|
-
activatesOn: Events.
|
|
53
|
+
activatesOn: Events.SetupIntentResolver,
|
|
46
54
|
activate: IntentResolver,
|
|
47
55
|
}),
|
|
56
|
+
defineModule({
|
|
57
|
+
id: `${meta.id}/module/artifact-definition`,
|
|
58
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
59
|
+
activate: ArtifactDefinition,
|
|
60
|
+
}),
|
|
48
61
|
]);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Chess } from 'chess.js';
|
|
6
|
+
import { pipe } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
+
import { defineArtifact, defineTool, ToolResult } from '@dxos/artifact';
|
|
10
|
+
import { createArtifactElement } from '@dxos/assistant';
|
|
11
|
+
import { isInstanceOf, ObjectId, S } from '@dxos/echo-schema';
|
|
12
|
+
import { invariant } from '@dxos/invariant';
|
|
13
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
14
|
+
import { Filter, type Space } from '@dxos/react-client/echo';
|
|
15
|
+
|
|
16
|
+
import { ChessAction, ChessType } from '../types';
|
|
17
|
+
|
|
18
|
+
// TODO(burdon): Factor out.
|
|
19
|
+
declare global {
|
|
20
|
+
interface ToolContextExtensions {
|
|
21
|
+
space?: Space;
|
|
22
|
+
dispatch?: PromiseIntentDispatcher;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default () => {
|
|
27
|
+
const definition = defineArtifact({
|
|
28
|
+
id: 'plugin-chess',
|
|
29
|
+
instructions: `
|
|
30
|
+
Chess:
|
|
31
|
+
- 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.
|
|
32
|
+
`,
|
|
33
|
+
schema: ChessType,
|
|
34
|
+
tools: [
|
|
35
|
+
defineTool({
|
|
36
|
+
name: 'chess_new',
|
|
37
|
+
description: 'Create a new chess game. Returns the artifact definition for the game.',
|
|
38
|
+
schema: S.Struct({
|
|
39
|
+
fen: S.String.annotations({ description: 'The state of the chess game in the FEN format.' }),
|
|
40
|
+
}),
|
|
41
|
+
execute: async ({ fen }, { extensions }) => {
|
|
42
|
+
invariant(extensions?.space, 'No space');
|
|
43
|
+
invariant(extensions?.dispatch, 'No intent dispatcher');
|
|
44
|
+
const intent = pipe(
|
|
45
|
+
createIntent(ChessAction.Create, { fen }),
|
|
46
|
+
chain(SpaceAction.AddObject, { target: extensions.space }),
|
|
47
|
+
);
|
|
48
|
+
const { data, error } = await extensions.dispatch(intent);
|
|
49
|
+
if (!data || error) {
|
|
50
|
+
return ToolResult.Error(error?.message ?? 'Failed to create chess game');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return ToolResult.Success(createArtifactElement(data.id));
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
defineTool({
|
|
57
|
+
name: 'chess_query',
|
|
58
|
+
description: 'Query all active chess games.',
|
|
59
|
+
schema: S.Struct({}),
|
|
60
|
+
execute: async (_, { extensions }) => {
|
|
61
|
+
invariant(extensions?.space, 'No space');
|
|
62
|
+
const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();
|
|
63
|
+
invariant(games.length > 0, 'No chess games found');
|
|
64
|
+
return ToolResult.Success(games);
|
|
65
|
+
},
|
|
66
|
+
}),
|
|
67
|
+
defineTool({
|
|
68
|
+
name: 'chess_inspect',
|
|
69
|
+
description: 'Get the current state of the chess game.',
|
|
70
|
+
schema: S.Struct({ id: ObjectId }),
|
|
71
|
+
execute: async ({ id }, { extensions }) => {
|
|
72
|
+
invariant(extensions?.space, 'No space');
|
|
73
|
+
const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();
|
|
74
|
+
const game = games.find((game) => game.id === id);
|
|
75
|
+
invariant(isInstanceOf(ChessType, game));
|
|
76
|
+
return ToolResult.Success(game.fen);
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
defineTool({
|
|
80
|
+
name: 'chess_move',
|
|
81
|
+
description: 'Make a move in the chess game.',
|
|
82
|
+
schema: S.Struct({
|
|
83
|
+
id: ObjectId,
|
|
84
|
+
move: S.String.annotations({
|
|
85
|
+
description: 'The move to make in the chess game.',
|
|
86
|
+
examples: ['e4', 'Bf3'],
|
|
87
|
+
}),
|
|
88
|
+
}),
|
|
89
|
+
execute: async ({ id, move }, { extensions }) => {
|
|
90
|
+
invariant(extensions?.space, 'No space');
|
|
91
|
+
const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();
|
|
92
|
+
const game = games.find((game) => game.id === id);
|
|
93
|
+
invariant(isInstanceOf(ChessType, game));
|
|
94
|
+
const board = new Chess(game.fen);
|
|
95
|
+
try {
|
|
96
|
+
board.move(move);
|
|
97
|
+
} catch (error: any) {
|
|
98
|
+
return ToolResult.Error(error.message);
|
|
99
|
+
}
|
|
100
|
+
game.pgn = board.pgn();
|
|
101
|
+
game.fen = board.fen();
|
|
102
|
+
return ToolResult.Success(game.fen);
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
return contributes(Capabilities.ArtifactDefinition, definition);
|
|
109
|
+
};
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
+
export const ArtifactDefinition = lazy(() => import('./artifact-definition'));
|
|
7
8
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
8
9
|
export const ReactSurface = lazy(() => import('./react-surface'));
|