@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.
Files changed (69) hide show
  1. package/dist/lib/browser/ChessContainer-S72CLKGK.mjs +101 -0
  2. package/dist/lib/{node-esm/ChessContainer-MAXLUGKY.mjs.map → browser/ChessContainer-S72CLKGK.mjs.map} +1 -1
  3. package/dist/lib/browser/{artifact-definition-YUAPS5GU.mjs → artifact-definition-QYGM7HNY.mjs} +18 -21
  4. package/dist/lib/browser/artifact-definition-QYGM7HNY.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-5QBQW62M.mjs +8 -0
  6. package/dist/lib/browser/chunk-6XPI4FTK.mjs +61 -0
  7. package/dist/lib/browser/chunk-6XPI4FTK.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-FSWWNFQE.mjs → chunk-77TLTU3X.mjs} +4 -4
  9. package/dist/lib/browser/{chunk-FSWWNFQE.mjs.map → chunk-77TLTU3X.mjs.map} +1 -1
  10. package/dist/lib/browser/index.mjs +6 -6
  11. package/dist/lib/browser/{intent-resolver-O5FBTUC6.mjs → intent-resolver-FLV47FUV.mjs} +2 -2
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/{react-surface-IT4WC47R.mjs → react-surface-QW2WGAAJ.mjs} +4 -4
  14. package/dist/lib/browser/types/index.mjs +1 -1
  15. package/dist/lib/node/ChessContainer-EQUVXDJC.cjs +123 -0
  16. package/dist/lib/node/{ChessContainer-BZMTO4FZ.cjs.map → ChessContainer-EQUVXDJC.cjs.map} +1 -1
  17. package/dist/lib/node/{artifact-definition-N5H23WYL.cjs → artifact-definition-FRBMG5FU.cjs} +33 -36
  18. package/dist/lib/node/artifact-definition-FRBMG5FU.cjs.map +7 -0
  19. package/dist/lib/node/{chunk-ZYU6LFL4.cjs → chunk-33WBRZI6.cjs} +5 -5
  20. package/dist/lib/node/{chunk-ZYU6LFL4.cjs.map → chunk-33WBRZI6.cjs.map} +1 -1
  21. package/dist/lib/node/{chunk-CSRNUKOH.cjs → chunk-OTMP6HPY.cjs} +50 -31
  22. package/dist/lib/node/chunk-OTMP6HPY.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-WKOWLRXP.cjs → chunk-R6JAL3RE.cjs} +5 -5
  24. package/dist/lib/node/index.cjs +22 -22
  25. package/dist/lib/node/{intent-resolver-TSN5O423.cjs → intent-resolver-AKAIXSZF.cjs} +7 -7
  26. package/dist/lib/node/meta.json +1 -1
  27. package/dist/lib/node/{react-surface-6OYEX6SB.cjs → react-surface-7G7NV4FY.cjs} +12 -12
  28. package/dist/lib/node/types/index.cjs +5 -5
  29. package/dist/lib/node/types/index.cjs.map +1 -1
  30. package/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs +102 -0
  31. package/dist/lib/{browser/ChessContainer-6JIE36JW.mjs.map → node-esm/ChessContainer-KSLGJHPW.mjs.map} +1 -1
  32. package/dist/lib/node-esm/{artifact-definition-NGV6PDXW.mjs → artifact-definition-YKVCYZQ7.mjs} +18 -21
  33. package/dist/lib/node-esm/artifact-definition-YKVCYZQ7.mjs.map +7 -0
  34. package/dist/lib/node-esm/{chunk-YFCRXSGH.mjs → chunk-KHMDMPR2.mjs} +2 -2
  35. package/dist/lib/node-esm/chunk-MVMMCPHE.mjs +63 -0
  36. package/dist/lib/node-esm/chunk-MVMMCPHE.mjs.map +7 -0
  37. package/dist/lib/node-esm/{chunk-FKW7YGV5.mjs → chunk-WPCT7LRN.mjs} +4 -4
  38. package/dist/lib/node-esm/{chunk-FKW7YGV5.mjs.map → chunk-WPCT7LRN.mjs.map} +1 -1
  39. package/dist/lib/node-esm/index.mjs +6 -6
  40. package/dist/lib/node-esm/{intent-resolver-PXPQTYAA.mjs → intent-resolver-VK3EDUMM.mjs} +2 -2
  41. package/dist/lib/node-esm/meta.json +1 -1
  42. package/dist/lib/node-esm/{react-surface-G4CSGFTJ.mjs → react-surface-Y54QUEUA.mjs} +4 -4
  43. package/dist/lib/node-esm/types/index.mjs +1 -1
  44. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  45. package/dist/types/src/components/ChessComponent.d.ts.map +1 -1
  46. package/package.json +25 -22
  47. package/src/capabilities/artifact-definition.ts +8 -7
  48. package/src/components/ChessComponent.tsx +6 -1
  49. package/dist/lib/browser/ChessContainer-6JIE36JW.mjs +0 -84
  50. package/dist/lib/browser/artifact-definition-YUAPS5GU.mjs.map +0 -7
  51. package/dist/lib/browser/chunk-7SPN7XYA.mjs +0 -8
  52. package/dist/lib/browser/chunk-VRWXC5L2.mjs +0 -42
  53. package/dist/lib/browser/chunk-VRWXC5L2.mjs.map +0 -7
  54. package/dist/lib/node/ChessContainer-BZMTO4FZ.cjs +0 -106
  55. package/dist/lib/node/artifact-definition-N5H23WYL.cjs.map +0 -7
  56. package/dist/lib/node/chunk-CSRNUKOH.cjs.map +0 -7
  57. package/dist/lib/node-esm/ChessContainer-MAXLUGKY.mjs +0 -85
  58. package/dist/lib/node-esm/artifact-definition-NGV6PDXW.mjs.map +0 -7
  59. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs +0 -44
  60. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map +0 -7
  61. /package/dist/lib/browser/{chunk-7SPN7XYA.mjs.map → chunk-5QBQW62M.mjs.map} +0 -0
  62. /package/dist/lib/browser/{intent-resolver-O5FBTUC6.mjs.map → intent-resolver-FLV47FUV.mjs.map} +0 -0
  63. /package/dist/lib/browser/{react-surface-IT4WC47R.mjs.map → react-surface-QW2WGAAJ.mjs.map} +0 -0
  64. /package/dist/lib/node/{chunk-WKOWLRXP.cjs.map → chunk-R6JAL3RE.cjs.map} +0 -0
  65. /package/dist/lib/node/{intent-resolver-TSN5O423.cjs.map → intent-resolver-AKAIXSZF.cjs.map} +0 -0
  66. /package/dist/lib/node/{react-surface-6OYEX6SB.cjs.map → react-surface-7G7NV4FY.cjs.map} +0 -0
  67. /package/dist/lib/node-esm/{chunk-YFCRXSGH.mjs.map → chunk-KHMDMPR2.mjs.map} +0 -0
  68. /package/dist/lib/node-esm/{intent-resolver-PXPQTYAA.mjs.map → intent-resolver-VK3EDUMM.mjs.map} +0 -0
  69. /package/dist/lib/node-esm/{react-surface-G4CSGFTJ.mjs.map → react-surface-Y54QUEUA.mjs.map} +0 -0
