@dxos/plugin-chess 0.7.5-labs.e27f9b9 → 0.7.5-main.2567c87

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 (137) hide show
  1. package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs +505 -0
  2. package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-VYBCAEUF.mjs → chunk-VHSLLEH3.mjs} +8 -11
  4. package/dist/lib/browser/chunk-VHSLLEH3.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +15 -32
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/intent-resolver-FUAOSHHX.mjs +19 -0
  8. package/dist/lib/browser/intent-resolver-FUAOSHHX.mjs.map +7 -0
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/react-surface-63EO2PZO.mjs +30 -0
  11. package/dist/lib/browser/react-surface-63EO2PZO.mjs.map +7 -0
  12. package/dist/lib/browser/types/index.mjs +3 -3
  13. package/dist/lib/node/ChessContainer-XRP7D63X.cjs +518 -0
  14. package/dist/lib/node/ChessContainer-XRP7D63X.cjs.map +7 -0
  15. package/dist/lib/node/{chunk-J5YKJRP3.cjs → chunk-3BLH7NRV.cjs} +11 -14
  16. package/dist/lib/node/chunk-3BLH7NRV.cjs.map +7 -0
  17. package/dist/lib/node/index.cjs +31 -49
  18. package/dist/lib/node/index.cjs.map +4 -4
  19. package/dist/lib/node/{intent-resolver-OIFDW46S.cjs → intent-resolver-VTB6P3IL.cjs} +11 -20
  20. package/dist/lib/node/intent-resolver-VTB6P3IL.cjs.map +7 -0
  21. package/dist/lib/node/meta.json +1 -1
  22. package/dist/lib/node/{chunk-TEZPML34.cjs → react-surface-PO42G64E.cjs} +22 -11
  23. package/dist/lib/node/react-surface-PO42G64E.cjs.map +7 -0
  24. package/dist/lib/node/types/index.cjs +6 -6
  25. package/dist/lib/node/types/index.cjs.map +1 -1
  26. package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs +507 -0
  27. package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-TXUWVQWY.mjs → chunk-M2CRYWX5.mjs} +8 -11
  29. package/dist/lib/node-esm/chunk-M2CRYWX5.mjs.map +7 -0
  30. package/dist/lib/node-esm/index.mjs +15 -32
  31. package/dist/lib/node-esm/index.mjs.map +4 -4
  32. package/dist/lib/node-esm/{intent-resolver-35HIBBYC.mjs → intent-resolver-MKEQFVZO.mjs} +9 -18
  33. package/dist/lib/node-esm/intent-resolver-MKEQFVZO.mjs.map +7 -0
  34. package/dist/lib/node-esm/meta.json +1 -1
  35. package/dist/lib/node-esm/react-surface-CXEBEDLT.mjs +31 -0
  36. package/dist/lib/node-esm/react-surface-CXEBEDLT.mjs.map +7 -0
  37. package/dist/lib/node-esm/types/index.mjs +3 -3
  38. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/index.d.ts +2 -3
  40. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  42. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  43. package/dist/types/src/components/Chess.d.ts +9 -0
  44. package/dist/types/src/components/Chess.d.ts.map +1 -0
  45. package/dist/types/src/components/ChessContainer.d.ts +3 -4
  46. package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
  47. package/dist/types/src/components/Chessboard/Chessboard.d.ts +37 -0
  48. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
  49. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +13 -0
  50. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
  51. package/dist/types/src/components/Chessboard/index.d.ts +2 -0
  52. package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
  53. package/dist/types/src/components/Chessboard/pieces/custom.d.ts +3 -0
  54. package/dist/types/src/components/Chessboard/pieces/custom.d.ts.map +1 -0
  55. package/dist/types/src/components/Chessboard/pieces/index.d.ts +4 -0
  56. package/dist/types/src/components/Chessboard/pieces/index.d.ts.map +1 -0
  57. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts +3 -0
  58. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts.map +1 -0
  59. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts +3 -0
  60. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts.map +1 -0
  61. package/dist/types/src/components/index.d.ts +1 -3
  62. package/dist/types/src/components/index.d.ts.map +1 -1
  63. package/dist/types/src/index.d.ts +1 -3
  64. package/dist/types/src/index.d.ts.map +1 -1
  65. package/dist/types/src/types/schema.d.ts +2 -4
  66. package/dist/types/src/types/schema.d.ts.map +1 -1
  67. package/dist/types/src/types/types.d.ts +3 -4
  68. package/dist/types/src/types/types.d.ts.map +1 -1
  69. package/package.json +20 -22
  70. package/src/ChessPlugin.tsx +17 -14
  71. package/src/capabilities/index.ts +0 -1
  72. package/src/capabilities/intent-resolver.ts +5 -13
  73. package/src/capabilities/react-surface.tsx +5 -12
  74. package/src/components/{PlayerSelector.tsx → Chess.tsx} +50 -3
  75. package/src/components/ChessContainer.tsx +4 -14
  76. package/src/components/Chessboard/Chessboard.stories.tsx +43 -0
  77. package/src/components/Chessboard/Chessboard.tsx +170 -0
  78. package/src/components/Chessboard/index.ts +5 -0
  79. package/src/components/Chessboard/pieces/custom.tsx +82 -0
  80. package/src/components/Chessboard/pieces/index.ts +7 -0
  81. package/src/components/Chessboard/pieces/phosphor.tsx +71 -0
  82. package/src/components/Chessboard/pieces/riohacha.tsx +166 -0
  83. package/src/components/index.ts +0 -2
  84. package/src/index.ts +1 -4
  85. package/src/translations.ts +2 -2
  86. package/src/types/schema.ts +1 -3
  87. package/src/types/types.ts +5 -6
  88. package/dist/lib/browser/ChessContainer-2MMUB5S7.mjs +0 -86
  89. package/dist/lib/browser/ChessContainer-2MMUB5S7.mjs.map +0 -7
  90. package/dist/lib/browser/artifact-YWAB5JJL.mjs +0 -174
  91. package/dist/lib/browser/artifact-YWAB5JJL.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-672NU6IC.mjs +0 -8
  93. package/dist/lib/browser/chunk-672NU6IC.mjs.map +0 -7
  94. package/dist/lib/browser/chunk-RGPTBDH7.mjs +0 -41
  95. package/dist/lib/browser/chunk-RGPTBDH7.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-VYBCAEUF.mjs.map +0 -7
  97. package/dist/lib/browser/intent-resolver-BKKGQ5TJ.mjs +0 -28
  98. package/dist/lib/browser/intent-resolver-BKKGQ5TJ.mjs.map +0 -7
  99. package/dist/lib/browser/react-surface-Y7XMQYOV.mjs +0 -42
  100. package/dist/lib/browser/react-surface-Y7XMQYOV.mjs.map +0 -7
  101. package/dist/lib/node/ChessContainer-CMYJDMSG.cjs +0 -108
  102. package/dist/lib/node/ChessContainer-CMYJDMSG.cjs.map +0 -7
  103. package/dist/lib/node/artifact-YWL3LBIO.cjs +0 -189
  104. package/dist/lib/node/artifact-YWL3LBIO.cjs.map +0 -7
  105. package/dist/lib/node/chunk-J5YKJRP3.cjs.map +0 -7
  106. package/dist/lib/node/chunk-TEZPML34.cjs.map +0 -7
  107. package/dist/lib/node/chunk-YTD6SK5V.cjs +0 -73
  108. package/dist/lib/node/chunk-YTD6SK5V.cjs.map +0 -7
  109. package/dist/lib/node/intent-resolver-OIFDW46S.cjs.map +0 -7
  110. package/dist/lib/node/react-surface-35CG6JQF.cjs +0 -62
  111. package/dist/lib/node/react-surface-35CG6JQF.cjs.map +0 -7
  112. package/dist/lib/node-esm/ChessContainer-WV2CO5WO.mjs +0 -87
  113. package/dist/lib/node-esm/ChessContainer-WV2CO5WO.mjs.map +0 -7
  114. package/dist/lib/node-esm/artifact-B6IEF7U5.mjs +0 -175
  115. package/dist/lib/node-esm/artifact-B6IEF7U5.mjs.map +0 -7
  116. package/dist/lib/node-esm/chunk-GJW6TXCL.mjs +0 -43
  117. package/dist/lib/node-esm/chunk-GJW6TXCL.mjs.map +0 -7
  118. package/dist/lib/node-esm/chunk-TXUWVQWY.mjs.map +0 -7
  119. package/dist/lib/node-esm/chunk-YXXJHXSV.mjs +0 -10
  120. package/dist/lib/node-esm/chunk-YXXJHXSV.mjs.map +0 -7
  121. package/dist/lib/node-esm/intent-resolver-35HIBBYC.mjs.map +0 -7
  122. package/dist/lib/node-esm/react-surface-4FNRAFRL.mjs +0 -43
  123. package/dist/lib/node-esm/react-surface-4FNRAFRL.mjs.map +0 -7
  124. package/dist/types/src/capabilities/artifact.d.ts +0 -11
  125. package/dist/types/src/capabilities/artifact.d.ts.map +0 -1
  126. package/dist/types/src/components/ChessComponent.d.ts +0 -6
  127. package/dist/types/src/components/ChessComponent.d.ts.map +0 -1
  128. package/dist/types/src/components/ChessPanel.d.ts +0 -11
  129. package/dist/types/src/components/ChessPanel.d.ts.map +0 -1
  130. package/dist/types/src/components/Chessboard.stories.d.ts +0 -8
  131. package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
  132. package/dist/types/src/components/PlayerSelector.d.ts +0 -8
  133. package/dist/types/src/components/PlayerSelector.d.ts.map +0 -1
  134. package/src/capabilities/artifact.ts +0 -109
  135. package/src/components/ChessComponent.tsx +0 -48
  136. package/src/components/ChessPanel.tsx +0 -67
  137. package/src/components/Chessboard.stories.tsx +0 -39
