@scalar/api-reference 1.31.8 → 1.31.9
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 +45 -0
- package/dist/browser/standalone.js +18613 -18470
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +10 -30
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +240 -222
- package/dist/components/Content/Content.vue.d.ts +2 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +84 -74
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +84 -86
- package/dist/components/Content/Models/Models.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue2.js +4 -4
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +53 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
- 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 +46 -47
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +45 -47
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +40 -41
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
- package/dist/components/MobileHeader.vue.d.ts +1 -8
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +1 -1
- package/dist/components/MobileHeader.vue2.js +19 -19
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
- package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
- package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
- package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
- package/dist/features/Operation/Operation.vue.d.ts +0 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +31 -34
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
- package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +12 -13
- package/dist/features/Operation/index.d.ts +0 -1
- package/dist/features/Operation/index.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
- 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 +85 -72
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
- 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 +114 -98
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +61 -64
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
- package/dist/features/sidebar/hooks/useSidebar.js +18 -0
- package/dist/features/sidebar/index.d.ts +2 -1
- package/dist/features/sidebar/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
- package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
- package/dist/features/traverse-schema/index.d.ts +3 -3
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +8 -5
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts +2 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +72 -88
- package/dist/hooks/useMultipleDocuments.d.ts +6 -6
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +14 -9
- package/dist/hooks/useOperation.d.ts +7 -7
- package/dist/hooks/useOperation.d.ts.map +1 -1
- package/dist/hooks/useOperation.js +13 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -25
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/libs/openapi.d.ts +3 -4
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +8 -9
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
- package/package.json +16 -16
- package/dist/components/Content/Webhooks/index.d.ts +0 -2
- package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
- package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.js +0 -7
- package/dist/features/Operation/Webhooks.vue2.js +0 -121
- package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
- package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/Webhook.vue.js +0 -7
- package/dist/features/Operation/components/Webhook.vue2.js +0 -29
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
- package/dist/hooks/useSidebar.d.ts +0 -53
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -248
- package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Once the migration to the new workspace store is complete the top level component composition
|
|
5
|
-
* can be simplified to handle two use cases:
|
|
6
|
-
*
|
|
7
|
-
* - Externally provided store (store is initialized outside of the component and passed in)
|
|
8
|
-
* - Standalone mode (store is initialized inside the component and configuration is merged)
|
|
9
|
-
*
|
|
10
|
-
* The configuration should be merged with the workspace store and all components should consume
|
|
11
|
-
* only portions of the workspace store.
|
|
12
|
-
*
|
|
13
|
-
* No state updates should be handled in children of this components. When updates are required
|
|
14
|
-
* a custom event should be emitted to the workspace store and handled here.
|
|
15
|
-
*/
|
|
16
|
-
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
1
|
+
import type { AnyApiReferenceConfiguration } from '@scalar/types';
|
|
2
|
+
import { type WorkspaceStore } from '@scalar/workspace-store/client';
|
|
17
3
|
type __VLS_Props = {
|
|
18
|
-
configuration
|
|
4
|
+
configuration?: AnyApiReferenceConfiguration;
|
|
5
|
+
getWorkspaceStore: () => WorkspaceStore;
|
|
19
6
|
};
|
|
20
7
|
declare function __VLS_template(): {
|
|
21
8
|
attrs: Partial<{}>;
|
|
22
9
|
slots: {
|
|
23
10
|
footer?(_: {}): any;
|
|
24
11
|
footer?(_: {}): any;
|
|
25
|
-
"document-selector"?(_: {}): any;
|
|
26
12
|
"sidebar-start"?(_: {}): any;
|
|
27
13
|
};
|
|
28
14
|
refs: {};
|
|
@@ -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":"AAkOA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAuBpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,iBAAiB,EAAE,MAAM,cAAc,CAAA;CACxC,CAAC;AAqIF,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,58 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useColorMode as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { defineComponent as V, ref as i, toRef as y, provide as b, shallowRef as E, onServerPrefetch as R, onMounted as $, watch as c, computed as w, createElementBlock as A, openBlock as f, Fragment as B, createBlock as N, createCommentVNode as T, createVNode as p, unref as t, resolveDynamicComponent as F, withCtx as a, createTextVNode as I, toDisplayString as P, renderSlot as d, isRef as W } from "vue";
|
|
2
|
+
import { useColorMode as L } from "@scalar/use-hooks/useColorMode";
|
|
3
|
+
import { useSeoMeta as U } from "@unhead/vue";
|
|
4
|
+
import { useFavicon as _ } from "@vueuse/core";
|
|
5
|
+
import O from "../components/ApiReferenceLayout.vue.js";
|
|
6
|
+
import { useMultipleDocuments as Y } from "../hooks/useMultipleDocuments.js";
|
|
7
|
+
import { NAV_STATE_SYMBOL as j } from "../hooks/useNavState.js";
|
|
8
|
+
import { onCustomEvent as q } from "./events/listeners.js";
|
|
9
|
+
import z from "../components/DocumentSelector/DocumentSelector.vue.js";
|
|
10
|
+
const te = /* @__PURE__ */ V({
|
|
9
11
|
__name: "ApiReferenceWorkspace",
|
|
10
12
|
props: {
|
|
11
|
-
configuration: {}
|
|
13
|
+
configuration: {},
|
|
14
|
+
getWorkspaceStore: { type: Function }
|
|
12
15
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
setup(k) {
|
|
17
|
+
const u = k, {
|
|
18
|
+
availableDocuments: v,
|
|
19
|
+
selectedConfiguration: o,
|
|
20
|
+
selectedDocumentIndex: s,
|
|
21
|
+
isIntersectionEnabled: g,
|
|
22
|
+
hash: C,
|
|
23
|
+
hashPrefix: M
|
|
24
|
+
} = Y({
|
|
25
|
+
configuration: y(u, "configuration"),
|
|
26
|
+
isIntersectionEnabled: i(!1),
|
|
27
|
+
hash: i(""),
|
|
28
|
+
hashPrefix: i("")
|
|
17
29
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
b(j, { isIntersectionEnabled: g, hash: C, hashPrefix: M });
|
|
31
|
+
const D = E(null), n = u.getWorkspaceStore();
|
|
32
|
+
R(() => {
|
|
33
|
+
}), $(() => {
|
|
34
|
+
}), q(D, "scalar-update-dark-mode", (e) => {
|
|
35
|
+
n.update("x-scalar-dark-mode", e.data.value);
|
|
21
36
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
() =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
const { toggleColorMode: S, isDarkMode: h } = L({
|
|
38
|
+
initialColorMode: o.value.darkMode ? "dark" : void 0,
|
|
39
|
+
overrideColorMode: o.value.forceDarkModeState
|
|
40
|
+
});
|
|
41
|
+
c(
|
|
42
|
+
() => o.value.darkMode,
|
|
43
|
+
(e) => n.update("x-scalar-dark-mode", !!e)
|
|
44
|
+
), c(
|
|
45
|
+
() => h.value,
|
|
46
|
+
(e) => n.update("x-scalar-dark-mode", e)
|
|
47
|
+
), o.value.metaData && U(o.value.metaData);
|
|
48
|
+
const x = w(() => o.value.favicon);
|
|
49
|
+
return _(x), (e, r) => {
|
|
50
|
+
var m;
|
|
51
|
+
return f(), A(B, null, [
|
|
52
|
+
(m = t(o)) != null && m.customCss ? (f(), N(F("style"), { key: 0 }, {
|
|
53
|
+
default: a(() => [
|
|
54
|
+
I(P(t(o).customCss), 1)
|
|
36
55
|
]),
|
|
37
56
|
_: 1
|
|
38
|
-
})) :
|
|
39
|
-
|
|
40
|
-
configuration: o
|
|
41
|
-
isDark: !!
|
|
42
|
-
onToggleDarkMode:
|
|
43
|
-
onUpdateContent:
|
|
57
|
+
})) : T("", !0),
|
|
58
|
+
p(O, {
|
|
59
|
+
configuration: t(o),
|
|
60
|
+
isDark: !!t(n).workspace["x-scalar-dark-mode"],
|
|
61
|
+
onToggleDarkMode: r[1] || (r[1] = () => t(S)()),
|
|
62
|
+
onUpdateContent: r[2] || (r[2] = (l) => e.$emit("updateContent", l))
|
|
44
63
|
}, {
|
|
45
|
-
footer:
|
|
46
|
-
|
|
64
|
+
footer: a(() => [
|
|
65
|
+
d(e.$slots, "footer")
|
|
47
66
|
]),
|
|
48
|
-
"content-end":
|
|
49
|
-
|
|
67
|
+
"content-end": a(() => [
|
|
68
|
+
d(e.$slots, "footer")
|
|
50
69
|
]),
|
|
51
|
-
"document-selector":
|
|
52
|
-
|
|
70
|
+
"document-selector": a(() => [
|
|
71
|
+
p(t(z), {
|
|
72
|
+
modelValue: t(s),
|
|
73
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => W(s) ? s.value = l : null),
|
|
74
|
+
options: t(v)
|
|
75
|
+
}, null, 8, ["modelValue", "options"])
|
|
53
76
|
]),
|
|
54
|
-
"sidebar-start":
|
|
55
|
-
|
|
77
|
+
"sidebar-start": a(() => [
|
|
78
|
+
d(e.$slots, "sidebar-start")
|
|
56
79
|
]),
|
|
57
80
|
_: 3
|
|
58
81
|
}, 8, ["configuration", "isDark"])
|
|
@@ -61,5 +84,5 @@ const q = /* @__PURE__ */ g({
|
|
|
61
84
|
}
|
|
62
85
|
});
|
|
63
86
|
export {
|
|
64
|
-
|
|
87
|
+
te as default
|
|
65
88
|
};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.31.
|
|
23
|
+
"version": "1.31.9",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -54,20 +54,20 @@
|
|
|
54
54
|
"nanoid": "^5.1.5",
|
|
55
55
|
"vue": "^3.5.12",
|
|
56
56
|
"zod": "3.24.1",
|
|
57
|
-
"@scalar/api-client": "2.5.
|
|
58
|
-
"@scalar/code-highlight": "0.1.
|
|
59
|
-
"@scalar/
|
|
60
|
-
"@scalar/
|
|
61
|
-
"@scalar/
|
|
62
|
-
"@scalar/
|
|
63
|
-
"@scalar/openapi-
|
|
64
|
-
"@scalar/
|
|
65
|
-
"@scalar/
|
|
66
|
-
"@scalar/themes": "0.13.
|
|
67
|
-
"@scalar/types": "0.2.2",
|
|
57
|
+
"@scalar/api-client": "2.5.6",
|
|
58
|
+
"@scalar/code-highlight": "0.1.3",
|
|
59
|
+
"@scalar/components": "0.14.8",
|
|
60
|
+
"@scalar/oas-utils": "0.4.5",
|
|
61
|
+
"@scalar/helpers": "0.0.4",
|
|
62
|
+
"@scalar/openapi-parser": "0.17.0",
|
|
63
|
+
"@scalar/openapi-types": "0.3.3",
|
|
64
|
+
"@scalar/icons": "0.4.3",
|
|
65
|
+
"@scalar/snippetz": "0.3.1",
|
|
66
|
+
"@scalar/themes": "0.13.3",
|
|
68
67
|
"@scalar/use-hooks": "0.2.2",
|
|
68
|
+
"@scalar/types": "0.2.3",
|
|
69
69
|
"@scalar/use-toasts": "0.8.0",
|
|
70
|
-
"@scalar/workspace-store": "0.
|
|
70
|
+
"@scalar/workspace-store": "0.4.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@tailwindcss/vite": "^4.1.7",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"vite-plugin-banner": "^0.7.1",
|
|
85
85
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
86
86
|
"vitest": "^1.6.0",
|
|
87
|
-
"@scalar/
|
|
88
|
-
"@scalar/galaxy": "0.5.
|
|
89
|
-
"@scalar/
|
|
87
|
+
"@scalar/react-renderer": "0.2.0",
|
|
88
|
+
"@scalar/galaxy": "0.5.1",
|
|
89
|
+
"@scalar/build-tooling": "0.2.3"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Webhooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0CAA0C,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Webhooks } from '@scalar/types/legacy';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
webhooks: Webhooks;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
-
export default _default;
|
|
7
|
-
//# sourceMappingURL=Webhooks.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Webhooks.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Webhooks.vue"],"names":[],"mappings":"AAsIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAmBpD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAC;;AA6MF,wBAMG"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { defineComponent as O, computed as m, useId as H, createBlock as n, createCommentVNode as d, openBlock as r, unref as e, withCtx as s, createVNode as i, createElementVNode as z, createTextVNode as S, normalizeClass as A, createElementBlock as b, Fragment as h, renderList as _, toDisplayString as E } from "vue";
|
|
2
|
-
import { ScalarMarkdown as M } from "@scalar/components";
|
|
3
|
-
import T from "../../components/ShowMoreButton.vue.js";
|
|
4
|
-
import { useNavState as j } from "../../hooks/useNavState.js";
|
|
5
|
-
import { useSidebar as F } from "../../hooks/useSidebar.js";
|
|
6
|
-
import K from "./components/Webhook.vue.js";
|
|
7
|
-
import D from "../../components/Section/SectionContainer.vue.js";
|
|
8
|
-
import X from "../../components/Section/Section.vue.js";
|
|
9
|
-
import Y from "../../components/Section/SectionHeader.vue.js";
|
|
10
|
-
import g from "../../components/Section/SectionHeaderTag.vue.js";
|
|
11
|
-
import I from "../../components/Content/Lazy/Lazy.vue2.js";
|
|
12
|
-
import $ from "../../components/Section/CompactSection.vue.js";
|
|
13
|
-
const N = 10, te = /* @__PURE__ */ O({
|
|
14
|
-
__name: "Webhooks",
|
|
15
|
-
props: {
|
|
16
|
-
webhooks: {}
|
|
17
|
-
},
|
|
18
|
-
setup(W) {
|
|
19
|
-
const C = W, u = m(() => Object.keys(C.webhooks ?? {})), w = H(), { getWebhookId: k } = j(), { collapsedSidebarItems: B } = F(), c = m(
|
|
20
|
-
() => u.value.length <= N || B[k()]
|
|
21
|
-
), L = m(() => {
|
|
22
|
-
const t = u.value;
|
|
23
|
-
return c.value ? t : t.slice(0, N);
|
|
24
|
-
});
|
|
25
|
-
return (t, f) => u.value.length ? (r(), n(e(D), {
|
|
26
|
-
key: 0,
|
|
27
|
-
id: "webhooks"
|
|
28
|
-
}, {
|
|
29
|
-
default: s(() => [
|
|
30
|
-
i(e(X), { "aria-labelledby": e(w) }, {
|
|
31
|
-
default: s(() => [
|
|
32
|
-
i(e(Y), null, {
|
|
33
|
-
default: s(() => [
|
|
34
|
-
i(e(g), {
|
|
35
|
-
id: e(w),
|
|
36
|
-
level: 2
|
|
37
|
-
}, {
|
|
38
|
-
default: s(() => f[0] || (f[0] = [
|
|
39
|
-
S(" Webhooks ")
|
|
40
|
-
])),
|
|
41
|
-
_: 1
|
|
42
|
-
}, 8, ["id"])
|
|
43
|
-
]),
|
|
44
|
-
_: 1
|
|
45
|
-
}),
|
|
46
|
-
i(e(I), {
|
|
47
|
-
id: "webhooks",
|
|
48
|
-
isLazy: !1
|
|
49
|
-
}),
|
|
50
|
-
z("div", {
|
|
51
|
-
class: A(["webhooks-list", { "webhooks-list-truncated": !c.value }])
|
|
52
|
-
}, [
|
|
53
|
-
(r(!0), b(h, null, _(L.value, (o) => {
|
|
54
|
-
var p;
|
|
55
|
-
return r(), b(h, { key: o }, [
|
|
56
|
-
(r(!0), b(h, null, _(Object.keys(
|
|
57
|
-
(p = t.webhooks) == null ? void 0 : p[o]
|
|
58
|
-
), (l) => (r(), n(e(I), {
|
|
59
|
-
id: e(k)({ name: o, method: l }),
|
|
60
|
-
key: l,
|
|
61
|
-
isLazy: ""
|
|
62
|
-
}, {
|
|
63
|
-
default: s(() => {
|
|
64
|
-
var y;
|
|
65
|
-
return [
|
|
66
|
-
(y = t.webhooks) != null && y[o] ? (r(), n(e($), {
|
|
67
|
-
key: 0,
|
|
68
|
-
id: e(k)({ name: o, method: l }),
|
|
69
|
-
class: "webhooks-list-item",
|
|
70
|
-
label: o
|
|
71
|
-
}, {
|
|
72
|
-
heading: s(() => [
|
|
73
|
-
i(e(g), { level: 3 }, {
|
|
74
|
-
default: s(() => {
|
|
75
|
-
var a;
|
|
76
|
-
return [
|
|
77
|
-
S(E((a = t.webhooks[o][l]) == null ? void 0 : a.name), 1)
|
|
78
|
-
];
|
|
79
|
-
}),
|
|
80
|
-
_: 2
|
|
81
|
-
}, 1024)
|
|
82
|
-
]),
|
|
83
|
-
default: s(() => {
|
|
84
|
-
var a, v;
|
|
85
|
-
return [
|
|
86
|
-
(a = t.webhooks[o][l]) != null && a.description ? (r(), n(e(M), {
|
|
87
|
-
key: 0,
|
|
88
|
-
class: "webhook-section-description",
|
|
89
|
-
value: (v = t.webhooks[o][l]) == null ? void 0 : v.description,
|
|
90
|
-
withImages: ""
|
|
91
|
-
}, null, 8, ["value"])) : d("", !0),
|
|
92
|
-
i(K, {
|
|
93
|
-
webhook: t.webhooks[o][l]
|
|
94
|
-
}, null, 8, ["webhook"])
|
|
95
|
-
];
|
|
96
|
-
}),
|
|
97
|
-
_: 2
|
|
98
|
-
}, 1032, ["id", "label"])) : d("", !0)
|
|
99
|
-
];
|
|
100
|
-
}),
|
|
101
|
-
_: 2
|
|
102
|
-
}, 1032, ["id"]))), 128))
|
|
103
|
-
], 64);
|
|
104
|
-
}), 128))
|
|
105
|
-
], 2),
|
|
106
|
-
c.value ? d("", !0) : (r(), n(T, {
|
|
107
|
-
key: 0,
|
|
108
|
-
id: "webhooks",
|
|
109
|
-
class: "show-more-webhooks"
|
|
110
|
-
}))
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["aria-labelledby"])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
})) : d("", !0);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
export {
|
|
120
|
-
te as default
|
|
121
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
webhook: TransformedOperation;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
-
export default _default;
|
|
7
|
-
//# sourceMappingURL=Webhook.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Webhook.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Webhook.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,oBAAoB,CAAA;CAC9B,CAAC;;AA6EF,wBAMG"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, createElementBlock as a, createCommentVNode as m, openBlock as s, Fragment as p, createVNode as r, withCtx as i, createTextVNode as d } from "vue";
|
|
2
|
-
import u from "./OperationResponses.vue.js";
|
|
3
|
-
import k from "./RequestBody.vue.js";
|
|
4
|
-
const c = /* @__PURE__ */ n({
|
|
5
|
-
__name: "Webhook",
|
|
6
|
-
props: {
|
|
7
|
-
webhook: {}
|
|
8
|
-
},
|
|
9
|
-
setup(l) {
|
|
10
|
-
return (e, o) => {
|
|
11
|
-
var t;
|
|
12
|
-
return e.webhook ? (s(), a(p, { key: 0 }, [
|
|
13
|
-
r(k, {
|
|
14
|
-
class: "webhook-request-body",
|
|
15
|
-
requestBody: (t = e.webhook.information) == null ? void 0 : t.requestBody
|
|
16
|
-
}, {
|
|
17
|
-
title: i(() => o[0] || (o[0] = [
|
|
18
|
-
d("Payload")
|
|
19
|
-
])),
|
|
20
|
-
_: 1
|
|
21
|
-
}, 8, ["requestBody"]),
|
|
22
|
-
r(u, { operation: e.webhook }, null, 8, ["operation"])
|
|
23
|
-
], 64)) : m("", !0);
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
c as default
|
|
29
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
|
-
/** Temp helper for converting transformed operation to operationId payload */
|
|
4
|
-
export declare const operationIdParams: (transformedOperation: TransformedOperation) => {
|
|
5
|
-
path: string;
|
|
6
|
-
method: OpenAPIV3_1.HttpMethods;
|
|
7
|
-
} & OpenAPIV3_1.OperationObject;
|
|
8
|
-
//# sourceMappingURL=operation-id-params.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-id-params.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/operation-id-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,yBACN,oBAAoB,KACzC;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;CAChC,GAAG,WAAW,CAAC,eAId,CAAA"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Spec, Tag, TransformedOperation } from '@scalar/types/legacy';
|
|
2
|
-
export type SidebarEntry = {
|
|
3
|
-
id: string;
|
|
4
|
-
title: string;
|
|
5
|
-
displayTitle?: string;
|
|
6
|
-
children?: SidebarEntry[];
|
|
7
|
-
select?: () => void;
|
|
8
|
-
httpVerb?: string;
|
|
9
|
-
show: boolean;
|
|
10
|
-
deprecated?: boolean;
|
|
11
|
-
isGroup?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const DEFAULT_INTRODUCTION_SLUG = "introduction";
|
|
14
|
-
/** Helper to overwrite the current OpenAPI document */
|
|
15
|
-
declare function setParsedSpec(spec: Spec): Spec;
|
|
16
|
-
type CollapsedSidebarItems = Record<string, boolean>;
|
|
17
|
-
declare function toggleCollapsedSidebarItem(key: string): void;
|
|
18
|
-
declare function setCollapsedSidebarItem(key: string, value: boolean): void;
|
|
19
|
-
export type ParsedSpecOption = {
|
|
20
|
-
parsedSpec: Spec;
|
|
21
|
-
};
|
|
22
|
-
export type SorterOption = {
|
|
23
|
-
tagsSorter?: 'alpha' | ((a: Tag, b: Tag) => number);
|
|
24
|
-
operationsSorter?: 'alpha' | 'method' | ((a: TransformedOperation, b: TransformedOperation) => number);
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Scroll to operation
|
|
28
|
-
*
|
|
29
|
-
* Similar to scrollToId BUT in the case of a section not being open,
|
|
30
|
-
* it uses the lazyBus to ensure the section is open before scrolling to it
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
export declare const scrollToOperation: (operationId: string, focus?: boolean) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Provides the sidebar state and methods to control it.
|
|
36
|
-
*/
|
|
37
|
-
export declare function useSidebar(options?: ParsedSpecOption & SorterOption): {
|
|
38
|
-
breadcrumb: import("vue").ComputedRef<string>;
|
|
39
|
-
items: import("vue").ComputedRef<{
|
|
40
|
-
entries: SidebarEntry[];
|
|
41
|
-
titles: Record<string, string>;
|
|
42
|
-
}>;
|
|
43
|
-
isSidebarOpen: import("vue").Ref<boolean, boolean>;
|
|
44
|
-
collapsedSidebarItems: CollapsedSidebarItems;
|
|
45
|
-
toggleCollapsedSidebarItem: typeof toggleCollapsedSidebarItem;
|
|
46
|
-
setCollapsedSidebarItem: typeof setCollapsedSidebarItem;
|
|
47
|
-
hideModels: import("vue").Ref<boolean, boolean>;
|
|
48
|
-
setParsedSpec: typeof setParsedSpec;
|
|
49
|
-
defaultOpenAllTags: import("vue").Ref<boolean, boolean>;
|
|
50
|
-
scrollToOperation: (operationId: string, focus?: boolean) => void;
|
|
51
|
-
};
|
|
52
|
-
export {};
|
|
53
|
-
//# sourceMappingURL=useSidebar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAI3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAcvD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAkOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,UAAU,OAAO,SAiBrE,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCAtBrB,MAAM,UAAU,OAAO;EA8FrE"}
|