archive issue fix
Some checks failed
CI / check (push) Failing after 5m5s

This commit is contained in:
2026-09-10 19:29:39 +05:30
parent 6249e00a3a
commit f522b6508e
20 changed files with 2444 additions and 207 deletions

View File

@@ -6,6 +6,7 @@ import {
ALIGN_VALUES, GAP_VALUES, MAX_COLUMNS, MIN_COLUMNS, SPACING_VALUES,
} from '@/lib/ui/node';
import { dataSourceFor, dataSourceLabel } from '@/lib/skills/surfaces';
import { kindOfBinding } from '@/lib/ui/series';
import { nodeRegistry } from '@/lib/ui/registry';
import { hideOp, layoutOp, nudgeOp, presentationOp, propOp, removeOp, replaceOp } from './ops';
@@ -43,8 +44,25 @@ export function NodeInspector({ node, siblings, page = null, onOperate, registry
if (op) onOperate(op);
};
const shapes = node.data ? dataSourceFor(node.data.source)?.shapes || [] : null;
const replacements = can('replace') ? registry.replacements(node.type, { shapes, page }) : [];
/**
* What this node could be shown as.
*
* The same five facts the conversation passes, in the same order, to the same
* registry call — the editor holds no compatibility rule of its own, so a
* type in this list is exactly a type "show this as a …" would accept. Two
* readings of the rule is how a picker comes to offer something the operation
* then refuses.
*/
const shapes = node.data?.source ? dataSourceFor(node.data.source)?.shapes || [] : null;
const replacements = can('replace')
? registry.replacements(node.type, {
shapes,
page,
seriesKind: kindOfBinding(node.data),
seriesBound: Boolean(node.data?.series),
bound: Boolean(node.data),
})
: [];
return (
<div className="space-y-4">