frontend-plugin-api: update API report

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-04 15:05:54 +02:00
parent b0526feb70
commit 7e59c93b10
2 changed files with 7 additions and 0 deletions
@@ -11,6 +11,7 @@ import { ComponentType } from 'react';
import { JsonObject } from '@backstage/types';
import { default as React_2 } from 'react';
import { ReactNode } from 'react';
import { RouteRef } from '@backstage/core-plugin-api';
import { z } from 'zod';
import { ZodSchema } from 'zod';
import { ZodTypeDef } from 'zod';
@@ -33,6 +34,7 @@ export const coreExtensionData: {
reactComponent: ExtensionDataRef<ComponentType<{}>>;
routePath: ExtensionDataRef<string>;
apiFactory: ExtensionDataRef<AnyApiFactory>;
routeRef: ExtensionDataRef<RouteRef<any>>;
};
// @public (undocumented)
@@ -138,6 +140,7 @@ export function createPageExtension<
at?: string;
disabled?: boolean;
inputs?: TInputs;
routeRef?: RouteRef;
component: (props: {
config: TConfig;
inputs: {
@@ -230,4 +233,7 @@ export type PortableSchema<TOutput> = {
parse: (input: unknown) => TOutput;
schema: JsonObject;
};
// @public (undocumented)
export function useRouteRef(routeRef: RouteRef<any>): () => string;
```
@@ -20,6 +20,7 @@ import { RoutingContext } from '@backstage/frontend-app-api/src/routing/RoutingC
import { useContext, useMemo } from 'react';
import { useLocation } from 'react-router-dom';
/** @public */
export function useRouteRef(routeRef: RouteRef<any>): () => string {
const { pathname } = useLocation();
const resolver = useContext(RoutingContext);