@stoplight/elements-core 9.0.12-beta-0.4 → 9.0.13-alpha.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.
- package/components/Docs/Docs.d.ts +1 -14
- package/components/Docs/HttpOperation/Body.d.ts +1 -9
- package/components/Docs/HttpOperation/HttpOperation.d.ts +2 -6
- package/components/Docs/HttpOperation/Request.d.ts +0 -6
- package/components/Docs/HttpOperation/Responses.d.ts +1 -12
- package/components/TableOfContents/types.d.ts +7 -0
- package/components/TryIt/Parameters/parameter-utils.d.ts +2 -4
- package/index.esm.js +102 -537
- package/index.js +102 -537
- package/index.mjs +102 -537
- package/package.json +1 -1
- package/components/Docs/HttpOperation/LazySchemaTreePreviewer.d.ts +0 -34
|
@@ -44,26 +44,13 @@ export interface DocsProps extends BaseDocsProps {
|
|
|
44
44
|
useNodeForRefResolving?: boolean;
|
|
45
45
|
refResolver?: ReferenceResolver;
|
|
46
46
|
maxRefDepth?: number;
|
|
47
|
-
disableProps?: any;
|
|
48
47
|
}
|
|
49
48
|
export interface DocsComponentProps<T = unknown> extends BaseDocsProps {
|
|
50
49
|
data: T;
|
|
51
|
-
disableProps?: any;
|
|
52
50
|
}
|
|
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;
|
|
63
51
|
export declare const Docs: React.NamedExoticComponent<DocsProps>;
|
|
64
52
|
export interface ParsedDocsProps extends BaseDocsProps {
|
|
65
53
|
node: ParsedNode;
|
|
66
|
-
disableProps?: DisableProps;
|
|
67
54
|
}
|
|
68
|
-
export declare const ParsedDocs: ({ node, nodeUnsupported,
|
|
55
|
+
export declare const ParsedDocs: ({ node, nodeUnsupported, ...commonProps }: ParsedDocsProps) => JSX.Element | null;
|
|
69
56
|
export { DocsSkeleton } from './Skeleton';
|
|
@@ -3,17 +3,9 @@ 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
|
-
}>;
|
|
14
6
|
}
|
|
15
7
|
export declare const isBodyEmpty: (body?: BodyProps['body']) => boolean;
|
|
16
8
|
export declare const Body: {
|
|
17
|
-
({ body, onChange, isHttpWebhookOperation
|
|
9
|
+
({ body, onChange, isHttpWebhookOperation }: BodyProps): JSX.Element | null;
|
|
18
10
|
displayName: string;
|
|
19
11
|
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { IHttpEndpointOperation } from '@stoplight/types';
|
|
2
2
|
import { DocsComponentProps } from '..';
|
|
3
|
-
export declare type HttpOperationProps = DocsComponentProps<IHttpEndpointOperation
|
|
4
|
-
|
|
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<{}>>;
|
|
3
|
+
export declare type HttpOperationProps = DocsComponentProps<IHttpEndpointOperation>;
|
|
4
|
+
export declare const HttpOperation: import("react").FunctionComponent<HttpOperationProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
|
|
9
5
|
export declare function OperationHeader({ id, noHeading, hasBadges, name, isDeprecated, isInternal, hideServerUrl, method, path, }: {
|
|
10
6
|
id: string;
|
|
11
7
|
noHeading?: boolean;
|
|
@@ -5,12 +5,6 @@ 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
|
-
}>;
|
|
14
8
|
}
|
|
15
9
|
export declare const Request: React.FunctionComponent<IRequestProps>;
|
|
16
10
|
export {};
|
|
@@ -1,23 +1,12 @@
|
|
|
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
|
-
}
|
|
12
2
|
interface ResponsesProps {
|
|
13
3
|
responses: IHttpOperationResponse[];
|
|
14
4
|
onMediaTypeChange?: (mediaType: string) => void;
|
|
15
5
|
onStatusCodeChange?: (statusCode: string) => void;
|
|
16
6
|
isCompact?: boolean;
|
|
17
|
-
disableProps?: DisablePropsByStatus;
|
|
18
7
|
}
|
|
19
8
|
export declare const Responses: {
|
|
20
|
-
({ responses: unsortedResponses, onStatusCodeChange, onMediaTypeChange, isCompact,
|
|
9
|
+
({ responses: unsortedResponses, onStatusCodeChange, onMediaTypeChange, isCompact, }: ResponsesProps): JSX.Element | null;
|
|
21
10
|
displayName: string;
|
|
22
11
|
};
|
|
23
12
|
export {};
|
|
@@ -21,6 +21,7 @@ export declare type TableOfContentsGroup = {
|
|
|
21
21
|
title: string;
|
|
22
22
|
items: TableOfContentsGroupItem[];
|
|
23
23
|
itemsType?: 'article' | 'http_operation' | 'http_webhook' | 'model';
|
|
24
|
+
index: string;
|
|
24
25
|
};
|
|
25
26
|
export declare type TableOfContentsExternalLink = {
|
|
26
27
|
title: string;
|
|
@@ -33,5 +34,11 @@ export declare type TableOfContentsNode<T = 'http_service' | 'http_operation' |
|
|
|
33
34
|
type: T;
|
|
34
35
|
meta: string;
|
|
35
36
|
version?: string;
|
|
37
|
+
index: string;
|
|
36
38
|
};
|
|
37
39
|
export declare type TableOfContentsNodeGroup = TableOfContentsNode<'http_service'> & TableOfContentsGroup;
|
|
40
|
+
export declare type ActiveItemContextType = {
|
|
41
|
+
activeId: string | undefined;
|
|
42
|
+
lastActiveIndex: string;
|
|
43
|
+
setLastActiveIndex: React.Dispatch<React.SetStateAction<string>>;
|
|
44
|
+
};
|
|
@@ -4,12 +4,10 @@ import { JSONSchema7, JSONSchema7Definition } from 'json-schema';
|
|
|
4
4
|
export declare type ParameterSpec = Pick<IHttpParam, 'name' | 'schema' | 'required'> & {
|
|
5
5
|
examples?: (Omit<INodeExample, 'id'> | Omit<INodeExternalExample, 'id'>)[];
|
|
6
6
|
};
|
|
7
|
-
export declare function parameterOptions(parameter: ParameterSpec):
|
|
7
|
+
export declare function parameterOptions(parameter: ParameterSpec): {
|
|
8
8
|
value: string | number;
|
|
9
|
-
} | {
|
|
10
9
|
label: string;
|
|
11
|
-
|
|
12
|
-
})[] | null;
|
|
10
|
+
}[] | null;
|
|
13
11
|
export declare const selectExampleOption: {
|
|
14
12
|
value: string;
|
|
15
13
|
label: string;
|