@dxos/plugin-chess 0.8.4-main.fd6878d → 0.8.4-main.fffef41

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 (122) hide show
  1. package/dist/lib/browser/{ChessboardContainer-NNIOQIRP.mjs → ChessboardContainer-5YXEM4VR.mjs} +29 -23
  2. package/dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs.map +7 -0
  3. package/dist/lib/browser/blueprint-definition-FD4TL5EE.mjs +11 -0
  4. package/dist/lib/browser/blueprint-definition-FD4TL5EE.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-5DOZV3PW.mjs +294 -0
  6. package/dist/lib/browser/chunk-5DOZV3PW.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-PE3IWOFR.mjs → chunk-DUO4WTAM.mjs} +5 -5
  8. package/dist/lib/browser/chunk-DUO4WTAM.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-OBJAHY6H.mjs → chunk-FBLAVAMY.mjs} +17 -12
  10. package/dist/lib/browser/chunk-FBLAVAMY.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-PPBBLHAC.mjs → chunk-Q5TZCIH7.mjs} +2 -2
  12. package/dist/lib/browser/chunk-TIIGNOGK.mjs +169 -0
  13. package/dist/lib/browser/chunk-TIIGNOGK.mjs.map +7 -0
  14. package/dist/lib/browser/index.mjs +27 -19
  15. package/dist/lib/browser/index.mjs.map +3 -3
  16. package/dist/lib/browser/{intent-resolver-JWKKRNGG.mjs → intent-resolver-GXZN2EBT.mjs} +5 -5
  17. package/dist/lib/browser/{intent-resolver-JWKKRNGG.mjs.map → intent-resolver-GXZN2EBT.mjs.map} +1 -1
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/{react-surface-RIXD6RTS.mjs → react-surface-KTTAUHAA.mjs} +7 -7
  20. package/dist/lib/browser/{react-surface-RIXD6RTS.mjs.map → react-surface-KTTAUHAA.mjs.map} +1 -1
  21. package/dist/lib/browser/types/index.mjs +2 -2
  22. package/dist/lib/node-esm/{ChessboardContainer-FCPUV2T2.mjs → ChessboardContainer-7OQ6TOKB.mjs} +29 -23
  23. package/dist/lib/node-esm/ChessboardContainer-7OQ6TOKB.mjs.map +7 -0
  24. package/dist/lib/node-esm/blueprint-definition-O7ZM3HUF.mjs +12 -0
  25. package/dist/lib/node-esm/blueprint-definition-O7ZM3HUF.mjs.map +7 -0
  26. package/dist/lib/node-esm/chunk-F4C2HVZL.mjs +295 -0
  27. package/dist/lib/node-esm/chunk-F4C2HVZL.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-6OWCPDUA.mjs → chunk-KNOOJFIR.mjs} +5 -5
  29. package/dist/lib/node-esm/chunk-KNOOJFIR.mjs.map +7 -0
  30. package/dist/lib/node-esm/{chunk-LCCUF5X5.mjs → chunk-MP3A3AGA.mjs} +17 -12
  31. package/dist/lib/node-esm/chunk-MP3A3AGA.mjs.map +7 -0
  32. package/dist/lib/node-esm/chunk-RTCAAOLF.mjs +170 -0
  33. package/dist/lib/node-esm/chunk-RTCAAOLF.mjs.map +7 -0
  34. package/dist/lib/node-esm/{chunk-42EKKMOO.mjs → chunk-VVXTAVIS.mjs} +2 -2
  35. package/dist/lib/node-esm/index.mjs +27 -19
  36. package/dist/lib/node-esm/index.mjs.map +3 -3
  37. package/dist/lib/node-esm/{intent-resolver-G6XJAW6C.mjs → intent-resolver-HK5L6P6Z.mjs} +5 -5
  38. package/dist/lib/node-esm/{intent-resolver-G6XJAW6C.mjs.map → intent-resolver-HK5L6P6Z.mjs.map} +1 -1
  39. package/dist/lib/node-esm/meta.json +1 -1
  40. package/dist/lib/node-esm/{react-surface-GGRDWZJT.mjs → react-surface-VO4PSY6O.mjs} +7 -7
  41. package/dist/lib/node-esm/{react-surface-GGRDWZJT.mjs.map → react-surface-VO4PSY6O.mjs.map} +1 -1
  42. package/dist/lib/node-esm/types/index.mjs +2 -2
  43. package/dist/types/src/ChessPlugin.d.ts +1 -1
  44. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -1
  47. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  48. package/dist/types/src/capabilities/index.d.ts +3 -2
  49. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  50. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  52. package/dist/types/src/components/Card.stories.d.ts +14 -41
  53. package/dist/types/src/components/Card.stories.d.ts.map +1 -1
  54. package/dist/types/src/components/Chessboard.d.ts +19 -13
  55. package/dist/types/src/components/Chessboard.d.ts.map +1 -1
  56. package/dist/types/src/components/Chessboard.stories.d.ts +41 -39
  57. package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/ChessboardArticle.d.ts +2 -1
  59. package/dist/types/src/components/ChessboardArticle.d.ts.map +1 -1
  60. package/dist/types/src/components/{ChessboardInfo.d.ts → Info.d.ts} +7 -6
  61. package/dist/types/src/components/Info.d.ts.map +1 -0
  62. package/dist/types/src/functions/create.d.ts +14 -0
  63. package/dist/types/src/functions/create.d.ts.map +1 -0
  64. package/dist/types/src/functions/index.d.ts +1 -0
  65. package/dist/types/src/functions/index.d.ts.map +1 -1
  66. package/dist/types/src/functions/move.d.ts +3 -1
  67. package/dist/types/src/functions/move.d.ts.map +1 -1
  68. package/dist/types/src/functions/play.d.ts +2 -1
  69. package/dist/types/src/functions/play.d.ts.map +1 -1
  70. package/dist/types/src/meta.d.ts +0 -1
  71. package/dist/types/src/meta.d.ts.map +1 -1
  72. package/dist/types/src/translations.d.ts +8 -6
  73. package/dist/types/src/translations.d.ts.map +1 -1
  74. package/dist/types/src/types/Chess.d.ts +8 -5
  75. package/dist/types/src/types/Chess.d.ts.map +1 -1
  76. package/dist/types/src/types/ChessAction.d.ts +3 -2
  77. package/dist/types/src/types/ChessAction.d.ts.map +1 -1
  78. package/dist/types/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +42 -35
  80. package/src/ChessPlugin.tsx +47 -46
  81. package/src/capabilities/artifact-definition.ts +3 -2
  82. package/src/capabilities/blueprint-definition.ts +9 -7
  83. package/src/capabilities/index.ts +2 -0
  84. package/src/components/Card.stories.tsx +13 -15
  85. package/src/components/Chessboard.stories.tsx +13 -14
  86. package/src/components/Chessboard.tsx +104 -28
  87. package/src/components/ChessboardArticle.tsx +32 -21
  88. package/src/components/ChessboardContainer.tsx +1 -1
  89. package/src/components/Info.tsx +236 -0
  90. package/src/functions/create.ts +32 -0
  91. package/src/functions/index.ts +1 -0
  92. package/src/functions/move.ts +16 -14
  93. package/src/functions/play.ts +25 -15
  94. package/src/meta.ts +4 -4
  95. package/src/translations.ts +8 -6
  96. package/src/types/Chess.ts +23 -19
  97. package/src/types/ChessAction.ts +1 -1
  98. package/dist/lib/browser/ChessboardContainer-NNIOQIRP.mjs.map +0 -7
  99. package/dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs +0 -38
  100. package/dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-2W3S5N6C.mjs +0 -257
  102. package/dist/lib/browser/chunk-2W3S5N6C.mjs.map +0 -7
  103. package/dist/lib/browser/chunk-EJMPHRSR.mjs +0 -94
  104. package/dist/lib/browser/chunk-EJMPHRSR.mjs.map +0 -7
  105. package/dist/lib/browser/chunk-OBJAHY6H.mjs.map +0 -7
  106. package/dist/lib/browser/chunk-PE3IWOFR.mjs.map +0 -7
  107. package/dist/lib/node-esm/ChessboardContainer-FCPUV2T2.mjs.map +0 -7
  108. package/dist/lib/node-esm/blueprint-definition-F5SGHCDA.mjs +0 -39
  109. package/dist/lib/node-esm/blueprint-definition-F5SGHCDA.mjs.map +0 -7
  110. package/dist/lib/node-esm/chunk-5APYXPBX.mjs +0 -95
  111. package/dist/lib/node-esm/chunk-5APYXPBX.mjs.map +0 -7
  112. package/dist/lib/node-esm/chunk-6OWCPDUA.mjs.map +0 -7
  113. package/dist/lib/node-esm/chunk-LCCUF5X5.mjs.map +0 -7
  114. package/dist/lib/node-esm/chunk-QAGOXJGH.mjs +0 -258
  115. package/dist/lib/node-esm/chunk-QAGOXJGH.mjs.map +0 -7
  116. package/dist/types/src/components/ChessboardInfo.d.ts.map +0 -1
  117. package/dist/types/src/components/ChessboardPlayers.d.ts +0 -8
  118. package/dist/types/src/components/ChessboardPlayers.d.ts.map +0 -1
  119. package/src/components/ChessboardInfo.tsx +0 -140
  120. package/src/components/ChessboardPlayers.tsx +0 -97
  121. /package/dist/lib/browser/{chunk-PPBBLHAC.mjs.map → chunk-Q5TZCIH7.mjs.map} +0 -0
  122. /package/dist/lib/node-esm/{chunk-42EKKMOO.mjs.map → chunk-VVXTAVIS.mjs.map} +0 -0