@@ -5,7 +5,7 @@ var MoveSchema = S.mutable(S.partial(S.Struct({
5
5
  target: S.String,
6
6
  piece: S.String
7
7
  })));
8
- var ChessType = class extends TypedObject({
8
+ var GameType = class extends TypedObject({
9
9
  typename: "dxos.org/type/Chess",
10
10
  version: "0.1.0"
11
11
  })({
@@ -13,16 +13,14 @@ var ChessType = class extends TypedObject({
13
13
  playerWhite: S.String,
14
14
  playerBlack: S.String,
15
15
  moves: S.mutable(S.Array(S.String)),
16
- // TODO(wittjosiah): Remove. Redundant with moves.
17
- pgn: S.String,
18
- fen: S.String
16
+ pgn: S.String
19
17
  }, {
20
18
  partial: true
21
19
  }) {
22
20
  };
23
21
 
24
22
  // packages/plugins/plugin-chess/src/types/types.ts
25
- import { isInstanceOf, S as S2 } from "@dxos/echo-schema";
23
+ import { S as S2 } from "@dxos/echo-schema";
26
24
  import { isReactiveObject } from "@dxos/live-object";
27
25
 
28
26
  // packages/plugins/plugin-chess/src/meta.ts
@@ -41,26 +39,25 @@ var ChessAction;
41
39
  const CHESS_ACTION = `${CHESS_PLUGIN}/action`;
42
40
  class Create extends S2.TaggedClass()(`${CHESS_ACTION}/create`, {
43
41
  input: S2.Struct({
44
- name: S2.optional(S2.String),
45
- fen: S2.optional(S2.String)
42
+ name: S2.optional(S2.String)
46
43
  }),
47
44
  output: S2.Struct({
48
- object: ChessType
45
+ object: GameType
49
46
  })
50
47
  }) {
51
48
  }
52
49
  ChessAction2.Create = Create;
53
50
  })(ChessAction || (ChessAction = {}));
54
51
  var isObject = (object) => {
55
- return isReactiveObject(object) && isInstanceOf(ChessType, object);
52
+ return isReactiveObject(object) && object instanceof GameType;
56
53
  };
57
54
 
58
55
  export {
59
56
  MoveSchema,
60
- ChessType,
57
+ GameType,
61
58
  CHESS_PLUGIN,
62
59
  meta,
63
60
  ChessAction,
64
61
  isObject
65
62
  };
66
- //# sourceMappingURL=chunk-VYBCAEUF.mjs.map
63
+ //# sourceMappingURL=chunk-VHSLLEH3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts", "../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\nexport const MoveSchema = S.mutable(\n S.partial(\n S.Struct({\n source: S.String,\n target: S.String,\n piece: S.String,\n }),\n ),\n);\n\nexport class GameType extends TypedObject({ typename: 'dxos.org/type/Chess', version: '0.1.0' })(\n {\n name: S.optional(S.String),\n playerWhite: S.String,\n playerBlack: S.String,\n moves: S.mutable(S.Array(S.String)),\n pgn: S.String,\n },\n { partial: true },\n) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { S } from '@dxos/echo-schema';\nimport { isReactiveObject } from '@dxos/live-object';\n\nimport { GameType } from './schema';\nimport { CHESS_PLUGIN } from '../meta';\n\nexport namespace ChessAction {\n const CHESS_ACTION = `${CHESS_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${CHESS_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n }),\n output: S.Struct({\n object: GameType,\n }),\n }) {}\n}\n\nexport const isObject = (object: unknown): object is GameType => {\n return isReactiveObject(object) && object instanceof GameType;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CHESS_PLUGIN = 'dxos.org/plugin/chess';\n\nexport const meta = {\n id: CHESS_PLUGIN,\n name: 'Chess',\n description: 'Play chess.',\n icon: 'ph--shield-chevron--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAIA,SAASA,GAAGC,mBAAmB;AAExB,IAAMC,aAAaC,EAAEC,QAC1BD,EAAEE,QACAF,EAAEG,OAAO;EACPC,QAAQJ,EAAEK;EACVC,QAAQN,EAAEK;EACVE,OAAOP,EAAEK;AACX,CAAA,CAAA,CAAA;AAIG,IAAMG,WAAN,cAAuBC,YAAY;EAAEC,UAAU;EAAuBC,SAAS;AAAQ,CAAA,EAC5F;EACEC,MAAMZ,EAAEa,SAASb,EAAEK,MAAM;EACzBS,aAAad,EAAEK;EACfU,aAAaf,EAAEK;EACfW,OAAOhB,EAAEC,QAAQD,EAAEiB,MAAMjB,EAAEK,MAAM,CAAA;EACjCa,KAAKlB,EAAEK;AACT,GACA;EAAEH,SAAS;AAAK,CAAA,EAAA;AACf;;;ACrBH,SAASiB,KAAAA,UAAS;AAClB,SAASC,wBAAwB;;;ACC1B,IAAMC,eAAe;AAErB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;AACV;;;;UDJiBC,cAAAA;AACf,QAAMC,eAAe,GAAGC,YAAAA;EAEjB,MAAMC,eAAeC,GAAEC,YAAW,EAAW,GAAGJ,YAAAA,WAAuB;IAC5EK,OAAOF,GAAEG,OAAO;MACdC,MAAMJ,GAAEK,SAASL,GAAEM,MAAM;IAC3B,CAAA;IACAC,QAAQP,GAAEG,OAAO;MACfK,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;eAPSV,SAAAA;AAQf,GAXiBH,gBAAAA,cAAAA,CAAAA,EAAAA;AAaV,IAAMc,WAAW,CAACF,WAAAA;AACvB,SAAOG,iBAAiBH,MAAAA,KAAWA,kBAAkBC;AACvD;",
6
+ "names": ["S", "TypedObject", "MoveSchema", "S", "mutable", "partial", "Struct", "source", "String", "target", "piece", "GameType", "TypedObject", "typename", "version", "name", "optional", "playerWhite", "playerBlack", "moves", "Array", "pgn", "S", "isReactiveObject", "CHESS_PLUGIN", "meta", "id", "name", "description", "icon", "source", "ChessAction", "CHESS_ACTION", "CHESS_PLUGIN", "Create", "S", "TaggedClass", "input", "Struct", "name", "optional", "String", "output", "object", "GameType", "isObject", "isReactiveObject"]
7
+ }
@@ -1,31 +1,24 @@
1
- import {
2
- ChessContainer
3
- } from "./chunk-672NU6IC.mjs";
4
1
  import {
5
2
  CHESS_PLUGIN,
6
3
  ChessAction,
7
- ChessType,
4
+ GameType,
8
5
  meta
9
- } from "./chunk-VYBCAEUF.mjs";
10
- import {
11
- ChessComponent
12
- } from "./chunk-RGPTBDH7.mjs";
13
-
14
- // packages/plugins/plugin-chess/src/capabilities/index.ts
15
- import { lazy } from "@dxos/app-framework";
16
- var Artifact = lazy(() => import("./artifact-YWAB5JJL.mjs"));
17
- var IntentResolver = lazy(() => import("./intent-resolver-BKKGQ5TJ.mjs"));
18
- var ReactSurface = lazy(() => import("./react-surface-Y7XMQYOV.mjs"));
6
+ } from "./chunk-VHSLLEH3.mjs";
19
7
 
