JobyKit.PageComponent (JobyKit v0.2.0)

Copy Markdown View Source

Function components that render the JobyKit design surfaces.

Two surfaces are exposed:

  • page_component/1 — JobyKit's curated /design page. Renders the decision tree, wrapper contract, only the :core category from the host manifest (the kit's canonical wrappers), and the daisyUI catalogue. Identical across every JobyKit consumer; this is the agentic-first contract surface.

  • custom_page_component/1 — host-defined composites and domain components. Renders only :composite and :domain categories from the host manifest, plus a slim breadcrumb back to /design. Hosts mount this at any path they like (/custom-designs, /composites, etc.).

Both consume the same manifest module (use JobyKit.Manifest) but filter differently. The JSON endpoint (JobyKit.ManifestController) returns all entries — kit core + composites + domain — so agents have a single source of truth.

Hosts wrap these components in their own LiveView render and supply page chrome (layout, headers, navigation).

Summary

Functions

Host page renderer for composites and domain components.

Functions

custom_page_component(assigns)

Host page renderer for composites and domain components.

Filters the manifest to only :composite and :domain entries (anything that is not :core). The kit's /design page never surfaces these — that's by design, so the kit's catalogue stays uniform across every consumer. Use this component on a separate route (typically /custom-designs) to give your composites and domain components their own discoverable surface.

Attributes

  • manifest (:atom) (required)
  • back_to (:string) - Defaults to "/design".
  • title (:string) - Defaults to "Custom designs".
  • description (:string) - Defaults to "Composites and domain components defined by this app. The kit's curated wrapper inventory and the wrapper contract live on /design.".

page_component(assigns)

Attributes

  • manifest (:atom) (required)
  • custom_path (:string) - Defaults to nil.