@dxos/plugin-chess 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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.
- package/dist/lib/browser/ChessArticle-UDSL3OJ4.mjs +59 -0
- package/dist/lib/browser/ChessArticle-UDSL3OJ4.mjs.map +7 -0
- package/dist/lib/browser/ChessCard-OIRFQMOJ.mjs +21 -0
- package/dist/lib/browser/ChessCard-OIRFQMOJ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-LWRZPLQL.mjs +18 -0
- package/dist/lib/browser/blueprint-definition-LWRZPLQL.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +4 -4
- package/dist/lib/browser/{chunk-73BDP7UV.mjs → chunk-JP6G6VR6.mjs} +30 -29
- package/dist/lib/browser/chunk-JP6G6VR6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-H3NUMCQ6.mjs → chunk-RGHZ5CDO.mjs} +2 -2
- package/dist/lib/browser/{chunk-H3NUMCQ6.mjs.map → chunk-RGHZ5CDO.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-FO4ZNFN6.mjs → chunk-VK2W2UDJ.mjs} +44 -42
- package/dist/lib/browser/chunk-VK2W2UDJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-WYUTI2K4.mjs +1 -0
- package/dist/lib/browser/chunk-WYUTI2K4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-66H3V2YV.mjs → chunk-YJ2NLHEY.mjs} +3 -3
- package/dist/lib/browser/{chunk-66H3V2YV.mjs.map → chunk-YJ2NLHEY.mjs.map} +1 -1
- package/dist/lib/browser/cli/index.mjs +10 -10
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +21 -26
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-M7QMAFTB.mjs +50 -0
- package/dist/lib/browser/react-surface-M7QMAFTB.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/ChessArticle-76MOXLJM.mjs +60 -0
- package/dist/lib/node-esm/ChessArticle-76MOXLJM.mjs.map +7 -0
- package/dist/lib/node-esm/ChessCard-TKNQP6IO.mjs +22 -0
- package/dist/lib/node-esm/ChessCard-TKNQP6IO.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-SL4LBVV5.mjs → blueprint-definition-CJZXRDEQ.mjs} +7 -7
- package/dist/lib/node-esm/blueprint-definition-CJZXRDEQ.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +4 -4
- package/dist/lib/node-esm/chunk-7XDEO6IJ.mjs +2 -0
- package/dist/lib/node-esm/chunk-7XDEO6IJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WXEPWOHT.mjs → chunk-FK7NVSOG.mjs} +30 -29
- package/dist/lib/node-esm/chunk-FK7NVSOG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-F5OMIM4F.mjs → chunk-FYPVCMP4.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-F5OMIM4F.mjs.map → chunk-FYPVCMP4.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-C7IWIXCJ.mjs → chunk-G3QQRYZC.mjs} +44 -42
- package/dist/lib/node-esm/chunk-G3QQRYZC.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OUNGNJFP.mjs → chunk-J6AJLY2O.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-OUNGNJFP.mjs.map → chunk-J6AJLY2O.mjs.map} +1 -1
- package/dist/lib/node-esm/cli/index.mjs +10 -10
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +21 -26
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-DKM6ICBU.mjs +51 -0
- package/dist/lib/node-esm/react-surface-DKM6ICBU.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/chess-blueprint.d.ts +3 -20
- package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/functions/create.d.ts +1 -1
- package/dist/types/src/blueprints/functions/index.d.ts +55 -4
- package/dist/types/src/blueprints/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/functions/move.d.ts +9 -1
- package/dist/types/src/blueprints/functions/move.d.ts.map +1 -1
- package/dist/types/src/blueprints/functions/play.d.ts +9 -1
- package/dist/types/src/blueprints/functions/play.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +1 -1
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +3 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/components/{Chessboard.d.ts → Chessboard/Chessboard.d.ts} +3 -8
- package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
- package/dist/types/src/components/{Info.d.ts → Chessboard/Info.d.ts} +1 -1
- package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/index.d.ts +2 -0
- package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/types.d.ts +8 -0
- package/dist/types/src/components/Chessboard/types.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +6 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
- package/dist/types/src/{components/Chessboard.stories.d.ts → containers/ChessArticle/ChessArticle.stories.d.ts} +3 -2
- package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChessArticle/index.d.ts +3 -0
- package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/ChessCard.d.ts +6 -0
- package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
- package/dist/types/src/{components/Card.stories.d.ts → containers/ChessCard/ChessCard.stories.d.ts} +1 -1
- package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/index.d.ts +3 -0
- package/dist/types/src/containers/ChessCard/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Chess.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +45 -44
- package/src/ChessPlugin.tsx +8 -8
- package/src/blueprints/chess-blueprint.ts +14 -6
- package/src/blueprints/functions/create.ts +2 -2
- package/src/blueprints/functions/index.ts +13 -4
- package/src/blueprints/functions/move.ts +11 -12
- package/src/blueprints/functions/play.ts +5 -6
- package/src/blueprints/functions/print.ts +1 -1
- package/src/blueprints/index.ts +1 -1
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +6 -12
- package/src/capabilities/react-surface/react-surface.tsx +13 -7
- package/src/cli/plugin.ts +4 -4
- package/src/components/{Chessboard.tsx → Chessboard/Chessboard.tsx} +24 -26
- package/src/components/{Info.tsx → Chessboard/Info.tsx} +12 -10
- package/src/components/Chessboard/index.ts +5 -0
- package/src/components/Chessboard/types.ts +18 -0
- package/src/components/index.ts +1 -5
- package/src/{components/Chessboard.stories.tsx → containers/ChessArticle/ChessArticle.stories.tsx} +7 -7
- package/src/containers/ChessArticle/ChessArticle.tsx +72 -0
- package/src/containers/ChessArticle/index.ts +7 -0
- package/src/{components/Card.stories.tsx → containers/ChessCard/ChessCard.stories.tsx} +9 -14
- package/src/containers/ChessCard/ChessCard.tsx +22 -0
- package/src/containers/ChessCard/index.ts +7 -0
- package/src/containers/index.ts +8 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +1 -1
- package/src/translations.ts +1 -0
- package/src/types/Chess.ts +2 -2
- package/dist/lib/browser/ChessboardContainer-JZ4ANG4O.mjs +0 -81
- package/dist/lib/browser/ChessboardContainer-JZ4ANG4O.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-P7TYXWMF.mjs +0 -18
- package/dist/lib/browser/blueprint-definition-P7TYXWMF.mjs.map +0 -7
- package/dist/lib/browser/chunk-73BDP7UV.mjs.map +0 -7
- package/dist/lib/browser/chunk-FO4ZNFN6.mjs.map +0 -7
- package/dist/lib/browser/chunk-OW6S2SRG.mjs +0 -8
- package/dist/lib/browser/chunk-OW6S2SRG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VNOWFKC6.mjs +0 -37
- package/dist/lib/browser/react-surface-VNOWFKC6.mjs.map +0 -7
- package/dist/lib/node-esm/ChessboardContainer-7ONFYN7L.mjs +0 -82
- package/dist/lib/node-esm/ChessboardContainer-7ONFYN7L.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-SL4LBVV5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-24GJHLHM.mjs +0 -10
- package/dist/lib/node-esm/chunk-24GJHLHM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C7IWIXCJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WXEPWOHT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-HSHCIOAS.mjs +0 -38
- package/dist/lib/node-esm/react-surface-HSHCIOAS.mjs.map +0 -7
- package/dist/types/src/components/Card.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChessboardArticle.d.ts +0 -6
- package/dist/types/src/components/ChessboardArticle.d.ts.map +0 -1
- package/dist/types/src/components/ChessboardContainer.d.ts +0 -7
- package/dist/types/src/components/ChessboardContainer.d.ts.map +0 -1
- package/dist/types/src/components/Info.d.ts.map +0 -1
- package/src/components/ChessboardArticle.tsx +0 -71
- package/src/components/ChessboardContainer.tsx +0 -40
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/chess-blueprint.ts", "../../../src/blueprints/functions/index.ts", "../../../src/blueprints/functions/create.ts", "../../../src/blueprints/functions/move.ts", "../../../src/blueprints/functions/play.ts", "../../../src/blueprints/functions/print.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { ChessFunctions } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.chess';\n\nconst functions = Object.values(ChessFunctions);\n\nconst make = () =>\n Blueprint.make({\n key: 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\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n functions,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport Create from './create';\nimport Move from './move';\nimport Play from './play';\nimport Print from './print';\n\nexport { Create, Move, Play, Print };\n\nexport const ChessFunctions = {\n Create,\n Move,\n Play,\n Print,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Database } from '@dxos/echo';\nimport { defineFunction } from '@dxos/functions';\n\nimport { Chess } from '../../types';\n\nexport default defineFunction({\n key: 'org.dxos.function.chess.create',\n name: 'Create Chess',\n description: 'Creates a new chess game.',\n inputSchema: Schema.Struct({\n name: Schema.optional(\n Schema.String.annotations({\n description: 'Name of the game.',\n }),\n ),\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: { name, pgn, fen } }) {\n return yield* Database.add(Chess.make({ name, 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 { Database, Obj, Ref } from '@dxos/echo';\nimport { defineFunction } from '@dxos/functions';\n\nimport { Chess } from '../../types';\n\nexport default defineFunction({\n key: 'org.dxos.function.chess.move',\n name: 'Move',\n description: 'Makes a move in the given chess game.',\n inputSchema: Schema.Struct({\n game: Ref.Ref(Chess.Game).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: { game, move } }) {\n const obj = yield* Database.load(game);\n const chess = new ChessJS();\n if (obj.pgn) {\n chess.loadPgn(obj.pgn);\n } else if (obj.fen) {\n chess.load(obj.fen);\n }\n\n chess.move(move, { strict: false });\n const pgn = chess.pgn();\n Obj.change(obj, (obj) => {\n obj.pgn = pgn;\n });\n return { 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 { Database, Obj, Ref } from '@dxos/echo';\nimport { defineFunction } from '@dxos/functions';\n\nimport { Chess } from '../../types';\n\nexport default defineFunction({\n key: 'org.dxos.function.chess.play',\n name: 'Play',\n description: 'Uses the chess engine to play the next move.',\n inputSchema: Schema.Struct({\n game: Ref.Ref(Chess.Game).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: { game, side = 'any' } }) {\n const object = yield* Database.load(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 const pgn = chess.pgn();\n Obj.change(object, (o) => {\n o.pgn = pgn;\n });\n return { move, 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 { defineFunction } from '@dxos/functions';\n\nexport default defineFunction({\n key: 'org.dxos.function.chess.print',\n name: 'Print game',\n description: 'Prints the chess game to ASCII.',\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: Schema.Struct({\n ascii: Schema.String,\n }),\n handler: Effect.fn(function* ({ data: { pgn, fen } }) {\n try {\n const chess = new ChessJS(fen);\n if (pgn) {\n chess.loadPgn(pgn);\n }\n return { ascii: chess.ascii() };\n } catch {\n // TODO(burdon): Error handling?\n return { ascii: '' };\n }\n }),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAKA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;;;ACNrB;;;;;;;;;;ACIA,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,gBAAgB;AACzB,SAASC,sBAAsB;AAI/B,IAAA,iBAAeC,eAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,cAAO;IACzBH,MAAaI,gBACJC,cAAOC,YAAY;MACxBL,aAAa;IACf,CAAA,CAAA;IAEFM,KAAYH,gBACHC,cAAOC,YAAY;MACxBL,aAAa;IACf,CAAA,CAAA;IAEFO,KAAYJ,gBACHC,cAAOC,YAAY;MACxBL,aAAa;IACf,CAAA,CAAA;EAEJ,CAAA;EACAQ,cAAcC,cAAMC;EACpBC,SAAgBC,UAAG,WAAW,EAAEC,MAAM,EAAEd,MAAMO,KAAKC,IAAG,EAAE,GAAE;AACxD,WAAO,OAAOO,SAASC,IAAIN,cAAMO,KAAK;MAAEjB;MAAMO;MAAKC;IAAI,CAAA,CAAA;EACzD,CAAA;AACF,CAAA;;;ACjCA,SAASU,SAASC,eAAe;AACjC,YAAYC,aAAY;AACxB,YAAYC,aAAY;AAExB,SAASC,YAAAA,WAAUC,KAAKC,WAAW;AACnC,SAASC,kBAAAA,uBAAsB;AAI/B,IAAA,eAAeC,gBAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,eAAO;IACzBC,MAAMC,IAAIA,IAAIC,cAAMC,IAAI,EAAEC,YAAY;MACpCP,aAAa;IACf,CAAA;IACAQ,MAAaC,eAAOF,YAAY;MAC9BP,aAAa;MACbU,UAAU;QAAC;QAAM;;IACnB,CAAA;EACF,CAAA;EACAC,cAAqBT,eAAO;IAC1BU,KAAYH,eAAOF,YAAY;MAC7BP,aAAa;IACf,CAAA;EACF,CAAA;EACAa,SAAgBC,WAAG,WAAW,EAAEC,MAAM,EAAEZ,MAAMK,KAAI,EAAE,GAAE;AACpD,UAAMQ,MAAM,OAAOC,UAASC,KAAKf,IAAAA;AACjC,UAAMgB,QAAQ,IAAIC,QAAAA;AAClB,QAAIJ,IAAIJ,KAAK;AACXO,YAAME,QAAQL,IAAIJ,GAAG;IACvB,WAAWI,IAAIM,KAAK;AAClBH,YAAMD,KAAKF,IAAIM,GAAG;IACpB;AAEAH,UAAMX,KAAKA,MAAM;MAAEe,QAAQ;IAAM,CAAA;AACjC,UAAMX,MAAMO,MAAMP,IAAG;AACrBY,QAAIC,OAAOT,KAAK,CAACA,SAAAA;AACfA,MAAAA,KAAIJ,MAAMA;IACZ,CAAA;AACA,WAAO;MAAEA;IAAI;EACf,CAAA;AACF,CAAA;;;AC3CA,SAASc,SAASC,gBAAe;AACjC,YAAYC,aAAY;AACxB,YAAYC,aAAY;AAExB,SAASC,YAAAA,WAAUC,OAAAA,MAAKC,OAAAA,YAAW;AACnC,SAASC,kBAAAA,uBAAsB;AAI/B,IAAA,eAAeC,gBAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,eAAO;IACzBC,MAAMC,KAAIA,IAAIC,cAAMC,IAAI,EAAEC,YAAY;MACpCP,aAAa;IACf,CAAA;IACAQ,MAAaC,iBAAgBC,gBAAQ,SAAS,SAAS,KAAA,CAAA,EAAQH,YAAY;MACzEP,aAAa;MACbW,cAAc;IAChB,CAAA;EACF,CAAA;EACAC,cAAqBV,eAAO;IAC1BW,KAAYC,eAAOP,YAAY;MAC7BP,aAAa;IACf,CAAA;IACAe,MAAaN,iBAAgBK,cAAM,EAAEP,YAAY;MAC/CP,aAAa;IACf,CAAA;EACF,CAAA;EACAgB,SAAgBC,WAAG,WAAW,EAAEC,MAAM,EAAEf,MAAMK,OAAO,MAAK,EAAE,GAAE;AAC5D,UAAMW,SAAS,OAAOC,UAASC,KAAKlB,IAAAA;AACpC,UAAMmB,QAAQ,IAAIC,SAAAA;AAClB,QAAIJ,OAAON,KAAK;AACdS,YAAME,QAAQL,OAAON,GAAG;IAC1B,WAAWM,OAAOM,KAAK;AACrBH,YAAMD,KAAKF,OAAOM,GAAG;IACvB;AAEA,QAAI,EAAEjB,SAAS,SAAUc,MAAMI,KAAI,MAAO,OAAOlB,SAAS,WAAac,MAAMI,KAAI,MAAO,OAAOlB,SAAS,UAAW;AACjH,aAAO;QAAEO,MAAMY;QAAWd,KAAKM,OAAON;MAAK;IAC7C;AAEA,UAAMe,QAAQN,MAAMM,MAAK;AACzB,UAAMb,OAAOa,MAAMC,KAAKC,MAAMD,KAAKE,OAAM,IAAKH,MAAMI,MAAM,CAAA;AAE1DV,UAAMP,KAAKA,MAAM;MAAEkB,QAAQ;IAAM,CAAA;AACjC,UAAMpB,MAAMS,MAAMT,IAAG;AACrBqB,IAAAA,KAAIC,OAAOhB,QAAQ,CAACiB,MAAAA;AAClBA,QAAEvB,MAAMA;IACV,CAAA;AACA,WAAO;MAAEE;MAAMF;IAAI;EACrB,CAAA;AACF,CAAA;;;ACrDA,SAASwB,SAASC,gBAAe;AACjC,YAAYC,aAAY;AACxB,YAAYC,aAAY;AAExB,SAASC,kBAAAA,uBAAsB;AAE/B,IAAA,gBAAeC,gBAAe;EAC5BC,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,eAAO;IACzBC,KAAYC,iBACHC,eAAOC,YAAY;MACxBN,aAAa;IACf,CAAA,CAAA;IAEFO,KAAYH,iBACHC,eAAOC,YAAY;MACxBN,aAAa;IACf,CAAA,CAAA;EAEJ,CAAA;EACAQ,cAAqBN,eAAO;IAC1BO,OAAcJ;EAChB,CAAA;EACAK,SAAgBC,WAAG,WAAW,EAAEC,MAAM,EAAET,KAAKI,IAAG,EAAE,GAAE;AAClD,QAAI;AACF,YAAMM,QAAQ,IAAIC,SAAQP,GAAAA;AAC1B,UAAIJ,KAAK;AACPU,cAAME,QAAQZ,GAAAA;MAChB;AACA,aAAO;QAAEM,OAAOI,MAAMJ,MAAK;MAAG;IAChC,QAAQ;AAEN,aAAO;QAAEA,OAAO;MAAG;IACrB;EACF,CAAA;AACF,CAAA;;;AJ9BO,IAAMO,iBAAiB;EAC5BC;EACAC;EACAC;EACAC;AACF;;;ADNA,IAAMC,gBAAgB;AAEtB,IAAMC,YAAYC,OAAOC,OAAOC,cAAAA;AAEhC,IAAMC,OAAO,MACXC,UAAUD,KAAK;EACbE,KAAKP;EACLQ,MAAM;EACNC,OAAOH,UAAUI,gBAAgB;IAAET;EAAU,CAAA;EAC7CU,cAAcC,SAASP,KAAK;IAC1BQ,QAAQC;;;;;;EAMV,CAAA;AACF,CAAA;AAEF,IAAMC,YAAiD;EACrDR,KAAKP;EACLC;EACAI;AACF;AAEA,IAAA,0BAAeU;",
|
|
6
|
+
"names": ["Blueprint", "Template", "trim", "Effect", "Schema", "Database", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "optional", "String", "annotations", "pgn", "fen", "outputSchema", "Chess", "Game", "handler", "fn", "data", "Database", "add", "make", "Chess", "ChessJS", "Effect", "Schema", "Database", "Obj", "Ref", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "game", "Ref", "Chess", "Game", "annotations", "move", "String", "examples", "outputSchema", "pgn", "handler", "fn", "data", "obj", "Database", "load", "chess", "ChessJS", "loadPgn", "fen", "strict", "Obj", "change", "Chess", "ChessJS", "Effect", "Schema", "Database", "Obj", "Ref", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "game", "Ref", "Chess", "Game", "annotations", "side", "optional", "Literal", "defaultValue", "outputSchema", "pgn", "String", "move", "handler", "fn", "data", "object", "Database", "load", "chess", "ChessJS", "loadPgn", "fen", "turn", "undefined", "moves", "Math", "floor", "random", "length", "strict", "Obj", "change", "o", "Chess", "ChessJS", "Effect", "Schema", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "pgn", "optional", "String", "annotations", "fen", "outputSchema", "ascii", "handler", "fn", "data", "chess", "ChessJS", "loadPgn", "ChessFunctions", "Create", "Move", "Play", "Print", "BLUEPRINT_KEY", "functions", "Object", "values", "ChessFunctions", "make", "Blueprint", "key", "name", "tools", "toolDefinitions", "instructions", "Template", "source", "trim", "blueprint"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-WYUTI2K4.mjs.map
|
|
@@ -31,8 +31,8 @@ var Game = Schema.Struct({
|
|
|
31
31
|
description: "Forsyth-Edwards Notation."
|
|
32
32
|
}).pipe(FormInputAnnotation.set(false), Schema.optional)
|
|
33
33
|
}).pipe(Type.object({
|
|
34
|
-
typename: "dxos.
|
|
35
|
-
version: "0.
|
|
34
|
+
typename: "org.dxos.type.chess",
|
|
35
|
+
version: "0.1.0"
|
|
36
36
|
}), LabelAnnotation.set([
|
|
37
37
|
"name"
|
|
38
38
|
]));
|
|
@@ -61,4 +61,4 @@ var make = ({ name, pgn, fen } = {}) => {
|
|
|
61
61
|
export {
|
|
62
62
|
Chess_exports
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-YJ2NLHEY.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/Chess.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { log } from '@dxos/log';\n\nexport const Game = Schema.Struct({\n name: Schema.optional(Schema.String),\n players: Schema.Struct({\n white: Schema.optional(\n Schema.String.annotations({\n description: 'DID of white player',\n }),\n ),\n black: Schema.optional(\n Schema.String.annotations({\n description: 'DID of black player',\n }),\n ),\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n pgn: Schema.String.annotations({\n description: 'Portable Game Notation.',\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n fen: Schema.String.annotations({\n description: 'Forsyth-Edwards Notation.',\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n}).pipe(\n Type.object({\n typename: 'dxos.
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { log } from '@dxos/log';\n\nexport const Game = Schema.Struct({\n name: Schema.optional(Schema.String),\n players: Schema.Struct({\n white: Schema.optional(\n Schema.String.annotations({\n description: 'DID of white player',\n }),\n ),\n black: Schema.optional(\n Schema.String.annotations({\n description: 'DID of black player',\n }),\n ),\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n pgn: Schema.String.annotations({\n description: 'Portable Game Notation.',\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n fen: Schema.String.annotations({\n description: 'Forsyth-Edwards Notation.',\n }).pipe(FormInputAnnotation.set(false), Schema.optional),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.chess',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n);\n\nexport interface Game extends Schema.Schema.Type<typeof Game> {}\n\nexport const make = ({ name, pgn, fen }: { name?: string; pgn?: string; fen?: string } = {}) => {\n const chess = new ChessJS();\n if (pgn) {\n try {\n chess.loadPgn(pgn);\n } catch {\n log.warn(pgn);\n }\n }\n\n return Obj.make(Game, {\n name,\n pgn,\n fen,\n players: {},\n });\n};\n"],
|
|
5
5
|
"mappings": ";;;;;AAAA;;;;;AAIA,SAASA,SAASC,eAAe;AACjC,YAAYC,YAAY;AAExB,SAASC,KAAKC,YAAY;AAC1B,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,WAAW;;AAEb,IAAMC,OAAcC,cAAO;EAChCC,MAAaC,gBAAgBC,aAAM;EACnCC,SAAgBJ,cAAO;IACrBK,OAAcH,gBACLC,cAAOG,YAAY;MACxBC,aAAa;IACf,CAAA,CAAA;IAEFC,OAAcN,gBACLC,cAAOG,YAAY;MACxBC,aAAa;IACf,CAAA,CAAA;EAEJ,CAAA,EAAGE,KAAKb,oBAAoBc,IAAI,KAAA,GAAeR,eAAQ;EACvDS,KAAYR,cAAOG,YAAY;IAC7BC,aAAa;EACf,CAAA,EAAGE,KAAKb,oBAAoBc,IAAI,KAAA,GAAeR,eAAQ;EACvDU,KAAYT,cAAOG,YAAY;IAC7BC,aAAa;EACf,CAAA,EAAGE,KAAKb,oBAAoBc,IAAI,KAAA,GAAeR,eAAQ;AACzD,CAAA,EAAGO,KACDd,KAAKkB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAlB,gBAAgBa,IAAI;EAAC;CAAO,CAAA;AAKvB,IAAMM,OAAO,CAAC,EAAEf,MAAMU,KAAKC,IAAG,IAAoD,CAAC,MAAC;AACzF,QAAMK,QAAQ,IAAIzB,QAAAA;AAClB,MAAImB,KAAK;AACP,QAAI;AACFM,YAAMC,QAAQP,GAAAA;IAChB,QAAQ;AACNb,UAAIqB,KAAKR,KAAAA,QAAAA;;;;;;IACX;EACF;AAEA,SAAOjB,IAAIsB,KAAKjB,MAAM;IACpBE;IACAU;IACAC;IACAR,SAAS,CAAC;EACZ,CAAA;AACF;",
|
|
6
6
|
"names": ["Chess", "ChessJS", "Schema", "Obj", "Type", "FormInputAnnotation", "LabelAnnotation", "log", "Game", "Struct", "name", "optional", "String", "players", "white", "annotations", "description", "black", "pipe", "set", "pgn", "fen", "object", "typename", "version", "make", "chess", "loadPgn", "warn"]
|
|
7
7
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Chess_exports
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YJ2NLHEY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
meta
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RGHZ5CDO.mjs";
|
|
7
7
|
import "../chunk-J5LGTIGS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli/plugin.ts
|
|
10
10
|
import * as Effect from "effect/Effect";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Chess_exports.Game
|
|
15
|
-
]
|
|
16
|
-
}), Common.Plugin.addMetadataModule({
|
|
11
|
+
import { Plugin } from "@dxos/app-framework";
|
|
12
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
13
|
+
var ChessPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
17
14
|
metadata: {
|
|
18
15
|
id: Chess_exports.Game.typename,
|
|
19
16
|
metadata: {
|
|
20
|
-
createObject: (props) => Effect.sync(() => Chess_exports.make(props))
|
|
21
|
-
addToCollectionOnCreate: true
|
|
17
|
+
createObject: (props) => Effect.sync(() => Chess_exports.make(props))
|
|
22
18
|
}
|
|
23
19
|
}
|
|
20
|
+
}), AppPlugin.addSchemaModule({
|
|
21
|
+
schema: [
|
|
22
|
+
Chess_exports.Game
|
|
23
|
+
]
|
|
24
24
|
}), Plugin.make);
|
|
25
25
|
export {
|
|
26
26
|
ChessPlugin
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/plugin.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,
|
|
6
|
-
"names": ["Effect", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type CreateObject } from '@dxos/plugin-space/types';\n\nimport { meta } from '../meta';\nimport { Chess } from '../types';\n\n// TODO(wittjosiah): Factor out shared modules.\nexport const ChessPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: Chess.Game.typename,\n metadata: {\n createObject: ((props) => Effect.sync(() => Chess.make(props))) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Chess.Game] }),\n Plugin.make,\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAOnB,IAAMC,cAAcC,OAAOC,OAAOC,IAAAA,EAAMC,KAC7CC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,cAAMC,KAAKC;IACfJ,UAAU;MACRK,cAAe,CAACC,UAAiBC,YAAK,MAAML,cAAMM,KAAKF,KAAAA,CAAAA;IACzD;EACF;AACF,CAAA,GACAR,UAAUW,gBAAgB;EAAEC,QAAQ;IAACR,cAAMC;;AAAM,CAAA,GACjDT,OAAOc,IAAI;",
|
|
6
|
+
"names": ["Effect", "Plugin", "AppPlugin", "ChessPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "Chess", "Game", "typename", "createObject", "props", "sync", "make", "addSchemaModule", "schema"]
|
|
7
7
|
}
|
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
chess_blueprint_default,
|
|
3
3
|
functions_exports
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VK2W2UDJ.mjs";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
Chessboard
|
|
7
|
+
} from "./chunk-JP6G6VR6.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Chess_exports
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
Chessboard,
|
|
13
|
-
ExtendedChessModel
|
|
14
|
-
} from "./chunk-73BDP7UV.mjs";
|
|
10
|
+
} from "./chunk-YJ2NLHEY.mjs";
|
|
15
11
|
import {
|
|
16
12
|
meta
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RGHZ5CDO.mjs";
|
|
18
14
|
import "./chunk-J5LGTIGS.mjs";
|
|
19
15
|
|
|
20
16
|
// src/capabilities/blueprint-definition/index.ts
|
|
21
17
|
import { Capability } from "@dxos/app-framework";
|
|
22
|
-
var BlueprintDefinition = Capability.lazy("BlueprintDefinition", () => import("./blueprint-definition-
|
|
18
|
+
var BlueprintDefinition = Capability.lazy("BlueprintDefinition", () => import("./blueprint-definition-LWRZPLQL.mjs"));
|
|
23
19
|
|
|
24
20
|
// src/capabilities/react-surface/index.ts
|
|
25
21
|
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
26
|
-
var ReactSurface = Capability2.lazy("ReactSurface", () => import("./react-surface-
|
|
22
|
+
var ReactSurface = Capability2.lazy("ReactSurface", () => import("./react-surface-M7QMAFTB.mjs"));
|
|
27
23
|
|
|
28
24
|
// src/ChessPlugin.tsx
|
|
29
25
|
import * as Effect from "effect/Effect";
|
|
30
|
-
import {
|
|
26
|
+
import { Plugin } from "@dxos/app-framework";
|
|
27
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
31
28
|
|
|
32
29
|
// src/translations.ts
|
|
33
30
|
var translations = [
|
|
@@ -39,6 +36,7 @@ var translations = [
|
|
|
39
36
|
"typename label_one": "Game",
|
|
40
37
|
"typename label_other": "Games",
|
|
41
38
|
"object name placeholder": "New game",
|
|
39
|
+
"add object label": "Add game",
|
|
42
40
|
"rename object label": "Rename game",
|
|
43
41
|
"delete object label": "Delete game",
|
|
44
42
|
"object deleted label": "Game deleted"
|
|
@@ -60,39 +58,36 @@ var translations = [
|
|
|
60
58
|
];
|
|
61
59
|
|
|
62
60
|
// src/ChessPlugin.tsx
|
|
63
|
-
var ChessPlugin = Plugin.define(meta).pipe(
|
|
64
|
-
|
|
65
|
-
}),
|
|
61
|
+
var ChessPlugin = Plugin.define(meta).pipe(AppPlugin.addBlueprintDefinitionModule({
|
|
62
|
+
activate: BlueprintDefinition
|
|
63
|
+
}), AppPlugin.addMetadataModule({
|
|
66
64
|
metadata: {
|
|
67
65
|
id: Chess_exports.Game.typename,
|
|
68
66
|
metadata: {
|
|
69
67
|
icon: "ph--shield-chevron--regular",
|
|
70
68
|
iconHue: "amber",
|
|
71
69
|
blueprints: [
|
|
72
|
-
|
|
70
|
+
chess_blueprint_default.key
|
|
73
71
|
],
|
|
74
|
-
createObject: (props) => Effect.sync(() => Chess_exports.make(props))
|
|
75
|
-
addToCollectionOnCreate: true
|
|
72
|
+
createObject: (props) => Effect.sync(() => Chess_exports.make(props))
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
|
-
}),
|
|
75
|
+
}), AppPlugin.addSchemaModule({
|
|
79
76
|
schema: [
|
|
80
77
|
Chess_exports.Game
|
|
81
78
|
]
|
|
82
|
-
}),
|
|
79
|
+
}), AppPlugin.addSurfaceModule({
|
|
83
80
|
activate: ReactSurface
|
|
84
|
-
}),
|
|
85
|
-
|
|
81
|
+
}), AppPlugin.addTranslationsModule({
|
|
82
|
+
translations
|
|
86
83
|
}), Plugin.make);
|
|
87
84
|
export {
|
|
88
85
|
BlueprintDefinition,
|
|
89
86
|
Chess_exports as Chess,
|
|
90
|
-
|
|
87
|
+
chess_blueprint_default as ChessBlueprint,
|
|
91
88
|
functions_exports as ChessFunctions,
|
|
92
89
|
ChessPlugin,
|
|
93
90
|
Chessboard,
|
|
94
|
-
ChessboardContainer,
|
|
95
|
-
ExtendedChessModel,
|
|
96
91
|
ReactSurface,
|
|
97
92
|
meta
|
|
98
93
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/blueprint-definition/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Capability", "BlueprintDefinition", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "Effect", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type CreateObject } from '@dxos/plugin-space/types';\n\nimport { ChessBlueprint } from './blueprints';\nimport { BlueprintDefinition, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { Chess } from './types';\n\nexport const ChessPlugin = Plugin.define(meta).pipe(\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addMetadataModule({\n metadata: {\n id: Chess.Game.typename,\n metadata: {\n icon: 'ph--shield-chevron--regular',\n iconHue: 'amber',\n blueprints: [ChessBlueprint.key],\n createObject: ((props) => Effect.sync(() => Chess.make(props))) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Chess.Game] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\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 'add object label': 'Add game',\n 'rename object label': 'Rename game',\n 'delete object label': 'Delete game',\n 'object deleted label': 'Game deleted',\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,kBAAkB;AAEpB,IAAMC,sBAAsBC,WAAWC,KAAK,uBAAuB,MAAM,OAAO,qCAAA,CAAA;;;ACFvF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACFzE,YAAYC,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;;;ACEnB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,cAAMC,KAAKC,QAAQ,GAAG;QACrB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;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,OAAOC,OAAOC,IAAAA,EAAMC,KAC7CC,UAAUC,6BAA6B;EAAEC,UAAUC;AAAoB,CAAA,GACvEH,UAAUI,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,cAAMC,KAAKC;IACfJ,UAAU;MACRK,MAAM;MACNC,SAAS;MACTC,YAAY;QAACC,wBAAeC;;MAC5BC,cAAe,CAACC,UAAiBC,YAAK,MAAMV,cAAMW,KAAKF,KAAAA,CAAAA;IACzD;EACF;AACF,CAAA,GACAhB,UAAUmB,gBAAgB;EAAEC,QAAQ;IAACb,cAAMC;;AAAM,CAAA,GACjDR,UAAUqB,iBAAiB;EAAEnB,UAAUoB;AAAa,CAAA,GACpDtB,UAAUuB,sBAAsB;EAAEC;AAAa,CAAA,GAC/C5B,OAAOsB,IAAI;",
|
|
6
|
+
"names": ["Capability", "BlueprintDefinition", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "Effect", "Plugin", "AppPlugin", "translations", "Chess", "Game", "typename", "meta", "id", "ChessPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addBlueprintDefinitionModule", "activate", "BlueprintDefinition", "addMetadataModule", "metadata", "id", "Chess", "Game", "typename", "icon", "iconHue", "blueprints", "ChessBlueprint", "key", "createObject", "props", "sync", "make", "addSchemaModule", "schema", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/types/Chess.ts":{"bytes":5679,"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}],"format":"esm"},"src/types/index.ts":{"bytes":508,"imports":[{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"}],"format":"esm"},"src/blueprints/functions/create.ts":{"bytes":3827,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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/blueprints/functions/move.ts":{"bytes":5507,"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/echo","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/blueprints/functions/play.ts":{"bytes":7206,"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/echo","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/blueprints/functions/print.ts":{"bytes":4017,"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/functions","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/functions/index.ts":{"bytes":1031,"imports":[{"path":"src/blueprints/functions/create.ts","kind":"import-statement","original":"./create"},{"path":"src/blueprints/functions/move.ts","kind":"import-statement","original":"./move"},{"path":"src/blueprints/functions/play.ts","kind":"import-statement","original":"./play"},{"path":"src/blueprints/functions/print.ts","kind":"import-statement","original":"./print"}],"format":"esm"},"src/blueprints/chess-blueprint.ts":{"bytes":3090,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/blueprints/index.ts":{"bytes":747,"imports":[{"path":"src/blueprints/chess-blueprint.ts","kind":"import-statement","original":"./chess-blueprint"},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytes":2391,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"../../blueprints"}],"format":"esm"},"src/capabilities/blueprint-definition/index.ts":{"bytes":977,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/blueprint-definition/blueprint-definition.ts","kind":"dynamic-import","original":"./blueprint-definition"}],"format":"esm"},"src/meta.ts":{"bytes":2043,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/Info.tsx":{"bytes":24587,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/echo","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/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/Chessboard.tsx":{"bytes":14269,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","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/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Info.tsx","kind":"import-statement","original":"./Info"}],"format":"esm"},"src/components/ChessboardArticle.tsx":{"bytes":7938,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/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":3320,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/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/react-surface.tsx":{"bytes":3585,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"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/react-surface/index.ts":{"bytes":909,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":602,"imports":[{"path":"src/capabilities/blueprint-definition/index.ts","kind":"import-statement","original":"./blueprint-definition"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":3591,"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":4502,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"./blueprints"},{"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":916,"imports":[{"path":"src/blueprints/index.ts","kind":"import-statement","original":"./blueprints"},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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"},{"path":"src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"},"src/cli/plugin.ts":{"bytes":2783,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/cli/index.ts":{"bytes":458,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4607},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FO4ZNFN6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-OW6S2SRG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-73BDP7UV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-H3NUMCQ6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/blueprint-definition-P7TYXWMF.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-VNOWFKC6.mjs","kind":"dynamic-import"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["BlueprintDefinition","Chess","ChessBlueprint","ChessFunctions","ChessPlugin","Chessboard","ChessboardContainer","ExtendedChessModel","ReactSurface","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/capabilities/blueprint-definition/index.ts":{"bytesInOutput":169},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/ChessPlugin.tsx":{"bytesInOutput":787},"src/translations.ts":{"bytesInOutput":879}},"bytes":2801},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FO4ZNFN6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ChessBlueprint","ChessFunctions"],"entryPoint":"src/blueprints/index.ts","inputs":{},"bytes":282},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1438},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-H3NUMCQ6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ChessPlugin"],"entryPoint":"src/cli/index.ts","inputs":{"src/cli/plugin.ts":{"bytesInOutput":455},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":675},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Chess"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":161},"dist/lib/browser/blueprint-definition-P7TYXWMF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1288},"dist/lib/browser/blueprint-definition-P7TYXWMF.mjs":{"imports":[{"path":"dist/lib/browser/chunk-FO4ZNFN6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/blueprint-definition/blueprint-definition.ts","inputs":{"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytesInOutput":417}},"bytes":724},"dist/lib/browser/chunk-FO4ZNFN6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11990},"dist/lib/browser/chunk-FO4ZNFN6.mjs":{"imports":[{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"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/echo","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/echo","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/echo","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/functions","kind":"import-statement","external":true}],"exports":["chess_blueprint_exports","functions_exports"],"inputs":{"src/blueprints/chess-blueprint.ts":{"bytesInOutput":836},"src/blueprints/functions/index.ts":{"bytesInOutput":179},"src/blueprints/functions/create.ts":{"bytesInOutput":883},"src/blueprints/functions/move.ts":{"bytesInOutput":1372},"src/blueprints/functions/play.ts":{"bytesInOutput":1829},"src/blueprints/functions/print.ts":{"bytesInOutput":956},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":6531},"dist/lib/browser/ChessboardContainer-JZ4ANG4O.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5932},"dist/lib/browser/ChessboardContainer-JZ4ANG4O.mjs":{"imports":[{"path":"dist/lib/browser/chunk-73BDP7UV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-H3NUMCQ6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","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-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["ChessboardContainer","default"],"entryPoint":"src/components/ChessboardContainer.tsx","inputs":{"src/components/ChessboardContainer.tsx":{"bytesInOutput":659},"src/components/ChessboardArticle.tsx":{"bytesInOutput":1841}},"bytes":2892},"dist/lib/browser/react-surface-VNOWFKC6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"dist/lib/browser/react-surface-VNOWFKC6.mjs":{"imports":[{"path":"dist/lib/browser/chunk-OW6S2SRG.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-66H3V2YV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-73BDP7UV.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-H3NUMCQ6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"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/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":722}},"bytes":1101},"dist/lib/browser/chunk-OW6S2SRG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":413},"dist/lib/browser/chunk-OW6S2SRG.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/ChessboardContainer-JZ4ANG4O.mjs","kind":"dynamic-import"}],"exports":["ChessboardContainer"],"inputs":{"src/components/index.ts":{"bytesInOutput":114}},"bytes":220},"dist/lib/browser/chunk-66H3V2YV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2847},"dist/lib/browser/chunk-66H3V2YV.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.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}],"exports":["Chess_exports"],"inputs":{"src/types/Chess.ts":{"bytesInOutput":1523},"src/types/index.ts":{"bytesInOutput":0}},"bytes":1670},"dist/lib/browser/chunk-73BDP7UV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20950},"dist/lib/browser/chunk-73BDP7UV.mjs":{"imports":[{"path":"dist/lib/browser/chunk-H3NUMCQ6.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","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/ui-theme","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/echo","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/ui-theme","kind":"import-statement","external":true}],"exports":["Chessboard","ExtendedChessModel"],"inputs":{"src/components/Chessboard.tsx":{"bytesInOutput":3183},"src/components/Info.tsx":{"bytesInOutput":6359}},"bytes":9777},"dist/lib/browser/chunk-H3NUMCQ6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":975},"dist/lib/browser/chunk-H3NUMCQ6.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":515}},"bytes":594},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
1
|
+
{"inputs":{"src/types/Chess.ts":{"bytes":5679,"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}],"format":"esm"},"src/types/index.ts":{"bytes":508,"imports":[{"path":"src/types/Chess.ts","kind":"import-statement","original":"./Chess"}],"format":"esm"},"src/blueprints/functions/create.ts":{"bytes":3779,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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/blueprints/functions/move.ts":{"bytes":5210,"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/echo","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/blueprints/functions/play.ts":{"bytes":6943,"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/echo","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/blueprints/functions/print.ts":{"bytes":4017,"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/functions","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/functions/index.ts":{"bytes":1266,"imports":[{"path":"src/blueprints/functions/create.ts","kind":"import-statement","original":"./create"},{"path":"src/blueprints/functions/move.ts","kind":"import-statement","original":"./move"},{"path":"src/blueprints/functions/play.ts","kind":"import-statement","original":"./play"},{"path":"src/blueprints/functions/print.ts","kind":"import-statement","original":"./print"}],"format":"esm"},"src/blueprints/chess-blueprint.ts":{"bytes":3319,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/blueprints/index.ts":{"bytes":785,"imports":[{"path":"src/blueprints/chess-blueprint.ts","kind":"import-statement","original":"./chess-blueprint"},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytes":1972,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"../../blueprints"}],"format":"esm"},"src/capabilities/blueprint-definition/index.ts":{"bytes":977,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/blueprint-definition/blueprint-definition.ts","kind":"dynamic-import","original":"./blueprint-definition"}],"format":"esm"},"src/meta.ts":{"bytes":2043,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/Chessboard/Info.tsx":{"bytes":24681,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/echo","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/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/components/Chessboard/types.ts":{"bytes":1304,"imports":[{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"src/components/Chessboard/Chessboard.tsx":{"bytes":14374,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-react","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/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Chessboard/Info.tsx","kind":"import-statement","original":"./Info"},{"path":"src/components/Chessboard/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/Chessboard/index.ts":{"bytes":484,"imports":[{"path":"src/components/Chessboard/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"src/components/index.ts":{"bytes":473,"imports":[{"path":"src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"src/containers/ChessArticle/ChessArticle.tsx":{"bytes":8127,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/containers/ChessArticle/index.ts":{"bytes":656,"imports":[{"path":"src/containers/ChessArticle/ChessArticle.tsx","kind":"import-statement","original":"./ChessArticle"}],"format":"esm"},"src/containers/ChessCard/ChessCard.tsx":{"bytes":1770,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"}],"format":"esm"},"src/containers/ChessCard/index.ts":{"bytes":624,"imports":[{"path":"src/containers/ChessCard/ChessCard.tsx","kind":"import-statement","original":"./ChessCard"}],"format":"esm"},"src/containers/index.ts":{"bytes":1043,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/ChessArticle/index.ts","kind":"dynamic-import","original":"./ChessArticle"},{"path":"src/containers/ChessCard/index.ts","kind":"dynamic-import","original":"./ChessCard"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":4497,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/containers/index.ts","kind":"import-statement","original":"../../containers"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":909,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":602,"imports":[{"path":"src/capabilities/blueprint-definition/index.ts","kind":"import-statement","original":"./blueprint-definition"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":3715,"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":4354,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"./blueprints"},{"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":943,"imports":[{"path":"src/blueprints/index.ts","kind":"import-statement","original":"./blueprints"},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/components/Chessboard/index.ts","kind":"import-statement","original":"./components/Chessboard"},{"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"},"src/cli/plugin.ts":{"bytes":2699,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/cli/index.ts":{"bytes":458,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4587},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VK2W2UDJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-JP6G6VR6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-RGHZ5CDO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/blueprint-definition-LWRZPLQL.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-M7QMAFTB.mjs","kind":"dynamic-import"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["BlueprintDefinition","Chess","ChessBlueprint","ChessFunctions","ChessPlugin","Chessboard","ReactSurface","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/capabilities/blueprint-definition/index.ts":{"bytesInOutput":169},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/ChessPlugin.tsx":{"bytesInOutput":769},"src/translations.ts":{"bytesInOutput":919}},"bytes":2694},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VK2W2UDJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ChessBlueprint","ChessFunctions"],"entryPoint":"src/blueprints/index.ts","inputs":{},"bytes":282},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1394},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-RGHZ5CDO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["ChessPlugin"],"entryPoint":"src/cli/index.ts","inputs":{"src/cli/plugin.ts":{"bytesInOutput":449},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":669},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Chess"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":161},"dist/lib/browser/blueprint-definition-LWRZPLQL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1036},"dist/lib/browser/blueprint-definition-LWRZPLQL.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VK2W2UDJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/blueprint-definition/blueprint-definition.ts","inputs":{"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytesInOutput":363}},"bytes":670},"dist/lib/browser/chunk-VK2W2UDJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12007},"dist/lib/browser/chunk-VK2W2UDJ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"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/echo","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/echo","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/echo","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/functions","kind":"import-statement","external":true}],"exports":["chess_blueprint_default","functions_exports"],"inputs":{"src/blueprints/chess-blueprint.ts":{"bytesInOutput":779},"src/blueprints/functions/index.ts":{"bytesInOutput":338},"src/blueprints/functions/create.ts":{"bytesInOutput":875},"src/blueprints/functions/move.ts":{"bytesInOutput":1293},"src/blueprints/functions/play.ts":{"bytesInOutput":1754},"src/blueprints/functions/print.ts":{"bytesInOutput":956},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":6509},"dist/lib/browser/ChessArticle-UDSL3OJ4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4666},"dist/lib/browser/ChessArticle-UDSL3OJ4.mjs":{"imports":[{"path":"dist/lib/browser/chunk-WYUTI2K4.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-JP6G6VR6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-RGHZ5CDO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ChessArticle/index.ts","inputs":{"src/containers/ChessArticle/ChessArticle.tsx":{"bytesInOutput":1918},"src/containers/ChessArticle/index.ts":{"bytesInOutput":41}},"bytes":2308},"dist/lib/browser/ChessCard-OIRFQMOJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1135},"dist/lib/browser/ChessCard-OIRFQMOJ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-WYUTI2K4.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-JP6G6VR6.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-RGHZ5CDO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ChessCard/index.ts","inputs":{"src/containers/ChessCard/ChessCard.tsx":{"bytesInOutput":274},"src/containers/ChessCard/index.ts":{"bytesInOutput":35}},"bytes":627},"dist/lib/browser/chunk-WYUTI2K4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-WYUTI2K4.mjs":{"imports":[],"exports":[],"inputs":{"src/components/index.ts":{"bytesInOutput":0}},"bytes":44},"dist/lib/browser/chunk-JP6G6VR6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21538},"dist/lib/browser/chunk-JP6G6VR6.mjs":{"imports":[{"path":"dist/lib/browser/chunk-RGHZ5CDO.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-react","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/ui-theme","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/echo","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/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["Chessboard"],"inputs":{"src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":2965},"src/components/Chessboard/Info.tsx":{"bytesInOutput":6381},"src/components/Chessboard/types.ts":{"bytesInOutput":201},"src/components/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":9832},"dist/lib/browser/react-surface-M7QMAFTB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2622},"dist/lib/browser/react-surface-M7QMAFTB.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YJ2NLHEY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-RGHZ5CDO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/ChessArticle-UDSL3OJ4.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/ChessCard-OIRFQMOJ.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":930},"src/containers/index.ts":{"bytesInOutput":164}},"bytes":1461},"dist/lib/browser/chunk-YJ2NLHEY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2847},"dist/lib/browser/chunk-YJ2NLHEY.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.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}],"exports":["Chess_exports"],"inputs":{"src/types/Chess.ts":{"bytesInOutput":1523},"src/types/index.ts":{"bytesInOutput":0}},"bytes":1670},"dist/lib/browser/chunk-RGHZ5CDO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":975},"dist/lib/browser/chunk-RGHZ5CDO.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":515}},"bytes":594},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Chess_exports
|
|
3
|
+
} from "./chunk-YJ2NLHEY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-RGHZ5CDO.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
13
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
14
|
+
import { Obj } from "@dxos/echo";
|
|
15
|
+
|
|
16
|
+
// src/containers/index.ts
|
|
17
|
+
import { lazy } from "react";
|
|
18
|
+
var ChessArticle = lazy(() => import("./ChessArticle-UDSL3OJ4.mjs"));
|
|
19
|
+
var ChessCard = lazy(() => import("./ChessCard-OIRFQMOJ.mjs"));
|
|
20
|
+
|
|
21
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
22
|
+
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
|
|
23
|
+
Surface.create({
|
|
24
|
+
id: meta.id,
|
|
25
|
+
role: [
|
|
26
|
+
"article",
|
|
27
|
+
"section"
|
|
28
|
+
],
|
|
29
|
+
filter: (data) => Obj.instanceOf(Chess_exports.Game, data.subject),
|
|
30
|
+
component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessArticle, {
|
|
31
|
+
role,
|
|
32
|
+
subject: data.subject
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
Surface.create({
|
|
36
|
+
id: meta.id,
|
|
37
|
+
role: [
|
|
38
|
+
"card--content"
|
|
39
|
+
],
|
|
40
|
+
filter: (data) => Obj.instanceOf(Chess_exports.Game, data.subject),
|
|
41
|
+
component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessCard, {
|
|
42
|
+
role,
|
|
43
|
+
subject: data.subject
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
])));
|
|
47
|
+
export {
|
|
48
|
+
react_surface_default as default
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=react-surface-M7QMAFTB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/containers/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { Obj } from '@dxos/echo';\n\nimport { ChessArticle, ChessCard } from '../../containers';\nimport { meta } from '../../meta';\nimport { Chess } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: meta.id,\n role: ['article', 'section'],\n filter: (data): data is { subject: Chess.Game } => Obj.instanceOf(Chess.Game, data.subject),\n component: ({ data, role }) => <ChessArticle role={role} subject={data.subject} />,\n }),\n Surface.create({\n id: meta.id,\n role: ['card--content'],\n filter: (data): data is { subject: Chess.Game } => Obj.instanceOf(Chess.Game, data.subject),\n component: ({ data, role }) => <ChessCard role={role} subject={data.subject} />,\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const ChessArticle: ComponentType<any> = lazy(() => import('./ChessArticle'));\nexport const ChessCard: ComponentType<any> = lazy(() => import('./ChessCard'));\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,WAAW;;;ACLpB,SAA6BC,YAAY;AAElC,IAAMC,eAAmCC,KAAK,MAAM,OAAO,6BAAA,CAAA;AAC3D,IAAMC,YAAgCD,KAAK,MAAM,OAAO,0BAAA,CAAA;;;ADQ/D,IAAA,wBAAeE,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,aAAaC,cAAc;EAChDC,QAAQC,OAAO;IACbC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAA0CC,IAAIC,WAAWC,cAAMC,MAAMJ,KAAKK,OAAO;IAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACS,cAAAA;MAAaT;MAAYO,SAASL,KAAKK;;EACzE,CAAA;EACAX,QAAQC,OAAO;IACbC,IAAIC,KAAKD;IACTE,MAAM;MAAC;;IACPC,QAAQ,CAACC,SAA0CC,IAAIC,WAAWC,cAAMC,MAAMJ,KAAKK,OAAO;IAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACU,WAAAA;MAAUV;MAAYO,SAASL,KAAKK;;EACtE,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "Obj", "lazy", "ChessArticle", "lazy", "ChessCard", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Chess", "Game", "subject", "component", "ChessArticle", "ChessCard"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import "./chunk-7XDEO6IJ.mjs";
|
|
3
|
+
import {
|
|
4
|
+
Chessboard
|
|
5
|
+
} from "./chunk-FK7NVSOG.mjs";
|
|
6
|
+
import {
|
|
7
|
+
meta
|
|
8
|
+
} from "./chunk-FYPVCMP4.mjs";
|
|
9
|
+
import "./chunk-HSLMI22Q.mjs";
|
|
10
|
+
|
|
11
|
+
// src/containers/ChessArticle/ChessArticle.tsx
|
|
12
|
+
import React, { useCallback, useRef, useState } from "react";
|
|
13
|
+
import { Panel, Toolbar, useTranslation } from "@dxos/react-ui";
|
|
14
|
+
import { mx } from "@dxos/ui-theme";
|
|
15
|
+
var ChessArticle = ({ role, subject: game }) => {
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
|
+
const [orientation, setOrientation] = useState("white");
|
|
18
|
+
const [open, setOpen] = useState(true);
|
|
19
|
+
const controller = useRef(null);
|
|
20
|
+
const handleSelect = useCallback((index) => {
|
|
21
|
+
controller.current?.setMoveNumber(index);
|
|
22
|
+
}, []);
|
|
23
|
+
return /* @__PURE__ */ React.createElement(Chessboard.Root, {
|
|
24
|
+
game,
|
|
25
|
+
ref: controller
|
|
26
|
+
}, /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
27
|
+
role,
|
|
28
|
+
classNames: "@container"
|
|
29
|
+
}, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
30
|
+
asChild: true
|
|
31
|
+
}, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
|
|
32
|
+
icon: "ph--info--regular",
|
|
33
|
+
iconOnly: true,
|
|
34
|
+
label: t("toggle info button"),
|
|
35
|
+
disabled: open,
|
|
36
|
+
classNames: mx("invisible @3xl:visible"),
|
|
37
|
+
onClick: () => setOpen((open2) => !open2)
|
|
38
|
+
}))), /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement("div", {
|
|
39
|
+
className: mx("grid h-full w-full gap-2", open && "@3xl:grid-cols-[1fr_320px]", role === "section" && "aspect-square", role === "section" && open && "@3xl:aspect-auto")
|
|
40
|
+
}, /* @__PURE__ */ React.createElement(Chessboard.Content, null, /* @__PURE__ */ React.createElement(Chessboard.Board, {
|
|
41
|
+
classNames: "m-4 rounded-xs overflow-hidden",
|
|
42
|
+
orientation
|
|
43
|
+
})), open && /* @__PURE__ */ React.createElement("div", {
|
|
44
|
+
className: "hidden @3xl:flex flex-col p-8 justify-center items-center overflow-hidden"
|
|
45
|
+
}, /* @__PURE__ */ React.createElement(Chessboard.Info, {
|
|
46
|
+
orientation,
|
|
47
|
+
min: 8,
|
|
48
|
+
max: 8,
|
|
49
|
+
onOrientationChange: setOrientation,
|
|
50
|
+
onClose: () => setOpen(false),
|
|
51
|
+
onSelect: handleSelect
|
|
52
|
+
}))))));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// src/containers/ChessArticle/index.ts
|
|
56
|
+
var ChessArticle_default = ChessArticle;
|
|
57
|
+
export {
|
|
58
|
+
ChessArticle_default as default
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=ChessArticle-76MOXLJM.mjs.map
|