@dxos/plugin-chess 0.7.5-feature-compute.4d9d99a → 0.7.5-labs.a279d8c
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-EG4RG2MG.mjs → ChessContainer-G736GS2V.mjs} +2 -2
- package/dist/lib/browser/artifact-YWAB5JJL.mjs +174 -0
- package/dist/lib/browser/artifact-YWAB5JJL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6NAJOKLY.mjs → chunk-JUAC2NNR.mjs} +4 -4
- package/dist/lib/browser/chunk-JUAC2NNR.mjs.map +7 -0
- package/dist/lib/browser/chunk-LAYER2WV.mjs +8 -0
- package/dist/lib/browser/{chunk-TRMP2D26.mjs → chunk-VYBCAEUF.mjs} +12 -9
- package/dist/lib/browser/chunk-VYBCAEUF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +25 -16
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-UZRNSQFI.mjs +25 -0
- package/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-EP4LXPH7.mjs +50 -0
- package/dist/lib/browser/react-surface-EP4LXPH7.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{ChessContainer-TSXBWAED.cjs → ChessContainer-P4BZ62FN.cjs} +6 -6
- package/dist/lib/node/artifact-YWL3LBIO.cjs +189 -0
- package/dist/lib/node/artifact-YWL3LBIO.cjs.map +7 -0
- package/dist/lib/node/{chunk-DI3I3BWN.cjs → chunk-6F6WTM5L.cjs} +5 -5
- package/dist/lib/node/{chunk-P2LVKNZF.cjs → chunk-HPYER4GF.cjs} +7 -7
- package/dist/lib/node/chunk-HPYER4GF.cjs.map +7 -0
- package/dist/lib/node/{chunk-NQRTWXBJ.cjs → chunk-J5YKJRP3.cjs} +14 -11
- package/dist/lib/node/chunk-J5YKJRP3.cjs.map +7 -0
- package/dist/lib/node/index.cjs +50 -38
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-7CF7WQVU.cjs → intent-resolver-AENA6D5K.cjs} +18 -12
- package/dist/lib/node/intent-resolver-AENA6D5K.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-X5VT3F77.cjs → react-surface-JMOSMAIC.cjs} +37 -18
- package/dist/lib/node/react-surface-JMOSMAIC.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-GP2KGMVU.mjs → ChessContainer-2LFJ6RHB.mjs} +2 -2
- package/dist/lib/node-esm/artifact-B6IEF7U5.mjs +175 -0
- package/dist/lib/node-esm/artifact-B6IEF7U5.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6DPPWWHM.mjs → chunk-OMGVSBVI.mjs} +4 -4
- package/dist/lib/node-esm/chunk-OMGVSBVI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-RMXO453C.mjs → chunk-QXDXLFXD.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-OJWLLKVP.mjs → chunk-TXUWVQWY.mjs} +12 -9
- package/dist/lib/node-esm/chunk-TXUWVQWY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +25 -16
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-NWEEQVXB.mjs → intent-resolver-T7NNHOYR.mjs} +16 -10
- package/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-ENB7VY45.mjs +51 -0
- package/dist/lib/node-esm/react-surface-ENB7VY45.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.d.ts +11 -0
- package/dist/types/src/capabilities/artifact.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/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.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- 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 +21 -17
- package/src/ChessPlugin.tsx +9 -4
- package/src/capabilities/artifact.ts +109 -0
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +12 -6
- package/src/capabilities/react-surface.tsx +22 -6
- package/src/components/Chess.tsx +7 -6
- package/src/components/Chessboard/Chessboard.tsx +1 -2
- package/src/index.ts +1 -0
- package/src/translations.ts +2 -2
- package/src/types/schema.ts +3 -1
- package/src/types/types.ts +6 -5
- package/dist/lib/browser/chunk-6NAJOKLY.mjs.map +0 -7
- package/dist/lib/browser/chunk-E24G3MMK.mjs +0 -8
- package/dist/lib/browser/chunk-TRMP2D26.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-HTTI4M6I.mjs +0 -19
- package/dist/lib/browser/intent-resolver-HTTI4M6I.mjs.map +0 -7
- package/dist/lib/browser/react-surface-O2LZGJGS.mjs +0 -28
- package/dist/lib/browser/react-surface-O2LZGJGS.mjs.map +0 -7
- package/dist/lib/node/chunk-NQRTWXBJ.cjs.map +0 -7
- package/dist/lib/node/chunk-P2LVKNZF.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-7CF7WQVU.cjs.map +0 -7
- package/dist/lib/node/react-surface-X5VT3F77.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-6DPPWWHM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OJWLLKVP.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-NWEEQVXB.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-S4UTZKHT.mjs +0 -29
- package/dist/lib/node-esm/react-surface-S4UTZKHT.mjs.map +0 -7
- /package/dist/lib/browser/{ChessContainer-EG4RG2MG.mjs.map → ChessContainer-G736GS2V.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-E24G3MMK.mjs.map → chunk-LAYER2WV.mjs.map} +0 -0
- /package/dist/lib/node/{ChessContainer-TSXBWAED.cjs.map → ChessContainer-P4BZ62FN.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-DI3I3BWN.cjs.map → chunk-6F6WTM5L.cjs.map} +0 -0
- /package/dist/lib/node-esm/{ChessContainer-GP2KGMVU.mjs.map → ChessContainer-2LFJ6RHB.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-RMXO453C.mjs.map → chunk-QXDXLFXD.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"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":18477,"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":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":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/meta.ts":{"bytes":1411,"imports":[],"format":"esm"},"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/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/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":686,"imports":[{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4370},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-E24G3MMK.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6NAJOKLY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-TRMP2D26.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/browser/intent-resolver-HTTI4M6I.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-O2LZGJGS.mjs","kind":"dynamic-import"}],"exports":["CHESS_PLUGIN","Chess","ChessContainer","ChessPanel","ChessPieces","ChessPlugin","Chessboard","boardStyles","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"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}},"bytes":2514},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-TRMP2D26.mjs","kind":"import-statement"}],"exports":["ChessAction","GameType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":192},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-EG4RG2MG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1207},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-EG4RG2MG.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6NAJOKLY.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":491}},"bytes":708},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-HTTI4M6I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":978},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-HTTI4M6I.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-TRMP2D26.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":562},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-O2LZGJGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1281},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-O2LZGJGS.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-E24G3MMK.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6NAJOKLY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-TRMP2D26.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":434}},"bytes":757},"packages/plugins/plugin-chess/dist/lib/browser/chunk-E24G3MMK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":424},"packages/plugins/plugin-chess/dist/lib/browser/chunk-E24G3MMK.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-EG4RG2MG.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-6NAJOKLY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":48665},"packages/plugins/plugin-chess/dist/lib/browser/chunk-6NAJOKLY.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":4745},"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":3989},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":35043},"packages/plugins/plugin-chess/dist/lib/browser/chunk-TRMP2D26.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3210},"packages/plugins/plugin-chess/dist/lib/browser/chunk-TRMP2D26.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":1573}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":1411,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytes":17413,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2531,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx":{"bytes":32344,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytes":6674,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytes":30948,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytes":704,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx","kind":"import-statement","original":"./custom"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx","kind":"import-statement","original":"./phosphor"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx","kind":"import-statement","original":"./riohacha"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytes":18372,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-dnd-html5-backend","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts","kind":"import-statement","original":"./pieces"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytes":529,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytes":14324,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":2405,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chess.tsx","kind":"import-statement","original":"./Chess"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":977,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chess.tsx","kind":"import-statement","original":"./Chess"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":4798,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1296,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact.ts","kind":"dynamic-import","original":"./artifact"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1825,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7326,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4729},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["Artifact","CHESS_PLUGIN","Chess","ChessContainer","ChessPanel","ChessPieces","ChessPlugin","Chessboard","IntentResolver","ReactSurface","boardStyles","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":252},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1474},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2743},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7574},"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytesInOutput":5454}},"bytes":5673},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1277},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":464}},"bytes":704},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1207},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":491}},"bytes":708},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2316},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":956}},"bytes":1314},"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":424},"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3470},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":247}},"bytes":1700},"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":48772},"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-dnd-html5-backend","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["Chess","ChessPanel","ChessPieces","Chessboard","boardStyles"],"inputs":{"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":4712},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx":{"bytesInOutput":12536},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytesInOutput":1678},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytesInOutput":11516},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytesInOutput":4053},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":35074}}}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChessContainer
|
|
3
|
+
} from "./chunk-LAYER2WV.mjs";
|
|
4
|
+
import {
|
|
5
|
+
CHESS_PLUGIN,
|
|
6
|
+
ChessType,
|
|
7
|
+
isObject
|
|
8
|
+
} from "./chunk-VYBCAEUF.mjs";
|
|
9
|
+
import {
|
|
10
|
+
Chessboard
|
|
11
|
+
} from "./chunk-JUAC2NNR.mjs";
|
|
12
|
+
|
|
13
|
+
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
14
|
+
import { Chess } from "chess.js";
|
|
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(Chessboard, {
|
|
36
|
+
model: {
|
|
37
|
+
chess: new Chess(data.fen)
|
|
38
|
+
},
|
|
39
|
+
onUpdate: (move) => {
|
|
40
|
+
const board = new Chess(data.fen);
|
|
41
|
+
board.move(move);
|
|
42
|
+
data.value = board.fen();
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
]);
|
|
47
|
+
export {
|
|
48
|
+
react_surface_default as default
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=react-surface-EP4LXPH7.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 { Chess } from 'chess.js';\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\n\nimport { Chessboard, ChessContainer } from '../components';\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 }) => (\n <Chessboard\n model={{ chess: new Chess(data.fen) }}\n onUpdate={(move) => {\n const board = new Chess(data.fen);\n board.move(move);\n data.value = board.fen();\n }}\n />\n ),\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,aAAa;AACtB,OAAOC,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,oBAAoB;AAM7B,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,MAChB,sBAAA,cAACQ,YAAAA;MACCC,OAAO;QAAEC,OAAO,IAAIC,MAAMX,KAAKY,GAAG;MAAE;MACpCC,UAAU,CAACC,SAAAA;AACT,cAAMC,QAAQ,IAAIJ,MAAMX,KAAKY,GAAG;AAChCG,cAAMD,KAAKA,IAAAA;AACXd,aAAKgB,QAAQD,MAAMH,IAAG;MACxB;;EAGN,CAAA;CACD;",
|
|
6
|
+
"names": ["Chess", "React", "Capabilities", "contributes", "createSurface", "isInstanceOf", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game", "isInstanceOf", "ChessType", "Chessboard", "model", "chess", "Chess", "fen", "onUpdate", "move", "board", "value"]
|
|
7
|
+
}
|
|
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var ChessContainer_P4BZ62FN_exports = {};
|
|
30
|
+
__export(ChessContainer_P4BZ62FN_exports, {
|
|
31
31
|
default: () => ChessContainer_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(ChessContainer_P4BZ62FN_exports);
|
|
34
|
+
var import_chunk_HPYER4GF = require("./chunk-HPYER4GF.cjs");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_echo = require("@dxos/react-client/echo");
|
|
37
37
|
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
@@ -42,11 +42,11 @@ var ChessContainer = ({ game, role }) => {
|
|
|
42
42
|
}
|
|
43
43
|
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
|
|
44
44
|
toolbar: false
|
|
45
|
-
}, /* @__PURE__ */ import_react.default.createElement(
|
|
45
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_chunk_HPYER4GF.Chess, {
|
|
46
46
|
game,
|
|
47
47
|
space,
|
|
48
48
|
playerSelector: role === "article"
|
|
49
49
|
}));
|
|
50
50
|
};
|
|
51
51
|
var ChessContainer_default = ChessContainer;
|
|
52
|
-
//# sourceMappingURL=ChessContainer-
|
|
52
|
+
//# sourceMappingURL=ChessContainer-P4BZ62FN.cjs.map
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var artifact_YWL3LBIO_exports = {};
|
|
20
|
+
__export(artifact_YWL3LBIO_exports, {
|
|
21
|
+
default: () => artifact_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(artifact_YWL3LBIO_exports);
|
|
24
|
+
var import_chunk_J5YKJRP3 = require("./chunk-J5YKJRP3.cjs");
|
|
25
|
+
var import_chess = require("chess.js");
|
|
26
|
+
var import_effect = require("effect");
|
|
27
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
28
|
+
var import_artifact = require("@dxos/artifact");
|
|
29
|
+
var import_assistant = require("@dxos/assistant");
|
|
30
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
31
|
+
var import_invariant = require("@dxos/invariant");
|
|
32
|
+
var import_types = require("@dxos/plugin-space/types");
|
|
33
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
34
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact.ts";
|
|
35
|
+
var artifact_default = () => {
|
|
36
|
+
const definition = (0, import_artifact.defineArtifact)({
|
|
37
|
+
id: "plugin-chess",
|
|
38
|
+
instructions: `
|
|
39
|
+
Chess:
|
|
40
|
+
- If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.
|
|
41
|
+
`,
|
|
42
|
+
schema: import_chunk_J5YKJRP3.ChessType,
|
|
43
|
+
tools: [
|
|
44
|
+
(0, import_artifact.defineTool)({
|
|
45
|
+
name: "chess_new",
|
|
46
|
+
description: "Create a new chess game. Returns the artifact definition for the game",
|
|
47
|
+
schema: import_echo_schema.S.Struct({
|
|
48
|
+
fen: import_echo_schema.S.String.annotations({
|
|
49
|
+
description: "The state of the chess game in the FEN format."
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
execute: async ({ fen }, { extensions }) => {
|
|
53
|
+
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
54
|
+
F: __dxlog_file,
|
|
55
|
+
L: 42,
|
|
56
|
+
S: void 0,
|
|
57
|
+
A: [
|
|
58
|
+
"extensions?.space",
|
|
59
|
+
"'No space'"
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
(0, import_invariant.invariant)(extensions?.dispatch, "No intent dispatcher", {
|
|
63
|
+
F: __dxlog_file,
|
|
64
|
+
L: 43,
|
|
65
|
+
S: void 0,
|
|
66
|
+
A: [
|
|
67
|
+
"extensions?.dispatch",
|
|
68
|
+
"'No intent dispatcher'"
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(import_chunk_J5YKJRP3.ChessAction.Create, {
|
|
72
|
+
fen
|
|
73
|
+
}), (0, import_app_framework.chain)(import_types.SpaceAction.AddObject, {
|
|
74
|
+
target: extensions.space
|
|
75
|
+
}));
|
|
76
|
+
const { data, error } = await extensions.dispatch(intent);
|
|
77
|
+
if (!data || error) {
|
|
78
|
+
return import_artifact.ToolResult.Error(error?.message ?? "Failed to create chess game");
|
|
79
|
+
}
|
|
80
|
+
return import_artifact.ToolResult.Success((0, import_assistant.createArtifactElement)(data.id));
|
|
81
|
+
}
|
|
82
|
+
}),
|
|
83
|
+
(0, import_artifact.defineTool)({
|
|
84
|
+
name: "chess_query",
|
|
85
|
+
description: "Query all active chess games.",
|
|
86
|
+
schema: import_echo_schema.S.Struct({}),
|
|
87
|
+
execute: async (_, { extensions }) => {
|
|
88
|
+
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
89
|
+
F: __dxlog_file,
|
|
90
|
+
L: 61,
|
|
91
|
+
S: void 0,
|
|
92
|
+
A: [
|
|
93
|
+
"extensions?.space",
|
|
94
|
+
"'No space'"
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_J5YKJRP3.ChessType)).run();
|
|
98
|
+
(0, import_invariant.invariant)(games.length > 0, "No chess games found", {
|
|
99
|
+
F: __dxlog_file,
|
|
100
|
+
L: 63,
|
|
101
|
+
S: void 0,
|
|
102
|
+
A: [
|
|
103
|
+
"games.length > 0",
|
|
104
|
+
"'No chess games found'"
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
return import_artifact.ToolResult.Success(games);
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
(0, import_artifact.defineTool)({
|
|
111
|
+
name: "chess_inspect",
|
|
112
|
+
description: "Get the current state of the chess game.",
|
|
113
|
+
schema: import_echo_schema.S.Struct({
|
|
114
|
+
id: import_echo_schema.ObjectId
|
|
115
|
+
}),
|
|
116
|
+
execute: async ({ id }, { extensions }) => {
|
|
117
|
+
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
118
|
+
F: __dxlog_file,
|
|
119
|
+
L: 72,
|
|
120
|
+
S: void 0,
|
|
121
|
+
A: [
|
|
122
|
+
"extensions?.space",
|
|
123
|
+
"'No space'"
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_J5YKJRP3.ChessType)).run();
|
|
127
|
+
const game = games.find((game2) => game2.id === id);
|
|
128
|
+
(0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_J5YKJRP3.ChessType, game), void 0, {
|
|
129
|
+
F: __dxlog_file,
|
|
130
|
+
L: 75,
|
|
131
|
+
S: void 0,
|
|
132
|
+
A: [
|
|
133
|
+
"isInstanceOf(ChessType, game)",
|
|
134
|
+
""
|
|
135
|
+
]
|
|
136
|
+
});
|
|
137
|
+
return import_artifact.ToolResult.Success(game.fen);
|
|
138
|
+
}
|
|
139
|
+
}),
|
|
140
|
+
(0, import_artifact.defineTool)({
|
|
141
|
+
name: "chess_move",
|
|
142
|
+
description: "Make a move in the chess game.",
|
|
143
|
+
schema: import_echo_schema.S.Struct({
|
|
144
|
+
id: import_echo_schema.ObjectId,
|
|
145
|
+
move: import_echo_schema.S.String.annotations({
|
|
146
|
+
description: "The move to make in the chess game.",
|
|
147
|
+
examples: [
|
|
148
|
+
"e4",
|
|
149
|
+
"Bf3"
|
|
150
|
+
]
|
|
151
|
+
})
|
|
152
|
+
}),
|
|
153
|
+
execute: async ({ id, move }, { extensions }) => {
|
|
154
|
+
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
155
|
+
F: __dxlog_file,
|
|
156
|
+
L: 90,
|
|
157
|
+
S: void 0,
|
|
158
|
+
A: [
|
|
159
|
+
"extensions?.space",
|
|
160
|
+
"'No space'"
|
|
161
|
+
]
|
|
162
|
+
});
|
|
163
|
+
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_J5YKJRP3.ChessType)).run();
|
|
164
|
+
const game = games.find((game2) => game2.id === id);
|
|
165
|
+
(0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_J5YKJRP3.ChessType, game), void 0, {
|
|
166
|
+
F: __dxlog_file,
|
|
167
|
+
L: 93,
|
|
168
|
+
S: void 0,
|
|
169
|
+
A: [
|
|
170
|
+
"isInstanceOf(ChessType, game)",
|
|
171
|
+
""
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
const board = new import_chess.Chess(game.fen);
|
|
175
|
+
try {
|
|
176
|
+
board.move(move);
|
|
177
|
+
} catch (error) {
|
|
178
|
+
return import_artifact.ToolResult.Error(error.message);
|
|
179
|
+
}
|
|
180
|
+
game.pgn = board.pgn();
|
|
181
|
+
game.fen = board.fen();
|
|
182
|
+
return import_artifact.ToolResult.Success(game.fen);
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
});
|
|
187
|
+
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.ArtifactDefinition, definition);
|
|
188
|
+
};
|
|
189
|
+
//# sourceMappingURL=artifact-YWL3LBIO.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/artifact.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport { pipe } from 'effect';\n\nimport { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';\nimport { defineArtifact, defineTool, ToolResult } from '@dxos/artifact';\nimport { createArtifactElement } from '@dxos/assistant';\nimport { isInstanceOf, ObjectId, S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter, type Space } from '@dxos/react-client/echo';\n\nimport { ChessAction, ChessType } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n space?: Space;\n dispatch?: PromiseIntentDispatcher;\n }\n}\n\nexport default () => {\n const definition = defineArtifact({\n id: 'plugin-chess',\n instructions: `\n Chess:\n - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.\n `,\n schema: ChessType,\n tools: [\n defineTool({\n name: 'chess_new',\n description: 'Create a new chess game. Returns the artifact definition for the game',\n schema: S.Struct({\n fen: S.String.annotations({ description: 'The state of the chess game in the FEN format.' }),\n }),\n execute: async ({ fen }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n invariant(extensions?.dispatch, 'No intent dispatcher');\n const intent = pipe(\n createIntent(ChessAction.Create, { fen }),\n chain(SpaceAction.AddObject, { target: extensions.space }),\n );\n const { data, error } = await extensions.dispatch(intent);\n if (!data || error) {\n return ToolResult.Error(error?.message ?? 'Failed to create chess game');\n }\n\n return ToolResult.Success(createArtifactElement(data.id));\n },\n }),\n defineTool({\n name: 'chess_query',\n description: 'Query all active chess games.',\n schema: S.Struct({}),\n execute: async (_, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n invariant(games.length > 0, 'No chess games found');\n return ToolResult.Success(games);\n },\n }),\n defineTool({\n name: 'chess_inspect',\n description: 'Get the current state of the chess game.',\n schema: S.Struct({ id: ObjectId }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n const game = games.find((game) => game.id === id);\n invariant(isInstanceOf(ChessType, game));\n return ToolResult.Success(game.fen);\n },\n }),\n defineTool({\n name: 'chess_move',\n description: 'Make a move in the chess game.',\n schema: S.Struct({\n id: ObjectId,\n move: S.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n execute: async ({ id, move }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n const game = games.find((game) => game.id === id);\n invariant(isInstanceOf(ChessType, game));\n const board = new Chess(game.fen);\n try {\n board.move(move);\n } catch (error: any) {\n return ToolResult.Error(error.message);\n }\n game.pgn = board.pgn();\n game.fen = board.fen();\n return ToolResult.Success(game.fen);\n },\n }),\n ],\n });\n\n return contributes(Capabilities.ArtifactDefinition, definition);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,oBAAqB;AAErB,2BAA6F;AAC7F,sBAAuD;AACvD,uBAAsC;AACtC,yBAA0C;AAC1C,uBAA0B;AAC1B,mBAA4B;AAC5B,kBAAmC;;AAYnC,IAAA,mBAAe,MAAA;AACb,QAAMA,iBAAaC,gCAAe;IAChCC,IAAI;IACJC,cAAc;;;;IAIdC,QAAQC;IACRC,OAAO;UACLC,4BAAW;QACTC,MAAM;QACNC,aAAa;QACbL,QAAQM,qBAAEC,OAAO;UACfC,KAAKF,qBAAEG,OAAOC,YAAY;YAAEL,aAAa;UAAiD,CAAA;QAC5F,CAAA;QACAM,SAAS,OAAO,EAAEH,IAAG,GAAI,EAAEI,WAAU,MAAE;AACrCC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7BD,0CAAUD,YAAYG,UAAU,wBAAA;;;;;;;;;AAChC,gBAAMC,aAASC,wBACbC,mCAAaC,kCAAYC,QAAQ;YAAEZ;UAAI,CAAA,OACvCa,4BAAMC,yBAAYC,WAAW;YAAEC,QAAQZ,WAAWE;UAAM,CAAA,CAAA;AAE1D,gBAAM,EAAEW,MAAMC,MAAK,IAAK,MAAMd,WAAWG,SAASC,MAAAA;AAClD,cAAI,CAACS,QAAQC,OAAO;AAClB,mBAAOC,2BAAWC,MAAMF,OAAOG,WAAW,6BAAA;UAC5C;AAEA,iBAAOF,2BAAWG,YAAQC,wCAAsBN,KAAK3B,EAAE,CAAA;QACzD;MACF,CAAA;UACAK,4BAAW;QACTC,MAAM;QACNC,aAAa;QACbL,QAAQM,qBAAEC,OAAO,CAAC,CAAA;QAClBI,SAAS,OAAOqB,GAAG,EAAEpB,WAAU,MAAE;AAC/BC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOrC,OAAOC,+BAAAA,CAAAA,EAAYqC,IAAG;AACxFzB,0CAAUqB,MAAMK,SAAS,GAAG,wBAAA;;;;;;;;;AAC5B,iBAAOZ,2BAAWG,QAAQI,KAAAA;QAC5B;MACF,CAAA;UACA/B,4BAAW;QACTC,MAAM;QACNC,aAAa;QACbL,QAAQM,qBAAEC,OAAO;UAAET,IAAI0C;QAAS,CAAA;QAChC7B,SAAS,OAAO,EAAEb,GAAE,GAAI,EAAEc,WAAU,MAAE;AACpCC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOrC,OAAOC,+BAAAA,CAAAA,EAAYqC,IAAG;AACxF,gBAAMG,OAAOP,MAAMQ,KAAK,CAACD,UAASA,MAAK3C,OAAOA,EAAAA;AAC9Ce,8CAAU8B,iCAAa1C,iCAAWwC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAClC,iBAAOd,2BAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;UACAL,4BAAW;QACTC,MAAM;QACNC,aAAa;QACbL,QAAQM,qBAAEC,OAAO;UACfT,IAAI0C;UACJI,MAAMtC,qBAAEG,OAAOC,YAAY;YACzBL,aAAa;YACbwC,UAAU;cAAC;cAAM;;UACnB,CAAA;QACF,CAAA;QACAlC,SAAS,OAAO,EAAEb,IAAI8C,KAAI,GAAI,EAAEhC,WAAU,MAAE;AAC1CC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOrC,OAAOC,+BAAAA,CAAAA,EAAYqC,IAAG;AACxF,gBAAMG,OAAOP,MAAMQ,KAAK,CAACD,UAASA,MAAK3C,OAAOA,EAAAA;AAC9Ce,8CAAU8B,iCAAa1C,iCAAWwC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAClC,gBAAMK,QAAQ,IAAIC,mBAAMN,KAAKjC,GAAG;AAChC,cAAI;AACFsC,kBAAMF,KAAKA,IAAAA;UACb,SAASlB,OAAY;AACnB,mBAAOC,2BAAWC,MAAMF,MAAMG,OAAO;UACvC;AACAY,eAAKO,MAAMF,MAAME,IAAG;AACpBP,eAAKjC,MAAMsC,MAAMtC,IAAG;AACpB,iBAAOmB,2BAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;;EAEJ,CAAA;AAEA,aAAOyC,kCAAYC,kCAAaC,oBAAoBvD,UAAAA;AACtD;",
|
|
6
|
+
"names": ["definition", "defineArtifact", "id", "instructions", "schema", "ChessType", "tools", "defineTool", "name", "description", "S", "Struct", "fen", "String", "annotations", "execute", "extensions", "invariant", "space", "dispatch", "intent", "pipe", "createIntent", "ChessAction", "Create", "chain", "SpaceAction", "AddObject", "target", "data", "error", "ToolResult", "Error", "message", "Success", "createArtifactElement", "_", "objects", "games", "db", "query", "Filter", "run", "length", "ObjectId", "game", "find", "isInstanceOf", "move", "examples", "board", "Chess", "pgn", "contributes", "Capabilities", "ArtifactDefinition"]
|
|
7
|
+
}
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_6F6WTM5L_exports = {};
|
|
30
|
+
__export(chunk_6F6WTM5L_exports, {
|
|
31
31
|
ChessContainer: () => ChessContainer
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_6F6WTM5L_exports);
|
|
34
34
|
var import_react = require("react");
|
|
35
|
-
var ChessContainer = (0, import_react.lazy)(() => import("./ChessContainer-
|
|
35
|
+
var ChessContainer = (0, import_react.lazy)(() => import("./ChessContainer-P4BZ62FN.cjs"));
|
|
36
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
37
|
0 && (module.exports = {
|
|
38
38
|
ChessContainer
|
|
39
39
|
});
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-6F6WTM5L.cjs.map
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_HPYER4GF_exports = {};
|
|
30
|
+
__export(chunk_HPYER4GF_exports, {
|
|
31
31
|
Chess: () => Chess2,
|
|
32
32
|
ChessPanel: () => ChessPanel,
|
|
33
33
|
ChessPieces: () => ChessPieces,
|
|
34
34
|
Chessboard: () => Chessboard,
|
|
35
35
|
boardStyles: () => boardStyles
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(chunk_HPYER4GF_exports);
|
|
38
38
|
var import_react = require("@phosphor-icons/react");
|
|
39
39
|
var import_chess = require("chess.js");
|
|
40
40
|
var import_react2 = __toESM(require("react"));
|
|
@@ -412,8 +412,7 @@ var Chessboard = ({ model: { chess }, orientation = "w", readonly = false, board
|
|
|
412
412
|
boardWidth: width && height ? Math.min(width, height) : void 0,
|
|
413
413
|
boardOrientation: orientation === "w" ? "white" : "black",
|
|
414
414
|
allowDragOutsideBoard: false,
|
|
415
|
-
arePiecesDraggable:
|
|
416
|
-
// arePiecesDraggable={!readonly}
|
|
415
|
+
arePiecesDraggable: !readonly,
|
|
417
416
|
customPieces: chessPieces[pieces4],
|
|
418
417
|
position: chess.fen(),
|
|
419
418
|
onPieceDrop: handleDrop,
|
|
@@ -466,7 +465,7 @@ var useChessModel = (game) => {
|
|
|
466
465
|
const [model, setModel] = (0, import_react8.useState)();
|
|
467
466
|
(0, import_react8.useEffect)(() => {
|
|
468
467
|
if (!model || game.pgn !== model?.chess.pgn()) {
|
|
469
|
-
const chess = new import_chess2.Chess();
|
|
468
|
+
const chess = new import_chess2.Chess(game.pgn ? void 0 : game.fen);
|
|
470
469
|
if (game.pgn) {
|
|
471
470
|
chess.loadPgn(game.pgn);
|
|
472
471
|
}
|
|
@@ -489,6 +488,7 @@ var useChessModel = (game) => {
|
|
|
489
488
|
});
|
|
490
489
|
if (model.chess.move(move)) {
|
|
491
490
|
game.pgn = model.chess.pgn();
|
|
491
|
+
game.fen = model.chess.fen();
|
|
492
492
|
setModel({
|
|
493
493
|
...model
|
|
494
494
|
});
|
|
@@ -571,4 +571,4 @@ var PlayerSelect = ({ side, value, onValueChange, members }) => {
|
|
|
571
571
|
Chessboard,
|
|
572
572
|
boardStyles
|
|
573
573
|
});
|
|
574
|
-
//# sourceMappingURL=chunk-
|
|
574
|
+
//# sourceMappingURL=chunk-HPYER4GF.cjs.map
|