@stoplight/elements 7.13.9 → 7.13.11

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.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export type { APIProps } from './containers/API';
2
2
  export { API } from './containers/API';
3
+ export { useExportDocumentProps } from './hooks/useExportDocumentProps';
4
+ export { transformOasToServiceNode } from './utils/oas';
package/index.esm.js CHANGED
@@ -253,17 +253,19 @@ const Item = React.memo(({ item }) => {
253
253
  return (React.createElement(Box, { ref: scrollRef, w: "full", my: 2, border: true, borderColor: { default: isExpanded ? 'light' : 'transparent', hover: 'light' }, bg: { default: isExpanded ? 'code' : 'transparent', hover: 'code' } },
254
254
  React.createElement(Flex, { mx: "auto", alignItems: "center", cursor: "pointer", fontSize: "lg", p: 2, onClick: onClick, color: "current" },
255
255
  React.createElement(Box, { w: 24, textTransform: "uppercase", textAlign: "center", fontWeight: "semibold", border: true, rounded: true, px: 2, bg: "canvas", className: cn(`sl-mr-5 sl-text-base`, `sl-text-${color}`, `sl-border-${color}`) }, item.data.method || 'UNKNOWN'),
256
- React.createElement(Box, { flex: 1, fontWeight: "medium", wordBreak: "all" }, item.name),
256
+ React.createElement(Box, { flex: 1, fontWeight: "medium", wordBreak: "all" }, item.data.path),
257
257
  isDeprecated && React.createElement(DeprecatedBadge, null)),
258
- React.createElement(Collapse, { isOpen: isExpanded }, hideTryIt ? (React.createElement(Box, { as: ParsedDocs, layoutOptions: { noHeading: true, hideTryItPanel: true }, node: item, p: 4 })) : (React.createElement(Tabs, { appearance: "line" },
259
- React.createElement(TabList, null,
260
- React.createElement(Tab, null, "Docs"),
261
- React.createElement(Tab, null, "TryIt")),
262
- React.createElement(TabPanels, null,
263
- React.createElement(TabPanel, null,
264
- React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: true } })),
265
- React.createElement(TabPanel, null,
266
- React.createElement(TryItWithRequestSamples, { httpOperation: item.data, tryItCredentialsPolicy: tryItCredentialsPolicy, corsProxy: corsProxy }))))))));
258
+ React.createElement(Collapse, { isOpen: isExpanded },
259
+ React.createElement(Box, { flex: 1, p: 2, fontWeight: "medium", mx: "auto", fontSize: "xl" }, item.name),
260
+ hideTryIt ? (React.createElement(Box, { as: ParsedDocs, layoutOptions: { noHeading: true, hideTryItPanel: true }, node: item, p: 4 })) : (React.createElement(Tabs, { appearance: "line" },
261
+ React.createElement(TabList, null,
262
+ React.createElement(Tab, null, "Docs"),
263
+ React.createElement(Tab, null, "TryIt")),
264
+ React.createElement(TabPanels, null,
265
+ React.createElement(TabPanel, null,
266
+ React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: true } })),
267
+ React.createElement(TabPanel, null,
268
+ React.createElement(TryItWithRequestSamples, { httpOperation: item.data, tryItCredentialsPolicy: tryItCredentialsPolicy, corsProxy: corsProxy }))))))));
267
269
  });
268
270
  const Collapse = ({ isOpen, children }) => {
269
271
  if (!isOpen)
@@ -514,4 +516,4 @@ const APIImpl = props => {
514
516
  };
515
517
  const API = flow(withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider)(APIImpl);
516
518
 
517
- export { API };
519
+ export { API, transformOasToServiceNode, useExportDocumentProps };
package/index.js CHANGED
@@ -286,17 +286,19 @@ const Item = React__namespace.memo(({ item }) => {
286
286
  return (React__namespace.createElement(mosaic.Box, { ref: scrollRef, w: "full", my: 2, border: true, borderColor: { default: isExpanded ? 'light' : 'transparent', hover: 'light' }, bg: { default: isExpanded ? 'code' : 'transparent', hover: 'code' } },
287
287
  React__namespace.createElement(mosaic.Flex, { mx: "auto", alignItems: "center", cursor: "pointer", fontSize: "lg", p: 2, onClick: onClick, color: "current" },
288
288
  React__namespace.createElement(mosaic.Box, { w: 24, textTransform: "uppercase", textAlign: "center", fontWeight: "semibold", border: true, rounded: true, px: 2, bg: "canvas", className: cn__default["default"](`sl-mr-5 sl-text-base`, `sl-text-${color}`, `sl-border-${color}`) }, item.data.method || 'UNKNOWN'),
289
- React__namespace.createElement(mosaic.Box, { flex: 1, fontWeight: "medium", wordBreak: "all" }, item.name),
289
+ React__namespace.createElement(mosaic.Box, { flex: 1, fontWeight: "medium", wordBreak: "all" }, item.data.path),
290
290
  isDeprecated && React__namespace.createElement(elementsCore.DeprecatedBadge, null)),
291
- React__namespace.createElement(Collapse, { isOpen: isExpanded }, hideTryIt ? (React__namespace.createElement(mosaic.Box, { as: elementsCore.ParsedDocs, layoutOptions: { noHeading: true, hideTryItPanel: true }, node: item, p: 4 })) : (React__namespace.createElement(mosaic.Tabs, { appearance: "line" },
292
- React__namespace.createElement(mosaic.TabList, null,
293
- React__namespace.createElement(mosaic.Tab, null, "Docs"),
294
- React__namespace.createElement(mosaic.Tab, null, "TryIt")),
295
- React__namespace.createElement(mosaic.TabPanels, null,
296
- React__namespace.createElement(mosaic.TabPanel, null,
297
- React__namespace.createElement(elementsCore.ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: true } })),
298
- React__namespace.createElement(mosaic.TabPanel, null,
299
- React__namespace.createElement(elementsCore.TryItWithRequestSamples, { httpOperation: item.data, tryItCredentialsPolicy: tryItCredentialsPolicy, corsProxy: corsProxy }))))))));
291
+ React__namespace.createElement(Collapse, { isOpen: isExpanded },
292
+ React__namespace.createElement(mosaic.Box, { flex: 1, p: 2, fontWeight: "medium", mx: "auto", fontSize: "xl" }, item.name),
293
+ hideTryIt ? (React__namespace.createElement(mosaic.Box, { as: elementsCore.ParsedDocs, layoutOptions: { noHeading: true, hideTryItPanel: true }, node: item, p: 4 })) : (React__namespace.createElement(mosaic.Tabs, { appearance: "line" },
294
+ React__namespace.createElement(mosaic.TabList, null,
295
+ React__namespace.createElement(mosaic.Tab, null, "Docs"),
296
+ React__namespace.createElement(mosaic.Tab, null, "TryIt")),
297
+ React__namespace.createElement(mosaic.TabPanels, null,
298
+ React__namespace.createElement(mosaic.TabPanel, null,
299
+ React__namespace.createElement(elementsCore.ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: true } })),
300
+ React__namespace.createElement(mosaic.TabPanel, null,
301
+ React__namespace.createElement(elementsCore.TryItWithRequestSamples, { httpOperation: item.data, tryItCredentialsPolicy: tryItCredentialsPolicy, corsProxy: corsProxy }))))))));
300
302
  });
