apiuikit 1.1.0 → 1.2.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/README.md +1 -0
- package/dist/CodeSamples-CXtSA6EK.js +4298 -0
- package/dist/CodeSamples-D7dq1xEM.cjs +50 -0
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.es.js +30 -22
- package/dist/config/config.d.ts +48 -0
- package/dist/contexts/useSpec.d.ts +3 -0
- package/dist/helpers/jsonPointer.d.ts +5 -0
- package/dist/helpers/llmsTxt.d.ts +51 -0
- package/dist/helpers/specAdapters.d.ts +32 -0
- package/dist/helpers/toMarkdown.d.ts +5 -6
- package/dist/hooks/useDocumentProviderValue.d.ts +3 -1
- package/dist/index-BJ0X8yP3.cjs +133 -0
- package/dist/{index-DM2MTkYV.js → index-BMRPdMaB.js} +1 -1
- package/dist/{index-EeGvEXPN.cjs → index-BoAORjov.cjs} +1 -1
- package/dist/{index-B5IBIM-V.cjs → index-CZjVUeK4.cjs} +1 -1
- package/dist/index-DCDYBZcY.js +1461 -0
- package/dist/index-DwzxTmOd.js +13614 -0
- package/dist/index-d8kJa7YD.cjs +4 -0
- package/dist/{index-iXpNcBcP.js → index-ib-tk7y5.js} +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/markdown-assets/protoToJsonSchema-CBPWaboT.js +6193 -0
- package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +83 -0
- package/dist/markdown.cjs +91 -0
- package/dist/markdown.d.ts +8 -0
- package/dist/markdown.es.js +2101 -0
- package/dist/{protoToJsonSchema-CcEvAEt4.js → protoToJsonSchema-Btyc_WLL.js} +112 -108
- package/dist/{protoToJsonSchema-BNZrP3Fa.cjs → protoToJsonSchema-wxazjeYy.cjs} +10 -10
- package/dist/{protobufSchemaParser-BaWs_7UI.js → protobufSchemaParser-9KjS7p8W.js} +2 -2
- package/dist/{protobufSchemaParser-7sU6XBEb.cjs → protobufSchemaParser-G1NujZ28.cjs} +1 -1
- package/dist/shims/utilInspect.d.ts +2 -0
- package/package.json +8 -3
- package/dist/components/Navigation/tests/spineTicks.test.d.ts +0 -1
- package/dist/components/schema/tests/SchemaTab.test.d.ts +0 -1
- package/dist/components/schema/tests/schemaUtils.test.d.ts +0 -1
- package/dist/components/tests/Authorization.test.d.ts +0 -1
- package/dist/components/tests/Bindings.test.d.ts +0 -1
- package/dist/components/tests/ChannelAddress.test.d.ts +0 -1
- package/dist/components/tests/CodeBlock.test.d.ts +0 -1
- package/dist/components/tests/CodeSamples.test.d.ts +0 -1
- package/dist/components/tests/CopyMarkdownButton.test.d.ts +0 -1
- package/dist/components/tests/ErrorBoundary.test.d.ts +0 -1
- package/dist/components/tests/MarkdownExportMenu.test.d.ts +0 -1
- package/dist/components/tests/RenderExtensions.test.d.ts +0 -1
- package/dist/containers/AsyncAPI/tests/AsyncAPI.test.d.ts +0 -1
- package/dist/containers/AsyncAPI/tests/AsyncAPIErrorBoundary.test.d.ts +0 -1
- package/dist/containers/AsyncAPI/tests/AsyncAPIRenderer.test.d.ts +0 -1
- package/dist/containers/AsyncAPI/tests/searchHighlight.test.d.ts +0 -1
- package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +0 -1
- package/dist/containers/OpenAPI/tests/OpenAPIErrorBoundary.test.d.ts +0 -1
- package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +0 -1
- package/dist/containers/Path/tests/PathOperation.test.d.ts +0 -1
- package/dist/containers/Path/tests/Paths.test.d.ts +0 -1
- package/dist/helpers/avro/tests/avroToJsonSchema.test.d.ts +0 -1
- package/dist/helpers/protobuf/tests/protoToJsonSchema.test.d.ts +0 -1
- package/dist/helpers/protobuf/tests/protobufSchemaParser.test.d.ts +0 -1
- package/dist/helpers/tests/codeSamples.test.d.ts +0 -1
- package/dist/helpers/tests/exampleSchema.test.d.ts +0 -1
- package/dist/helpers/tests/openapiSearchIndex.test.d.ts +0 -1
- package/dist/helpers/tests/resolveDocument.test.d.ts +0 -1
- package/dist/helpers/tests/schemaFormat.test.d.ts +0 -1
- package/dist/helpers/tests/toMarkdown.test.d.ts +0 -1
- package/dist/index-BqogUhNO.js +0 -19011
- package/dist/index-mYBY1Eu8.cjs +0 -177
- package/dist/public/tests/sections.test.d.ts +0 -1
- package/dist/stories/AsyncAPI.stories.d.ts +0 -14
- package/dist/stories/AsyncAPIRenderer.stories.d.ts +0 -17
- package/dist/stories/Authorization.stories.d.ts +0 -13
- package/dist/stories/Bindings.stories.d.ts +0 -12
- package/dist/stories/ChannelAddress.stories.d.ts +0 -13
- package/dist/stories/CodeBlock.stories.d.ts +0 -11
- package/dist/stories/Examples.stories.d.ts +0 -11
- package/dist/stories/Information.stories.d.ts +0 -9
- package/dist/stories/Message.stories.d.ts +0 -11
- package/dist/stories/Messages.stories.d.ts +0 -11
- package/dist/stories/Operation.stories.d.ts +0 -10
- package/dist/stories/Operations.stories.d.ts +0 -16
- package/dist/stories/SchemaTab.stories.d.ts +0 -12
- package/dist/stories/SchemaTree.stories.d.ts +0 -24
- package/dist/stories/SearchPanel.stories.d.ts +0 -16
- package/dist/stories/Server.stories.d.ts +0 -12
- package/dist/stories/TabToggle.stories.d.ts +0 -10
- package/dist/stories/Tabs.stories.d.ts +0 -11
- package/dist/stories/documentContextDecorator.d.ts +0 -25
- package/dist/stories/noCanvasDocsPage.d.ts +0 -9
- package/dist/utils/tests/hasRef.test.d.ts +0 -1
- package/dist/utils/tests/theme.test.d.ts +0 -1
- package/dist/utils/tests/useElementRect.test.d.ts +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: (props: import('..').IAsyncAPIProps) => import("react").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
page: () => import("react").JSX.Element;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
export declare const Base: Story;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { AsyncAPIRenderer } from '../containers/AsyncAPI/AsyncAPIRenderer';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof AsyncAPIRenderer;
|
|
6
|
-
tags: string[];
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
page: () => import("react").JSX.Element;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
export declare const Base: Story;
|
|
16
|
-
export declare const WithDiagnosticsCallback: Story;
|
|
17
|
-
export declare const InvalidDocument: Story;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Authorization } from '../components/Authorization';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Authorization;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const MultipleSchemes: Story;
|
|
11
|
-
export declare const OAuth2: Story;
|
|
12
|
-
export declare const ApiKey: Story;
|
|
13
|
-
export declare const OpenIdConnect: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Bindings } from '../components/Bindings';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Bindings;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const KafkaServer: Story;
|
|
11
|
-
export declare const KafkaOperation: Story;
|
|
12
|
-
export declare const Collapsed: Story;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import { ChannelAddress } from '../components/ChannelAddress';
|
|
4
|
-
declare const meta: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: typeof ChannelAddress;
|
|
7
|
-
decorators: ((Story: ComponentType) => import("react").JSX.Element)[];
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
export declare const WithParameters: Story;
|
|
12
|
-
export declare const Plain: Story;
|
|
13
|
-
export declare const Truncated: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { CodeBlock } from '../components/CodeBlock';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof CodeBlock;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const Default: Story;
|
|
11
|
-
export declare const ShortSnippet: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Examples } from '../components/Examples';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Examples;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const Default: Story;
|
|
11
|
-
export declare const WithEnumAndExamples: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: import('react').FunctionComponent<import('../types/asyncapi/Info').Info>;
|
|
5
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
6
|
-
};
|
|
7
|
-
export default meta;
|
|
8
|
-
type Story = StoryObj<typeof meta>;
|
|
9
|
-
export declare const Default: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Message } from '../containers/Messages/Message';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Message;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const Default: Story;
|
|
11
|
-
export declare const Expanded: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Messages } from '../public/sections';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Messages;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
tags: string[];
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
export declare const Default: Story;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Operation } from '../containers/Operation/Operation';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Operation;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const Default: Story;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Operations } from '../public/sections';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Operations;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
tags: string[];
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
page: () => import("react").JSX.Element;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
export declare const Default: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as SchemaTab } from '../components/schema/SchemaTab';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof SchemaTab;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
tags: string[];
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
export declare const Default: Story;
|
|
12
|
-
export declare const ConversionError: Story;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import { default as SchemaTree } from '../components/schema/SchemaTree';
|
|
4
|
-
declare const meta: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: typeof SchemaTree;
|
|
7
|
-
decorators: ((Story: ComponentType) => import("react").JSX.Element)[];
|
|
8
|
-
tags: string[];
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const NestedObject: Story;
|
|
13
|
-
export declare const RefChain: Story;
|
|
14
|
-
export declare const OneOfComposite: Story;
|
|
15
|
-
export declare const PropertyOneOf: Story;
|
|
16
|
-
export declare const PropertyAnyOf: Story;
|
|
17
|
-
export declare const AllOfComposite: Story;
|
|
18
|
-
export declare const ArrayWithItems: Story;
|
|
19
|
-
export declare const CircularRef: Story;
|
|
20
|
-
export declare const ConstraintsShowcase: Story;
|
|
21
|
-
export declare const ArrayItemConstraints: Story;
|
|
22
|
-
export declare const PropertyNot: Story;
|
|
23
|
-
export declare const NotBooleanTrue: Story;
|
|
24
|
-
export declare const CombinedTypeAndNot: Story;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as SearchPanel } from '../components/SearchPanel';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof SearchPanel;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
args: {
|
|
8
|
-
query: string;
|
|
9
|
-
onQueryChange: () => void;
|
|
10
|
-
results: never[];
|
|
11
|
-
onSelectResult: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
export declare const Default: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Servers } from '../public/sections';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Servers;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
tags: string[];
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
export declare const Default: Story;
|
|
12
|
-
export declare const SingleServer: Story;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as TabToggle } from '../components/TabToggle';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof TabToggle;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const Default: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Tabs } from '../components/Tabs';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Tabs;
|
|
6
|
-
decorators: ((Story: import('react').ComponentType) => import("react").JSX.Element)[];
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const WithIcons: Story;
|
|
11
|
-
export declare const Plain: Story;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Centers a component story at one consistent max width and makes it fill that
|
|
4
|
-
* width. Scoped per-story (not global) on purpose: the full-page AsyncAPI
|
|
5
|
-
* example stories should render edge-to-edge, so centering must not be applied
|
|
6
|
-
* globally in preview.
|
|
7
|
-
*/
|
|
8
|
-
export declare const centeredDecorator: (Story: ComponentType) => import("react").JSX.Element;
|
|
9
|
-
/**
|
|
10
|
-
* Shared Storybook decorator for rendering container components
|
|
11
|
-
* (Servers/Messages/Operations) in isolation. Those components, and their
|
|
12
|
-
* children (ChannelAddress, MessageDetails, the schema tree), read from
|
|
13
|
-
* AsyncAPIDocumentContext via useAsyncAPIDocument, which throws without a
|
|
14
|
-
* provider. This wraps a story in that provider, backed by a real document.
|
|
15
|
-
*
|
|
16
|
-
* `resolveDocument` inlines the doc's $refs (server security, message
|
|
17
|
-
* payloads, …) the way the production render path does, so stories show
|
|
18
|
-
* fully-resolved content instead of raw { $ref } wrappers, and the `deref`
|
|
19
|
-
* fallback below resolves any refs left in place (e.g. cycle-forming ones).
|
|
20
|
-
*/
|
|
21
|
-
export declare function buildDocumentContext(rawDoc: unknown): {
|
|
22
|
-
document: Record<string, unknown>;
|
|
23
|
-
deref: (refPath: string) => unknown;
|
|
24
|
-
decorator: (Story: ComponentType) => import("react").JSX.Element;
|
|
25
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A docs page with no live component canvas, just the description and prop
|
|
3
|
-
* table. Default autodocs embeds every story's canvas inline, sharing one DOM
|
|
4
|
-
* across the whole page: fine for a self-contained component, but this
|
|
5
|
-
* library's full-page widgets and portal/fixed-id-based components (search
|
|
6
|
-
* highlighting, side panels) don't render correctly when multiple instances
|
|
7
|
-
* share a page. Use this for those; leave default autodocs for the rest.
|
|
8
|
-
*/
|
|
9
|
-
export declare const NoCanvasDocsPage: () => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|