@dxos/plugin-chess 0.8.4-main.5ea62a8 → 0.8.4-main.72ec0f3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/lib/browser/{ChessboardContainer-HBHUXBG3.mjs → ChessboardContainer-5YXEM4VR.mjs} +20 -20
  2. package/dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs.map +7 -0
  3. package/dist/lib/browser/blueprint-definition-FD4TL5EE.mjs +11 -0
  4. package/dist/lib/browser/{chunk-UDWRTBWA.mjs → chunk-5DOZV3PW.mjs} +113 -143
  5. package/dist/lib/browser/chunk-5DOZV3PW.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-PE3IWOFR.mjs → chunk-DUO4WTAM.mjs} +5 -5
  7. package/dist/lib/browser/chunk-DUO4WTAM.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-T275KG4U.mjs → chunk-FBLAVAMY.mjs} +12 -12
  9. package/dist/lib/browser/chunk-FBLAVAMY.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-H65TQTPW.mjs → chunk-Q5TZCIH7.mjs} +2 -2
  11. package/dist/lib/browser/{chunk-VTIITHYS.mjs → chunk-TIIGNOGK.mjs} +30 -14
  12. package/dist/lib/browser/chunk-TIIGNOGK.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +22 -21
  14. package/dist/lib/browser/index.mjs.map +3 -3
  15. package/dist/lib/browser/{intent-resolver-DA5H5633.mjs → intent-resolver-GXZN2EBT.mjs} +5 -5
  16. package/dist/lib/browser/{intent-resolver-DA5H5633.mjs.map → intent-resolver-GXZN2EBT.mjs.map} +1 -1
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/{react-surface-FSDNVKZN.mjs → react-surface-KTTAUHAA.mjs} +7 -7
  19. package/dist/lib/browser/{react-surface-FSDNVKZN.mjs.map → react-surface-KTTAUHAA.mjs.map} +1 -1
  20. package/dist/lib/browser/types/index.mjs +2 -2
  21. package/dist/lib/node-esm/{ChessboardContainer-PF75AEMW.mjs → ChessboardContainer-7OQ6TOKB.mjs} +20 -20
  22. package/dist/lib/node-esm/ChessboardContainer-7OQ6TOKB.mjs.map +7 -0
  23. package/dist/lib/node-esm/blueprint-definition-O7ZM3HUF.mjs +12 -0
  24. package/dist/lib/node-esm/{chunk-PIRITYWV.mjs → chunk-F4C2HVZL.mjs} +113 -143
  25. package/dist/lib/node-esm/chunk-F4C2HVZL.mjs.map +7 -0
  26. package/dist/lib/node-esm/{chunk-6OWCPDUA.mjs → chunk-KNOOJFIR.mjs} +5 -5
  27. package/dist/lib/node-esm/chunk-KNOOJFIR.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-5DYLCQBR.mjs → chunk-MP3A3AGA.mjs} +12 -12
  29. package/dist/lib/node-esm/chunk-MP3A3AGA.mjs.map +7 -0
  30. package/dist/lib/node-esm/{chunk-3NZRGOSV.mjs → chunk-RTCAAOLF.mjs} +30 -14
  31. package/dist/lib/node-esm/chunk-RTCAAOLF.mjs.map +7 -0
  32. package/dist/lib/node-esm/{chunk-IFDV434X.mjs → chunk-VVXTAVIS.mjs} +2 -2
  33. package/dist/lib/node-esm/index.mjs +22 -21
  34. package/dist/lib/node-esm/index.mjs.map +3 -3
  35. package/dist/lib/node-esm/{intent-resolver-PODONUD3.mjs → intent-resolver-HK5L6P6Z.mjs} +5 -5
  36. package/dist/lib/node-esm/{intent-resolver-PODONUD3.mjs.map → intent-resolver-HK5L6P6Z.mjs.map} +1 -1
  37. package/dist/lib/node-esm/meta.json +1 -1
  38. package/dist/lib/node-esm/{react-surface-2TW3PIGQ.mjs → react-surface-VO4PSY6O.mjs} +7 -7
  39. package/dist/lib/node-esm/{react-surface-2TW3PIGQ.mjs.map → react-surface-VO4PSY6O.mjs.map} +1 -1
  40. package/dist/lib/node-esm/types/index.mjs +2 -2
  41. package/dist/types/src/ChessPlugin.d.ts +1 -1
  42. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  44. package/dist/types/src/capabilities/blueprint-definition.d.ts +2 -2
  45. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  46. package/dist/types/src/components/Card.stories.d.ts +11 -3
  47. package/dist/types/src/components/Card.stories.d.ts.map +1 -1
  48. package/dist/types/src/components/Chessboard.d.ts +11 -12
  49. package/dist/types/src/components/Chessboard.d.ts.map +1 -1
  50. package/dist/types/src/components/Chessboard.stories.d.ts +11 -8
  51. package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -1
  52. package/dist/types/src/components/ChessboardArticle.d.ts +2 -1
  53. package/dist/types/src/components/ChessboardArticle.d.ts.map +1 -1
  54. package/dist/types/src/components/{ChessboardInfo.d.ts → Info.d.ts} +5 -5
  55. package/dist/types/src/components/Info.d.ts.map +1 -0
  56. package/dist/types/src/functions/create.d.ts +2 -2
  57. package/dist/types/src/functions/create.d.ts.map +1 -1
  58. package/dist/types/src/functions/move.d.ts +1 -1
  59. package/dist/types/src/functions/move.d.ts.map +1 -1
  60. package/dist/types/src/functions/play.d.ts +2 -1
  61. package/dist/types/src/functions/play.d.ts.map +1 -1
  62. package/dist/types/src/meta.d.ts +0 -1
  63. package/dist/types/src/meta.d.ts.map +1 -1
  64. package/dist/types/src/translations.d.ts +8 -6
  65. package/dist/types/src/translations.d.ts.map +1 -1
  66. package/dist/types/src/types/Chess.d.ts +2 -2
  67. package/dist/types/src/types/Chess.d.ts.map +1 -1
  68. package/dist/types/src/types/ChessAction.d.ts +1 -1
  69. package/dist/types/src/types/ChessAction.d.ts.map +1 -1
  70. package/dist/types/tsconfig.tsbuildinfo +1 -1
  71. package/package.json +42 -36
  72. package/src/ChessPlugin.tsx +47 -47
  73. package/src/capabilities/artifact-definition.ts +3 -2
  74. package/src/capabilities/blueprint-definition.ts +3 -3
  75. package/src/components/Card.stories.tsx +3 -5
  76. package/src/components/Chessboard.stories.tsx +3 -4
  77. package/src/components/Chessboard.tsx +79 -55
  78. package/src/components/ChessboardArticle.tsx +22 -18
  79. package/src/components/ChessboardContainer.tsx +1 -1
  80. package/src/components/{ChessboardInfo.tsx → Info.tsx} +103 -40
  81. package/src/functions/create.ts +4 -2
  82. package/src/functions/move.ts +4 -2
  83. package/src/functions/play.ts +13 -3
  84. package/src/meta.ts +4 -4
  85. package/src/translations.ts +8 -6
  86. package/src/types/Chess.ts +20 -26
  87. package/src/types/ChessAction.ts +1 -1
  88. package/dist/lib/browser/ChessboardContainer-HBHUXBG3.mjs.map +0 -7
  89. package/dist/lib/browser/blueprint-definition-W5PLLXPP.mjs +0 -11
  90. package/dist/lib/browser/chunk-PE3IWOFR.mjs.map +0 -7
  91. package/dist/lib/browser/chunk-T275KG4U.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-UDWRTBWA.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-VTIITHYS.mjs.map +0 -7
  94. package/dist/lib/node-esm/ChessboardContainer-PF75AEMW.mjs.map +0 -7
  95. package/dist/lib/node-esm/blueprint-definition-PR5YZC6M.mjs +0 -12
  96. package/dist/lib/node-esm/chunk-3NZRGOSV.mjs.map +0 -7
  97. package/dist/lib/node-esm/chunk-5DYLCQBR.mjs.map +0 -7
  98. package/dist/lib/node-esm/chunk-6OWCPDUA.mjs.map +0 -7
  99. package/dist/lib/node-esm/chunk-PIRITYWV.mjs.map +0 -7
  100. package/dist/types/src/components/ChessboardInfo.d.ts.map +0 -1
  101. package/dist/types/src/components/ChessboardPlayers.d.ts +0 -8
  102. package/dist/types/src/components/ChessboardPlayers.d.ts.map +0 -1
  103. package/src/components/ChessboardPlayers.tsx +0 -98
  104. /package/dist/lib/browser/{blueprint-definition-W5PLLXPP.mjs.map → blueprint-definition-FD4TL5EE.mjs.map} +0 -0
  105. /package/dist/lib/browser/{chunk-H65TQTPW.mjs.map → chunk-Q5TZCIH7.mjs.map} +0 -0
  106. /package/dist/lib/node-esm/{blueprint-definition-PR5YZC6M.mjs.map → blueprint-definition-O7ZM3HUF.mjs.map} +0 -0
  107. /package/dist/lib/node-esm/{chunk-IFDV434X.mjs.map → chunk-VVXTAVIS.mjs.map} +0 -0
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/react-surface.tsx"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { ChessboardContainer } from '../components';\nimport { meta } from '../meta';\nimport { Chess } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: ['article', 'section', 'card--intrinsic', 'card--extrinsic', 'card--popover', 'card--transclusion'],\n // TODO(burdon): Could this be standardized so that we don't require a subject property.\n filter: (data): data is { subject: Chess.Game } => Obj.instanceOf(Chess.Game, data.subject),\n component: ({ data, role }) => <ChessboardContainer game={data.subject} role={role} />,\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AAMpB,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;MAAW;MAAmB;MAAmB;MAAiB;;;IAEpFC,QAAQ,CAACC,SAA0CC,IAAIC,WAAWC,cAAMC,MAAMJ,KAAKK,OAAO;IAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACS,qBAAAA;MAAoBC,MAAMR,KAAKK;MAASP;;EAC1E,CAAA;CACD;",
5
+ "mappings": ";;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AAMpB,IAAA,yBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;MAAW;MAAmB;MAAmB;MAAiB;;;IAEpFC,QAAQ,CAACC,SAA0CC,IAAIC,WAAWC,cAAMC,MAAMJ,KAAKK,OAAO;IAC1FC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACS,qBAAAA;MAAoBC,MAAMR,KAAKK;MAASP;;EAC1E,CAAA;CACD;",
6
6
  "names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Chess", "Game", "subject", "component", "ChessboardContainer", "game"]
