@dxos/plugin-chess 0.7.5-labs.a279d8c → 0.7.5-labs.e27f9b9

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 (110) hide show
  1. package/dist/lib/browser/ChessContainer-2MMUB5S7.mjs +86 -0
  2. package/dist/lib/browser/ChessContainer-2MMUB5S7.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-672NU6IC.mjs +8 -0
  4. package/dist/lib/browser/chunk-672NU6IC.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-RGPTBDH7.mjs +41 -0
  6. package/dist/lib/browser/chunk-RGPTBDH7.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +11 -19
  8. package/dist/lib/browser/index.mjs.map +3 -3
  9. package/dist/lib/browser/{intent-resolver-UZRNSQFI.mjs → intent-resolver-BKKGQ5TJ.mjs} +15 -12
  10. package/dist/lib/browser/intent-resolver-BKKGQ5TJ.mjs.map +7 -0
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/{react-surface-EP4LXPH7.mjs → react-surface-Y7XMQYOV.mjs} +6 -14
  13. package/dist/lib/browser/react-surface-Y7XMQYOV.mjs.map +7 -0
  14. package/dist/lib/node/ChessContainer-CMYJDMSG.cjs +108 -0
  15. package/dist/lib/node/ChessContainer-CMYJDMSG.cjs.map +7 -0
  16. package/dist/lib/node/{chunk-6F6WTM5L.cjs → chunk-TEZPML34.cjs} +5 -5
  17. package/dist/lib/node/chunk-TEZPML34.cjs.map +7 -0
  18. package/dist/lib/node/{ChessContainer-P4BZ62FN.cjs → chunk-YTD6SK5V.cjs} +37 -16
  19. package/dist/lib/node/chunk-YTD6SK5V.cjs.map +7 -0
  20. package/dist/lib/node/index.cjs +11 -19
  21. package/dist/lib/node/index.cjs.map +3 -3
  22. package/dist/lib/node/{intent-resolver-AENA6D5K.cjs → intent-resolver-OIFDW46S.cjs} +18 -15
  23. package/dist/lib/node/intent-resolver-OIFDW46S.cjs.map +7 -0
  24. package/dist/lib/node/meta.json +1 -1
  25. package/dist/lib/node/{react-surface-JMOSMAIC.cjs → react-surface-35CG6JQF.cjs} +9 -17
  26. package/dist/lib/node/react-surface-35CG6JQF.cjs.map +7 -0
  27. package/dist/lib/node-esm/ChessContainer-WV2CO5WO.mjs +87 -0
  28. package/dist/lib/node-esm/ChessContainer-WV2CO5WO.mjs.map +7 -0
  29. package/dist/lib/node-esm/chunk-GJW6TXCL.mjs +43 -0
  30. package/dist/lib/node-esm/chunk-GJW6TXCL.mjs.map +7 -0
  31. package/dist/lib/node-esm/{chunk-QXDXLFXD.mjs → chunk-YXXJHXSV.mjs} +2 -2
  32. package/dist/lib/node-esm/chunk-YXXJHXSV.mjs.map +7 -0
  33. package/dist/lib/node-esm/index.mjs +11 -19
  34. package/dist/lib/node-esm/index.mjs.map +3 -3
  35. package/dist/lib/node-esm/{intent-resolver-T7NNHOYR.mjs → intent-resolver-35HIBBYC.mjs} +15 -12
  36. package/dist/lib/node-esm/intent-resolver-35HIBBYC.mjs.map +7 -0
  37. package/dist/lib/node-esm/meta.json +1 -1
  38. package/dist/lib/node-esm/{react-surface-ENB7VY45.mjs → react-surface-4FNRAFRL.mjs} +6 -14
  39. package/dist/lib/node-esm/react-surface-4FNRAFRL.mjs.map +7 -0
  40. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/index.d.ts +3 -3
  42. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  44. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  45. package/dist/types/src/components/ChessComponent.d.ts +6 -0
  46. package/dist/types/src/components/ChessComponent.d.ts.map +1 -0
  47. package/dist/types/src/components/ChessContainer.d.ts +4 -3
  48. package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
  49. package/dist/types/src/components/ChessPanel.d.ts +11 -0
  50. package/dist/types/src/components/ChessPanel.d.ts.map +1 -0
  51. package/dist/types/src/components/Chessboard.stories.d.ts +8 -0
  52. package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -0
  53. package/dist/types/src/components/{Chess.d.ts → PlayerSelector.d.ts} +3 -4
  54. package/dist/types/src/components/PlayerSelector.d.ts.map +1 -0
  55. package/dist/types/src/components/index.d.ts +3 -3
  56. package/dist/types/src/components/index.d.ts.map +1 -1
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +21 -24
  59. package/src/ChessPlugin.tsx +5 -13
  60. package/src/capabilities/intent-resolver.ts +10 -8
  61. package/src/capabilities/react-surface.tsx +3 -12
  62. package/src/components/ChessComponent.tsx +48 -0
  63. package/src/components/ChessContainer.tsx +14 -4
  64. package/src/components/ChessPanel.tsx +67 -0
  65. package/src/components/Chessboard.stories.tsx +39 -0
  66. package/src/components/{Chess.tsx → PlayerSelector.tsx} +2 -50
  67. package/src/components/index.ts +1 -2
  68. package/dist/lib/browser/ChessContainer-G736GS2V.mjs +0 -26
  69. package/dist/lib/browser/ChessContainer-G736GS2V.mjs.map +0 -7
  70. package/dist/lib/browser/chunk-JUAC2NNR.mjs +0 -548
  71. package/dist/lib/browser/chunk-JUAC2NNR.mjs.map +0 -7
  72. package/dist/lib/browser/chunk-LAYER2WV.mjs +0 -8
  73. package/dist/lib/browser/chunk-LAYER2WV.mjs.map +0 -7
  74. package/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map +0 -7
  75. package/dist/lib/browser/react-surface-EP4LXPH7.mjs.map +0 -7
  76. package/dist/lib/node/ChessContainer-P4BZ62FN.cjs.map +0 -7
  77. package/dist/lib/node/chunk-6F6WTM5L.cjs.map +0 -7
  78. package/dist/lib/node/chunk-HPYER4GF.cjs +0 -574
  79. package/dist/lib/node/chunk-HPYER4GF.cjs.map +0 -7
  80. package/dist/lib/node/intent-resolver-AENA6D5K.cjs.map +0 -7
  81. package/dist/lib/node/react-surface-JMOSMAIC.cjs.map +0 -7
  82. package/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs +0 -27
  83. package/dist/lib/node-esm/ChessContainer-2LFJ6RHB.mjs.map +0 -7
  84. package/dist/lib/node-esm/chunk-OMGVSBVI.mjs +0 -550
  85. package/dist/lib/node-esm/chunk-OMGVSBVI.mjs.map +0 -7
  86. package/dist/lib/node-esm/chunk-QXDXLFXD.mjs.map +0 -7
  87. package/dist/lib/node-esm/intent-resolver-T7NNHOYR.mjs.map +0 -7
  88. package/dist/lib/node-esm/react-surface-ENB7VY45.mjs.map +0 -7
  89. package/dist/types/src/components/Chess.d.ts.map +0 -1
  90. package/dist/types/src/components/Chessboard/Chessboard.d.ts +0 -37
  91. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +0 -1
  92. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +0 -24
  93. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +0 -1
  94. package/dist/types/src/components/Chessboard/index.d.ts +0 -2
  95. package/dist/types/src/components/Chessboard/index.d.ts.map +0 -1
  96. package/dist/types/src/components/Chessboard/pieces/custom.d.ts +0 -3
  97. package/dist/types/src/components/Chessboard/pieces/custom.d.ts.map +0 -1
  98. package/dist/types/src/components/Chessboard/pieces/index.d.ts +0 -4
  99. package/dist/types/src/components/Chessboard/pieces/index.d.ts.map +0 -1
  100. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts +0 -3
  101. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts.map +0 -1
  102. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts +0 -3
  103. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts.map +0 -1
  104. package/src/components/Chessboard/Chessboard.stories.tsx +0 -56
  105. package/src/components/Chessboard/Chessboard.tsx +0 -182
  106. package/src/components/Chessboard/index.ts +0 -5
  107. package/src/components/Chessboard/pieces/custom.tsx +0 -82
  108. package/src/components/Chessboard/pieces/index.ts +0 -7
  109. package/src/components/Chessboard/pieces/phosphor.tsx +0 -71
  110. package/src/components/Chessboard/pieces/riohacha.tsx +0 -166
