@scalar/api-client-react 0.5.14 → 1.0.1
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/CHANGELOG.md +284 -0
- package/README.md +25 -69
- package/dist/index.cjs +10 -70
- package/dist/index.d.ts +27 -17
- package/dist/index.js +416 -11528
- package/dist/style.css +1 -1
- package/package.json +18 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { AuthenticationState } from '@scalar/oas-utils';
|
|
3
|
+
import { ClientConfiguration } from '@scalar/api-client';
|
|
2
4
|
import { default as default_2 } from 'react';
|
|
5
|
+
import { OpenClientPayload } from '@scalar/api-client';
|
|
6
|
+
import { PropsWithChildren } from 'react';
|
|
7
|
+
import { SpecConfiguration } from '@scalar/oas-utils';
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
|
-
* Api Client React
|
|
10
|
+
* Api Client Modal React
|
|
11
|
+
*
|
|
12
|
+
* Provider which mounts the Scalar Api Client Modal vue app
|
|
6
13
|
*/
|
|
7
|
-
export declare const
|
|
14
|
+
export declare const ApiClientModalProvider: ({ children, configuration, }: Props) => default_2.JSX.Element;
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* only use this if you know what you are doing
|
|
13
|
-
*/
|
|
14
|
-
export declare const ApiClientReactBase: (props: {
|
|
15
|
-
proxy: string;
|
|
16
|
-
}) => default_2.JSX.Element;
|
|
16
|
+
declare type Props = PropsWithChildren<{
|
|
17
|
+
configuration?: ClientConfiguration;
|
|
18
|
+
}>;
|
|
17
19
|
|
|
18
|
-
declare
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export declare const useApiClientModal: () => {
|
|
21
|
+
app: App<Element>;
|
|
22
|
+
updateConfig(newConfig: ClientConfiguration, mergeConfigs?: boolean): void;
|
|
23
|
+
updateServerUrl: (serverUrl: string) => void;
|
|
24
|
+
updateAuth: (auth: AuthenticationState) => void;
|
|
25
|
+
updateSpec: (spec: SpecConfiguration) => void;
|
|
26
|
+
open: (payload?: OpenClientPayload) => void;
|
|
27
|
+
mount: (mountingEl?: HTMLElement | null) => void;
|
|
28
|
+
modalState: {
|
|
29
|
+
open: boolean;
|
|
30
|
+
show: () => void;
|
|
31
|
+
hide: () => void;
|
|
32
|
+
};
|
|
33
|
+
} | null;
|
|
24
34
|
|
|
25
35
|
export { }
|