@stoplight/elements-dev-portal 3.0.11 → 3.0.12

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 CHANGED
@@ -100,7 +100,7 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, maxRefDepth, tryItC
100
100
  },
101
101
  } },
102
102
  React.createElement(MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
103
- React.createElement(Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, disableProps: node === null || node === void 0 ? void 0 : node.disableProps, layoutOptions: {
103
+ React.createElement(Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, layoutOptions: {
104
104
  compact,
105
105
  hideTryIt: hideTryIt,
106
106
  hideTryItPanel: hideTryItPanel,
@@ -180,8 +180,14 @@ function getBundledUrl(url) {
180
180
  return bundledUrl.toString();
181
181
  }
182
182
  const getNodeUriParts = (uri) => {
183
+ console.log('getNodeUriParts uri-----', uri, 'typeof uri:', typeof uri);
184
+ if (!uri || typeof uri !== 'string')
185
+ return { fileUri: '', pointer: '' };
183
186
  const parts = uri.split(/(\.yaml|\.yml|\.json|\.md)/);
184
- if (parts.length === 1) {
187
+ if (parts === undefined || void 0) {
188
+ return { fileUri: '', pointer: '' };
189
+ }
190
+ if (!parts || parts.length === 1) {
185
191
  return { fileUri: '', pointer: parts[0] || '' };
186
192
  }
187
193
  const fileUri = `${parts[0] || ''}${parts[1] || ''}`;
@@ -294,7 +300,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
294
300
  React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
295
301
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
296
302
 
297
- const appVersion = '3.0.11';
303
+ const appVersion = '3.0.12';
298
304
 
299
305
  class ResponseError extends Error {
300
306
  constructor(message, responseCode) {
package/index.js CHANGED
@@ -120,7 +120,7 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, maxRefDepth, tryItC
120
120
  },
121
121
  } },
122
122
  React__namespace.createElement(elementsCore.MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
123
- React__namespace.createElement(elementsCore.Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, disableProps: node === null || node === void 0 ? void 0 : node.disableProps, layoutOptions: {
123
+ React__namespace.createElement(elementsCore.Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, layoutOptions: {
124
124
  compact,
125
125
  hideTryIt: hideTryIt,
126
126
  hideTryItPanel: hideTryItPanel,
@@ -200,8 +200,14 @@ function getBundledUrl(url) {
200
200
  return bundledUrl.toString();
201
201
  }
202
202
  const getNodeUriParts = (uri) => {
203
+ console.log('getNodeUriParts uri-----', uri, 'typeof uri:', typeof uri);
204
+ if (!uri || typeof uri !== 'string')
205
+ return { fileUri: '', pointer: '' };
203
206
  const parts = uri.split(/(\.yaml|\.yml|\.json|\.md)/);
204
- if (parts.length === 1) {
207
+ if (parts === undefined || void 0) {
208
+ return { fileUri: '', pointer: '' };
209
+ }
210
+ if (!parts || parts.length === 1) {
205
211
  return { fileUri: '', pointer: parts[0] || '' };
206
212
  }
207
213
  const fileUri = `${parts[0] || ''}${parts[1] || ''}`;
@@ -314,7 +320,7 @@ const UpgradeToStarter = () => (React.createElement(mosaic.Flex, { as: "a", href
314
320
  React.createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
315
321
  React.createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
316
322
 
317
- const appVersion = '3.0.11';
323
+ const appVersion = '3.0.12';
318
324
 
319
325
  class ResponseError extends Error {
320
326
  constructor(message, responseCode) {
package/index.mjs CHANGED
@@ -100,7 +100,7 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, maxRefDepth, tryItC
100
100
  },
101
101
  } },
102
102
  React.createElement(MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
103
- React.createElement(Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, disableProps: node === null || node === void 0 ? void 0 : node.disableProps, layoutOptions: {
103
+ React.createElement(Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, layoutOptions: {
104
104
  compact,
105
105
  hideTryIt: hideTryIt,
106
106
  hideTryItPanel: hideTryItPanel,
@@ -180,8 +180,14 @@ function getBundledUrl(url) {
180
180
  return bundledUrl.toString();
181
181
  }
182
182
  const getNodeUriParts = (uri) => {
183
+ console.log('getNodeUriParts uri-----', uri, 'typeof uri:', typeof uri);
184
+ if (!uri || typeof uri !== 'string')
185
+ return { fileUri: '', pointer: '' };
183
186
  const parts = uri.split(/(\.yaml|\.yml|\.json|\.md)/);
184
- if (parts.length === 1) {
187
+ if (parts === undefined || void 0) {
188
+ return { fileUri: '', pointer: '' };
189
+ }
190
+ if (!parts || parts.length === 1) {
185
191
  return { fileUri: '', pointer: parts[0] || '' };
186
192
  }
187
193
  const fileUri = `${parts[0] || ''}${parts[1] || ''}`;
@@ -294,7 +300,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
294
300
  React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
295
301
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
296
302
 
297
- const appVersion = '3.0.11';
303
+ const appVersion = '3.0.12';
298
304
 
299
305
  class ResponseError extends Error {
300
306
  constructor(message, responseCode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-dev-portal",
3
- "version": "3.0.11",
3
+ "version": "3.0.12",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "react-dom": ">=16.8"
27
27
  },
28
28
  "dependencies": {
29
- "@stoplight/elements-core": "~9.0.11",
29
+ "@stoplight/elements-core": "~9.0.12",
30
30
  "@stoplight/markdown-viewer": "^5.7.1",
31
31
  "@stoplight/mosaic": "^1.53.5",
32
32
  "@stoplight/path": "^1.3.2",
package/types.d.ts CHANGED
@@ -24,7 +24,6 @@ export declare type Node = NodeSummary & {
24
24
  };
25
25
  outbound_edges: NodeEdge[];
26
26
  inbound_edges: NodeEdge[];
27
- disableProps?: any;
28
27
  };
29
28
  export declare type NodeSummary = {
30
29
  id: string;
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const appVersion = "3.0.11";
1
+ export declare const appVersion = "3.0.12";