| 1 |
import { buildSubtreeManifest } from './subtree-manifest'; |
| 2 |
|
| 3 |
// Wrapper/child units edited as one so both schemas ship; grow over time. |
| 4 |
const COMBO_BLOCKS = new Set(['core/buttons', 'core/button']); |
| 5 |
|
| 6 |
// Blocks local-pick and schema-loading skip; empty today, kept as the seam. |
| 7 |
export const IGNORED_BLOCKS = new Set([]); |
| 8 |
|
| 9 |
// single/combo pin the selection's schema; multi ships the subtree's or narrows. |
| 10 |
export const classifyBlockEdit = ({ block, root }) => { |
| 11 |
if (!block?.blockType || IGNORED_BLOCKS.has(block.blockType)) |
| 12 |
return { bucket: 'multi' }; |
| 13 |
if (COMBO_BLOCKS.has(block.blockType)) return { bucket: 'combo' }; |
| 14 |
if (buildSubtreeManifest(root).length > 1) return { bucket: 'multi' }; |
| 15 |
return { bucket: 'single' }; |
| 16 |
}; |
| 17 |
|