@@ -0,0 +1,86 @@
1
+ import {
2
+ ChessComponent
3
+ } from "./chunk-RGPTBDH7.mjs";
4
+
5
+ // packages/plugins/plugin-chess/src/components/ChessContainer.tsx
6
+ import React2 from "react";
7
+ import { getSpace } from "@dxos/react-client/echo";
8
+ import { StackItem } from "@dxos/react-ui-stack";
9
+
10
+ // packages/plugins/plugin-chess/src/components/PlayerSelector.tsx
11
+ import { CrownCross } from "@phosphor-icons/react";
12
+ import React from "react";
13
+ import { generateName } from "@dxos/display-name";
14
+ import { useMembers } from "@dxos/react-client/echo";
15
+ import { Input, Select, useThemeContext } from "@dxos/react-ui";
16
+ import { getSize, mx } from "@dxos/react-ui-theme";
17
+ var PlayerSelector = ({ space, game }) => {
18
+ const members = useMembers(space.key);
19
+ return /* @__PURE__ */ React.createElement("div", {
20
+ role: "none",
21
+ className: "grid grid-cols-2 gap-8"
22
+ }, /* @__PURE__ */ React.createElement("div", {
23
+ role: "none",
24
+ className: "flex flex-row-reverse items-center gap-2"
25
+ }, /* @__PURE__ */ React.createElement(PlayerSelect, {
26
+ side: "white",
27
+ value: game.playerWhite,
28
+ onValueChange: (player) => game.playerWhite = player,
29
+ members
30
+ })), /* @__PURE__ */ React.createElement("div", {
31
+ role: "none",
32
+ className: "flex flex-row items-center gap-2"
33
+ }, /* @__PURE__ */ React.createElement(PlayerSelect, {
34
+ side: "black",
35
+ value: game.playerBlack,
36
+ onValueChange: (player) => game.playerBlack = player,
37
+ members
38
+ })));
39
+ };
40
+ var PlayerSelect = ({ side, value, onValueChange, members }) => {
41
+ const { themeMode } = useThemeContext();
42
+ const iconFillMode = side === "black" && themeMode === "light" || side === "white" && themeMode === "dark" ? "fill" : void 0;
43
+ return /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Label, null, /* @__PURE__ */ React.createElement(CrownCross, {
44
+ className: mx(getSize(6)),
45
+ weight: iconFillMode,
46
+ "aria-label": `Chess icon for side ${side}`
47
+ })), /* @__PURE__ */ React.createElement(Select.Root, {
48
+ value,
49
+ onValueChange
50
+ }, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
51
+ placeholder: "Select player"
52
+ }), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, members.map((member) => {
53
+ const memberKey = member.identity.identityKey.toHex();
54
+ const displayName = member.identity?.profile?.displayName || generateName(memberKey);
55
+ return /* @__PURE__ */ React.createElement(Select.Option, {
56
+ key: memberKey,
57
+ value: memberKey
58
+ }, displayName);
59
+ }))))));
60
+ };
61
+
62
+ // packages/plugins/plugin-chess/src/components/ChessContainer.tsx
63
+ var ChessContainer = ({ game }) => {
64
+ const space = getSpace(game);
65
+ if (!space) {
66
+ return null;
67
+ }
68
+ return /* @__PURE__ */ React2.createElement(StackItem.Content, {
69
+ toolbar: false
70
+ }, /* @__PURE__ */ React2.createElement("div", {
71
+ role: "none",
72
+ className: "grid grid-rows-[60px_1fr_60px] grow overflow-hidden"
73
+ }, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", {
74
+ className: "flex m-4 overflow-hidden"
75
+ }, /* @__PURE__ */ React2.createElement(ChessComponent, {
76
+ game
77
+ })), /* @__PURE__ */ React2.createElement(PlayerSelector, {
78
+ space,
79
+ game
80
+ })));
81
+ };
82
+ var ChessContainer_default = ChessContainer;
83
+ export {
84
+ ChessContainer_default as default
85
+ };
86
+ //# sourceMappingURL=ChessContainer-2MMUB5S7.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ChessContainer.tsx", "../../../src/components/PlayerSelector.tsx"],
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 toolbar={false}>\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;IAC/CX;OAGJ,sBAAA,cAACG,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACC,cAAAA;IACCC,MAAK;IACLC,OAAOT,KAAKa;IACZF,eAAe,CAACC,WAAYZ,KAAKa,cAAcD;IAC/CX;;AAKV;AAEA,IAAMM,eAAe,CAAC,EACpBC,MACAC,OACAE,eACAV,QAAO,MAMR;AACC,QAAM,EAAEa,UAAS,IAAKC,gBAAAA;AACtB,QAAMC,eACHR,SAAS,WAAWM,cAAc,WAAaN,SAAS,WAAWM,cAAc,SAAU,SAASG;AAEvG,SACE,sBAAA,cAACC,MAAMC,MAAI,MACT,sBAAA,cAACD,MAAME,OAAK,MACV,sBAAA,cAACC,YAAAA;IAAWf,WAAWgB,GAAGC,QAAQ,CAAA,CAAA;IAAKC,QAAQR;IAAcS,cAAY,uBAAuBjB,IAAAA;OAElG,sBAAA,cAACkB,OAAOP,MAAI;IAACV;IAAcE;KACzB,sBAAA,cAACe,OAAOC,eAAa;IAACC,aAAa;MACnC,sBAAA,cAACF,OAAOG,QAAM,MACZ,sBAAA,cAACH,OAAOI,SAAO,MACb,sBAAA,cAACJ,OAAOK,UAAQ,MACb9B,QAAQ+B,IAAI,CAACC,WAAAA;AACZ,UAAMC,YAAYD,OAAOE,SAASC,YAAYC,MAAK;AACnD,UAAMC,cAAcL,OAAOE,UAAUI,SAASD,eAAeE,aAAaN,SAAAA;AAC1E,WACE,sBAAA,cAACR,OAAOe,QAAM;MAACtC,KAAK+B;MAAWzB,OAAOyB;OACnCI,WAAAA;EAGP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAOd;;;ADlEA,IAAMI,iBAAiB,CAAC,EAAEC,KAAI,MAAsC;AAClE,QAAMC,QAAQC,SAASF,IAAAA;AACvB,MAAI,CAACC,OAAO;AACV,WAAO;EACT;AAEA,SACE,gBAAAE,OAAA,cAACC,UAAUC,SAAO;IAACC,SAAS;KAC1B,gBAAAH,OAAA,cAACI,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,gBAAAN,OAAA,cAACI,OAAAA,IAAAA,GAED,gBAAAJ,OAAA,cAACI,OAAAA;IAAIE,WAAU;KACb,gBAAAN,OAAA,cAACO,gBAAAA;IAAeV;OAGlB,gBAAAG,OAAA,cAACQ,gBAAAA;IAAeV;IAAcD;;AAItC;AAEA,IAAA,yBAAeD;",
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", "toolbar", "div", "role", "className", "ChessComponent", "PlayerSelector"]
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-2MMUB5S7.mjs"));
4
+
5
+ export {
6
+ ChessContainer
7
+ };
8
+ //# sourceMappingURL=chunk-672NU6IC.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './ChessComponent';\n\nexport const ChessContainer = lazy(() => import('./ChessContainer'));\n"],
5
+ "mappings": ";AAIA,SAASA,YAAY;AAId,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["lazy", "ChessContainer", "lazy"]
7
+ }
@@ -0,0 +1,41 @@
1
+ // packages/plugins/plugin-chess/src/components/ChessComponent.tsx
2
+ import { Chess } from "chess.js";
3
+ import React, { useCallback, useEffect, useMemo } from "react";
4
+ import { getSpace } from "@dxos/react-client/echo";
5
+ import { ChessModel, Board, Chessboard } from "@dxos/react-ui-gameboard";
6
+ var ChessComponent = ({ game }) => {
7
+ const model = useMemo(() => new ChessModel(), []);
8
+ useEffect(() => {
9
+ if (!model || game.pgn !== model?.game.pgn()) {
10
+ const chess = new Chess();
11
+ if (game.pgn) {
12
+ chess.loadPgn(game.pgn);
13
+ }
14
+ model.initialize(chess.fen());
15
+ }
16
+ }, [
17
+ game.pgn
18
+ ]);
19
+ const space = getSpace(game);
20
+ if (!space) {
21
+ return null;
22
+ }
23
+ const handleDrop = useCallback((move) => {
24
+ if (model.makeMove(move)) {
25
+ game.pgn = model.game.pgn();
26
+ return true;
27
+ }
28
+ return false;
29
+ }, [
30
+ model
31
+ ]);
32
+ return /* @__PURE__ */ React.createElement(Board.Root, {
33
+ model,
34
+ onDrop: handleDrop
35
+ }, /* @__PURE__ */ React.createElement(Chessboard, null));
36
+ };
37
+
38
+ export {
39
+ ChessComponent
40
+ };
41
+ //# sourceMappingURL=chunk-RGPTBDH7.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 { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n chess.loadPgn(game.pgn);\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
5
+ "mappings": ";AAIA,SAASA,aAAa;AACtB,OAAOC,SAASC,aAAaC,WAAWC,eAAe;AAEvD,SAASC,gBAAgB;AACzB,SAASC,YAAYC,OAAOC,kBAAuC;AAI5D,IAAMC,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;AAC1D,QAAMC,QAAQC,QAAQ,MAAM,IAAIC,WAAAA,GAAc,CAAA,CAAE;AAChDC,YAAU,MAAA;AACR,QAAI,CAACH,SAASD,KAAKK,QAAQJ,OAAOD,KAAKK,IAAAA,GAAO;AAC5C,YAAMC,QAAQ,IAAIC,MAAAA;AAClB,UAAIP,KAAKK,KAAK;AACZC,cAAME,QAAQR,KAAKK,GAAG;MACxB;AAEAJ,YAAMQ,WAAWH,MAAMI,IAAG,CAAA;IAC5B;EACF,GAAG;IAACV,KAAKK;GAAI;AAEb,QAAMM,QAAQC,SAASZ,IAAAA;AACvB,MAAI,CAACW,OAAO;AACV,WAAO;EACT;AAEA,QAAME,aAAaC,YACjB,CAACC,SAAAA;AACC,QAAId,MAAMe,SAASD,IAAAA,GAAO;AACxBf,WAAKK,MAAMJ,MAAMD,KAAKK,IAAG;AACzB,aAAO;IACT;AAEA,WAAO;EACT,GACA;IAACJ;GAAM;AAGT,SACE,sBAAA,cAACgB,MAAMC,MAAI;IAACjB;IAAckB,QAAQN;KAChC,sBAAA,cAACO,YAAAA,IAAAA,CAAAA;AAGP;",
6
+ "names": ["Chess", "React", "useCallback", "useEffect", "useMemo", "getSpace", "ChessModel", "Board", "Chessboard", "ChessComponent", "game", "model", "useMemo", "ChessModel", "useEffect", "pgn", "chess", "Chess", "loadPgn", "initialize", "fen", "space", "getSpace", "handleDrop", "useCallback", "move", "makeMove", "Board", "Root", "onDrop", "Chessboard"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ChessContainer
3
- } from "./chunk-LAYER2WV.mjs";
3
+ } from "./chunk-672NU6IC.mjs";
4
4
  import {
5
5
  CHESS_PLUGIN,
6
6
  ChessAction,
@@ -8,21 +8,17 @@ import {
8
8
  meta
9
9
  } from "./chunk-VYBCAEUF.mjs";
10
10
  import {
11
- Chess,
12
- ChessPanel,
13
- ChessPieces,
14
- Chessboard,
15
- boardStyles
16
- } from "./chunk-JUAC2NNR.mjs";
11
+ ChessComponent
12
+ } from "./chunk-RGPTBDH7.mjs";
17
13
 
