init with react+axum+spacetimedb
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-26 18:06:23 +08:00
commit cbc27bad4a
20199 changed files with 883714 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
export type PuzzleGridSize = 3 | 4;
export interface PuzzleCellPosition {
row: number;
col: number;
}
export interface PuzzlePieceState {
pieceId: string;
correctRow: number;
correctCol: number;
currentRow: number;
currentCol: number;
mergedGroupId: string | null;
}
export interface PuzzleMergedGroupState {
groupId: string;
pieceIds: string[];
occupiedCells: PuzzleCellPosition[];
}
export interface PuzzleBoardSnapshot {
rows: number;
cols: number;
pieces: PuzzlePieceState[];
mergedGroups: PuzzleMergedGroupState[];
selectedPieceId: string | null;
allTilesResolved: boolean;
}
export interface PuzzleRuntimeLevelSnapshot {
runId: string;
levelIndex: number;
gridSize: PuzzleGridSize;
profileId: string;
levelName: string;
authorDisplayName: string;
themeTags: string[];
coverImageSrc: string | null;
board: PuzzleBoardSnapshot;
status: 'playing' | 'cleared';
}
export interface PuzzleRunSnapshot {
runId: string;
entryProfileId: string;
clearedLevelCount: number;
currentLevelIndex: number;
currentGridSize: PuzzleGridSize;
playedProfileIds: string[];
previousLevelTags: string[];
currentLevel: PuzzleRuntimeLevelSnapshot | null;
recommendedNextProfileId: string | null;
}
export interface StartPuzzleRunRequest {
profileId: string;
}
export interface AdvanceLocalPuzzleNextLevelRequest {
run: PuzzleRunSnapshot;
sourceSessionId?: string | null;
}
export interface PuzzleRunResponse {
run: PuzzleRunSnapshot;
}
export interface SwapPuzzlePiecesRequest {
firstPieceId: string;
secondPieceId: string;
}
export interface DragPuzzlePieceRequest {
pieceId: string;
targetRow: number;
targetCol: number;
}