apiuikit 1.7.0 → 1.8.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 CHANGED
@@ -82,17 +82,17 @@ export default function OperationsPage() {
82
82
  }
83
83
  ```
84
84
 
85
- `AsyncAPIServers`, `AsyncAPIOperations`, `AsyncAPIMessages`, `AsyncAPISchemas`, and `AsyncAPIInfo` all work this way (OpenAPI equivalents: `OpenAPIServers`, `OpenAPIEndpoints`, `OpenAPISchemas`, `OpenAPIInfo`). To arrange several of them together, wrap them in `AsyncAPIProvider` (or `OpenAPIProvider`) instead so the document is resolved once and shared:
85
+ `AsyncAPIServers`, `AsyncAPIOperations`, `AsyncAPIMessages`, and `AsyncAPIInfo` all work this way (OpenAPI equivalents: `OpenAPIServers`, `OpenAPIEndpoints`, `OpenAPIInfo`), as does `Schemas`, which is shared by both specs. To arrange several of them together, wrap them in `AsyncAPIProvider` (or `OpenAPIProvider`) instead so the document is resolved once and shared:
86
86
 
87
87
  ```tsx
88
- import { AsyncAPIProvider, AsyncAPIServers, AsyncAPIOperations, AsyncAPISchemas } from "apiuikit";
88
+ import { AsyncAPIProvider, AsyncAPIServers, AsyncAPIOperations, Schemas } from "apiuikit";
89
89
 
90
90
  export default function CustomLayout() {
91
91
  return (
92
92
  <AsyncAPIProvider document={doc}>
93
93
  <AsyncAPIServers />
94
94
  <AsyncAPIOperations />
95
- <AsyncAPISchemas />
95
+ <Schemas />
96
96
  </AsyncAPIProvider>
97
97
  );
98
98
  }
@@ -102,7 +102,7 @@ See the full usage docs for props, configuration options, and more:
102
102
 
103
103
  - [Without Parser](./docs/usage/no-parser.md) (`AsyncAPI` component)
104
104
  - [With Parser](./docs/usage/with-parser.md) (`AsyncAPIRenderer` component, `parseAndRender` utility)
105
- - [Composable Sections](./docs/usage/sections.md) (`AsyncAPIServers`, `AsyncAPIOperations`, `AsyncAPIMessages`, `AsyncAPISchemas`, `AsyncAPIInfo`, `AsyncAPIProvider`)
105
+ - [Composable Sections](./docs/usage/sections.md) (`AsyncAPIServers`, `AsyncAPIOperations`, `AsyncAPIMessages`, `Schemas`, `AsyncAPIInfo`, `AsyncAPIProvider`)
106
106
  - [Configuration](./docs/configuration/config.md) (`ConfigInterface`: theme, show flags, sidebar, sidePanel, etc.)
107
107
  - [Web Components](./docs/usage/with-webcomponents.md) (`<apiuikit-asyncapi>`, `<apiuikit-asyncapi-renderer>`, use apiuikit from any framework)
