feat(panel): add experimental modern UI, sliding switchers, cycle range, and fluid animations

This commit is contained in:
fish
2026-11-19 15:05:27 +09:00
parent 70629dcd74
commit 367ca0cd6d
35 changed files with 5066 additions and 294 deletions
+6 -1
View File
@@ -131,7 +131,11 @@ const keyedListState = new WeakMap();
* Keyed incremental list reconciler.
* Reuses existing DOM nodes by key and patches only changed items in-place.
*/
export function patchKeyedList(container, items, { keyFn, sigFn, createRow, updateRow }) {
export function patchKeyedList(
container,
items,
{ keyFn = (_, i) => i, sigFn, createRow, updateRow, destroyRow } = {}
) {
if (!container) return;
let map = keyedListState.get(container);
if (!map) {
@@ -175,6 +179,7 @@ export function patchKeyedList(container, items, { keyFn, sigFn, createRow, upda
if (record.el.parentNode === container) {
container.removeChild(record.el);
}
destroyRow?.(record.refs, record.el);
map.delete(oldKey);
}
}