@backstage/plugin-api-docs 0.10.0-next.2 → 0.10.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/README.md +2 -0
- package/dist/esm/{OpenApiDefinition-60e2f379.esm.js → OpenApiDefinition-20ae2e8c.esm.js} +5 -4
- package/dist/esm/OpenApiDefinition-20ae2e8c.esm.js.map +1 -0
- package/dist/esm/{index-1d3c3b84.esm.js → index-3a37145c.esm.js} +1 -1
- package/dist/esm/index-3a37145c.esm.js.map +1 -0
- package/dist/esm/{index-0d5e4c74.esm.js → index-49159f3b.esm.js} +1 -1
- package/dist/esm/index-49159f3b.esm.js.map +1 -0
- package/dist/esm/{index-4c6fb7b8.esm.js → index-9c21a15c.esm.js} +1 -1
- package/dist/esm/index-9c21a15c.esm.js.map +1 -0
- package/dist/esm/{index-34d631d3.esm.js → index-a4ca4887.esm.js} +1 -1
- package/dist/esm/index-a4ca4887.esm.js.map +1 -0
- package/dist/index.esm.js +8 -8
- package/package.json +13 -13
- package/dist/esm/OpenApiDefinition-60e2f379.esm.js.map +0 -1
- package/dist/esm/index-0d5e4c74.esm.js.map +0 -1
- package/dist/esm/index-1d3c3b84.esm.js.map +0 -1
- package/dist/esm/index-34d631d3.esm.js.map +0 -1
- package/dist/esm/index-4c6fb7b8.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @backstage/plugin-api-docs
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0ac0e10822: Replace GraphiQL playground with DocExplorer
|
|
8
|
+
- 62310404b7: Define a default for oauth2RedirectUrl option of swagger-ui-react to match documentation
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 6c2b872153: Add official support for React 18.
|
|
13
|
+
- 4aa43f62aa: Updated dependency `cross-fetch` to `^4.0.0`.
|
|
14
|
+
- 613a55911f: Updated dependency `graphiql` to `3.0.9`.
|
|
15
|
+
- 4ad15278e6: Updated dependency `@graphiql/react` to `^0.20.0`.
|
|
16
|
+
- 62b5922916: Internal theme type updates
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @backstage/plugin-catalog-react@1.9.0
|
|
19
|
+
- @backstage/core-components@0.13.8
|
|
20
|
+
- @backstage/plugin-catalog@1.15.0
|
|
21
|
+
- @backstage/core-plugin-api@1.8.0
|
|
22
|
+
- @backstage/theme@0.4.4
|
|
23
|
+
- @backstage/catalog-model@1.4.3
|
|
24
|
+
|
|
3
25
|
## 0.10.0-next.2
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
118
118
|
}));
|
|
119
119
|
const OpenApiDefinition = ({
|
|
120
120
|
definition,
|
|
121
|
-
|
|
121
|
+
...swaggerUiProps
|
|
122
122
|
}) => {
|
|
123
123
|
const classes = useStyles();
|
|
124
124
|
const [def, setDef] = useState("");
|
|
@@ -131,11 +131,12 @@ const OpenApiDefinition = ({
|
|
|
131
131
|
{
|
|
132
132
|
spec: def,
|
|
133
133
|
url: "",
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
deepLinking: true,
|
|
135
|
+
oauth2RedirectUrl: `${window.location.protocol}//${window.location.host}/oauth2-redirect.html`,
|
|
136
|
+
...swaggerUiProps
|
|
136
137
|
}
|
|
137
138
|
));
|
|
138
139
|
};
|
|
139
140
|
|
|
140
141
|
export { OpenApiDefinition };
|
|
141
|
-
//# sourceMappingURL=OpenApiDefinition-
|
|
142
|
+
//# sourceMappingURL=OpenApiDefinition-20ae2e8c.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenApiDefinition-20ae2e8c.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, { SwaggerUIProps } 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 ['& .btn-clear']: {\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.secondary,\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} & Omit<SwaggerUIProps, 'spec'>;\n\nexport const OpenApiDefinition = ({\n definition,\n ...swaggerUiProps\n}: 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\n spec={def}\n url=\"\"\n deepLinking\n oauth2RedirectUrl={`${window.location.protocol}//${window.location.host}/oauth2-redirect.html`}\n {...swaggerUiProps}\n />\n </div>\n );\n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,GAAA;AAAA,MACN,GAAI,EAAA,EAAA;AAAA,MACJ,WAAW,EAAA,IAAA;AAAA,MACX,iBAAA,EAAmB,GAAG,MAAO,CAAA,QAAA,CAAS,QAAQ,CAAK,EAAA,EAAA,MAAA,CAAO,SAAS,IAAI,CAAA,qBAAA,CAAA;AAAA,MACtE,GAAG,cAAA;AAAA,KAAA;AAAA,GAER,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-3a37145c.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-49159f3b.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-9c21a15c.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-a4ca4887.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -135,7 +135,7 @@ const GraphQlDefinitionWidget = (props) => {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
const LazyOpenApiDefinition = React.lazy(
|
|
138
|
-
() => import('./esm/OpenApiDefinition-
|
|
138
|
+
() => import('./esm/OpenApiDefinition-20ae2e8c.esm.js').then((m) => ({
|
|
139
139
|
default: m.OpenApiDefinition
|
|
140
140
|
}))
|
|
141
141
|
);
|
|
@@ -541,7 +541,7 @@ const apiDocsPlugin = createPlugin({
|
|
|
541
541
|
const ApiExplorerPage = apiDocsPlugin.provide(
|
|
542
542
|
createRoutableExtension({
|
|
543
543
|
name: "ApiExplorerPage",
|
|
544
|
-
component: () => import('./esm/index-
|
|
544
|
+
component: () => import('./esm/index-a4ca4887.esm.js').then((m) => m.ApiExplorerIndexPage),
|
|
545
545
|
mountPoint: rootRoute
|
|
546
546
|
})
|
|
547
547
|
);
|
|
@@ -549,7 +549,7 @@ const EntityApiDefinitionCard = apiDocsPlugin.provide(
|
|
|
549
549
|
createComponentExtension({
|
|
550
550
|
name: "EntityApiDefinitionCard",
|
|
551
551
|
component: {
|
|
552
|
-
lazy: () => import('./esm/index-
|
|
552
|
+
lazy: () => import('./esm/index-3a37145c.esm.js').then((m) => m.ApiDefinitionCard)
|
|
553
553
|
}
|
|
554
554
|
})
|
|
555
555
|
);
|
|
@@ -557,7 +557,7 @@ const EntityConsumedApisCard = apiDocsPlugin.provide(
|
|
|
557
557
|
createComponentExtension({
|
|
558
558
|
name: "EntityConsumedApisCard",
|
|
559
559
|
component: {
|
|
560
|
-
lazy: () => import('./esm/index-
|
|
560
|
+
lazy: () => import('./esm/index-9c21a15c.esm.js').then((m) => m.ConsumedApisCard)
|
|
561
561
|
}
|
|
562
562
|
})
|
|
563
563
|
);
|
|
@@ -565,7 +565,7 @@ const EntityConsumingComponentsCard = apiDocsPlugin.provide(
|
|
|
565
565
|
createComponentExtension({
|
|
566
566
|
name: "EntityConsumingComponentsCard",
|
|
567
567
|
component: {
|
|
568
|
-
lazy: () => import('./esm/index-
|
|
568
|
+
lazy: () => import('./esm/index-49159f3b.esm.js').then(
|
|
569
569
|
(m) => m.ConsumingComponentsCard
|
|
570
570
|
)
|
|
571
571
|
}
|
|
@@ -575,7 +575,7 @@ const EntityProvidedApisCard = apiDocsPlugin.provide(
|
|
|
575
575
|
createComponentExtension({
|
|
576
576
|
name: "EntityProvidedApisCard",
|
|
577
577
|
component: {
|
|
578
|
-
lazy: () => import('./esm/index-
|
|
578
|
+
lazy: () => import('./esm/index-9c21a15c.esm.js').then((m) => m.ProvidedApisCard)
|
|
579
579
|
}
|
|
580
580
|
})
|
|
581
581
|
);
|
|
@@ -583,7 +583,7 @@ const EntityProvidingComponentsCard = apiDocsPlugin.provide(
|
|
|
583
583
|
createComponentExtension({
|
|
584
584
|
name: "EntityProvidingComponentsCard",
|
|
585
585
|
component: {
|
|
586
|
-
lazy: () => import('./esm/index-
|
|
586
|
+
lazy: () => import('./esm/index-49159f3b.esm.js').then(
|
|
587
587
|
(m) => m.ProvidingComponentsCard
|
|
588
588
|
)
|
|
589
589
|
}
|
|
@@ -593,7 +593,7 @@ const EntityHasApisCard = apiDocsPlugin.provide(
|
|
|
593
593
|
createComponentExtension({
|
|
594
594
|
name: "EntityHasApisCard",
|
|
595
595
|
component: {
|
|
596
|
-
lazy: () => import('./esm/index-
|
|
596
|
+
lazy: () => import('./esm/index-9c21a15c.esm.js').then((m) => m.HasApisCard)
|
|
597
597
|
}
|
|
598
598
|
})
|
|
599
599
|
);
|
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.10.0
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@asyncapi/react-component": "1.0.0-next.48",
|
|
37
37
|
"@backstage/catalog-model": "^1.4.3",
|
|
38
|
-
"@backstage/core-components": "^0.13.8
|
|
39
|
-
"@backstage/core-plugin-api": "^1.8.0
|
|
40
|
-
"@backstage/plugin-catalog": "^1.15.0
|
|
41
|
-
"@backstage/plugin-catalog-react": "^1.9.0
|
|
42
|
-
"@backstage/theme": "^0.4.4
|
|
43
|
-
"@graphiql/react": "^0.
|
|
38
|
+
"@backstage/core-components": "^0.13.8",
|
|
39
|
+
"@backstage/core-plugin-api": "^1.8.0",
|
|
40
|
+
"@backstage/plugin-catalog": "^1.15.0",
|
|
41
|
+
"@backstage/plugin-catalog-react": "^1.9.0",
|
|
42
|
+
"@backstage/theme": "^0.4.4",
|
|
43
|
+
"@graphiql/react": "^0.20.0",
|
|
44
44
|
"@material-ui/core": "^4.12.2",
|
|
45
45
|
"@material-ui/icons": "^4.9.1",
|
|
46
46
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
47
47
|
"@types/react": "^16.13.1 || ^17.0.0",
|
|
48
|
-
"graphiql": "3.0.
|
|
48
|
+
"graphiql": "3.0.9",
|
|
49
49
|
"graphql": "^16.0.0",
|
|
50
50
|
"graphql-ws": "^5.4.1",
|
|
51
51
|
"isomorphic-form-data": "^2.0.0",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@backstage/cli": "^0.24.0
|
|
62
|
-
"@backstage/core-app-api": "^1.11.1
|
|
63
|
-
"@backstage/dev-utils": "^1.0.23
|
|
64
|
-
"@backstage/test-utils": "^1.4.5
|
|
61
|
+
"@backstage/cli": "^0.24.0",
|
|
62
|
+
"@backstage/core-app-api": "^1.11.1",
|
|
63
|
+
"@backstage/dev-utils": "^1.0.23",
|
|
64
|
+
"@backstage/test-utils": "^1.4.5",
|
|
65
65
|
"@testing-library/dom": "^9.0.0",
|
|
66
66
|
"@testing-library/jest-dom": "^6.0.0",
|
|
67
67
|
"@testing-library/react": "^14.0.0",
|
|
68
68
|
"@testing-library/user-event": "^14.0.0",
|
|
69
69
|
"@types/swagger-ui-react": "^4.18.0",
|
|
70
|
-
"cross-fetch": "^
|
|
70
|
+
"cross-fetch": "^4.0.0",
|
|
71
71
|
"msw": "^1.0.0"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiDefinition-60e2f379.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 ['& .btn-clear']: {\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.secondary,\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 requestInterceptor?: (req: any) => any | Promise<any>;\n};\n\nexport const OpenApiDefinition = ({\n definition,\n requestInterceptor,\n}: 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\n spec={def}\n url=\"\"\n requestInterceptor={requestInterceptor}\n deepLinking\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,eAAiB,EA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J;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-0d5e4c74.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-1d3c3b84.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-34d631d3.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-4c6fb7b8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|