apiuikit 1.2.0 → 1.4.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.
Files changed (33) hide show
  1. package/dist/{CodeSamples-CXtSA6EK.js → CodeSamples-BUKs-9f3.js} +1 -1
  2. package/dist/{CodeSamples-D7dq1xEM.cjs → CodeSamples-pyaDwJRQ.cjs} +1 -1
  3. package/dist/apiuikit.cjs.js +1 -1
  4. package/dist/apiuikit.css +1 -1
  5. package/dist/apiuikit.es.js +1 -1
  6. package/dist/components/Section.d.ts +13 -1
  7. package/dist/config/config.d.ts +10 -0
  8. package/dist/containers/Information/Information.d.ts +5 -1
  9. package/dist/containers/Information/InformationSection.d.ts +3 -1
  10. package/dist/containers/Information/OpenAPIInformation.d.ts +3 -1
  11. package/dist/containers/Messages/Messages.d.ts +3 -1
  12. package/dist/containers/Operation/Operations.d.ts +3 -1
  13. package/dist/containers/Path/Paths.d.ts +3 -1
  14. package/dist/containers/Schema/Schemas.d.ts +3 -1
  15. package/dist/containers/Server/OpenAPIServers.d.ts +3 -1
  16. package/dist/containers/Server/Servers.d.ts +3 -1
  17. package/dist/contexts/useSpec.d.ts +3 -1
  18. package/dist/hooks/useDocumentProviderValue.d.ts +2 -1
  19. package/dist/{index-BoAORjov.cjs → index-BBNb_Ixx.cjs} +1 -1
  20. package/dist/index-BuNJJvOb.cjs +133 -0
  21. package/dist/{index-DwzxTmOd.js → index-C9v_6_ge.js} +1864 -1791
  22. package/dist/{index-BMRPdMaB.js → index-CKVSyzwW.js} +1 -1
  23. package/dist/{index-CZjVUeK4.cjs → index-IshexNds.cjs} +1 -1
  24. package/dist/{index-ib-tk7y5.js → index-RSWJsjgH.js} +1 -1
  25. package/dist/index.d.ts +2 -1
  26. package/dist/{protoToJsonSchema-wxazjeYy.cjs → protoToJsonSchema-3oaSqmPi.cjs} +1 -1
  27. package/dist/{protoToJsonSchema-Btyc_WLL.js → protoToJsonSchema-CV3coy3B.js} +1 -1
  28. package/dist/{protobufSchemaParser-G1NujZ28.cjs → protobufSchemaParser-CH-kyi1k.cjs} +1 -1
  29. package/dist/{protobufSchemaParser-9KjS7p8W.js → protobufSchemaParser-gr8sPfks.js} +2 -2
  30. package/dist/public/openapiSections.d.ts +12 -5
  31. package/dist/public/sections.d.ts +12 -5
  32. package/package.json +1 -1
  33. package/dist/index-BJ0X8yP3.cjs +0 -133
