Skip to main content

Module import

Module import 

Source
Expand description

Import pipeline — turns a parsed DesignMd document (or raw W3C tokens) into a persisted DesignSystem plus per-component ComponentOverrideRecords.

This is UAR-native glue: flint-forge’s application layer (flint-forge/crates/fdb-app/src/a2ui/) only defines the parser and domain types, and does not implement an end-to-end “apply a parsed DESIGN.md to the catalog” use case in a single function — that logic lives in flint-forge’s interface layer, which is out of scope for this change. import_design_md below is written for UAR to make the ported parser + types actually usable end-to-end.

Structs§

ImportReport
Result of importing a DesignMd document: the persisted design system plus a report of which component overrides were applied vs. skipped (skipped because no base component with a matching slug exists in the catalog yet).

Enums§

ImportError
Errors from the design-system import pipeline.

Functions§

import_design_md
Parse raw_markdown as a DESIGN.md document and persist it as a new DesignSystem, applying any §5 component overrides to base components already present in store (matched by slug). Overrides referencing an unknown slug are skipped and reported in ImportReport::skipped_slugs rather than failing the whole import — this mirrors the graceful-degradation behavior flint-forge documents for its embedder (“semantic search degrades gracefully to text search”).
import_w3c_tokens
Import a raw W3C Design Tokens Community Group 2024 JSON document as a new design system (no component overrides — W3C token exports carry no component-level information).