@backstage/plugin-techdocs 1.1.0-next.3 → 1.1.0

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,93 @@
1
1
  # @backstage/plugin-techdocs
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ace749b785: TechDocs supports a new, experimental method of customization: addons!
8
+
9
+ To customize the standalone TechDocs reader page experience, update your `/packages/app/src/App.tsx` in the following way:
10
+
11
+ ```diff
12
+ import { TechDocsIndexPage, TechDocsReaderPage } from '@backstage/plugin-techdocs';
13
+ + import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
14
+ + import { SomeAddon } from '@backstage/plugin-some-plugin';
15
+
16
+ // ...
17
+
18
+ <Route path="/docs" element={<TechDocsIndexPage />} />
19
+ <Route
20
+ path="/docs/:namespace/:kind/:name/*"
21
+ element={<TechDocsReaderPage />}
22
+ >
23
+ + <TechDocsAddons>
24
+ + <SomeAddon />
25
+ + </TechDocsAddons>
26
+ </Route>
27
+
28
+ // ...
29
+ ```
30
+
31
+ To customize the TechDocs reader experience on the Catalog entity page, update your `packages/app/src/components/catalog/EntityPage.tsx` in the following way:
32
+
33
+ ```diff
34
+ import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
35
+ + import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
36
+ + import { SomeAddon } from '@backstage/plugin-some-plugin';
37
+
38
+ // ...
39
+
40
+ <EntityLayoutWrapper>
41
+ <EntityLayout.Route path="/" title="Overview">
42
+ {overviewContent}
43
+ </EntityLayout.Route>
44
+
45
+ <EntityLayout.Route path="/docs" title="Docs">
46
+ - <EntityTechDocsContent />
47
+ + <EntityTechdocsContent>
48
+ + <TechDocsAddons>
49
+ + <SomeAddon />
50
+ + </TechDocsAddons>
51
+ + </EntityTechdocsContent>
52
+ </EntityLayout.Route>
53
+ </EntityLayoutWrapper>
54
+
55
+ // ...
56
+ ```
57
+
58
+ If you do not wish to customize your TechDocs reader experience in this way at this time, no changes are necessary!
59
+
60
+ ### Patch Changes
61
+
62
+ - ab230a433f: imports from `@backstage/plugin-search-react` instead of `@backstage/plugin-search`
63
+ - 7c7919777e: build(deps-dev): bump `@testing-library/react-hooks` from 7.0.2 to 8.0.0
64
+ - 24254fd433: build(deps): bump `@testing-library/user-event` from 13.5.0 to 14.0.0
65
+ - 230ad0826f: Bump to using `@types/node` v16
66
+ - f0fb9153b7: Fix broken query selectors on techdocs
67
+ - 9975ff9852: Applied the fix from version 1.0.1 of this package, which is part of the v1.0.2 release of Backstage.
68
+ - 3ba256c389: Fixed a bug preventing custom TechDocs reader page implementations from rendering without being double-wrapped in the `<TechDocsReaderPage />` component.
69
+ - fe53fe97d7: Fix permalink scrolling for anchors where the id starts with a number.
70
+ - 0152c0de22: Some documentation layout tweaks:
71
+
72
+ - drawer toggle margins
73
+ - code block margins
74
+ - sidebar drawer width
75
+ - inner content width
76
+ - footer link width
77
+ - sidebar table of contents scroll
78
+
79
+ - 3ba256c389: Fixed a bug that caused addons in the `Subheader` location to break the default TechDocs reader page layout.
80
+ - Updated dependencies
81
+ - @backstage/integration@1.1.0
82
+ - @backstage/plugin-catalog-react@1.0.1
83
+ - @backstage/catalog-model@1.0.1
84
+ - @backstage/core-app-api@1.0.1
85
+ - @backstage/core-components@0.9.3
86
+ - @backstage/core-plugin-api@1.0.1
87
+ - @backstage/plugin-search-react@0.1.0
88
+ - @backstage/plugin-techdocs-react@0.1.0
89
+ - @backstage/integration-react@1.0.1
90
+
3
91
  ## 1.1.0-next.3
4
92
 
5
93
  ### Minor Changes
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import useAsync from 'react-use/lib/useAsync';
3
3
  import { makeStyles } from '@material-ui/core';
4
4
  import { catalogApiRef, CATALOG_FILTER_EXISTS, useEntityOwnership } from '@backstage/plugin-catalog-react';
