apiuikit 0.3.0 → 0.5.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 +47 -3
- package/dist/LinkedInExtension-6xekO5bX.cjs +1 -0
- package/dist/LinkedInExtension-BL-4T9tt.js +21 -0
- package/dist/LogoExtension-BOYrY_RE.cjs +1 -0
- package/dist/LogoExtension-HOlSsQf-.js +27 -0
- package/dist/XExtension-GyRtdHLL.js +23 -0
- package/dist/XExtension-jAiATfg-.cjs +1 -0
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +1 -1
- package/dist/components/InfoMetadata.d.ts +7 -1
- package/dist/components/RenderExtensions.d.ts +15 -0
- package/dist/components/schema/SchemaTab.d.ts +6 -1
- package/dist/components/tests/Authorization.test.d.ts +1 -0
- package/dist/components/tests/RenderExtensions.test.d.ts +1 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +12 -6
- package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +9 -0
- package/dist/contexts/useSpec.d.ts +2 -0
- package/dist/icons/Search.d.ts +3 -0
- package/dist/{index-Bad1aEIj.js → index-BG6colCU.js} +2883 -2762
- package/dist/{index-D7GelPk0.cjs → index-BcNlIoEF.cjs} +1 -1
- package/dist/index-Bmw7IyyF.cjs +73 -0
- package/dist/{index-CzcxQGxP.js → index-CEf0X0H_.js} +1 -1
- package/dist/{protoToJsonSchema-BJpwl2Am.js → protoToJsonSchema-BcqPKXqK.js} +1 -1
- package/dist/{protoToJsonSchema-8Mm10CIx.cjs → protoToJsonSchema-C43lKcgx.cjs} +1 -1
- package/dist/{protobufSchemaParser-Cj2WOp05.js → protobufSchemaParser-BQVXzHsQ.js} +2 -2
- package/dist/{protobufSchemaParser-D_2rEsD4.cjs → protobufSchemaParser-sEw46uRx.cjs} +1 -1
- package/dist/public/sections.d.ts +6 -3
- package/dist/stories/AsyncAPI.stories.d.ts +6 -0
- package/dist/stories/AsyncAPIRenderer.stories.d.ts +6 -0
- package/dist/stories/Messages.stories.d.ts +1 -0
- package/dist/stories/Operations.stories.d.ts +6 -0
- package/dist/stories/SchemaTab.stories.d.ts +1 -0
- package/dist/stories/SchemaTree.stories.d.ts +1 -0
- package/dist/stories/Server.stories.d.ts +1 -0
- package/dist/stories/documentContextDecorator.d.ts +2 -2
- package/dist/stories/noCanvasDocsPage.d.ts +9 -0
- package/package.json +4 -2
- package/dist/index-gn5KpvCL.cjs +0 -73
|
@@ -5,7 +5,7 @@ var Vp = (xi) => {
|
|
|
5
5
|
var vd = (xi, Oi, Ai) => Oi in xi ? bd(xi, Oi, { enumerable: !0, configurable: !0, writable: !0, value: Ai }) : xi[Oi] = Ai;
|
|
6
6
|
var Np = (xi, Oi, Ai) => vd(xi, typeof Oi != "symbol" ? Oi + "" : Oi, Ai), Fp = (xi, Oi, Ai) => Oi.has(xi) || Vp("Cannot " + Ai);
|
|
7
7
|
var ir = (xi, Oi, Ai) => (Fp(xi, Oi, "read from private field"), Ai ? Ai.call(xi) : Oi.get(xi)), so = (xi, Oi, Ai) => Oi.has(xi) ? Vp("Cannot add the same private member more than once") : Oi instanceof WeakSet ? Oi.add(xi) : Oi.set(xi, Ai), da = (xi, Oi, Ai, sn) => (Fp(xi, Oi, "write to private field"), sn ? sn.call(xi, Ai) : Oi.set(xi, Ai), Ai);
|
|
8
|
-
import { g as jd } from "./index-
|
|
8
|
+
import { g as jd } from "./index-BG6colCU.js";
|
|
9
9
|
function $d(xi, Oi) {
|
|
10
10
|
for (var Ai = 0; Ai < Oi.length; Ai++) {
|
|
11
11
|
const sn = Oi[Ai];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var fi = Object.defineProperty;
|
|
2
2
|
var li = (p, t, u) => t in p ? fi(p, t, { enumerable: !0, configurable: !0, writable: !0, value: u }) : p[t] = u;
|
|
3
3
|
var le = (p, t, u) => li(p, typeof t != "symbol" ? t + "" : t, u);
|
|
4
|
-
import { c as ge, a as ci } from "./index-
|
|
4
|
+
import { c as ge, a as ci } from "./index-BG6colCU.js";
|
|
5
5
|
var Se = { exports: {} }, Le = { exports: {} }, Me = {}, Te = {}, qe, Ct;
|
|
6
6
|
function Br() {
|
|
7
7
|
if (Ct) return qe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var fi=Object.defineProperty;var li=(p,t,u)=>t in p?fi(p,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):p[t]=u;var le=(p,t,u)=>li(p,typeof t!="symbol"?t+"":t,u);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-
|
|
1
|
+
"use strict";var fi=Object.defineProperty;var li=(p,t,u)=>t in p?fi(p,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):p[t]=u;var le=(p,t,u)=>li(p,typeof t!="symbol"?t+"":t,u);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-Bmw7IyyF.cjs");var Fe={exports:{}},Le={exports:{}},Me={},Te={},qe,Ct;function Br(){if(Ct)return qe;Ct=1,qe=p;function p(t,u){for(var f=new Array(arguments.length-1),a=0,o=2,e=!0;o<arguments.length;)f[a++]=arguments[o++];return new Promise(function(r,s){f[a]=function(n){if(e)if(e=!1,n)s(n);else{for(var l=new Array(arguments.length-1),c=0;c<l.length;)l[c++]=arguments[c];r.apply(null,l)}};try{t.apply(u||null,f)}catch(h){e&&(e=!1,s(h))}})}return qe}var De={},Pt;function ci(){return Pt||(Pt=1,(function(p){var t=p;t.length=function(i){var r=i.length;if(!r)return 0;for(var s=0;--r%4>1&&i.charAt(r)==="=";)++s;return Math.ceil(i.length*3)/4-s};for(var u=new Array(64),f=new Array(123),a=0;a<64;)f[u[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;t.encode=function(i,r,s){for(var h=null,n=[],l=0,c=0,m;r<s;){var g=i[r++];switch(c){case 0:n[l++]=u[g>>2],m=(g&3)<<4,c=1;break;case 1:n[l++]=u[m|g>>4],m=(g&15)<<2,c=2;break;case 2:n[l++]=u[m|g>>6],n[l++]=u[g&63],c=0;break}l>8191&&((h||(h=[])).push(String.fromCharCode.apply(String,n)),l=0)}return c&&(n[l++]=u[m],n[l++]=61,c===1&&(n[l++]=61)),h?(l&&h.push(String.fromCharCode.apply(String,n.slice(0,l))),h.join("")):String.fromCharCode.apply(String,n.slice(0,l))};var o="invalid encoding";t.decode=function(i,r,s){for(var h=s,n=0,l,c=0;c<i.length;){var m=i.charCodeAt(c++);if(m===61&&n>1)break;if((m=f[m])===void 0)throw Error(o);switch(n){case 0:l=m,n=1;break;case 1:r[s++]=l<<2|(m&48)>>4,l=m,n=2;break;case 2:r[s++]=(l&15)<<4|(m&60)>>2,l=m,n=3;break;case 3:r[s++]=(l&3)<<6|m,n=0;break}}if(n===1)throw Error(o);return s-h},t.test=function(i){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(i)}})(De)),De}var Ce,Bt;function hi(){if(Bt)return Ce;Bt=1,Ce=p;function p(){this._listeners=Object.create(null)}return p.prototype.on=function(u,f,a){return(this._listeners[u]||(this._listeners[u]=[])).push({fn:f,ctx:a||this}),this},p.prototype.off=function(u,f){if(u===void 0)this._listeners=Object.create(null);else if(f===void 0)this._listeners[u]=[];else{var a=this._listeners[u];if(!a)return this;for(var o=0;o<a.length;)a[o].fn===f?a.splice(o,1):++o}return this},p.prototype.emit=function(u){var f=this._listeners[u];if(f){for(var a=[],o=1;o<arguments.length;)a.push(arguments[o++]);for(o=0;o<f.length;)f[o].fn.apply(f[o++].ctx,a)}return this},Ce}var Pe,jt;function di(){if(jt)return Pe;jt=1,Pe=p(p);function p(o){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),r=i[3]===128;function s(c,m,g){e[0]=c,m[g]=i[0],m[g+1]=i[1],m[g+2]=i[2],m[g+3]=i[3]}function h(c,m,g){e[0]=c,m[g]=i[3],m[g+1]=i[2],m[g+2]=i[1],m[g+3]=i[0]}o.writeFloatLE=r?s:h,o.writeFloatBE=r?h:s;function n(c,m){return i[0]=c[m],i[1]=c[m+1],i[2]=c[m+2],i[3]=c[m+3],e[0]}function l(c,m){return i[3]=c[m],i[2]=c[m+1],i[1]=c[m+2],i[0]=c[m+3],e[0]}o.readFloatLE=r?n:l,o.readFloatBE=r?l:n})():(function(){function e(r,s,h,n){var l=s<0?1:0;if(l&&(s=-s),s===0)r(1/s>0?0:2147483648,h,n);else if(isNaN(s))r(2143289344,h,n);else if(s>34028234663852886e22)r((l<<31|2139095040)>>>0,h,n);else if(s<11754943508222875e-54)r((l<<31|Math.round(s/1401298464324817e-60))>>>0,h,n);else{var c=Math.floor(Math.log(s)/Math.LN2),m=Math.round(s*Math.pow(2,-c)*8388608)&8388607;r((l<<31|c+127<<23|m)>>>0,h,n)}}o.writeFloatLE=e.bind(null,t),o.writeFloatBE=e.bind(null,u);function i(r,s,h){var n=r(s,h),l=(n>>31)*2+1,c=n>>>23&255,m=n&8388607;return c===255?m?NaN:l*(1/0):c===0?l*1401298464324817e-60*m:l*Math.pow(2,c-150)*(m+8388608)}o.readFloatLE=i.bind(null,f),o.readFloatBE=i.bind(null,a)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),i=new Uint8Array(e.buffer),r=i[7]===128;function s(c,m,g){e[0]=c,m[g]=i[0],m[g+1]=i[1],m[g+2]=i[2],m[g+3]=i[3],m[g+4]=i[4],m[g+5]=i[5],m[g+6]=i[6],m[g+7]=i[7]}function h(c,m,g){e[0]=c,m[g]=i[7],m[g+1]=i[6],m[g+2]=i[5],m[g+3]=i[4],m[g+4]=i[3],m[g+5]=i[2],m[g+6]=i[1],m[g+7]=i[0]}o.writeDoubleLE=r?s:h,o.writeDoubleBE=r?h:s;function n(c,m){return i[0]=c[m],i[1]=c[m+1],i[2]=c[m+2],i[3]=c[m+3],i[4]=c[m+4],i[5]=c[m+5],i[6]=c[m+6],i[7]=c[m+7],e[0]}function l(c,m){return i[7]=c[m],i[6]=c[m+1],i[5]=c[m+2],i[4]=c[m+3],i[3]=c[m+4],i[2]=c[m+5],i[1]=c[m+6],i[0]=c[m+7],e[0]}o.readDoubleLE=r?n:l,o.readDoubleBE=r?l:n})():(function(){function e(r,s,h,n,l,c){var m=n<0?1:0;if(m&&(n=-n),n===0)r(0,l,c+s),r(1/n>0?0:2147483648,l,c+h);else if(isNaN(n))r(0,l,c+s),r(2146959360,l,c+h);else if(n>17976931348623157e292)r(0,l,c+s),r((m<<31|2146435072)>>>0,l,c+h);else{var g;if(n<22250738585072014e-324)g=n/5e-324,r(g>>>0,l,c+s),r((m<<31|g/4294967296)>>>0,l,c+h);else{var E=Math.floor(Math.log(n)/Math.LN2);E===1024&&(E=1023),g=n*Math.pow(2,-E),r(g*4503599627370496>>>0,l,c+s),r((m<<31|E+1023<<20|g*1048576&1048575)>>>0,l,c+h)}}}o.writeDoubleLE=e.bind(null,t,0,4),o.writeDoubleBE=e.bind(null,u,4,0);function i(r,s,h,n,l){var c=r(n,l+s),m=r(n,l+h),g=(m>>31)*2+1,E=m>>>20&2047,_=4294967296*(m&1048575)+c;return E===2047?_?NaN:g*(1/0):E===0?g*5e-324*_:g*Math.pow(2,E-1075)*(_+4503599627370496)}o.readDoubleLE=i.bind(null,f,0,4),o.readDoubleBE=i.bind(null,a,4,0)})(),o}function t(o,e,i){e[i]=o&255,e[i+1]=o>>>8&255,e[i+2]=o>>>16&255,e[i+3]=o>>>24}function u(o,e,i){e[i]=o>>>24,e[i+1]=o>>>16&255,e[i+2]=o>>>8&255,e[i+3]=o&255}function f(o,e){return(o[e]|o[e+1]<<8|o[e+2]<<16|o[e+3]<<24)>>>0}function a(o,e){return(o[e]<<24|o[e+1]<<16|o[e+2]<<8|o[e+3])>>>0}return Pe}var Be={},$t;function pi(){return $t||($t=1,(function(p){var t=p,u=65533;t.length=function(a){for(var o=0,e=0,i=0;i<a.length;++i)e=a.charCodeAt(i),e<128?o+=1:e<2048?o+=2:(e&64512)===55296&&(a.charCodeAt(i+1)&64512)===56320?(++i,o+=4):o+=3;return o},t.read=function(a,o,e){if(e-o<1)return"";for(var i=null,r=[],s=0,h,n,l,c;o<e;)h=a[o++],h<=127?r[s++]=h:h>=192&&h<224?(l=(h&31)<<6|a[o++]&63,r[s++]=l>=128?l:u):h>=224&&h<240?(c=(h&15)<<12|(a[o++]&63)<<6|a[o++]&63,r[s++]=c>=2048?c:u):h>=240&&(n=(h&7)<<18|(a[o++]&63)<<12|(a[o++]&63)<<6|a[o++]&63,n<65536||n>1114111?r[s++]=u:(n-=65536,r[s++]=55296+(n>>10),r[s++]=56320+(n&1023))),s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,r.slice(0,s))),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,r.slice(0,s))),i.join("")):String.fromCharCode.apply(String,r.slice(0,s))},t.write=function(a,o,e){for(var i=e,r,s,h=0;h<a.length;++h)r=a.charCodeAt(h),r<128?o[e++]=r:r<2048?(o[e++]=r>>6|192,o[e++]=r&63|128):(r&64512)===55296&&((s=a.charCodeAt(h+1))&64512)===56320?(r=65536+((r&1023)<<10)+(s&1023),++h,o[e++]=r>>18|240,o[e++]=r>>12&63|128,o[e++]=r>>6&63|128,o[e++]=r&63|128):(o[e++]=r>>12|224,o[e++]=r>>6&63|128,o[e++]=r&63|128);return e-i}})(Be)),Be}var je,Ut;function mi(){if(Ut)return je;Ut=1,je=p;function p(t,u,f){var a=f||8192,o=a>>>1,e=null,i=a;return function(s){if(s<1||s>o)return t(s);i+s>a&&(e=t(a),i=0);var h=u.call(e,i,i+=s);return i&7&&(i=(i|7)+1),h}}return je}var $e,Vt;function gi(){if(Vt)return $e;Vt=1,$e=t;var p=ue();function t(o,e){this.lo=o>>>0,this.hi=e>>>0}var u=t.zero=new t(0,0);u.toNumber=function(){return 0},u.zzEncode=u.zzDecode=function(){return this},u.length=function(){return 1};var f=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(e===0)return u;var i=e<0;i&&(e=-e);var r=e>>>0,s=(e-r)/4294967296>>>0;return i&&(s=~s>>>0,r=~r>>>0,++r>4294967295&&(r=0,++s>4294967295&&(s=0))),new t(r,s)},t.from=function(e){if(typeof e=="number")return t.fromNumber(e);if(p.isString(e))if(p.Long)e=p.Long.fromString(e);else return t.fromNumber(parseInt(e,10));return e.low||e.high?new t(e.low>>>0,e.high>>>0):u},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var i=~this.lo+1>>>0,r=~this.hi>>>0;return i||(r=r+1>>>0),-(i+r*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(e){return p.Long?new p.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var a=String.prototype.charCodeAt;return t.fromHash=function(e){return e===f?u:new t((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?i===0?e<16384?e<128?1:2:e<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:r<128?9:10},$e}var be={exports:{}},yi=be.exports,Jt;function vi(){return Jt||(Jt=1,(function(p,t){(function(u,f){function a(o){return o.default||o}f(t),p.exports=a(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:yi,function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.default=void 0;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2009 The Closure Library Authors
|
|
4
4
|
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { protoToJsonSchema as e } from "./protoToJsonSchema-
|
|
2
|
-
import { r as a, i as s, X as t } from "./index-
|
|
1
|
+
import { protoToJsonSchema as e } from "./protoToJsonSchema-BcqPKXqK.js";
|
|
2
|
+
import { r as a, i as s, X as t } from "./index-BG6colCU.js";
|
|
3
3
|
function n(r) {
|
|
4
4
|
if (typeof r != "string")
|
|
5
5
|
return ["Protobuf schema must be a string of .proto source"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./protoToJsonSchema-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./protoToJsonSchema-C43lKcgx.cjs"),e=require("./index-Bmw7IyyF.cjs");function n(r){if(typeof r!="string")return["Protobuf schema must be a string of .proto source"];try{return t.protoToJsonSchema(r),[]}catch(o){return[o instanceof Error?o.message:"Failed to parse protobuf schema"]}}const s=["application/vnd.google.protobuf","application/vnd.google.protobuf;version=2","application/vnd.google.protobuf;version=3"];function a(){return{validate:u,parse:i,getMimeTypes:()=>s}}function c(r){e.registerSchemaParserWithFallback(r,a(),e.isProtobufSchemaFormat)}function u(r){return n(r.data).map(o=>({message:o,path:r.path}))}function i(r){if(typeof r.data!="string")return{[e.X_LIB_CONVERSION_ERROR]:"Protobuf schema must be a string of .proto source"};try{return t.protoToJsonSchema(r.data)}catch(o){return{[e.X_LIB_CONVERSION_ERROR]:o instanceof Error?o.message:"Failed to convert Protobuf schema"}}}exports.ProtobufSchemaParser=a;exports.registerProtobufSchemaParser=c;
|
|
@@ -8,10 +8,10 @@ import { AsyncAPIDocumentData } from '../types/schema';
|
|
|
8
8
|
* `<AsyncAPI>` widget.
|
|
9
9
|
*
|
|
10
10
|
* They're dual-mode:
|
|
11
|
-
* - Standalone
|
|
11
|
+
* - Standalone: pass a `document` (and optional `config`); the section
|
|
12
12
|
* resolves it and sets up its own context.
|
|
13
13
|
* <Operations document={doc} />
|
|
14
|
-
* - Composed
|
|
14
|
+
* - Composed: render several under one <AsyncAPIProvider> (resolves once,
|
|
15
15
|
* shares context); sections then read from it and their own `document`
|
|
16
16
|
* prop is unnecessary.
|
|
17
17
|
* <AsyncAPIProvider document={doc}>
|
|
@@ -28,11 +28,14 @@ export interface SectionProps {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Provider that resolves a document once and shares it with any section
|
|
31
|
-
* components rendered inside
|
|
31
|
+
* components rendered inside: the composition entry point.
|
|
32
32
|
*/
|
|
33
33
|
export declare function AsyncAPIProvider({ document, config, children, }: {
|
|
34
|
+
/** The AsyncAPI document to resolve and share with sections inside. */
|
|
34
35
|
document: AsyncAPIDocumentData;
|
|
36
|
+
/** UI configuration (theme, schema expansion defaults) shared with sections inside. */
|
|
35
37
|
config?: ConfigInterface;
|
|
38
|
+
/** Section components (or your own), rendered with access to the shared document context. */
|
|
36
39
|
children: ReactNode;
|
|
37
40
|
}): import("react").JSX.Element;
|
|
38
41
|
export declare function Servers(props: SectionProps): import("react").JSX.Element;
|
|
@@ -2,6 +2,12 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: (props: import('..').IAsyncAPIProps) => import("react").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
page: () => import("react").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
5
11
|
};
|
|
6
12
|
export default meta;
|
|
7
13
|
type Story = StoryObj<typeof meta>;
|
|
@@ -3,6 +3,12 @@ import { AsyncAPIRenderer } from '../containers/AsyncAPI/AsyncAPIRenderer';
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: typeof AsyncAPIRenderer;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
page: () => import("react").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
6
12
|
};
|
|
7
13
|
export default meta;
|
|
8
14
|
type Story = StoryObj<typeof meta>;
|
|
@@ -4,6 +4,12 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: typeof Operations;
|
|
6
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
|
+
};
|
|
7
13
|
};
|
|
8
14
|
export default meta;
|
|
9
15
|
type Story = StoryObj<typeof meta>;
|
|
@@ -8,8 +8,8 @@ import { ComponentType } from 'react';
|
|
|
8
8
|
export declare const centeredDecorator: (Story: ComponentType) => import("react").JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* Shared Storybook decorator for rendering container components
|
|
11
|
-
* (Servers/Messages/Operations) in isolation. Those components
|
|
12
|
-
* children (ChannelAddress, MessageDetails, the schema tree)
|
|
11
|
+
* (Servers/Messages/Operations) in isolation. Those components, and their
|
|
12
|
+
* children (ChannelAddress, MessageDetails, the schema tree), read from
|
|
13
13
|
* AsyncAPIDocumentContext via useAsyncAPIDocument, which throws without a
|
|
14
14
|
* provider. This wraps a story in that provider, backed by a real document.
|
|
15
15
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apiuikit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A React UI library for rendering your API specifications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@asyncapi/modelina": "^5.10.1",
|
|
67
|
+
"@asyncapi/parser": "^3.6.0",
|
|
67
68
|
"@chromatic-com/storybook": "^3.2.3",
|
|
68
69
|
"@eslint/js": "^9.17.0",
|
|
69
70
|
"@storybook/addon-a11y": "^8.6.18",
|
|
@@ -97,7 +98,8 @@
|
|
|
97
98
|
"typescript-eslint": "^8.18.2",
|
|
98
99
|
"vite": "^6.0.5",
|
|
99
100
|
"vite-plugin-dts": "^5.0.3",
|
|
100
|
-
"vitest": "^4.1.10"
|
|
101
|
+
"vitest": "^4.1.10",
|
|
102
|
+
"x-tensions": "*"
|
|
101
103
|
},
|
|
102
104
|
"eslintConfig": {
|
|
103
105
|
"extends": [
|