Refactor: Implement SmartCube renderer, improve UI styling, and fix gaps

This commit is contained in:
2026-02-22 04:35:59 +00:00
parent 57abfd6b80
commit b5ddc21662
4168 changed files with 763782 additions and 1008 deletions

32
node_modules/@gkucmierz/utils/spec/heap.spec.mjs generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import { Heap } from '../src/heap.mjs';
describe('Heap', () => {
it('size', () => {
const heap = Heap();
expect(heap.size()).toBe(0);
heap.add(1);
expect(heap.size()).toBe(1);
heap.add(1);
heap.add(1);
expect(heap.size()).toBe(3);
});
it('take', () => {
const heap = Heap();
heap.add(2);
heap.add(1);
heap.add(3);
expect(heap.take()).toBe(1);
expect(heap.take()).toBe(2);
expect(heap.take()).toBe(3);
});
it('valFn', () => {
const heap = Heap(obj => obj.value);
heap.add({ value: 42, other: 'second' });
heap.add({ value: 23, other: 'first' });
expect(heap.take().other).toBe('first');
expect(heap.take().other).toBe('second');
});
});