@dxos/plugin-chess 0.8.2-staging.7ac8446 → 0.8.3-main.672df60
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-S72CLKGK.mjs +101 -0
- package/dist/lib/{node-esm/ChessContainer-MAXLUGKY.mjs.map → browser/ChessContainer-S72CLKGK.mjs.map} +1 -1
- package/dist/lib/browser/{artifact-definition-GHBVTO4Y.mjs → artifact-definition-QYGM7HNY.mjs} +31 -32
- package/dist/lib/browser/artifact-definition-QYGM7HNY.mjs.map +7 -0
- package/dist/lib/browser/chunk-5QBQW62M.mjs +8 -0
- package/dist/lib/browser/chunk-6XPI4FTK.mjs +61 -0
- package/dist/lib/browser/chunk-6XPI4FTK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4NJ4PMPW.mjs → chunk-77TLTU3X.mjs} +25 -23
- package/dist/lib/browser/chunk-77TLTU3X.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/{intent-resolver-JVLCHAJD.mjs → intent-resolver-FLV47FUV.mjs} +4 -4
- package/dist/lib/browser/intent-resolver-FLV47FUV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-LZYVKHCU.mjs → react-surface-QW2WGAAJ.mjs} +4 -4
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/ChessContainer-EQUVXDJC.cjs +123 -0
- package/dist/lib/node/{ChessContainer-BZMTO4FZ.cjs.map → ChessContainer-EQUVXDJC.cjs.map} +1 -1
- package/dist/lib/node/{artifact-definition-JDJAOTXF.cjs → artifact-definition-FRBMG5FU.cjs} +41 -42
- package/dist/lib/node/artifact-definition-FRBMG5FU.cjs.map +7 -0
- package/dist/lib/node/{chunk-PQ64RGCS.cjs → chunk-33WBRZI6.cjs} +23 -21
- package/dist/lib/node/chunk-33WBRZI6.cjs.map +7 -0
- package/dist/lib/node/{chunk-CSRNUKOH.cjs → chunk-OTMP6HPY.cjs} +50 -31
- package/dist/lib/node/chunk-OTMP6HPY.cjs.map +7 -0
- package/dist/lib/node/{chunk-WKOWLRXP.cjs → chunk-R6JAL3RE.cjs} +5 -5
- package/dist/lib/node/index.cjs +22 -22
- package/dist/lib/node/{intent-resolver-IJXRCQA5.cjs → intent-resolver-AKAIXSZF.cjs} +7 -7
- package/dist/lib/node/intent-resolver-AKAIXSZF.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-JWVHHTQU.cjs → react-surface-7G7NV4FY.cjs} +12 -12
- package/dist/lib/node/types/index.cjs +5 -5
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs +102 -0
- package/dist/lib/{browser/ChessContainer-6JIE36JW.mjs.map → node-esm/ChessContainer-KSLGJHPW.mjs.map} +1 -1
- package/dist/lib/node-esm/{artifact-definition-CSY4I334.mjs → artifact-definition-YKVCYZQ7.mjs} +31 -32
- package/dist/lib/node-esm/artifact-definition-YKVCYZQ7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YFCRXSGH.mjs → chunk-KHMDMPR2.mjs} +2 -2
- package/dist/lib/node-esm/chunk-MVMMCPHE.mjs +63 -0
- package/dist/lib/node-esm/chunk-MVMMCPHE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GLBZ7ZZD.mjs → chunk-WPCT7LRN.mjs} +25 -23
- package/dist/lib/node-esm/chunk-WPCT7LRN.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +6 -6
- package/dist/lib/node-esm/{intent-resolver-AWNZCS56.mjs → intent-resolver-VK3EDUMM.mjs} +4 -4
- package/dist/lib/node-esm/intent-resolver-VK3EDUMM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-TQKBCMJU.mjs → react-surface-Y54QUEUA.mjs} +4 -4
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/components/ChessComponent.d.ts.map +1 -1
- package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
- package/dist/types/src/components/PlayerSelector.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +15 -15
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +7 -7
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -22
- package/src/capabilities/artifact-definition.ts +25 -18
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/components/ChessComponent.tsx +6 -1
- package/src/types/schema.ts +15 -13
- package/src/types/types.ts +10 -8
- package/dist/lib/browser/ChessContainer-6JIE36JW.mjs +0 -84
- package/dist/lib/browser/artifact-definition-GHBVTO4Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-4NJ4PMPW.mjs.map +0 -7
- package/dist/lib/browser/chunk-7SPN7XYA.mjs +0 -8
- package/dist/lib/browser/chunk-VRWXC5L2.mjs +0 -42
- package/dist/lib/browser/chunk-VRWXC5L2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JVLCHAJD.mjs.map +0 -7
- package/dist/lib/node/ChessContainer-BZMTO4FZ.cjs +0 -106
- package/dist/lib/node/artifact-definition-JDJAOTXF.cjs.map +0 -7
- package/dist/lib/node/chunk-CSRNUKOH.cjs.map +0 -7
- package/dist/lib/node/chunk-PQ64RGCS.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-IJXRCQA5.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs +0 -85
- package/dist/lib/node-esm/artifact-definition-CSY4I334.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6SEDGO5G.mjs +0 -44
- package/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GLBZ7ZZD.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-AWNZCS56.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-7SPN7XYA.mjs.map → chunk-5QBQW62M.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-LZYVKHCU.mjs.map → react-surface-QW2WGAAJ.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-WKOWLRXP.cjs.map → chunk-R6JAL3RE.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-JWVHHTQU.cjs.map → react-surface-7G7NV4FY.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-YFCRXSGH.mjs.map → chunk-KHMDMPR2.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-TQKBCMJU.mjs.map → react-surface-Y54QUEUA.mjs.map} +0 -0
|
@@ -16,8 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_33WBRZI6_exports = {};
|
|
20
|
+
__export(chunk_33WBRZI6_exports, {
|
|
21
21
|
CHESS_PLUGIN: () => CHESS_PLUGIN,
|
|
22
22
|
ChessAction: () => ChessAction,
|
|
23
23
|
ChessType: () => ChessType,
|
|
@@ -25,26 +25,28 @@ __export(chunk_PQ64RGCS_exports, {
|
|
|
25
25
|
isObject: () => isObject,
|
|
26
26
|
meta: () => meta
|
|
27
27
|
});
|
|
28
|
-
module.exports = __toCommonJS(
|
|
28
|
+
module.exports = __toCommonJS(chunk_33WBRZI6_exports);
|
|
29
|
+
var import_effect = require("effect");
|
|
29
30
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
31
|
+
var import_effect2 = require("effect");
|
|
30
32
|
var import_echo_schema2 = require("@dxos/echo-schema");
|
|
31
33
|
var import_live_object = require("@dxos/live-object");
|
|
32
|
-
var MoveSchema =
|
|
33
|
-
source:
|
|
34
|
-
target:
|
|
35
|
-
piece:
|
|
34
|
+
var MoveSchema = import_effect.Schema.mutable(import_effect.Schema.partial(import_effect.Schema.Struct({
|
|
35
|
+
source: import_effect.Schema.String,
|
|
36
|
+
target: import_effect.Schema.String,
|
|
37
|
+
piece: import_effect.Schema.String
|
|
36
38
|
})));
|
|
37
39
|
var ChessType = class extends (0, import_echo_schema.TypedObject)({
|
|
38
40
|
typename: "dxos.org/type/Chess",
|
|
39
41
|
version: "0.1.0"
|
|
40
42
|
})({
|
|
41
|
-
name:
|
|
42
|
-
playerWhite:
|
|
43
|
-
playerBlack:
|
|
44
|
-
moves:
|
|
43
|
+
name: import_effect.Schema.optional(import_effect.Schema.String),
|
|
44
|
+
playerWhite: import_effect.Schema.String,
|
|
45
|
+
playerBlack: import_effect.Schema.String,
|
|
46
|
+
moves: import_effect.Schema.mutable(import_effect.Schema.Array(import_effect.Schema.String)),
|
|
45
47
|
// TODO(wittjosiah): Remove. Redundant with moves.
|
|
46
|
-
pgn:
|
|
47
|
-
fen:
|
|
48
|
+
pgn: import_effect.Schema.String,
|
|
49
|
+
fen: import_effect.Schema.String
|
|
48
50
|
}, {
|
|
49
51
|
partial: true
|
|
50
52
|
}) {
|
|
@@ -60,15 +62,14 @@ var meta = {
|
|
|
60
62
|
"https://dxos.network/plugin-details-chess-dark.png"
|
|
61
63
|
]
|
|
62
64
|
};
|
|
63
|
-
var ChessAction;
|
|
64
65
|
(function(ChessAction2) {
|
|
65
66
|
const CHESS_ACTION = `${CHESS_PLUGIN}/action`;
|
|
66
|
-
class Create extends
|
|
67
|
-
input:
|
|
68
|
-
name:
|
|
69
|
-
fen:
|
|
67
|
+
class Create extends import_effect2.Schema.TaggedClass()(`${CHESS_ACTION}/create`, {
|
|
68
|
+
input: import_effect2.Schema.Struct({
|
|
69
|
+
name: import_effect2.Schema.optional(import_effect2.Schema.String),
|
|
70
|
+
fen: import_effect2.Schema.optional(import_effect2.Schema.String)
|
|
70
71
|
}),
|
|
71
|
-
output:
|
|
72
|
+
output: import_effect2.Schema.Struct({
|
|
72
73
|
object: ChessType
|
|
73
74
|
})
|
|
74
75
|
}) {
|
|
@@ -76,8 +77,9 @@ var ChessAction;
|
|
|
76
77
|
ChessAction2.Create = Create;
|
|
77
78
|
})(ChessAction || (ChessAction = {}));
|
|
78
79
|
var isObject = (object) => {
|
|
79
|
-
return (0, import_live_object.
|
|
80
|
+
return (0, import_live_object.isLiveObject)(object) && (0, import_echo_schema2.isInstanceOf)(ChessType, object);
|
|
80
81
|
};
|
|
82
|
+
var ChessAction;
|
|
81
83
|
// Annotate the CommonJS export names for ESM import in node:
|
|
82
84
|
0 && (module.exports = {
|
|
83
85
|
CHESS_PLUGIN,
|
|
@@ -87,4 +89,4 @@ var isObject = (object) => {
|
|
|
87
89
|
isObject,
|
|
88
90
|
meta
|
|
89
91
|
});
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-33WBRZI6.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts", "../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\n\nexport const MoveSchema = Schema.mutable(\n Schema.partial(\n Schema.Struct({\n source: Schema.String,\n target: Schema.String,\n piece: Schema.String,\n }),\n ),\n);\n\nexport class ChessType extends TypedObject({ typename: 'dxos.org/type/Chess', version: '0.1.0' })(\n {\n name: Schema.optional(Schema.String),\n playerWhite: Schema.String,\n playerBlack: Schema.String,\n moves: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Remove. Redundant with moves.\n pgn: Schema.String,\n fen: Schema.String,\n },\n { partial: true },\n) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { isLiveObject } from '@dxos/live-object';\n\nimport { ChessType } from './schema';\nimport { CHESS_PLUGIN } from '../meta';\n\nexport namespace ChessAction {\n const CHESS_ACTION = `${CHESS_PLUGIN}/action`;\n\n export class Create extends Schema.TaggedClass<Create>()(`${CHESS_ACTION}/create`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n fen: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: ChessType,\n }),\n }) {}\n}\n\nexport const isObject = (object: unknown): object is typeof ChessType => {\n return isLiveObject(object) && isInstanceOf(ChessType, object);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CHESS_PLUGIN = 'dxos.org/plugin/chess';\n\nexport const meta: PluginMeta = {\n id: CHESS_PLUGIN,\n name: 'Chess',\n description:\n 'Chess is a simple plugin which allows you to render an interactive chessboard inside of a plank. This chessboard can be used for collaborative chess games, or for practice experiments with the LLM. ',\n icon: 'ph--shield-chevron--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n screenshots: ['https://dxos.network/plugin-details-chess-dark.png'],\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AAEvB,yBAA4B;ACF5B,IAAAA,iBAAuB;AAEvB,IAAAC,sBAA6B;AAC7B,yBAA6B;ADCtB,IAAMC,aAAaC,qBAAOC,QAC/BD,qBAAOE,QACLF,qBAAOG,OAAO;EACZC,QAAQJ,qBAAOK;EACfC,QAAQN,qBAAOK;EACfE,OAAOP,qBAAOK;AAChB,CAAA,CAAA,CAAA;AAIG,IAAMG,YAAN,kBAAwBC,gCAAY;EAAEC,UAAU;EAAuBC,SAAS;AAAQ,CAAA,EAC7F;EACEC,MAAMZ,qBAAOa,SAASb,qBAAOK,MAAM;EACnCS,aAAad,qBAAOK;EACpBU,aAAaf,qBAAOK;EACpBW,OAAOhB,qBAAOC,QAAQD,qBAAOiB,MAAMjB,qBAAOK,MAAM,CAAA;;EAEhDa,KAAKlB,qBAAOK;EACZc,KAAKnB,qBAAOK;AACd,GACA;EAAEH,SAAS;AAAK,CAAA,EAAA;AACf;AEvBI,IAAMkB,eAAe;AAErB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJR,MAAM;EACNW,aACE;EACFC,MAAM;EACNpB,QAAQ;EACRqB,aAAa;IAAC;;AAChB;UDJiBC,cAAAA;AACf,QAAMC,eAAe,GAAGP,YAAAA;EAEjB,MAAMQ,eAAe5B,eAAAA,OAAO6B,YAAW,EAAW,GAAGF,YAAAA,WAAuB;IACjFG,OAAO9B,eAAAA,OAAOG,OAAO;MACnBS,MAAMZ,eAAAA,OAAOa,SAASb,eAAAA,OAAOK,MAAM;MACnCc,KAAKnB,eAAAA,OAAOa,SAASb,eAAAA,OAAOK,MAAM;IACpC,CAAA;IACA0B,QAAQ/B,eAAAA,OAAOG,OAAO;MACpB6B,QAAQxB;IACV,CAAA;EACF,CAAA,EAAA;EAAI;eARSoB,SAAAA;AASf,GAZiBF,gBAAAA,cAAAA,CAAAA,EAAAA;AAcV,IAAMO,WAAW,CAACD,WAAAA;AACvB,aAAOE,iCAAaF,MAAAA,SAAWG,kCAAa3B,WAAWwB,MAAAA;AACzD;;",
|
|
6
|
+
"names": ["import_effect", "import_echo_schema", "MoveSchema", "Schema", "mutable", "partial", "Struct", "source", "String", "target", "piece", "ChessType", "TypedObject", "typename", "version", "name", "optional", "playerWhite", "playerBlack", "moves", "Array", "pgn", "fen", "CHESS_PLUGIN", "meta", "id", "description", "icon", "screenshots", "ChessAction", "CHESS_ACTION", "Create", "TaggedClass", "input", "output", "object", "isObject", "isLiveObject", "isInstanceOf"]
|
|
7
|
+
}
|
|
@@ -26,49 +26,68 @@ 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_OTMP6HPY_exports = {};
|
|
30
|
+
__export(chunk_OTMP6HPY_exports, {
|
|
31
31
|
ChessComponent: () => ChessComponent
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_OTMP6HPY_exports);
|
|
34
|
+
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
34
35
|
var import_chess = require("chess.js");
|
|
35
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_log = require("@dxos/log");
|
|
36
38
|
var import_echo = require("@dxos/react-client/echo");
|
|
37
39
|
var import_react_ui_gameboard = require("@dxos/react-ui-gameboard");
|
|
40
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/components/ChessComponent.tsx";
|
|
38
41
|
var ChessComponent = ({ game }) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (game.pgn) {
|
|
44
|
-
chess.
|
|
42
|
+
var _effect = (0, import_tracking.useSignals)();
|
|
43
|
+
try {
|
|
44
|
+
const model = (0, import_react.useMemo)(() => new import_react_ui_gameboard.ChessModel(), []);
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
if (!model || game.pgn !== model?.game.pgn()) {
|
|
47
|
+
const chess = new import_chess.Chess();
|
|
48
|
+
if (game.pgn) {
|
|
49
|
+
try {
|
|
50
|
+
chess.loadPgn(game.pgn);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
import_log.log.catch(err, {
|
|
53
|
+
game
|
|
54
|
+
}, {
|
|
55
|
+
F: __dxlog_file,
|
|
56
|
+
L: 23,
|
|
57
|
+
S: void 0,
|
|
58
|
+
C: (f, a) => f(...a)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
model.initialize(chess.fen());
|
|
45
63
|
}
|
|
46
|
-
|
|
64
|
+
}, [
|
|
65
|
+
game.pgn
|
|
66
|
+
]);
|
|
67
|
+
const space = (0, import_echo.getSpace)(game);
|
|
68
|
+
if (!space) {
|
|
69
|
+
return null;
|
|
47
70
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
71
|
+
const handleDrop = (0, import_react.useCallback)((move) => {
|
|
72
|
+
if (model.makeMove(move)) {
|
|
73
|
+
game.pgn = model.game.pgn();
|
|
74
|
+
game.fen = model.game.fen();
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}, [
|
|
79
|
+
model
|
|
80
|
+
]);
|
|
81
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Board.Root, {
|
|
82
|
+
model,
|
|
83
|
+
onDrop: handleDrop
|
|
84
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Chessboard, null));
|
|
85
|
+
} finally {
|
|
86
|
+
_effect.f();
|
|
54
87
|
}
|
|
55
|
-
const handleDrop = (0, import_react.useCallback)((move) => {
|
|
56
|
-
if (model.makeMove(move)) {
|
|
57
|
-
game.pgn = model.game.pgn();
|
|
58
|
-
game.fen = model.game.fen();
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}, [
|
|
63
|
-
model
|
|
64
|
-
]);
|
|
65
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Board.Root, {
|
|
66
|
-
model,
|
|
67
|
-
onDrop: handleDrop
|
|
68
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Chessboard, null));
|
|
69
88
|
};
|
|
70
89
|
// Annotate the CommonJS export names for ESM import in node:
|
|
71
90
|
0 && (module.exports = {
|
|
72
91
|
ChessComponent
|
|
73
92
|
});
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-OTMP6HPY.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/ChessComponent.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n\nimport { log } from '@dxos/log';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n try {\n chess.loadPgn(game.pgn);\n } catch (err) {\n log.catch(err, { game });\n }\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n game.fen = model.game.fen();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,mBAAuD;AAEvD,iBAAoB;AACpB,kBAAyB;AACzB,gCAAmE;;AAI5D,IAAMA,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;;;AAC1D,UAAMC,YAAQC,sBAAQ,MAAM,IAAIC,qCAAAA,GAAc,CAAA,CAAE;AAChDC,gCAAU,MAAA;AACR,UAAI,CAACH,SAASD,KAAKK,QAAQJ,OAAOD,KAAKK,IAAAA,GAAO;AAC5C,cAAMC,QAAQ,IAAIC,mBAAAA;AAClB,YAAIP,KAAKK,KAAK;AACZ,cAAI;AACFC,kBAAME,QAAQR,KAAKK,GAAG;UACxB,SAASI,KAAK;AACZC,2BAAIC,MAAMF,KAAK;cAAET;YAAK,GAAA;;;;;;UACxB;QACF;AAEAC,cAAMW,WAAWN,MAAMO,IAAG,CAAA;MAC5B;IACF,GAAG;MAACb,KAAKK;KAAI;AAEb,UAAMS,YAAQC,sBAASf,IAAAA;AACvB,QAAI,CAACc,OAAO;AACV,aAAO;IACT;AAEA,UAAME,iBAAaC,0BACjB,CAACC,SAAAA;AACC,UAAIjB,MAAMkB,SAASD,IAAAA,GAAO;AACxBlB,aAAKK,MAAMJ,MAAMD,KAAKK,IAAG;AACzBL,aAAKa,MAAMZ,MAAMD,KAAKa,IAAG;AACzB,eAAO;MACT;AAEA,aAAO;IACT,GACA;MAACZ;KAAM;AAGT,WACE,6BAAAmB,QAAA,cAACC,gCAAMC,MAAI;MAACrB;MAAcsB,QAAQP;OAChC,6BAAAI,QAAA,cAACI,sCAAAA,IAAAA,CAAAA;;;;AAGP;",
|
|
6
|
+
"names": ["ChessComponent", "game", "model", "useMemo", "ChessModel", "useEffect", "pgn", "chess", "Chess", "loadPgn", "err", "log", "catch", "initialize", "fen", "space", "getSpace", "handleDrop", "useCallback", "move", "makeMove", "React", "Board", "Root", "onDrop", "Chessboard"]
|
|
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_R6JAL3RE_exports = {};
|
|
30
|
+
__export(chunk_R6JAL3RE_exports, {
|
|
31
31
|
ChessContainer: () => ChessContainer
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_R6JAL3RE_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-EQUVXDJC.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-R6JAL3RE.cjs.map
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -29,76 +29,76 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
31
|
ArtifactDefinition: () => ArtifactDefinition,
|
|
32
|
-
CHESS_PLUGIN: () =>
|
|
33
|
-
ChessComponent: () =>
|
|
34
|
-
ChessContainer: () =>
|
|
32
|
+
CHESS_PLUGIN: () => import_chunk_33WBRZI6.CHESS_PLUGIN,
|
|
33
|
+
ChessComponent: () => import_chunk_OTMP6HPY.ChessComponent,
|
|
34
|
+
ChessContainer: () => import_chunk_R6JAL3RE.ChessContainer,
|
|
35
35
|
ChessPlugin: () => ChessPlugin,
|
|
36
36
|
IntentResolver: () => IntentResolver,
|
|
37
37
|
ReactSurface: () => ReactSurface,
|
|
38
|
-
meta: () =>
|
|
38
|
+
meta: () => import_chunk_33WBRZI6.meta
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(node_exports);
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
41
|
+
var import_chunk_R6JAL3RE = require("./chunk-R6JAL3RE.cjs");
|
|
42
|
+
var import_chunk_33WBRZI6 = require("./chunk-33WBRZI6.cjs");
|
|
43
|
+
var import_chunk_OTMP6HPY = require("./chunk-OTMP6HPY.cjs");
|
|
44
44
|
var import_app_framework = require("@dxos/app-framework");
|
|
45
45
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
46
46
|
var import_plugin_client = require("@dxos/plugin-client");
|
|
47
47
|
var import_plugin_space = require("@dxos/plugin-space");
|
|
48
48
|
var import_types = require("@dxos/plugin-space/types");
|
|
49
|
-
var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-
|
|
50
|
-
var IntentResolver = (0, import_app_framework.lazy)(() => import("./intent-resolver-
|
|
51
|
-
var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-
|
|
49
|
+
var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-FRBMG5FU.cjs"));
|
|
50
|
+
var IntentResolver = (0, import_app_framework.lazy)(() => import("./intent-resolver-AKAIXSZF.cjs"));
|
|
51
|
+
var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-7G7NV4FY.cjs"));
|
|
52
52
|
var translations_default = [
|
|
53
53
|
{
|
|
54
54
|
"en-US": {
|
|
55
|
-
[
|
|
55
|
+
[import_chunk_33WBRZI6.ChessType.typename]: {
|
|
56
56
|
"typename label": "Game",
|
|
57
57
|
"object name placeholder": "New game"
|
|
58
58
|
},
|
|
59
|
-
[
|
|
59
|
+
[import_chunk_33WBRZI6.CHESS_PLUGIN]: {
|
|
60
60
|
"plugin name": "Chess",
|
|
61
61
|
"delete game label": "Delete"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
];
|
|
66
|
-
var ChessPlugin = () => (0, import_app_framework2.definePlugin)(
|
|
66
|
+
var ChessPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_33WBRZI6.meta, [
|
|
67
67
|
(0, import_app_framework2.defineModule)({
|
|
68
|
-
id: `${
|
|
68
|
+
id: `${import_chunk_33WBRZI6.meta.id}/module/translations`,
|
|
69
69
|
activatesOn: import_app_framework2.Events.SetupTranslations,
|
|
70
70
|
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Translations, translations_default)
|
|
71
71
|
}),
|
|
72
72
|
(0, import_app_framework2.defineModule)({
|
|
73
|
-
id: `${
|
|
73
|
+
id: `${import_chunk_33WBRZI6.meta.id}/module/metadata`,
|
|
74
74
|
activatesOn: import_app_framework2.Events.SetupMetadata,
|
|
75
75
|
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Metadata, {
|
|
76
|
-
id:
|
|
76
|
+
id: import_chunk_33WBRZI6.ChessType.typename,
|
|
77
77
|
metadata: {
|
|
78
78
|
icon: "ph--shield-chevron--regular"
|
|
79
79
|
}
|
|
80
80
|
})
|
|
81
81
|
}),
|
|
82
82
|
(0, import_app_framework2.defineModule)({
|
|
83
|
-
id: `${
|
|
83
|
+
id: `${import_chunk_33WBRZI6.meta.id}/module/object-form`,
|
|
84
84
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
85
85
|
activate: () => (0, import_app_framework2.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types.defineObjectForm)({
|
|
86
|
-
objectSchema:
|
|
87
|
-
getIntent: () => (0, import_app_framework2.createIntent)(
|
|
86
|
+
objectSchema: import_chunk_33WBRZI6.ChessType,
|
|
87
|
+
getIntent: () => (0, import_app_framework2.createIntent)(import_chunk_33WBRZI6.ChessAction.Create)
|
|
88
88
|
}))
|
|
89
89
|
}),
|
|
90
90
|
(0, import_app_framework2.defineModule)({
|
|
91
|
-
id: `${
|
|
91
|
+
id: `${import_chunk_33WBRZI6.meta.id}/module/react-surface`,
|
|
92
92
|
activatesOn: import_app_framework2.Events.SetupReactSurface,
|
|
93
93
|
activate: ReactSurface
|
|
94
94
|
}),
|
|
95
95
|
(0, import_app_framework2.defineModule)({
|
|
96
|
-
id: `${
|
|
96
|
+
id: `${import_chunk_33WBRZI6.meta.id}/module/intent-resolver`,
|
|
97
97
|
activatesOn: import_app_framework2.Events.SetupIntentResolver,
|
|
98
98
|
activate: IntentResolver
|
|
99
99
|
}),
|
|
100
100
|
(0, import_app_framework2.defineModule)({
|
|
101
|
-
id: `${
|
|
101
|
+
id: `${import_chunk_33WBRZI6.meta.id}/module/artifact-definition`,
|
|
102
102
|
activatesOn: import_app_framework2.Events.SetupArtifactDefinition,
|
|
103
103
|
activate: ArtifactDefinition
|
|
104
104
|
})
|
|
@@ -16,22 +16,22 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var intent_resolver_AKAIXSZF_exports = {};
|
|
20
|
+
__export(intent_resolver_AKAIXSZF_exports, {
|
|
21
21
|
default: () => intent_resolver_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(intent_resolver_AKAIXSZF_exports);
|
|
24
|
+
var import_chunk_33WBRZI6 = require("./chunk-33WBRZI6.cjs");
|
|
25
25
|
var import_chess = require("chess.js");
|
|
26
26
|
var import_app_framework = require("@dxos/app-framework");
|
|
27
27
|
var import_live_object = require("@dxos/live-object");
|
|
28
28
|
var intent_resolver_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.IntentResolver, (0, import_app_framework.createResolver)({
|
|
29
|
-
intent:
|
|
29
|
+
intent: import_chunk_33WBRZI6.ChessAction.Create,
|
|
30
30
|
resolve: ({ name, fen }) => {
|
|
31
31
|
const pgn = fen ? new import_chess.Chess(fen).pgn() : void 0;
|
|
32
32
|
return {
|
|
33
33
|
data: {
|
|
34
|
-
object: (0, import_live_object.
|
|
34
|
+
object: (0, import_live_object.live)(import_chunk_33WBRZI6.ChessType, {
|
|
35
35
|
name,
|
|
36
36
|
fen,
|
|
37
37
|
pgn
|
|
@@ -40,4 +40,4 @@ var intent_resolver_default = () => (0, import_app_framework.contributes)(import
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
}));
|
|
43
|
-
//# sourceMappingURL=intent-resolver-
|
|
43
|
+
//# sourceMappingURL=intent-resolver-AKAIXSZF.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { live } from '@dxos/live-object';\n\nimport { ChessAction, ChessType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ChessAction.Create,\n resolve: ({ name, fen }) => {\n const pgn = fen ? new Chess(fen).pgn() : undefined;\n return {\n data: {\n object: live(ChessType, { name, fen, pgn }),\n },\n };\n },\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AAEtB,2BAA0D;AAC1D,yBAAqB;AAIrB,IAAA,0BAAe,UACbA,kCACEC,kCAAaC,oBACbC,qCAAe;EACbC,QAAQC,kCAAYC;EACpBC,SAAS,CAAC,EAAEC,MAAMC,IAAG,MAAE;AACrB,UAAMC,MAAMD,MAAM,IAAIE,mBAAMF,GAAAA,EAAKC,IAAG,IAAKE;AACzC,WAAO;MACLC,MAAM;QACJC,YAAQC,yBAAKC,iCAAW;UAAER;UAAMC;UAAKC;QAAI,CAAA;MAC3C;IACF;EACF;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ChessAction", "Create", "resolve", "name", "fen", "pgn", "Chess", "undefined", "data", "object", "live", "ChessType"]
|
|
7
|
+
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2077,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":18514,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":4522,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3257,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1694,"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":7388,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4837},"packages/plugins/plugin-chess/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-WKOWLRXP.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-JDJAOTXF.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-IJXRCQA5.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-JWVHHTQU.cjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1500},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":282}},"bytes":2659},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs","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/node/artifact-definition-JDJAOTXF.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8002},"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-JDJAOTXF.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5798}},"bytes":6058},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-IJXRCQA5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-IJXRCQA5.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-BZMTO4FZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6150},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-BZMTO4FZ.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":791},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3452},"packages/plugins/plugin-chess/dist/lib/node/react-surface-JWVHHTQU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/node/react-surface-JWVHHTQU.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-WKOWLRXP.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/node/chunk-WKOWLRXP.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/node/chunk-WKOWLRXP.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-BZMTO4FZ.cjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3759},"packages/plugins/plugin-chess/dist/lib/node/chunk-PQ64RGCS.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1966},"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs":{"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":990}},"bytes":1131}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2033,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2921,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3132,"imports":[{"path":"effect","kind":"import-statement","external":true},{"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":554,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":19066,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2680,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":5508,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":9084,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3431,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":872,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3858,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1329,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1642,"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":7256,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":754,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4837},"packages/plugins/plugin-chess/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-R6JAL3RE.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-OTMP6HPY.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-FRBMG5FU.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-AKAIXSZF.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-7G7NV4FY.cjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1500},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":282}},"bytes":2659},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs","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/node/artifact-definition-FRBMG5FU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8482},"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-FRBMG5FU.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5964}},"bytes":6224},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-AKAIXSZF.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1366},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-AKAIXSZF.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs","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":507}},"bytes":747},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-EQUVXDJC.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6167},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-EQUVXDJC.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-OTMP6HPY.cjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":978},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2608}},"bytes":3948},"packages/plugins/plugin-chess/dist/lib/node/react-surface-7G7NV4FY.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/node/react-surface-7G7NV4FY.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-R6JAL3RE.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-OTMP6HPY.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/node/chunk-R6JAL3RE.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/node/chunk-R6JAL3RE.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-EQUVXDJC.cjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3966},"packages/plugins/plugin-chess/dist/lib/node/chunk-33WBRZI6.cjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"effect","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":606},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":675},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":2133},"packages/plugins/plugin-chess/dist/lib/node/chunk-OTMP6HPY.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2588},"packages/plugins/plugin-chess/dist/lib/node/chunk-OTMP6HPY.cjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":1601}},"bytes":1742}}}
|
|
@@ -26,26 +26,26 @@ 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 react_surface_7G7NV4FY_exports = {};
|
|
30
|
+
__export(react_surface_7G7NV4FY_exports, {
|
|
31
31
|
default: () => react_surface_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(react_surface_7G7NV4FY_exports);
|
|
34
|
+
var import_chunk_R6JAL3RE = require("./chunk-R6JAL3RE.cjs");
|
|
35
|
+
var import_chunk_33WBRZI6 = require("./chunk-33WBRZI6.cjs");
|
|
36
|
+
var import_chunk_OTMP6HPY = require("./chunk-OTMP6HPY.cjs");
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_app_framework = require("@dxos/app-framework");
|
|
39
39
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
40
40
|
var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
|
|
41
41
|
(0, import_app_framework.createSurface)({
|
|
42
|
-
id:
|
|
42
|
+
id: import_chunk_33WBRZI6.CHESS_PLUGIN,
|
|
43
43
|
role: [
|
|
44
44
|
"article",
|
|
45
45
|
"section"
|
|
46
46
|
],
|
|
47
|
-
filter: (data) => (0,
|
|
48
|
-
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(
|
|
47
|
+
filter: (data) => (0, import_chunk_33WBRZI6.isObject)(data.subject),
|
|
48
|
+
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_R6JAL3RE.ChessContainer, {
|
|
49
49
|
game: data.subject,
|
|
50
50
|
role
|
|
51
51
|
})
|
|
@@ -53,10 +53,10 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
53
53
|
(0, import_app_framework.createSurface)({
|
|
54
54
|
id: "plugin-chess",
|
|
55
55
|
role: "canvas-node",
|
|
56
|
-
filter: (data) => (0, import_echo_schema.isInstanceOf)(
|
|
57
|
-
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(
|
|
56
|
+
filter: (data) => (0, import_echo_schema.isInstanceOf)(import_chunk_33WBRZI6.ChessType, data),
|
|
57
|
+
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_OTMP6HPY.ChessComponent, {
|
|
58
58
|
game: data
|
|
59
59
|
})
|
|
60
60
|
})
|
|
61
61
|
]);
|
|
62
|
-
//# sourceMappingURL=react-surface-
|
|
62
|
+
//# sourceMappingURL=react-surface-7G7NV4FY.cjs.map
|
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var types_exports = {};
|
|
20
20
|
__export(types_exports, {
|
|
21
|
-
ChessAction: () =>
|
|
22
|
-
ChessType: () =>
|
|
23
|
-
MoveSchema: () =>
|
|
24
|
-
isObject: () =>
|
|
21
|
+
ChessAction: () => import_chunk_33WBRZI6.ChessAction,
|
|
22
|
+
ChessType: () => import_chunk_33WBRZI6.ChessType,
|
|
23
|
+
MoveSchema: () => import_chunk_33WBRZI6.MoveSchema,
|
|
24
|
+
isObject: () => import_chunk_33WBRZI6.isObject
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(types_exports);
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_33WBRZI6 = require("../chunk-33WBRZI6.cjs");
|
|
28
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
29
29
|
0 && (module.exports = {
|
|
30
30
|
ChessAction,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n ChessAction,\n ChessType,\n MoveSchema,\n isObject\n} from \"../chunk-
|
|
4
|
+
"sourcesContent": ["import {\n ChessAction,\n ChessType,\n MoveSchema,\n isObject\n} from \"../chunk-33WBRZI6.cjs\";\nexport {\n ChessAction,\n ChessType,\n MoveSchema,\n isObject\n};\n//# sourceMappingURL=index.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|