/** * revenexx: block definitions registered at runtime. * * Build-time block definitions are collected from `defineBlokkli()` calls. * Some blocks are only known at runtime, e.g. blocks contributed by theme * extensions that are installed per tenant. Their definitions are stored in a * Nuxt `useState()` entry (see `useBlokkliRuntimeBlocks()`) and merged with the * build-time definitions by the definition provider. * * Runtime blocks that follow the extension naming scheme (`ext__…`) have no * component or icon of their own: they render through the generic * `extension_host` block of the theme and share its icon. * * This file is intentionally free of Nuxt/Vue runtime imports so it can be * unit tested in isolation. */ import type { BlockDefinition } from '#blokkli-build/definitions'; /** * The `useState()` key holding block definitions registered at runtime. */ export declare const RUNTIME_BLOCKS_STATE_KEY = "blokkli:runtime-blocks"; /** * Bundle prefix of blocks contributed by theme extensions * (`ext______`). */ export declare const EXTENSION_BUNDLE_PREFIX = "ext__"; /** * Bundle of the block that renders all extension blocks. */ export declare const EXTENSION_HOST_BUNDLE = "extension_host"; /** * Whether the bundle was contributed by a theme extension. */ export declare function isExtensionBundle(bundle: string): boolean; /** * Merge build-time and runtime block definitions. * * Runtime definitions are appended after the build-time ones. */ export declare function mergeBlockDefinitions(staticBlocks: BlockDefinition[], runtimeBlocks: BlockDefinition[]): BlockDefinition[]; /** * Resolve the icon of a block bundle. * * Extension bundles without an icon of their own fall back to the icon of the * extension host block. */ export declare function resolveBlockIcon(icons: Record, bundle: string): string | undefined; /** * The component key to fall back to when no component was found for a * bundle, or null if there is no fallback. * * Extension bundles render through the extension host block, which resolves * the extension's remote island from the bundle name. */ export declare function getFallbackComponentKey(type: 'block' | 'fragment', bundleOrFragmentName: string): string | null;