7
7
  }
@@ -2,8 +2,8 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  ChessAction_exports,
4
4
  Chess_exports
5
- } from "../chunk-5DYLCQBR.mjs";
6
- import "../chunk-6OWCPDUA.mjs";
5
+ } from "../chunk-MP3A3AGA.mjs";
6
+ import "../chunk-KNOOJFIR.mjs";
7
7
  export {
8
8
  Chess_exports as Chess,
9
9
  ChessAction_exports as ChessAction
@@ -1,2 +1,2 @@
1
- export declare const ChessPlugin: () => import("@dxos/app-framework").Plugin;
1
+ export declare const ChessPlugin: import("@dxos/app-framework").PluginFactory<void>;
2
2
  //# sourceMappingURL=ChessPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,4CA8CpB,CAAC"}
1
+ {"version":3,"file":"ChessPlugin.d.ts","sourceRoot":"","sources":["../../../src/ChessPlugin.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,mDA8CtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/artifact-definition.ts"],"names":[],"mappings":"AAWA,OAAO,EAAgB,KAAK,uBAAuB,EAAoC,MAAM,qBAAqB,CAAC;AAMnH,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAO7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,uBAAuB,CAAC;KACpC;CACF;;AAED,wBAgGE"}
1
+ {"version":3,"file":"artifact-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/artifact-definition.ts"],"names":[],"mappings":"AAYA,OAAO,EAAgB,KAAK,uBAAuB,EAAoC,MAAM,qBAAqB,CAAC;AAMnH,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAO7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,uBAAuB,CAAC;KACpC;CACF;;AAED,wBAgGE"}
@@ -1,6 +1,6 @@
1
1
  import { Blueprint } from '@dxos/blueprints';
