@scalar/api-reference 1.28.23 → 1.28.25
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 +51 -0
- package/dist/browser/standalone.js +5904 -5810
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +100 -57
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +43 -42
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- package/dist/components/SpecificationExtension/SpecificationExtension.vue.d.ts.map +1 -1
- package/dist/components/SpecificationExtension/SpecificationExtension.vue.js +26 -21
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +35 -31
- package/dist/features/ApiClientModal/useApiClient.d.ts +122 -22
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/lib/html-api.d.ts +1 -20
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +11 -11
- package/dist/standalone/lib/register-globals.d.ts +1 -1
- package/dist/standalone/lib/register-globals.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -9
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type App } from 'vue';
|
|
1
|
+
import { type ApiReferenceConfiguration, type CreateApiReference } from '@scalar/types/api-reference';
|
|
3
2
|
/**
|
|
4
3
|
* Reading the configuration from the data-attributes.
|
|
5
4
|
*/
|
|
@@ -10,30 +9,12 @@ export declare function getConfigurationFromDataAttributes(doc: Document): ApiRe
|
|
|
10
9
|
*/
|
|
11
10
|
export declare function findDataAttributes(doc: Document, configuration: ApiReferenceConfiguration): void;
|
|
12
11
|
export declare const createContainer: (doc: Document, element?: Element | null) => Element | null;
|
|
13
|
-
export type ApiReferenceInstance = {
|
|
14
|
-
/** The vue app instance */
|
|
15
|
-
app: App<Element>;
|
|
16
|
-
/** Destroy the current API Reference instance */
|
|
17
|
-
destroy: () => void;
|
|
18
|
-
/** Get the current configuration[s] */
|
|
19
|
-
getConfiguration: () => AnyApiReferenceConfiguration;
|
|
20
|
-
/** Update all configuration[s] */
|
|
21
|
-
updateConfiguration: (newConfig: AnyApiReferenceConfiguration) => void;
|
|
22
|
-
};
|
|
23
|
-
/** Function overload for createApiReference to allow multiple different signatures */
|
|
24
|
-
export type CreateApiReference = {
|
|
25
|
-
/** Pass in the configuration only */
|
|
26
|
-
(configuration: AnyApiReferenceConfiguration): ApiReferenceInstance;
|
|
27
|
-
/** Pass in the element or selector and configuration */
|
|
28
|
-
(elementOrSelector: Element | string, configuration: AnyApiReferenceConfiguration): ApiReferenceInstance;
|
|
29
|
-
};
|
|
30
12
|
/**
|
|
31
13
|
* Create (and mount) a new Scalar API Reference
|
|
32
14
|
*
|
|
33
15
|
* @example createApiReference({ url: '/scalar.json' }).mount('#app')
|
|
34
16
|
* @example createApiReference('#app', { url: '/scalar.json' })
|
|
35
17
|
* @example createApiReference(document.getElementById('app'), { url: '/scalar.json' })
|
|
36
|
-
*
|
|
37
18
|
*/
|
|
38
19
|
export declare const createApiReference: CreateApiReference;
|
|
39
20
|
//# sourceMappingURL=html-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,yBAAyB,EAE9B,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AAQpC;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,QAAQ,GAAG,yBAAyB,CA+G3F;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,yBAAyB,QAiBzF;AAID,eAAO,MAAM,eAAe,QAAS,QAAQ,YAAY,OAAO,GAAG,IAAI,mBAatE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAkHhC,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { createHead as
|
|
1
|
+
import { createHead as r } from "@unhead/vue";
|
|
2
2
|
import { reactive as u, createApp as c, h as d } from "vue";
|
|
3
3
|
import i from "../../components/ApiReference.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const y = (n, s) => {
|
|
5
5
|
const t = u({
|
|
6
6
|
// Either the configuration will be the second arugment or it MUST be the first (configuration only)
|
|
7
|
-
configuration:
|
|
7
|
+
configuration: s ?? n ?? {}
|
|
8
8
|
});
|
|
9
9
|
let a = c(() => d(i, t));
|
|
10
|
-
if (a.use(
|
|
10
|
+
if (a.use(r()), s) {
|
|
11
11
|
const e = typeof n == "string" ? document.querySelector(n) : n;
|
|
12
12
|
e ? a.mount(e) : console.error("Could not find a mount point for API References:", n);
|
|
13
13
|
}
|
|
@@ -15,28 +15,28 @@ const m = (n, o) => {
|
|
|
15
15
|
"scalar:reload-references",
|
|
16
16
|
() => {
|
|
17
17
|
if (console.warn(
|
|
18
|
-
"scalar:reload-references event has been deprecated, please use the
|
|
18
|
+
"scalar:reload-references event has been deprecated, please use the scalarInstance.app.mount method instead."
|
|
19
19
|
), !t.configuration)
|
|
20
20
|
return;
|
|
21
21
|
const e = typeof n == "string" ? document.querySelector(n) : n;
|
|
22
|
-
e && (e && !document.body.contains(e) && document.body.appendChild(e), a.unmount(), a = c(() => d(i, t)), a.use(
|
|
22
|
+
e && (e && !document.body.contains(e) && document.body.appendChild(e), a.unmount(), a = c(() => d(i, t)), a.use(r()), a.mount(e));
|
|
23
23
|
},
|
|
24
24
|
!1
|
|
25
25
|
);
|
|
26
|
-
const
|
|
26
|
+
const o = () => {
|
|
27
27
|
delete t.configuration, a.unmount();
|
|
28
28
|
};
|
|
29
29
|
return document.addEventListener(
|
|
30
30
|
"scalar:destroy-references",
|
|
31
31
|
() => {
|
|
32
|
-
console.warn("scalar:destroy-references event has been deprecated, please use
|
|
32
|
+
console.warn("scalar:destroy-references event has been deprecated, please use scalarInstance.destroy instead."), o();
|
|
33
33
|
},
|
|
34
34
|
!1
|
|
35
35
|
), document.addEventListener(
|
|
36
36
|
"scalar:update-references-config",
|
|
37
37
|
(e) => {
|
|
38
38
|
console.warn(
|
|
39
|
-
"scalar:update-references-config event has been deprecated, please use
|
|
39
|
+
"scalar:update-references-config event has been deprecated, please use scalarInstance.updateConfiguration instead."
|
|
40
40
|
), "detail" in e && Object.assign(t, e.detail);
|
|
41
41
|
},
|
|
42
42
|
!1
|
|
@@ -46,9 +46,9 @@ const m = (n, o) => {
|
|
|
46
46
|
updateConfiguration: (e) => {
|
|
47
47
|
t.configuration = e;
|
|
48
48
|
},
|
|
49
|
-
destroy:
|
|
49
|
+
destroy: o
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
y as createApiReference
|
|
54
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-globals.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/register-globals.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-globals.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/register-globals.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGrE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE;YACN,kBAAkB,EAAE,kBAAkB,CAAA;SACvC,CAAA;KACF;CACF;AAED,2GAA2G;AAC3G,eAAO,MAAM,eAAe,YAS3B,CAAA"}
|