@@ -0,0 +1,169 @@
1
+ import {
2
+ Chess_exports
3
+ } from "./chunk-FBLAVAMY.mjs";
4
+
5
+ // src/capabilities/blueprint-definition.ts
6
+ import { Capabilities, contributes } from "@dxos/app-framework";
7
+ import { Blueprint, Template } from "@dxos/blueprints";
8
+ import { trim } from "@dxos/util";
9
+
10
+ // src/functions/create.ts
11
+ import * as Effect from "effect/Effect";
12
+ import * as Schema from "effect/Schema";
13
+ import { DatabaseService, defineFunction } from "@dxos/functions";
14
+ var create_default = defineFunction({
15
+ key: "dxos.org/function/chess/create",
16
+ name: "Create Chess",
17
+ description: "Creates a new chess game.",
18
+ inputSchema: Schema.Struct({
19
+ pgn: Schema.optional(Schema.String.annotations({
20
+ description: "Portable Game Notation."
21
+ })),
22
+ fen: Schema.optional(Schema.String.annotations({
23
+ description: "Forsyth-Edwards Notation."
24
+ }))
25
+ }),
26
+ outputSchema: Chess_exports.Game,
27
+ handler: Effect.fn(function* ({ data: { pgn, fen } }) {
28
+ return yield* DatabaseService.add(Chess_exports.makeGame({
29
+ pgn,
30
+ fen
31
+ }));
32
+ })
33
+ });
34
+
35
+ // src/functions/move.ts
36
+ import { Chess as ChessJS } from "chess.js";
37
+ import * as Effect2 from "effect/Effect";
38
+ import * as Schema2 from "effect/Schema";
39
+ import { ArtifactId } from "@dxos/assistant";
40
+ import { DatabaseService as DatabaseService2, defineFunction as defineFunction2 } from "@dxos/functions";
41
+ var move_default = defineFunction2({
42
+ key: "dxos.org/function/chess/move",
43
+ name: "Move",
44
+ description: "Makes a move in the given chess game.",
45
+ inputSchema: Schema2.Struct({
46
+ id: ArtifactId.annotations({
47
+ description: "The ID of the chess object."
48
+ }),
49
+ move: Schema2.String.annotations({
50
+ description: "The move to make in the chess game.",
51
+ examples: [
52
+ "e4",
53
+ "Bf3"
54
+ ]
55
+ })
56
+ }),
57
+ outputSchema: Schema2.Struct({
58
+ pgn: Schema2.String.annotations({
59
+ description: "The PGN of the game after the move was played."
60
+ })
61
+ }),
62
+ handler: Effect2.fn(function* ({ data: { id, move } }) {
63
+ const object = yield* DatabaseService2.resolve(ArtifactId.toDXN(id), Chess_exports.Game);
64
+ const chess = new ChessJS();
65
+ if (object.pgn) {
66
+ chess.loadPgn(object.pgn);
67
+ } else if (object.fen) {
68
+ chess.load(object.fen);
69
+ }
70
+ chess.move(move, {
71
+ strict: false
72
+ });
73
+ object.pgn = chess.pgn();
74
+ return {
75
+ pgn: object.pgn
76
+ };
77
+ })
78
+ });
79
+
80
+ // src/functions/play.ts
81
+ import { Chess as ChessJS2 } from "chess.js";
82
+ import * as Effect3 from "effect/Effect";
83
+ import * as Schema3 from "effect/Schema";
84
+ import { ArtifactId as ArtifactId2 } from "@dxos/assistant";
85
+ import { DatabaseService as DatabaseService3, defineFunction as defineFunction3 } from "@dxos/functions";
86
+ var play_default = defineFunction3({
87
+ key: "dxos.org/function/chess/play",
88
+ name: "Play",
89
+ description: "Uses the chess engine to play the next move.",
90
+ inputSchema: Schema3.Struct({
91
+ id: ArtifactId2.annotations({
92
+ description: "The ID of the chess object."
93
+ }),
94
+ side: Schema3.optional(Schema3.Literal("white", "black", "any")).annotations({
95
+ description: "The side to play.",
96
+ defaultValue: "any"
97
+ })
98
+ }),
99
+ outputSchema: Schema3.Struct({
100
+ pgn: Schema3.String.annotations({
101
+ description: "The PGN of the game after the move was played."
102
+ }),
103
+ move: Schema3.optional(Schema3.String).annotations({
104
+ description: "The move that was played."
105
+ })
106
+ }),
107
+ handler: Effect3.fn(function* ({ data: { id, side = "any" } }) {
108
+ const object = yield* DatabaseService3.resolve(ArtifactId2.toDXN(id), Chess_exports.Game);
109
+ const chess = new ChessJS2();
110
+ if (object.pgn) {
111
+ chess.loadPgn(object.pgn);
112
+ } else if (object.fen) {
113
+ chess.load(object.fen);
114
+ }
115
+ if (!(side === "any" || chess.turn() === "w" && side === "white" || chess.turn() === "b" && side === "black")) {
116
+ return {
117
+ move: void 0,
118
+ pgn: object.pgn
119
+ };
120
+ }
121
+ const moves = chess.moves();
122
+ const move = moves[Math.floor(Math.random() * moves.length)];
123
+ chess.move(move, {
124
+ strict: false
125
+ });
126
+ object.pgn = chess.pgn();
127
+ return {
128
+ move,
129
+ pgn: object.pgn
130
+ };
131
+ })
132
+ });
133
+
134
+ // src/capabilities/blueprint-definition.ts
135
+ var functions = [
136
+ create_default,
137
+ move_default,
138
+ play_default
139
+ ];
140
+ var CHESS_BLUEPRINT_KEY = "dxos.org/blueprint/chess";
141
+ var blueprint_definition_default = (() => {
142
+ return [
143
+ contributes(Capabilities.Functions, functions),
144
+ contributes(Capabilities.BlueprintDefinition, Blueprint.make({
145
+ key: CHESS_BLUEPRINT_KEY,
146
+ name: "Chess",
147
+ tools: Blueprint.toolDefinitions({
148
+ functions
149
+ }),
150
+ instructions: Template.make({
151
+ source: trim`
152
+ You are an expert chess player.
153
+ To analyze a game you can access the "pgn" property by loading the context object that represents the current game.
154
+ You could suggest a good next move or offer to play a move.
155
+ Don't actually make a move unless you are asked to.
156
+ `
157
+ })
158
+ }))
159
+ ];
160
+ });
161
+
162
+ export {
163
+ create_default,
164
+ move_default,
165
+ play_default,
166
+ CHESS_BLUEPRINT_KEY,
167
+ blueprint_definition_default
168
+ };
169
+ //# sourceMappingURL=chunk-TIIGNOGK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/blueprint-definition.ts", "../../../src/functions/create.ts", "../../../src/functions/move.ts", "../../../src/functions/play.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { type FunctionDefinition } from '@dxos/functions';\nimport { trim } from '@dxos/util';\n\nimport { create, move, play } from '../functions';\n\nconst functions: FunctionDefinition[] = [create, move, play];\n\nexport const CHESS_BLUEPRINT_KEY = 'dxos.org/blueprint/chess';\n\nexport default () => {\n return [\n contributes(Capabilities.Functions, functions),\n contributes(\n Capabilities.BlueprintDefinition,\n Blueprint.make({\n key: CHESS_BLUEPRINT_KEY,\n name: 'Chess',\n tools: Blueprint.toolDefinitions({ functions }),\n instructions: Template.make({\n source: trim`\n You are an expert chess player.\n To analyze a game you can access the \"pgn\" property by loading the context object that represents the current game.\n You could suggest a good next move or offer to play a move.\n Don't actually make a move unless you are asked to.\n `,\n }),\n }),\n ),\n ];\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { DatabaseService, defineFunction } from '@dxos/functions';\n\nimport { Chess } from '../types';\n\nexport default defineFunction({\n key: 'dxos.org/function/chess/create',\n name: 'Create Chess',\n description: 'Creates a new chess game.',\n inputSchema: Schema.Struct({\n pgn: Schema.optional(\n Schema.String.annotations({\n description: 'Portable Game Notation.',\n }),\n ),\n fen: Schema.optional(\n Schema.String.annotations({\n description: 'Forsyth-Edwards Notation.',\n }),\n ),\n }),\n outputSchema: Chess.Game,\n handler: Effect.fn(function* ({ data: { pgn, fen } }) {\n return yield* DatabaseService.add(Chess.makeGame({ pgn, fen }));\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\n\nimport { Chess } from '../types';\n\nexport default defineFunction({\n key: 'dxos.org/function/chess/move',\n name: 'Move',\n description: 'Makes a move in the given chess game.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the chess object.',\n }),\n move: Schema.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n outputSchema: Schema.Struct({\n pgn: Schema.String.annotations({\n description: 'The PGN of the game after the move was played.',\n }),\n }),\n handler: Effect.fn(function* ({ data: { id, move } }) {\n const object = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Chess.Game);\n const chess = new ChessJS();\n if (object.pgn) {\n chess.loadPgn(object.pgn);\n } else if (object.fen) {\n chess.load(object.fen);\n }\n\n chess.move(move, { strict: false });\n object.pgn = chess.pgn();\n return { pgn: object.pgn };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\n\nimport { Chess } from '../types';\n\nexport default defineFunction({\n key: 'dxos.org/function/chess/play',\n name: 'Play',\n description: 'Uses the chess engine to play the next move.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the chess object.',\n }),\n side: Schema.optional(Schema.Literal('white', 'black', 'any')).annotations({\n description: 'The side to play.',\n defaultValue: 'any',\n }),\n }),\n outputSchema: Schema.Struct({\n pgn: Schema.String.annotations({\n description: 'The PGN of the game after the move was played.',\n }),\n move: Schema.optional(Schema.String).annotations({\n description: 'The move that was played.',\n }),\n }),\n handler: Effect.fn(function* ({ data: { id, side = 'any' } }) {\n const object = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Chess.Game);\n const chess = new ChessJS();\n if (object.pgn) {\n chess.loadPgn(object.pgn);\n } else if (object.fen) {\n chess.load(object.fen);\n }\n\n if (!(side === 'any' || (chess.turn() === 'w' && side === 'white') || (chess.turn() === 'b' && side === 'black'))) {\n return { move: undefined, pgn: object.pgn! };\n }\n\n const moves = chess.moves();\n const move = moves[Math.floor(Math.random() * moves.length)];\n\n chess.move(move, { strict: false });\n object.pgn = chess.pgn();\n return { move, pgn: object.pgn };\n }),\n});\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,WAAWC,gBAAgB;AAEpC,SAASC,YAAY;;;ACHrB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,iBAAiBC,sBAAsB;AAIhD,IAAA,iBAAeC,eAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,cAAO;IACzBC,KAAYC,gBACHC,cAAOC,YAAY;MACxBN,aAAa;IACf,CAAA,CAAA;IAEFO,KAAYH,gBACHC,cAAOC,YAAY;MACxBN,aAAa;IACf,CAAA,CAAA;EAEJ,CAAA;EACAQ,cAAcC,cAAMC;EACpBC,SAAgBC,UAAG,WAAW,EAAEC,MAAM,EAAEV,KAAKI,IAAG,EAAE,GAAE;AAClD,WAAO,OAAOO,gBAAgBC,IAAIN,cAAMO,SAAS;MAAEb;MAAKI;IAAI,CAAA,CAAA;EAC9D,CAAA;AACF,CAAA;;;AC3BA,SAASU,SAASC,eAAe;AACjC,YAAYC,aAAY;AACxB,YAAYC,aAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,mBAAAA,kBAAiBC,kBAAAA,uBAAsB;AAIhD,IAAA,eAAeC,gBAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,eAAO;IACzBC,IAAIC,WAAWC,YAAY;MACzBL,aAAa;IACf,CAAA;IACAM,MAAaC,eAAOF,YAAY;MAC9BL,aAAa;MACbQ,UAAU;QAAC;QAAM;;IACnB,CAAA;EACF,CAAA;EACAC,cAAqBP,eAAO;IAC1BQ,KAAYH,eAAOF,YAAY;MAC7BL,aAAa;IACf,CAAA;EACF,CAAA;EACAW,SAAgBC,WAAG,WAAW,EAAEC,MAAM,EAAEV,IAAIG,KAAI,EAAE,GAAE;AAClD,UAAMQ,SAAS,OAAOC,iBAAgBC,QAAQZ,WAAWa,MAAMd,EAAAA,GAAKe,cAAMC,IAAI;AAC9E,UAAMC,QAAQ,IAAIC,QAAAA;AAClB,QAAIP,OAAOJ,KAAK;AACdU,YAAME,QAAQR,OAAOJ,GAAG;IAC1B,WAAWI,OAAOS,KAAK;AACrBH,YAAMI,KAAKV,OAAOS,GAAG;IACvB;AAEAH,UAAMd,KAAKA,MAAM;MAAEmB,QAAQ;IAAM,CAAA;AACjCX,WAAOJ,MAAMU,MAAMV,IAAG;AACtB,WAAO;MAAEA,KAAKI,OAAOJ;IAAI;EAC3B,CAAA;AACF,CAAA;;;ACxCA,SAASgB,SAASC,gBAAe;AACjC,YAAYC,aAAY;AACxB,YAAYC,aAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,mBAAAA,kBAAiBC,kBAAAA,uBAAsB;AAIhD,IAAA,eAAeC,gBAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,eAAO;IACzBC,IAAIC,YAAWC,YAAY;MACzBL,aAAa;IACf,CAAA;IACAM,MAAaC,iBAAgBC,gBAAQ,SAAS,SAAS,KAAA,CAAA,EAAQH,YAAY;MACzEL,aAAa;MACbS,cAAc;IAChB,CAAA;EACF,CAAA;EACAC,cAAqBR,eAAO;IAC1BS,KAAYC,eAAOP,YAAY;MAC7BL,aAAa;IACf,CAAA;IACAa,MAAaN,iBAAgBK,cAAM,EAAEP,YAAY;MAC/CL,aAAa;IACf,CAAA;EACF,CAAA;EACAc,SAAgBC,WAAG,WAAW,EAAEC,MAAM,EAAEb,IAAIG,OAAO,MAAK,EAAE,GAAE;AAC1D,UAAMW,SAAS,OAAOC,iBAAgBC,QAAQf,YAAWgB,MAAMjB,EAAAA,GAAKkB,cAAMC,IAAI;AAC9E,UAAMC,QAAQ,IAAIC,SAAAA;AAClB,QAAIP,OAAON,KAAK;AACdY,YAAME,QAAQR,OAAON,GAAG;IAC1B,WAAWM,OAAOS,KAAK;AACrBH,YAAMI,KAAKV,OAAOS,GAAG;IACvB;AAEA,QAAI,EAAEpB,SAAS,SAAUiB,MAAMK,KAAI,MAAO,OAAOtB,SAAS,WAAaiB,MAAMK,KAAI,MAAO,OAAOtB,SAAS,UAAW;AACjH,aAAO;QAAEO,MAAMgB;QAAWlB,KAAKM,OAAON;MAAK;IAC7C;AAEA,UAAMmB,QAAQP,MAAMO,MAAK;AACzB,UAAMjB,OAAOiB,MAAMC,KAAKC,MAAMD,KAAKE,OAAM,IAAKH,MAAMI,MAAM,CAAA;AAE1DX,UAAMV,KAAKA,MAAM;MAAEsB,QAAQ;IAAM,CAAA;AACjClB,WAAON,MAAMY,MAAMZ,IAAG;AACtB,WAAO;MAAEE;MAAMF,KAAKM,OAAON;IAAI;EACjC,CAAA;AACF,CAAA;;;AH3CA,IAAMyB,YAAkC;EAACC;EAAQC;EAAMC;;AAEhD,IAAMC,sBAAsB;AAEnC,IAAA,gCAAe,MAAA;AACb,SAAO;IACLC,YAAYC,aAAaC,WAAWP,SAAAA;IACpCK,YACEC,aAAaE,qBACbC,UAAUC,KAAK;MACbC,KAAKP;MACLQ,MAAM;MACNC,OAAOJ,UAAUK,gBAAgB;QAAEd;MAAU,CAAA;MAC7Ce,cAAcC,SAASN,KAAK;QAC1BO,QAAQC;;;;;;MAMV,CAAA;IACF,CAAA,CAAA;;AAGN;",
6
+ "names": ["Capabilities", "contributes", "Blueprint", "Template", "trim", "Effect", "Schema", "DatabaseService", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "pgn", "optional", "String", "annotations", "fen", "outputSchema", "Chess", "Game", "handler", "fn", "data", "DatabaseService", "add", "makeGame", "Chess", "ChessJS", "Effect", "Schema", "ArtifactId", "DatabaseService", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "move", "String", "examples", "outputSchema", "pgn", "handler", "fn", "data", "object", "DatabaseService", "resolve", "toDXN", "Chess", "Game", "chess", "ChessJS", "loadPgn", "fen", "load", "strict", "Chess", "ChessJS", "Effect", "Schema", "ArtifactId", "DatabaseService", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "side", "optional", "Literal", "defaultValue", "outputSchema", "pgn", "String", "move", "handler", "fn", "data", "object", "DatabaseService", "resolve", "toDXN", "Chess", "Game", "chess", "ChessJS", "loadPgn", "fen", "load", "turn", "undefined", "moves", "Math", "floor", "random", "length", "strict", "functions", "create", "move", "play", "CHESS_BLUEPRINT_KEY", "contributes", "Capabilities", "Functions", "BlueprintDefinition", "Blueprint", "make", "key", "name", "tools", "toolDefinitions", "instructions", "Template", "source", "trim"]
7
+ }
@@ -1,28 +1,29 @@
1
1
  import {
2
+ CHESS_BLUEPRINT_KEY,
3
+ create_default,
2
4
  move_default,
3
5
  play_default
4
- } from "./chunk-EJMPHRSR.mjs";
6
+ } from "./chunk-TIIGNOGK.mjs";
5
7
  import {
6
8
  ChessboardContainer
7
- } from "./chunk-PPBBLHAC.mjs";
9
+ } from "./chunk-Q5TZCIH7.mjs";
8
10
  import {
9
11
  ChessAction_exports,
10
12
  Chess_exports
11
- } from "./chunk-OBJAHY6H.mjs";
13
+ } from "./chunk-FBLAVAMY.mjs";
12
14
  import {
13
15
  Chessboard,
14
16
  ExtendedChessModel
15
- } from "./chunk-2W3S5N6C.mjs";
17
+ } from "./chunk-5DOZV3PW.mjs";
16
18
  import {
17
- CHESS_PLUGIN,
18
19
  meta
19
- } from "./chunk-PE3IWOFR.mjs";
20
+ } from "./chunk-DUO4WTAM.mjs";
20
21
 
