@stoplight/elements 7.5.12 → 7.5.15

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
@@ -8,7 +8,7 @@ import { useLocation, Redirect, Link } from 'react-router-dom';
8
8
  import defaults from 'lodash/defaults.js';
9
9
  import cn from 'classnames';
10
10
  import { safeStringify } from '@stoplight/yaml';
11
- import { saveAs } from 'file-saver';
11
+ import saver from 'file-saver';
12
12
  import { transformOas2Service, transformOas2Operation } from '@stoplight/http-spec/oas2';
13
13
  import { transformOas3Service, transformOas3Operation } from '@stoplight/http-spec/oas3';
14
14
  import { encodePointerFragment, pointerToPath } from '@stoplight/json';
@@ -455,7 +455,7 @@ function useExportDocumentProps({ originalDocument, bundledDocument, }) {
455
455
  const blob = new Blob([document], {
456
456
  type: `application/${type}`,
457
457
  });
458
- saveAs(blob, `document.${type}`);
458
+ saver.saveAs(blob, `document.${type}`);
459
459
  }, [isJsonDocument]);
460
460
  const exportOriginalDocument = React.useCallback(() => {
461
461
  const stringifiedDocument = typeof originalDocument === 'object' ? JSON.stringify(originalDocument, null, 2) : originalDocument || '';
package/index.js CHANGED
@@ -12,7 +12,7 @@ var reactRouterDom = require('react-router-dom');
12
12
  var defaults = require('lodash/defaults.js');
13
13
  var cn = require('classnames');
14
14
  var yaml = require('@stoplight/yaml');
15
- var fileSaver = require('file-saver');
15
+ var saver = require('file-saver');
16
16
  var oas2 = require('@stoplight/http-spec/oas2');
17
17
  var oas3 = require('@stoplight/http-spec/oas3');
18
18
  var json = require('@stoplight/json');
@@ -44,6 +44,7 @@ var flow__default = /*#__PURE__*/_interopDefaultLegacy(flow);
44
44
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
45
45
  var defaults__default = /*#__PURE__*/_interopDefaultLegacy(defaults);
46
46
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
47
+ var saver__default = /*#__PURE__*/_interopDefaultLegacy(saver);
47
48
  var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
48
49
  var isObject__default = /*#__PURE__*/_interopDefaultLegacy(isObject);
49
50
  var last__default = /*#__PURE__*/_interopDefaultLegacy(last);
@@ -487,7 +488,7 @@ function useExportDocumentProps({ originalDocument, bundledDocument, }) {
487
488
  const blob = new Blob([document], {
488
489
  type: `application/${type}`,
489
490
  });
490
- fileSaver.saveAs(blob, `document.${type}`);
491
+ saver__default["default"].saveAs(blob, `document.${type}`);
491
492
  }, [isJsonDocument]);
492
493
  const exportOriginalDocument = React__namespace.useCallback(() => {
493
494
  const stringifiedDocument = typeof originalDocument === 'object' ? JSON.stringify(originalDocument, null, 2) : originalDocument || '';
package/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { useLocation, Redirect, Link } from 'react-router-dom';
8
8
  import defaults from 'lodash/defaults.js';
9
9
  import cn from 'classnames';
10
10
  import { safeStringify } from '@stoplight/yaml';
11
- import { saveAs } from 'file-saver';
11
+ import saver from 'file-saver';
12
12
  import { transformOas2Service, transformOas2Operation } from '@stoplight/http-spec/oas2';
13
13
  import { transformOas3Service, transformOas3Operation } from '@stoplight/http-spec/oas3';
14
14
  import { encodePointerFragment, pointerToPath } from '@stoplight/json';
@@ -455,7 +455,7 @@ function useExportDocumentProps({ originalDocument, bundledDocument, }) {
455
455
  const blob = new Blob([document], {
456
456
  type: `application/${type}`,
457
457
  });
458
- saveAs(blob, `document.${type}`);
458
+ saver.saveAs(blob, `document.${type}`);
459
459
  }, [isJsonDocument]);
460
460
  const exportOriginalDocument = React.useCallback(() => {
461
461
  const stringifiedDocument = typeof originalDocument === 'object' ? JSON.stringify(originalDocument, null, 2) : originalDocument || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements",
3
- "version": "7.5.12",
3
+ "version": "7.5.15",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "engines": {
22
- "node": ">=12"
22
+ "node": ">=14.13"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=16.8",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@fortawesome/free-solid-svg-icons": "^5.14.0",
30
- "@stoplight/elements-core": "~7.5.12",
31
- "@stoplight/http-spec": "^4.3.1",
32
- "@stoplight/json": "^3.10.0",
33
- "@stoplight/mosaic": "^1.15.4",
34
- "@stoplight/types": "^12.0.0",
30
+ "@stoplight/elements-core": "~7.5.15",
31
+ "@stoplight/http-spec": "^5.1.0",
32
+ "@stoplight/json": "^3.18.0",
33
+ "@stoplight/mosaic": "^1.16.2",
34
+ "@stoplight/types": "^13.0.0",
35
35
  "@stoplight/yaml": "^4.2.2",
36
36
  "classnames": "^2.2.6",
37
37
  "file-saver": "^2.0.5",
@@ -39,6 +39,7 @@
39
39
  "react-query": "^3.15.2",
40
40
  "react-router-dom": "^5.2.0"
41
41
  },
42
+ "type": "commonjs",
42
43
  "exports": {
43
44
  "./styles.min.css": "./styles.min.css",
44
45
  ".": {
@@ -47,6 +48,5 @@
47
48
  }
48
49
  },
49
50
  "typings": "index.d.ts",
50
- "type": "commonjs",
51
51
  "module": "./index.esm.js"
52
52
  }