@stoplight/elements-core 9.0.13-beta-0.2 → 9.0.13-beta-0.3
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/index.esm.js +9 -12
- package/index.js +9 -12
- package/index.mjs +9 -12
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -2765,11 +2765,16 @@ function dereference(node, root, visited = new WeakSet(), depth = 0, maxDepth =
|
|
|
2765
2765
|
return node;
|
|
2766
2766
|
if (node.$ref || node['x-iata-$ref']) {
|
|
2767
2767
|
let refPath = node.$ref || node['x-iata-$ref'];
|
|
2768
|
-
|
|
2769
|
-
|
|
2768
|
+
try {
|
|
2769
|
+
if (refPath.includes('#/%24defs')) {
|
|
2770
|
+
refPath = refPath.replace('#/%24defs', '$defs');
|
|
2771
|
+
}
|
|
2772
|
+
else {
|
|
2773
|
+
refPath = refPath.replace('__bundled__', 'definitions');
|
|
2774
|
+
}
|
|
2770
2775
|
}
|
|
2771
|
-
|
|
2772
|
-
|
|
2776
|
+
catch (error) {
|
|
2777
|
+
return node;
|
|
2773
2778
|
}
|
|
2774
2779
|
if (visited.has(node))
|
|
2775
2780
|
return { circular: true, $ref: refPath, title: node.title, type: 'any', description: node.description };
|
|
@@ -2859,8 +2864,6 @@ const LazySchemaTreePreviewer = ({ schema, root = schema, title, level = 1, path
|
|
|
2859
2864
|
const [showSchemaDropdown, setShowSchemaDropdown] = useState(false);
|
|
2860
2865
|
const [isHoveringSelector, setIsHoveringSelector] = useState(false);
|
|
2861
2866
|
const isRoot = level === 1 && (title === undefined || path === '');
|
|
2862
|
-
if (isRoot)
|
|
2863
|
-
console.log('LazySchemaTreePreviewer 9.0.13-beta-0.2----------', schema);
|
|
2864
2867
|
useEffect(() => {
|
|
2865
2868
|
setSelectedSchemaIndex(0);
|
|
2866
2869
|
}, [schema === null || schema === void 0 ? void 0 : schema.anyOf, schema === null || schema === void 0 ? void 0 : schema.oneOf]);
|
|
@@ -3129,8 +3132,6 @@ const Body = ({ body, onChange, isHttpWebhookOperation = false, disableProps })
|
|
|
3129
3132
|
return absolutePathsToHide;
|
|
3130
3133
|
};
|
|
3131
3134
|
const shouldUseLazySchema = disableProps === null || disableProps === void 0 ? void 0 : disableProps.some(entry => entry.isComplex === true);
|
|
3132
|
-
console.log('!!!!! shouldUseLazySchema body!!!!', shouldUseLazySchema);
|
|
3133
|
-
console.log("Responses 9.0.13-beta-0.2----", disableProps);
|
|
3134
3135
|
return (React.createElement(VStack, { spacing: 6 },
|
|
3135
3136
|
React.createElement(SectionSubtitle, { title: "Body", id: "request-body" }, contents.length > 0 && (React.createElement(Flex, { flex: 1, justify: "end" },
|
|
3136
3137
|
React.createElement(Select, { "aria-label": "Request Body Content Type", value: String(chosenContent), onChange: value => setChosenContent(parseInt(String(value), 10)), options: contents.map((content, index) => ({ label: content.mediaType, value: index })), size: "sm" })))),
|
|
@@ -3335,7 +3336,6 @@ const Response = ({ response, onMediaTypeChange, disableProps, statusCode }) =>
|
|
|
3335
3336
|
return absolutePathsToHide;
|
|
3336
3337
|
};
|
|
3337
3338
|
const shouldUseLazySchema = (_b = (statusCode && ((_a = disableProps === null || disableProps === void 0 ? void 0 : disableProps[statusCode]) === null || _a === void 0 ? void 0 : _a.some(entry => entry.isComplex)))) !== null && _b !== void 0 ? _b : false;
|
|
3338
|
-
console.log("Responses 9.0.13-beta-0.2----", disableProps);
|
|
3339
3339
|
return (React.createElement(VStack, { spacing: 8, pt: 8 },
|
|
3340
3340
|
description && (React.createElement(Box, { pos: "relative" },
|
|
3341
3341
|
React.createElement(MarkdownViewer, { markdown: description }),
|
|
@@ -3409,7 +3409,6 @@ const HttpOperationComponent = React.memo(({ className, data: unresolvedData, la
|
|
|
3409
3409
|
const [requestBodyIndex, setTextRequestBodyIndex] = React.useState(0);
|
|
3410
3410
|
const prettyName = (data.summary || data.iid || '').trim();
|
|
3411
3411
|
const hasBadges = isDeprecated || isInternal;
|
|
3412
|
-
console.log("HttpOperationComponent 9.0.13-beta-0.2----", disableProps);
|
|
3413
3412
|
let path;
|
|
3414
3413
|
if (isHttpOperation(data)) {
|
|
3415
3414
|
path = data.path;
|
|
@@ -3694,7 +3693,6 @@ const ModelComponent = ({ data: unresolvedData, className, nodeTitle, layoutOpti
|
|
|
3694
3693
|
const isDeprecated = !!data['deprecated'];
|
|
3695
3694
|
const isInternal = !!data['x-internal'];
|
|
3696
3695
|
const shouldDisplayHeader = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.noHeading) && (title !== undefined || (exportProps && !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideExport)));
|
|
3697
|
-
console.log("ModelComponent 9.0.13-beta-0.2----", disableProps);
|
|
3698
3696
|
const titleChanged = nodeHasChanged === null || nodeHasChanged === void 0 ? void 0 : nodeHasChanged({ nodeId, attr: ['title', 'internal'] });
|
|
3699
3697
|
const header = (shouldDisplayHeader || isInternal || isDeprecated) && (React.createElement(Flex, { justifyContent: "between", alignItems: "center" },
|
|
3700
3698
|
React.createElement(Box, { pos: "relative" },
|
|
@@ -3787,7 +3785,6 @@ const getTryItVisibility = (disableProps) => {
|
|
|
3787
3785
|
const ParsedDocs = (_a) => {
|
|
3788
3786
|
var { node, nodeUnsupported, disableProps } = _a, commonProps = __rest(_a, ["node", "nodeUnsupported", "disableProps"]);
|
|
3789
3787
|
const { hideOperationTryIt, hideModelTryIt } = getTryItVisibility(disableProps);
|
|
3790
|
-
console.log("Parsed Docs 9.0.13-beta-0.2----", disableProps);
|
|
3791
3788
|
switch (node.type) {
|
|
3792
3789
|
case 'article':
|
|
3793
3790
|
return React.createElement(Article, Object.assign({ data: node.data }, commonProps));
|
package/index.js
CHANGED
|
@@ -2787,11 +2787,16 @@ function dereference(node, root, visited = new WeakSet(), depth = 0, maxDepth =
|
|
|
2787
2787
|
return node;
|
|
2788
2788
|
if (node.$ref || node['x-iata-$ref']) {
|
|
2789
2789
|
let refPath = node.$ref || node['x-iata-$ref'];
|
|
2790
|
-
|
|
2791
|
-
|
|
2790
|
+
try {
|
|
2791
|
+
if (refPath.includes('#/%24defs')) {
|
|
2792
|
+
refPath = refPath.replace('#/%24defs', '$defs');
|
|
2793
|
+
}
|
|
2794
|
+
else {
|
|
2795
|
+
refPath = refPath.replace('__bundled__', 'definitions');
|
|
2796
|
+
}
|
|
2792
2797
|
}
|
|
2793
|
-
|
|
2794
|
-
|
|
2798
|
+
catch (error) {
|
|
2799
|
+
return node;
|
|
2795
2800
|
}
|
|
2796
2801
|
if (visited.has(node))
|
|
2797
2802
|
return { circular: true, $ref: refPath, title: node.title, type: 'any', description: node.description };
|
|
@@ -2881,8 +2886,6 @@ const LazySchemaTreePreviewer = ({ schema, root = schema, title, level = 1, path
|
|
|
2881
2886
|
const [showSchemaDropdown, setShowSchemaDropdown] = React.useState(false);
|
|
2882
2887
|
const [isHoveringSelector, setIsHoveringSelector] = React.useState(false);
|
|
2883
2888
|
const isRoot = level === 1 && (title === undefined || path === '');
|
|
2884
|
-
if (isRoot)
|
|
2885
|
-
console.log('LazySchemaTreePreviewer 9.0.13-beta-0.2----------', schema);
|
|
2886
2889
|
React.useEffect(() => {
|
|
2887
2890
|
setSelectedSchemaIndex(0);
|
|
2888
2891
|
}, [schema === null || schema === void 0 ? void 0 : schema.anyOf, schema === null || schema === void 0 ? void 0 : schema.oneOf]);
|
|
@@ -3151,8 +3154,6 @@ const Body = ({ body, onChange, isHttpWebhookOperation = false, disableProps })
|
|
|
3151
3154
|
return absolutePathsToHide;
|
|
3152
3155
|
};
|
|
3153
3156
|
const shouldUseLazySchema = disableProps === null || disableProps === void 0 ? void 0 : disableProps.some(entry => entry.isComplex === true);
|
|
3154
|
-
console.log('!!!!! shouldUseLazySchema body!!!!', shouldUseLazySchema);
|
|
3155
|
-
console.log("Responses 9.0.13-beta-0.2----", disableProps);
|
|
3156
3157
|
return (React__namespace.createElement(mosaic.VStack, { spacing: 6 },
|
|
3157
3158
|
React__namespace.createElement(SectionSubtitle, { title: "Body", id: "request-body" }, contents.length > 0 && (React__namespace.createElement(mosaic.Flex, { flex: 1, justify: "end" },
|
|
3158
3159
|
React__namespace.createElement(mosaic.Select, { "aria-label": "Request Body Content Type", value: String(chosenContent), onChange: value => setChosenContent(parseInt(String(value), 10)), options: contents.map((content, index) => ({ label: content.mediaType, value: index })), size: "sm" })))),
|
|
@@ -3357,7 +3358,6 @@ const Response = ({ response, onMediaTypeChange, disableProps, statusCode }) =>
|
|
|
3357
3358
|
return absolutePathsToHide;
|
|
3358
3359
|
};
|
|
3359
3360
|
const shouldUseLazySchema = (_b = (statusCode && ((_a = disableProps === null || disableProps === void 0 ? void 0 : disableProps[statusCode]) === null || _a === void 0 ? void 0 : _a.some(entry => entry.isComplex)))) !== null && _b !== void 0 ? _b : false;
|
|
3360
|
-
console.log("Responses 9.0.13-beta-0.2----", disableProps);
|
|
3361
3361
|
return (React__namespace.createElement(mosaic.VStack, { spacing: 8, pt: 8 },
|
|
3362
3362
|
description && (React__namespace.createElement(mosaic.Box, { pos: "relative" },
|
|
3363
3363
|
React__namespace.createElement(MarkdownViewer, { markdown: description }),
|
|
@@ -3431,7 +3431,6 @@ const HttpOperationComponent = React__namespace.memo(({ className, data: unresol
|
|
|
3431
3431
|
const [requestBodyIndex, setTextRequestBodyIndex] = React__namespace.useState(0);
|
|
3432
3432
|
const prettyName = (data.summary || data.iid || '').trim();
|
|
3433
3433
|
const hasBadges = isDeprecated || isInternal;
|
|
3434
|
-
console.log("HttpOperationComponent 9.0.13-beta-0.2----", disableProps);
|
|
3435
3434
|
let path;
|
|
3436
3435
|
if (isHttpOperation(data)) {
|
|
3437
3436
|
path = data.path;
|
|
@@ -3716,7 +3715,6 @@ const ModelComponent = ({ data: unresolvedData, className, nodeTitle, layoutOpti
|
|
|
3716
3715
|
const isDeprecated = !!data['deprecated'];
|
|
3717
3716
|
const isInternal = !!data['x-internal'];
|
|
3718
3717
|
const shouldDisplayHeader = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.noHeading) && (title !== undefined || (exportProps && !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideExport)));
|
|
3719
|
-
console.log("ModelComponent 9.0.13-beta-0.2----", disableProps);
|
|
3720
3718
|
const titleChanged = nodeHasChanged === null || nodeHasChanged === void 0 ? void 0 : nodeHasChanged({ nodeId, attr: ['title', 'internal'] });
|
|
3721
3719
|
const header = (shouldDisplayHeader || isInternal || isDeprecated) && (React__namespace.createElement(mosaic.Flex, { justifyContent: "between", alignItems: "center" },
|
|
3722
3720
|
React__namespace.createElement(mosaic.Box, { pos: "relative" },
|
|
@@ -3809,7 +3807,6 @@ const getTryItVisibility = (disableProps) => {
|
|
|
3809
3807
|
const ParsedDocs = (_a) => {
|
|
3810
3808
|
var { node, nodeUnsupported, disableProps } = _a, commonProps = tslib.__rest(_a, ["node", "nodeUnsupported", "disableProps"]);
|
|
3811
3809
|
const { hideOperationTryIt, hideModelTryIt } = getTryItVisibility(disableProps);
|
|
3812
|
-
console.log("Parsed Docs 9.0.13-beta-0.2----", disableProps);
|
|
3813
3810
|
switch (node.type) {
|
|
3814
3811
|
case 'article':
|
|
3815
3812
|
return React__namespace.createElement(Article, Object.assign({ data: node.data }, commonProps));
|
package/index.mjs
CHANGED
|
@@ -2765,11 +2765,16 @@ function dereference(node, root, visited = new WeakSet(), depth = 0, maxDepth =
|
|
|
2765
2765
|
return node;
|
|
2766
2766
|
if (node.$ref || node['x-iata-$ref']) {
|
|
2767
2767
|
let refPath = node.$ref || node['x-iata-$ref'];
|
|
2768
|
-
|
|
2769
|
-
|
|
2768
|
+
try {
|
|
2769
|
+
if (refPath.includes('#/%24defs')) {
|
|
2770
|
+
refPath = refPath.replace('#/%24defs', '$defs');
|
|
2771
|
+
}
|
|
2772
|
+
else {
|
|
2773
|
+
refPath = refPath.replace('__bundled__', 'definitions');
|
|
2774
|
+
}
|
|
2770
2775
|
}
|
|
2771
|
-
|
|
2772
|
-
|
|
2776
|
+
catch (error) {
|
|
2777
|
+
return node;
|
|
2773
2778
|
}
|
|
2774
2779
|
if (visited.has(node))
|
|
2775
2780
|
return { circular: true, $ref: refPath, title: node.title, type: 'any', description: node.description };
|
|
@@ -2859,8 +2864,6 @@ const LazySchemaTreePreviewer = ({ schema, root = schema, title, level = 1, path
|
|
|
2859
2864
|
const [showSchemaDropdown, setShowSchemaDropdown] = useState(false);
|
|
2860
2865
|
const [isHoveringSelector, setIsHoveringSelector] = useState(false);
|
|
2861
2866
|
const isRoot = level === 1 && (title === undefined || path === '');
|
|
2862
|
-
if (isRoot)
|
|
2863
|
-
console.log('LazySchemaTreePreviewer 9.0.13-beta-0.2----------', schema);
|
|
2864
2867
|
useEffect(() => {
|
|
2865
2868
|
setSelectedSchemaIndex(0);
|
|
2866
2869
|
}, [schema === null || schema === void 0 ? void 0 : schema.anyOf, schema === null || schema === void 0 ? void 0 : schema.oneOf]);
|
|
@@ -3129,8 +3132,6 @@ const Body = ({ body, onChange, isHttpWebhookOperation = false, disableProps })
|
|
|
3129
3132
|
return absolutePathsToHide;
|
|
3130
3133
|
};
|
|
3131
3134
|
const shouldUseLazySchema = disableProps === null || disableProps === void 0 ? void 0 : disableProps.some(entry => entry.isComplex === true);
|
|
3132
|
-
console.log('!!!!! shouldUseLazySchema body!!!!', shouldUseLazySchema);
|
|
3133
|
-
console.log("Responses 9.0.13-beta-0.2----", disableProps);
|
|
3134
3135
|
return (React.createElement(VStack, { spacing: 6 },
|
|
3135
3136
|
React.createElement(SectionSubtitle, { title: "Body", id: "request-body" }, contents.length > 0 && (React.createElement(Flex, { flex: 1, justify: "end" },
|
|
3136
3137
|
React.createElement(Select, { "aria-label": "Request Body Content Type", value: String(chosenContent), onChange: value => setChosenContent(parseInt(String(value), 10)), options: contents.map((content, index) => ({ label: content.mediaType, value: index })), size: "sm" })))),
|
|
@@ -3335,7 +3336,6 @@ const Response = ({ response, onMediaTypeChange, disableProps, statusCode }) =>
|
|
|
3335
3336
|
return absolutePathsToHide;
|
|
3336
3337
|
};
|
|
3337
3338
|
const shouldUseLazySchema = (_b = (statusCode && ((_a = disableProps === null || disableProps === void 0 ? void 0 : disableProps[statusCode]) === null || _a === void 0 ? void 0 : _a.some(entry => entry.isComplex)))) !== null && _b !== void 0 ? _b : false;
|
|
3338
|
-
console.log("Responses 9.0.13-beta-0.2----", disableProps);
|
|
3339
3339
|
return (React.createElement(VStack, { spacing: 8, pt: 8 },
|
|
3340
3340
|
description && (React.createElement(Box, { pos: "relative" },
|
|
3341
3341
|
React.createElement(MarkdownViewer, { markdown: description }),
|
|
@@ -3409,7 +3409,6 @@ const HttpOperationComponent = React.memo(({ className, data: unresolvedData, la
|
|
|
3409
3409
|
const [requestBodyIndex, setTextRequestBodyIndex] = React.useState(0);
|
|
3410
3410
|
const prettyName = (data.summary || data.iid || '').trim();
|
|
3411
3411
|
const hasBadges = isDeprecated || isInternal;
|
|
3412
|
-
console.log("HttpOperationComponent 9.0.13-beta-0.2----", disableProps);
|
|
3413
3412
|
let path;
|
|
3414
3413
|
if (isHttpOperation(data)) {
|
|
3415
3414
|
path = data.path;
|
|
@@ -3694,7 +3693,6 @@ const ModelComponent = ({ data: unresolvedData, className, nodeTitle, layoutOpti
|
|
|
3694
3693
|
const isDeprecated = !!data['deprecated'];
|
|
3695
3694
|
const isInternal = !!data['x-internal'];
|
|
3696
3695
|
const shouldDisplayHeader = !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.noHeading) && (title !== undefined || (exportProps && !(layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideExport)));
|
|
3697
|
-
console.log("ModelComponent 9.0.13-beta-0.2----", disableProps);
|
|
3698
3696
|
const titleChanged = nodeHasChanged === null || nodeHasChanged === void 0 ? void 0 : nodeHasChanged({ nodeId, attr: ['title', 'internal'] });
|
|
3699
3697
|
const header = (shouldDisplayHeader || isInternal || isDeprecated) && (React.createElement(Flex, { justifyContent: "between", alignItems: "center" },
|
|
3700
3698
|
React.createElement(Box, { pos: "relative" },
|
|
@@ -3787,7 +3785,6 @@ const getTryItVisibility = (disableProps) => {
|
|
|
3787
3785
|
const ParsedDocs = (_a) => {
|
|
3788
3786
|
var { node, nodeUnsupported, disableProps } = _a, commonProps = __rest(_a, ["node", "nodeUnsupported", "disableProps"]);
|
|
3789
3787
|
const { hideOperationTryIt, hideModelTryIt } = getTryItVisibility(disableProps);
|
|
3790
|
-
console.log("Parsed Docs 9.0.13-beta-0.2----", disableProps);
|
|
3791
3788
|
switch (node.type) {
|
|
3792
3789
|
case 'article':
|
|
3793
3790
|
return React.createElement(Article, Object.assign({ data: node.data }, commonProps));
|