@@ -0,0 +1,101 @@
1
+ import {
2
+ ChessComponent
3
+ } from "./chunk-6XPI4FTK.mjs";
4
+
5
+ // packages/plugins/plugin-chess/src/components/ChessContainer.tsx
6
+ import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
7
+ import React2 from "react";
8
+ import { getSpace } from "@dxos/react-client/echo";
9
+ import { StackItem } from "@dxos/react-ui-stack";
10
+
11
+ // packages/plugins/plugin-chess/src/components/PlayerSelector.tsx
12
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
13
+ import { CrownCross } from "@phosphor-icons/react";
14
+ import React from "react";
15
+ import { generateName } from "@dxos/display-name";
16
+ import { useMembers } from "@dxos/react-client/echo";
17
+ import { Input, Select, useThemeContext } from "@dxos/react-ui";
18
+ import { getSize, mx } from "@dxos/react-ui-theme";
19
+ var PlayerSelector = ({ space, game }) => {
20
+ var _effect = _useSignals();
21
+ try {
22
+ const members = useMembers(space.key);
23
+ return /* @__PURE__ */ React.createElement("div", {
24
+ role: "none",
25
+ className: "grid grid-cols-2 gap-8"
26
+ }, /* @__PURE__ */ React.createElement("div", {
27
+ role: "none",
28
+ className: "flex flex-row-reverse items-center gap-2"
29
+ }, /* @__PURE__ */ React.createElement(PlayerSelect, {
30
+ side: "white",
31
+ value: game.playerWhite,
32
+ onValueChange: (player) => game.playerWhite = player,
33
+ members
34
+ })), /* @__PURE__ */ React.createElement("div", {
35
+ role: "none",
36
+ className: "flex flex-row items-center gap-2"
37
+ }, /* @__PURE__ */ React.createElement(PlayerSelect, {
38
+ side: "black",
39
+ value: game.playerBlack,
40
+ onValueChange: (player) => game.playerBlack = player,
41
+ members
42
+ })));
43
+ } finally {
44
+ _effect.f();
45
+ }
46
+ };
47
+ var PlayerSelect = ({ side, value, onValueChange, members }) => {
48
+ var _effect = _useSignals();
49
+ try {
50
+ const { themeMode } = useThemeContext();
51
+ const iconFillMode = side === "black" && themeMode === "light" || side === "white" && themeMode === "dark" ? "fill" : void 0;
52
+ return /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Label, null, /* @__PURE__ */ React.createElement(CrownCross, {
53
+ className: mx(getSize(6)),
54
+ weight: iconFillMode,
55
+ "aria-label": `Chess icon for side ${side}`
56
+ })), /* @__PURE__ */ React.createElement(Select.Root, {
57
+ value,
58
+ onValueChange
59
+ }, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
60
+ placeholder: "Select player"
61
+ }), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, members.map((member) => {
62
+ const memberKey = member.identity.identityKey.toHex();
63
+ const displayName = member.identity?.profile?.displayName || generateName(memberKey);
64
+ return /* @__PURE__ */ React.createElement(Select.Option, {
65
+ key: memberKey,
66
+ value: memberKey
67
+ }, displayName);
68
+ }))))));
69
+ } finally {
70
+ _effect.f();
71
+ }
72
+ };
73
+
74
+ // packages/plugins/plugin-chess/src/components/ChessContainer.tsx
75
+ var ChessContainer = ({ game }) => {
76
+ var _effect = _useSignals2();
77
+ try {
78
+ const space = getSpace(game);
79
+ if (!space) {
80
+ return null;
81
+ }
82
+ return /* @__PURE__ */ React2.createElement(StackItem.Content, null, /* @__PURE__ */ React2.createElement("div", {
83
+ role: "none",
84
+ className: "grid grid-rows-[60px_1fr_60px] grow overflow-hidden"
85
+ }, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", {
86
+ className: "flex m-4 overflow-hidden"
87
+ }, /* @__PURE__ */ React2.createElement(ChessComponent, {
88
+ game
89
+ })), /* @__PURE__ */ React2.createElement(PlayerSelector, {
90
+ space,
91
+ game
92
+ })));
93
+ } finally {
94
+ _effect.f();
95
+ }
96
+ };
97
+ var ChessContainer_default = ChessContainer;
98
+ export {
99
+ ChessContainer_default as default
100
+ };
101
+ //# sourceMappingURL=ChessContainer-S72CLKGK.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": ";;;;;;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,QAAMC,UAAUC,WAAWH,MAAMI,GAAG;AAEpC,SACE,sBAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACF,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACC,cAAAA;IACCC,MAAK;IACLC,OAAOT,KAAKU;IACZC,eAAe,CAACC,WAAYZ,KAAKU,cAAcE;I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,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
  }
