@stoplight/elements-dev-portal 1.9.6 → 1.9.7

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,7 +1,7 @@
1
1
  import { Menu, FieldButton, Modal, Input, Box, Icon, ListBox, ListBoxItem, Flex, VStack, Heading } from '@stoplight/mosaic';
2
2
  import * as React from 'react';
3
3
  import React__default, { useRef, useEffect, useMemo, useCallback, useState } from 'react';
4
- import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, NodeTypeIconDefs, NodeTypeColors, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, findFirstNode, ReactRouterMarkdownLink, SidebarLayout } from '@stoplight/elements-core';
4
+ import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, NodeTypeIconDefs, NodeTypeColors, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, RouterTypeContext, findFirstNode, ReactRouterMarkdownLink, SidebarLayout } from '@stoplight/elements-core';
5
5
  import { resolve, dirname } from '@stoplight/path';
6
6
  import { NodeType } from '@stoplight/types';
7
7
  import flow from 'lodash/flow.js';
@@ -240,7 +240,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
240
240
  React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
241
241
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
242
242
 
243
- const appVersion = '1.9.6';
243
+ const appVersion = '1.9.7';
244
244
 
245
245
  class ResponseError extends Error {
246
246
  constructor(message, responseCode) {
@@ -374,13 +374,14 @@ const StoplightProjectRouter = (_a) => {
374
374
  var { platformUrl, basePath = '/', staticRouterPath = '', router = 'history' } = _a, props = __rest(_a, ["platformUrl", "basePath", "staticRouterPath", "router"]);
375
375
  const { Router, routerProps } = useRouter(router, basePath, staticRouterPath);
376
376
  return (React.createElement(DevPortalProvider, { platformUrl: platformUrl },
377
- React.createElement(Router, Object.assign({}, routerProps, { key: basePath }),
378
- React.createElement(Route, { path: "/branches/:branchSlug/:nodeSlug", exact: true },
379
- React.createElement(StoplightProjectImpl, Object.assign({}, props))),
380
- React.createElement(Route, { path: "/:nodeSlug", exact: true },
381
- React.createElement(StoplightProjectImpl, Object.assign({}, props))),
382
- React.createElement(Route, { path: "/", exact: true },
383
- React.createElement(StoplightProjectImpl, Object.assign({}, props))))));
377
+ React.createElement(RouterTypeContext.Provider, { value: router },
378
+ React.createElement(Router, Object.assign({}, routerProps, { key: basePath }),
379
+ React.createElement(Route, { path: "/branches/:branchSlug/:nodeSlug", exact: true },
380
+ React.createElement(StoplightProjectImpl, Object.assign({}, props))),
381
+ React.createElement(Route, { path: "/:nodeSlug", exact: true },
382
+ React.createElement(StoplightProjectImpl, Object.assign({}, props))),
383
+ React.createElement(Route, { path: "/", exact: true },
384
+ React.createElement(StoplightProjectImpl, Object.assign({}, props)))))));
384
385
  };
385
386
  const StoplightProject = withStyles(StoplightProjectRouter);
386
387
 
package/index.js CHANGED
@@ -267,7 +267,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
267
267
  React__default["default"].createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
268
268
  React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
269
269
 
270
- const appVersion = '1.9.6';
270
+ const appVersion = '1.9.7';
271
271
 
272
272
  class ResponseError extends Error {
273
273
  constructor(message, responseCode) {
@@ -401,13 +401,14 @@ const StoplightProjectRouter = (_a) => {
401
401
  var { platformUrl, basePath = '/', staticRouterPath = '', router = 'history' } = _a, props = __rest(_a, ["platformUrl", "basePath", "staticRouterPath", "router"]);
402
402
  const { Router, routerProps } = elementsCore.useRouter(router, basePath, staticRouterPath);
403
403
  return (React__namespace.createElement(DevPortalProvider, { platformUrl: platformUrl },
404
- React__namespace.createElement(Router, Object.assign({}, routerProps, { key: basePath }),
405
- React__namespace.createElement(reactRouterDom.Route, { path: "/branches/:branchSlug/:nodeSlug", exact: true },
406
- React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props))),
407
- React__namespace.createElement(reactRouterDom.Route, { path: "/:nodeSlug", exact: true },
408
- React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props))),
409
- React__namespace.createElement(reactRouterDom.Route, { path: "/", exact: true },
410
- React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props))))));
404
+ React__namespace.createElement(elementsCore.RouterTypeContext.Provider, { value: router },
405
+ React__namespace.createElement(Router, Object.assign({}, routerProps, { key: basePath }),
406
+ React__namespace.createElement(reactRouterDom.Route, { path: "/branches/:branchSlug/:nodeSlug", exact: true },
407
+ React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props))),
408
+ React__namespace.createElement(reactRouterDom.Route, { path: "/:nodeSlug", exact: true },
409
+ React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props))),
410
+ React__namespace.createElement(reactRouterDom.Route, { path: "/", exact: true },
411
+ React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props)))))));
411
412
  };
