@backstage/plugin-api-docs 0.8.7-next.2 → 0.8.7-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
+ ## 0.8.7-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - a70869e775: Updated dependency `msw` to `^0.43.0`.
8
+ - b76eea25ed: Updated dependency `@asyncapi/react-component` to `1.0.0-next.39`.
9
+ - 9432a05cf3: Set font colors correctly for descriptions containing HTML
10
+ - Updated dependencies
11
+ - @backstage/core-plugin-api@1.0.4-next.0
12
+ - @backstage/core-components@0.10.0-next.3
13
+ - @backstage/catalog-model@1.1.0-next.3
14
+ - @backstage/plugin-catalog-react@1.1.2-next.3
15
+ - @backstage/plugin-catalog@1.4.0-next.3
16
+
3
17
  ## 0.8.7-next.2
4
18
 
5
19
  ### Patch Changes
@@ -36,6 +36,7 @@ const useStyles = makeStyles((theme) => ({
36
36
  .opblock-summary-operation-id,
37
37
  .opblock-summary-path,
38
38
  .opblock-summary-path__deprecated,
39
+ .opblock-description-wrapper,
39
40
  .opblock-external-docs-wrapper,
40
41
  .opblock-section-header .btn,
41
42
  .opblock-section-header>label,
@@ -49,7 +50,7 @@ const useStyles = makeStyles((theme) => ({
49
50
  fontFamily: theme.typography.fontFamily,
50
51
  color: theme.palette.text.primary
51
52
  },
52
- [`& .opblock .opblock-section-header,
53
+ [`& .opblock .opblock-section-header,
53
54
  .model-box,
54
55
  section.models .model-container`]: {
55
56
  background: theme.palette.background.default
@@ -58,7 +59,7 @@ const useStyles = makeStyles((theme) => ({
58
59
  .parameter__in`]: {
59
60
  color: theme.palette.text.disabled
60
61
  },
61
- [`& table.model,
62
+ [`& table.model,
62
63
  .parameter__type,
63
64
  .model.model-title,
64
65
  .model-title,
@@ -74,7 +75,7 @@ const useStyles = makeStyles((theme) => ({
74
75
  [`& .parameter__name.required:after`]: {
75
76
  color: theme.palette.warning.dark
76
77
  },
77
- [`& table.model,
78
+ [`& table.model,
78
79
  table.model .model,
79
80
  .opblock-external-docs-wrapper`]: {
80
81
  fontSize: theme.typography.fontSize
@@ -87,7 +88,7 @@ const useStyles = makeStyles((theme) => ({
87
88
  color: theme.palette.text.hint,
88
89
  backgroundColor: theme.palette.background.paper
89
90
  },
90
- [`& .opblock-summary-method,
91
+ [`& .opblock-summary-method,
91
92
  .info a`]: {
92
93
  fontFamily: theme.typography.fontFamily
93
94
  },
@@ -129,4 +130,4 @@ const OpenApiDefinition = ({ definition }) => {
129
130
  };
130
131
 
131
132
  export { OpenApiDefinition };
132
- //# sourceMappingURL=OpenApiDefinition-ecf6e13e.esm.js.map
133
+ //# sourceMappingURL=OpenApiDefinition-c48cabce.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenApiDefinition-c48cabce.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"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 { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-description-wrapper,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header,\n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model,\n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model,\n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method,\n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} url=\"\" deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAIA,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,MAAM;AACzC,EAAE,IAAI,EAAE;AACR,IAAI,eAAe,EAAE;AACrB,MAAM,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU;AAC7C,MAAM,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;AACvC,MAAM,CAAC,CAAC,mBAAmB,CAAC,GAAG;AAC/B,QAAQ,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;AACzD,OAAO;AACP,MAAM,CAAC,CAAC;AACR;AACA;AACA,2BAA2B,CAAC,GAAG;AAC/B,QAAQ,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU;AAC/C,QAAQ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;AACzC,QAAQ,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;AAC1C,OAAO;AACP,MAAM,CAAC,CAAC;AACR,mCAAmC,CAAC,GAAG;AACvC,QAAQ,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;AAC1C,OAAO;AACP,MAAM,CAAC,CAAC;AACR;AACA,6BAA6B,CAAC,GAAG;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,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AACrC,EAAE,SAAS,CAAC,MAAM;AAClB,IAAI,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1D,IAAI,OAAO,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC;AACrC,GAAG,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3B,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACpD,IAAI,SAAS,EAAE,OAAO,CAAC,IAAI;AAC3B,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE;AACpD,IAAI,IAAI,EAAE,GAAG;AACb,IAAI,GAAG,EAAE,EAAE;AACX,IAAI,WAAW,EAAE,IAAI;AACrB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
@@ -9,4 +9,4 @@ import '@material-ui/lab';
9
9
  import '@material-ui/core/styles';
10
10
  import '@backstage/catalog-model';
11
11
  import '@material-ui/core';
12
- //# sourceMappingURL=index-4ac120fe.esm.js.map
12
+ //# sourceMappingURL=index-51854f32.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-51854f32.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -9,4 +9,4 @@ import '@material-ui/lab';
9
9
  import '@material-ui/core/styles';
10
10
  import '@backstage/catalog-model';
11
11
  import '@material-ui/core';
12
- //# sourceMappingURL=index-15b1bf58.esm.js.map
12
+ //# sourceMappingURL=index-d7eca6d5.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-d7eca6d5.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -9,4 +9,4 @@ import '@material-ui/lab';
9
9
  import '@material-ui/core/styles';
10
10
  import '@backstage/catalog-model';
11
11
  import '@material-ui/core';
12
- //# sourceMappingURL=index-601a656c.esm.js.map
12
+ //# sourceMappingURL=index-e2872038.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e2872038.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -9,4 +9,4 @@ import '@material-ui/lab';
9
9
  import '@material-ui/core/styles';
10
10
  import '@backstage/catalog-model';
11
11
  import '@material-ui/core';
12
- //# sourceMappingURL=index-25faecbb.esm.js.map
12
+ //# sourceMappingURL=index-e3ffc95a.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e3ffc95a.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/dist/index.esm.js CHANGED
@@ -138,7 +138,7 @@ const GraphQlDefinitionWidget = (props) => {
138
138
  }));
139
139
  };
140
140
 
141
- const LazyOpenApiDefinition = React.lazy(() => import('./esm/OpenApiDefinition-ecf6e13e.esm.js').then((m) => ({
141
+ const LazyOpenApiDefinition = React.lazy(() => import('./esm/OpenApiDefinition-c48cabce.esm.js').then((m) => ({
142
142
  default: m.OpenApiDefinition
143
143
  })));
144
144
  const OpenApiDefinitionWidget = (props) => {
@@ -458,43 +458,43 @@ const apiDocsPlugin = createPlugin({
458
458
  });
459
459
  const ApiExplorerPage = apiDocsPlugin.provide(createRoutableExtension({
460
460
  name: "ApiExplorerPage",
461
- component: () => import('./esm/index-25faecbb.esm.js').then((m) => m.ApiExplorerIndexPage),
461
+ component: () => import('./esm/index-e3ffc95a.esm.js').then((m) => m.ApiExplorerIndexPage),
462
462
  mountPoint: rootRoute
463
463
  }));
464
464
  const EntityApiDefinitionCard = apiDocsPlugin.provide(createComponentExtension({
465
465
  name: "EntityApiDefinitionCard",
466
466
  component: {
467
- lazy: () => import('./esm/index-601a656c.esm.js').then((m) => m.ApiDefinitionCard)
467
+ lazy: () => import('./esm/index-e2872038.esm.js').then((m) => m.ApiDefinitionCard)
468
468
  }
469
469
  }));
470
470
  const EntityConsumedApisCard = apiDocsPlugin.provide(createComponentExtension({
471
471
  name: "EntityConsumedApisCard",
472
472
  component: {
473
- lazy: () => import('./esm/index-15b1bf58.esm.js').then((m) => m.ConsumedApisCard)
473
+ lazy: () => import('./esm/index-d7eca6d5.esm.js').then((m) => m.ConsumedApisCard)
474
474
  }
475
475
  }));
476
476
  const EntityConsumingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
477
477
  name: "EntityConsumingComponentsCard",
478
478
  component: {
479
- lazy: () => import('./esm/index-4ac120fe.esm.js').then((m) => m.ConsumingComponentsCard)
479
+ lazy: () => import('./esm/index-51854f32.esm.js').then((m) => m.ConsumingComponentsCard)
480
480
  }
481
481
  }));
482
482
  const EntityProvidedApisCard = apiDocsPlugin.provide(createComponentExtension({
483
483
  name: "EntityProvidedApisCard",
484
484
  component: {
485
- lazy: () => import('./esm/index-15b1bf58.esm.js').then((m) => m.ProvidedApisCard)
485
+ lazy: () => import('./esm/index-d7eca6d5.esm.js').then((m) => m.ProvidedApisCard)
486
486
  }
487
487
  }));
488
488
  const EntityProvidingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
489
489
  name: "EntityProvidingComponentsCard",
490
490
  component: {
491
- lazy: () => import('./esm/index-4ac120fe.esm.js').then((m) => m.ProvidingComponentsCard)
491
+ lazy: () => import('./esm/index-51854f32.esm.js').then((m) => m.ProvidingComponentsCard)
492
492
  }
493
493
  }));
494
494
  const EntityHasApisCard = apiDocsPlugin.provide(createComponentExtension({
495
495
  name: "EntityHasApisCard",
496
496
  component: {
497
- lazy: () => import('./esm/index-15b1bf58.esm.js').then((m) => m.HasApisCard)
497
+ lazy: () => import('./esm/index-d7eca6d5.esm.js').then((m) => m.HasApisCard)
498
498
  }
499
499
  }));
500
500
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
3
  "description": "A Backstage plugin that helps represent API entities in the frontend",
4
- "version": "0.8.7-next.2",
4
+ "version": "0.8.7-next.3",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -33,12 +33,12 @@
33
33
  "clean": "backstage-cli package clean"
34
34
  },
35
35
  "dependencies": {
36
- "@asyncapi/react-component": "1.0.0-next.38",
37
- "@backstage/catalog-model": "^1.1.0-next.2",
38
- "@backstage/core-components": "^0.10.0-next.2",
39
- "@backstage/core-plugin-api": "^1.0.3",
40
- "@backstage/plugin-catalog": "^1.4.0-next.2",
41
- "@backstage/plugin-catalog-react": "^1.1.2-next.2",
36
+ "@asyncapi/react-component": "1.0.0-next.39",
37
+ "@backstage/catalog-model": "^1.1.0-next.3",
38
+ "@backstage/core-components": "^0.10.0-next.3",
39
+ "@backstage/core-plugin-api": "^1.0.4-next.0",
40
+ "@backstage/plugin-catalog": "^1.4.0-next.3",
41
+ "@backstage/plugin-catalog-react": "^1.1.2-next.3",
42
42
  "@backstage/theme": "^0.2.16-next.1",
43
43
  "@material-ui/core": "^4.12.2",
44
44
  "@material-ui/icons": "^4.9.1",
@@ -57,10 +57,10 @@
57
57
  "react": "^16.13.1 || ^17.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@backstage/cli": "^0.18.0-next.2",
61
- "@backstage/core-app-api": "^1.0.4-next.0",
62
- "@backstage/dev-utils": "^1.0.4-next.2",
63
- "@backstage/test-utils": "^1.1.2-next.1",
60
+ "@backstage/cli": "^0.18.0-next.3",
61
+ "@backstage/core-app-api": "^1.0.4-next.1",
62
+ "@backstage/dev-utils": "^1.0.4-next.3",
63
+ "@backstage/test-utils": "^1.1.2-next.2",
64
64
  "@testing-library/jest-dom": "^5.10.1",
65
65
  "@testing-library/react": "^12.1.3",
66
66
  "@testing-library/user-event": "^14.0.0",
@@ -68,10 +68,10 @@
68
68
  "@types/node": "^16.11.26",
69
69
  "@types/swagger-ui-react": "^4.1.1",
70
70
  "cross-fetch": "^3.1.5",
71
- "msw": "^0.42.0"
71
+ "msw": "^0.43.0"
72
72
  },
73
73
  "files": [
74
74
  "dist"
75
75
  ],
76
- "gitHead": "3eddfb061dd0abe711f4b88d2e0fb4b99e692978"
76
+ "gitHead": "291b3a07233061266d9f3ce431345bf19fa4bbd5"
77
77
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenApiDefinition-ecf6e13e.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"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 { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header, \n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model, \n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model, \n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method, \n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\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AI;AAC3B,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE;AACpD,IAAI,IAAI,EAAE,GAAG;AACb,IAAI,GAAG,EAAE,EAAE;AACX,IAAI,WAAW,EAAE,IAAI;AACrB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-15b1bf58.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-25faecbb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-4ac120fe.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-601a656c.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}