@redocly/reference-docs 2.39.2 → 2.40.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/bin/cli/commands/redocly-docs-cli.min.js +76 -41
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +1 -1
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +635 -582
- package/lib/components/Overlay/Overlay.d.ts +3 -0
- package/lib/components/Overlay/Overlay.js +2 -0
- package/lib/components/Overlay/constants.d.ts +9 -0
- package/lib/components/Overlay/constants.js +2 -0
- package/lib/components/Overlay/index.d.ts +1 -0
- package/lib/components/Overlay/index.js +2 -0
- package/lib/components/Overlay/styled.d.ts +6 -0
- package/lib/components/Overlay/styled.js +2 -0
- package/lib/components/Overlay/types.d.ts +16 -0
- package/lib/components/Overlay/types.js +2 -0
- package/lib/components/RedoclyReferenceDocs.js +1 -1
- package/lib/services/ProStore.js +1 -1
- package/lib/services/check.d.ts +6 -0
- package/lib/services/check.js +1 -1
- package/lib-esm/components/Overlay/Overlay.d.ts +3 -0
- package/lib-esm/components/Overlay/Overlay.js +2 -0
- package/lib-esm/components/Overlay/constants.d.ts +9 -0
- package/lib-esm/components/Overlay/constants.js +2 -0
- package/lib-esm/components/Overlay/index.d.ts +1 -0
- package/lib-esm/components/Overlay/index.js +2 -0
- package/lib-esm/components/Overlay/styled.d.ts +6 -0
- package/lib-esm/components/Overlay/styled.js +2 -0
- package/lib-esm/components/Overlay/types.d.ts +16 -0
- package/lib-esm/components/Overlay/types.js +2 -0
- package/lib-esm/components/RedoclyReferenceDocs.js +1 -1
- package/lib-esm/services/ProStore.js +1 -1
- package/lib-esm/services/check.d.ts +6 -0
- package/lib-esm/services/check.js +1 -1
- package/package.json +1 -1
- package/lib/components/Overlay.d.ts +0 -11
- package/lib/components/Overlay.js +0 -2
- package/lib-esm/components/Overlay.d.ts +0 -11
- package/lib-esm/components/Overlay.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Overlay=void 0;var tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),redoc_lib_1=require("../redoc-lib"),INVALID_KEY="Invalid license key",INVALID_KEY_MISSING=INVALID_KEY+": missing key",EXPIRED="Invalid license key: expired",TRIAL_EXPIRED=EXPIRED,INVALID_HOST="Invalid license key: host not allowed",Overlay=function(e){var n=e.l,i=(0,react_1.useState)(null),t=i[0],r=i[1],a=(0,react_1.useState)(-1),l=a[0],o=a[1],s=(0,react_1.useState)(!1),d=s[0],c=s[1];return(0,react_1.useEffect)((function(){(0,tslib_1.__awaiter)(void 0,void 0,void 0,(function(){var e,i;return(0,tslib_1.__generator)(this,(function(t){switch(t.label){case 0:return[4,n];case 1:return(e=t.sent()).local?(c(!0),[2]):(e.valid?e.allowed?e.expired&&r(e.t?EXPIRED:TRIAL_EXPIRED):r(INVALID_HOST):r(!1===e.valid?INVALID_KEY+(e.cryptoMissing?": works only with https":""):INVALID_KEY_MISSING),e.t&&o(Math.ceil(((null!==(i=null==e?void 0:e.e)&&void 0!==i?i:0)-Date.now()/1e3)/60/60/24)),[2])}}))}))}),[n]),d?(0,jsx_runtime_1.jsxs)(TrialWrap,{children:[(0,jsx_runtime_1.jsx)("a",(0,tslib_1.__assign)({href:"https://redoc.ly"},{children:"Redocly API reference docs"}),void 0)," preview"]},void 0):!t&&l>-1?(0,jsx_runtime_1.jsxs)(TrialWrap,{children:[" Trial version: ",l," days remaining "]},void 0):t?(0,jsx_runtime_1.jsx)(Flash,{children:(0,jsx_runtime_1.jsxs)("span",{children:[t," ",(0,jsx_runtime_1.jsx)("br",{},void 0),(0,jsx_runtime_1.jsxs)("small",{children:["Please contact ",(0,jsx_runtime_1.jsx)("a",(0,tslib_1.__assign)({href:"mailto:team@redoc.ly"},{children:"team@redoc.ly"}),void 0)," to remedy the problem."," "]},void 0)]},void 0)},void 0):null};exports.Overlay=Overlay;var templateObject_1,templateObject_2,TrialWrap=redoc_lib_1.styled.div(templateObject_1||(templateObject_1=(0,tslib_1.__makeTemplateObject)(["\n padding: 10px 40px;\n position: fixed;\n text-align: right;\n width: 100%;\n box-sizing: border-box;\n color: orange;\n z-index: 10;\n opacity: 0.6;\n\n > a,\n a:visited {\n color: orange;\n }\n"],["\n padding: 10px 40px;\n position: fixed;\n text-align: right;\n width: 100%;\n box-sizing: border-box;\n color: orange;\n z-index: 10;\n opacity: 0.6;\n\n > a,\n a:visited {\n color: orange;\n }\n"]))),Flash=redoc_lib_1.styled.div(templateObject_2||(templateObject_2=(0,tslib_1.__makeTemplateObject)(["\n font-size: 1.5em;\n position: fixed;\n z-index: 100;\n background: rgba(38, 50, 56, 0.93);\n margin: 0;\n padding: 1em;\n width: 100%;\n color: white;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n box-sizing: border-box;\n\n > span {\n display: inline-block;\n line-height: 1.5;\n }\n\n a,\n a:hover,\n a:visited {\n color: white;\n }\n"],["\n font-size: 1.5em;\n position: fixed;\n z-index: 100;\n background: rgba(38, 50, 56, 0.93);\n margin: 0;\n padding: 1em;\n width: 100%;\n color: white;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n box-sizing: border-box;\n\n > span {\n display: inline-block;\n line-height: 1.5;\n }\n\n a,\n a:hover,\n a:visited {\n color: white;\n }\n"])));
|
|
2
|
-
//# sourceMappingURL=Overlay.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { LicenseInfo } from '../services/check';
|
|
3
|
-
export interface LicenseCheckProps {
|
|
4
|
-
l: Promise<LicenseInfo>;
|
|
5
|
-
}
|
|
6
|
-
export interface LicenseCheckState {
|
|
7
|
-
m: string | null;
|
|
8
|
-
exp: number;
|
|
9
|
-
local: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const Overlay: ({ l }: LicenseCheckProps) => JSX.Element | null;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__assign,__awaiter,__generator,__makeTemplateObject}from"tslib";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useState,useEffect}from"react";import{styled}from"../redoc-lib";var INVALID_KEY="Invalid license key",INVALID_KEY_MISSING=INVALID_KEY+": missing key",EXPIRED="Invalid license key: expired",TRIAL_EXPIRED=EXPIRED,INVALID_HOST="Invalid license key: host not allowed";export var Overlay=function(n){var e=n.l,i=useState(null),t=i[0],a=i[1],o=useState(-1),r=o[0],l=o[1],s=useState(!1),d=s[0],c=s[1];return useEffect((function(){__awaiter(void 0,void 0,void 0,(function(){var n,i;return __generator(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return(n=t.sent()).local?(c(!0),[2]):(n.valid?n.allowed?n.expired&&a(n.t?EXPIRED:TRIAL_EXPIRED):a(INVALID_HOST):a(!1===n.valid?INVALID_KEY+(n.cryptoMissing?": works only with https":""):INVALID_KEY_MISSING),n.t&&l(Math.ceil(((null!==(i=null==n?void 0:n.e)&&void 0!==i?i:0)-Date.now()/1e3)/60/60/24)),[2])}}))}))}),[e]),d?_jsxs(TrialWrap,{children:[_jsx("a",__assign({href:"https://redoc.ly"},{children:"Redocly API reference docs"}),void 0)," preview"]},void 0):!t&&r>-1?_jsxs(TrialWrap,{children:[" Trial version: ",r," days remaining "]},void 0):t?_jsx(Flash,{children:_jsxs("span",{children:[t," ",_jsx("br",{},void 0),_jsxs("small",{children:["Please contact ",_jsx("a",__assign({href:"mailto:team@redoc.ly"},{children:"team@redoc.ly"}),void 0)," to remedy the problem."," "]},void 0)]},void 0)},void 0):null};var templateObject_1,templateObject_2,TrialWrap=styled.div(templateObject_1||(templateObject_1=__makeTemplateObject(["\n padding: 10px 40px;\n position: fixed;\n text-align: right;\n width: 100%;\n box-sizing: border-box;\n color: orange;\n z-index: 10;\n opacity: 0.6;\n\n > a,\n a:visited {\n color: orange;\n }\n"],["\n padding: 10px 40px;\n position: fixed;\n text-align: right;\n width: 100%;\n box-sizing: border-box;\n color: orange;\n z-index: 10;\n opacity: 0.6;\n\n > a,\n a:visited {\n color: orange;\n }\n"]))),Flash=styled.div(templateObject_2||(templateObject_2=__makeTemplateObject(["\n font-size: 1.5em;\n position: fixed;\n z-index: 100;\n background: rgba(38, 50, 56, 0.93);\n margin: 0;\n padding: 1em;\n width: 100%;\n color: white;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n box-sizing: border-box;\n\n > span {\n display: inline-block;\n line-height: 1.5;\n }\n\n a,\n a:hover,\n a:visited {\n color: white;\n }\n"],["\n font-size: 1.5em;\n position: fixed;\n z-index: 100;\n background: rgba(38, 50, 56, 0.93);\n margin: 0;\n padding: 1em;\n width: 100%;\n color: white;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n\n text-align: center;\n box-sizing: border-box;\n\n > span {\n display: inline-block;\n line-height: 1.5;\n }\n\n a,\n a:hover,\n a:visited {\n color: white;\n }\n"])));
|
|
2
|
-
//# sourceMappingURL=Overlay.js.map
|