412
413
  const StoplightProject = elementsCore.withStyles(StoplightProjectRouter);
413
414
 
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Menu, FieldButton, Modal, Input, Box, Icon, ListBox, ListBoxItem, Flex, VStack, Heading } from '@stoplight/mosaic';
2
2
  import * as React from 'react';
3
3
  import React__default, { useRef, useEffect, useMemo, useCallback, useState } from 'react';
4
- import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, NodeTypeIconDefs, NodeTypeColors, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, findFirstNode, ReactRouterMarkdownLink, SidebarLayout } from '@stoplight/elements-core';
4
+ import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, NodeTypeIconDefs, NodeTypeColors, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, RouterTypeContext, findFirstNode, ReactRouterMarkdownLink, SidebarLayout } from '@stoplight/elements-core';
5
5
  import { resolve, dirname } from '@stoplight/path';
6
6
  import { NodeType } from '@stoplight/types';
7
7
  import flow from 'lodash/flow.js';
@@ -240,7 +240,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
240
240
  React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
241
241
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
242
242
 
243
- const appVersion = '1.9.6';
243
+ const appVersion = '1.9.7';
244
244
 
245
245
  class ResponseError extends Error {
246
246
  constructor(message, responseCode) {
@@ -374,13 +374,14 @@ const StoplightProjectRouter = (_a) => {
374
374
  var { platformUrl, basePath = '/', staticRouterPath = '', router = 'history' } = _a, props = __rest(_a, ["platformUrl", "basePath", "staticRouterPath", "router"]);
375
375
  const { Router, routerProps } = useRouter(router, basePath, staticRouterPath);
376
376
  return (React.createElement(DevPortalProvider, { platformUrl: platformUrl },
377
- React.createElement(Router, Object.assign({}, routerProps, { key: basePath }),
378
- React.createElement(Route, { path: "/branches/:branchSlug/:nodeSlug", exact: true },
379
- React.createElement(StoplightProjectImpl, Object.assign({}, props))),
380
- React.createElement(Route, { path: "/:nodeSlug", exact: true },
381
- React.createElement(StoplightProjectImpl, Object.assign({}, props))),
382
- React.createElement(Route, { path: "/", exact: true },
383
- React.createElement(StoplightProjectImpl, Object.assign({}, props))))));
377
+ React.createElement(RouterTypeContext.Provider, { value: router },
378
+ React.createElement(Router, Object.assign({}, routerProps, { key: basePath }),
379
+ React.createElement(Route, { path: "/branches/:branchSlug/:nodeSlug", exact: true },
380
+ React.createElement(StoplightProjectImpl, Object.assign({}, props))),
381
+ React.createElement(Route, { path: "/:nodeSlug", exact: true },
382
+ React.createElement(StoplightProjectImpl, Object.assign({}, props))),
383
+ React.createElement(Route, { path: "/", exact: true },
384
+ React.createElement(StoplightProjectImpl, Object.assign({}, props)))))));
384
385
  };
385
386
  const StoplightProject = withStyles(StoplightProjectRouter);
386
387
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-dev-portal",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
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": "~7.7.10",
29
+ "@stoplight/elements-core": "~7.7.11",
30
30
  "@stoplight/markdown-viewer": "^5.5.0",
31
31
  "@stoplight/mosaic": "^1.33.0",
32
32
  "@stoplight/path": "^1.3.2",
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const appVersion = "1.9.6";
1
+ export declare const appVersion = "1.9.7";