301
303
  const Collapse = ({ isOpen, children }) => {
302
304
  if (!isOpen)
@@ -548,3 +550,5 @@ const APIImpl = props => {
548
550
  const API = flow__default["default"](elementsCore.withRouter, elementsCore.withStyles, elementsCore.withPersistenceBoundary, elementsCore.withMosaicProvider, elementsCore.withQueryClientProvider)(APIImpl);
549
551
 
550
552
  exports.API = API;
553
+ exports.transformOasToServiceNode = transformOasToServiceNode;
554
+ exports.useExportDocumentProps = useExportDocumentProps;
package/index.mjs CHANGED
@@ -253,17 +253,19 @@ const Item = React.memo(({ item }) => {
253
253
  return (React.createElement(Box, { ref: scrollRef, w: "full", my: 2, border: true, borderColor: { default: isExpanded ? 'light' : 'transparent', hover: 'light' }, bg: { default: isExpanded ? 'code' : 'transparent', hover: 'code' } },
254
254
  React.createElement(Flex, { mx: "auto", alignItems: "center", cursor: "pointer", fontSize: "lg", p: 2, onClick: onClick, color: "current" },
255
255
  React.createElement(Box, { w: 24, textTransform: "uppercase", textAlign: "center", fontWeight: "semibold", border: true, rounded: true, px: 2, bg: "canvas", className: cn(`sl-mr-5 sl-text-base`, `sl-text-${color}`, `sl-border-${color}`) }, item.data.method || 'UNKNOWN'),
256
- React.createElement(Box, { flex: 1, fontWeight: "medium", wordBreak: "all" }, item.name),
256
+ React.createElement(Box, { flex: 1, fontWeight: "medium", wordBreak: "all" }, item.data.path),
257
257
  isDeprecated && React.createElement(DeprecatedBadge, null)),
258
- React.createElement(Collapse, { isOpen: isExpanded }, hideTryIt ? (React.createElement(Box, { as: ParsedDocs, layoutOptions: { noHeading: true, hideTryItPanel: true }, node: item, p: 4 })) : (React.createElement(Tabs, { appearance: "line" },
259
- React.createElement(TabList, null,
260
- React.createElement(Tab, null, "Docs"),
261
- React.createElement(Tab, null, "TryIt")),
262
- React.createElement(TabPanels, null,
263
- React.createElement(TabPanel, null,
264
- React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: true } })),
265
- React.createElement(TabPanel, null,
266
- React.createElement(TryItWithRequestSamples, { httpOperation: item.data, tryItCredentialsPolicy: tryItCredentialsPolicy, corsProxy: corsProxy }))))))));
258
+ React.createElement(Collapse, { isOpen: isExpanded },
259
+ React.createElement(Box, { flex: 1, p: 2, fontWeight: "medium", mx: "auto", fontSize: "xl" }, item.name),
260
+ hideTryIt ? (React.createElement(Box, { as: ParsedDocs, layoutOptions: { noHeading: true, hideTryItPanel: true }, node: item, p: 4 })) : (React.createElement(Tabs, { appearance: "line" },
261
+ React.createElement(TabList, null,
262
+ React.createElement(Tab, null, "Docs"),
263
+ React.createElement(Tab, null, "TryIt")),
264
+ React.createElement(TabPanels, null,
265
+ React.createElement(TabPanel, null,
266
+ React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: true } })),
267
+ React.createElement(TabPanel, null,
268
+ React.createElement(TryItWithRequestSamples, { httpOperation: item.data, tryItCredentialsPolicy: tryItCredentialsPolicy, corsProxy: corsProxy }))))))));
267
269
  });
268
270
  const Collapse = ({ isOpen, children }) => {
269
271
  if (!isOpen)
@@ -514,4 +516,4 @@ const APIImpl = props => {
514
516
  };
515
517
  const API = flow(withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider)(APIImpl);
516
518
 
517
- export { API };
519
+ export { API, transformOasToServiceNode, useExportDocumentProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements",
3
- "version": "7.13.9",
3
+ "version": "7.13.11",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",