@@ -5,7 +5,7 @@ var Vp = (xi) => {
5
5
  var bd = (xi, Oi, Ai) => Oi in xi ? gd(xi, Oi, { enumerable: !0, configurable: !0, writable: !0, value: Ai }) : xi[Oi] = Ai;
6
6
  var Np = (xi, Oi, Ai) => bd(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), ca = (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 vd } from "./index-DwzxTmOd.js";
8
+ import { g as vd } from "./index-C9v_6_ge.js";
9
9
  function jd(xi, Oi) {
10
10
  for (var Ai = 0; Ai < Oi.length; Ai++) {
11
11
  const sn = Oi[Ai];
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { default, default as AsyncAPI } from './containers/AsyncAPI/AsyncAPI';
2
2
  export type { IAsyncAPIProps } from './containers/AsyncAPI/AsyncAPI';
3
3
  export { default as OpenAPI } from './containers/OpenAPI/OpenAPI';
4
4
  export type { IOpenAPIProps } from './containers/OpenAPI/OpenAPI';
5
- export type { ConfigInterface, MarkdownConfig, MarkdownTarget, MarkdownUrlResolver } from './config';
5
+ export type { ConfigInterface, MarkdownConfig, MarkdownTarget, MarkdownUrlResolver, SidePanelConfig, SidePanelContainment } from './config';
6
6
  export { documentToLlmsTxt, documentToMarkdown, listDocumentTargets, targetSlug } from './helpers/llmsTxt';
7
7
  export type { DocumentTarget, LlmsTxtLink, LlmsTxtOptions } from './helpers/llmsTxt';
8
8
  export { asyncApiOperationToMarkdown, asyncApiToMarkdown, openApiEndpointToMarkdown, openApiToMarkdown, } from './helpers/toMarkdown';
@@ -20,5 +20,6 @@ export { parseAndRender as parseAndRenderOpenAPI } from './helpers/openapiParser
20
20
  export { OpenAPIRenderer } from './containers/OpenAPI/OpenAPIRenderer';
21
21
  export { AsyncAPIProvider, Servers, Operations, Messages, Schemas, Info, } from './public/sections';
22
22
  export type { SectionProps } from './public/sections';
23
+ export type { SectionLayout } from './components/Section';
23
24
  export { OpenAPIProvider, OpenAPIServers, OpenAPIEndpoints, OpenAPIWebhooks, OpenAPISchemas, OpenAPIInfo, } from './public/openapiSections';
24
25
  export type { OpenAPISectionProps } from './public/openapiSections';
@@ -1,4 +1,4 @@
1
- "use strict";var Yr=Object.defineProperty;var Xr=(a,e,i)=>e in a?Yr(a,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[e]=i;var ve=(a,e,i)=>Xr(a,typeof e!="symbol"?e+"":e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-BJ0X8yP3.cjs");var Er={exports:{}},Ar={exports:{}},Tr={},Ue={},Rr=Kr;function Kr(a,e){for(var i=new Array(arguments.length-1),f=0,s=2,u=!0;s<arguments.length;)i[f++]=arguments[s++];return new Promise(function(o,r){i[f]=function(c){if(u)if(u=!1,c)r(c);else{for(var l=new Array(arguments.length-1),d=0;d<l.length;)l[d++]=arguments[d];o.apply(null,l)}};try{a.apply(e||null,i)}catch(n){u&&(u=!1,r(n))}})}var Nr={};(function(a){var e=a;e.length=function(o){var r=o.length;if(!r)return 0;for(var n=0;--r%4>1&&o.charAt(r)==="=";)++n;return Math.ceil(o.length*3)/4-n};for(var i=new Array(64),f=new Array(123),s=0;s<64;)f[i[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;e.encode=function(o,r,n){for(var c=null,l=[],d=0,p=0,m;r<n;){var g=o[r++];switch(p){case 0:l[d++]=i[g>>2],m=(g&3)<<4,p=1;break;case 1:l[d++]=i[m|g>>4],m=(g&15)<<2,p=2;break;case 2:l[d++]=i[m|g>>6],l[d++]=i[g&63],p=0;break}d>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,l)),d=0)}return p&&(l[d++]=i[m],l[d++]=61,p===1&&(l[d++]=61)),c?(d&&c.push(String.fromCharCode.apply(String,l.slice(0,d))),c.join("")):String.fromCharCode.apply(String,l.slice(0,d))};var u="invalid encoding";e.decode=function(o,r,n){for(var c=n,l=0,d,p=0;p<o.length;){var m=o.charCodeAt(p++);if(m===61&&l>1)break;if((m=f[m])===void 0)throw Error(u);switch(l){case 0:d=m,l=1;break;case 1:r[n++]=d<<2|(m&48)>>4,d=m,l=2;break;case 2:r[n++]=(d&15)<<4|(m&60)>>2,d=m,l=3;break;case 3:r[n++]=(d&3)<<6|m,l=0;break}}if(l===1)throw Error(u);return n-c},e.test=function(o){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(o)}})(Nr);var Qr=ze;function ze(){this._listeners=Object.create(null)}ze.prototype.on=function(e,i,f){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:i,ctx:f||this}),this};ze.prototype.off=function(e,i){if(e===void 0)this._listeners=Object.create(null);else if(i===void 0)this._listeners[e]=[];else{var f=this._listeners[e];if(!f)return this;for(var s=0;s<f.length;)f[s].fn===i?f.splice(s,1):++s}return this};ze.prototype.emit=function(e){var i=this._listeners[e];if(i){for(var f=[],s=1;s<arguments.length;)f.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,f)}return this};var ei=Ct(Ct);function Ct(a){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),f=i[3]===128;function s(r,n,c){e[0]=r,n[c]=i[0],n[c+1]=i[1],n[c+2]=i[2],n[c+3]=i[3]}function u(r,n,c){e[0]=r,n[c]=i[3],n[c+1]=i[2],n[c+2]=i[1],n[c+3]=i[0]}a.writeFloatLE=f?s:u,a.writeFloatBE=f?u:s;function t(r,n){return i[0]=r[n],i[1]=r[n+1],i[2]=r[n+2],i[3]=r[n+3],e[0]}function o(r,n){return i[3]=r[n],i[2]=r[n+1],i[1]=r[n+2],i[0]=r[n+3],e[0]}a.readFloatLE=f?t:o,a.readFloatBE=f?o:t})():(function(){function e(f,s,u,t){var o=s<0?1:0;if(o&&(s=-s),s===0)f(1/s>0?0:2147483648,u,t);else if(isNaN(s))f(2143289344,u,t);else if(s>34028234663852886e22)f((o<<31|2139095040)>>>0,u,t);else if(s<11754943508222875e-54)f((o<<31|Math.round(s/1401298464324817e-60))>>>0,u,t);else{var r=Math.floor(Math.log(s)/Math.LN2),n=Math.round(s*Math.pow(2,-r)*8388608)&8388607;f((o<<31|r+127<<23|n)>>>0,u,t)}}a.writeFloatLE=e.bind(null,Bt),a.writeFloatBE=e.bind(null,Pt);function i(f,s,u){var t=f(s,u),o=(t>>31)*2+1,r=t>>>23&255,n=t&8388607;return r===255?n?NaN:o*(1/0):r===0?o*1401298464324817e-60*n:o*Math.pow(2,r-150)*(n+8388608)}a.readFloatLE=i.bind(null,qt),a.readFloatBE=i.bind(null,jt)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),i=new Uint8Array(e.buffer),f=i[7]===128;function s(r,n,c){e[0]=r,n[c]=i[0],n[c+1]=i[1],n[c+2]=i[2],n[c+3]=i[3],n[c+4]=i[4],n[c+5]=i[5],n[c+6]=i[6],n[c+7]=i[7]}function u(r,n,c){e[0]=r,n[c]=i[7],n[c+1]=i[6],n[c+2]=i[5],n[c+3]=i[4],n[c+4]=i[3],n[c+5]=i[2],n[c+6]=i[1],n[c+7]=i[0]}a.writeDoubleLE=f?s:u,a.writeDoubleBE=f?u:s;function t(r,n){return i[0]=r[n],i[1]=r[n+1],i[2]=r[n+2],i[3]=r[n+3],i[4]=r[n+4],i[5]=r[n+5],i[6]=r[n+6],i[7]=r[n+7],e[0]}function o(r,n){return i[7]=r[n],i[6]=r[n+1],i[5]=r[n+2],i[4]=r[n+3],i[3]=r[n+4],i[2]=r[n+5],i[1]=r[n+6],i[0]=r[n+7],e[0]}a.readDoubleLE=f?t:o,a.readDoubleBE=f?o:t})():(function(){function e(f,s,u,t,o,r){var n=t<0?1:0;if(n&&(t=-t),t===0)f(0,o,r+s),f(1/t>0?0:2147483648,o,r+u);else if(isNaN(t))f(0,o,r+s),f(2146959360,o,r+u);else if(t>17976931348623157e292)f(0,o,r+s),f((n<<31|2146435072)>>>0,o,r+u);else{var c;if(t<22250738585072014e-324)c=t/5e-324,f(c>>>0,o,r+s),f((n<<31|c/4294967296)>>>0,o,r+u);else{var l=Math.floor(Math.log(t)/Math.LN2);l===1024&&(l=1023),c=t*Math.pow(2,-l),f(c*4503599627370496>>>0,o,r+s),f((n<<31|l+1023<<20|c*1048576&1048575)>>>0,o,r+u)}}}a.writeDoubleLE=e.bind(null,Bt,0,4),a.writeDoubleBE=e.bind(null,Pt,4,0);function i(f,s,u,t,o){var r=f(t,o+s),n=f(t,o+u),c=(n>>31)*2+1,l=n>>>20&2047,d=4294967296*(n&1048575)+r;return l===2047?d?NaN:c*(1/0):l===0?c*5e-324*d:c*Math.pow(2,l-1075)*(d+4503599627370496)}a.readDoubleLE=i.bind(null,qt,0,4),a.readDoubleBE=i.bind(null,jt,4,0)})(),a}function Bt(a,e,i){e[i]=a&255,e[i+1]=a>>>8&255,e[i+2]=a>>>16&255,e[i+3]=a>>>24}function Pt(a,e,i){e[i]=a>>>24,e[i+1]=a>>>16&255,e[i+2]=a>>>8&255,e[i+3]=a&255}function qt(a,e){return(a[e]|a[e+1]<<8|a[e+2]<<16|a[e+3]<<24)>>>0}function jt(a,e){return(a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3])>>>0}var kr={};(function(a){var e=a,i=65533;e.length=function(s){for(var u=0,t=0,o=0;o<s.length;++o)t=s.charCodeAt(o),t<128?u+=1:t<2048?u+=2:(t&64512)===55296&&(s.charCodeAt(o+1)&64512)===56320?(++o,u+=4):u+=3;return u},e.read=function(s,u,t){if(t-u<1)return"";for(var o=null,r=[],n=0,c,l,d,p;u<t;)c=s[u++],c<=127?r[n++]=c:c>=192&&c<224?(d=(c&31)<<6|s[u++]&63,r[n++]=d>=128?d:i):c>=224&&c<240?(p=(c&15)<<12|(s[u++]&63)<<6|s[u++]&63,r[n++]=p>=2048?p:i):c>=240&&(l=(c&7)<<18|(s[u++]&63)<<12|(s[u++]&63)<<6|s[u++]&63,l<65536||l>1114111?r[n++]=i:(l-=65536,r[n++]=55296+(l>>10),r[n++]=56320+(l&1023))),n>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,r.slice(0,n))),n=0);return o?(n&&o.push(String.fromCharCode.apply(String,r.slice(0,n))),o.join("")):String.fromCharCode.apply(String,r.slice(0,n))},e.write=function(s,u,t){for(var o=t,r,n,c=0;c<s.length;++c)r=s.charCodeAt(c),r<128?u[t++]=r:r<2048?(u[t++]=r>>6|192,u[t++]=r&63|128):(r&64512)===55296&&((n=s.charCodeAt(c+1))&64512)===56320?(r=65536+((r&1023)<<10)+(n&1023),++c,u[t++]=r>>18|240,u[t++]=r>>12&63|128,u[t++]=r>>6&63|128,u[t++]=r&63|128):(u[t++]=r>>12|224,u[t++]=r>>6&63|128,u[t++]=r&63|128);return t-o}})(kr);var ti=ri;function ri(a,e,i){var f=i||8192,s=f>>>1,u=null,t=f;return function(r){if(r<1||r>s)return a(r);t+r>f&&(u=a(f),t=0);var n=e.call(u,t,t+=r);return t&7&&(t=(t|7)+1),n}}var Ze,$t;function ii(){if($t)return Ze;$t=1,Ze=e;var a=me();function e(u,t){this.lo=u>>>0,this.hi=t>>>0}var i=e.zero=new e(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var f=e.zeroHash="\0\0\0\0\0\0\0\0";e.fromNumber=function(t){if(t===0)return i;var o=t<0;o&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return o&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new e(r,n)},e.from=function(t){if(typeof t=="number")return e.fromNumber(t);if(a.isString(t))if(a.Long)t=a.Long.fromString(t);else return e.fromNumber(parseInt(t,10));return t.low||t.high?new e(t.low>>>0,t.high>>>0):i},e.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,r=~this.hi>>>0;return o||(r=r+1>>>0),-(o+r*4294967296)}return this.lo+this.hi*4294967296},e.prototype.toLong=function(t){return a.Long?new a.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var s=String.prototype.charCodeAt;return e.fromHash=function(t){return t===f?i:new e((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},e.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)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:r<128?9:10},Ze}var De={exports:{}},ni=De.exports,Ut;function si(){return Ut||(Ut=1,(function(a,e){(function(i,f){function s(u){return u.default||u}f(e),a.exports=s(e)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:ni,function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;/**
1
+ "use strict";var Yr=Object.defineProperty;var Xr=(a,e,i)=>e in a?Yr(a,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[e]=i;var ve=(a,e,i)=>Xr(a,typeof e!="symbol"?e+"":e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-BuNJJvOb.cjs");var Er={exports:{}},Ar={exports:{}},Tr={},Ue={},Rr=Kr;function Kr(a,e){for(var i=new Array(arguments.length-1),f=0,s=2,u=!0;s<arguments.length;)i[f++]=arguments[s++];return new Promise(function(o,r){i[f]=function(c){if(u)if(u=!1,c)r(c);else{for(var l=new Array(arguments.length-1),d=0;d<l.length;)l[d++]=arguments[d];o.apply(null,l)}};try{a.apply(e||null,i)}catch(n){u&&(u=!1,r(n))}})}var Nr={};(function(a){var e=a;e.length=function(o){var r=o.length;if(!r)return 0;for(var n=0;--r%4>1&&o.charAt(r)==="=";)++n;return Math.ceil(o.length*3)/4-n};for(var i=new Array(64),f=new Array(123),s=0;s<64;)f[i[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;e.encode=function(o,r,n){for(var c=null,l=[],d=0,p=0,m;r<n;){var g=o[r++];switch(p){case 0:l[d++]=i[g>>2],m=(g&3)<<4,p=1;break;case 1:l[d++]=i[m|g>>4],m=(g&15)<<2,p=2;break;case 2:l[d++]=i[m|g>>6],l[d++]=i[g&63],p=0;break}d>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,l)),d=0)}return p&&(l[d++]=i[m],l[d++]=61,p===1&&(l[d++]=61)),c?(d&&c.push(String.fromCharCode.apply(String,l.slice(0,d))),c.join("")):String.fromCharCode.apply(String,l.slice(0,d))};var u="invalid encoding";e.decode=function(o,r,n){for(var c=n,l=0,d,p=0;p<o.length;){var m=o.charCodeAt(p++);if(m===61&&l>1)break;if((m=f[m])===void 0)throw Error(u);switch(l){case 0:d=m,l=1;break;case 1:r[n++]=d<<2|(m&48)>>4,d=m,l=2;break;case 2:r[n++]=(d&15)<<4|(m&60)>>2,d=m,l=3;break;case 3:r[n++]=(d&3)<<6|m,l=0;break}}if(l===1)throw Error(u);return n-c},e.test=function(o){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(o)}})(Nr);var Qr=ze;function ze(){this._listeners=Object.create(null)}ze.prototype.on=function(e,i,f){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:i,ctx:f||this}),this};ze.prototype.off=function(e,i){if(e===void 0)this._listeners=Object.create(null);else if(i===void 0)this._listeners[e]=[];else{var f=this._listeners[e];if(!f)return this;for(var s=0;s<f.length;)f[s].fn===i?f.splice(s,1):++s}return this};ze.prototype.emit=function(e){var i=this._listeners[e];if(i){for(var f=[],s=1;s<arguments.length;)f.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,f)}return this};var ei=Ct(Ct);function Ct(a){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),f=i[3]===128;function s(r,n,c){e[0]=r,n[c]=i[0],n[c+1]=i[1],n[c+2]=i[2],n[c+3]=i[3]}function u(r,n,c){e[0]=r,n[c]=i[3],n[c+1]=i[2],n[c+2]=i[1],n[c+3]=i[0]}a.writeFloatLE=f?s:u,a.writeFloatBE=f?u:s;function t(r,n){return i[0]=r[n],i[1]=r[n+1],i[2]=r[n+2],i[3]=r[n+3],e[0]}function o(r,n){return i[3]=r[n],i[2]=r[n+1],i[1]=r[n+2],i[0]=r[n+3],e[0]}a.readFloatLE=f?t:o,a.readFloatBE=f?o:t})():(function(){function e(f,s,u,t){var o=s<0?1:0;if(o&&(s=-s),s===0)f(1/s>0?0:2147483648,u,t);else if(isNaN(s))f(2143289344,u,t);else if(s>34028234663852886e22)f((o<<31|2139095040)>>>0,u,t);else if(s<11754943508222875e-54)f((o<<31|Math.round(s/1401298464324817e-60))>>>0,u,t);else{var r=Math.floor(Math.log(s)/Math.LN2),n=Math.round(s*Math.pow(2,-r)*8388608)&8388607;f((o<<31|r+127<<23|n)>>>0,u,t)}}a.writeFloatLE=e.bind(null,Bt),a.writeFloatBE=e.bind(null,Pt);function i(f,s,u){var t=f(s,u),o=(t>>31)*2+1,r=t>>>23&255,n=t&8388607;return r===255?n?NaN:o*(1/0):r===0?o*1401298464324817e-60*n:o*Math.pow(2,r-150)*(n+8388608)}a.readFloatLE=i.bind(null,qt),a.readFloatBE=i.bind(null,jt)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),i=new Uint8Array(e.buffer),f=i[7]===128;function s(r,n,c){e[0]=r,n[c]=i[0],n[c+1]=i[1],n[c+2]=i[2],n[c+3]=i[3],n[c+4]=i[4],n[c+5]=i[5],n[c+6]=i[6],n[c+7]=i[7]}function u(r,n,c){e[0]=r,n[c]=i[7],n[c+1]=i[6],n[c+2]=i[5],n[c+3]=i[4],n[c+4]=i[3],n[c+5]=i[2],n[c+6]=i[1],n[c+7]=i[0]}a.writeDoubleLE=f?s:u,a.writeDoubleBE=f?u:s;function t(r,n){return i[0]=r[n],i[1]=r[n+1],i[2]=r[n+2],i[3]=r[n+3],i[4]=r[n+4],i[5]=r[n+5],i[6]=r[n+6],i[7]=r[n+7],e[0]}function o(r,n){return i[7]=r[n],i[6]=r[n+1],i[5]=r[n+2],i[4]=r[n+3],i[3]=r[n+4],i[2]=r[n+5],i[1]=r[n+6],i[0]=r[n+7],e[0]}a.readDoubleLE=f?t:o,a.readDoubleBE=f?o:t})():(function(){function e(f,s,u,t,o,r){var n=t<0?1:0;if(n&&(t=-t),t===0)f(0,o,r+s),f(1/t>0?0:2147483648,o,r+u);else if(isNaN(t))f(0,o,r+s),f(2146959360,o,r+u);else if(t>17976931348623157e292)f(0,o,r+s),f((n<<31|2146435072)>>>0,o,r+u);else{var c;if(t<22250738585072014e-324)c=t/5e-324,f(c>>>0,o,r+s),f((n<<31|c/4294967296)>>>0,o,r+u);else{var l=Math.floor(Math.log(t)/Math.LN2);l===1024&&(l=1023),c=t*Math.pow(2,-l),f(c*4503599627370496>>>0,o,r+s),f((n<<31|l+1023<<20|c*1048576&1048575)>>>0,o,r+u)}}}a.writeDoubleLE=e.bind(null,Bt,0,4),a.writeDoubleBE=e.bind(null,Pt,4,0);function i(f,s,u,t,o){var r=f(t,o+s),n=f(t,o+u),c=(n>>31)*2+1,l=n>>>20&2047,d=4294967296*(n&1048575)+r;return l===2047?d?NaN:c*(1/0):l===0?c*5e-324*d:c*Math.pow(2,l-1075)*(d+4503599627370496)}a.readDoubleLE=i.bind(null,qt,0,4),a.readDoubleBE=i.bind(null,jt,4,0)})(),a}function Bt(a,e,i){e[i]=a&255,e[i+1]=a>>>8&255,e[i+2]=a>>>16&255,e[i+3]=a>>>24}function Pt(a,e,i){e[i]=a>>>24,e[i+1]=a>>>16&255,e[i+2]=a>>>8&255,e[i+3]=a&255}function qt(a,e){return(a[e]|a[e+1]<<8|a[e+2]<<16|a[e+3]<<24)>>>0}function jt(a,e){return(a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3])>>>0}var kr={};(function(a){var e=a,i=65533;e.length=function(s){for(var u=0,t=0,o=0;o<s.length;++o)t=s.charCodeAt(o),t<128?u+=1:t<2048?u+=2:(t&64512)===55296&&(s.charCodeAt(o+1)&64512)===56320?(++o,u+=4):u+=3;return u},e.read=function(s,u,t){if(t-u<1)return"";for(var o=null,r=[],n=0,c,l,d,p;u<t;)c=s[u++],c<=127?r[n++]=c:c>=192&&c<224?(d=(c&31)<<6|s[u++]&63,r[n++]=d>=128?d:i):c>=224&&c<240?(p=(c&15)<<12|(s[u++]&63)<<6|s[u++]&63,r[n++]=p>=2048?p:i):c>=240&&(l=(c&7)<<18|(s[u++]&63)<<12|(s[u++]&63)<<6|s[u++]&63,l<65536||l>1114111?r[n++]=i:(l-=65536,r[n++]=55296+(l>>10),r[n++]=56320+(l&1023))),n>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,r.slice(0,n))),n=0);return o?(n&&o.push(String.fromCharCode.apply(String,r.slice(0,n))),o.join("")):String.fromCharCode.apply(String,r.slice(0,n))},e.write=function(s,u,t){for(var o=t,r,n,c=0;c<s.length;++c)r=s.charCodeAt(c),r<128?u[t++]=r:r<2048?(u[t++]=r>>6|192,u[t++]=r&63|128):(r&64512)===55296&&((n=s.charCodeAt(c+1))&64512)===56320?(r=65536+((r&1023)<<10)+(n&1023),++c,u[t++]=r>>18|240,u[t++]=r>>12&63|128,u[t++]=r>>6&63|128,u[t++]=r&63|128):(u[t++]=r>>12|224,u[t++]=r>>6&63|128,u[t++]=r&63|128);return t-o}})(kr);var ti=ri;function ri(a,e,i){var f=i||8192,s=f>>>1,u=null,t=f;return function(r){if(r<1||r>s)return a(r);t+r>f&&(u=a(f),t=0);var n=e.call(u,t,t+=r);return t&7&&(t=(t|7)+1),n}}var Ze,$t;function ii(){if($t)return Ze;$t=1,Ze=e;var a=me();function e(u,t){this.lo=u>>>0,this.hi=t>>>0}var i=e.zero=new e(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var f=e.zeroHash="\0\0\0\0\0\0\0\0";e.fromNumber=function(t){if(t===0)return i;var o=t<0;o&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return o&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new e(r,n)},e.from=function(t){if(typeof t=="number")return e.fromNumber(t);if(a.isString(t))if(a.Long)t=a.Long.fromString(t);else return e.fromNumber(parseInt(t,10));return t.low||t.high?new e(t.low>>>0,t.high>>>0):i},e.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,r=~this.hi>>>0;return o||(r=r+1>>>0),-(o+r*4294967296)}return this.lo+this.hi*4294967296},e.prototype.toLong=function(t){return a.Long?new a.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var s=String.prototype.charCodeAt;return e.fromHash=function(t){return t===f?i:new e((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},e.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)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:r<128?9:10},Ze}var De={exports:{}},ni=De.exports,Ut;function si(){return Ut||(Ut=1,(function(a,e){(function(i,f){function s(u){return u.default||u}f(e),a.exports=s(e)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:ni,function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.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,7 +1,7 @@
1
1
  var Yr = Object.defineProperty;
2
2
  var Xr = (a, e, i) => e in a ? Yr(a, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[e] = i;
3
3
  var ve = (a, e, i) => Xr(a, typeof e != "symbol" ? e + "" : e, i);
4
- import { c as Ne, a as Kr } from "./index-DwzxTmOd.js";
4
+ import { c as Ne, a as Kr } from "./index-C9v_6_ge.js";
5
5
  var Er = { exports: {} }, Ar = { exports: {} }, Tr = {}, Ue = {}, Rr = Qr;
6
6
  function Qr(a, e) {
7
7
  for (var i = new Array(arguments.length - 1), f = 0, s = 2, u = !0; s < arguments.length; )
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./protoToJsonSchema-wxazjeYy.cjs"),e=require("./index-BJ0X8yP3.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./protoToJsonSchema-3oaSqmPi.cjs"),e=require("./index-BuNJJvOb.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;
@@ -1,5 +1,5 @@
1
- import { protoToJsonSchema as e } from "./protoToJsonSchema-Btyc_WLL.js";
2
- import { r as a, X as t, i as s } from "./index-DwzxTmOd.js";
1
+ import { protoToJsonSchema as e } from "./protoToJsonSchema-CV3coy3B.js";
2
+ import { r as a, X as t, i as s } from "./index-C9v_6_ge.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,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ConfigInterface } from '../config';
3
3
  import { OpenAPIDocumentData } from '../types/openapi';
4
+ import { SectionLayout } from '../components/Section';
4
5
  /**
5
6
  * Standalone, composable OpenAPI section components — mirrors public/sections.tsx
6
7
  * (AsyncAPI). Each renders one part of an OpenAPI document (servers, endpoints,
@@ -12,15 +13,21 @@ export interface OpenAPISectionProps {
12
13
  /** The OpenAPI document. Required standalone; unnecessary (and ignored) when rendered inside <OpenAPIProvider>. */
13
14
  document?: OpenAPIDocumentData;
14
15
  config?: ConfigInterface;
16
+ /**
17
+ * `"columns"` (default) — reserved right gutter at large breakpoints.
18
+ * `"stacked"` — full-width single column; no prose max-width and no empty
19
+ * side space. For Info/Servers, side content stacks below the main content.
20
+ */
21
+ layout?: SectionLayout;
15
22
  }
16
23
  export declare function OpenAPIProvider({ document, config, children, }: {
17
24
  document: OpenAPIDocumentData;
18
25
  config?: ConfigInterface;
19
26
  children: ReactNode;
20
27
  }): import("react").JSX.Element;
21
- export declare function OpenAPIServers(props: OpenAPISectionProps): import("react").JSX.Element;
22
- export declare function OpenAPIEndpoints(props: OpenAPISectionProps): import("react").JSX.Element;
28
+ export declare function OpenAPIServers({ layout, ...providerProps }: OpenAPISectionProps): import("react").JSX.Element;
29
+ export declare function OpenAPIEndpoints({ layout, ...providerProps }: OpenAPISectionProps): import("react").JSX.Element;
23
30
  /** OpenAPI 3.1 `webhooks`. Renders nothing for a document that declares none. */
24
- export declare function OpenAPIWebhooks(props: OpenAPISectionProps): import("react").JSX.Element;
25
- export declare function OpenAPISchemas(props: OpenAPISectionProps): import("react").JSX.Element;
26
- export declare function OpenAPIInfo(props: OpenAPISectionProps): import("react").JSX.Element;
31
+ export declare function OpenAPIWebhooks({ layout, ...providerProps }: OpenAPISectionProps): import("react").JSX.Element;
32
+ export declare function OpenAPISchemas({ layout, ...providerProps }: OpenAPISectionProps): import("react").JSX.Element;
33
+ export declare function OpenAPIInfo({ layout, ...providerProps }: OpenAPISectionProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ConfigInterface } from '../config';
3
3
  import { AsyncAPIDocumentData } from '../types/schema';
4
+ import { SectionLayout } from '../components/Section';
4
5
  /**
5
6
  * Standalone, composable section components. Each renders one part of an
6
7
  * AsyncAPI document (servers, operations, messages, schemas, info) on its own,
@@ -25,6 +26,12 @@ export interface SectionProps {
25
26
  /** Only applied when this section sets up its own context (standalone). When
26
27
  * composed under a provider, config comes from that provider. */
27
28
  config?: ConfigInterface;
29
+ /**
30
+ * `"columns"` (default) — reserved right gutter at large breakpoints.
31
+ * `"stacked"` — full-width single column; no prose max-width and no empty
32
+ * side space. For Info/Servers, side content stacks below the main content.
33
+ */
34
+ layout?: SectionLayout;
28
35
  }
29
36
  /**
30
37
  * Provider that resolves a document once and shares it with any section
@@ -38,8 +45,8 @@ export declare function AsyncAPIProvider({ document, config, children, }: {
38
45
  /** Section components (or your own), rendered with access to the shared document context. */
39
46
  children: ReactNode;
40
47
  }): import("react").JSX.Element;
41
- export declare function Servers(props: SectionProps): import("react").JSX.Element;
42
- export declare function Operations(props: SectionProps): import("react").JSX.Element;
43
- export declare function Messages(props: SectionProps): import("react").JSX.Element;
44
- export declare function Schemas(props: SectionProps): import("react").JSX.Element;
45
- export declare function Info(props: SectionProps): import("react").JSX.Element;
48
+ export declare function Servers({ layout, ...providerProps }: SectionProps): import("react").JSX.Element;
49
+ export declare function Operations({ layout, ...providerProps }: SectionProps): import("react").JSX.Element;
50
+ export declare function Messages({ layout, ...providerProps }: SectionProps): import("react").JSX.Element;
51
+ export declare function Schemas({ layout, ...providerProps }: SectionProps): import("react").JSX.Element;
52
+ export declare function Info({ layout, ...providerProps }: SectionProps): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apiuikit",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "A React UI library for rendering your API specifications",
5
5
  "license": "Apache-2.0",
6
6
  "bugs": {