@scalar/api-reference 1.32.4 → 1.32.6
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 +35 -0
- package/dist/browser/standalone.js +9758 -9706
- 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 +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +28 -26
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +6 -6
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +13 -10
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +71 -67
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +4 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +30 -30
- package/dist/features/api-client-modal/useApiClient.d.ts +84 -4
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/download-link/DownloadLink.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +2 -2
- package/dist/features/sidebar/components/SidebarElement.vue2.js +16 -15
- package/dist/index.js +1 -1
- package/dist/libs/openapi.d.ts +0 -13
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +49 -63
- package/dist/stores/useHttpClientStore.js +20 -20
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +80 -72
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +14 -0
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +21 -72
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/events/definitions.d.ts +9 -0
- package/dist/v2/events/definitions.d.ts.map +1 -1
- package/package.json +11 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAoUA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAyBpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,iBAAiB,EAAE,MAAM,cAAc,CAAA;CACxC,CAAC;AAuNF,iBAAS,cAAc;WA0GT,OAAO,IAA6B;;wBAVrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;EAaxC;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,111 +1,119 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import G from "
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
import { defineComponent as V, ref as f, toRef as b, provide as _, shallowRef as w, onServerPrefetch as $, onMounted as C, watch as d, computed as A, createElementBlock as B, openBlock as D, Fragment as F, createBlock as P, createCommentVNode as U, createVNode as S, unref as r, resolveDynamicComponent as W, withCtx as n, createTextVNode as Y, toDisplayString as O, renderSlot as p, isRef as j } from "vue";
|
|
2
|
+
import { safeLocalStorage as x, REFERENCE_LS_KEYS as h } from "@scalar/helpers/object/local-storage";
|
|
3
|
+
import { parseJsonOrYaml as J, redirectToProxy as K } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useColorMode as q } from "@scalar/use-hooks/useColorMode";
|
|
5
|
+
import { useSeoMeta as z } from "@unhead/vue";
|
|
6
|
+
import { useFavicon as G } from "@vueuse/core";
|
|
7
|
+
import H from "../components/ApiReferenceLayout.vue.js";
|
|
8
|
+
import { NAV_STATE_SYMBOL as Q } from "../hooks/useNavState.js";
|
|
9
|
+
import { useMultipleDocuments as X } from "../features/multiple-documents/useMultipleDocuments.js";
|
|
10
|
+
import { onCustomEvent as v } from "./events/listeners.js";
|
|
11
|
+
import Z from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
12
|
+
const ie = /* @__PURE__ */ V({
|
|
12
13
|
__name: "ApiReferenceWorkspace",
|
|
13
14
|
props: {
|
|
14
15
|
configuration: {},
|
|
15
16
|
getWorkspaceStore: { type: Function }
|
|
16
17
|
},
|
|
17
18
|
setup(M) {
|
|
18
|
-
const
|
|
19
|
-
availableDocuments:
|
|
20
|
-
selectedConfiguration:
|
|
21
|
-
selectedDocumentIndex:
|
|
22
|
-
isIntersectionEnabled:
|
|
19
|
+
const k = M, {
|
|
20
|
+
availableDocuments: l,
|
|
21
|
+
selectedConfiguration: a,
|
|
22
|
+
selectedDocumentIndex: s,
|
|
23
|
+
isIntersectionEnabled: g,
|
|
23
24
|
hash: y,
|
|
24
|
-
hashPrefix:
|
|
25
|
-
} =
|
|
26
|
-
configuration:
|
|
27
|
-
isIntersectionEnabled:
|
|
28
|
-
hash:
|
|
29
|
-
hashPrefix:
|
|
30
|
-
}),
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
hashPrefix: T
|
|
26
|
+
} = X({
|
|
27
|
+
configuration: b(k, "configuration"),
|
|
28
|
+
isIntersectionEnabled: f(!1),
|
|
29
|
+
hash: f(""),
|
|
30
|
+
hashPrefix: f("")
|
|
31
|
+
}), L = (e, t) => fetch(
|
|
32
|
+
K(a.value.proxyUrl, e.toString()),
|
|
33
|
+
t
|
|
33
34
|
);
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
35
|
+
_(Q, { isIntersectionEnabled: g, hash: y, hashPrefix: T });
|
|
36
|
+
const c = w(null), o = k.getWorkspaceStore(), i = l, u = (e) => {
|
|
37
|
+
if (o.workspace.documents[e.slug ?? "default"] === void 0) {
|
|
37
38
|
if (e.content) {
|
|
38
|
-
const
|
|
39
|
-
return
|
|
39
|
+
const t = typeof e.content == "string" ? J(e.content) : e.content;
|
|
40
|
+
return o.addDocumentSync({
|
|
40
41
|
name: e.slug ?? "default",
|
|
41
|
-
document: typeof
|
|
42
|
+
document: typeof t == "function" ? t() : t
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
if (e.url)
|
|
45
|
-
return
|
|
46
|
+
return o.addDocument({
|
|
46
47
|
name: e.slug ?? "default",
|
|
47
48
|
url: e.url,
|
|
48
|
-
fetch:
|
|
49
|
+
fetch: L
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
i.value.forEach((e) => {
|
|
53
|
-
e.content &&
|
|
54
|
-
}),
|
|
54
|
+
e.content && u(e);
|
|
55
|
+
}), $(() => {
|
|
55
56
|
i.value.forEach((e) => {
|
|
56
|
-
e.url &&
|
|
57
|
+
e.url && u(e);
|
|
57
58
|
});
|
|
58
|
-
}),
|
|
59
|
+
}), C(() => {
|
|
59
60
|
i.value.forEach((e) => {
|
|
60
|
-
e.url &&
|
|
61
|
+
e.url && u(e);
|
|
61
62
|
});
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
}),
|
|
65
|
-
|
|
63
|
+
}), v(c, "scalar-update-dark-mode", (e) => {
|
|
64
|
+
o.update("x-scalar-dark-mode", e.data.value);
|
|
65
|
+
}), v(c, "scalar-update-active-document", (e) => {
|
|
66
|
+
o.update("x-scalar-active-document", e.data.value);
|
|
67
|
+
}), v(c, "scalar-update-selected-client", (e) => {
|
|
68
|
+
o.update("x-scalar-default-client", e.data), x().setItem(h.SELECTED_CLIENT, e.data);
|
|
69
|
+
}), C(() => {
|
|
70
|
+
const e = x().getItem(
|
|
71
|
+
h.SELECTED_CLIENT
|
|
72
|
+
);
|
|
73
|
+
e && o.update("x-scalar-default-client", e);
|
|
66
74
|
});
|
|
67
|
-
const { toggleColorMode:
|
|
68
|
-
initialColorMode:
|
|
69
|
-
overrideColorMode:
|
|
75
|
+
const { toggleColorMode: I, isDarkMode: N } = q({
|
|
76
|
+
initialColorMode: a.value.darkMode ? "dark" : void 0,
|
|
77
|
+
overrideColorMode: a.value.forceDarkModeState
|
|
70
78
|
});
|
|
71
79
|
d(
|
|
72
|
-
() =>
|
|
73
|
-
(e) =>
|
|
80
|
+
() => a.value.darkMode,
|
|
81
|
+
(e) => o.update("x-scalar-dark-mode", !!e)
|
|
74
82
|
), d(
|
|
75
|
-
() =>
|
|
76
|
-
(e) =>
|
|
83
|
+
() => N.value,
|
|
84
|
+
(e) => o.update("x-scalar-dark-mode", e),
|
|
77
85
|
{ immediate: !0 }
|
|
78
86
|
), d(
|
|
79
|
-
() =>
|
|
87
|
+
() => s.value,
|
|
80
88
|
(e) => {
|
|
81
|
-
var
|
|
82
|
-
return
|
|
89
|
+
var t;
|
|
90
|
+
return o.update(
|
|
83
91
|
"x-scalar-active-document",
|
|
84
|
-
(
|
|
92
|
+
(t = l.value[e]) == null ? void 0 : t.slug
|
|
85
93
|
);
|
|
86
94
|
},
|
|
87
95
|
{ immediate: !0 }
|
|
88
96
|
), d(
|
|
89
|
-
() =>
|
|
97
|
+
() => l.value,
|
|
90
98
|
(e) => {
|
|
91
|
-
e.forEach(
|
|
99
|
+
e.forEach(u);
|
|
92
100
|
}
|
|
93
|
-
),
|
|
94
|
-
const
|
|
95
|
-
return
|
|
96
|
-
var
|
|
97
|
-
return D(),
|
|
98
|
-
(
|
|
101
|
+
), a.value.metaData && z(a.value.metaData);
|
|
102
|
+
const R = A(() => a.value.favicon);
|
|
103
|
+
return G(R), (e, t) => {
|
|
104
|
+
var E;
|
|
105
|
+
return D(), B(F, null, [
|
|
106
|
+
(E = r(a)) != null && E.customCss ? (D(), P(W("style"), { key: 0 }, {
|
|
99
107
|
default: n(() => [
|
|
100
|
-
|
|
108
|
+
Y(O(r(a).customCss), 1)
|
|
101
109
|
]),
|
|
102
110
|
_: 1
|
|
103
111
|
})) : U("", !0),
|
|
104
|
-
|
|
105
|
-
configuration: r(
|
|
106
|
-
isDark: !!r(
|
|
107
|
-
onToggleDarkMode:
|
|
108
|
-
onUpdateContent:
|
|
112
|
+
S(H, {
|
|
113
|
+
configuration: r(a),
|
|
114
|
+
isDark: !!r(o).workspace["x-scalar-dark-mode"],
|
|
115
|
+
onToggleDarkMode: t[1] || (t[1] = () => r(I)()),
|
|
116
|
+
onUpdateContent: t[2] || (t[2] = (m) => e.$emit("updateContent", m))
|
|
109
117
|
}, {
|
|
110
118
|
footer: n(() => [
|
|
111
119
|
p(e.$slots, "footer")
|
|
@@ -114,10 +122,10 @@ const se = /* @__PURE__ */ w({
|
|
|
114
122
|
p(e.$slots, "footer")
|
|
115
123
|
]),
|
|
116
124
|
"document-selector": n(() => [
|
|
117
|
-
|
|
118
|
-
modelValue: r(
|
|
119
|
-
"onUpdate:modelValue":
|
|
120
|
-
options: r(
|
|
125
|
+
S(r(Z), {
|
|
126
|
+
modelValue: r(s),
|
|
127
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => j(s) ? s.value = m : null),
|
|
128
|
+
options: r(l)
|
|
121
129
|
}, null, 8, ["modelValue", "options"])
|
|
122
130
|
]),
|
|
123
131
|
"sidebar-start": n(() => [
|
|
@@ -130,5 +138,5 @@ const se = /* @__PURE__ */ w({
|
|
|
130
138
|
}
|
|
131
139
|
});
|
|
132
140
|
export {
|
|
133
|
-
|
|
141
|
+
ie as default
|
|
134
142
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/example';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
examples: Record<string, ExampleObject>;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_PublicProps = {
|
|
6
|
+
modelValue: string;
|
|
7
|
+
} & __VLS_Props;
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=ExamplePicker.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAA;AAKxF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CACxC,CAAC;AA2CF,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CAClB,GAAG,WAAW,CAAC;;;;;;AAyGhB,wBAQG"}
|
|
@@ -4,8 +4,7 @@ import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/stric
|
|
|
4
4
|
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
5
5
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
6
6
|
import { type Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
|
|
7
|
-
|
|
8
|
-
type Props = {
|
|
7
|
+
export type RequestExampleProps = {
|
|
9
8
|
/**
|
|
10
9
|
* List of all allowed clients, this will determine which clients are available in the dropdown
|
|
11
10
|
*
|
|
@@ -24,7 +23,7 @@ type Props = {
|
|
|
24
23
|
/**
|
|
25
24
|
* Which server from the spec to use for the code example
|
|
26
25
|
*/
|
|
27
|
-
selectedServer?: ServerObject;
|
|
26
|
+
selectedServer?: ServerObject | undefined;
|
|
28
27
|
/**
|
|
29
28
|
* The selected content type from the requestBody.content, this will determine which examples are available
|
|
30
29
|
* as well as the content type of the code example
|
|
@@ -61,77 +60,27 @@ type Props = {
|
|
|
61
60
|
*/
|
|
62
61
|
generateLabel?: () => string;
|
|
63
62
|
/**
|
|
64
|
-
*
|
|
63
|
+
* Whether to hide the client selector
|
|
64
|
+
* @default false
|
|
65
65
|
*/
|
|
66
|
-
|
|
67
|
-
hideClientSelector?: boolean;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
declare function __VLS_template(): {
|
|
71
|
-
attrs: Partial<{}>;
|
|
72
|
-
slots: Readonly<{
|
|
73
|
-
header: () => unknown;
|
|
74
|
-
footer: () => unknown;
|
|
75
|
-
}> & {
|
|
76
|
-
header: () => unknown;
|
|
77
|
-
footer: () => unknown;
|
|
78
|
-
};
|
|
79
|
-
refs: {
|
|
80
|
-
elem: ({
|
|
81
|
-
$: import("vue").ComponentInternalInstance;
|
|
82
|
-
$data: {};
|
|
83
|
-
$props: Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
84
|
-
$attrs: {
|
|
85
|
-
[x: string]: unknown;
|
|
86
|
-
};
|
|
87
|
-
$refs: {
|
|
88
|
-
[x: string]: unknown;
|
|
89
|
-
};
|
|
90
|
-
$slots: Readonly<{
|
|
91
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
92
|
-
}>;
|
|
93
|
-
$root: ComponentPublicInstance | null;
|
|
94
|
-
$parent: ComponentPublicInstance | null;
|
|
95
|
-
$host: Element | null;
|
|
96
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
97
|
-
$el: HTMLDivElement;
|
|
98
|
-
$options: import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
99
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
100
|
-
created?: (() => void) | (() => void)[];
|
|
101
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
102
|
-
mounted?: (() => void) | (() => void)[];
|
|
103
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
104
|
-
updated?: (() => void) | (() => void)[];
|
|
105
|
-
activated?: (() => void) | (() => void)[];
|
|
106
|
-
deactivated?: (() => void) | (() => void)[];
|
|
107
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
108
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
109
|
-
destroyed?: (() => void) | (() => void)[];
|
|
110
|
-
unmounted?: (() => void) | (() => void)[];
|
|
111
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
112
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
113
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
114
|
-
};
|
|
115
|
-
$forceUpdate: () => void;
|
|
116
|
-
$nextTick: typeof import("vue").nextTick;
|
|
117
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
118
|
-
} & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, never> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
119
|
-
$slots: {
|
|
120
|
-
default?(_: {}): any;
|
|
121
|
-
};
|
|
122
|
-
}) | null;
|
|
123
|
-
};
|
|
124
|
-
rootEl: any;
|
|
66
|
+
hideClientSelector?: boolean;
|
|
125
67
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Request Example
|
|
70
|
+
*
|
|
71
|
+
* The core component for rendering a request example block,
|
|
72
|
+
* this component does not have much of its own state but operates on props and custom events
|
|
73
|
+
*
|
|
74
|
+
* @event scalar-update-selected-client - Emitted when the selected client changes
|
|
75
|
+
* @event scalar-update-selected-example - Emitted when the selected example changes
|
|
76
|
+
*/
|
|
77
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<RequestExampleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RequestExampleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
78
|
+
header: () => unknown;
|
|
79
|
+
footer: () => unknown;
|
|
80
|
+
}> & {
|
|
81
|
+
header: () => unknown;
|
|
82
|
+
footer: () => unknown;
|
|
83
|
+
}>;
|
|
135
84
|
export default _default;
|
|
136
85
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
137
86
|
new (): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AA2YA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAmBxD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAA;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAoBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AApBvB,wBA+ZC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -9,7 +9,7 @@ import type { AvailableClients } from '@scalar/snippetz';
|
|
|
9
9
|
*
|
|
10
10
|
* @param options - Array of client option groups, each containing a label and array of client options
|
|
11
11
|
* @param id - Optional client identifier to search for (e.g., 'js/fetch', 'python/requests')
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
* @returns The selected client option. If a specific ID is provided and found, returns that client.
|
|
14
14
|
* If the ID is not found or not provided, returns the first available client option.
|
|
15
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAIxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,iBACP,iBAAiB,EAAE,aACtB,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,KAC9C,YAwBF,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AvailableClients } from '@scalar/snippetz';
|
|
1
2
|
/**
|
|
2
3
|
* Event definitions for scalar blocks
|
|
3
4
|
*
|
|
@@ -19,6 +20,14 @@ export type ApiReferenceEvents = {
|
|
|
19
20
|
value: string;
|
|
20
21
|
};
|
|
21
22
|
};
|
|
23
|
+
/** Controls the selected client in our code example blocks */
|
|
24
|
+
'scalar-update-selected-client': {
|
|
25
|
+
data: AvailableClients[number];
|
|
26
|
+
};
|
|
27
|
+
/** Controls the selected example key in our operation blocks + children */
|
|
28
|
+
'scalar-update-selected-example': {
|
|
29
|
+
data: string;
|
|
30
|
+
};
|
|
22
31
|
};
|
|
23
32
|
export type ApiReferenceEvent = Prettify<keyof ApiReferenceEvents>;
|
|
24
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/v2/events/definitions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB,EAAE;QACvB,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO,CAAA;SACf,CAAA;KACF,CAAA;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO,CAAA;SACf,CAAA;KACF,CAAA;IACD,+BAA+B,EAAE;QAC/B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAA;CACF,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,kBAAkB,CAAC,CAAA;AAElE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,iBAAiB,EACzD,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAKpC;AAED,8CAA8C;AAC9C,KAAK,QAAQ,CAAC,CAAC,IAAI;KAChB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/v2/events/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB,EAAE;QACvB,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO,CAAA;SACf,CAAA;KACF,CAAA;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO,CAAA;SACf,CAAA;KACF,CAAA;IACD,+BAA+B,EAAE;QAC/B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAA;IACD,8DAA8D;IAC9D,+BAA+B,EAAE;QAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;KAC/B,CAAA;IACD,2EAA2E;IAC3E,gCAAgC,EAAE;QAChC,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;CACF,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,kBAAkB,CAAC,CAAA;AAElE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,iBAAiB,EACzD,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAKpC;AAED,8CAA8C;AAC9C,KAAK,QAAQ,CAAC,CAAC,IAAI;KAChB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.32.
|
|
23
|
+
"version": "1.32.6",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -54,20 +54,21 @@
|
|
|
54
54
|
"nanoid": "5.1.5",
|
|
55
55
|
"vue": "^3.5.12",
|
|
56
56
|
"zod": "3.24.1",
|
|
57
|
-
"@scalar/
|
|
58
|
-
"@scalar/
|
|
59
|
-
"@scalar/oas-utils": "0.4.11",
|
|
57
|
+
"@scalar/components": "0.14.17",
|
|
58
|
+
"@scalar/api-client": "2.5.16",
|
|
60
59
|
"@scalar/helpers": "0.0.6",
|
|
60
|
+
"@scalar/icons": "0.4.6",
|
|
61
|
+
"@scalar/oas-utils": "0.4.12",
|
|
62
|
+
"@scalar/object-utils": "1.2.2",
|
|
61
63
|
"@scalar/openapi-parser": "0.18.1",
|
|
62
|
-
"@scalar/
|
|
64
|
+
"@scalar/themes": "0.13.9",
|
|
65
|
+
"@scalar/snippetz": "0.4.1",
|
|
66
|
+
"@scalar/types": "0.2.8",
|
|
63
67
|
"@scalar/openapi-types": "0.3.5",
|
|
64
|
-
"@scalar/
|
|
65
|
-
"@scalar/snippetz": "0.4.0",
|
|
66
|
-
"@scalar/themes": "0.13.8",
|
|
67
|
-
"@scalar/types": "0.2.7",
|
|
68
|
+
"@scalar/code-highlight": "0.1.6",
|
|
68
69
|
"@scalar/use-hooks": "0.2.4",
|
|
69
70
|
"@scalar/use-toasts": "0.8.0",
|
|
70
|
-
"@scalar/workspace-store": "0.
|
|
71
|
+
"@scalar/workspace-store": "0.9.0"
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"@tailwindcss/vite": "^4.1.7",
|