@stoplight/elements-core 7.13.7 → 7.13.9

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
@@ -495,21 +495,6 @@ function createNamedContext(name, defaultValue) {
495
495
  return context;
496
496
  }
497
497
 
498
- const ALPHANUMERIC = /[^A-Za-z0-9]+$/;
499
- function useChosenServerUrl(chosenServerUrl) {
500
- const match = ALPHANUMERIC.exec(chosenServerUrl);
501
- if (match === null) {
502
- return {
503
- leading: chosenServerUrl,
504
- trailing: null,
505
- };
506
- }
507
- return {
508
- leading: chosenServerUrl.substring(0, match.index),
509
- trailing: chosenServerUrl.substring(match.index),
510
- };
511
- }
512
-
513
498
  const getBreakpoints = (compact) => {
514
499
  if (!compact)
515
500
  return undefined;
@@ -2662,11 +2647,9 @@ function MethodPath({ method, path }) {
2662
2647
  function MethodPathInner({ method, path, chosenServerUrl }) {
2663
2648
  const isDark = useThemeIsDark();
2664
2649
  const fullUrl = `${chosenServerUrl}${path}`;
2665
- const { leading, trailing } = useChosenServerUrl(chosenServerUrl);
2666
2650
  const pathElem = (React.createElement(Flex, { overflowX: "hidden", fontSize: "lg", userSelect: "all" },
2667
2651
  React.createElement(Box, { dir: "rtl", color: "muted", textOverflow: "truncate", overflowX: "hidden" },
2668
- leading,
2669
- trailing !== null && (React.createElement(Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, trailing))),
2652
+ React.createElement(Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl)),
2670
2653
  React.createElement(Box, { fontWeight: "semibold", flex: 1 }, path)));
2671
2654
  return (React.createElement(HStack, { spacing: 3, pl: 2.5, pr: 4, py: 2, bg: "canvas-50", rounded: "lg", fontFamily: "mono", display: "inline-flex", maxW: "full", title: fullUrl },
2672
2655
  React.createElement(Box, { py: 1, px: 2.5, rounded: "lg", bg: !isDark ? HttpMethodColors[method] : 'canvas-100', color: !isDark ? 'on-primary' : 'body', fontSize: "lg", fontWeight: "semibold", textTransform: "uppercase" }, method),
package/index.js CHANGED
@@ -551,21 +551,6 @@ function createNamedContext(name, defaultValue) {
551
551
  return context;
552
552
  }
553
553
 
554
- const ALPHANUMERIC = /[^A-Za-z0-9]+$/;
555
- function useChosenServerUrl(chosenServerUrl) {
556
- const match = ALPHANUMERIC.exec(chosenServerUrl);
557
- if (match === null) {
558
- return {
559
- leading: chosenServerUrl,
560
- trailing: null,
561
- };
562
- }
563
- return {
564
- leading: chosenServerUrl.substring(0, match.index),
565
- trailing: chosenServerUrl.substring(match.index),
566
- };
567
- }
568
-
569
554
  const getBreakpoints = (compact) => {
570
555
  if (!compact)
571
556
  return undefined;
@@ -2718,11 +2703,9 @@ function MethodPath({ method, path }) {
2718
2703
  function MethodPathInner({ method, path, chosenServerUrl }) {
2719
2704
  const isDark = mosaic.useThemeIsDark();
2720
2705
  const fullUrl = `${chosenServerUrl}${path}`;
2721
- const { leading, trailing } = useChosenServerUrl(chosenServerUrl);
2722
2706
  const pathElem = (React__namespace.createElement(mosaic.Flex, { overflowX: "hidden", fontSize: "lg", userSelect: "all" },
2723
2707
  React__namespace.createElement(mosaic.Box, { dir: "rtl", color: "muted", textOverflow: "truncate", overflowX: "hidden" },
2724
- leading,
2725
- trailing !== null && (React__namespace.createElement(mosaic.Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, trailing))),
2708
+ React__namespace.createElement(mosaic.Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl)),
2726
2709
  React__namespace.createElement(mosaic.Box, { fontWeight: "semibold", flex: 1 }, path)));
2727
2710
  return (React__namespace.createElement(mosaic.HStack, { spacing: 3, pl: 2.5, pr: 4, py: 2, bg: "canvas-50", rounded: "lg", fontFamily: "mono", display: "inline-flex", maxW: "full", title: fullUrl },
2728
2711
  React__namespace.createElement(mosaic.Box, { py: 1, px: 2.5, rounded: "lg", bg: !isDark ? HttpMethodColors[method] : 'canvas-100', color: !isDark ? 'on-primary' : 'body', fontSize: "lg", fontWeight: "semibold", textTransform: "uppercase" }, method),
package/index.mjs CHANGED
@@ -495,21 +495,6 @@ function createNamedContext(name, defaultValue) {
495
495
  return context;
496
496
  }
497
497
 
498
- const ALPHANUMERIC = /[^A-Za-z0-9]+$/;
499
- function useChosenServerUrl(chosenServerUrl) {
500
- const match = ALPHANUMERIC.exec(chosenServerUrl);
501
- if (match === null) {
502
- return {
503
- leading: chosenServerUrl,
504
- trailing: null,
505
- };
506
- }
507
- return {
508
- leading: chosenServerUrl.substring(0, match.index),
509
- trailing: chosenServerUrl.substring(match.index),
510
- };
511
- }
512
-
513
498
  const getBreakpoints = (compact) => {
514
499
  if (!compact)
515
500
  return undefined;
@@ -2662,11 +2647,9 @@ function MethodPath({ method, path }) {
2662
2647
  function MethodPathInner({ method, path, chosenServerUrl }) {
2663
2648
  const isDark = useThemeIsDark();
2664
2649
  const fullUrl = `${chosenServerUrl}${path}`;
2665
- const { leading, trailing } = useChosenServerUrl(chosenServerUrl);
2666
2650
  const pathElem = (React.createElement(Flex, { overflowX: "hidden", fontSize: "lg", userSelect: "all" },
2667
2651
  React.createElement(Box, { dir: "rtl", color: "muted", textOverflow: "truncate", overflowX: "hidden" },
2668
- leading,
2669
- trailing !== null && (React.createElement(Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, trailing))),
2652
+ React.createElement(Box, { as: "span", dir: "ltr", style: { unicodeBidi: 'bidi-override' } }, chosenServerUrl)),
2670
2653
  React.createElement(Box, { fontWeight: "semibold", flex: 1 }, path)));
2671
2654
  return (React.createElement(HStack, { spacing: 3, pl: 2.5, pr: 4, py: 2, bg: "canvas-50", rounded: "lg", fontFamily: "mono", display: "inline-flex", maxW: "full", title: fullUrl },
2672
2655
  React.createElement(Box, { py: 1, px: 2.5, rounded: "lg", bg: !isDark ? HttpMethodColors[method] : 'canvas-100', color: !isDark ? 'on-primary' : 'body', fontSize: "lg", fontWeight: "semibold", textTransform: "uppercase" }, method),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-core",
3
- "version": "7.13.7",
3
+ "version": "7.13.9",
4
4
  "main": "./index.js",
5
5
  "sideEffects": [
6
6
  "web-components.min.js",
@@ -30,15 +30,15 @@
30
30
  "@stoplight/json-schema-sampler": "0.2.3",
31
31
  "@stoplight/json-schema-viewer": "^4.12.1",
32
32
  "@stoplight/markdown-viewer": "^5.6.0",
33
- "@stoplight/mosaic": "^1.44.3",
34
- "@stoplight/mosaic-code-editor": "^1.44.3",
35
- "@stoplight/mosaic-code-viewer": "^1.44.3",
33
+ "@stoplight/mosaic": "^1.44.4",
34
+ "@stoplight/mosaic-code-editor": "^1.44.4",
35
+ "@stoplight/mosaic-code-viewer": "^1.44.4",
36
36
  "@stoplight/path": "^1.3.2",
37
37
  "@stoplight/react-error-boundary": "^2.0.0",
38
38
  "@stoplight/types": "^14.0.0",
39
39
  "@stoplight/yaml": "^4.2.3",
40
40
  "classnames": "^2.2.6",
41
- "httpsnippet-lite": "^3.0.1",
41
+ "httpsnippet-lite": "^3.0.5",
42
42
  "jotai": "1.3.9",
43
43
  "json-schema": "^0.4.0",
44
44
  "lodash": "^4.17.19",
@@ -1,6 +0,0 @@
1
- declare type ChosenServerUrl = {
2
- leading: string;
3
- trailing: string | null;
4
- };
5
- export declare function useChosenServerUrl(chosenServerUrl: string): ChosenServerUrl;
6
- export {};