@dxos/plugin-chess 0.8.2-main.fbd8ed0 → 0.8.2-staging.42af850
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-YUAPS5GU.mjs → artifact-definition-QYGM7HNY.mjs} +18 -21
- 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-FSWWNFQE.mjs → chunk-77TLTU3X.mjs} +4 -4
- package/dist/lib/browser/{chunk-FSWWNFQE.mjs.map → chunk-77TLTU3X.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/{intent-resolver-O5FBTUC6.mjs → intent-resolver-FLV47FUV.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-IT4WC47R.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-N5H23WYL.cjs → artifact-definition-FRBMG5FU.cjs} +33 -36
- package/dist/lib/node/artifact-definition-FRBMG5FU.cjs.map +7 -0
- package/dist/lib/node/{chunk-ZYU6LFL4.cjs → chunk-33WBRZI6.cjs} +5 -5
- package/dist/lib/node/{chunk-ZYU6LFL4.cjs.map → chunk-33WBRZI6.cjs.map} +1 -1
- 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-TSN5O423.cjs → intent-resolver-AKAIXSZF.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-6OYEX6SB.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-NGV6PDXW.mjs → artifact-definition-YKVCYZQ7.mjs} +18 -21
- 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-FKW7YGV5.mjs → chunk-WPCT7LRN.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-FKW7YGV5.mjs.map → chunk-WPCT7LRN.mjs.map} +1 -1
- package/dist/lib/node-esm/index.mjs +6 -6
- package/dist/lib/node-esm/{intent-resolver-PXPQTYAA.mjs → intent-resolver-VK3EDUMM.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-G4CSGFTJ.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/package.json +25 -22
- package/src/capabilities/artifact-definition.ts +8 -7
- package/src/components/ChessComponent.tsx +6 -1
- package/dist/lib/browser/ChessContainer-6JIE36JW.mjs +0 -84
- package/dist/lib/browser/artifact-definition-YUAPS5GU.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/node/ChessContainer-BZMTO4FZ.cjs +0 -106
- package/dist/lib/node/artifact-definition-N5H23WYL.cjs.map +0 -7
- package/dist/lib/node/chunk-CSRNUKOH.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs +0 -85
- package/dist/lib/node-esm/artifact-definition-NGV6PDXW.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/browser/{chunk-7SPN7XYA.mjs.map → chunk-5QBQW62M.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-O5FBTUC6.mjs.map → intent-resolver-FLV47FUV.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-IT4WC47R.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/{intent-resolver-TSN5O423.cjs.map → intent-resolver-AKAIXSZF.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-6OYEX6SB.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/{intent-resolver-PXPQTYAA.mjs.map → intent-resolver-VK3EDUMM.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-G4CSGFTJ.mjs.map → react-surface-Y54QUEUA.mjs.map} +0 -0
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.live)(
|
|
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
|
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":2981,"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":3208,"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":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":19311,"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":2736,"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-ZYU6LFL4.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-N5H23WYL.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-TSN5O423.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-6OYEX6SB.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-ZYU6LFL4.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-N5H23WYL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8430},"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-N5H23WYL.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-ZYU6LFL4.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":5973}},"bytes":6233},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-TSN5O423.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1366},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-TSN5O423.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-ZYU6LFL4.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-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-6OYEX6SB.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/node/react-surface-6OYEX6SB.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-ZYU6LFL4.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-ZYU6LFL4.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3966},"packages/plugins/plugin-chess/dist/lib/node/chunk-ZYU6LFL4.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-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
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ChessComponent
|
|
4
|
+
} from "./chunk-MVMMCPHE.mjs";
|
|
5
|
+
|
|
6
|
+
// packages/plugins/plugin-chess/src/components/ChessContainer.tsx
|
|
7
|
+
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
8
|
+
import React2 from "react";
|
|
9
|
+
import { getSpace } from "@dxos/react-client/echo";
|
|
10
|
+
import { StackItem } from "@dxos/react-ui-stack";
|
|
11
|
+
|
|
12
|
+
// packages/plugins/plugin-chess/src/components/PlayerSelector.tsx
|
|
13
|
+
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
14
|
+
import { CrownCross } from "@phosphor-icons/react";
|
|
15
|
+
import React from "react";
|
|
16
|
+
import { generateName } from "@dxos/display-name";
|
|
17
|
+
import { useMembers } from "@dxos/react-client/echo";
|
|
18
|
+
import { Input, Select, useThemeContext } from "@dxos/react-ui";
|
|
19
|
+
import { getSize, mx } from "@dxos/react-ui-theme";
|
|
20
|
+
var PlayerSelector = ({ space, game }) => {
|
|
21
|
+
var _effect = _useSignals();
|
|
22
|
+
try {
|
|
23
|
+
const members = useMembers(space.key);
|
|
24
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
25
|
+
role: "none",
|
|
26
|
+
className: "grid grid-cols-2 gap-8"
|
|
27
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
28
|
+
role: "none",
|
|
29
|
+
className: "flex flex-row-reverse items-center gap-2"
|
|
30
|
+
}, /* @__PURE__ */ React.createElement(PlayerSelect, {
|
|
31
|
+
side: "white",
|
|
32
|
+
value: game.playerWhite,
|
|
33
|
+
onValueChange: (player) => game.playerWhite = player,
|
|
34
|
+
members
|
|
35
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
36
|
+
role: "none",
|
|
37
|
+
className: "flex flex-row items-center gap-2"
|
|
38
|
+
}, /* @__PURE__ */ React.createElement(PlayerSelect, {
|
|
39
|
+
side: "black",
|
|
40
|
+
value: game.playerBlack,
|
|
41
|
+
onValueChange: (player) => game.playerBlack = player,
|
|
42
|
+
members
|
|
43
|
+
})));
|
|
44
|
+
} finally {
|
|
45
|
+
_effect.f();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var PlayerSelect = ({ side, value, onValueChange, members }) => {
|
|
49
|
+
var _effect = _useSignals();
|
|
50
|
+
try {
|
|
51
|
+
const { themeMode } = useThemeContext();
|
|
52
|
+
const iconFillMode = side === "black" && themeMode === "light" || side === "white" && themeMode === "dark" ? "fill" : void 0;
|
|
53
|
+
return /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Label, null, /* @__PURE__ */ React.createElement(CrownCross, {
|
|
54
|
+
className: mx(getSize(6)),
|
|
55
|
+
weight: iconFillMode,
|
|
56
|
+
"aria-label": `Chess icon for side ${side}`
|
|
57
|
+
})), /* @__PURE__ */ React.createElement(Select.Root, {
|
|
58
|
+
value,
|
|
59
|
+
onValueChange
|
|
60
|
+
}, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
|
|
61
|
+
placeholder: "Select player"
|
|
62
|
+
}), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, members.map((member) => {
|
|
63
|
+
const memberKey = member.identity.identityKey.toHex();
|
|
64
|
+
const displayName = member.identity?.profile?.displayName || generateName(memberKey);
|
|
65
|
+
return /* @__PURE__ */ React.createElement(Select.Option, {
|
|
66
|
+
key: memberKey,
|
|
67
|
+
value: memberKey
|
|
68
|
+
}, displayName);
|
|
69
|
+
}))))));
|
|
70
|
+
} finally {
|
|
71
|
+
_effect.f();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// packages/plugins/plugin-chess/src/components/ChessContainer.tsx
|
|
76
|
+
var ChessContainer = ({ game }) => {
|
|
77
|
+
var _effect = _useSignals2();
|
|
78
|
+
try {
|
|
79
|
+
const space = getSpace(game);
|
|
80
|
+
if (!space) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ React2.createElement(StackItem.Content, null, /* @__PURE__ */ React2.createElement("div", {
|
|
84
|
+
role: "none",
|
|
85
|
+
className: "grid grid-rows-[60px_1fr_60px] grow overflow-hidden"
|
|
86
|
+
}, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", {
|
|
87
|
+
className: "flex m-4 overflow-hidden"
|
|
88
|
+
}, /* @__PURE__ */ React2.createElement(ChessComponent, {
|
|
89
|
+
game
|
|
90
|
+
})), /* @__PURE__ */ React2.createElement(PlayerSelector, {
|
|
91
|
+
space,
|
|
92
|
+
game
|
|
93
|
+
})));
|
|
94
|
+
} finally {
|
|
95
|
+
_effect.f();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var ChessContainer_default = ChessContainer;
|
|
99
|
+
export {
|
|
100
|
+
ChessContainer_default as default
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=ChessContainer-KSLGJHPW.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/ChessContainer.tsx", "../../../src/components/PlayerSelector.tsx"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { ChessComponent } from './ChessComponent';\nimport { PlayerSelector } from './PlayerSelector';\nimport { type ChessType } from '../types';\n\nconst ChessContainer = ({ game }: { game: ChessType; role?: string }) => {\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n return (\n <StackItem.Content>\n <div role='none' className='grid grid-rows-[60px_1fr_60px] grow overflow-hidden'>\n <div />\n\n <div className='flex m-4 overflow-hidden'>\n <ChessComponent game={game} />\n </div>\n\n <PlayerSelector space={space} game={game} />\n </div>\n </StackItem.Content>\n );\n};\n\nexport default ChessContainer;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { CrownCross } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { generateName } from '@dxos/display-name';\nimport { useMembers, type Space, type SpaceMember } from '@dxos/react-client/echo';\nimport { Input, Select, useThemeContext } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { type ChessType } from '../types';\n\nexport const PlayerSelector = ({ space, game }: { space: Space; game: ChessType }) => {\n const members = useMembers(space.key);\n\n return (\n <div role='none' className='grid grid-cols-2 gap-8'>\n <div role='none' className='flex flex-row-reverse items-center gap-2'>\n <PlayerSelect\n side='white'\n value={game.playerWhite}\n onValueChange={(player) => (game.playerWhite = player)}\n members={members}\n />\n </div>\n <div role='none' className='flex flex-row items-center gap-2'>\n <PlayerSelect\n side='black'\n value={game.playerBlack}\n onValueChange={(player) => (game.playerBlack = player)}\n members={members}\n />\n </div>\n </div>\n );\n};\n\nconst PlayerSelect = ({\n side,\n value,\n onValueChange,\n members,\n}: {\n side: 'white' | 'black';\n value: string | undefined;\n onValueChange: (player: string) => void;\n members: SpaceMember[];\n}) => {\n const { themeMode } = useThemeContext();\n const iconFillMode =\n (side === 'black' && themeMode === 'light') || (side === 'white' && themeMode === 'dark') ? 'fill' : undefined;\n\n return (\n <Input.Root>\n <Input.Label>\n <CrownCross className={mx(getSize(6))} weight={iconFillMode} aria-label={`Chess icon for side ${side}`} />\n </Input.Label>\n <Select.Root value={value} onValueChange={onValueChange}>\n <Select.TriggerButton placeholder={'Select player'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {members.map((member) => {\n const memberKey = member.identity.identityKey.toHex();\n const displayName = member.identity?.profile?.displayName || generateName(memberKey);\n return (\n <Select.Option key={memberKey} value={memberKey}>\n {displayName}\n </Select.Option>\n );\n })}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Input.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;;;;ACH1B,SAASC,kBAAkB;AAC3B,OAAOC,WAAW;AAElB,SAASC,oBAAoB;AAC7B,SAASC,kBAAgD;AACzD,SAASC,OAAOC,QAAQC,uBAAuB;AAC/C,SAASC,SAASC,UAAU;AAIrB,IAAMC,iBAAiB,CAAC,EAAEC,OAAOC,KAAI,MAAqC;;;AAC/E,UAAMC,UAAUC,WAAWH,MAAMI,GAAG;AAEpC,WACE,sBAAA,cAACC,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,sBAAA,cAACF,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,sBAAA,cAACC,cAAAA;MACCC,MAAK;MACLC,OAAOT,KAAKU;MACZC,eAAe,CAACC,WAAYZ,KAAKU,cAAcE;MAC/CX;SAGJ,sBAAA,cAACG,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,sBAAA,cAACC,cAAAA;MACCC,MAAK;MACLC,OAAOT,KAAKa;MACZF,eAAe,CAACC,WAAYZ,KAAKa,cAAcD;MAC/CX;;;;;AAKV;AAEA,IAAMM,eAAe,CAAC,EACpBC,MACAC,OACAE,eACAV,QAAO,MAMR;;;AACC,UAAM,EAAEa,UAAS,IAAKC,gBAAAA;AACtB,UAAMC,eACHR,SAAS,WAAWM,cAAc,WAAaN,SAAS,WAAWM,cAAc,SAAU,SAASG;AAEvG,WACE,sBAAA,cAACC,MAAMC,MAAI,MACT,sBAAA,cAACD,MAAME,OAAK,MACV,sBAAA,cAACC,YAAAA;MAAWf,WAAWgB,GAAGC,QAAQ,CAAA,CAAA;MAAKC,QAAQR;MAAcS,cAAY,uBAAuBjB,IAAAA;SAElG,sBAAA,cAACkB,OAAOP,MAAI;MAACV;MAAcE;OACzB,sBAAA,cAACe,OAAOC,eAAa;MAACC,aAAa;QACnC,sBAAA,cAACF,OAAOG,QAAM,MACZ,sBAAA,cAACH,OAAOI,SAAO,MACb,sBAAA,cAACJ,OAAOK,UAAQ,MACb9B,QAAQ+B,IAAI,CAACC,WAAAA;AACZ,YAAMC,YAAYD,OAAOE,SAASC,YAAYC,MAAK;AACnD,YAAMC,cAAcL,OAAOE,UAAUI,SAASD,eAAeE,aAAaN,SAAAA;AAC1E,aACE,sBAAA,cAACR,OAAOe,QAAM;QAACtC,KAAK+B;QAAWzB,OAAOyB;SACnCI,WAAAA;IAGP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAOd;;;ADlEA,IAAMI,iBAAiB,CAAC,EAAEC,KAAI,MAAsC;;;AAClE,UAAMC,QAAQC,SAASF,IAAAA;AACvB,QAAI,CAACC,OAAO;AACV,aAAO;IACT;AAEA,WACE,gBAAAE,OAAA,cAACC,UAAUC,SAAO,MAChB,gBAAAF,OAAA,cAACG,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,gBAAAL,OAAA,cAACG,OAAAA,IAAAA,GAED,gBAAAH,OAAA,cAACG,OAAAA;MAAIE,WAAU;OACb,gBAAAL,OAAA,cAACM,gBAAAA;MAAeT;SAGlB,gBAAAG,OAAA,cAACO,gBAAAA;MAAeT;MAAcD;;;;;AAItC;AAEA,IAAA,yBAAeD;",
|
|
6
6
|
"names": ["React", "getSpace", "StackItem", "CrownCross", "React", "generateName", "useMembers", "Input", "Select", "useThemeContext", "getSize", "mx", "PlayerSelector", "space", "game", "members", "useMembers", "key", "div", "role", "className", "PlayerSelect", "side", "value", "playerWhite", "onValueChange", "player", "playerBlack", "themeMode", "useThemeContext", "iconFillMode", "undefined", "Input", "Root", "Label", "CrownCross", "mx", "getSize", "weight", "aria-label", "Select", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "map", "member", "memberKey", "identity", "identityKey", "toHex", "displayName", "profile", "generateName", "Option", "ChessContainer", "game", "space", "getSpace", "React", "StackItem", "Content", "div", "role", "className", "ChessComponent", "PlayerSelector"]
|
|
7
7
|
}
|
package/dist/lib/node-esm/{artifact-definition-NGV6PDXW.mjs → artifact-definition-YKVCYZQ7.mjs}
RENAMED
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
ChessAction,
|
|
4
4
|
ChessType,
|
|
5
5
|
meta
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WPCT7LRN.mjs";
|
|
7
7
|
|
|
8
8
|
// packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts
|
|
9
9
|
import { Chess } from "chess.js";
|
|
10
10
|
import { pipe, Schema } from "effect";
|
|
11
|
+
import { createTool, ToolResult } from "@dxos/ai";
|
|
11
12
|
import { Capabilities, chain, contributes, createIntent } from "@dxos/app-framework";
|
|
12
|
-
import { ArtifactId, defineArtifact
|
|
13
|
+
import { ArtifactId, defineArtifact } from "@dxos/artifact";
|
|
13
14
|
import { createArtifactElement, VersionPin } from "@dxos/assistant";
|
|
14
15
|
import { isInstanceOf } from "@dxos/echo-schema";
|
|
15
16
|
import { invariant } from "@dxos/invariant";
|
|
@@ -27,7 +28,7 @@ var artifact_definition_default = () => {
|
|
|
27
28
|
`,
|
|
28
29
|
schema: ChessType,
|
|
29
30
|
tools: [
|
|
30
|
-
|
|
31
|
+
createTool(meta.id, {
|
|
31
32
|
name: "create",
|
|
32
33
|
description: "Create a new chess game. Returns the artifact definition for the game.",
|
|
33
34
|
caption: "Creating chess game...",
|
|
@@ -39,7 +40,7 @@ var artifact_definition_default = () => {
|
|
|
39
40
|
execute: async ({ fen }, { extensions }) => {
|
|
40
41
|
invariant(extensions?.space, "No space", {
|
|
41
42
|
F: __dxlog_file,
|
|
42
|
-
L:
|
|
43
|
+
L: 47,
|
|
43
44
|
S: void 0,
|
|
44
45
|
A: [
|
|
45
46
|
"extensions?.space",
|
|
@@ -48,7 +49,7 @@ var artifact_definition_default = () => {
|
|
|
48
49
|
});
|
|
49
50
|
invariant(extensions?.dispatch, "No intent dispatcher", {
|
|
50
51
|
F: __dxlog_file,
|
|
51
|
-
L:
|
|
52
|
+
L: 48,
|
|
52
53
|
S: void 0,
|
|
53
54
|
A: [
|
|
54
55
|
"extensions?.dispatch",
|
|
@@ -69,7 +70,7 @@ var artifact_definition_default = () => {
|
|
|
69
70
|
]);
|
|
70
71
|
}
|
|
71
72
|
}),
|
|
72
|
-
|
|
73
|
+
createTool(meta.id, {
|
|
73
74
|
name: "list",
|
|
74
75
|
description: "Query all active chess games.",
|
|
75
76
|
caption: "Getting games...",
|
|
@@ -77,7 +78,7 @@ var artifact_definition_default = () => {
|
|
|
77
78
|
execute: async (_, { extensions }) => {
|
|
78
79
|
invariant(extensions?.space, "No space", {
|
|
79
80
|
F: __dxlog_file,
|
|
80
|
-
L:
|
|
81
|
+
L: 69,
|
|
81
82
|
S: void 0,
|
|
82
83
|
A: [
|
|
83
84
|
"extensions?.space",
|
|
@@ -87,7 +88,7 @@ var artifact_definition_default = () => {
|
|
|
87
88
|
const { objects: games } = await extensions.space.db.query(Filter.type(ChessType)).run();
|
|
88
89
|
invariant(games.length > 0, "No chess games found", {
|
|
89
90
|
F: __dxlog_file,
|
|
90
|
-
L:
|
|
91
|
+
L: 71,
|
|
91
92
|
S: void 0,
|
|
92
93
|
A: [
|
|
93
94
|
"games.length > 0",
|
|
@@ -97,7 +98,7 @@ var artifact_definition_default = () => {
|
|
|
97
98
|
return ToolResult.Success(games);
|
|
98
99
|
}
|
|
99
100
|
}),
|
|
100
|
-
|
|
101
|
+
createTool(meta.id, {
|
|
101
102
|
name: "inspect",
|
|
102
103
|
description: "Get the current state of the chess game.",
|
|
103
104
|
caption: "Inspecting game...",
|
|
@@ -107,19 +108,17 @@ var artifact_definition_default = () => {
|
|
|
107
108
|
execute: async ({ id }, { extensions }) => {
|
|
108
109
|
invariant(extensions?.space, "No space", {
|
|
109
110
|
F: __dxlog_file,
|
|
110
|
-
L:
|
|
111
|
+
L: 81,
|
|
111
112
|
S: void 0,
|
|
112
113
|
A: [
|
|
113
114
|
"extensions?.space",
|
|
114
115
|
"'No space'"
|
|
115
116
|
]
|
|
116
117
|
});
|
|
117
|
-
const game = await extensions.space.db.query(
|
|
118
|
-
id: ArtifactId.toDXN(id, extensions.space.id).toString()
|
|
119
|
-
}).first();
|
|
118
|
+
const game = await extensions.space.db.query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString())).first();
|
|
120
119
|
invariant(isInstanceOf(ChessType, game), void 0, {
|
|
121
120
|
F: __dxlog_file,
|
|
122
|
-
L:
|
|
121
|
+
L: 85,
|
|
123
122
|
S: void 0,
|
|
124
123
|
A: [
|
|
125
124
|
"isInstanceOf(ChessType, game)",
|
|
@@ -129,7 +128,7 @@ var artifact_definition_default = () => {
|
|
|
129
128
|
return ToolResult.Success(game.fen);
|
|
130
129
|
}
|
|
131
130
|
}),
|
|
132
|
-
|
|
131
|
+
createTool(meta.id, {
|
|
133
132
|
name: "move",
|
|
134
133
|
description: "Make a move in the chess game.",
|
|
135
134
|
caption: "Making chess move...",
|
|
@@ -146,19 +145,17 @@ var artifact_definition_default = () => {
|
|
|
146
145
|
execute: async ({ id, move }, { extensions }) => {
|
|
147
146
|
invariant(extensions?.space, "No space", {
|
|
148
147
|
F: __dxlog_file,
|
|
149
|
-
L:
|
|
148
|
+
L: 102,
|
|
150
149
|
S: void 0,
|
|
151
150
|
A: [
|
|
152
151
|
"extensions?.space",
|
|
153
152
|
"'No space'"
|
|
154
153
|
]
|
|
155
154
|
});
|
|
156
|
-
const game = await extensions.space.db.query(
|
|
157
|
-
id: ArtifactId.toDXN(id, extensions.space.id).toString()
|
|
158
|
-
}).first();
|
|
155
|
+
const game = await extensions.space.db.query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString())).first();
|
|
159
156
|
invariant(isInstanceOf(ChessType, game), void 0, {
|
|
160
157
|
F: __dxlog_file,
|
|
161
|
-
L:
|
|
158
|
+
L: 106,
|
|
162
159
|
S: void 0,
|
|
163
160
|
A: [
|
|
164
161
|
"isInstanceOf(ChessType, game)",
|
|
@@ -183,4 +180,4 @@ var artifact_definition_default = () => {
|
|
|
183
180
|
export {
|
|
184
181
|
artifact_definition_default as default
|
|
185
182
|
};
|
|
186
|
-
//# sourceMappingURL=artifact-definition-
|
|
183
|
+
//# sourceMappingURL=artifact-definition-YKVCYZQ7.mjs.map
|