@stoplight/elements-core 7.3.8 → 7.4.0

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.
@@ -1,6 +1,5 @@
1
1
  import { MDAST } from '@stoplight/markdown';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  declare type ArticleProps = DocsComponentProps<string | MDAST.Root>;
5
- export declare const Article: React.FunctionComponent<ArticleProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const Article: import("react").FunctionComponent<ArticleProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
6
5
  export {};
@@ -1,14 +1,8 @@
1
- import { HttpSecurityScheme } from '@stoplight/types';
2
1
  import React from 'react';
3
2
  export declare const DeprecatedBadge: React.FC;
4
3
  export declare const InternalBadge: React.FC<{
5
4
  isHttpService?: boolean;
6
5
  }>;
7
- export declare const SecurityBadge: React.FC<{
8
- scheme: HttpSecurityScheme;
9
- httpServiceUri?: string;
10
- includeKey?: boolean;
11
- }>;
12
6
  export declare const VersionBadge: React.FC<{
13
7
  value: string;
14
8
  backgroundColor?: string;
@@ -1,5 +1,4 @@
1
1
  import { IHttpOperation } from '@stoplight/types';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  export declare type HttpOperationProps = DocsComponentProps<IHttpOperation>;
5
- export declare const HttpOperation: React.FunctionComponent<HttpOperationProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const HttpOperation: import("react").FunctionComponent<HttpOperationProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
@@ -1,5 +1,4 @@
1
1
  import { IHttpService } from '@stoplight/types';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  export declare type HttpServiceProps = DocsComponentProps<Partial<IHttpService>>;
5
- export declare const HttpService: React.FunctionComponent<HttpServiceProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const HttpService: import("react").FunctionComponent<HttpServiceProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
@@ -1,9 +1,9 @@
1
- import { HttpSecurityScheme, IOauth2Flow } from '@stoplight/types';
1
+ import { HttpSecurityScheme } from '@stoplight/types';
2
2
  import React from 'react';
3
3
  interface SecuritySchemesProps {
4
4
  schemes: HttpSecurityScheme[];
5
5
  defaultScheme?: string;
6
+ defaultCollapsed?: boolean;
6
7
  }
7
8
  export declare const SecuritySchemes: React.FC<SecuritySchemesProps>;
8
- export declare function getOAuthFlowDescription(title: string, flow: IOauth2Flow): string;
9
9
  export {};
@@ -1,5 +1,4 @@
1
1
  import { JSONSchema7 } from 'json-schema';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  export declare type ModelProps = DocsComponentProps<JSONSchema7>;
5
- export declare const Model: React.FunctionComponent<ModelProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const Model: import("react").FunctionComponent<ModelProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
@@ -1,12 +1,13 @@
1
+ import { PanelProps } from '@stoplight/mosaic';
1
2
  import * as React from 'react';
2
3
  export interface ISectionTitle {
3
4
  title: string;
4
5
  }
5
6
  export declare const SectionTitle: React.FC<ISectionTitle>;
6
- interface SubSectionPanelProps {
7
+ declare type SubSectionPanelProps = {
7
8
  title: React.ReactNode;
8
9
  hasContent?: boolean;
9
10
  rightComponent?: React.ReactNode;
10
- }
11
- export declare const SubSectionPanel: React.FC<SubSectionPanelProps>;
11
+ };
12
+ export declare const SubSectionPanel: React.FC<SubSectionPanelProps & Pick<PanelProps, 'defaultIsOpen' | 'onChange'>>;
12
13
  export {};
@@ -1,6 +1,7 @@
1
+ import { DefaultSMDComponents } from '@stoplight/markdown-viewer';
1
2
  import { IHttpOperation, IHttpRequest } from '@stoplight/types';
2
3
  import { CustomComponentMapping } from './Provider';
3
4
  declare type PartialHttpRequest = Pick<IHttpRequest, 'method' | 'url'> & Partial<IHttpRequest>;
5
+ export { DefaultSMDComponents };
4
6
  export declare const CodeComponent: CustomComponentMapping['code'];
5
7
  export declare function parseHttpRequest(data: PartialHttpRequest): IHttpOperation;
6
- export {};
@@ -1,8 +1,8 @@
1
- import { CustomComponentMapping as MDVCustomComponentMapping, DefaultSMDComponents } from '@stoplight/markdown-viewer';
1
+ import { CustomComponentMapping as MDVCustomComponentMapping } from '@stoplight/markdown-viewer';
2
2
  import * as React from 'react';
3
3
  export declare type CustomComponentMapping = MDVCustomComponentMapping;
4
- export { DefaultSMDComponents };
5
4
  interface MarkdownComponentsProviderProps {
6
5
  value: Partial<CustomComponentMapping> | undefined;
7
6
  }
8
7
  export declare const MarkdownComponentsProvider: React.FC<MarkdownComponentsProviderProps>;
8
+ export {};
@@ -10,7 +10,6 @@ export declare type TableOfContentsProps = {
10
10
  export declare type CustomLinkComponent = React.ComponentType<{
11
11
  to: string;
12
12
  className?: string;
13
- hash?: string;
14
13
  children: React.ReactNode;
15
14
  }>;
16
15
  export declare type TableOfContentsItem = TableOfContentsDivider | TableOfContentsGroupItem;
@@ -1,8 +1,8 @@
1
- import { IconProp } from '@fortawesome/fontawesome-svg-core';
1
+ import { IIconProps } from '@stoplight/mosaic';
2
2
  import * as React from 'react';
3
3
  declare type NonIdealStateProps = {
4
4
  description?: React.ReactNode;
5
- icon?: IconProp;
5
+ icon?: IIconProps['icon'];
6
6
  title?: React.ReactNode;
7
7
  };
8
8
  export declare const NonIdealState: React.FC<NonIdealStateProps>;
@@ -1,2 +1,2 @@
1
1
  import { MockingOptions } from './mocking-utils';
2
- export declare const useMockingOptions: () => [MockingOptions, (update: MockingOptions | ((prev: MockingOptions) => MockingOptions)) => void];
2
+ export declare const useMockingOptions: () => [MockingOptions, (update: MockingOptions | ((prev: MockingOptions) => MockingOptions)) => void | Promise<void>];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/index.d.ts CHANGED
@@ -3,7 +3,9 @@ export { DeprecatedBadge } from './components/Docs/HttpOperation/Badges';
3
3
  export { ExportButton, ExportButtonProps } from './components/Docs/HttpService/ExportButton';
4
4
  export { SidebarLayout } from './components/Layout/SidebarLayout';
5
5
  export { Logo } from './components/Logo';
6
- export { CustomComponentMapping, DefaultSMDComponents, MarkdownComponentsProvider, } from './components/MarkdownViewer/CustomComponents/Provider';
6
+ export { DefaultSMDComponents } from './components/MarkdownViewer/CustomComponents/CodeComponent';
7
+ export { CustomComponentMapping, MarkdownComponentsProvider, } from './components/MarkdownViewer/CustomComponents/Provider';
8
+ export { ReactRouterMarkdownLink } from './components/MarkdownViewer/CustomComponents/ReactRouterLink';
7
9
  export { TableOfContents } from './components/MosaicTableOfContents';
8
10
  export { CustomLinkComponent, TableOfContentsItem, TableOfContentsNode, TableOfContentsNodeGroup, } from './components/MosaicTableOfContents/types';
9
11
  export { findFirstNode } from './components/MosaicTableOfContents/utils';