2
2
  import { type FunctionDefinition } from '@dxos/functions';
3
- export declare const BLUEPRINT_KEY = "dxos.org/blueprint/chess";
4
- declare const _default: () => (import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<FunctionDefinition<any, any>[]>> | import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Blueprint.Blueprint>>)[];
3
+ export declare const CHESS_BLUEPRINT_KEY = "dxos.org/blueprint/chess";
4
+ declare const _default: () => (import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<FunctionDefinition.Any[]>> | import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Blueprint.Blueprint>>)[];
5
5
  export default _default;
6
6
  //# sourceMappingURL=blueprint-definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/blueprint-definition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAY,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK1D,eAAO,MAAM,aAAa,6BAA6B,CAAC;;AAIxD,wBAoBE"}
1
+ {"version":3,"file":"blueprint-definition.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/blueprint-definition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAY,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAO1D,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;;AAE9D,wBAoBE"}
@@ -1,11 +1,19 @@
1
- import '@dxos-theme';
2
- import { type Meta, type StoryObj } from '@storybook/react-vite';
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
3
  import { Chess } from '../types';
4
4
  type DefaultStoryProps = {
5
5
  role: 'card--popover' | 'card--intrinsic' | 'card--extrinsic';
6
6
  game: Chess.Game;
7
7
  };