5
- import { T as TechDocsPageWrapper, D as DocsTable, a as DocsCardGrid } from './index-fba8389b.esm.js';
5
+ import { T as TechDocsPageWrapper, D as DocsTable, a as DocsCardGrid } from './index-cb910cad.esm.js';
6
6
  import { Content, Progress, WarningPanel, CodeSnippet, HeaderTabs, ContentHeader, SupportButton } from '@backstage/core-components';
7
7
  import { useApi } from '@backstage/core-plugin-api';
8
8
  import '@backstage/errors';
@@ -133,4 +133,4 @@ const TechDocsCustomHome = (props) => {
133
133
  };
134
134
 
135
135
  export { TechDocsCustomHome };
136
- //# sourceMappingURL=TechDocsCustomHome-b1e53b51.esm.js.map
136
+ //# sourceMappingURL=TechDocsCustomHome-4046b545.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TechDocsCustomHome-b1e53b51.esm.js","sources":["../../src/home/components/TechDocsCustomHome.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 React, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,MAAM,GAAG;AACf,EAAE,SAAS;AACX,EAAE,YAAY;AACd,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,CAAC;AACrB,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,KAAK;AACP,CAAC,KAAK;AACN,EAAE,MAAM,SAAS,GAAG,UAAU,CAAC;AAC/B,IAAI,cAAc,EAAE;AACpB,MAAM,YAAY,EAAE,MAAM;AAC1B,MAAM,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,GAAG,EAAE;AAC/C,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EA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 {"version":3,"file":"TechDocsCustomHome-4046b545.esm.js","sources":["../../src/home/components/TechDocsCustomHome.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 React, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,MAAM,GAAG;AACf,EAAE,SAAS;AACX,EAAE,YAAY;AACd,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,CAAC;AACrB,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,KAAK;AACP,CAAC,KAAK;AACN,EAAE,MAAM,SAAS,GAAG,UAAU,CAAC;AAC/B,IAAI,cAAc,EAAE;AACpB,MAAM,YAAY,EAAE,MAAM;AAC1B,MAAM,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,GAAG,EAAE;AAC/C,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;AAC9B,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAAG,kBAAkB,EAAE,CAAC;AAC5E,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACzC,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK;AACpD,IAAI,IAAI,MAAM,CAAC,eAAe,KAAK,aAAa,EAAE;AAClD,MAAM,IAAI,gBAAgB,EAAE;AAC5B,QAAQ,OAAO,KAAK,CAAC;A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,CAAC,CAAC,CAAC,CAAC;AACV,GAAG;AACH,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE;AACxH,IAAI,aAAa,EAAE,WAAW;AAC9B,IAAI,QAAQ,EAAE,CAAC,KAAK,KAAK,cAAc,CAAC,KAAK,CAAC;AAC9C,IAAI,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,MAAM;AAChD,MAAM,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE;AAC1B,MAAM,KAAK;AACX,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE;AACnD,IAAI,aAAa,EAAE,kBAAkB;AACrC,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACrG,IAAI,GAAG,EAAE,KAAK;AACd,IAAI,MAAM;AACV,IAAI,QAAQ,EAAE,CAAC,CAAC,QAAQ,GAAG,QAAQ,GAAG,EAAE;AACxC,IAAI,KAAK;AACT,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACR;;;;"}
@@ -1,4 +1,4 @@
1
- export { c as TechDocsReaderLayout, b as TechDocsReaderPage } from './index-fba8389b.esm.js';
1
+ export { c as TechDocsReaderLayout, b as TechDocsReaderPage } from './index-cb910cad.esm.js';
2
2
  import '@backstage/core-plugin-api';
3
3
  import '@backstage/errors';
4
4
  import 'event-source-polyfill';
@@ -37,4 +37,4 @@ import '@material-ui/icons/Share';
37
37
  import '@material-ui/icons/Star';
38
38
  import '@material-ui/icons/StarBorder';
39
39
  import '@backstage/core-app-api';
40
- //# sourceMappingURL=index-7b32409a.esm.js.map
40
+ //# sourceMappingURL=index-64eda4c3.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-64eda4c3.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -154,7 +154,7 @@ class TechDocsStorageClient {
154
154
  }
155
155
  }
156
156
 
