Skip to main content
Version: Next

@backstage/plugin-techdocs-react

Home > @backstage/plugin-techdocs-react

Package encapsulating utilities to be shared by frontend TechDocs plugins.

Functions

Function

Description

createTechDocsAddonExtension(options)

Create a TechDocs addon overload signature without props.

createTechDocsAddonExtension(options)

Create a TechDocs addon overload signature with props.

TechDocsShadowDom(props)

Renders a tree of elements in a Shadow DOM.

toLowercaseEntityRefMaybe(entityRef, config)

Lower-case entity triplets by default, but allow override.

useShadowDomStylesLoading(element)

Returns the style's loading state.

useShadowRoot()

Hook for use within TechDocs addons that provides access to the underlying shadow root of the current page, allowing the DOM within to be mutated.

useShadowRootElements(selectors)

Convenience hook for use within TechDocs addons that provides access to elements that match a given selector within the shadow root.

useShadowRootSelection(waitMillis)

Hook for retrieving a selection within the ShadowRoot.

useTechDocsAddons()

hook to use addons in components

useTechDocsReaderPage()

Hook used to get access to shared state between reader page components.

Interfaces

Interface

Description

TechDocsApi

API to talk to techdocs-backend.

TechDocsStorageApi

API which talks to TechDocs storage to fetch files to render.

Variables

Variable

Description

SHADOW_DOM_STYLE_LOAD_EVENT

Name for the event dispatched when ShadowRoot styles are loaded.

TECHDOCS_ADDONS_KEY

Key for each addon.

TECHDOCS_ADDONS_WRAPPER_KEY

Marks the <TechDocsAddons> registry component.

TechDocsAddonLocations

Locations for which TechDocs addons may be declared and rendered.

TechDocsAddons

TechDocs Addon registry.

techdocsApiRef

Utility API reference for the TechDocsApi.

TechDocsReaderPageProvider

A context to store the reader page state

techdocsStorageApiRef

Utility API reference for the TechDocsStorageApi.

Type Aliases

Type Alias

Description

SyncResult

The outcome of a docs sync operation.

TechDocsAddonOptions

Options for creating a TechDocs addon.

TechDocsEntityMetadata

Metadata for TechDocs Entity

TechDocsMetadata

Metadata for TechDocs page

TechDocsReaderPageProviderProps

Props for TechDocsReaderPageProvider

TechDocsReaderPageProviderRenderFunction

render function for TechDocsReaderPageProvider

TechDocsReaderPageValue

type for the value of the TechDocsReaderPageContext

TechDocsShadowDomProps

Props for TechDocsShadowDom().