Skip to main content

API

ExportKindDescription
registerCatalog(options?)functionThe field core.register() takes: installs the command and registered navigation entry, and hands back a Catalog
CatalogOptionstype{ commands?: boolean }
Catalogtype{ open(player, addonId?) }, what the field hands back
CatalogDeclarationtypeWhat the field hands register(): the installer, app: 'catalog' and the compiled module the build bakes
CATALOG_PAGE_AREAconstantThe addon page rectangle within the shared frame: x, y, width and height
catalogOf(core)functionThis realm's Catalog, or undefined when this addon installed none

@bedrock-core/catalog/compiled​

What the ui-compiler stage bakes: the catalog screen and the page the manifest becomes.

ExportKindDescription
AddonPagecomponentRender a manifest's name, version, authors, description and artwork
AddonPagePropstype{ manifest: AddonManifest; icon?: string; embedName?: string }; icon overrides the conventional pack icon for an embedded library page

@bedrock-core/catalog/integration​

ExportKindDescription
CATALOG_PAGE_AREAconstantThe same page rectangle exported by @bedrock-core/catalog, for use as Embed's area
registerCatalogPage(Page)functionSchedule publication from the default Core runtime
publishCatalogPage(runtime, Page)functionPublish from an explicitly registered runtime
pages(runtime)functionRead and publish addon page references
addonPageReference(Page)functionDerive reserved page values and entry-point targets
isAddonPageReference(value)type guardValidate an addon-page reference envelope
pageTargeted(name)functionMark a compiled page button with an entry-point name
CatalogPagesServiceclassPublish and discover addon page announcements
AddonPageReferencetypeReserved values and entry-point targets for an addon page
PageTarget, TargetedPresstypesEntry-point name and the handler that describes it

These functions can be used without installing a catalog browser.