@dxos/plugin-chess 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b
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/ChessContainer-LPMACR6Y.mjs +106 -0
- package/dist/lib/browser/ChessContainer-LPMACR6Y.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VHSLLEH3.mjs → chunk-SINRYD72.mjs} +6 -3
- package/dist/lib/browser/{chunk-VHSLLEH3.mjs.map → chunk-SINRYD72.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +8 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-FUAOSHHX.mjs → intent-resolver-F36MGVEQ.mjs} +12 -9
- package/dist/lib/browser/{intent-resolver-FUAOSHHX.mjs.map → intent-resolver-F36MGVEQ.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-63EO2PZO.mjs → react-surface-ADVIWGEE.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/ChessContainer-ZFOCAXZL.cjs +131 -0
- package/dist/lib/node/ChessContainer-ZFOCAXZL.cjs.map +7 -0
- package/dist/lib/node/{chunk-3BLH7NRV.cjs → chunk-NALFH4J4.cjs} +9 -6
- package/dist/lib/node/{chunk-3BLH7NRV.cjs.map → chunk-NALFH4J4.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +21 -21
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VTB6P3IL.cjs → intent-resolver-QLRGQQ2C.cjs} +15 -12
- package/dist/lib/node/{intent-resolver-VTB6P3IL.cjs.map → intent-resolver-QLRGQQ2C.cjs.map} +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-PO42G64E.cjs → react-surface-FRGCWHDU.cjs} +8 -8
- package/dist/lib/node/types/index.cjs +5 -5
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs +108 -0
- package/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-M2CRYWX5.mjs → chunk-R2ZZTB5A.mjs} +6 -3
- package/dist/lib/node-esm/{chunk-M2CRYWX5.mjs.map → chunk-R2ZZTB5A.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +8 -8
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MKEQFVZO.mjs → intent-resolver-OGWCQJZ2.mjs} +12 -9
- package/dist/lib/node-esm/{intent-resolver-MKEQFVZO.mjs.map → intent-resolver-OGWCQJZ2.mjs.map} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-CXEBEDLT.mjs → react-surface-SFBGDWJD.mjs} +3 -3
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/components/ChessContainer.d.ts +4 -3
- package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChessPanel.d.ts +11 -0
- package/dist/types/src/components/ChessPanel.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard.stories.d.ts +8 -0
- package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Chess.d.ts → PlayerSelector.d.ts} +4 -5
- package/dist/types/src/components/PlayerSelector.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +19 -20
- package/src/ChessPlugin.tsx +5 -13
- package/src/capabilities/intent-resolver.ts +8 -5
- package/src/components/ChessContainer.tsx +41 -4
- package/src/components/ChessPanel.tsx +67 -0
- package/src/components/Chessboard.stories.tsx +39 -0
- package/src/components/{Chess.tsx → PlayerSelector.tsx} +2 -49
- package/src/meta.ts +2 -1
- package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs +0 -505
- package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs.map +0 -7
- package/dist/lib/node/ChessContainer-XRP7D63X.cjs +0 -518
- package/dist/lib/node/ChessContainer-XRP7D63X.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs +0 -507
- package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs.map +0 -7
- package/dist/types/src/components/Chess.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/Chessboard.d.ts +0 -37
- package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +0 -13
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/index.d.ts +0 -2
- package/dist/types/src/components/Chessboard/index.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/custom.d.ts +0 -3
- package/dist/types/src/components/Chessboard/pieces/custom.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/index.d.ts +0 -4
- package/dist/types/src/components/Chessboard/pieces/index.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts +0 -3
- package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts +0 -3
- package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts.map +0 -1
- package/src/components/Chessboard/Chessboard.stories.tsx +0 -43
- package/src/components/Chessboard/Chessboard.tsx +0 -170
- package/src/components/Chessboard/index.ts +0 -5
- package/src/components/Chessboard/pieces/custom.tsx +0 -82
- package/src/components/Chessboard/pieces/index.ts +0 -7
- package/src/components/Chessboard/pieces/phosphor.tsx +0 -71
- package/src/components/Chessboard/pieces/riohacha.tsx +0 -166
- /package/dist/lib/browser/{react-surface-63EO2PZO.mjs.map → react-surface-ADVIWGEE.mjs.map} +0 -0
- /package/dist/lib/node/{react-surface-PO42G64E.cjs.map → react-surface-FRGCWHDU.cjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-CXEBEDLT.mjs.map → react-surface-SFBGDWJD.mjs.map} +0 -0
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
ChessAction,
|
|
5
5
|
GameType,
|
|
6
6
|
meta
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R2ZZTB5A.mjs";
|
|
8
8
|
|
|
9
9
|
// packages/plugins/plugin-chess/src/ChessPlugin.tsx
|
|
10
|
-
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events
|
|
10
|
+
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
11
11
|
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
12
12
|
|
|
13
13
|
// packages/plugins/plugin-chess/src/capabilities/index.ts
|
|
14
14
|
import { lazy } from "@dxos/app-framework";
|
|
15
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
16
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
15
|
+
var IntentResolver = lazy(() => import("./intent-resolver-OGWCQJZ2.mjs"));
|
|
16
|
+
var ReactSurface = lazy(() => import("./react-surface-SFBGDWJD.mjs"));
|
|
17
17
|
|
|
18
18
|
// packages/plugins/plugin-chess/src/translations.ts
|
|
19
19
|
var translations_default = [
|
|
@@ -41,7 +41,7 @@ var ChessPlugin = () => definePlugin(meta, [
|
|
|
41
41
|
}),
|
|
42
42
|
defineModule({
|
|
43
43
|
id: `${meta.id}/module/metadata`,
|
|
44
|
-
activatesOn:
|
|
44
|
+
activatesOn: Events.SetupMetadata,
|
|
45
45
|
activate: () => contributes(Capabilities.Metadata, {
|
|
46
46
|
id: GameType.typename,
|
|
47
47
|
metadata: {
|
|
@@ -58,19 +58,19 @@ var ChessPlugin = () => definePlugin(meta, [
|
|
|
58
58
|
}),
|
|
59
59
|
defineModule({
|
|
60
60
|
id: `${meta.id}/module/schema`,
|
|
61
|
-
activatesOn: ClientEvents.
|
|
61
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
62
62
|
activate: () => contributes(ClientCapabilities.Schema, [
|
|
63
63
|
GameType
|
|
64
64
|
])
|
|
65
65
|
}),
|
|
66
66
|
defineModule({
|
|
67
67
|
id: `${meta.id}/module/react-surface`,
|
|
68
|
-
activatesOn: Events.
|
|
68
|
+
activatesOn: Events.SetupSurfaces,
|
|
69
69
|
activate: ReactSurface
|
|
70
70
|
}),
|
|
71
71
|
defineModule({
|
|
72
72
|
id: `${meta.id}/module/intent-resolver`,
|
|
73
|
-
activatesOn: Events.
|
|
73
|
+
activatesOn: Events.SetupIntents,
|
|
74
74
|
activate: IntentResolver
|
|
75
75
|
})
|
|
76
76
|
]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ChessPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,
|
|
6
|
-
"names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, GameType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: GameType.typename,\n metadata: {\n createObject: (props: { name?: string }) => createIntent(ChessAction.Create, props),\n placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [GameType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupSurfaces,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntents,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { GameType } from './types';\n\nexport default [\n {\n 'en-US': {\n [GameType.typename]: {\n 'typename label': 'Game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'game title placeholder': 'New game',\n 'create game label': 'Create game',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoBC,oBAAoB;;;ACDjD,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACA9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,SAASC,QAAQ,GAAG;QACnB,kBAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;AFRK,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,SAASC;MACbC,UAAU;QACRC,cAAc,CAACC,UAA6BC,aAAaC,YAAYC,QAAQH,KAAAA;QAC7EI,aAAa;UAAC;UAA0B;YAAEC,IAAIC;UAAa;;QAC3DC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAvB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAasB,aAAaC;IAC1BpB,UAAU,MAAMC,YAAYoB,mBAAmBC,QAAQ;MAACf;KAAS;EACnE,CAAA;EACAZ,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientCapabilities", "ClientEvents", "lazy", "IntentResolver", "lazy", "ReactSurface", "GameType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "GameType", "typename", "metadata", "createObject", "props", "createIntent", "ChessAction", "Create", "placeholder", "ns", "CHESS_PLUGIN", "icon", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "SetupSurfaces", "ReactSurface", "SetupIntents", "IntentResolver"]
|
|
7
7
|
}
|
|
@@ -2,19 +2,22 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
ChessAction,
|
|
4
4
|
GameType
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-R2ZZTB5A.mjs";
|
|
6
6
|
|
|
7
7
|
// packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
|
|
8
8
|
import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
|
|
9
9
|
import { create } from "@dxos/live-object";
|
|
10
|
-
var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
10
|
+
var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
|
|
11
|
+
intent: ChessAction.Create,
|
|
12
|
+
resolve: ({ name }) => ({
|
|
13
|
+
data: {
|
|
14
|
+
object: create(GameType, {
|
|
15
|
+
name
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
}));
|
|
17
20
|
export {
|
|
18
21
|
intent_resolver_default as default
|
|
19
22
|
};
|
|
20
|
-
//# sourceMappingURL=intent-resolver-
|
|
23
|
+
//# sourceMappingURL=intent-resolver-OGWCQJZ2.mjs.map
|
package/dist/lib/node-esm/{intent-resolver-MKEQFVZO.mjs.map → intent-resolver-OGWCQJZ2.mjs.map}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { ChessAction, GameType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver(ChessAction.Create
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,
|
|
6
|
-
"names": ["Capabilities", "contributes", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "ChessAction", "Create", "name", "data", "object", "create", "GameType"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { ChessAction, GameType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ChessAction.Create,\n resolve: ({ name }) => ({\n data: {\n object: create(GameType, { name }),\n },\n }),\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,SAASA,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,YAAYC;EACpBC,SAAS,CAAC,EAAEC,KAAI,OAAQ;IACtBC,MAAM;MACJC,QAAQC,OAAOC,UAAU;QAAEJ;MAAK,CAAA;IAClC;EACF;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ChessAction", "Create", "resolve", "name", "data", "object", "create", "GameType"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2461,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":1411,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":2799,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":1974,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx":{"bytes":32344,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytes":6674,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytes":30948,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytes":704,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx","kind":"import-statement","original":"./custom"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx","kind":"import-statement","original":"./phosphor"},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx","kind":"import-statement","original":"./riohacha"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytes":15769,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts","kind":"import-statement","original":"./pieces"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytes":529,"imports":[{"path":"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytes":14027,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chessboard/index.ts","kind":"import-statement","original":"./Chessboard"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":2405,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/Chess.tsx","kind":"import-statement","original":"./Chess"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":798,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":2649,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1080,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1819,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":6788,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":592,"imports":[{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4361},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-MKEQFVZO.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-CXEBEDLT.mjs","kind":"dynamic-import"}],"exports":["CHESS_PLUGIN","ChessPlugin","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1355},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":324},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0}},"bytes":2358},"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-M2CRYWX5.mjs","kind":"import-statement"}],"exports":["ChessAction","GameType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":284},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-MKEQFVZO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":979},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-MKEQFVZO.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":323}},"bytes":654},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":47070},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-chessboard","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":495},"packages/plugins/plugin-chess/src/components/Chess.tsx":{"bytesInOutput":3989},"packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx":{"bytesInOutput":2364},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx":{"bytesInOutput":12536},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx":{"bytesInOutput":1678},"packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx":{"bytesInOutput":11516},"packages/plugins/plugin-chess/src/components/Chessboard/index.ts":{"bytesInOutput":0}},"bytes":33413},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-CXEBEDLT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1560},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-CXEBEDLT.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":434},"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":992},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3212},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-M2CRYWX5.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","GameType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":430},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":558},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":247}},"bytes":1666}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2461,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2109,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":2799,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2167,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8757,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":6004,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":798,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":2649,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1080,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1819,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":6685,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":592,"imports":[{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4299},"packages/plugins/plugin-chess/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-R2ZZTB5A.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-OGWCQJZ2.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-SFBGDWJD.mjs","kind":"dynamic-import"}],"exports":["CHESS_PLUGIN","ChessPlugin","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1336},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":324},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0}},"bytes":2339},"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-R2ZZTB5A.mjs","kind":"import-statement"}],"exports":["ChessAction","GameType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":284},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-OGWCQJZ2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1072},"packages/plugins/plugin-chess/dist/lib/node-esm/intent-resolver-OGWCQJZ2.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-R2ZZTB5A.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":360}},"bytes":691},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7739},"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs":{"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":1501},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":4197},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-SFBGDWJD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1560},"packages/plugins/plugin-chess/dist/lib/node-esm/react-surface-SFBGDWJD.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-R2ZZTB5A.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":434},"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":992},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-R2ZZTB5A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3504},"packages/plugins/plugin-chess/dist/lib/node-esm/chunk-R2ZZTB5A.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","GameType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":430},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":558},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1932}}}
|
|
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
CHESS_PLUGIN,
|
|
4
4
|
isObject
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-R2ZZTB5A.mjs";
|
|
6
6
|
|
|
7
7
|
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
8
8
|
import React from "react";
|
|
@@ -10,7 +10,7 @@ import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
|
10
10
|
|
|
11
11
|
// packages/plugins/plugin-chess/src/components/index.ts
|
|
12
12
|
import { lazy } from "react";
|
|
13
|
-
var ChessContainer = lazy(() => import("./ChessContainer-
|
|
13
|
+
var ChessContainer = lazy(() => import("./ChessContainer-DF6IFM2R.mjs"));
|
|
14
14
|
|
|
15
15
|
// packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
|
|
16
16
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
|
|
@@ -28,4 +28,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
|
|
|
28
28
|
export {
|
|
29
29
|
react_surface_default as default
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=react-surface-
|
|
31
|
+
//# sourceMappingURL=react-surface-SFBGDWJD.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW,4CAmCpB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const IntentResolver: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
|
|
2
|
-
export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
|
|
1
|
+
export declare const IntentResolver: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
2
|
+
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,kMAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,gMAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;;AAKhF,
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA+B,MAAM,qBAAqB,CAAC;;AAKhF,wBAWI"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
declare const ChessContainer: ({ game
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type GameType } from '../types';
|
|
3
|
+
declare const ChessContainer: ({ game }: {
|
|
4
|
+
game: GameType;
|
|
4
5
|
role?: string;
|
|
5
6
|
}) => React.JSX.Element | null;
|
|
6
7
|
export default ChessContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChessContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,cAAc,aAAc;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,6BA6ClE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Space } from '@dxos/react-client/echo';
|
|
3
3
|
import { type GameType } from '../types';
|
|
4
|
-
export declare const
|
|
5
|
-
space: Space;
|
|
4
|
+
export declare const PlayerSelector: ({ game, space }: {
|
|
6
5
|
game: GameType;
|
|
7
|
-
|
|
8
|
-
}) => React.JSX.Element
|
|
9
|
-
//# sourceMappingURL=
|
|
6
|
+
space: Space;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=PlayerSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,eAAO,MAAM,cAAc,oBAAqB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,sBAuB/E,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const ChessContainer: import("react").LazyExoticComponent<({ game
|
|
1
|
+
export declare const ChessContainer: import("react").LazyExoticComponent<({ game }: {
|
|
2
|
+
game: import("../types").GameType;
|
|
2
3
|
role?: string;
|
|
3
4
|
}) => import("react").JSX.Element | null>;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;QAC+T,CAAC;yCADvR,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD,eAAO,MAAM,IAAI;;;;;;;CAOK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-chess",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.e9bb01b",
|
|
4
4
|
"description": "Chess for new plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -34,20 +34,19 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@effect/schema": "^0.75.5",
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
|
-
"chess.js": "^1.0.0
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/plugin-
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/react-
|
|
49
|
-
"@dxos/react-ui-stack": "0.7.5-main.
|
|
50
|
-
"@dxos/plugin-client": "0.7.5-main.9d2a38b"
|
|
37
|
+
"chess.js": "^1.0.0",
|
|
38
|
+
"@dxos/app-framework": "0.7.5-main.e9bb01b",
|
|
39
|
+
"@dxos/async": "0.7.5-main.e9bb01b",
|
|
40
|
+
"@dxos/echo-schema": "0.7.5-main.e9bb01b",
|
|
41
|
+
"@dxos/invariant": "0.7.5-main.e9bb01b",
|
|
42
|
+
"@dxos/display-name": "0.7.5-main.e9bb01b",
|
|
43
|
+
"@dxos/live-object": "0.7.5-main.e9bb01b",
|
|
44
|
+
"@dxos/plugin-client": "0.7.5-main.e9bb01b",
|
|
45
|
+
"@dxos/plugin-graph": "0.7.5-main.e9bb01b",
|
|
46
|
+
"@dxos/plugin-space": "0.7.5-main.e9bb01b",
|
|
47
|
+
"@dxos/react-client": "0.7.5-main.e9bb01b",
|
|
48
|
+
"@dxos/react-ui-gameboard": "0.7.5-main.e9bb01b",
|
|
49
|
+
"@dxos/react-ui-stack": "0.7.5-main.e9bb01b"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -56,16 +55,16 @@
|
|
|
56
55
|
"react": "~18.2.0",
|
|
57
56
|
"react-dom": "~18.2.0",
|
|
58
57
|
"vite": "5.4.7",
|
|
59
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
60
|
-
"@dxos/react-ui
|
|
61
|
-
"@dxos/storybook-utils": "0.7.5-main.
|
|
58
|
+
"@dxos/react-ui-theme": "0.7.5-main.e9bb01b",
|
|
59
|
+
"@dxos/react-ui": "0.7.5-main.e9bb01b",
|
|
60
|
+
"@dxos/storybook-utils": "0.7.5-main.e9bb01b"
|
|
62
61
|
},
|
|
63
62
|
"peerDependencies": {
|
|
64
63
|
"@phosphor-icons/react": "^2.1.5",
|
|
65
64
|
"react": "~18.2.0",
|
|
66
65
|
"react-dom": "~18.2.0",
|
|
67
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
68
|
-
"@dxos/react-ui-theme": "0.7.5-main.
|
|
66
|
+
"@dxos/react-ui": "0.7.5-main.e9bb01b",
|
|
67
|
+
"@dxos/react-ui-theme": "0.7.5-main.e9bb01b"
|
|
69
68
|
},
|
|
70
69
|
"publishConfig": {
|
|
71
70
|
"access": "public"
|
package/src/ChessPlugin.tsx
CHANGED
|
@@ -2,15 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
Capabilities,
|
|
7
|
-
contributes,
|
|
8
|
-
createIntent,
|
|
9
|
-
defineModule,
|
|
10
|
-
definePlugin,
|
|
11
|
-
Events,
|
|
12
|
-
oneOf,
|
|
13
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
14
6
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
15
7
|
|
|
16
8
|
import { IntentResolver, ReactSurface } from './capabilities';
|
|
@@ -27,7 +19,7 @@ export const ChessPlugin = () =>
|
|
|
27
19
|
}),
|
|
28
20
|
defineModule({
|
|
29
21
|
id: `${meta.id}/module/metadata`,
|
|
30
|
-
activatesOn:
|
|
22
|
+
activatesOn: Events.SetupMetadata,
|
|
31
23
|
activate: () =>
|
|
32
24
|
contributes(Capabilities.Metadata, {
|
|
33
25
|
id: GameType.typename,
|
|
@@ -40,17 +32,17 @@ export const ChessPlugin = () =>
|
|
|
40
32
|
}),
|
|
41
33
|
defineModule({
|
|
42
34
|
id: `${meta.id}/module/schema`,
|
|
43
|
-
activatesOn: ClientEvents.
|
|
35
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
44
36
|
activate: () => contributes(ClientCapabilities.Schema, [GameType]),
|
|
45
37
|
}),
|
|
46
38
|
defineModule({
|
|
47
39
|
id: `${meta.id}/module/react-surface`,
|
|
48
|
-
activatesOn: Events.
|
|
40
|
+
activatesOn: Events.SetupSurfaces,
|
|
49
41
|
activate: ReactSurface,
|
|
50
42
|
}),
|
|
51
43
|
defineModule({
|
|
52
44
|
id: `${meta.id}/module/intent-resolver`,
|
|
53
|
-
activatesOn: Events.
|
|
45
|
+
activatesOn: Events.SetupIntents,
|
|
54
46
|
activate: IntentResolver,
|
|
55
47
|
}),
|
|
56
48
|
]);
|
|
@@ -10,9 +10,12 @@ import { ChessAction, GameType } from '../types';
|
|
|
10
10
|
export default () =>
|
|
11
11
|
contributes(
|
|
12
12
|
Capabilities.IntentResolver,
|
|
13
|
-
createResolver(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
createResolver({
|
|
14
|
+
intent: ChessAction.Create,
|
|
15
|
+
resolve: ({ name }) => ({
|
|
16
|
+
data: {
|
|
17
|
+
object: create(GameType, { name }),
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
}),
|
|
18
21
|
);
|
|
@@ -2,22 +2,59 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { Chess } from 'chess.js';
|
|
6
|
+
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
6
7
|
|
|
7
8
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
+
import { ChessModel, Board, Chessboard, type BoardRootProps } from '@dxos/react-ui-gameboard';
|
|
8
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
9
11
|
|
|
10
|
-
import {
|
|
12
|
+
import { PlayerSelector } from './PlayerSelector';
|
|
13
|
+
import { type GameType } from '../types';
|
|
14
|
+
|
|
15
|
+
const ChessContainer = ({ game }: { game: GameType; role?: string }) => {
|
|
16
|
+
const model = useMemo(() => new ChessModel(), []);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!model || game.pgn !== model?.game.pgn()) {
|
|
19
|
+
const chess = new Chess();
|
|
20
|
+
if (game.pgn) {
|
|
21
|
+
chess.loadPgn(game.pgn);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
model.initialize(chess.fen());
|
|
25
|
+
}
|
|
26
|
+
}, [game.pgn]);
|
|
11
27
|
|
|
12
|
-
const ChessContainer = ({ game, role }: Pick<ComponentProps<typeof Chess>, 'game'> & { role?: string }) => {
|
|
13
28
|
const space = getSpace(game);
|
|
14
29
|
if (!space) {
|
|
15
30
|
return null;
|
|
16
31
|
}
|
|
17
32
|
|
|
33
|
+
const handleDrop = useCallback<NonNullable<BoardRootProps['onDrop']>>(
|
|
34
|
+
(move) => {
|
|
35
|
+
if (model.makeMove(move)) {
|
|
36
|
+
game.pgn = model.game.pgn();
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return false;
|
|
41
|
+
},
|
|
42
|
+
[model],
|
|
43
|
+
);
|
|
44
|
+
|
|
18
45
|
return (
|
|
19
46
|
<StackItem.Content toolbar={false}>
|
|
20
|
-
<
|
|
47
|
+
<div role='none' className='grid grid-rows-[60px_1fr_60px] grow overflow-hidden'>
|
|
48
|
+
<div />
|
|
49
|
+
|
|
50
|
+
<div className='flex m-4 overflow-hidden'>
|
|
51
|
+
<Board.Root model={model} onDrop={handleDrop}>
|
|
52
|
+
<Chessboard />
|
|
53
|
+
</Board.Root>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<PlayerSelector space={space} game={game} />
|
|
57
|
+
</div>
|
|
21
58
|
</StackItem.Content>
|
|
22
59
|
);
|
|
23
60
|
};
|