import type { MarkdocAttributeSchema, MarkdocSchema } from './schema.js'; /** Enough of a real Markdoc `Config['tags'][name]['attributes'][name]` entry to extract statics from. */ export interface RawMarkdocAttribute { type?: unknown; required?: boolean; default?: unknown; matches?: unknown; } /** Enough of a real Markdoc `Config['tags'][name]` entry to extract statics from. */ export interface RawMarkdocTag { selfClosing?: boolean; attributes?: Record; validate?: unknown; } export type RawMarkdocTagMap = Record; /** * Converts one raw Markdoc attribute definition into recheck's * `MarkdocAttributeSchema`. * * `tagHasValidate` forces `dynamic: true` regardless of this attribute's own * type. A tag-level `validate()` -- for example `img`'s src/srcSet/images * mutual-exclusivity check, `code-snippet`'s from/after and to/before checks, * or `diagram`'s type/align re-checks -- can read and reject any of the tag's * attributes for reasons this generator can't discover from the schema object * alone, since that would mean analyzing an arbitrary JS function body. So * every attribute of a `validate()`-carrying tag is conservatively marked * dynamic, even one with a plain `String`/`Number`/`Boolean` type and a * `matches` array (`img.align`, `diagram.type`). * * Recorded facets (`required`, `default`, `enum`) are kept even when dynamic: * `dynamic` only tells a value-checking rule to skip them, it doesn't make the * facet itself unknown. */ export declare function extractAttribute(rawAttribute: RawMarkdocAttribute, tagHasValidate: boolean): MarkdocAttributeSchema; /** * Composes three raw Markdoc tag maps in caller-chosen precedence order * (later arguments win a name collision) and converts every tag to recheck's * statics-only `MarkdocSchema`. Both callers share this precedence-then-convert * shape: the built-in generator composes markdoc + portal + theme in Realm's * own override order; the `recheck --generate-markdoc-schema` action extracts one * project module's tags at a time and passes empty maps for the other two, so * the composition is a no-op and only that module's tags come out. */ export declare function extractStatics(themeTagMap: RawMarkdocTagMap, markdocBuiltinTags: RawMarkdocTagMap, portalBuiltInTagMap: RawMarkdocTagMap): MarkdocSchema; //# sourceMappingURL=extract-statics.d.ts.map