@redocly/openapi-docs 3.12.0-next.8 → 3.12.0-rc.7
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/dist/redocly-openapi-docs.min.js +1224 -1223
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/TagItem/TagItem.js +2 -1
- package/lib/services/menu/markdown.js +1 -1
- package/lib/services/types.d.ts +3 -0
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/string.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useAtomValue as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useAtomValue as D}from"jotai";import{LayoutVariant as h}from"@redocly/config";import{AfterOpenApiTitle as k}from"@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiTitle";import{AfterOpenApiDescription as H}from"@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiDescription";import{SamplesMiddlePanel as M,Row as S}from"../common/index.js";import{ExternalDocumentation as T}from"../ExternalDocumentation/index.js";import{Markdown as m}from"../Markdown/index.js";import{ApiHeader as j}from"./styled.js";import{globalStoreAtom as v}from"../../jotai/store.js";import{saveTextBeforeHeading as y}from"../../utils/saveTextBeforeHeading.js";import{getValueFromMdParsedExtension as p}from"../../utils/helpers.js";import{RenderHook as l}from"../RenderHook/index.js";import{Metadata as g}from"./Metadata.js";import{useTranslate as E}from"../../hooks/index.js";function q({item:f,layout:t}){const c=E(),{options:{unstable_hooks:i,hideInfoMetadata:d},parser:{definition:u}}=D(v),o=f.infoDefinition;if(!o)return null;const n=y(p(o,"description")||""),a=p(o,"summary")||void 0,s=u?.externalDocs||o?.externalDocs,x=o.version&&e("span",{children:["(",o.version,")"]})||null,A=t===h.STACKED;return r(S,{layout:t,children:e(M,{fullWidth:!0,className:"api-info",isStacked:A,children:[e(j,{children:[o.title," ",x]}),r(l,{Hook:k||i?.AfterApiTitle,props:{info:o}}),a&&r(m,{source:a,"data-role":"redoc-summary"}),n&&r(m,{source:n,"data-role":"redoc-description"}),r(l,{Hook:H||i?.AfterOpenApiDescription,props:{info:o}}),s&&r(T,{externalDocs:s}),!d&&r(g,{metadata:o["x-metadata"],translate:c})]})})}export{q as ApiInfo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useMemo as c}from"react";import{Markdown as d}from"@redocly/theme/components/Markdown/Markdown";import{H3 as p}from"@redocly/theme/components/Typography/H3";import{isNotNull as a}from"@redocly/theme/core/openapi";import{isAbsoluteUrl as s}from"../../utils/helpers.js";const f=["title","description"];function m([t,r]){return f.includes(t)?null:Array.isArray(r)?{key:t,value:r.filter(o=>typeof o!="object").join(", ")}:typeof r=="object"?null:{key:t,value:r}}function y({metadata:t,translate:r}){const o=c(()=>Object.entries(t||{}).map(m).filter(a),[t]);return t?n(d,{children:[e(p,{children:r("openapi.info.metadata.title","Metadata")}),n("table",{className:"md",children:[e("thead",{children:n("tr",{children:[e("th",{scope:"col",children:r("openapi.key","Key")}),e("th",{scope:"col",children:r("openapi.value","Value")})]})}),e("tbody",{children:o.map(({key:l,value:i})=>n("tr",{children:[e("td",{children:l}),e("td",{children:typeof i=="string"&&s(i)?e("a",{href:i,target:"_blank",rel:"noreferrer",children:i}):String(i)})]},l))})]})]}):null}export{y as Metadata};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as d,Fragment as h}from"react/jsx-runtime";import{CopyButton as p}from"@redocly/theme/components/Buttons/CopyButton";import{NewTabButton as n}from"@redocly/theme/components/Buttons/NewTabButton";import{EmailButton as b}from"@redocly/theme/components/Buttons/EmailButton";import{PanelItem as a,PanelItemDescription as l,PanelItemsList as v}from"../PanelItem/index.js";function O({info:e,translate:c}){const i=e.contact&&e.contact.url&&t(a,{header:t(l,{children:c("openapi.info.contact.url","URL")}),title:t("a",{href:e.contact.url,target:"_blank",rel:"noreferrer",children:e.contact.url}),actions:[t(n,{data:e.contact.url},"NewTabButton")]})||null,o=e.contact&&e.contact.email&&t(a,{header:t(l,{children:e.contact.name||c("openapi.info.contact.name","E-mail")}),title:t("a",{href:"mailto:"+e.contact.email,children:e.contact.email}),actions:[t(p,{data:e.contact.email},"CopyButton"),t(b,{data:e.contact.email},"EmailButton")]})||null,s=e.license&&t(a,{header:t(l,{children:c("openapi.info.license","License")}),title:e.license.identifier?e.license.identifier:t("a",{href:e.license.url,target:"_blank",rel:"noreferrer",children:e.license.name}),actions:[t(n,{data:e.license.url||""},"NewTabButton")]})||null,m=e.termsOfService&&t(a,{title:t("a",{href:e.termsOfService,target:"_blank",rel:"noreferrer",children:c("openapi.info.termsOfService","Terms of Service")}),actions:[t(n,{data:e.termsOfService},e.termsOfService)]})||null,u=e["x-links"]?.map(r=>t(a,{header:t(l,{children:r.name}),title:t("a",{href:r.url,target:"_blank",rel:"noreferrer",children:r.url}),actions:[t(n,{data:r.url},"NewTabButton")]},r.url))||null;return t(h,{children:d(v,{children:[i,o,s,m,u]})})}export{O as Overview};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as t}from"react/jsx-runtime";import{memo as u,useCallback as h}from"react";import{useNavigate as v}from"react-router-dom";import{useAtomValue as x}from"jotai";import{LayoutVariant as b}from"@redocly/config";import{breakpoints as k}from"@redocly/theme/core/openapi";import{Button as w}from"@redocly/theme/components/Button/Button";import{H2 as y}from"@redocly/theme/components/Typography/H2";import{LinkIcon as S}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Row as C,SamplesMiddlePanel as j,ShareLink as T}from"../common/index.js";import{Markdown as $}from"../Markdown/index.js";import{OperationsNavigation as A}from"./OperationsNavigation.js";import{layoutAtom as I}from"../../jotai/app.js";import{useTranslate as L}from"../../hooks/index.js";import{styled as n}from"../../styled-components.js";function B({item:o,routingBasePath:r="",isExpanded:e}){const l=L(),{description:p,name:m,href:d}=o,s=v(),c=x(I),g=h(()=>{s(r+o.href)},[o.href,s,r]),a=!!o.items.length,f=c===b.STACKED;return t(H,{expanded:e,children:[t(C,{layout:c,children:[t(j,{fullWidth:!a,isStacked:f,children:[t(N,{children:[i(T,{to:d,"aria-label":`link to ${m}`}),m]}),i($,{source:p})]}),a&&i(A,{items:o.items,routingBasePath:r})]}),a&&!e&&t(M,{type:"button",variant:"text",size:"medium",onClick:g,children:["+ ",l("openapi.actions.show","Show")]})]})}const U=u(B),H=n.div`
|
|
2
2
|
padding-top: var(--spacing-lg);
|
|
3
3
|
padding-bottom: ${({expanded:o})=>o?"var(--spacing-xxl)":""};
|
|
4
4
|
`,M=n(w)`
|
|
@@ -19,4 +19,5 @@ import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as u,useCallback a
|
|
|
19
19
|
visibility: visible;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
overflow-wrap: break-word;
|
|
22
23
|
`;export{U as TagItem,B as TagItemComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import h from"@markdoc/markdoc";import{isString as T}from"@redocly/theme/core/openapi";import{getTagOrGroup as d}from"../../models/index.js";import{safeSlugify as y,unescapeHTMLChars as A}from"../../utils/index.js";function x(e,n,a){const i=T(e)?h.parse(e):h.Ast.fromJSON(JSON.stringify(e?.result)),s=[];let o;const l=(t,u,g=s,r,p)=>{t=A(t);let f;r.attributes.id?f=r.attributes.id:(f=p?`${p}/${y(t)}`:`section/${y(t)}`,r.attributes.id=f);const b={id:f.toLowerCase(),name:t,level:u,items:[],ast:[r]};return g.push(b),b},c=(t,u)=>{t[t.length-1]?.ast?.push(u)},m=t=>{const u=C(t)||"",r=n&&n.type==="tag"?n.id:void 0;t.type==="heading"&&t.attributes.level===1?o=l(u,t.attributes.level,void 0,t,r):t.attributes.level?l(u,t.attributes.level,o?.items,t,o?.id??r):o?.items?.length?c(o?.items,t):s?.length&&c(s,t)};if(Array.isArray(i))for(const t of i)m(t);else m(i);return v(n,s,a)}function v(e,n,a=1){return n.map(i=>{const s=d("section",i,e);return s.depth=a,i.items&&(s.items=v(s,i.items,a+1)),s})}function C(e){if(typeof e?.attributes?.content=="string")return e.attributes?.content;if(e?.children)return C(e.children[0])}export{x as addMarkdownItems};
|
package/lib/services/types.d.ts
CHANGED
package/lib/utils/openapi.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname as y}from"path";import f from"url-template";import{IS_BROWSER as M}from"@redocly/theme/core/openapi";import{deleteEmptyArrayItem as E,isArrayOfObjects as T,isNumeric as S,removeQueryStringAndHash as z,resolveUrl as D,sanitizeItemId as m,normalizeText as b,getValueFromMdParsedExtension as g,isAbsoluteUrl as N}from"./helpers.js";import{DEFAULT_TAG_SLUG as R,MediaTypes as j}from"../constants.js";import{JsonPointer as $}from"./JsonPointer.js";import{joinWithSeparator as _}from"../services/index.js";import{tryDecodeURIComponent as F}from"./string.js";import{getUrlDirname as U}from"./url.js";function P(e){return typeof e=="string"&&/\dxx/i.test(e)}function ne(e){return e==="default"||S(e)||P(e)}function ie(e,r=!1){if(e==="default")return r?"error":"success";let t=typeof e=="string"?parseInt(e,10):e;if(P(e)&&(t*=100),t<100||t>599)throw new Error("invalid HTTP code");let n="success";return t>=300&&t<400?n="redirect":t>=400?n="error":t<200&&(n="info"),n}const L={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function oe(e){return e in L}function ue(e){const{operationId:r,pathName:t}=e,n=b(g(e,"description"));return b(g(e,"summary"))||r||n&&n.substring(0,50)||t||"<no summary>"}function se(e,r){return r?.id?_(r.id,m(e.operationId?e.operationId:d(e.pointer))).toLowerCase():e.tags?.length?m(e.operationId?e.operationId:d(e.pointer)):m(e.operationId?_(R,e.operationId):d(e.pointer))}function d(e){return e?.startsWith("/")?e.slice(1,e.length):e}const
|
|
1
|
+
import{dirname as y}from"path";import f from"url-template";import{IS_BROWSER as M}from"@redocly/theme/core/openapi";import{deleteEmptyArrayItem as E,isArrayOfObjects as T,isNumeric as S,removeQueryStringAndHash as z,resolveUrl as D,sanitizeItemId as m,normalizeText as b,getValueFromMdParsedExtension as g,isAbsoluteUrl as N}from"./helpers.js";import{DEFAULT_TAG_SLUG as R,MediaTypes as j}from"../constants.js";import{JsonPointer as $}from"./JsonPointer.js";import{joinWithSeparator as _}from"../services/index.js";import{tryDecodeURIComponent as F}from"./string.js";import{getUrlDirname as U}from"./url.js";function P(e){return typeof e=="string"&&/\dxx/i.test(e)}function ne(e){return e==="default"||S(e)||P(e)}function ie(e,r=!1){if(e==="default")return r?"error":"success";let t=typeof e=="string"?parseInt(e,10):e;if(P(e)&&(t*=100),t<100||t>599)throw new Error("invalid HTTP code");let n="success";return t>=300&&t<400?n="redirect":t>=400?n="error":t<200&&(n="info"),n}const L={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function oe(e){return e in L}function ue(e){const{operationId:r,pathName:t}=e,n=b(g(e,"description"));return b(g(e,"summary"))||r||n&&n.substring(0,50)||t||"<no summary>"}function se(e,r){return r?.id?_(r.id,m(e.operationId?e.operationId:d(e.pointer))).toLowerCase():e.tags?.length?m(e.operationId?e.operationId:d(e.pointer)):m(e.operationId?_(R,e.operationId):d(e.pointer))}function d(e){return e?.startsWith("/")?e.slice(1,e.length):e}const A={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",patternProperties:"object",properties:"object"};function ae(e){if(e.type!==void 0&&!Array.isArray(e.type))return e.type;const r=Object.keys(A);for(const t of r){const n=A[t];if(e[t]!==void 0)return n}return"any"}function k(e,r=e.type){if(e["x-circular-ref"]||e["x-complex"])return!0;if(e.oneOf!==void 0||e.anyOf!==void 0||e.if&&e.then||e.if&&e.else)return!1;let t=!0;const n=Array.isArray(r);return(r==="object"||n&&r?.includes("object"))&&(t=e.properties!==void 0?Object.keys(e.properties).length===0:e.additionalProperties===void 0&&e.unevaluatedProperties===void 0&&e.patternProperties===void 0),Array.isArray(e.items)||Array.isArray(e.prefixItems)?!1:(e.items!==void 0&&typeof e.items!="boolean"&&(r==="array"||n&&r?.includes("array"))&&(t=k(e.items,e.items.type)),t)}function q(e){return e.search(/json/i)!==-1}function ce(e){return e?.search(/xml/i)!==-1}function pe(e){return e===j.URL_ENCODED}function fe(e){return e===j.MULTIPART}function c(e,r,t){return Array.isArray(e)?e.map(n=>n.toString()).join(t):typeof e=="object"?Object.keys(e).map(n=>`${n}${t}${e[n]}`).join(t):r+"="+e.toString()}function h(e,r){return Array.isArray(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):typeof e=="object"?Object.keys(e).map(t=>e[t]?`${r}[${t}]=${e[t]}`:void 0).filter(Boolean).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function a(e,r,t){const n="__redoc_param_name__",i=r?"*":"";return f.parse(`{?${n}${i}}`).expand({[n]:t}).substring(1).replace(/__redoc_param_name__/g,e)}function w(e,r){const t=e?"*":"",n="__redoc_param_name__",i=f.parse(`{${n}${t}}`);return F(i.expand({[n]:r}))}function me(e,r={}){if(Array.isArray(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map(t=>{const n=e[t],{style:i="form",explode:o=!0}=r[t]||{};switch(i){case"form":return a(t,o,n);case"spaceDelimited":return c(n,t,"%20");case"pipeDelimited":return c(n,t,"|");case"deepObject":return h(n,t);default:return console.warn("Incorrect or unsupported encoding style: "+i),""}}).join("&")}function W(e,r,t,n){const i=t?"*":"";let o="";r==="label"?o=".":r==="matrix"&&(o=";");const s="__redoc_param_name__";return f.parse(`{${o}${s}${i}}`).expand({[s]:n}).replace(/__redoc_param_name__/g,e)}function H(e,r,t,n){const i=o=>{switch(r){case"form":return a(e,t,o);case"spaceDelimited":return!Array.isArray(o)&&typeof o!="object"?(console.warn("The style spaceDelimited is applicable to arrays or objects"),""):t?a(e,t,o):c(n,e,"%20");case"pipeDelimited":return!Array.isArray(o)&&typeof o!="object"?(console.warn("The style pipeDelimited is applicable to arrays or objects"),""):t?a(e,t,o):c(n,e,"|");case"deepObject":return!t||Array.isArray(o)||typeof o!="object"?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):h(o,e);case"simple":return w(t,n);default:return console.warn("Unexpected style for query: "+r),""}};return T(n)&&(n=E(n).map(o=>i(o))),i(n)}function C(e,r,t){switch(e){case"simple":return w(r,t);default:return console.warn("Unexpected style for header: "+e),""}}function B(e,r,t,n){switch(r){case"form":return a(e,t,n);default:return console.warn("Unexpected style for cookie: "+r),""}}function O(e,r){return q(r)?JSON.stringify(e):(console.warn(`Parameter serialization as ${r} is not supported`),"")}function de(e,r){const{name:t,style:n,explode:i=!1,serializationMime:o}=e;if(o)switch(e.in){case"path":case"header":return O(r,o);case"cookie":case"query":return`${t}=${O(r,o)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!n)return console.warn(`Missing style attribute or content for parameter ${t}`),"";switch(e.in){case"path":return W(t,n,i,r);case"query":return H(t,n,i,r);case"header":return C(n,i,r);case"cookie":return B(t,n,i,r);default:return console.warn("Unexpected parameter location: "+e.in),""}}function le(e){return e.search(/xml/i)!==-1?"xml":"clike"}const I=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function xe(e){return I.test(e||"")}function ye(e){return e?.match(I)?.pop()}function G(e){if(e===void 0)return;const r=e.toString(10);return/^0\.0*1$/.test(r)?`decimal places <= ${r.split(".")[1].length}`:`multiple of ${r}`}function l(e,r,t){let n;return r!==void 0&&t!==void 0?r===t?n=`= ${r} ${e}`:n=`[ ${r} .. ${t} ] ${e}`:t!==void 0?n=`<= ${t} ${e}`:r!==void 0&&(r===1?n="non-empty":n=`>= ${r} ${e}`),n}function J(e){const r=typeof e.exclusiveMinimum=="number"?Math.min(e.exclusiveMinimum,e.minimum??1/0):e.minimum,t=typeof e.exclusiveMaximum=="number"?Math.max(e.exclusiveMaximum,e.maximum??-1/0):e.maximum,n=typeof e.exclusiveMinimum=="number"||e.exclusiveMinimum,i=typeof e.exclusiveMaximum=="number"||e.exclusiveMaximum;if(r!==void 0&&t!==void 0)return`${n?"( ":"[ "}${r} .. ${t}${i?" )":" ]"}`;if(t!==void 0)return`${i?"< ":"<= "}${t}`;if(r!==void 0)return`${n?"> ":">= "}${r}`}function be(e){const r=[],t=l("characters",e.minLength,e.maxLength);t!==void 0&&r.push(t);const n=l("items",e.minItems,e.maxItems);n!==void 0&&r.push(n);const i=l(e.minProperties===1&&e.maxProperties===1?"property":"properties",e.minProperties,e.maxProperties);i!==void 0&&r.push(i);const o=G(e.multipleOf);o!==void 0&&r.push(o);const s=J(e);return s!==void 0&&r.push(s),e.uniqueItems&&r.push("unique"),r}function ge(e,r=[]){const t=[],n=[],i=[];return e.forEach(o=>{o.required?r.includes(o.name)?n.push(o):i.push(o):t.push(o)}),n.sort((o,s)=>r.indexOf(o.name)-r.indexOf(s.name)),[...n,...i,...t]}function je(e){return e.sort((r,t)=>Number(r.deprecated)-Number(t.deprecated))}function $e(e,r=[],t=[],{pathPointer:n,operationPointer:i}){const o={};if(!Array.isArray(t))return[];t.forEach(u=>{({resolved:u}=e.deref(u)),o[u.name+"_"+u.in]=!0});const s=r.map((u,p)=>({paramOrRef:u,pointer:$.join(n,["parameters",String(p)])})).filter(({paramOrRef:u})=>({resolved:u}=e.deref(u),!o[u.name+"_"+u.in])),x=t.map((u,p)=>({paramOrRef:u,pointer:$.join(i,["parameters",String(p)])}));return[...s,...x]}function _e(e,r){const n=e===void 0?z((()=>{if(!M)return globalThis.SSR_HOSTNAME||"";const i=window.location.href;return i.endsWith(".html")?y(i):i})()):N(e)?U(e):y(e);return r.length===0&&(r=[{url:"/"}]),r.map(i=>({...i,url:n?D(n,i.url):i.url,description:i.description||""}))}const Pe=e=>({delete:"del",options:"opts"})[e]||e;function Q(e){return e in{"x-circular-ref":!0,"x-complex":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0,"x-enumDescriptions":!0,"x-hideReplay":!0,"x-feedback":!0,"x-badges":!0,"x-assertionType":!0,"x-rbac":!0}||e.startsWith("x-parsed-md-")}function Ae(e,r){return Object.keys(e).filter(t=>r===!0?t.startsWith("x-")&&!Q(t):t.startsWith("x-")&&r.indexOf(t)>-1).reduce((t,n)=>(t[n]=e[n],t),{})}function he(e){return e.split(" or ").map(r=>r.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2")).join(" or ")}function we(e){let r=e.content;const t=e["x-examples"],n=e["x-example"];if(t){r={...r};for(const i of Object.keys(t)){const o=t[i];r[i]={...r[i],examples:o}}}else if(n){r={...r};for(const i of Object.keys(n)){const o=n[i];r[i]={...r[i],example:o}}}return r}export{ae as detectType,Ae as extractExtensions,we as getContentWithLegacyExamples,ye as getDefinitionName,se as getOperationId,ue as getOperationName,ie as getStatusCodeType,be as humanizeConstraints,J as humanizeNumberRange,pe as isFormUrlEncoded,q as isJsonLike,fe as isMultipartFormData,xe as isNamedDefinition,oe as isOperationName,k as isPrimitiveType,Q as isRedocExtension,ne as isStatusCode,ce as isXmlLike,le as langFromMime,$e as mergeParams,_e as normalizeServers,he as pluralizeType,de as serializeParameterValue,O as serializeParameterValueWithMime,H as serializeQueryParameter,Pe as shortenHTTPVerb,je as sortByDeprecated,ge as sortByRequired,me as urlFormEncodePayload};
|
package/lib/utils/string.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"slugify";function o(e){return e.split("").map(r=>r+"\u0335").join("")}function c(e){return e.replace(/[.[\]]/g,r=>({".":"%2e","[":"%5b","]":"%5d"})[r]||"")}function
|
|
1
|
+
import t from"slugify";function o(e){return e.split("").map(r=>r+"\u0335").join("")}function c(e){return e.replace(/[.[\]]/g,r=>({".":"%2e","[":"%5b","]":"%5d"})[r]||"")}function u(e){return e.replace(/%2e|%5b|%5d/g,r=>({"%2e":".","%5b":"[","%5d":"]"})[r]||"")}function p(e){return e.replace(/\\/g,"%5C")}function a(e){return e.replace(/%/g,"")}function i(e){try{return decodeURIComponent(e)}catch(r){return console.error(`Decoding failed: ${e}`,r),e}}function l(e){return t(e).slice(0,240)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"").slice(0,240)}function s(e,r={}){try{return JSON.parse(e)}catch{return r}}export{p as encodeBackSlashes,c as escapeFormId,a as removePercentChart,s as safeJsonParse,l as safeSlugify,o as strikethroughText,i as tryDecodeURIComponent,u as unescapeFormId};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.12.0-
|
|
3
|
+
"version": "3.12.0-rc.7",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@markdoc/markdoc": "0.5.2",
|
|
24
|
-
"@redocly/openapi-core": "
|
|
24
|
+
"@redocly/openapi-core": "0.0.0-snapshot.1753015287",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "3.2.6",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"url-template": "^2.0.8",
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
|
-
"@redocly/config": "0.26.3",
|
|
40
|
-
"@redocly/replay": "0.15.0-
|
|
39
|
+
"@redocly/config": "0.26.3-rc.1",
|
|
40
|
+
"@redocly/replay": "0.15.0-rc.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "5.6.2",
|
|
75
75
|
"url": "~0.11.0",
|
|
76
76
|
"vite": "^6.3.5",
|
|
77
|
-
"@redocly/theme": "0.56.0-
|
|
77
|
+
"@redocly/theme": "0.56.0-rc.2"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"start": "npm run copy-highlight-hook && vite",
|