@open-resource-discovery/metadata-renderer 0.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +94 -1
  3. package/dist/a2a/index.d.ts +9 -0
  4. package/dist/a2a.js +2 -0
  5. package/dist/asyncApi/asyncapi-browser.d.ts +3 -0
  6. package/dist/asyncApi/customAttributes/attributeLink.d.ts +3 -0
  7. package/dist/asyncApi/customAttributes/autoDiscover.d.ts +4 -0
  8. package/dist/asyncApi/customAttributes/buildExtensionsConfig.d.ts +5 -0
  9. package/dist/asyncApi/customAttributes/context.d.ts +7 -0
  10. package/dist/asyncApi/customAttributes/genericRenderer.d.ts +4 -0
  11. package/dist/asyncApi/customAttributes/sapPreset.d.ts +2 -0
  12. package/dist/asyncApi/customAttributes/stateInfo.d.ts +3 -0
  13. package/dist/asyncApi/customAttributes/styles.d.ts +2 -0
  14. package/dist/asyncApi/customAttributes/types.d.ts +32 -0
  15. package/dist/asyncApi/index.d.ts +11 -0
  16. package/dist/asyncapi.js +2 -0
  17. package/dist/chunks/a2a-B5lkgqLU.js +29 -0
  18. package/dist/chunks/asyncApi-DtAXW7IY.js +502 -0
  19. package/dist/chunks/csn-3ek2O4d6.js +385 -0
  20. package/dist/chunks/mcp-qA5sYRAN.js +29 -0
  21. package/dist/chunks/openApi-BTb5yzun.js +783 -0
  22. package/dist/chunks/utils-BC3WF3-9.js +77 -0
  23. package/dist/core/ShadowRoot.d.ts +6 -0
  24. package/dist/core/dispatch.d.ts +3 -0
  25. package/dist/core/dispatch.test.d.ts +1 -0
  26. package/dist/core/index.d.ts +11 -0
  27. package/dist/core/utils.d.ts +7 -0
  28. package/dist/core/utils.test.d.ts +1 -0
  29. package/dist/csn/customAttributes/genericRenderer.d.ts +2 -0
  30. package/dist/csn/customAttributes/postProcess.d.ts +5 -0
  31. package/dist/csn/customAttributes/sapPreset.d.ts +2 -0
  32. package/dist/csn/customAttributes/types.d.ts +28 -0
  33. package/dist/csn/index.d.ts +11 -0
  34. package/dist/csn/styles.d.ts +2 -0
  35. package/dist/csn.js +2 -0
  36. package/dist/entries/a2a.d.ts +2 -0
  37. package/dist/entries/asyncapi.d.ts +2 -0
  38. package/dist/entries/csn.d.ts +2 -0
  39. package/dist/entries/mcp.d.ts +2 -0
  40. package/dist/entries/openapi.d.ts +2 -0
  41. package/dist/favicon.ico +0 -0
  42. package/dist/favicon.svg +29 -0
  43. package/dist/index.css +210782 -0
  44. package/dist/index.d.ts +23 -0
  45. package/dist/index.js +783 -0
  46. package/dist/mcp/index.d.ts +8 -0
  47. package/dist/mcp.js +2 -0
  48. package/dist/openApi/customAttributes/attributeLink.d.ts +3 -0
  49. package/dist/openApi/customAttributes/autoDiscover.d.ts +15 -0
  50. package/dist/openApi/customAttributes/genericRenderer.d.ts +3 -0
  51. package/dist/openApi/customAttributes/sapAttributes/operation/deprecatedOperation.d.ts +10 -0
  52. package/dist/openApi/customAttributes/sapAttributes/root/extOverview.d.ts +2 -0
  53. package/dist/openApi/customAttributes/sapAttributes/root/extensible.d.ts +10 -0
  54. package/dist/openApi/customAttributes/sapAttributes/root/ordId.d.ts +6 -0
  55. package/dist/openApi/customAttributes/sapAttributes/root/stateInfo.d.ts +11 -0
  56. package/dist/openApi/customAttributes/sapAttributes/root/typeCheckXxtOverview.d.ts +10 -0
  57. package/dist/openApi/customAttributes/sapAttributes/root/typeCheckXxtOverview.spec.d.ts +1 -0
  58. package/dist/openApi/customAttributes/sapAttributes/sapPreset.d.ts +2 -0
  59. package/dist/openApi/customAttributes/sapAttributes/schema/odmEntityName.d.ts +6 -0
  60. package/dist/openApi/customAttributes/sapAttributes/schema/odmSemanticKey.d.ts +10 -0
  61. package/dist/openApi/customAttributes/types.d.ts +31 -0
  62. package/dist/openApi/index.d.ts +9 -0
  63. package/dist/openApi/styles.d.ts +2 -0
  64. package/dist/openApi/utils/context.d.ts +7 -0
  65. package/dist/openApi/utils/context.test.d.ts +1 -0
  66. package/dist/openApi/utils/plugins.d.ts +3 -0
  67. package/dist/openApi/utils/scalarTheme.d.ts +11 -0
  68. package/dist/openapi.js +2 -0
  69. package/dist/styles.d.ts +0 -0
  70. package/dist/styles.js +4 -0
  71. package/dist/theme-builder.d.ts +28 -0
  72. package/dist/types.d.ts +46 -0
  73. package/dist/vendor.d.ts +2 -0
  74. package/package.json +135 -3
