Files
taskpile/frontend/node_modules/ts-jest/dist/utils/memoize.js
Alvis f1d51b8cc8 Add side panels, task selection, graph animation, and project docs
- Foldable left panel (user profile) and right panel (task details)
- Clicking a task in the list or graph node selects it and shows details
- Both views (task list + graph) always mounted via absolute inset-0 for
  correct canvas dimensions; tabs toggle visibility with opacity
- Graph node selection animation: other nodes repel outward (charge -600),
  then selected node smoothly slides to center (500ms cubic ease-out),
  then charge restores to -120 and graph stabilizes
- Graph re-fits on tab switch and panel resize via ResizeObserver
- Fix UUID string IDs throughout (backend returns UUIDs, not integers)
- Add TaskDetailPanel, UserPanel components
- Add CLAUDE.md project documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 11:23:06 +00:00

61 lines
2.3 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Memoize = Memoize;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const cacheProp = Symbol.for('[memoize]');
/**
* @internal
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function Memoize(keyBuilder) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (_, propertyKey, descriptor) => {
if (descriptor.value != null) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
descriptor.value = memoize(propertyKey, descriptor.value, keyBuilder || ((v) => v));
}
else if (descriptor.get != null) {
descriptor.get = memoize(propertyKey, descriptor.get, keyBuilder || (() => propertyKey));
}
};
}
// See https://github.com/microsoft/TypeScript/issues/1863#issuecomment-579541944
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function ensureCache(target, reset = false) {
if (reset || !target[cacheProp]) {
Object.defineProperty(target, cacheProp, {
value: Object.create(null),
configurable: true,
});
}
return target[cacheProp];
}
// See https://github.com/microsoft/TypeScript/issues/1863#issuecomment-579541944
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function ensureChildCache(target, key, reset = false) {
const dict = ensureCache(target);
if (reset || !dict[key]) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
dict[key] = new Map();
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return dict[key];
}
function memoize(namespace,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
func,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
keyBuilder) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return function (...args) {
const cache = ensureChildCache(this, namespace);
const key = keyBuilder.apply(this, args);
if (cache.has(key))
return cache.get(key);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const res = func.apply(this, args);
cache.set(key, res);
return res;
};
}