@backstage/plugin-techdocs 1.14.0-next.2 → 1.14.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 +22 -0
- package/dist/EntityPageDocs.esm.js.map +1 -1
- package/dist/Router.esm.js.map +1 -1
- package/dist/alpha/hooks/useTechdocsReaderIconLinkProps.esm.js.map +1 -1
- package/dist/alpha.d.ts +1 -1
- package/dist/alpha.esm.js +1 -1
- package/dist/alpha.esm.js.map +1 -1
- package/dist/api.esm.js.map +1 -1
- package/dist/client.esm.js +1 -1
- package/dist/client.esm.js.map +1 -1
- package/dist/helpers.esm.js.map +1 -1
- package/dist/home/components/DefaultTechDocsHome.esm.js.map +1 -1
- package/dist/home/components/Grids/DocsCardGrid.esm.js.map +1 -1
- package/dist/home/components/Grids/EntityListDocsGrid.esm.js.map +1 -1
- package/dist/home/components/Grids/InfoCardGrid.esm.js.map +1 -1
- package/dist/home/components/Tables/CursorPaginatedDocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/DocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/EntityListDocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/OffsetPaginatedDocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/actions.esm.js.map +1 -1
- package/dist/home/components/Tables/columns.esm.js.map +1 -1
- package/dist/home/components/Tables/helpers.esm.js.map +1 -1
- package/dist/home/components/TechDocsCustomHome.esm.js +2 -2
- package/dist/home/components/TechDocsCustomHome.esm.js.map +1 -1
- package/dist/home/components/TechDocsIndexPage.esm.js.map +1 -1
- package/dist/home/components/TechDocsPageWrapper.esm.js.map +1 -1
- package/dist/home/components/TechDocsPicker.esm.js.map +1 -1
- package/dist/package.json.esm.js +1 -1
- package/dist/plugin.esm.js +2 -2
- package/dist/plugin.esm.js.map +1 -1
- package/dist/reader/components/TechDocsBuildLogs.esm.js.map +1 -1
- package/dist/reader/components/TechDocsNotFound.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPage/TechDocsReaderPage.esm.js +1 -1
- package/dist/reader/components/TechDocsReaderPage/TechDocsReaderPage.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContentAddons.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageContent/dom.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageContent/useNavigateUrl.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderProvider.esm.js.map +1 -1
- package/dist/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.esm.js.map +1 -1
- package/dist/reader/components/TechDocsStateIndicator.esm.js.map +1 -1
- package/dist/reader/components/useReaderState.esm.js.map +1 -1
- package/dist/reader/transformers/addBaseUrl.esm.js.map +1 -1
- package/dist/reader/transformers/addGitFeedbackLink.esm.js.map +1 -1
- package/dist/reader/transformers/addLinkClickListener.esm.js.map +1 -1
- package/dist/reader/transformers/addNavLinkKeyboardToggle.esm.js.map +1 -1
- package/dist/reader/transformers/addSidebarToggle.esm.js.map +1 -1
- package/dist/reader/transformers/copyToClipboard.esm.js.map +1 -1
- package/dist/reader/transformers/handleMetaRedirects.esm.js.map +1 -1
- package/dist/reader/transformers/html/hooks/iframes.esm.js.map +1 -1
- package/dist/reader/transformers/html/hooks/links.esm.js.map +1 -1
- package/dist/reader/transformers/html/transformer.esm.js.map +1 -1
- package/dist/reader/transformers/onCssReady.esm.js.map +1 -1
- package/dist/reader/transformers/removeMkdocsHeader.esm.js.map +1 -1
- package/dist/reader/transformers/renderReactElement.esm.js.map +1 -1
- package/dist/reader/transformers/rewriteDocLinks.esm.js.map +1 -1
- package/dist/reader/transformers/scrollIntoNavigation.esm.js.map +1 -1
- package/dist/reader/transformers/simplifyMkdocsFooter.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/extensions.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/layout.esm.js +16 -5
- package/dist/reader/transformers/styles/rules/layout.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/palette.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/reset.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/rules.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/typeset.esm.js.map +1 -1
- package/dist/reader/transformers/styles/rules/variables.esm.js.map +1 -1
- package/dist/reader/transformers/styles/transformer.esm.js +13 -1
- package/dist/reader/transformers/styles/transformer.esm.js.map +1 -1
- package/dist/reader/transformers/transformer.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/dist/search/components/TechDocsSearch.esm.js.map +1 -1
- package/dist/search/components/TechDocsSearchResultListItem.esm.js.map +1 -1
- package/dist/search/hooks/useTechDocsLocation.esm.js.map +1 -1
- package/dist/translation.esm.js.map +1 -1
- package/package.json +24 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewriteDocLinks.esm.js","sources":["../../../src/reader/transformers/rewriteDocLinks.ts"],"sourcesContent":["/*\n * Copyright 2020 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 type { Transformer } from './transformer';\n\nexport const rewriteDocLinks = (): Transformer => {\n return dom => {\n const updateDom = <T extends Element>(\n list: Array<T>,\n attributeName: string,\n ): void => {\n Array.from(list)\n .filter(elem => elem.hasAttribute(attributeName))\n .forEach((elem: T) => {\n const elemAttribute = elem.getAttribute(attributeName);\n if (elemAttribute) {\n // if link is external, add target to open in a new window or tab\n if (elemAttribute.match(/^https?:\\/\\//i)) {\n elem.setAttribute('target', '_blank');\n }\n\n try {\n const normalizedWindowLocation = normalizeUrl(\n window.location.href,\n );\n elem.setAttribute(\n attributeName,\n new URL(elemAttribute, normalizedWindowLocation).toString(),\n );\n } catch (_e) {\n // Non-parseable links should be re-written as plain text.\n elem.replaceWith(elem.textContent || elemAttribute);\n }\n }\n });\n };\n\n updateDom(Array.from(dom.getElementsByTagName('a')), 'href');\n\n return dom;\n };\n};\n\n/** Make sure that the input url always ends with a '/' */\nexport function normalizeUrl(input: string): string {\n const url = new URL(input);\n\n if (!url.pathname.endsWith('/') && !url.pathname.endsWith('.html')) {\n url.pathname += '/';\n }\n\n return url.toString();\n}\n"],"names":[],"mappings":"AAkBO,MAAM,kBAAkB,MAAmB;AAChD,EAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"rewriteDocLinks.esm.js","sources":["../../../src/reader/transformers/rewriteDocLinks.ts"],"sourcesContent":["/*\n * Copyright 2020 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 type { Transformer } from './transformer';\n\nexport const rewriteDocLinks = (): Transformer => {\n return dom => {\n const updateDom = <T extends Element>(\n list: Array<T>,\n attributeName: string,\n ): void => {\n Array.from(list)\n .filter(elem => elem.hasAttribute(attributeName))\n .forEach((elem: T) => {\n const elemAttribute = elem.getAttribute(attributeName);\n if (elemAttribute) {\n // if link is external, add target to open in a new window or tab\n if (elemAttribute.match(/^https?:\\/\\//i)) {\n elem.setAttribute('target', '_blank');\n }\n\n try {\n const normalizedWindowLocation = normalizeUrl(\n window.location.href,\n );\n elem.setAttribute(\n attributeName,\n new URL(elemAttribute, normalizedWindowLocation).toString(),\n );\n } catch (_e) {\n // Non-parseable links should be re-written as plain text.\n elem.replaceWith(elem.textContent || elemAttribute);\n }\n }\n });\n };\n\n updateDom(Array.from(dom.getElementsByTagName('a')), 'href');\n\n return dom;\n };\n};\n\n/** Make sure that the input url always ends with a '/' */\nexport function normalizeUrl(input: string): string {\n const url = new URL(input);\n\n if (!url.pathname.endsWith('/') && !url.pathname.endsWith('.html')) {\n url.pathname += '/';\n }\n\n return url.toString();\n}\n"],"names":[],"mappings":"AAkBO,MAAM,kBAAkB,MAAmB;AAChD,EAAA,OAAO,CAAA,GAAA,KAAO;AACZ,IAAA,MAAM,SAAA,GAAY,CAChB,IAAA,EACA,aAAA,KACS;AACT,MAAA,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CACZ,MAAA,CAAO,CAAA,IAAA,KAAQ,IAAA,CAAK,YAAA,CAAa,aAAa,CAAC,CAAA,CAC/C,OAAA,CAAQ,CAAC,IAAA,KAAY;AACpB,QAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,YAAA,CAAa,aAAa,CAAA;AACrD,QAAA,IAAI,aAAA,EAAe;AAEjB,UAAA,IAAI,aAAA,CAAc,KAAA,CAAM,eAAe,CAAA,EAAG;AACxC,YAAA,IAAA,CAAK,YAAA,CAAa,UAAU,QAAQ,CAAA;AAAA,UACtC;AAEA,UAAA,IAAI;AACF,YAAA,MAAM,wBAAA,GAA2B,YAAA;AAAA,cAC/B,OAAO,QAAA,CAAS;AAAA,aAClB;AACA,YAAA,IAAA,CAAK,YAAA;AAAA,cACH,aAAA;AAAA,cACA,IAAI,GAAA,CAAI,aAAA,EAAe,wBAAwB,EAAE,QAAA;AAAS,aAC5D;AAAA,UACF,SAAS,EAAA,EAAI;AAEX,YAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,WAAA,IAAe,aAAa,CAAA;AAAA,UACpD;AAAA,QACF;AAAA,MACF,CAAC,CAAA;AAAA,IACL,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM,IAAA,CAAK,GAAA,CAAI,qBAAqB,GAAG,CAAC,GAAG,MAAM,CAAA;AAE3D,IAAA,OAAO,GAAA;AAAA,EACT,CAAA;AACF;AAGO,SAAS,aAAa,KAAA,EAAuB;AAClD,EAAA,MAAM,GAAA,GAAM,IAAI,GAAA,CAAI,KAAK,CAAA;AAEzB,EAAA,IAAI,CAAC,GAAA,CAAI,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,IAAK,CAAC,GAAA,CAAI,QAAA,CAAS,QAAA,CAAS,OAAO,CAAA,EAAG;AAClE,IAAA,GAAA,CAAI,QAAA,IAAY,GAAA;AAAA,EAClB;AAEA,EAAA,OAAO,IAAI,QAAA,EAAS;AACtB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollIntoNavigation.esm.js","sources":["../../../src/reader/transformers/scrollIntoNavigation.ts"],"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 type { Transformer } from './transformer';\n\nexport const scrollIntoNavigation = (): Transformer => {\n return dom => {\n setTimeout(() => {\n const activeNavItems = dom?.querySelectorAll(`li.md-nav__item--active`);\n if (activeNavItems.length !== 0) {\n // expand all navigation items that are active\n activeNavItems.forEach(activeNavItem => {\n const checkbox = activeNavItem?.querySelector('input');\n if (!checkbox?.checked) {\n checkbox?.click();\n }\n });\n\n const lastItem = activeNavItems[activeNavItems.length - 1];\n lastItem.scrollIntoView();\n }\n }, 200);\n return dom;\n };\n};\n"],"names":[],"mappings":"AAkBO,MAAM,uBAAuB,MAAmB;AACrD,EAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"scrollIntoNavigation.esm.js","sources":["../../../src/reader/transformers/scrollIntoNavigation.ts"],"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 type { Transformer } from './transformer';\n\nexport const scrollIntoNavigation = (): Transformer => {\n return dom => {\n setTimeout(() => {\n const activeNavItems = dom?.querySelectorAll(`li.md-nav__item--active`);\n if (activeNavItems.length !== 0) {\n // expand all navigation items that are active\n activeNavItems.forEach(activeNavItem => {\n const checkbox = activeNavItem?.querySelector('input');\n if (!checkbox?.checked) {\n checkbox?.click();\n }\n });\n\n const lastItem = activeNavItems[activeNavItems.length - 1];\n lastItem.scrollIntoView();\n }\n }, 200);\n return dom;\n };\n};\n"],"names":[],"mappings":"AAkBO,MAAM,uBAAuB,MAAmB;AACrD,EAAA,OAAO,CAAA,GAAA,KAAO;AACZ,IAAA,UAAA,CAAW,MAAM;AACf,MAAA,MAAM,cAAA,GAAiB,GAAA,EAAK,gBAAA,CAAiB,CAAA,uBAAA,CAAyB,CAAA;AACtE,MAAA,IAAI,cAAA,CAAe,WAAW,CAAA,EAAG;AAE/B,QAAA,cAAA,CAAe,QAAQ,CAAA,aAAA,KAAiB;AACtC,UAAA,MAAM,QAAA,GAAW,aAAA,EAAe,aAAA,CAAc,OAAO,CAAA;AACrD,UAAA,IAAI,CAAC,UAAU,OAAA,EAAS;AACtB,YAAA,QAAA,EAAU,KAAA,EAAM;AAAA,UAClB;AAAA,QACF,CAAC,CAAA;AAED,QAAA,MAAM,QAAA,GAAW,cAAA,CAAe,cAAA,CAAe,MAAA,GAAS,CAAC,CAAA;AACzD,QAAA,QAAA,CAAS,cAAA,EAAe;AAAA,MAC1B;AAAA,IACF,GAAG,GAAG,CAAA;AACN,IAAA,OAAO,GAAA;AAAA,EACT,CAAA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplifyMkdocsFooter.esm.js","sources":["../../../src/reader/transformers/simplifyMkdocsFooter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 type { Transformer } from './transformer';\n\nexport const simplifyMkdocsFooter = (): Transformer => {\n return dom => {\n // Remove new mkdocs copyright\n dom.querySelector('.md-footer .md-copyright')?.remove();\n // Remove old mkdocs copyright\n dom.querySelector('.md-footer-copyright')?.remove();\n return dom;\n };\n};\n"],"names":[],"mappings":"AAkBO,MAAM,uBAAuB,MAAmB;AACrD,EAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"simplifyMkdocsFooter.esm.js","sources":["../../../src/reader/transformers/simplifyMkdocsFooter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 type { Transformer } from './transformer';\n\nexport const simplifyMkdocsFooter = (): Transformer => {\n return dom => {\n // Remove new mkdocs copyright\n dom.querySelector('.md-footer .md-copyright')?.remove();\n // Remove old mkdocs copyright\n dom.querySelector('.md-footer-copyright')?.remove();\n return dom;\n };\n};\n"],"names":[],"mappings":"AAkBO,MAAM,uBAAuB,MAAmB;AACrD,EAAA,OAAO,CAAA,GAAA,KAAO;AAEZ,IAAA,GAAA,CAAI,aAAA,CAAc,0BAA0B,CAAA,EAAG,MAAA,EAAO;AAEtD,IAAA,GAAA,CAAI,aAAA,CAAc,sBAAsB,CAAA,EAAG,MAAA,EAAO;AAClD,IAAA,OAAO,GAAA;AAAA,EACT,CAAA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/extensions.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 { RuleOptions } from './types';\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Extensions ==================*/\n\n/* HIGHLIGHT */\n.highlight .md-clipboard:after {\n content: unset;\n}\n\n.highlight .nx {\n color: ${theme.palette.type === 'dark' ? '#ff53a3' : '#ec407a'};\n}\n\n/* CODE HILITE */\n.codehilite .gd {\n background-color: ${\n theme.palette.type === 'dark' ? 'rgba(248,81,73,0.65)' : '#fdd'\n };\n}\n\n.codehilite .gi {\n background-color: ${\n theme.palette.type === 'dark' ? 'rgba(46,160,67,0.65)' : '#dfd'\n };\n}\n\n/* TABBED */\n.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),\n.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),\n.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),\n.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),\n.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),\n.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),\n.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),\n.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),\n.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),\n.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),\n.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),\n.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),\n.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),\n.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),\n.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),\n.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),\n.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),\n.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),\n.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),\n.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {\n color: var(--md-accent-fg-color);\n border-color: var(--md-accent-fg-color);\n}\n\n/* TASK-LIST */\n.task-list-control .task-list-indicator::before {\n background-color: ${theme.palette.action.disabledBackground};\n}\n.task-list-control [type=\"checkbox\"]:checked + .task-list-indicator:before {\n background-color: ${theme.palette.success.main};\n}\n\n/* ADMONITION */\n.admonition {\n font-size: var(--md-typeset-font-size) !important;\n}\n.admonition .admonition-title {\n padding-left: 2.5rem !important;\n}\n\n.admonition .admonition-title:before {\n top: 50% !important;\n width: 20px !important;\n height: 20px !important;\n transform: translateY(-50%) !important;\n}\n`;\n"],"names":[],"mappings":"AAkBA,iBAAe,CAAC,EAAE,KAAA,
|
|
1
|
+
{"version":3,"file":"extensions.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/extensions.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 { RuleOptions } from './types';\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Extensions ==================*/\n\n/* HIGHLIGHT */\n.highlight .md-clipboard:after {\n content: unset;\n}\n\n.highlight .nx {\n color: ${theme.palette.type === 'dark' ? '#ff53a3' : '#ec407a'};\n}\n\n/* CODE HILITE */\n.codehilite .gd {\n background-color: ${\n theme.palette.type === 'dark' ? 'rgba(248,81,73,0.65)' : '#fdd'\n };\n}\n\n.codehilite .gi {\n background-color: ${\n theme.palette.type === 'dark' ? 'rgba(46,160,67,0.65)' : '#dfd'\n };\n}\n\n/* TABBED */\n.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),\n.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),\n.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),\n.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),\n.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),\n.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),\n.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),\n.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),\n.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),\n.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),\n.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),\n.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),\n.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),\n.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),\n.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),\n.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),\n.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),\n.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),\n.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),\n.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {\n color: var(--md-accent-fg-color);\n border-color: var(--md-accent-fg-color);\n}\n\n/* TASK-LIST */\n.task-list-control .task-list-indicator::before {\n background-color: ${theme.palette.action.disabledBackground};\n}\n.task-list-control [type=\"checkbox\"]:checked + .task-list-indicator:before {\n background-color: ${theme.palette.success.main};\n}\n\n/* ADMONITION */\n.admonition {\n font-size: var(--md-typeset-font-size) !important;\n}\n.admonition .admonition-title {\n padding-left: 2.5rem !important;\n}\n\n.admonition .admonition-title:before {\n top: 50% !important;\n width: 20px !important;\n height: 20px !important;\n transform: translateY(-50%) !important;\n}\n`;\n"],"names":[],"mappings":"AAkBA,iBAAe,CAAC,EAAE,KAAA,EAAM,KAAmB;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA,SAAA,EAShC,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,MAAA,GAAS,YAAY,SAAS,CAAA;AAAA;;AAAA;AAAA;AAAA,oBAAA,EAM5D,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,MAAA,GAAS,yBAAyB,MAC3D,CAAA;AAAA;;AAAA;AAAA,oBAAA,EAKE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,MAAA,GAAS,yBAAyB,MAC3D,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,oBAAA,EA8BoB,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,kBAAkB,CAAA;AAAA;AAAA;AAAA,mBAAA,EAGxC,KAAA,CAAM,OAAA,CAAQ,OAAA,CAAQ,IAAI,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var layout = ({ theme, sidebar }) => {
|
|
2
|
+
const sidebarWidth = sidebar.isPresent ? `${sidebar.width}px` : "0px";
|
|
3
|
+
const sidebarMargin = sidebar.isPresent ? "16rem" : "0";
|
|
4
|
+
let sidebarLeftPosition;
|
|
5
|
+
if (!sidebar.isPresent) {
|
|
6
|
+
sidebarLeftPosition = "-16rem";
|
|
7
|
+
} else if (sidebar.isPinned) {
|
|
8
|
+
sidebarLeftPosition = `calc(-16rem + ${sidebarWidth})`;
|
|
9
|
+
} else {
|
|
10
|
+
sidebarLeftPosition = "calc(-16rem + 72px)";
|
|
11
|
+
}
|
|
12
|
+
return `
|
|
3
13
|
/*================== Layout ==================*/
|
|
4
14
|
|
|
5
15
|
/* mkdocs material v9 compat */
|
|
@@ -103,12 +113,12 @@ var layout = ({ theme, sidebar }) => `
|
|
|
103
113
|
|
|
104
114
|
.md-content {
|
|
105
115
|
max-width: calc(100% - 16rem * 2);
|
|
106
|
-
margin-left:
|
|
116
|
+
margin-left: ${sidebarMargin};
|
|
107
117
|
margin-bottom: 50px;
|
|
108
118
|
}
|
|
109
119
|
|
|
110
120
|
.md-content > .md-sidebar {
|
|
111
|
-
left:
|
|
121
|
+
left: ${sidebarMargin};
|
|
112
122
|
}
|
|
113
123
|
|
|
114
124
|
.md-footer {
|
|
@@ -190,7 +200,7 @@ var layout = ({ theme, sidebar }) => `
|
|
|
190
200
|
.md-sidebar--primary {
|
|
191
201
|
width: 16rem !important;
|
|
192
202
|
z-index: 200;
|
|
193
|
-
left: ${
|
|
203
|
+
left: ${sidebarLeftPosition} !important;
|
|
194
204
|
}
|
|
195
205
|
.md-sidebar--secondary:not([hidden]) {
|
|
196
206
|
display: none;
|
|
@@ -246,6 +256,7 @@ var layout = ({ theme, sidebar }) => `
|
|
|
246
256
|
}
|
|
247
257
|
}
|
|
248
258
|
`;
|
|
259
|
+
};
|
|
249
260
|
|
|
250
261
|
export { layout as default };
|
|
251
262
|
//# sourceMappingURL=layout.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/layout.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 { RuleOptions } from './types';\n\
|
|
1
|
+
{"version":3,"file":"layout.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/layout.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 { RuleOptions } from './types';\n\nexport default ({ theme, sidebar }: RuleOptions) => {\n const sidebarWidth = sidebar.isPresent ? `${sidebar.width}px` : '0px';\n const sidebarMargin = sidebar.isPresent ? '16rem' : '0';\n\n // Calculate the sidebar position for mobile layouts\n let sidebarLeftPosition;\n if (!sidebar.isPresent) {\n sidebarLeftPosition = '-16rem';\n } else if (sidebar.isPinned) {\n sidebarLeftPosition = `calc(-16rem + ${sidebarWidth})`;\n } else {\n sidebarLeftPosition = 'calc(-16rem + 72px)';\n }\n\n return `\n/*================== Layout ==================*/\n\n/* mkdocs material v9 compat */\n.md-nav__title {\n color: var(--md-default-fg-color);\n}\n\n.md-grid {\n max-width: 100%;\n margin: 0;\n}\n\n.md-nav {\n font-size: calc(var(--md-typeset-font-size) * 0.9);\n}\n.md-nav__link:not(:has(svg)) {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.md-nav__link:has(svg) > .md-ellipsis {\n flex-grow: 1;\n}\n.md-nav__icon {\n height: 20px !important;\n width: 20px !important;\n margin-left:${theme.spacing(1)}px;\n}\n.md-nav__icon svg {\n margin: 0;\n width: 20px !important;\n height: 20px !important;\n}\n.md-nav__icon:after {\n width: 20px !important;\n height: 20px !important;\n}\n.md-status--updated::after {\n -webkit-mask-image: var(--md-status--updated);\n mask-image: var(--md-status--updated);\n}\n\n.md-nav__item--active > .md-nav__link, a.md-nav__link--active {\n text-decoration: underline;\n color: var(--md-typeset-a-color);\n}\n.md-nav__link--active > .md-status:after {\n background-color: var(--md-typeset-a-color);\n}\n.md-nav__link[href]:hover > .md-status:after {\n background-color: var(--md-accent-fg-color);\n}\n\n.md-main__inner {\n margin-top: 0;\n}\n\n.md-sidebar {\n bottom: 75px;\n position: fixed;\n width: 16rem;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-color: rgb(193, 193, 193) #eee;\n scrollbar-width: thin;\n}\n.md-sidebar .md-sidebar__scrollwrap {\n width: calc(16rem);\n overflow-y: hidden;\n}\n@supports selector(::-webkit-scrollbar) {\n [dir=ltr] .md-sidebar__inner {\n padding-right: calc(100% - 15.1rem);\n }\n}\n.md-sidebar--secondary {\n right: ${theme.spacing(3)}px;\n}\n.md-sidebar::-webkit-scrollbar {\n width: 5px;\n}\n.md-sidebar::-webkit-scrollbar-button {\n width: 5px;\n height: 5px;\n}\n.md-sidebar::-webkit-scrollbar-track {\n background: #eee;\n border: 1 px solid rgb(250, 250, 250);\n box-shadow: 0px 0px 3px #dfdfdf inset;\n border-radius: 3px;\n}\n.md-sidebar::-webkit-scrollbar-thumb {\n width: 5px;\n background: rgb(193, 193, 193);\n border: transparent;\n border-radius: 3px;\n}\n.md-sidebar::-webkit-scrollbar-thumb:hover {\n background: rgb(125, 125, 125);\n}\n\n.md-content {\n max-width: calc(100% - 16rem * 2);\n margin-left: ${sidebarMargin};\n margin-bottom: 50px;\n}\n\n.md-content > .md-sidebar {\n left: ${sidebarMargin};\n}\n\n.md-footer {\n position: fixed;\n bottom: 0px;\n pointer-events: none;\n}\n\n.md-footer-nav__link, .md-footer__link {\n pointer-events: all;\n}\n\n.md-footer__title {\n background-color: unset;\n}\n.md-footer-nav__link, .md-footer__link {\n width: 16rem;\n}\n\n.md-dialog {\n background-color: unset;\n}\n\n@media screen and (min-width: 76.25em) {\n .md-sidebar {\n height: auto;\n }\n}\n\n@media screen and (max-width: 76.1875em) {\n .md-nav {\n transition: none !important;\n background-color: var(--md-default-bg-color)\n }\n .md-nav--primary .md-nav__title {\n cursor: auto;\n color: var(--md-default-fg-color);\n font-weight: 700;\n white-space: normal;\n line-height: 1rem;\n height: auto;\n display: flex;\n flex-flow: column;\n row-gap: 1.6rem;\n padding: 1.2rem .8rem .8rem;\n background-color: var(--md-default-bg-color);\n }\n .md-nav--primary .md-nav__title~.md-nav__list {\n box-shadow: none;\n }\n .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {\n border-top: none;\n }\n .md-nav--primary .md-nav__title .md-nav__button {\n display: none;\n }\n .md-nav--primary .md-nav__title .md-nav__icon {\n color: var(--md-default-fg-color);\n position: static;\n height: auto;\n margin: 0 0 0 -0.2rem;\n }\n .md-nav--primary > .md-nav__title [for=\"none\"] {\n padding-top: 0;\n }\n .md-nav--primary .md-nav__item {\n border-top: none;\n }\n .md-nav--primary :is(.md-nav__title,.md-nav__item) {\n font-size : var(--md-typeset-font-size);\n }\n .md-nav .md-source {\n display: none;\n }\n\n .md-sidebar {\n height: 100%;\n }\n .md-sidebar--primary {\n width: 16rem !important;\n z-index: 200;\n left: ${sidebarLeftPosition} !important;\n }\n .md-sidebar--secondary:not([hidden]) {\n display: none;\n }\n\n [data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary {\n transform: translateX(16rem);\n }\n\n .md-content {\n max-width: 100%;\n margin-left: 0;\n }\n\n .md-header__button {\n margin: 0.4rem 0;\n margin-left: 0.4rem;\n padding: 0;\n }\n\n .md-overlay {\n left: 0;\n }\n\n .md-footer {\n position: static;\n padding-left: 0;\n }\n .md-footer-nav__link {\n /* footer links begin to overlap at small sizes without setting width */\n width: 50%;\n }\n}\n\n@media screen and (max-width: 600px) {\n .md-sidebar--primary {\n left: -16rem !important;\n width: 16rem;\n }\n}\n\n\n@media print {\n .md-sidebar,\n #toggle-sidebar {\n display: none;\n }\n\n .md-content {\n margin: 0;\n width: 100%;\n max-width: 100%;\n }\n}\n`;\n};\n"],"names":[],"mappings":"AAkBA,aAAe,CAAC,EAAE,KAAA,EAAO,OAAA,EAAQ,KAAmB;AAClD,EAAA,MAAM,eAAe,OAAA,CAAQ,SAAA,GAAY,CAAA,EAAG,OAAA,CAAQ,KAAK,CAAA,EAAA,CAAA,GAAO,KAAA;AAChE,EAAA,MAAM,aAAA,GAA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A;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAAA,EAkFX,mBAAmB,CAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAwD/B,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/palette.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RuleOptions } from './types';\nimport { Theme } from '@material-ui/core/styles';\n\nconst themeHashes: Record<Theme['palette']['type'], ReadonlyArray<string>> = {\n dark: ['#only-light', '#gh-light-mode-only'],\n light: ['#only-dark', '#gh-dark-mode-only'],\n};\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Palette ==================*/\n/*\n When color palette toggle is enabled in material theme for Mkdocs, there is a possibility to show conditionally \n images by adding #only-dark or #only-light to resource hash. Backstage doesn't use mkdocs color palette mechanism,\n so there is a need to add css rules from palette*.css manually.\n*/\n\n${themeHashes[theme.palette.type]\n .map(hash => `img[src$=\"${hash}\"]`)\n .join(', ')} {\n display: none;\n}\n`;\n"],"names":[],"mappings":"AAmBA,MAAM,
|
|
1
|
+
{"version":3,"file":"palette.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/palette.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RuleOptions } from './types';\nimport { Theme } from '@material-ui/core/styles';\n\nconst themeHashes: Record<Theme['palette']['type'], ReadonlyArray<string>> = {\n dark: ['#only-light', '#gh-light-mode-only'],\n light: ['#only-dark', '#gh-dark-mode-only'],\n};\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Palette ==================*/\n/*\n When color palette toggle is enabled in material theme for Mkdocs, there is a possibility to show conditionally \n images by adding #only-dark or #only-light to resource hash. Backstage doesn't use mkdocs color palette mechanism,\n so there is a need to add css rules from palette*.css manually.\n*/\n\n${themeHashes[theme.palette.type]\n .map(hash => `img[src$=\"${hash}\"]`)\n .join(', ')} {\n display: none;\n}\n`;\n"],"names":[],"mappings":"AAmBA,MAAM,WAAA,GAAuE;AAAA,EAC3E,IAAA,EAAM,CAAC,aAAA,EAAe,qBAAqB,CAAA;AAAA,EAC3C,KAAA,EAAO,CAAC,YAAA,EAAc,oBAAoB;AAC5C,CAAA;AAEA,cAAe,CAAC,EAAE,KAAA,EAAM,KAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,EAQzC,WAAA,CAAY,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,CAC7B,GAAA,CAAI,CAAA,IAAA,KAAQ,CAAA,UAAA,EAAa,IAAI,CAAA,EAAA,CAAI,CAAA,CACjC,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA;AAAA;AAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/reset.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 { RuleOptions } from './types';\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Reset ==================*/\n\nbody {\n --md-text-color: var(--md-default-fg-color);\n --md-text-link-color: var(--md-accent-fg-color);\n --md-text-font-family: ${theme.typography.fontFamily};\n font-family: var(--md-text-font-family);\n background-color: unset;\n}\n`;\n"],"names":[],"mappings":"AAkBA,YAAe,CAAC,EAAE,KAAA,
|
|
1
|
+
{"version":3,"file":"reset.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/reset.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 { RuleOptions } from './types';\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Reset ==================*/\n\nbody {\n --md-text-color: var(--md-default-fg-color);\n --md-text-link-color: var(--md-accent-fg-color);\n --md-text-font-family: ${theme.typography.fontFamily};\n font-family: var(--md-text-font-family);\n background-color: unset;\n}\n`;\n"],"names":[],"mappings":"AAkBA,YAAe,CAAC,EAAE,KAAA,EAAM,KAAmB;AAAA;;AAAA;AAAA;AAAA;AAAA,yBAAA,EAMhB,KAAA,CAAM,WAAW,UAAU,CAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/rules.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 { default as variables } from './variables';\nimport { default as reset } from './reset';\nimport { default as layout } from './layout';\nimport { default as typeset } from './typeset';\nimport { default as animations } from './animations';\nimport { default as extensions } from './extensions';\nimport palette from './palette';\n\n/**\n * A list of style rules that will be applied to an element in the order they were added.\n *\n * @remarks\n * The order of items is important, which means that a rule can override any other rule previously added to the list,\n * i.e. the rules will be applied from the first added to the last added.\n */\nexport const rules = [\n variables,\n reset,\n layout,\n typeset,\n animations,\n extensions,\n palette,\n];\n"],"names":[],"mappings":";;;;;;;;AA+BO,MAAM,
|
|
1
|
+
{"version":3,"file":"rules.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/rules.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 { default as variables } from './variables';\nimport { default as reset } from './reset';\nimport { default as layout } from './layout';\nimport { default as typeset } from './typeset';\nimport { default as animations } from './animations';\nimport { default as extensions } from './extensions';\nimport palette from './palette';\n\n/**\n * A list of style rules that will be applied to an element in the order they were added.\n *\n * @remarks\n * The order of items is important, which means that a rule can override any other rule previously added to the list,\n * i.e. the rules will be applied from the first added to the last added.\n */\nexport const rules = [\n variables,\n reset,\n layout,\n typeset,\n animations,\n extensions,\n palette,\n];\n"],"names":[],"mappings":";;;;;;;;AA+BO,MAAM,KAAA,GAAQ;AAAA,EACnB,SAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeset.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/typeset.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 { RuleOptions } from './types';\n\ntype RuleTypography = RuleOptions['theme']['typography'];\n\ntype BackstageTypography = RuleTypography & {\n htmlFontSize?: number;\n};\n\ntype TypographyHeadings = Pick<\n RuleTypography,\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n>;\n\ntype TypographyHeadingsKeys = keyof TypographyHeadings;\n\nconst headings: TypographyHeadingsKeys[] = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\nconst relativeLengthUnit: RegExp = /(em)|(rem)/gi;\nconst cssVariable: RegExp = /var\\(|\\)/gi;\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Typeset ==================*/\n\n.md-typeset {\n font-size: var(--md-typeset-font-size);\n}\n\n${headings.reduce<string>((style, heading) => {\n const htmlFontSize =\n (theme.typography as BackstageTypography).htmlFontSize ?? 16;\n const styles = theme.typography[heading];\n const { lineHeight, fontFamily, fontWeight, fontSize } = styles;\n const calculate = (value: typeof fontSize): string | undefined => {\n if (typeof value === 'number') {\n // Convert px to rem and apply 60% factor\n return calculate(`${(value / htmlFontSize) * 0.6}rem`);\n } else if (typeof value === 'string') {\n if (value.match(cssVariable)) {\n // Resolve css variable and calculate recursively\n const resolvedValue = window\n .getComputedStyle(document.body)\n .getPropertyValue(value.replaceAll(cssVariable, ''));\n if (resolvedValue !== '') {\n return calculate(resolvedValue);\n }\n } else if (value.match(relativeLengthUnit)) {\n // Use relative size as factor\n const factor = value.replace(relativeLengthUnit, '');\n return `calc(${factor} * var(--md-typeset-font-size))`;\n }\n }\n // Value is not a number, relative length unit, or CSS variable, return as is\n return value;\n };\n return style.concat(`\n .md-typeset ${heading} {\n color: var(--md-default-fg-color);\n line-height: ${lineHeight};\n font-family: ${fontFamily};\n font-weight: ${fontWeight};\n font-size: ${calculate(fontSize)};\n }\n `);\n}, '')}\n\n.md-typeset .md-content__button {\n color: var(--md-default-fg-color);\n}\n\n.md-typeset hr {\n border-bottom: 0.05rem dotted ${theme.palette.divider};\n}\n\n.md-typeset details {\n font-size: var(--md-typeset-font-size) !important;\n}\n.md-typeset details summary {\n padding-left: 2.5rem !important;\n}\n.md-typeset details summary:before,\n.md-typeset details summary:after {\n top: 50% !important;\n width: 20px !important;\n height: 20px !important;\n transform: rotate(0deg) translateY(-50%) !important;\n}\n.md-typeset details[open] > summary:after {\n transform: rotate(90deg) translateX(-50%) !important;\n}\n\n.md-typeset blockquote {\n color: var(--md-default-fg-color--light);\n border-left: 0.2rem solid var(--md-default-fg-color--light);\n}\n\n.md-typeset table:not([class]) {\n font-size: var(--md-typeset-font-size);\n border: 1px solid var(--md-default-fg-color);\n border-bottom: none;\n border-collapse: collapse;\n border-radius: ${theme.shape.borderRadius}px;\n}\n.md-typeset table:not([class]) th {\n font-weight: bold;\n}\n.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {\n border-bottom: 1px solid var(--md-default-fg-color);\n}\n\n.md-typeset pre > code::-webkit-scrollbar-thumb {\n background-color: hsla(0, 0%, 0%, 0.32);\n}\n.md-typeset pre > code::-webkit-scrollbar-thumb:hover {\n background-color: hsla(0, 0%, 0%, 0.87);\n}\n\n.md-typeset code {\n word-break: keep-all;\n}\n`;\n"],"names":[],"mappings":"AA+BA,MAAM,WAAqC,CAAC,IAAA,EAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"typeset.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/typeset.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 { RuleOptions } from './types';\n\ntype RuleTypography = RuleOptions['theme']['typography'];\n\ntype BackstageTypography = RuleTypography & {\n htmlFontSize?: number;\n};\n\ntype TypographyHeadings = Pick<\n RuleTypography,\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n>;\n\ntype TypographyHeadingsKeys = keyof TypographyHeadings;\n\nconst headings: TypographyHeadingsKeys[] = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\nconst relativeLengthUnit: RegExp = /(em)|(rem)/gi;\nconst cssVariable: RegExp = /var\\(|\\)/gi;\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Typeset ==================*/\n\n.md-typeset {\n font-size: var(--md-typeset-font-size);\n}\n\n${headings.reduce<string>((style, heading) => {\n const htmlFontSize =\n (theme.typography as BackstageTypography).htmlFontSize ?? 16;\n const styles = theme.typography[heading];\n const { lineHeight, fontFamily, fontWeight, fontSize } = styles;\n const calculate = (value: typeof fontSize): string | undefined => {\n if (typeof value === 'number') {\n // Convert px to rem and apply 60% factor\n return calculate(`${(value / htmlFontSize) * 0.6}rem`);\n } else if (typeof value === 'string') {\n if (value.match(cssVariable)) {\n // Resolve css variable and calculate recursively\n const resolvedValue = window\n .getComputedStyle(document.body)\n .getPropertyValue(value.replaceAll(cssVariable, ''));\n if (resolvedValue !== '') {\n return calculate(resolvedValue);\n }\n } else if (value.match(relativeLengthUnit)) {\n // Use relative size as factor\n const factor = value.replace(relativeLengthUnit, '');\n return `calc(${factor} * var(--md-typeset-font-size))`;\n }\n }\n // Value is not a number, relative length unit, or CSS variable, return as is\n return value;\n };\n return style.concat(`\n .md-typeset ${heading} {\n color: var(--md-default-fg-color);\n line-height: ${lineHeight};\n font-family: ${fontFamily};\n font-weight: ${fontWeight};\n font-size: ${calculate(fontSize)};\n }\n `);\n}, '')}\n\n.md-typeset .md-content__button {\n color: var(--md-default-fg-color);\n}\n\n.md-typeset hr {\n border-bottom: 0.05rem dotted ${theme.palette.divider};\n}\n\n.md-typeset details {\n font-size: var(--md-typeset-font-size) !important;\n}\n.md-typeset details summary {\n padding-left: 2.5rem !important;\n}\n.md-typeset details summary:before,\n.md-typeset details summary:after {\n top: 50% !important;\n width: 20px !important;\n height: 20px !important;\n transform: rotate(0deg) translateY(-50%) !important;\n}\n.md-typeset details[open] > summary:after {\n transform: rotate(90deg) translateX(-50%) !important;\n}\n\n.md-typeset blockquote {\n color: var(--md-default-fg-color--light);\n border-left: 0.2rem solid var(--md-default-fg-color--light);\n}\n\n.md-typeset table:not([class]) {\n font-size: var(--md-typeset-font-size);\n border: 1px solid var(--md-default-fg-color);\n border-bottom: none;\n border-collapse: collapse;\n border-radius: ${theme.shape.borderRadius}px;\n}\n.md-typeset table:not([class]) th {\n font-weight: bold;\n}\n.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {\n border-bottom: 1px solid var(--md-default-fg-color);\n}\n\n.md-typeset pre > code::-webkit-scrollbar-thumb {\n background-color: hsla(0, 0%, 0%, 0.32);\n}\n.md-typeset pre > code::-webkit-scrollbar-thumb:hover {\n background-color: hsla(0, 0%, 0%, 0.87);\n}\n\n.md-typeset code {\n word-break: keep-all;\n}\n`;\n"],"names":[],"mappings":"AA+BA,MAAM,WAAqC,CAAC,IAAA,EAAM,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,IAAI,CAAA;AAC9E,MAAM,kBAAA,GAA6B,cAAA;AACnC,MAAM,WAAA,GAAsB,YAAA;AAE5B,cAAe,CAAC,EAAE,KAAA,EAAM,KAAmB;AAAA;;AAAA;AAAA;AAAA;;AAAA,EAOzC,QAAA,CAAS,MAAA,CAAe,CAAC,KAAA,EAAO,OAAA,KAAY;AAC5C,EAAA,MAAM,YAAA,GACH,KAAA,CAAM,UAAA,CAAmC,YAAA,IAAgB,EAAA;AAC5D,EAAA,MAAM,MAAA,GAAS,KAAA,CAAM,UAAA,CAAW,OAAO,CAAA;AACvC,EAAA,MAAM,EAAE,UAAA,EAAY,UAAA,EAAY,UAAA,EAAY,UAAS,GAAI,MAAA;AACzD,EAAA,MAAM,SAAA,GAAY,CAAC,KAAA,KAA+C;AAChE,IAAA,IAAI,OAAO,UAAU,QAAA,EAAU;AAE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A;AAAA;AAAA;AAAA,iBAAA,EA8BpC,KAAA,CAAM,MAAM,YAAY,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variables.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/variables.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 { alpha, lighten } from '@material-ui/core/styles';\nimport { RuleOptions } from './types';\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Variables ==================*/\n/*\n As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.\n As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.\n*/\n\n:host {\n /* FONT */\n --md-default-fg-color: ${theme.palette.text.primary};\n --md-default-fg-color--light: ${theme.palette.text.secondary};\n --md-default-fg-color--lighter: ${lighten(theme.palette.text.secondary, 0.7)};\n --md-default-fg-color--lightest: ${lighten(\n theme.palette.text.secondary,\n 0.3,\n )};\n\n /* BACKGROUND */\n --md-default-bg-color:${theme.palette.background.default};\n --md-default-bg-color--light: ${theme.palette.background.paper};\n --md-default-bg-color--lighter: ${lighten(\n theme.palette.background.paper,\n 0.7,\n )};\n --md-default-bg-color--lightest: ${lighten(\n theme.palette.background.paper,\n 0.3,\n )};\n\n /* PRIMARY */\n --md-primary-fg-color: ${theme.palette.primary.main};\n --md-primary-fg-color--light: ${theme.palette.primary.light};\n --md-primary-fg-color--dark: ${theme.palette.primary.dark};\n --md-primary-bg-color: ${theme.palette.primary.contrastText};\n --md-primary-bg-color--light: ${lighten(\n theme.palette.primary.contrastText,\n 0.7,\n )};\n\n /* ACCENT */\n --md-accent-fg-color: var(--md-primary-fg-color);\n --md-accent-fg-color--transparent: ${alpha(theme.palette.primary.main, 0.1)};\n --md-accent-bg-color: var(--md-primary-bg-color);\n --md-accent-bg-color--light: var(--md-primary-bg-color--light);\n\n /* SHADOW */\n --md-shadow-z1: ${theme.shadows[1]};\n --md-shadow-z2: ${theme.shadows[2]};\n --md-shadow-z3: ${theme.shadows[3]};\n\n /* EXTENSIONS */\n --md-admonition-fg-color: var(--md-default-fg-color);\n --md-admonition-bg-color: var(--md-default-bg-color);\n /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */\n --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z\"/></svg>');\n --md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z\"/></svg>');\n --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z\"/></svg>');\n --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z\"/></svg>');\n --md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>');\n --md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z\"/></svg>');\n --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z\"/></svg>');\n --md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z\"/></svg>');\n --md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z\"/></svg>');\n --md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z\"/></svg>');\n --md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z\"/></svg>');\n --md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z\"/></svg>');\n --md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z\"/></svg>');\n --md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z\"/></svg>');\n --md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"/></svg>');\n --md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>');\n --md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z\"/></svg>');\n --md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z\"/></svg>');\n --md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z\"/></svg>');\n --md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z\"/></svg>');\n --md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z\"/></svg>');\n --md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z\"/></svg>');\n --md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z\"/></svg>');\n --md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z\"/></svg>');\n --md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z\"/></svg>');\n --md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d=\"m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z\"/></svg>');\n \n --md-status--updated: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><title>cellphone-arrow-down</title><path d=\"M17,1H7A2,2 0 0,0 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M17,19H7V5H17V19M16,13H13V8H11V13H8L12,17L16,13Z\" /></svg>');\n --md-status: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z\"/></svg>');\n --md-status--new: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12m-10 5h-2v-2h2v2m0-4h-2V7h2v6Z\"/></svg>');\n --md-status--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8Z\"/></svg>');\n --md-status--encrypted: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4m0 6c1.4 0 2.8 1.1 2.8 2.5V11c.6 0 1.2.6 1.2 1.3v3.5c0 .6-.6 1.2-1.3 1.2H9.2c-.6 0-1.2-.6-1.2-1.3v-3.5c0-.6.6-1.2 1.2-1.2V9.5C9.2 8.1 10.6 7 12 7m0 1.2c-.8 0-1.5.5-1.5 1.3V11h3V9.5c0-.8-.7-1.3-1.5-1.3Z\"/></svg>');\n}\n\n:host > * {\n /* CODE */\n --md-code-fg-color: ${theme.palette.text.primary};\n --md-code-bg-color: ${\n theme.palette.code?.background ?? theme.palette.background.paper\n };\n --md-code-hl-color: ${alpha(theme.palette.warning.main, 0.5)};\n --md-code-hl-color--light: var(--md-code-hl-color);\n --md-code-hl-keyword-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.primary.light\n : theme.palette.primary.dark\n };\n --md-code-hl-function-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.secondary.light\n : theme.palette.secondary.dark\n };\n --md-code-hl-string-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.success.light\n : theme.palette.success.dark\n };\n --md-code-hl-number-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.error.light\n : theme.palette.error.dark\n };\n --md-code-hl-constant-color: var(--md-code-hl-function-color);\n --md-code-hl-special-color: var(--md-code-hl-function-color);\n --md-code-hl-name-color: var(--md-code-fg-color);\n --md-code-hl-comment-color: var(--md-default-fg-color--light);\n --md-code-hl-generic-color: var(--md-default-fg-color--light);\n --md-code-hl-variable-color: var(--md-default-fg-color--light);\n --md-code-hl-operator-color: var(--md-default-fg-color--light);\n --md-code-hl-punctuation-color: var(--md-default-fg-color--light);\n\n /* TYPESET */\n --md-typeset-font-size: 1rem;\n --md-typeset-color: var(--md-default-fg-color);\n --md-typeset-a-color: ${theme.palette.link};\n --md-typeset-table-color: ${theme.palette.text.primary};\n --md-typeset-table-color--light: ${alpha(theme.palette.text.primary, 0.05)};\n --md-typeset-del-color: ${\n theme.palette.type === 'dark'\n ? alpha(theme.palette.error.dark, 0.5)\n : alpha(theme.palette.error.light, 0.5)\n };\n --md-typeset-ins-color: ${\n theme.palette.type === 'dark'\n ? alpha(theme.palette.success.dark, 0.5)\n : alpha(theme.palette.success.light, 0.5)\n };\n --md-typeset-mark-color: ${\n theme.palette.type === 'dark'\n ? alpha(theme.palette.warning.dark, 0.5)\n : alpha(theme.palette.warning.light, 0.5)\n };\n --md-typeset-kbd-color: var(--md-code-bg-color);\n --md-typeset-kbd-accent-color var(--md-code-bg-color);\n --md-typeset-kbd-border-color: var(--md-default-fg-color--light);\n}\n\n@media screen and (max-width: 76.1875em) {\n :host > * {\n /* TYPESET */\n --md-typeset-font-size: .9rem;\n }\n}\n\n@media screen and (max-width: 600px) {\n :host > * {\n /* TYPESET */\n --md-typeset-font-size: .7rem;\n }\n}\n\n --md-footer-bg-color: var(--md-default-bg-color);\n --md-footer-bg-color--dark: var(--md-default-bg-color);\n`;\n"],"names":[],"mappings":";;AAmBA,gBAAe,CAAC,EAAE,KAAA,EAAyB,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,yBAShB,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA,gCACnB,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,SAAS,CAAA;AAAA,kCAAA,EAC1B,QAAQ,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,SAAA,EAAW,GAAG,CAAC,CAAA;AAAA,mCACzC,EAAA,OAAA;AAAA,EACjC,KAAA,CAAM,QAAQ,IAAK,CAAA,SAAA;AAAA,EACnB;AACF,CAAC,CAAA;;AAAA;AAAA,wBAGuB,EAAA,KAAA,CAAM,OAAQ,CAAA,UAAA,CAAW,OAAO,CAAA;AAAA,gCACxB,EAAA,KAAA,CAAM,OAAQ,CAAA,UAAA,CAAW,KAAK,CAAA;AAAA,kCAC5B,EAAA,OAAA;AAAA,EAChC,KAAA,CAAM,QAAQ,UAAW,CAAA,KAAA;AAAA,EACzB;AACF,CAAC,CAAA;AAAA,mCACkC,EAA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,CAAA;AAAA,0BAAA,EAEE,MAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,KAAA,CAAM,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAM,EAAA,GAAG,IACrC,KAAM,CAAA,KAAA,CAAM,QAAQ,OAAQ,CAAA,KAAA,EAAO,GAAG,CAC5C,CAAA;AAAA,2BAAA,EAEE,MAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,KAAA,CAAM,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAM,EAAA,GAAG,IACrC,KAAM,CAAA,KAAA,CAAM,QAAQ,OAAQ,CAAA,KAAA,EAAO,GAAG,CAC5C,CAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"variables.esm.js","sources":["../../../../../src/reader/transformers/styles/rules/variables.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 { alpha, lighten } from '@material-ui/core/styles';\nimport { RuleOptions } from './types';\n\nexport default ({ theme }: RuleOptions) => `\n/*================== Variables ==================*/\n/*\n As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.\n As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.\n*/\n\n:host {\n /* FONT */\n --md-default-fg-color: ${theme.palette.text.primary};\n --md-default-fg-color--light: ${theme.palette.text.secondary};\n --md-default-fg-color--lighter: ${lighten(theme.palette.text.secondary, 0.7)};\n --md-default-fg-color--lightest: ${lighten(\n theme.palette.text.secondary,\n 0.3,\n )};\n\n /* BACKGROUND */\n --md-default-bg-color:${theme.palette.background.default};\n --md-default-bg-color--light: ${theme.palette.background.paper};\n --md-default-bg-color--lighter: ${lighten(\n theme.palette.background.paper,\n 0.7,\n )};\n --md-default-bg-color--lightest: ${lighten(\n theme.palette.background.paper,\n 0.3,\n )};\n\n /* PRIMARY */\n --md-primary-fg-color: ${theme.palette.primary.main};\n --md-primary-fg-color--light: ${theme.palette.primary.light};\n --md-primary-fg-color--dark: ${theme.palette.primary.dark};\n --md-primary-bg-color: ${theme.palette.primary.contrastText};\n --md-primary-bg-color--light: ${lighten(\n theme.palette.primary.contrastText,\n 0.7,\n )};\n\n /* ACCENT */\n --md-accent-fg-color: var(--md-primary-fg-color);\n --md-accent-fg-color--transparent: ${alpha(theme.palette.primary.main, 0.1)};\n --md-accent-bg-color: var(--md-primary-bg-color);\n --md-accent-bg-color--light: var(--md-primary-bg-color--light);\n\n /* SHADOW */\n --md-shadow-z1: ${theme.shadows[1]};\n --md-shadow-z2: ${theme.shadows[2]};\n --md-shadow-z3: ${theme.shadows[3]};\n\n /* EXTENSIONS */\n --md-admonition-fg-color: var(--md-default-fg-color);\n --md-admonition-bg-color: var(--md-default-bg-color);\n /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */\n --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z\"/></svg>');\n --md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z\"/></svg>');\n --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z\"/></svg>');\n --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z\"/></svg>');\n --md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>');\n --md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z\"/></svg>');\n --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z\"/></svg>');\n --md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z\"/></svg>');\n --md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z\"/></svg>');\n --md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z\"/></svg>');\n --md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z\"/></svg>');\n --md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z\"/></svg>');\n --md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z\"/></svg>');\n --md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z\"/></svg>');\n --md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"/></svg>');\n --md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>');\n --md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z\"/></svg>');\n --md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z\"/></svg>');\n --md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z\"/></svg>');\n --md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z\"/></svg>');\n --md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z\"/></svg>');\n --md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z\"/></svg>');\n --md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z\"/></svg>');\n --md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z\"/></svg>');\n --md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z\"/></svg>');\n --md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d=\"m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z\"/></svg>');\n \n --md-status--updated: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><title>cellphone-arrow-down</title><path d=\"M17,1H7A2,2 0 0,0 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M17,19H7V5H17V19M16,13H13V8H11V13H8L12,17L16,13Z\" /></svg>');\n --md-status: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z\"/></svg>');\n --md-status--new: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12m-10 5h-2v-2h2v2m0-4h-2V7h2v6Z\"/></svg>');\n --md-status--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8Z\"/></svg>');\n --md-status--encrypted: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4m0 6c1.4 0 2.8 1.1 2.8 2.5V11c.6 0 1.2.6 1.2 1.3v3.5c0 .6-.6 1.2-1.3 1.2H9.2c-.6 0-1.2-.6-1.2-1.3v-3.5c0-.6.6-1.2 1.2-1.2V9.5C9.2 8.1 10.6 7 12 7m0 1.2c-.8 0-1.5.5-1.5 1.3V11h3V9.5c0-.8-.7-1.3-1.5-1.3Z\"/></svg>');\n}\n\n:host > * {\n /* CODE */\n --md-code-fg-color: ${theme.palette.text.primary};\n --md-code-bg-color: ${\n theme.palette.code?.background ?? theme.palette.background.paper\n };\n --md-code-hl-color: ${alpha(theme.palette.warning.main, 0.5)};\n --md-code-hl-color--light: var(--md-code-hl-color);\n --md-code-hl-keyword-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.primary.light\n : theme.palette.primary.dark\n };\n --md-code-hl-function-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.secondary.light\n : theme.palette.secondary.dark\n };\n --md-code-hl-string-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.success.light\n : theme.palette.success.dark\n };\n --md-code-hl-number-color: ${\n theme.palette.type === 'dark'\n ? theme.palette.error.light\n : theme.palette.error.dark\n };\n --md-code-hl-constant-color: var(--md-code-hl-function-color);\n --md-code-hl-special-color: var(--md-code-hl-function-color);\n --md-code-hl-name-color: var(--md-code-fg-color);\n --md-code-hl-comment-color: var(--md-default-fg-color--light);\n --md-code-hl-generic-color: var(--md-default-fg-color--light);\n --md-code-hl-variable-color: var(--md-default-fg-color--light);\n --md-code-hl-operator-color: var(--md-default-fg-color--light);\n --md-code-hl-punctuation-color: var(--md-default-fg-color--light);\n\n /* TYPESET */\n --md-typeset-font-size: 1rem;\n --md-typeset-color: var(--md-default-fg-color);\n --md-typeset-a-color: ${theme.palette.link};\n --md-typeset-table-color: ${theme.palette.text.primary};\n --md-typeset-table-color--light: ${alpha(theme.palette.text.primary, 0.05)};\n --md-typeset-del-color: ${\n theme.palette.type === 'dark'\n ? alpha(theme.palette.error.dark, 0.5)\n : alpha(theme.palette.error.light, 0.5)\n };\n --md-typeset-ins-color: ${\n theme.palette.type === 'dark'\n ? alpha(theme.palette.success.dark, 0.5)\n : alpha(theme.palette.success.light, 0.5)\n };\n --md-typeset-mark-color: ${\n theme.palette.type === 'dark'\n ? alpha(theme.palette.warning.dark, 0.5)\n : alpha(theme.palette.warning.light, 0.5)\n };\n --md-typeset-kbd-color: var(--md-code-bg-color);\n --md-typeset-kbd-accent-color var(--md-code-bg-color);\n --md-typeset-kbd-border-color: var(--md-default-fg-color--light);\n}\n\n@media screen and (max-width: 76.1875em) {\n :host > * {\n /* TYPESET */\n --md-typeset-font-size: .9rem;\n }\n}\n\n@media screen and (max-width: 600px) {\n :host > * {\n /* TYPESET */\n --md-typeset-font-size: .7rem;\n }\n}\n\n --md-footer-bg-color: var(--md-default-bg-color);\n --md-footer-bg-color--dark: var(--md-default-bg-color);\n`;\n"],"names":[],"mappings":";;AAmBA,gBAAe,CAAC,EAAE,KAAA,EAAM,KAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,yBAAA,EAShB,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAO,CAAA;AAAA,gCAAA,EACnB,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AAAA,kCAAA,EAC1B,QAAQ,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,SAAA,EAAW,GAAG,CAAC,CAAA;AAAA,mCAAA,EACzC,OAAA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A,EACd,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAO,CAAA;AAAA,mCAAA,EACnB,MAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA,EAAS,IAAI,CAAC,CAAA;AAAA,0BAAA,EAExE,MAAM,OAAA,CAAQ,IAAA,KAAS,MAAA,GACnB,KAAA,CAAM,MAAM,OAAA,CAAQ,KAAA,CAAM,IAAA,EAAM,GAAG,IACnC,KAAA,CAAM,KAAA,CAAM,QAAQ,KAAA,CAAM,KAAA,EAAO,GAAG,CAC1C,CAAA;AAAA,0BAAA,EAEE,MAAM,OAAA,CAAQ,IAAA,KAAS,MAAA,GACnB,KAAA,CAAM,MAAM,OAAA,CAAQ,OAAA,CAAQ,IAAA,EAAM,GAAG,IACrC,KAAA,CAAM,KAAA,CAAM,QAAQ,OAAA,CAAQ,KAAA,EAAO,GAAG,CAC5C,CAAA;AAAA,2BAAA,EAEE,MAAM,OAAA,CAAQ,IAAA,KAAS,MAAA,GACnB,KAAA,CAAM,MAAM,OAAA,CAAQ,OAAA,CAAQ,IAAA,EAAM,GAAG,IACrC,KAAA,CAAM,KAAA,CAAM,QAAQ,OAAA,CAAQ,KAAA,EAAO,GAAG,CAC5C,CAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,CAAA;;;;"}
|
|
@@ -3,7 +3,19 @@ import { useTheme } from '@material-ui/core/styles';
|
|
|
3
3
|
import { useSidebarPinState } from '@backstage/core-components';
|
|
4
4
|
import { rules } from './rules/rules.esm.js';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const SIDEBAR_WIDTH = 224;
|
|
7
|
+
const useSidebar = () => {
|
|
8
|
+
const pinState = useSidebarPinState();
|
|
9
|
+
const hasSidebar = useMemo(
|
|
10
|
+
() => typeof window !== "undefined" && Boolean(document.querySelector('[class*="BackstageSidebar"]')),
|
|
11
|
+
[]
|
|
12
|
+
);
|
|
13
|
+
return {
|
|
14
|
+
isPinned: pinState.isPinned,
|
|
15
|
+
isPresent: hasSidebar,
|
|
16
|
+
width: SIDEBAR_WIDTH
|
|
17
|
+
};
|
|
18
|
+
};
|
|
7
19
|
const useRuleStyles = () => {
|
|
8
20
|
const sidebar = useSidebar();
|
|
9
21
|
const theme = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.esm.js","sources":["../../../../src/reader/transformers/styles/transformer.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 { useCallback, useMemo } from 'react';\nimport { useTheme } from '@material-ui/core/styles';\nimport { useSidebarPinState } from '@backstage/core-components';\nimport { Transformer } from '../transformer';\nimport { rules } from './rules';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"transformer.esm.js","sources":["../../../../src/reader/transformers/styles/transformer.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 { useCallback, useMemo } from 'react';\nimport { useTheme } from '@material-ui/core/styles';\nimport { useSidebarPinState } from '@backstage/core-components';\nimport { Transformer } from '../transformer';\nimport { rules } from './rules';\n\nconst SIDEBAR_WIDTH = 224;\n/**\n * Enhanced sidebar state that detects presence through CSS environment.\n */\nconst useSidebar = () => {\n const pinState = useSidebarPinState();\n\n const hasSidebar = useMemo(\n () =>\n typeof window !== 'undefined' &&\n Boolean(document.querySelector('[class*=\"BackstageSidebar\"]')),\n [],\n );\n\n return {\n isPinned: pinState.isPinned,\n isPresent: hasSidebar,\n width: SIDEBAR_WIDTH,\n };\n};\n\n/**\n * Process all rules and concatenate their definitions into a single style.\n * @returns a string containing all processed style definitions.\n */\nconst useRuleStyles = () => {\n const sidebar = useSidebar();\n const theme = useTheme();\n\n return useMemo(() => {\n const options = { theme, sidebar };\n return rules.reduce<string>((styles, rule) => styles + rule(options), '');\n }, [theme, sidebar]);\n};\n\n/**\n * Returns a transformer that inserts all style rules into the given element's head tag.\n */\nexport const useStylesTransformer = (): Transformer => {\n const styles = useRuleStyles();\n\n return useCallback(\n (dom: Element) => {\n dom\n .getElementsByTagName('head')[0]\n .insertAdjacentHTML('beforeend', `<style>${styles}</style>`);\n return dom;\n },\n [styles],\n );\n};\n"],"names":[],"mappings":";;;;;AAsBA,MAAM,aAAA,GAAgB,GAAA;AAItB,MAAM,aAAa,MAAM;AACvB,EAAA,MAAM,WAAW,kBAAA,EAAmB;AAEpC,EAAA,MAAM,UAAA,GAAa,OAAA;AAAA,IACjB,MACE,OAAO,MAAA,KAAW,WAAA,IAClB,QAAQ,QAAA,CAAS,aAAA,CAAc,6BAA6B,CAAC,CAAA;AAAA,IAC/D;AAAC,GACH;AAEA,EAAA,OAAO;AAAA,IACL,UAAU,QAAA,CAAS,QAAA;AAAA,IACnB,SAAA,EAAW,UAAA;AAAA,IACX,KAAA,EAAO;AAAA,GACT;AACF,CAAA;AAMA,MAAM,gBAAgB,MAAM;AAC1B,EAAA,MAAM,UAAU,UAAA,EAAW;AAC3B,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,MAAM,OAAA,GAAU,EAAE,KAAA,EAAO,OAAA,EAAQ;AACjC,IAAA,OAAO,KAAA,CAAM,OAAe,CAAC,MAAA,EAAQ,SAAS,MAAA,GAAS,IAAA,CAAK,OAAO,CAAA,EAAG,EAAE,CAAA;AAAA,EAC1E,CAAA,EAAG,CAAC,KAAA,EAAO,OAAO,CAAC,CAAA;AACrB,CAAA;AAKO,MAAM,uBAAuB,MAAmB;AACrD,EAAA,MAAM,SAAS,aAAA,EAAc;AAE7B,EAAA,OAAO,WAAA;AAAA,IACL,CAAC,GAAA,KAAiB;AAChB,MAAA,GAAA,CACG,oBAAA,CAAqB,MAAM,CAAA,CAAE,CAAC,EAC9B,kBAAA,CAAmB,WAAA,EAAa,CAAA,OAAA,EAAU,MAAM,CAAA,QAAA,CAAU,CAAA;AAC7D,MAAA,OAAO,GAAA;AAAA,IACT,CAAA;AAAA,IACA,CAAC,MAAM;AAAA,GACT;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.esm.js","sources":["../../../src/reader/transformers/transformer.ts"],"sourcesContent":["/*\n * Copyright 2020 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 type Transformer = (dom: Element) => Element | Promise<Element>;\n\nexport const transform = async (\n html: string | Element,\n transformers: Transformer[],\n): Promise<Element> => {\n let dom: Element;\n\n if (typeof html === 'string') {\n dom = new DOMParser().parseFromString(html, 'text/html').documentElement;\n } else if (html instanceof Element) {\n dom = html;\n } else {\n throw new Error('dom is not a recognized type');\n }\n\n for (const transformer of transformers) {\n dom = await transformer(dom);\n }\n\n return dom;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transformer.esm.js","sources":["../../../src/reader/transformers/transformer.ts"],"sourcesContent":["/*\n * Copyright 2020 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 type Transformer = (dom: Element) => Element | Promise<Element>;\n\nexport const transform = async (\n html: string | Element,\n transformers: Transformer[],\n): Promise<Element> => {\n let dom: Element;\n\n if (typeof html === 'string') {\n dom = new DOMParser().parseFromString(html, 'text/html').documentElement;\n } else if (html instanceof Element) {\n dom = html;\n } else {\n throw new Error('dom is not a recognized type');\n }\n\n for (const transformer of transformers) {\n dom = await transformer(dom);\n }\n\n return dom;\n};\n"],"names":[],"mappings":"AAkBO,MAAM,SAAA,GAAY,OACvB,IAAA,EACA,YAAA,KACqB;AACrB,EAAA,IAAI,GAAA;AAEJ,EAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,IAAA,GAAA,GAAM,IAAI,SAAA,EAAU,CAAE,eAAA,CAAgB,IAAA,EAAM,WAAW,CAAA,CAAE,eAAA;AAAA,EAC3D,CAAA,MAAA,IAAW,gBAAgB,OAAA,EAAS;AAClC,IAAA,GAAA,GAAM,IAAA;AAAA,EACR,CAAA,MAAO;AACL,IAAA,MAAM,IAAI,MAAM,8BAA8B,CAAA;AAAA,EAChD;AAEA,EAAA,KAAA,MAAW,eAAe,YAAA,EAAc;AACtC,IAAA,GAAA,GAAM,MAAM,YAAY,GAAG,CAAA;AAAA,EAC7B;AAEA,EAAA,OAAO,GAAA;AACT;;;;"}
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'techdocs:index-page',\n});\n\nexport const rootDocsRouteRef = createRouteRef({\n id: 'techdocs:reader-page',\n params: ['namespace', 'kind', 'name'],\n});\n\nexport const rootCatalogDocsRouteRef = createRouteRef({\n id: 'techdocs:catalog-reader-view',\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'techdocs:index-page',\n});\n\nexport const rootDocsRouteRef = createRouteRef({\n id: 'techdocs:reader-page',\n params: ['namespace', 'kind', 'name'],\n});\n\nexport const rootCatalogDocsRouteRef = createRouteRef({\n id: 'techdocs:catalog-reader-view',\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC;AAEM,MAAM,mBAAmB,cAAA,CAAe;AAAA,EAC7C,EAAA,EAAI,sBAAA;AAAA,EACJ,MAAA,EAAQ,CAAC,WAAA,EAAa,MAAA,EAAQ,MAAM;AACtC,CAAC;AAEM,MAAM,0BAA0B,cAAA,CAAe;AAAA,EACpD,EAAA,EAAI;AACN,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsSearch.esm.js","sources":["../../../src/search/components/TechDocsSearch.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 { CompoundEntityRef } from '@backstage/catalog-model';\nimport { ResultHighlight } from '@backstage/plugin-search-common';\nimport {\n SearchAutocomplete,\n SearchContextProvider,\n useSearch,\n} from '@backstage/plugin-search-react';\nimport { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { TechDocsSearchResultListItem } from './TechDocsSearchResultListItem';\n\n/**\n * Props for {@link TechDocsSearch}\n *\n * @public\n */\nexport type TechDocsSearchProps = {\n entityId: CompoundEntityRef;\n entityTitle?: string;\n debounceTime?: number;\n searchResultUrlMapper?: (url: string) => string;\n};\n\ntype TechDocsDoc = {\n namespace: string;\n kind: string;\n name: string;\n path: string;\n location: string;\n title: string;\n};\n\ntype TechDocsSearchResult = {\n type: string;\n document: TechDocsDoc;\n highlight?: ResultHighlight;\n};\n\nconst isTechDocsSearchResult = (\n option: any,\n): option is TechDocsSearchResult => {\n return option?.document;\n};\n\nconst TechDocsSearchBar = (props: TechDocsSearchProps) => {\n const {\n entityId,\n entityTitle,\n debounceTime = 150,\n searchResultUrlMapper,\n } = props;\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const {\n setFilters,\n term,\n result: { loading, value: searchVal },\n } = useSearch();\n const [options, setOptions] = useState<any[]>([]);\n useEffect(() => {\n let mounted = true;\n\n if (mounted && searchVal) {\n // TODO: Change this into getting only subset of search results from the BE in the first place\n // once pagination is implemented for search engines\n // See: https://github.com/backstage/backstage/issues/6062\n const searchResults = searchVal.results.slice(0, 10);\n setOptions(searchResults);\n }\n return () => {\n mounted = false;\n };\n }, [loading, searchVal]);\n\n // Update the filter context when the entityId changes, e.g. when the search\n // bar continues to be rendered, navigating between different TechDocs sites.\n const { kind, name, namespace } = entityId;\n useEffect(() => {\n setFilters(prevFilters => {\n return {\n ...prevFilters,\n kind,\n namespace,\n name,\n };\n });\n }, [kind, namespace, name, setFilters]);\n\n const handleSelection = (\n _: any,\n selection: TechDocsSearchResult | string | null,\n ) => {\n if (isTechDocsSearchResult(selection)) {\n const { location } = selection.document;\n navigate(\n searchResultUrlMapper ? searchResultUrlMapper(location) : location,\n );\n }\n };\n\n return (\n <SearchAutocomplete\n data-testid=\"techdocs-search-bar\"\n size=\"small\"\n open={open && Boolean(term)}\n getOptionLabel={() => ''}\n filterOptions={x => {\n return x; // This is needed to get renderOption to be called after options change. Bug in material-ui?\n }}\n onClose={() => {\n setOpen(false);\n }}\n onOpen={() => {\n setOpen(true);\n }}\n onChange={handleSelection}\n blurOnSelect\n noOptionsText=\"No results found\"\n value={null}\n options={options}\n renderOption={({ document, highlight }) => (\n <TechDocsSearchResultListItem\n result={document}\n lineClamp={3}\n asListItem={false}\n asLink={false}\n title={document.title}\n highlight={highlight}\n />\n )}\n loading={loading}\n inputDebounceTime={debounceTime}\n inputPlaceholder={`Search ${entityTitle || entityId.name} docs`}\n freeSolo={false}\n />\n );\n};\n\n/**\n * Component used to render search bar on TechDocs page, scoped to\n *\n * @public\n */\nexport const TechDocsSearch = (props: TechDocsSearchProps) => {\n const initialState = {\n term: '',\n types: ['techdocs'],\n pageCursor: '',\n filters: props.entityId,\n };\n return (\n <SearchContextProvider initialState={initialState}>\n <TechDocsSearchBar {...props} />\n </SearchContextProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsDA,MAAM,sBAAA,GAAyB,CAC7B,
|
|
1
|
+
{"version":3,"file":"TechDocsSearch.esm.js","sources":["../../../src/search/components/TechDocsSearch.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 { CompoundEntityRef } from '@backstage/catalog-model';\nimport { ResultHighlight } from '@backstage/plugin-search-common';\nimport {\n SearchAutocomplete,\n SearchContextProvider,\n useSearch,\n} from '@backstage/plugin-search-react';\nimport { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { TechDocsSearchResultListItem } from './TechDocsSearchResultListItem';\n\n/**\n * Props for {@link TechDocsSearch}\n *\n * @public\n */\nexport type TechDocsSearchProps = {\n entityId: CompoundEntityRef;\n entityTitle?: string;\n debounceTime?: number;\n searchResultUrlMapper?: (url: string) => string;\n};\n\ntype TechDocsDoc = {\n namespace: string;\n kind: string;\n name: string;\n path: string;\n location: string;\n title: string;\n};\n\ntype TechDocsSearchResult = {\n type: string;\n document: TechDocsDoc;\n highlight?: ResultHighlight;\n};\n\nconst isTechDocsSearchResult = (\n option: any,\n): option is TechDocsSearchResult => {\n return option?.document;\n};\n\nconst TechDocsSearchBar = (props: TechDocsSearchProps) => {\n const {\n entityId,\n entityTitle,\n debounceTime = 150,\n searchResultUrlMapper,\n } = props;\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const {\n setFilters,\n term,\n result: { loading, value: searchVal },\n } = useSearch();\n const [options, setOptions] = useState<any[]>([]);\n useEffect(() => {\n let mounted = true;\n\n if (mounted && searchVal) {\n // TODO: Change this into getting only subset of search results from the BE in the first place\n // once pagination is implemented for search engines\n // See: https://github.com/backstage/backstage/issues/6062\n const searchResults = searchVal.results.slice(0, 10);\n setOptions(searchResults);\n }\n return () => {\n mounted = false;\n };\n }, [loading, searchVal]);\n\n // Update the filter context when the entityId changes, e.g. when the search\n // bar continues to be rendered, navigating between different TechDocs sites.\n const { kind, name, namespace } = entityId;\n useEffect(() => {\n setFilters(prevFilters => {\n return {\n ...prevFilters,\n kind,\n namespace,\n name,\n };\n });\n }, [kind, namespace, name, setFilters]);\n\n const handleSelection = (\n _: any,\n selection: TechDocsSearchResult | string | null,\n ) => {\n if (isTechDocsSearchResult(selection)) {\n const { location } = selection.document;\n navigate(\n searchResultUrlMapper ? searchResultUrlMapper(location) : location,\n );\n }\n };\n\n return (\n <SearchAutocomplete\n data-testid=\"techdocs-search-bar\"\n size=\"small\"\n open={open && Boolean(term)}\n getOptionLabel={() => ''}\n filterOptions={x => {\n return x; // This is needed to get renderOption to be called after options change. Bug in material-ui?\n }}\n onClose={() => {\n setOpen(false);\n }}\n onOpen={() => {\n setOpen(true);\n }}\n onChange={handleSelection}\n blurOnSelect\n noOptionsText=\"No results found\"\n value={null}\n options={options}\n renderOption={({ document, highlight }) => (\n <TechDocsSearchResultListItem\n result={document}\n lineClamp={3}\n asListItem={false}\n asLink={false}\n title={document.title}\n highlight={highlight}\n />\n )}\n loading={loading}\n inputDebounceTime={debounceTime}\n inputPlaceholder={`Search ${entityTitle || entityId.name} docs`}\n freeSolo={false}\n />\n );\n};\n\n/**\n * Component used to render search bar on TechDocs page, scoped to\n *\n * @public\n */\nexport const TechDocsSearch = (props: TechDocsSearchProps) => {\n const initialState = {\n term: '',\n types: ['techdocs'],\n pageCursor: '',\n filters: props.entityId,\n };\n return (\n <SearchContextProvider initialState={initialState}>\n <TechDocsSearchBar {...props} />\n </SearchContextProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsDA,MAAM,sBAAA,GAAyB,CAC7B,MAAA,KACmC;AACnC,EAAA,OAAO,MAAA,EAAQ,QAAA;AACjB,CAAA;AAEA,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAA+B;AACxD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA,GAAe,GAAA;AAAA,IACf;AAAA,GACF,GAAI,KAAA;AACJ,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM;AAAA,IACJ,UAAA;AAAA,IACA,IAAA;AAAA,IACA,MAAA,EAAQ,EAAE,OAAA,EAAS,KAAA,EAAO,SAAA;AAAU,MAClC,SAAA,EAAU;AACd,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,QAAA,CAAgB,EAAE,CAAA;AAChD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,OAAA,GAAU,IAAA;AAEd,IAAA,IAAI,WAAW,SAAA,EAAW;AAIxB,MAAA,MAAM,aAAA,GAAgB,SAAA,CAAU,OAAA,CAAQ,KAAA,CAAM,GAAG,EAAE,CAAA;AACnD,MAAA,UAAA,CAAW,aAAa,CAAA;AAAA,IAC1B;AACA,IAAA,OAAO,MAAM;AACX,MAAA,OAAA,GAAU,KAAA;AAAA,IACZ,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,OAAA,EAAS,SAAS,CAAC,CAAA;AAIvB,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,SAAA,EAAU,GAAI,QAAA;AAClC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,UAAA,CAAW,CAAA,WAAA,KAAe;AACxB,MAAA,OAAO;AAAA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Z,MAAA,EAAQ,KAAA;AAAA,UACR,OAAO,QAAA,CAAS,KAAA;AAAA,UAChB;AAAA;AAAA,OACF;AAAA,MAEF,OAAA;AAAA,MACA,iBAAA,EAAmB,YAAA;AAAA,MACnB,gBAAA,EAAkB,CAAA,OAAA,EAAU,WAAA,IAAe,QAAA,CAAS,IAAI,CAAA,KAAA,CAAA;AAAA,MACxD,QAAA,EAAU;AAAA;AAAA,GACZ;AAEJ,CAAA;AAOO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAA+B;AAC5D,EAAA,MAAM,YAAA,GAAe;AAAA,IACnB,IAAA,EAAM,EAAA;AAAA,IACN,KAAA,EAAO,CAAC,UAAU,CAAA;AAAA,IAClB,UAAA,EAAY,EAAA;AAAA,IACZ,SAAS,KAAA,CAAM;AAAA,GACjB;AACA,EAAA,2BACG,qBAAA,EAAA,EAAsB,YAAA,EACrB,8BAAC,iBAAA,EAAA,EAAmB,GAAG,OAAO,CAAA,EAChC,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsSearchResultListItem.esm.js","sources":["../../../src/search/components/TechDocsSearchResultListItem.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 { PropsWithChildren, ReactNode } from 'react';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { Link } from '@backstage/core-components';\nimport { ResultHighlight } from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\n\nconst useStyles = makeStyles({\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n marginBottom: '1rem',\n },\n});\n\n/**\n * Props for {@link TechDocsSearchResultListItem}.\n *\n * @public\n */\nexport type TechDocsSearchResultListItemProps = {\n icon?: ReactNode | ((result: any) => ReactNode);\n result?: any;\n highlight?: ResultHighlight;\n rank?: number;\n lineClamp?: number;\n asListItem?: boolean;\n asLink?: boolean;\n title?: string;\n};\n\n/**\n * Component which renders documentation and related metadata.\n *\n * @public\n */\nexport const TechDocsSearchResultListItem = (\n props: TechDocsSearchResultListItemProps,\n) => {\n const {\n result,\n highlight,\n lineClamp = 5,\n asListItem = true,\n asLink = true,\n title,\n icon,\n } = props;\n const classes = useStyles();\n\n const LinkWrapper = ({ children }: PropsWithChildren<{}>) =>\n asLink ? (\n <Link noTrack to={result.location}>\n {children}\n </Link>\n ) : (\n <>{children}</>\n );\n\n const TextItem = () => {\n const resultTitle = highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={highlight.fields.title}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.title\n );\n\n const entityTitle = highlight?.fields.entityTitle ? (\n <HighlightedSearchResultText\n text={highlight.fields.entityTitle}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.entityTitle\n );\n\n const resultName = highlight?.fields.name ? (\n <HighlightedSearchResultText\n text={highlight.fields.name}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.name\n );\n\n if (!result) return null;\n\n return (\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <LinkWrapper>\n {title ? (\n title\n ) : (\n <>\n {resultTitle} | {entityTitle ?? resultName} docs\n </>\n )}\n </LinkWrapper>\n }\n secondary={\n <Typography\n component=\"span\"\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lineClamp,\n overflow: 'hidden',\n }}\n color=\"textSecondary\"\n variant=\"body2\"\n >\n {highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={highlight.fields.text}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.text\n )}\n </Typography>\n }\n />\n );\n };\n\n const ListItemWrapper = ({ children }: PropsWithChildren<{}>) =>\n asListItem ? (\n <>\n {icon && (\n <ListItemIcon>\n {typeof icon === 'function' ? icon(result) : icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>{children}</div>\n </>\n ) : (\n <>{children}</>\n );\n\n return (\n <ListItemWrapper>\n <TextItem />\n </ListItemWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"TechDocsSearchResultListItem.esm.js","sources":["../../../src/search/components/TechDocsSearchResultListItem.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 { PropsWithChildren, ReactNode } from 'react';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { Link } from '@backstage/core-components';\nimport { ResultHighlight } from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\n\nconst useStyles = makeStyles({\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n marginBottom: '1rem',\n },\n});\n\n/**\n * Props for {@link TechDocsSearchResultListItem}.\n *\n * @public\n */\nexport type TechDocsSearchResultListItemProps = {\n icon?: ReactNode | ((result: any) => ReactNode);\n result?: any;\n highlight?: ResultHighlight;\n rank?: number;\n lineClamp?: number;\n asListItem?: boolean;\n asLink?: boolean;\n title?: string;\n};\n\n/**\n * Component which renders documentation and related metadata.\n *\n * @public\n */\nexport const TechDocsSearchResultListItem = (\n props: TechDocsSearchResultListItemProps,\n) => {\n const {\n result,\n highlight,\n lineClamp = 5,\n asListItem = true,\n asLink = true,\n title,\n icon,\n } = props;\n const classes = useStyles();\n\n const LinkWrapper = ({ children }: PropsWithChildren<{}>) =>\n asLink ? (\n <Link noTrack to={result.location}>\n {children}\n </Link>\n ) : (\n <>{children}</>\n );\n\n const TextItem = () => {\n const resultTitle = highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={highlight.fields.title}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.title\n );\n\n const entityTitle = highlight?.fields.entityTitle ? (\n <HighlightedSearchResultText\n text={highlight.fields.entityTitle}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.entityTitle\n );\n\n const resultName = highlight?.fields.name ? (\n <HighlightedSearchResultText\n text={highlight.fields.name}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.name\n );\n\n if (!result) return null;\n\n return (\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <LinkWrapper>\n {title ? (\n title\n ) : (\n <>\n {resultTitle} | {entityTitle ?? resultName} docs\n </>\n )}\n </LinkWrapper>\n }\n secondary={\n <Typography\n component=\"span\"\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lineClamp,\n overflow: 'hidden',\n }}\n color=\"textSecondary\"\n variant=\"body2\"\n >\n {highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={highlight.fields.text}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.text\n )}\n </Typography>\n }\n />\n );\n };\n\n const ListItemWrapper = ({ children }: PropsWithChildren<{}>) =>\n asListItem ? (\n <>\n {icon && (\n <ListItemIcon>\n {typeof icon === 'function' ? icon(result) : icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>{children}</div>\n </>\n ) : (\n <>{children}</>\n );\n\n return (\n <ListItemWrapper>\n <TextItem />\n </ListItemWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,aAAA,EAAe;AAAA,IACb,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,MAAA;AAAA,IACP,YAAA,EAAc;AAAA;AAElB,CAAC,CAAA;AAuBM,MAAM,4BAAA,GAA+B,CAC1C,KAAA,KACG;AACH,EAAA,MAAM;AAAA,IACJ,MAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA,GAAY,CAAA;AAAA,IACZ,UAAA,GAAa,IAAA;AAAA,IACb,MAAA,GAAS,IAAA;AAAA,IACT,KAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AACJ,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,MAAM,cAAc,CAAC,EAAE,QAAA,EAAS,KAC9B,yBACE,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAO,IAAA,EAAC,IAAI,MAAA,CAAO,QAAA,EACtB,QAAA,EACH,CAAA,mCAEG,QAAA,EAAS,CAAA;AAGhB,EAAA,MAAM,WAAW,MAAM;AACrB,IAAA,MAAM,WAAA,GAAc,SAAA,EAAW,MAAA,CAAO,KAAA,mBACpC,GAAA;AAAA,MAAC,2BAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,UAAU,MAAA,CAAO,KAAA;AAAA,QACvB,QAAQ,SAAA,CAAU,MAAA;AAAA,QAClB,SAAS,SAAA,CAAU;AAAA;AAAA,QAGrB,MAAA,CAAO,KAAA;AAGT,IAAA,MAAM,WAA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QAAA,EAAA,SAAA,EAAW,OAAO,IAAA,mBACjB,GAAA;AAAA,cAAC,2BAAA;AAAA,cAAA;AAAA,gBACC,IAAA,EAAM,UAAU,MAAA,CAAO,IAAA;AAAA,gBACvB,QAAQ,SAAA,CAAU,MAAA;AAAA,gBAClB,SAAS,SAAA,CAAU;AAAA;AAAA,gBAGrB,MAAA,CAAO;AAAA;AAAA;AAEX;AAAA,KAEJ;AAAA,EAEJ,CAAA;AAEA,EAAA,MAAM,kBAAkB,CAAC,EAAE,QAAA,EAAS,KAClC,6BACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,IAAA,oBACC,GAAA,CAAC,gBACE,QAAA,EAAA,OAAO,IAAA,KAAS,aAAa,IAAA,CAAK,MAAM,IAAI,IAAA,EAC/C,CAAA;AAAA,oBAEF,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,eAAgB,QAAA,EAAS;AAAA,GAAA,EACnD,CAAA,mCAEG,QAAA,EAAS,CAAA;AAGhB,EAAA,uBACE,GAAA,CAAC,eAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,EACZ,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTechDocsLocation.esm.js","sources":["../../../src/search/hooks/useTechDocsLocation.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useMemo } from 'react';\n\nimport { CompoundEntityRef } from '@backstage/catalog-model';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nimport { rootCatalogDocsRouteRef, rootDocsRouteRef } from '../../routes';\n\nconst trimStartSlash = (path: string) => path.replace(/^\\/+/, '');\nconst trimEndSlash = (path: string) => path.replace(/\\/+$/, '');\n\n/**\n * Returns a function that takes a location to a Tech Docs entry, and returns a\n * new location, re-routed to the catalog page tab.\n *\n * @internal\n */\nexport function useEntityPageTechDocsRedirect(entityRef: CompoundEntityRef) {\n const { kind, name, namespace } = entityRef;\n\n const routeDocsRoot = useRouteRef(rootDocsRouteRef);\n const routeDocsCatalog = useRouteRef(rootCatalogDocsRouteRef);\n\n // Re-routes a /docs/:namespace/:kind/:name/* location into\n // /catalog/:namespace/:kind/:name/docs/*, while handling situations where\n // these defaults are changed.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const reRouteLocationToCatalog = useMemo(() => {\n const rootDocsPath = trimEndSlash(routeDocsRoot({ kind, namespace, name }));\n const catalogDocsPath = trimEndSlash(routeDocsCatalog());\n\n return (url: string): string => {\n if (\n url\n .toLocaleLowerCase('en-US')\n .startsWith(rootDocsPath.toLocaleLowerCase('en-US'))\n ) {\n const suffix = trimStartSlash(url.slice(rootDocsPath.length));\n return suffix.length === 0 || suffix.startsWith('#')\n ? `${catalogDocsPath}${suffix}`\n : `${catalogDocsPath}/${suffix}`;\n }\n return url;\n };\n }, [routeDocsRoot, routeDocsCatalog, kind, name, namespace]);\n\n return reRouteLocationToCatalog;\n}\n"],"names":[],"mappings":";;;;AAsBA,MAAM,iBAAiB,CAAC,IAAA,KAAiB,
|
|
1
|
+
{"version":3,"file":"useTechDocsLocation.esm.js","sources":["../../../src/search/hooks/useTechDocsLocation.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useMemo } from 'react';\n\nimport { CompoundEntityRef } from '@backstage/catalog-model';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nimport { rootCatalogDocsRouteRef, rootDocsRouteRef } from '../../routes';\n\nconst trimStartSlash = (path: string) => path.replace(/^\\/+/, '');\nconst trimEndSlash = (path: string) => path.replace(/\\/+$/, '');\n\n/**\n * Returns a function that takes a location to a Tech Docs entry, and returns a\n * new location, re-routed to the catalog page tab.\n *\n * @internal\n */\nexport function useEntityPageTechDocsRedirect(entityRef: CompoundEntityRef) {\n const { kind, name, namespace } = entityRef;\n\n const routeDocsRoot = useRouteRef(rootDocsRouteRef);\n const routeDocsCatalog = useRouteRef(rootCatalogDocsRouteRef);\n\n // Re-routes a /docs/:namespace/:kind/:name/* location into\n // /catalog/:namespace/:kind/:name/docs/*, while handling situations where\n // these defaults are changed.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const reRouteLocationToCatalog = useMemo(() => {\n const rootDocsPath = trimEndSlash(routeDocsRoot({ kind, namespace, name }));\n const catalogDocsPath = trimEndSlash(routeDocsCatalog());\n\n return (url: string): string => {\n if (\n url\n .toLocaleLowerCase('en-US')\n .startsWith(rootDocsPath.toLocaleLowerCase('en-US'))\n ) {\n const suffix = trimStartSlash(url.slice(rootDocsPath.length));\n return suffix.length === 0 || suffix.startsWith('#')\n ? `${catalogDocsPath}${suffix}`\n : `${catalogDocsPath}/${suffix}`;\n }\n return url;\n };\n }, [routeDocsRoot, routeDocsCatalog, kind, name, namespace]);\n\n return reRouteLocationToCatalog;\n}\n"],"names":[],"mappings":";;;;AAsBA,MAAM,iBAAiB,CAAC,IAAA,KAAiB,IAAA,CAAK,OAAA,CAAQ,QAAQ,EAAE,CAAA;AAChE,MAAM,eAAe,CAAC,IAAA,KAAiB,IAAA,CAAK,OAAA,CAAQ,QAAQ,EAAE,CAAA;AAQvD,SAAS,8BAA8B,SAAA,EAA8B;AAC1E,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,SAAA,EAAU,GAAI,SAAA;AAElC,EAAA,MAAM,aAAA,GAAgB,YAAY,gBAAgB,CAAA;AAClD,EAAA,MAAM,gBAAA,GAAmB,YAAY,uBAAuB,CAAA;AAM5D,EAAA,MAAM,wBAAA,GAA2B,QAAQ,MAAM;AAC7C,IAAA,MAAM,YAAA,GAAe,aAAa,aAAA,CAAc,EAAE,MAAM,SAAA,EAAW,IAAA,EAAM,CAAC,CAAA;AAC1E,IAAA,MAAM,eAAA,GAAkB,YAAA,CAAa,gBAAA,EAAkB,CAAA;AAEvD,IAAA,OAAO,CAAC,GAAA,KAAwB;AAC9B,MAAA,IACE,GAAA,CACG,kBAAkB,OAAO,CAAA,CACzB,WAAW,YAAA,CAAa,iBAAA,CAAkB,OAAO,CAAC,CAAA,EACrD;AACA,QAAA,MAAM,SAAS,cAAA,CAAe,GAAA,CAAI,KAAA,CAAM,YAAA,CAAa,MAAM,CAAC,CAAA;AAC5D,QAAA,OAAO,MAAA,CAAO,MAAA,KAAW,CAAA,IAAK,MAAA,CAAO,WAAW,GAAG,CAAA,GAC/C,CAAA,EAAG,eAAe,GAAG,MAAM,CAAA,CAAA,GAC3B,CAAA,EAAG,eAAe,IAAI,MAAM,CAAA,CAAA;AAAA,MAClC;AACA,MAAA,OAAO,GAAA;AAAA,IACT,CAAA;AAAA,EACF,GAAG,CAAC,aAAA,EAAe,kBAAkB,IAAA,EAAM,IAAA,EAAM,SAAS,CAAC,CAAA;AAE3D,EAAA,OAAO,wBAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const techdocsTranslationRef = createTranslationRef({\n id: 'techdocs',\n messages: {\n aboutCard: {\n viewTechdocs: 'View TechDocs',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const techdocsTranslationRef = createTranslationRef({\n id: 'techdocs',\n messages: {\n aboutCard: {\n viewTechdocs: 'View TechDocs',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,yBAAyB,oBAAA,CAAqB;AAAA,EACzD,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,MACT,YAAA,EAAc;AAAA;AAChB;AAEJ,CAAC;;;;"}
|