21
22
  // src/capabilities/index.ts
22
23
  import { lazy } from "@dxos/app-framework";
23
- var BlueprintDefinition = lazy(() => import("./blueprint-definition-OJQYAZGZ.mjs"));
24
- var IntentResolver = lazy(() => import("./intent-resolver-JWKKRNGG.mjs"));
25
- var ReactSurface = lazy(() => import("./react-surface-RIXD6RTS.mjs"));
24
+ var BlueprintDefinition = lazy(() => import("./blueprint-definition-FD4TL5EE.mjs"));
25
+ var IntentResolver = lazy(() => import("./intent-resolver-GXZN2EBT.mjs"));
26
+ var ReactSurface = lazy(() => import("./react-surface-KTTAUHAA.mjs"));
26
27
 
27
28
  // src/ChessPlugin.tsx
28
29
  import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from "@dxos/app-framework";
@@ -41,24 +42,26 @@ var translations = [
41
42
  "typename label_other": "Games",
42
43
  "object name placeholder": "New game",
43
44
  "rename object label": "Rename game",
44
- "delete object label": "Delete game",
45
- "button toggle info": "Toggle info",
46
- "button flip": "Flip board"
45
+ "delete object label": "Delete game"
47
46
  },
48
47
  [meta.id]: {
49
48
  "plugin name": "Chess",
50
49
  "delete game label": "Delete",
51
- "game.checkmate": "Checkmate",
52
- "game.stalemate": "Stalemate",
53
- "game.draw": "Draw",
54
- "game.check": "Check"
50
+ "game.checkmate label": "Checkmate",
51
+ "game.stalemate label": "Stalemate",
52
+ "game.draw label": "Draw",
53
+ "game.check label": "Check",
54
+ "select player button": "Select player",
55
+ "toggle info button": "Toggle info",
56
+ "close info button": "Close info",
57
+ "flip board button": "Flip board"
55
58
  }
