@dxos/plugin-chess 0.7.5-labs.a279d8c → 0.7.5-main.2567c87
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/{chunk-JUAC2NNR.mjs → ChessContainer-JYXOZIDK.mjs} +41 -84
- package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VYBCAEUF.mjs → chunk-VHSLLEH3.mjs} +8 -11
- package/dist/lib/browser/chunk-VHSLLEH3.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +10 -35
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-FUAOSHHX.mjs +19 -0
- package/dist/lib/browser/intent-resolver-FUAOSHHX.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-63EO2PZO.mjs +30 -0
- package/dist/lib/browser/react-surface-63EO2PZO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{chunk-HPYER4GF.cjs → ChessContainer-XRP7D63X.cjs} +118 -174
- package/dist/lib/node/ChessContainer-XRP7D63X.cjs.map +7 -0
- package/dist/lib/node/{chunk-J5YKJRP3.cjs → chunk-3BLH7NRV.cjs} +11 -14
- package/dist/lib/node/chunk-3BLH7NRV.cjs.map +7 -0
- package/dist/lib/node/index.cjs +30 -56
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-AENA6D5K.cjs → intent-resolver-VTB6P3IL.cjs} +12 -18
- package/dist/lib/node/intent-resolver-VTB6P3IL.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{ChessContainer-P4BZ62FN.cjs → react-surface-PO42G64E.cjs} +21 -22
- package/dist/lib/node/react-surface-PO42G64E.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/{chunk-OMGVSBVI.mjs → ChessContainer-37QUCUTD.mjs} +41 -84
- package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TXUWVQWY.mjs → chunk-M2CRYWX5.mjs} +8 -11
- package/dist/lib/node-esm/chunk-M2CRYWX5.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +10 -35
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-T7NNHOYR.mjs → intent-resolver-MKEQFVZO.mjs} +10 -16
- package/dist/lib/node-esm/intent-resolver-MKEQFVZO.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-CXEBEDLT.mjs +31 -0
- package/dist/lib/node-esm/react-surface-CXEBEDLT.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/index.d.ts +0 -1
- 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/Chess.d.ts +2 -2
- package/dist/types/src/components/Chess.d.ts.map +1 -1
- package/dist/types/src/components/Chessboard/Chessboard.d.ts +2 -2
- package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -1
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +3 -14
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +2 -4
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3 -4
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -24
- package/src/ChessPlugin.tsx +4 -9
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +6 -12
- package/src/capabilities/react-surface.tsx +6 -22
- package/src/components/Chess.tsx +6 -7
- package/src/components/Chessboard/Chessboard.stories.tsx +8 -21
- package/src/components/Chessboard/Chessboard.tsx +17 -29
- package/src/components/index.ts +0 -3
- package/src/index.ts +1 -4
- package/src/translations.ts +2 -2
- package/src/types/schema.ts +1 -3
- package/src/types/types.ts +5 -6
- package/dist/lib/browser/ChessContainer-G736GS2V.mjs +0 -26
- package/dist/lib/browser/ChessContainer-G736GS2V.mjs.map +0 -7
- package/dist/lib/browser/artifact-YWAB5JJL.mjs +0 -174
- package/dist/lib/browser/artifact-YWAB5JJL.mjs.map +0 -7
- package/dist/lib/browser/chunk-JUAC2NNR.mjs.map +0 -7
- package/dist/lib/browser/chunk-LAYER2WV.mjs +0 -8
- package/dist/lib/browser/chunk-LAYER2WV.mjs.map +0 -7
- package/dist/lib/browser/chunk-VYBCAEUF.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-UZRNSQFI.mjs +0 -25
- package/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-EP4LXPH7.mjs +0 -50
- package/dist/lib/browser/react-surface-EP4LXPH7.mjs.map +0 -7
- package/dist/lib/node/ChessContainer-P4BZ62FN.cjs.map +0 -7
- package/dist/lib/node/artifact-YWL3LBIO.cjs +0 -189
- package/dist/lib/node/artifact-YWL3LBIO.cjs.map +0 -7
- package/dist/lib/node/chunk-6F6WTM5L.cjs +0 -40
- package/dist/lib/node/chunk-6F6WTM5L.cjs.map +0 -7
- package/dist/lib/node/chunk-HPYER4GF.cjs.map +0 -7
- package/dist/lib/node/chunk-J5YKJRP3.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-AENA6D5K.cjs.map +0 -7
- package/dist/lib/node/react-surface-JMOSMAIC.cjs +0 -70
- package/dist/lib/node/react-surface-JMOSMAIC.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs +0 -27
- package/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs.map +0 -7
- package/dist/lib/node-esm/artifact-B6IEF7U5.mjs +0 -175
- package/dist/lib/node-esm/artifact-B6IEF7U5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OMGVSBVI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QXDXLFXD.mjs +0 -10
- package/dist/lib/node-esm/chunk-QXDXLFXD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TXUWVQWY.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ENB7VY45.mjs +0 -51
- package/dist/lib/node-esm/react-surface-ENB7VY45.mjs.map +0 -7
- package/dist/types/src/capabilities/artifact.d.ts +0 -11
- package/dist/types/src/capabilities/artifact.d.ts.map +0 -1
- package/src/capabilities/artifact.ts +0 -109
|
@@ -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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4730},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-QXDXLFXD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-TXUWVQWY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-OMGVSBVI.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-B6IEF7U5.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-ENB7VY45.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":2835},"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-TXUWVQWY.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-B6IEF7U5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7575},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-B6IEF7U5.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-TXUWVQWY.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":5765},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1278},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-TXUWVQWY.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":796},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1208},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-OMGVSBVI.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":800},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-ENB7VY45.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2317},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-ENB7VY45.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-QXDXLFXD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-TXUWVQWY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-OMGVSBVI.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":1406},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-QXDXLFXD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":426},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-QXDXLFXD.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-2LFJ6RHB.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-TXUWVQWY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-TXUWVQWY.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":1793},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-OMGVSBVI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":48774},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-OMGVSBVI.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":35167}}}
|
|
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":1411,"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":1974,"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/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":15769,"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-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":14027,"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":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":6788,"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":4361},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.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-MKEQFVZO.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-CXEBEDLT.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":1355},"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":2358},"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-M2CRYWX5.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-MKEQFVZO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":979},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-MKEQFVZO.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.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":323}},"bytes":654},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":47070},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs":{"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":"@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":"@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-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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":495},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytesInOutput":3989},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":2364},"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/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":33413},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-CXEBEDLT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1560},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-CXEBEDLT.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.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-37QUCUTD.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-M2CRYWX5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3212},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.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":247}},"bytes":1666}}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CHESS_PLUGIN,
|
|
4
|
+
isObject
|
|
5
|
+
} from "./chunk-M2CRYWX5.mjs";
|
|
6
|
+
|
|
7
|
+
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
10
|
+
|
|
11
|
+
// packages/plugins/plugin-chess/src/components/index.ts
|
|
12
|
+
import { lazy } from "react";
|
|
13
|
+
var ChessContainer = lazy(() => import("./ChessContainer-37QUCUTD.mjs"));
|
|
14
|
+
|
|
15
|
+
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
16
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
|
|
17
|
+
id: CHESS_PLUGIN,
|
|
18
|
+
role: [
|
|
19
|
+
"article",
|
|
20
|
+
"section"
|
|
21
|
+
],
|
|
22
|
+
filter: (data) => isObject(data.subject),
|
|
23
|
+
component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessContainer, {
|
|
24
|
+
game: data.subject,
|
|
25
|
+
role
|
|
26
|
+
})
|
|
27
|
+
}));
|
|
28
|
+
export {
|
|
29
|
+
react_surface_default as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=react-surface-CXEBEDLT.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\n\nimport { ChessContainer } from '../components';\nimport { CHESS_PLUGIN } from '../meta';\nimport { isObject, type GameType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: CHESS_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: GameType } => isObject(data.subject),\n component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,\n }),\n );\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const ChessContainer = lazy(() => import('./ChessContainer'));\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;;;ACFzD,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,+BAAA,CAAA;;;ADMhD,IAAA,wBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC;EACJC,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SAAwCC,SAASD,KAAKE,OAAO;EACtEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,sBAAA,cAACM,gBAAAA;IAAeC,MAAML,KAAKE;IAASJ;;AACrE,CAAA,CAAA;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "lazy", "ChessContainer", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game"]
|
|
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
|
+
GameType,
|
|
5
5
|
MoveSchema,
|
|
6
6
|
isObject
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-M2CRYWX5.mjs";
|
|
8
8
|
export {
|
|
9
9
|
ChessAction,
|
|
10
|
-
|
|
10
|
+
GameType,
|
|
11
11
|
MoveSchema,
|
|
12
12
|
isObject
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,WAAW,4CAmCpB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const Artifact: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("packages/experimental/artifact/dist/types/src").ArtifactDefinition>>;
|
|
2
1
|
export declare const IntentResolver: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
|
|
3
2
|
export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
|
|
4
3
|
//# 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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,mIAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,iIAAwC,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":"AAIA,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;;AAKhF,wBAQI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"
|
|
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;;AAM/E,wBASI"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
-
import { type
|
|
3
|
+
import { type GameType } from '../types';
|
|
4
4
|
export declare const Chess: ({ space, game, playerSelector }: {
|
|
5
5
|
space: Space;
|
|
6
|
-
game:
|
|
6
|
+
game: GameType;
|
|
7
7
|
playerSelector?: boolean;
|
|
8
8
|
}) => React.JSX.Element | null;
|
|
9
9
|
//# sourceMappingURL=Chess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chess.d.ts","sourceRoot":"","sources":["../../../../src/components/Chess.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAc,KAAK,KAAK,EAAoB,MAAM,yBAAyB,CAAC;AAKnF,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"Chess.d.ts","sourceRoot":"","sources":["../../../../src/components/Chess.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAc,KAAK,KAAK,EAAoB,MAAM,yBAAyB,CAAC;AAKnF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AA2BzC,eAAO,MAAM,KAAK,oCAAqC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,6BAiBhH,CAAC"}
|
|
@@ -25,8 +25,8 @@ export type ChessboardProps = {
|
|
|
25
25
|
onUpdate?: (move: ChessMove) => void;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* https://
|
|
29
|
-
* https://
|
|
28
|
+
* https://www.npmjs.com/package/chess.js
|
|
29
|
+
* https://www.npmjs.com/package/react-chessboard
|
|
30
30
|
*/
|
|
31
31
|
export declare const Chessboard: ({ model: { chess }, orientation, readonly, boardStyle, pieces, onUpdate, }: ChessboardProps) => React.JSX.Element;
|
|
32
32
|
export declare const ChessPanel: FC<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chessboard.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chessboard/Chessboard.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Chessboard.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chessboard/Chessboard.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQvC,oBAAY,WAAW;IACrB,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,MAAM,IAAI;IACV,QAAQ,IAAI;CACb;AAcD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,CAa/C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,+EAOpB,eAAe,sBAoCjB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CA+CA,CAAC"}
|
|
@@ -3,22 +3,11 @@ import React from 'react';
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: ({ model: { chess }, orientation, readonly, boardStyle, pieces, onUpdate, }: import("./Chessboard").ChessboardProps) => React.JSX.Element;
|
|
6
|
-
render: (
|
|
7
|
-
size?: "large" | "small";
|
|
8
|
-
panel: boolean;
|
|
9
|
-
}) => React.JSX.Element;
|
|
6
|
+
render: () => React.JSX.Element;
|
|
10
7
|
decorators: import("@storybook/react/*").Decorator[];
|
|
11
8
|
};
|
|
12
9
|
export default _default;
|
|
13
|
-
export declare const Default: {
|
|
14
|
-
|
|
15
|
-
args: {
|
|
16
|
-
panel: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare const Micro: {
|
|
20
|
-
args: {
|
|
21
|
-
size: string;
|
|
22
|
-
};
|
|
10
|
+
export declare const Default: {
|
|
11
|
+
component: ({ model: { chess }, orientation, readonly, boardStyle, pieces, onUpdate, }: import("./Chessboard").ChessboardProps) => React.JSX.Element;
|
|
23
12
|
};
|
|
24
13
|
//# sourceMappingURL=Chessboard.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chessboard.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chessboard/Chessboard.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAmB,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"Chessboard.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chessboard/Chessboard.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAmB,MAAM,OAAO,CAAC;;;;;;;AA0BxC,wBAKE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export * from './Chess';
|
|
2
|
-
export * from './Chessboard';
|
|
3
1
|
export declare const ChessContainer: import("react").LazyExoticComponent<({ game, role }: Pick<import("react").ComponentProps<typeof import("./Chess").Chess>, "game"> & {
|
|
4
2
|
role?: string;
|
|
5
3
|
}) => import("react").JSX.Element | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;QACyJ,CAAC;yCADjH,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,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|
|
@@ -8,13 +8,12 @@ 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 GameType_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;
|
|
18
17
|
}, {
|
|
19
18
|
partial: true;
|
|
20
19
|
}>, S.Struct.Encoded<{
|
|
@@ -23,9 +22,8 @@ declare const ChessType_base: import("@dxos/echo-schema").TypedObjectPrototype<i
|
|
|
23
22
|
playerBlack: typeof S.String;
|
|
24
23
|
moves: S.mutable<S.Array$<typeof S.String>>;
|
|
25
24
|
pgn: typeof S.String;
|
|
26
|
-
fen: typeof S.String;
|
|
27
25
|
}>>;
|
|
28
|
-
export declare class
|
|
26
|
+
export declare class GameType extends GameType_base {
|
|
29
27
|
}
|
|
30
28
|
export {};
|
|
31
29
|
//# 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,QAAS,SAAQ,aAS7B;CAAG"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
import {
|
|
2
|
+
import { GameType } 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>;
|
|
10
9
|
}>;
|
|
11
10
|
output: S.Struct<{
|
|
12
|
-
object: typeof
|
|
11
|
+
object: typeof GameType;
|
|
13
12
|
}>;
|
|
14
13
|
}>;
|
|
15
14
|
export class Create extends Create_base {
|
|
16
15
|
}
|
|
17
16
|
export {};
|
|
18
17
|
}
|
|
19
|
-
export declare const isObject: (object: unknown) => object is
|
|
18
|
+
export declare const isObject: (object: unknown) => object is GameType;
|
|
20
19
|
//# 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,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,yBAAiB,WAAW,CAAC;;;;;;;;;;;IAG3B,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;CACN;AAED,eAAO,MAAM,QAAQ,WAAY,OAAO,KAAG,MAAM,IAAI,QAEpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.7.
|
|
1
|
+
{"version":"5.7.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-chess",
|
|
3
|
-
"version": "0.7.5-
|
|
3
|
+
"version": "0.7.5-main.2567c87",
|
|
4
4
|
"description": "Chess for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -34,43 +34,38 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@effect/schema": "^0.75.5",
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
|
-
"chess.js": "^1.0.0",
|
|
38
|
-
"react-chessboard": "^4.7.
|
|
39
|
-
"react-dnd-html5-backend": "^16.0.1",
|
|
37
|
+
"chess.js": "^1.0.0-beta.8",
|
|
38
|
+
"react-chessboard": "^4.7.1",
|
|
40
39
|
"react-resize-detector": "^11.0.1",
|
|
41
|
-
"@dxos/app-framework": "0.7.5-
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/plugin-
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-client": "0.7.5-labs.a279d8c",
|
|
53
|
-
"@dxos/react-ui-stack": "0.7.5-labs.a279d8c"
|
|
40
|
+
"@dxos/app-framework": "0.7.5-main.2567c87",
|
|
41
|
+
"@dxos/display-name": "0.7.5-main.2567c87",
|
|
42
|
+
"@dxos/async": "0.7.5-main.2567c87",
|
|
43
|
+
"@dxos/echo-schema": "0.7.5-main.2567c87",
|
|
44
|
+
"@dxos/invariant": "0.7.5-main.2567c87",
|
|
45
|
+
"@dxos/live-object": "0.7.5-main.2567c87",
|
|
46
|
+
"@dxos/plugin-client": "0.7.5-main.2567c87",
|
|
47
|
+
"@dxos/plugin-graph": "0.7.5-main.2567c87",
|
|
48
|
+
"@dxos/plugin-space": "0.7.5-main.2567c87",
|
|
49
|
+
"@dxos/react-ui-stack": "0.7.5-main.2567c87",
|
|
50
|
+
"@dxos/react-client": "0.7.5-main.2567c87"
|
|
54
51
|
},
|
|
55
52
|
"devDependencies": {
|
|
56
53
|
"@phosphor-icons/react": "^2.1.5",
|
|
57
54
|
"@types/react": "~18.2.0",
|
|
58
55
|
"@types/react-dom": "~18.2.0",
|
|
59
|
-
"effect": "^3.12.3",
|
|
60
56
|
"react": "~18.2.0",
|
|
61
57
|
"react-dom": "~18.2.0",
|
|
62
58
|
"vite": "5.4.7",
|
|
63
|
-
"@dxos/react-ui": "0.7.5-
|
|
64
|
-
"@dxos/react-ui-theme": "0.7.5-
|
|
65
|
-
"@dxos/storybook-utils": "0.7.5-
|
|
59
|
+
"@dxos/react-ui": "0.7.5-main.2567c87",
|
|
60
|
+
"@dxos/react-ui-theme": "0.7.5-main.2567c87",
|
|
61
|
+
"@dxos/storybook-utils": "0.7.5-main.2567c87"
|
|
66
62
|
},
|
|
67
63
|
"peerDependencies": {
|
|
68
64
|
"@phosphor-icons/react": "^2.1.5",
|
|
69
|
-
"effect": "^3.12.3",
|
|
70
65
|
"react": "~18.2.0",
|
|
71
66
|
"react-dom": "~18.2.0",
|
|
72
|
-
"@dxos/react-ui
|
|
73
|
-
"@dxos/react-ui": "0.7.5-
|
|
67
|
+
"@dxos/react-ui": "0.7.5-main.2567c87",
|
|
68
|
+
"@dxos/react-ui-theme": "0.7.5-main.2567c87"
|
|
74
69
|
},
|
|
75
70
|
"publishConfig": {
|
|
76
71
|
"access": "public"
|
package/src/ChessPlugin.tsx
CHANGED
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from '@dxos/app-framework';
|
|
14
14
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { IntentResolver, ReactSurface } from './capabilities';
|
|
17
17
|
import { CHESS_PLUGIN, meta } from './meta';
|
|
18
18
|
import translations from './translations';
|
|
19
|
-
import { ChessAction,
|
|
19
|
+
import { ChessAction, GameType } from './types';
|
|
20
20
|
|
|
21
21
|
export const ChessPlugin = () =>
|
|
22
22
|
definePlugin(meta, [
|
|
@@ -30,7 +30,7 @@ export const ChessPlugin = () =>
|
|
|
30
30
|
activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
31
31
|
activate: () =>
|
|
32
32
|
contributes(Capabilities.Metadata, {
|
|
33
|
-
id:
|
|
33
|
+
id: GameType.typename,
|
|
34
34
|
metadata: {
|
|
35
35
|
createObject: (props: { name?: string }) => createIntent(ChessAction.Create, props),
|
|
36
36
|
placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],
|
|
@@ -41,7 +41,7 @@ export const ChessPlugin = () =>
|
|
|
41
41
|
defineModule({
|
|
42
42
|
id: `${meta.id}/module/schema`,
|
|
43
43
|
activatesOn: ClientEvents.SetupClient,
|
|
44
|
-
activate: () => contributes(ClientCapabilities.Schema, [
|
|
44
|
+
activate: () => contributes(ClientCapabilities.Schema, [GameType]),
|
|
45
45
|
}),
|
|
46
46
|
defineModule({
|
|
47
47
|
id: `${meta.id}/module/react-surface`,
|
|
@@ -53,9 +53,4 @@ export const ChessPlugin = () =>
|
|
|
53
53
|
activatesOn: Events.Startup,
|
|
54
54
|
activate: IntentResolver,
|
|
55
55
|
}),
|
|
56
|
-
defineModule({
|
|
57
|
-
id: `${meta.id}/module/artifact`,
|
|
58
|
-
activatesOn: Events.Startup,
|
|
59
|
-
activate: Artifact,
|
|
60
|
-
}),
|
|
61
56
|
]);
|
|
@@ -2,23 +2,17 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Chess } from 'chess.js';
|
|
6
|
-
|
|
7
5
|
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
8
6
|
import { create } from '@dxos/live-object';
|
|
9
7
|
|
|
10
|
-
import { ChessAction,
|
|
8
|
+
import { ChessAction, GameType } from '../types';
|
|
11
9
|
|
|
12
10
|
export default () =>
|
|
13
11
|
contributes(
|
|
14
12
|
Capabilities.IntentResolver,
|
|
15
|
-
createResolver(ChessAction.Create, ({ name
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
object: create(ChessType, { name, fen, pgn }),
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}),
|
|
13
|
+
createResolver(ChessAction.Create, ({ name }) => ({
|
|
14
|
+
data: {
|
|
15
|
+
object: create(GameType, { name }),
|
|
16
|
+
},
|
|
17
|
+
})),
|
|
24
18
|
);
|
|
@@ -2,37 +2,21 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Chess } from 'chess.js';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
9
|
-
import { isInstanceOf } from '@dxos/echo-schema';
|
|
10
8
|
|
|
11
|
-
import {
|
|
9
|
+
import { ChessContainer } from '../components';
|
|
12
10
|
import { CHESS_PLUGIN } from '../meta';
|
|
13
|
-
import {
|
|
11
|
+
import { isObject, type GameType } from '../types';
|
|
14
12
|
|
|
15
13
|
export default () =>
|
|
16
|
-
contributes(
|
|
14
|
+
contributes(
|
|
15
|
+
Capabilities.ReactSurface,
|
|
17
16
|
createSurface({
|
|
18
17
|
id: CHESS_PLUGIN,
|
|
19
18
|
role: ['article', 'section'],
|
|
20
|
-
filter: (data): data is { subject:
|
|
19
|
+
filter: (data): data is { subject: GameType } => isObject(data.subject),
|
|
21
20
|
component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,
|
|
22
21
|
}),
|
|
23
|
-
|
|
24
|
-
id: 'plugin-chess',
|
|
25
|
-
role: 'canvas-node',
|
|
26
|
-
filter: (data): data is any => isInstanceOf(ChessType, data),
|
|
27
|
-
component: ({ data }) => (
|
|
28
|
-
<Chessboard
|
|
29
|
-
model={{ chess: new Chess(data.fen) }}
|
|
30
|
-
onUpdate={(move) => {
|
|
31
|
-
const board = new Chess(data.fen);
|
|
32
|
-
board.move(move);
|
|
33
|
-
data.value = board.fen();
|
|
34
|
-
}}
|
|
35
|
-
/>
|
|
36
|
-
),
|
|
37
|
-
}),
|
|
38
|
-
]);
|
|
22
|
+
);
|