18
14
  // packages/plugins/plugin-chess/src/capabilities/index.ts
19
15
  import { lazy } from "@dxos/app-framework";
20
16
  var Artifact = lazy(() => import("./artifact-YWAB5JJL.mjs"));
21
- var IntentResolver = lazy(() => import("./intent-resolver-UZRNSQFI.mjs"));
22
- var ReactSurface = lazy(() => import("./react-surface-EP4LXPH7.mjs"));
17
+ var IntentResolver = lazy(() => import("./intent-resolver-BKKGQ5TJ.mjs"));
18
+ var ReactSurface = lazy(() => import("./react-surface-Y7XMQYOV.mjs"));
23
19
 
24
20
  // packages/plugins/plugin-chess/src/ChessPlugin.tsx
25
- import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events, oneOf } from "@dxos/app-framework";
21
+ import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
26
22
  import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
27
23
 
28
24
  // packages/plugins/plugin-chess/src/translations.ts
@@ -51,7 +47,7 @@ var ChessPlugin = () => definePlugin(meta, [
51
47
  }),
52
48
  defineModule({
53
49
  id: `${meta.id}/module/metadata`,
54
- activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
50
+ activatesOn: Events.SetupMetadata,
55
51
  activate: () => contributes(Capabilities.Metadata, {
56
52
  id: ChessType.typename,
57
53
  metadata: {
@@ -68,19 +64,19 @@ var ChessPlugin = () => definePlugin(meta, [
68
64
  }),
69
65
  defineModule({
70
66
  id: `${meta.id}/module/schema`,
71
- activatesOn: ClientEvents.SetupClient,
67
+ activatesOn: ClientEvents.SetupSchema,
72
68
  activate: () => contributes(ClientCapabilities.Schema, [
73
69
  ChessType
74
70
  ])
75
71
  }),
76
72
  defineModule({
77
73
  id: `${meta.id}/module/react-surface`,
78
- activatesOn: Events.Startup,
74
+ activatesOn: Events.SetupSurfaces,
79
75
  activate: ReactSurface
80
76
  }),
81
77
  defineModule({
82
78
  id: `${meta.id}/module/intent-resolver`,
83
- activatesOn: Events.Startup,
79
+ activatesOn: Events.SetupIntents,
84
80
  activate: IntentResolver
85
81
  }),
86
82
  defineModule({
@@ -92,15 +88,11 @@ var ChessPlugin = () => definePlugin(meta, [
92
88
  export {
93
89
  Artifact,
94
90
  CHESS_PLUGIN,
95
- Chess,
91
+ ChessComponent,
96
92
  ChessContainer,
97
- ChessPanel,
98
- ChessPieces,
99
93
  ChessPlugin,
100
- Chessboard,
101
94
  IntentResolver,
102
95
  ReactSurface,
103
- boardStyles,
104
96
  meta
105
97
  };
106
98
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const Artifact = lazy(() => import('./artifact'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n defineModule,\n definePlugin,\n Events,\n oneOf,\n} from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { Artifact, IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n createObject: (props: { name?: string }) => createIntent(ChessAction.Create, props),\n placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupClient,\n activate: () => contributes(ClientCapabilities.Schema, [ChessType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.Startup,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact`,\n activatesOn: Events.Startup,\n activate: Artifact,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.typename]: {\n 'typename label': 'Game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'game title placeholder': 'New game',\n 'create game label': 'Create game',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,WAAWC,KAAK,MAAM,OAAO,yBAAA,CAAA;AACnC,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SACEG,cACAC,aACAC,cACAC,cACAC,cACAC,QACAC,aACK;AACP,SAASC,oBAAoBC,oBAAoB;;;ACNjD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,UAAUC,QAAQ,GAAG;QACpB,kBAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;ADAK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaQ,MAAMP,OAAOQ,SAASR,OAAOS,aAAa;IACvDP,UAAU,MACRC,YAAYC,aAAaM,UAAU;MACjCZ,IAAIa,UAAUC;MACdC,UAAU;QACRC,cAAc,CAACC,UAA6BC,aAAaC,YAAYC,QAAQH,KAAAA;QAC7EI,aAAa;UAAC;UAA0B;YAAEC,IAAIC;UAAa;;QAC3DC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAawB,aAAaC;IAC1BtB,UAAU,MAAMC,YAAYsB,mBAAmBC,QAAQ;MAACf;KAAU;EACpE,CAAA;EACAd,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOQ;IACpBN,UAAUyB;EACZ,CAAA;EACA9B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOQ;IACpBN,UAAU0B;EACZ,CAAA;EACA/B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOQ;IACpBN,UAAU2B;EACZ,CAAA;CACD;",
6
- "names": ["lazy", "Artifact", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "oneOf", "ClientCapabilities", "ClientEvents", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "ChessType", "typename", "metadata", "createObject", "props", "createIntent", "ChessAction", "Create", "placeholder", "ns", "CHESS_PLUGIN", "icon", "ClientEvents", "SetupClient", "ClientCapabilities", "Schema", "ReactSurface", "IntentResolver", "Artifact"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const Artifact = lazy(() => import('./artifact'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { Artifact, IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n createObject: (props: { name?: string }) => createIntent(ChessAction.Create, props),\n placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [ChessType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupSurfaces,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntents,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact`,\n activatesOn: Events.Startup,\n activate: Artifact,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.typename]: {\n 'typename label': 'Game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'game title placeholder': 'New game',\n 'create game label': 'Create game',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,WAAWC,KAAK,MAAM,OAAO,yBAAA,CAAA;AACnC,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoBC,oBAAoB;;;ACEjD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,UAAUC,QAAQ,GAAG;QACpB,kBAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;ADRK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,UAAUC;MACdC,UAAU;QACRC,cAAc,CAACC,UAA6BC,aAAaC,YAAYC,QAAQH,KAAAA;QAC7EI,aAAa;UAAC;UAA0B;YAAEC,IAAIC;UAAa;;QAC3DC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAvB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAasB,aAAaC;IAC1BpB,UAAU,MAAMC,YAAYoB,mBAAmBC,QAAQ;MAACf;KAAU;EACpE,CAAA;EACAZ,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;EACA/B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO6B;IACpB3B,UAAU4B;EACZ,CAAA;CACD;",
6
+ "names": ["lazy", "Artifact", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientCapabilities", "ClientEvents", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChessType", "typename", "metadata", "createObject", "props", "createIntent", "ChessAction", "Create", "placeholder", "ns", "CHESS_PLUGIN", "icon", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "SetupSurfaces", "ReactSurface", "SetupIntents", "IntentResolver", "Startup", "Artifact"]
7
7
  }
@@ -7,19 +7,22 @@ import {
7
7
  import { Chess } from "chess.js";
8
8
  import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
9
9
  import { create } from "@dxos/live-object";
10
- var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver(ChessAction.Create, ({ name, fen }) => {
11
- const pgn = fen ? new Chess(fen).pgn() : void 0;
12
- return {
13
- data: {
14
- object: create(ChessType, {
15
- name,
16
- fen,
17
- pgn
18
- })
19
- }
20
- };
10
+ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
11
+ intent: ChessAction.Create,
12
+ resolve: ({ name, fen }) => {
13
+ const pgn = fen ? new Chess(fen).pgn() : void 0;
14
+ return {
15
+ data: {
16
+ object: create(ChessType, {
17
+ name,
18
+ fen,
19
+ pgn
20
+ })
21
+ }
22
+ };
23
+ }
21
24
  }));
22
25
  export {
23
26
  intent_resolver_default as default
24
27
  };
25
- //# sourceMappingURL=intent-resolver-UZRNSQFI.mjs.map
28
+ //# sourceMappingURL=intent-resolver-BKKGQ5TJ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { ChessAction, ChessType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ChessAction.Create,\n resolve: ({ name, fen }) => {\n const pgn = fen ? new Chess(fen).pgn() : undefined;\n return {\n data: {\n object: create(ChessType, { name, fen, pgn }),\n },\n };\n },\n }),\n );\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,aAAa;AAEtB,SAASC,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,YAAYC;EACpBC,SAAS,CAAC,EAAEC,MAAMC,IAAG,MAAE;AACrB,UAAMC,MAAMD,MAAM,IAAIE,MAAMF,GAAAA,EAAKC,IAAG,IAAKE;AACzC,WAAO;MACLC,MAAM;QACJC,QAAQC,OAAOC,WAAW;UAAER;UAAMC;UAAKC;QAAI,CAAA;MAC7C;IACF;EACF;AACF,CAAA,CAAA;",
6
+ "names": ["Chess", "Capabilities", "contributes", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ChessAction", "Create", "resolve", "name", "fen", "pgn", "Chess", "undefined", "data", "object", "create", "ChessType"]
7
+ }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":1411,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytes":17413,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2531,"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/Chessboard/pieces/custom.tsx":{"bytes":32344,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytes":6674,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytes":30948,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytes":704,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx","kind":"import-statement","original":"./custom"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx","kind":"import-statement","original":"./phosphor"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx","kind":"import-statement","original":"./riohacha"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytes":18372,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-dnd-html5-backend","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts","kind":"import-statement","original":"./pieces"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytes":529,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytes":14324,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","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},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":2405,"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/Chess.tsx","kind":"import-statement","original":"./Chess"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":977,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chess.tsx","kind":"import-statement","original":"./Chess"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"},{"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":4798,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"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/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1296,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact.ts","kind":"dynamic-import","original":"./artifact"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1825,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7326,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4729},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["Artifact","CHESS_PLUGIN","Chess","ChessContainer","ChessPanel","ChessPieces","ChessPlugin","Chessboard","IntentResolver","ReactSurface","boardStyles","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":252},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1474},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2743},"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-VYBCAEUF.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-YWAB5JJL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7574},"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.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.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytesInOutput":5454}},"bytes":5673},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1277},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-UZRNSQFI.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.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":464}},"bytes":704},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1207},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":491}},"bytes":708},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2316},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-EP4LXPH7.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"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":956}},"bytes":1314},"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":424},"packages/plugins/plugin-chess/dist/lib/browser/chunk-LAYER2WV.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-G736GS2V.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-VYBCAEUF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3470},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.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":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":247}},"bytes":1700},"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":48772},"packages/plugins/plugin-chess/dist/lib/browser/chunk-JUAC2NNR.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-dnd-html5-backend","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","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":["Chess","ChessPanel","ChessPieces","Chessboard","boardStyles"],"inputs":{"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":4712},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx":{"bytesInOutput":12536},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytesInOutput":1678},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytesInOutput":11516},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytesInOutput":4053},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":35074}}}
1
+ {"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":1411,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytes":17413,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":4369,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3335,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1296,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact.ts","kind":"dynamic-import","original":"./artifact"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1825,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7235,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4676},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-672NU6IC.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-RGPTBDH7.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-BKKGQ5TJ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-Y7XMQYOV.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["Artifact","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":252},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1455},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2626},"packages/plugins/plugin-chess/dist/lib/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-VYBCAEUF.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-YWAB5JJL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7574},"packages/plugins/plugin-chess/dist/lib/browser/artifact-YWAB5JJL.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.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.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact.ts":{"bytesInOutput":5454}},"bytes":5673},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-BKKGQ5TJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-BKKGQ5TJ.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.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":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-2MMUB5S7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-2MMUB5S7.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-RGPTBDH7.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":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-Y7XMQYOV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-Y7XMQYOV.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-672NU6IC.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-RGPTBDH7.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-672NU6IC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-672NU6IC.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-2MMUB5S7.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-VYBCAEUF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3470},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VYBCAEUF.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":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":247}},"bytes":1700},"packages/plugins/plugin-chess/dist/lib/browser/chunk-RGPTBDH7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2362},"packages/plugins/plugin-chess/dist/lib/browser/chunk-RGPTBDH7.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":955}},"bytes":1096}}}
@@ -1,17 +1,16 @@
1
1
  import {
2
2
  ChessContainer
3
- } from "./chunk-LAYER2WV.mjs";
3
+ } from "./chunk-672NU6IC.mjs";
4
4
  import {
5
5
  CHESS_PLUGIN,
6
6
  ChessType,
7
7
  isObject
8
8
  } from "./chunk-VYBCAEUF.mjs";
