@backstage/plugin-app-react 0.0.0-nightly-20260119025541 → 0.0.0-nightly-20260127025640
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 +12 -3
- package/dist/blueprints/AppRootWrapperBlueprint.esm.js +17 -0
- package/dist/blueprints/AppRootWrapperBlueprint.esm.js.map +1 -0
- package/dist/blueprints/IconBundleBlueprint.esm.js +17 -0
- package/dist/blueprints/IconBundleBlueprint.esm.js.map +1 -0
- package/dist/blueprints/NavContentBlueprint.esm.js +19 -0
- package/dist/blueprints/NavContentBlueprint.esm.js.map +1 -0
- package/dist/blueprints/RouterBlueprint.esm.js +17 -0
- package/dist/blueprints/RouterBlueprint.esm.js.map +1 -0
- package/dist/blueprints/SignInPageBlueprint.esm.js +24 -0
- package/dist/blueprints/SignInPageBlueprint.esm.js.map +1 -0
- package/dist/blueprints/SwappableComponentBlueprint.esm.js +23 -0
- package/dist/blueprints/SwappableComponentBlueprint.esm.js.map +1 -0
- package/dist/blueprints/ThemeBlueprint.esm.js +17 -0
- package/dist/blueprints/ThemeBlueprint.esm.js.map +1 -0
- package/dist/blueprints/TranslationBlueprint.esm.js +17 -0
- package/dist/blueprints/TranslationBlueprint.esm.js.map +1 -0
- package/dist/index.d.ts +137 -59
- package/dist/index.esm.js +8 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -6
- package/dist/blueprints/index.esm.js +0 -12
- package/dist/blueprints/index.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# @backstage/plugin-app-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20260127025640
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 409af72: Internal refactor to move implementation of blueprints from `@backstage/frontend-plugin-api` to this package.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/frontend-plugin-api@0.0.0-nightly-20260127025640
|
|
10
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20260127025640
|
|
11
|
+
|
|
12
|
+
## 0.1.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
6
15
|
|
|
@@ -10,6 +19,7 @@
|
|
|
10
19
|
|
|
11
20
|
- 9ccf84e: Moved the following blueprints from `@backstage/frontend-plugin-api`:
|
|
12
21
|
|
|
22
|
+
- `AppRootWrapperBlueprint`
|
|
13
23
|
- `IconBundleBlueprint`
|
|
14
24
|
- `NavContentBlueprint`
|
|
15
25
|
- `RouterBlueprint`
|
|
@@ -19,5 +29,4 @@
|
|
|
19
29
|
- `TranslationBlueprint`
|
|
20
30
|
|
|
21
31
|
- Updated dependencies
|
|
22
|
-
- @backstage/frontend-plugin-api@0.
|
|
23
|
-
- @backstage/core-plugin-api@0.0.0-nightly-20260119025541
|
|
32
|
+
- @backstage/frontend-plugin-api@0.13.3
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const componentDataRef = createExtensionDataRef().with({ id: "app.root.wrapper" });
|
|
4
|
+
const AppRootWrapperBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "app-root-wrapper",
|
|
6
|
+
attachTo: { id: "app/root", input: "wrappers" },
|
|
7
|
+
output: [componentDataRef],
|
|
8
|
+
dataRefs: {
|
|
9
|
+
component: componentDataRef
|
|
10
|
+
},
|
|
11
|
+
*factory(params) {
|
|
12
|
+
yield componentDataRef(params.component);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { AppRootWrapperBlueprint };
|
|
17
|
+
//# sourceMappingURL=AppRootWrapperBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppRootWrapperBlueprint.esm.js","sources":["../../src/blueprints/AppRootWrapperBlueprint.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 { ReactNode } from 'react';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nconst componentDataRef = createExtensionDataRef<\n (props: { children: ReactNode }) => JSX.Element | null\n>().with({ id: 'app.root.wrapper' });\n\n/**\n * Creates a extensions that render a React wrapper at the app root, enclosing\n * the app layout. This is useful for example for adding global React contexts\n * and similar. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const AppRootWrapperBlueprint = createExtensionBlueprint({\n kind: 'app-root-wrapper',\n attachTo: { id: 'app/root', input: 'wrappers' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n *factory(params: {\n /** @deprecated use the `component` parameter instead */\n Component?: [error: 'Use the `component` parameter instead'];\n component: (props: { children: ReactNode }) => JSX.Element | null;\n }) {\n yield componentDataRef(params.component);\n },\n});\n"],"names":[],"mappings":";;AAsBA,MAAM,mBAAmB,sBAAA,EAEvB,CAAE,KAAK,EAAE,EAAA,EAAI,oBAAoB,CAAA;AAS5B,MAAM,0BAA0B,wBAAA,CAAyB;AAAA,EAC9D,IAAA,EAAM,kBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,UAAA,EAAY,OAAO,UAAA,EAAW;AAAA,EAC9C,MAAA,EAAQ,CAAC,gBAAgB,CAAA;AAAA,EACzB,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,CAAC,QAAQ,MAAA,EAIN;AACD,IAAA,MAAM,gBAAA,CAAiB,OAAO,SAAS,CAAA;AAAA,EACzC;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const iconsDataRef = createExtensionDataRef().with({ id: "core.icons" });
|
|
4
|
+
const IconBundleBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "icon-bundle",
|
|
6
|
+
attachTo: { id: "api:app/icons", input: "icons" },
|
|
7
|
+
output: [iconsDataRef],
|
|
8
|
+
factory: (params) => [
|
|
9
|
+
iconsDataRef(params.icons)
|
|
10
|
+
],
|
|
11
|
+
dataRefs: {
|
|
12
|
+
icons: iconsDataRef
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { IconBundleBlueprint };
|
|
17
|
+
//# sourceMappingURL=IconBundleBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconBundleBlueprint.esm.js","sources":["../../src/blueprints/IconBundleBlueprint.ts"],"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 { IconComponent } from '@backstage/frontend-plugin-api';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nconst iconsDataRef = createExtensionDataRef<{\n [key in string]: IconComponent;\n}>().with({ id: 'core.icons' });\n\n/**\n * Creates an extension that adds icon bundles to your app. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const IconBundleBlueprint = createExtensionBlueprint({\n kind: 'icon-bundle',\n attachTo: { id: 'api:app/icons', input: 'icons' },\n output: [iconsDataRef],\n factory: (params: { icons: { [key in string]: IconComponent } }) => [\n iconsDataRef(params.icons),\n ],\n dataRefs: {\n icons: iconsDataRef,\n },\n});\n"],"names":[],"mappings":";;AAsBA,MAAM,eAAe,sBAAA,EAElB,CAAE,KAAK,EAAE,EAAA,EAAI,cAAc,CAAA;AAOvB,MAAM,sBAAsB,wBAAA,CAAyB;AAAA,EAC1D,IAAA,EAAM,aAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,eAAA,EAAiB,OAAO,OAAA,EAAQ;AAAA,EAChD,MAAA,EAAQ,CAAC,YAAY,CAAA;AAAA,EACrB,OAAA,EAAS,CAAC,MAAA,KAA0D;AAAA,IAClE,YAAA,CAAa,OAAO,KAAK;AAAA,GAC3B;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA;AAEX,CAAC;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const componentDataRef = createExtensionDataRef().with({
|
|
4
|
+
id: "core.nav-content.component"
|
|
5
|
+
});
|
|
6
|
+
const NavContentBlueprint = createExtensionBlueprint({
|
|
7
|
+
kind: "nav-content",
|
|
8
|
+
attachTo: { id: "app/nav", input: "content" },
|
|
9
|
+
output: [componentDataRef],
|
|
10
|
+
dataRefs: {
|
|
11
|
+
component: componentDataRef
|
|
12
|
+
},
|
|
13
|
+
*factory(params) {
|
|
14
|
+
yield componentDataRef(params.component);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export { NavContentBlueprint };
|
|
19
|
+
//# sourceMappingURL=NavContentBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavContentBlueprint.esm.js","sources":["../../src/blueprints/NavContentBlueprint.ts"],"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 { IconComponent, RouteRef } from '@backstage/frontend-plugin-api';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\n/**\n * The props for the {@link NavContentComponent}.\n *\n * @public\n */\nexport interface NavContentComponentProps {\n /**\n * The nav items available to the component. These are all the items created\n * with the {@link @backstage/frontend-plugin-api#NavItemBlueprint} in the app.\n *\n * In addition to the original properties from the nav items, these also\n * include a resolved route path as `to`, and duplicated `title` as `text` to\n * simplify rendering.\n */\n items: Array<{\n // Original props from nav items\n icon: IconComponent;\n title: string;\n routeRef: RouteRef<undefined>;\n\n // Additional props to simplify item rendering\n to: string;\n text: string;\n }>;\n}\n\n/**\n * A component that renders the nav bar content, to be passed to the {@link NavContentBlueprint}.\n *\n * @public\n */\nexport type NavContentComponent = (\n props: NavContentComponentProps,\n) => JSX.Element | null;\n\nconst componentDataRef = createExtensionDataRef<NavContentComponent>().with({\n id: 'core.nav-content.component',\n});\n\n/**\n * Creates an extension that replaces the entire nav bar with your own component. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const NavContentBlueprint = createExtensionBlueprint({\n kind: 'nav-content',\n attachTo: { id: 'app/nav', input: 'content' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n *factory(params: { component: NavContentComponent }) {\n yield componentDataRef(params.component);\n },\n});\n"],"names":[],"mappings":";;AAyDA,MAAM,gBAAA,GAAmB,sBAAA,EAA4C,CAAE,IAAA,CAAK;AAAA,EAC1E,EAAA,EAAI;AACN,CAAC,CAAA;AAOM,MAAM,sBAAsB,wBAAA,CAAyB;AAAA,EAC1D,IAAA,EAAM,aAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,SAAA,EAAW,OAAO,SAAA,EAAU;AAAA,EAC5C,MAAA,EAAQ,CAAC,gBAAgB,CAAA;AAAA,EACzB,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,CAAC,QAAQ,MAAA,EAA4C;AACnD,IAAA,MAAM,gBAAA,CAAiB,OAAO,SAAS,CAAA;AAAA,EACzC;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const componentDataRef = createExtensionDataRef().with({ id: "app.router.wrapper" });
|
|
4
|
+
const RouterBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "app-router-component",
|
|
6
|
+
attachTo: { id: "app/root", input: "router" },
|
|
7
|
+
output: [componentDataRef],
|
|
8
|
+
dataRefs: {
|
|
9
|
+
component: componentDataRef
|
|
10
|
+
},
|
|
11
|
+
*factory(params) {
|
|
12
|
+
yield componentDataRef(params.component);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { RouterBlueprint };
|
|
17
|
+
//# sourceMappingURL=RouterBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterBlueprint.esm.js","sources":["../../src/blueprints/RouterBlueprint.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 { ReactNode } from 'react';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nconst componentDataRef = createExtensionDataRef<\n (props: { children: ReactNode }) => JSX.Element | null\n>().with({ id: 'app.router.wrapper' });\n\n/**\n * Creates an extension that replaces the router component. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const RouterBlueprint = createExtensionBlueprint({\n kind: 'app-router-component',\n attachTo: { id: 'app/root', input: 'router' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n *factory(params: {\n /** @deprecated use the `component` parameter instead */\n Component?: [error: 'Use the `component` parameter instead'];\n component: (props: { children: ReactNode }) => JSX.Element | null;\n }) {\n yield componentDataRef(params.component);\n },\n});\n"],"names":[],"mappings":";;AAsBA,MAAM,mBAAmB,sBAAA,EAEvB,CAAE,KAAK,EAAE,EAAA,EAAI,sBAAsB,CAAA;AAO9B,MAAM,kBAAkB,wBAAA,CAAyB;AAAA,EACtD,IAAA,EAAM,sBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,UAAA,EAAY,OAAO,QAAA,EAAS;AAAA,EAC5C,MAAA,EAAQ,CAAC,gBAAgB,CAAA;AAAA,EACzB,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,CAAC,QAAQ,MAAA,EAIN;AACD,IAAA,MAAM,gBAAA,CAAiB,OAAO,SAAS,CAAA;AAAA,EACzC;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { lazy } from 'react';
|
|
3
|
+
import { createExtensionDataRef, createExtensionBlueprint, ExtensionBoundary } from '@backstage/frontend-plugin-api';
|
|
4
|
+
|
|
5
|
+
const componentDataRef = createExtensionDataRef().with({ id: "core.sign-in-page.component" });
|
|
6
|
+
const SignInPageBlueprint = createExtensionBlueprint({
|
|
7
|
+
kind: "sign-in-page",
|
|
8
|
+
attachTo: { id: "app/root", input: "signInPage" },
|
|
9
|
+
output: [componentDataRef],
|
|
10
|
+
dataRefs: {
|
|
11
|
+
component: componentDataRef
|
|
12
|
+
},
|
|
13
|
+
*factory({
|
|
14
|
+
loader
|
|
15
|
+
}, { node }) {
|
|
16
|
+
const ExtensionComponent = lazy(
|
|
17
|
+
() => loader().then((component) => ({ default: component }))
|
|
18
|
+
);
|
|
19
|
+
yield componentDataRef((props) => /* @__PURE__ */ jsx(ExtensionBoundary, { node, children: /* @__PURE__ */ jsx(ExtensionComponent, { ...props }) }));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { SignInPageBlueprint };
|
|
24
|
+
//# sourceMappingURL=SignInPageBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignInPageBlueprint.esm.js","sources":["../../src/blueprints/SignInPageBlueprint.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 { ComponentType, lazy, ReactNode } from 'react';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n ExtensionBoundary,\n IdentityApi,\n} from '@backstage/frontend-plugin-api';\n\n/**\n * Props for the `SignInPage` component.\n *\n * @public\n */\nexport type SignInPageProps = {\n /**\n * Set the IdentityApi on successful sign-in. This should only be called once.\n */\n onSignInSuccess(identityApi: IdentityApi): void;\n\n /**\n * The children to render.\n */\n children?: ReactNode;\n};\n\nconst componentDataRef = createExtensionDataRef<\n ComponentType<SignInPageProps>\n>().with({ id: 'core.sign-in-page.component' });\n\n/**\n * Creates an extension that replaces the sign in page. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const SignInPageBlueprint = createExtensionBlueprint({\n kind: 'sign-in-page',\n attachTo: { id: 'app/root', input: 'signInPage' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n *factory(\n {\n loader,\n }: {\n loader: () => Promise<ComponentType<SignInPageProps>>;\n },\n { node },\n ) {\n const ExtensionComponent = lazy(() =>\n loader().then(component => ({ default: component })),\n );\n\n yield componentDataRef(props => (\n <ExtensionBoundary node={node}>\n <ExtensionComponent {...props} />\n </ExtensionBoundary>\n ));\n },\n});\n"],"names":[],"mappings":";;;;AAyCA,MAAM,mBAAmB,sBAAA,EAEvB,CAAE,KAAK,EAAE,EAAA,EAAI,+BAA+B,CAAA;AAOvC,MAAM,sBAAsB,wBAAA,CAAyB;AAAA,EAC1D,IAAA,EAAM,cAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,UAAA,EAAY,OAAO,YAAA,EAAa;AAAA,EAChD,MAAA,EAAQ,CAAC,gBAAgB,CAAA;AAAA,EACzB,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,CAAC,OAAA,CACC;AAAA,IACE;AAAA,GACF,EAGA,EAAE,IAAA,EAAK,EACP;AACA,IAAA,MAAM,kBAAA,GAAqB,IAAA;AAAA,MAAK,MAC9B,QAAO,CAAE,IAAA,CAAK,gBAAc,EAAE,OAAA,EAAS,WAAU,CAAE;AAAA,KACrD;AAEA,IAAA,MAAM,gBAAA,CAAiB,CAAA,KAAA,qBACrB,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EACjB,8BAAC,kBAAA,EAAA,EAAoB,GAAG,KAAA,EAAO,CAAA,EACjC,CACD,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint, createExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const componentDataRef = createExtensionDataRef().with({ id: "core.swappableComponent" });
|
|
4
|
+
const SwappableComponentBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "component",
|
|
6
|
+
attachTo: { id: "api:app/swappable-components", input: "components" },
|
|
7
|
+
output: [componentDataRef],
|
|
8
|
+
dataRefs: {
|
|
9
|
+
component: componentDataRef
|
|
10
|
+
},
|
|
11
|
+
defineParams(params) {
|
|
12
|
+
return createExtensionBlueprintParams(params);
|
|
13
|
+
},
|
|
14
|
+
factory: (params) => [
|
|
15
|
+
componentDataRef({
|
|
16
|
+
ref: params.component.ref,
|
|
17
|
+
loader: params.loader
|
|
18
|
+
})
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { SwappableComponentBlueprint, componentDataRef };
|
|
23
|
+
//# sourceMappingURL=SwappableComponentBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwappableComponentBlueprint.esm.js","sources":["../../src/blueprints/SwappableComponentBlueprint.ts"],"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 { SwappableComponentRef } from '@backstage/frontend-plugin-api';\nimport {\n createExtensionBlueprint,\n createExtensionBlueprintParams,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nexport const componentDataRef = createExtensionDataRef<{\n ref: SwappableComponentRef;\n loader:\n | (() => (props: {}) => JSX.Element | null)\n | (() => Promise<(props: {}) => JSX.Element | null>);\n}>().with({ id: 'core.swappableComponent' });\n\n/**\n * Blueprint for creating swappable components from a SwappableComponentRef and a loader. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const SwappableComponentBlueprint = createExtensionBlueprint({\n kind: 'component',\n attachTo: { id: 'api:app/swappable-components', input: 'components' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n defineParams<Ref extends SwappableComponentRef<any>>(params: {\n component: Ref extends SwappableComponentRef<\n any,\n infer IExternalComponentProps\n >\n ? { ref: Ref } & ((props: IExternalComponentProps) => JSX.Element | null)\n : never;\n loader: Ref extends SwappableComponentRef<infer IInnerComponentProps, any>\n ?\n | (() => (props: IInnerComponentProps) => JSX.Element | null)\n | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>)\n : never;\n }) {\n return createExtensionBlueprintParams(params);\n },\n factory: params => [\n componentDataRef({\n ref: params.component.ref,\n loader: params.loader,\n }),\n ],\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,mBAAmB,sBAAA,EAK7B,CAAE,KAAK,EAAE,EAAA,EAAI,2BAA2B;AAOpC,MAAM,8BAA8B,wBAAA,CAAyB;AAAA,EAClE,IAAA,EAAM,WAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,8BAAA,EAAgC,OAAO,YAAA,EAAa;AAAA,EACpE,MAAA,EAAQ,CAAC,gBAAgB,CAAA;AAAA,EACzB,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,aAAqD,MAAA,EAYlD;AACD,IAAA,OAAO,+BAA+B,MAAM,CAAA;AAAA,EAC9C,CAAA;AAAA,EACA,SAAS,CAAA,MAAA,KAAU;AAAA,IACjB,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,OAAO,SAAA,CAAU,GAAA;AAAA,MACtB,QAAQ,MAAA,CAAO;AAAA,KAChB;AAAA;AAEL,CAAC;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const themeDataRef = createExtensionDataRef().with({
|
|
4
|
+
id: "core.theme.theme"
|
|
5
|
+
});
|
|
6
|
+
const ThemeBlueprint = createExtensionBlueprint({
|
|
7
|
+
kind: "theme",
|
|
8
|
+
attachTo: { id: "api:app/app-theme", input: "themes" },
|
|
9
|
+
output: [themeDataRef],
|
|
10
|
+
dataRefs: {
|
|
11
|
+
theme: themeDataRef
|
|
12
|
+
},
|
|
13
|
+
factory: ({ theme }) => [themeDataRef(theme)]
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { ThemeBlueprint };
|
|
17
|
+
//# sourceMappingURL=ThemeBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeBlueprint.esm.js","sources":["../../src/blueprints/ThemeBlueprint.ts"],"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 { AppTheme } from '@backstage/frontend-plugin-api';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nconst themeDataRef = createExtensionDataRef<AppTheme>().with({\n id: 'core.theme.theme',\n});\n\n/**\n * Creates an extension that adds/replaces an app theme. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const ThemeBlueprint = createExtensionBlueprint({\n kind: 'theme',\n attachTo: { id: 'api:app/app-theme', input: 'themes' },\n output: [themeDataRef],\n dataRefs: {\n theme: themeDataRef,\n },\n factory: ({ theme }: { theme: AppTheme }) => [themeDataRef(theme)],\n});\n"],"names":[],"mappings":";;AAsBA,MAAM,YAAA,GAAe,sBAAA,EAAiC,CAAE,IAAA,CAAK;AAAA,EAC3D,EAAA,EAAI;AACN,CAAC,CAAA;AAOM,MAAM,iBAAiB,wBAAA,CAAyB;AAAA,EACrD,IAAA,EAAM,OAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,mBAAA,EAAqB,OAAO,QAAA,EAAS;AAAA,EACrD,MAAA,EAAQ,CAAC,YAAY,CAAA;AAAA,EACrB,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA,GACT;AAAA,EACA,OAAA,EAAS,CAAC,EAAE,KAAA,OAAiC,CAAC,YAAA,CAAa,KAAK,CAAC;AACnE,CAAC;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const translationDataRef = createExtensionDataRef().with({ id: "core.translation.translation" });
|
|
4
|
+
const TranslationBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "translation",
|
|
6
|
+
attachTo: { id: "api:app/translations", input: "translations" },
|
|
7
|
+
output: [translationDataRef],
|
|
8
|
+
dataRefs: {
|
|
9
|
+
translation: translationDataRef
|
|
10
|
+
},
|
|
11
|
+
factory: ({
|
|
12
|
+
resource
|
|
13
|
+
}) => [translationDataRef(resource)]
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { TranslationBlueprint };
|
|
17
|
+
//# sourceMappingURL=TranslationBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslationBlueprint.esm.js","sources":["../../src/blueprints/TranslationBlueprint.ts"],"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 {\n createExtensionBlueprint,\n createExtensionDataRef,\n TranslationMessages,\n TranslationResource,\n} from '@backstage/frontend-plugin-api';\n\nconst translationDataRef = createExtensionDataRef<\n TranslationResource | TranslationMessages\n>().with({ id: 'core.translation.translation' });\n\n/**\n * Creates an extension that adds translations to your app. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const TranslationBlueprint = createExtensionBlueprint({\n kind: 'translation',\n attachTo: { id: 'api:app/translations', input: 'translations' },\n output: [translationDataRef],\n dataRefs: {\n translation: translationDataRef,\n },\n factory: ({\n resource,\n }: {\n resource: TranslationResource | TranslationMessages;\n }) => [translationDataRef(resource)],\n});\n"],"names":[],"mappings":";;AAuBA,MAAM,qBAAqB,sBAAA,EAEzB,CAAE,KAAK,EAAE,EAAA,EAAI,gCAAgC,CAAA;AAOxC,MAAM,uBAAuB,wBAAA,CAAyB;AAAA,EAC3D,IAAA,EAAM,aAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,sBAAA,EAAwB,OAAO,cAAA,EAAe;AAAA,EAC9D,MAAA,EAAQ,CAAC,kBAAkB,CAAA;AAAA,EAC3B,QAAA,EAAU;AAAA,IACR,WAAA,EAAa;AAAA,GACf;AAAA,EACA,SAAS,CAAC;AAAA,IACR;AAAA,GACF,KAEM,CAAC,kBAAA,CAAmB,QAAQ,CAAC;AACrC,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,76 +1,106 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
1
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { IconComponent, RouteRef, IdentityApi, SwappableComponentRef, AppTheme, TranslationResource, TranslationMessages } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { ReactNode, ComponentType } from 'react';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
|
-
* Creates
|
|
6
|
+
* Creates a extensions that render a React wrapper at the app root, enclosing
|
|
7
|
+
* the app layout. This is useful for example for adding global React contexts
|
|
8
|
+
* and similar. This blueprint is limited to use by the app plugin.
|
|
8
9
|
*
|
|
9
10
|
* @public
|
|
10
11
|
*/
|
|
11
|
-
declare const
|
|
12
|
-
kind: "
|
|
12
|
+
declare const AppRootWrapperBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
13
|
+
kind: "app-root-wrapper";
|
|
13
14
|
params: {
|
|
14
|
-
|
|
15
|
+
/** @deprecated use the `component` parameter instead */
|
|
16
|
+
Component?: [error: "Use the `component` parameter instead"];
|
|
17
|
+
component: (props: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}) => JSX.Element | null;
|
|
15
20
|
};
|
|
16
|
-
output: _backstage_frontend_plugin_api.ExtensionDataRef<
|
|
21
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<(props: {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}) => JSX.Element | null, "app.root.wrapper", {}>;
|
|
17
24
|
inputs: {};
|
|
18
25
|
config: {};
|
|
19
26
|
configInput: {};
|
|
20
27
|
dataRefs: {
|
|
21
|
-
|
|
28
|
+
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(props: {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}) => JSX.Element | null, "app.root.wrapper", {}>;
|
|
22
31
|
};
|
|
23
32
|
}>;
|
|
33
|
+
|
|
24
34
|
/**
|
|
25
|
-
*
|
|
35
|
+
* Creates an extension that adds icon bundles to your app. This blueprint is limited to use by the app plugin.
|
|
26
36
|
*
|
|
27
37
|
* @public
|
|
28
38
|
*/
|
|
29
|
-
declare const
|
|
30
|
-
kind: "
|
|
31
|
-
params:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} & ((props: IExternalComponentProps) => JSX.Element | null) : never;
|
|
35
|
-
loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
|
|
36
|
-
}) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<{
|
|
37
|
-
component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
|
|
38
|
-
ref: Ref;
|
|
39
|
-
} & ((props: IExternalComponentProps) => JSX.Element | null) : never;
|
|
40
|
-
loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
|
|
41
|
-
}>;
|
|
39
|
+
declare const IconBundleBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
40
|
+
kind: "icon-bundle";
|
|
41
|
+
params: {
|
|
42
|
+
icons: { [key in string]: IconComponent; };
|
|
43
|
+
};
|
|
42
44
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, "core.swappableComponent", {}>;
|
|
45
|
+
[x: string]: IconComponent;
|
|
46
|
+
}, "core.icons", {}>;
|
|
46
47
|
inputs: {};
|
|
47
48
|
config: {};
|
|
48
49
|
configInput: {};
|
|
49
50
|
dataRefs: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, "core.swappableComponent", {}>;
|
|
51
|
+
icons: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
52
|
+
[x: string]: IconComponent;
|
|
53
|
+
}, "core.icons", {}>;
|
|
54
54
|
};
|
|
55
55
|
}>;
|
|
56
|
+
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
+
* The props for the {@link NavContentComponent}.
|
|
58
59
|
*
|
|
59
60
|
* @public
|
|
60
61
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
interface NavContentComponentProps {
|
|
63
|
+
/**
|
|
64
|
+
* The nav items available to the component. These are all the items created
|
|
65
|
+
* with the {@link @backstage/frontend-plugin-api#NavItemBlueprint} in the app.
|
|
66
|
+
*
|
|
67
|
+
* In addition to the original properties from the nav items, these also
|
|
68
|
+
* include a resolved route path as `to`, and duplicated `title` as `text` to
|
|
69
|
+
* simplify rendering.
|
|
70
|
+
*/
|
|
71
|
+
items: Array<{
|
|
72
|
+
icon: IconComponent;
|
|
73
|
+
title: string;
|
|
74
|
+
routeRef: RouteRef<undefined>;
|
|
75
|
+
to: string;
|
|
76
|
+
text: string;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A component that renders the nav bar content, to be passed to the {@link NavContentBlueprint}.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
type NavContentComponent = (props: NavContentComponentProps) => JSX.Element | null;
|
|
85
|
+
/**
|
|
86
|
+
* Creates an extension that replaces the entire nav bar with your own component. This blueprint is limited to use by the app plugin.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
declare const NavContentBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
91
|
+
kind: "nav-content";
|
|
63
92
|
params: {
|
|
64
|
-
|
|
93
|
+
component: NavContentComponent;
|
|
65
94
|
};
|
|
66
|
-
output: _backstage_frontend_plugin_api.ExtensionDataRef<
|
|
95
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<NavContentComponent, "core.nav-content.component", {}>;
|
|
67
96
|
inputs: {};
|
|
68
97
|
config: {};
|
|
69
98
|
configInput: {};
|
|
70
99
|
dataRefs: {
|
|
71
|
-
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<
|
|
100
|
+
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<NavContentComponent, "core.nav-content.component", {}>;
|
|
72
101
|
};
|
|
73
102
|
}>;
|
|
103
|
+
|
|
74
104
|
/**
|
|
75
105
|
* Creates an extension that replaces the router component. This blueprint is limited to use by the app plugin.
|
|
76
106
|
*
|
|
@@ -79,61 +109,108 @@ declare const SignInPageBlueprint: _backstage_frontend_plugin_api.ExtensionBluep
|
|
|
79
109
|
declare const RouterBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
80
110
|
kind: "app-router-component";
|
|
81
111
|
params: {
|
|
112
|
+
/** @deprecated use the `component` parameter instead */
|
|
82
113
|
Component?: [error: "Use the `component` parameter instead"];
|
|
83
114
|
component: (props: {
|
|
84
|
-
children:
|
|
115
|
+
children: ReactNode;
|
|
85
116
|
}) => JSX.Element | null;
|
|
86
117
|
};
|
|
87
118
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<(props: {
|
|
88
|
-
children:
|
|
119
|
+
children: ReactNode;
|
|
89
120
|
}) => JSX.Element | null, "app.router.wrapper", {}>;
|
|
90
121
|
inputs: {};
|
|
91
122
|
config: {};
|
|
92
123
|
configInput: {};
|
|
93
124
|
dataRefs: {
|
|
94
125
|
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(props: {
|
|
95
|
-
children:
|
|
126
|
+
children: ReactNode;
|
|
96
127
|
}) => JSX.Element | null, "app.router.wrapper", {}>;
|
|
97
128
|
};
|
|
98
129
|
}>;
|
|
130
|
+
|
|
99
131
|
/**
|
|
100
|
-
*
|
|
132
|
+
* Props for the `SignInPage` component.
|
|
101
133
|
*
|
|
102
134
|
* @public
|
|
103
135
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
136
|
+
type SignInPageProps = {
|
|
137
|
+
/**
|
|
138
|
+
* Set the IdentityApi on successful sign-in. This should only be called once.
|
|
139
|
+
*/
|
|
140
|
+
onSignInSuccess(identityApi: IdentityApi): void;
|
|
141
|
+
/**
|
|
142
|
+
* The children to render.
|
|
143
|
+
*/
|
|
144
|
+
children?: ReactNode;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Creates an extension that replaces the sign in page. This blueprint is limited to use by the app plugin.
|
|
148
|
+
*
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
declare const SignInPageBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
152
|
+
kind: "sign-in-page";
|
|
106
153
|
params: {
|
|
107
|
-
|
|
154
|
+
loader: () => Promise<ComponentType<SignInPageProps>>;
|
|
108
155
|
};
|
|
109
|
-
output: _backstage_frontend_plugin_api.ExtensionDataRef<
|
|
156
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>;
|
|
110
157
|
inputs: {};
|
|
111
158
|
config: {};
|
|
112
159
|
configInput: {};
|
|
113
160
|
dataRefs: {
|
|
114
|
-
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<
|
|
161
|
+
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>;
|
|
115
162
|
};
|
|
116
163
|
}>;
|
|
164
|
+
|
|
117
165
|
/**
|
|
118
|
-
*
|
|
166
|
+
* Blueprint for creating swappable components from a SwappableComponentRef and a loader. This blueprint is limited to use by the app plugin.
|
|
119
167
|
*
|
|
120
168
|
* @public
|
|
121
169
|
*/
|
|
122
|
-
declare const
|
|
123
|
-
kind: "
|
|
170
|
+
declare const SwappableComponentBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
171
|
+
kind: "component";
|
|
172
|
+
params: <Ref extends SwappableComponentRef<any>>(params: {
|
|
173
|
+
component: Ref extends SwappableComponentRef<any, infer IExternalComponentProps> ? {
|
|
174
|
+
ref: Ref;
|
|
175
|
+
} & ((props: IExternalComponentProps) => JSX.Element | null) : never;
|
|
176
|
+
loader: Ref extends SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
|
|
177
|
+
}) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<{
|
|
178
|
+
component: Ref extends SwappableComponentRef<any, infer IExternalComponentProps> ? {
|
|
179
|
+
ref: Ref;
|
|
180
|
+
} & ((props: IExternalComponentProps) => JSX.Element | null) : never;
|
|
181
|
+
loader: Ref extends SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
|
|
182
|
+
}>;
|
|
183
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<{
|
|
184
|
+
ref: SwappableComponentRef;
|
|
185
|
+
loader: (() => (props: {}) => JSX.Element | null) | (() => Promise<(props: {}) => JSX.Element | null>);
|
|
186
|
+
}, "core.swappableComponent", {}>;
|
|
187
|
+
inputs: {};
|
|
188
|
+
config: {};
|
|
189
|
+
configInput: {};
|
|
190
|
+
dataRefs: {
|
|
191
|
+
component: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
192
|
+
ref: SwappableComponentRef;
|
|
193
|
+
loader: (() => (props: {}) => JSX.Element | null) | (() => Promise<(props: {}) => JSX.Element | null>);
|
|
194
|
+
}, "core.swappableComponent", {}>;
|
|
195
|
+
};
|
|
196
|
+
}>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Creates an extension that adds/replaces an app theme. This blueprint is limited to use by the app plugin.
|
|
200
|
+
*
|
|
201
|
+
* @public
|
|
202
|
+
*/
|
|
203
|
+
declare const ThemeBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
204
|
+
kind: "theme";
|
|
124
205
|
params: {
|
|
125
|
-
|
|
206
|
+
theme: AppTheme;
|
|
126
207
|
};
|
|
127
|
-
output: _backstage_frontend_plugin_api.ExtensionDataRef<{
|
|
128
|
-
[x: string]: _backstage_frontend_plugin_api.IconComponent;
|
|
129
|
-
}, "core.icons", {}>;
|
|
208
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<AppTheme, "core.theme.theme", {}>;
|
|
130
209
|
inputs: {};
|
|
131
210
|
config: {};
|
|
132
211
|
configInput: {};
|
|
133
212
|
dataRefs: {
|
|
134
|
-
|
|
135
|
-
[x: string]: _backstage_frontend_plugin_api.IconComponent;
|
|
136
|
-
}, "core.icons", {}>;
|
|
213
|
+
theme: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<AppTheme, "core.theme.theme", {}>;
|
|
137
214
|
};
|
|
138
215
|
}>;
|
|
139
216
|
|
|
@@ -145,19 +222,20 @@ declare const IconBundleBlueprint: _backstage_frontend_plugin_api.ExtensionBluep
|
|
|
145
222
|
declare const TranslationBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
146
223
|
kind: "translation";
|
|
147
224
|
params: {
|
|
148
|
-
resource:
|
|
225
|
+
resource: TranslationResource | TranslationMessages;
|
|
149
226
|
};
|
|
150
|
-
output: _backstage_frontend_plugin_api.ExtensionDataRef<
|
|
227
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
|
|
151
228
|
[x: string]: string;
|
|
152
229
|
}, boolean>, "core.translation.translation", {}>;
|
|
153
230
|
inputs: {};
|
|
154
231
|
config: {};
|
|
155
232
|
configInput: {};
|
|
156
233
|
dataRefs: {
|
|
157
|
-
translation: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<
|
|
234
|
+
translation: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
|
|
158
235
|
[x: string]: string;
|
|
159
236
|
}, boolean>, "core.translation.translation", {}>;
|
|
160
237
|
};
|
|
161
238
|
}>;
|
|
162
239
|
|
|
163
|
-
export { IconBundleBlueprint, NavContentBlueprint, RouterBlueprint, SignInPageBlueprint, SwappableComponentBlueprint, ThemeBlueprint, TranslationBlueprint };
|
|
240
|
+
export { AppRootWrapperBlueprint, IconBundleBlueprint, NavContentBlueprint, RouterBlueprint, SignInPageBlueprint, SwappableComponentBlueprint, ThemeBlueprint, TranslationBlueprint };
|
|
241
|
+
export type { NavContentComponent, NavContentComponentProps, SignInPageProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { AppRootWrapperBlueprint } from './blueprints/AppRootWrapperBlueprint.esm.js';
|
|
2
|
+
export { IconBundleBlueprint } from './blueprints/IconBundleBlueprint.esm.js';
|
|
3
|
+
export { NavContentBlueprint } from './blueprints/NavContentBlueprint.esm.js';
|
|
4
|
+
export { RouterBlueprint } from './blueprints/RouterBlueprint.esm.js';
|
|
5
|
+
export { SignInPageBlueprint } from './blueprints/SignInPageBlueprint.esm.js';
|
|
6
|
+
export { SwappableComponentBlueprint } from './blueprints/SwappableComponentBlueprint.esm.js';
|
|
7
|
+
export { ThemeBlueprint } from './blueprints/ThemeBlueprint.esm.js';
|
|
8
|
+
export { TranslationBlueprint } from './blueprints/TranslationBlueprint.esm.js';
|
|
2
9
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-app-react",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20260127025640",
|
|
4
4
|
"description": "Web library for the app plugin",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"test": "backstage-cli package test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@backstage/core-plugin-api": "0.0.0-nightly-
|
|
43
|
-
"@backstage/frontend-plugin-api": "0.0.0-nightly-
|
|
42
|
+
"@backstage/core-plugin-api": "0.0.0-nightly-20260127025640",
|
|
43
|
+
"@backstage/frontend-plugin-api": "0.0.0-nightly-20260127025640",
|
|
44
44
|
"@material-ui/core": "^4.9.13"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
48
|
-
"@backstage/frontend-test-utils": "0.0.0-nightly-
|
|
49
|
-
"@backstage/test-utils": "0.0.0-nightly-
|
|
47
|
+
"@backstage/cli": "0.0.0-nightly-20260127025640",
|
|
48
|
+
"@backstage/frontend-test-utils": "0.0.0-nightly-20260127025640",
|
|
49
|
+
"@backstage/test-utils": "0.0.0-nightly-20260127025640",
|
|
50
50
|
"@testing-library/jest-dom": "^6.0.0",
|
|
51
51
|
"@testing-library/react": "^16.0.0",
|
|
52
52
|
"@types/react": "^18.0.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ThemeBlueprint as ThemeBlueprint$1, SwappableComponentBlueprint as SwappableComponentBlueprint$1, SignInPageBlueprint as SignInPageBlueprint$1, RouterBlueprint as RouterBlueprint$1, NavContentBlueprint as NavContentBlueprint$1, IconBundleBlueprint as IconBundleBlueprint$1, TranslationBlueprint as TranslationBlueprint$1 } from '@backstage/frontend-plugin-api';
|
|
2
|
-
|
|
3
|
-
const ThemeBlueprint = ThemeBlueprint$1;
|
|
4
|
-
const SwappableComponentBlueprint = SwappableComponentBlueprint$1;
|
|
5
|
-
const SignInPageBlueprint = SignInPageBlueprint$1;
|
|
6
|
-
const RouterBlueprint = RouterBlueprint$1;
|
|
7
|
-
const NavContentBlueprint = NavContentBlueprint$1;
|
|
8
|
-
const IconBundleBlueprint = IconBundleBlueprint$1;
|
|
9
|
-
const TranslationBlueprint = TranslationBlueprint$1;
|
|
10
|
-
|
|
11
|
-
export { IconBundleBlueprint, NavContentBlueprint, RouterBlueprint, SignInPageBlueprint, SwappableComponentBlueprint, ThemeBlueprint, TranslationBlueprint };
|
|
12
|
-
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/blueprints/index.ts"],"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 {\n IconBundleBlueprint as _IconBundleBlueprint,\n NavContentBlueprint as _NavContentBlueprint,\n type NavContentComponent,\n type NavContentComponentProps,\n RouterBlueprint as _RouterBlueprint,\n SignInPageBlueprint as _SignInPageBlueprint,\n type SignInPageProps,\n SwappableComponentBlueprint as _SwappableComponentBlueprint,\n ThemeBlueprint as _ThemeBlueprint,\n TranslationBlueprint as _TranslationBlueprint,\n} from '@backstage/frontend-plugin-api';\n\n/**\n * Creates an extension that adds/replaces an app theme. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const ThemeBlueprint = _ThemeBlueprint;\n\n/**\n * Blueprint for creating swappable components from a SwappableComponentRef and a loader. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const SwappableComponentBlueprint = _SwappableComponentBlueprint;\n\n/**\n * Creates an extension that replaces the sign in page. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const SignInPageBlueprint = _SignInPageBlueprint;\n\n/**\n * Creates an extension that replaces the router component. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const RouterBlueprint = _RouterBlueprint;\n\n/**\n * Creates an extension that replaces the entire nav bar with your own component. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const NavContentBlueprint = _NavContentBlueprint;\n\n/**\n * Creates an extension that adds icon bundles to your app. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const IconBundleBlueprint = _IconBundleBlueprint;\n\n/**\n * Props for the `SignInPage` component.\n *\n * @public\n */\nexport type { SignInPageProps };\n\n/**\n * The props for the {@link NavContentComponent}.\n *\n * @public\n */\nexport type { NavContentComponentProps };\n\n/**\n * A component that renders the nav bar content, to be passed to the {@link NavContentBlueprint}.\n *\n * @public\n */\nexport type { NavContentComponent };\n\n/**\n * Creates an extension that adds translations to your app. This blueprint is limited to use by the app plugin.\n *\n * @public\n */\nexport const TranslationBlueprint = _TranslationBlueprint;\n"],"names":["_ThemeBlueprint","_SwappableComponentBlueprint","_SignInPageBlueprint","_RouterBlueprint","_NavContentBlueprint","_IconBundleBlueprint","_TranslationBlueprint"],"mappings":";;AAkCO,MAAM,cAAA,GAAiBA;AAOvB,MAAM,2BAAA,GAA8BC;AAOpC,MAAM,mBAAA,GAAsBC;AAO5B,MAAM,eAAA,GAAkBC;AAOxB,MAAM,mBAAA,GAAsBC;AAO5B,MAAM,mBAAA,GAAsBC;AA4B5B,MAAM,oBAAA,GAAuBC;;;;"}
|