@backstage/frontend-plugin-api 0.16.0 → 0.16.1
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 +6 -0
- package/dist/blueprints/NavItemBlueprint.esm.js +3 -4
- package/dist/blueprints/NavItemBlueprint.esm.js.map +1 -1
- package/dist/blueprints/PageBlueprint.esm.js +4 -5
- package/dist/blueprints/PageBlueprint.esm.js.map +1 -1
- package/dist/blueprints/SubPageBlueprint.esm.js +4 -5
- package/dist/blueprints/SubPageBlueprint.esm.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
1
2
|
import '../wiring/coreExtensionData.esm.js';
|
|
2
3
|
import 'zod/v3';
|
|
3
4
|
import 'zod-to-json-schema';
|
|
@@ -23,10 +24,8 @@ const NavItemBlueprint = createExtensionBlueprint({
|
|
|
23
24
|
routeRef
|
|
24
25
|
})
|
|
25
26
|
],
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
title: (z) => z.string().optional()
|
|
29
|
-
}
|
|
27
|
+
configSchema: {
|
|
28
|
+
title: z.string().optional()
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavItemBlueprint.esm.js","sources":["../../src/blueprints/NavItemBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { IconComponent } from '../icons/types';\nimport { RouteRef } from '../routing';\nimport { createExtensionBlueprint, createExtensionDataRef } from '../wiring';\n\n// TODO(Rugvip): Should this be broken apart into separate refs? title/icon/routeRef\nconst targetDataRef = createExtensionDataRef<{\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n}>().with({ id: 'core.nav-item.target' });\n\n/**\n * Creates extensions that make up the items of the nav bar.\n *\n * @public\n * @deprecated Nav items are now automatically inferred from `PageBlueprint`\n * extensions based on their `title` and `icon` params. You can remove your\n * `NavItemBlueprint` usage and instead pass `title` and `icon` directly to\n * the `PageBlueprint`.\n */\nexport const NavItemBlueprint = createExtensionBlueprint({\n kind: 'nav-item',\n attachTo: { id: 'app/nav', input: 'items' },\n output: [targetDataRef],\n dataRefs: {\n target: targetDataRef,\n },\n factory: (\n {\n icon,\n routeRef,\n title,\n }: {\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n },\n { config },\n ) => [\n targetDataRef({\n title: config.title ?? title,\n icon,\n routeRef,\n }),\n ],\n
|
|
1
|
+
{"version":3,"file":"NavItemBlueprint.esm.js","sources":["../../src/blueprints/NavItemBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { z } from 'zod/v4';\nimport { IconComponent } from '../icons/types';\nimport { RouteRef } from '../routing';\nimport { createExtensionBlueprint, createExtensionDataRef } from '../wiring';\n\n// TODO(Rugvip): Should this be broken apart into separate refs? title/icon/routeRef\nconst targetDataRef = createExtensionDataRef<{\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n}>().with({ id: 'core.nav-item.target' });\n\n/**\n * Creates extensions that make up the items of the nav bar.\n *\n * @public\n * @deprecated Nav items are now automatically inferred from `PageBlueprint`\n * extensions based on their `title` and `icon` params. You can remove your\n * `NavItemBlueprint` usage and instead pass `title` and `icon` directly to\n * the `PageBlueprint`.\n */\nexport const NavItemBlueprint = createExtensionBlueprint({\n kind: 'nav-item',\n attachTo: { id: 'app/nav', input: 'items' },\n output: [targetDataRef],\n dataRefs: {\n target: targetDataRef,\n },\n factory: (\n {\n icon,\n routeRef,\n title,\n }: {\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n },\n { config },\n ) => [\n targetDataRef({\n title: config.title ?? title,\n icon,\n routeRef,\n }),\n ],\n configSchema: {\n title: z.string().optional(),\n },\n});\n"],"names":[],"mappings":";;;;;;;AAsBA,MAAM,gBAAgB,sBAAA,EAInB,CAAE,KAAK,EAAE,EAAA,EAAI,wBAAwB,CAAA;AAWjC,MAAM,mBAAmB,wBAAA,CAAyB;AAAA,EACvD,IAAA,EAAM,UAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,SAAA,EAAW,OAAO,OAAA,EAAQ;AAAA,EAC1C,MAAA,EAAQ,CAAC,aAAa,CAAA;AAAA,EACtB,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,SAAS,CACP;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACF,EAKA,EAAE,MAAA,EAAO,KACN;AAAA,IACH,aAAA,CAAc;AAAA,MACZ,KAAA,EAAO,OAAO,KAAA,IAAS,KAAA;AAAA,MACvB,IAAA;AAAA,MACA;AAAA,KACD;AAAA,GACH;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS;AAE/B,CAAC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
2
3
|
import { Routes, Route, Navigate } from 'react-router-dom';
|
|
3
4
|
import { coreExtensionData } from '../wiring/coreExtensionData.esm.js';
|
|
4
5
|
import 'zod/v3';
|
|
@@ -63,11 +64,9 @@ const PageBlueprint = createExtensionBlueprint({
|
|
|
63
64
|
coreExtensionData.title.optional(),
|
|
64
65
|
coreExtensionData.icon.optional()
|
|
65
66
|
],
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
title: (z) => z.string().optional()
|
|
70
|
-
}
|
|
67
|
+
configSchema: {
|
|
68
|
+
path: z.string().optional(),
|
|
69
|
+
title: z.string().optional()
|
|
71
70
|
},
|
|
72
71
|
*factory(params, { config, node, inputs }) {
|
|
73
72
|
const title = config.title ?? params.title;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageBlueprint.esm.js","sources":["../../src/blueprints/PageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { JSX } from 'react';\nimport { Routes, Route, Navigate } from 'react-router-dom';\nimport { IconElement } from '../icons/types';\nimport { RouteRef } from '../routing';\nimport {\n coreExtensionData,\n createExtensionBlueprint,\n createExtensionInput,\n} from '../wiring';\nimport { ExtensionBoundary, PageLayout, PageLayoutTab } from '../components';\nimport { useApi } from '../apis/system';\nimport { routeResolutionApiRef } from '../apis/definitions/RouteResolutionApi';\nimport { pluginHeaderActionsApiRef } from '../apis/definitions/PluginHeaderActionsApi';\nimport { RouteResolutionApi } from '../apis/definitions/RouteResolutionApi';\n\nfunction resolveTitleLink(\n routeResolutionApi: RouteResolutionApi,\n routeRef: RouteRef | undefined,\n): string | undefined {\n if (!routeRef) {\n return undefined;\n }\n try {\n return routeResolutionApi.resolve(routeRef)?.();\n } catch {\n // Route ref may require params not available in the current context\n return undefined;\n }\n}\n\n/**\n * Creates extensions that are routable React page components.\n *\n * @public\n */\nexport const PageBlueprint = createExtensionBlueprint({\n kind: 'page',\n attachTo: { id: 'app/routes', input: 'routes' },\n inputs: {\n pages: createExtensionInput([\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.reactElement,\n coreExtensionData.title.optional(),\n coreExtensionData.icon.optional(),\n ]),\n },\n output: [\n coreExtensionData.routePath,\n coreExtensionData.reactElement,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.title.optional(),\n coreExtensionData.icon.optional(),\n ],\n config: {\n schema: {\n path: z => z.string().optional(),\n title: z => z.string().optional(),\n },\n },\n *factory(\n params: {\n path: string;\n title?: string;\n icon?: IconElement;\n loader?: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n /**\n * Hide the default plugin page header, making the page fill up all available space.\n */\n noHeader?: boolean;\n },\n { config, node, inputs },\n ) {\n const title = config.title ?? params.title;\n const icon = params.icon;\n const pluginId = node.spec.plugin.pluginId;\n const noHeader = params.noHeader ?? false;\n const resolvedTitle =\n title ?? node.spec.plugin.title ?? node.spec.plugin.pluginId;\n const resolvedIcon = icon ?? node.spec.plugin.icon;\n const titleRouteRef =\n (node.spec.plugin.routes as { root?: RouteRef }).root ?? params.routeRef;\n\n yield coreExtensionData.routePath(config.path ?? params.path);\n if (params.loader) {\n const loader = params.loader;\n const PageContent = () => {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n const titleLink = resolveTitleLink(routeResolutionApi, titleRouteRef);\n const headerActionsApi = useApi(pluginHeaderActionsApiRef);\n const headerActions = headerActionsApi.getPluginHeaderActions(pluginId);\n\n return (\n <PageLayout\n title={resolvedTitle}\n icon={resolvedIcon}\n noHeader={noHeader}\n titleLink={titleLink}\n headerActions={headerActions}\n >\n {ExtensionBoundary.lazy(node, loader)}\n </PageLayout>\n );\n };\n yield coreExtensionData.reactElement(<PageContent />);\n } else if (inputs.pages.length > 0) {\n // Parent page with sub-pages - render header with tabs\n const tabs: PageLayoutTab[] = inputs.pages.map(page => {\n const path = page.get(coreExtensionData.routePath);\n const tabTitle = page.get(coreExtensionData.title);\n const tabIcon = page.get(coreExtensionData.icon);\n return {\n id: path,\n label: tabTitle || path,\n icon: tabIcon,\n href: path,\n };\n });\n\n const PageContent = () => {\n const firstPagePath = inputs.pages[0]?.get(coreExtensionData.routePath);\n const routeResolutionApi = useApi(routeResolutionApiRef);\n const titleLink = resolveTitleLink(routeResolutionApi, titleRouteRef);\n\n const headerActionsApi = useApi(pluginHeaderActionsApiRef);\n const headerActions = headerActionsApi.getPluginHeaderActions(pluginId);\n\n return (\n <PageLayout\n title={resolvedTitle}\n icon={resolvedIcon}\n tabs={tabs}\n titleLink={titleLink}\n headerActions={headerActions}\n >\n <Routes>\n {firstPagePath && (\n <Route\n index\n element={<Navigate to={firstPagePath} replace />}\n />\n )}\n {inputs.pages.map((page, index) => {\n const path = page.get(coreExtensionData.routePath);\n const element = page.get(coreExtensionData.reactElement);\n return (\n <Route key={index} path={`${path}/*`} element={element} />\n );\n })}\n </Routes>\n </PageLayout>\n );\n };\n\n yield coreExtensionData.reactElement(<PageContent />);\n } else {\n const PageContent = () => {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n const titleLink = resolveTitleLink(routeResolutionApi, titleRouteRef);\n const headerActionsApi = useApi(pluginHeaderActionsApiRef);\n const headerActions = headerActionsApi.getPluginHeaderActions(pluginId);\n return (\n <PageLayout\n title={resolvedTitle}\n icon={resolvedIcon}\n titleLink={titleLink}\n headerActions={headerActions}\n />\n );\n };\n yield coreExtensionData.reactElement(<PageContent />);\n }\n if (params.routeRef) {\n yield coreExtensionData.routeRef(params.routeRef);\n }\n if (title) {\n yield coreExtensionData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,IAAA,EAAM,YAAA;AAAA,YACN,SAAA;AAAA,YACA;AAAA;AAAA,SACF;AAAA,MAEJ,CAAA;AACA,MAAA,MAAM,iBAAA,CAAkB,YAAA,iBAAa,GAAA,CAAC,WAAA,EAAA,EAAY,CAAE,CAAA;AAAA,IACtD;AACA,IAAA,IAAI,OAAO,QAAA,EAAU;AACnB,MAAA,MAAM,iBAAA,CAAkB,QAAA,CAAS,MAAA,CAAO,QAAQ,CAAA;AAAA,IAClD;AACA,IAAA,IAAI,KAAA,EAAO;AACT,MAAA,MAAM,iBAAA,CAAkB,MAAM,KAAK,CAAA;AAAA,IACrC;AACA,IAAA,IAAI,IAAA,EAAM;AACR,MAAA,MAAM,iBAAA,CAAkB,KAAK,IAAI,CAAA;AAAA,IACnC;AAAA,EACF;AACF,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"PageBlueprint.esm.js","sources":["../../src/blueprints/PageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { z } from 'zod/v4';\nimport { JSX } from 'react';\nimport { Routes, Route, Navigate } from 'react-router-dom';\nimport { IconElement } from '../icons/types';\nimport { RouteRef } from '../routing';\nimport {\n coreExtensionData,\n createExtensionBlueprint,\n createExtensionInput,\n} from '../wiring';\nimport { ExtensionBoundary, PageLayout, PageLayoutTab } from '../components';\nimport { useApi } from '../apis/system';\nimport { routeResolutionApiRef } from '../apis/definitions/RouteResolutionApi';\nimport { pluginHeaderActionsApiRef } from '../apis/definitions/PluginHeaderActionsApi';\nimport { RouteResolutionApi } from '../apis/definitions/RouteResolutionApi';\n\nfunction resolveTitleLink(\n routeResolutionApi: RouteResolutionApi,\n routeRef: RouteRef | undefined,\n): string | undefined {\n if (!routeRef) {\n return undefined;\n }\n try {\n return routeResolutionApi.resolve(routeRef)?.();\n } catch {\n // Route ref may require params not available in the current context\n return undefined;\n }\n}\n\n/**\n * Creates extensions that are routable React page components.\n *\n * @public\n */\nexport const PageBlueprint = createExtensionBlueprint({\n kind: 'page',\n attachTo: { id: 'app/routes', input: 'routes' },\n inputs: {\n pages: createExtensionInput([\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.reactElement,\n coreExtensionData.title.optional(),\n coreExtensionData.icon.optional(),\n ]),\n },\n output: [\n coreExtensionData.routePath,\n coreExtensionData.reactElement,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.title.optional(),\n coreExtensionData.icon.optional(),\n ],\n configSchema: {\n path: z.string().optional(),\n title: z.string().optional(),\n },\n *factory(\n params: {\n path: string;\n title?: string;\n icon?: IconElement;\n loader?: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n /**\n * Hide the default plugin page header, making the page fill up all available space.\n */\n noHeader?: boolean;\n },\n { config, node, inputs },\n ) {\n const title = config.title ?? params.title;\n const icon = params.icon;\n const pluginId = node.spec.plugin.pluginId;\n const noHeader = params.noHeader ?? false;\n const resolvedTitle =\n title ?? node.spec.plugin.title ?? node.spec.plugin.pluginId;\n const resolvedIcon = icon ?? node.spec.plugin.icon;\n const titleRouteRef =\n (node.spec.plugin.routes as { root?: RouteRef }).root ?? params.routeRef;\n\n yield coreExtensionData.routePath(config.path ?? params.path);\n if (params.loader) {\n const loader = params.loader;\n const PageContent = () => {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n const titleLink = resolveTitleLink(routeResolutionApi, titleRouteRef);\n const headerActionsApi = useApi(pluginHeaderActionsApiRef);\n const headerActions = headerActionsApi.getPluginHeaderActions(pluginId);\n\n return (\n <PageLayout\n title={resolvedTitle}\n icon={resolvedIcon}\n noHeader={noHeader}\n titleLink={titleLink}\n headerActions={headerActions}\n >\n {ExtensionBoundary.lazy(node, loader)}\n </PageLayout>\n );\n };\n yield coreExtensionData.reactElement(<PageContent />);\n } else if (inputs.pages.length > 0) {\n // Parent page with sub-pages - render header with tabs\n const tabs: PageLayoutTab[] = inputs.pages.map(page => {\n const path = page.get(coreExtensionData.routePath);\n const tabTitle = page.get(coreExtensionData.title);\n const tabIcon = page.get(coreExtensionData.icon);\n return {\n id: path,\n label: tabTitle || path,\n icon: tabIcon,\n href: path,\n };\n });\n\n const PageContent = () => {\n const firstPagePath = inputs.pages[0]?.get(coreExtensionData.routePath);\n const routeResolutionApi = useApi(routeResolutionApiRef);\n const titleLink = resolveTitleLink(routeResolutionApi, titleRouteRef);\n\n const headerActionsApi = useApi(pluginHeaderActionsApiRef);\n const headerActions = headerActionsApi.getPluginHeaderActions(pluginId);\n\n return (\n <PageLayout\n title={resolvedTitle}\n icon={resolvedIcon}\n tabs={tabs}\n titleLink={titleLink}\n headerActions={headerActions}\n >\n <Routes>\n {firstPagePath && (\n <Route\n index\n element={<Navigate to={firstPagePath} replace />}\n />\n )}\n {inputs.pages.map((page, index) => {\n const path = page.get(coreExtensionData.routePath);\n const element = page.get(coreExtensionData.reactElement);\n return (\n <Route key={index} path={`${path}/*`} element={element} />\n );\n })}\n </Routes>\n </PageLayout>\n );\n };\n\n yield coreExtensionData.reactElement(<PageContent />);\n } else {\n const PageContent = () => {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n const titleLink = resolveTitleLink(routeResolutionApi, titleRouteRef);\n const headerActionsApi = useApi(pluginHeaderActionsApiRef);\n const headerActions = headerActionsApi.getPluginHeaderActions(pluginId);\n return (\n <PageLayout\n title={resolvedTitle}\n icon={resolvedIcon}\n titleLink={titleLink}\n headerActions={headerActions}\n />\n );\n };\n yield coreExtensionData.reactElement(<PageContent />);\n }\n if (params.routeRef) {\n yield coreExtensionData.routeRef(params.routeRef);\n }\n if (title) {\n yield coreExtensionData.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;AAAA,SACF;AAAA,MAEJ,CAAA;AACA,MAAA,MAAM,iBAAA,CAAkB,YAAA,iBAAa,GAAA,CAAC,WAAA,EAAA,EAAY,CAAE,CAAA;AAAA,IACtD;AACA,IAAA,IAAI,OAAO,QAAA,EAAU;AACnB,MAAA,MAAM,iBAAA,CAAkB,QAAA,CAAS,MAAA,CAAO,QAAQ,CAAA;AAAA,IAClD;AACA,IAAA,IAAI,KAAA,EAAO;AACT,MAAA,MAAM,iBAAA,CAAkB,MAAM,KAAK,CAAA;AAAA,IACrC;AACA,IAAA,IAAI,IAAA,EAAM;AACR,MAAA,MAAM,iBAAA,CAAkB,KAAK,IAAI,CAAA;AAAA,IACnC;AAAA,EACF;AACF,CAAC;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
1
2
|
import { coreExtensionData } from '../wiring/coreExtensionData.esm.js';
|
|
2
3
|
import 'zod/v3';
|
|
3
4
|
import 'zod-to-json-schema';
|
|
@@ -43,11 +44,9 @@ const SubPageBlueprint = createExtensionBlueprint({
|
|
|
43
44
|
coreExtensionData.routeRef.optional(),
|
|
44
45
|
coreExtensionData.icon.optional()
|
|
45
46
|
],
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
title: (z) => z.string().optional()
|
|
50
|
-
}
|
|
47
|
+
configSchema: {
|
|
48
|
+
path: z.string().optional(),
|
|
49
|
+
title: z.string().optional()
|
|
51
50
|
},
|
|
52
51
|
*factory(params, { config, node }) {
|
|
53
52
|
yield coreExtensionData.routePath(config.path ?? params.path);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubPageBlueprint.esm.js","sources":["../../src/blueprints/SubPageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { IconElement } from '../icons/types';\nimport { RouteRef } from '../routing';\nimport { coreExtensionData, createExtensionBlueprint } from '../wiring';\nimport { ExtensionBoundary } from '../components';\n\n/**\n * Creates extensions that are sub-page React components attached to a parent page.\n * Sub-pages are rendered as tabs within the parent page's header.\n *\n * @public\n * @example\n * ```tsx\n * const overviewRouteRef = createRouteRef();\n *\n * const mySubPage = SubPageBlueprint.make({\n * attachTo: { id: 'page:my-plugin', input: 'pages' },\n * name: 'overview',\n * params: {\n * path: 'overview',\n * title: 'Overview',\n * routeRef: overviewRouteRef,\n * loader: () => import('./components/Overview').then(m => <m.Overview />),\n * },\n * });\n * ```\n */\nexport const SubPageBlueprint = createExtensionBlueprint({\n kind: 'sub-page',\n attachTo: { relative: { kind: 'page' }, input: 'pages' },\n output: [\n coreExtensionData.routePath,\n coreExtensionData.reactElement,\n coreExtensionData.title,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.icon.optional(),\n ],\n
|
|
1
|
+
{"version":3,"file":"SubPageBlueprint.esm.js","sources":["../../src/blueprints/SubPageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { z } from 'zod/v4';\nimport { IconElement } from '../icons/types';\nimport { RouteRef } from '../routing';\nimport { coreExtensionData, createExtensionBlueprint } from '../wiring';\nimport { ExtensionBoundary } from '../components';\n\n/**\n * Creates extensions that are sub-page React components attached to a parent page.\n * Sub-pages are rendered as tabs within the parent page's header.\n *\n * @public\n * @example\n * ```tsx\n * const overviewRouteRef = createRouteRef();\n *\n * const mySubPage = SubPageBlueprint.make({\n * attachTo: { id: 'page:my-plugin', input: 'pages' },\n * name: 'overview',\n * params: {\n * path: 'overview',\n * title: 'Overview',\n * routeRef: overviewRouteRef,\n * loader: () => import('./components/Overview').then(m => <m.Overview />),\n * },\n * });\n * ```\n */\nexport const SubPageBlueprint = createExtensionBlueprint({\n kind: 'sub-page',\n attachTo: { relative: { kind: 'page' }, input: 'pages' },\n output: [\n coreExtensionData.routePath,\n coreExtensionData.reactElement,\n coreExtensionData.title,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.icon.optional(),\n ],\n configSchema: {\n path: z.string().optional(),\n title: z.string().optional(),\n },\n *factory(\n params: {\n /**\n * The path for this sub-page, relative to the parent page. Must **not** start with '/'.\n *\n * @example 'overview', 'settings', 'details'\n */\n path: string;\n /**\n * The title displayed in the tab for this sub-page.\n */\n title: string;\n /**\n * Optional icon for this sub-page, displayed in the tab.\n */\n icon?: IconElement;\n /**\n * A function that returns a promise resolving to the React element to render.\n * This enables lazy loading of the sub-page content.\n */\n loader: () => Promise<JSX.Element>;\n /**\n * Optional route reference for this sub-page.\n */\n routeRef?: RouteRef;\n },\n { config, node },\n ) {\n yield coreExtensionData.routePath(config.path ?? params.path);\n yield coreExtensionData.title(config.title ?? params.title);\n yield coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, params.loader),\n );\n if (params.routeRef) {\n yield coreExtensionData.routeRef(params.routeRef);\n }\n if (params.icon) {\n yield coreExtensionData.icon(params.icon);\n }\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CO,MAAM,mBAAmB,wBAAA,CAAyB;AAAA,EACvD,IAAA,EAAM,UAAA;AAAA,EACN,QAAA,EAAU,EAAE,QAAA,EAAU,EAAE,MAAM,MAAA,EAAO,EAAG,OAAO,OAAA,EAAQ;AAAA,EACvD,MAAA,EAAQ;AAAA,IACN,iBAAA,CAAkB,SAAA;AAAA,IAClB,iBAAA,CAAkB,YAAA;AAAA,IAClB,iBAAA,CAAkB,KAAA;AAAA,IAClB,iBAAA,CAAkB,SAAS,QAAA,EAAS;AAAA,IACpC,iBAAA,CAAkB,KAAK,QAAA;AAAS,GAClC;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC1B,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC7B;AAAA,EACA,CAAC,OAAA,CACC,MAAA,EAyBA,EAAE,MAAA,EAAQ,MAAK,EACf;AACA,IAAA,MAAM,iBAAA,CAAkB,SAAA,CAAU,MAAA,CAAO,IAAA,IAAQ,OAAO,IAAI,CAAA;AAC5D,IAAA,MAAM,iBAAA,CAAkB,KAAA,CAAM,MAAA,CAAO,KAAA,IAAS,OAAO,KAAK,CAAA;AAC1D,IAAA,MAAM,iBAAA,CAAkB,YAAA;AAAA,MACtB,iBAAA,CAAkB,IAAA,CAAK,IAAA,EAAM,MAAA,CAAO,MAAM;AAAA,KAC5C;AACA,IAAA,IAAI,OAAO,QAAA,EAAU;AACnB,MAAA,MAAM,iBAAA,CAAkB,QAAA,CAAS,MAAA,CAAO,QAAQ,CAAA;AAAA,IAClD;AACA,IAAA,IAAI,OAAO,IAAA,EAAM;AACf,MAAA,MAAM,iBAAA,CAAkB,IAAA,CAAK,MAAA,CAAO,IAAI,CAAA;AAAA,IAC1C;AAAA,EACF;AACF,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2268,8 +2268,12 @@ declare const NavItemBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprin
|
|
|
2268
2268
|
routeRef: RouteRef<undefined>;
|
|
2269
2269
|
}, "core.nav-item.target", {}>;
|
|
2270
2270
|
inputs: {};
|
|
2271
|
-
config: {
|
|
2272
|
-
|
|
2271
|
+
config: {
|
|
2272
|
+
title: string | undefined;
|
|
2273
|
+
};
|
|
2274
|
+
configInput: {
|
|
2275
|
+
title?: string | undefined;
|
|
2276
|
+
};
|
|
2273
2277
|
dataRefs: {
|
|
2274
2278
|
target: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
2275
2279
|
title: string;
|
|
@@ -2322,8 +2326,8 @@ declare const PageBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
|
2322
2326
|
title: string | undefined;
|
|
2323
2327
|
};
|
|
2324
2328
|
configInput: {
|
|
2325
|
-
title?: string | undefined;
|
|
2326
2329
|
path?: string | undefined;
|
|
2330
|
+
title?: string | undefined;
|
|
2327
2331
|
};
|
|
2328
2332
|
dataRefs: never;
|
|
2329
2333
|
}>;
|
|
@@ -2387,8 +2391,8 @@ declare const SubPageBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprin
|
|
|
2387
2391
|
title: string | undefined;
|
|
2388
2392
|
};
|
|
2389
2393
|
configInput: {
|
|
2390
|
-
title?: string | undefined;
|
|
2391
2394
|
path?: string | undefined;
|
|
2395
|
+
title?: string | undefined;
|
|
2392
2396
|
};
|
|
2393
2397
|
dataRefs: never;
|
|
2394
2398
|
}>;
|