From 914cfdb0b7f117c7abdce3553ef319a26aec327c Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Fri, 1 Apr 2022 11:15:23 +0200 Subject: [PATCH] fix(techdocs): update api reports Co-authored-by: Emma Indal Signed-off-by: Camila Belo --- packages/techdocs-addons/api-report.md | 59 ++++++++ packages/techdocs-addons/src/addons.tsx | 4 + plugins/techdocs/api-report.md | 141 ++++++++++++++++-- .../TechDocsReaderPage/TechDocsReaderPage.tsx | 17 ++- .../components/TechDocsReaderPage/context.tsx | 31 +++- .../TechDocsReaderPageContent.tsx | 37 ++++- .../TechDocsReaderPageContent/context.tsx | 38 ++--- .../TechDocsReaderPageContent/index.ts | 3 +- .../TechDocsReaderPageHeader.tsx | 31 +++- .../TechDocsReaderPageHeader/index.ts | 1 + .../techdocs/src/reader/components/index.ts | 4 + .../src/reader/components/useReaderState.ts | 23 +-- plugins/techdocs/src/types.ts | 4 + scripts/api-extractor.ts | 2 +- 14 files changed, 338 insertions(+), 57 deletions(-) create mode 100644 packages/techdocs-addons/api-report.md diff --git a/packages/techdocs-addons/api-report.md b/packages/techdocs-addons/api-report.md new file mode 100644 index 0000000000..0afcb9f3a3 --- /dev/null +++ b/packages/techdocs-addons/api-report.md @@ -0,0 +1,59 @@ +## API Report File for "@backstage/techdocs-addons" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { AsyncState } from 'react-use/lib/useAsyncFn'; +import { ComponentType } from 'react'; +import { Extension } from '@backstage/core-plugin-api'; +import { default as React_2 } from 'react'; + +// @public +export function createTechDocsAddon( + options: TechDocsAddonOptions, +): Extension>; + +// @public +export const TECHDOCS_ADDONS_WRAPPER_KEY = 'techdocs.addons.wrapper.v1'; + +// @public +export type TechDocsAddonAsyncMetadata = AsyncState; + +// @public +export enum TechDocsAddonLocations { + COMPONENT = 'component', + CONTENT = 'content', + HEADER = 'header', + PRIMARY_SIDEBAR = 'primary sidebar', + SECONDARY_SIDEBAR = 'secondary sidebar', + SUBHEADER = 'subheader', +} + +// @public +export type TechDocsAddonOptions = { + name: string; + location: TechDocsAddonLocations; + component: ComponentType; +}; + +// @public +export const TechDocsAddons: React_2.ComponentType; + +// @public +export const useTechDocsAddons: () => { + renderComponentByName: (name: string) => React_2.ReactElement< + { + [name: string]: unknown; + }, + string | React_2.JSXElementConstructor + > | null; + renderComponentsByLocation: (location: TechDocsAddonLocations) => + | (React_2.ReactElement< + { + [name: string]: unknown; + }, + string | React_2.JSXElementConstructor + > | null)[] + | null; +}; +``` diff --git a/packages/techdocs-addons/src/addons.tsx b/packages/techdocs-addons/src/addons.tsx index 0eb102aa24..60fe13bfeb 100644 --- a/packages/techdocs-addons/src/addons.tsx +++ b/packages/techdocs-addons/src/addons.tsx @@ -91,6 +91,10 @@ const getAllTechDocsAddonsData = (collection: ElementCollection) => { }); }; +/** + * hook to use addons in components + * @public + */ export const useTechDocsAddons = () => { const node = useOutlet(); const collection = useElementFilter(node, getAllTechDocsAddons); diff --git a/plugins/techdocs/api-report.md b/plugins/techdocs/api-report.md index 0af87a2838..7909621c92 100644 --- a/plugins/techdocs/api-report.md +++ b/plugins/techdocs/api-report.md @@ -6,11 +6,13 @@ /// import { ApiRef } from '@backstage/core-plugin-api'; +import { AsyncState } from 'react-use/lib/useAsync'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { CompoundEntityRef } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; import { CSSProperties } from '@material-ui/styles'; import { DiscoveryApi } from '@backstage/core-plugin-api'; +import { Dispatch } from 'react'; import { Entity } from '@backstage/catalog-model'; import { FetchApi } from '@backstage/core-plugin-api'; import { IdentityApi } from '@backstage/core-plugin-api'; @@ -18,10 +20,28 @@ import { PropsWithChildren } from 'react'; import { default as React_2 } from 'react'; import { ReactNode } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; +import { SetStateAction } from 'react'; import { TableColumn } from '@backstage/core-components'; import { TableProps } from '@backstage/core-components'; import { UserListFilterKind } from '@backstage/plugin-catalog-react'; +// @public +export type ContentStateTypes = + /** There is nothing to display but a loading indicator */ + | 'CHECKING' + /** There is no content yet -> present a full screen loading page */ + | 'INITIAL_BUILD' + /** There is content, but the backend is about to update it */ + | 'CONTENT_STALE_REFRESHING' + /** There is content, but after a reload, the content will be different */ + | 'CONTENT_STALE_READY' + /** There is content, the backend tried to update it, but failed */ + | 'CONTENT_STALE_ERROR' + /** There is nothing to see but a "not found" page. Is also shown on page load errors */ + | 'CONTENT_NOT_FOUND' + /** There is only the latest and greatest content */ + | 'CONTENT_FRESH'; + // @public export const DefaultTechDocsHome: ( props: DefaultTechDocsHomeProps, @@ -155,13 +175,14 @@ export interface PanelConfig { export type PanelType = 'DocsCardGrid' | 'DocsTable'; // @public -export const Reader: (props: ReaderProps) => JSX.Element; - -// @public -export type ReaderProps = { - entityRef: CompoundEntityRef; - withSearch?: boolean; - onReady?: () => void; +export type ReaderState = { + state: ContentStateTypes; + path: string; + contentReload: () => void; + content?: string; + contentErrorMessage?: string; + syncErrorMessage?: string; + buildLog: string[]; }; // @public @@ -275,27 +296,69 @@ export { techdocsPlugin as plugin }; export { techdocsPlugin }; // @public -export const TechDocsReaderPage: ( - props: TechDocsReaderPageProps, +export const TechDocsReaderLayout: ({ + withSearch, + withHeader, +}: TechDocsReaderLayoutProps) => JSX.Element; + +// @public +export type TechDocsReaderLayoutProps = { + withHeader?: boolean; + withSearch?: boolean; +}; + +// @public +export const TechDocsReaderPage: ({ + entityRef, + children, +}: TechDocsReaderPageProps) => JSX.Element; + +// @public +export const TechDocsReaderPageContent: ( + props: TechDocsReaderPageContentProps, ) => JSX.Element; +// @public +export type TechDocsReaderPageContentProps = { + entityRef?: CompoundEntityRef; + withSearch?: boolean; + onReady?: () => void; +}; + // @public export const TechDocsReaderPageHeader: ( - props: TechDocsReaderPageHeaderProps, + _props: TechDocsReaderPageHeaderProps, ) => JSX.Element; -// @public +// @public @deprecated export type TechDocsReaderPageHeaderProps = PropsWithChildren<{ - entityRef: CompoundEntityRef; + entityRef?: CompoundEntityRef; entityMetadata?: TechDocsEntityMetadata; techDocsMetadata?: TechDocsMetadata; }>; -// @public +// @public (undocumented) export type TechDocsReaderPageProps = { - children?: TechDocsReaderPageRenderFunction | React_2.ReactNode; + entityRef?: CompoundEntityRef; + children?: TechDocsReaderPageRenderFunction | ReactNode; }; +// @public +export const TechDocsReaderPageProvider: React_2.MemoExoticComponent< + ({ entityName, children }: TechDocsReaderPageProviderProps) => JSX.Element +>; + +// @public +export type TechDocsReaderPageProviderProps = { + entityName: CompoundEntityRef; + children: TechDocsReaderPageProviderRenderFunction | ReactNode; +}; + +// @public +export type TechDocsReaderPageProviderRenderFunction = ( + value: TechDocsReaderPageValue, +) => JSX.Element; + // @public export type TechDocsReaderPageRenderFunction = ({ techdocsMetadataValue, @@ -305,9 +368,38 @@ export type TechDocsReaderPageRenderFunction = ({ techdocsMetadataValue?: TechDocsMetadata | undefined; entityMetadataValue?: TechDocsEntityMetadata | undefined; entityRef: CompoundEntityRef; - onReady: () => void; + onReady?: () => void; }) => JSX.Element; +// @public +export type TechDocsReaderPageValue = { + metadata: AsyncState; + entityName: CompoundEntityRef; + entityMetadata: AsyncState; + shadowRoot?: ShadowRoot; + setShadowRoot: Dispatch>; + title: string; + setTitle: Dispatch>; + subtitle: string; + setSubtitle: Dispatch>; + onReady?: () => void; +}; + +// @public +export const TechDocsReaderProvider: ({ + children, +}: TechDocsReaderProviderProps) => JSX.Element; + +// @public +export type TechDocsReaderProviderProps = { + children: TechDocsReaderProviderRenderFunction | ReactNode; +}; + +// @public +export type TechDocsReaderProviderRenderFunction = ( + value: ReaderState, +) => JSX.Element; + // @public export const TechDocsSearch: (props: TechDocsSearchProps) => JSX.Element; @@ -389,4 +481,23 @@ export class TechDocsStorageClient implements TechDocsStorageApi { logHandler?: (line: string) => void, ): Promise; } + +// @public +export const useEntityMetadata: () => AsyncState; + +// @public +export const useShadowRoot: () => ShadowRoot | undefined; + +// @public +export const useShadowRootElements: < + TReturnedElement extends HTMLElement = HTMLElement, +>( + selectors: string[], +) => TReturnedElement[]; + +// @public +export const useTechDocsMetadata: () => AsyncState; + +// @public +export const useTechDocsReaderPage: () => TechDocsReaderPageValue; ``` diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx index f58fb610b4..fd80ae3af6 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx @@ -37,11 +37,25 @@ type Extension = ReactChild & { }; }; +/** + * Props for {@link TechDocsReaderLayout} + * @public + */ export type TechDocsReaderLayoutProps = { + /** + * Show or hide the header, defaults to true. + */ withHeader?: boolean; + /** + * Show or hide the content search bar, defaults to true. + */ withSearch?: boolean; }; +/** + * Default TechDocs reader page structure composed with a header and content + * @public + */ export const TechDocsReaderLayout = ({ withSearch, withHeader = true, @@ -96,13 +110,14 @@ export const TechDocsReaderPage = ({ return ( - {({ metadata, entityMetadata }) => ( + {({ metadata, entityMetadata, onReady }) => ( {children instanceof Function ? children({ entityRef: entityName, techdocsMetadataValue: metadata.value, entityMetadataValue: entityMetadata.value, + onReady, }) : children} diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.tsx index bd1c884ca0..a2c1897cbe 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.tsx @@ -47,6 +47,10 @@ const areEntityNamesEqual = ( return true; }; +/** + * @public type for the value of the TechDocsReaderPageContext + */ + export type TechDocsReaderPageValue = { metadata: AsyncState; entityName: CompoundEntityRef; @@ -57,6 +61,10 @@ export type TechDocsReaderPageValue = { setTitle: Dispatch>; subtitle: string; setSubtitle: Dispatch>; + /** + * @deprecated property can be passed down directly to the `TechDocsReaderPageContent` instead. + */ + onReady?: () => void; }; export const defaultTechDocsReaderPageValue: TechDocsReaderPageValue = { @@ -73,20 +81,37 @@ export const defaultTechDocsReaderPageValue: TechDocsReaderPageValue = { export const TechDocsReaderPageContext = createContext( defaultTechDocsReaderPageValue, ); - +/** + * Hook used to get access to shared state between reader page components. + * @public + */ export const useTechDocsReaderPage = () => { return useContext(TechDocsReaderPageContext); }; -type TechDocsReaderPageProviderRenderFunction = ( +/** + * render function for {@link TechDocsReaderPageProvider} + * + * @public + */ +export type TechDocsReaderPageProviderRenderFunction = ( value: TechDocsReaderPageValue, ) => JSX.Element; -type TechDocsReaderPageProviderProps = { +/** + * Props for {@link TechDocsReaderPageProvider} + * + * @public + */ +export type TechDocsReaderPageProviderProps = { entityName: CompoundEntityRef; children: TechDocsReaderPageProviderRenderFunction | ReactNode; }; +/** + * A context to store the reader page state + * @public + */ export const TechDocsReaderPageProvider = memo( ({ entityName, children }: TechDocsReaderPageProviderProps) => { const techdocsApi = useApi(techdocsApiRef); diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx index b5cfd38e3c..41bf6d3af7 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx @@ -24,6 +24,7 @@ import { useTechDocsAddons, TechDocsAddonLocations as locations, } from '@backstage/techdocs-addons'; +import { CompoundEntityRef } from '@backstage/catalog-model'; import { Content, Progress } from '@backstage/core-components'; import { TechDocsSearch } from '../../../search'; @@ -43,13 +44,32 @@ const useStyles = makeStyles({ }, }); +/** + * Props for {@link TechDocsReaderPageContent} + * @public + */ export type TechDocsReaderPageContentProps = { + /** + * @deprecated No need to pass down entityRef as property anymore. Consumes the entityName from `TechDocsReaderPageContext`. Use the {@link useTechDocsReaderPage} hook for custom reader page content. + */ + entityRef?: CompoundEntityRef; + /** + * Show or hide the search bar, defaults to true. + */ withSearch?: boolean; + /** + * Callback called when the content is rendered. + */ onReady?: () => void; }; +/** + * Renders the reader page content + * @public + */ export const TechDocsReaderPageContent = withTechDocsReaderProvider( - ({ withSearch = true, onReady }: TechDocsReaderPageContentProps) => { + (props: TechDocsReaderPageContentProps) => { + const { withSearch = true, onReady } = props; const classes = useStyles(); const addons = useTechDocsAddons(); const { entityName, shadowRoot, setShadowRoot } = useTechDocsReaderPage(); @@ -141,3 +161,18 @@ export const TechDocsReaderPageContent = withTechDocsReaderProvider( ); }, ); + +/** + * Props for {@link Reader} + * + * @public + * @deprecated use `TechDocsReaderPageContentProps` instead. + */ +export type ReaderProps = TechDocsReaderPageContentProps; + +/** + * Component responsible for rendering TechDocs documentation + * @public + * @deprecated use `TechDocsReaderPageContent` component instead. + */ +export const Reader = TechDocsReaderPageContent; diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/context.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/context.tsx index e1d6a0d55f..82e5ce1756 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/context.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/context.tsx @@ -22,27 +22,10 @@ import React, { } from 'react'; import { useParams } from 'react-router-dom'; -import { CompoundEntityRef } from '@backstage/catalog-model'; - -import { useReaderState } from '../useReaderState'; +import { useReaderState, ReaderState } from '../useReaderState'; import { useTechDocsReaderPage } from '../TechDocsReaderPage'; -/** - * Props for {@link Reader} - * - * @public - */ -export type ReaderProps = { - entityRef: CompoundEntityRef; - withSearch?: boolean; - onReady?: () => void; -}; - -type TechDocsReaderValue = ReturnType; - -const TechDocsReaderContext = createContext( - {} as TechDocsReaderValue, -); +const TechDocsReaderContext = createContext({} as ReaderState); /** * Note: this hook is currently being exported so that we can rapidly @@ -56,14 +39,25 @@ const TechDocsReaderContext = createContext( export const useTechDocsReader = () => useContext(TechDocsReaderContext); -type TechDocsReaderProviderRenderFunction = ( - value: TechDocsReaderValue, +/** + * @public Render function for {@link TechDocsReaderProvider} + */ +export type TechDocsReaderProviderRenderFunction = ( + value: ReaderState, ) => JSX.Element; -type TechDocsReaderProviderProps = { +/** + * @public Props for {@link TechDocsReaderProvider} + */ +export type TechDocsReaderProviderProps = { children: TechDocsReaderProviderRenderFunction | ReactNode; }; +/** + * Provides shared building process state to the reader page components. + * + * @public + */ export const TechDocsReaderProvider = ({ children, }: TechDocsReaderProviderProps) => { diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/index.ts b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/index.ts index 288969e73b..a7ea76a5d6 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/index.ts +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/index.ts @@ -14,6 +14,7 @@ * limitations under the License. */ -export { TechDocsReaderPageContent } from './TechDocsReaderPageContent'; +export { TechDocsReaderPageContent, Reader } from './TechDocsReaderPageContent'; +export type { TechDocsReaderPageContentProps } from './TechDocsReaderPageContent'; export * from './context'; export * from './dom'; diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx index 45ebe3ae0f..0658078411 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import React, { useEffect } from 'react'; +import React, { PropsWithChildren, useEffect } from 'react'; import Helmet from 'react-helmet'; import { Skeleton } from '@material-ui/lab'; @@ -29,17 +29,39 @@ import { EntityRefLinks, getEntityRelations, } from '@backstage/plugin-catalog-react'; -import { RELATION_OWNED_BY } from '@backstage/catalog-model'; +import { RELATION_OWNED_BY, CompoundEntityRef } from '@backstage/catalog-model'; import { Header, HeaderLabel } from '@backstage/core-components'; import { useRouteRef, configApiRef, useApi } from '@backstage/core-plugin-api'; import { useTechDocsReaderPage } from '../TechDocsReaderPage'; import { rootRouteRef } from '../../../routes'; +import { TechDocsEntityMetadata, TechDocsMetadata } from '../../../types'; const skeleton = ; -export const TechDocsReaderPageHeader = () => { +/** + * Props for {@link TechDocsReaderPageHeader} + * + * @public + * @deprecated No need to pass down properties anymore. The component consumes data from `TechDocsReaderPageContext` instead. Use the {@link useTechDocsReaderPage} hook for custom header. + */ +export type TechDocsReaderPageHeaderProps = PropsWithChildren<{ + entityRef?: CompoundEntityRef; + entityMetadata?: TechDocsEntityMetadata; + techDocsMetadata?: TechDocsMetadata; +}>; + +/** + * Renders the reader page header. + * This component does not accept props, please use + * the Tech Docs add-ons to customize it + * @public + */ +export const TechDocsReaderPageHeader = ( + props: TechDocsReaderPageHeaderProps, +) => { + const { children } = props; const addons = useTechDocsAddons(); const configApi = useApi(configApiRef); @@ -61,7 +83,7 @@ export const TechDocsReaderPageHeader = () => { }); setSubtitle(prevSubtitle => { let { site_description } = metadata; - if (site_description === 'None') { + if (!site_description || site_description === 'None') { site_description = 'Home'; } return prevSubtitle || site_description; @@ -135,6 +157,7 @@ export const TechDocsReaderPageHeader = () => { {tabTitle} {labels} + {children} {addons.renderComponentsByLocation(locations.HEADER)} ); diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/index.ts b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/index.ts index 741a8e9af1..e733d9f3b7 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/index.ts +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/index.ts @@ -15,3 +15,4 @@ */ export { TechDocsReaderPageHeader } from './TechDocsReaderPageHeader'; +export type { TechDocsReaderPageHeaderProps } from './TechDocsReaderPageHeader'; diff --git a/plugins/techdocs/src/reader/components/index.ts b/plugins/techdocs/src/reader/components/index.ts index 5abdf002b1..281a16cc08 100644 --- a/plugins/techdocs/src/reader/components/index.ts +++ b/plugins/techdocs/src/reader/components/index.ts @@ -17,6 +17,9 @@ export type { TechDocsReaderPageProps, TechDocsReaderLayoutProps, + TechDocsReaderPageValue, + TechDocsReaderPageProviderProps, + TechDocsReaderPageProviderRenderFunction, } from './TechDocsReaderPage'; export { useShadowRoot, @@ -30,3 +33,4 @@ export { export * from './TechDocsReaderPageHeader'; export * from './TechDocsReaderPageContent'; export * from './TechDocsStateIndicator'; +export type { ReaderState, ContentStateTypes } from './useReaderState'; diff --git a/plugins/techdocs/src/reader/components/useReaderState.ts b/plugins/techdocs/src/reader/components/useReaderState.ts index 8bccb3cdb8..39f09af264 100644 --- a/plugins/techdocs/src/reader/components/useReaderState.ts +++ b/plugins/techdocs/src/reader/components/useReaderState.ts @@ -21,9 +21,10 @@ import useAsyncRetry from 'react-use/lib/useAsyncRetry'; import { techdocsStorageApiRef } from '../../api'; /** + * @public * A state representation that is used to configure the UI of */ -type ContentStateTypes = +export type ContentStateTypes = /** There is nothing to display but a loading indicator */ | 'CHECKING' @@ -224,13 +225,10 @@ export function reducer( return newState; } - -export function useReaderState( - kind: string, - namespace: string, - name: string, - path: string, -): { +/** + * @public shared reader state + */ +export type ReaderState = { state: ContentStateTypes; path: string; contentReload: () => void; @@ -238,7 +236,14 @@ export function useReaderState( contentErrorMessage?: string; syncErrorMessage?: string; buildLog: string[]; -} { +}; + +export function useReaderState( + kind: string, + namespace: string, + name: string, + path: string, +): ReaderState { const [state, dispatch] = useReducer(reducer, { activeSyncState: 'CHECKING', path, diff --git a/plugins/techdocs/src/types.ts b/plugins/techdocs/src/types.ts index 20f78c01f3..bf880e8305 100644 --- a/plugins/techdocs/src/types.ts +++ b/plugins/techdocs/src/types.ts @@ -29,6 +29,10 @@ export type TechDocsReaderPageRenderFunction = ({ techdocsMetadataValue?: TechDocsMetadata | undefined; entityMetadataValue?: TechDocsEntityMetadata | undefined; entityRef: CompoundEntityRef; + /** + * @deprecated You can continue pass this property, but directly to the `TechDocsReaderPageContent` component. + */ + onReady?: () => void; }) => JSX.Element; /** diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index 19f463d45e..3d2d776262 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -225,6 +225,7 @@ const NO_WARNING_PACKAGES = [ 'packages/integration', 'packages/integration-react', 'packages/search-common', + 'packages/techdocs-addons', 'packages/techdocs-common', 'packages/test-utils', 'packages/theme', @@ -258,7 +259,6 @@ const NO_WARNING_PACKAGES = [ 'plugins/search-backend-node', 'plugins/search-common', 'plugins/techdocs', - 'plugins/techdocs-addons', 'plugins/techdocs-backend', 'plugins/techdocs-node', 'plugins/tech-insights',