56
59
  }
57
60
  }
58
61
  ];
59
62
 
60
63
  // src/ChessPlugin.tsx
61
- var ChessPlugin = () => definePlugin(meta, [
64
+ var ChessPlugin = definePlugin(meta, () => [
62
65
  defineModule({
63
66
  id: `${meta.id}/module/translations`,
64
67
  activatesOn: Events.SetupTranslations,
@@ -70,7 +73,11 @@ var ChessPlugin = () => definePlugin(meta, [
70
73
  activate: () => contributes(Capabilities.Metadata, {
71
74
  id: Chess_exports.Game.typename,
72
75
  metadata: {
73
- icon: "ph--shield-chevron--regular"
76
+ icon: "ph--shield-chevron--regular",
77
+ iconHue: "amber",
78
+ blueprints: [
79
+ CHESS_BLUEPRINT_KEY
80
+ ]
74
81
  }
75
82
  })
76
83
  }),
@@ -100,7 +107,7 @@ var ChessPlugin = () => definePlugin(meta, [
100
107
  ]);
101
108
  export {
102
109
  BlueprintDefinition,
103
- CHESS_PLUGIN,
110
+ CHESS_BLUEPRINT_KEY,
104
111
  Chess_exports as Chess,
105
112
  ChessAction_exports as ChessAction,
106
113
  ChessPlugin,
@@ -109,6 +116,7 @@ export {
109
116
  ExtendedChessModel,
110
117
  IntentResolver,
111
118
  ReactSurface,
119
+ create_default as create,
112
120
  meta,
113
121
  move_default as move,
114
122
  play_default as play
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const BlueprintDefinition = lazy(() => import('./blueprint-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, Events, contributes, createIntent, defineModule, definePlugin } 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 { BlueprintDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { Chess, ChessAction } 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: Chess.Game.typename,\n metadata: {\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: Chess.Game,\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/blueprint`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: BlueprintDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\nimport { Chess } from './types';\n\nexport const translations = [\n {\n 'en-US': {\n [Chess.Game.typename]: {\n 'typename label': 'Game',\n 'typename label_zero': 'Games',\n 'typename label_one': 'Game',\n 'typename label_other': 'Games',\n 'object name placeholder': 'New game',\n 'rename object label': 'Rename game',\n 'delete object label': 'Delete game',\n 'button toggle info': 'Toggle info',\n 'button flip': 'Flip board',\n },\n [meta.id]: {\n 'plugin name': 'Chess',\n 'delete game label': 'Delete',\n 'game.checkmate': 'Checkmate',\n 'game.stalemate': 'Stalemate',\n 'game.draw': 'Draw',\n 'game.check': 'Check',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,sBAAsBC,KAAK,MAAM,OAAO,qCAAA,CAAA;AAC9C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,QAAQC,aAAaC,cAAcC,cAAcC,oBAAoB;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACE1B,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,cAAMC,KAAKC,QAAQ,GAAG;QACrB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;QACvB,sBAAsB;QACtB,eAAe;MACjB;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,qBAAqB;QACrB,kBAAkB;QAClB,kBAAkB;QAClB,aAAa;QACb,cAAc;MAChB;IACF;EACF;;;;ADlBK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,cAAMC,KAAKC;MACfC,UAAU;QACRC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAhB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAae,aAAaC;IAC1Bb,UAAU,MACRC,YACEa,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcV,cAAMC;MACpBU,WAAW,MAAMC,aAAaC,oBAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;EACA1B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOwB;IACpBtB,UAAUuB;EACZ,CAAA;EACA5B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO0B;IACpBxB,UAAUyB;EACZ,CAAA;EACA9B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO4B;IACpB1B,UAAU2B;EACZ,CAAA;CACD;",
6
- "names": ["lazy", "BlueprintDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "Events", "contributes", "createIntent", "defineModule", "definePlugin", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "translations", "Chess", "Game", "typename", "meta", "id", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "Chess", "Game", "typename", "metadata", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "BlueprintDefinition"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const BlueprintDefinition = lazy(() => import('./blueprint-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n\nexport * from './blueprint-definition';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } 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 { BlueprintDefinition, CHESS_BLUEPRINT_KEY, IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { Chess, ChessAction } from './types';\n\nexport const ChessPlugin = 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: Chess.Game.typename,\n metadata: {\n icon: 'ph--shield-chevron--regular',\n iconHue: 'amber',\n blueprints: [CHESS_BLUEPRINT_KEY],\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: Chess.Game,\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/blueprint`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: BlueprintDefinition,\n }),\n]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\nimport { Chess } from './types';\n\nexport const translations = [\n {\n 'en-US': {\n [Chess.Game.typename]: {\n 'typename label': 'Game',\n 'typename label_zero': 'Games',\n 'typename label_one': 'Game',\n 'typename label_other': 'Games',\n 'object name placeholder': 'New game',\n 'rename object label': 'Rename game',\n 'delete object label': 'Delete game',\n },\n [meta.id]: {\n 'plugin name': 'Chess',\n 'delete game label': 'Delete',\n 'game.checkmate label': 'Checkmate',\n 'game.stalemate label': 'Stalemate',\n 'game.draw label': 'Draw',\n 'game.check label': 'Check',\n 'select player button': 'Select player',\n 'toggle info button': 'Toggle info',\n 'close info button': 'Close info',\n 'flip board button': 'Flip board',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,sBAAsBC,KAAK,MAAM,OAAO,qCAAA,CAAA;AAC9C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,QAAQC,aAAaC,cAAcC,cAAcC,oBAAoB;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACE1B,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,cAAMC,KAAKC,QAAQ,GAAG;QACrB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;MACzB;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,wBAAwB;QACxB,mBAAmB;QACnB,oBAAoB;QACpB,wBAAwB;QACxB,sBAAsB;QACtB,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;ADpBK,IAAMC,cAAcC,aAAaC,MAAM,MAAM;EAClDC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,cAAMC,KAAKC;MACfC,UAAU;QACRC,MAAM;QACNC,SAAS;QACTC,YAAY;UAACC;;MACf;IACF,CAAA;EACJ,CAAA;EACAnB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAakB,aAAaC;IAC1BhB,UAAU,MACRC,YACEgB,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcb,cAAMC;MACpBa,WAAW,MAAMC,aAAaC,oBAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,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;EACAjC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO+B;IACpB7B,UAAU8B;EACZ,CAAA;CACD;",
6
+ "names": ["lazy", "BlueprintDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "Events", "contributes", "createIntent", "defineModule", "definePlugin", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "translations", "Chess", "Game", "typename", "meta", "id", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "Chess", "Game", "typename", "metadata", "icon", "iconHue", "blueprints", "CHESS_BLUEPRINT_KEY", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "BlueprintDefinition"]
7
7
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ChessAction_exports,
3
3
  Chess_exports
4
- } from "./chunk-OBJAHY6H.mjs";
5
- import "./chunk-PE3IWOFR.mjs";
4
+ } from "./chunk-FBLAVAMY.mjs";
5
+ import "./chunk-DUO4WTAM.mjs";
6
6
 
7
7
  // src/capabilities/intent-resolver.ts
8
8
  import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
9
- var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
9
+ var intent_resolver_default = (() => contributes(Capabilities.IntentResolver, createResolver({
10
10
  intent: ChessAction_exports.Create,
11
11
  resolve: ({ name, pgn }) => {
12
12
  return {
@@ -18,8 +18,8 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
18
18
  }
19
19
  };
20
20
  }
21
- }));
21
+ })));
22
22
  export {
23
23
  intent_resolver_default as default
24
24
  };
25
- //# sourceMappingURL=intent-resolver-JWKKRNGG.mjs.map
25
+ //# sourceMappingURL=intent-resolver-GXZN2EBT.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\n\nimport { Chess, ChessAction } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ChessAction.Create,\n resolve: ({ name, pgn }) => {\n return {\n data: {\n object: Chess.makeGame({ name, pgn }),\n },\n };\n },\n }),\n );\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,cAAcC,aAAaC,sBAAsB;AAI1D,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,oBAAYC;EACpBC,SAAS,CAAC,EAAEC,MAAMC,IAAG,MAAE;AACrB,WAAO;MACLC,MAAM;QACJC,QAAQC,cAAMC,SAAS;UAAEL;UAAMC;QAAI,CAAA;MACrC;IACF;EACF;AACF,CAAA,CAAA;",
5
+ "mappings": ";;;;;;;AAIA,SAASA,cAAcC,aAAaC,sBAAsB;AAI1D,IAAA,2BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,oBAAYC;EACpBC,SAAS,CAAC,EAAEC,MAAMC,IAAG,MAAE;AACrB,WAAO;MACLC,MAAM;QACJC,QAAQC,cAAMC,SAAS;UAAEL;UAAMC;QAAI,CAAA;MACrC;IACF;EACF;AACF,CAAA,CAAA;",
6
6
  "names": ["Capabilities", "contributes", "createResolver", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ChessAction", "Create", "resolve", "name", "pgn", "data", "object", "Chess", "makeGame"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/types/Chess.ts":{"bytes":4862,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":1853,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/ChessAction.ts":{"bytes":1848,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"}],"format":"esm"},"src/types/index.ts":{"bytes":682,"imports":[{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"},{"path":"src/types/ChessAction.ts","kind":"import-statement","original":"./ChessAction"}],"format":"esm"},"src/functions/move.ts":{"bytes":5095,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/functions/play.ts":{"bytes":5488,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/functions/index.ts":{"bytes":698,"imports":[{"path":"src/functions/move.ts","kind":"import-statement","original":"./move"},{"path":"src/functions/play.ts","kind":"import-statement","original":"./play"}],"format":"esm"},"src/capabilities/blueprint-definition.ts":{"bytes":3613,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/functions/index.ts","kind":"import-statement","original":"../functions"}],"format":"esm"},"src/capabilities/intent-resolver.ts":{"bytes":2113,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/components/ChessboardInfo.tsx":{"bytes":15500,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/ChessboardPlayers.tsx":{"bytes":10855,"imports":[{"path":"@preact-signals/safe-react/tracking","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-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Chessboard.tsx":{"bytes":7781,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/ChessboardInfo.tsx","kind":"import-statement","original":"./ChessboardInfo"},{"path":"src/components/ChessboardPlayers.tsx","kind":"import-statement","original":"./ChessboardPlayers"}],"format":"esm"},"src/components/ChessboardArticle.tsx":{"bytes":6795,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/components/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"src/components/ChessboardContainer.tsx":{"bytes":3657,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"src/components/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"},{"path":"src/components/ChessboardArticle.tsx","kind":"import-statement","original":"./ChessboardArticle"}],"format":"esm"},"src/components/index.ts":{"bytes":877,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"},{"path":"src/components/ChessboardContainer.tsx","kind":"dynamic-import","original":"./ChessboardContainer"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3392,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1322,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/blueprint-definition.ts","kind":"dynamic-import","original":"./blueprint-definition"},{"path":"src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":3101,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/ChessPlugin.tsx":{"bytes":7277,"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":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/index.ts":{"bytes":911,"imports":[{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5549},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-EJMPHRSR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PPBBLHAC.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-OBJAHY6H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-2W3S5N6C.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/intent-resolver-JWKKRNGG.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-surface-RIXD6RTS.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["BlueprintDefinition","CHESS_PLUGIN","Chess","ChessAction","ChessPlugin","Chessboard","ChessboardContainer","ExtendedChessModel","IntentResolver","ReactSurface","meta","move","play"],"entryPoint":"src/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":275},"src/index.ts":{"bytesInOutput":0},"src/ChessPlugin.tsx":{"bytesInOutput":1509},"src/translations.ts":{"bytesInOutput":709}},"bytes":3258},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-OBJAHY6H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"}],"exports":["Chess","ChessAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":222},"dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1825},"dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-EJMPHRSR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-OBJAHY6H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/blueprint-definition.ts","inputs":{"src/capabilities/blueprint-definition.ts":{"bytesInOutput":904}},"bytes":1195},"dist/lib/browser/chunk-EJMPHRSR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5350},"dist/lib/browser/chunk-EJMPHRSR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-OBJAHY6H.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["move_default","play_default"],"inputs":{"src/functions/move.ts":{"bytesInOutput":1102},"src/functions/play.ts":{"bytesInOutput":1505},"src/functions/index.ts":{"bytesInOutput":0}},"bytes":2803},"dist/lib/browser/intent-resolver-JWKKRNGG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1073},"dist/lib/browser/intent-resolver-JWKKRNGG.mjs":{"imports":[{"path":"dist/lib/browser/chunk-OBJAHY6H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/intent-resolver.ts","inputs":{"src/capabilities/intent-resolver.ts":{"bytesInOutput":378}},"bytes":631},"dist/lib/browser/ChessboardContainer-NNIOQIRP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5056},"dist/lib/browser/ChessboardContainer-NNIOQIRP.mjs":{"imports":[{"path":"dist/lib/browser/chunk-2W3S5N6C.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["ChessboardContainer","default"],"entryPoint":"src/components/ChessboardContainer.tsx","inputs":{"src/components/ChessboardContainer.tsx":{"bytesInOutput":915},"src/components/ChessboardArticle.tsx":{"bytesInOutput":1870}},"bytes":3146},"dist/lib/browser/react-surface-RIXD6RTS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1589},"dist/lib/browser/react-surface-RIXD6RTS.mjs":{"imports":[{"path":"dist/lib/browser/chunk-PPBBLHAC.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-OBJAHY6H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-2W3S5N6C.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":716}},"bytes":1050},"dist/lib/browser/chunk-PPBBLHAC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":413},"dist/lib/browser/chunk-PPBBLHAC.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/ChessboardContainer-NNIOQIRP.mjs","kind":"dynamic-import"}],"exports":["ChessboardContainer"],"inputs":{"src/components/index.ts":{"bytesInOutput":114}},"bytes":220},"dist/lib/browser/chunk-OBJAHY6H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3387},"dist/lib/browser/chunk-OBJAHY6H.mjs":{"imports":[{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true}],"exports":["ChessAction_exports","Chess_exports"],"inputs":{"src/types/Chess.ts":{"bytesInOutput":1290},"src/types/index.ts":{"bytesInOutput":0},"src/types/ChessAction.ts":{"bytesInOutput":387}},"bytes":1884},"dist/lib/browser/chunk-2W3S5N6C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17636},"dist/lib/browser/chunk-2W3S5N6C.mjs":{"imports":[{"path":"dist/lib/browser/chunk-PE3IWOFR.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["Chessboard","ExtendedChessModel"],"inputs":{"src/components/Chessboard.tsx":{"bytesInOutput":1928},"src/components/ChessboardInfo.tsx":{"bytesInOutput":4365},"src/components/ChessboardPlayers.tsx":{"bytesInOutput":3113}},"bytes":9692},"dist/lib/browser/chunk-PE3IWOFR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":900},"dist/lib/browser/chunk-PE3IWOFR.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","__export","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":410}},"bytes":685}}}
1
+ {"inputs":{"src/types/Chess.ts":{"bytes":5965,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":2047,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/ChessAction.ts":{"bytes":1860,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"}],"format":"esm"},"src/types/index.ts":{"bytes":682,"imports":[{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"},{"path":"src/types/ChessAction.ts","kind":"import-statement","original":"./ChessAction"}],"format":"esm"},"src/functions/create.ts":{"bytes":3286,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/functions/move.ts":{"bytes":5167,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/functions/play.ts":{"bytes":6854,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/functions/index.ts":{"bytes":860,"imports":[{"path":"src/functions/create.ts","kind":"import-statement","original":"./create"},{"path":"src/functions/move.ts","kind":"import-statement","original":"./move"},{"path":"src/functions/play.ts","kind":"import-statement","original":"./play"}],"format":"esm"},"src/capabilities/blueprint-definition.ts":{"bytes":3942,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/functions/index.ts","kind":"import-statement","original":"../functions"}],"format":"esm"},"src/capabilities/intent-resolver.ts":{"bytes":2113,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/components/Info.tsx":{"bytes":24845,"imports":[{"path":"@preact-signals/safe-react/tracking","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-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/Chessboard.tsx":{"bytes":13872,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-sfx","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/Info.tsx","kind":"import-statement","original":"./Info"}],"format":"esm"},"src/components/ChessboardArticle.tsx":{"bytes":8061,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/components/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"src/components/ChessboardContainer.tsx":{"bytes":3725,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"src/components/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"},{"path":"src/components/ChessboardArticle.tsx","kind":"import-statement","original":"./ChessboardArticle"}],"format":"esm"},"src/components/index.ts":{"bytes":877,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"},{"path":"src/components/ChessboardContainer.tsx","kind":"dynamic-import","original":"./ChessboardContainer"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3392,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1442,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/blueprint-definition.ts","kind":"import-statement","original":"./blueprint-definition"},{"path":"src/capabilities/blueprint-definition.ts","kind":"dynamic-import","original":"./blueprint-definition"},{"path":"src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":3451,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/ChessPlugin.tsx":{"bytes":7593,"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":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/index.ts":{"bytes":911,"imports":[{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5834},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-TIIGNOGK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-Q5TZCIH7.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-FBLAVAMY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5DOZV3PW.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/blueprint-definition-FD4TL5EE.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/intent-resolver-GXZN2EBT.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-surface-KTTAUHAA.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["BlueprintDefinition","CHESS_BLUEPRINT_KEY","Chess","ChessAction","ChessPlugin","Chessboard","ChessboardContainer","ExtendedChessModel","IntentResolver","ReactSurface","create","meta","move","play"],"entryPoint":"src/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":275},"src/index.ts":{"bytesInOutput":0},"src/ChessPlugin.tsx":{"bytesInOutput":1598},"src/translations.ts":{"bytesInOutput":831}},"bytes":3529},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FBLAVAMY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"}],"exports":["Chess","ChessAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":222},"dist/lib/browser/blueprint-definition-FD4TL5EE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/blueprint-definition-FD4TL5EE.mjs":{"imports":[{"path":"dist/lib/browser/chunk-TIIGNOGK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-FBLAVAMY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"}],"exports":["CHESS_BLUEPRINT_KEY","default"],"entryPoint":"src/capabilities/blueprint-definition.ts","inputs":{},"bytes":292},"dist/lib/browser/chunk-TIIGNOGK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9590},"dist/lib/browser/chunk-TIIGNOGK.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FBLAVAMY.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true}],"exports":["CHESS_BLUEPRINT_KEY","blueprint_definition_default","create_default","move_default","play_default"],"inputs":{"src/capabilities/blueprint-definition.ts":{"bytesInOutput":980},"src/functions/create.ts":{"bytesInOutput":744},"src/functions/index.ts":{"bytesInOutput":0},"src/functions/move.ts":{"bytesInOutput":1305},"src/functions/play.ts":{"bytesInOutput":1753}},"bytes":5169},"dist/lib/browser/intent-resolver-GXZN2EBT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1073},"dist/lib/browser/intent-resolver-GXZN2EBT.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FBLAVAMY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/intent-resolver.ts","inputs":{"src/capabilities/intent-resolver.ts":{"bytesInOutput":380}},"bytes":633},"dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5812},"dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5DOZV3PW.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["ChessboardContainer","default"],"entryPoint":"src/components/ChessboardContainer.tsx","inputs":{"src/components/ChessboardContainer.tsx":{"bytesInOutput":931},"src/components/ChessboardArticle.tsx":{"bytesInOutput":2071}},"bytes":3363},"dist/lib/browser/react-surface-KTTAUHAA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1589},"dist/lib/browser/react-surface-KTTAUHAA.mjs":{"imports":[{"path":"dist/lib/browser/chunk-Q5TZCIH7.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-FBLAVAMY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-5DOZV3PW.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":718}},"bytes":1052},"dist/lib/browser/chunk-Q5TZCIH7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":413},"dist/lib/browser/chunk-Q5TZCIH7.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs","kind":"dynamic-import"}],"exports":["ChessboardContainer"],"inputs":{"src/components/index.ts":{"bytesInOutput":114}},"bytes":220},"dist/lib/browser/chunk-FBLAVAMY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3813},"dist/lib/browser/chunk-FBLAVAMY.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["ChessAction_exports","Chess_exports"],"inputs":{"src/types/Chess.ts":{"bytesInOutput":1601},"src/types/index.ts":{"bytesInOutput":0},"src/types/ChessAction.ts":{"bytesInOutput":385}},"bytes":2193},"dist/lib/browser/chunk-5DOZV3PW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19926},"dist/lib/browser/chunk-5DOZV3PW.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DUO4WTAM.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-sfx","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["Chessboard","ExtendedChessModel"],"inputs":{"src/components/Chessboard.tsx":{"bytesInOutput":3330},"src/components/Info.tsx":{"bytesInOutput":6801}},"bytes":10366},"dist/lib/browser/chunk-DUO4WTAM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":984},"dist/lib/browser/chunk-DUO4WTAM.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["__export","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":515}},"bytes":774}}}
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  ChessboardContainer
3
- } from "./chunk-PPBBLHAC.mjs";
3
+ } from "./chunk-Q5TZCIH7.mjs";
4
4
  import {
5
5
  Chess_exports
6
- } from "./chunk-OBJAHY6H.mjs";
7
- import "./chunk-2W3S5N6C.mjs";
6
+ } from "./chunk-FBLAVAMY.mjs";
7
+ import "./chunk-5DOZV3PW.mjs";
8
8
  import {
9
9
  meta
10
- } from "./chunk-PE3IWOFR.mjs";
10
+ } from "./chunk-DUO4WTAM.mjs";
11
11
 
