@backstage/plugin-techdocs 1.3.1-next.0 → 1.3.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 CHANGED
@@ -1,5 +1,45 @@
1
1
  # @backstage/plugin-techdocs
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e924d2d013: Added back reduction in size, this fixes the extremely large TeachDocs headings
8
+ - b86ed4d990: Add highlight to active navigation item and navigation parents.
9
+ - 7a98c73dc8: Fixed techdocs sidebar layout bug for medium devices.
10
+ - 8acb22205c: Scroll techdocs navigation into focus and expand any nested navigation items.
11
+ - Updated dependencies
12
+ - @backstage/integration@1.3.0
13
+ - @backstage/core-components@0.11.0
14
+ - @backstage/core-plugin-api@1.0.5
15
+ - @backstage/plugin-catalog-react@1.1.3
16
+ - @backstage/plugin-techdocs-react@1.0.3
17
+ - @backstage/integration-react@1.1.3
18
+ - @backstage/plugin-search-react@1.0.1
19
+
20
+ ## 1.3.1-next.2
21
+
22
+ ### Patch Changes
23
+
24
+ - 8acb22205c: Scroll techdocs navigation into focus and expand any nested navigation items.
25
+ - Updated dependencies
26
+ - @backstage/plugin-catalog-react@1.1.3-next.2
27
+ - @backstage/core-components@0.11.0-next.2
28
+ - @backstage/integration-react@1.1.3-next.1
29
+ - @backstage/plugin-search-react@1.0.1-next.1
30
+ - @backstage/plugin-techdocs-react@1.0.3-next.2
31
+
32
+ ## 1.3.1-next.1
33
+
34
+ ### Patch Changes
35
+
36
+ - b86ed4d990: Add highlight to active navigation item and navigation parents.
37
+ - Updated dependencies
38
+ - @backstage/core-components@0.10.1-next.1
39
+ - @backstage/integration@1.3.0-next.1
40
+ - @backstage/plugin-techdocs-react@1.0.3-next.1
41
+ - @backstage/plugin-catalog-react@1.1.3-next.1
42
+
3
43
  ## 1.3.1-next.0
4
44
 
5
45
  ### Patch 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-ea5d3c5d.esm.js';
5
+ import { T as TechDocsPageWrapper, D as DocsTable, a as DocsCardGrid } from './index-c64ce4da.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';
@@ -130,4 +130,4 @@ const TechDocsCustomHome = (props) => {
130
130
  };
131
131
 
132
132
  export { TechDocsCustomHome };
133
- //# sourceMappingURL=TechDocsCustomHome-21127c89.esm.js.map
133
+ //# sourceMappingURL=TechDocsCustomHome-6b908d56.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TechDocsCustomHome-21127c89.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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E,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
+ {"version":3,"file":"TechDocsCustomHome-6b908d56.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,GAA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E,yCAAyC;AACtD,KAAK,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACxD,MAAM,QAAQ,EAAE,MAAM;AACtB,MAAM,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE;AAC5B,KAAK,CAAC,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-ea5d3c5d.esm.js';
1
+ export { c as TechDocsReaderLayout, b as TechDocsReaderPage } from './index-c64ce4da.esm.js';
2
2
  import '@backstage/core-plugin-api';
3
3
  import '@backstage/errors';
4
4
  import 'event-source-polyfill';
@@ -34,4 +34,4 @@ import '@material-ui/icons/Share';
34
34
  import '@material-ui/styles';
35
35
  import '@material-ui/icons/Star';
36
36
  import '@material-ui/icons/StarBorder';
37
- //# sourceMappingURL=index-9bfbfb2a.esm.js.map
37
+ //# sourceMappingURL=index-c58b4a4e.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-c58b4a4e.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -916,6 +916,11 @@ var layout = ({ theme, sidebar }) => `
916
916
  height: 20px !important;
917
917
  }
918
918
 
919
+ .md-nav__item--active > .md-nav__link, a.md-nav__link--active {
920
+ text-decoration: underline;
921
+ color: var(--md-typeset-a-color);
922
+ }
923
+
919
924
  .md-main__inner {
920
925
  margin-top: 0;
921
926
  }
