- 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>
53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
let Declaration = require('../declaration')
|
|
let { isPureNumber } = require('../utils')
|
|
|
|
class GridEnd extends Declaration {
|
|
/**
|
|
* Change repeating syntax for IE
|
|
*/
|
|
insert(decl, prefix, prefixes, result) {
|
|
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
|
|
|
let clonedDecl = this.clone(decl)
|
|
|
|
let startProp = decl.prop.replace(/end$/, 'start')
|
|
let spanProp = prefix + decl.prop.replace(/end$/, 'span')
|
|
|
|
if (decl.parent.some(i => i.prop === spanProp)) {
|
|
return undefined
|
|
}
|
|
|
|
clonedDecl.prop = spanProp
|
|
|
|
if (decl.value.includes('span')) {
|
|
clonedDecl.value = decl.value.replace(/span\s/i, '')
|
|
} else {
|
|
let startDecl
|
|
decl.parent.walkDecls(startProp, d => {
|
|
startDecl = d
|
|
})
|
|
if (startDecl) {
|
|
if (isPureNumber(startDecl.value)) {
|
|
let value = Number(decl.value) - Number(startDecl.value) + ''
|
|
clonedDecl.value = value
|
|
} else {
|
|
return undefined
|
|
}
|
|
} else {
|
|
decl.warn(
|
|
result,
|
|
`Can not prefix ${decl.prop} (${startProp} is not found)`
|
|
)
|
|
}
|
|
}
|
|
|
|
decl.cloneBefore(clonedDecl)
|
|
|
|
return undefined
|
|
}
|
|
}
|
|
|
|
GridEnd.names = ['grid-row-end', 'grid-column-end']
|
|
|
|
module.exports = GridEnd
|