@stoplight/elements-core 9.0.12 → 9.0.13-beta-0.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.
@@ -44,13 +44,26 @@ export interface DocsProps extends BaseDocsProps {
44
44
  useNodeForRefResolving?: boolean;
45
45
  refResolver?: ReferenceResolver;
46
46
  maxRefDepth?: number;
47
+ disableProps?: any;
47
48
  }
48
49
  export interface DocsComponentProps<T = unknown> extends BaseDocsProps {
49
50
  data: T;
51
+ disableProps?: any;
50
52
  }
53
+ declare type DisablePropItem = {
54
+ location: string;
55
+ paths: string;
56
+ isComplex: boolean;
57
+ };
58
+ declare type DisableProps = {
59
+ request?: DisablePropItem[];
60
+ response?: Record<string, DisablePropItem[]>;
61
+ models?: DisablePropItem[];
62
+ } | null | undefined;
51
63
  export declare const Docs: React.NamedExoticComponent<DocsProps>;
52
64
  export interface ParsedDocsProps extends BaseDocsProps {
53
65
  node: ParsedNode;
66
+ disableProps?: DisableProps;
54
67
  }
55
- export declare const ParsedDocs: ({ node, nodeUnsupported, ...commonProps }: ParsedDocsProps) => JSX.Element | null;
68
+ export declare const ParsedDocs: ({ node, nodeUnsupported, disableProps, ...commonProps }: ParsedDocsProps) => JSX.Element | null;
56
69
  export { DocsSkeleton } from './Skeleton';
@@ -3,9 +3,17 @@ export interface BodyProps {
3
3
  body: IHttpOperationRequestBody;
4
4
  onChange?: (requestBodyIndex: number) => void;
5
5
  isHttpWebhookOperation?: boolean;
6
+ disableProps?: Array<{
7
+ location: string;
8
+ paths: Array<{
9
+ path: string;
10
+ required?: boolean;
11
+ }>;
12
+ isComplex?: boolean;
13
+ }>;
6
14
  }
7
15
  export declare const isBodyEmpty: (body?: BodyProps['body']) => boolean;
8
16
  export declare const Body: {
9
- ({ body, onChange, isHttpWebhookOperation }: BodyProps): JSX.Element | null;
17
+ ({ body, onChange, isHttpWebhookOperation, disableProps }: BodyProps): JSX.Element | null;
10
18
  displayName: string;
11
19
  };
@@ -1,7 +1,11 @@
1
1
  import { IHttpEndpointOperation } from '@stoplight/types';
2
2
  import { DocsComponentProps } from '..';
3
- export declare type HttpOperationProps = DocsComponentProps<IHttpEndpointOperation>;
4
- export declare const HttpOperation: import("react").FunctionComponent<HttpOperationProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
3
+ export declare type HttpOperationProps = DocsComponentProps<IHttpEndpointOperation> & {
4
+ disableProps?: Record<string, any>;
5
+ };
6
+ export declare const HttpOperation: import("react").FunctionComponent<DocsComponentProps<IHttpEndpointOperation<false>> & {
7
+ disableProps?: Record<string, any> | undefined;
8
+ } & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
5
9
  export declare function OperationHeader({ id, noHeading, hasBadges, name, isDeprecated, isInternal, hideServerUrl, method, path, }: {
6
10
  id: string;
7
11
  noHeading?: boolean;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ interface LazySchemaTreePreviewerProps {
3
+ schema: any;
4
+ root?: any;
5
+ title?: string;
6
+ level?: number;
7
+ path?: string;
8
+ maskState?: Record<string, {
9
+ checked: boolean;
10
+ required: 0 | 1 | 2;
11
+ }>;
12
+ setMaskState?: React.Dispatch<React.SetStateAction<Record<string, {
13
+ checked: boolean;
14
+ required: 0 | 1 | 2;
15
+ }>>>;
16
+ hideData?: Array<{
17
+ path: string;
18
+ required?: boolean;
19
+ }>;
20
+ complexData?: ComplexData;
21
+ parentRequired?: string[];
22
+ propertyKey?: string;
23
+ _subType?: string;
24
+ }
25
+ declare type ComplexData = Array<{
26
+ location: string;
27
+ isComplex?: boolean;
28
+ paths: Array<{
29
+ path: string;
30
+ required?: boolean;
31
+ }>;
32
+ }>;
33
+ declare const LazySchemaTreePreviewer: React.FC<LazySchemaTreePreviewerProps>;
34
+ export default LazySchemaTreePreviewer;
@@ -5,6 +5,12 @@ interface IRequestProps {
5
5
  hideSecurityInfo?: boolean;
6
6
  onChange?: (requestBodyIndex: number) => void;
7
7
  isHttpWebhookOperation?: boolean;
8
+ disableProps?: Array<{
9
+ location: string;
10
+ paths: Array<{
11
+ path: string;
12
+ }>;
13
+ }>;
8
14
  }
9
15
  export declare const Request: React.FunctionComponent<IRequestProps>;
10
16
  export {};
@@ -1,12 +1,23 @@
1
1
  import { IHttpOperationResponse } from '@stoplight/types';
2
+ interface DisablePropEntry {
3
+ location: string;
4
+ paths: Array<{
5
+ path: string;
6
+ }>;
7
+ isComplex: boolean;
8
+ }
9
+ interface DisablePropsByStatus {
10
+ [statusCode: string]: DisablePropEntry[];
11
+ }
2
12
  interface ResponsesProps {
3
13
  responses: IHttpOperationResponse[];
4
14
  onMediaTypeChange?: (mediaType: string) => void;
5
15
  onStatusCodeChange?: (statusCode: string) => void;
6
16
  isCompact?: boolean;
17
+ disableProps?: DisablePropsByStatus;
7
18
  }
8
19
  export declare const Responses: {
9
- ({ responses: unsortedResponses, onStatusCodeChange, onMediaTypeChange, isCompact, }: ResponsesProps): JSX.Element | null;
20
+ ({ responses: unsortedResponses, onStatusCodeChange, onMediaTypeChange, isCompact, disableProps, }: ResponsesProps): JSX.Element | null;
10
21
  displayName: string;
11
22
  };
12
23
  export {};