9
9
  import {
10
- Chessboard
11
- } from "./chunk-JUAC2NNR.mjs";
10
+ ChessComponent
11
+ } from "./chunk-RGPTBDH7.mjs";
12
12
 
13
13
  // packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
14
- import { Chess } from "chess.js";
15
14
  import React from "react";
16
15
  import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
17
16
  import { isInstanceOf } from "@dxos/echo-schema";
@@ -32,19 +31,12 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
32
31
  id: "plugin-chess",
33
32
  role: "canvas-node",
34
33
  filter: (data) => isInstanceOf(ChessType, data),
35
- component: ({ data }) => /* @__PURE__ */ React.createElement(Chessboard, {
36
- model: {
37
- chess: new Chess(data.fen)
38
- },
39
- onUpdate: (move) => {
40
- const board = new Chess(data.fen);
41
- board.move(move);
42
- data.value = board.fen();
43
- }
34
+ component: ({ data }) => /* @__PURE__ */ React.createElement(ChessComponent, {
35
+ game: data
44
36
  })
45
37
  })
46
38
  ]);
47
39
  export {
48
40
  react_surface_default as default
49
41
  };
50
- //# sourceMappingURL=react-surface-EP4LXPH7.mjs.map
42
+ //# sourceMappingURL=react-surface-Y7XMQYOV.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\n\nimport { ChessContainer } from '../components';\nimport { ChessComponent } from '../components/ChessComponent';\nimport { CHESS_PLUGIN } from '../meta';\nimport { ChessType, isObject } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: CHESS_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: ChessType } => isObject(data.subject),\n component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,\n }),\n createSurface({\n id: 'plugin-chess',\n role: 'canvas-node',\n filter: (data): data is any => isInstanceOf(ChessType, data),\n component: ({ data }) => <ChessComponent game={data} />,\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,oBAAoB;AAO7B,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC;IACJC,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAAyCC,SAASD,KAAKE,OAAO;IACvEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,sBAAA,cAACM,gBAAAA;MAAeC,MAAML,KAAKE;MAASJ;;EACrE,CAAA;EACAH,cAAc;IACZC,IAAI;IACJE,MAAM;IACNC,QAAQ,CAACC,SAAsBM,aAAaC,WAAWP,IAAAA;IACvDG,WAAW,CAAC,EAAEH,KAAI,MAAO,sBAAA,cAACQ,gBAAAA;MAAeH,MAAML;;EACjD,CAAA;CACD;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "isInstanceOf", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game", "isInstanceOf", "ChessType", "ChessComponent"]
7
+ }