apiuikit 1.4.0 → 1.5.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.
- package/README.md +13 -5
- package/dist/{CodeSamples-BUKs-9f3.js → CodeSamples-3fEAwC7U.js} +940 -1016
- package/dist/CodeSamples-CtJp4xci.cjs +50 -0
- package/dist/LogoExtension-Cg0OHsOO.cjs +1 -0
- package/dist/LogoExtension-DBlTRKT3.js +17 -0
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +19 -18
- package/dist/components/AsyncCodeSample.d.ts +19 -0
- package/dist/components/DocumentTopBar.d.ts +13 -0
- package/dist/components/InfoMetadata.d.ts +1 -1
- package/dist/components/MarkdownExportMenu.d.ts +2 -4
- package/dist/components/SearchPanel.d.ts +2 -1
- package/dist/components/Section.d.ts +2 -0
- package/dist/config/config.d.ts +11 -1
- package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/Information/Information.d.ts +1 -0
- package/dist/containers/Information/InformationSection.d.ts +9 -1
- package/dist/containers/Information/OpenAPIInformation.d.ts +2 -1
- package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/Operation/Operations.d.ts +1 -2
- package/dist/containers/Path/Paths.d.ts +1 -2
- package/dist/contexts/useSpec.d.ts +6 -2
- package/dist/helpers/asyncCodeSample.d.ts +35 -0
- package/dist/helpers/codeSamples.d.ts +9 -4
- package/dist/helpers/markdownForLlm.d.ts +7 -0
- package/dist/helpers/toMarkdown.d.ts +5 -5
- package/dist/hooks/useDocumentProviderValue.d.ts +2 -0
- package/dist/{index-BBNb_Ixx.cjs → index-BBQWVHuB.cjs} +1 -1
- package/dist/{index-CKVSyzwW.js → index-BQeCkb1z.js} +1 -1
- package/dist/index-C2kuzQch.cjs +180 -0
- package/dist/{index-IshexNds.cjs → index-Cp1PIb8-.cjs} +1 -1
- package/dist/{index-C9v_6_ge.js → index-DS1UYBq6.js} +5278 -4182
- package/dist/{index-RSWJsjgH.js → index-DuK6tYTi.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/markdown.cjs +16 -13
- package/dist/markdown.d.ts +1 -0
- package/dist/markdown.es.js +201 -189
- package/dist/{protoToJsonSchema-3oaSqmPi.cjs → protoToJsonSchema-DehbDBi4.cjs} +1 -1
- package/dist/{protoToJsonSchema-CV3coy3B.js → protoToJsonSchema-lLl_CPoQ.js} +1 -1
- package/dist/{protobufSchemaParser-CH-kyi1k.cjs → protobufSchemaParser-5IiEfmHU.cjs} +1 -1
- package/dist/{protobufSchemaParser-gr8sPfks.js → protobufSchemaParser-Cmr_zqRL.js} +2 -2
- package/dist/utils/scrollLock.d.ts +6 -0
- package/package.json +4 -2
- package/dist/CodeSamples-pyaDwJRQ.cjs +0 -50
- package/dist/LogoExtension-BOYrY_RE.cjs +0 -1
- package/dist/LogoExtension-HOlSsQf-.js +0 -27
- package/dist/components/CopyMarkdownButton.d.ts +0 -15
- package/dist/index-BuNJJvOb.cjs +0 -133
package/README.md
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
# apiuikit
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/apiuikit)
|
|
4
|
+
[](https://www.npmjs.com/package/apiuikit)
|
|
5
|
+
[](https://www.npmjs.com/package/@apiuikit/web-component)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
|
|
3
8
|
React component library for rendering API specifications. Point it at an AsyncAPI or OpenAPI document and get a full interactive UI, which includes: servers, channels/endpoints, operations, messages, schemas, with no manual mapping required.
|
|
4
9
|
|
|
5
|
-
> **
|
|
6
|
-
>
|
|
10
|
+
> **Spec compatibility:** apiuikit renders AsyncAPI 3.x and OpenAPI 3.0/3.1
|
|
11
|
+
> documents. Version compatibility does not imply that every specification
|
|
12
|
+
> keyword has a dedicated UI; see [OpenAPI coverage](./docs/usage/openapi.md#coverage)
|
|
13
|
+
> for the exact rendered features and deliberate limits.
|
|
7
14
|
|
|
8
15
|
## Install
|
|
9
16
|
|
|
@@ -93,7 +100,8 @@ See the full usage docs for props, configuration options, and more:
|
|
|
93
100
|
- [Without Parser](./docs/usage/no-parser.md) (`AsyncAPI` component)
|
|
94
101
|
- [With Parser](./docs/usage/with-parser.md) (`AsyncAPIRenderer` component, `parseAndRender` utility)
|
|
95
102
|
- [Composable Sections](./docs/usage/sections.md) (`Servers`, `Operations`, `Messages`, `Schemas`, `Info`, `AsyncAPIProvider`)
|
|
96
|
-
- [
|
|
103
|
+
- [Configuration](./docs/configuration/config.md) (`ConfigInterface`: theme, show flags, sidebar, sidePanel, etc.)
|
|
104
|
+
- [Web Components](./docs/usage/with-webcomponents.md) (`<apiuikit-asyncapi>`, `<apiuikit-asyncapi-renderer>`, use apiuikit from any framework)
|
|
97
105
|
- [Markdown export](./docs/usage/markdown-export.md) (making your docs AI-readable: `config.markdown.url`, `documentToMarkdown`, `documentToLlmsTxt`)
|
|
98
106
|
- [Avro schemas](./docs/usage/avro.md)
|
|
99
107
|
- [Protobuf schemas](./docs/usage/protobuf.md)
|
|
@@ -110,7 +118,7 @@ npm install @apiuikit/web-component
|
|
|
110
118
|
Load the custom elements and stylesheet once, then pass a raw AsyncAPI or OpenAPI document to the corresponding renderer:
|
|
111
119
|
|
|
112
120
|
```html
|
|
113
|
-
<
|
|
121
|
+
<apiuikit-asyncapi-renderer id="api-doc"></apiuikit-asyncapi-renderer>
|
|
114
122
|
```
|
|
115
123
|
|
|
116
124
|
```js
|
|
@@ -121,7 +129,7 @@ const apiDoc = document.querySelector("#api-doc");
|
|
|
121
129
|
apiDoc.spec = rawYamlOrJsonString;
|
|
122
130
|
```
|
|
123
131
|
|
|
124
|
-
Use `<
|
|
132
|
+
Use `<apiuikit-openapi-renderer>` for raw OpenAPI documents. If the document is already parsed, use `<apiuikit-asyncapi>` or `<apiuikit-openapi>` and assign the object to its `spec` property.
|
|
125
133
|
|
|
126
134
|
See [Web Components](./docs/usage/with-webcomponents.md) for CDN usage, configuration, diagnostics, and framework integration.
|
|
127
135
|
|