@dxos/plugin-chess 0.7.5-main.499c70c → 0.7.5-main.6a330ac

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 (143) hide show
  1. package/dist/lib/browser/ChessContainer-XERPODLK.mjs +86 -0
  2. package/dist/lib/browser/ChessContainer-XERPODLK.mjs.map +7 -0
  3. package/dist/lib/browser/artifact-definition-D2SD45UX.mjs +180 -0
  4. package/dist/lib/browser/artifact-definition-D2SD45UX.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-NNA3W3LX.mjs +69 -0
  6. package/dist/lib/browser/chunk-NNA3W3LX.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-R26FYVUS.mjs +8 -0
  8. package/dist/lib/browser/chunk-R26FYVUS.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-VRWXC5L2.mjs +42 -0
  10. package/dist/lib/browser/chunk-VRWXC5L2.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +70 -563
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/intent-resolver-KBIH2KYC.mjs +28 -0
  14. package/dist/lib/browser/intent-resolver-KBIH2KYC.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/react-surface-2PI2KNSU.mjs +42 -0
  17. package/dist/lib/browser/react-surface-2PI2KNSU.mjs.map +7 -0
  18. package/dist/lib/browser/types/index.mjs +3 -4
  19. package/dist/lib/node/ChessContainer-LEPLNICP.cjs +108 -0
  20. package/dist/lib/node/ChessContainer-LEPLNICP.cjs.map +7 -0
  21. package/dist/lib/node/artifact-definition-YDPYM4NV.cjs +194 -0
  22. package/dist/lib/node/artifact-definition-YDPYM4NV.cjs.map +7 -0
  23. package/dist/lib/node/chunk-CSRNUKOH.cjs +74 -0
  24. package/dist/lib/node/chunk-CSRNUKOH.cjs.map +7 -0
  25. package/dist/lib/node/chunk-ITDMCBQQ.cjs +40 -0
  26. package/dist/lib/node/chunk-ITDMCBQQ.cjs.map +7 -0
  27. package/dist/lib/node/{chunk-URYVXDF3.cjs → chunk-VXYRI6VA.cjs} +32 -15
  28. package/dist/lib/node/chunk-VXYRI6VA.cjs.map +7 -0
  29. package/dist/lib/node/index.cjs +70 -540
  30. package/dist/lib/node/index.cjs.map +4 -4
  31. package/dist/lib/node/intent-resolver-TZFKPQOV.cjs +43 -0
  32. package/dist/lib/node/intent-resolver-TZFKPQOV.cjs.map +7 -0
  33. package/dist/lib/node/meta.json +1 -1
  34. package/dist/lib/node/react-surface-OHQIPHSN.cjs +62 -0
  35. package/dist/lib/node/react-surface-OHQIPHSN.cjs.map +7 -0
  36. package/dist/lib/node/types/index.cjs +6 -7
  37. package/dist/lib/node/types/index.cjs.map +2 -2
  38. package/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs +87 -0
  39. package/dist/lib/node-esm/ChessContainer-S76WNBWN.mjs.map +7 -0
  40. package/dist/lib/node-esm/artifact-definition-LHQK5BBZ.mjs +181 -0
  41. package/dist/lib/node-esm/artifact-definition-LHQK5BBZ.mjs.map +7 -0
  42. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs +44 -0
  43. package/dist/lib/node-esm/chunk-6SEDGO5G.mjs.map +7 -0
  44. package/dist/lib/node-esm/chunk-B72CIN6T.mjs +10 -0
  45. package/dist/lib/node-esm/chunk-B72CIN6T.mjs.map +7 -0
  46. package/dist/lib/node-esm/chunk-IP66EHSW.mjs +71 -0
  47. package/dist/lib/node-esm/chunk-IP66EHSW.mjs.map +7 -0
  48. package/dist/lib/node-esm/index.mjs +70 -563
  49. package/dist/lib/node-esm/index.mjs.map +4 -4
  50. package/dist/lib/node-esm/intent-resolver-WBUS64KC.mjs +29 -0
  51. package/dist/lib/node-esm/intent-resolver-WBUS64KC.mjs.map +7 -0
  52. package/dist/lib/node-esm/meta.json +1 -1
  53. package/dist/lib/node-esm/react-surface-XX4VFNRS.mjs +43 -0
  54. package/dist/lib/node-esm/react-surface-XX4VFNRS.mjs.map +7 -0
  55. package/dist/lib/node-esm/types/index.mjs +3 -4
  56. package/dist/types/src/ChessPlugin.d.ts +1 -3
  57. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  58. package/dist/types/src/capabilities/artifact-definition.d.ts +11 -0
  59. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
  60. package/dist/types/src/capabilities/index.d.ts +4 -0
  61. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  62. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  63. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  64. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  65. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  66. package/dist/types/src/components/ChessComponent.d.ts +5 -0
  67. package/dist/types/src/components/ChessComponent.d.ts.map +1 -0
  68. package/dist/types/src/components/ChessContainer.d.ts +4 -4
  69. package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
  70. package/dist/types/src/components/ChessPanel.d.ts +11 -0
  71. package/dist/types/src/components/ChessPanel.d.ts.map +1 -0
  72. package/dist/types/src/components/Chessboard.stories.d.ts +8 -0
  73. package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -0
  74. package/dist/types/src/components/PlayerSelector.d.ts +7 -0
  75. package/dist/types/src/components/PlayerSelector.d.ts.map +1 -0
  76. package/dist/types/src/components/index.d.ts +4 -2
  77. package/dist/types/src/components/index.d.ts.map +1 -1
  78. package/dist/types/src/index.d.ts +3 -2
  79. package/dist/types/src/index.d.ts.map +1 -1
  80. package/dist/types/src/meta.d.ts +2 -2
  81. package/dist/types/src/meta.d.ts.map +1 -1
  82. package/dist/types/src/types/schema.d.ts +4 -2
  83. package/dist/types/src/types/schema.d.ts.map +1 -1
  84. package/dist/types/src/types/types.d.ts +4 -7
  85. package/dist/types/src/types/types.d.ts.map +1 -1
  86. package/dist/types/tsconfig.tsbuildinfo +1 -1
  87. package/package.json +23 -27
  88. package/src/ChessPlugin.tsx +50 -40
  89. package/src/capabilities/artifact-definition.ts +115 -0
  90. package/src/capabilities/index.ts +9 -0
  91. package/src/capabilities/intent-resolver.ts +26 -0
  92. package/src/capabilities/react-surface.tsx +29 -0
  93. package/src/components/ChessComponent.tsx +49 -0
  94. package/src/components/ChessContainer.tsx +17 -6
  95. package/src/components/ChessPanel.tsx +67 -0
  96. package/src/components/Chessboard.stories.tsx +39 -0
  97. package/src/components/{Chess.tsx → PlayerSelector.tsx} +3 -50
  98. package/src/components/index.ts +2 -0
  99. package/src/index.ts +3 -3
  100. package/src/meta.ts +4 -2
  101. package/src/translations.ts +2 -2
  102. package/src/types/schema.ts +3 -1
  103. package/src/types/types.ts +6 -20
  104. package/dist/lib/browser/chunk-2H2BTWYT.mjs +0 -15
  105. package/dist/lib/browser/chunk-2H2BTWYT.mjs.map +0 -7
  106. package/dist/lib/browser/chunk-3UQBTNX5.mjs +0 -53
  107. package/dist/lib/browser/chunk-3UQBTNX5.mjs.map +0 -7
  108. package/dist/lib/browser/meta.mjs +0 -9
  109. package/dist/lib/browser/meta.mjs.map +0 -7
  110. package/dist/lib/node/chunk-Q4NVPVPX.cjs +0 -38
  111. package/dist/lib/node/chunk-Q4NVPVPX.cjs.map +0 -7
  112. package/dist/lib/node/chunk-URYVXDF3.cjs.map +0 -7
  113. package/dist/lib/node/meta.cjs +0 -30
  114. package/dist/lib/node/meta.cjs.map +0 -7
  115. package/dist/lib/node-esm/chunk-IE2S5YZ2.mjs +0 -54
  116. package/dist/lib/node-esm/chunk-IE2S5YZ2.mjs.map +0 -7
  117. package/dist/lib/node-esm/chunk-WNE2FPQW.mjs +0 -17
  118. package/dist/lib/node-esm/chunk-WNE2FPQW.mjs.map +0 -7
  119. package/dist/lib/node-esm/meta.mjs +0 -10
  120. package/dist/lib/node-esm/meta.mjs.map +0 -7
  121. package/dist/types/src/components/Chess.d.ts +0 -9
  122. package/dist/types/src/components/Chess.d.ts.map +0 -1
  123. package/dist/types/src/components/Chessboard/Chessboard.d.ts +0 -37
  124. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +0 -1
  125. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +0 -13
  126. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +0 -1
  127. package/dist/types/src/components/Chessboard/index.d.ts +0 -2
  128. package/dist/types/src/components/Chessboard/index.d.ts.map +0 -1
  129. package/dist/types/src/components/Chessboard/pieces/custom.d.ts +0 -3
  130. package/dist/types/src/components/Chessboard/pieces/custom.d.ts.map +0 -1
  131. package/dist/types/src/components/Chessboard/pieces/index.d.ts +0 -4
  132. package/dist/types/src/components/Chessboard/pieces/index.d.ts.map +0 -1
  133. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts +0 -3
  134. package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts.map +0 -1
  135. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts +0 -3
  136. package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts.map +0 -1
  137. package/src/components/Chessboard/Chessboard.stories.tsx +0 -43
  138. package/src/components/Chessboard/Chessboard.tsx +0 -170
  139. package/src/components/Chessboard/index.ts +0 -5
  140. package/src/components/Chessboard/pieces/custom.tsx +0 -82
  141. package/src/components/Chessboard/pieces/index.ts +0 -7
  142. package/src/components/Chessboard/pieces/phosphor.tsx +0 -71
  143. package/src/components/Chessboard/pieces/riohacha.tsx +0 -166
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/ChessPlugin.tsx", "../../../src/components/ChessContainer.tsx", "../../../src/components/Chess.tsx", "../../../src/components/Chessboard/Chessboard.tsx", "../../../src/components/Chessboard/pieces/custom.tsx", "../../../src/components/Chessboard/pieces/phosphor.tsx", "../../../src/components/Chessboard/pieces/riohacha.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createIntent, createResolver, createSurface, type PluginDefinition } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport ChessContainer from './components/ChessContainer';\nimport meta, { CHESS_PLUGIN } from './meta';\nimport translations from './translations';\nimport { ChessAction, type ChessPluginProvides, GameType, isObject } from './types';\n\nexport const ChessPlugin = (): PluginDefinition<ChessPluginProvides> => {\n return {\n meta,\n provides: {\n metadata: {\n records: {\n [GameType.typename]: {\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 echo: {\n schema: [GameType],\n },\n translations,\n surface: {\n definitions: () =>\n createSurface({\n id: CHESS_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: GameType } => isObject(data.subject),\n component: ({ data, role }) => <ChessContainer game={data.subject} role={role} />,\n }),\n },\n intent: {\n resolvers: () =>\n createResolver(ChessAction.Create, ({ name }) => ({\n data: {\n object: create(GameType, { name }),\n },\n })),\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentProps } from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\n\nimport { Chess } from './Chess';\n\nconst ChessContainer = ({ game, role }: Pick<ComponentProps<typeof Chess>, 'game'> & { role?: string }) => {\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n return (\n <div role='none' className='flex flex-col row-span-2 is-full overflow-hidden'>\n <Chess game={game} space={space} playerSelector={role === 'article'} />\n </div>\n );\n};\n\nexport default ChessContainer;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { CrownCross } from '@phosphor-icons/react';\nimport { Chess as ChessJs } from 'chess.js';\nimport React, { useEffect, useState } from 'react';\n\nimport { generateName } from '@dxos/display-name';\nimport { invariant } from '@dxos/invariant';\nimport { useMembers, type Space, type SpaceMember } from '@dxos/react-client/echo';\nimport { Input, Select, useThemeContext } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { Chessboard, type ChessModel, type ChessMove } from './Chessboard';\nimport { type GameType } from '../types';\n\nconst useChessModel = (game: GameType) => {\n const [model, setModel] = useState<ChessModel>();\n\n useEffect(() => {\n if (!model || game.pgn !== model?.chess.pgn()) {\n const chess = new ChessJs();\n if (game.pgn) {\n chess.loadPgn(game.pgn);\n }\n\n setModel({ chess });\n }\n }, [game.pgn]);\n\n const handleUpdate = (move: ChessMove) => {\n invariant(model);\n if (model.chess.move(move)) {\n game!.pgn = model.chess.pgn();\n setModel({ ...model });\n }\n };\n\n return { model, handleUpdate };\n};\n\nexport const Chess = ({ space, game, playerSelector }: { space: Space; game: GameType; playerSelector?: boolean }) => {\n const { model, handleUpdate } = useChessModel(game);\n if (!model) {\n return null;\n }\n\n return (\n <div role='none' className='grid grid-rows-[60px_1fr_60px] grow overflow-hidden'>\n <div />\n <div className='flex grow justify-center overflow-hidden'>\n <div className='flex grow max-w-[600px] items-center overflow-hidden'>\n <Chessboard model={model} onUpdate={handleUpdate} />\n </div>\n </div>\n {playerSelector && <PlayerSelector game={game} space={space} />}\n </div>\n );\n};\n\nconst PlayerSelector = ({ game, space }: { game: GameType; space: Space }) => {\n const members = useMembers(space.key);\n\n return (\n <div role='none' className='grid grid-cols-2 gap-8'>\n <div role='none' className='flex flex-row-reverse items-center gap-2'>\n <PlayerSelect\n side='white'\n value={game.playerWhite}\n onValueChange={(player) => (game.playerWhite = player)}\n members={members}\n />\n </div>\n <div role='none' className='flex flex-row items-center gap-2'>\n <PlayerSelect\n side='black'\n value={game.playerBlack}\n onValueChange={(player) => (game.playerBlack = player)}\n members={members}\n />\n </div>\n </div>\n );\n};\n\nconst PlayerSelect = ({\n side,\n value,\n onValueChange,\n members,\n}: {\n side: 'white' | 'black';\n value: string | undefined;\n onValueChange: (player: string) => void;\n members: SpaceMember[];\n}) => {\n const { themeMode } = useThemeContext();\n const iconFillMode =\n (side === 'black' && themeMode === 'light') || (side === 'white' && themeMode === 'dark') ? 'fill' : undefined;\n\n return (\n <Input.Root>\n <Input.Label>\n <CrownCross className={mx(getSize(6))} weight={iconFillMode} aria-label={`Chess icon for side ${side}`} />\n </Input.Label>\n <Select.Root value={value} onValueChange={onValueChange}>\n <Select.TriggerButton placeholder={'Select player'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {members.map((member) => {\n const memberKey = member.identity.identityKey.toHex();\n const displayName = member.identity?.profile?.displayName || generateName(memberKey);\n return (\n <Select.Option key={memberKey} value={memberKey}>\n {displayName}\n </Select.Option>\n );\n })}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Input.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ArrowURightDown, Circle } from '@phosphor-icons/react';\nimport { Chess, type Color } from 'chess.js';\nimport React, { type FC } from 'react';\nimport { Chessboard as ReactChessboard } from 'react-chessboard';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { customPieces, phosphorPieces, riohachaPieces } from './pieces';\n\nexport enum ChessPieces {\n STANDARD = 0,\n CUSTOM = 1,\n FUTURE = 2,\n RIOHACHA = 3,\n}\n\nconst chessPieces = {\n [ChessPieces.STANDARD]: undefined,\n [ChessPieces.CUSTOM]: customPieces,\n [ChessPieces.FUTURE]: phosphorPieces,\n [ChessPieces.RIOHACHA]: riohachaPieces,\n};\n\n// TODO(burdon): Replace with classes.\nconst props = {\n customDropSquareStyle: { boxShadow: 'inset 0 0 1px 2px black' },\n};\n\nexport type BoardStyle = 'default' | 'blue' | 'dark';\n\nexport const boardStyles: Record<BoardStyle, any> = {\n default: {\n customDarkSquareStyle: { backgroundColor: '#AE8A68' },\n customLightSquareStyle: { backgroundColor: '#f0d9b5' },\n },\n blue: {\n customDarkSquareStyle: { backgroundColor: '#CCD3DB' },\n customLightSquareStyle: { backgroundColor: '#6C95B9' },\n },\n dark: {\n customDarkSquareStyle: { backgroundColor: '#555' },\n customLightSquareStyle: { backgroundColor: '#888' },\n },\n};\n\nexport type ChessModel = {\n chess: Chess;\n};\n\nexport type ChessMove = {\n from: string;\n to: string;\n promotion?: string;\n};\n\nexport type ChessboardProps = {\n model: ChessModel;\n orientation?: Color;\n readonly?: boolean;\n boardStyle?: BoardStyle;\n pieces?: ChessPieces;\n onUpdate?: (move: ChessMove) => void;\n};\n\n/**\n * https://www.npmjs.com/package/chess.js\n * https://www.npmjs.com/package/react-chessboard\n */\nexport const Chessboard = ({\n model: { chess },\n orientation = 'w',\n readonly = false,\n boardStyle = 'blue',\n pieces = ChessPieces.STANDARD,\n onUpdate,\n}: ChessboardProps) => {\n const { ref, width } = useResizeDetector();\n const style = boardStyles[boardStyle];\n\n const handleDrop = (source: any, target: any, piece: any) => {\n try {\n // Promotion piece will be selected by popup.\n const move = { from: source, to: target, promotion: piece.toLowerCase()[1] };\n const state = new Chess(chess.fen());\n const result = state.move(move);\n if (result) {\n onUpdate?.(move);\n return true;\n } else {\n return false;\n }\n } catch (err) {\n return false;\n }\n };\n\n // https://react-chessboard.com/?path=/story/example-chessboard--configurable-board\n return (\n <div ref={ref} className='flex grow aspect-square overflow-hidden'>\n <ReactChessboard\n boardWidth={width}\n position={chess.fen()}\n boardOrientation={orientation === 'w' ? 'white' : 'black'}\n arePiecesDraggable={!readonly}\n onPieceDrop={handleDrop}\n customPieces={chessPieces[pieces]}\n {...style}\n {...props}\n />\n </div>\n );\n};\n\nexport const ChessPanel: FC<{\n model: ChessModel;\n orientation?: Color;\n onFlip?: () => void;\n}> = ({ model: { chess }, orientation = 'w', onFlip }) => {\n const history = chess.history();\n const label = chess.isGameOver()\n ? chess.isCheckmate()\n ? 'CHECKMATE'\n : chess.isStalemate()\n ? 'STALEMATE'\n : 'DRAW'\n : chess.isCheck()\n ? 'CHECK'\n : history.length\n ? `Move ${history.length}`\n : '';\n\n const Player = ({ color }: { color: Color }) => {\n const turn = color === chess.turn();\n\n return (\n <div className='flex items-center'>\n <Circle\n className={mx(getSize(4), turn && (chess.isCheckmate() ? 'text-red-500' : 'text-green-500'))}\n weight={turn ? 'fill' : 'thin'}\n />\n </div>\n );\n };\n\n return (\n <div className='flex flex-col'>\n <div className='flex items-center justify-between pl-2 pr-2 border-b' style={{ height: 32 }}>\n <Player color={orientation === 'w' ? 'b' : 'w'} />\n {onFlip && (\n <button onClick={onFlip}>\n <ArrowURightDown weight='thin' className={getSize(6)} />\n </button>\n )}\n </div>\n\n <div className='flex flex-col justify-center pl-2 font-thin' style={{ height: 40 }}>\n {label}\n </div>\n\n <div className='flex items-center justify-between pl-2 pr-2 border-t' style={{ height: 32 }}>\n <Player color={orientation} />\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode } from 'react';\n\nconst style = {\n white: { fill: '#999' },\n black: { fill: '#000' },\n};\n\n/**\n * https://www.svgrepo.com/collection/line-awesome/\n * https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces\n * By Cburnett\n */\nconst pieces: Record<string, (style: any) => ReactNode> = {\n p: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 9 C 13.800781 9 12 10.800781 12 13 C 12 14.199219 12.558594 15.265625 13.40625 16 L 12 16 C 11.96875 16 11.9375 16 11.90625 16 C 11.355469 16.027344 10.925781 16.496094 10.953125 17.046875 C 10.980469 17.597656 11.449219 18.027344 12 18 L 12.5 18 L 11.09375 21.5625 L 10.375 23 L 9 23 C 8.96875 23 8.9375 23 8.90625 23 C 8.433594 23.03125 8.050781 23.386719 7.980469 23.855469 C 7.914063 24.320313 8.183594 24.773438 8.625 24.9375 L 7.28125 26.28125 L 7 26.59375 L 7 29 L 25 29 L 25 26.59375 L 24.71875 26.28125 L 23.375 24.9375 C 23.832031 24.765625 24.101563 24.289063 24.007813 23.808594 C 23.917969 23.328125 23.488281 22.988281 23 23 L 21.625 23 L 20.90625 21.5625 L 19.5 18 L 20 18 C 20.359375 18.003906 20.695313 17.816406 20.878906 17.503906 C 21.058594 17.191406 21.058594 16.808594 20.878906 16.496094 C 20.695313 16.183594 20.359375 15.996094 20 16 L 18.59375 16 C 19.441406 15.265625 20 14.199219 20 13 C 20 10.800781 18.199219 9 16 9 Z M 16 11 C 17.117188 11 18 11.882813 18 13 C 18 14.117188 17.117188 15 16 15 C 14.882813 15 14 14.117188 14 13 C 14 11.882813 14.882813 11 16 11 Z M 14.6875 18 L 17.3125 18 L 19.0625 22.375 L 19.09375 22.40625 L 19.09375 22.4375 L 19.375 23 L 12.625 23 L 12.90625 22.4375 L 12.90625 22.40625 L 12.9375 22.375 Z M 11.4375 25 L 20.5625 25 L 22.5625 27 L 9.4375 27 Z'\n />\n </svg>\n ),\n r: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 9 4 L 9 13 L 12.75 13 L 12.53125 14 L 12 14 C 11.96875 14 11.9375 14 11.90625 14 C 11.355469 14.027344 10.925781 14.496094 10.953125 15.046875 C 10.980469 15.597656 11.449219 16.027344 12 16 L 12.09375 16 L 11.09375 20.5625 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.90625 20.5625 L 19.90625 16 L 20 16 C 20.359375 16.003906 20.695313 15.816406 20.878906 15.503906 C 21.058594 15.191406 21.058594 14.808594 20.878906 14.496094 C 20.695313 14.183594 20.359375 13.996094 20 14 L 19.46875 14 L 19.25 13 L 23 13 L 23 4 Z M 11 6 L 13 6 L 13 9 L 15 9 L 15 6 L 17 6 L 17 9 L 19 9 L 19 6 L 21 6 L 21 11 L 11 11 Z M 14.78125 13 L 17.21875 13 L 17.4375 14 L 14.5625 14 Z M 14.125 16 L 17.875 16 L 19.03125 21.21875 L 19.0625 21.34375 L 19.09375 21.4375 L 19.375 22 L 12.625 22 L 12.90625 21.4375 L 12.9375 21.34375 L 12.96875 21.21875 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n n: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.230469 3 13.058594 3.984375 12.59375 5 C 12.242188 5.769531 12.285156 6.304688 12.28125 6.75 C 11.535156 7.257813 10.75 7.90625 10.125 8.53125 C 8.726563 9.929688 7.960938 11.921875 8 14.03125 C 8.019531 15.003906 8.21875 15.980469 8.59375 16.96875 C 8.78125 17.464844 9.125 18.324219 9.4375 19.28125 C 9.75 20.238281 10 21.292969 10 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.367188 22.035156 7.953125 22.492188 7.972656 23.03125 C 7.988281 23.570313 8.429688 23.996094 8.96875 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 22 22 C 22 19.738281 20.59375 17.664063 19.28125 16.0625 C 18.53125 15.144531 18.285156 14.984375 17.78125 14.5 C 17.960938 14.394531 18.183594 14.269531 18.3125 14.1875 C 18.472656 14.085938 18.558594 14.023438 18.59375 14 C 18.875 14 18.894531 14.046875 19.1875 14.28125 C 19.480469 14.515625 20.078125 15 20.90625 15 C 21.632813 15 22.164063 14.53125 22.4375 14.1875 C 22.6875 13.871094 22.824219 13.632813 22.84375 13.59375 C 22.933594 13.550781 23.128906 13.488281 23.375 13.3125 C 23.621094 13.136719 23.941406 12.746094 24 12.3125 C 24.058594 11.878906 23.921875 11.5 23.75 11.125 C 23.496094 10.570313 23.023438 9.933594 22.28125 9.15625 C 21.539063 8.378906 20.566406 7.554688 19.375 7.0625 C 19.285156 7.023438 19.359375 7.082031 19.3125 7.03125 C 19.265625 6.980469 19.125 6.769531 18.84375 6.5625 C 18.476563 6.292969 17.679688 6.261719 17 6.1875 L 17 3 Z M 15 5.21875 L 15 8 L 16 8 C 17.363281 8 17.664063 8.164063 17.65625 8.15625 C 17.652344 8.152344 17.660156 8.171875 17.8125 8.34375 C 17.964844 8.515625 18.261719 8.785156 18.625 8.9375 C 19.425781 9.269531 20.226563 9.917969 20.84375 10.5625 C 21.421875 11.164063 21.808594 11.761719 21.875 11.875 C 21.714844 11.953125 21.546875 12.007813 21.34375 12.25 C 21.070313 12.582031 20.972656 12.8125 20.875 12.9375 C 20.84375 12.976563 20.847656 12.988281 20.84375 13 C 20.757813 12.988281 20.699219 12.933594 20.4375 12.71875 C 20.109375 12.453125 19.457031 12 18.59375 12 C 17.9375 12 17.566406 12.300781 17.25 12.5 C 16.933594 12.699219 16.679688 12.84375 16.59375 12.875 L 16.5625 12.90625 L 16.53125 12.90625 C 16.347656 12.984375 16.03125 13 16.03125 13 L 15 12.96875 L 15 14.5625 L 15.34375 14.84375 C 15.34375 14.84375 16.53125 15.890625 17.71875 17.34375 C 18.90625 18.796875 20 20.667969 20 22 L 12 22 C 12 20.878906 11.6875 19.703125 11.34375 18.65625 C 11 17.609375 10.59375 16.695313 10.4375 16.28125 C 10.144531 15.507813 10.015625 14.707031 10 13.96875 C 9.96875 12.363281 10.542969 10.925781 11.53125 9.9375 C 12.183594 9.285156 13.15625 8.46875 13.6875 8.15625 L 14.1875 7.875 L 14.1875 7.3125 C 14.1875 6.941406 14.1875 6.320313 14.40625 5.84375 C 14.53125 5.574219 14.703125 5.367188 15 5.21875 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n b: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.441406 14.15625 5.855469 14.40625 6.1875 C 14.050781 6.5625 13.644531 7.011719 13.21875 7.53125 C 12.171875 8.8125 11 10.292969 11 12 C 11 13.136719 11.414063 14.160156 12.0625 15 L 12 15 C 11.96875 15 11.9375 15 11.90625 15 C 11.355469 15.027344 10.925781 15.496094 10.953125 16.046875 C 10.980469 16.597656 11.449219 17.027344 12 17 L 12.5 17 L 11.09375 20.5625 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.90625 20.5625 L 19.5 17 L 20 17 C 20.359375 17.003906 20.695313 16.816406 20.878906 16.503906 C 21.058594 16.191406 21.058594 15.808594 20.878906 15.496094 C 20.695313 15.183594 20.359375 14.996094 20 15 C 20.628906 14.160156 21 13.121094 21 12 C 21 10.292969 19.828125 8.8125 18.78125 7.53125 C 18.355469 7.011719 17.949219 6.5625 17.59375 6.1875 C 17.84375 5.855469 18 5.441406 18 5 C 18 3.90625 17.09375 3 16 3 Z M 16 7.46875 C 16.363281 7.835938 16.609375 8.066406 17.21875 8.8125 C 18.171875 9.980469 19 11.5 19 12 C 19 13.679688 17.699219 15 16.03125 15 C 14.363281 15 13 13.660156 13 12 C 13 11.5 13.828125 9.980469 14.78125 8.8125 C 15.390625 8.066406 15.636719 7.835938 16 7.46875 Z M 14.6875 17 L 17.3125 17 L 19.0625 21.375 L 19.09375 21.40625 L 19.09375 21.4375 L 19.375 22 L 12.625 22 L 12.90625 21.4375 L 12.90625 21.40625 L 12.9375 21.375 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n q: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.730469 14.402344 6.371094 15 6.71875 L 15 8.25 C 15 8.675781 14.675781 9 14.25 9 L 11.90625 9 C 11.59375 9 11.316406 8.851563 11.15625 8.625 C 11.667969 8.261719 12 7.667969 12 7 C 12 5.90625 11.09375 5 10 5 C 8.90625 5 8 5.90625 8 7 C 8 7.730469 8.402344 8.371094 9 8.71875 L 9 10.40625 L 9.28125 10.71875 L 11.625 13.0625 C 11.167969 13.234375 10.902344 13.710938 10.996094 14.1875 C 11.089844 14.667969 11.511719 15.011719 12 15 L 12.65625 15 L 11.09375 20.5625 L 11.03125 20.71875 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.96875 20.71875 L 20.9375 20.65625 L 20.90625 20.5625 L 19.34375 15 L 20 15 C 20.488281 15.011719 20.917969 14.671875 21.007813 14.191406 C 21.101563 13.710938 20.832031 13.234375 20.375 13.0625 L 22.71875 10.71875 L 23 10.40625 L 23 8.71875 C 23.597656 8.371094 24 7.730469 24 7 C 24 5.90625 23.09375 5 22 5 C 20.90625 5 20 5.90625 20 7 C 20 7.667969 20.332031 8.261719 20.84375 8.625 C 20.683594 8.851563 20.40625 9 20.09375 9 L 17.75 9 C 17.324219 9 17 8.675781 17 8.25 L 17 6.71875 C 17.597656 6.371094 18 5.730469 18 5 C 18 3.90625 17.09375 3 16 3 Z M 16 10.34375 C 16.480469 10.746094 17.082031 11 17.75 11 L 19.5625 11 L 17.5625 13 L 14.4375 13 L 12.4375 11 L 14.25 11 C 14.917969 11 15.519531 10.746094 16 10.34375 Z M 14.75 15 L 17.25 15 L 19.03125 21.28125 L 19.0625 21.375 L 19.375 22 L 12.625 22 L 12.9375 21.375 L 12.96875 21.28125 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n k: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.359375 14.109375 5.707031 14.28125 6 L 8 6 L 8 8.375 L 8.21875 8.625 L 11.875 13 C 11.324219 13.035156 10.902344 13.511719 10.9375 14.0625 C 10.972656 14.613281 11.449219 15.035156 12 15 L 12.65625 15 L 11.09375 20.5625 L 11.03125 20.71875 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.96875 20.71875 L 20.9375 20.65625 L 20.90625 20.5625 L 19.34375 15 L 20 15 C 20.550781 15.042969 21.035156 14.628906 21.078125 14.078125 C 21.121094 13.527344 20.707031 13.042969 20.15625 13 L 23.78125 8.625 L 24 8.375 L 24 6 L 17.71875 6 C 17.890625 5.707031 18 5.359375 18 5 C 18 3.90625 17.09375 3 16 3 Z M 10.3125 8 L 21.6875 8 L 17.53125 13 L 14.46875 13 Z M 14.75 15 L 17.25 15 L 19.03125 21.28125 L 19.0625 21.375 L 19.375 22 L 12.625 22 L 12.9375 21.375 L 12.96875 21.28125 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n};\n\nexport const customPieces: Record<string, ReactNode> = {\n wP: pieces.p(style.white),\n wR: pieces.r(style.white),\n wN: pieces.n(style.white),\n wB: pieces.b(style.white),\n wQ: pieces.q(style.white),\n wK: pieces.k(style.white),\n\n bP: pieces.p(style.black),\n bR: pieces.r(style.black),\n bN: pieces.n(style.black),\n bB: pieces.b(style.black),\n bQ: pieces.q(style.black),\n bK: pieces.k(style.black),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Flame, Crown, ShieldStar, Plus, Asterisk, User } from '@phosphor-icons/react';\nimport React, { type ReactNode } from 'react';\n\nconst style = {\n white: { width: undefined, height: undefined, color: 'darkred' },\n black: { width: undefined, height: undefined, color: 'black' },\n};\n\nconst Wrapper = ({ children }: { children: ReactNode }) => (\n <svg viewBox='-1, -1, 42, 42' className='logo'>\n <g transform='translate(5 5) scale(0.75 0.75)'>{children}</g>\n </svg>\n);\n\n/**\n * From lichess.\n * Select pieces from settings.\n * Inspect pieces; hover over background-image CSS (data URL); open image in new tab; inspect image and copy SVG HTML.\n */\nconst pieces: Record<string, (style: any) => ReactNode> = {\n p: (style) => (\n <Wrapper>\n <User {...style} />\n </Wrapper>\n ),\n r: (style) => (\n <Wrapper>\n <Plus {...style} />\n </Wrapper>\n ),\n n: (style) => (\n <Wrapper>\n <ShieldStar {...style} />\n </Wrapper>\n ),\n b: (style) => (\n <Wrapper>\n <Flame {...style} />\n </Wrapper>\n ),\n q: (style) => (\n <Wrapper>\n <Asterisk {...style} />\n </Wrapper>\n ),\n k: (style) => (\n <Wrapper>\n <Crown {...style} />\n </Wrapper>\n ),\n};\n\nexport const phosphorPieces: Record<string, ReactNode> = {\n wP: pieces.p(style.white),\n wR: pieces.r(style.white),\n wN: pieces.n(style.white),\n wB: pieces.b(style.white),\n wQ: pieces.q(style.white),\n wK: pieces.k(style.white),\n\n bP: pieces.p(style.black),\n bR: pieces.r(style.black),\n bN: pieces.n(style.black),\n bB: pieces.b(style.black),\n bQ: pieces.q(style.black),\n bK: pieces.k(style.black),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode } from 'react';\n\nconst style = {\n white: { c1: '#f8f8f8', c2: '#d3d3d3' },\n black: { c1: '#565252', c2: '#444242' },\n};\n\n/**\n * From lichess.\n * Select pieces from settings.\n * Inspect pieces; hover over background-image CSS (data URL); open image in new tab; inspect image and copy SVG HTML.\n */\nconst pieces: Record<string, (style: any) => ReactNode> = {\n p: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='535 1350 1333 1333'>\n <path\n d='M820 2500v-99l87-3 87-3 56-182 57-182-30-28c-62-58-82-147-51-221 52-126 211-166 311-79 91 80 96 207 12 290l-39 39 58 182 58 181 82 3 82 3v199H820z'\n fill={style.c1}\n />\n <path\n d='M1590 2500v-99l-82-3-82-3-58-181-58-182 39-39c38-38 61-91 61-144 0-30-19-89-29-89-3 0-65 59-136 130-84 84-135 128-145 125-17-6-22-10 77 68l60 48 12 117c16 154 15 152 57 152h34v200h250z'\n fill={style.c2}\n />\n <path\n d='M1340 2500v-100h-34c-42 0-41 2-57-152l-12-117-64-51-63-51-10 26c-6 15-10 31-10 38 0 11-24 87-75 237l-23 65-86 3-86 3v199h520zm-91-614l133-134-41-40c-55-53-117-68-190-47-113 34-170 176-115 287 13 25 59 68 73 68 3 0 66-60 140-134z'\n fill={style.c1}\n />\n <path\n d='M820 2500v-99l87-3 87-3 56-182 57-182-30-28c-62-58-82-147-51-221 52-126 211-166 311-79 91 80 96 207 12 290l-39 39 58 182 58 181 82 3 82 3v199H820z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n r: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='1670 1350 1333 1333'>\n <path\n d='M1940 2500v-99l62-3 63-3 22-210c30-287 33-256-37-299l-60-38 2-161 3-162 57-3 58-3v101h109l3-47 3-48h190l3 48 3 47h109v-101l57 3 58 3 3 163 2 162-46 28c-25 15-52 32-60 37-12 9-11 39 6 215 11 113 23 220 26 238l5 32h129v200h-770z'\n fill={style.c1}\n />\n <g fill={style.c2}>\n <path d='M2710 2500v-100h-129l-5-32c-3-18-15-125-26-238-17-176-18-206-6-215 8-5 35-22 60-37l46-28-2-162-3-163-58-3-57-3v51c0 49-1 50-30 50h-30v230h-238l-237 1 54 34c30 19 57 38 60 42 3 5 12 9 18 10 7 2 65 35 128 74l115 71 1 51c1 29 4 99 8 157l6 105 37 3 38 3v199h250z' />\n <path d='M2418 1573l-3-48-50-3-50-3 3 51 4 50h99z' />\n </g>\n <path\n d='M2460 2501v-100l-38-3-37-3-6-105c-4-58-7-128-8-157l-1-51-122-76c-68-41-126-72-130-68-3 4-9 39-13 77-4 39-8 86-10 105-7 68-14 146-19 203-3 32-8 63-11 68-4 5-33 9-66 9h-59v200h520zm10-766v-115h-149l-3-47-3-48h-90l-3 48-3 47h-109v-101l-58 3-57 3-3 163-2 162h480z'\n fill={style.c1}\n />\n <path\n d='M1940 2500v-99l62-3 63-3 22-210c30-287 33-256-37-299l-60-38 2-161 3-162 57-3 58-3v101h109l3-47 3-48h190l3 48 3 47h109v-101l57 3 58 3 3 163 2 162-46 28c-25 15-52 32-60 37-12 9-11 39 6 215 11 113 23 220 26 238l5 32h129v200h-770z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n n: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='2780 1350 1333 1333'>\n <path\n d='M3060 2500v-99l106-3 106-3-82-69-82-69 168-168 167-167-26-16c-43-29-91-31-141-6-25 12-46 26-46 31 0 22-22 5-67-53-28-35-53-68-57-75-4-8 66-61 212-159l220-146 42 22c190 97 273 340 183 531-16 35-39 75-51 89l-21 25 45 46 45 46-82 69-81 69 106 3 106 3v199h-770z'\n fill={style.c1}\n />\n <g fill={style.c2}>\n <path d='M3830 2500v-99l-106-3-106-3 81-69 82-69-45-46-45-46 21-25c12-14 35-54 51-89 55-116 47-264-19-377-31-52-108-126-162-153-53-27-62-27-26 2 46 35 73 68 103 127 124 239-6 525-267 591-35 8-63 17-64 20-1 2 9 34 21 72l23 67h158v200h300z' />\n <path d='M3540 1923v-97l-48 47c-40 39-50 45-62 35-13-11-13-11-2 2 10 12 4 22-35 62l-47 48h194z' />\n </g>\n <path\n d='M3530 2500v-100h-158l-21-62c-12-35-21-67-21-72-1-5 27-17 62-25 261-66 390-350 268-591-27-52-103-140-122-140-12 0-428 279-428 287 0 6 74 106 101 137 5 5 16 0 26-11 37-43 126-55 178-23l30 18 47-46 48-46v194h-195l-115 115-114 114 20 23c10 13 25 27 33 32 7 4 30 24 49 42 20 19 40 34 44 34s8 5 8 10c0 6-42 10-105 10h-105v200h470z'\n fill={style.c1}\n />\n <path\n d='M3060 2500v-99l106-3 106-3-82-69-82-69 168-168 167-167-26-16c-43-29-91-31-141-6-25 12-46 26-46 31 0 22-22 5-67-53-28-35-53-68-57-75-4-8 66-61 212-159l220-146 42 22c190 97 273 340 183 531-16 35-39 75-51 89l-21 25 45 46 45 46-82 69-81 69 106 3 106 3v199h-770z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n b: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='3890 1350 1330 1330'>\n <path\n d='M4180 2500v-100h186l38-162c21-90 40-168 43-174 2-6-30-54-72-107-41-54-75-102-75-108s21-38 47-71l47-61 26 31 27 32 32-45 32-45-20-29c-12-16-21-32-21-36 0-10 92-125 99-125 3 1 37 42 76 93 38 50 99 128 133 174l64 82-78 101-78 101 32 137c18 75 37 154 43 175l10 37h179v200h-770z'\n fill={style.c1}\n />\n <path\n d='M4950 2500v-100h-179l-10-37c-6-21-25-100-43-175l-32-137 77-100c42-55 77-101 77-103s-54-1-119 2l-119 5-72 93c-39 50-74 92-78 92s-8 11-8 25c-1 14 2 25 6 25 5 0 38 18 74 41l64 40 7 97c9 134 8 132 61 132h44v200h250zm-422-699c18-22 32-43 32-48 0-4-10-21-23-37l-23-29-36 49-36 48 21 28c11 15 24 28 27 28 4 0 21-18 38-39z'\n fill={style.c2}\n />\n <path\n d='M4700 2500v-100h-44c-53 0-52 2-61-132l-7-97-64-40c-36-23-69-41-73-41-7 0-20 46-63 223l-21 87h-187v200h520zm-168-555l73-95h112c62 0 113-3 112-7 0-9-31-50-157-208-50-64-92-121-92-126 0-20-18-5-63 56l-48 64 45 58c25 32 46 62 46 66 0 11-61 87-70 87-4 0-26-27-50-60-24-32-46-57-51-55-4 3-26 33-49 66l-41 61 47 61c27 34 60 77 74 94 14 18 28 33 32 33s40-43 80-95z'\n fill={style.c1}\n />\n <path\n d='M4180 2500v-100h186l38-162c21-90 40-168 43-174 2-6-30-54-72-107-41-54-75-102-75-108s21-38 47-71l47-61 26 31 27 32 32-45 32-45-20-29c-12-16-21-32-21-36 0-10 92-125 99-125 3 1 37 42 76 93 38 50 99 128 133 174l64 82-78 101-78 101 32 137c18 75 37 154 43 175l10 37h179v200h-770z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n q: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='5010 1350 1333 1333'>\n <path\n d='M5300 2500v-100h178l10-47c6-27 18-86 27-133l17-85-107-233c-59-128-105-235-103-237 2-3 24 1 49 8 43 12 44 14 47 58 3 40 10 54 62 110l59 64 1-94c0-89-2-97-26-122l-27-28 23-61c12-33 25-60 29-60s26 20 50 44l42 43-15 36c-14 35-13 39 22 121 20 48 39 86 43 86 3 0 22-39 42-86 35-83 36-87 22-122l-16-36 43-43c23-24 45-43 49-43 7 0 49 97 49 115 0 6-11 22-25 35-23 22-25 30-25 122v99l60-68c54-60 60-72 60-110 0-47 6-52 77-67l32-7-110 238-110 238 16 85c9 47 21 106 27 133l10 47h178v200h-760z'\n fill={style.c1}\n />\n <g fill={style.c2}>\n <path d='M6060 2500v-100h-178l-10-47c-6-27-18-86-27-133l-16-85 110-238 110-238-32 7c-71 15-77 20-77 67 0 38-6 50-60 110l-60 68v-99c0-92 2-100 25-122 14-13 25-29 25-35 0-22-42-115-52-115-5 0-7 4-4 8 3 5-22 134-54 288-33 153-60 282-60 286 0 5-38 8-85 8-67 0-85 3-85 14 0 8-3 23-6 33-4 12-3 14 3 5 7-9 30 1 94 40l84 53 3 63 3 62h109v200h240z' />\n <path d='M5640 1992c0-7 11-35 25-64 14-28 21-54 16-57-4-3-24-43-44-89-35-80-35-84-21-119l15-36-42-43c-24-24-46-44-49-44-8 0 83 447 93 456 4 4 7 2 7-4z' />\n </g>\n <path\n d='M5820 2500v-100h-109l-3-62-3-63-84-53c-61-38-87-49-92-40-3 7-12 42-18 78-7 36-17 82-23 103l-11 37h-177v200h520zm-120-378c0-4 27-133 60-287 33-153 57-281 54-284-2-3-23 13-45 35l-40 40 16 39c14 31 14 43 4 64-12 26-29 65-47 111-5 14-22 51-36 83s-26 63-26 70c-1 40-23-44-60-230-24-117-47-210-51-207-5 3-9 13-9 23 0 9-4 21-9 27-22 24-21 61 4 84 23 22 25 30 25 117 0 51-4 93-8 93-5 0-24-19-42-42-19-24-42-49-52-56-13-9-18-26-18-57 0-24-6-47-13-52-19-12-81-33-85-28-3 2 8 30 23 62 83 177 126 272 159 346l25 57h85c48 0 86-3 86-8z'\n fill={style.c1}\n />\n <path\n d='M5300 2500v-100h178l10-47c6-27 18-86 27-133l17-85-107-233c-59-128-105-235-103-237 2-3 24 1 49 8 43 12 44 14 47 58 3 40 10 54 62 110l59 64 1-94c0-89-2-97-26-122l-27-28 23-61c12-33 25-60 29-60s26 20 50 44l42 43-15 36c-14 35-13 39 22 121 20 48 39 86 43 86 3 0 22-39 42-86 35-83 36-87 22-122l-16-36 43-43c23-24 45-43 49-43 7 0 49 97 49 115 0 6-11 22-25 35-23 22-25 30-25 122v99l60-68c54-60 60-72 60-110 0-47 6-52 77-67l32-7-110 238-110 238 16 85c9 47 21 106 27 133l10 47h178v200h-760z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n k: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='6150 1350 1333 1333'>\n <path\n d='M6430 2500v-100h237l17-57 16-58-72-153-72-154 24-19c58-44 130-63 240-64 98 0 109 2 170 32 36 17 71 36 78 41 11 7-1 41-59 161l-73 152 15 57 15 57 117 3 117 3v199h-770zm333-705c4-25 9-56 13-70 6-24 5-25-40-19l-46 7v-105l46 7c41 6 45 5 40-12-3-10-8-30-12-45l-6-28h115l-6 45-7 45 40-6 40-7v106l-41-7-42-7 6 38c4 21 9 53 13 71l6 32h-125z'\n fill={style.c1}\n />\n <path\n d='M7200 2500v-99l-117-3-117-3-15-57-15-57 72-150c40-83 72-151 72-153s-45-2-99 0c-65 2-101 7-104 15-2 7-17 74-32 150l-28 137h-58c-43 0-58 4-63 16-8 21-8 24 4 24 5 0 39 18 75 40 55 34 74 40 120 40h55v200h250zm-324-692c-4-18-9-50-13-71l-6-38 42 7 41 7v-106l-40 7-40 6 7-45c6-44 5-45-23-45h-29v310h34c32 0 33-1 27-32zm-179-148c0-30-2-43-4-27-2 15-2 39 0 55 2 15 4 2 4-28z'\n fill={style.c2}\n />\n <path\n d='M6950 2500v-100h-55c-46 0-65-6-120-40-36-22-69-40-74-40-4 0-14 18-21 40l-13 40h-237v200h520zm-105-357c15-76 30-144 33-150 3-9 33-13 101-13 89-1 94-2 76-16-22-17-81-44-131-61-46-15-191-9-249 11-47 16-115 55-115 66 0 3 31 70 68 150l67 145 61 3 61 3zm-29-316c2-7 3-76 2-152l-3-140-29-3c-26-3-28-1-22 22 3 14 9 37 12 51 5 19 3 24-7 21-8-2-26-7-42-10-27-6-27-6-27 44v50l42-6 41-7-6 39c-4 21-9 54-13 72-6 30-5 32 20 32 15 0 29-6 32-13z'\n fill={style.c1}\n />\n <path\n d='M6430 2500v-100h237l17-57 16-58-72-153-72-154 24-19c58-44 130-63 240-64 98 0 109 2 170 32 36 17 71 36 78 41 11 7-1 41-59 161l-73 152 15 57 15 57 117 3 117 3v199h-770zm333-705c4-25 9-56 13-70 6-24 5-25-40-19l-46 7v-105l46 7c41 6 45 5 40-12-3-10-8-30-12-45l-6-28h115l-6 45-7 45 40-6 40-7v106l-41-7-42-7 6 38c4 21 9 53 13 71l6 32h-125z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n};\n\nexport const riohachaPieces: Record<string, ReactNode> = {\n wP: pieces.p(style.white),\n wR: pieces.r(style.white),\n wN: pieces.n(style.white),\n wB: pieces.b(style.white),\n wQ: pieces.q(style.white),\n wK: pieces.k(style.white),\n\n bP: pieces.p(style.black),\n bR: pieces.r(style.black),\n bN: pieces.n(style.black),\n bB: pieces.b(style.black),\n bQ: pieces.q(style.black),\n bK: pieces.k(style.black),\n};\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", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ChessPlugin } from './ChessPlugin';\n\nexport default ChessPlugin;\n\nexport * from './ChessPlugin';\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,gBAAgBC,qBAA4C;AACnF,SAASC,cAAc;;;ACHvB,OAAOC,YAAoC;AAE3C,SAASC,gBAAgB;;;ACFzB,SAASC,kBAAkB;AAC3B,SAASC,SAASC,eAAe;AACjC,OAAOC,UAASC,WAAWC,gBAAgB;AAE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BAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;APNK,IAAMC,cAAc,MAAA;AACzB,SAAO;IACLC;IACAC,UAAU;MACRC,UAAU;QACRC,SAAS;UACP,CAACC,SAASC,QAAQ,GAAG;YACnBC,cAAc,CAACC,WAA6BC,aAAaC,YAAYC,QAAQH,MAAAA;YAC7EI,aAAa;cAAC;cAA0B;gBAAEC,IAAIC;cAAa;;YAC3DC,MAAM;UACR;QACF;MACF;MACAC,MAAM;QACJC,QAAQ;UAACZ;;MACX;MACAa;MACAC,SAAS;QACPC,aAAa,MACXC,cAAc;UACZC,IAAIR;UACJS,MAAM;YAAC;YAAW;;UAClBC,QAAQ,CAACC,SAAwCC,SAASD,KAAKE,OAAO;UACtEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,gBAAAM,OAAA,cAACC,wBAAAA;YAAeC,MAAMN,KAAKE;YAASJ;;QACrE,CAAA;MACJ;MACAS,QAAQ;QACNC,WAAW,MACTC,eAAexB,YAAYC,QAAQ,CAAC,EAAEwB,KAAI,OAAQ;UAChDV,MAAM;YACJW,QAAQC,OAAOhC,UAAU;cAAE8B;YAAK,CAAA;UAClC;QACF,EAAA;MACJ;IACF;EACF;AACF;;;AQ5CA,IAAA,cAAeG;",
6
- "names": ["React", "createIntent", "createResolver", "createSurface", "create", "React", "getSpace", "CrownCross", "Chess", "ChessJs", "React", "useEffect", "useState", "generateName", "invariant", "useMembers", "Input", "Select", "useThemeContext", "getSize", "mx", "ArrowURightDown", "Circle", "Chess", "React", "Chessboard", "ReactChessboard", "useResizeDetector", "getSize", "mx", "React", "style", "white", "fill", "black", "pieces", "p", "svg", "width", "height", "viewBox", "xmlns", "path", "d", "r", "n", "b", "q", "k", "customPieces", "wP", "wR", "wN", "wB", "wQ", "wK", "bP", "bR", "bN", "bB", "bQ", "bK", "Flame", "Crown", "ShieldStar", "Plus", "Asterisk", "User", "React", "style", "white", "width", "undefined", "height", "color", "black", "Wrapper", "children", "React", "svg", "viewBox", "className", "g", "transform", "pieces", "p", "User", "r", "Plus", "n", "ShieldStar", "b", "Flame", "q", "Asterisk", "k", "Crown", "phosphorPieces", "wP", "wR", "wN", "wB", "wQ", "wK", "bP", "bR", "bN", "bB", "bQ", "bK", "React", "style", "white", "c1", "c2", "black", "pieces", "p", "React", "svg", "xmlns", "viewBox", "path", "d", "fill", "stroke", "strokeWidth", "r", "g", "n", "b", "q", "k", "riohachaPieces", "wP", "wR", "wN", "wB", "wQ", "wK", "bP", "bR", "bN", "bB", "bQ", "bK", "ChessPieces", "chessPieces", "undefined", "customPieces", "phosphorPieces", "riohachaPieces", "props", "customDropSquareStyle", "boxShadow", "boardStyles", "default", "customDarkSquareStyle", "backgroundColor", "customLightSquareStyle", "blue", "dark", "Chessboard", "model", "chess", "orientation", "readonly", "boardStyle", "pieces", "onUpdate", "ref", "width", "useResizeDetector", "style", "handleDrop", "source", "target", "piece", "move", "from", "to", "promotion", "toLowerCase", "state", "Chess", "fen", "result", "err", "React", "div", "className", "ReactChessboard", "boardWidth", "position", "boardOrientation", "arePiecesDraggable", "onPieceDrop", "useChessModel", "game", "model", "setModel", "useState", "useEffect", "pgn", "chess", "ChessJs", "loadPgn", "handleUpdate", "move", "invariant", "Chess", "space", "playerSelector", "React", "div", "role", "className", "Chessboard", "onUpdate", "PlayerSelector", "members", "useMembers", "key", "PlayerSelect", "side", "value", "playerWhite", "onValueChange", "player", "playerBlack", "themeMode", "useThemeContext", "iconFillMode", "undefined", "Input", "Root", "Label", "CrownCross", "mx", "getSize", "weight", "aria-label", "Select", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "map", "member", "memberKey", "identity", "identityKey", "toHex", "displayName", "profile", "generateName", "Option", "ChessContainer", "game", "role", "space", "getSpace", "React", "div", "className", "Chess", "playerSelector", "GameType", "typename", "CHESS_PLUGIN", "ChessPlugin", "meta", "provides", "metadata", "records", "GameType", "typename", "createObject", "props", "createIntent", "ChessAction", "Create", "placeholder", "ns", "CHESS_PLUGIN", "icon", "echo", "schema", "translations", "surface", "definitions", "createSurface", "id", "role", "filter", "data", "isObject", "subject", "component", "React", "ChessContainer", "game", "intent", "resolvers", "createResolver", "name", "object", "create", "ChessPlugin"]
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 { CHESS_PLUGIN, 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 placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\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 { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.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,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;;;ACAjC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,UAAUC,QAAQ,GAAG;QACpB,kBAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;ADNK,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,aAAa;UAAC;UAA0B;YAAEC,IAAIC;UAAa;;QAC3DC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaiB,aAAaC;IAC1Bf,UAAU,MACRC,YACEe,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcZ;MACda,WAAW,MAAMC,aAAaC,YAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;EACA5B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO0B;IACpBxB,UAAUyB;EACZ,CAAA;EACA9B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO4B;IACpB1B,UAAU2B;EACZ,CAAA;EACAhC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO8B;IACpB5B,UAAU6B;EACZ,CAAA;CACD;",
6
+ "names": ["lazy", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChessType", "typename", "metadata", "placeholder", "ns", "CHESS_PLUGIN", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "ArtifactDefinition"]
7
7
  }
@@ -0,0 +1,28 @@
1
+ import {
2
+ ChessAction,
3
+ ChessType
4
+ } from "./chunk-NNA3W3LX.mjs";
5
+
6
+ // packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
7
+ import { Chess } from "chess.js";
8
+ import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
9
+ import { create } from "@dxos/live-object";
10
+ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
11
+ intent: ChessAction.Create,
12
+ resolve: ({ name, fen }) => {
13
+ const pgn = fen ? new Chess(fen).pgn() : void 0;
14
+ return {
15
+ data: {
16
+ object: create(ChessType, {
17
+ name,
18
+ fen,
19
+ pgn
20
+ })
21
+ }
22
+ };
23
+ }
24
+ }));
25
+ export {
26
+ intent_resolver_default as default
27
+ };
28
+ //# sourceMappingURL=intent-resolver-KBIH2KYC.mjs.map
@@ -0,0 +1,7 @@
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 { create } from '@dxos/live-object';\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: create(ChessType, { name, fen, pgn }),\n },\n };\n },\n }),\n );\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,aAAa;AAEtB,SAASC,cAAcC,aAAaC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,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,OAAOC,WAAW;UAAER;UAAMC;UAAKC;QAAI,CAAA;MAC7C;IACF;EACF;AACF,CAAA,CAAA;",
6
+ "names": ["Chess", "Capabilities", "contributes", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ChessAction", "Create", "resolve", "name", "fen", "pgn", "Chess", "undefined", "data", "object", "create", "ChessType"]
7
+ }
@@ -1 +1 @@
1
- {"inputs":{"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":2328,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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/meta.ts":{"bytes":1374,"imports":[],"format":"esm"},"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/types/types.ts":{"bytes":3331,"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/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":6388,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"import-statement","original":"./components/ChessContainer"},{"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":769,"imports":[{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":50739},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-3UQBTNX5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-2H2BTWYT.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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":["ChessPlugin","default"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1352},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":498},"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},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":324},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":31}},"bytes":35375},"packages/plugins/plugin-chess/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-2H2BTWYT.mjs","kind":"import-statement"}],"exports":["CHESS_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-chess/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-3UQBTNX5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-2H2BTWYT.mjs","kind":"import-statement"}],"exports":["ChessAction","GameType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":224},"packages/plugins/plugin-chess/dist/lib/browser/chunk-3UQBTNX5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3019},"packages/plugins/plugin-chess/dist/lib/browser/chunk-3UQBTNX5.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-2H2BTWYT.mjs","kind":"import-statement"},{"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":["ChessAction","GameType","MoveSchema","isObject"],"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}},"bytes":1259},"packages/plugins/plugin-chess/dist/lib/browser/chunk-2H2BTWYT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":660},"packages/plugins/plugin-chess/dist/lib/browser/chunk-2H2BTWYT.mjs":{"imports":[],"exports":["CHESS_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":255}},"bytes":388}}}
1
+ {"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"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/artifact-definition.ts":{"bytes":18402,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","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-schema","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":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"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/ChessComponent.tsx":{"bytes":4522,"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}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"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":3335,"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/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":908,"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":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":1365,"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":1825,"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":7895,"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":790,"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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5064},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-D2SD45UX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["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":1623},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2825},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-D2SD45UX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8015},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-D2SD45UX.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","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-schema","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":5714}},"bytes":5974},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"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":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"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":"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":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3767},"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.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","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1966},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.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}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":990}},"bytes":1131}}}
@@ -0,0 +1,42 @@
1
+ import {
2
+ ChessContainer
3
+ } from "./chunk-R26FYVUS.mjs";
4
+ import {
5
+ CHESS_PLUGIN,
6
+ ChessType,
7
+ isObject
8
+ } from "./chunk-NNA3W3LX.mjs";
9
+ import {
10
+ ChessComponent
11
+ } from "./chunk-VRWXC5L2.mjs";
12
+
13
+ // packages/plugins/plugin-chess/src/capabilities/react-surface.tsx
14
+ import React from "react";
15
+ import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
16
+ import { isInstanceOf } from "@dxos/echo-schema";
17
+ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
18
+ createSurface({
19
+ id: CHESS_PLUGIN,
20
+ role: [
21
+ "article",
22
+ "section"
23
+ ],
24
+ filter: (data) => isObject(data.subject),
25
+ component: ({ data, role }) => /* @__PURE__ */ React.createElement(ChessContainer, {
26
+ game: data.subject,
27
+ role
28
+ })
29
+ }),
30
+ createSurface({
31
+ id: "plugin-chess",
32
+ role: "canvas-node",
33
+ filter: (data) => isInstanceOf(ChessType, data),
34
+ component: ({ data }) => /* @__PURE__ */ React.createElement(ChessComponent, {
35
+ game: data
36
+ })
37
+ })
38
+ ]);
39
+ export {
40
+ react_surface_default as default
41
+ };
42
+ //# sourceMappingURL=react-surface-2PI2KNSU.mjs.map
@@ -0,0 +1,7 @@
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 { isInstanceOf } from '@dxos/echo-schema';\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: (data): data is any => isInstanceOf(ChessType, data),\n component: ({ data }) => <ChessComponent game={data} />,\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,oBAAoB;AAO7B,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,QAAQ,CAACC,SAAsBM,aAAaC,WAAWP,IAAAA;IACvDG,WAAW,CAAC,EAAEH,KAAI,MAAO,sBAAA,cAACQ,gBAAAA;MAAeH,MAAML;;EACjD,CAAA;CACD;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "isInstanceOf", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CHESS_PLUGIN", "role", "filter", "data", "isObject", "subject", "component", "ChessContainer", "game", "isInstanceOf", "ChessType", "ChessComponent"]
7
+ }
@@ -1,13 +1,12 @@
1
1
  import {
2
2
  ChessAction,
3
- GameType,
3
+ ChessType,
4
4
  MoveSchema,
5
5
  isObject
6
- } from "../chunk-3UQBTNX5.mjs";
7
- import "../chunk-2H2BTWYT.mjs";
6
+ } from "../chunk-NNA3W3LX.mjs";
8
7
  export {
9
8
  ChessAction,
10
- GameType,
9
+ ChessType,
11
10
  MoveSchema,
12
11
  isObject
13
12
  };
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var ChessContainer_LEPLNICP_exports = {};
30
+ __export(ChessContainer_LEPLNICP_exports, {
31
+ default: () => ChessContainer_default
32
+ });
33
+ module.exports = __toCommonJS(ChessContainer_LEPLNICP_exports);
34
+ var import_chunk_CSRNUKOH = require("./chunk-CSRNUKOH.cjs");
35
+ var import_react = __toESM(require("react"));
36
+ var import_echo = require("@dxos/react-client/echo");
37
+ var import_react_ui_stack = require("@dxos/react-ui-stack");
38
+ var import_react2 = require("@phosphor-icons/react");
39
+ var import_react3 = __toESM(require("react"));
40
+ var import_display_name = require("@dxos/display-name");
41
+ var import_echo2 = require("@dxos/react-client/echo");
42
+ var import_react_ui = require("@dxos/react-ui");
43
+ var import_react_ui_theme = require("@dxos/react-ui-theme");
44
+ var PlayerSelector = ({ space, game }) => {
45
+ const members = (0, import_echo2.useMembers)(space.key);
46
+ return /* @__PURE__ */ import_react3.default.createElement("div", {
47
+ role: "none",
48
+ className: "grid grid-cols-2 gap-8"
49
+ }, /* @__PURE__ */ import_react3.default.createElement("div", {
50
+ role: "none",
51
+ className: "flex flex-row-reverse items-center gap-2"
52
+ }, /* @__PURE__ */ import_react3.default.createElement(PlayerSelect, {
53
+ side: "white",
54
+ value: game.playerWhite,
55
+ onValueChange: (player) => game.playerWhite = player,
56
+ members
57
+ })), /* @__PURE__ */ import_react3.default.createElement("div", {
58
+ role: "none",
59
+ className: "flex flex-row items-center gap-2"
60
+ }, /* @__PURE__ */ import_react3.default.createElement(PlayerSelect, {
61
+ side: "black",
62
+ value: game.playerBlack,
63
+ onValueChange: (player) => game.playerBlack = player,
64
+ members
65
+ })));
66
+ };
67
+ var PlayerSelect = ({ side, value, onValueChange, members }) => {
68
+ const { themeMode } = (0, import_react_ui.useThemeContext)();
69
+ const iconFillMode = side === "black" && themeMode === "light" || side === "white" && themeMode === "dark" ? "fill" : void 0;
70
+ return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Root, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Label, null, /* @__PURE__ */ import_react3.default.createElement(import_react2.CrownCross, {
71
+ className: (0, import_react_ui_theme.mx)((0, import_react_ui_theme.getSize)(6)),
72
+ weight: iconFillMode,
73
+ "aria-label": `Chess icon for side ${side}`
74
+ })), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Root, {
75
+ value,
76
+ onValueChange
77
+ }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.TriggerButton, {
78
+ placeholder: "Select player"
79
+ }), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Portal, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Content, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Viewport, null, members.map((member) => {
80
+ const memberKey = member.identity.identityKey.toHex();
81
+ const displayName = member.identity?.profile?.displayName || (0, import_display_name.generateName)(memberKey);
82
+ return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Option, {
83
+ key: memberKey,
84
+ value: memberKey
85
+ }, displayName);
86
+ }))))));
87
+ };
88
+ var ChessContainer = ({ game }) => {
89
+ const space = (0, import_echo.getSpace)(game);
90
+ if (!space) {
91
+ return null;
92
+ }
93
+ return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
94
+ toolbar: false
95
+ }, /* @__PURE__ */ import_react.default.createElement("div", {
96
+ role: "none",
97
+ className: "grid grid-rows-[60px_1fr_60px] grow overflow-hidden"
98
+ }, /* @__PURE__ */ import_react.default.createElement("div", null), /* @__PURE__ */ import_react.default.createElement("div", {
99
+ className: "flex m-4 overflow-hidden"
100
+ }, /* @__PURE__ */ import_react.default.createElement(import_chunk_CSRNUKOH.ChessComponent, {
101
+ game
102
+ })), /* @__PURE__ */ import_react.default.createElement(PlayerSelector, {
103
+ space,
104
+ game
105
+ })));
106
+ };
107
+ var ChessContainer_default = ChessContainer;
108
+ //# sourceMappingURL=ChessContainer-LEPLNICP.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ChessContainer.tsx", "../../../src/components/PlayerSelector.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { ChessComponent } from './ChessComponent';\nimport { PlayerSelector } from './PlayerSelector';\nimport { type ChessType } from '../types';\n\nconst ChessContainer = ({ game }: { game: ChessType; role?: string }) => {\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n return (\n <StackItem.Content toolbar={false}>\n <div role='none' className='grid grid-rows-[60px_1fr_60px] grow overflow-hidden'>\n <div />\n\n <div className='flex m-4 overflow-hidden'>\n <ChessComponent game={game} />\n </div>\n\n <PlayerSelector space={space} game={game} />\n </div>\n </StackItem.Content>\n );\n};\n\nexport default ChessContainer;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { CrownCross } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { generateName } from '@dxos/display-name';\nimport { useMembers, type Space, type SpaceMember } from '@dxos/react-client/echo';\nimport { Input, Select, useThemeContext } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { type ChessType } from '../types';\n\nexport const PlayerSelector = ({ space, game }: { space: Space; game: ChessType }) => {\n const members = useMembers(space.key);\n\n return (\n <div role='none' className='grid grid-cols-2 gap-8'>\n <div role='none' className='flex flex-row-reverse items-center gap-2'>\n <PlayerSelect\n side='white'\n value={game.playerWhite}\n onValueChange={(player) => (game.playerWhite = player)}\n members={members}\n />\n </div>\n <div role='none' className='flex flex-row items-center gap-2'>\n <PlayerSelect\n side='black'\n value={game.playerBlack}\n onValueChange={(player) => (game.playerBlack = player)}\n members={members}\n />\n </div>\n </div>\n );\n};\n\nconst PlayerSelect = ({\n side,\n value,\n onValueChange,\n members,\n}: {\n side: 'white' | 'black';\n value: string | undefined;\n onValueChange: (player: string) => void;\n members: SpaceMember[];\n}) => {\n const { themeMode } = useThemeContext();\n const iconFillMode =\n (side === 'black' && themeMode === 'light') || (side === 'white' && themeMode === 'dark') ? 'fill' : undefined;\n\n return (\n <Input.Root>\n <Input.Label>\n <CrownCross className={mx(getSize(6))} weight={iconFillMode} aria-label={`Chess icon for side ${side}`} />\n </Input.Label>\n <Select.Root value={value} onValueChange={onValueChange}>\n <Select.TriggerButton placeholder={'Select player'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {members.map((member) => {\n const memberKey = member.identity.identityKey.toHex();\n const displayName = member.identity?.profile?.displayName || generateName(memberKey);\n return (\n <Select.Option key={memberKey} value={memberKey}>\n {displayName}\n </Select.Option>\n );\n })}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Input.Root>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,kBAAyB;AACzB,4BAA0B;ACH1B,IAAAA,gBAA2B;AAC3B,IAAAA,gBAAkB;AAElB,0BAA6B;AAC7B,IAAAC,eAAyD;AACzD,sBAA+C;AAC/C,4BAA4B;AAIrB,IAAMC,iBAAiB,CAAC,EAAEC,O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AUI,SAASD,mBAAeE,kCAAaN,SAAAA;AAC1E,WACE,8BAAA/B,QAAA,cAACuB,uBAAOe,QAAM;MAACvC,KAAKgC;MAAWzB,OAAOyB;OACnCI,WAAAA;EAGP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAOd;ADlEA,IAAMI,iBAAiB,CAAC,EAAE3C,KAAI,MAAsC;AAClE,QAAMD,YAAQ6C,sBAAS5C,IAAAA;AACvB,MAAI,CAACD,OAAO;AACV,WAAO;EACT;AAEA,SACEK,6BAAAA,QAAA,cAACyC,gCAAUd,SAAO;IAACe,SAAS;KAC1B1C,6BAAAA,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzBH,6BAAAA,QAAA,cAACC,OAAAA,IAAAA,GAEDD,6BAAAA,QAAA,cAACC,OAAAA;IAAIE,WAAU;KACbH,6BAAAA,QAAA,cAAC2C,sCAAAA;IAAe/C;OAGlBI,6BAAAA,QAAA,cAACN,gBAAAA;IAAeC;IAAcC;;AAItC;AAEA,IAAA,yBAAe2C;",
6
+ "names": ["import_react", "import_echo", "PlayerSelector", "space", "game", "members", "useMembers", "key", "React", "div", "role", "className", "PlayerSelect", "side", "value", "playerWhite", "onValueChange", "player", "playerBlack", "themeMode", "useThemeContext", "iconFillMode", "undefined", "Input", "Root", "Label", "CrownCross", "mx", "getSize", "weight", "aria-label", "Select", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "map", "member", "memberKey", "identity", "identityKey", "toHex", "displayName", "profile", "generateName", "Option", "ChessContainer", "getSpace", "StackItem", "toolbar", "ChessComponent"]
7
+ }