feat: author first playable mystery

This commit is contained in:
2026-08-14 15:02:00 +02:00
parent d46a425401
commit b284275e98
13 changed files with 413 additions and 11 deletions
+11
View File
@@ -7,6 +7,7 @@ import {
containedIds,
folderIsOpen,
moveBoardPoint,
nextOpenBoardPosition,
normalizeCase,
panViewport,
relationPosition,
@@ -58,6 +59,16 @@ describe('board coordinate math', () => {
expect(zoomFromWheel(1, 10_000)).toBe(MIN_BOARD_ZOOM)
expect(zoomFromWheel(1, -10_000)).toBe(MAX_BOARD_ZOOM)
})
it('places new exhibits in deterministic open slots', () => {
const preferred = { x: 500, y: 400 }
expect(nextOpenBoardPosition([], preferred, { width: 280 })).toEqual(preferred)
expect(nextOpenBoardPosition([{ x: 500, y: 400, width: 280 }], preferred, { width: 280 })).toEqual({ x: 826, y: 400 })
expect(nextOpenBoardPosition([
{ x: 500, y: 400, width: 280 },
{ x: 826, y: 400, width: 280 },
], preferred, { width: 280 })).toEqual({ x: 174, y: 400 })
})
})
describe('timeline projection', () => {