108
108
  - [Plugins](./docs/usage/plugins.md) (`plugins` prop, `definePlugin`, writing and publishing your own)
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("react/jsx-runtime"),ne=require("react"),D=require("./index-CF-r_0ZS.cjs");function Dr(t,e=new Set){if(e.has(t))return t;if(t.type==="object"&&t.properties&&typeof t.properties=="object"){e.add(t);try{const r={};for(const[n,s]of Object.entries(t.properties)){const o=/id$/i.test(n)&&s.type==="string"&&!s.format&&!s.examples,a=s.type==="string"&&!s.format&&!s.examples&&!s.enum;r[n]=o?{...s,format:"uuid"}:a?{...s,examples:["string"]}:Dr(s,e)}return{...t,properties:r}}finally{e.delete(t)}}return t}async function An(t){try{const{generate:e}=await Promise.resolve().then(()=>require("./index-d8kJa7YD.cjs"));return await e(Dr(t),{seed:42,useExamplesValue:!0,optionalsProbability:1})}catch{return}}const ir="",ar=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("react/jsx-runtime"),ne=require("react"),D=require("./index-BG2MGxhP.cjs");function Dr(t,e=new Set){if(e.has(t))return t;if(t.type==="object"&&t.properties&&typeof t.properties=="object"){e.add(t);try{const r={};for(const[n,s]of Object.entries(t.properties)){const o=/id$/i.test(n)&&s.type==="string"&&!s.format&&!s.examples,a=s.type==="string"&&!s.format&&!s.examples&&!s.enum;r[n]=o?{...s,format:"uuid"}:a?{...s,examples:["string"]}:Dr(s,e)}return{...t,properties:r}}finally{e.delete(t)}}return t}async function An(t){try{const{generate:e}=await Promise.resolve().then(()=>require("./index-d8kJa7YD.cjs"));return await e(Dr(t),{seed:42,useExamplesValue:!0,optionalsProbability:1})}catch{return}}const ir="",ar=`
2
2
  `;var E=class{constructor({indent:t,join:e}={}){this.postProcessors=[],this.code=[],this.indentationCharacter=ir,this.lineJoin=ar,this.indentLine=(r,n=0)=>`${this.indentationCharacter.repeat(n)}${r}`,this.unshift=(r,n)=>{const s=this.indentLine(r,n);this.code.unshift(s)},this.push=(r,n)=>{const s=this.indentLine(r,n);this.code.push(s)},this.pushToLast=r=>{this.code||this.push(r);const n=`${this.code[this.code.length-1]}${r}`;this.code[this.code.length-1]=n},this.blank=()=>{this.code.push("")},this.join=()=>{const r=this.code.join(this.lineJoin);return this.postProcessors.reduce((n,s)=>s(n),r)},this.addPostProcessor=r=>{this.postProcessors=[...this.postProcessors,r]},this.indentationCharacter=t||ir,this.lineJoin=e??ar}},Rn=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},qn=function(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.default=t=>Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e));const Nn=Rn,_n=qn,Ln=Yt.default;var In=(t,e,r)=>{const n=[];return(function s(o,a,i){a=a||{},a.indent=a.indent||" ",i=i||"";let c;a.inlineCharacterLimit===void 0?c={newLine:`
3
3
  `,newLineOrSpace:`
4
4
  `,pad:i,indent:i+a.indent}:c={newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"};const l=f=>{if(a.inlineCharacterLimit===void 0)return f;const u=f.replace(new RegExp(c.newLine,"g"),"").replace(new RegExp(c.newLineOrSpace,"g")," ").replace(new RegExp(c.pad+"|"+c.indent,"g"),"");return u.length<=a.inlineCharacterLimit?u:f.replace(new RegExp(c.newLine+"|"+c.newLineOrSpace,"g"),`
@@ -1,6 +1,6 @@
1
1
  import { jsxs as ar, jsx as qe } from "react/jsx-runtime";
2
2
  import { useId as _n, useMemo as ze, useState as gt, useEffect as sr } from "react";
3
- import { g as Ln, c as rt, a as In, u as Un, b as cr, e as Fn, o as Mn, C as Hn, h as Bn } from "./index-D1584wmO.js";
3
+ import { g as Ln, c as rt, a as In, u as Un, b as cr, e as Fn, o as Mn, C as Hn, h as Bn } from "./index-mzpFFTrv.js";
4
4
  function Zr(t, e = /* @__PURE__ */ new Set()) {
5
5
  if (e.has(t)) return t;
6
6
  if (t.type === "object" && t.properties && typeof t.properties == "object") {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("./index-CF-r_0ZS.cjs");function n({value:e}){const o=t.resolveLogo(e);return o?r.jsx("img",{src:o.url,alt:o.altText??"logo",style:o.backgroundColor?{backgroundColor:o.backgroundColor}:void 0,className:"max-h-24 max-w-24 object-contain"}):null}exports.default=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("./index-BG2MGxhP.cjs");function n({value:e}){const o=t.resolveLogo(e);return o?r.jsx("img",{src:o.url,alt:o.altText??"logo",style:o.backgroundColor?{backgroundColor:o.backgroundColor}:void 0,className:"max-h-24 max-w-24 object-contain"}):null}exports.default=n;
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { d as l } from "./index-D1584wmO.js";
2
+ import { d as l } from "./index-mzpFFTrv.js";
3
3
  function e({ value: r }) {
4
4
  const o = l(r);
5
5
  return o ? /* @__PURE__ */ t(
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-CF-r_0ZS.cjs");exports.AsyncAPI=e.AsyncAPI;exports.AsyncAPIInfo=e.AsyncAPIInfo;exports.AsyncAPIMessages=e.AsyncAPIMessages;exports.AsyncAPIOperations=e.AsyncAPIOperations;exports.AsyncAPIProvider=e.AsyncAPIProvider;exports.AsyncAPIRenderer=e.AsyncAPIRenderer;exports.AsyncAPISchemas=e.AsyncAPISchemas;exports.AsyncAPIServers=e.AsyncAPIServers;exports.ErrorBoundary=e.ErrorBoundary;exports.OpenAPI=e.OpenAPI;exports.OpenAPIEndpoints=e.OpenAPIEndpoints;exports.OpenAPIInfo=e.OpenAPIInfo;exports.OpenAPIProvider=e.OpenAPIProvider;exports.OpenAPIRenderer=e.OpenAPIRenderer;exports.OpenAPISchemas=e.OpenAPISchemas;exports.OpenAPIServers=e.OpenAPIServers;exports.OpenAPIWebhooks=e.OpenAPIWebhooks;exports.PluginSlot=e.PluginSlot;exports.SchemaTab=e.SchemaTabs;exports.SchemaTree=e.SchemaTree;exports.asyncApiOperationToMarkdown=e.asyncApiOperationToMarkdown;exports.asyncApiToMarkdown=e.asyncApiToMarkdown;exports.default=e.AsyncAPI;exports.defaultConfig=e.defaultConfig;exports.documentToLlmsTxt=e.documentToLlmsTxt;exports.documentToMarkdown=e.documentToMarkdown;exports.listDocumentTargets=e.listDocumentTargets;exports.markdownForLlm=e.markdownForLlm;exports.openApiEndpointToMarkdown=e.openApiEndpointToMarkdown;exports.openApiToMarkdown=e.openApiToMarkdown;exports.parseAndRender=e.parseAndRender;exports.parseAndRenderOpenAPI=e.parseAndRender$1;exports.targetSlug=e.targetSlug;exports.useAsyncAPIDocument=e.useAsyncAPIDocument;exports.useAsyncAPIDocumentContext=e.useAsyncAPIDocumentContext;exports.useDocumentContext=e.useDocumentContext;exports.useOpenAPIDocumentContext=e.useOpenAPIDocumentContext;exports.useOperationTabPlugins=e.useOperationTabPlugins;exports.usePluginSlot=e.usePluginSlot;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BG2MGxhP.cjs");exports.AsyncAPI=e.AsyncAPI;exports.AsyncAPIInfo=e.AsyncAPIInfo;exports.AsyncAPIMessages=e.AsyncAPIMessages;exports.AsyncAPIOperations=e.AsyncAPIOperations;exports.AsyncAPIProvider=e.AsyncAPIProvider;exports.AsyncAPIRenderer=e.AsyncAPIRenderer;exports.AsyncAPISchemas=e.AsyncAPISchemas;exports.AsyncAPIServers=e.AsyncAPIServers;exports.ErrorBoundary=e.ErrorBoundary;exports.OpenAPI=e.OpenAPI;exports.OpenAPIEndpoints=e.OpenAPIEndpoints;exports.OpenAPIInfo=e.OpenAPIInfo;exports.OpenAPIProvider=e.OpenAPIProvider;exports.OpenAPIRenderer=e.OpenAPIRenderer;exports.OpenAPISchemas=e.OpenAPISchemas;exports.OpenAPIServers=e.OpenAPIServers;exports.OpenAPIWebhooks=e.OpenAPIWebhooks;exports.PluginSlot=e.PluginSlot;exports.SchemaTab=e.SchemaTabs;exports.SchemaTree=e.SchemaTree;exports.Schemas=e.Schemas;exports.asyncApiOperationToMarkdown=e.asyncApiOperationToMarkdown;exports.asyncApiToMarkdown=e.asyncApiToMarkdown;exports.default=e.AsyncAPI;exports.defaultConfig=e.defaultConfig;exports.documentToLlmsTxt=e.documentToLlmsTxt;exports.documentToMarkdown=e.documentToMarkdown;exports.listDocumentTargets=e.listDocumentTargets;exports.markdownForLlm=e.markdownForLlm;exports.openApiEndpointToMarkdown=e.openApiEndpointToMarkdown;exports.openApiToMarkdown=e.openApiToMarkdown;exports.parseAndRender=e.parseAndRender;exports.parseAndRenderOpenAPI=e.parseAndRender$1;exports.targetSlug=e.targetSlug;exports.useAsyncAPIDocument=e.useAsyncAPIDocument;exports.useAsyncAPIDocumentContext=e.useAsyncAPIDocumentContext;exports.useDocumentContext=e.useDocumentContext;exports.useOpenAPIDocumentContext=e.useOpenAPIDocumentContext;exports.useOperationTabPlugins=e.useOperationTabPlugins;exports.usePluginSlot=e.usePluginSlot;
@@ -1,4 +1,4 @@
1
- import { A as e, f as n, j as o, k as A, l as r, m as t, n as P, p, E as c, O as I, q as d, s as u, t as i, v as m, w as y, x as O, y as l, P as T, S, z as g, B as k, D as f, A as w, F as M, G as x, H as D, I as h, J as v, o as R, K as C, L as E, M as b, N as L, Q as B, R as F, u as j, T as q, U as z, V as G } from "./index-D1584wmO.js";
1
+ import { A as e, f as n, j as o, k as A, l as r, m as t, n as P, p, E as c, O as I, q as d, s as u, t as m, v as i, w as y, x as O, y as l, P as T, S, z as g, B as k, D as f, F as w, A as M, G as h, H as x, I as D, J as v, K as R, o as C, L as E, M as b, N as L, Q as B, R as F, T as W, u as j, U as q, V as z, W as G } from "./index-mzpFFTrv.js";
2
2
  export {
3
3
  e as AsyncAPI,
4
4
  n as AsyncAPIInfo,
@@ -12,29 +12,30 @@ export {
12
12
  I as OpenAPI,
13
13
  d as OpenAPIEndpoints,
14
14
  u as OpenAPIInfo,
15
- i as OpenAPIProvider,
16
- m as OpenAPIRenderer,
15
+ m as OpenAPIProvider,
16
+ i as OpenAPIRenderer,
17
17
  y as OpenAPISchemas,
18
18
  O as OpenAPIServers,
19
19
  l as OpenAPIWebhooks,
20
20
  T as PluginSlot,
21
21
  S as SchemaTab,
22
22
  g as SchemaTree,
23
- k as asyncApiOperationToMarkdown,
24
- f as asyncApiToMarkdown,
25
- w as default,
26
- M as defaultConfig,
23
+ k as Schemas,
24
+ f as asyncApiOperationToMarkdown,
25
+ w as asyncApiToMarkdown,
26
+ M as default,
27
+ h as defaultConfig,
27
28
  x as documentToLlmsTxt,
28
29
  D as documentToMarkdown,
29
- h as listDocumentTargets,
30
- v as markdownForLlm,
31
- R as openApiEndpointToMarkdown,
32
- C as openApiToMarkdown,
33
- E as parseAndRender,
34
- b as parseAndRenderOpenAPI,
35
- L as targetSlug,
36
- B as useAsyncAPIDocument,
37
- F as useAsyncAPIDocumentContext,
30
+ v as listDocumentTargets,
31
+ R as markdownForLlm,
32
+ C as openApiEndpointToMarkdown,
33
+ E as openApiToMarkdown,
34
+ b as parseAndRender,
35
+ L as parseAndRenderOpenAPI,
36
+ B as targetSlug,
37
+ F as useAsyncAPIDocument,
38
+ W as useAsyncAPIDocumentContext,
38
39
  j as useDocumentContext,
39
40
  q as useOpenAPIDocumentContext,
40
41
  z as useOperationTabPlugins,