@stoplight/elements-core 8.3.4 → 8.4.1
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/components/Docs/Docs.d.ts +1 -0
- package/components/Docs/HttpService/AdditionalInfo.stories.d.ts +8 -0
- package/components/TryIt/TryItWithRequestSamples.d.ts +1 -0
- package/index.esm.js +13 -9
- package/index.js +13 -9
- package/index.mjs +13 -9
- package/package.json +3 -3
- package/styles.min.css +1 -1
- package/utils/http.d.ts +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { AdditionalInfo } from './AdditionalInfo';
|
|
3
|
+
declare const meta: Meta<typeof AdditionalInfo>;
|
|
4
|
+
export default meta;
|
|
5
|
+
declare type Story = StoryObj<typeof AdditionalInfo>;
|
|
6
|
+
export declare const LicenseNameAndURL: Story;
|
|
7
|
+
export declare const LicenseNameAndIdentifier: Story;
|
|
8
|
+
export declare const LicenseIdentifierAndNameAndUrl: Story;
|
|
@@ -3,5 +3,6 @@ import { ResponseExamplesProps } from '../ResponseExamples/ResponseExamples';
|
|
|
3
3
|
import { TryItProps } from './TryIt';
|
|
4
4
|
export declare type TryItWithRequestSamplesProps = Omit<TryItProps, 'onRequestChange'> & ResponseExamplesProps & {
|
|
5
5
|
hideTryIt?: boolean;
|
|
6
|
+
hideSamples?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const TryItWithRequestSamples: React.FC<TryItWithRequestSamplesProps>;
|
package/index.esm.js
CHANGED
|
@@ -2158,7 +2158,7 @@ const TryItResponse = ({ response }) => {
|
|
|
2158
2158
|
response.bodyText && responseType && ['json', 'xml', 'text'].includes(responseType) ? (React.createElement(ResponseCodeViewer, { language: "json", value: responseType && bodyFormat === 'preview'
|
|
2159
2159
|
? parseBody(response.bodyText, responseType)
|
|
2160
2160
|
: response.bodyText })) : response.blob && responseType === 'image' ? (React.createElement(Flex, { justifyContent: "center" },
|
|
2161
|
-
React.createElement(Image, { src: URL.createObjectURL(response.blob), alt: "response image" }))) : (React.createElement("p", null,
|
|
2161
|
+
React.createElement(Image, { src: URL.createObjectURL(response.blob), alt: "response image" }))) : !response.bodyText ? null : (React.createElement("p", null,
|
|
2162
2162
|
React.createElement(Box, { as: Icon, icon: ['fas', 'exclamation-circle'], mr: 2 }),
|
|
2163
2163
|
"No supported response body returned"))))));
|
|
2164
2164
|
};
|
|
@@ -2450,14 +2450,14 @@ const ResponseExamples = ({ httpOperation, responseMediaType, responseStatusCode
|
|
|
2450
2450
|
};
|
|
2451
2451
|
|
|
2452
2452
|
const TryItWithRequestSamples = (_a) => {
|
|
2453
|
-
var { hideTryIt } = _a, props = __rest(_a, ["hideTryIt"]);
|
|
2453
|
+
var { hideTryIt, hideSamples } = _a, props = __rest(_a, ["hideTryIt", "hideSamples"]);
|
|
2454
2454
|
const [requestData, setRequestData] = React.useState();
|
|
2455
2455
|
const customCodeSamples = extractCodeSamples(props.httpOperation);
|
|
2456
2456
|
return (React.createElement(VStack, { spacing: 6 },
|
|
2457
2457
|
!hideTryIt && (React.createElement(InvertTheme, null,
|
|
2458
2458
|
React.createElement(Box, null,
|
|
2459
2459
|
React.createElement(TryIt, Object.assign({}, props, { onRequestChange: setRequestData }))))),
|
|
2460
|
-
requestData && React.createElement(RequestSamples, { request: requestData, customCodeSamples: customCodeSamples }),
|
|
2460
|
+
requestData && !hideSamples && React.createElement(RequestSamples, { request: requestData, customCodeSamples: customCodeSamples }),
|
|
2461
2461
|
React.createElement(ResponseExamples, Object.assign({}, props))));
|
|
2462
2462
|
};
|
|
2463
2463
|
|
|
@@ -2915,7 +2915,7 @@ const HttpOperationComponent = React.memo(({ className, data: unresolvedData, la
|
|
|
2915
2915
|
throw new RangeError('unsupported node type');
|
|
2916
2916
|
}
|
|
2917
2917
|
const header = (React.createElement(OperationHeader, { id: data.id, method: data.method, path: path, noHeading: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.noHeading, hasBadges: hasBadges, name: prettyName, isDeprecated: isDeprecated, isInternal: isInternal, hideServerUrl: !isHttpOperation(data) }));
|
|
2918
|
-
const tryItPanel = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryItPanel) && (React.createElement(TryItWithRequestSamples, { httpOperation: data, responseMediaType: responseMediaType, responseStatusCode: responseStatusCode, requestBodyIndex: requestBodyIndex, hideTryIt: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryIt, tryItCredentialsPolicy: tryItCredentialsPolicy, mockUrl: mocking.hideMocking ? undefined : mocking.mockUrl, corsProxy: tryItCorsProxy }));
|
|
2918
|
+
const tryItPanel = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryItPanel) && (React.createElement(TryItWithRequestSamples, { httpOperation: data, responseMediaType: responseMediaType, responseStatusCode: responseStatusCode, requestBodyIndex: requestBodyIndex, hideTryIt: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryIt, hideSamples: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideSamples, tryItCredentialsPolicy: tryItCredentialsPolicy, mockUrl: mocking.hideMocking ? undefined : mocking.mockUrl, corsProxy: tryItCorsProxy }));
|
|
2919
2919
|
const descriptionChanged = nodeHasChanged === null || nodeHasChanged === void 0 ? void 0 : nodeHasChanged({ nodeId: data.id, attr: 'description' });
|
|
2920
2920
|
const description = (React.createElement(VStack, { spacing: 10 },
|
|
2921
2921
|
data.description && (React.createElement(Box, { pos: "relative" },
|
|
@@ -2945,9 +2945,9 @@ function MethodPathInner({ method, path, chosenServerUrl }) {
|
|
|
2945
2945
|
const isDark = useThemeIsDark();
|
|
2946
2946
|
const fullUrl = `${chosenServerUrl}${path}`;
|
|
2947
2947
|
const pathElem = (React.createElement(Flex, { overflowX: "hidden", fontSize: "lg", userSelect: "all" },
|
|
2948
|
-
React.createElement(Box, { dir: "rtl",
|
|
2949
|
-
React.createElement(Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl)
|
|
2950
|
-
|
|
2948
|
+
React.createElement(Box, { dir: "rtl", textOverflow: "truncate", overflowX: "hidden" },
|
|
2949
|
+
React.createElement(Box, { as: "span", color: "muted", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl),
|
|
2950
|
+
React.createElement(Box, { as: "span", fontWeight: "semibold", flex: 1 }, path))));
|
|
2951
2951
|
return (React.createElement(HStack, { spacing: 3, pl: 2.5, pr: 4, py: 2, bg: "canvas-50", rounded: "lg", fontFamily: "mono", display: "inline-flex", maxW: "full", title: fullUrl },
|
|
2952
2952
|
React.createElement(Box, { py: 1, px: 2.5, rounded: "lg", bg: !isDark ? HttpMethodColors[method] : 'canvas-100', color: !isDark ? 'on-primary' : 'body', fontSize: "lg", fontWeight: "semibold", textTransform: "uppercase" }, method),
|
|
2953
2953
|
pathElem));
|
|
@@ -2988,8 +2988,12 @@ const AdditionalInfo = ({ id, termsOfService, contact, license }) => {
|
|
|
2988
2988
|
: (contact === null || contact === void 0 ? void 0 : contact.email)
|
|
2989
2989
|
? `[Contact ${contact.name || contact.email}](mailto:${contact.email})`
|
|
2990
2990
|
: '';
|
|
2991
|
-
const licenseUrl = (license === null || license === void 0 ? void 0 : license.url) || `https://spdx.org/licenses/${license === null || license === void 0 ? void 0 : license.identifier}.html
|
|
2992
|
-
const licenseLink = (license === null || license === void 0 ? void 0 : license.name) && licenseUrl
|
|
2991
|
+
const licenseUrl = (license === null || license === void 0 ? void 0 : license.url) || (license === null || license === void 0 ? void 0 : license.identifier) ? `https://spdx.org/licenses/${license === null || license === void 0 ? void 0 : license.identifier}.html` : undefined;
|
|
2992
|
+
const licenseLink = (license === null || license === void 0 ? void 0 : license.name) && licenseUrl
|
|
2993
|
+
? `[${license.name}](${licenseUrl})`
|
|
2994
|
+
: (license === null || license === void 0 ? void 0 : license.identifier) && licenseUrl
|
|
2995
|
+
? `[${license === null || license === void 0 ? void 0 : license.identifier}](${licenseUrl})`
|
|
2996
|
+
: undefined;
|
|
2993
2997
|
const tosLink = termsOfService ? `[Terms of Service](${termsOfService})` : '';
|
|
2994
2998
|
return contactLink || licenseLink || tosLink ? (React__default.createElement(Panel, { rounded: true, isCollapsible: false, pos: "relative" },
|
|
2995
2999
|
React__default.createElement(Panel.Titlebar, { bg: "canvas-300" },
|
package/index.js
CHANGED
|
@@ -2180,7 +2180,7 @@ const TryItResponse = ({ response }) => {
|
|
|
2180
2180
|
response.bodyText && responseType && ['json', 'xml', 'text'].includes(responseType) ? (React__namespace.createElement(ResponseCodeViewer, { language: "json", value: responseType && bodyFormat === 'preview'
|
|
2181
2181
|
? parseBody(response.bodyText, responseType)
|
|
2182
2182
|
: response.bodyText })) : response.blob && responseType === 'image' ? (React__namespace.createElement(mosaic.Flex, { justifyContent: "center" },
|
|
2183
|
-
React__namespace.createElement(mosaic.Image, { src: URL.createObjectURL(response.blob), alt: "response image" }))) : (React__namespace.createElement("p", null,
|
|
2183
|
+
React__namespace.createElement(mosaic.Image, { src: URL.createObjectURL(response.blob), alt: "response image" }))) : !response.bodyText ? null : (React__namespace.createElement("p", null,
|
|
2184
2184
|
React__namespace.createElement(mosaic.Box, { as: mosaic.Icon, icon: ['fas', 'exclamation-circle'], mr: 2 }),
|
|
2185
2185
|
"No supported response body returned"))))));
|
|
2186
2186
|
};
|
|
@@ -2472,14 +2472,14 @@ const ResponseExamples = ({ httpOperation, responseMediaType, responseStatusCode
|
|
|
2472
2472
|
};
|
|
2473
2473
|
|
|
2474
2474
|
const TryItWithRequestSamples = (_a) => {
|
|
2475
|
-
var { hideTryIt } = _a, props = tslib.__rest(_a, ["hideTryIt"]);
|
|
2475
|
+
var { hideTryIt, hideSamples } = _a, props = tslib.__rest(_a, ["hideTryIt", "hideSamples"]);
|
|
2476
2476
|
const [requestData, setRequestData] = React__namespace.useState();
|
|
2477
2477
|
const customCodeSamples = extractCodeSamples(props.httpOperation);
|
|
2478
2478
|
return (React__namespace.createElement(mosaic.VStack, { spacing: 6 },
|
|
2479
2479
|
!hideTryIt && (React__namespace.createElement(mosaic.InvertTheme, null,
|
|
2480
2480
|
React__namespace.createElement(mosaic.Box, null,
|
|
2481
2481
|
React__namespace.createElement(TryIt, Object.assign({}, props, { onRequestChange: setRequestData }))))),
|
|
2482
|
-
requestData && React__namespace.createElement(RequestSamples, { request: requestData, customCodeSamples: customCodeSamples }),
|
|
2482
|
+
requestData && !hideSamples && React__namespace.createElement(RequestSamples, { request: requestData, customCodeSamples: customCodeSamples }),
|
|
2483
2483
|
React__namespace.createElement(ResponseExamples, Object.assign({}, props))));
|
|
2484
2484
|
};
|
|
2485
2485
|
|
|
@@ -2937,7 +2937,7 @@ const HttpOperationComponent = React__namespace.memo(({ className, data: unresol
|
|
|
2937
2937
|
throw new RangeError('unsupported node type');
|
|
2938
2938
|
}
|
|
2939
2939
|
const header = (React__namespace.createElement(OperationHeader, { id: data.id, method: data.method, path: path, noHeading: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.noHeading, hasBadges: hasBadges, name: prettyName, isDeprecated: isDeprecated, isInternal: isInternal, hideServerUrl: !isHttpOperation(data) }));
|
|
2940
|
-
const tryItPanel = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryItPanel) && (React__namespace.createElement(TryItWithRequestSamples, { httpOperation: data, responseMediaType: responseMediaType, responseStatusCode: responseStatusCode, requestBodyIndex: requestBodyIndex, hideTryIt: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryIt, tryItCredentialsPolicy: tryItCredentialsPolicy, mockUrl: mocking.hideMocking ? undefined : mocking.mockUrl, corsProxy: tryItCorsProxy }));
|
|
2940
|
+
const tryItPanel = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryItPanel) && (React__namespace.createElement(TryItWithRequestSamples, { httpOperation: data, responseMediaType: responseMediaType, responseStatusCode: responseStatusCode, requestBodyIndex: requestBodyIndex, hideTryIt: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryIt, hideSamples: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideSamples, tryItCredentialsPolicy: tryItCredentialsPolicy, mockUrl: mocking.hideMocking ? undefined : mocking.mockUrl, corsProxy: tryItCorsProxy }));
|
|
2941
2941
|
const descriptionChanged = nodeHasChanged === null || nodeHasChanged === void 0 ? void 0 : nodeHasChanged({ nodeId: data.id, attr: 'description' });
|
|
2942
2942
|
const description = (React__namespace.createElement(mosaic.VStack, { spacing: 10 },
|
|
2943
2943
|
data.description && (React__namespace.createElement(mosaic.Box, { pos: "relative" },
|
|
@@ -2967,9 +2967,9 @@ function MethodPathInner({ method, path, chosenServerUrl }) {
|
|
|
2967
2967
|
const isDark = mosaic.useThemeIsDark();
|
|
2968
2968
|
const fullUrl = `${chosenServerUrl}${path}`;
|
|
2969
2969
|
const pathElem = (React__namespace.createElement(mosaic.Flex, { overflowX: "hidden", fontSize: "lg", userSelect: "all" },
|
|
2970
|
-
React__namespace.createElement(mosaic.Box, { dir: "rtl",
|
|
2971
|
-
React__namespace.createElement(mosaic.Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl)
|
|
2972
|
-
|
|
2970
|
+
React__namespace.createElement(mosaic.Box, { dir: "rtl", textOverflow: "truncate", overflowX: "hidden" },
|
|
2971
|
+
React__namespace.createElement(mosaic.Box, { as: "span", color: "muted", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl),
|
|
2972
|
+
React__namespace.createElement(mosaic.Box, { as: "span", fontWeight: "semibold", flex: 1 }, path))));
|
|
2973
2973
|
return (React__namespace.createElement(mosaic.HStack, { spacing: 3, pl: 2.5, pr: 4, py: 2, bg: "canvas-50", rounded: "lg", fontFamily: "mono", display: "inline-flex", maxW: "full", title: fullUrl },
|
|
2974
2974
|
React__namespace.createElement(mosaic.Box, { py: 1, px: 2.5, rounded: "lg", bg: !isDark ? HttpMethodColors[method] : 'canvas-100', color: !isDark ? 'on-primary' : 'body', fontSize: "lg", fontWeight: "semibold", textTransform: "uppercase" }, method),
|
|
2975
2975
|
pathElem));
|
|
@@ -3010,8 +3010,12 @@ const AdditionalInfo = ({ id, termsOfService, contact, license }) => {
|
|
|
3010
3010
|
: (contact === null || contact === void 0 ? void 0 : contact.email)
|
|
3011
3011
|
? `[Contact ${contact.name || contact.email}](mailto:${contact.email})`
|
|
3012
3012
|
: '';
|
|
3013
|
-
const licenseUrl = (license === null || license === void 0 ? void 0 : license.url) || `https://spdx.org/licenses/${license === null || license === void 0 ? void 0 : license.identifier}.html
|
|
3014
|
-
const licenseLink = (license === null || license === void 0 ? void 0 : license.name) && licenseUrl
|
|
3013
|
+
const licenseUrl = (license === null || license === void 0 ? void 0 : license.url) || (license === null || license === void 0 ? void 0 : license.identifier) ? `https://spdx.org/licenses/${license === null || license === void 0 ? void 0 : license.identifier}.html` : undefined;
|
|
3014
|
+
const licenseLink = (license === null || license === void 0 ? void 0 : license.name) && licenseUrl
|
|
3015
|
+
? `[${license.name}](${licenseUrl})`
|
|
3016
|
+
: (license === null || license === void 0 ? void 0 : license.identifier) && licenseUrl
|
|
3017
|
+
? `[${license === null || license === void 0 ? void 0 : license.identifier}](${licenseUrl})`
|
|
3018
|
+
: undefined;
|
|
3015
3019
|
const tosLink = termsOfService ? `[Terms of Service](${termsOfService})` : '';
|
|
3016
3020
|
return contactLink || licenseLink || tosLink ? (React.createElement(mosaic.Panel, { rounded: true, isCollapsible: false, pos: "relative" },
|
|
3017
3021
|
React.createElement(mosaic.Panel.Titlebar, { bg: "canvas-300" },
|
package/index.mjs
CHANGED
|
@@ -2158,7 +2158,7 @@ const TryItResponse = ({ response }) => {
|
|
|
2158
2158
|
response.bodyText && responseType && ['json', 'xml', 'text'].includes(responseType) ? (React.createElement(ResponseCodeViewer, { language: "json", value: responseType && bodyFormat === 'preview'
|
|
2159
2159
|
? parseBody(response.bodyText, responseType)
|
|
2160
2160
|
: response.bodyText })) : response.blob && responseType === 'image' ? (React.createElement(Flex, { justifyContent: "center" },
|
|
2161
|
-
React.createElement(Image, { src: URL.createObjectURL(response.blob), alt: "response image" }))) : (React.createElement("p", null,
|
|
2161
|
+
React.createElement(Image, { src: URL.createObjectURL(response.blob), alt: "response image" }))) : !response.bodyText ? null : (React.createElement("p", null,
|
|
2162
2162
|
React.createElement(Box, { as: Icon, icon: ['fas', 'exclamation-circle'], mr: 2 }),
|
|
2163
2163
|
"No supported response body returned"))))));
|
|
2164
2164
|
};
|
|
@@ -2450,14 +2450,14 @@ const ResponseExamples = ({ httpOperation, responseMediaType, responseStatusCode
|
|
|
2450
2450
|
};
|
|
2451
2451
|
|
|
2452
2452
|
const TryItWithRequestSamples = (_a) => {
|
|
2453
|
-
var { hideTryIt } = _a, props = __rest(_a, ["hideTryIt"]);
|
|
2453
|
+
var { hideTryIt, hideSamples } = _a, props = __rest(_a, ["hideTryIt", "hideSamples"]);
|
|
2454
2454
|
const [requestData, setRequestData] = React.useState();
|
|
2455
2455
|
const customCodeSamples = extractCodeSamples(props.httpOperation);
|
|
2456
2456
|
return (React.createElement(VStack, { spacing: 6 },
|
|
2457
2457
|
!hideTryIt && (React.createElement(InvertTheme, null,
|
|
2458
2458
|
React.createElement(Box, null,
|
|
2459
2459
|
React.createElement(TryIt, Object.assign({}, props, { onRequestChange: setRequestData }))))),
|
|
2460
|
-
requestData && React.createElement(RequestSamples, { request: requestData, customCodeSamples: customCodeSamples }),
|
|
2460
|
+
requestData && !hideSamples && React.createElement(RequestSamples, { request: requestData, customCodeSamples: customCodeSamples }),
|
|
2461
2461
|
React.createElement(ResponseExamples, Object.assign({}, props))));
|
|
2462
2462
|
};
|
|
2463
2463
|
|
|
@@ -2915,7 +2915,7 @@ const HttpOperationComponent = React.memo(({ className, data: unresolvedData, la
|
|
|
2915
2915
|
throw new RangeError('unsupported node type');
|
|
2916
2916
|
}
|
|
2917
2917
|
const header = (React.createElement(OperationHeader, { id: data.id, method: data.method, path: path, noHeading: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.noHeading, hasBadges: hasBadges, name: prettyName, isDeprecated: isDeprecated, isInternal: isInternal, hideServerUrl: !isHttpOperation(data) }));
|
|
2918
|
-
const tryItPanel = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryItPanel) && (React.createElement(TryItWithRequestSamples, { httpOperation: data, responseMediaType: responseMediaType, responseStatusCode: responseStatusCode, requestBodyIndex: requestBodyIndex, hideTryIt: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryIt, tryItCredentialsPolicy: tryItCredentialsPolicy, mockUrl: mocking.hideMocking ? undefined : mocking.mockUrl, corsProxy: tryItCorsProxy }));
|
|
2918
|
+
const tryItPanel = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryItPanel) && (React.createElement(TryItWithRequestSamples, { httpOperation: data, responseMediaType: responseMediaType, responseStatusCode: responseStatusCode, requestBodyIndex: requestBodyIndex, hideTryIt: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideTryIt, hideSamples: layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideSamples, tryItCredentialsPolicy: tryItCredentialsPolicy, mockUrl: mocking.hideMocking ? undefined : mocking.mockUrl, corsProxy: tryItCorsProxy }));
|
|
2919
2919
|
const descriptionChanged = nodeHasChanged === null || nodeHasChanged === void 0 ? void 0 : nodeHasChanged({ nodeId: data.id, attr: 'description' });
|
|
2920
2920
|
const description = (React.createElement(VStack, { spacing: 10 },
|
|
2921
2921
|
data.description && (React.createElement(Box, { pos: "relative" },
|
|
@@ -2945,9 +2945,9 @@ function MethodPathInner({ method, path, chosenServerUrl }) {
|
|
|
2945
2945
|
const isDark = useThemeIsDark();
|
|
2946
2946
|
const fullUrl = `${chosenServerUrl}${path}`;
|
|
2947
2947
|
const pathElem = (React.createElement(Flex, { overflowX: "hidden", fontSize: "lg", userSelect: "all" },
|
|
2948
|
-
React.createElement(Box, { dir: "rtl",
|
|
2949
|
-
React.createElement(Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl)
|
|
2950
|
-
|
|
2948
|
+
React.createElement(Box, { dir: "rtl", textOverflow: "truncate", overflowX: "hidden" },
|
|
2949
|
+
React.createElement(Box, { as: "span", color: "muted", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl),
|
|
2950
|
+
React.createElement(Box, { as: "span", fontWeight: "semibold", flex: 1 }, path))));
|
|
2951
2951
|
return (React.createElement(HStack, { spacing: 3, pl: 2.5, pr: 4, py: 2, bg: "canvas-50", rounded: "lg", fontFamily: "mono", display: "inline-flex", maxW: "full", title: fullUrl },
|
|
2952
2952
|
React.createElement(Box, { py: 1, px: 2.5, rounded: "lg", bg: !isDark ? HttpMethodColors[method] : 'canvas-100', color: !isDark ? 'on-primary' : 'body', fontSize: "lg", fontWeight: "semibold", textTransform: "uppercase" }, method),
|
|
2953
2953
|
pathElem));
|
|
@@ -2988,8 +2988,12 @@ const AdditionalInfo = ({ id, termsOfService, contact, license }) => {
|
|
|
2988
2988
|
: (contact === null || contact === void 0 ? void 0 : contact.email)
|
|
2989
2989
|
? `[Contact ${contact.name || contact.email}](mailto:${contact.email})`
|
|
2990
2990
|
: '';
|
|
2991
|
-
const licenseUrl = (license === null || license === void 0 ? void 0 : license.url) || `https://spdx.org/licenses/${license === null || license === void 0 ? void 0 : license.identifier}.html
|
|
2992
|
-
const licenseLink = (license === null || license === void 0 ? void 0 : license.name) && licenseUrl
|
|
2991
|
+
const licenseUrl = (license === null || license === void 0 ? void 0 : license.url) || (license === null || license === void 0 ? void 0 : license.identifier) ? `https://spdx.org/licenses/${license === null || license === void 0 ? void 0 : license.identifier}.html` : undefined;
|
|
2992
|
+
const licenseLink = (license === null || license === void 0 ? void 0 : license.name) && licenseUrl
|
|
2993
|
+
? `[${license.name}](${licenseUrl})`
|
|
2994
|
+
: (license === null || license === void 0 ? void 0 : license.identifier) && licenseUrl
|
|
2995
|
+
? `[${license === null || license === void 0 ? void 0 : license.identifier}](${licenseUrl})`
|
|
2996
|
+
: undefined;
|
|
2993
2997
|
const tosLink = termsOfService ? `[Terms of Service](${termsOfService})` : '';
|
|
2994
2998
|
return contactLink || licenseLink || tosLink ? (React__default.createElement(Panel, { rounded: true, isCollapsible: false, pos: "relative" },
|
|
2995
2999
|
React__default.createElement(Panel.Titlebar, { bg: "canvas-300" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"web-components.min.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@stoplight/json-schema-sampler": "0.3.0",
|
|
31
31
|
"@stoplight/json-schema-tree": "^4.0.0",
|
|
32
32
|
"@stoplight/json-schema-viewer": "4.16.1",
|
|
33
|
-
"@stoplight/markdown-viewer": "^5.7.
|
|
34
|
-
"@stoplight/mosaic": "^1.53.
|
|
33
|
+
"@stoplight/markdown-viewer": "^5.7.1",
|
|
34
|
+
"@stoplight/mosaic": "^1.53.3",
|
|
35
35
|
"@stoplight/mosaic-code-editor": "^1.53.1",
|
|
36
36
|
"@stoplight/mosaic-code-viewer": "^1.53.1",
|
|
37
37
|
"@stoplight/path": "^1.3.2",
|