Skip to main content

load_pack_document

Function load_pack_document 

Source
pub fn load_pack_document(pack: &LibraryPack) -> Result<Document, AddError>
Expand description

Load the FULL Document of a resolved pack.

super::resolve_packs only yields pack METADATA; materialization needs the pack’s component/token/style/asset subtrees, so this re-reads and parses the pack’s source: embedded presets from EMBEDDED_PACKS, project packs from disk.

§Errors

Returns AddError when the embedded source for pack.id cannot be located, or when a project pack file cannot be read or parsed.