157
- const useStyles$3 = makeStyles({
157
+ const useStyles$4 = makeStyles({
158
158
  flexContainer: {
159
159
  flexWrap: "wrap"
160
160
  },
@@ -171,7 +171,7 @@ const TechDocsSearchResultListItem = (props) => {
171
171
  asLink = true,
172
172
  title
173
173
  } = props;
174
- const classes = useStyles$3();
174
+ const classes = useStyles$4();
175
175
  const TextItem = () => {
176
176
  var _a;
177
177
  return /* @__PURE__ */ React.createElement(ListItemText, {
@@ -198,7 +198,7 @@ const TechDocsSearchResultListItem = (props) => {
198
198
  return /* @__PURE__ */ React.createElement(LinkWrapper, null, /* @__PURE__ */ React.createElement(ListItemWrapper, null, /* @__PURE__ */ React.createElement(TextItem, null)));
199
199
  };
200
200
 
201
- const useStyles$2 = makeStyles({
201
+ const useStyles$3 = makeStyles({
202
202
  root: {
203
203
  width: "100%"
204
204
  }
@@ -213,7 +213,7 @@ const TechDocsSearchBar = (props) => {
213
213
  setFilters,
214
214
  result: { loading, value: searchVal }
215
215
  } = useSearch();
216
- const classes = useStyles$2();
216
+ const classes = useStyles$3();
217
217
  const [options, setOptions] = useState([]);
218
218
  useEffect(() => {
219
219
  let mounted = true;
@@ -396,7 +396,7 @@ const TechDocsNotFound = ({ errorMessage }) => {
396
396
  });
397
397
  };
398
398
 
399
- const useStyles$1 = makeStyles((theme) => ({
399
+ const useStyles$2 = makeStyles((theme) => ({
400
400
  root: {
401
401
  marginBottom: theme.spacing(2)
402
402
  },
@@ -407,7 +407,7 @@ const useStyles$1 = makeStyles((theme) => ({
407
407
  }));
408
408
  const TechDocsStateIndicator = () => {
409
409
  let StateAlert = null;
410
- const classes = useStyles$1();
410
+ const classes = useStyles$2();
411
411
  const {
412
412
  state,
413
413
  contentReload,
@@ -1591,7 +1591,7 @@ const useTechDocsReaderDom = (entityRef) => {
1591
1591
  return dom;
1592
1592
  };
1593
1593
 
1594
- const useStyles = makeStyles({
1594
+ const useStyles$1 = makeStyles({
1595
1595
  search: {
1596
1596
  width: "100%",
1597
1597
  "@media (min-width: 76.1875em)": {
@@ -1602,7 +1602,7 @@ const useStyles = makeStyles({
1602
1602
  });
1603
1603
  const TechDocsReaderPageContent = withTechDocsReaderProvider((props) => {
1604
1604
  const { withSearch = true, onReady } = props;
1605
- const classes = useStyles();
1605
+ const classes = useStyles$1();
1606
1606
  const addons = useTechDocsAddons();
1607
1607
  const { entityRef, shadowRoot, setShadowRoot } = useTechDocsReaderPage();
1608
1608
  const dom = useTechDocsReaderDom(entityRef);
@@ -1753,19 +1753,24 @@ const TechDocsReaderPageHeader = (props) => {
1753
1753
  }, /* @__PURE__ */ React.createElement("title", null, tabTitle)), labels, children, addons.renderComponentsByLocation(TechDocsAddonLocations.Header));
1754
1754
  };
1755
1755
 
1756
- const TechDocsReaderPageSubheader = withStyles((theme) => ({
1756
+ const useStyles = makeStyles((theme) => ({
1757
1757
  root: {
1758
1758
  gridArea: "pageSubheader",
1759
1759
  flexDirection: "column",
1760
1760
  minHeight: "auto",
1761
1761
  padding: theme.spacing(3, 3, 0)
1762
1762
  }
1763
- }))(({ toolbarProps }) => {
1763
+ }));
1764
+ const TechDocsReaderPageSubheader = ({
1765
+ toolbarProps
1766
+ }) => {
1767
+ const classes = useStyles();
1764
1768
  const addons = useTechDocsAddons();
1765
1769
  const subheaderAddons = addons.renderComponentsByLocation(TechDocsAddonLocations.Subheader);
1766
1770
  if (!subheaderAddons)
1767
1771
  return null;
1768
1772
  return /* @__PURE__ */ React.createElement(Toolbar, {
1773
+ classes,
1769
1774
  ...toolbarProps
1770
1775
  }, subheaderAddons && /* @__PURE__ */ React.createElement(Box, {
1771
1776
  display: "flex",
@@ -1773,7 +1778,7 @@ const TechDocsReaderPageSubheader = withStyles((theme) => ({
1773
1778
  width: "100%",
1774
1779
  flexWrap: "wrap"
1775
1780
  }, subheaderAddons));
1776
- });
1781
+ };
1777
1782
 
1778
1783
  const TechDocsReaderLayout = ({
1779
1784
  withSearch,
@@ -1796,9 +1801,9 @@ const TechDocsReaderPage$1 = (props) => {
1796
1801
  const { type } = child;
1797
1802
  return !((_b = (_a = type == null ? void 0 : type.__backstage_data) == null ? void 0 : _a.map) == null ? void 0 : _b.get(TECHDOCS_ADDONS_WRAPPER_KEY));
1798
1803
  });
1799
- return page || /* @__PURE__ */ React.createElement(TechDocsReaderPageProvider, {
1804
+ return /* @__PURE__ */ React.createElement(TechDocsReaderPageProvider, {
1800
1805
  entityRef
1801
- }, /* @__PURE__ */ React.createElement(TechDocsReaderLayout, null));
1806
+ }, page || /* @__PURE__ */ React.createElement(TechDocsReaderLayout, null));
1802
1807
  }
1803
1808
  return /* @__PURE__ */ React.createElement(TechDocsReaderPageProvider, {
1804
1809
  entityRef
@@ -2109,7 +2114,7 @@ const EntityTechdocsContent = techdocsPlugin.provide(createRoutableExtension({
2109
2114
  }));
2110
2115
  const TechDocsCustomHome = techdocsPlugin.provide(createRoutableExtension({
2111
2116
  name: "TechDocsCustomHome",
2112
- component: () => import('./TechDocsCustomHome-b1e53b51.esm.js').then((m) => m.TechDocsCustomHome),
2117
+ component: () => import('./TechDocsCustomHome-4046b545.esm.js').then((m) => m.TechDocsCustomHome),
2113
2118
  mountPoint: rootRouteRef
2114
2119
  }));
2115
2120
  const TechDocsIndexPage$2 = techdocsPlugin.provide(createRoutableExtension({
@@ -2119,7 +2124,7 @@ const TechDocsIndexPage$2 = techdocsPlugin.provide(createRoutableExtension({
2119
2124
  }));
2120
2125
  const TechDocsReaderPage = techdocsPlugin.provide(createRoutableExtension({
2121
2126
  name: "TechDocsReaderPage",
2122
- component: () => import('./index-7b32409a.esm.js').then((m) => m.TechDocsReaderPage),
2127
+ component: () => import('./index-64eda4c3.esm.js').then((m) => m.TechDocsReaderPage),
2123
2128
  mountPoint: rootDocsRouteRef
2124
2129
  }));
2125
2130
 
@@ -2182,4 +2187,4 @@ var Router$1 = /*#__PURE__*/Object.freeze({
2182
2187
  });
2183
2188
 
2184
2189
  export { isTechDocsAvailable as A, Router as B, EmbeddedDocsRouter as C, DocsTable as D, EntityTechdocsContent as E, Reader as R, TechDocsPageWrapper as T, DocsCardGrid as a, TechDocsReaderPage$1 as b, TechDocsReaderLayout as c, TechDocsCustomHome as d, TechDocsIndexPage$2 as e, TechdocsPage as f, TechDocsReaderPage as g, techdocsStorageApiRef as h, techdocsApiRef as i, TechDocsClient as j, TechDocsStorageClient as k, TechDocsReaderPageHeader as l, TechDocsReaderPageContent as m, TechDocsReaderProvider as n, useTechDocsReaderDom as o, TechDocsReaderPageSubheader as p, TechDocsStateIndicator as q, TechDocsSearchResultListItem as r, TechDocsSearch as s, techdocsPlugin as t, useTechDocsReader as u, EntityListDocsGrid as v, withTechDocsReaderProvider as w, EntityListDocsTable as x, DefaultTechDocsHome as y, TechDocsPicker as z };
2185
- //# sourceMappingURL=index-fba8389b.esm.js.map
2190
+ //# sourceMappingURL=index-cb910cad.esm.js.map