/** Non-field builder selection (canvas blocks from extensions, submit button). */ export type BuilderEntitySelection = { kind: 'canvas'; id: string } | { kind: 'submit-button' } export function builderEntitySelectionEquals( a: BuilderEntitySelection | null | undefined, b: BuilderEntitySelection, ): boolean { if (!a) { return false } if (a.kind !== b.kind) { return false } if (a.kind === 'canvas' && b.kind === 'canvas') { return a.id === b.id } return true }