@redocly/reference-docs 2.9.1 → 2.9.5
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/bin/cli/commands/redocly-docs-cli.min.js +181 -184
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +130 -135
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +945 -948
- package/lib/components/Endpoint/Path.js +1 -1
- package/lib/components/Panel/CodePanel.js +1 -1
- package/lib/components/Panel/DarkHeader.js +1 -1
- package/lib/components/Samples/SamplesTabs.js +1 -1
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.js +1 -1
- package/lib/components/console/ActionPanel.js +1 -1
- package/lib/components/console/CodemirrorInput.js +1 -1
- package/lib/components/console/Console.d.ts +6 -3
- package/lib/components/console/Console.js +1 -1
- package/lib/components/console/ConsoleLazy.d.ts +1 -1
- package/lib/components/console/OperationParameters.js +1 -1
- package/lib/components/console/utils.d.ts +3 -4
- package/lib/components/console/utils.js +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +1 -1
- package/lib/redoc-lib/src/common-elements/samples.js +1 -1
- package/lib/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +2 -5
- package/lib/redoc-lib/src/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/redoc-lib/src/components/Parameters/Parameters.js +1 -1
- package/lib/redoc-lib/src/components/Schema/OneOfSchema.js +1 -1
- package/lib/redoc-lib/src/services/HistoryService.js +1 -1
- package/lib/redoc-lib/src/services/MarkdownRenderer.d.ts +1 -1
- package/lib/redoc-lib/src/services/MarkdownRenderer.js +1 -1
- package/lib/redoc-lib/src/services/models/ApiInfo.d.ts +1 -2
- package/lib/redoc-lib/src/services/models/ApiInfo.js +1 -1
- package/lib/redoc-lib/src/services/models/Operation.d.ts +1 -1
- package/lib/redoc-lib/src/services/models/Operation.js +1 -1
- package/lib/redoc-lib/src/utils/helpers.d.ts +1 -0
- package/lib/redoc-lib/src/utils/helpers.js +1 -1
- package/lib/redoc-lib/src/utils/openapi.js +1 -1
- package/lib/services/ProMenu.js +1 -1
- package/lib/services/ProStore.d.ts +1 -1
- package/lib/services/ProStore.js +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +1 -1
- package/lib/services/history/FakeHistoryService.d.ts +2 -1
- package/lib/services/history/FakeHistoryService.js +1 -1
- package/lib/services/history/ProHashHistoryService.js +1 -1
- package/lib/services/history/PushStateHistoryService.js +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib-esm/components/Endpoint/Path.js +1 -1
- package/lib-esm/components/Panel/CodePanel.js +1 -1
- package/lib-esm/components/Panel/DarkHeader.js +1 -1
- package/lib-esm/components/Samples/SamplesTabs.js +1 -1
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.js +1 -1
- package/lib-esm/components/console/ActionPanel.js +1 -1
- package/lib-esm/components/console/CodemirrorInput.js +1 -1
- package/lib-esm/components/console/Console.d.ts +6 -3
- package/lib-esm/components/console/Console.js +1 -1
- package/lib-esm/components/console/ConsoleLazy.d.ts +1 -1
- package/lib-esm/components/console/OperationParameters.js +1 -1
- package/lib-esm/components/console/utils.d.ts +3 -4
- package/lib-esm/components/console/utils.js +1 -1
- package/lib-esm/index.d.ts +4 -4
- package/lib-esm/index.js +1 -1
- package/lib-esm/redoc-lib/src/common-elements/samples.js +1 -1
- package/lib-esm/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +2 -5
- package/lib-esm/redoc-lib/src/components/ApiInfo/ApiInfo.js +1 -1
- package/lib-esm/redoc-lib/src/components/Parameters/Parameters.js +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/OneOfSchema.js +1 -1
- package/lib-esm/redoc-lib/src/services/HistoryService.js +1 -1
- package/lib-esm/redoc-lib/src/services/MarkdownRenderer.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/MarkdownRenderer.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/ApiInfo.d.ts +1 -2
- package/lib-esm/redoc-lib/src/services/models/ApiInfo.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/Operation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/models/Operation.js +1 -1
- package/lib-esm/redoc-lib/src/utils/helpers.d.ts +1 -0
- package/lib-esm/redoc-lib/src/utils/helpers.js +1 -1
- package/lib-esm/redoc-lib/src/utils/openapi.js +1 -1
- package/lib-esm/services/ProMenu.js +1 -1
- package/lib-esm/services/ProStore.d.ts +1 -1
- package/lib-esm/services/ProStore.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.js +1 -1
- package/lib-esm/services/history/FakeHistoryService.d.ts +2 -1
- package/lib-esm/services/history/FakeHistoryService.js +1 -1
- package/lib-esm/services/history/ProHashHistoryService.js +1 -1
- package/lib-esm/services/history/PushStateHistoryService.js +1 -1
- package/lib-esm/utils.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _a,_b;import{__assign}from"tslib";import*as util from"util";import{Lang,NamingVariableConventions,VariableType}from"./constants";import StringUtility from"./string-utility";var langToVarNameConvention=((_a={})[Lang.NODEJS]=NamingVariableConventions.CAMEL_CASE,_a[Lang.JAVASCRIPT]=NamingVariableConventions.CAMEL_CASE,_a[Lang.PYTHON]=NamingVariableConventions.UNDER_SCORES,_a[Lang.JAVA8]=NamingVariableConventions.CAMEL_CASE,_a[Lang.JAVA]=NamingVariableConventions.CAMEL_CASE,_a[Lang.CSHARP]=NamingVariableConventions.PASCAL_CASE,_a[Lang.CURL]=NamingVariableConventions.CAMEL_CASE,_a[Lang.GO]=NamingVariableConventions.CAMEL_CASE,_a[Lang.PHP]=NamingVariableConventions.CAMEL_CASE,_a[Lang.RUBY]=NamingVariableConventions.UNDER_SCORES,_a),langOptions=((_b={default:{joinSymbol:"",variableWrapperFn:function(e){return e},stringLiteral:function(e){return e},variableDeclaration:function(e){return e},urlFieldName:"url"}})[Lang.CSHARP]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"var "+e+' = "%s";'},urlFieldName:"fullUrl"},_b[Lang.GO]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return e+' := "%s";'}},_b[Lang.JAVA]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"var "+e+' = "%s";'},urlFieldName:"pathname"},_b[Lang.JAVA8]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"String "+e+' = "%s";'},urlFieldName:"fullUrl"},_b[Lang.JAVASCRIPT]={variableWrapperFn:function(e){return"${"+e+"}"},variableDeclaration:function(e){return"const "+e+" = '%s';"}},_b[Lang.NODEJS]={variableWrapperFn:function(e){return"${"+e+"}"},variableDeclaration:function(e){return"const "+e+" = '%s';"}},_b[Lang.PHP]={joinSymbol:" . ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"const "+e+' = "%s";'}},_b[Lang.PYTHON]={stringLiteral:function(e){return'"'+e+'"'},joinSymbol:" + ",variableDeclaration:function(e){return e+' = "%s"'}},_b[Lang.RUBY]={joinSymbol:" + ",stringLiteral:function(e){return"'"+e+"'"},variableDeclaration:function(e){return e+" = '%s'"}},_b[Lang.CURL]={variableWrapperFn:function(e,n){return n||"
|
|
1
|
+
var _a,_b;import{__assign}from"tslib";import*as util from"util";import{Lang,NamingVariableConventions,VariableType}from"./constants";import StringUtility from"./string-utility";var langToVarNameConvention=((_a={})[Lang.NODEJS]=NamingVariableConventions.CAMEL_CASE,_a[Lang.JAVASCRIPT]=NamingVariableConventions.CAMEL_CASE,_a[Lang.PYTHON]=NamingVariableConventions.UNDER_SCORES,_a[Lang.JAVA8]=NamingVariableConventions.CAMEL_CASE,_a[Lang.JAVA]=NamingVariableConventions.CAMEL_CASE,_a[Lang.CSHARP]=NamingVariableConventions.PASCAL_CASE,_a[Lang.CURL]=NamingVariableConventions.CAMEL_CASE,_a[Lang.GO]=NamingVariableConventions.CAMEL_CASE,_a[Lang.PHP]=NamingVariableConventions.CAMEL_CASE,_a[Lang.RUBY]=NamingVariableConventions.UNDER_SCORES,_a),langOptions=((_b={default:{joinSymbol:"",variableWrapperFn:function(e){return e},stringLiteral:function(e){return e},variableDeclaration:function(e){return e},urlFieldName:"url"}})[Lang.CSHARP]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"var "+e+' = "%s";'},urlFieldName:"fullUrl"},_b[Lang.GO]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return e+' := "%s";'}},_b[Lang.JAVA]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"var "+e+' = "%s";'},urlFieldName:"pathname"},_b[Lang.JAVA8]={joinSymbol:" + ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"String "+e+' = "%s";'},urlFieldName:"fullUrl"},_b[Lang.JAVASCRIPT]={variableWrapperFn:function(e){return"${"+e+"}"},variableDeclaration:function(e){return"const "+e+" = '%s';"}},_b[Lang.NODEJS]={variableWrapperFn:function(e){return"${"+e+"}"},variableDeclaration:function(e){return"const "+e+" = '%s';"}},_b[Lang.PHP]={joinSymbol:" . ",stringLiteral:function(e){return'"'+e+'"'},variableDeclaration:function(e){return"const "+e+' = "%s";'}},_b[Lang.PYTHON]={stringLiteral:function(e){return'"'+e+'"'},joinSymbol:" + ",variableDeclaration:function(e){return e+' = "%s"'}},_b[Lang.RUBY]={joinSymbol:" + ",stringLiteral:function(e){return"'"+e+"'"},variableDeclaration:function(e){return e+" = '%s'"}},_b[Lang.CURL]={variableWrapperFn:function(e,n){return n||"{"+e+"}"},urlFieldName:"fullUrl",rawName:!0},_b),reservedVariableNames=["response","request","requests","data","url","payload","main","accessToken","resp","Program","client","postData","App","httpClient","params","pathname","host","body","fetch","query"],CodeBuilder=function(){function e(e){var n=e.indentation,i=e.lineJoin,a=void 0===i?"\n":i,r=e.variablesPrefix,t=void 0===r?"":r,l=e.capitalize,o=void 0!==l&&l,u=e.lang,s=void 0===u?Lang.CURL:u;Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"indentation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variablesPrefix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"capitalize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lang",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"langOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=[],this.indentation=n,this.variablesPrefix=t,this.lineJoin=a||"\n",this.capitalize=o,this.lang=s,this.langOptions=__assign(__assign({},langOptions.default),langOptions[s])}return Object.defineProperty(e.prototype,"buildLine",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n){var i="",a=2;if("string"==typeof e)a=1,n=e,e=0;else if(null===e)return null;for(;e;)i+=this.indentation,e--;var r=Array.prototype.slice.call(arguments,a,arguments.length);return r.unshift(i+n),util.format.apply(this,r)}}),Object.defineProperty(e.prototype,"unshift",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this.code.unshift(this.buildLine.apply(this,e)),this}}),Object.defineProperty(e.prototype,"push",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this.code.push(this.buildLine.apply(this,e)),this}}),Object.defineProperty(e.prototype,"blank",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.code.push(null),this}}),Object.defineProperty(e.prototype,"join",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.code.join(this.lineJoin)}}),Object.defineProperty(e.prototype,"clean",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.code.splice(1)}}),Object.defineProperty(e.prototype,"var",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n){if(void 0===n&&(n=VariableType.CUSTOM),n===VariableType.PATH){var i=this.variablesPrefix+e;switch(reservedVariableNames.includes(i)&&(i+="_path"),langToVarNameConvention[this.lang]){case NamingVariableConventions.UNDER_SCORES:i=StringUtility.toSnakeCase(i);break;case NamingVariableConventions.PASCAL_CASE:i=StringUtility.toPascalCase(i);break;case NamingVariableConventions.CAMEL_CASE:default:i=StringUtility.toCamelCase(i)}return i}return this.variablesPrefix?this.variablesPrefix+(this.capitalize?StringUtility.toPascalCase(e):e):e}}),e}();export{CodeBuilder};
|
|
2
2
|
//# sourceMappingURL=code-builder.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import EventEmitter from 'eventemitter3';
|
|
1
2
|
import { HistoryService } from '../../redoc-lib';
|
|
2
3
|
import { RedocProNormalizedOptions } from '../ProStore';
|
|
3
4
|
export declare class FakeHistoryService implements Interface<HistoryService> {
|
|
4
5
|
options: RedocProNormalizedOptions;
|
|
5
|
-
_emitter:
|
|
6
|
+
_emitter: EventEmitter<string | symbol, any>;
|
|
6
7
|
basePath?: string;
|
|
7
8
|
constructor(options: RedocProNormalizedOptions);
|
|
8
9
|
currentId: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import{bind,debounce}from"decko";import
|
|
1
|
+
import{__decorate}from"tslib";import{bind,debounce}from"decko";import EventEmitter from"eventemitter3";var EVENT="itemchange",FakeHistoryService=function(){function e(e){var r=this;Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new EventEmitter}),Object.defineProperty(this,"basePath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentId",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"emit",{enumerable:!0,configurable:!0,writable:!0,value:function(){r._emitter.emit(EVENT,r.currentId)}}),this.bind()}return Object.defineProperty(e.prototype,"linkForId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.linkForId?this.options.linkForId(e):""}}),Object.defineProperty(e.prototype,"generateDeepLink",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){return e&&this.options.generateDeepLink?this.options.generateDeepLink(e,r):null}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this._emitter.addListener(EVENT,e);return function(){return r.removeListener(EVENT,e)}}}),Object.defineProperty(e.prototype,"bind",{enumerable:!1,configurable:!0,writable:!0,value:function(){}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){}}),Object.defineProperty(e.prototype,"replace",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){void 0===r&&(r=!1)}}),Object.defineProperty(e.prototype,"replaceForField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){void 0===r&&(r=!1),this.currentId=(e||"").replace(/^#/,""),this.emit()}}),Object.defineProperty(e.prototype,"replaceNow",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){void 0===r&&(r=!1)}}),Object.defineProperty(e.prototype,"replaceDebounced",{enumerable:!1,configurable:!0,writable:!0,value:function(e){}}),__decorate([bind],e.prototype,"replace",null),__decorate([bind],e.prototype,"replaceForField",null),__decorate([bind,debounce],e.prototype,"replaceDebounced",null),e}();export{FakeHistoryService};
|
|
2
2
|
//# sourceMappingURL=FakeHistoryService.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import{bind,debounce}from"decko";import
|
|
1
|
+
import{__decorate}from"tslib";import{bind,debounce}from"decko";import EventEmitter from"eventemitter3";import{IS_BROWSER}from"../../redoc-lib";import{isSameHash,joinWithSeparator}from"./helpers";var ProHashHistoryService=function(){function e(e,t){var r=this;Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"multiSpec",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emiter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"basePath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"emit",{enumerable:!0,configurable:!0,writable:!0,value:function(){r._emiter.emit("popstate",r.currentId)}});var i=e.routingBasePath||"";this.basePath=i.endsWith("/")?i.substring(0,i.length-1):i,this.basePath.startsWith("/")&&(this.basePath=this.basePath.substring(1)),this._emiter=new EventEmitter,this.bind()}return Object.defineProperty(e.prototype,"currentId",{get:function(){if(!IS_BROWSER)return"";var e=decodeURIComponent(window.location.hash.substr(1)),t=window.location.pathname.substring(1);if(t.startsWith(this.basePath+"/")&&(t=t.substring(this.basePath.length+1)),t.endsWith("/")&&(t=t.substring(0,t.length-1)),e.startsWith("operation/")||(null==e?void 0:e.startsWith("section/"))){if(this.multiSpec){var r=t.split("/")[0];return joinWithSeparator(r,e)}return e}return t?joinWithSeparator(t,e):e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"makeUrl",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r="";return IS_BROWSER&&(r=window.location.search),(e.startsWith("/")?"/"+(this.basePath?this.basePath+"/":"")+e.substring(1):e)+r+(t?"#"+t:"")}}),Object.defineProperty(e.prototype,"linkForId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)return"";if(""===e)return this.makeUrl("","");var t="";return this.multiSpec&&(t="/"+e.split("/")[0],e=e.split("/").slice(1).join("/")),this.makeUrl(t,e)}}),Object.defineProperty(e.prototype,"generateDeepLink",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(t)return t+this.options.deepLinkPrefix+e}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this._emiter.addListener("popstate",e);return function(){return t.removeListener("popstate",e)}}}),Object.defineProperty(e.prototype,"bind",{enumerable:!1,configurable:!0,writable:!0,value:function(){IS_BROWSER&&(window.addEventListener("popstate",this.emit,!1),window.addEventListener("hashchange",this.emit,!1))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){IS_BROWSER&&(window.removeEventListener("popstate",this.emit),window.removeEventListener("hashchange",this.emit))}}),Object.defineProperty(e.prototype,"replace",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!1),t)return this.replaceDebounced(e);this.replaceNow(e,t)}}),Object.defineProperty(e.prototype,"replaceForField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;if(void 0===t&&(t=!1),IS_BROWSER&&e){var i,n=new URL(e,window.location.href);i=n,t?window.history.replaceState(null,"",i):(window.history.pushState(null,"",i),r.emit())}}}),Object.defineProperty(e.prototype,"replaceNow",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!1),IS_BROWSER&&null!=e&&!isSameHash(e,this.currentId)){var r=new URL(this.linkForId(e),window.location.href);t?IS_BROWSER&&window.history.replaceState(null,"",r.href):IS_BROWSER&&(window.history.pushState(null,"",r.href),this.emit())}}}),Object.defineProperty(e.prototype,"replaceDebounced",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.replaceNow(e,!0)}}),__decorate([bind],e.prototype,"replace",null),__decorate([bind],e.prototype,"replaceForField",null),__decorate([bind,debounce],e.prototype,"replaceDebounced",null),e}();export{ProHashHistoryService};
|
|
2
2
|
//# sourceMappingURL=ProHashHistoryService.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import{bind,debounce}from"decko";import
|
|
1
|
+
import{__decorate}from"tslib";import{bind,debounce}from"decko";import EventEmitter from"eventemitter3";import{IS_BROWSER}from"../../redoc-lib";import{isSameHash,joinWithSeparator}from"./helpers";var PushStateHistoryService=function(){function e(e,t){var i=this;Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"multispec",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emiter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"basePath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"markdownItemsPagination",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pagination",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"emit",{enumerable:!0,configurable:!0,writable:!0,value:function(){i._emiter.emit("popstate",i.currentId)}});var r=e.routingBasePath;this.markdownItemsPagination=e.markdownItemsPagination,this.pagination=e.pagination,this.basePath=r.endsWith("/")?r.substring(0,r.length-1):r,this.basePath.startsWith("/")&&(this.basePath=this.basePath.substring(1)),this._emiter=new EventEmitter,this.bind()}return Object.defineProperty(e.prototype,"currentId",{get:function(){if(!IS_BROWSER)return"";var e=decodeURIComponent(window.location.hash.substr(1)),t=window.location.pathname.substring(1);if(t.startsWith(this.basePath+"/")&&(t=t.substring(this.basePath.length+1)),t.endsWith("/")&&(t=t.substring(0,t.length-1)),null==e?void 0:e.startsWith("section/")){if(this.multispec){var i=t.split("/")[0];return joinWithSeparator(i,e)}return e}return(null==e?void 0:e.startsWith("operation/"))?joinWithSeparator(t,e):t?"item"===this.pagination&&e.startsWith(this.options.deepLinkPrefix)?joinWithSeparator(t,e,this.options.deepLinkPrefix):joinWithSeparator(t,e):e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"makeUrl",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i,r="";return IS_BROWSER&&(r=window.location.search),(i=e.startsWith("/")?"/"+joinWithSeparator(this.basePath,e.substring(1),"/"):e)+r?joinWithSeparator(i+r,t,"#"):"#"+t}}),Object.defineProperty(e.prototype,"generateDeepLink",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return t?t+("item"===this.options.pagination?"#":"")+this.options.deepLinkPrefix+e:null}}),Object.defineProperty(e.prototype,"linkForId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0===e&&(e=""),""===e)return this.makeUrl("/","");var t="";if(this.multispec&&(t="/"+e.split("/")[0],e=e.split("/").slice(1).join("/")),e.startsWith("operation/")){if(this.multispec&&IS_BROWSER){var i=window.location.pathname.substring(1);i.startsWith(this.basePath)&&(i=i.substring(this.basePath.length)).startsWith("/")&&(i=i.substring(1));var r="/"+i.split("/")[0];return t===r?this.makeUrl("",e):this.makeUrl(i.replace(r,t),e)}return this.makeUrl("",e)}var n,a=t,o="";if(e.startsWith("section/")||!e){var s=(e||"").split("/")[1];s&&"section"===this.markdownItemsPagination?(a=t+"/section/"+s,o=e):(a=t+"/",o=e)}if(e.startsWith("group/")){var l=e.match(/group\/(.*)\/(paths\/.*\/\w+|operation\/[^/]*)/);if(l)a=t+"/group/"+l[1],o=l[2]||"";else a=t+"/"+e,o=""}"section"===this.pagination&&e.startsWith("tag/")&&(a=t+"/"+(n=e.split("/")).slice(0,2).join("/"),o=n.slice(2).join("/"));"item"===this.pagination&&e.startsWith("tag/")&&(a=t+"/"+e,"section"===(n=e.split("/"))[2]&&(a=t+"/"+n.slice(0,2).join("/"),o=n.slice(2).join("/")));return this.makeUrl(a,o)}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this._emiter.addListener("popstate",e);return function(){return t.removeListener("popstate",e)}}}),Object.defineProperty(e.prototype,"bind",{enumerable:!1,configurable:!0,writable:!0,value:function(){IS_BROWSER&&window.addEventListener("popstate",this.emit,!1)}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){IS_BROWSER&&window.removeEventListener("popstate",this.emit)}}),Object.defineProperty(e.prototype,"replace",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!1),t)return this.replaceDebounced(e);this.replaceNow(e,t)}}),Object.defineProperty(e.prototype,"replaceForField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!1),IS_BROWSER&&e){var i,r=new URL(e,window.location.href);i=r,t&&window.history.replaceState(null,"",i),window.history.pushState(null,"",i),this.emit()}}}),Object.defineProperty(e.prototype,"replaceNow",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!1),IS_BROWSER&&null!=e&&!isSameHash(e,this.currentId)){var i=new URL(this.linkForId(e),window.location.href);t?IS_BROWSER&&window.history.replaceState(null,"",i.href):IS_BROWSER&&(window.history.pushState(null,"",i.href),this.emit())}}}),Object.defineProperty(e.prototype,"replaceDebounced",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.replaceNow(e,!0)}}),__decorate([bind],e.prototype,"replace",null),__decorate([bind],e.prototype,"replaceForField",null),__decorate([bind,debounce],e.prototype,"replaceDebounced",null),e}();export{PushStateHistoryService};
|
|
2
2
|
//# sourceMappingURL=PushStateHistoryService.js.map
|
package/lib-esm/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProStore } from './services/ProStore';
|
|
1
|
+
import type { ProStore } from './services/ProStore';
|
|
2
2
|
export declare const getGlobalStore: () => ProStore;
|
|
3
3
|
export declare const setGlobalStore: (store: ProStore) => ProStore;
|
|
4
4
|
export declare function debounce<T extends unknown>(fn: (...args: T[]) => void, threshold: number, leading?: boolean): (...args: T[]) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/reference-docs",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.5",
|
|
4
4
|
"description": "Redocly Reference Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@redocly/vscode-json-languageservice": "3.4.9",
|
|
21
21
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.2",
|
|
22
22
|
"classnames": "^2.2.6",
|
|
23
|
-
"codemirror": "^5.
|
|
23
|
+
"codemirror": "^5.65.0",
|
|
24
24
|
"decko": "^1.2.0",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "^2.0.12",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"kleur": "^3.0.3",
|
|
34
34
|
"lunr": "^2.3.8",
|
|
35
35
|
"mark.js": "^8.11.1",
|
|
36
|
-
"marked": "^
|
|
36
|
+
"marked": "^4.0.10",
|
|
37
37
|
"mkdirp": "^0.5.1",
|
|
38
38
|
"mobx-react": "^7.2.0",
|
|
39
39
|
"node-libs-browser": "^2.2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"prismjs": "^1.22.0",
|
|
45
45
|
"prop-types": "^15.7.2",
|
|
46
46
|
"query-string": "^6.13.6",
|
|
47
|
-
"react-codemirror2": "^7.1
|
|
47
|
+
"react-codemirror2": "^7.2.1",
|
|
48
48
|
"react-tabs": "^3.1.1",
|
|
49
49
|
"serve-static": "^1.14.1",
|
|
50
50
|
"slugify": "^1.4.4",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@types/jest": "^25.1.4",
|
|
109
109
|
"@types/json-pointer": "^1.0.30",
|
|
110
110
|
"@types/mark.js": "^8.11.5",
|
|
111
|
-
"@types/marked": "^
|
|
111
|
+
"@types/marked": "^4.0.1",
|
|
112
112
|
"@types/node": "^14.14.37",
|
|
113
113
|
"@types/prismjs": "^1.16.1",
|
|
114
114
|
"@types/prop-types": "^15.7.3",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
|
122
122
|
"@typescript-eslint/parser": "^4.28.3",
|
|
123
123
|
"core-js": "^3.5.0",
|
|
124
|
-
"css-loader": "^
|
|
124
|
+
"css-loader": "^6.5.1",
|
|
125
125
|
"cypress": "^8.4.0",
|
|
126
126
|
"cypress-file-upload": "^5.0.8",
|
|
127
127
|
"enzyme": "^3.7.0",
|