@dxos/plugin-chess 0.7.5-main.ff8607b → 0.7.5-staging.b81e783

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 (104) hide show
  1. package/dist/lib/browser/{ChessContainer-LPMACR6Y.mjs → ChessContainer-XERPODLK.mjs} +10 -30
  2. package/dist/lib/browser/ChessContainer-XERPODLK.mjs.map +7 -0
  3. package/dist/lib/browser/artifact-definition-AEIQ7Z36.mjs +174 -0
  4. package/dist/lib/browser/artifact-definition-AEIQ7Z36.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-KC36U5TF.mjs → chunk-GKM6RRDX.mjs} +11 -8
  6. package/dist/lib/browser/chunk-GKM6RRDX.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-R26FYVUS.mjs +8 -0
  8. package/dist/lib/browser/chunk-R26FYVUS.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-VRWXC5L2.mjs +42 -0
  10. package/dist/lib/browser/chunk-VRWXC5L2.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +36 -17
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/{intent-resolver-5CPSAZSA.mjs → intent-resolver-VPK5QRXH.mjs} +16 -10
  14. package/dist/lib/browser/intent-resolver-VPK5QRXH.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/react-surface-ITP4OMBZ.mjs +42 -0
  17. package/dist/lib/browser/react-surface-ITP4OMBZ.mjs.map +7 -0
  18. package/dist/lib/browser/types/index.mjs +3 -3
  19. package/dist/lib/node/{ChessContainer-ZFOCAXZL.cjs → ChessContainer-LEPLNICP.cjs} +9 -32
  20. package/dist/lib/node/ChessContainer-LEPLNICP.cjs.map +7 -0
  21. package/dist/lib/node/artifact-definition-ZM5VDOVN.cjs +189 -0
  22. package/dist/lib/node/artifact-definition-ZM5VDOVN.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-BEZSGC5V.cjs → chunk-3TTH3HKL.cjs} +14 -11
  24. package/dist/lib/node/chunk-3TTH3HKL.cjs.map +7 -0
  25. package/dist/lib/node/chunk-CSRNUKOH.cjs +74 -0
  26. package/dist/lib/node/chunk-CSRNUKOH.cjs.map +7 -0
  27. package/dist/lib/node/{react-surface-IOAB5AXZ.cjs → chunk-ITDMCBQQ.cjs} +11 -22
  28. package/dist/lib/node/chunk-ITDMCBQQ.cjs.map +7 -0
  29. package/dist/lib/node/index.cjs +51 -31
  30. package/dist/lib/node/index.cjs.map +4 -4
  31. package/dist/lib/node/{intent-resolver-2YYMQ2H5.cjs → intent-resolver-PUM2BVGU.cjs} +19 -13
  32. package/dist/lib/node/intent-resolver-PUM2BVGU.cjs.map +7 -0
  33. package/dist/lib/node/meta.json +1 -1
  34. package/dist/lib/node/react-surface-4G4PW5RU.cjs +62 -0
  35. package/dist/lib/node/react-surface-4G4PW5RU.cjs.map +7 -0
  36. package/dist/lib/node/types/index.cjs +6 -6
  37. package/dist/lib/node/types/index.cjs.map +1 -1
  38. package/dist/lib/node-esm/{ChessContainer-DF6IFM2R.mjs → ChessContainer-S76WNBWN.mjs} +9 -30
  39. package/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs.map +7 -0
  40. package/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs +175 -0
  41. package/dist/lib/node-esm/artifact-definition-NGQEQHJT.mjs.map +7 -0
  42. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs +44 -0
  43. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map +7 -0
  44. package/dist/lib/node-esm/chunk-B72CIN6T.mjs +10 -0
  45. package/dist/lib/node-esm/chunk-B72CIN6T.mjs.map +7 -0
  46. package/dist/lib/node-esm/{chunk-A6KO5IFZ.mjs → chunk-GQA2DRUZ.mjs} +11 -8
  47. package/dist/lib/node-esm/chunk-GQA2DRUZ.mjs.map +7 -0
  48. package/dist/lib/node-esm/index.mjs +36 -17
  49. package/dist/lib/node-esm/index.mjs.map +4 -4
  50. package/dist/lib/node-esm/{intent-resolver-XCT7HZ43.mjs → intent-resolver-IR3YUZIG.mjs} +16 -10
  51. package/dist/lib/node-esm/intent-resolver-IR3YUZIG.mjs.map +7 -0
  52. package/dist/lib/node-esm/meta.json +1 -1
  53. package/dist/lib/node-esm/react-surface-AEMVDP4R.mjs +43 -0
  54. package/dist/lib/node-esm/react-surface-AEMVDP4R.mjs.map +7 -0
  55. package/dist/lib/node-esm/types/index.mjs +3 -3
  56. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/artifact-definition.d.ts +11 -0
  58. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
  59. package/dist/types/src/capabilities/index.d.ts +1 -0
  60. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  61. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  63. package/dist/types/src/components/ChessComponent.d.ts +5 -0
  64. package/dist/types/src/components/ChessComponent.d.ts.map +1 -0
  65. package/dist/types/src/components/ChessContainer.d.ts +3 -4
  66. package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
  67. package/dist/types/src/components/PlayerSelector.d.ts +4 -5
  68. package/dist/types/src/components/PlayerSelector.d.ts.map +1 -1
  69. package/dist/types/src/components/index.d.ts +3 -2
  70. package/dist/types/src/components/index.d.ts.map +1 -1
  71. package/dist/types/src/index.d.ts +3 -1
  72. package/dist/types/src/index.d.ts.map +1 -1
  73. package/dist/types/src/types/schema.d.ts +4 -2
  74. package/dist/types/src/types/schema.d.ts.map +1 -1
  75. package/dist/types/src/types/types.d.ts +4 -3
  76. package/dist/types/src/types/types.d.ts.map +1 -1
  77. package/package.json +22 -18
  78. package/src/ChessPlugin.tsx +22 -9
  79. package/src/capabilities/artifact-definition.ts +109 -0
  80. package/src/capabilities/index.ts +1 -0
  81. package/src/capabilities/intent-resolver.ts +11 -6
  82. package/src/capabilities/react-surface.tsx +12 -5
  83. package/src/components/ChessComponent.tsx +49 -0
  84. package/src/components/ChessContainer.tsx +5 -32
  85. package/src/components/PlayerSelector.tsx +2 -2
  86. package/src/components/index.ts +2 -0
  87. package/src/index.ts +4 -1
  88. package/src/translations.ts +2 -2
  89. package/src/types/schema.ts +3 -1
  90. package/src/types/types.ts +6 -5
  91. package/dist/lib/browser/ChessContainer-LPMACR6Y.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-KC36U5TF.mjs.map +0 -7
  93. package/dist/lib/browser/intent-resolver-5CPSAZSA.mjs.map +0 -7
  94. package/dist/lib/browser/react-surface-6J2N3V5R.mjs +0 -30
  95. package/dist/lib/browser/react-surface-6J2N3V5R.mjs.map +0 -7
  96. package/dist/lib/node/ChessContainer-ZFOCAXZL.cjs.map +0 -7
  97. package/dist/lib/node/chunk-BEZSGC5V.cjs.map +0 -7
  98. package/dist/lib/node/intent-resolver-2YYMQ2H5.cjs.map +0 -7
  99. package/dist/lib/node/react-surface-IOAB5AXZ.cjs.map +0 -7
  100. package/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs.map +0 -7
  101. package/dist/lib/node-esm/chunk-A6KO5IFZ.mjs.map +0 -7
  102. package/dist/lib/node-esm/intent-resolver-XCT7HZ43.mjs.map +0 -7
  103. package/dist/lib/node-esm/react-surface-47I77M7F.mjs +0 -31
  104. package/dist/lib/node-esm/react-surface-47I77M7F.mjs.map +0 -7
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_CSRNUKOH_exports = {};
30
+ __export(chunk_CSRNUKOH_exports, {
31
+ ChessComponent: () => ChessComponent
32
+ });
33
+ module.exports = __toCommonJS(chunk_CSRNUKOH_exports);
34
+ var import_chess = require("chess.js");
35
+ var import_react = __toESM(require("react"));
36
+ var import_echo = require("@dxos/react-client/echo");
37
+ var import_react_ui_gameboard = require("@dxos/react-ui-gameboard");
38
+ var ChessComponent = ({ game }) => {
39
+ const model = (0, import_react.useMemo)(() => new import_react_ui_gameboard.ChessModel(), []);
40
+ (0, import_react.useEffect)(() => {
41
+ if (!model || game.pgn !== model?.game.pgn()) {
42
+ const chess = new import_chess.Chess();
43
+ if (game.pgn) {
44
+ chess.loadPgn(game.pgn);
45
+ }
46
+ model.initialize(chess.fen());
47
+ }
48
+ }, [
49
+ game.pgn
50
+ ]);
51
+ const space = (0, import_echo.getSpace)(game);
52
+ if (!space) {
53
+ return null;
54
+ }
55
+ const handleDrop = (0, import_react.useCallback)((move) => {
56
+ if (model.makeMove(move)) {
57
+ game.pgn = model.game.pgn();
58
+ game.fen = model.game.fen();
59
+ return true;
60
+ }
61
+ return false;
62
+ }, [
63
+ model
64
+ ]);
65
+ return /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Board.Root, {
66
+ model,
67
+ onDrop: handleDrop
68
+ }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_gameboard.Chessboard, null));
69
+ };
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ ChessComponent
73
+ });
74
+ //# sourceMappingURL=chunk-CSRNUKOH.cjs.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 game.fen = model.game.fen();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAsB;AACtB,mBAAuD;AAEvD,kBAAyB;AACzB,gCAAmE;AAI5D,IAAMA,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;AAC1D,QAAMC,YAAQC,sBAAQ,MAAM,IAAIC,qCAAAA,GAAc,CAAA,CAAE;AAChDC,8BAAU,MAAA;AACR,QAAI,CAACH,SAASD,KAAKK,QAAQJ,OAAOD,KAAKK,IAAAA,GAAO;AAC5C,YAAMC,QAAQ,IAAIC,mBAAAA;AAClB,UAAIP,KAAKK,KAAK;AACZC,cAAME,QAAQR,KAAKK,GAAG;MACxB;AAEAJ,YAAMQ,WAAWH,MAAMI,IAAG,CAAA;IAC5B;EACF,GAAG;IAACV,KAAKK;GAAI;AAEb,QAAMM,YAAQC,sBAASZ,IAAAA;AACvB,MAAI,CAACW,OAAO;AACV,WAAO;EACT;AAEA,QAAME,iBAAaC,0BACjB,CAACC,SAAAA;AACC,QAAId,MAAMe,SAASD,IAAAA,GAAO;AACxBf,WAAKK,MAAMJ,MAAMD,KAAKK,IAAG;AACzBL,WAAKU,MAAMT,MAAMD,KAAKU,IAAG;AACzB,aAAO;IACT;AAEA,WAAO;EACT,GACA;IAACT;GAAM;AAGT,SACE,6BAAAgB,QAAA,cAACC,gCAAMC,MAAI;IAAClB;IAAcmB,QAAQP;KAChC,6BAAAI,QAAA,cAACI,sCAAAA,IAAAA,CAAAA;AAGP;",
6
+ "names": ["ChessComponent", "game", "model", "useMemo", "ChessModel", "useEffect", "pgn", "chess", "Chess", "loadPgn", "initialize", "fen", "space", "getSpace", "handleDrop", "useCallback", "move", "makeMove", "React", "Board", "Root", "onDrop", "Chessboard"]
7
+ }
@@ -26,26 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var react_surface_IOAB5AXZ_exports = {};
30
- __export(react_surface_IOAB5AXZ_exports, {
31
- default: () => react_surface_default
29
+ var chunk_ITDMCBQQ_exports = {};
30
+ __export(chunk_ITDMCBQQ_exports, {
31
+ ChessContainer: () => ChessContainer
32
32
  });
33
- module.exports = __toCommonJS(react_surface_IOAB5AXZ_exports);
34
- var import_chunk_BEZSGC5V = require("./chunk-BEZSGC5V.cjs");
35
- var import_react = __toESM(require("react"));
36
- var import_app_framework = require("@dxos/app-framework");
37
- var import_react2 = require("react");
38
- var ChessContainer = (0, import_react2.lazy)(() => import("./ChessContainer-ZFOCAXZL.cjs"));
39
- var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, (0, import_app_framework.createSurface)({
40
- id: import_chunk_BEZSGC5V.CHESS_PLUGIN,
41
- role: [
42
- "article",
43
- "section"
44
- ],
45
- filter: (data) => (0, import_chunk_BEZSGC5V.isObject)(data.subject),
46
- component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(ChessContainer, {
47
- game: data.subject,
48
- role
49
- })
50
- }));
51
- //# sourceMappingURL=react-surface-IOAB5AXZ.cjs.map
33
+ module.exports = __toCommonJS(chunk_ITDMCBQQ_exports);
34
+ var import_react = require("react");
35
+ var ChessContainer = (0, import_react.lazy)(() => import("./ChessContainer-LEPLNICP.cjs"));
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ ChessContainer
39
+ });
40
+ //# sourceMappingURL=chunk-ITDMCBQQ.cjs.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,mBAAqB;AAId,IAAMA,qBAAiBC,mBAAK,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["ChessContainer", "lazy"]
7
+ }
@@ -28,24 +28,34 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
- CHESS_PLUGIN: () => import_chunk_BEZSGC5V.CHESS_PLUGIN,
31
+ ArtifactDefinition: () => ArtifactDefinition,
32
+ CHESS_PLUGIN: () => import_chunk_3TTH3HKL.CHESS_PLUGIN,
33
+ ChessComponent: () => import_chunk_CSRNUKOH.ChessComponent,
34
+ ChessContainer: () => import_chunk_ITDMCBQQ.ChessContainer,
32
35
  ChessPlugin: () => ChessPlugin,
