@dxos/plugin-chess 0.7.5-labs.c0e040f → 0.7.5-labs.d199c0f
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-2MMUB5S7.mjs → ChessContainer-XERPODLK.mjs} +2 -2
- package/dist/lib/browser/{artifact-LGQPNR6M.mjs → artifact-definition-D2SD45UX.mjs} +34 -28
- package/dist/lib/browser/artifact-definition-D2SD45UX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GKM6RRDX.mjs → chunk-NNA3W3LX.mjs} +3 -3
- package/dist/lib/browser/chunk-R26FYVUS.mjs +8 -0
- package/dist/lib/browser/{chunk-RGPTBDH7.mjs → chunk-VRWXC5L2.mjs} +2 -1
- package/dist/lib/browser/{chunk-RGPTBDH7.mjs.map → chunk-VRWXC5L2.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +20 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-VPK5QRXH.mjs → intent-resolver-KBIH2KYC.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-ZILDX6DE.mjs → react-surface-2PI2KNSU.mjs} +4 -4
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{ChessContainer-CMYJDMSG.cjs → ChessContainer-LEPLNICP.cjs} +6 -6
- package/dist/lib/node/{artifact-IKDPRF5X.cjs → artifact-definition-YDPYM4NV.cjs} +41 -36
- package/dist/lib/node/artifact-definition-YDPYM4NV.cjs.map +7 -0
- package/dist/lib/node/{chunk-YTD6SK5V.cjs → chunk-CSRNUKOH.cjs} +5 -4
- package/dist/lib/node/{chunk-YTD6SK5V.cjs.map → chunk-CSRNUKOH.cjs.map} +2 -2
- package/dist/lib/node/{chunk-TEZPML34.cjs → chunk-ITDMCBQQ.cjs} +5 -5
- package/dist/lib/node/{chunk-3TTH3HKL.cjs → chunk-VXYRI6VA.cjs} +4 -4
- package/dist/lib/node/index.cjs +33 -31
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-PUM2BVGU.cjs → intent-resolver-TZFKPQOV.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-KYLF2XNL.cjs → react-surface-OHQIPHSN.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-WV2CO5WO.mjs → ChessContainer-S76WNBWN.mjs} +2 -2
- package/dist/lib/node-esm/{artifact-3KNX2TLP.mjs → artifact-definition-LHQK5BBZ.mjs} +34 -28
- package/dist/lib/node-esm/artifact-definition-LHQK5BBZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GJW6TXCL.mjs → chunk-6SEDGO5G.mjs} +2 -1
- package/dist/lib/node-esm/{chunk-GJW6TXCL.mjs.map → chunk-6SEDGO5G.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-YXXJHXSV.mjs → chunk-B72CIN6T.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-GQA2DRUZ.mjs → chunk-IP66EHSW.mjs} +3 -3
- package/dist/lib/node-esm/index.mjs +20 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-IR3YUZIG.mjs → intent-resolver-WBUS64KC.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-VI6Q4BJT.mjs → react-surface-XX4VFNRS.mjs} +4 -4
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/{artifact.d.ts → artifact-definition.d.ts} +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/ChessComponent.d.ts +1 -2
- package/dist/types/src/components/ChessComponent.d.ts.map +1 -1
- package/dist/types/src/components/ChessContainer.d.ts +1 -2
- package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
- package/dist/types/src/components/PlayerSelector.d.ts +1 -2
- package/dist/types/src/components/PlayerSelector.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -1
- package/package.json +21 -20
- package/src/ChessPlugin.tsx +18 -10
- package/src/capabilities/{artifact.ts → artifact-definition.ts} +19 -13
- package/src/capabilities/index.ts +1 -1
- package/src/components/ChessComponent.tsx +1 -0
- package/dist/lib/browser/artifact-LGQPNR6M.mjs.map +0 -7
- package/dist/lib/browser/chunk-672NU6IC.mjs +0 -8
- package/dist/lib/node/artifact-IKDPRF5X.cjs.map +0 -7
- package/dist/lib/node-esm/artifact-3KNX2TLP.mjs.map +0 -7
- package/dist/types/src/capabilities/artifact.d.ts.map +0 -1
- /package/dist/lib/browser/{ChessContainer-2MMUB5S7.mjs.map → ChessContainer-XERPODLK.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-GKM6RRDX.mjs.map → chunk-NNA3W3LX.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-672NU6IC.mjs.map → chunk-R26FYVUS.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-VPK5QRXH.mjs.map → intent-resolver-KBIH2KYC.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-ZILDX6DE.mjs.map → react-surface-2PI2KNSU.mjs.map} +0 -0
- /package/dist/lib/node/{ChessContainer-CMYJDMSG.cjs.map → ChessContainer-LEPLNICP.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-TEZPML34.cjs.map → chunk-ITDMCBQQ.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-3TTH3HKL.cjs.map → chunk-VXYRI6VA.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-PUM2BVGU.cjs.map → intent-resolver-TZFKPQOV.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-KYLF2XNL.cjs.map → react-surface-OHQIPHSN.cjs.map} +0 -0
- /package/dist/lib/node-esm/{ChessContainer-WV2CO5WO.mjs.map → ChessContainer-S76WNBWN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-YXXJHXSV.mjs.map → chunk-B72CIN6T.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-GQA2DRUZ.mjs.map → chunk-IP66EHSW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-IR3YUZIG.mjs.map → intent-resolver-WBUS64KC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-VI6Q4BJT.mjs.map → react-surface-XX4VFNRS.mjs.map} +0 -0
|
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
default: () =>
|
|
19
|
+
var artifact_definition_YDPYM4NV_exports = {};
|
|
20
|
+
__export(artifact_definition_YDPYM4NV_exports, {
|
|
21
|
+
default: () => artifact_definition_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(artifact_definition_YDPYM4NV_exports);
|
|
24
|
+
var import_chunk_VXYRI6VA = require("./chunk-VXYRI6VA.cjs");
|
|
25
25
|
var import_chess = require("chess.js");
|
|
26
26
|
var import_effect = require("effect");
|
|
27
27
|
var import_app_framework = require("@dxos/app-framework");
|
|
@@ -31,19 +31,21 @@ var import_echo_schema = require("@dxos/echo-schema");
|
|
|
31
31
|
var import_invariant = require("@dxos/invariant");
|
|
32
32
|
var import_types = require("@dxos/plugin-space/types");
|
|
33
33
|
var import_echo = require("@dxos/react-client/echo");
|
|
34
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact.ts";
|
|
35
|
-
var
|
|
34
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts";
|
|
35
|
+
var artifact_definition_default = () => {
|
|
36
36
|
const definition = (0, import_artifact.defineArtifact)({
|
|
37
|
-
id:
|
|
37
|
+
id: import_chunk_VXYRI6VA.meta.id,
|
|
38
|
+
name: import_chunk_VXYRI6VA.meta.name,
|
|
39
|
+
description: "Provides a simple chess engine.",
|
|
38
40
|
instructions: `
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
schema: import_chunk_3TTH3HKL.ChessType,
|
|
41
|
+
- If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.
|
|
42
|
+
`,
|
|
43
|
+
schema: import_chunk_VXYRI6VA.ChessType,
|
|
43
44
|
tools: [
|
|
44
|
-
(0, import_artifact.defineTool)({
|
|
45
|
-
name: "
|
|
46
|
-
description: "Create a new chess game. Returns the artifact definition for the game",
|
|
45
|
+
(0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
|
|
46
|
+
name: "create",
|
|
47
|
+
description: "Create a new chess game. Returns the artifact definition for the game.",
|
|
48
|
+
caption: "Creating chess game...",
|
|
47
49
|
schema: import_echo_schema.S.Struct({
|
|
48
50
|
fen: import_echo_schema.S.String.annotations({
|
|
49
51
|
description: "The state of the chess game in the FEN format."
|
|
@@ -52,7 +54,7 @@ var artifact_default = () => {
|
|
|
52
54
|
execute: async ({ fen }, { extensions }) => {
|
|
53
55
|
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
54
56
|
F: __dxlog_file,
|
|
55
|
-
L:
|
|
57
|
+
L: 45,
|
|
56
58
|
S: void 0,
|
|
57
59
|
A: [
|
|
58
60
|
"extensions?.space",
|
|
@@ -61,14 +63,14 @@ var artifact_default = () => {
|
|
|
61
63
|
});
|
|
62
64
|
(0, import_invariant.invariant)(extensions?.dispatch, "No intent dispatcher", {
|
|
63
65
|
F: __dxlog_file,
|
|
64
|
-
L:
|
|
66
|
+
L: 46,
|
|
65
67
|
S: void 0,
|
|
66
68
|
A: [
|
|
67
69
|
"extensions?.dispatch",
|
|
68
70
|
"'No intent dispatcher'"
|
|
69
71
|
]
|
|
70
72
|
});
|
|
71
|
-
const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(
|
|
73
|
+
const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(import_chunk_VXYRI6VA.ChessAction.Create, {
|
|
72
74
|
fen
|
|
73
75
|
}), (0, import_app_framework.chain)(import_types.SpaceAction.AddObject, {
|
|
74
76
|
target: extensions.space
|
|
@@ -80,24 +82,25 @@ var artifact_default = () => {
|
|
|
80
82
|
return import_artifact.ToolResult.Success((0, import_assistant.createArtifactElement)(data.id));
|
|
81
83
|
}
|
|
82
84
|
}),
|
|
83
|
-
(0, import_artifact.defineTool)({
|
|
84
|
-
name: "
|
|
85
|
+
(0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
|
|
86
|
+
name: "list",
|
|
85
87
|
description: "Query all active chess games.",
|
|
88
|
+
caption: "Getting games...",
|
|
86
89
|
schema: import_echo_schema.S.Struct({}),
|
|
87
90
|
execute: async (_, { extensions }) => {
|
|
88
91
|
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
89
92
|
F: __dxlog_file,
|
|
90
|
-
L:
|
|
93
|
+
L: 65,
|
|
91
94
|
S: void 0,
|
|
92
95
|
A: [
|
|
93
96
|
"extensions?.space",
|
|
94
97
|
"'No space'"
|
|
95
98
|
]
|
|
96
99
|
});
|
|
97
|
-
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(
|
|
100
|
+
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
|
|
98
101
|
(0, import_invariant.invariant)(games.length > 0, "No chess games found", {
|
|
99
102
|
F: __dxlog_file,
|
|
100
|
-
L:
|
|
103
|
+
L: 67,
|
|
101
104
|
S: void 0,
|
|
102
105
|
A: [
|
|
103
106
|
"games.length > 0",
|
|
@@ -107,27 +110,28 @@ var artifact_default = () => {
|
|
|
107
110
|
return import_artifact.ToolResult.Success(games);
|
|
108
111
|
}
|
|
109
112
|
}),
|
|
110
|
-
(0, import_artifact.defineTool)({
|
|
111
|
-
name: "
|
|
113
|
+
(0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
|
|
114
|
+
name: "inspect",
|
|
112
115
|
description: "Get the current state of the chess game.",
|
|
116
|
+
caption: "Inspecting game...",
|
|
113
117
|
schema: import_echo_schema.S.Struct({
|
|
114
118
|
id: import_echo_schema.ObjectId
|
|
115
119
|
}),
|
|
116
120
|
execute: async ({ id }, { extensions }) => {
|
|
117
121
|
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
118
122
|
F: __dxlog_file,
|
|
119
|
-
L:
|
|
123
|
+
L: 77,
|
|
120
124
|
S: void 0,
|
|
121
125
|
A: [
|
|
122
126
|
"extensions?.space",
|
|
123
127
|
"'No space'"
|
|
124
128
|
]
|
|
125
129
|
});
|
|
126
|
-
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(
|
|
130
|
+
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
|
|
127
131
|
const game = games.find((game2) => game2.id === id);
|
|
128
|
-
(0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(
|
|
132
|
+
(0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_VXYRI6VA.ChessType, game), void 0, {
|
|
129
133
|
F: __dxlog_file,
|
|
130
|
-
L:
|
|
134
|
+
L: 80,
|
|
131
135
|
S: void 0,
|
|
132
136
|
A: [
|
|
133
137
|
"isInstanceOf(ChessType, game)",
|
|
@@ -137,9 +141,10 @@ var artifact_default = () => {
|
|
|
137
141
|
return import_artifact.ToolResult.Success(game.fen);
|
|
138
142
|
}
|
|
139
143
|
}),
|
|
140
|
-
(0, import_artifact.defineTool)({
|
|
141
|
-
name: "
|
|
144
|
+
(0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
|
|
145
|
+
name: "move",
|
|
142
146
|
description: "Make a move in the chess game.",
|
|
147
|
+
caption: "Making chess move...",
|
|
143
148
|
schema: import_echo_schema.S.Struct({
|
|
144
149
|
id: import_echo_schema.ObjectId,
|
|
145
150
|
move: import_echo_schema.S.String.annotations({
|
|
@@ -153,18 +158,18 @@ var artifact_default = () => {
|
|
|
153
158
|
execute: async ({ id, move }, { extensions }) => {
|
|
154
159
|
(0, import_invariant.invariant)(extensions?.space, "No space", {
|
|
155
160
|
F: __dxlog_file,
|
|
156
|
-
L:
|
|
161
|
+
L: 96,
|
|
157
162
|
S: void 0,
|
|
158
163
|
A: [
|
|
159
164
|
"extensions?.space",
|
|
160
165
|
"'No space'"
|
|
161
166
|
]
|
|
162
167
|
});
|
|
163
|
-
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(
|
|
168
|
+
const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
|
|
164
169
|
const game = games.find((game2) => game2.id === id);
|
|
165
|
-
(0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(
|
|
170
|
+
(0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_VXYRI6VA.ChessType, game), void 0, {
|
|
166
171
|
F: __dxlog_file,
|
|
167
|
-
L:
|
|
172
|
+
L: 99,
|
|
168
173
|
S: void 0,
|
|
169
174
|
A: [
|
|
170
175
|
"isInstanceOf(ChessType, game)",
|
|
@@ -186,4 +191,4 @@ var artifact_default = () => {
|
|
|
186
191
|
});
|
|
187
192
|
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.ArtifactDefinition, definition);
|
|
188
193
|
};
|
|
189
|
-
//# sourceMappingURL=artifact-
|
|
194
|
+
//# sourceMappingURL=artifact-definition-YDPYM4NV.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/artifact-definition.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport { pipe } from 'effect';\n\nimport { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';\nimport { defineArtifact, defineTool, ToolResult } from '@dxos/artifact';\nimport { createArtifactElement } from '@dxos/assistant';\nimport { isInstanceOf, ObjectId, S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter, type Space } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\nimport { ChessAction, ChessType } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n space?: Space;\n dispatch?: PromiseIntentDispatcher;\n }\n}\n\nexport default () => {\n const definition = defineArtifact({\n id: meta.id,\n name: meta.name,\n description: 'Provides a simple chess engine.',\n instructions: `\n - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.\n `,\n schema: ChessType,\n tools: [\n defineTool(meta.id, {\n name: 'create',\n description: 'Create a new chess game. Returns the artifact definition for the game.',\n caption: 'Creating chess game...',\n schema: S.Struct({\n fen: S.String.annotations({ description: 'The state of the chess game in the FEN format.' }),\n }),\n execute: async ({ fen }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n invariant(extensions?.dispatch, 'No intent dispatcher');\n const intent = pipe(\n createIntent(ChessAction.Create, { fen }),\n chain(SpaceAction.AddObject, { target: extensions.space }),\n );\n const { data, error } = await extensions.dispatch(intent);\n if (!data || error) {\n return ToolResult.Error(error?.message ?? 'Failed to create chess game');\n }\n\n return ToolResult.Success(createArtifactElement(data.id));\n },\n }),\n defineTool(meta.id, {\n name: 'list',\n description: 'Query all active chess games.',\n caption: 'Getting games...',\n schema: S.Struct({}),\n execute: async (_, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n invariant(games.length > 0, 'No chess games found');\n return ToolResult.Success(games);\n },\n }),\n defineTool(meta.id, {\n name: 'inspect',\n description: 'Get the current state of the chess game.',\n caption: 'Inspecting game...',\n schema: S.Struct({ id: ObjectId }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n const game = games.find((game) => game.id === id);\n invariant(isInstanceOf(ChessType, game));\n return ToolResult.Success(game.fen);\n },\n }),\n defineTool(meta.id, {\n name: 'move',\n description: 'Make a move in the chess game.',\n caption: 'Making chess move...',\n schema: S.Struct({\n id: ObjectId,\n move: S.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n execute: async ({ id, move }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n const game = games.find((game) => game.id === id);\n invariant(isInstanceOf(ChessType, game));\n const board = new Chess(game.fen);\n try {\n board.move(move);\n } catch (error: any) {\n return ToolResult.Error(error.message);\n }\n game.pgn = board.pgn();\n game.fen = board.fen();\n return ToolResult.Success(game.fen);\n },\n }),\n ],\n });\n\n return contributes(Capabilities.ArtifactDefinition, definition);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,oBAAqB;AAErB,2BAA6F;AAC7F,sBAAuD;AACvD,uBAAsC;AACtC,yBAA0C;AAC1C,uBAA0B;AAC1B,mBAA4B;AAC5B,kBAAmC;;AAanC,IAAA,8BAAe,MAAA;AACb,QAAMA,iBAAaC,gCAAe;IAChCC,IAAIC,2BAAKD;IACTE,MAAMD,2BAAKC;IACXC,aAAa;IACbC,cAAc;;;IAGdC,QAAQC;IACRC,OAAO;UACLC,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO;UACfC,KAAKF,qBAAEG,OAAOC,YAAY;YAAEX,aAAa;UAAiD,CAAA;QAC5F,CAAA;QACAY,SAAS,OAAO,EAAEH,IAAG,GAAI,EAAEI,WAAU,MAAE;AACrCC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7BD,0CAAUD,YAAYG,UAAU,wBAAA;;;;;;;;;AAChC,gBAAMC,aAASC,wBACbC,mCAAaC,kCAAYC,QAAQ;YAAEZ;UAAI,CAAA,OACvCa,4BAAMC,yBAAYC,WAAW;YAAEC,QAAQZ,WAAWE;UAAM,CAAA,CAAA;AAE1D,gBAAM,EAAEW,MAAMC,MAAK,IAAK,MAAMd,WAAWG,SAASC,MAAAA;AAClD,cAAI,CAACS,QAAQC,OAAO;AAClB,mBAAOC,2BAAWC,MAAMF,OAAOG,WAAW,6BAAA;UAC5C;AAEA,iBAAOF,2BAAWG,YAAQC,wCAAsBN,KAAK7B,EAAE,CAAA;QACzD;MACF,CAAA;UACAQ,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO,CAAC,CAAA;QAClBI,SAAS,OAAOqB,GAAG,EAAEpB,WAAU,MAAE;AAC/BC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOpC,OAAOC,+BAAAA,CAAAA,EAAYoC,IAAG;AACxFzB,0CAAUqB,MAAMK,SAAS,GAAG,wBAAA;;;;;;;;;AAC5B,iBAAOZ,2BAAWG,QAAQI,KAAAA;QAC5B;MACF,CAAA;UACA9B,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO;UAAEX,IAAI4C;QAAS,CAAA;QAChC7B,SAAS,OAAO,EAAEf,GAAE,GAAI,EAAEgB,WAAU,MAAE;AACpCC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOpC,OAAOC,+BAAAA,CAAAA,EAAYoC,IAAG;AACxF,gBAAMG,OAAOP,MAAMQ,KAAK,CAACD,UAASA,MAAK7C,OAAOA,EAAAA;AAC9CiB,8CAAU8B,iCAAazC,iCAAWuC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAClC,iBAAOd,2BAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;UACAJ,4BAAWP,2BAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,qBAAEC,OAAO;UACfX,IAAI4C;UACJI,MAAMtC,qBAAEG,OAAOC,YAAY;YACzBX,aAAa;YACb8C,UAAU;cAAC;cAAM;;UACnB,CAAA;QACF,CAAA;QACAlC,SAAS,OAAO,EAAEf,IAAIgD,KAAI,GAAI,EAAEhC,WAAU,MAAE;AAC1CC,0CAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,mBAAOpC,OAAOC,+BAAAA,CAAAA,EAAYoC,IAAG;AACxF,gBAAMG,OAAOP,MAAMQ,KAAK,CAACD,UAASA,MAAK7C,OAAOA,EAAAA;AAC9CiB,8CAAU8B,iCAAazC,iCAAWuC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAClC,gBAAMK,QAAQ,IAAIC,mBAAMN,KAAKjC,GAAG;AAChC,cAAI;AACFsC,kBAAMF,KAAKA,IAAAA;UACb,SAASlB,OAAY;AACnB,mBAAOC,2BAAWC,MAAMF,MAAMG,OAAO;UACvC;AACAY,eAAKO,MAAMF,MAAME,IAAG;AACpBP,eAAKjC,MAAMsC,MAAMtC,IAAG;AACpB,iBAAOmB,2BAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;;EAEJ,CAAA;AAEA,aAAOyC,kCAAYC,kCAAaC,oBAAoBzD,UAAAA;AACtD;",
|
|
6
|
+
"names": ["definition", "defineArtifact", "id", "meta", "name", "description", "instructions", "schema", "ChessType", "tools", "defineTool", "caption", "S", "Struct", "fen", "String", "annotations", "execute", "extensions", "invariant", "space", "dispatch", "intent", "pipe", "createIntent", "ChessAction", "Create", "chain", "SpaceAction", "AddObject", "target", "data", "error", "ToolResult", "Error", "message", "Success", "createArtifactElement", "_", "objects", "games", "db", "query", "Filter", "run", "length", "ObjectId", "game", "find", "isInstanceOf", "move", "examples", "board", "Chess", "pgn", "contributes", "Capabilities", "ArtifactDefinition"]
|
|
7
|
+
}
|
|
@@ -26,11 +26,11 @@ 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_CSRNUKOH_exports = {};
|
|
30
|
+
__export(chunk_CSRNUKOH_exports, {
|
|
31
31
|
ChessComponent: () => ChessComponent
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_CSRNUKOH_exports);
|
|
34
34
|
var import_chess = require("chess.js");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_echo = require("@dxos/react-client/echo");
|
|
@@ -55,6 +55,7 @@ var ChessComponent = ({ game }) => {
|
|
|
55
55
|
const handleDrop = (0, import_react.useCallback)((move) => {
|
|
56
56
|
if (model.makeMove(move)) {
|
|
57
57
|
game.pgn = model.game.pgn();
|
|
58
|
+
game.fen = model.game.fen();
|
|
58
59
|
return true;
|
|
59
60
|
}
|
|
60
61
|
return false;
|
|
@@ -70,4 +71,4 @@ var ChessComponent = ({ game }) => {
|
|
|
70
71
|
0 && (module.exports = {
|
|
71
72
|
ChessComponent
|
|
72
73
|
});
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-CSRNUKOH.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/ChessComponent.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n chess.loadPgn(game.pgn);\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,mBAAuD;AAEvD,kBAAyB;AACzB,gCAAmE;AAI5D,IAAMA,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;AAC1D,QAAMC,YAAQC,sBAAQ,MAAM,IAAIC,qCAAAA,GAAc,CAAA,CAAE;AAChDC,8BAAU,MAAA;AACR,QAAI,CAACH,SAASD,KAAKK,QAAQJ,OAAOD,KAAKK,IAAAA,GAAO;AAC5C,YAAMC,QAAQ,IAAIC,mBAAAA;AAClB,UAAIP,KAAKK,KAAK;AACZC,cAAME,QAAQR,KAAKK,GAAG;MACxB;AAEAJ,YAAMQ,WAAWH,MAAMI,IAAG,CAAA;IAC5B;EACF,GAAG;IAACV,KAAKK;GAAI;AAEb,QAAMM,YAAQC,sBAASZ,IAAAA;AACvB,MAAI,CAACW,OAAO;AACV,WAAO;EACT;AAEA,QAAME,iBAAaC,0BACjB,CAACC,SAAAA;AACC,QAAId,MAAMe,SAASD,IAAAA,GAAO;AACxBf,WAAKK,MAAMJ,MAAMD,KAAKK,IAAG;AACzB,aAAO;IACT;AAEA,WAAO;EACT,GACA;
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n chess.loadPgn(game.pgn);\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n game.fen = model.game.fen();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,mBAAuD;AAEvD,kBAAyB;AACzB,gCAAmE;AAI5D,IAAMA,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;AAC1D,QAAMC,YAAQC,sBAAQ,MAAM,IAAIC,qCAAAA,GAAc,CAAA,CAAE;AAChDC,8BAAU,MAAA;AACR,QAAI,CAACH,SAASD,KAAKK,QAAQJ,OAAOD,KAAKK,IAAAA,GAAO;AAC5C,YAAMC,QAAQ,IAAIC,mBAAAA;AAClB,UAAIP,KAAKK,KAAK;AACZC,cAAME,QAAQR,KAAKK,GAAG;MACxB;AAEAJ,YAAMQ,WAAWH,MAAMI,IAAG,CAAA;IAC5B;EACF,GAAG;IAACV,KAAKK;GAAI;AAEb,QAAMM,YAAQC,sBAASZ,IAAAA;AACvB,MAAI,CAACW,OAAO;AACV,WAAO;EACT;AAEA,QAAME,iBAAaC,0BACjB,CAACC,SAAAA;AACC,QAAId,MAAMe,SAASD,IAAAA,GAAO;AACxBf,WAAKK,MAAMJ,MAAMD,KAAKK,IAAG;AACzBL,WAAKU,MAAMT,MAAMD,KAAKU,IAAG;AACzB,aAAO;IACT;AAEA,WAAO;EACT,GACA;IAACT;GAAM;AAGT,SACE,6BAAAgB,QAAA,cAACC,gCAAMC,MAAI;IAAClB;IAAcmB,QAAQP;KAChC,6BAAAI,QAAA,cAACI,sCAAAA,IAAAA,CAAAA;AAGP;",
|
|
6
6
|
"names": ["ChessComponent", "game", "model", "useMemo", "ChessModel", "useEffect", "pgn", "chess", "Chess", "loadPgn", "initialize", "fen", "space", "getSpace", "handleDrop", "useCallback", "move", "makeMove", "React", "Board", "Root", "onDrop", "Chessboard"]
|
|
7
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_ITDMCBQQ_exports = {};
|
|
30
|
+
__export(chunk_ITDMCBQQ_exports, {
|
|
31
31
|
ChessContainer: () => ChessContainer
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_ITDMCBQQ_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-LEPLNICP.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-ITDMCBQQ.cjs.map
|
|
@@ -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_VXYRI6VA_exports = {};
|
|
20
|
+
__export(chunk_VXYRI6VA_exports, {
|
|
21
21
|
CHESS_PLUGIN: () => CHESS_PLUGIN,
|
|
22
22
|
ChessAction: () => ChessAction,
|
|
23
23
|
ChessType: () => ChessType,
|
|
@@ -25,7 +25,7 @@ __export(chunk_3TTH3HKL_exports, {
|
|
|
25
25
|
isObject: () => isObject,
|
|
26
26
|
meta: () => meta
|
|
27
27
|
});
|
|
28
|
-
module.exports = __toCommonJS(
|
|
28
|
+
module.exports = __toCommonJS(chunk_VXYRI6VA_exports);
|
|
29
29
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
30
30
|
var import_echo_schema2 = require("@dxos/echo-schema");
|
|
31
31
|
var import_live_object = require("@dxos/live-object");
|
|
@@ -87,4 +87,4 @@ var isObject = (object) => {
|
|
|
87
87
|
isObject,
|
|
88
88
|
meta
|
|
89
89
|
});
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-VXYRI6VA.cjs.map
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,32 +28,34 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
-
|
|
32
|
-
CHESS_PLUGIN: () =>
|
|
33
|
-
ChessComponent: () =>
|
|
34
|
-
ChessContainer: () =>
|
|
31
|
+
ArtifactDefinition: () => ArtifactDefinition,
|
|
32
|
+
CHESS_PLUGIN: () => import_chunk_VXYRI6VA.CHESS_PLUGIN,
|
|
33
|
+
ChessComponent: () => import_chunk_CSRNUKOH.ChessComponent,
|
|
34
|
+
ChessContainer: () => import_chunk_ITDMCBQQ.ChessContainer,
|
|
35
35
|
ChessPlugin: () => ChessPlugin,
|
|
36
36
|
IntentResolver: () => IntentResolver,
|
|
37
37
|
ReactSurface: () => ReactSurface,
|
|
38
|
-
meta: () =>
|
|
38
|
+
meta: () => import_chunk_VXYRI6VA.meta
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(node_exports);
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
41
|
+
var import_chunk_ITDMCBQQ = require("./chunk-ITDMCBQQ.cjs");
|
|
42
|
+
var import_chunk_VXYRI6VA = require("./chunk-VXYRI6VA.cjs");
|
|
43
|
+
var import_chunk_CSRNUKOH = require("./chunk-CSRNUKOH.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
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
47
|
+
var import_plugin_space = require("@dxos/plugin-space");
|
|
48
|
+
var import_types = require("@dxos/plugin-space/types");
|
|
49
|
+
var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-YDPYM4NV.cjs"));
|
|
50
|
+
var IntentResolver = (0, import_app_framework.lazy)(() => import("./intent-resolver-TZFKPQOV.cjs"));
|
|
51
|
+
var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-OHQIPHSN.cjs"));
|
|
50
52
|
var translations_default = [
|
|
51
53
|
{
|
|
52
54
|
"en-US": {
|
|
53
|
-
[
|
|
55
|
+
[import_chunk_VXYRI6VA.ChessType.typename]: {
|
|
54
56
|
"typename label": "Game"
|
|
55
57
|
},
|
|
56
|
-
[
|
|
58
|
+
[import_chunk_VXYRI6VA.CHESS_PLUGIN]: {
|
|
57
59
|
"plugin name": "Chess",
|
|
58
60
|
"game title placeholder": "New game",
|
|
59
61
|
"create game label": "Create game",
|
|
@@ -62,23 +64,22 @@ var translations_default = [
|
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
];
|
|
65
|
-
var ChessPlugin = () => (0, import_app_framework2.definePlugin)(
|
|
67
|
+
var ChessPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_VXYRI6VA.meta, [
|
|
66
68
|
(0, import_app_framework2.defineModule)({
|
|
67
|
-
id: `${
|
|
69
|
+
id: `${import_chunk_VXYRI6VA.meta.id}/module/translations`,
|
|
68
70
|
activatesOn: import_app_framework2.Events.SetupTranslations,
|
|
69
71
|
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Translations, translations_default)
|
|
70
72
|
}),
|
|
71
73
|
(0, import_app_framework2.defineModule)({
|
|
72
|
-
id: `${
|
|
74
|
+
id: `${import_chunk_VXYRI6VA.meta.id}/module/metadata`,
|
|
73
75
|
activatesOn: import_app_framework2.Events.SetupMetadata,
|
|
74
76
|
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Metadata, {
|
|
75
|
-
id:
|
|
77
|
+
id: import_chunk_VXYRI6VA.ChessType.typename,
|
|
76
78
|
metadata: {
|
|
77
|
-
createObject: (props) => (0, import_app_framework2.createIntent)(import_chunk_3TTH3HKL.ChessAction.Create, props),
|
|
78
79
|
placeholder: [
|
|
79
80
|
"game title placeholder",
|
|
80
81
|
{
|
|
81
|
-
ns:
|
|
82
|
+
ns: import_chunk_VXYRI6VA.CHESS_PLUGIN
|
|
82
83
|
}
|
|
83
84
|
],
|
|
84
85
|
icon: "ph--shield-chevron--regular"
|
|
@@ -86,31 +87,32 @@ var ChessPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_3TT
|
|
|
86
87
|
})
|
|
87
88
|
}),
|
|
88
89
|
(0, import_app_framework2.defineModule)({
|
|
89
|
-
id: `${
|
|
90
|
+
id: `${import_chunk_VXYRI6VA.meta.id}/module/object-form`,
|
|
90
91
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
91
|
-
activate: () => (0, import_app_framework2.contributes)(
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
activate: () => (0, import_app_framework2.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types.defineObjectForm)({
|
|
93
|
+
objectSchema: import_chunk_VXYRI6VA.ChessType,
|
|
94
|
+
getIntent: () => (0, import_app_framework2.createIntent)(import_chunk_VXYRI6VA.ChessAction.Create)
|
|
95
|
+
}))
|
|
94
96
|
}),
|
|
95
97
|
(0, import_app_framework2.defineModule)({
|
|
96
|
-
id: `${
|
|
97
|
-
activatesOn: import_app_framework2.Events.
|
|
98
|
+
id: `${import_chunk_VXYRI6VA.meta.id}/module/react-surface`,
|
|
99
|
+
activatesOn: import_app_framework2.Events.SetupReactSurface,
|
|
98
100
|
activate: ReactSurface
|
|
99
101
|
}),
|
|
100
102
|
(0, import_app_framework2.defineModule)({
|
|
101
|
-
id: `${
|
|
102
|
-
activatesOn: import_app_framework2.Events.
|
|
103
|
+
id: `${import_chunk_VXYRI6VA.meta.id}/module/intent-resolver`,
|
|
104
|
+
activatesOn: import_app_framework2.Events.SetupIntentResolver,
|
|
103
105
|
activate: IntentResolver
|
|
104
106
|
}),
|
|
105
107
|
(0, import_app_framework2.defineModule)({
|
|
106
|
-
id: `${
|
|
107
|
-
activatesOn: import_app_framework2.Events.
|
|
108
|
-
activate:
|
|
108
|
+
id: `${import_chunk_VXYRI6VA.meta.id}/module/artifact-definition`,
|
|
109
|
+
activatesOn: import_app_framework2.Events.SetupArtifactDefinition,
|
|
110
|
+
activate: ArtifactDefinition
|
|
109
111
|
})
|
|
110
112
|
]);
|
|
111
113
|
// Annotate the CommonJS export names for ESM import in node:
|
|
112
114
|
0 && (module.exports = {
|
|
113
|
-
|
|
115
|
+
ArtifactDefinition,
|
|
114
116
|
CHESS_PLUGIN,
|
|
115
117
|
ChessComponent,
|
|
116
118
|
ChessContainer,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqB;ACArB,IAAAA,wBAA4F;AAC5F,
|
|
6
|
-
"names": ["import_app_framework", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ArtifactDefinition = lazy(() => import('./artifact-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ChessType,\n getIntent: () => createIntent(ChessAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.typename]: {\n 'typename label': 'Game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'game title placeholder': 'New game',\n 'create game label': 'Create game',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqB;ACArB,IAAAA,wBAA4F;AAC5F,2BAA6B;AAC7B,0BAAkC;AAClC,mBAAiC;ADD1B,IAAMC,yBAAqBC,2BAAK,MAAM,OAAO,oCAAA,CAAA;AAC7C,IAAMC,qBAAiBD,2BAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,mBAAeF,2BAAK,MAAM,OAAO,8BAAA,CAAA;AED9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACG,gCAAUC,QAAQ,GAAG;QACpB,kBAAkB;MACpB;MACA,CAACC,kCAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;ADNK,IAAMC,cAAc,UACzBC,oCAAaC,4BAAM;MACjBC,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOC;IACpBC,UAAU,UAAMC,mCAAYC,mCAAaC,cAAcC,oBAAAA;EACzD,CAAA;MACAT,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOO;IACpBL,UAAU,UACRC,mCAAYC,mCAAaI,UAAU;MACjCV,IAAIP,gCAAUC;MACdiB,UAAU;QACRC,aAAa;UAAC;UAA0B;YAAEC,IAAIlB;UAAa;;QAC3DmB,MAAM;MACR;IACF,CAAA;EACJ,CAAA;MACAf,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAac,kCAAaC;IAC1BZ,UAAU,UACRC,mCACEY,sCAAkBC,gBAClBC,+BAAiB;MACfC,cAAc3B;MACd4B,WAAW,UAAMC,oCAAaC,kCAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;MACAzB,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOuB;IACpBrB,UAAUZ;EACZ,CAAA;MACAO,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOwB;IACpBtB,UAAUb;EACZ,CAAA;MACAQ,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOyB;IACpBvB,UAAUf;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["import_app_framework", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "metadata", "placeholder", "ns", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "SetupIntentResolver", "SetupArtifactDefinition"]
|
|
7
7
|
}
|
|
@@ -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_TZFKPQOV_exports = {};
|
|
20
|
+
__export(intent_resolver_TZFKPQOV_exports, {
|
|
21
21
|
default: () => intent_resolver_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(intent_resolver_TZFKPQOV_exports);
|
|
24
|
+
var import_chunk_VXYRI6VA = require("./chunk-VXYRI6VA.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_VXYRI6VA.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.create)(
|
|
34
|
+
object: (0, import_live_object.create)(import_chunk_VXYRI6VA.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-TZFKPQOV.cjs.map
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact.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":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":4369,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3335,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":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":7235,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4676},"packages/plugins/plugin-chess/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-TEZPML34.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-YTD6SK5V.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/artifact-IKDPRF5X.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-PUM2BVGU.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-KYLF2XNL.cjs","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","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","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":1455},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2626},"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-3TTH3HKL.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-IKDPRF5X.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7574},"packages/plugins/plugin-chess/dist/lib/node/artifact-IKDPRF5X.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.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.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytesInOutput":5454}},"bytes":5673},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-PUM2BVGU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-PUM2BVGU.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.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-CMYJDMSG.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-CMYJDMSG.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-YTD6SK5V.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":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/node/react-surface-KYLF2XNL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/node/react-surface-KYLF2XNL.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-TEZPML34.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-YTD6SK5V.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-TEZPML34.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/node/chunk-TEZPML34.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-CMYJDMSG.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-3TTH3HKL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3767},"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.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-YTD6SK5V.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2362},"packages/plugins/plugin-chess/dist/lib/node/chunk-YTD6SK5V.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":955}},"bytes":1096}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":18402,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":4522,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3335,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1825,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7895,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5064},"packages/plugins/plugin-chess/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-VXYRI6VA.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-YDPYM4NV.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-TZFKPQOV.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-OHQIPHSN.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":1623},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2825},"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-VXYRI6VA.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-YDPYM4NV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8015},"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-YDPYM4NV.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-VXYRI6VA.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":5714}},"bytes":5974},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-TZFKPQOV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-TZFKPQOV.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-VXYRI6VA.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-LEPLNICP.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-LEPLNICP.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":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/node/react-surface-OHQIPHSN.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/node/react-surface-OHQIPHSN.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-VXYRI6VA.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-ITDMCBQQ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-LEPLNICP.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-VXYRI6VA.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3767},"packages/plugins/plugin-chess/dist/lib/node/chunk-VXYRI6VA.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}}}
|