@backstage/plugin-techdocs-module-addons-contrib 1.0.6 → 1.0.7-next.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,31 @@
1
1
  # @backstage/plugin-techdocs-module-addons-contrib
2
2
 
3
+ ## 1.0.7-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.12.1-next.1
9
+ - @backstage/core-plugin-api@1.1.1-next.1
10
+ - @backstage/integration-react@1.1.7-next.1
11
+ - @backstage/plugin-techdocs-react@1.0.7-next.1
12
+ - @backstage/integration@1.4.1-next.1
13
+ - @backstage/theme@0.2.16
14
+
15
+ ## 1.0.7-next.0
16
+
17
+ ### Patch Changes
18
+
19
+ - 3280711113: Updated dependency `msw` to `^0.49.0`.
20
+ - 8536e7c281: Use `app.title` from `app-config.yaml` when creating new Documentation Feedback issue. `Backstage` is the default value.
21
+ - Updated dependencies
22
+ - @backstage/plugin-techdocs-react@1.0.7-next.0
23
+ - @backstage/core-components@0.12.1-next.0
24
+ - @backstage/core-plugin-api@1.1.1-next.0
25
+ - @backstage/integration-react@1.1.7-next.0
26
+ - @backstage/integration@1.4.1-next.0
27
+ - @backstage/theme@0.2.16
28
+
3
29
  ## 1.0.6
4
30
 
5
31
  ### Patch Changes
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { useApi, createPlugin } from '@backstage/core-plugin-api';
1
+ import { useApi, configApiRef, createPlugin } from '@backstage/core-plugin-api';
2
2
  import { useShadowRootElements, useShadowRootSelection, createTechDocsAddonExtension, TechDocsAddonLocations } from '@backstage/plugin-techdocs-react';
3
3
  import React, { useState, useCallback, useEffect, useMemo } from 'react';
4
4
  import { useLocalStorageValue } from '@react-hookz/web';
@@ -74,11 +74,15 @@ const ExpandableNavigationAddon = () => {
74
74
  expandAllNestedNavs: !(prevState == null ? void 0 : prevState.expandAllNestedNavs)
75
75
  }));
76
76
  };
77
- return /* @__PURE__ */ React.createElement(React.Fragment, null, hasNavSubLevels ? /* @__PURE__ */ React.createElement(StyledButton, {
78
- size: "small",
79
- onClick: handleState,
80
- "aria-label": (expanded == null ? void 0 : expanded.expandAllNestedNavs) ? "collapse-nav" : "expand-nav"
81
- }, (expanded == null ? void 0 : expanded.expandAllNestedNavs) ? /* @__PURE__ */ React.createElement(ExpandedIcon, null) : /* @__PURE__ */ React.createElement(CollapsedIcon, null)) : null);
77
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, hasNavSubLevels ? /* @__PURE__ */ React.createElement(
78
+ StyledButton,
79
+ {
80
+ size: "small",
81
+ onClick: handleState,
82
+ "aria-label": (expanded == null ? void 0 : expanded.expandAllNestedNavs) ? "collapse-nav" : "expand-nav"
83
+ },
84
+ (expanded == null ? void 0 : expanded.expandAllNestedNavs) ? /* @__PURE__ */ React.createElement(ExpandedIcon, null) : /* @__PURE__ */ React.createElement(CollapsedIcon, null)
85
+ ) : null);
82
86
  };
83
87
 
84
88
  const ADDON_FEEDBACK_CONTAINER_ID = "techdocs-report-issue";
@@ -103,14 +107,14 @@ const getTitle = (selection) => {
103
107
  const ellipsis = text.length === 70 ? "..." : "";
104
108
  return `Documentation feedback: ${text}${ellipsis}`;
105
109
  };
