@booleanpress/nimbus-devdocs
v0.1.0
Published
Stripe-style API reference layout and BooleanSMTP-style plugin devdocs widgets, on top of @booleanpress/nimbus.
Maintainers
Readme
@booleanpress/nimbus-devdocs
Stripe-style API reference layout and BooleanSMTP-flavored plugin devdocs widgets, built on top of
@booleanpress/nimbus. Consumed today by developers.booleansmtp.com.
What's here
layouts/ApiDocsLayout.astro— the three-pane REST API reference shell (nav · content · sticky code rail). Wraps@booleanpress/nimbus'sBaseLayout/Header/Footeraroundcomponents/ui/api-layout'sApiLayout, fetched from@cloudflare/nimbus-docs's component registry (https://nimbus-docs.com/registry) and committed here as owned source, the same distribution model@booleanpress/nimbusitself follows. Needs a real, spec-derivedApiPageProps/ApiNavmodel —buildApiModel()/getApiPageProps()/getApiNav()from@cloudflare/nimbus-docs/api— it cannot render hand-written prose directly.components/ui/api-layout/,api-sidebar/,api-code-rail/,api-field-row/— the fetched registry source (ApiLayout,ApiSidebar,ApiCodeRail,ApiFieldRowand their supporting files). One import inApiSidebarItem.astrowas rewritten from a direct file-path import to@booleanpress/nimbus'sui/*barrel (that package only exports whole-folder barrels, not individual files) — otherwise unmodified.components/ui/pro-badge/— a smallBadgevariant marking BooleanSMTP Pro-only capabilities. The one genuinely new UI primitive this package adds; everything else it needs (badge,code,banner,breadcrumbs,page-actions,layer-card,sidebar,collapsible) is re-exported from@booleanpress/nimbus's ownui/*via thin shim files atcomponents/ui/<name>/index.ts.lib/cn.ts— a local copy of@booleanpress/nimbus'scn()helper (that package'sexportsmap has no./lib/cnsubpath to import from directly; proposed upstream inoffice/proposals/).components/HookExplorer.astro,HookSignature.astro,HookParams.astro,WpConfigBuilder.astro— the BooleanSMTP-specific widgets, moved fromdevelopers.booleansmtp.com-src. Each takes its data as props now (hooks, signatures, params, scenarios) instead of importing a site-local data module, since a published package can't reach into its consumer'ssrc/.schema.ts(./schema) —devdocsSchemaFields, asourcesfrontmatter field (the plugin paths a devdocs page rests on) to spread intodocsCollection({ schemaFields: { ...seoSchemaFields, ...devdocsSchemaFields } })alongside@booleanpress/nimbus's own SEO fields. Devdocs-specific — the end-user docs site has nosourcesconvention.
Requirements
Peer dependencies: astro >=7.2.6 <8.0.0, @booleanpress/nimbus >=0.1.1 <0.2.0,
@cloudflare/nimbus-docs >=0.15.0 <0.16.0 (one minor ahead of @booleanpress/nimbus's own reviewed
0.14.2 pin — checked safe: nimbus-booleanpress never imports /api or apiCollection(), the only
surface that changed between the two versions), tailwindcss + @tailwindcss/vite >=4.1.0 <5.0.0,
@iconify-json/ph ^1.2.0.
Using ApiDocsLayout
Not wired to real content yet. It needs an OpenAPI spec (hand-authored for BooleanSMTP, not generated from
the plugin's route registrations) parsed through @cloudflare/nimbus-docs/api's buildApiModel() before a
route can render through it. Until that exists, REST API content stays on @booleanpress/nimbus's own
DocsLayout, the same as every other guide page.