@@ -0,0 +1,8 @@
1
+ import { RendererTheme } from '../types';
2
+ export type McpRendererProps = {
3
+ content: string;
4
+ showValidation?: boolean;
5
+ className?: string;
6
+ theme?: RendererTheme;
7
+ };
8
+ export declare function McpRenderer({ content, showValidation, className, theme }: McpRendererProps): import("react").JSX.Element;
package/dist/mcp.js ADDED
@@ -0,0 +1,2 @@
1
+ import { t as McpRenderer } from "./chunks/mcp-qA5sYRAN.js";
2
+ export { McpRenderer };
@@ -0,0 +1,3 @@
1
+ export default function attributeLink({ attributeName }: {
2
+ attributeName: string;
3
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ type Rec = Record<string, unknown>;
2
+ export declare function discoverAttributeNames(doc: Rec, prefix: string): string[];
3
+ /**
4
+ * Synthetic property key injected into schema.properties so Scalar calls SpecificationExtension on it.
5
+ * The value is the full schema object; our extension component reads any x-* fields from it.
6
+ */
7
+ export declare const SCHEMA_ATTRS_KEY = "x-sap-schema-attrs";
8
+ /**
9
+ * Clone doc and inject a synthetic property into every schema object that carries
10
+ * at least one key matching the given prefix. Scalar only calls SpecificationExtension
11
+ * on property-level schemas, so this is the only way to render schema-level x-* fields.
12
+ */
13
+ export declare function injectSchemaExtensions(doc: Rec, prefixes: string[]): Rec;
14
+ export declare function extractCustomAttributeValues(doc: Rec, prefix: string): [string, unknown][];
15
+ export {};
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'react';
2
+ import { AttributeDefinition, OpenApiCustomAttributesConfig } from './types';
3
+ export declare function buildGenericRenderer(fieldName: string, def: AttributeDefinition | undefined, config: OpenApiCustomAttributesConfig): (data: unknown) => JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'react';
2
+ type Props = {
3
+ xSapDeprecatedOperation: {
4
+ deprecationDate: string;
5
+ successorOperationRef?: string;
6
+ successorOperationId?: string;
7
+ };
8
+ };
9
+ export default function deprecatedOperation({ xSapDeprecatedOperation }: Props): JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import { JSX } from 'react';
2
+ export default function extOverview(props: unknown): JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'react';
2
+ type Props = {
3
+ xSapExtensible: {
4
+ supported?: 'no' | 'manual' | 'automatic';
5
+ type?: 'no' | 'manual' | 'automatic';
6
+ description?: string;
7
+ };
8
+ };
9
+ export default function extensible({ xSapExtensible }: Props): JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ type Props = {
3
+ xSapOrdId: string;
4
+ };
5
+ export default function ordId({ xSapOrdId }: Props): JSX.Element | null;
6
+ export {};
@@ -0,0 +1,11 @@
1
+ import { JSX } from 'react';
2
+ type Props = {
3
+ xSapStateInfo: {
4
+ state: string;
5
+ deprecationDate?: string;
6
+ decommissionedDate?: string;
7
+ successorApi?: string;
8
+ };
9
+ };
10
+ export default function StateInfo({ xSapStateInfo }: Props): JSX.Element | null;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ export type ExtOverviewProps = {
2
+ xSapExtOverview: {
3
+ name: string;
4
+ values: string | (string | {
5
+ text: string;
6
+ format: 'plain' | 'markdown';
7
+ })[];
8
+ }[];
9
+ };
10
+ export declare function typeCheckExSapExtOverviewExSapExtOverview(obj: unknown): obj is ExtOverviewProps;
@@ -0,0 +1,2 @@
1
+ import { OpenApiCustomAttributesConfig } from '../types';
2
+ export declare const sapOpenApiAttributesConfig: OpenApiCustomAttributesConfig;
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ type Props = {
3
+ xSapOdmEntityName: string;
4
+ };
5
+ export default function odmEntityName({ xSapOdmEntityName }: Props): JSX.Element | null;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'react';
2
+ type SemanticKeyEntry = {
3
+ name: string;
4
+ values: string[];
5
+ };
6
+ type Props = {
7
+ xSapOdmSemanticKey: SemanticKeyEntry[];
8
+ };
9
+ export default function odmSemanticKey({ xSapOdmSemanticKey }: Props): JSX.Element | null;
10
+ export {};
@@ -0,0 +1,31 @@
1
+ import { JSX } from 'react';
2
+ export type AttributeDefinition = {
3
+ type: 'string';
4
+ label?: string;
5
+ valueLinks?: Record<string, string>;
6
+ } | {
7
+ type: 'boolean';
8
+ label?: string;
9
+ } | {
10
+ type: 'number';
11
+ label?: string;
12
+ } | {
13
+ type: 'array';
14
+ label?: string;
15
+ } | {
16
+ type: 'object';
17
+ label?: string;
18
+ } | {
19
+ type: 'link';
20
+ label?: string;
21
+ callback: (value: unknown) => string | undefined;
22
+ } | {
23
+ component: (props: unknown) => JSX.Element | null;
24
+ };
25
+ export type OpenApiCustomAttributesConfig = {
26
+ prefixStartsWith?: string;
27
+ documentationUrl?: (attributeName: string, ctx: {
28
+ version: string;
29
+ }) => string;
30
+ extensions?: Record<string, AttributeDefinition>;
31
+ };
@@ -0,0 +1,9 @@
1
+ import { RendererTheme } from '../types';
2
+ import { OpenApiCustomAttributesConfig } from './customAttributes/types';
3
+ export type OpenApiRendererProps = {
4
+ content: string;
5
+ customAttributes?: OpenApiCustomAttributesConfig[];
6
+ className?: string;
7
+ theme?: RendererTheme;
8
+ };
9
+ export declare function OpenApiRenderer({ content, customAttributes, className, theme }: OpenApiRendererProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n.sap-api-container {\n display: flex;\n flex-wrap: wrap;\n container-type: inline-size;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n margin-top: 8px;\n font-size: var(--scalar-small);\n line-height: var(--scalar-line-height-3);\n overflow: hidden;\n}\n\n.sap-api-label {\n color: var(--scalar-color-1);\n width: 30%;\n min-width: 20ch;\n flex-shrink: 0;\n background: var(--scalar-background-2);\n padding: 6px 9px 6px 12px;\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n font-weight: 500;\n}\n\n.sap-api-label--root {\n min-width: 20ch;\n}\n\n.sap-api-value {\n color: var(--scalar-color-2);\n padding: 8px;\n flex: 1 1 0;\n min-width: 0;\n}\n\n.sap-api-value--root {\n flex: 1 1 0;\n min-width: 0;\n}\n\n.sap-api-list {\n margin: 0 2ch;\n list-style: disc;\n}\n\n.sap-api-link {\n text-decoration: none;\n color: var(--scalar-link-color);\n transition: color 0.1s ease-in-out;\n cursor: pointer;\n}\n\n.sap-api-ord-id {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.sap-api-ord-id-text {\n flex: 1 1 auto;\n min-width: 0;\n word-break: break-all;\n}\n\n.sap-api-copy-btn {\n flex-shrink: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 1em;\n line-height: 1;\n padding: 4px;\n color: var(--scalar-color-2);\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n transition: background 0.1s ease-in-out, color 0.1s ease-in-out;\n}\n\n.sap-api-copy-btn:hover {\n background: var(--scalar-background-3);\n color: var(--scalar-color-1);\n}\n\n.sap-api-placeholder {\n color: #999;\n}\n\n.sap-api-obj {\n margin: 0;\n padding-left: 12px;\n}\n\n.sap-api-obj-row {\n margin-bottom: 4px;\n}\n\n.sap-api-obj-key {\n font-weight: 600;\n display: inline;\n}\n\n.sap-api-obj-val {\n display: inline;\n margin: 0;\n}\n\n/* Width-adaptive rows: react to the row's own available width (container-type above).\n When the row is narrow, label and value wrap onto separate lines (label above value). */\n@container (max-width: 420px) {\n .sap-api-label,\n .sap-api-label--root {\n flex-basis: 100%;\n width: 100%;\n min-width: 0;\n border-right: none;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n }\n .sap-api-value,\n .sap-api-value--root {\n flex-basis: 100%;\n width: 100%;\n }\n}\n\na {\n text-decoration: none;\n color: var(--sapLinkColor);\n transition: color 0.1s ease-in-out;\n cursor: pointer;\n}\na:hover {\n text-decoration: underline;\n}\n\n/* Keyboard key: use Scalar background instead of Infima colors */\n.scalar-app kbd {\n background: var(--scalar-background-1);\n color: var(--scalar-color-1);\n border: 1px solid var(--scalar-border-color);\n}\n\n/* Syntax highlighting \u2014 override --scalar-color-* with ThemeEditor --ord-hljs-* tokens */\n.scalar-app .hljs-attr,\n.scalar-app .hljs-attribute { color: var(--ord-hljs-attr); }\n\n.scalar-app .hljs-string,\n.scalar-app .hljs-regexp,\n.scalar-app .hljs-subst,\n.scalar-app .hljs-doctag,\n.scalar-app .hljs-bullet,\n.scalar-app .hljs-link,\n.scalar-app .hljs-meta,\n.scalar-app .hljs-symbol { color: var(--ord-hljs-string); }\n\n.scalar-app .hljs-number,\n.scalar-app .hljs-selector-attr,\n.scalar-app .hljs-selector-pseudo,\n.scalar-app .hljs-built_in { color: var(--ord-hljs-number); }\n\n.scalar-app .hljs-title.function_ { color: var(--ord-hljs-function); }\n\n.scalar-app .hljs-addition,\n.scalar-app .hljs-literal,\n.scalar-app .hljs-selector-tag,\n.scalar-app .hljs-type { color: var(--ord-hljs-literal); }\n\n.scalar-app .hljs-keyword { color: var(--ord-hljs-keyword); }\n\n.scalar-app .hljs-comment,\n.scalar-app .hljs-quote { color: var(--ord-hljs-comment); }\n\n.scalar-app .hljs-punctuation { color: var(--ord-hljs-punctuation); }\n\n/* Hide the \"x-sap-schema-attrs\" property heading row \u2014 the row exists only to\n carry schema-level extension components; the key name should not be visible. */\n.scalar-app .property:has(.sap-schema-attrs-block) {\n padding-top: 2px;\n}\n.scalar-app .property:has(.sap-schema-attrs-block) .property-heading {\n display: none;\n}\n\n/* Override Scalar's sidebar height variable so the <aside> uses our measured container height\n instead of Scalar's default 100dvh (which breaks when embedded in Docusaurus/non-fullscreen). */\n.scalar-app {\n --refs-sidebar-height: calc(var(--scalar-container-height, 100dvh) - var(--refs-header-height, 0px));\n}\n";
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { OpenApiCustomAttributesConfig } from '../customAttributes/types';
2
+ export declare const openApiContext: {
3
+ version: string;
4
+ configs: OpenApiCustomAttributesConfig[];
5
+ getDocumentationUrl(attributeName: string): string | undefined;
6
+ };
7
+ export declare const getVersion: (content: string) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ApiReferencePlugin } from '@scalar/types/api-reference';
2
+ import { OpenApiCustomAttributesConfig } from '../customAttributes/types';
3
+ export declare function buildCustomAttributesPlugin(doc: Record<string, unknown> | undefined, configs: OpenApiCustomAttributesConfig[]): ApiReferencePlugin;
@@ -0,0 +1,11 @@
1
+ interface ThemeAdapter {
2
+ selector: string;
3
+ map(canonical: Record<string, string>): Record<string, string>;
4
+ }
5
+ export declare const scalarAdapter: ThemeAdapter;
6
+ export declare const scalarSidebarAdapter: ThemeAdapter;
7
+ export declare const scalarModeAdapter: ThemeAdapter;
8
+ export declare const scalarHljsAdapter: ThemeAdapter;
9
+ export declare const scalarTeleportAdapter: ThemeAdapter;
10
+ export declare function buildScalarThemeStyles(id: string, theme: Record<string, string>): string;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ import { t as OpenApiRenderer } from "./chunks/openApi-BTb5yzun.js";
2
+ export { OpenApiRenderer };
File without changes
package/dist/styles.js ADDED
@@ -0,0 +1,4 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
@@ -0,0 +1,28 @@
1
+ import { RendererTheme } from './types';
2
+ export interface ThemeTokens {
3
+ background?: string;
4
+ foreground?: string;
5
+ primary?: string;
6
+ primaryForeground?: string;
7
+ secondary?: string;
8
+ secondaryForeground?: string;
9
+ muted?: string;
10
+ mutedForeground?: string;
11
+ accent?: string;
12
+ accentForeground?: string;
13
+ destructive?: string;
14
+ destructiveForeground?: string;
15
+ success?: string;
16
+ successForeground?: string;
17
+ warning?: string;
18
+ warningForeground?: string;
19
+ border?: string;
20
+ input?: string;
21
+ ring?: string;
22
+ card?: string;
23
+ cardForeground?: string;
24
+ popover?: string;
25
+ popoverForeground?: string;
26
+ radius?: string;
27
+ }
28
+ export declare function createTheme(tokens: ThemeTokens): RendererTheme;
@@ -0,0 +1,46 @@
1
+ import { ComponentType } from 'react';
2
+ import { CsnRendererConfig } from '@sap/csn-interop-renderer';
3
+ import { ConfigInterface } from '@asyncapi/react-component';
4
+ import { MetaType } from './core/utils';
5
+ import { OpenApiCustomAttributesConfig } from './openApi/customAttributes/types';
6
+ import { AsyncApiCustomAttributesConfig } from './asyncApi/customAttributes/types';
7
+ import { CsnCustomAttributesConfig } from './csn/customAttributes/types';
8
+ export type CustomAttributesOptions = {
9
+ openapi?: OpenApiCustomAttributesConfig[];
10
+ asyncapi?: AsyncApiCustomAttributesConfig[];
11
+ csn?: CsnCustomAttributesConfig[];
12
+ };
13
+ export type RendererTheme = Partial<Record<`--ord-${string}`, string>>;
14
+ export type RendererEntry = ComponentType<{
15
+ content: string;
16
+ className?: string;
17
+ theme?: RendererTheme;
18
+ [key: string]: any;
19
+ }>;
20
+ export type RendererMap = Partial<Record<MetaType, RendererEntry>>;
21
+ export type MetadataRendererOptions = {
22
+ /** Auto-detect format from content when `type` prop is absent. Default: true. */
23
+ autoDetect?: boolean;
24
+ /** What to show for unresolved/disabled types. Default: 'error'. */
25
+ fallback?: 'error' | 'raw';
26
+ /**
27
+ * When `type` is explicitly set and content is not detected as that type,
28
+ * show an error instead of passing content to the renderer. Default: true.
29
+ */
30
+ strictTypeCheck?: boolean;
31
+ /** Custom attribute renderers per protocol. Pass `false` to disable all. Default: disabled. */
32
+ customAttributes?: CustomAttributesOptions | false;
33
+ /** Passed through to CsnRenderer. */
34
+ csn?: CsnRendererConfig;
35
+ /** Passed through to AsyncApiRenderer. */
36
+ asyncapi?: Partial<ConfigInterface>;
37
+ /** Passed through to A2ARenderer. */
38
+ a2a?: {
39
+ showValidation?: boolean;
40
+ showConnection?: boolean;
41
+ };
42
+ /** Passed through to McpRenderer. */
43
+ mcp?: {
44
+ showValidation?: boolean;
45
+ };
46
+ };
@@ -0,0 +1,2 @@
1
+ declare module '@open-resource-discovery/a2a-editor/styles';
2
+ declare module '@open-resource-discovery/mcp-server-card-ui/styles';
package/package.json CHANGED
@@ -1,5 +1,137 @@
1
1
  {
2
- "name": "@open-resource-discovery/metadata-renderer",
3
- "version": "0.0.0",
4
- "author": "SAP SE"
2
+ "name": "@open-resource-discovery/metadata-renderer",
3
+ "version": "1.0.1",
4
+ "description": "React components that render OpenAPI, CSN, AsyncAPI, A2A, and MCP metadata documents.",
5
+ "author": "SAP SE",
6
+ "license": "Apache-2.0",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/open-resource-discovery/metadata-renderer"
10
+ },
11
+ "keywords": [
12
+ "metadata",
13
+ "renderer",
14
+ "react",
15
+ "openapi",
16
+ "swagger",
17
+ "csn",
18
+ "asyncapi",
19
+ "a2a",
20
+ "mcp"
21
+ ],
22
+ "engines": {
23
+ "node": ">=22",
24
+ "npm": ">=10"
25
+ },
26
+ "type": "module",
27
+ "scarfSettings": {
28
+ "enabled": false
29
+ },
30
+ "main": "./dist/index.js",
31
+ "module": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "sideEffects": [
34
+ "**/*.css"
35
+ ],
36
+ "exports": {
37
+ "./package.json": "./package.json",
38
+ ".": {
39
+ "types": "./dist/index.d.ts",
40
+ "import": "./dist/index.js",
41
+ "default": "./dist/index.js"
42
+ },
43
+ "./openapi": {
44
+ "types": "./dist/entries/openapi.d.ts",
45
+ "import": "./dist/openapi.js",
46
+ "default": "./dist/openapi.js"
47
+ },
48
+ "./csn": {
49
+ "types": "./dist/entries/csn.d.ts",
50
+ "import": "./dist/csn.js",
51
+ "default": "./dist/csn.js"
52
+ },
53
+ "./asyncapi": {
54
+ "types": "./dist/entries/asyncapi.d.ts",
55
+ "import": "./dist/asyncapi.js",
56
+ "default": "./dist/asyncapi.js"
57
+ },
58
+ "./a2a": {
59
+ "types": "./dist/entries/a2a.d.ts",
60
+ "import": "./dist/a2a.js",
61
+ "default": "./dist/a2a.js"
62
+ },
63
+ "./mcp": {
64
+ "types": "./dist/entries/mcp.d.ts",
65
+ "import": "./dist/mcp.js",
66
+ "default": "./dist/mcp.js"
67
+ },
68
+ "./styles": "./dist/index.css"
69
+ },
70
+ "files": [
71
+ "dist",
72
+ "README.md"
73
+ ],
74
+ "publishConfig": {
75
+ "access": "public"
76
+ },
77
+ "scripts": {
78
+ "dev": "vite",
79
+ "build": "tsc -b && vite build --mode lib",
80
+ "build:lib:watch": "vite build --mode lib --watch",
81
+ "build:demo": "vite build",
82
+ "website:start": "npm --prefix website run start",
83
+ "website:build": "npm --prefix website run build",
84
+ "preview": "vite preview",
85
+ "typecheck": "tsc -b --noEmit",
86
+ "test": "vitest run",
87
+ "test:watch": "vitest",
88
+ "lint": "npm run eslint:ci",
89
+ "eslint": "eslint . --fix",
90
+ "eslint:ci": "eslint .",
91
+ "prettier": "prettier --write .",
92
+ "prettier:ci": "prettier --check .",
93
+ "format": "npm run prettier && npm run eslint",
94
+ "format:check": "npm run prettier:ci && npm run eslint:ci",
95
+ "prepack": "npm run build"
96
+ },
97
+ "peerDependencies": {
98
+ "react": "^18.0.0 || ^19.0.0",
99
+ "react-dom": "^18.0.0 || ^19.0.0"
100
+ },
101
+ "dependencies": {
102
+ "@asyncapi/react-component": "^3.1.3",
103
+ "@open-resource-discovery/a2a-editor": "^0.4.2",
104
+ "@open-resource-discovery/mcp-server-card-ui": "0.2.1",
105
+ "@sap/csn-interop-renderer": "0.5.0",
106
+ "@scalar/api-reference-react": "^0.9.54",
107
+ "@scalar/react-renderer": "^0.4.1",
108
+ "@scalar/types": "^0.16.2",
109
+ "react-error-boundary": "^6.0.0",
110
+ "react-markdown": "^10.1.0",
111
+ "yaml": "^2.8.1"
112
+ },
113
+ "overrides": {
114
+ "dompurify": ">=3.4.12",
115
+ "fast-uri": ">=3.1.5",
116
+ "undici": ">=7.29.0 <8",
117
+ "postcss": ">=8.5.23",
118
+ "brace-expansion": ">=1.1.18"
119
+ },
120
+ "devDependencies": {
121
+ "@sap/eslint-config": "0.5.2",
122
+ "@types/node": "24.13.3",
123
+ "@types/react": "19.2.17",
124
+ "@types/react-dom": "19.2.3",
125
+ "@vitejs/plugin-react": "6.0.5",
126
+ "eslint": "10.6.0",
127
+ "jsdom": "29.1.1",
128
+ "jsonc-eslint-parser": "3.1.0",
129
+ "prettier": "3.9.6",
130
+ "react": "19.2.8",
131
+ "react-dom": "19.2.8",
132
+ "typescript": "5.9.3",
133
+ "vite": "8.1.5",
134
+ "vite-plugin-dts": "4.5.4",
135
+ "vitest": "3.2.7"
136
+ }
5
137
  }