Skip to content

v0.3.0: registerSidebarSection — document the sidebar-panel surface - #1

Open
dylanworrall wants to merge 1 commit into
mainfrom
bump-sidebar-section
Open

v0.3.0: registerSidebarSection — document the sidebar-panel surface#1
dylanworrall wants to merge 1 commit into
mainfrom
bump-sidebar-section

Conversation

@dylanworrall

Copy link
Copy Markdown

What

Sync the published froots-api typings to the plugin API surface the Froots app already ships. The repo was ahead of npm 0.2.0: registerSidebarSection exists in the app's src/lib/extensions/types.ts but was never published, so plugin authors get no types for it.

Ref: Plugin views — catalog, now-vs-bridge split design doc §1 ("Current plugin API surface").

Changes

  • froots.d.ts
    • Add PluginSidebarSection (id / title? / order? / viewport? / render).
    • Add ui.registerSidebarSection(section): () => void to FrootsPluginApi.
    • Add the typed registerDomEvent<K extends keyof WindowEventMap> overload; minor doc fixes (kb.read path form, registerInterval return) to match the source.
  • README.md — sidebar section in the API table + a worked "Sidebar sections" guide (viewport scoping, order, render/cleanup rules).
  • package.json0.2.00.3.0 (additive minor).

Verification

  • tsc --noEmit --strict --lib es2020,dom froots.d.ts — clean (exit 0).
  • froots.d.ts FrootsPluginApi now matches the app's types.ts surface.

Publish (Dylan)

This PR does the bump + docs only. npm publish (npm credentials / registry deploy) is left for a maintainer — merge, then npm publish from main.

Sync the npm typings to the app's plugin API surface (the repo was ahead of
published 0.2.0). Documents the sidebar-section contribution point that
already ships in the app:

- Add PluginSidebarSection interface (id/title/order/viewport/render) and
  ui.registerSidebarSection() to FrootsPluginApi.
- Add the typed registerDomEvent<WindowEventMap> overload and minor doc
  fixes (kb.read path form, registerInterval return) to match src types.
- README: sidebar section in the API table + a worked "Sidebar sections"
  guide (viewport scoping, order, render/cleanup rules).
- Bump 0.2.0 -> 0.3.0.

Ref: "Plugin views" design doc §1 (current plugin API surface).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants