Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/refresh-orbit-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@modernrelay/orbit-core': patch
'@modernrelay/orbit-engine-cosmos': patch
---

Update the core store to Zustand 5.1.0 and the graph renderer to Cosmos 3.6.1. The renderer uses luma.gl 9.3.6, the latest version within Cosmos's supported peer range.

Preserve center-based lasso selection while retaining footprint overlap for rectangle culling. Cosmos 3.6 removes the simulation's space-size boundary and changes force behavior, so layouts may settle differently.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Setup

Use Node.js 22.18+, 24.11+, or 26+ for the current development tools, and
pnpm 12.15.0 (pinned in `packageManager`). The published Cosmos and OmniGraph
Use Node.js 22.22.2+, 24.15+, or 26+ for the current development tools, and
pnpm 12.23.0 (pinned in `packageManager`). The published Cosmos and OmniGraph
adapters require Node.js 22 or newer.

```bash
Expand Down
10 changes: 5 additions & 5 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"react-dom": "^19.3.1"
},
"devDependencies": {
"@axe-core/playwright": "^4.14.0",
"@playwright/test": "^1.64.1",
"@types/react": "^19.3.0",
"@axe-core/playwright": "^4.14.1",
"@playwright/test": "^1.65.1",
"@types/react": "^19.3.3",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.2",
"@vitejs/plugin-react": "^6.3.0",
"typescript": "^7.0.2",
"vite": "^8.3.5"
"vite": "^8.4.0"
}
}
6 changes: 3 additions & 3 deletions apps/spike/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"test": "echo \"spike has no unit tests; use pnpm probe\" && exit 0"
},
"dependencies": {
"@cosmos.gl/graph": "3.5.1",
"@cosmos.gl/graph": "3.6.1",
"@luma.gl/core": "~9.3.6",
"@luma.gl/engine": "~9.3.6",
"@luma.gl/shadertools": "~9.3.6",
"@luma.gl/webgl": "~9.3.6"
},
"devDependencies": {
"@playwright/test": "^1.64.1",
"@playwright/test": "^1.65.1",
"typescript": "^7.0.2",
"vite": "^8.3.5"
"vite": "^8.4.0"
}
}
13 changes: 8 additions & 5 deletions apps/spike/probes/position-snapshots.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** The adapter relies on Cosmos 3.5's flat readback being an owned snapshot. */
/** The adapter relies on flat synchronous and asynchronous reads owning their snapshots. */
import { test, expect } from '@playwright/test';
import { openWorkbench } from './util';
import { recordProbe } from './record';
Expand All @@ -16,9 +16,12 @@ test('position-snapshots: flat readbacks stay owned across reads and roster upda
g.render(0, 0);
await s.sampleNextFrame([]);
const first = g.getPointPositionsArray();
const asyncFirst = await g.getPointPositionsAsync();
const same = (a: Float32Array, b: Float32Array): boolean =>
a.length === b.length && a.every((value, index) => Object.is(value, b[index]));
const initialOk = first instanceof Float32Array && same(first, initial);
const asyncSnapshotOk = asyncFirst instanceof Float32Array && same(asyncFirst, initial) &&
asyncFirst.buffer !== first.buffer;

// Mirror the core's pinned-coordinate overlay on a caller-owned snapshot.
first[0] = 999;
Expand All @@ -32,19 +35,19 @@ test('position-snapshots: flat readbacks stay owned across reads and roster upda
await s.sampleNextFrame([]);
const current = g.getPointPositionsArray();
const replacementOk = same(current, replacement);
const oldSnapshotsStable = same(first, firstExpected) && same(second, initial);
return { initialOk, independentReads, replacementOk, oldSnapshotsStable };
const oldSnapshotsStable = same(first, firstExpected) && same(second, initial) && same(asyncFirst, initial);
return { initialOk, asyncSnapshotOk, independentReads, replacementOk, oldSnapshotsStable };
});

recordProbe({
capability: 'position-snapshots',
expected: 'getPointPositionsArray() returns owned Float32 snapshots, preserves NaN tombstones, ' +
expected: 'Synchronous and asynchronous position reads return owned Float32 snapshots, preserve NaN tombstones, ' +
'and keeps earlier snapshots unchanged across caller mutations, later reads and roster replacement.',
observed: result,
pass: Object.values(result).every(Boolean),
notes: 'No reusable out array is passed; Orbit callers may mutate their snapshot to overlay pinned coordinates.',
});
expect(result).toEqual({
initialOk: true, independentReads: true, replacementOk: true, oldSnapshotsStable: true,
initialOk: true, asyncSnapshotOk: true, independentReads: true, replacementOk: true, oldSnapshotsStable: true,
});
});
49 changes: 49 additions & 0 deletions apps/spike/probes/region-selection.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/** Pin the Cosmos 3.6 selection-mode seam used to preserve Orbit's earlier behavior. */
import { test, expect } from '@playwright/test';
import { openWorkbench } from './util';
import { recordProbe } from './record';

test('region-selection: center polygon queries preserve footprint rectangle culling', async ({ page }) => {
await openWorkbench(page);
const result = await page.evaluate(async () => {
const s = window.__spike;
await s.init({
enableSimulation: false, fitViewOnInit: false, rescalePositions: false,
scalePointsOnZoom: false, pointDefaultSize: 30,
});
const g = s.graph;
if (!g) throw new Error('graph missing');
g.setPointPositions(Float32Array.of(100, 100), true);
g.render(0, 0);
g.setZoomTransformByPointPositions(Float32Array.of(100, 100), 0, 1);
await s.sampleNextFrame([]);
const [x, y] = s.spaceToScreen(0);
// A small strip crossing the point's footprint, entirely beside its center.
const corners: [[number, number], [number, number]] = [[x + 2, y - 2], [x + 4, y + 2]];
const polygon: [number, number][] = [corners[0], [x + 4, y - 2], corners[1], [x + 2, y + 2]];
const before = g.findPointsInRect(corners);
const previousMode = g.config.pointSelectionMode;
let selected: number[];
try {
g.setConfigPartial({ pointSelectionMode: 'center' });
selected = g.findPointsInPolygon(polygon);
} finally {
g.setConfigPartial({ pointSelectionMode: previousMode });
}
return {
defaultMode: previousMode, selected,
rectangleBefore: before, rectangleAfter: g.findPointsInRect(corners),
touchPolygon: g.findPointsInPolygon(polygon),
};
});
const expected = {
defaultMode: 'touch', selected: [], rectangleBefore: [0], rectangleAfter: [0], touchPolygon: [0],
};
recordProbe({
capability: 'region-selection',
expected: 'Center-mode polygon selection excludes a boundary-only footprint; rectangle culling retains it before and after restoring touch mode.',
observed: result,
pass: JSON.stringify(result) === JSON.stringify(expected),
});
expect(result).toEqual(expected);
});
12 changes: 6 additions & 6 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"react-dom": "^19.3.1"
},
"devDependencies": {
"@storybook/addon-docs": "10.6.3",
"@storybook/react-vite": "10.6.3",
"@types/react": "^19.3.0",
"@storybook/addon-docs": "10.6.9",
"@storybook/react-vite": "10.6.9",
"@types/react": "^19.3.3",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.2",
"storybook": "10.6.3",
"@vitejs/plugin-react": "^6.3.0",
"storybook": "10.6.9",
"typescript": "^7.0.2",
"vite": "^8.3.5"
"vite": "^8.4.0"
}
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.5",
"@changesets/cli": "^3.0.3",
"@changesets/cli": "^3.1.0",
"esbuild": "^0.28.2",
"eslint": "^10.13.0",
"eslint": "^10.16.0",
"publint": "^0.3.25",
"tsup": "^9.0.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.72.0",
"vitest": "^5.0.5"
"typescript-eslint": "^8.74.0",
"vitest": "^5.1.2"
},
"packageManager": "pnpm@12.15.0",
"packageManager": "pnpm@12.23.0",
"engines": {
"node": "^22.18.0 || ^24.11.0 || >=26.0.0"
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
}
}
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"zustand": "^5.0.16"
"zustand": "^5.1.0"
},
"devDependencies": {
"typescript": "^7.0.2",
"vitest": "^5.0.5",
"@types/node": "^26.6.5"
"vitest": "^5.1.2",
"@types/node": "^26.6.11"
}
}
4 changes: 2 additions & 2 deletions packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
},
"devDependencies": {
"apache-arrow": "^21.2.0",
"hyparquet": "^1.31.5",
"hyparquet": "^1.33.2",
"typescript": "^7.0.2",
"vitest": "^5.0.5"
"vitest": "^5.1.2"
}
}
Loading
Loading