Files
taskpile/frontend/node_modules/@babel/generator/lib/node/index.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

82 lines
2.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TokenContext = void 0;
exports.isLastChild = isLastChild;
exports.parentNeedsParens = parentNeedsParens;
var parens = require("./parentheses.js");
var _t = require("@babel/types");
var _nodes = require("../nodes.js");
const {
VISITOR_KEYS
} = _t;
const TokenContext = exports.TokenContext = {
normal: 0,
expressionStatement: 1,
arrowBody: 2,
exportDefault: 4,
arrowFlowReturnType: 8,
forInitHead: 16,
forInHead: 32,
forOfHead: 64,
forInOrInitHeadAccumulate: 128,
forInOrInitHeadAccumulatePassThroughMask: 128
};
for (const type of Object.keys(parens)) {
const func = parens[type];
if (_nodes.generatorInfosMap.has(type)) {
_nodes.generatorInfosMap.get(type)[2] = func;
}
}
function isOrHasCallExpression(node) {
switch (node.type) {
case "CallExpression":
return true;
case "MemberExpression":
return isOrHasCallExpression(node.object);
}
return false;
}
function parentNeedsParens(node, parent, parentId) {
switch (parentId) {
case 112:
if (parent.callee === node) {
if (isOrHasCallExpression(node)) return true;
}
break;
case 42:
return !isDecoratorMemberExpression(node) && !(node.type === "CallExpression" && isDecoratorMemberExpression(node.callee)) && node.type !== "ParenthesizedExpression";
}
return false;
}
function isDecoratorMemberExpression(node) {
switch (node.type) {
case "Identifier":
return true;
case "MemberExpression":
return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object);
default:
return false;
}
}
function isLastChild(parent, child) {
const visitorKeys = VISITOR_KEYS[parent.type];
for (let i = visitorKeys.length - 1; i >= 0; i--) {
const val = parent[visitorKeys[i]];
if (val === child) {
return true;
} else if (Array.isArray(val)) {
let j = val.length - 1;
while (j >= 0 && val[j] === null) j--;
return j >= 0 && val[j] === child;
} else if (val) {
return false;
}
}
return false;
}
//# sourceMappingURL=index.js.map