20
8
  // packages/plugins/plugin-chess/src/ChessPlugin.tsx
21
- import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
9
+ import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events, oneOf } from "@dxos/app-framework";
22
10
  import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
23
11
 
12
+ // packages/plugins/plugin-chess/src/capabilities/index.ts
13
+ import { lazy } from "@dxos/app-framework";
14
+ var IntentResolver = lazy(() => import("./intent-resolver-FUAOSHHX.mjs"));
15
+ var ReactSurface = lazy(() => import("./react-surface-63EO2PZO.mjs"));
16
+
24
17
  // packages/plugins/plugin-chess/src/translations.ts
25
18
  var translations_default = [
26
19
  {
27
20
  "en-US": {
28
- [ChessType.typename]: {
21
+ [GameType.typename]: {
29
22
  "typename label": "Game"
30
23
  },
31
24
  [CHESS_PLUGIN]: {
@@ -47,9 +40,9 @@ var ChessPlugin = () => definePlugin(meta, [
47
40
  }),
48
41
  defineModule({
49
42
  id: `${meta.id}/module/metadata`,
50
- activatesOn: Events.SetupMetadata,
43
+ activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
51
44
  activate: () => contributes(Capabilities.Metadata, {
52
- id: ChessType.typename,
45
+ id: GameType.typename,
53
46
  metadata: {
54
47
  createObject: (props) => createIntent(ChessAction.Create, props),
55
48
  placeholder: [
@@ -64,35 +57,25 @@ var ChessPlugin = () => definePlugin(meta, [
64
57
  }),
65
58
  defineModule({
66
59
  id: `${meta.id}/module/schema`,
67
- activatesOn: ClientEvents.SetupSchema,
60
+ activatesOn: ClientEvents.SetupClient,
68
61
  activate: () => contributes(ClientCapabilities.Schema, [
69
- ChessType
62
+ GameType
70
63
  ])
71
64
  }),
72
65
  defineModule({
73
66
  id: `${meta.id}/module/react-surface`,
74
- activatesOn: Events.SetupSurfaces,
67
+ activatesOn: Events.Startup,
75
68
  activate: ReactSurface
76
69
  }),
77
70
  defineModule({
78
71
  id: `${meta.id}/module/intent-resolver`,
79
- activatesOn: Events.SetupIntents,
80
- activate: IntentResolver
81
- }),
82
- defineModule({
83
- id: `${meta.id}/module/artifact`,
84
72
  activatesOn: Events.Startup,
85
- activate: Artifact
73
+ activate: IntentResolver
86
74
  })
87
75
  ]);
88
76
  export {
89
- Artifact,
90
77
  CHESS_PLUGIN,
91
- ChessComponent,
92
- ChessContainer,
93
78
  ChessPlugin,
94
- IntentResolver,
95
- ReactSurface,
96
79
  meta
97
80
  };
98
81
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 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 { 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"]
3
+ "sources": ["../../../src/ChessPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\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 { 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: oneOf(Events.Startup, Events.SetupAppGraph),\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.SetupClient,\n activate: () => contributes(ClientCapabilities.Schema, [GameType]),\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 ]);\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,SACEA,cACAC,aACAC,cACAC,cACAC,cACAC,QACAC,aACK;AACP,SAASC,oBAAoBC,oBAAoB;;;ACTjD,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACA9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,SAASC,QAAQ,GAAG;QACnB,kBAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;AFAK,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,SAASC;MACbC,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;KAAS;EACnE,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;CACD;",
6
+ "names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "oneOf", "ClientCapabilities", "ClientEvents", "lazy", "IntentResolver", "lazy", "ReactSurface", "GameType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "GameType", "typename", "metadata", "createObject", "props", "createIntent", "ChessAction", "Create", "placeholder", "ns", "CHESS_PLUGIN", "icon", "ClientEvents", "SetupClient", "ClientCapabilities", "Schema", "ReactSurface", "IntentResolver"]
7
7
  }
@@ -0,0 +1,19 @@
1
+ import {
2
+ ChessAction,
3
+ GameType
4
+ } from "./chunk-VHSLLEH3.mjs";
5
+
6
+ // packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
7
+ import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
8
+ import { create } from "@dxos/live-object";
9
+ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver(ChessAction.Create, ({ name }) => ({
10
+ data: {
11
+ object: create(GameType, {
12
+ name
13
+ })
14
+ }
15
+ })));
16
+ export {
17
+ intent_resolver_default as default
18
+ };
19
+ //# sourceMappingURL=intent-resolver-FUAOSHHX.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 { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { ChessAction, GameType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver(ChessAction.Create, ({ name }) => ({\n data: {\n object: create(GameType, { name }),\n },\n })),\n );\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAeC,YAAYC,QAAQ,CAAC,EAAEC,KAAI,OAAQ;EAChDC,MAAM;IACJC,QAAQC,OAAOC,UAAU;MAAEJ;IAAK,CAAA;EAClC;AACF,EAAA,CAAA;",
6
+ "names": ["Capabilities", "contributes", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "ChessAction", "Create", "name", "data", "object", "create", "GameType"]
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":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
+ {"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":1411,"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":1974,"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/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":15769,"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-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":14027,"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":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":6788,"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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4360},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VHSLLEH3.mjs","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/browser/intent-resolver-FUAOSHHX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-63EO2PZO.mjs","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":1355},"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":2266},"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-VHSLLEH3.mjs","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/browser/intent-resolver-FUAOSHHX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":978},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-FUAOSHHX.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VHSLLEH3.mjs","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":323}},"bytes":562},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-JYXOZIDK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":47068},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-JYXOZIDK.mjs":{"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":"@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":"@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-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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":495},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytesInOutput":3989},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":2364},"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/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":33320},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-63EO2PZO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1559},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-63EO2PZO.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VHSLLEH3.mjs","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/browser/ChessContainer-JYXOZIDK.mjs","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/browser/chunk-VHSLLEH3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3210},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VHSLLEH3.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","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":247}},"bytes":1573}}}
@@ -0,0 +1,30 @@
1
+ import {
2
+ CHESS_PLUGIN,
3
+ isObject
4
+ } from "./chunk-VHSLLEH3.mjs";
5
+
6
+ // packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
7
+ import React from "react";
8
+ import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
9
+
10
+ // packages/plugins/plugin-chess/src/components/index.ts
11
+ import { lazy } from "react";
12
+ var ChessContainer = lazy(() => import("./ChessContainer-JYXOZIDK.mjs"));
13
+
14
+ // packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
15
+ var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
16
+ id: CHESS_PLUGIN,
17
+ role: [
18
+ "article",
19
+ "section"
20
+ ],
21
+ filter: (data) => isObject(data.subject),
22
+ component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessContainer, {
23
+ game: data.subject,
24
+ role
25
+ })
26
+ }));
27
+ export {
28
+ react_surface_default as default
29
+ };
30
+ //# sourceMappingURL=react-surface-63EO2PZO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\n\nimport { ChessContainer } from '../components';\nimport { CHESS_PLUGIN } from '../meta';\nimport { isObject, type GameType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: CHESS_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: GameType } => isObject(data.subject),\n component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,\n }),\n );\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const ChessContainer = lazy(() => import('./ChessContainer'));\n"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;;;ACFzD,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,+BAAA,CAAA;;;ADMhD,IAAA,wBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC;EACJC,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SAAwCC,SAASD,KAAKE,OAAO;EACtEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,sBAAA,cAACM,gBAAAA;IAAeC,MAAML,KAAKE;IAASJ;;AACrE,CAAA,CAAA;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "lazy", "ChessContainer", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game"]
7
+ }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ChessAction,
3
- ChessType,
3
+ GameType,
4
4
  MoveSchema,
5
5
  isObject
6
- } from "../chunk-VYBCAEUF.mjs";
6
+ } from "../chunk-VHSLLEH3.mjs";
7
7
  export {
8
8
  ChessAction,
9
- ChessType,
9
+ GameType,
10
10
  MoveSchema,
11
11
  isObject
12
12
  };