Dollie Editor SDK guide

Catalog Contract

Reference for sources, packages, sections, and elements.

CatalogSource

A source has:

  • a kebab-case id;
  • a human-readable label;
  • an optional unique prefix;
  • sections;
  • optional elements.

Final ids are the source prefix plus the local entry id.

CatalogPackage

A package has:

  • id and name;
  • one or more sources;
  • optional version and description;
  • optional definitions;
  • optional templates;
  • optional AI instructions and skill pointers.

Use defineCatalog to validate and stamp a package contract.

templates is an array of PageTemplate documents. defineCatalog parses each template and rejects the package when one is malformed. Use exportTemplate to create them so requirements are computed from the actual Page definition.

Element kinds

Kind Registration
illustration Registered in a catalog
widget Registered in a catalog
image Stored inline with its source URL

Use createCatalog to compose sources and packages into a PageBuilderCatalog.

The returned Catalog exposes:

  • packages: summaries with Section, Element, and Template counts;
  • sections, illustrations, and elements: registered runtime entries;
  • templates: templates aggregated from packages in registration order;
  • resolveSection, resolveIllustration, and resolveElement: id lookups.

Templates from bare host storage are not added automatically. Concatenate them with catalog.templates when building the current editor surface.

Catalog functions

Function Purpose
defineCatalog(package) Validate a package and stamp the current catalog contract version
createCatalog(entries) Compose CatalogSource and CatalogPackage entries into one runtime Catalog
catalogPackageSummary(package) Return stable Section, Element, and Template counts

See Catalog Templates for the complete template function reference.