@@ -2,13 +2,14 @@ import {
2
2
  ChessAction,
3
3
  ChessType,
4
4
  meta
5
- } from "./chunk-FSWWNFQE.mjs";
5
+ } from "./chunk-77TLTU3X.mjs";
6
6
 
7
7
  // packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts
8
8
  import { Chess } from "chess.js";
9
9
  import { pipe, Schema } from "effect";
10
+ import { createTool, ToolResult } from "@dxos/ai";
10
11
  import { Capabilities, chain, contributes, createIntent } from "@dxos/app-framework";
11
- import { ArtifactId, defineArtifact, defineTool, ToolResult } from "@dxos/artifact";
12
+ import { ArtifactId, defineArtifact } from "@dxos/artifact";
12
13
  import { createArtifactElement, VersionPin } from "@dxos/assistant";
13
14
  import { isInstanceOf } from "@dxos/echo-schema";
14
15
  import { invariant } from "@dxos/invariant";
@@ -26,7 +27,7 @@ var artifact_definition_default = () => {
26
27
  `,
27
28
  schema: ChessType,
28
29
  tools: [
29
- defineTool(meta.id, {
30
+ createTool(meta.id, {
30
31
  name: "create",
31
32
  description: "Create a new chess game. Returns the artifact definition for the game.",
32
33
  caption: "Creating chess game...",
@@ -38,7 +39,7 @@ var artifact_definition_default = () => {
38
39
  execute: async ({ fen }, { extensions }) => {
39
40
  invariant(extensions?.space, "No space", {
40
41
  F: __dxlog_file,
41
- L: 46,
42
+ L: 47,
42
43
  S: void 0,
43
44
  A: [
44
45
  "extensions?.space",
@@ -47,7 +48,7 @@ var artifact_definition_default = () => {
47
48
  });
48
49
  invariant(extensions?.dispatch, "No intent dispatcher", {
49
50
  F: __dxlog_file,
50
- L: 47,
51
+ L: 48,
51
52
  S: void 0,
52
53
  A: [
53
54
  "extensions?.dispatch",
@@ -68,7 +69,7 @@ var artifact_definition_default = () => {
68
69
  ]);
69
70
  }
70
71
  }),
71
- defineTool(meta.id, {
72
+ createTool(meta.id, {
72
73
  name: "list",
73
74
  description: "Query all active chess games.",
74
75
  caption: "Getting games...",
@@ -76,7 +77,7 @@ var artifact_definition_default = () => {
76
77
  execute: async (_, { extensions }) => {
77
78
  invariant(extensions?.space, "No space", {
78
79
  F: __dxlog_file,
79
- L: 68,
80
+ L: 69,
80
81
  S: void 0,
81
82
  A: [
82
83
  "extensions?.space",
@@ -86,7 +87,7 @@ var artifact_definition_default = () => {
86
87
  const { objects: games } = await extensions.space.db.query(Filter.type(ChessType)).run();
87
88
  invariant(games.length > 0, "No chess games found", {
88
89
  F: __dxlog_file,
89
- L: 70,
90
+ L: 71,
90
91
  S: void 0,
91
92
  A: [
92
93
  "games.length > 0",
@@ -96,7 +97,7 @@ var artifact_definition_default = () => {
96
97
  return ToolResult.Success(games);
97
98
  }
98
99
  }),
99
- defineTool(meta.id, {
100
+ createTool(meta.id, {
100
101
  name: "inspect",
101
102
  description: "Get the current state of the chess game.",
102
103
  caption: "Inspecting game...",
@@ -106,19 +107,17 @@ var artifact_definition_default = () => {
106
107
  execute: async ({ id }, { extensions }) => {
107
108
  invariant(extensions?.space, "No space", {
108
109
  F: __dxlog_file,
109
- L: 80,
110
+ L: 81,
110
111
  S: void 0,
111
112
  A: [
112
113
  "extensions?.space",
113
114
  "'No space'"
114
115
  ]
115
116
  });
116
- const game = await extensions.space.db.query({
117
- id: ArtifactId.toDXN(id, extensions.space.id).toString()
118
- }).first();
117
+ const game = await extensions.space.db.query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString())).first();
119
118
  invariant(isInstanceOf(ChessType, game), void 0, {
120
119
  F: __dxlog_file,
121
- L: 84,
120
+ L: 85,
122
121
  S: void 0,
123
122
  A: [
124
123
  "isInstanceOf(ChessType, game)",
@@ -128,7 +127,7 @@ var artifact_definition_default = () => {
128
127
  return ToolResult.Success(game.fen);
129
128
  }
130
129
  }),
131
- defineTool(meta.id, {
130
+ createTool(meta.id, {
132
131
  name: "move",
133
132
  description: "Make a move in the chess game.",
134
133
  caption: "Making chess move...",
@@ -145,19 +144,17 @@ var artifact_definition_default = () => {
145
144
  execute: async ({ id, move }, { extensions }) => {
146
145
  invariant(extensions?.space, "No space", {
147
146
  F: __dxlog_file,
148
- L: 101,
147
+ L: 102,
149
148
  S: void 0,
150
149
  A: [
151
150
  "extensions?.space",
152
151
  "'No space'"
153
152
  ]
154
153
  });
155
- const game = await extensions.space.db.query({
156
- id: ArtifactId.toDXN(id, extensions.space.id).toString()
157
- }).first();
154
+ const game = await extensions.space.db.query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString())).first();
158
155
  invariant(isInstanceOf(ChessType, game), void 0, {
159
156
  F: __dxlog_file,
160
- L: 105,
157
+ L: 106,
161
158
  S: void 0,
162
159
  A: [
163
160
  "isInstanceOf(ChessType, game)",
@@ -182,4 +179,4 @@ var artifact_definition_default = () => {
182
179
  export {
183
180
  artifact_definition_default as default
184
181
  };
185
- //# sourceMappingURL=artifact-definition-YUAPS5GU.mjs.map
182
+ //# sourceMappingURL=artifact-definition-QYGM7HNY.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/artifact-definition.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport { pipe, Schema } from 'effect';\n\nimport { createTool, ToolResult } from '@dxos/ai';\nimport { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';\nimport { ArtifactId, defineArtifact } from '@dxos/artifact';\nimport { createArtifactElement, VersionPin } from '@dxos/assistant';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter, type Space } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\nimport { ChessAction, ChessType } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n space?: Space;\n dispatch?: PromiseIntentDispatcher;\n }\n}\n\nexport default () => {\n const definition = defineArtifact({\n id: `artifact:${meta.id}`,\n name: meta.name,\n description: 'Provides a simple chess engine.',\n instructions: `\n - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.\n - Always inspect the chess game at the start of every prompt realting to a chess game, as it might have changed since the interaction.\n `,\n schema: ChessType,\n tools: [\n createTool(meta.id, {\n name: 'create',\n description: 'Create a new chess game. Returns the artifact definition for the game.',\n caption: 'Creating chess game...',\n schema: Schema.Struct({\n fen: Schema.String.annotations({ description: 'The state of the chess game in the FEN format.' }),\n }),\n execute: async ({ fen }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n invariant(extensions?.dispatch, 'No intent dispatcher');\n const intent = pipe(\n createIntent(ChessAction.Create, { fen }),\n chain(SpaceAction.AddObject, { target: extensions.space }),\n );\n const { data, error } = await extensions.dispatch(intent);\n if (!data || error) {\n return ToolResult.Error(error?.message ?? 'Failed to create chess game');\n }\n\n return ToolResult.Success(createArtifactElement(data.id), [\n VersionPin.createBlock(VersionPin.fromObject(data.object)),\n ]);\n },\n }),\n createTool(meta.id, {\n name: 'list',\n description: 'Query all active chess games.',\n caption: 'Getting games...',\n schema: Schema.Struct({}),\n execute: async (_, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.type(ChessType)).run();\n invariant(games.length > 0, 'No chess games found');\n return ToolResult.Success(games);\n },\n }),\n createTool(meta.id, {\n name: 'inspect',\n description: 'Get the current state of the chess game.',\n caption: 'Inspecting game...',\n schema: Schema.Struct({ id: ArtifactId }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const game = await extensions.space.db\n .query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString()))\n .first();\n invariant(isInstanceOf(ChessType, game));\n\n return ToolResult.Success(game.fen);\n },\n }),\n createTool(meta.id, {\n name: 'move',\n description: 'Make a move in the chess game.',\n caption: 'Making chess move...',\n schema: Schema.Struct({\n id: ArtifactId,\n move: Schema.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n execute: async ({ id, move }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const game = await extensions.space.db\n .query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString()))\n .first();\n invariant(isInstanceOf(ChessType, game));\n\n const board = new Chess(game.fen);\n try {\n board.move(move);\n } catch (error: any) {\n return ToolResult.Error(error.message);\n }\n game.pgn = board.pgn();\n game.fen = board.fen();\n return ToolResult.Success(game.fen);\n },\n }),\n ],\n });\n\n return contributes(Capabilities.ArtifactDefinition, definition);\n};\n"],
5
+ "mappings": ";;;;;;;AAIA,SAASA,aAAa;AACtB,SAASC,MAAMC,cAAc;AAE7B,SAASC,YAAYC,kBAAkB;AACvC,SAASC,cAAcC,OAAOC,aAAaC,oBAAkD;AAC7F,SAASC,YAAYC,sBAAsB;AAC3C,SAASC,uBAAuBC,kBAAkB;AAClD,SAASC,oBAAoB;AAC7B,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,SAASC,cAA0B;;AAanC,IAAA,8BAAe,MAAA;AACb,QAAMC,aAAaC,eAAe;IAChCC,IAAI,YAAYC,KAAKD,EAAE;IACvBE,MAAMD,KAAKC;IACXC,aAAa;IACbC,cAAc;;;;IAIdC,QAAQC;IACRC,OAAO;MACLC,WAAWP,KAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,OAAOC,OAAO;UACpBC,KAAKF,OAAOG,OAAOC,YAAY;YAAEX,aAAa;UAAiD,CAAA;QACjG,CAAA;QACAY,SAAS,OAAO,EAAEH,IAAG,GAAI,EAAEI,WAAU,MAAE;AACrCC,oBAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7BD,oBAAUD,YAAYG,UAAU,wBAAA;;;;;;;;;AAChC,gBAAMC,S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K;AACRrC,oBAAUsC,aAAajD,WAAW4C,IAAAA,GAAAA,QAAAA;;;;;;;;;AAElC,iBAAOnB,WAAWG,QAAQgB,KAAKtC,GAAG;QACpC;MACF,CAAA;MACAJ,WAAWP,KAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,OAAOC,OAAO;UACpBX,IAAIiD;UACJO,MAAM9C,OAAOG,OAAOC,YAAY;YAC9BX,aAAa;YACbsD,UAAU;cAAC;cAAM;;UACnB,CAAA;QACF,CAAA;QACA1C,SAAS,OAAO,EAAEf,IAAIwD,KAAI,GAAI,EAAExC,WAAU,MAAE;AAC1CC,oBAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAMgC,OAAO,MAAMlC,WAAWE,MAAMyB,GACjCC,MAAMC,OAAOM,IAAIF,WAAWG,MAAMpD,IAAIgB,WAAWE,MAAMlB,EAAE,EAAEqD,SAAQ,CAAA,CAAA,EACnEC,MAAK;AACRrC,oBAAUsC,aAAajD,WAAW4C,IAAAA,GAAAA,QAAAA;;;;;;;;;AAElC,gBAAMQ,QAAQ,IAAIC,MAAMT,KAAKtC,GAAG;AAChC,cAAI;AACF8C,kBAAMF,KAAKA,IAAAA;UACb,SAAS1B,OAAY;AACnB,mBAAOC,WAAWC,MAAMF,MAAMG,OAAO;UACvC;AACAiB,eAAKU,MAAMF,MAAME,IAAG;AACpBV,eAAKtC,MAAM8C,MAAM9C,IAAG;AACpB,iBAAOmB,WAAWG,QAAQgB,KAAKtC,GAAG;QACpC;MACF,CAAA;;EAEJ,CAAA;AAEA,SAAOiD,YAAYC,aAAaC,oBAAoBjE,UAAAA;AACtD;",
6
+ "names": ["Chess", "pipe", "Schema", "createTool", "ToolResult", "Capabilities", "chain", "contributes", "createIntent", "ArtifactId", "defineArtifact", "createArtifactElement", "VersionPin", "isInstanceOf", "invariant", "SpaceAction", "Filter", "definition", "defineArtifact", "id", "meta", "name", "description", "instructions", "schema", "ChessType", "tools", "createTool", "caption", "Schema", "Struct", "fen", "String", "annotations", "execute", "extensions", "invariant", "space", "dispatch", "intent", "pipe", "createIntent", "ChessAction", "Create", "chain", "SpaceAction", "AddObject", "target", "data", "error", "ToolResult", "Error", "message", "Success", "createArtifactElement", "VersionPin", "createBlock", "fromObject", "object", "_", "objects", "games", "db", "query", "Filter", "type", "run", "length", "ArtifactId", "game", "ids", "toDXN", "toString", "first", "isInstanceOf", "move", "examples", "board", "Chess", "pgn", "contributes", "Capabilities", "ArtifactDefinition"]
7
+ }
@@ -0,0 +1,8 @@
1
+ // packages/plugins/plugin-chess/src/components/index.ts
2
+ import { lazy } from "react";
3
+ var ChessContainer = lazy(() => import("./ChessContainer-S72CLKGK.mjs"));
4
+
5
+ export {
6
+ ChessContainer
7
+ };
8
+ //# sourceMappingURL=chunk-5QBQW62M.mjs.map
@@ -0,0 +1,61 @@
1
+ // packages/plugins/plugin-chess/src/components/ChessComponent.tsx
2
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
3
+ import { Chess } from "chess.js";
4
+ import React, { useCallback, useEffect, useMemo } from "react";
5
+ import { log } from "@dxos/log";
6
+ import { getSpace } from "@dxos/react-client/echo";
7
+ import { ChessModel, Board, Chessboard } from "@dxos/react-ui-gameboard";
8
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/components/ChessComponent.tsx";
9
+ var ChessComponent = ({ game }) => {
10
+ var _effect = _useSignals();
11
+ try {
12
+ const model = useMemo(() => new ChessModel(), []);
13
+ useEffect(() => {
14
+ if (!model || game.pgn !== model?.game.pgn()) {
15
+ const chess = new Chess();
16
+ if (game.pgn) {
17
+ try {
18
+ chess.loadPgn(game.pgn);
19
+ } catch (err) {
20
+ log.catch(err, {
21
+ game
22
+ }, {
23
+ F: __dxlog_file,
24
+ L: 23,
25
+ S: void 0,
26
+ C: (f, a) => f(...a)
27
+ });
28
+ }
29
+ }
30
+ model.initialize(chess.fen());
31
+ }
32
+ }, [
33
+ game.pgn
34
+ ]);
35
+ const space = getSpace(game);
36
+ if (!space) {
37
+ return null;
38
+ }
39
+ const handleDrop = useCallback((move) => {
40
+ if (model.makeMove(move)) {
41
+ game.pgn = model.game.pgn();
42
+ game.fen = model.game.fen();
43
+ return true;
44
+ }
45
+ return false;
46
+ }, [
47
+ model
48
+ ]);
49
+ return /* @__PURE__ */ React.createElement(Board.Root, {
50
+ model,
51
+ onDrop: handleDrop
52
+ }, /* @__PURE__ */ React.createElement(Chessboard, null));
53
+ } finally {
54
+ _effect.f();
55
+ }
56
+ };
57
+
58
+ export {
59
+ ChessComponent
60
+ };
61
+ //# sourceMappingURL=chunk-6XPI4FTK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ChessComponent.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n\nimport { log } from '@dxos/log';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n try {\n chess.loadPgn(game.pgn);\n } catch (err) {\n log.catch(err, { game });\n }\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n game.fen = model.game.fen();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
5
+ "mappings": ";;AAIA,SAASA,aAAa;AACtB,OAAOC,SAASC,aAAaC,WAAWC,eAAe;AAEvD,SAASC,WAAW;AACpB,SAASC,gBAAgB;AACzB,SAASC,YAAYC,OAAOC,kBAAuC;;AAI5D,IAAMC,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;;;AAC1D,UAAMC,QAAQR,QAAQ,MAAM,IAAIG,WAAAA,GAAc,CAAA,CAAE;AAChDJ,cAAU,MAAA;AACR,UAAI,CAACS,SAASD,KAAKE,QAAQD,OAAOD,KAAKE,IAAAA,GAAO;AAC5C,cAAMC,QAAQ,IAAId,MAAAA;AAClB,YAAIW,KAAKE,KAAK;AACZ,cAAI;AACFC,kBAAMC,QAAQJ,KAAKE,GAAG;UACxB,SAASG,KAAK;AACZX,gBAAIY,MAAMD,KAAK;cAAEL;YAAK,GAAA;;;;;;UACxB;QACF;AAEAC,cAAMM,WAAWJ,MAAMK,IAAG,CAAA;MAC5B;IACF,GAAG;MAACR,KAAKE;KAAI;AAEb,UAAMO,QAAQd,SAASK,IAAAA;AACvB,QAAI,CAACS,OAAO;AACV,aAAO;IACT;AAEA,UAAMC,aAAanB,YACjB,CAACoB,SAAAA;AACC,UAAIV,MAAMW,SAASD,IAAAA,GAAO;AACxBX,aAAKE,MAAMD,MAAMD,KAAKE,IAAG;AACzBF,aAAKQ,MAAMP,MAAMD,KAAKQ,IAAG;AACzB,eAAO;MACT;AAEA,aAAO;IACT,GACA;MAACP;KAAM;AAGT,WACE,sBAAA,cAACJ,MAAMgB,MAAI;MAACZ;MAAca,QAAQJ;OAChC,sBAAA,cAACZ,YAAAA,IAAAA,CAAAA;;;;AAGP;",
6
+ "names": ["Chess", "React", "useCallback", "useEffect", "useMemo", "log", "getSpace", "ChessModel", "Board", "Chessboard", "ChessComponent", "game", "model", "pgn", "chess", "loadPgn", "err", "catch", "initialize", "fen", "space", "handleDrop", "move", "makeMove", "Root", "onDrop"]
7
+ }
@@ -41,7 +41,6 @@ var meta = {
41
41
  };
42
42
 
43
43
  // packages/plugins/plugin-chess/src/types/types.ts
44
- var ChessAction;
45
44
  (function(ChessAction2) {
46
45
  const CHESS_ACTION = `${CHESS_PLUGIN}/action`;
47
46
  class Create extends Schema2.TaggedClass()(`${CHESS_ACTION}/create`, {
@@ -59,13 +58,14 @@ var ChessAction;
59
58
  var isObject = (object) => {
60
59
  return isLiveObject(object) && isInstanceOf(ChessType, object);
61
60
  };
61
+ var ChessAction;
62
62
 
63
63
  export {
64
64
  CHESS_PLUGIN,
65
65
  meta,
66
66
  MoveSchema,
67
67
  ChessType,
68
- ChessAction,
69
- isObject
68
+ isObject,
69
+ ChessAction
70
70
  };
71
- //# sourceMappingURL=chunk-FSWWNFQE.mjs.map
71
+ //# sourceMappingURL=chunk-77TLTU3X.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts", "../../../src/meta.ts"],
4
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;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AChB;;;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
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
  }
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  ChessContainer
3
- } from "./chunk-7SPN7XYA.mjs";
3
+ } from "./chunk-5QBQW62M.mjs";
4
4
  import {
5
5
  CHESS_PLUGIN,
6
6
  ChessAction,
7
7
  ChessType,
8
8
  meta
9
- } from "./chunk-FSWWNFQE.mjs";
9
+ } from "./chunk-77TLTU3X.mjs";
10
10
  import {
11
11
  ChessComponent
12
- } from "./chunk-VRWXC5L2.mjs";
12
+ } from "./chunk-6XPI4FTK.mjs";
13
13
 
14
14
  // packages/plugins/plugin-chess/src/capabilities/index.ts
15
15
  import { lazy } from "@dxos/app-framework";
16
- var ArtifactDefinition = lazy(() => import("./artifact-definition-YUAPS5GU.mjs"));
17
- var IntentResolver = lazy(() => import("./intent-resolver-O5FBTUC6.mjs"));
18
- var ReactSurface = lazy(() => import("./react-surface-IT4WC47R.mjs"));
16
+ var ArtifactDefinition = lazy(() => import("./artifact-definition-QYGM7HNY.mjs"));
17
+ var IntentResolver = lazy(() => import("./intent-resolver-FLV47FUV.mjs"));
18
+ var ReactSurface = lazy(() => import("./react-surface-QW2WGAAJ.mjs"));
19
19
 
20
20
  // packages/plugins/plugin-chess/src/ChessPlugin.tsx
21
21
  import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChessAction,
3
3
  ChessType
4
- } from "./chunk-FSWWNFQE.mjs";
4
+ } from "./chunk-77TLTU3X.mjs";
5
5
 
6
6
  // packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
7
7
  import { Chess } from "chess.js";
@@ -25,4 +25,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
25
25
  export {
26
26
  intent_resolver_default as default
27
27
  };
28
- //# sourceMappingURL=intent-resolver-O5FBTUC6.mjs.map
28
+ //# sourceMappingURL=intent-resolver-FLV47FUV.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":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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4837},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-7SPN7XYA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-YUAPS5GU.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-O5FBTUC6.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-IT4WC47R.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":2659},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-YUAPS5GU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8430},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-YUAPS5GU.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.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":6233},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-O5FBTUC6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1366},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-O5FBTUC6.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.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":747},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-6JIE36JW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6150},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-6JIE36JW.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.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":3452},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-IT4WC47R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-IT4WC47R.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-7SPN7XYA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.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":1107},"packages/plugins/plugin-chess/dist/lib/browser/chunk-7SPN7XYA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-7SPN7XYA.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-6JIE36JW.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3966},"packages/plugins/plugin-chess/dist/lib/browser/chunk-FSWWNFQE.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":2133},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.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":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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4837},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-QYGM7HNY.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-FLV47FUV.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-QW2WGAAJ.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":2659},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-QYGM7HNY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8482},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-QYGM7HNY.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.mjs","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/browser/intent-resolver-FLV47FUV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1366},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-FLV47FUV.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.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":747},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-S72CLKGK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6167},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-S72CLKGK.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs","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/browser/react-surface-QW2WGAAJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-QW2WGAAJ.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.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":1107},"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-5QBQW62M.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-S72CLKGK.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3966},"packages/plugins/plugin-chess/dist/lib/browser/chunk-77TLTU3X.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":2133},"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2588},"packages/plugins/plugin-chess/dist/lib/browser/chunk-6XPI4FTK.mjs":{"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}}}
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  ChessContainer
3
- } from "./chunk-7SPN7XYA.mjs";
3
+ } from "./chunk-5QBQW62M.mjs";
4
4
  import {
5
5
  CHESS_PLUGIN,
6
6
  ChessType,
7
7
  isObject
8
- } from "./chunk-FSWWNFQE.mjs";
8
+ } from "./chunk-77TLTU3X.mjs";
9
9
  import {
10
10
  ChessComponent
11
- } from "./chunk-VRWXC5L2.mjs";
11
+ } from "./chunk-6XPI4FTK.mjs";
12
12
 
13
13
  // packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
14
14
  import React from "react";
@@ -39,4 +39,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
39
39
  export {
40
40
  react_surface_default as default
41
41
  };
42
- //# sourceMappingURL=react-surface-IT4WC47R.mjs.map
42
+ //# sourceMappingURL=react-surface-QW2WGAAJ.mjs.map