# `MishkaCmsCore.Runtime.PageBuilder.Marketplace.Kits`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/runtime/page_builder/marketplace/kits.ex#L5)

A `MishkaCmsCore.Runtime.PageBuilder.Marketplace` adapter over the registry this install actually
has: the UI-kit bundles sitting on disk.

The Studio's Registry tab was written against a catalogue of things to fetch, and with no remote
registry configured its Install button had nothing to install. But an install DOES have a real
set of components it could add and has not — a site is normally set up with a subset of a kit,
and the other 100 components of that kit are exactly "a package available to install".

So a package here is one uninstalled kit component, and installing it is the same operation the
first-run wizard performs: the component **plus its dependency closure**, through
`MishkaCmsCore.Install.UiKitCatalog.install_set/2` and `UiKitHandler.install_kits!/2`. Picking
`card` brings `icon` with it, because a card that cannot draw its icon is not installed.

What this adapter does NOT do is invent presets. A preset is a page layout and a token set, and
nothing on disk supplies one — `presets/1` and `snippets/1` therefore return nothing, and the
Studio says so rather than showing sample cards.

# `package_categories`

```elixir
@spec package_categories(map()) :: [String.t()]
```

Every category the installed kits actually use, in the catalogue's own order.

Read off the whole catalogue rather than off `packages/1`, which stops at `@page` — a category
whose components all sort late would otherwise have no chip.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