33
- meta: () => import_chunk_BEZSGC5V.meta
36
+ IntentResolver: () => IntentResolver,
37
+ ReactSurface: () => ReactSurface,
38
+ meta: () => import_chunk_3TTH3HKL.meta
34
39
  });
35
40
  module.exports = __toCommonJS(node_exports);
36
- var import_chunk_BEZSGC5V = require("./chunk-BEZSGC5V.cjs");
41
+ var import_chunk_ITDMCBQQ = require("./chunk-ITDMCBQQ.cjs");
42
+ var import_chunk_3TTH3HKL = require("./chunk-3TTH3HKL.cjs");
43
+ var import_chunk_CSRNUKOH = require("./chunk-CSRNUKOH.cjs");
37
44
  var import_app_framework = require("@dxos/app-framework");
38
- var import_plugin_client = require("@dxos/plugin-client");
39
45
  var import_app_framework2 = require("@dxos/app-framework");
40
- var IntentResolver = (0, import_app_framework2.lazy)(() => import("./intent-resolver-2YYMQ2H5.cjs"));
41
- var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-IOAB5AXZ.cjs"));
46
+ var import_plugin_client = require("@dxos/plugin-client");
47
+ var import_plugin_space = require("@dxos/plugin-space");
48
+ var import_types = require("@dxos/plugin-space/types");
49
+ var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-ZM5VDOVN.cjs"));
50
+ var IntentResolver = (0, import_app_framework.lazy)(() => import("./intent-resolver-PUM2BVGU.cjs"));
51
+ var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-4G4PW5RU.cjs"));
42
52
  var translations_default = [
43
53
  {
44
54
  "en-US": {
45
- [import_chunk_BEZSGC5V.GameType.typename]: {
55
+ [import_chunk_3TTH3HKL.ChessType.typename]: {
46
56
  "typename label": "Game"
47
57
  },
48
- [import_chunk_BEZSGC5V.CHESS_PLUGIN]: {
58
+ [import_chunk_3TTH3HKL.CHESS_PLUGIN]: {
49
59
  "plugin name": "Chess",
50
60
  "game title placeholder": "New game",
51
61
  "create game label": "Create game",
@@ -54,51 +64,61 @@ var translations_default = [
54
64
  }
55
65
  }
56
66
  ];
57
- var ChessPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_BEZSGC5V.meta, [
58
- (0, import_app_framework.defineModule)({
59
- id: `${import_chunk_BEZSGC5V.meta.id}/module/translations`,
60
- activatesOn: import_app_framework.Events.SetupTranslations,
61
- activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
67
+ var ChessPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_3TTH3HKL.meta, [
68
+ (0, import_app_framework2.defineModule)({
69
+ id: `${import_chunk_3TTH3HKL.meta.id}/module/translations`,
70
+ activatesOn: import_app_framework2.Events.SetupTranslations,
71
+ activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Translations, translations_default)
62
72
  }),
63
- (0, import_app_framework.defineModule)({
64
- id: `${import_chunk_BEZSGC5V.meta.id}/module/metadata`,
65
- activatesOn: import_app_framework.Events.SetupMetadata,
66
- activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
67
- id: import_chunk_BEZSGC5V.GameType.typename,
73
+ (0, import_app_framework2.defineModule)({
74
+ id: `${import_chunk_3TTH3HKL.meta.id}/module/metadata`,
75
+ activatesOn: import_app_framework2.Events.SetupMetadata,
76
+ activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Metadata, {
77
+ id: import_chunk_3TTH3HKL.ChessType.typename,
68
78
  metadata: {
69
- createObject: (props) => (0, import_app_framework.createIntent)(import_chunk_BEZSGC5V.ChessAction.Create, props),
70
79
  placeholder: [
71
80
  "game title placeholder",
72
81
  {
73
- ns: import_chunk_BEZSGC5V.CHESS_PLUGIN
82
+ ns: import_chunk_3TTH3HKL.CHESS_PLUGIN
74
83
  }
75
84
  ],
76
85
  icon: "ph--shield-chevron--regular"
77
86
  }
78
87
  })
79
88
  }),
80
- (0, import_app_framework.defineModule)({
81
- id: `${import_chunk_BEZSGC5V.meta.id}/module/schema`,
89
+ (0, import_app_framework2.defineModule)({
90
+ id: `${import_chunk_3TTH3HKL.meta.id}/module/object-form`,
82
91
  activatesOn: import_plugin_client.ClientEvents.SetupSchema,
83
- activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
84
- import_chunk_BEZSGC5V.GameType
85
- ])
92
+ activate: () => (0, import_app_framework2.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types.defineObjectForm)({
93
+ objectSchema: import_chunk_3TTH3HKL.ChessType,
94
+ getIntent: () => (0, import_app_framework2.createIntent)(import_chunk_3TTH3HKL.ChessAction.Create)
95
+ }))
86
96
  }),
87
- (0, import_app_framework.defineModule)({
88
- id: `${import_chunk_BEZSGC5V.meta.id}/module/react-surface`,
89
- activatesOn: import_app_framework.Events.SetupSurfaces,
97
+ (0, import_app_framework2.defineModule)({
98
+ id: `${import_chunk_3TTH3HKL.meta.id}/module/react-surface`,
99
+ activatesOn: import_app_framework2.Events.SetupReactSurface,
90
100
  activate: ReactSurface
91
101
  }),
92
- (0, import_app_framework.defineModule)({
93
- id: `${import_chunk_BEZSGC5V.meta.id}/module/intent-resolver`,
94
- activatesOn: import_app_framework.Events.SetupIntents,
102
+ (0, import_app_framework2.defineModule)({
103
+ id: `${import_chunk_3TTH3HKL.meta.id}/module/intent-resolver`,
104
+ activatesOn: import_app_framework2.Events.SetupIntentResolver,
95
105
  activate: IntentResolver
106
+ }),
107
+ (0, import_app_framework2.defineModule)({
108
+ id: `${import_chunk_3TTH3HKL.meta.id}/module/artifact-definition`,
109
+ activatesOn: import_app_framework2.Events.SetupArtifactDefinition,
110
+ activate: ArtifactDefinition
96
111
  })
97
112
  ]);
98
113
  // Annotate the CommonJS export names for ESM import in node:
99
114
  0 && (module.exports = {
115
+ ArtifactDefinition,
100
116
  CHESS_PLUGIN,
117
+ ChessComponent,
118
+ ChessContainer,
101
119
  ChessPlugin,
120
+ IntentResolver,
121
+ ReactSurface,
102
122
  meta
103
123
  });
104
124
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/ChessPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\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 { IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, GameType } 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: GameType.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, [GameType]),\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 ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { GameType } from './types';\n\nexport default [\n {\n 'en-US': {\n [GameType.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,2BAA4F;AAC5F,2BAAiD;ACDjD,IAAAA,wBAAqB;AAEd,IAAMC,qBAAiBC,4BAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,mBAAeD,4BAAK,MAAM,OAAO,8BAAA,CAAA;ACA9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,+BAASC,QAAQ,GAAG;QACnB,kBAAkB;MACpB;MACA,CAACC,kCAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;AFRK,IAAMC,cAAc,UACzBC,mCAAaC,4BAAM;MACjBC,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOC;IACpBC,UAAU,UAAMC,kCAAYC,kCAAaC,cAAcC,oBAAAA;EACzD,CAAA;MACAT,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOO;IACpBL,UAAU,UACRC,kCAAYC,kCAAaI,UAAU;MACjCV,IAAIP,+BAASC;MACbiB,UAAU;QACRC,cAAc,CAACC,cAA6BC,mCAAaC,kCAAYC,QAAQH,KAAAA;QAC7EI,aAAa;UAAC;UAA0B;YAAEC,IAAIvB;UAAa;;QAC3DwB,MAAM;MACR;IACF,CAAA;EACJ,CAAA;MACApB,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAamB,kCAAaC;IAC1BjB,UAAU,UAAMC,kCAAYiB,wCAAmBC,QAAQ;MAAC9B;KAAS;EACnE,CAAA;MACAM,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOsB;IACpBpB,UAAUZ;EACZ,CAAA;MACAO,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOuB;IACpBrB,UAAUd;EACZ,CAAA;CACD;",
6
- "names": ["import_app_framework", "IntentResolver", "lazy", "ReactSurface", "GameType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "metadata", "createObject", "props", "createIntent", "ChessAction", "Create", "placeholder", "ns", "icon", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "SetupSurfaces", "SetupIntents"]
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 ArtifactDefinition = lazy(() => import('./artifact-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ChessType,\n getIntent: () => createIntent(ChessAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.typename]: {\n 'typename label': 'Game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'game title placeholder': 'New game',\n 'create game label': 'Create game',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqB;ACArB,IAAAA,wBAA4F;AAC5F,2BAA6B;AAC7B,0BAAkC;AAClC,mBAAiC;ADD1B,IAAMC,yBAAqBC,2BAAK,MAAM,OAAO,oCAAA,CAAA;AAC7C,IAAMC,qBAAiBD,2BAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,mBAAeF,2BAAK,MAAM,OAAO,8BAAA,CAAA;AED9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACG,gCAAUC,QAAQ,GAAG;QACpB,kBAAkB;MACpB;MACA,CAACC,kCAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;ADNK,IAAMC,cAAc,UACzBC,oCAAaC,4BAAM;MACjBC,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOC;IACpBC,UAAU,UAAMC,mCAAYC,mCAAaC,cAAcC,oBAAAA;EACzD,CAAA;MACAT,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOO;IACpBL,UAAU,UACRC,mCAAYC,mCAAaI,UAAU;MACjCV,IAAIP,gCAAUC;MACdiB,UAAU;QACRC,aAAa;UAAC;UAA0B;YAAEC,IAAIlB;UAAa;;QAC3DmB,MAAM;MACR;IACF,CAAA;EACJ,CAAA;MACAf,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAac,kCAAaC;IAC1BZ,UAAU,UACRC,mCACEY,sCAAkBC,gBAClBC,+BAAiB;MACfC,cAAc3B;MACd4B,WAAW,UAAMC,oCAAaC,kCAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;MACAzB,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOuB;IACpBrB,UAAUZ;EACZ,CAAA;MACAO,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOwB;IACpBtB,UAAUb;EACZ,CAAA;MACAQ,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,6BAAOyB;IACpBvB,UAAUf;EACZ,CAAA;CACD;",
6
+ "names": ["import_app_framework", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "metadata", "placeholder", "ns", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "SetupIntentResolver", "SetupArtifactDefinition"]
7
7
  }
@@ -16,22 +16,28 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var intent_resolver_2YYMQ2H5_exports = {};
20
- __export(intent_resolver_2YYMQ2H5_exports, {
19
+ var intent_resolver_PUM2BVGU_exports = {};
20
+ __export(intent_resolver_PUM2BVGU_exports, {
21
21
  default: () => intent_resolver_default
22
22
  });
23
- module.exports = __toCommonJS(intent_resolver_2YYMQ2H5_exports);
24
- var import_chunk_BEZSGC5V = require("./chunk-BEZSGC5V.cjs");
23
+ module.exports = __toCommonJS(intent_resolver_PUM2BVGU_exports);
24
+ var import_chunk_3TTH3HKL = require("./chunk-3TTH3HKL.cjs");
25
+ var import_chess = require("chess.js");
25
26
  var import_app_framework = require("@dxos/app-framework");
26
27
  var import_live_object = require("@dxos/live-object");
27
28
  var intent_resolver_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.IntentResolver, (0, import_app_framework.createResolver)({
28
- intent: import_chunk_BEZSGC5V.ChessAction.Create,
29
- resolve: ({ name }) => ({
30
- data: {
31
- object: (0, import_live_object.create)(import_chunk_BEZSGC5V.GameType, {
32
- name
33
- })
34
- }
35
- })
29
+ intent: import_chunk_3TTH3HKL.ChessAction.Create,
30
+ resolve: ({ name, fen }) => {
31
+ const pgn = fen ? new import_chess.Chess(fen).pgn() : void 0;
32
+ return {
33
+ data: {
34
+ object: (0, import_live_object.create)(import_chunk_3TTH3HKL.ChessType, {
35
+ name,
36
+ fen,
37
+ pgn
38
+ })
39
+ }
40
+ };
41
+ }
36
42
  }));
37
- //# sourceMappingURL=intent-resolver-2YYMQ2H5.cjs.map
43
+ //# sourceMappingURL=intent-resolver-PUM2BVGU.cjs.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,mBAAsB;AAEtB,2BAA0D;AAC1D,yBAAuB;AAIvB,IAAA,0BAAe,UACbA,kCACEC,kCAAaC,oBACbC,qCAAe;EACbC,QAAQC,kCAAYC;EACpBC,SAAS,CAAC,EAAEC,MAAMC,IAAG,MAAE;AACrB,UAAMC,MAAMD,MAAM,IAAIE,mBAAMF,GAAAA,EAAKC,IAAG,IAAKE;AACzC,WAAO;MACLC,MAAM;QACJC,YAAQC,2BAAOC,iCAAW;UAAER;UAAMC;UAAKC;QAAI,CAAA;MAC7C;IACF;EACF;AACF,CAAA,CAAA;",
6
+ "names": ["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":2461,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":2799,"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/intent-resolver.ts":{"bytes":2167,"imports":[{"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/PlayerSelector.tsx":{"bytes":8757,"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":6004,"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},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"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":798,"imports":[{"path":"react","kind":"import-statement","external":true},{"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":2649,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":1080,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"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":1819,"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":6685,"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":592,"imports":[{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4298},"packages/plugins/plugin-chess/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-BEZSGC5V.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-2YYMQ2H5.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-IOAB5AXZ.cjs","kind":"dynamic-import"}],"exports":["CHESS_PLUGIN","ChessPlugin","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1336},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":324},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0}},"bytes":2247},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-BEZSGC5V.cjs","kind":"import-statement"}],"exports":["ChessAction","GameType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":192},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-2YYMQ2H5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1071},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-2YYMQ2H5.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-BEZSGC5V.cjs","kind":"import-statement"},{"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":360}},"bytes":599},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-ZFOCAXZL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7737},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-ZFOCAXZL.cjs":{"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"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":1501},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":4104},"packages/plugins/plugin-chess/dist/lib/node/react-surface-IOAB5AXZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1559},"packages/plugins/plugin-chess/dist/lib/node/react-surface-IOAB5AXZ.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-BEZSGC5V.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-ZFOCAXZL.cjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":434},"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":900},"packages/plugins/plugin-chess/dist/lib/node/chunk-BEZSGC5V.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3507},"packages/plugins/plugin-chess/dist/lib/node/chunk-BEZSGC5V.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","GameType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":430},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":558},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1839}}}
1
+ {"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":17463,"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":4522,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3335,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1825,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7895,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5064},"packages/plugins/plugin-chess/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-ZM5VDOVN.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-PUM2BVGU.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node/react-surface-4G4PW5RU.cjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1623},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2825},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-ZM5VDOVN.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7596},"packages/plugins/plugin-chess/dist/lib/node/artifact-definition-ZM5VDOVN.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5487}},"bytes":5739},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-PUM2BVGU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/node/intent-resolver-PUM2BVGU.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-LEPLNICP.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-LEPLNICP.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/node/react-surface-4G4PW5RU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/node/react-surface-4G4PW5RU.cjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/node/chunk-ITDMCBQQ.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node/ChessContainer-LEPLNICP.cjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3767},"packages/plugins/plugin-chess/dist/lib/node/chunk-3TTH3HKL.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1966},"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/node/chunk-CSRNUKOH.cjs":{"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":990}},"bytes":1131}}}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var react_surface_4G4PW5RU_exports = {};
30
+ __export(react_surface_4G4PW5RU_exports, {
31
+ default: () => react_surface_default
32
+ });
33
+ module.exports = __toCommonJS(react_surface_4G4PW5RU_exports);
34
+ var import_chunk_ITDMCBQQ = require("./chunk-ITDMCBQQ.cjs");
35
+ var import_chunk_3TTH3HKL = require("./chunk-3TTH3HKL.cjs");
36
+ var import_chunk_CSRNUKOH = require("./chunk-CSRNUKOH.cjs");
37
+ var import_react = __toESM(require("react"));
38
+ var import_app_framework = require("@dxos/app-framework");
39
+ var import_echo_schema = require("@dxos/echo-schema");
40
+ var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
41
+ (0, import_app_framework.createSurface)({
42
+ id: import_chunk_3TTH3HKL.CHESS_PLUGIN,
43
+ role: [
44
+ "article",
45
+ "section"
46
+ ],
47
+ filter: (data) => (0, import_chunk_3TTH3HKL.isObject)(data.subject),
48
+ component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_ITDMCBQQ.ChessContainer, {
49
+ game: data.subject,
50
+ role
51
+ })
52
+ }),
53
+ (0, import_app_framework.createSurface)({
54
+ id: "plugin-chess",
55
+ role: "canvas-node",
56
+ filter: (data) => (0, import_echo_schema.isInstanceOf)(import_chunk_3TTH3HKL.ChessType, data),
57
+ component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_CSRNUKOH.ChessComponent, {
58
+ game: data
59
+ })
60
+ })
61
+ ]);
62
+ //# sourceMappingURL=react-surface-4G4PW5RU.cjs.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,mBAAkB;AAElB,2BAAyD;AACzD,yBAA6B;AAO7B,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAIC;IACJC,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,aAAyCC,gCAASD,KAAKE,OAAO;IACvEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,6BAAAM,QAAA,cAACC,sCAAAA;MAAeC,MAAMN,KAAKE;MAASJ;;EACrE,CAAA;MACAH,oCAAc;IACZC,IAAI;IACJE,MAAM;IACNC,QAAQ,CAACC,aAAsBO,iCAAaC,iCAAWR,IAAAA;IACvDG,WAAW,CAAC,EAAEH,KAAI,MAAO,6BAAAI,QAAA,cAACK,sCAAAA;MAAeH,MAAMN;;EACjD,CAAA;CACD;",
6
+ "names": ["contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "React", "ChessContainer", "game", "isInstanceOf", "ChessType", "ChessComponent"]
7
+ }
@@ -18,17 +18,17 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var types_exports = {};
20
20
  __export(types_exports, {
21
- ChessAction: () => import_chunk_BEZSGC5V.ChessAction,
22
- GameType: () => import_chunk_BEZSGC5V.GameType,
23
- MoveSchema: () => import_chunk_BEZSGC5V.MoveSchema,
24
- isObject: () => import_chunk_BEZSGC5V.isObject
21
+ ChessAction: () => import_chunk_3TTH3HKL.ChessAction,
22
+ ChessType: () => import_chunk_3TTH3HKL.ChessType,
23
+ MoveSchema: () => import_chunk_3TTH3HKL.MoveSchema,
24
+ isObject: () => import_chunk_3TTH3HKL.isObject
25
25
  });
26
26
  module.exports = __toCommonJS(types_exports);
27
- var import_chunk_BEZSGC5V = require("../chunk-BEZSGC5V.cjs");
27
+ var import_chunk_3TTH3HKL = require("../chunk-3TTH3HKL.cjs");
28
28
  // Annotate the CommonJS export names for ESM import in node:
29
29
  0 && (module.exports = {
30
30
  ChessAction,
31
- GameType,
31
+ ChessType,
32
32
  MoveSchema,
33
33
  isObject
34
34
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["index.cjs"],
4
- "sourcesContent": ["import {\n ChessAction,\n GameType,\n MoveSchema,\n isObject\n} from \"../chunk-BEZSGC5V.cjs\";\nexport {\n ChessAction,\n GameType,\n MoveSchema,\n isObject\n};\n//# sourceMappingURL=index.cjs.map\n"],
4
+ "sourcesContent": ["import {\n ChessAction,\n ChessType,\n MoveSchema,\n isObject\n} from \"../chunk-3TTH3HKL.cjs\";\nexport {\n ChessAction,\n ChessType,\n MoveSchema,\n isObject\n};\n//# sourceMappingURL=index.cjs.map\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKO;",
6
6
  "names": []
7
7
  }