- 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>
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
var keys = require('object-keys');
|
|
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
|
|
var toStr = Object.prototype.toString;
|
|
var concat = Array.prototype.concat;
|
|
var defineDataProperty = require('define-data-property');
|
|
|
|
var isFunction = function (fn) {
|
|
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
|
};
|
|
|
|
var supportsDescriptors = require('has-property-descriptors')();
|
|
|
|
var defineProperty = function (object, name, value, predicate) {
|
|
if (name in object) {
|
|
if (predicate === true) {
|
|
if (object[name] === value) {
|
|
return;
|
|
}
|
|
} else if (!isFunction(predicate) || !predicate()) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (supportsDescriptors) {
|
|
defineDataProperty(object, name, value, true);
|
|
} else {
|
|
defineDataProperty(object, name, value);
|
|
}
|
|
};
|
|
|
|
var defineProperties = function (object, map) {
|
|
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
var props = keys(map);
|
|
if (hasSymbols) {
|
|
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
}
|
|
for (var i = 0; i < props.length; i += 1) {
|
|
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
}
|
|
};
|
|
|
|
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
|
|
module.exports = defineProperties;
|