@scalar/api-reference 1.40.3 → 1.40.4
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 +6 -0
- package/dist/blocks/index.d.ts +5 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +12 -0
- package/dist/browser/standalone.js +2 -2
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.js +38 -1
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +1 -38
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +7 -0
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +142 -0
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +7 -0
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +125 -0
- package/dist/components/Content/ClientLibraries/featured-clients.js +24 -0
- package/dist/components/Content/ClientLibraries/index.d.ts +1 -1
- package/dist/components/Content/Models/index.d.ts +1 -0
- package/dist/components/Content/Models/index.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
- package/dist/components/Content/index.d.ts +5 -0
- package/dist/components/Content/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +37 -4
- package/dist/features/index.d.ts +6 -0
- package/dist/features/index.d.ts.map +1 -0
- package/dist/features/index.js +12 -0
- package/dist/helpers/index.d.ts +4 -2
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +6 -1
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +7 -0
- package/dist/style.css +143 -0
- package/package.json +26 -6
|
@@ -1,4 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, createElementBlock, renderSlot, openBlock, createElementVNode, createVNode, unref, createTextVNode } from "vue";
|
|
2
|
+
import { ScalarIconLink } from "@scalar/icons";
|
|
3
|
+
const _hoisted_1 = ["id"];
|
|
4
|
+
const _hoisted_2 = { class: "sr-only" };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "WithBreadcrumb",
|
|
7
|
+
props: {
|
|
8
|
+
breadcrumb: {},
|
|
9
|
+
eventBus: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return _ctx.breadcrumb && _ctx.breadcrumb.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
14
|
+
key: 0,
|
|
15
|
+
id: _ctx.breadcrumb.join("."),
|
|
16
|
+
class: "relative scroll-mt-24"
|
|
17
|
+
}, [
|
|
18
|
+
renderSlot(_ctx.$slots, "default"),
|
|
19
|
+
createElementVNode("button", {
|
|
20
|
+
class: "text-c-3 hover:text-c-1 absolute -top-2 -left-4.5 flex h-[calc(100%+16px)] w-4.5 cursor-pointer items-center justify-center pr-1.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100",
|
|
21
|
+
type: "button",
|
|
22
|
+
onClick: _cache[0] || (_cache[0] = () => _ctx.eventBus?.emit("copy-url:nav-item", { id: _ctx.breadcrumb.join(".") }))
|
|
23
|
+
}, [
|
|
24
|
+
createVNode(unref(ScalarIconLink), {
|
|
25
|
+
class: "size-3",
|
|
26
|
+
weight: "bold"
|
|
27
|
+
}),
|
|
28
|
+
createElementVNode("span", _hoisted_2, [
|
|
29
|
+
renderSlot(_ctx.$slots, "sr-label", {}, () => [
|
|
30
|
+
_cache[1] || (_cache[1] = createTextVNode("Copy link to ", -1)),
|
|
31
|
+
renderSlot(_ctx.$slots, "default")
|
|
32
|
+
])
|
|
33
|
+
])
|
|
34
|
+
])
|
|
35
|
+
], 8, _hoisted_1)) : renderSlot(_ctx.$slots, "default", { key: 1 });
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
2
39
|
export {
|
|
3
40
|
_sfc_main as default
|
|
4
41
|
};
|
|
@@ -1,41 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ScalarIconLink } from "@scalar/icons";
|
|
3
|
-
const _hoisted_1 = ["id"];
|
|
4
|
-
const _hoisted_2 = { class: "sr-only" };
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "WithBreadcrumb",
|
|
7
|
-
props: {
|
|
8
|
-
breadcrumb: {},
|
|
9
|
-
eventBus: {}
|
|
10
|
-
},
|
|
11
|
-
setup(__props) {
|
|
12
|
-
return (_ctx, _cache) => {
|
|
13
|
-
return _ctx.breadcrumb && _ctx.breadcrumb.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
14
|
-
key: 0,
|
|
15
|
-
id: _ctx.breadcrumb.join("."),
|
|
16
|
-
class: "relative scroll-mt-24"
|
|
17
|
-
}, [
|
|
18
|
-
renderSlot(_ctx.$slots, "default"),
|
|
19
|
-
createElementVNode("button", {
|
|
20
|
-
class: "text-c-3 hover:text-c-1 absolute -top-2 -left-4.5 flex h-[calc(100%+16px)] w-4.5 cursor-pointer items-center justify-center pr-1.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100",
|
|
21
|
-
type: "button",
|
|
22
|
-
onClick: _cache[0] || (_cache[0] = () => _ctx.eventBus?.emit("copy-url:nav-item", { id: _ctx.breadcrumb.join(".") }))
|
|
23
|
-
}, [
|
|
24
|
-
createVNode(unref(ScalarIconLink), {
|
|
25
|
-
class: "size-3",
|
|
26
|
-
weight: "bold"
|
|
27
|
-
}),
|
|
28
|
-
createElementVNode("span", _hoisted_2, [
|
|
29
|
-
renderSlot(_ctx.$slots, "sr-label", {}, () => [
|
|
30
|
-
_cache[1] || (_cache[1] = createTextVNode("Copy link to ", -1)),
|
|
31
|
-
renderSlot(_ctx.$slots, "default")
|
|
32
|
-
])
|
|
33
|
-
])
|
|
34
|
-
])
|
|
35
|
-
], 8, _hoisted_1)) : renderSlot(_ctx.$slots, "default", { key: 1 });
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
});
|
|
1
|
+
import _sfc_main from "./WithBreadcrumb.vue.js";
|
|
39
2
|
export {
|
|
40
3
|
_sfc_main as default
|
|
41
4
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./ClientLibraries.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const ClientLibraries = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-33fea7c3"]]);
|
|
5
|
+
export {
|
|
6
|
+
ClientLibraries as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent, useId, computed, useTemplateRef, createElementBlock, createCommentVNode, openBlock, createVNode, unref, withCtx, createElementVNode, Fragment, normalizeClass, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { TabGroup, TabList, TabPanels, TabPanel } from "@headlessui/vue";
|
|
3
|
+
import { DEFAULT_CLIENT } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
+
import { ScalarMarkdown, ScalarCodeBlock } from "@scalar/components";
|
|
5
|
+
import { emitCustomEvent } from "@scalar/workspace-store/events";
|
|
6
|
+
import ClientSelector from "./ClientSelector.vue.js";
|
|
7
|
+
import { getFeaturedClients, isFeaturedClient } from "./featured-clients.js";
|
|
8
|
+
const _hoisted_1 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
ref: "wrapper-ref"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_2 = ["id"];
|
|
13
|
+
const _hoisted_3 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "selected-client card-footer border-t-0 p-0",
|
|
16
|
+
role: "tabpanel",
|
|
17
|
+
tabindex: "1"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_4 = ["id"];
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "ClientLibraries",
|
|
22
|
+
props: {
|
|
23
|
+
document: {},
|
|
24
|
+
clientOptions: {},
|
|
25
|
+
selectedClient: { default: () => DEFAULT_CLIENT }
|
|
26
|
+
},
|
|
27
|
+
setup(__props, { expose: __expose }) {
|
|
28
|
+
const headingId = useId();
|
|
29
|
+
const morePanel = useId();
|
|
30
|
+
const selectedClientOption = computed(
|
|
31
|
+
() => __props.clientOptions.flatMap(
|
|
32
|
+
(option) => option.options.find((option2) => option2.id === __props.selectedClient) ?? []
|
|
33
|
+
)[0]
|
|
34
|
+
);
|
|
35
|
+
const featuredClients = computed(() => getFeaturedClients(__props.clientOptions));
|
|
36
|
+
const tabIndex = computed(
|
|
37
|
+
() => featuredClients.value.findIndex(
|
|
38
|
+
(featuredClient) => __props.selectedClient === featuredClient.id
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
const wrapper = useTemplateRef("wrapper-ref");
|
|
42
|
+
const onTabSelect = (i) => {
|
|
43
|
+
const client = featuredClients.value[i];
|
|
44
|
+
if (!client || !wrapper.value) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
emitCustomEvent(wrapper.value, "scalar-update-selected-client", client.id);
|
|
48
|
+
};
|
|
49
|
+
const installationInstructions = computed(() => {
|
|
50
|
+
const XScalarSdkInstallation = __props.document.info["x-scalar-sdk-installation"];
|
|
51
|
+
if (!Array.isArray(XScalarSdkInstallation) || !XScalarSdkInstallation?.length) {
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
const instruction = XScalarSdkInstallation.find((instruction2) => {
|
|
55
|
+
const targetKey = __props.selectedClient?.split("/")[0]?.toLowerCase();
|
|
56
|
+
return instruction2.lang.toLowerCase() === targetKey;
|
|
57
|
+
});
|
|
58
|
+
if (!instruction) {
|
|
59
|
+
return void 0;
|
|
60
|
+
}
|
|
61
|
+
return instruction;
|
|
62
|
+
});
|
|
63
|
+
__expose({
|
|
64
|
+
selectedClientOption
|
|
65
|
+
});
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return _ctx.clientOptions.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
68
|
+
createVNode(unref(TabGroup), {
|
|
69
|
+
manual: "",
|
|
70
|
+
selectedIndex: tabIndex.value,
|
|
71
|
+
onChange: onTabSelect
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [
|
|
74
|
+
createElementVNode("div", {
|
|
75
|
+
id: unref(headingId),
|
|
76
|
+
class: "client-libraries-heading"
|
|
77
|
+
}, " Client Libraries ", 8, _hoisted_2),
|
|
78
|
+
createVNode(unref(TabList), {
|
|
79
|
+
"aria-labelledby": unref(headingId),
|
|
80
|
+
class: "client-libraries-list"
|
|
81
|
+
}, {
|
|
82
|
+
default: withCtx(() => [
|
|
83
|
+
createVNode(ClientSelector, {
|
|
84
|
+
clientOptions: _ctx.clientOptions,
|
|
85
|
+
featuredClients: featuredClients.value,
|
|
86
|
+
morePanel: unref(morePanel),
|
|
87
|
+
selectedClient: _ctx.selectedClient
|
|
88
|
+
}, null, 8, ["clientOptions", "featuredClients", "morePanel", "selectedClient"])
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["aria-labelledby"]),
|
|
92
|
+
createVNode(unref(TabPanels), null, {
|
|
93
|
+
default: withCtx(() => [
|
|
94
|
+
installationInstructions.value?.source || installationInstructions.value?.description ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
95
|
+
installationInstructions.value.description ? (openBlock(), createElementBlock("div", {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: normalizeClass(["selected-client card-footer -outline-offset-2", installationInstructions.value.source && "rounded-b-none"]),
|
|
98
|
+
role: "tabpanel",
|
|
99
|
+
tabindex: "0"
|
|
100
|
+
}, [
|
|
101
|
+
createVNode(unref(ScalarMarkdown), {
|
|
102
|
+
value: installationInstructions.value.description
|
|
103
|
+
}, null, 8, ["value"])
|
|
104
|
+
], 2)) : createCommentVNode("", true),
|
|
105
|
+
installationInstructions.value.source ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
106
|
+
createVNode(unref(ScalarCodeBlock), {
|
|
107
|
+
class: "rounded-t-none rounded-b-lg px-3 py-2 -outline-offset-1 has-focus:outline",
|
|
108
|
+
content: installationInstructions.value.source,
|
|
109
|
+
copy: true,
|
|
110
|
+
lang: "shell"
|
|
111
|
+
}, null, 8, ["content"])
|
|
112
|
+
])) : createCommentVNode("", true)
|
|
113
|
+
], 64)) : unref(isFeaturedClient)(_ctx.selectedClient) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(featuredClients.value, (client) => {
|
|
114
|
+
return openBlock(), createBlock(unref(TabPanel), {
|
|
115
|
+
key: client.id,
|
|
116
|
+
class: "selected-client card-footer -outline-offset-2"
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createTextVNode(toDisplayString(client.title), 1)
|
|
120
|
+
]),
|
|
121
|
+
_: 2
|
|
122
|
+
}, 1024);
|
|
123
|
+
}), 128)) : (openBlock(), createElementBlock("div", {
|
|
124
|
+
key: 2,
|
|
125
|
+
id: unref(morePanel),
|
|
126
|
+
class: "selected-client card-footer -outline-offset-2",
|
|
127
|
+
role: "tabpanel",
|
|
128
|
+
tabindex: "0"
|
|
129
|
+
}, toDisplayString(selectedClientOption.value?.title), 9, _hoisted_4))
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
})
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["selectedIndex"])
|
|
136
|
+
], 512)) : createCommentVNode("", true);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
export {
|
|
141
|
+
_sfc_main as default
|
|
142
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./ClientSelector.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const ClientSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f0cbe3aa"]]);
|
|
5
|
+
export {
|
|
6
|
+
ClientSelector as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, createElementBlock, openBlock, createVNode, Fragment, renderList, createBlock, unref, normalizeClass, withCtx, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { Tab } from "@headlessui/vue";
|
|
3
|
+
import { findClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
+
import { ScalarIcon, ScalarCombobox } from "@scalar/components";
|
|
5
|
+
import { freezeElement } from "@scalar/helpers/dom/freeze-element";
|
|
6
|
+
import { emitCustomEvent } from "@scalar/workspace-store/events";
|
|
7
|
+
import { isFeaturedClient } from "./featured-clients.js";
|
|
8
|
+
const _hoisted_1 = { class: "client-libraries-text" };
|
|
9
|
+
const _hoisted_2 = {
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
class: "client-libraries-icon__more"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_3 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "client-libraries-icon",
|
|
16
|
+
height: "50",
|
|
17
|
+
role: "presentation",
|
|
18
|
+
viewBox: "0 0 50 50",
|
|
19
|
+
width: "50",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_4 = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "client-libraries-text client-libraries-text-more"
|
|
25
|
+
};
|
|
26
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
|
+
__name: "ClientSelector",
|
|
28
|
+
props: {
|
|
29
|
+
clientOptions: {},
|
|
30
|
+
selectedClient: {},
|
|
31
|
+
featuredClients: {}
|
|
32
|
+
},
|
|
33
|
+
setup(__props) {
|
|
34
|
+
const containerRef = ref();
|
|
35
|
+
const getIconByLanguageKey = (targetKey) => `programming-language-${targetKey === "js" ? "javascript" : targetKey}`;
|
|
36
|
+
const selectClient = (option) => {
|
|
37
|
+
if (!containerRef.value) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const unfreeze = freezeElement(containerRef.value);
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
unfreeze();
|
|
43
|
+
}, 300);
|
|
44
|
+
emitCustomEvent(
|
|
45
|
+
containerRef.value,
|
|
46
|
+
"scalar-update-selected-client",
|
|
47
|
+
option.id
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
const selectedTargetKey = computed(
|
|
51
|
+
() => __props.selectedClient?.split("/")[0]
|
|
52
|
+
);
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("div", {
|
|
55
|
+
ref_key: "containerRef",
|
|
56
|
+
ref: containerRef,
|
|
57
|
+
class: "client-libraries-content"
|
|
58
|
+
}, [
|
|
59
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.featuredClients, (featuredClient) => {
|
|
60
|
+
return openBlock(), createBlock(unref(Tab), {
|
|
61
|
+
key: featuredClient.clientKey,
|
|
62
|
+
class: normalizeClass(["client-libraries rendered-code-sdks", {
|
|
63
|
+
"client-libraries__active": featuredClient.id === _ctx.selectedClient
|
|
64
|
+
}])
|
|
65
|
+
}, {
|
|
66
|
+
default: withCtx(() => [
|
|
67
|
+
createElementVNode("div", {
|
|
68
|
+
class: normalizeClass(`client-libraries-icon__${featuredClient.targetKey}`)
|
|
69
|
+
}, [
|
|
70
|
+
createVNode(unref(ScalarIcon), {
|
|
71
|
+
class: "client-libraries-icon",
|
|
72
|
+
icon: getIconByLanguageKey(featuredClient.targetKey)
|
|
73
|
+
}, null, 8, ["icon"])
|
|
74
|
+
], 2),
|
|
75
|
+
createElementVNode("span", _hoisted_1, toDisplayString(featuredClient.targetTitle), 1)
|
|
76
|
+
]),
|
|
77
|
+
_: 2
|
|
78
|
+
}, 1032, ["class"]);
|
|
79
|
+
}), 128)),
|
|
80
|
+
createVNode(unref(ScalarCombobox), {
|
|
81
|
+
modelValue: unref(findClient)(_ctx.clientOptions, _ctx.selectedClient),
|
|
82
|
+
options: _ctx.clientOptions,
|
|
83
|
+
placement: "bottom-end",
|
|
84
|
+
teleport: "",
|
|
85
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectClient($event))
|
|
86
|
+
}, {
|
|
87
|
+
default: withCtx(() => [
|
|
88
|
+
createElementVNode("button", {
|
|
89
|
+
class: normalizeClass(["client-libraries client-libraries__select", {
|
|
90
|
+
"client-libraries__active": _ctx.selectedClient && !unref(isFeaturedClient)(_ctx.selectedClient)
|
|
91
|
+
}]),
|
|
92
|
+
type: "button"
|
|
93
|
+
}, [
|
|
94
|
+
createElementVNode("div", _hoisted_2, [
|
|
95
|
+
_ctx.selectedClient && !unref(isFeaturedClient)(_ctx.selectedClient) ? (openBlock(), createElementBlock("div", {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: normalizeClass(`client-libraries-icon__${selectedTargetKey.value}`)
|
|
98
|
+
}, [
|
|
99
|
+
selectedTargetKey.value ? (openBlock(), createBlock(unref(ScalarIcon), {
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "client-libraries-icon",
|
|
102
|
+
icon: getIconByLanguageKey(selectedTargetKey.value)
|
|
103
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
104
|
+
], 2)) : (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[1] || (_cache[1] = [
|
|
105
|
+
createElementVNode("g", {
|
|
106
|
+
fill: "currentColor",
|
|
107
|
+
"fill-rule": "nonzero"
|
|
108
|
+
}, [
|
|
109
|
+
createElementVNode("path", { d: "M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0" })
|
|
110
|
+
], -1)
|
|
111
|
+
])]))
|
|
112
|
+
]),
|
|
113
|
+
_ctx.clientOptions.length ? (openBlock(), createElementBlock("span", _hoisted_4, " More ")) : createCommentVNode("", true),
|
|
114
|
+
_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Select from all clients", -1))
|
|
115
|
+
], 2)
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, ["modelValue", "options"])
|
|
119
|
+
], 512);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
export {
|
|
124
|
+
_sfc_main as default
|
|
125
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const FEATURED_CLIENTS = [
|
|
2
|
+
"shell/curl",
|
|
3
|
+
"ruby/native",
|
|
4
|
+
"node/undici",
|
|
5
|
+
"php/guzzle",
|
|
6
|
+
"python/python3"
|
|
7
|
+
];
|
|
8
|
+
const isFeaturedClient = (clientId, featuredClients = FEATURED_CLIENTS) => Boolean(clientId && featuredClients.includes(clientId));
|
|
9
|
+
const getFeaturedClients = (clientOptions, featuredClients = FEATURED_CLIENTS) => {
|
|
10
|
+
const clientMap = /* @__PURE__ */ new Map();
|
|
11
|
+
for (const group of clientOptions) {
|
|
12
|
+
for (const option of group.options) {
|
|
13
|
+
clientMap.set(option.id, option);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return featuredClients.flatMap((clientId) => {
|
|
17
|
+
const client = clientMap.get(clientId);
|
|
18
|
+
return client ?? [];
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
getFeaturedClients,
|
|
23
|
+
isFeaturedClient
|
|
24
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ClientLibraries } from './ClientLibraries.vue';
|
|
1
|
+
export { default as ClientLibraries } from './ClientLibraries.vue.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -10,7 +10,7 @@ import Schema from "./Schema.vue.js";
|
|
|
10
10
|
import _sfc_main$2 from "./SchemaComposition.vue.js";
|
|
11
11
|
import SchemaEnumValues from "./SchemaEnumValues.vue.js";
|
|
12
12
|
import SchemaPropertyHeading from "./SchemaPropertyHeading.vue.js";
|
|
13
|
-
import _sfc_main$1 from "../../Anchor/WithBreadcrumb.
|
|
13
|
+
import _sfc_main$1 from "../../Anchor/WithBreadcrumb.vue.js";
|
|
14
14
|
import _sfc_main$3 from "../../../features/specification-extension/SpecificationExtension.vue2.js";
|
|
15
15
|
const _hoisted_1 = {
|
|
16
16
|
key: 0,
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
export { ClientLibraries } from './ClientLibraries';
|
|
1
2
|
export { default as Content } from './Content.vue.js';
|
|
3
|
+
export { Model, Models } from './Models';
|
|
4
|
+
export { default as TraversedEntry } from './Operations/TraversedEntry.vue.js';
|
|
5
|
+
export { Schema, SchemaHeading, SchemaProperty } from './Schema';
|
|
6
|
+
export { Tag } from './Tags';
|
|
2
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export { default as ClassicHeader } from './ClassicHeader.vue.js';
|
|
2
|
+
export { ClientLibraries, Content, Model, Models, Schema, SchemaHeading, SchemaProperty, Tag, TraversedEntry, } from './Content';
|
|
1
3
|
export { default as ApiReferenceContent } from './Content/Content.vue.js';
|
|
4
|
+
export { HttpMethod } from './HttpMethod';
|
|
2
5
|
export { default as IntersectionObserver } from './IntersectionObserver.vue.js';
|
|
6
|
+
export { default as Lazy } from './Lazy/Lazy.vue.js';
|
|
7
|
+
export { default as MobileHeader } from './MobileHeader.vue.js';
|
|
8
|
+
export { OperationsList } from './OperationsList';
|
|
9
|
+
export { RenderPlugins } from './RenderPlugins';
|
|
10
|
+
export { SectionContainer } from './Section';
|
|
11
|
+
export { SectionFlare } from './SectionFlare';
|
|
3
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EACL,eAAe,EACf,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,cAAc,EACd,GAAG,EACH,cAAc,GACf,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,40 @@
|
|
|
1
|
-
import { default as default2 } from "./
|
|
1
|
+
import { default as default2 } from "./ClassicHeader.vue.js";
|
|
2
|
+
import { default as default3, default as default4 } from "./Content/Content.vue.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import { default as
|
|
4
|
+
import { default as default5 } from "./IntersectionObserver.vue.js";
|
|
5
|
+
import { default as default6 } from "./Lazy/Lazy.vue.js";
|
|
6
|
+
import { default as default7 } from "./MobileHeader.vue.js";
|
|
7
|
+
import { default as default8 } from "./Content/Models/Model.vue.js";
|
|
8
|
+
import { default as default9 } from "./Content/Models/ModelTag.vue.js";
|
|
9
|
+
import { default as default10 } from "./Content/Tags/Tag.vue.js";
|
|
10
|
+
import { default as default11 } from "./Content/Operations/TraversedEntry.vue.js";
|
|
11
|
+
import { default as default12 } from "./HttpMethod/HttpMethod.vue.js";
|
|
12
|
+
import { default as default13 } from "./RenderPlugins/RenderPlugins.vue.js";
|
|
13
|
+
import { default as default14 } from "./Content/ClientLibraries/ClientLibraries.vue.js";
|
|
14
|
+
import { default as default15 } from "./Content/Schema/Schema.vue.js";
|
|
15
|
+
import { default as default16 } from "./Content/Schema/SchemaHeading.vue.js";
|
|
16
|
+
import { default as default17 } from "./Content/Schema/SchemaProperty.vue.js";
|
|
17
|
+
import { default as default18 } from "./OperationsList/OperationsList.vue.js";
|
|
18
|
+
import { default as default19 } from "./Section/SectionContainer.vue.js";
|
|
19
|
+
import { default as default20 } from "./SectionFlare/SectionFlare.vue.js";
|
|
4
20
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
21
|
+
default3 as ApiReferenceContent,
|
|
22
|
+
default2 as ClassicHeader,
|
|
23
|
+
default14 as ClientLibraries,
|
|
24
|
+
default4 as Content,
|
|
25
|
+
default12 as HttpMethod,
|
|
26
|
+
default5 as IntersectionObserver,
|
|
27
|
+
default6 as Lazy,
|
|
28
|
+
default7 as MobileHeader,
|
|
29
|
+
default8 as Model,
|
|
30
|
+
default9 as Models,
|
|
31
|
+
default18 as OperationsList,
|
|
32
|
+
default13 as RenderPlugins,
|
|
33
|
+
default15 as Schema,
|
|
34
|
+
default16 as SchemaHeading,
|
|
35
|
+
default17 as SchemaProperty,
|
|
36
|
+
default19 as SectionContainer,
|
|
37
|
+
default20 as SectionFlare,
|
|
38
|
+
default10 as Tag,
|
|
39
|
+
default11 as TraversedEntry
|
|
7
40
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as DocumentSelector } from './multiple-documents/DocumentSelector.vue.js';
|
|
2
|
+
export { Operation } from './Operation';
|
|
3
|
+
export { default as SearchButton } from './Search/components/SearchButton.vue.js';
|
|
4
|
+
export { getXKeysFromObject } from './specification-extension';
|
|
5
|
+
export { default as ApiReferenceToolbar } from './toolbar/ApiReferenceToolbar.vue.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as default2 } from "./multiple-documents/DocumentSelector.vue.js";
|
|
2
|
+
import { default as default3 } from "./Search/components/SearchButton.vue.js";
|
|
3
|
+
import { default as default4 } from "./toolbar/ApiReferenceToolbar.vue.js";
|
|
4
|
+
import { default as default5 } from "./Operation/Operation.vue.js";
|
|
5
|
+
import { getXKeysFromObject } from "./specification-extension/helpers.js";
|
|
6
|
+
export {
|
|
7
|
+
default4 as ApiReferenceToolbar,
|
|
8
|
+
default2 as DocumentSelector,
|
|
9
|
+
default5 as Operation,
|
|
10
|
+
default3 as SearchButton,
|
|
11
|
+
getXKeysFromObject
|
|
12
|
+
};
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { useLegacyStoreEvents } from '../hooks/use-legacy-store-events.js';
|
|
2
2
|
export { useWorkspaceStoreEvents } from '../hooks/use-workspace-store-events.js';
|
|
3
|
+
export { getSystemModePreference } from './color-mode.js';
|
|
4
|
+
export { convertSecurityScheme } from './convert-security-scheme.js';
|
|
3
5
|
export { downloadDocument } from './download.js';
|
|
4
6
|
export { getIdFromUrl, makeUrlFromId } from './id-routing.js';
|
|
5
|
-
export { firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from './lazy-bus.js';
|
|
6
|
-
export { mapConfigToClientStore } from './map-config-to-client-store.js';
|
|
7
|
+
export { blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from './lazy-bus.js';
|
|
8
|
+
export { type SecuritySchemeGetter, mapConfigToClientStore } from './map-config-to-client-store.js';
|
|
7
9
|
export { mapConfigToWorkspaceStore } from './map-config-to-workspace-store.js';
|
|
8
10
|
export { mapConfiguration } from './map-configuration.js';
|
|
9
11
|
export { type NormalizedConfiguration, normalizeConfigurations } from './normalize-configurations.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACxG,OAAO,EAAE,KAAK,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAChG,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,KAAK,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { useLegacyStoreEvents } from "../hooks/use-legacy-store-events.js";
|
|
2
2
|
import { useWorkspaceStoreEvents } from "../hooks/use-workspace-store-events.js";
|
|
3
|
+
import { getSystemModePreference } from "./color-mode.js";
|
|
4
|
+
import { convertSecurityScheme } from "./convert-security-scheme.js";
|
|
3
5
|
import { downloadDocument } from "./download.js";
|
|
4
6
|
import { getIdFromUrl, makeUrlFromId } from "./id-routing.js";
|
|
5
|
-
import { firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from "./lazy-bus.js";
|
|
7
|
+
import { blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from "./lazy-bus.js";
|
|
6
8
|
import { mapConfigToClientStore } from "./map-config-to-client-store.js";
|
|
7
9
|
import { mapConfigToWorkspaceStore } from "./map-config-to-workspace-store.js";
|
|
8
10
|
import { mapConfiguration } from "./map-configuration.js";
|
|
9
11
|
import { normalizeConfigurations } from "./normalize-configurations.js";
|
|
10
12
|
export {
|
|
13
|
+
blockIntersection,
|
|
14
|
+
convertSecurityScheme,
|
|
11
15
|
downloadDocument,
|
|
12
16
|
firstLazyLoadComplete,
|
|
13
17
|
getIdFromUrl,
|
|
18
|
+
getSystemModePreference,
|
|
14
19
|
intersectionEnabled,
|
|
15
20
|
makeUrlFromId,
|
|
16
21
|
mapConfigToClientStore,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useIntersection } from "./use-intersection.js";
|
|
2
|
+
import { useLegacyStoreEvents } from "./use-legacy-store-events.js";
|
|
3
|
+
import { useWorkspaceStoreEvents } from "./use-workspace-store-events.js";
|
|
4
|
+
export {
|
|
5
|
+
useIntersection,
|
|
6
|
+
useLegacyStoreEvents,
|
|
7
|
+
useWorkspaceStoreEvents
|
|
8
|
+
};
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createPluginManager, type ApiReferencePlugin, type PluginManager, } from '../plugins/plugin-manager.js';
|
|
2
1
|
export { PLUGIN_MANAGER_SYMBOL, usePluginManager } from '../plugins/hooks/usePluginManager.js';
|
|
2
|
+
export { type ApiReferencePlugin, type PluginManager, createPluginManager, } from '../plugins/plugin-manager.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAC1F,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,GACpB,MAAM,0BAA0B,CAAA"}
|