@@ -1092,7 +1097,7 @@ ${headings.reduce((style, heading) => {
1092
1097
  const calculate = (value) => {
1093
1098
  let factor = 1;
1094
1099
  if (typeof value === "number") {
1095
- factor = value / htmlFontSize;
1100
+ factor = value / htmlFontSize * 0.6;
1096
1101
  }
1097
1102
  if (typeof value === "string") {
1098
1103
  factor = value.replace("rem", "");
@@ -1551,6 +1556,25 @@ const scrollIntoAnchor = () => {
1551
1556
  };
1552
1557
  };
1553
1558
 
1559
+ const scrollIntoNavigation = () => {
1560
+ return (dom) => {
1561
+ setTimeout(() => {
1562
+ const activeNavItems = dom == null ? void 0 : dom.querySelectorAll(`li.md-nav__item--active`);
1563
+ if (activeNavItems.length !== 0) {
1564
+ activeNavItems.forEach((activeNavItem) => {
1565
+ const checkbox = activeNavItem == null ? void 0 : activeNavItem.querySelector("input");
1566
+ if (!(checkbox == null ? void 0 : checkbox.checked)) {
1567
+ checkbox == null ? void 0 : checkbox.click();
1568
+ }
1569
+ });
1570
+ const lastItem = activeNavItems[activeNavItems.length - 1];
1571
+ lastItem.scrollIntoView();
1572
+ }
1573
+ }, 200);
1574
+ return dom;
1575
+ };
1576
+ };
1577
+
1554
1578
  const transform = async (html, transformers) => {
1555
1579
  let dom;
1556
1580
  if (typeof html === "string") {
@@ -1654,6 +1678,7 @@ const useTechDocsReaderDom = (entityRef) => {
1654
1678
  const postRender = useCallback(
1655
1679
  async (transformedElement) => transform(transformedElement, [
1656
1680
  scrollIntoAnchor(),
1681
+ scrollIntoNavigation(),
1657
1682
  copyToClipboard(theme),
1658
1683
  addLinkClickListener({
1659
1684
  baseUrl: window.location.origin,
@@ -2337,7 +2362,7 @@ const EntityTechdocsContent = techdocsPlugin.provide(
2337
2362
  const TechDocsCustomHome = techdocsPlugin.provide(
2338
2363
  createRoutableExtension({
2339
2364
  name: "TechDocsCustomHome",
2340
- component: () => import('./TechDocsCustomHome-21127c89.esm.js').then(
2365
+ component: () => import('./TechDocsCustomHome-6b908d56.esm.js').then(
2341
2366
  (m) => m.TechDocsCustomHome
2342
2367
  ),
2343
2368
  mountPoint: rootRouteRef
@@ -2355,7 +2380,7 @@ const TechDocsIndexPage$2 = techdocsPlugin.provide(
2355
2380
  const TechDocsReaderPage = techdocsPlugin.provide(
2356
2381
  createRoutableExtension({
2357
2382
  name: "TechDocsReaderPage",
2358
- component: () => import('./index-9bfbfb2a.esm.js').then(
2383
+ component: () => import('./index-c58b4a4e.esm.js').then(
2359
2384
  (m) => m.TechDocsReaderPage
2360
2385
  ),
2361
2386
  mountPoint: rootDocsRouteRef
@@ -2432,4 +2457,4 @@ var Router$1 = /*#__PURE__*/Object.freeze({
2432
2457
  });
2433
2458
 
2434
2459
  export { 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, TechDocsReaderProvider as l, TechDocsReaderPageHeader as m, TechDocsReaderPageContent as n, TechDocsReaderPageSubheader as o, TechDocsSearchResultListItem as p, TechDocsSearch as q, EntityListDocsGrid as r, EntityListDocsTable as s, techdocsPlugin as t, DefaultTechDocsHome as u, TechDocsPicker as v, isTechDocsAvailable as w, Router as x, EmbeddedDocsRouter as y };
2435
- //# sourceMappingURL=index-ea5d3c5d.esm.js.map
2460
+ //# sourceMappingURL=index-c64ce4da.esm.js.map