12
12
  // src/capabilities/react-surface.tsx
13
13
  import React from "react";
14
14
  import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
15
15
  import { Obj } from "@dxos/echo";
16
- var react_surface_default = () => contributes(Capabilities.ReactSurface, [
16
+ var react_surface_default = (() => contributes(Capabilities.ReactSurface, [
17
17
  createSurface({
18
18
  id: meta.id,
19
19
  role: [
@@ -31,8 +31,8 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
31
31
  role
32
32
  })
33
33
  })
34
- ]);
34
+ ]));
35
35
  export {
36
36
  react_surface_default as default
37
37
  };
38
- //# sourceMappingURL=react-surface-RIXD6RTS.mjs.map
38
+ //# sourceMappingURL=react-surface-KTTAUHAA.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/react-surface.tsx"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { ChessboardContainer } from '../components';\nimport { meta } from '../meta';\nimport { Chess } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: ['article', 'section', 'card--intrinsic', 'card--extrinsic', 'card--popover', 'card--transclusion'],\n // TODO(burdon): Could this be standardized so that we don't require a subject property.\n filter: (data): data is { subject: Chess.Game } => Obj.instanceOf(Chess.Game, data.subject),\n component: ({ data, role }) => <ChessboardContainer game={data.subject} role={role} />,\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AAMpB,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;MAAW;MAAmB;MAAmB;MAAiB;;;IAEpFC,QAAQ,CAACC,SAA0CC,IAAIC,WAAWC,cAAMC,MAAMJ,KAAKK,OAAO;IAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACS,qBAAAA;MAAoBC,MAAMR,KAAKK;MAASP;;EAC1E,CAAA;CACD;",
5
+ "mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AAMpB,IAAA,yBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;MAAW;MAAmB;MAAmB;MAAiB;;;IAEpFC,QAAQ,CAACC,SAA0CC,IAAIC,WAAWC,cAAMC,MAAMJ,KAAKK,OAAO;IAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACS,qBAAAA;MAAoBC,MAAMR,KAAKK;MAASP;;EAC1E,CAAA;CACD;",
6
6
  "names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Chess", "Game", "subject", "component", "ChessboardContainer", "game"]
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ChessAction_exports,
3
3
  Chess_exports
4
- } from "../chunk-OBJAHY6H.mjs";
5
- import "../chunk-PE3IWOFR.mjs";
4
+ } from "../chunk-FBLAVAMY.mjs";
5
+ import "../chunk-DUO4WTAM.mjs";
6
6
  export {
7
7
  Chess_exports as Chess,
8
8
  ChessAction_exports as ChessAction