@ankhorage/zora 25.11.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -4
- package/dist/capabilities/index.js +65 -41
- package/dist/capabilities/index.js.map +3 -3
- package/dist/features/chess/adapters/inbound/ChessBoard.d.ts +1 -1
- package/dist/features/chess/adapters/inbound/ChessBoard.d.ts.map +1 -1
- package/dist/features/chess/adapters/inbound/ChessBoard.js +130 -83
- package/dist/features/chess/adapters/inbound/ChessBoard.js.map +1 -1
- package/dist/features/chess/meta.d.ts +97 -72
- package/dist/features/chess/meta.d.ts.map +1 -1
- package/dist/features/chess/meta.js +64 -40
- package/dist/features/chess/meta.js.map +1 -1
- package/dist/features/chess/public.d.ts +1 -7
- package/dist/features/chess/public.d.ts.map +1 -1
- package/dist/features/chess/public.js +0 -6
- package/dist/features/chess/public.js.map +1 -1
- package/dist/features/chess/utils/createChessBoardCellPressHandler.d.ts +6 -0
- package/dist/features/chess/utils/createChessBoardCellPressHandler.d.ts.map +1 -0
- package/dist/features/chess/utils/createChessBoardCellPressHandler.js +17 -0
- package/dist/features/chess/utils/createChessBoardCellPressHandler.js.map +1 -0
- package/dist/features/chess/utils/createChessBoardCells.d.ts +12 -0
- package/dist/features/chess/utils/createChessBoardCells.d.ts.map +1 -0
- package/dist/features/chess/utils/createChessBoardCells.js +28 -0
- package/dist/features/chess/utils/createChessBoardCells.js.map +1 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.d.ts +2 -0
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js +68 -4
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphController.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphResizeObserver.d.ts +3 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphResizeObserver.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphResizeObserver.js +41 -8
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphResizeObserver.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js +6 -2
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/shouldFitGraphAfterLayout.d.ts +2 -2
- package/dist/features/graph-view/adapters/inbound/web-artifact/shouldFitGraphAfterLayout.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/shouldFitGraphAfterLayout.js +3 -3
- package/dist/features/graph-view/adapters/inbound/web-artifact/shouldFitGraphAfterLayout.js.map +1 -1
- package/dist/readerFree.d.ts +2 -2
- package/dist/readerFree.d.ts.map +1 -1
- package/dist/readerFree.js +1 -1
- package/dist/readerFree.js.map +1 -1
- package/dist/types/authoring.d.ts +2 -1
- package/dist/types/authoring.d.ts.map +1 -1
- package/dist/types/authoring.js.map +1 -1
- package/dist/types/chess.d.ts +27 -20
- package/dist/types/chess.d.ts.map +1 -1
- package/dist/types/chess.js.map +1 -1
- package/package.json +31 -92
- package/src/features/chess/adapters/inbound/ChessBoard.tsx +263 -112
- package/src/features/chess/meta.ts +64 -40
- package/src/features/chess/public.test.tsx +77 -228
- package/src/features/chess/public.ts +2 -9
- package/src/features/chess/utils/createChessBoardCellPressHandler.ts +30 -0
- package/src/features/chess/utils/createChessBoardCells.ts +54 -0
- package/src/features/chessTabletopOwnership.test.ts +3 -7
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphController.test.ts +145 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphController.ts +86 -5
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphResizeObserver.test.ts +163 -6
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphResizeObserver.ts +57 -8
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.test.ts +42 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.ts +7 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/shouldFitGraphAfterLayout.test.ts +7 -3
- package/src/features/graph-view/adapters/inbound/web-artifact/shouldFitGraphAfterLayout.ts +7 -3
- package/src/features/registry/componentMeta.test.ts +12 -1
- package/src/readerFree.ts +3 -15
- package/src/types/authoring.ts +2 -1
- package/src/types/chess.ts +28 -21
- package/web-dist/chunks/Accordion-91sjb3zh.js +453 -0
- package/web-dist/components/chess-board/ChessBoard.js +2 -1
- package/web-dist/components/graph-view/GraphView.js +107 -17
- package/web-dist/components/opening-book/OpeningBook.js +2 -1
- package/web-dist/manifest.json +8 -4
- package/dist/features/chess/utils/chessEngine.d.ts +0 -8
- package/dist/features/chess/utils/chessEngine.d.ts.map +0 -1
- package/dist/features/chess/utils/chessEngine.js +0 -71
- package/dist/features/chess/utils/chessEngine.js.map +0 -1
- package/dist/features/chess/utils/chessSquares.d.ts +0 -4
- package/dist/features/chess/utils/chessSquares.d.ts.map +0 -1
- package/dist/features/chess/utils/chessSquares.js +0 -3
- package/dist/features/chess/utils/chessSquares.js.map +0 -1
- package/dist/features/chess/utils/createBoardSquares.d.ts +0 -4
- package/dist/features/chess/utils/createBoardSquares.d.ts.map +0 -1
- package/dist/features/chess/utils/createBoardSquares.js +0 -9
- package/dist/features/chess/utils/createBoardSquares.js.map +0 -1
- package/dist/features/chess/utils/getSquareFile.d.ts +0 -4
- package/dist/features/chess/utils/getSquareFile.d.ts.map +0 -1
- package/dist/features/chess/utils/getSquareFile.js +0 -5
- package/dist/features/chess/utils/getSquareFile.js.map +0 -1
- package/dist/features/chess/utils/getSquareRank.d.ts +0 -4
- package/dist/features/chess/utils/getSquareRank.d.ts.map +0 -1
- package/dist/features/chess/utils/getSquareRank.js +0 -5
- package/dist/features/chess/utils/getSquareRank.js.map +0 -1
- package/dist/features/chess/utils/isLightSquare.d.ts +0 -4
- package/dist/features/chess/utils/isLightSquare.d.ts.map +0 -1
- package/dist/features/chess/utils/isLightSquare.js +0 -6
- package/dist/features/chess/utils/isLightSquare.js.map +0 -1
- package/src/features/chess/utils/chessEngine.test.ts +0 -35
- package/src/features/chess/utils/chessEngine.ts +0 -83
- package/src/features/chess/utils/chessSquares.ts +0 -6
- package/src/features/chess/utils/createBoardSquares.ts +0 -13
- package/src/features/chess/utils/getSquareFile.ts +0 -6
- package/src/features/chess/utils/getSquareRank.ts +0 -6
- package/src/features/chess/utils/isLightSquare.ts +0 -8
- package/web-dist/chunks/Accordion-xcm1qc39.js +0 -3813
package/dist/types/chess.d.ts
CHANGED
|
@@ -2,28 +2,31 @@ import type React from 'react';
|
|
|
2
2
|
import type { ZoraBaseProps } from './base';
|
|
3
3
|
export type ChessBoardOrientation = 'white' | 'black';
|
|
4
4
|
export type ChessPieceCode = string;
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
readonly to: ChessSquareId;
|
|
10
|
-
readonly promotion?: ChessPromotionPiece;
|
|
5
|
+
/** A caller-owned cell location in a rectangular chess presentation board. */
|
|
6
|
+
export interface ChessBoardCell {
|
|
7
|
+
readonly column: number;
|
|
8
|
+
readonly row: number;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
|
|
10
|
+
/** The bounded presentation dimensions supported by ChessBoard. */
|
|
11
|
+
export interface ChessBoardDimensions {
|
|
12
|
+
readonly columns: number;
|
|
13
|
+
readonly rows: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ChessMoveAttempt {
|
|
16
|
+
readonly from: ChessBoardCell;
|
|
17
|
+
readonly to: ChessBoardCell;
|
|
17
18
|
}
|
|
18
19
|
export interface ChessPieceState {
|
|
19
20
|
readonly color: 'black' | 'white';
|
|
20
21
|
readonly piece: ChessPieceCode;
|
|
21
|
-
readonly
|
|
22
|
+
readonly cell: ChessBoardCell;
|
|
22
23
|
}
|
|
23
24
|
export interface ChessPieceRenderContext {
|
|
24
25
|
readonly color: string;
|
|
25
26
|
readonly piece: ChessPieceCode;
|
|
26
|
-
readonly
|
|
27
|
+
readonly cell: ChessBoardCell;
|
|
28
|
+
/** Available cell edge length in pixels. */
|
|
29
|
+
readonly size: number;
|
|
27
30
|
}
|
|
28
31
|
export type ChessPieceRenderer = (context: ChessPieceRenderContext) => React.ReactNode;
|
|
29
32
|
export interface ChessBoardColorScheme {
|
|
@@ -53,20 +56,24 @@ export interface OpeningBookColorScheme {
|
|
|
53
56
|
}
|
|
54
57
|
export type OpeningBookColorOverrides = Partial<OpeningBookColorScheme>;
|
|
55
58
|
export interface ChessBoardProps extends ZoraBaseProps {
|
|
56
|
-
|
|
59
|
+
/** Number of displayed columns, from 2 through 24. */
|
|
60
|
+
readonly columns?: number;
|
|
61
|
+
/** Number of displayed rows, from 2 through 24. */
|
|
62
|
+
readonly rows?: number;
|
|
57
63
|
readonly pieces?: readonly ChessPieceState[];
|
|
58
64
|
readonly orientation?: ChessBoardOrientation;
|
|
59
|
-
readonly
|
|
60
|
-
readonly legalTargets?: readonly
|
|
65
|
+
readonly selectedCell?: ChessBoardCell | null;
|
|
66
|
+
readonly legalTargets?: readonly ChessBoardCell[];
|
|
61
67
|
readonly lastMove?: ChessMoveAttempt | null;
|
|
62
68
|
readonly disabled?: boolean;
|
|
63
69
|
readonly showCoordinates?: boolean;
|
|
64
|
-
|
|
70
|
+
/** Enables explicit editor resize controls when a dimensions callback is supplied. */
|
|
71
|
+
readonly resizable?: boolean;
|
|
65
72
|
readonly colorScheme?: ChessBoardColorOverrides;
|
|
66
|
-
readonly
|
|
73
|
+
readonly onCellPress?: (cell: ChessBoardCell) => void;
|
|
67
74
|
readonly onMoveAttempt?: (move: ChessMoveAttempt) => void;
|
|
68
|
-
|
|
69
|
-
readonly
|
|
75
|
+
/** Receives a caller-owned resize proposal; ZORA never mutates board dimensions. */
|
|
76
|
+
readonly onDimensionsChange?: (dimensions: ChessBoardDimensions) => void;
|
|
70
77
|
readonly renderPiece?: ChessPieceRenderer;
|
|
71
78
|
}
|
|
72
79
|
export interface OpeningBookMove {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.d.ts","sourceRoot":"","sources":["../../src/types/chess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,OAAO,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"chess.d.ts","sourceRoot":"","sources":["../../src/types/chess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,OAAO,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,mEAAmE;AACnE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,c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AAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACjD,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CACxD"}
|
package/dist/types/chess.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chess.js","sourceRoot":"","sources":["../../src/types/chess.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\nexport type ChessBoardOrientation = 'white' | 'black';\nexport type ChessPieceCode = string;\
|
|
1
|
+
{"version":3,"file":"chess.js","sourceRoot":"","sources":["../../src/types/chess.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\nexport type ChessBoardOrientation = 'white' | 'black';\nexport type ChessPieceCode = string;\n\n/** A caller-owned cell location in a rectangular chess presentation board. */\nexport interface ChessBoardCell {\n readonly column: number;\n readonly row: number;\n}\n\n/** The bounded presentation dimensions supported by ChessBoard. */\nexport interface ChessBoardDimensions {\n readonly columns: number;\n readonly rows: number;\n}\n\nexport interface ChessMoveAttempt {\n readonly from: ChessBoardCell;\n readonly to: ChessBoardCell;\n}\n\nexport interface ChessPieceState {\n readonly color: 'black' | 'white';\n readonly piece: ChessPieceCode;\n readonly cell: ChessBoardCell;\n}\n\nexport interface ChessPieceRenderContext {\n readonly color: string;\n readonly piece: ChessPieceCode;\n readonly cell: ChessBoardCell;\n /** Available cell edge length in pixels. */\n readonly size: number;\n}\n\nexport type ChessPieceRenderer = (context: ChessPieceRenderContext) => React.ReactNode;\n\nexport interface ChessBoardColorScheme {\n readonly lightSquare: string;\n readonly darkSquare: string;\n readonly lightSquareText: string;\n readonly darkSquareText: string;\n readonly selectedSquare: string;\n readonly legalTarget: string;\n readonly lastMoveFrom: string;\n readonly lastMoveTo: string;\n readonly border: string;\n readonly coordinateText: string;\n readonly lightPiece: string;\n readonly darkPiece: string;\n}\n\nexport type ChessBoardColorOverrides = Partial<ChessBoardColorScheme>;\n\nexport interface OpeningBookColorScheme {\n readonly border: string;\n readonly surface: string;\n readonly surfaceHover: string;\n readonly selectedSurface: string;\n readonly titleText: string;\n readonly primaryText: string;\n readonly secondaryText: string;\n readonly metricSurface: string;\n}\nexport type OpeningBookColorOverrides = Partial<OpeningBookColorScheme>;\n\nexport interface ChessBoardProps extends ZoraBaseProps {\n /** Number of displayed columns, from 2 through 24. */\n readonly columns?: number;\n /** Number of displayed rows, from 2 through 24. */\n readonly rows?: number;\n readonly pieces?: readonly ChessPieceState[];\n readonly orientation?: ChessBoardOrientation;\n readonly selectedCell?: ChessBoardCell | null;\n readonly legalTargets?: readonly ChessBoardCell[];\n readonly lastMove?: ChessMoveAttempt | null;\n readonly disabled?: boolean;\n readonly showCoordinates?: boolean;\n /** Enables explicit editor resize controls when a dimensions callback is supplied. */\n readonly resizable?: boolean;\n readonly colorScheme?: ChessBoardColorOverrides;\n readonly onCellPress?: (cell: ChessBoardCell) => void;\n readonly onMoveAttempt?: (move: ChessMoveAttempt) => void;\n /** Receives a caller-owned resize proposal; ZORA never mutates board dimensions. */\n readonly onDimensionsChange?: (dimensions: ChessBoardDimensions) => void;\n readonly renderPiece?: ChessPieceRenderer;\n}\n\nexport interface OpeningBookMove {\n readonly san: string;\n readonly uci?: string;\n readonly fen?: string;\n readonly name?: string;\n readonly eco?: string;\n readonly games?: number;\n readonly whiteWinRate?: number;\n readonly drawRate?: number;\n readonly blackWinRate?: number;\n}\n\nexport interface OpeningBookProps extends ZoraBaseProps {\n readonly moves?: readonly OpeningBookMove[];\n readonly title?: string;\n readonly loading?: boolean;\n readonly errorText?: string;\n readonly emptyText?: string;\n readonly selectedMove?: string | null;\n readonly colorScheme?: OpeningBookColorOverrides;\n readonly onMovePress?: (move: OpeningBookMove) => void;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "26.0.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"@ankhorage/runtime": "^5.2.4",
|
|
52
52
|
"@ankhorage/surface": "^9.4.15",
|
|
53
53
|
"@ankhorage/utility": "^1.10.0",
|
|
54
|
-
"chess.js": "^1.4.0",
|
|
55
54
|
"expo-document-picker": "~57.0.3",
|
|
56
55
|
"expo-image-picker": "~57.0.20"
|
|
57
56
|
},
|
|
@@ -529,7 +528,7 @@
|
|
|
529
528
|
}
|
|
530
529
|
},
|
|
531
530
|
{
|
|
532
|
-
"id": "chess.
|
|
531
|
+
"id": "chess.cellPress",
|
|
533
532
|
"owner": "@ankhorage/zora",
|
|
534
533
|
"access": [
|
|
535
534
|
"emit"
|
|
@@ -540,67 +539,18 @@
|
|
|
540
539
|
"source"
|
|
541
540
|
]
|
|
542
541
|
},
|
|
543
|
-
"label": "
|
|
542
|
+
"label": "Cell press",
|
|
544
543
|
"output": {
|
|
545
544
|
"schema": {
|
|
546
545
|
"type": "object",
|
|
547
546
|
"properties": {
|
|
548
|
-
"
|
|
549
|
-
"type": "
|
|
550
|
-
"title": "
|
|
551
|
-
},
|
|
552
|
-
"to": {
|
|
553
|
-
"type": "string",
|
|
554
|
-
"title": "To"
|
|
555
|
-
},
|
|
556
|
-
"promotion": {
|
|
557
|
-
"type": "string",
|
|
558
|
-
"title": "Promotion"
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
"id": "chess.legalMove",
|
|
566
|
-
"owner": "@ankhorage/zora",
|
|
567
|
-
"access": [
|
|
568
|
-
"emit"
|
|
569
|
-
],
|
|
570
|
-
"binding": {
|
|
571
|
-
"kind": "event",
|
|
572
|
-
"bindableAs": [
|
|
573
|
-
"source"
|
|
574
|
-
]
|
|
575
|
-
},
|
|
576
|
-
"label": "Legal move",
|
|
577
|
-
"output": {
|
|
578
|
-
"schema": {
|
|
579
|
-
"type": "object",
|
|
580
|
-
"properties": {
|
|
581
|
-
"from": {
|
|
582
|
-
"type": "string",
|
|
583
|
-
"title": "From"
|
|
584
|
-
},
|
|
585
|
-
"to": {
|
|
586
|
-
"type": "string",
|
|
587
|
-
"title": "To"
|
|
588
|
-
},
|
|
589
|
-
"fen": {
|
|
590
|
-
"type": "string",
|
|
591
|
-
"title": "Position"
|
|
592
|
-
},
|
|
593
|
-
"san": {
|
|
594
|
-
"type": "string",
|
|
595
|
-
"title": "SAN"
|
|
596
|
-
},
|
|
597
|
-
"lan": {
|
|
598
|
-
"type": "string",
|
|
599
|
-
"title": "LAN"
|
|
547
|
+
"column": {
|
|
548
|
+
"type": "number",
|
|
549
|
+
"title": "Column"
|
|
600
550
|
},
|
|
601
|
-
"
|
|
602
|
-
"type": "
|
|
603
|
-
"title": "
|
|
551
|
+
"row": {
|
|
552
|
+
"type": "number",
|
|
553
|
+
"title": "Row"
|
|
604
554
|
}
|
|
605
555
|
}
|
|
606
556
|
}
|
|
@@ -624,16 +574,30 @@
|
|
|
624
574
|
"type": "object",
|
|
625
575
|
"properties": {
|
|
626
576
|
"from": {
|
|
627
|
-
"type": "
|
|
628
|
-
"
|
|
577
|
+
"type": "object",
|
|
578
|
+
"properties": {
|
|
579
|
+
"column": {
|
|
580
|
+
"type": "number",
|
|
581
|
+
"title": "From column"
|
|
582
|
+
},
|
|
583
|
+
"row": {
|
|
584
|
+
"type": "number",
|
|
585
|
+
"title": "From row"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
629
588
|
},
|
|
630
589
|
"to": {
|
|
631
|
-
"type": "
|
|
632
|
-
"
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
590
|
+
"type": "object",
|
|
591
|
+
"properties": {
|
|
592
|
+
"column": {
|
|
593
|
+
"type": "number",
|
|
594
|
+
"title": "To column"
|
|
595
|
+
},
|
|
596
|
+
"row": {
|
|
597
|
+
"type": "number",
|
|
598
|
+
"title": "To row"
|
|
599
|
+
}
|
|
600
|
+
}
|
|
637
601
|
}
|
|
638
602
|
}
|
|
639
603
|
}
|
|
@@ -672,31 +636,6 @@
|
|
|
672
636
|
}
|
|
673
637
|
}
|
|
674
638
|
},
|
|
675
|
-
{
|
|
676
|
-
"id": "chess.squarePress",
|
|
677
|
-
"owner": "@ankhorage/zora",
|
|
678
|
-
"access": [
|
|
679
|
-
"emit"
|
|
680
|
-
],
|
|
681
|
-
"binding": {
|
|
682
|
-
"kind": "event",
|
|
683
|
-
"bindableAs": [
|
|
684
|
-
"source"
|
|
685
|
-
]
|
|
686
|
-
},
|
|
687
|
-
"label": "Square press",
|
|
688
|
-
"output": {
|
|
689
|
-
"schema": {
|
|
690
|
-
"type": "object",
|
|
691
|
-
"properties": {
|
|
692
|
-
"square": {
|
|
693
|
-
"type": "string",
|
|
694
|
-
"title": "Square"
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
639
|
{
|
|
701
640
|
"id": "chip.press",
|
|
702
641
|
"owner": "@ankhorage/zora",
|