8
- declare const meta: Meta<DefaultStoryProps>;
8
+ declare const meta: {
9
+ title: string;
10
+ render: ({ role, game }: DefaultStoryProps) => React.JSX.Element;
11
+ decorators: import("@storybook/react").Decorator[];
12
+ parameters: {
13
+ layout: string;
14
+ };
15
+ tags: string[];
16
+ };
9
17
  export default meta;
10
18
  type Story = StoryObj<typeof meta>;
11
19
  export declare const Popover: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;IAC9D,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAgBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAMpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC"}
1
+ {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;IAC9D,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,IAAI;;;;;;;;CAgByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAMpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
- import { ChessModel, type ChessboardProps as NativeChessboardProps } from '@dxos/react-ui-gameboard';
3
+ import { ChessModel, type ChessboardProps as NaturalChessboardProps } from '@dxos/react-ui-gameboard';
4
4
  import { type Chess } from '../types';
5
- import { type ChessboardInfoProps } from './ChessboardInfo';
6
- import { type ChessboardPlayersProps } from './ChessboardPlayers';
5
+ import { type InfoProps } from './Info';
7
6
  export interface ChessboardController {
8
7
  setMoveNumber(index: number): void;
9
8
  }
@@ -11,29 +10,29 @@ export declare class ExtendedChessModel extends ChessModel {
11
10
  readonly object: Chess.Game;
12
11
  constructor(object: Chess.Game);
13
12
  }
14
- type ChessboardRootProps = PropsWithChildren<{
13
+ type RootProps = PropsWithChildren<{
15
14
  game: Chess.Game;
16
15
  }>;
17
16
  type Role = 'card--popover' | 'card--intrinsic' | 'card--extrinsic';
18
- type ChessboardContentProps = ThemedClassName<PropsWithChildren<{
17
+ type ContentProps = ThemedClassName<PropsWithChildren<{
19
18
  role?: Role;
20
19
  }>>;
20
+ type BoardProps = NaturalChessboardProps;
21
21
  export declare const Chessboard: {
22
22
  Root: React.ForwardRefExoticComponent<{
23
23
  game: Chess.Game;
24
24
  } & {
25
25
  children?: React.ReactNode | undefined;
26
26
  } & React.RefAttributes<ChessboardController>>;
27
- Content: ({ classNames, children, role }: ChessboardContentProps) => React.JSX.Element;
28
- Board: React.MemoExoticComponent<({ orientation, showLabels, debug, rows, cols, classNames }: NativeChessboardProps) => React.JSX.Element>;
29
- Info: {
30
- ({ classNames, orientation, onOrientationChange, onClose, ...props }: ChessboardInfoProps): React.JSX.Element;
27
+ Content: ({ classNames, children, role }: ContentProps) => React.JSX.Element;
28
+ Board: {
29
+ (props: BoardProps): React.JSX.Element;
31
30
  displayName: string;
32
31
  };
33
- Players: {
34
- ({ classNames, children }: ChessboardPlayersProps): React.JSX.Element | null;
32
+ Info: {
33
+ ({ classNames, orientation, onOrientationChange, onClose, ...props }: InfoProps): React.JSX.Element;
35
34
  displayName: string;
36
35
  };
37
36
  };
38
- export type { ChessboardRootProps, ChessboardContentProps, NativeChessboardProps as ChessboardBoardProps, ChessboardInfoProps, ChessboardPlayersProps, };
37
+ export type { RootProps as ChessboardRootProps, ContentProps as ChessboardContentProps, BoardProps as ChessboardBoardProps, InfoProps as ChessboardInfoProps, };
39
38
  //# sourceMappingURL=Chessboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chessboard.d.ts","sourceRoot":"","sources":["../../../../src/components/Chessboard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EACZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,UAAU,EAIV,KAAK,eAAe,IAAI,qBAAqB,EAC9C,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAErF,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,qBAAa,kBAAmB,SAAQ,UAAU;IACpC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;gBAAlB,MAAM,EAAE,KAAK,CAAC,IAAI;CAGxC;AAMD,KAAK,mBAAmB,GAAG,iBAAiB,CAAC;IAC3C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;CAClB,CAAC,CAAC;AAwEH,KAAK,IAAI,GAAG,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEpE,KAAK,sBAAsB,GAAG,eAAe,CAAC,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,CAAC;AAkBlF,eAAO,MAAM,UAAU;;cA7Ff,KAAK,CAAC,IAAI;;;;8CA6EyC,sBAAsB;;;;;;;;;;CAsBhF,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,IAAI,oBAAoB,EAC7C,mBAAmB,EACnB,sBAAsB,GACvB,CAAC"}
1
+ {"version":3,"file":"Chessboard.d.ts","sourceRoot":"","sources":["../../../../src/components/Chessboard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EACZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,UAAU,EAIV,KAAK,eAAe,IAAI,sBAAsB,EAG/C,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,qBAAa,kBAAmB,SAAQ,UAAU;IACpC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;gBAAlB,MAAM,EAAE,KAAK,CAAC,IAAI;CAGxC;AAMD,KAAK,SAAS,GAAG,iBAAiB,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;CAClB,CAAC,CAAC;AAkDH,KAAK,IAAI,GAAG,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEpE,KAAK,YAAY,GAAG,eAAe,CAAC,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,CAAC;AAkBxE,KAAK,UAAU,GAAG,sBAAsB,CAAC;AA8CzC,eAAO,MAAM,UAAU;;cArHf,KAAK,CAAC,IAAI;;;;8CAuD+B,YAAY;;gBAkBvC,UAAU;;;;;;;CAiD/B,CAAC;AAEF,YAAY,EACV,SAAS,IAAI,mBAAmB,EAChC,YAAY,IAAI,sBAAsB,EACtC,UAAU,IAAI,oBAAoB,EAClC,SAAS,IAAI,mBAAmB,GACjC,CAAC"}
@@ -1,13 +1,14 @@
1
- import '@dxos-theme';
2
1
  import { type StoryObj } from '@storybook/react-vite';
3
2
  import { Chess } from '../types';
4
3
  declare const meta: {
5
4
  title: string;
6
- component: ({ game }: {
5
+ component: ({ game, role }: {
7
6
  game: Chess.Game;
7
+ role?: string;
8
8
  }) => import("react").JSX.Element;
9
9
  decorators: import("@storybook/react").Decorator[];
10
10
  parameters: {
11
+ layout: string;
11
12
  translations: [{
12
13
  readonly 'en-US': {
13
14
  readonly [Chess.Game.typename]: {
@@ -18,16 +19,18 @@ declare const meta: {
18
19
  readonly 'object name placeholder': "New game";
19
20
  readonly 'rename object label': "Rename game";
20
21
  readonly 'delete object label': "Delete game";
21
- readonly 'button toggle info': "Toggle info";
22
- readonly 'button flip': "Flip board";
23
22
  };
24
23
  readonly [meta.id]: {
25
24
  readonly 'plugin name': "Chess";
26
25
  readonly 'delete game label': "Delete";
27
- readonly 'game.checkmate': "Checkmate";
28
- readonly 'game.stalemate': "Stalemate";
29
- readonly 'game.draw': "Draw";
30
- readonly 'game.check': "Check";
26
+ readonly 'game.checkmate label': "Checkmate";
27
+ readonly 'game.stalemate label': "Stalemate";
28
+ readonly 'game.draw label': "Draw";
29
+ readonly 'game.check label': "Check";
30
+ readonly 'select player button': "Select player";
31
+ readonly 'toggle info button': "Toggle info";
32
+ readonly 'close info button': "Close info";
33
+ readonly 'flip board button': "Flip board";
31
34
  };
32
35
  };
33
36
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"Chessboard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Chessboard.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,QAAA,MAAM,IAAI;;;;;;;;;yBAPH,CAAQ,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;;yBAY/B,CAAM,IAAI,CAAC,EAAE,CACjB;;;;;;;;;;;CAC0C,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC"}
1
+ {"version":3,"file":"Chessboard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Chessboard.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,QAAA,MAAM,IAAI;;;;YAKF,CAAC;;;;;;;yBAZqB,CAAQ,KAAK,CAAC,IAAI,CAAC,QAE7C,CAAC;;;;;;;;;yBASD,CAAQ,IACZ,CAAI,EAAD,CAAC;;;;;;;;;;;;;;;CAGsC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type Chess } from '../types';
3
- export declare const ChessboardArticle: ({ game }: {
3
+ export declare const ChessboardArticle: ({ game, role }: {
4
4
  game: Chess.Game;
5
+ role?: string;
5
6
  }) => React.JSX.Element;
6
7
  //# sourceMappingURL=ChessboardArticle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChessboardArticle.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessboardArticle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAQ7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC,eAAO,MAAM,iBAAiB,GAAI,UAAU;IAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAA;CAAE,sBA+C/D,CAAC"}
1
+ {"version":3,"file":"ChessboardArticle.d.ts","sourceRoot":"","sources":["../../../../src/components/ChessboardArticle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAQ7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC,eAAO,MAAM,iBAAiB,GAAI,gBAAgB;IAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,sBAmDpF,CAAC"}
@@ -1,14 +1,14 @@
1
- import React from 'react';
1
+ import { type JSX } from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
3
  import { type Player } from '@dxos/react-ui-gameboard';
4
4
  import { type ExtendedChessModel } from './Chessboard';
5
- export type ChessboardInfoProps = ThemedClassName<{
5
+ export type InfoProps = ThemedClassName<{
6
6
  orientation?: Player;
7
7
  onOrientationChange?: (orientation: Player) => void;
8
8
  onClose?: () => void;
9
9
  } & Pick<HistoryProps, 'min' | 'max' | 'onSelect'>>;
10
- export declare const ChessboardInfo: {
11
- ({ classNames, orientation, onOrientationChange, onClose, ...props }: ChessboardInfoProps): React.JSX.Element;
10
+ export declare const Info: {
11
+ ({ classNames, orientation, onOrientationChange, onClose, ...props }: InfoProps): JSX.Element;
12
12
  displayName: string;
13
13
  };
14
14
  type HistoryProps = ThemedClassName<{
@@ -18,4 +18,4 @@ type HistoryProps = ThemedClassName<{
18
18
  onSelect?: (index: number) => void;
19
19
  }>;
20
20
  export {};
21
- //# sourceMappingURL=ChessboardInfo.d.ts.map
21
+ //# sourceMappingURL=Info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Info.d.ts","sourceRoot":"","sources":["../../../../src/components/Info.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,GAAG,EAAsD,MAAM,OAAO,CAAC;AAI5F,OAAO,EAA4B,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,KAAK,MAAM,EAAuB,MAAM,0BAA0B,CAAC;AAK5E,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,eAAe,CACrC;IACE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC,CACnD,CAAC;AAEF,eAAO,MAAM,IAAI;0EAAmF,SAAS;;CA0D5G,CAAC;AAQF,KAAK,YAAY,GAAG,eAAe,CAAC;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: import("@dxos/functions").FunctionDefinition<{
2
2
  readonly pgn?: string | undefined;
3
3
  readonly fen?: string | undefined;
4
- }, import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
4
+ }, import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
5
5
  name?: string | undefined;
6
6
  players?: {
7
7
  white?: string | undefined;
@@ -9,6 +9,6 @@ declare const _default: import("@dxos/functions").FunctionDefinition<{
9
9
  } | undefined;
10
10
  pgn?: string | undefined;
11
11
  fen?: string | undefined;
12
- }>>;
12
+ }>, import("@dxos/functions").FunctionServices>;
13
13
  export default _default;
14
14
  //# sourceMappingURL=create.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/functions/create.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,wBAmBG"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/functions/create.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,wBAoBG"}
@@ -3,6 +3,6 @@ declare const _default: import("@dxos/functions").FunctionDefinition<{
3
3
  readonly move: string;
4
4
  }, {
5
5
  readonly pgn: string;
6
- }>;
6
+ }, import("@dxos/functions").FunctionServices>;
7
7
  export default _default;
8
8
  //# sourceMappingURL=move.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"move.d.ts","sourceRoot":"","sources":["../../../../src/functions/move.ts"],"names":[],"mappings":";;;;;;AAYA,wBA8BG"}
1
+ {"version":3,"file":"move.d.ts","sourceRoot":"","sources":["../../../../src/functions/move.ts"],"names":[],"mappings":";;;;;;AAaA,wBA+BG"}
@@ -1,8 +1,9 @@
1
1
  declare const _default: import("@dxos/functions").FunctionDefinition<{
2
2
  readonly id: string;
3
+ readonly side?: "white" | "black" | "any" | undefined;
3
4
  }, {
4
5
  readonly pgn: string;
5
6
  readonly move?: string | undefined;
6
- }>;
7
+ }, import("@dxos/functions").FunctionServices>;
7
8
  export default _default;
8
9
  //# sourceMappingURL=play.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"play.d.ts","sourceRoot":"","sources":["../../../../src/functions/play.ts"],"names":[],"mappings":";;;;;;AAYA,wBAgCG"}
1
+ {"version":3,"file":"play.d.ts","sourceRoot":"","sources":["../../../../src/functions/play.ts"],"names":[],"mappings":";;;;;;;AAaA,wBAyCG"}
@@ -1,4 +1,3 @@
1
1
  import { type PluginMeta } from '@dxos/app-framework';
2
- export declare const CHESS_PLUGIN = "dxos.org/plugin/chess";
3
2
  export declare const meta: PluginMeta;
4
3
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD,eAAO,MAAM,IAAI,EAAE,UASlB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,eAAO,MAAM,IAAI,EAAE,UAWlB,CAAC"}
@@ -10,16 +10,18 @@ export declare const translations: [{
10
10
  readonly 'object name placeholder': "New game";
11
11
  readonly 'rename object label': "Rename game";
12
12
  readonly 'delete object label': "Delete game";
13
- readonly 'button toggle info': "Toggle info";
14
- readonly 'button flip': "Flip board";
15
13
  };
16
14
  readonly [meta.id]: {
17
15
  readonly 'plugin name': "Chess";
18
16
  readonly 'delete game label': "Delete";
19
- readonly 'game.checkmate': "Checkmate";
20
- readonly 'game.stalemate': "Stalemate";
21
- readonly 'game.draw': "Draw";
22
- readonly 'game.check': "Check";
17
+ readonly 'game.checkmate label': "Checkmate";
18
+ readonly 'game.stalemate label': "Stalemate";
19
+ readonly 'game.draw label': "Draw";
20
+ readonly 'game.check label': "Check";
21
+ readonly 'select player button': "Select player";
22
+ readonly 'toggle info button': "Toggle info";
23
+ readonly 'close info button': "Close info";
24
+ readonly 'flip board button': "Flip board";
23
25
  };
24
26
  };
25
27
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;UAUpB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;UAOR;;EAGwB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;UAQpB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;UAWR;;EAGwB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  import { Type } from '@dxos/echo';
3
3
  export declare const Game: Type.obj<Schema.Struct<{
4
4
  name: Schema.optional<typeof Schema.String>;
@@ -15,7 +15,7 @@ export declare const makeGame: ({ name, pgn, fen }?: {
15
15
  name?: string;
16
16
  pgn?: string;
17
17
  fen?: string;
18
- }) => import("@dxos/live-object").Live<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
18
+ }) => import("@dxos/live-object").Live<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
19
19
  name?: string | undefined;
20
20
  players?: {
21
21
  white?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Chess.d.ts","sourceRoot":"","sources":["../../../../src/types/Chess.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAKvC,eAAO,MAAM,IAAI;;;;;;;;GAiChB,CAAC;AAEF,MAAM,WAAW,IAAK,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC;CAAG;AAEhE,eAAO,MAAM,QAAQ,GAAI,qBAAoB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;EAgB9F,CAAC"}
1
+ {"version":3,"file":"Chess.d.ts","sourceRoot":"","sources":["../../../../src/types/Chess.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAKvC,eAAO,MAAM,IAAI;;;;;;;;GA2BhB,CAAC;AAEF,MAAM,WAAW,IAAK,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC;CAAG;AAEhE,eAAO,MAAM,QAAQ,GAAI,qBAAoB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;EAgB9F,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  declare const Create_base: Schema.TaggedClass<Create, `${string}/action/create`, {
3
3
  readonly _tag: Schema.tag<`${string}/action/create`>;
4
4
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"ChessAction.d.ts","sourceRoot":"","sources":["../../../../src/types/ChessAction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;AAMhC,qBAAa,MAAO,SAAQ,WAQ1B;CAAG"}
1
+ {"version":3,"file":"ChessAction.d.ts","sourceRoot":"","sources":["../../../../src/types/ChessAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;AAMxC,qBAAa,MAAO,SAAQ,WAQ1B;CAAG"}