@backstage/plugin-home-react 0.1.41-next.1 → 0.1.41
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 +19 -0
- package/dist/alpha/dataRefs.esm.js.map +1 -1
- package/dist/alpha.d.ts +21 -1
- package/dist/alpha.esm.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @backstage/plugin-home-react
|
|
2
2
|
|
|
3
|
+
## 0.1.41
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a178067: Added `HomePageDefaultConfigItem` type and optional `defaultConfig` prop to `HomePageLayoutProps`.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/core-components@0.18.13
|
|
10
|
+
- @backstage/core-plugin-api@1.12.9
|
|
11
|
+
- @backstage/frontend-plugin-api@0.18.0
|
|
12
|
+
- @backstage/core-compat-api@0.5.14
|
|
13
|
+
|
|
14
|
+
## 0.1.41-next.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- a178067: Added `HomePageDefaultConfigItem` type and optional `defaultConfig` prop to `HomePageLayoutProps`.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/core-plugin-api@1.12.9-next.1
|
|
21
|
+
|
|
3
22
|
## 0.1.41-next.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataRefs.esm.js","sources":["../../src/alpha/dataRefs.ts"],"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 {\n createExtensionDataRef,\n type AppNode,\n} from '@backstage/frontend-plugin-api';\nimport { JSX, ReactElement } from 'react';\nimport type { CardLayout, CardSettings } from '../extensions';\n\n/**\n * Extension data for homepage widgets, bundling the rendered component\n * with its metadata.\n *\n * @alpha\n */\nexport interface HomePageWidgetData {\n /**\n * The originating app node for this widget.\n */\n node: AppNode;\n /**\n * The rendered widget component (typically a card with header, content, etc.)\n */\n component: ReactElement;\n /**\n * Optional name identifier for the widget\n */\n name?: string;\n /**\n * Optional title displayed in the widget header\n */\n title?: string;\n /**\n * Optional description shown in widget catalogs or configuration UIs\n */\n description?: string;\n /**\n * Optional layout hints for positioning and sizing\n */\n layout?: CardLayout;\n /**\n * Optional settings schema for widget configuration\n */\n settings?: CardSettings;\n}\n\n/**\n * Extension data ref for homepage widgets.\n *\n * This follows the pattern from FormFieldBlueprint, bundling the component\n * and metadata into a single comprehensive data ref rather than outputting\n * them separately.\n *\n * @alpha\n */\nexport const homePageWidgetDataRef =\n createExtensionDataRef<HomePageWidgetData>().with({\n id: 'home.widget.data',\n });\n\n/**\n * Props provided to a home page layout component.\n *\n * @alpha\n */\nexport interface HomePageLayoutProps {\n /**\n * The list of widget elements and metadata to render on the home page.\n */\n widgets: Array<HomePageWidgetData>;\n}\n\n/**\n * Extension data ref for home page layout components.\n *\n * A layout receives the collected widgets and is responsible for arranging\n * them on the home page. This follows the same pattern as\n * EntityContentLayoutBlueprint in the catalog plugin.\n *\n * @alpha\n */\nexport const homePageLayoutComponentDataRef = createExtensionDataRef<\n (props: HomePageLayoutProps) => JSX.Element\n>().with({\n id: 'home.layout.component',\n});\n"],"names":[],"mappings":";;AAqEO,MAAM,qBAAA,GACX,sBAAA,EAA2C,CAAE,IAAA,CAAK;AAAA,EAChD,EAAA,EAAI;AACN,CAAC;
|
|
1
|
+
{"version":3,"file":"dataRefs.esm.js","sources":["../../src/alpha/dataRefs.ts"],"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 {\n createExtensionDataRef,\n type AppNode,\n} from '@backstage/frontend-plugin-api';\nimport { JSX, ReactElement } from 'react';\nimport type { CardLayout, CardSettings } from '../extensions';\n\n/**\n * Extension data for homepage widgets, bundling the rendered component\n * with its metadata.\n *\n * @alpha\n */\nexport interface HomePageWidgetData {\n /**\n * The originating app node for this widget.\n */\n node: AppNode;\n /**\n * The rendered widget component (typically a card with header, content, etc.)\n */\n component: ReactElement;\n /**\n * Optional name identifier for the widget\n */\n name?: string;\n /**\n * Optional title displayed in the widget header\n */\n title?: string;\n /**\n * Optional description shown in widget catalogs or configuration UIs\n */\n description?: string;\n /**\n * Optional layout hints for positioning and sizing\n */\n layout?: CardLayout;\n /**\n * Optional settings schema for widget configuration\n */\n settings?: CardSettings;\n}\n\n/**\n * Extension data ref for homepage widgets.\n *\n * This follows the pattern from FormFieldBlueprint, bundling the component\n * and metadata into a single comprehensive data ref rather than outputting\n * them separately.\n *\n * @alpha\n */\nexport const homePageWidgetDataRef =\n createExtensionDataRef<HomePageWidgetData>().with({\n id: 'home.widget.data',\n });\n\n/**\n * Default layout configuration for a widget in the home page grid.\n *\n * @alpha\n */\nexport interface HomePageDefaultConfigItem {\n component: string;\n column: number;\n row: number;\n width: number;\n height: number;\n movable?: boolean;\n deletable?: boolean;\n resizable?: boolean;\n}\n\n/**\n * Props provided to a home page layout component.\n *\n * @alpha\n */\nexport interface HomePageLayoutProps {\n /**\n * The list of widget elements and metadata to render on the home page.\n */\n widgets: Array<HomePageWidgetData>;\n /**\n * Optional default layout configuration for the grid.\n * Defines the initial position and size of widgets before users customize.\n */\n defaultConfig?: Array<HomePageDefaultConfigItem>;\n}\n\n/**\n * Extension data ref for home page layout components.\n *\n * A layout receives the collected widgets and is responsible for arranging\n * them on the home page. This follows the same pattern as\n * EntityContentLayoutBlueprint in the catalog plugin.\n *\n * @alpha\n */\nexport const homePageLayoutComponentDataRef = createExtensionDataRef<\n (props: HomePageLayoutProps) => JSX.Element\n>().with({\n id: 'home.layout.component',\n});\n"],"names":[],"mappings":";;AAqEO,MAAM,qBAAA,GACX,sBAAA,EAA2C,CAAE,IAAA,CAAK;AAAA,EAChD,EAAA,EAAI;AACN,CAAC;AA4CI,MAAM,8BAAA,GAAiC,sBAAA,EAE5C,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -52,6 +52,21 @@ interface HomePageWidgetData {
|
|
|
52
52
|
* @alpha
|
|
53
53
|
*/
|
|
54
54
|
declare const homePageWidgetDataRef: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<HomePageWidgetData, "home.widget.data", {}>;
|
|
55
|
+
/**
|
|
56
|
+
* Default layout configuration for a widget in the home page grid.
|
|
57
|
+
*
|
|
58
|
+
* @alpha
|
|
59
|
+
*/
|
|
60
|
+
interface HomePageDefaultConfigItem {
|
|
61
|
+
component: string;
|
|
62
|
+
column: number;
|
|
63
|
+
row: number;
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
movable?: boolean;
|
|
67
|
+
deletable?: boolean;
|
|
68
|
+
resizable?: boolean;
|
|
69
|
+
}
|
|
55
70
|
/**
|
|
56
71
|
* Props provided to a home page layout component.
|
|
57
72
|
*
|
|
@@ -62,6 +77,11 @@ interface HomePageLayoutProps {
|
|
|
62
77
|
* The list of widget elements and metadata to render on the home page.
|
|
63
78
|
*/
|
|
64
79
|
widgets: Array<HomePageWidgetData>;
|
|
80
|
+
/**
|
|
81
|
+
* Optional default layout configuration for the grid.
|
|
82
|
+
* Defines the initial position and size of widgets before users customize.
|
|
83
|
+
*/
|
|
84
|
+
defaultConfig?: Array<HomePageDefaultConfigItem>;
|
|
65
85
|
}
|
|
66
86
|
/**
|
|
67
87
|
* Extension data ref for home page layout components.
|
|
@@ -174,4 +194,4 @@ declare const homeReactTranslationRef: _backstage_frontend_plugin_api.Translatio
|
|
|
174
194
|
}>;
|
|
175
195
|
|
|
176
196
|
export { CardLayout, CardSettings, ComponentParts, HomePageLayoutBlueprint, HomePageWidgetBlueprint, homePageLayoutComponentDataRef, homePageWidgetDataRef, homeReactTranslationRef };
|
|
177
|
-
export type { HomePageLayoutBlueprintParams, HomePageLayoutProps, HomePageWidgetBlueprintParams, HomePageWidgetData };
|
|
197
|
+
export type { HomePageDefaultConfigItem, HomePageLayoutBlueprintParams, HomePageLayoutProps, HomePageWidgetBlueprintParams, HomePageWidgetData };
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"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\n/**\n * React components and utilities for the home plugin's new frontend system.\n *\n * @remarks\n * This package provides React components, blueprints, and utilities for building\n * customizable home pages with the new Backstage frontend system.\n *\n * @packageDocumentation\n */\nimport { homeReactTranslationRef as _homeReactTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-home-react` instead.\n */\nexport const homeReactTranslationRef = _homeReactTranslationRef;\nexport {\n HomePageWidgetBlueprint,\n type HomePageWidgetBlueprintParams,\n} from './alpha/blueprints/HomePageWidgetBlueprint';\nexport {\n HomePageLayoutBlueprint,\n type HomePageLayoutBlueprintParams,\n} from './alpha/blueprints/HomePageLayoutBlueprint';\nexport {\n homePageWidgetDataRef,\n type HomePageWidgetData,\n homePageLayoutComponentDataRef,\n type HomePageLayoutProps,\n} from './alpha/dataRefs';\nexport type { ComponentParts, CardLayout, CardSettings } from './extensions';\n"],"names":["_homeReactTranslationRef"],"mappings":";;;;;AA+BO,MAAM,uBAAA,GAA0BA;;;;"}
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"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\n/**\n * React components and utilities for the home plugin's new frontend system.\n *\n * @remarks\n * This package provides React components, blueprints, and utilities for building\n * customizable home pages with the new Backstage frontend system.\n *\n * @packageDocumentation\n */\nimport { homeReactTranslationRef as _homeReactTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-home-react` instead.\n */\nexport const homeReactTranslationRef = _homeReactTranslationRef;\nexport {\n HomePageWidgetBlueprint,\n type HomePageWidgetBlueprintParams,\n} from './alpha/blueprints/HomePageWidgetBlueprint';\nexport {\n HomePageLayoutBlueprint,\n type HomePageLayoutBlueprintParams,\n} from './alpha/blueprints/HomePageLayoutBlueprint';\nexport {\n homePageWidgetDataRef,\n type HomePageWidgetData,\n homePageLayoutComponentDataRef,\n type HomePageLayoutProps,\n type HomePageDefaultConfigItem,\n} from './alpha/dataRefs';\nexport type { ComponentParts, CardLayout, CardSettings } from './extensions';\n"],"names":["_homeReactTranslationRef"],"mappings":";;;;;AA+BO,MAAM,uBAAA,GAA0BA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-home-react",
|
|
3
|
-
"version": "0.1.41
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"description": "A Backstage plugin that contains react components helps you build a home page",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -63,16 +63,16 @@
|
|
|
63
63
|
"test": "backstage-cli package test"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@backstage/core-compat-api": "0.5.14
|
|
67
|
-
"@backstage/core-components": "0.18.13
|
|
68
|
-
"@backstage/core-plugin-api": "1.12.9
|
|
69
|
-
"@backstage/frontend-plugin-api": "0.18.0
|
|
66
|
+
"@backstage/core-compat-api": "^0.5.14",
|
|
67
|
+
"@backstage/core-components": "^0.18.13",
|
|
68
|
+
"@backstage/core-plugin-api": "^1.12.9",
|
|
69
|
+
"@backstage/frontend-plugin-api": "^0.18.0",
|
|
70
70
|
"@material-ui/core": "^4.12.2",
|
|
71
71
|
"@material-ui/icons": "^4.9.1",
|
|
72
72
|
"@rjsf/utils": "5.24.13"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@backstage/cli": "0.36.5
|
|
75
|
+
"@backstage/cli": "^0.36.5",
|
|
76
76
|
"@types/react": "^18.0.0",
|
|
77
77
|
"@types/react-grid-layout": "^1.3.2",
|
|
78
78
|
"react": "^18.0.2",
|