@dxos/plugin-chess 0.8.2-main.f081794 → 0.8.2-main.fbd8ed0
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/{artifact-definition-G5WCL22R.mjs → artifact-definition-YUAPS5GU.mjs} +23 -21
- package/dist/lib/browser/artifact-definition-YUAPS5GU.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EIRRN4WP.mjs → chunk-FSWWNFQE.mjs} +20 -18
- package/dist/lib/browser/chunk-FSWWNFQE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +4 -4
- package/dist/lib/browser/{intent-resolver-QECLUB7C.mjs → intent-resolver-O5FBTUC6.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-CMUAPVQA.mjs → react-surface-IT4WC47R.mjs} +2 -2
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{artifact-definition-3O73PXUP.cjs → artifact-definition-N5H23WYL.cjs} +33 -31
- package/dist/lib/node/artifact-definition-N5H23WYL.cjs.map +7 -0
- package/dist/lib/node/{chunk-SVNVQAMR.cjs → chunk-ZYU6LFL4.cjs} +21 -19
- package/dist/lib/node/chunk-ZYU6LFL4.cjs.map +7 -0
- package/dist/lib/node/index.cjs +18 -18
- package/dist/lib/node/{intent-resolver-JMO3PEBA.cjs → intent-resolver-TSN5O423.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-GSLVN4KN.cjs → react-surface-6OYEX6SB.cjs} +8 -8
- package/dist/lib/node/types/index.cjs +5 -5
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{artifact-definition-4OCVHZUU.mjs → artifact-definition-NGV6PDXW.mjs} +23 -21
- package/dist/lib/node-esm/artifact-definition-NGV6PDXW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WDC3FJ53.mjs → chunk-FKW7YGV5.mjs} +20 -18
- package/dist/lib/node-esm/chunk-FKW7YGV5.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +4 -4
- package/dist/lib/node-esm/{intent-resolver-BDI3HVPZ.mjs → intent-resolver-PXPQTYAA.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-L5YMO5FM.mjs → react-surface-G4CSGFTJ.mjs} +2 -2
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/components/ChessComponent.d.ts.map +1 -1
- package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
- package/dist/types/src/components/PlayerSelector.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +15 -15
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +7 -7
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -21
- package/src/capabilities/artifact-definition.ts +19 -13
- package/src/types/schema.ts +15 -13
- package/src/types/types.ts +8 -6
- package/dist/lib/browser/artifact-definition-G5WCL22R.mjs.map +0 -7
- package/dist/lib/browser/chunk-EIRRN4WP.mjs.map +0 -7
- package/dist/lib/node/artifact-definition-3O73PXUP.cjs.map +0 -7
- package/dist/lib/node/chunk-SVNVQAMR.cjs.map +0 -7
- package/dist/lib/node-esm/artifact-definition-4OCVHZUU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WDC3FJ53.mjs.map +0 -7
- /package/dist/lib/browser/{intent-resolver-QECLUB7C.mjs.map → intent-resolver-O5FBTUC6.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-CMUAPVQA.mjs.map → react-surface-IT4WC47R.mjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-JMO3PEBA.cjs.map → intent-resolver-TSN5O423.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-GSLVN4KN.cjs.map → react-surface-6OYEX6SB.cjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-BDI3HVPZ.mjs.map → intent-resolver-PXPQTYAA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-L5YMO5FM.mjs.map → react-surface-G4CSGFTJ.mjs.map} +0 -0
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// packages/plugins/plugin-chess/src/types/schema.ts
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { Schema } from "effect";
|
|
5
|
+
import { TypedObject } from "@dxos/echo-schema";
|
|
6
|
+
var MoveSchema = Schema.mutable(Schema.partial(Schema.Struct({
|
|
7
|
+
source: Schema.String,
|
|
8
|
+
target: Schema.String,
|
|
9
|
+
piece: Schema.String
|
|
9
10
|
})));
|
|
10
11
|
var ChessType = class extends TypedObject({
|
|
11
12
|
typename: "dxos.org/type/Chess",
|
|
12
13
|
version: "0.1.0"
|
|
13
14
|
})({
|
|
14
|
-
name:
|
|
15
|
-
playerWhite:
|
|
16
|
-
playerBlack:
|
|
17
|
-
moves:
|
|
15
|
+
name: Schema.optional(Schema.String),
|
|
16
|
+
playerWhite: Schema.String,
|
|
17
|
+
playerBlack: Schema.String,
|
|
18
|
+
moves: Schema.mutable(Schema.Array(Schema.String)),
|
|
18
19
|
// TODO(wittjosiah): Remove. Redundant with moves.
|
|
19
|
-
pgn:
|
|
20
|
-
fen:
|
|
20
|
+
pgn: Schema.String,
|
|
21
|
+
fen: Schema.String
|
|
21
22
|
}, {
|
|
22
23
|
partial: true
|
|
23
24
|
}) {
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
// packages/plugins/plugin-chess/src/types/types.ts
|
|
27
|
-
import {
|
|
28
|
+
import { Schema as Schema2 } from "effect";
|
|
29
|
+
import { isInstanceOf } from "@dxos/echo-schema";
|
|
28
30
|
import { isLiveObject } from "@dxos/live-object";
|
|
29
31
|
|
|
30
32
|
// packages/plugins/plugin-chess/src/meta.ts
|
|
@@ -44,12 +46,12 @@ var meta = {
|
|
|
44
46
|
var ChessAction;
|
|
45
47
|
(function(ChessAction2) {
|
|
46
48
|
const CHESS_ACTION = `${CHESS_PLUGIN}/action`;
|
|
47
|
-
class Create extends
|
|
48
|
-
input:
|
|
49
|
-
name:
|
|
50
|
-
fen:
|
|
49
|
+
class Create extends Schema2.TaggedClass()(`${CHESS_ACTION}/create`, {
|
|
50
|
+
input: Schema2.Struct({
|
|
51
|
+
name: Schema2.optional(Schema2.String),
|
|
52
|
+
fen: Schema2.optional(Schema2.String)
|
|
51
53
|
}),
|
|
52
|
-
output:
|
|
54
|
+
output: Schema2.Struct({
|
|
53
55
|
object: ChessType
|
|
54
56
|
})
|
|
55
57
|
}) {
|
|
@@ -68,4 +70,4 @@ export {
|
|
|
68
70
|
ChessAction,
|
|
69
71
|
isObject
|
|
70
72
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-FKW7YGV5.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts", "../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\n\nexport const MoveSchema = Schema.mutable(\n Schema.partial(\n Schema.Struct({\n source: Schema.String,\n target: Schema.String,\n piece: Schema.String,\n }),\n ),\n);\n\nexport class ChessType extends TypedObject({ typename: 'dxos.org/type/Chess', version: '0.1.0' })(\n {\n name: Schema.optional(Schema.String),\n playerWhite: Schema.String,\n playerBlack: Schema.String,\n moves: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Remove. Redundant with moves.\n pgn: Schema.String,\n fen: Schema.String,\n },\n { partial: true },\n) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { isLiveObject } from '@dxos/live-object';\n\nimport { ChessType } from './schema';\nimport { CHESS_PLUGIN } from '../meta';\n\nexport namespace ChessAction {\n const CHESS_ACTION = `${CHESS_PLUGIN}/action`;\n\n export class Create extends Schema.TaggedClass<Create>()(`${CHESS_ACTION}/create`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n fen: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: ChessType,\n }),\n }) {}\n}\n\nexport const isObject = (object: unknown): object is typeof ChessType => {\n return isLiveObject(object) && isInstanceOf(ChessType, object);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CHESS_PLUGIN = 'dxos.org/plugin/chess';\n\nexport const meta: PluginMeta = {\n id: CHESS_PLUGIN,\n name: 'Chess',\n description:\n 'Chess is a simple plugin which allows you to render an interactive chessboard inside of a plank. This chessboard can be used for collaborative chess games, or for practice experiments with the LLM. ',\n icon: 'ph--shield-chevron--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n screenshots: ['https://dxos.network/plugin-details-chess-dark.png'],\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAErB,IAAMC,aAAaC,OAAOC,QAC/BD,OAAOE,QACLF,OAAOG,OAAO;EACZC,QAAQJ,OAAOK;EACfC,QAAQN,OAAOK;EACfE,OAAOP,OAAOK;AAChB,CAAA,CAAA,CAAA;AAIG,IAAMG,YAAN,cAAwBC,YAAY;EAAEC,UAAU;EAAuBC,SAAS;AAAQ,CAAA,EAC7F;EACEC,MAAMZ,OAAOa,SAASb,OAAOK,MAAM;EACnCS,aAAad,OAAOK;EACpBU,aAAaf,OAAOK;EACpBW,OAAOhB,OAAOC,QAAQD,OAAOiB,MAAMjB,OAAOK,MAAM,CAAA;;EAEhDa,KAAKlB,OAAOK;EACZc,KAAKnB,OAAOK;AACd,GACA;EAAEH,SAAS;AAAK,CAAA,EAAA;AACf;;;ACzBH,SAASkB,UAAAA,eAAc;AAEvB,SAASC,oBAAoB;AAC7B,SAASC,oBAAoB;;;ACDtB,IAAMC,eAAe;AAErB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,aAAa;IAAC;;AAChB;;;;UDJiBC,cAAAA;AACf,QAAMC,eAAe,GAAGC,YAAAA;EAEjB,MAAMC,eAAeC,QAAOC,YAAW,EAAW,GAAGJ,YAAAA,WAAuB;IACjFK,OAAOF,QAAOG,OAAO;MACnBC,MAAMJ,QAAOK,SAASL,QAAOM,MAAM;MACnCC,KAAKP,QAAOK,SAASL,QAAOM,MAAM;IACpC,CAAA;IACAE,QAAQR,QAAOG,OAAO;MACpBM,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;eARSX,SAAAA;AASf,GAZiBH,gBAAAA,cAAAA,CAAAA,EAAAA;AAcV,IAAMe,WAAW,CAACF,WAAAA;AACvB,SAAOG,aAAaH,MAAAA,KAAWI,aAAaH,WAAWD,MAAAA;AACzD;",
|
|
6
|
+
"names": ["Schema", "TypedObject", "MoveSchema", "Schema", "mutable", "partial", "Struct", "source", "String", "target", "piece", "ChessType", "TypedObject", "typename", "version", "name", "optional", "playerWhite", "playerBlack", "moves", "Array", "pgn", "fen", "Schema", "isInstanceOf", "isLiveObject", "CHESS_PLUGIN", "meta", "id", "name", "description", "icon", "source", "screenshots", "ChessAction", "CHESS_ACTION", "CHESS_PLUGIN", "Create", "Schema", "TaggedClass", "input", "Struct", "name", "optional", "String", "fen", "output", "object", "ChessType", "isObject", "isLiveObject", "isInstanceOf"]
|
|
7
|
+
}
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
ChessAction,
|
|
8
8
|
ChessType,
|
|
9
9
|
meta
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FKW7YGV5.mjs";
|
|
11
11
|
import {
|
|
12
12
|
ChessComponent
|
|
13
13
|
} from "./chunk-6SEDGO5G.mjs";
|
|
14
14
|
|
|
15
15
|
// packages/plugins/plugin-chess/src/capabilities/index.ts
|
|
16
16
|
import { lazy } from "@dxos/app-framework";
|
|
17
|
-
var ArtifactDefinition = lazy(() => import("./artifact-definition-
|
|
18
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
19
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
17
|
+
var ArtifactDefinition = lazy(() => import("./artifact-definition-NGV6PDXW.mjs"));
|
|
18
|
+
var IntentResolver = lazy(() => import("./intent-resolver-PXPQTYAA.mjs"));
|
|
19
|
+
var ReactSurface = lazy(() => import("./react-surface-G4CSGFTJ.mjs"));
|
|
20
20
|
|
|
21
21
|
// packages/plugins/plugin-chess/src/ChessPlugin.tsx
|
|
22
22
|
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
ChessAction,
|
|
4
4
|
ChessType
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FKW7YGV5.mjs";
|
|
6
6
|
|
|
7
7
|
// packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
|
|
8
8
|
import { Chess } from "chess.js";
|
|
@@ -26,4 +26,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
|
|
|
26
26
|
export {
|
|
27
27
|
intent_resolver_default as default
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=intent-resolver-
|
|
29
|
+
//# sourceMappingURL=intent-resolver-PXPQTYAA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2077,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3023,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":18514,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":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-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4838},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-4OCVHZUU.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-BDI3HVPZ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-L5YMO5FM.mjs","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":2751},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":286},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-4OCVHZUU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8003},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-4OCVHZUU.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5798}},"bytes":6150},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-BDI3HVPZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1367},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-BDI3HVPZ.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":507}},"bytes":839},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6151},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"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":3544},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-L5YMO5FM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1851},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-L5YMO5FM.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","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":1199},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":404},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":328},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3743},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-WDC3FJ53.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":605},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":2051},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2438},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs":{"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":1224}}}
|
|
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-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4838},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-NGV6PDXW.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-PXPQTYAA.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-G4CSGFTJ.mjs","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":2751},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":286},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-NGV6PDXW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8431},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-NGV6PDXW.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5973}},"bytes":6325},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-PXPQTYAA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1367},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-PXPQTYAA.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":507}},"bytes":839},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6151},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"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":3544},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-G4CSGFTJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1851},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-G4CSGFTJ.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs","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":1199},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":404},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-YFCRXSGH.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":328},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3968},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-FKW7YGV5.mjs":{"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":2226},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2438},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-6SEDGO5G.mjs":{"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":1224}}}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
CHESS_PLUGIN,
|
|
7
7
|
ChessType,
|
|
8
8
|
isObject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FKW7YGV5.mjs";
|
|
10
10
|
import {
|
|
11
11
|
ChessComponent
|
|
12
12
|
} from "./chunk-6SEDGO5G.mjs";
|
|
@@ -40,4 +40,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
40
40
|
export {
|
|
41
41
|
react_surface_default as default
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=react-surface-
|
|
43
|
+
//# sourceMappingURL=react-surface-G4CSGFTJ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/artifact-definition.ts"],"names":[],"mappings":"AAOA,OAAO,EAAkD,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAMnH,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,uBAAuB,CAAC;KACpC;CACF;;AAED,
|
|
1
|
+
{"version":3,"file":"artifact-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/artifact-definition.ts"],"names":[],"mappings":"AAOA,OAAO,EAAkD,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAMnH,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,uBAAuB,CAAC;KACpC;CACF;;AAED,wBA+FE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"ChessComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,6BAoC3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,QAAA,MAAM,cAAc,GAAI,UAAU;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,6BAmBnE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayerSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAc,KAAK,KAAK,EAAoB,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"PlayerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayerSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAc,KAAK,KAAK,EAAoB,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,GAAI,iBAAiB;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,sBAuBhF,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
import { ChessType } from './types';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
'en-US': {
|
|
3
|
-
[
|
|
4
|
+
[ChessType.typename]: {
|
|
4
5
|
'typename label': string;
|
|
5
6
|
'object name placeholder': string;
|
|
6
|
-
'plugin name'?: undefined;
|
|
7
|
-
'delete game label'?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
'plugin name': string;
|
|
10
|
-
'delete game label': string;
|
|
11
|
-
'typename label'?: undefined;
|
|
12
|
-
'object name placeholder'?: undefined;
|
|
13
7
|
};
|
|
14
8
|
"dxos.org/plugin/chess": {
|
|
15
9
|
'plugin name': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;;;QAK9B,CAAC,SAAS,CAAC,QAAQ,CAAC;;;UAGnB;;;;;;;AANP,wBAaE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const MoveSchema:
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export declare const MoveSchema: Schema.mutable<Schema.SchemaClass<{
|
|
3
3
|
readonly source?: string | undefined;
|
|
4
4
|
readonly target?: string | undefined;
|
|
5
5
|
readonly piece?: string | undefined;
|
|
@@ -9,21 +9,21 @@ export declare const MoveSchema: S.mutable<S.SchemaClass<{
|
|
|
9
9
|
readonly piece?: string | undefined;
|
|
10
10
|
}, never>>;
|
|
11
11
|
declare const ChessType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
12
|
-
name:
|
|
13
|
-
playerWhite: typeof
|
|
14
|
-
playerBlack: typeof
|
|
15
|
-
moves:
|
|
16
|
-
pgn: typeof
|
|
17
|
-
fen: typeof
|
|
12
|
+
name: Schema.optional<typeof Schema.String>;
|
|
13
|
+
playerWhite: typeof Schema.String;
|
|
14
|
+
playerBlack: typeof Schema.String;
|
|
15
|
+
moves: Schema.mutable<Schema.Array$<typeof Schema.String>>;
|
|
16
|
+
pgn: typeof Schema.String;
|
|
17
|
+
fen: typeof Schema.String;
|
|
18
18
|
}, {
|
|
19
19
|
partial: true;
|
|
20
|
-
}>,
|
|
21
|
-
name:
|
|
22
|
-
playerWhite: typeof
|
|
23
|
-
playerBlack: typeof
|
|
24
|
-
moves:
|
|
25
|
-
pgn: typeof
|
|
26
|
-
fen: typeof
|
|
20
|
+
}>, Schema.Struct.Encoded<{
|
|
21
|
+
name: Schema.optional<typeof Schema.String>;
|
|
22
|
+
playerWhite: typeof Schema.String;
|
|
23
|
+
playerBlack: typeof Schema.String;
|
|
24
|
+
moves: Schema.mutable<Schema.Array$<typeof Schema.String>>;
|
|
25
|
+
pgn: typeof Schema.String;
|
|
26
|
+
fen: typeof Schema.String;
|
|
27
27
|
}>>;
|
|
28
28
|
export declare class ChessType extends ChessType_base {
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,eAAO,MAAM,UAAU;;;;;;;;UAQtB,CAAC;;;;;;;;;;;;;;;;;;AAEF,qBAAa,SAAU,SAAQ,cAW9B;CAAG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
2
|
import { ChessType } from './schema';
|
|
3
3
|
export declare namespace ChessAction {
|
|
4
|
-
const Create_base:
|
|
5
|
-
readonly _tag:
|
|
4
|
+
const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/chess/action/create", {
|
|
5
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/chess/action/create">;
|
|
6
6
|
} & {
|
|
7
|
-
input:
|
|
8
|
-
name:
|
|
9
|
-
fen:
|
|
7
|
+
input: Schema.Struct<{
|
|
8
|
+
name: Schema.optional<typeof Schema.String>;
|
|
9
|
+
fen: Schema.optional<typeof Schema.String>;
|
|
10
10
|
}>;
|
|
11
|
-
output:
|
|
11
|
+
output: Schema.Struct<{
|
|
12
12
|
object: typeof ChessType;
|
|
13
13
|
}>;
|
|
14
14
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,yBAAiB,WAAW,CAAC;;;;;;;;;;;;IAG3B,MAAM,OAAO,MAAO,SAAQ,WAQ1B;KAAG;;CACN;AAED,eAAO,MAAM,QAAQ,GAAI,QAAQ,OAAO,KAAG,MAAM,IAAI,OAAO,SAE3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-chess",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.fbd8ed0",
|
|
4
4
|
"description": "Chess for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -35,21 +35,22 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
37
|
"chess.js": "^1.0.0",
|
|
38
|
-
"effect": "3.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/display-name": "0.8.2-main.
|
|
44
|
-
"@dxos/echo
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/plugin-
|
|
49
|
-
"@dxos/plugin-
|
|
50
|
-
"@dxos/react-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-ui-
|
|
38
|
+
"effect": "3.14.21",
|
|
39
|
+
"@dxos/assistant": "0.8.2-main.fbd8ed0",
|
|
40
|
+
"@dxos/app-framework": "0.8.2-main.fbd8ed0",
|
|
41
|
+
"@dxos/async": "0.8.2-main.fbd8ed0",
|
|
42
|
+
"@dxos/artifact": "0.8.2-main.fbd8ed0",
|
|
43
|
+
"@dxos/display-name": "0.8.2-main.fbd8ed0",
|
|
44
|
+
"@dxos/echo": "0.8.2-main.fbd8ed0",
|
|
45
|
+
"@dxos/echo-schema": "0.8.2-main.fbd8ed0",
|
|
46
|
+
"@dxos/invariant": "0.8.2-main.fbd8ed0",
|
|
47
|
+
"@dxos/live-object": "0.8.2-main.fbd8ed0",
|
|
48
|
+
"@dxos/plugin-client": "0.8.2-main.fbd8ed0",
|
|
49
|
+
"@dxos/plugin-graph": "0.8.2-main.fbd8ed0",
|
|
50
|
+
"@dxos/react-client": "0.8.2-main.fbd8ed0",
|
|
51
|
+
"@dxos/plugin-space": "0.8.2-main.fbd8ed0",
|
|
52
|
+
"@dxos/react-ui-gameboard": "0.8.2-main.fbd8ed0",
|
|
53
|
+
"@dxos/react-ui-stack": "0.8.2-main.fbd8ed0"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -58,16 +59,16 @@
|
|
|
58
59
|
"react": "~18.2.0",
|
|
59
60
|
"react-dom": "~18.2.0",
|
|
60
61
|
"vite": "5.4.7",
|
|
61
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
62
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
63
|
-
"@dxos/storybook-utils": "0.8.2-main.
|
|
62
|
+
"@dxos/react-ui": "0.8.2-main.fbd8ed0",
|
|
63
|
+
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0",
|
|
64
|
+
"@dxos/storybook-utils": "0.8.2-main.fbd8ed0"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"@phosphor-icons/react": "^2.1.5",
|
|
67
68
|
"react": "~18.2.0",
|
|
68
69
|
"react-dom": "~18.2.0",
|
|
69
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
70
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
70
|
+
"@dxos/react-ui": "0.8.2-main.fbd8ed0",
|
|
71
|
+
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0"
|
|
71
72
|
},
|
|
72
73
|
"publishConfig": {
|
|
73
74
|
"access": "public"
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Chess } from 'chess.js';
|
|
6
|
-
import { pipe } from 'effect';
|
|
6
|
+
import { pipe, Schema } from 'effect';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { ArtifactId, defineArtifact, defineTool, ToolResult } from '@dxos/artifact';
|
|
10
|
-
import { createArtifactElement } from '@dxos/assistant';
|
|
11
|
-
import { isInstanceOf
|
|
10
|
+
import { createArtifactElement, VersionPin } from '@dxos/assistant';
|
|
11
|
+
import { isInstanceOf } from '@dxos/echo-schema';
|
|
12
12
|
import { invariant } from '@dxos/invariant';
|
|
13
13
|
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
14
14
|
import { Filter, type Space } from '@dxos/react-client/echo';
|
|
@@ -39,8 +39,8 @@ export default () => {
|
|
|
39
39
|
name: 'create',
|
|
40
40
|
description: 'Create a new chess game. Returns the artifact definition for the game.',
|
|
41
41
|
caption: 'Creating chess game...',
|
|
42
|
-
schema:
|
|
43
|
-
fen:
|
|
42
|
+
schema: Schema.Struct({
|
|
43
|
+
fen: Schema.String.annotations({ description: 'The state of the chess game in the FEN format.' }),
|
|
44
44
|
}),
|
|
45
45
|
execute: async ({ fen }, { extensions }) => {
|
|
46
46
|
invariant(extensions?.space, 'No space');
|
|
@@ -54,17 +54,19 @@ export default () => {
|
|
|
54
54
|
return ToolResult.Error(error?.message ?? 'Failed to create chess game');
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
return ToolResult.Success(createArtifactElement(data.id)
|
|
57
|
+
return ToolResult.Success(createArtifactElement(data.id), [
|
|
58
|
+
VersionPin.createBlock(VersionPin.fromObject(data.object)),
|
|
59
|
+
]);
|
|
58
60
|
},
|
|
59
61
|
}),
|
|
60
62
|
defineTool(meta.id, {
|
|
61
63
|
name: 'list',
|
|
62
64
|
description: 'Query all active chess games.',
|
|
63
65
|
caption: 'Getting games...',
|
|
64
|
-
schema:
|
|
66
|
+
schema: Schema.Struct({}),
|
|
65
67
|
execute: async (_, { extensions }) => {
|
|
66
68
|
invariant(extensions?.space, 'No space');
|
|
67
|
-
const { objects: games } = await extensions.space.db.query(Filter.
|
|
69
|
+
const { objects: games } = await extensions.space.db.query(Filter.type(ChessType)).run();
|
|
68
70
|
invariant(games.length > 0, 'No chess games found');
|
|
69
71
|
return ToolResult.Success(games);
|
|
70
72
|
},
|
|
@@ -73,10 +75,12 @@ export default () => {
|
|
|
73
75
|
name: 'inspect',
|
|
74
76
|
description: 'Get the current state of the chess game.',
|
|
75
77
|
caption: 'Inspecting game...',
|
|
76
|
-
schema:
|
|
78
|
+
schema: Schema.Struct({ id: ArtifactId }),
|
|
77
79
|
execute: async ({ id }, { extensions }) => {
|
|
78
80
|
invariant(extensions?.space, 'No space');
|
|
79
|
-
const game = await extensions.space.db
|
|
81
|
+
const game = await extensions.space.db
|
|
82
|
+
.query({ id: ArtifactId.toDXN(id, extensions.space.id).toString() })
|
|
83
|
+
.first();
|
|
80
84
|
invariant(isInstanceOf(ChessType, game));
|
|
81
85
|
|
|
82
86
|
return ToolResult.Success(game.fen);
|
|
@@ -86,16 +90,18 @@ export default () => {
|
|
|
86
90
|
name: 'move',
|
|
87
91
|
description: 'Make a move in the chess game.',
|
|
88
92
|
caption: 'Making chess move...',
|
|
89
|
-
schema:
|
|
93
|
+
schema: Schema.Struct({
|
|
90
94
|
id: ArtifactId,
|
|
91
|
-
move:
|
|
95
|
+
move: Schema.String.annotations({
|
|
92
96
|
description: 'The move to make in the chess game.',
|
|
93
97
|
examples: ['e4', 'Bf3'],
|
|
94
98
|
}),
|
|
95
99
|
}),
|
|
96
100
|
execute: async ({ id, move }, { extensions }) => {
|
|
97
101
|
invariant(extensions?.space, 'No space');
|
|
98
|
-
const game = await extensions.space.db
|
|
102
|
+
const game = await extensions.space.db
|
|
103
|
+
.query({ id: ArtifactId.toDXN(id, extensions.space.id).toString() })
|
|
104
|
+
.first();
|
|
99
105
|
invariant(isInstanceOf(ChessType, game));
|
|
100
106
|
|
|
101
107
|
const board = new Chess(game.fen);
|
package/src/types/schema.ts
CHANGED
|
@@ -2,27 +2,29 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
import { TypedObject } from '@dxos/echo-schema';
|
|
8
|
+
|
|
9
|
+
export const MoveSchema = Schema.mutable(
|
|
10
|
+
Schema.partial(
|
|
11
|
+
Schema.Struct({
|
|
12
|
+
source: Schema.String,
|
|
13
|
+
target: Schema.String,
|
|
14
|
+
piece: Schema.String,
|
|
13
15
|
}),
|
|
14
16
|
),
|
|
15
17
|
);
|
|
16
18
|
|
|
17
19
|
export class ChessType extends TypedObject({ typename: 'dxos.org/type/Chess', version: '0.1.0' })(
|
|
18
20
|
{
|
|
19
|
-
name:
|
|
20
|
-
playerWhite:
|
|
21
|
-
playerBlack:
|
|
22
|
-
moves:
|
|
21
|
+
name: Schema.optional(Schema.String),
|
|
22
|
+
playerWhite: Schema.String,
|
|
23
|
+
playerBlack: Schema.String,
|
|
24
|
+
moves: Schema.mutable(Schema.Array(Schema.String)),
|
|
23
25
|
// TODO(wittjosiah): Remove. Redundant with moves.
|
|
24
|
-
pgn:
|
|
25
|
-
fen:
|
|
26
|
+
pgn: Schema.String,
|
|
27
|
+
fen: Schema.String,
|
|
26
28
|
},
|
|
27
29
|
{ partial: true },
|
|
28
30
|
) {}
|