bui-themer: API report + fixes

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-09-14 12:06:53 +02:00
parent 11d17dafa4
commit 4d37f00e95
6 changed files with 73 additions and 8 deletions
+66
View File
@@ -0,0 +1,66 @@
## API Report File for "@backstage/plugin-bui-themer"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
import { JSX as JSX_2 } from 'react';
import { JSX as JSX_3 } from 'react/jsx-runtime';
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
import { RouteRef } from '@backstage/frontend-plugin-api';
import { RouteRef as RouteRef_2 } from '@backstage/core-plugin-api';
// @public (undocumented)
export const BuiThemerPage: () => JSX_3.Element;
// @public (undocumented)
export const buiThemerPlugin: BackstagePlugin<
{
root: RouteRef_2<undefined>;
},
{}
>;
// @public (undocumented)
const _default: OverridableFrontendPlugin<
{
root: RouteRef<undefined>;
},
{},
{
'page:bui-themer': ExtensionDefinition<{
kind: 'page';
name: undefined;
config: {
path: string | undefined;
};
configInput: {
path?: string | undefined;
};
output:
| ExtensionDataRef<string, 'core.routing.path', {}>
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
| ExtensionDataRef<
RouteRef<AnyRouteRefParams>,
'core.routing.ref',
{
optional: true;
}
>;
inputs: {};
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
}>;
}
>;
export default _default;
// (No @packageDocumentation comment for this package)
```
@@ -20,7 +20,7 @@ import { Box, Card, Container, Flex, HeaderPage, Text } from '@backstage/ui';
import { ThemeContent } from './ThemeContent';
import { MuiThemeExtractor } from './MuiThemeExtractor';
export function BuiThemerPage() {
export const BuiThemerPage = () => {
const appThemeApi = useApi(appThemeApiRef);
const installedThemes = appThemeApi.getInstalledThemes();
@@ -65,4 +65,4 @@ export function BuiThemerPage() {
</Box>
</Container>
);
}
};
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { useEffect, useState } from 'react';
import { useEffect, useState, JSX } from 'react';
import { AppTheme } from '@backstage/core-plugin-api';
import { Theme, useTheme } from '@mui/material/styles';
@@ -15,6 +15,3 @@
*/
export { BuiThemerPage } from './BuiThemerPage';
export { BuiThemePreview } from './BuiThemePreview';
export { ThemeContent } from './ThemeContent';
export { MuiThemeExtractor } from './MuiThemeExtractor';
+1 -2
View File
@@ -14,5 +14,4 @@
* limitations under the License.
*/
export { buiThemerPlugin, BuiThemerPage } from './plugin';
export { default } from './plugin';
export { default, buiThemerPlugin, BuiThemerPage } from './plugin';
+3
View File
@@ -29,6 +29,7 @@ import {
import { rootRouteRef } from './routes';
// Old system
/** @public */
export const buiThemerPlugin = createPlugin({
id: 'bui-themer',
routes: {
@@ -36,6 +37,7 @@ export const buiThemerPlugin = createPlugin({
},
});
/** @public */
export const BuiThemerPage = buiThemerPlugin.provide(
createRoutableExtension({
name: 'BuiThemerPage',
@@ -46,6 +48,7 @@ export const BuiThemerPage = buiThemerPlugin.provide(
);
// New system
/** @public */
export default createFrontendPlugin({
pluginId: 'bui-themer',
extensions: [