Move stable alpha exports to public.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -31,13 +31,13 @@ export const TECHDOCS_ADDONS_KEY = 'techdocs.addons.addon.v1';
|
||||
|
||||
/**
|
||||
* Marks the <TechDocsAddons> registry component.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const TECHDOCS_ADDONS_WRAPPER_KEY = 'techdocs.addons.wrapper.v1';
|
||||
|
||||
/**
|
||||
* TechDocs Addon registry.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const TechDocsAddons: React.ComponentType = () => null;
|
||||
|
||||
@@ -49,7 +49,7 @@ const getDataKeyByName = (name: string) => {
|
||||
|
||||
/**
|
||||
* Create a TechDocs addon.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export function createTechDocsAddonExtension<TComponentProps>(
|
||||
options: TechDocsAddonOptions<TComponentProps>,
|
||||
@@ -96,7 +96,7 @@ const getAllTechDocsAddonsData = (collection: ElementCollection) => {
|
||||
|
||||
/**
|
||||
* hook to use addons in components
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const useTechDocsAddons = () => {
|
||||
const node = useOutlet();
|
||||
|
||||
@@ -66,10 +66,7 @@ export type TechDocsReaderPageValue = {
|
||||
onReady?: () => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export const defaultTechDocsReaderPageValue: TechDocsReaderPageValue = {
|
||||
const defaultTechDocsReaderPageValue: TechDocsReaderPageValue = {
|
||||
title: '',
|
||||
subtitle: '',
|
||||
setTitle: () => {},
|
||||
@@ -153,7 +150,7 @@ export const TechDocsReaderPageProvider = memo(
|
||||
|
||||
/**
|
||||
* Hook used to get access to shared state between reader page components.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const useTechDocsReaderPage = () => {
|
||||
const versionedContext = useContext(TechDocsReaderPageContext);
|
||||
|
||||
@@ -20,7 +20,7 @@ import { useTechDocsReaderPage } from './context';
|
||||
/**
|
||||
* 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.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const useShadowRoot = () => {
|
||||
const { shadowRoot } = useTechDocsReaderPage();
|
||||
@@ -31,7 +31,7 @@ export const useShadowRoot = () => {
|
||||
* Convenience hook for use within TechDocs addons that provides access to
|
||||
* elements that match a given selector within the shadow root.
|
||||
*
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const useShadowRootElements = <
|
||||
TReturnedElement extends HTMLElement = HTMLElement,
|
||||
@@ -58,7 +58,7 @@ const isValidSelection = (newSelection: Selection) => {
|
||||
|
||||
/**
|
||||
* Hook for retreiving a selection within the ShadowRoot.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const useShadowRootSelection = (wait: number = 0) => {
|
||||
const shadowRoot = useShadowRoot();
|
||||
|
||||
@@ -28,11 +28,7 @@ export {
|
||||
} from './addons';
|
||||
export { techdocsApiRef, techdocsStorageApiRef } from './api';
|
||||
export type { SyncResult, TechDocsApi, TechDocsStorageApi } from './api';
|
||||
export {
|
||||
defaultTechDocsReaderPageValue,
|
||||
TechDocsReaderPageProvider,
|
||||
useTechDocsReaderPage,
|
||||
} from './context';
|
||||
export { TechDocsReaderPageProvider, useTechDocsReaderPage } from './context';
|
||||
export type {
|
||||
TechDocsReaderPageProviderProps,
|
||||
TechDocsReaderPageProviderRenderFunction,
|
||||
|
||||
@@ -38,7 +38,7 @@ export type TechDocsEntityMetadata = Entity & {
|
||||
|
||||
/**
|
||||
* Locations for which TechDocs addons may be declared and rendered.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const TechDocsAddonLocations = Object.freeze({
|
||||
/**
|
||||
@@ -108,7 +108,7 @@ export const TechDocsAddonLocations = Object.freeze({
|
||||
|
||||
/**
|
||||
* Options for creating a TechDocs addon.
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export type TechDocsAddonOptions<TAddonProps = {}> = {
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user