@stoplight/elements 7.4.0 → 7.5.2

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
@@ -1,4 +1,4 @@
1
- import { isHttpOperation, isHttpService, Logo, TableOfContents, PoweredByLink, SidebarLayout, ParsedDocs, HttpMethodColors, DeprecatedBadge, TryItWithRequestSamples, Docs, withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider, useParsedValue, useBundleRefsIntoDocument, NonIdealState, InlineRefResolverProvider } from '@stoplight/elements-core';
1
+ import { isHttpOperation, isHttpService, Logo, TableOfContents, PoweredByLink, SidebarLayout, ParsedDocs, HttpMethodColors, DeprecatedBadge, TryItWithRequestSamples, Docs, slugify, withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider, useParsedValue, useBundleRefsIntoDocument, NonIdealState, InlineRefResolverProvider } from '@stoplight/elements-core';
2
2
  import { Flex, Heading, Box, Icon, Tabs, TabList, Tab, TabPanels, TabPanel } from '@stoplight/mosaic';
3
3
  import flow from 'lodash/flow.js';
4
4
  import * as React from 'react';
@@ -428,13 +428,6 @@ function computeChildNodes(document, data, map, transformer, parentUri = '') {
428
428
  }
429
429
  return nodes;
430
430
  }
431
- function slugify(name) {
432
- return name
433
- .replace(/\/|{|}|\s/g, '-')
434
- .replace(/-{2,}/, '-')
435
- .replace(/^-/, '')
436
- .replace(/-$/, '');
437
- }
438
431
  function findMapMatch(key, map) {
439
432
  var _a;
440
433
  if (typeof key === 'number')
package/index.js CHANGED
@@ -432,7 +432,7 @@ function computeChildNodes(document, data, map, transformer, parentUri = '') {
432
432
  parsedUri = `/operations/${operationDocument.iid}`;
433
433
  }
434
434
  else {
435
- parsedUri = uri.replace(encodedPath, slugify(path));
435
+ parsedUri = uri.replace(encodedPath, elementsCore.slugify(path));
436
436
  }
437
437
  nodes.push({
438
438
  type: types.NodeType.HttpOperation,
@@ -460,13 +460,6 @@ function computeChildNodes(document, data, map, transformer, parentUri = '') {
460
460
  }
461
461
  return nodes;
462
462
  }
463
- function slugify(name) {
464
- return name
465
- .replace(/\/|{|}|\s/g, '-')
466
- .replace(/-{2,}/, '-')
467
- .replace(/^-/, '')
468
- .replace(/-$/, '');
469
- }
470
463
  function findMapMatch(key, map) {
471
464
  var _a;
472
465
  if (typeof key === 'number')
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { isHttpOperation, isHttpService, Logo, TableOfContents, PoweredByLink, SidebarLayout, ParsedDocs, HttpMethodColors, DeprecatedBadge, TryItWithRequestSamples, Docs, withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider, useParsedValue, useBundleRefsIntoDocument, NonIdealState, InlineRefResolverProvider } from '@stoplight/elements-core';
1
+ import { isHttpOperation, isHttpService, Logo, TableOfContents, PoweredByLink, SidebarLayout, ParsedDocs, HttpMethodColors, DeprecatedBadge, TryItWithRequestSamples, Docs, slugify, withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider, useParsedValue, useBundleRefsIntoDocument, NonIdealState, InlineRefResolverProvider } from '@stoplight/elements-core';
2
2
  import { Flex, Heading, Box, Icon, Tabs, TabList, Tab, TabPanels, TabPanel } from '@stoplight/mosaic';
3
3
  import flow from 'lodash/flow.js';
4
4
  import * as React from 'react';
@@ -428,13 +428,6 @@ function computeChildNodes(document, data, map, transformer, parentUri = '') {
428
428
  }
429
429
  return nodes;
430
430
  }
431
- function slugify(name) {
432
- return name
433
- .replace(/\/|{|}|\s/g, '-')
434
- .replace(/-{2,}/, '-')
435
- .replace(/^-/, '')
436
- .replace(/-$/, '');
437
- }
438
431
  function findMapMatch(key, map) {
439
432
  var _a;
440
433
  if (typeof key === 'number')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements",
3
- "version": "7.4.0",
3
+ "version": "7.5.2",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@fortawesome/free-solid-svg-icons": "^5.14.0",
30
- "@stoplight/elements-core": "~7.4.0",
30
+ "@stoplight/elements-core": "~7.5.2",
31
31
  "@stoplight/http-spec": "^4.2.2",
32
32
  "@stoplight/json": "^3.10.0",
33
- "@stoplight/mosaic": "^1.12.4",
33
+ "@stoplight/mosaic": "^1.14.0",
34
34
  "@stoplight/types": "^12.0.0",
35
35
  "@stoplight/yaml": "^4.2.2",
36
36
  "classnames": "^2.2.6",