106
- const getBody = (selection, markdownUrl) => {
110
+ const getBody = (selection, markdownUrl, appTitle) => {
107
111
  const title = "## Documentation Feedback \u{1F4DD}";
108
112
  const subheading = "#### The highlighted text:";
109
113
  const commentHeading = "#### The comment on the text:";
110
114
  const commentPlaceholder = "_>replace this line with your comment<_";
111
115
  const highlightedTextAsQuote = selection.toString().trim().split("\n").map((line) => `> ${line.trim()}`).join("\n");
112
116
  const facts = [
113
- `Backstage URL: <${window.location.href}>
117
+ `${appTitle} URL: <${window.location.href}>
114
118
  Markdown URL: <${markdownUrl}>`
115
119
  ];
116
120
  return `${title}
@@ -132,6 +136,8 @@ const useGitTemplate = (debounceTime) => {
132
136
  const [editLink] = useShadowRootElements([PAGE_EDIT_LINK_SELECTOR]);
133
137
  const url = (_a = editLink == null ? void 0 : editLink.href) != null ? _a : "";
134
138
  const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
139
+ const configApi = useApi(configApiRef);
140
+ const appTitle = configApi.getOptionalString("app.title") || "Backstage";
135
141
  if (!selection || !url)
136
142
  return initialTemplate;
137
143
  const type = (_b = scmIntegrationsApi.byUrl(url)) == null ? void 0 : _b.type;
@@ -139,7 +145,7 @@ const useGitTemplate = (debounceTime) => {
139
145
  return initialTemplate;
140
146
  return {
141
147
  title: getTitle(selection),
142
- body: getBody(selection, resolveBlobUrl(url, type))
148
+ body: getBody(selection, resolveBlobUrl(url, type), appTitle)
143
149
  };
144
150
  };
145
151
  const useGitRepository = () => {
@@ -195,11 +201,7 @@ const IssueLink = ({ template, repository }) => {
195
201
  const classes = useStyles$2();
196
202
  const Icon = getIcon(repository);
197
203
  const url = getUrl(repository, template);
198
- return /* @__PURE__ */ React.createElement(Link, {
199
- className: classes.root,
200
- to: url,
201
- target: "_blank"
202
- }, /* @__PURE__ */ React.createElement(Icon, null), " Open new ", getName(repository), " issue");
204
+ return /* @__PURE__ */ React.createElement(Link, { className: classes.root, to: url, target: "_blank" }, /* @__PURE__ */ React.createElement(Icon, null), " Open new ", getName(repository), " issue");
203
205
  };
204
206
 
205
207
  const useStyles$1 = makeStyles((theme) => ({
@@ -248,16 +250,21 @@ const ReportIssueAddon = ({
248
250
  feedbackContainer.setAttribute("id", ADDON_FEEDBACK_CONTAINER_ID);
249
251
  mainContent.prepend(feedbackContainer);
250
252
  }
251
- return /* @__PURE__ */ React.createElement(Portal, {
252
- container: feedbackContainer
253
- }, /* @__PURE__ */ React.createElement(Paper, {
254
- "data-testid": "report-issue-addon",
255
- className: classes.root,
256
- style
257
- }, /* @__PURE__ */ React.createElement(IssueLink, {
258
- repository,
259
- template: buildTemplate ? buildTemplate({ selection }) : defaultTemplate
260
- })));
253
+ return /* @__PURE__ */ React.createElement(Portal, { container: feedbackContainer }, /* @__PURE__ */ React.createElement(
254
+ Paper,
255
+ {
256
+ "data-testid": "report-issue-addon",
257
+ className: classes.root,
258
+ style
259
+ },
260
+ /* @__PURE__ */ React.createElement(
261
+ IssueLink,
262
+ {
263
+ repository,
264
+ template: buildTemplate ? buildTemplate({ selection }) : defaultTemplate
265
+ }
266
+ )
267
+ ));
261
268
  };
262
269
 
263
270
  const boxShadow = "0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.13),0 0 0 1px rgba(0,0,0,0.02)";
@@ -393,45 +400,50 @@ const TextSizeAddon = () => {
393
400
  `${htmlFontSize * (value / 100)}px`
394
401
  );
395
402
  }, [body, value, theme]);
396
- return /* @__PURE__ */ React.createElement(MenuItem, {
397
- className: classes.menuItem,
398
- button: true,
399
- disableRipple: true
400
- }, /* @__PURE__ */ React.createElement(ListItemText, {
401
- primary: /* @__PURE__ */ React.createElement(Typography, {
402
- variant: "subtitle2",
403
- color: "textPrimary"
404
- }, "Text size"),
405
- secondary: /* @__PURE__ */ React.createElement(Box, {
406
- className: classes.container
407
- }, /* @__PURE__ */ React.createElement(IconButton, {
408
- className: classes.decreaseButton,
409
- size: "small",
410
- edge: "start",
411
- disabled: value === min,
412
- onClick: handleDecreaseClick,
413
- "aria-label": "Decrease text size"
414
- }, /* @__PURE__ */ React.createElement(RemoveIcon, null)), /* @__PURE__ */ React.createElement(StyledSlider, {
415
- value,
416
- "aria-labelledby": "text-size-slider",
417
- getAriaValueText: getValueText,
418
- valueLabelDisplay: "on",
419
- valueLabelFormat: getValueText,
420
- marks,
421
- step: null,
422
- min,
423
- max,
424
- onChangeCommitted: handleChangeCommitted
425
- }), /* @__PURE__ */ React.createElement(IconButton, {
426
- className: classes.increaseButton,
427
- size: "small",
428
- edge: "end",
429
- disabled: value === max,
430
- onClick: handleIncreaseClick,
431
- "aria-label": "Increase text size"
432
- }, /* @__PURE__ */ React.createElement(AddIcon, null))),
433
- disableTypography: true
434
- }));
403
+ return /* @__PURE__ */ React.createElement(MenuItem, { className: classes.menuItem, button: true, disableRipple: true }, /* @__PURE__ */ React.createElement(
404
+ ListItemText,
405
+ {
406
+ primary: /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2", color: "textPrimary" }, "Text size"),
407
+ secondary: /* @__PURE__ */ React.createElement(Box, { className: classes.container }, /* @__PURE__ */ React.createElement(
408
+ IconButton,
409
+ {
410
+ className: classes.decreaseButton,
411
+ size: "small",
412
+ edge: "start",
413
+ disabled: value === min,
414
+ onClick: handleDecreaseClick,
415
+ "aria-label": "Decrease text size"
416
+ },
417
+ /* @__PURE__ */ React.createElement(RemoveIcon, null)
418
+ ), /* @__PURE__ */ React.createElement(
419
+ StyledSlider,
420
+ {
421
+ value,
422
+ "aria-labelledby": "text-size-slider",
423
+ getAriaValueText: getValueText,
424
+ valueLabelDisplay: "on",
425
+ valueLabelFormat: getValueText,
426
+ marks,
427
+ step: null,
428
+ min,
429
+ max,
430
+ onChangeCommitted: handleChangeCommitted
431
+ }
432
+ ), /* @__PURE__ */ React.createElement(
433
+ IconButton,
434
+ {
435
+ className: classes.increaseButton,
436
+ size: "small",
437
+ edge: "end",
438
+ disabled: value === max,
439
+ onClick: handleIncreaseClick,
440
+ "aria-label": "Increase text size"
441
+ },
442
+ /* @__PURE__ */ React.createElement(AddIcon, null)
443
+ )),
444
+ disableTypography: true
445
+ }
446
+ ));
435
447
  };
436
448
 
437
449
  const techdocsModuleAddonsContribPlugin = createPlugin({
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/ExpandableNavigation/ExpandableNavigation.tsx","../src/ReportIssue/constants.ts","../src/ReportIssue/hooks.ts","../src/ReportIssue/IssueLink.tsx","../src/ReportIssue/ReportIssue.tsx","../src/TextSize/TextSize.tsx","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 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, { useEffect, useCallback, useState } from 'react';\nimport { useLocalStorageValue } from '@react-hookz/web';\nimport { Button, withStyles } from '@material-ui/core';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\n\nimport { useShadowRootElements } from '@backstage/plugin-techdocs-react';\n\nconst NESTED_LIST_TOGGLE = '.md-nav__item--nested .md-toggle';\n\nconst EXPANDABLE_NAVIGATION_LOCAL_STORAGE =\n '@backstage/techdocs-addons/nav-expanded';\n\nconst StyledButton = withStyles({\n root: {\n position: 'absolute',\n left: '220px',\n top: '19px',\n padding: 0,\n minWidth: 0,\n },\n})(Button);\n\nconst CollapsedIcon = withStyles({\n root: {\n height: '20px',\n width: '20px',\n },\n})(ChevronRightIcon);\n\nconst ExpandedIcon = withStyles({\n root: {\n height: '20px',\n width: '20px',\n },\n})(ExpandMoreIcon);\n\ntype expandableNavigationLocalStorage = {\n expandAllNestedNavs: boolean;\n};\n\n/**\n * Show expand/collapse navigation button next to site name in main\n * navigation menu if documentation site has nested navigation.\n */\nexport const ExpandableNavigationAddon = () => {\n const defaultValue = { expandAllNestedNavs: false };\n const [expanded, setExpanded] =\n useLocalStorageValue<expandableNavigationLocalStorage>(\n EXPANDABLE_NAVIGATION_LOCAL_STORAGE,\n defaultValue,\n );\n const [hasNavSubLevels, setHasNavSubLevels] = useState<boolean>(false);\n\n const [...checkboxToggles] = useShadowRootElements<HTMLInputElement>([\n NESTED_LIST_TOGGLE,\n ]);\n\n const shouldToggle = useCallback(\n (item: HTMLInputElement) => {\n const isExpanded = item.checked;\n const shouldExpand = expanded?.expandAllNestedNavs;\n\n // Is collapsed but should expand\n if (shouldExpand && !isExpanded) {\n return true;\n }\n\n // Is expanded but should collapse\n if (!shouldExpand && isExpanded) {\n return true;\n }\n\n return false;\n },\n [expanded],\n );\n\n useEffect(() => {\n // There is no nested navs\n if (!checkboxToggles?.length) return;\n\n setHasNavSubLevels(true);\n checkboxToggles.forEach(item => {\n if (shouldToggle(item)) item.click();\n });\n }, [expanded, shouldToggle, checkboxToggles]);\n\n const handleState = () => {\n setExpanded(prevState => ({\n expandAllNestedNavs: !prevState?.expandAllNestedNavs,\n }));\n };\n\n return (\n <>\n {hasNavSubLevels ? (\n <StyledButton\n size=\"small\"\n onClick={handleState}\n aria-label={\n expanded?.expandAllNestedNavs ? 'collapse-nav' : 'expand-nav'\n }\n >\n {expanded?.expandAllNestedNavs ? <ExpandedIcon /> : <CollapsedIcon />}\n </StyledButton>\n ) : null}\n </>\n );\n};\n","/*\n * Copyright 2022 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\nexport const ADDON_FEEDBACK_CONTAINER_ID = 'techdocs-report-issue';\nexport const ADDON_FEEDBACK_CONTAINER_SELECTOR = `#${ADDON_FEEDBACK_CONTAINER_ID}`;\nexport const PAGE_EDIT_LINK_SELECTOR = '[title^=\"Edit this page\"]';\nexport const PAGE_FEEDBACK_LINK_SELECTOR = '[title^=\"Leave feedback for\"]';\nexport const PAGE_MAIN_CONTENT_SELECTOR =\n '[data-md-component=\"main\"] .md-content';\n","/*\n * Copyright 2022 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 parseGitUrl from 'git-url-parse';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport {\n replaceGithubUrlType,\n replaceGitLabUrlType,\n} from '@backstage/integration';\nimport { scmIntegrationsApiRef } from '@backstage/integration-react';\nimport {\n useShadowRootElements,\n useShadowRootSelection,\n} from '@backstage/plugin-techdocs-react';\n\nimport { PAGE_EDIT_LINK_SELECTOR } from './constants';\n\nconst resolveBlobUrl = (url: string, type: string) => {\n if (type === 'github') {\n return replaceGithubUrlType(url, 'blob');\n } else if (type === 'gitlab') {\n return replaceGitLabUrlType(url, 'blob');\n }\n // eslint-disable-next-line no-console\n console.error(\n `Invalid SCM type ${type} found in ReportIssue addon for URL ${url}!`,\n );\n return url;\n};\n\nexport const getTitle = (selection: Selection) => {\n const text = selection.toString().substring(0, 70);\n const ellipsis = text.length === 70 ? '...' : '';\n return `Documentation feedback: ${text}${ellipsis}`;\n};\n\nexport const getBody = (selection: Selection, markdownUrl: string) => {\n const title = '## Documentation Feedback 📝';\n const subheading = '#### The highlighted text:';\n const commentHeading = '#### The comment on the text:';\n const commentPlaceholder = '_>replace this line with your comment<_';\n const highlightedTextAsQuote = selection\n .toString()\n .trim()\n .split('\\n')\n .map(line => `> ${line.trim()}`)\n .join('\\n');\n\n const facts = [\n `Backstage URL: <${window.location.href}> \\nMarkdown URL: <${markdownUrl}>`,\n ];\n\n return `${title}\\n\\n ${subheading} \\n\\n ${highlightedTextAsQuote}\\n\\n ${commentHeading} \\n ${commentPlaceholder}\\n\\n ___\\n${facts}`;\n};\n\nexport const useGitTemplate = (debounceTime?: number) => {\n const initialTemplate = { title: '', body: '' };\n const selection = useShadowRootSelection(debounceTime);\n const [editLink] = useShadowRootElements([PAGE_EDIT_LINK_SELECTOR]);\n const url = (editLink as HTMLAnchorElement)?.href ?? '';\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n\n if (!selection || !url) return initialTemplate;\n\n const type = scmIntegrationsApi.byUrl(url)?.type;\n\n if (!type) return initialTemplate;\n\n return {\n title: getTitle(selection),\n body: getBody(selection, resolveBlobUrl(url, type)),\n };\n};\n\nexport const useGitRepository = () => {\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n\n const [editLink] = useShadowRootElements([PAGE_EDIT_LINK_SELECTOR]);\n const url = (editLink as HTMLAnchorElement)?.href ?? '';\n\n if (!url) return null;\n\n const type = scmIntegrationsApi.byUrl(url)?.type;\n\n if (!type) return null;\n\n return { ...parseGitUrl(resolveBlobUrl(url, type)), type };\n};\n","/*\n * Copyright 2022 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 from 'react';\n\nimport { makeStyles } from '@material-ui/core';\nimport BugReportIcon from '@material-ui/icons/BugReport';\n\nimport { Link, GitHubIcon } from '@backstage/core-components';\n\nimport { ReportIssueTemplate, Repository } from './types';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'grid',\n gridGap: theme.spacing(1),\n gridAutoFlow: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n color: theme.palette.common.black,\n fontSize: theme.typography.button.fontSize,\n },\n}));\n\ntype IssueLinkProps = {\n template: ReportIssueTemplate;\n repository: Repository;\n};\n\nconst getIcon = ({ type }: Repository) => {\n if (type === 'github') {\n return GitHubIcon;\n }\n return BugReportIcon;\n};\n\nconst getName = ({ type }: Repository) => {\n if (type === 'github') {\n return 'Github';\n }\n return 'Gitlab';\n};\n\nconst getUrl = (repository: Repository, template: ReportIssueTemplate) => {\n const { title, body } = template;\n const encodedTitle = encodeURIComponent(title);\n const encodedBody = encodeURIComponent(body);\n const { protocol, resource, owner, name, type } = repository;\n const encodedOwner = encodeURIComponent(owner);\n const encodedName = encodeURIComponent(name);\n\n const url = `${protocol}://${resource}/${encodedOwner}/${encodedName}`;\n if (type === 'github') {\n return `${url}/issues/new?title=${encodedTitle}&body=${encodedBody}`;\n }\n return `${url}/issues/new?issue[title]=${encodedTitle}&issue[description]=${encodedBody}`;\n};\n\nexport const IssueLink = ({ template, repository }: IssueLinkProps) => {\n const classes = useStyles();\n\n const Icon = getIcon(repository);\n const url = getUrl(repository, template);\n\n return (\n <Link className={classes.root} to={url} target=\"_blank\">\n <Icon /> Open new {getName(repository)} issue\n </Link>\n );\n};\n","/*\n * Copyright 2022 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, useEffect } from 'react';\n\nimport { makeStyles, Portal, Paper } from '@material-ui/core';\n\nimport { useGitTemplate, useGitRepository } from './hooks';\nimport { ReportIssueTemplateBuilder } from './types';\nimport {\n PAGE_MAIN_CONTENT_SELECTOR,\n PAGE_FEEDBACK_LINK_SELECTOR,\n ADDON_FEEDBACK_CONTAINER_ID,\n ADDON_FEEDBACK_CONTAINER_SELECTOR,\n} from './constants';\nimport { IssueLink } from './IssueLink';\n\nimport {\n useShadowRootElements,\n useShadowRootSelection,\n} from '@backstage/plugin-techdocs-react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n transform: 'translate(-100%, -100%)',\n position: 'absolute',\n padding: theme.spacing(1),\n zIndex: theme.zIndex.tooltip,\n background: theme.palette.common.white,\n },\n}));\n\ntype Style = {\n top: string;\n left: string;\n};\n\n/**\n * Props customizing the <ReportIssue /> Addon.\n *\n * @public\n */\nexport type ReportIssueProps = {\n /**\n * Number of milliseconds after a user highlights some text before the report\n * issue link appears above the highlighted text. Defaults to 500ms.\n */\n debounceTime?: number;\n\n /**\n * An optional function defining how a custom issue title and body should be\n * constructed, given some selected text.\n */\n templateBuilder?: ReportIssueTemplateBuilder;\n};\n\n/**\n * Show report issue button when text is highlighted\n */\nexport const ReportIssueAddon = ({\n debounceTime = 500,\n templateBuilder: buildTemplate,\n}: ReportIssueProps) => {\n const classes = useStyles();\n const [style, setStyle] = useState<Style>();\n\n const repository = useGitRepository();\n\n const defaultTemplate = useGitTemplate(debounceTime);\n\n const selection = useShadowRootSelection(debounceTime);\n\n const [mainContent, feedbackLink] = useShadowRootElements([\n PAGE_MAIN_CONTENT_SELECTOR,\n PAGE_FEEDBACK_LINK_SELECTOR,\n ]);\n\n let [feedbackContainer] = useShadowRootElements([\n ADDON_FEEDBACK_CONTAINER_SELECTOR,\n ]);\n\n if (feedbackLink) {\n feedbackLink.style.display = 'none';\n }\n\n // calculates the position of the selected text to be able to set the position of the addon\n useEffect(() => {\n if (\n // todo(backstage/techdocs-core) handle non-repo rendering\n !repository ||\n !selection ||\n !selection.containsNode(mainContent!, true) ||\n selection?.containsNode(feedbackContainer!, true)\n ) {\n return;\n }\n\n const mainContentPosition = mainContent!.getBoundingClientRect();\n const selectionPosition = selection.getRangeAt(0).getBoundingClientRect();\n\n setStyle({\n top: `${selectionPosition.top - mainContentPosition.top - 16}px`,\n left: `${selectionPosition.left + selectionPosition.width / 2}px`,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selection, mainContent, feedbackContainer]);\n\n if (\n !selection ||\n !repository ||\n !['github', 'gitlab'].includes(repository.type)\n )\n return null;\n\n if (!feedbackContainer) {\n feedbackContainer = document.createElement('div');\n feedbackContainer.setAttribute('id', ADDON_FEEDBACK_CONTAINER_ID);\n mainContent!.prepend(feedbackContainer);\n }\n\n return (\n <Portal container={feedbackContainer}>\n <Paper\n data-testid=\"report-issue-addon\"\n className={classes.root}\n style={style}\n >\n <IssueLink\n repository={repository}\n template={\n buildTemplate ? buildTemplate({ selection }) : defaultTemplate\n }\n />\n </Paper>\n </Portal>\n );\n};\n","/*\n * Copyright 2022 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, {\n ChangeEvent,\n MouseEvent,\n useMemo,\n useState,\n useEffect,\n useCallback,\n} from 'react';\n\nimport {\n withStyles,\n makeStyles,\n useTheme,\n Box,\n MenuItem,\n ListItemText,\n Slider,\n IconButton,\n Typography,\n} from '@material-ui/core';\nimport AddIcon from '@material-ui/icons/Add';\nimport RemoveIcon from '@material-ui/icons/Remove';\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { useShadowRootElements } from '@backstage/plugin-techdocs-react';\n\nconst boxShadow =\n '0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.13),0 0 0 1px rgba(0,0,0,0.02)';\n\nconst StyledSlider = withStyles(theme => ({\n root: {\n height: 2,\n padding: '15px 0',\n },\n thumb: {\n height: 18,\n width: 18,\n backgroundColor: theme.palette.common.white,\n boxShadow: boxShadow,\n marginTop: -9,\n marginLeft: -9,\n '&:focus, &:hover, &$active': {\n boxShadow:\n '0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.3),0 0 0 1px rgba(0,0,0,0.02)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: boxShadow,\n },\n },\n },\n active: {},\n valueLabel: {\n top: '100%',\n left: '50%',\n transform: 'scale(1) translate(-50%, -5px) !important',\n '& *': {\n color: theme.palette.common.black,\n fontSize: theme.typography.caption.fontSize,\n background: 'transparent',\n },\n },\n track: {\n height: 2,\n },\n rail: {\n height: 2,\n opacity: 0.5,\n },\n mark: {\n height: 10,\n width: 1,\n marginTop: -4,\n },\n markActive: {\n opacity: 1,\n backgroundColor: 'currentColor',\n },\n}))(Slider);\n\nconst settings = {\n key: 'techdocs.addons.settings.textsize',\n defaultValue: 100,\n};\n\nconst marks = [\n {\n value: 90,\n },\n {\n value: 100,\n },\n {\n value: 115,\n },\n {\n value: 130,\n },\n {\n value: 150,\n },\n];\n\nconst useStyles = makeStyles((theme: BackstageTheme) => ({\n container: {\n color: theme.palette.textSubtle,\n display: 'flex',\n alignItems: 'center',\n margin: 0,\n minWidth: 200,\n },\n menuItem: {\n '&:hover': {\n background: 'transparent',\n },\n },\n decreaseButton: {\n marginRight: theme.spacing(1),\n },\n increaseButton: {\n marginLeft: theme.spacing(1),\n },\n}));\n\nexport const TextSizeAddon = () => {\n const classes = useStyles();\n const theme = useTheme<BackstageTheme>();\n const [body] = useShadowRootElements(['body']);\n\n const [value, setValue] = useState<number>(() => {\n const initialValue = localStorage?.getItem(settings.key);\n return initialValue ? parseInt(initialValue, 10) : settings.defaultValue;\n });\n\n const values = useMemo(() => marks.map(mark => mark.value), []);\n const index = useMemo(() => values.indexOf(value), [values, value]);\n const min = useMemo(() => values[0], [values]);\n const max = useMemo(() => values[values.length - 1], [values]);\n\n const getValueText = useCallback(() => `${value}%`, [value]);\n\n const handleChangeCommitted = useCallback(\n (_event: ChangeEvent<{}>, newValue: number | number[]) => {\n if (!Array.isArray(newValue)) {\n setValue(newValue);\n localStorage?.setItem(settings.key, String(newValue));\n }\n },\n [setValue],\n );\n\n const handleDecreaseClick = useCallback(\n (event: MouseEvent) => {\n handleChangeCommitted(event, values[index - 1]);\n },\n [index, values, handleChangeCommitted],\n );\n\n const handleIncreaseClick = useCallback(\n (event: MouseEvent) => {\n handleChangeCommitted(event, values[index + 1]);\n },\n [index, values, handleChangeCommitted],\n );\n\n useEffect(() => {\n if (!body) return;\n const htmlFontSize =\n (\n theme.typography as BackstageTheme['typography'] & {\n htmlFontSize?: number;\n }\n )?.htmlFontSize ?? 16;\n body.style.setProperty(\n '--md-typeset-font-size',\n `${htmlFontSize * (value / 100)}px`,\n );\n }, [body, value, theme]);\n\n return (\n <MenuItem className={classes.menuItem} button disableRipple>\n <ListItemText\n primary={\n <Typography variant=\"subtitle2\" color=\"textPrimary\">\n Text size\n </Typography>\n }\n secondary={\n <Box className={classes.container}>\n <IconButton\n className={classes.decreaseButton}\n size=\"small\"\n edge=\"start\"\n disabled={value === min}\n onClick={handleDecreaseClick}\n aria-label=\"Decrease text size\"\n >\n <RemoveIcon />\n </IconButton>\n <StyledSlider\n value={value}\n aria-labelledby=\"text-size-slider\"\n getAriaValueText={getValueText}\n valueLabelDisplay=\"on\"\n valueLabelFormat={getValueText}\n marks={marks}\n step={null}\n min={min}\n max={max}\n onChangeCommitted={handleChangeCommitted}\n />\n <IconButton\n className={classes.increaseButton}\n size=\"small\"\n edge=\"end\"\n disabled={value === max}\n onClick={handleIncreaseClick}\n aria-label=\"Increase text size\"\n >\n <AddIcon />\n </IconButton>\n </Box>\n }\n disableTypography\n />\n </MenuItem>\n );\n};\n","/*\n * Copyright 2022 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 { createPlugin } from '@backstage/core-plugin-api';\nimport {\n createTechDocsAddonExtension,\n TechDocsAddonLocations,\n} from '@backstage/plugin-techdocs-react';\nimport { ExpandableNavigationAddon } from './ExpandableNavigation';\nimport { ReportIssueAddon, ReportIssueProps } from './ReportIssue';\nimport { TextSizeAddon } from './TextSize';\n\n/**\n * The TechDocs addons contrib plugin\n *\n * @public\n */\n\nexport const techdocsModuleAddonsContribPlugin = createPlugin({\n id: 'techdocsModuleAddonsContrib',\n});\n\n/**\n * TechDocs addon that lets you expand/collapse the TechDocs main navigation\n * and keep the preferred state in local storage. The addon will render as\n * a button next to the site name if the documentation has nested navigation.\n *\n * @example\n * Here's a simple example:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react/alpha';\n * import { ExpandableNavigation } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <ExpandableNavigation />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * };\n * ```\n *\n * @public\n */\n\nexport const ExpandableNavigation = techdocsModuleAddonsContribPlugin.provide(\n createTechDocsAddonExtension({\n name: 'ExpandableNavigation',\n location: TechDocsAddonLocations.PrimarySidebar,\n component: ExpandableNavigationAddon,\n }),\n);\n\n/**\n * TechDocs addon that lets you select text and open GitHub/Gitlab issues\n *\n * @remarks\n * Before using it, you should set up an `edit_uri` for your pages as explained {@link https://backstage.io/docs/features/techdocs/faqs#is-it-possible-for-users-to-suggest-changes-or-provide-feedback-on-a-techdocs-page | here} and remember, it only works for Github or Gitlab.\n *\n * @example\n * Here's a simple example:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react';\n * import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <ReportIssue />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * };\n * ```\n *\n * @example\n * Here's an example with `debounceTime` and `templateBuilder` props:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react';\n * import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n * const templateBuilder = ({ selection }: ReportIssueTemplateBuilder) => (({\n * title: 'Custom issue title',\n * body: `Custom issue body: ${selection.toString()}`\n * }))\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <ReportIssue debounceTime={300} templateBuilder={templateBuilder} />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * ```\n * @param props - Object that can optionally contain `debounceTime` and `templateBuilder` properties.\n * @public\n */\nexport const ReportIssue = techdocsModuleAddonsContribPlugin.provide(\n createTechDocsAddonExtension<ReportIssueProps>({\n name: 'ReportIssue',\n location: TechDocsAddonLocations.Content,\n component: ReportIssueAddon,\n }),\n);\n\n/**\n * This TechDocs addon allows users to customize text size on documentation pages, they can select how much they want to increase or decrease the font size via slider or buttons.\n *\n * @remarks\n * The default value for the font size is 100% of the HTML font size, if the theme does not have a `htmlFontSize` in its typography object, the addon will assume 16px as 100%, and remember, this setting is kept in the browser local storage.\n *\n * @example\n * Here's a simple example:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react';\n * import { TextSize } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <TextSize />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * };\n * ```\n *\n * @public\n */\nexport const TextSize = techdocsModuleAddonsContribPlugin.provide(\n createTechDocsAddonExtension({\n name: 'TextSize',\n location: TechDocsAddonLocations.Settings,\n component: TextSizeAddon,\n }),\n);\n"],"names":["useStyles"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAM,kBAAqB,GAAA,kCAAA,CAAA;AAE3B,MAAM,mCACJ,GAAA,yCAAA,CAAA;AAEF,MAAM,eAAe,UAAW,CAAA;AAAA,EAC9B,IAAM,EAAA;AAAA,IACJ,QAAU,EAAA,UAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,GAAK,EAAA,MAAA;AAAA,IACL,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,CAAA;AAAA,GACZ;AACF,CAAC,EAAE,MAAM,CAAA,CAAA;AAET,MAAM,gBAAgB,UAAW,CAAA;AAAA,EAC/B,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,MAAA;AAAA,IACR,KAAO,EAAA,MAAA;AAAA,GACT;AACF,CAAC,EAAE,gBAAgB,CAAA,CAAA;AAEnB,MAAM,eAAe,UAAW,CAA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AAM,WAAW,iCAAkC,CAAA,OAAA;AAAA,EACxD,4BAA6B,CAAA;AAAA,IAC3B,IAAM,EAAA,UAAA;AAAA,IACN,UAAU,sBAAuB,CAAA,QAAA;AAAA,IACjC,SAAW,EAAA,aAAA;AAAA,GACZ,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/ExpandableNavigation/ExpandableNavigation.tsx","../src/ReportIssue/constants.ts","../src/ReportIssue/hooks.ts","../src/ReportIssue/IssueLink.tsx","../src/ReportIssue/ReportIssue.tsx","../src/TextSize/TextSize.tsx","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 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, { useEffect, useCallback, useState } from 'react';\nimport { useLocalStorageValue } from '@react-hookz/web';\nimport { Button, withStyles } from '@material-ui/core';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\n\nimport { useShadowRootElements } from '@backstage/plugin-techdocs-react';\n\nconst NESTED_LIST_TOGGLE = '.md-nav__item--nested .md-toggle';\n\nconst EXPANDABLE_NAVIGATION_LOCAL_STORAGE =\n '@backstage/techdocs-addons/nav-expanded';\n\nconst StyledButton = withStyles({\n root: {\n position: 'absolute',\n left: '220px',\n top: '19px',\n padding: 0,\n minWidth: 0,\n },\n})(Button);\n\nconst CollapsedIcon = withStyles({\n root: {\n height: '20px',\n width: '20px',\n },\n})(ChevronRightIcon);\n\nconst ExpandedIcon = withStyles({\n root: {\n height: '20px',\n width: '20px',\n },\n})(ExpandMoreIcon);\n\ntype expandableNavigationLocalStorage = {\n expandAllNestedNavs: boolean;\n};\n\n/**\n * Show expand/collapse navigation button next to site name in main\n * navigation menu if documentation site has nested navigation.\n */\nexport const ExpandableNavigationAddon = () => {\n const defaultValue = { expandAllNestedNavs: false };\n const [expanded, setExpanded] =\n useLocalStorageValue<expandableNavigationLocalStorage>(\n EXPANDABLE_NAVIGATION_LOCAL_STORAGE,\n defaultValue,\n );\n const [hasNavSubLevels, setHasNavSubLevels] = useState<boolean>(false);\n\n const [...checkboxToggles] = useShadowRootElements<HTMLInputElement>([\n NESTED_LIST_TOGGLE,\n ]);\n\n const shouldToggle = useCallback(\n (item: HTMLInputElement) => {\n const isExpanded = item.checked;\n const shouldExpand = expanded?.expandAllNestedNavs;\n\n // Is collapsed but should expand\n if (shouldExpand && !isExpanded) {\n return true;\n }\n\n // Is expanded but should collapse\n if (!shouldExpand && isExpanded) {\n return true;\n }\n\n return false;\n },\n [expanded],\n );\n\n useEffect(() => {\n // There is no nested navs\n if (!checkboxToggles?.length) return;\n\n setHasNavSubLevels(true);\n checkboxToggles.forEach(item => {\n if (shouldToggle(item)) item.click();\n });\n }, [expanded, shouldToggle, checkboxToggles]);\n\n const handleState = () => {\n setExpanded(prevState => ({\n expandAllNestedNavs: !prevState?.expandAllNestedNavs,\n }));\n };\n\n return (\n <>\n {hasNavSubLevels ? (\n <StyledButton\n size=\"small\"\n onClick={handleState}\n aria-label={\n expanded?.expandAllNestedNavs ? 'collapse-nav' : 'expand-nav'\n }\n >\n {expanded?.expandAllNestedNavs ? <ExpandedIcon /> : <CollapsedIcon />}\n </StyledButton>\n ) : null}\n </>\n );\n};\n","/*\n * Copyright 2022 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\nexport const ADDON_FEEDBACK_CONTAINER_ID = 'techdocs-report-issue';\nexport const ADDON_FEEDBACK_CONTAINER_SELECTOR = `#${ADDON_FEEDBACK_CONTAINER_ID}`;\nexport const PAGE_EDIT_LINK_SELECTOR = '[title^=\"Edit this page\"]';\nexport const PAGE_FEEDBACK_LINK_SELECTOR = '[title^=\"Leave feedback for\"]';\nexport const PAGE_MAIN_CONTENT_SELECTOR =\n '[data-md-component=\"main\"] .md-content';\n","/*\n * Copyright 2022 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 parseGitUrl from 'git-url-parse';\n\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport {\n replaceGithubUrlType,\n replaceGitLabUrlType,\n} from '@backstage/integration';\nimport { scmIntegrationsApiRef } from '@backstage/integration-react';\nimport {\n useShadowRootElements,\n useShadowRootSelection,\n} from '@backstage/plugin-techdocs-react';\n\nimport { PAGE_EDIT_LINK_SELECTOR } from './constants';\n\nconst resolveBlobUrl = (url: string, type: string) => {\n if (type === 'github') {\n return replaceGithubUrlType(url, 'blob');\n } else if (type === 'gitlab') {\n return replaceGitLabUrlType(url, 'blob');\n }\n // eslint-disable-next-line no-console\n console.error(\n `Invalid SCM type ${type} found in ReportIssue addon for URL ${url}!`,\n );\n return url;\n};\n\nexport const getTitle = (selection: Selection) => {\n const text = selection.toString().substring(0, 70);\n const ellipsis = text.length === 70 ? '...' : '';\n return `Documentation feedback: ${text}${ellipsis}`;\n};\n\nexport const getBody = (\n selection: Selection,\n markdownUrl: string,\n appTitle: string,\n) => {\n const title = '## Documentation Feedback 📝';\n const subheading = '#### The highlighted text:';\n const commentHeading = '#### The comment on the text:';\n const commentPlaceholder = '_>replace this line with your comment<_';\n const highlightedTextAsQuote = selection\n .toString()\n .trim()\n .split('\\n')\n .map(line => `> ${line.trim()}`)\n .join('\\n');\n\n const facts = [\n `${appTitle} URL: <${window.location.href}> \\nMarkdown URL: <${markdownUrl}>`,\n ];\n\n return `${title}\\n\\n ${subheading} \\n\\n ${highlightedTextAsQuote}\\n\\n ${commentHeading} \\n ${commentPlaceholder}\\n\\n ___\\n${facts}`;\n};\n\nexport const useGitTemplate = (debounceTime?: number) => {\n const initialTemplate = { title: '', body: '' };\n const selection = useShadowRootSelection(debounceTime);\n const [editLink] = useShadowRootElements([PAGE_EDIT_LINK_SELECTOR]);\n const url = (editLink as HTMLAnchorElement)?.href ?? '';\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n const configApi = useApi(configApiRef);\n const appTitle = configApi.getOptionalString('app.title') || 'Backstage';\n if (!selection || !url) return initialTemplate;\n\n const type = scmIntegrationsApi.byUrl(url)?.type;\n\n if (!type) return initialTemplate;\n\n return {\n title: getTitle(selection),\n body: getBody(selection, resolveBlobUrl(url, type), appTitle),\n };\n};\n\nexport const useGitRepository = () => {\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n\n const [editLink] = useShadowRootElements([PAGE_EDIT_LINK_SELECTOR]);\n const url = (editLink as HTMLAnchorElement)?.href ?? '';\n\n if (!url) return null;\n\n const type = scmIntegrationsApi.byUrl(url)?.type;\n\n if (!type) return null;\n\n return { ...parseGitUrl(resolveBlobUrl(url, type)), type };\n};\n","/*\n * Copyright 2022 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 from 'react';\n\nimport { makeStyles } from '@material-ui/core';\nimport BugReportIcon from '@material-ui/icons/BugReport';\n\nimport { Link, GitHubIcon } from '@backstage/core-components';\n\nimport { ReportIssueTemplate, Repository } from './types';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'grid',\n gridGap: theme.spacing(1),\n gridAutoFlow: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n color: theme.palette.common.black,\n fontSize: theme.typography.button.fontSize,\n },\n}));\n\ntype IssueLinkProps = {\n template: ReportIssueTemplate;\n repository: Repository;\n};\n\nconst getIcon = ({ type }: Repository) => {\n if (type === 'github') {\n return GitHubIcon;\n }\n return BugReportIcon;\n};\n\nconst getName = ({ type }: Repository) => {\n if (type === 'github') {\n return 'Github';\n }\n return 'Gitlab';\n};\n\nconst getUrl = (repository: Repository, template: ReportIssueTemplate) => {\n const { title, body } = template;\n const encodedTitle = encodeURIComponent(title);\n const encodedBody = encodeURIComponent(body);\n const { protocol, resource, owner, name, type } = repository;\n const encodedOwner = encodeURIComponent(owner);\n const encodedName = encodeURIComponent(name);\n\n const url = `${protocol}://${resource}/${encodedOwner}/${encodedName}`;\n if (type === 'github') {\n return `${url}/issues/new?title=${encodedTitle}&body=${encodedBody}`;\n }\n return `${url}/issues/new?issue[title]=${encodedTitle}&issue[description]=${encodedBody}`;\n};\n\nexport const IssueLink = ({ template, repository }: IssueLinkProps) => {\n const classes = useStyles();\n\n const Icon = getIcon(repository);\n const url = getUrl(repository, template);\n\n return (\n <Link className={classes.root} to={url} target=\"_blank\">\n <Icon /> Open new {getName(repository)} issue\n </Link>\n );\n};\n","/*\n * Copyright 2022 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, useEffect } from 'react';\n\nimport { makeStyles, Portal, Paper } from '@material-ui/core';\n\nimport { useGitTemplate, useGitRepository } from './hooks';\nimport { ReportIssueTemplateBuilder } from './types';\nimport {\n PAGE_MAIN_CONTENT_SELECTOR,\n PAGE_FEEDBACK_LINK_SELECTOR,\n ADDON_FEEDBACK_CONTAINER_ID,\n ADDON_FEEDBACK_CONTAINER_SELECTOR,\n} from './constants';\nimport { IssueLink } from './IssueLink';\n\nimport {\n useShadowRootElements,\n useShadowRootSelection,\n} from '@backstage/plugin-techdocs-react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n transform: 'translate(-100%, -100%)',\n position: 'absolute',\n padding: theme.spacing(1),\n zIndex: theme.zIndex.tooltip,\n background: theme.palette.common.white,\n },\n}));\n\ntype Style = {\n top: string;\n left: string;\n};\n\n/**\n * Props customizing the <ReportIssue /> Addon.\n *\n * @public\n */\nexport type ReportIssueProps = {\n /**\n * Number of milliseconds after a user highlights some text before the report\n * issue link appears above the highlighted text. Defaults to 500ms.\n */\n debounceTime?: number;\n\n /**\n * An optional function defining how a custom issue title and body should be\n * constructed, given some selected text.\n */\n templateBuilder?: ReportIssueTemplateBuilder;\n};\n\n/**\n * Show report issue button when text is highlighted\n */\nexport const ReportIssueAddon = ({\n debounceTime = 500,\n templateBuilder: buildTemplate,\n}: ReportIssueProps) => {\n const classes = useStyles();\n const [style, setStyle] = useState<Style>();\n\n const repository = useGitRepository();\n\n const defaultTemplate = useGitTemplate(debounceTime);\n\n const selection = useShadowRootSelection(debounceTime);\n\n const [mainContent, feedbackLink] = useShadowRootElements([\n PAGE_MAIN_CONTENT_SELECTOR,\n PAGE_FEEDBACK_LINK_SELECTOR,\n ]);\n\n let [feedbackContainer] = useShadowRootElements([\n ADDON_FEEDBACK_CONTAINER_SELECTOR,\n ]);\n\n if (feedbackLink) {\n feedbackLink.style.display = 'none';\n }\n\n // calculates the position of the selected text to be able to set the position of the addon\n useEffect(() => {\n if (\n // todo(backstage/techdocs-core) handle non-repo rendering\n !repository ||\n !selection ||\n !selection.containsNode(mainContent!, true) ||\n selection?.containsNode(feedbackContainer!, true)\n ) {\n return;\n }\n\n const mainContentPosition = mainContent!.getBoundingClientRect();\n const selectionPosition = selection.getRangeAt(0).getBoundingClientRect();\n\n setStyle({\n top: `${selectionPosition.top - mainContentPosition.top - 16}px`,\n left: `${selectionPosition.left + selectionPosition.width / 2}px`,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selection, mainContent, feedbackContainer]);\n\n if (\n !selection ||\n !repository ||\n !['github', 'gitlab'].includes(repository.type)\n )\n return null;\n\n if (!feedbackContainer) {\n feedbackContainer = document.createElement('div');\n feedbackContainer.setAttribute('id', ADDON_FEEDBACK_CONTAINER_ID);\n mainContent!.prepend(feedbackContainer);\n }\n\n return (\n <Portal container={feedbackContainer}>\n <Paper\n data-testid=\"report-issue-addon\"\n className={classes.root}\n style={style}\n >\n <IssueLink\n repository={repository}\n template={\n buildTemplate ? buildTemplate({ selection }) : defaultTemplate\n }\n />\n </Paper>\n </Portal>\n );\n};\n","/*\n * Copyright 2022 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, {\n ChangeEvent,\n MouseEvent,\n useMemo,\n useState,\n useEffect,\n useCallback,\n} from 'react';\n\nimport {\n withStyles,\n makeStyles,\n useTheme,\n Box,\n MenuItem,\n ListItemText,\n Slider,\n IconButton,\n Typography,\n} from '@material-ui/core';\nimport AddIcon from '@material-ui/icons/Add';\nimport RemoveIcon from '@material-ui/icons/Remove';\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { useShadowRootElements } from '@backstage/plugin-techdocs-react';\n\nconst boxShadow =\n '0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.13),0 0 0 1px rgba(0,0,0,0.02)';\n\nconst StyledSlider = withStyles(theme => ({\n root: {\n height: 2,\n padding: '15px 0',\n },\n thumb: {\n height: 18,\n width: 18,\n backgroundColor: theme.palette.common.white,\n boxShadow: boxShadow,\n marginTop: -9,\n marginLeft: -9,\n '&:focus, &:hover, &$active': {\n boxShadow:\n '0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.3),0 0 0 1px rgba(0,0,0,0.02)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: boxShadow,\n },\n },\n },\n active: {},\n valueLabel: {\n top: '100%',\n left: '50%',\n transform: 'scale(1) translate(-50%, -5px) !important',\n '& *': {\n color: theme.palette.common.black,\n fontSize: theme.typography.caption.fontSize,\n background: 'transparent',\n },\n },\n track: {\n height: 2,\n },\n rail: {\n height: 2,\n opacity: 0.5,\n },\n mark: {\n height: 10,\n width: 1,\n marginTop: -4,\n },\n markActive: {\n opacity: 1,\n backgroundColor: 'currentColor',\n },\n}))(Slider);\n\nconst settings = {\n key: 'techdocs.addons.settings.textsize',\n defaultValue: 100,\n};\n\nconst marks = [\n {\n value: 90,\n },\n {\n value: 100,\n },\n {\n value: 115,\n },\n {\n value: 130,\n },\n {\n value: 150,\n },\n];\n\nconst useStyles = makeStyles((theme: BackstageTheme) => ({\n container: {\n color: theme.palette.textSubtle,\n display: 'flex',\n alignItems: 'center',\n margin: 0,\n minWidth: 200,\n },\n menuItem: {\n '&:hover': {\n background: 'transparent',\n },\n },\n decreaseButton: {\n marginRight: theme.spacing(1),\n },\n increaseButton: {\n marginLeft: theme.spacing(1),\n },\n}));\n\nexport const TextSizeAddon = () => {\n const classes = useStyles();\n const theme = useTheme<BackstageTheme>();\n const [body] = useShadowRootElements(['body']);\n\n const [value, setValue] = useState<number>(() => {\n const initialValue = localStorage?.getItem(settings.key);\n return initialValue ? parseInt(initialValue, 10) : settings.defaultValue;\n });\n\n const values = useMemo(() => marks.map(mark => mark.value), []);\n const index = useMemo(() => values.indexOf(value), [values, value]);\n const min = useMemo(() => values[0], [values]);\n const max = useMemo(() => values[values.length - 1], [values]);\n\n const getValueText = useCallback(() => `${value}%`, [value]);\n\n const handleChangeCommitted = useCallback(\n (_event: ChangeEvent<{}>, newValue: number | number[]) => {\n if (!Array.isArray(newValue)) {\n setValue(newValue);\n localStorage?.setItem(settings.key, String(newValue));\n }\n },\n [setValue],\n );\n\n const handleDecreaseClick = useCallback(\n (event: MouseEvent) => {\n handleChangeCommitted(event, values[index - 1]);\n },\n [index, values, handleChangeCommitted],\n );\n\n const handleIncreaseClick = useCallback(\n (event: MouseEvent) => {\n handleChangeCommitted(event, values[index + 1]);\n },\n [index, values, handleChangeCommitted],\n );\n\n useEffect(() => {\n if (!body) return;\n const htmlFontSize =\n (\n theme.typography as BackstageTheme['typography'] & {\n htmlFontSize?: number;\n }\n )?.htmlFontSize ?? 16;\n body.style.setProperty(\n '--md-typeset-font-size',\n `${htmlFontSize * (value / 100)}px`,\n );\n }, [body, value, theme]);\n\n return (\n <MenuItem className={classes.menuItem} button disableRipple>\n <ListItemText\n primary={\n <Typography variant=\"subtitle2\" color=\"textPrimary\">\n Text size\n </Typography>\n }\n secondary={\n <Box className={classes.container}>\n <IconButton\n className={classes.decreaseButton}\n size=\"small\"\n edge=\"start\"\n disabled={value === min}\n onClick={handleDecreaseClick}\n aria-label=\"Decrease text size\"\n >\n <RemoveIcon />\n </IconButton>\n <StyledSlider\n value={value}\n aria-labelledby=\"text-size-slider\"\n getAriaValueText={getValueText}\n valueLabelDisplay=\"on\"\n valueLabelFormat={getValueText}\n marks={marks}\n step={null}\n min={min}\n max={max}\n onChangeCommitted={handleChangeCommitted}\n />\n <IconButton\n className={classes.increaseButton}\n size=\"small\"\n edge=\"end\"\n disabled={value === max}\n onClick={handleIncreaseClick}\n aria-label=\"Increase text size\"\n >\n <AddIcon />\n </IconButton>\n </Box>\n }\n disableTypography\n />\n </MenuItem>\n );\n};\n","/*\n * Copyright 2022 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 { createPlugin } from '@backstage/core-plugin-api';\nimport {\n createTechDocsAddonExtension,\n TechDocsAddonLocations,\n} from '@backstage/plugin-techdocs-react';\nimport { ExpandableNavigationAddon } from './ExpandableNavigation';\nimport { ReportIssueAddon, ReportIssueProps } from './ReportIssue';\nimport { TextSizeAddon } from './TextSize';\n\n/**\n * The TechDocs addons contrib plugin\n *\n * @public\n */\n\nexport const techdocsModuleAddonsContribPlugin = createPlugin({\n id: 'techdocsModuleAddonsContrib',\n});\n\n/**\n * TechDocs addon that lets you expand/collapse the TechDocs main navigation\n * and keep the preferred state in local storage. The addon will render as\n * a button next to the site name if the documentation has nested navigation.\n *\n * @example\n * Here's a simple example:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react/alpha';\n * import { ExpandableNavigation } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <ExpandableNavigation />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * };\n * ```\n *\n * @public\n */\n\nexport const ExpandableNavigation = techdocsModuleAddonsContribPlugin.provide(\n createTechDocsAddonExtension({\n name: 'ExpandableNavigation',\n location: TechDocsAddonLocations.PrimarySidebar,\n component: ExpandableNavigationAddon,\n }),\n);\n\n/**\n * TechDocs addon that lets you select text and open GitHub/Gitlab issues\n *\n * @remarks\n * Before using it, you should set up an `edit_uri` for your pages as explained {@link https://backstage.io/docs/features/techdocs/faqs#is-it-possible-for-users-to-suggest-changes-or-provide-feedback-on-a-techdocs-page | here} and remember, it only works for Github or Gitlab.\n *\n * @example\n * Here's a simple example:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react';\n * import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <ReportIssue />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * };\n * ```\n *\n * @example\n * Here's an example with `debounceTime` and `templateBuilder` props:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react';\n * import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n * const templateBuilder = ({ selection }: ReportIssueTemplateBuilder) => (({\n * title: 'Custom issue title',\n * body: `Custom issue body: ${selection.toString()}`\n * }))\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <ReportIssue debounceTime={300} templateBuilder={templateBuilder} />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * ```\n * @param props - Object that can optionally contain `debounceTime` and `templateBuilder` properties.\n * @public\n */\nexport const ReportIssue = techdocsModuleAddonsContribPlugin.provide(\n createTechDocsAddonExtension<ReportIssueProps>({\n name: 'ReportIssue',\n location: TechDocsAddonLocations.Content,\n component: ReportIssueAddon,\n }),\n);\n\n/**\n * This TechDocs addon allows users to customize text size on documentation pages, they can select how much they want to increase or decrease the font size via slider or buttons.\n *\n * @remarks\n * The default value for the font size is 100% of the HTML font size, if the theme does not have a `htmlFontSize` in its typography object, the addon will assume 16px as 100%, and remember, this setting is kept in the browser local storage.\n *\n * @example\n * Here's a simple example:\n * ```\n * import {\n * DefaultTechDocsHome,\n * TechDocsIndexPage,\n * TechDocsReaderPage,\n * } from '@backstage/plugin-techdocs';\n * import { TechDocsAddons } from '@backstage/plugin-techdocs-react';\n * import { TextSize } from '@backstage/plugin-techdocs-module-addons-contrib';\n *\n *\n * const AppRoutes = () => {\n * <FlatRoutes>\n * // other plugin routes\n * <Route path=\"/docs\" element={<TechDocsIndexPage />}>\n * <DefaultTechDocsHome />\n * </Route>\n * <Route\n * path=\"/docs/:namespace/:kind/:name/*\"\n * element={<TechDocsReaderPage />}\n * >\n * <TechDocsAddons>\n * <TextSize />\n * </TechDocsAddons>\n * </Route>\n * </FlatRoutes>;\n * };\n * ```\n *\n * @public\n */\nexport const TextSize = techdocsModuleAddonsContribPlugin.provide(\n createTechDocsAddonExtension({\n name: 'TextSize',\n location: TechDocsAddonLocations.Settings,\n component: TextSizeA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;AAAA,4CAEV,OAAQ,EAAA,IAAA,CAAA;AAAA,OAEb,CAAA;AAAA,MAEF,iBAAiB,EAAA,IAAA;AAAA,KAAA;AAAA,GAErB,CAAA,CAAA;AAEJ,CAAA;;ACnNO,MAAM,oCAAoC,YAAa,CAAA;AAAA,EAC5D,EAAI,EAAA,6BAAA;AACN,CAAC,EAAA;AAwCM,MAAM,uBAAuB,iCAAkC,CAAA,OAAA;AAAA,EACpE,4BAA6B,CAAA;AAAA,IAC3B,IAAM,EAAA,sBAAA;AAAA,IACN,UAAU,sBAAuB,CAAA,cAAA;AAAA,IACjC,SAAW,EAAA,yBAAA;AAAA,GACZ,CAAA;AACH,EAAA;AAyEO,MAAM,cAAc,iCAAkC,CAAA,OAAA;AAAA,EAC3D,4BAA+C,CAAA;AAAA,IAC7C,IAAM,EAAA,aAAA;AAAA,IACN,UAAU,sBAAuB,CAAA,OAAA;AAAA,IACjC,SAAW,EAAA,gBAAA;AAAA,GACZ,CAAA;AACH,EAAA;AAwCO,MAAM,WAAW,iCAAkC,CAAA,OAAA;AAAA,EACxD,4BAA6B,CAAA;AAAA,IAC3B,IAAM,EAAA,UAAA;AAAA,IACN,UAAU,sBAAuB,CAAA,QAAA;AAAA,IACjC,SAAW,EAAA,aAAA;AAAA,GACZ,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-techdocs-module-addons-contrib",
3
3
  "description": "Plugin module for contributed TechDocs Addons",
4
- "version": "1.0.6",
4
+ "version": "1.0.7-next.1",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -33,11 +33,11 @@
33
33
  "postpack": "backstage-cli package postpack"
34
34
  },
35
35
  "dependencies": {
36
- "@backstage/core-components": "^0.12.0",
37
- "@backstage/core-plugin-api": "^1.1.0",
38
- "@backstage/integration": "^1.4.0",
39
- "@backstage/integration-react": "^1.1.6",
40
- "@backstage/plugin-techdocs-react": "^1.0.6",
36
+ "@backstage/core-components": "^0.12.1-next.1",
37
+ "@backstage/core-plugin-api": "^1.1.1-next.1",
38
+ "@backstage/integration": "^1.4.1-next.1",
39
+ "@backstage/integration-react": "^1.1.7-next.1",
40
+ "@backstage/plugin-techdocs-react": "^1.0.7-next.1",
41
41
  "@backstage/theme": "^0.2.16",
42
42
  "@material-ui/core": "^4.9.13",
43
43
  "@material-ui/icons": "^4.9.1",
@@ -50,18 +50,18 @@
50
50
  "react": "^16.13.1 || ^17.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@backstage/cli": "^0.21.0",
54
- "@backstage/core-app-api": "^1.2.0",
55
- "@backstage/dev-utils": "^1.0.8",
56
- "@backstage/plugin-techdocs-addons-test-utils": "^1.0.6",
57
- "@backstage/test-utils": "^1.2.2",
53
+ "@backstage/cli": "^0.21.2-next.1",
54
+ "@backstage/core-app-api": "^1.2.1-next.1",
55
+ "@backstage/dev-utils": "^1.0.9-next.1",
56
+ "@backstage/plugin-techdocs-addons-test-utils": "^1.0.7-next.1",
57
+ "@backstage/test-utils": "^1.2.3-next.1",
58
58
  "@testing-library/jest-dom": "^5.10.1",
59
59
  "@testing-library/react": "^12.1.3",
60
60
  "@testing-library/user-event": "^14.0.0",
61
61
  "@types/node": "^16.11.26",
62
62
  "@types/react": "^16.13.1 || ^17.0.0",
63
63
  "cross-fetch": "^3.1.5",
64
- "msw": "^0.48.0"
64
+ "msw": "^0.49.0"
65
65
  },
66
66
  "files": [
67
67
  "dist"