@dxos/plugin-chess 0.8.3-staging.0fa589b → 0.8.4-main.03d5cd7b56
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/neutral/ChessArticle-QLLKZGPH.mjs +88 -0
- package/dist/lib/neutral/ChessArticle-QLLKZGPH.mjs.map +7 -0
- package/dist/lib/neutral/ChessCard-I5RSZZIP.mjs +19 -0
- package/dist/lib/neutral/ChessCard-I5RSZZIP.mjs.map +7 -0
- package/dist/lib/neutral/ChessPlugin.mjs +30 -0
- package/dist/lib/neutral/ChessPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ChessPlugin.node.mjs +23 -0
- package/dist/lib/neutral/ChessPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-PZXHAYLD.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +13 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5UOTTW6U.mjs +8 -0
- package/dist/lib/neutral/chunk-5UOTTW6U.mjs.map +7 -0
- package/dist/lib/neutral/chunk-E4LZPHAQ.mjs +148 -0
- package/dist/lib/neutral/chunk-E4LZPHAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FFXSIHW6.mjs +21 -0
- package/dist/lib/neutral/chunk-FFXSIHW6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-XWKNXG62.mjs +34 -0
- package/dist/lib/neutral/chunk-XWKNXG62.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +239 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +11 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/game-variant-24UKIBRM.mjs +40 -0
- package/dist/lib/neutral/game-variant-24UKIBRM.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/move-RQZ7BJY3.mjs +37 -0
- package/dist/lib/neutral/move-RQZ7BJY3.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs +13 -0
- package/dist/lib/neutral/operation-handler-EKZKFQUG.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/play-GDGCEPQL.mjs +46 -0
- package/dist/lib/neutral/play-GDGCEPQL.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/print-ZQA74KZI.mjs +29 -0
- package/dist/lib/neutral/print-ZQA74KZI.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +34 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/ChessPlugin.d.ts +3 -1
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/ChessPlugin.node.d.ts +8 -0
- package/dist/types/src/ChessPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ChessPlugin.test.d.ts +2 -0
- package/dist/types/src/ChessPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/chess-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/game-variant.d.ts +6 -0
- package/dist/types/src/capabilities/game-variant.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/Chessboard.d.ts +38 -0
- package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +57 -0
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/Info.d.ts +20 -0
- 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 +1 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +5 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +56 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChessArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/ChessCard.d.ts +5 -0
- package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts +15 -0
- package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/index.d.ts +2 -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 +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/move.d.ts +5 -0
- package/dist/types/src/operations/move.d.ts.map +1 -0
- package/dist/types/src/operations/play.d.ts +5 -0
- package/dist/types/src/operations/play.d.ts.map +1 -0
- package/dist/types/src/operations/print.d.ts +5 -0
- package/dist/types/src/operations/print.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +34 -23
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Chess.d.ts +18 -0
- package/dist/types/src/types/Chess.d.ts.map +1 -0
- package/dist/types/src/types/ChessOperation.d.ts +24 -0
- package/dist/types/src/types/ChessOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +109 -51
- package/src/ChessPlugin.node.ts +23 -0
- package/src/ChessPlugin.test.ts +49 -0
- package/src/ChessPlugin.tsx +20 -54
- package/src/blueprints/chess-blueprint.ts +32 -0
- package/src/blueprints/index.ts +5 -0
- package/src/capabilities/blueprint-definition.ts +19 -0
- package/src/capabilities/game-variant.ts +42 -0
- package/src/capabilities/index.ts +9 -4
- package/src/capabilities/operation-handler.ts +14 -0
- package/src/components/Chessboard/Chessboard.stories.tsx +94 -0
- package/src/components/Chessboard/Chessboard.tsx +180 -0
- package/src/components/Chessboard/Info.tsx +193 -0
- package/src/components/Chessboard/index.ts +5 -0
- package/src/components/Chessboard/types.ts +18 -0
- package/src/components/index.ts +2 -6
- package/src/containers/ChessArticle/ChessArticle.stories.tsx +59 -0
- package/src/containers/ChessArticle/ChessArticle.tsx +108 -0
- package/src/containers/ChessArticle/index.ts +5 -0
- package/src/containers/ChessCard/ChessCard.stories.tsx +47 -0
- package/src/containers/ChessCard/ChessCard.tsx +27 -0
- package/src/containers/ChessCard/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/index.ts +2 -4
- package/src/meta.ts +9 -7
- package/src/operations/index.ts +11 -0
- package/src/operations/move.ts +36 -0
- package/src/operations/play.ts +45 -0
- package/src/operations/print.ts +28 -0
- package/src/plugin.ts +11 -0
- package/src/translations.ts +22 -14
- package/src/types/Chess.ts +59 -0
- package/src/types/ChessOperation.ts +85 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/browser/ChessContainer-S72CLKGK.mjs +0 -101
- package/dist/lib/browser/ChessContainer-S72CLKGK.mjs.map +0 -7
- package/dist/lib/browser/artifact-definition-NLIDMZ42.mjs +0 -182
- package/dist/lib/browser/artifact-definition-NLIDMZ42.mjs.map +0 -7
- package/dist/lib/browser/chunk-5QBQW62M.mjs +0 -8
- package/dist/lib/browser/chunk-5QBQW62M.mjs.map +0 -7
- package/dist/lib/browser/chunk-6XPI4FTK.mjs +0 -61
- package/dist/lib/browser/chunk-6XPI4FTK.mjs.map +0 -7
- package/dist/lib/browser/chunk-KA3H3Z76.mjs +0 -65
- package/dist/lib/browser/chunk-KA3H3Z76.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -97
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-65W3KVTW.mjs +0 -28
- package/dist/lib/browser/intent-resolver-65W3KVTW.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-GYE5E74A.mjs +0 -42
- package/dist/lib/browser/react-surface-GYE5E74A.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -13
- package/dist/lib/node/ChessContainer-EQUVXDJC.cjs +0 -123
- package/dist/lib/node/ChessContainer-EQUVXDJC.cjs.map +0 -7
- package/dist/lib/node/artifact-definition-VHJ54X2P.cjs +0 -196
- package/dist/lib/node/artifact-definition-VHJ54X2P.cjs.map +0 -7
- package/dist/lib/node/chunk-OTMP6HPY.cjs +0 -93
- package/dist/lib/node/chunk-OTMP6HPY.cjs.map +0 -7
- package/dist/lib/node/chunk-R6JAL3RE.cjs +0 -40
- package/dist/lib/node/chunk-R6JAL3RE.cjs.map +0 -7
- package/dist/lib/node/chunk-THN2FKB3.cjs +0 -86
- package/dist/lib/node/chunk-THN2FKB3.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -121
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-BQGAQM27.cjs +0 -43
- package/dist/lib/node/intent-resolver-BQGAQM27.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-TZDWBTEY.cjs +0 -62
- package/dist/lib/node/react-surface-TZDWBTEY.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -35
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs +0 -102
- package/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs.map +0 -7
- package/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs +0 -183
- package/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4V3WNUDH.mjs +0 -67
- package/dist/lib/node-esm/chunk-4V3WNUDH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KHMDMPR2.mjs +0 -10
- package/dist/lib/node-esm/chunk-KHMDMPR2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MVMMCPHE.mjs +0 -63
- package/dist/lib/node-esm/chunk-MVMMCPHE.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -98
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs +0 -29
- package/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-LRFYFOFF.mjs +0 -43
- package/dist/lib/node-esm/react-surface-LRFYFOFF.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -14
- package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/ChessComponent.d.ts +0 -6
- package/dist/types/src/components/ChessComponent.d.ts.map +0 -1
- package/dist/types/src/components/ChessContainer.d.ts +0 -8
- package/dist/types/src/components/ChessContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChessPanel.d.ts +0 -11
- package/dist/types/src/components/ChessPanel.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard.stories.d.ts +0 -8
- package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
- package/dist/types/src/components/PlayerSelector.d.ts +0 -8
- package/dist/types/src/components/PlayerSelector.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -29
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -40
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/artifact-definition.ts +0 -124
- package/src/capabilities/intent-resolver.ts +0 -26
- package/src/capabilities/react-surface.tsx +0 -29
- package/src/components/ChessComponent.tsx +0 -54
- package/src/components/ChessContainer.tsx +0 -35
- package/src/components/ChessPanel.tsx +0 -67
- package/src/components/Chessboard.stories.tsx +0 -39
- package/src/components/PlayerSelector.tsx +0 -80
- package/src/types/schema.ts +0 -34
- package/src/types/types.ts +0 -26
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts", "../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { Type } from '@dxos/echo';\n\nexport const MoveSchema = Schema.mutable(\n Schema.partial(\n Schema.Struct({\n source: Schema.String,\n target: Schema.String,\n piece: Schema.String,\n }),\n ),\n);\n\nexport const ChessType = Schema.Struct({\n name: Schema.optional(Schema.String),\n playerWhite: Schema.String,\n playerBlack: Schema.String,\n moves: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Remove. Redundant with moves.\n pgn: Schema.String,\n fen: Schema.String,\n}).pipe(\n Schema.partial,\n Type.Obj({\n typename: 'dxos.org/type/Chess',\n version: '0.1.0',\n }),\n);\nexport interface ChessType extends Schema.Schema.Type<typeof ChessType> {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { Obj } from '@dxos/echo';\n\nimport { ChessType } from './schema';\nimport { CHESS_PLUGIN } from '../meta';\n\nexport namespace ChessAction {\n const CHESS_ACTION = `${CHESS_PLUGIN}/action`;\n\n export class Create extends Schema.TaggedClass<Create>()(`${CHESS_ACTION}/create`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n fen: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: ChessType,\n }),\n }) {}\n}\n\nexport const isObject = Obj.instanceOf(ChessType);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CHESS_PLUGIN = 'dxos.org/plugin/chess';\n\nexport const meta: PluginMeta = {\n id: CHESS_PLUGIN,\n name: 'Chess',\n description:\n 'Chess is a simple plugin which allows you to render an interactive chessboard inside of a plank. This chessboard can be used for collaborative chess games, or for practice experiments with the LLM. ',\n icon: 'ph--shield-chevron--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n screenshots: ['https://dxos.network/plugin-details-chess-dark.png'],\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,cAAc;AAEvB,SAASC,YAAY;AAEd,IAAMC,aAAaC,OAAOC,QAC/BD,OAAOE,QACLF,OAAOG,OAAO;EACZC,QAAQJ,OAAOK;EACfC,QAAQN,OAAOK;EACfE,OAAOP,OAAOK;AAChB,CAAA,CAAA,CAAA;AAIG,IAAMG,YAAYR,OAAOG,OAAO;EACrCM,MAAMT,OAAOU,SAASV,OAAOK,MAAM;EACnCM,aAAaX,OAAOK;EACpBO,aAAaZ,OAAOK;EACpBQ,OAAOb,OAAOC,QAAQD,OAAOc,MAAMd,OAAOK,MAAM,CAAA;;EAEhDU,KAAKf,OAAOK;EACZW,KAAKhB,OAAOK;AACd,CAAA,EAAGY,KACDjB,OAAOE,SACPgB,KAAKC,IAAI;EACPC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;;;AC3BF,SAASC,UAAAA,eAAc;AAEvB,SAASC,WAAW;;;ACAb,IAAMC,eAAe;AAErB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,aAAa;IAAC;;AAChB;;;UDLiBC,cAAAA;AACf,QAAMC,eAAe,GAAGC,YAAAA;EAEjB,MAAMC,eAAeC,QAAOC,YAAW,EAAW,GAAGJ,YAAAA,WAAuB;IACjFK,OAAOF,QAAOG,OAAO;MACnBC,MAAMJ,QAAOK,SAASL,QAAOM,MAAM;MACnCC,KAAKP,QAAOK,SAASL,QAAOM,MAAM;IACpC,CAAA;IACAE,QAAQR,QAAOG,OAAO;MACpBM,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;eARSX,SAAAA;AASf,GAZiBH,gBAAAA,cAAAA,CAAAA,EAAAA;AAcV,IAAMe,WAAWC,IAAIC,WAAWH,SAAAA;;",
|
|
6
|
-
"names": ["Schema", "Type", "MoveSchema", "Schema", "mutable", "partial", "Struct", "source", "String", "target", "piece", "ChessType", "name", "optional", "playerWhite", "playerBlack", "moves", "Array", "pgn", "fen", "pipe", "Type", "Obj", "typename", "version", "Schema", "Obj", "CHESS_PLUGIN", "meta", "id", "name", "description", "icon", "source", "screenshots", "ChessAction", "CHESS_ACTION", "CHESS_PLUGIN", "Create", "Schema", "TaggedClass", "input", "Struct", "name", "optional", "String", "fen", "output", "object", "ChessType", "isObject", "Obj", "instanceOf"]
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// packages/plugins/plugin-chess/src/components/index.ts
|
|
4
|
-
import { lazy } from "react";
|
|
5
|
-
var ChessContainer = lazy(() => import("./ChessContainer-KSLGJHPW.mjs"));
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
ChessContainer
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=chunk-KHMDMPR2.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './ChessComponent';\n\nexport const ChessContainer = lazy(() => import('./ChessContainer'));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,YAAY;AAId,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "ChessContainer", "lazy"]
|
|
7
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// packages/plugins/plugin-chess/src/components/ChessComponent.tsx
|
|
4
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
5
|
-
import { Chess } from "chess.js";
|
|
6
|
-
import React, { useCallback, useEffect, useMemo } from "react";
|
|
7
|
-
import { log } from "@dxos/log";
|
|
8
|
-
import { getSpace } from "@dxos/react-client/echo";
|
|
9
|
-
import { ChessModel, Board, Chessboard } from "@dxos/react-ui-gameboard";
|
|
10
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/components/ChessComponent.tsx";
|
|
11
|
-
var ChessComponent = ({ game }) => {
|
|
12
|
-
var _effect = _useSignals();
|
|
13
|
-
try {
|
|
14
|
-
const model = useMemo(() => new ChessModel(), []);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (!model || game.pgn !== model?.game.pgn()) {
|
|
17
|
-
const chess = new Chess();
|
|
18
|
-
if (game.pgn) {
|
|
19
|
-
try {
|
|
20
|
-
chess.loadPgn(game.pgn);
|
|
21
|
-
} catch (err) {
|
|
22
|
-
log.catch(err, {
|
|
23
|
-
game
|
|
24
|
-
}, {
|
|
25
|
-
F: __dxlog_file,
|
|
26
|
-
L: 23,
|
|
27
|
-
S: void 0,
|
|
28
|
-
C: (f, a) => f(...a)
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
model.initialize(chess.fen());
|
|
33
|
-
}
|
|
34
|
-
}, [
|
|
35
|
-
game.pgn
|
|
36
|
-
]);
|
|
37
|
-
const space = getSpace(game);
|
|
38
|
-
if (!space) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const handleDrop = useCallback((move) => {
|
|
42
|
-
if (model.makeMove(move)) {
|
|
43
|
-
game.pgn = model.game.pgn();
|
|
44
|
-
game.fen = model.game.fen();
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
48
|
-
}, [
|
|
49
|
-
model
|
|
50
|
-
]);
|
|
51
|
-
return /* @__PURE__ */ React.createElement(Board.Root, {
|
|
52
|
-
model,
|
|
53
|
-
onDrop: handleDrop
|
|
54
|
-
}, /* @__PURE__ */ React.createElement(Chessboard, null));
|
|
55
|
-
} finally {
|
|
56
|
-
_effect.f();
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
ChessComponent
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=chunk-MVMMCPHE.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/ChessComponent.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n\nimport { log } from '@dxos/log';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';\n\nimport { type ChessType } from '../types';\n\nexport const ChessComponent = ({ game }: { game: ChessType }) => {\n const model = useMemo(() => new ChessModel(), []);\n useEffect(() => {\n if (!model || game.pgn !== model?.game.pgn()) {\n const chess = new Chess();\n if (game.pgn) {\n try {\n chess.loadPgn(game.pgn);\n } catch (err) {\n log.catch(err, { game });\n }\n }\n\n model.initialize(chess.fen());\n }\n }, [game.pgn]);\n\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(\n (move) => {\n if (model.makeMove(move)) {\n game.pgn = model.game.pgn();\n game.fen = model.game.fen();\n return true;\n }\n\n return false;\n },\n [model],\n );\n\n return (\n <Board.Root model={model} onDrop={handleDrop}>\n <Chessboard />\n </Board.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;AAIA,SAASA,aAAa;AACtB,OAAOC,SAASC,aAAaC,WAAWC,eAAe;AAEvD,SAASC,WAAW;AACpB,SAASC,gBAAgB;AACzB,SAASC,YAAYC,OAAOC,kBAAuC;;AAI5D,IAAMC,iBAAiB,CAAC,EAAEC,KAAI,MAAuB;;;AAC1D,UAAMC,QAAQR,QAAQ,MAAM,IAAIG,WAAAA,GAAc,CAAA,CAAE;AAChDJ,cAAU,MAAA;AACR,UAAI,CAACS,SAASD,KAAKE,QAAQD,OAAOD,KAAKE,IAAAA,GAAO;AAC5C,cAAMC,QAAQ,IAAId,MAAAA;AAClB,YAAIW,KAAKE,KAAK;AACZ,cAAI;AACFC,kBAAMC,QAAQJ,KAAKE,GAAG;UACxB,SAASG,KAAK;AACZX,gBAAIY,MAAMD,KAAK;cAAEL;YAAK,GAAA;;;;;;UACxB;QACF;AAEAC,cAAMM,WAAWJ,MAAMK,IAAG,CAAA;MAC5B;IACF,GAAG;MAACR,KAAKE;KAAI;AAEb,UAAMO,QAAQd,SAASK,IAAAA;AACvB,QAAI,CAACS,OAAO;AACV,aAAO;IACT;AAEA,UAAMC,aAAanB,YACjB,CAACoB,SAAAA;AACC,UAAIV,MAAMW,SAASD,IAAAA,GAAO;AACxBX,aAAKE,MAAMD,MAAMD,KAAKE,IAAG;AACzBF,aAAKQ,MAAMP,MAAMD,KAAKQ,IAAG;AACzB,eAAO;MACT;AAEA,aAAO;IACT,GACA;MAACP;KAAM;AAGT,WACE,sBAAA,cAACJ,MAAMgB,MAAI;MAACZ;MAAca,QAAQJ;OAChC,sBAAA,cAACZ,YAAAA,IAAAA,CAAAA;;;;AAGP;",
|
|
6
|
-
"names": ["Chess", "React", "useCallback", "useEffect", "useMemo", "log", "getSpace", "ChessModel", "Board", "Chessboard", "ChessComponent", "game", "model", "pgn", "chess", "loadPgn", "err", "catch", "initialize", "fen", "space", "handleDrop", "move", "makeMove", "Root", "onDrop"]
|
|
7
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ChessContainer
|
|
4
|
-
} from "./chunk-KHMDMPR2.mjs";
|
|
5
|
-
import {
|
|
6
|
-
CHESS_PLUGIN,
|
|
7
|
-
ChessAction,
|
|
8
|
-
ChessType,
|
|
9
|
-
meta
|
|
10
|
-
} from "./chunk-4V3WNUDH.mjs";
|
|
11
|
-
import {
|
|
12
|
-
ChessComponent
|
|
13
|
-
} from "./chunk-MVMMCPHE.mjs";
|
|
14
|
-
|
|
15
|
-
// packages/plugins/plugin-chess/src/capabilities/index.ts
|
|
16
|
-
import { lazy } from "@dxos/app-framework";
|
|
17
|
-
var ArtifactDefinition = lazy(() => import("./artifact-definition-CZGGG56Q.mjs"));
|
|
18
|
-
var IntentResolver = lazy(() => import("./intent-resolver-6TYVNVEU.mjs"));
|
|
19
|
-
var ReactSurface = lazy(() => import("./react-surface-LRFYFOFF.mjs"));
|
|
20
|
-
|
|
21
|
-
// packages/plugins/plugin-chess/src/ChessPlugin.tsx
|
|
22
|
-
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
23
|
-
import { ClientEvents } from "@dxos/plugin-client";
|
|
24
|
-
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
25
|
-
import { defineObjectForm } from "@dxos/plugin-space/types";
|
|
26
|
-
|
|
27
|
-
// packages/plugins/plugin-chess/src/translations.ts
|
|
28
|
-
import { Type } from "@dxos/echo";
|
|
29
|
-
var translations_default = [
|
|
30
|
-
{
|
|
31
|
-
"en-US": {
|
|
32
|
-
[Type.getTypename(ChessType)]: {
|
|
33
|
-
"typename label": "Game",
|
|
34
|
-
"typename label_zero": "Games",
|
|
35
|
-
"typename label_one": "Game",
|
|
36
|
-
"typename label_other": "Games",
|
|
37
|
-
"object name placeholder": "New game"
|
|
38
|
-
},
|
|
39
|
-
[CHESS_PLUGIN]: {
|
|
40
|
-
"plugin name": "Chess",
|
|
41
|
-
"delete game label": "Delete"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
// packages/plugins/plugin-chess/src/ChessPlugin.tsx
|
|
48
|
-
var ChessPlugin = () => definePlugin(meta, [
|
|
49
|
-
defineModule({
|
|
50
|
-
id: `${meta.id}/module/translations`,
|
|
51
|
-
activatesOn: Events.SetupTranslations,
|
|
52
|
-
activate: () => contributes(Capabilities.Translations, translations_default)
|
|
53
|
-
}),
|
|
54
|
-
defineModule({
|
|
55
|
-
id: `${meta.id}/module/metadata`,
|
|
56
|
-
activatesOn: Events.SetupMetadata,
|
|
57
|
-
activate: () => contributes(Capabilities.Metadata, {
|
|
58
|
-
id: ChessType.typename,
|
|
59
|
-
metadata: {
|
|
60
|
-
icon: "ph--shield-chevron--regular"
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
}),
|
|
64
|
-
defineModule({
|
|
65
|
-
id: `${meta.id}/module/object-form`,
|
|
66
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
67
|
-
activate: () => contributes(SpaceCapabilities.ObjectForm, defineObjectForm({
|
|
68
|
-
objectSchema: ChessType,
|
|
69
|
-
getIntent: () => createIntent(ChessAction.Create)
|
|
70
|
-
}))
|
|
71
|
-
}),
|
|
72
|
-
defineModule({
|
|
73
|
-
id: `${meta.id}/module/react-surface`,
|
|
74
|
-
activatesOn: Events.SetupReactSurface,
|
|
75
|
-
activate: ReactSurface
|
|
76
|
-
}),
|
|
77
|
-
defineModule({
|
|
78
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
79
|
-
activatesOn: Events.SetupIntentResolver,
|
|
80
|
-
activate: IntentResolver
|
|
81
|
-
}),
|
|
82
|
-
defineModule({
|
|
83
|
-
id: `${meta.id}/module/artifact-definition`,
|
|
84
|
-
activatesOn: Events.SetupArtifactDefinition,
|
|
85
|
-
activate: ArtifactDefinition
|
|
86
|
-
})
|
|
87
|
-
]);
|
|
88
|
-
export {
|
|
89
|
-
ArtifactDefinition,
|
|
90
|
-
CHESS_PLUGIN,
|
|
91
|
-
ChessComponent,
|
|
92
|
-
ChessContainer,
|
|
93
|
-
ChessPlugin,
|
|
94
|
-
IntentResolver,
|
|
95
|
-
ReactSurface,
|
|
96
|
-
meta
|
|
97
|
-
};
|
|
98
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ArtifactDefinition = lazy(() => import('./artifact-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ChessType,\n getIntent: () => createIntent(ChessAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Type } from '@dxos/echo';\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [Type.getTypename(ChessType)]: {\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 },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,qBAAqBC,KAAK,MAAM,OAAO,oCAAA,CAAA;AAC7C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACHjC,SAASC,YAAY;AAKrB,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,KAAKC,YAAYC,SAAAA,CAAAA,GAAa;QAC7B,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;MAC7B;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,qBAAqB;MACvB;IACF;EACF;;;;ADVK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,UAAUC;MACdC,UAAU;QACRC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MACRC,YACEY,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcT;MACdU,WAAW,MAAMC,aAAaC,YAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;EACA3B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;CACD;",
|
|
6
|
-
"names": ["lazy", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "Type", "Type", "getTypename", "ChessType", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChessType", "typename", "metadata", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "ArtifactDefinition"]
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ChessAction,
|
|
4
|
-
ChessType
|
|
5
|
-
} from "./chunk-4V3WNUDH.mjs";
|
|
6
|
-
|
|
7
|
-
// packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
|
|
8
|
-
import { Chess } from "chess.js";
|
|
9
|
-
import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
|
|
10
|
-
import { Obj } from "@dxos/echo";
|
|
11
|
-
var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
|
|
12
|
-
intent: ChessAction.Create,
|
|
13
|
-
resolve: ({ name, fen }) => {
|
|
14
|
-
const pgn = fen ? new Chess(fen).pgn() : void 0;
|
|
15
|
-
return {
|
|
16
|
-
data: {
|
|
17
|
-
object: Obj.make(ChessType, {
|
|
18
|
-
name,
|
|
19
|
-
fen,
|
|
20
|
-
pgn
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}));
|
|
26
|
-
export {
|
|
27
|
-
intent_resolver_default as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=intent-resolver-6TYVNVEU.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { ChessAction, ChessType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ChessAction.Create,\n resolve: ({ name, fen }) => {\n const pgn = fen ? new Chess(fen).pgn() : undefined;\n return {\n data: {\n object: Obj.make(ChessType, { name, fen, pgn }),\n },\n };\n },\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,aAAa;AAEtB,SAASC,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,WAAW;AAIpB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,YAAYC;EACpBC,SAAS,CAAC,EAAEC,MAAMC,IAAG,MAAE;AACrB,UAAMC,MAAMD,MAAM,IAAIE,MAAMF,GAAAA,EAAKC,IAAG,IAAKE;AACzC,WAAO;MACLC,MAAM;QACJC,QAAQC,IAAIC,KAAKC,WAAW;UAAET;UAAMC;UAAKC;QAAI,CAAA;MAC/C;IACF;EACF;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Chess", "Capabilities", "contributes", "createResolver", "Obj", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ChessAction", "Create", "resolve", "name", "fen", "pgn", "Chess", "undefined", "data", "object", "Obj", "make", "ChessType"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2033,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":3044,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":2702,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":554,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":19082,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2692,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":5508,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":9084,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3431,"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":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":872,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3766,"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":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1329,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":2169,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7256,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":754,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5095},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-KHMDMPR2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-MVMMCPHE.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-LRFYFOFF.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},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1500},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":445}},"bytes":2914},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":286},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8479},"packages/plugins/plugin-chess/dist/lib/node-esm/artifact-definition-CZGGG56Q.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5956}},"bytes":6308},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1375},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-6TYVNVEU.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs","kind":"import-statement"},{"path":"chess.js","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":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":503}},"bytes":835},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6168},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-MVMMCPHE.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":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":978},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2608}},"bytes":4040},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-LRFYFOFF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1790},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-LRFYFOFF.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-KHMDMPR2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-MVMMCPHE.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":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":715}},"bytes":1169},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-KHMDMPR2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":404},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-KHMDMPR2.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-KSLGJHPW.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":328},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3765},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-4V3WNUDH.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":586},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":553},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":2084},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-MVMMCPHE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2590},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-MVMMCPHE.mjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":1601}},"bytes":1835}}}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ChessContainer
|
|
4
|
-
} from "./chunk-KHMDMPR2.mjs";
|
|
5
|
-
import {
|
|
6
|
-
CHESS_PLUGIN,
|
|
7
|
-
ChessType,
|
|
8
|
-
isObject
|
|
9
|
-
} from "./chunk-4V3WNUDH.mjs";
|
|
10
|
-
import {
|
|
11
|
-
ChessComponent
|
|
12
|
-
} from "./chunk-MVMMCPHE.mjs";
|
|
13
|
-
|
|
14
|
-
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
15
|
-
import React from "react";
|
|
16
|
-
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
17
|
-
import { Obj } from "@dxos/echo";
|
|
18
|
-
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
19
|
-
createSurface({
|
|
20
|
-
id: CHESS_PLUGIN,
|
|
21
|
-
role: [
|
|
22
|
-
"article",
|
|
23
|
-
"section"
|
|
24
|
-
],
|
|
25
|
-
filter: (data) => isObject(data.subject),
|
|
26
|
-
component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessContainer, {
|
|
27
|
-
game: data.subject,
|
|
28
|
-
role
|
|
29
|
-
})
|
|
30
|
-
}),
|
|
31
|
-
createSurface({
|
|
32
|
-
id: "plugin-chess",
|
|
33
|
-
role: "canvas-node",
|
|
34
|
-
filter: Obj.instanceOf(ChessType),
|
|
35
|
-
component: ({ data }) => /* @__PURE__ */ React.createElement(ChessComponent, {
|
|
36
|
-
game: data
|
|
37
|
-
})
|
|
38
|
-
})
|
|
39
|
-
]);
|
|
40
|
-
export {
|
|
41
|
-
react_surface_default as default
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=react-surface-LRFYFOFF.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { ChessContainer } from '../components';\nimport { ChessComponent } from '../components/ChessComponent';\nimport { CHESS_PLUGIN } from '../meta';\nimport { ChessType, isObject } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: CHESS_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: ChessType } => isObject(data.subject),\n component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,\n }),\n createSurface({\n id: 'plugin-chess',\n role: 'canvas-node',\n filter: Obj.instanceOf(ChessType),\n component: ({ data }) => <ChessComponent game={data} />,\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AAOpB,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC;IACJC,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAAyCC,SAASD,KAAKE,OAAO;IACvEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,sBAAA,cAACM,gBAAAA;MAAeC,MAAML,KAAKE;MAASJ;;EACrE,CAAA;EACAH,cAAc;IACZC,IAAI;IACJE,MAAM;IACNC,QAAQO,IAAIC,WAAWC,SAAAA;IACvBL,WAAW,CAAC,EAAEH,KAAI,MAAO,sBAAA,cAACS,gBAAAA;MAAeJ,MAAML;;EACjD,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game", "Obj", "instanceOf", "ChessType", "ChessComponent"]
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ChessAction,
|
|
4
|
-
ChessType,
|
|
5
|
-
MoveSchema,
|
|
6
|
-
isObject
|
|
7
|
-
} from "../chunk-4V3WNUDH.mjs";
|
|
8
|
-
export {
|
|
9
|
-
ChessAction,
|
|
10
|
-
ChessType,
|
|
11
|
-
MoveSchema,
|
|
12
|
-
isObject
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
2
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
-
declare global {
|
|
4
|
-
interface ToolContextExtensions {
|
|
5
|
-
space?: Space;
|
|
6
|
-
dispatch?: PromiseIntentDispatcher;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/artifact").ArtifactDefinition>;
|
|
10
|
-
export default _default;
|
|
11
|
-
//# sourceMappingURL=artifact-definition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/artifact-definition.ts"],"names":[],"mappings":"AAQA,OAAO,EAAkD,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAMnH,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,uBAAuB,CAAC;KACpC;CACF;;AAED,wBAgGE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;;AAKhF,wBAcI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAQ/E,wBAcK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChessComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,6BAwC3D,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ChessType } from '../types';
|
|
3
|
-
declare const ChessContainer: ({ game }: {
|
|
4
|
-
game: ChessType;
|
|
5
|
-
role?: string;
|
|
6
|
-
}) => React.JSX.Element | null;
|
|
7
|
-
export default ChessContainer;
|
|
8
|
-
//# sourceMappingURL=ChessContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,QAAA,MAAM,cAAc,GAAI,UAAU;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,6BAmBnE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Color } from 'chess.js';
|
|
2
|
-
import { type FC } from 'react';
|
|
3
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
-
import { type ChessModel } from '@dxos/react-ui-gameboard';
|
|
5
|
-
export type ChessPanelProps = ThemedClassName<{
|
|
6
|
-
model: ChessModel;
|
|
7
|
-
orientation?: Color;
|
|
8
|
-
onFlip?: () => void;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const ChessPanel: FC<ChessPanelProps>;
|
|
11
|
-
//# sourceMappingURL=ChessPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChessPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessPanel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG3D,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgD1C,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
3
|
-
import { Chessboard } from '@dxos/react-ui-gameboard';
|
|
4
|
-
declare const meta: Meta<typeof Chessboard>;
|
|
5
|
-
type Story = StoryObj<typeof Chessboard>;
|
|
6
|
-
export default meta;
|
|
7
|
-
export declare const Default: Story;
|
|
8
|
-
//# sourceMappingURL=Chessboard.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chessboard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Chessboard.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAS,UAAU,EAAc,MAAM,0BAA0B,CAAC;AAkBzE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAKjC,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
-
import { type ChessType } from '../types';
|
|
4
|
-
export declare const PlayerSelector: ({ space, game }: {
|
|
5
|
-
space: Space;
|
|
6
|
-
game: ChessType;
|
|
7
|
-
}) => React.JSX.Element;
|
|
8
|
-
//# sourceMappingURL=PlayerSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayerSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAc,KAAK,KAAK,EAAoB,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,GAAI,iBAAiB;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,sBAuBhF,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { Type } from '@dxos/echo';
|
|
3
|
-
export declare const MoveSchema: Schema.mutable<Schema.SchemaClass<{
|
|
4
|
-
readonly source?: string | undefined;
|
|
5
|
-
readonly target?: string | undefined;
|
|
6
|
-
readonly piece?: string | undefined;
|
|
7
|
-
}, {
|
|
8
|
-
readonly source?: string | undefined;
|
|
9
|
-
readonly target?: string | undefined;
|
|
10
|
-
readonly piece?: string | undefined;
|
|
11
|
-
}, never>>;
|
|
12
|
-
export declare const ChessType: Type.obj<Schema.SchemaClass<{
|
|
13
|
-
readonly name?: string | undefined;
|
|
14
|
-
readonly playerWhite?: string | undefined;
|
|
15
|
-
readonly playerBlack?: string | undefined;
|
|
16
|
-
readonly moves?: string[] | undefined;
|
|
17
|
-
readonly pgn?: string | undefined;
|
|
18
|
-
readonly fen?: string | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
readonly playerWhite?: string | undefined;
|
|
21
|
-
readonly playerBlack?: string | undefined;
|
|
22
|
-
readonly moves?: string[] | undefined;
|
|
23
|
-
readonly pgn?: string | undefined;
|
|
24
|
-
readonly fen?: string | undefined;
|
|
25
|
-
readonly name?: string | undefined;
|
|
26
|
-
}, never>>;
|
|
27
|
-
export interface ChessType extends Schema.Schema.Type<typeof ChessType> {
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,eAAO,MAAM,UAAU;;;;;;;;UAQtB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;UAcrB,CAAC;AACF,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
export declare namespace ChessAction {
|
|
3
|
-
const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/chess/action/create", {
|
|
4
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/chess/action/create">;
|
|
5
|
-
} & {
|
|
6
|
-
input: Schema.Struct<{
|
|
7
|
-
name: Schema.optional<typeof Schema.String>;
|
|
8
|
-
fen: Schema.optional<typeof Schema.String>;
|
|
9
|
-
}>;
|
|
10
|
-
output: Schema.Struct<{
|
|
11
|
-
object: import("@dxos/echo/Type").obj<Schema.SchemaClass<{
|
|
12
|
-
readonly name?: string | undefined;
|
|
13
|
-
readonly playerWhite?: string | undefined;
|
|
14
|
-
readonly playerBlack?: string | undefined;
|
|
15
|
-
readonly moves?: string[] | undefined;
|
|
16
|
-
readonly pgn?: string | undefined;
|
|
17
|
-
readonly fen?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
readonly playerWhite?: string | undefined;
|
|
20
|
-
readonly playerBlack?: string | undefined;
|
|
21
|
-
readonly moves?: string[] | undefined;
|
|
22
|
-
readonly pgn?: string | undefined;
|
|
23
|
-
readonly fen?: string | undefined;
|
|
24
|
-
readonly name?: string | undefined;
|
|
25
|
-
}, never>>;
|
|
26
|
-
}>;
|
|
27
|
-
}>;
|
|
28
|
-
export class Create extends Create_base {
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
31
|
-
}
|
|
32
|
-
export declare const isObject: (value: unknown) => value is import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
33
|
-
name?: string | undefined;
|
|
34
|
-
playerWhite?: string | undefined;
|
|
35
|
-
playerBlack?: string | undefined;
|
|
36
|
-
moves?: string[] | undefined;
|
|
37
|
-
pgn?: string | undefined;
|
|
38
|
-
fen?: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOhC,yBAAiB,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;IAG3B,MAAM,OAAO,MAAO,SAAQ,WAQ1B;KAAG;;CACN;AAED,eAAO,MAAM,QAAQ;;;;;;;CAA4B,CAAC"}
|