@backstage/plugin-mui-to-bui 0.2.5-next.1 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-mui-to-bui
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 538c985: Updated installation documentation to use feature discovery as the default.
|
|
8
|
+
- ad7c883: Updated the MUI to BUI theme converter page to use the renamed `Header` component from `@backstage/ui`.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/ui@0.13.0
|
|
11
|
+
- @backstage/core-plugin-api@1.12.4
|
|
12
|
+
- @backstage/frontend-plugin-api@0.15.0
|
|
13
|
+
|
|
14
|
+
## 0.2.5-next.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- ad7c883: Updated the MUI to BUI theme converter page to use the renamed `Header` component from `@backstage/ui`.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/ui@0.13.0-next.2
|
|
21
|
+
- @backstage/frontend-plugin-api@0.15.0-next.1
|
|
22
|
+
- @backstage/core-plugin-api@1.12.4-next.1
|
|
23
|
+
|
|
3
24
|
## 0.2.5-next.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -6,17 +6,24 @@ The Backstage UI Themer helps you convert an existing MUI v5 theme into Backstag
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Run this from your Backstage repo root:
|
|
9
|
+
Add the dependency to your app:
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
12
|
yarn --cwd packages/app add @backstage/plugin-mui-to-bui
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Once installed, the plugin is automatically available in your app through the default feature discovery. For more details and alternative installation methods, see [installing plugins](https://backstage.io/docs/frontend-system/building-apps/installing-plugins).
|
|
16
|
+
|
|
17
|
+
## Accessing the Themer page
|
|
18
|
+
|
|
19
|
+
- Navigate to `/mui-to-bui` in your Backstage app (for example `http://localhost:3000/mui-to-bui`).
|
|
20
|
+
- Optional: Add a sidebar/link in your app that points to `/mui-to-bui` if you want a permanent navigation entry.
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
## Old Frontend System
|
|
23
|
+
|
|
24
|
+
If your Backstage app uses the old frontend system, you need to manually wire the
|
|
25
|
+
plugin into your app as outlined in this section. If you are on the new frontend
|
|
26
|
+
system, you can skip this.
|
|
20
27
|
|
|
21
28
|
Add a route for the page in your app:
|
|
22
29
|
|
|
@@ -34,30 +41,3 @@ export const App = () => (
|
|
|
34
41
|
</FlatRoutes>
|
|
35
42
|
);
|
|
36
43
|
```
|
|
37
|
-
|
|
38
|
-
#### New frontend system
|
|
39
|
-
|
|
40
|
-
If package discovery is enabled in your app, this plugin is picked up automatically after installation — no code changes required. Just navigate to `/mui-to-bui`.
|
|
41
|
-
|
|
42
|
-
If you prefer explicit registration (or don't use discovery), register the plugin as a feature. The page route (`/mui-to-bui`) is provided by the plugin.
|
|
43
|
-
|
|
44
|
-
```tsx
|
|
45
|
-
// packages/app/src/App.tsx (or your app entry where you call createApp)
|
|
46
|
-
import React from 'react';
|
|
47
|
-
import { createApp } from '@backstage/frontend-defaults';
|
|
48
|
-
import buiThemerPlugin from '@backstage/plugin-mui-to-bui';
|
|
49
|
-
|
|
50
|
-
const app = createApp({
|
|
51
|
-
features: [
|
|
52
|
-
// ...other features
|
|
53
|
-
buiThemerPlugin,
|
|
54
|
-
],
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
export default app.createRoot();
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Accessing the Themer page
|
|
61
|
-
|
|
62
|
-
- Navigate to `/mui-to-bui` in your Backstage app (for example `http://localhost:3000/mui-to-bui`).
|
|
63
|
-
- Optional: Add a sidebar/link in your app that points to `/mui-to-bui` if you want a permanent navigation entry.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useApi, appThemeApiRef } from '@backstage/core-plugin-api';
|
|
3
|
-
import { Container,
|
|
3
|
+
import { Container, Header, Box, Text, Card, Flex } from '@backstage/ui';
|
|
4
4
|
import { ThemeContent } from './ThemeContent.esm.js';
|
|
5
5
|
import { MuiThemeExtractor } from './MuiThemeExtractor.esm.js';
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ const BuiThemerPage = () => {
|
|
|
8
8
|
const appThemeApi = useApi(appThemeApiRef);
|
|
9
9
|
const installedThemes = appThemeApi.getInstalledThemes();
|
|
10
10
|
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
11
|
-
/* @__PURE__ */ jsx(
|
|
11
|
+
/* @__PURE__ */ jsx(Header, { title: "BUI Theme Converter" }),
|
|
12
12
|
/* @__PURE__ */ jsx(Box, { m: "4", children: /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: "Convert your MUI v5 theme into BUI CSS variables. Pick a theme to view and export the generated BUI CSS variable definitions for use in your project." }) }),
|
|
13
13
|
/* @__PURE__ */ jsx(Box, { mt: "4", children: installedThemes.length === 0 ? /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(Box, { p: "4", children: /* @__PURE__ */ jsx(Text, { children: "No themes found. Please install some themes in your Backstage app." }) }) }) : /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: installedThemes.map((theme) => /* @__PURE__ */ jsx(MuiThemeExtractor, { appTheme: theme, children: (muiTheme) => /* @__PURE__ */ jsx(
|
|
14
14
|
ThemeContent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuiThemerPage.esm.js","sources":["../../../src/components/BuiThemerPage/BuiThemerPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { appThemeApiRef } from '@backstage/core-plugin-api';\nimport { Box, Card, Container, Flex,
|
|
1
|
+
{"version":3,"file":"BuiThemerPage.esm.js","sources":["../../../src/components/BuiThemerPage/BuiThemerPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { appThemeApiRef } from '@backstage/core-plugin-api';\nimport { Box, Card, Container, Flex, Header, Text } from '@backstage/ui';\nimport { ThemeContent } from './ThemeContent';\nimport { MuiThemeExtractor } from './MuiThemeExtractor';\n\nexport const BuiThemerPage = () => {\n const appThemeApi = useApi(appThemeApiRef);\n const installedThemes = appThemeApi.getInstalledThemes();\n\n return (\n <Container>\n <Header title=\"BUI Theme Converter\" />\n <Box m=\"4\">\n <Text variant=\"body-medium\" color=\"secondary\">\n Convert your MUI v5 theme into BUI CSS variables. Pick a theme to view\n and export the generated BUI CSS variable definitions for use in your\n project.\n </Text>\n </Box>\n\n <Box mt=\"4\">\n {installedThemes.length === 0 ? (\n <Card>\n <Box p=\"4\">\n <Text>\n No themes found. Please install some themes in your Backstage\n app.\n </Text>\n </Box>\n </Card>\n ) : (\n <Flex direction=\"column\" gap=\"4\">\n {installedThemes.map(theme => (\n <MuiThemeExtractor key={theme.id} appTheme={theme}>\n {muiTheme => (\n <ThemeContent\n key={theme.id}\n themeId={theme.id}\n themeTitle={theme.title}\n variant={theme.variant}\n muiTheme={muiTheme}\n />\n )}\n </MuiThemeExtractor>\n ))}\n </Flex>\n )}\n </Box>\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,gBAAgB,MAAM;AACjC,EAAA,MAAM,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAA,MAAM,eAAA,GAAkB,YAAY,kBAAA,EAAmB;AAEvD,EAAA,4BACG,SAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,OAAM,qBAAA,EAAsB,CAAA;AAAA,oBACpC,GAAA,CAAC,GAAA,EAAA,EAAI,CAAA,EAAE,GAAA,EACL,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,aAAA,EAAc,KAAA,EAAM,WAAA,EAAY,QAAA,EAAA,uJAAA,EAI9C,CAAA,EACF,CAAA;AAAA,oBAEA,GAAA,CAAC,GAAA,EAAA,EAAI,EAAA,EAAG,GAAA,EACL,0BAAgB,MAAA,KAAW,CAAA,mBAC1B,GAAA,CAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,GAAA,EAAA,EAAI,CAAA,EAAE,GAAA,EACL,8BAAC,IAAA,EAAA,EAAK,QAAA,EAAA,oEAAA,EAGN,CAAA,EACF,CAAA,EACF,CAAA,mBAEA,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAU,UAAS,GAAA,EAAI,GAAA,EAC1B,QAAA,EAAA,eAAA,CAAgB,GAAA,CAAI,CAAA,KAAA,qBACnB,GAAA,CAAC,iBAAA,EAAA,EAAiC,QAAA,EAAU,OACzC,QAAA,EAAA,CAAA,QAAA,qBACC,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QAEC,SAAS,KAAA,CAAM,EAAA;AAAA,QACf,YAAY,KAAA,CAAM,KAAA;AAAA,QAClB,SAAS,KAAA,CAAM,OAAA;AAAA,QACf;AAAA,OAAA;AAAA,MAJK,KAAA,CAAM;AAAA,KAKb,EAAA,EARoB,KAAA,CAAM,EAU9B,CACD,GACH,CAAA,EAEJ;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-mui-to-bui",
|
|
3
|
-
"version": "0.2.5
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "mui-to-bui",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"test": "backstage-cli package test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@backstage/core-plugin-api": "1.12.4
|
|
42
|
-
"@backstage/frontend-plugin-api": "0.
|
|
43
|
-
"@backstage/theme": "0.7.2",
|
|
44
|
-
"@backstage/ui": "0.13.0
|
|
41
|
+
"@backstage/core-plugin-api": "^1.12.4",
|
|
42
|
+
"@backstage/frontend-plugin-api": "^0.15.0",
|
|
43
|
+
"@backstage/theme": "^0.7.2",
|
|
44
|
+
"@backstage/ui": "^0.13.0",
|
|
45
45
|
"@mui/material": "^5.12.2",
|
|
46
46
|
"@mui/system": "^5.16.14"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@backstage/cli": "0.36.0
|
|
50
|
-
"@backstage/dev-utils": "1.1.21
|
|
51
|
-
"@backstage/test-utils": "1.7.16
|
|
49
|
+
"@backstage/cli": "^0.36.0",
|
|
50
|
+
"@backstage/dev-utils": "^1.1.21",
|
|
51
|
+
"@backstage/test-utils": "^1.7.16",
|
|
52
52
|
"@testing-library/jest-dom": "^6.0.0",
|
|
53
53
|
"@testing-library/react": "^16.0.0",
|
|
54
54
|
"@types/react": "^18.0.0",
|