(block: T)
| 108 | } |
| 109 | |
| 110 | export function classifyStartBlock<T extends MinimalBlock>(block: T): StartBlockPath | null { |
| 111 | const blockState = block as Partial<BlockState> |
| 112 | |
| 113 | // Try to get metadata from the block itself first |
| 114 | let category: string | undefined |
| 115 | const triggerModeEnabled = Boolean(blockState.triggerMode) |
| 116 | |
| 117 | // If not available on the block, fetch from registry |
| 118 | const blockConfig = getBlock(block.type) |
| 119 | |
| 120 | if (blockConfig) { |
| 121 | category = blockConfig.category |
| 122 | } |
| 123 | |
| 124 | return classifyStartBlockType(block.type, { category, triggerModeEnabled }) |
| 125 | } |
| 126 | |
| 127 | export function isLegacyStartPath(path: StartBlockPath): boolean { |
| 128 | return path !== StartBlockPath.UNIFIED |
no test coverage detected