Move stable alpha exports to public.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-05-11 11:37:33 +02:00
parent 66521125b3
commit 2b74671f52
6 changed files with 22 additions and 32 deletions
+4 -4
View File
@@ -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();
+2 -5
View File
@@ -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);
+3 -3
View File
@@ -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();
+1 -5
View File
@@ -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,
+2 -2
View File
@@ -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;