@scalar/api-reference 1.26.1 → 1.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +2 -6
  3. package/dist/browser/standalone.js +3306 -3283
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  6. package/dist/components/Layouts/ModernLayout.vue2.js +9 -12
  7. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  8. package/dist/components/SingleApiReference.vue.js +6 -6
  9. package/dist/esm.d.ts +5 -1
  10. package/dist/esm.d.ts.map +1 -1
  11. package/dist/esm.js +12 -9
  12. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  13. package/dist/features/DownloadLink/DownloadLink.vue2.js +16 -16
  14. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +1 -1
  15. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  16. package/dist/features/Operation/components/ContentTypeSelect.vue.js +80 -5
  17. package/dist/features/Operation/components/ContentTypeSelect.vue2.js +2 -43
  18. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  19. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  20. package/dist/features/Operation/components/ParameterListItem.vue2.js +33 -33
  21. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  22. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  23. package/dist/features/Operation/components/RequestBody.vue2.js +15 -15
  24. package/dist/hooks/useMultipleDocuments.d.ts +9 -5
  25. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  26. package/dist/hooks/useMultipleDocuments.js +38 -38
  27. package/dist/index.d.ts +6 -5
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +74 -72
  30. package/dist/standalone/lib/html-api.d.ts +30 -1
  31. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  32. package/dist/standalone/lib/html-api.js +54 -0
  33. package/dist/standalone/lib/register-globals.d.ts +11 -0
  34. package/dist/standalone/lib/register-globals.d.ts.map +1 -0
  35. package/dist/style.css +1 -1
  36. package/package.json +8 -8
@@ -2,7 +2,7 @@ import o from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3f813604"]]);
5
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a1ad6320"]]);
6
6
  export {
7
- f as default
7
+ _ as default
8
8
  };
@@ -66,18 +66,15 @@ const P = { key: 0 }, T = {
66
66
  "onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
67
67
  }, null, 8, ["modelValue"]))
68
68
  ]),
69
- default: n(() => {
70
- var r;
71
- return [
72
- a.configuration.hideClientButton ? d("", !0) : (t(), u(l(H), {
73
- key: 0,
74
- buttonSource: "sidebar",
75
- integration: e.configuration._integration,
76
- isDevelopment: h,
77
- url: (r = e.configuration.spec) == null ? void 0 : r.url
78
- }, null, 8, ["integration", "url"]))
79
- ];
80
- }),
69
+ default: n(() => [
70
+ a.configuration.hideClientButton ? d("", !0) : (t(), u(l(H), {
71
+ key: 0,
72
+ buttonSource: "sidebar",
73
+ integration: e.configuration._integration,
74
+ isDevelopment: h,
75
+ url: e.configuration.url
76
+ }, null, 8, ["integration", "url"]))
77
+ ]),
81
78
  _: 1
82
79
  })
83
80
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAW5E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,yBAAyB,CAAA;CACzC,CAAC;AAyCF,iBAAS,cAAc;WAgGT,OAAO,IAA6B;;wBAVrB,GAAG;wBACH,GAAG;qCACU,GAAG;;;;EAa5C;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,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
+ {"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAW5E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,yBAAyB,CAAA;CACzC,CAAC;AAyCF,iBAAS,cAAc;WAgGT,OAAO,IAA6B;;wBAVrB,GAAG;wBACH,GAAG;qCACU,GAAG;;;;EAa5C;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,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"}
@@ -11,7 +11,7 @@ const z = /* @__PURE__ */ p({
11
11
  },
12
12
  emits: ["updateContent"],
13
13
  setup(e) {
14
- const { toggleColorMode: s, isDarkMode: a } = N({
14
+ const { toggleColorMode: d, isDarkMode: a } = N({
15
15
  initialColorMode: e.configuration.darkMode ? "dark" : void 0,
16
16
  overrideColorMode: e.configuration.forceDarkModeState
17
17
  });
@@ -19,9 +19,9 @@ const z = /* @__PURE__ */ p({
19
19
  () => e.configuration.darkMode,
20
20
  (o) => a.value = !!o
21
21
  ), e.configuration.metaData && R(e.configuration.metaData);
22
- const { parsedSpec: d, rawSpec: m } = V({
22
+ const { parsedSpec: m, rawSpec: s } = V({
23
23
  proxyUrl: f(() => e.configuration.proxyUrl || ""),
24
- specConfig: f(() => e.configuration.spec || {})
24
+ specConfig: f(() => e.configuration || {})
25
25
  }), l = k(() => e.configuration.favicon);
26
26
  return U(l), (o, n) => {
27
27
  var c;
@@ -35,9 +35,9 @@ const z = /* @__PURE__ */ p({
35
35
  B(t(F), {
36
36
  configuration: o.configuration,
37
37
  isDark: t(a),
38
- parsedSpec: t(d),
39
- rawSpec: t(m),
40
- onToggleDarkMode: n[0] || (n[0] = () => t(s)()),
38
+ parsedSpec: t(m),
39
+ rawSpec: t(s),
40
+ onToggleDarkMode: n[0] || (n[0] = () => t(d)()),
41
41
  onUpdateContent: n[1] || (n[1] = (g) => o.$emit("updateContent", g))
42
42
  }, {
43
43
  footer: r(() => [
package/dist/esm.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import type { ApiReferenceConfiguration, SpecConfiguration } from '@scalar/types/api-reference';
2
- /** Initialize Scalar References */
2
+ /**
3
+ * Initialize Scalar References
4
+ *
5
+ * @deprecated please import { createApiReference } from '@scalar/api-reference' instead
6
+ */
3
7
  export declare function createScalarReferences(
4
8
  /** Element to mount the references to */
5
9
  el: HTMLElement | null,
package/dist/esm.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAM/F,mCAAmC;AACnC,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,EAAE;AACxF;;;GAGG;AACH,iBAAiB,UAAO;IAmBtB,uDAAuD;4BAC/B,OAAO,CAAC,yBAAyB,CAAC;qBAOzC,iBAAiB;IAOlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
1
+ {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAM/F;;;;GAIG;AACH,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,EAAE;AACxF;;;GAGG;AACH,iBAAiB,UAAO;IAsBtB,uDAAuD;4BAC/B,OAAO,CAAC,yBAAyB,CAAC;qBAOzC,iBAAiB;IAOlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
package/dist/esm.js CHANGED
@@ -1,27 +1,30 @@
1
1
  import { objectMerge as f } from "@scalar/oas-utils/helpers";
2
2
  import { createHead as p } from "@unhead/vue";
3
- import { reactive as s, createApp as m } from "vue";
3
+ import { reactive as u, createApp as m } from "vue";
4
4
  import l from "./components/ApiReference.vue.js";
5
- function S(n, a, c = !0) {
6
- const r = s(a), t = m(l, { configuration: r }), i = p();
5
+ function S(o, a, c = !0) {
6
+ console.warn(
7
+ "createScalarReferences is deprecated. Please import { createApiReference } from '@scalar/api-reference' instead."
8
+ );
9
+ const r = u(a), t = m(l, { configuration: r }), i = p();
7
10
  t.use(i);
8
- function o(e = n) {
11
+ function n(e = o) {
9
12
  if (!e) {
10
13
  console.warn("Invalid HTML element provided. Cannot mount Scalar References");
11
14
  return;
12
15
  }
13
16
  t.mount(e);
14
17
  }
15
- return c && o(), {
18
+ return c && n(), {
16
19
  /** Update the configuration for a mounted reference */
17
- updateConfig(e, u = !0) {
18
- u ? Object.assign(r, e) : f(r, e);
20
+ updateConfig(e, s = !0) {
21
+ s ? Object.assign(r, e) : f(r, e);
19
22
  },
20
23
  updateSpec(e) {
21
- Array.isArray(r) ? console.error("Cannot update the content for multiple configurations.") : r.spec = e;
24
+ Array.isArray(r) ? console.error("Cannot update the content for multiple configurations.") : Object.assign(r, e);
22
25
  },
23
26
  /** Mount the references to a given element */
24
- mount: o,
27
+ mount: n,
25
28
  /** Unmount the app from an element */
26
29
  unmount: () => t.unmount()
27
30
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./DownloadLink.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1fc94525"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-227fe8c2"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,31 +1,31 @@
1
- import { defineComponent as u, openBlock as o, createElementBlock as e, unref as t, Fragment as m, createCommentVNode as f } from "vue";
2
- import { useConfig as _ } from "../../hooks/useConfig.js";
3
- import { downloadSpecBus as k } from "../../helpers/specDownloads.js";
4
- const w = { class: "download" }, h = ["href"], B = /* @__PURE__ */ u({
1
+ import { defineComponent as i, openBlock as o, createElementBlock as e, unref as t, Fragment as p, createCommentVNode as u } from "vue";
2
+ import { useConfig as m } from "../../hooks/useConfig.js";
3
+ import { downloadSpecBus as f } from "../../helpers/specDownloads.js";
4
+ const _ = { class: "download" }, k = ["href"], g = /* @__PURE__ */ i({
5
5
  __name: "DownloadLink",
6
6
  props: {
7
7
  specTitle: {}
8
8
  },
9
- setup(r) {
10
- const i = r, n = _(), p = () => {
11
- k.emit({ id: "", specTitle: i.specTitle });
9
+ setup(d) {
10
+ const r = d, n = m(), s = () => {
11
+ f.emit({ id: "", specTitle: r.specTitle });
12
12
  };
13
- return (D, b) => {
14
- var c, l, s, a, d;
15
- return o(), e("div", w, [
16
- (c = t(n)) != null && c.hideDownloadButton ? f("", !0) : (o(), e(m, { key: 0 }, [
17
- (s = (l = t(n)) == null ? void 0 : l.spec) != null && s.url ? (o(), e("a", {
13
+ return (w, h) => {
14
+ var l, c, a;
15
+ return o(), e("div", _, [
16
+ (l = t(n)) != null && l.hideDownloadButton ? u("", !0) : (o(), e(p, { key: 0 }, [
17
+ (c = t(n)) != null && c.url ? (o(), e("a", {
18
18
  key: 0,
19
19
  class: "download-button",
20
20
  download: "",
21
- href: (d = (a = t(n)) == null ? void 0 : a.spec) == null ? void 0 : d.url,
21
+ href: (a = t(n)) == null ? void 0 : a.url,
22
22
  target: "_blank"
23
- }, " Download OpenAPI Document ", 8, h)) : (o(), e("button", {
23
+ }, " Download OpenAPI Document ", 8, k)) : (o(), e("button", {
24
24
  key: 1,
25
25
  class: "download-button",
26
26
  role: "link",
27
27
  type: "button",
28
- onClick: p
28
+ onClick: s
29
29
  }, " Download OpenAPI Document "))
30
30
  ], 64))
31
31
  ]);
@@ -33,5 +33,5 @@ const w = { class: "download" }, h = ["href"], B = /* @__PURE__ */ u({
33
33
  }
34
34
  });
35
35
  export {
36
- B as default
36
+ g as default
37
37
  };
@@ -11,6 +11,6 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
11
11
  onSelectContentType?: ((payload: {
12
12
  contentType: ContentType;
13
13
  }) => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLabelElement>;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  export default _default;
16
16
  //# sourceMappingURL=ContentTypeSelect.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTypeSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ContentTypeSelect.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B,CAAC;;;qBAIiD,WAAW;;;;qBAAX,WAAW;;;AA4G9D,wBAQG"}
1
+ {"version":3,"file":"ContentTypeSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ContentTypeSelect.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAOpE,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B,CAAC;;;qBAIiD,WAAW;;;;qBAAX,WAAW;;;AAqK9D,wBAOG"}
@@ -1,7 +1,82 @@
1
- import t from "./ContentTypeSelect.vue2.js";
2
- /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3c443fc4"]]);
1
+ import { defineComponent as S, computed as s, ref as B, openBlock as p, createBlock as V, unref as n, withCtx as r, createVNode as c, normalizeClass as m, createTextVNode as k, createElementVNode as f, toDisplayString as v, createElementBlock as g } from "vue";
2
+ import { cva as h, ScalarListbox as w, ScalarButton as _, ScalarIcon as q } from "@scalar/components";
3
+ import N from "../../../components/ScreenReader.vue.js";
4
+ const O = /* @__PURE__ */ S({
5
+ __name: "ContentTypeSelect",
6
+ props: {
7
+ requestBody: {},
8
+ defaultValue: {}
9
+ },
10
+ emits: ["selectContentType"],
11
+ setup(y, { emit: x }) {
12
+ const t = y, C = x, T = (e) => {
13
+ e != null && e.id && C("selectContentType", { contentType: e.id });
14
+ }, a = s(() => {
15
+ var e;
16
+ return (e = t.requestBody) != null && e.content ? Object.keys(t.requestBody.content) : [];
17
+ }), l = B(
18
+ t.defaultValue || a.value[0]
19
+ ), u = s({
20
+ get: () => d.value.find((e) => e.id === l.value),
21
+ set: (e) => {
22
+ e && (l.value = e.id);
23
+ }
24
+ }), d = s(() => a.value.map((e) => ({
25
+ id: e,
26
+ label: e
27
+ }))), i = h({
28
+ base: "font-normal text-c-2 bg-b-2 py-0.75 flex cursor-pointer items-center gap-1 rounded-full text-xs",
29
+ variants: {
30
+ dropdown: {
31
+ true: "border hover:text-c-1 pl-2 pr-1.5",
32
+ false: "px-2"
33
+ }
34
+ }
35
+ });
36
+ return (e, o) => t != null && t.requestBody && a.value.length > 1 ? (p(), V(n(w), {
37
+ key: 0,
38
+ modelValue: u.value,
39
+ "onUpdate:modelValue": [
40
+ o[0] || (o[0] = (b) => u.value = b),
41
+ T
42
+ ],
43
+ options: d.value,
44
+ placement: "bottom-end",
45
+ class: "font-normal"
46
+ }, {
47
+ default: r(() => [
48
+ c(n(_), {
49
+ variant: "ghost",
50
+ class: m(["h-fit", n(i)({ dropdown: !0 })])
51
+ }, {
52
+ default: r(() => [
53
+ c(N, null, {
54
+ default: r(() => o[1] || (o[1] = [
55
+ k("Selected Content Type:")
56
+ ])),
57
+ _: 1
58
+ }),
59
+ f("span", null, v(l.value), 1),
60
+ c(n(q), {
61
+ class: "ui-open:rotate-180 ml-auto",
62
+ icon: "ChevronDown",
63
+ size: "sm",
64
+ thickness: "2"
65
+ })
66
+ ]),
67
+ _: 1
68
+ }, 8, ["class"])
69
+ ]),
70
+ _: 1
71
+ }, 8, ["modelValue", "options"])) : (p(), g("div", {
72
+ key: 1,
73
+ class: m(n(i)({ dropdown: !1 })),
74
+ tabindex: "0"
75
+ }, [
76
+ f("span", null, v(l.value), 1)
77
+ ], 2));
78
+ }
79
+ });
5
80
  export {
6
- r as default
81
+ O as default
7
82
  };
@@ -1,45 +1,4 @@
1
- import { defineComponent as f, computed as g, ref as C, openBlock as l, createElementBlock as s, normalizeClass as B, createElementVNode as T, toDisplayString as d, withModifiers as p, Fragment as q, renderList as _, createCommentVNode as V } from "vue";
2
- const h = ["value"], w = ["value"], b = /* @__PURE__ */ f({
3
- __name: "ContentTypeSelect",
4
- props: {
5
- requestBody: {},
6
- defaultValue: {}
7
- },
8
- emits: ["selectContentType"],
9
- setup(i, { emit: y }) {
10
- const e = i, m = y, v = (n) => {
11
- const o = n.target.value;
12
- u.value = o, m("selectContentType", { contentType: o });
13
- }, r = g(() => {
14
- var n;
15
- return (n = e.requestBody) != null && n.content ? Object.keys(e.requestBody.content) : [];
16
- }), u = C(
17
- e.defaultValue || r.value[0]
18
- );
19
- return (n, t) => {
20
- var o;
21
- return l(), s("label", {
22
- class: B(["content-type-select", { "content-type-no-select": r.value.length <= 1 }])
23
- }, [
24
- T("span", null, d(u.value), 1),
25
- e != null && e.requestBody && r.value.length > 1 ? (l(), s("select", {
26
- key: 0,
27
- value: u.value,
28
- onChange: t[1] || (t[1] = (c) => v(c)),
29
- onKeydown: t[2] || (t[2] = p(() => {
30
- }, ["stop"]))
31
- }, [
32
- (l(!0), s(q, null, _((o = e.requestBody) == null ? void 0 : o.content, (c, a) => (l(), s("option", {
33
- key: a,
34
- value: a,
35
- onKeydown: t[0] || (t[0] = p(() => {
36
- }, ["stop"]))
37
- }, d(a), 41, w))), 128))
38
- ], 40, h)) : V("", !0)
39
- ], 2);
40
- };
41
- }
42
- });
1
+ import f from "./ContentTypeSelect.vue.js";
43
2
  export {
44
- b as default
3
+ f as default
45
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAwOA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAY/E,KAAK,WAAW,GAAG;IACf,SAAS,EACL,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,GAChD,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;kBADe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AA+P9B,wBAOG"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAwOA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAY/E,KAAK,WAAW,GAAG;IACf,SAAS,EACL,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,GAChD,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;kBADe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AAgQ9B,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./ParameterListItem.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-18974874"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6ec409c6"]]);
5
5
  export {
6
- e as default
6
+ a as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as k, computed as i, ref as w, openBlock as o, createElementBlock as C, createVNode as m, unref as a, withCtx as u, createBlock as p, normalizeClass as B, createElementVNode as c, toDisplayString as S, createCommentVNode as n } from "vue";
2
- import { Disclosure as b, DisclosureButton as E, DisclosurePanel as q } from "@headlessui/vue";
1
+ import { defineComponent as w, computed as i, ref as C, openBlock as o, createElementBlock as g, createVNode as m, unref as t, withCtx as u, createBlock as p, normalizeClass as B, createElementVNode as c, toDisplayString as b, createCommentVNode as n } from "vue";
2
+ import { Disclosure as E, DisclosureButton as S, DisclosurePanel as q } from "@headlessui/vue";
3
3
  import { ScalarIcon as D, ScalarMarkdown as P } from "@scalar/components";
4
4
  import V from "./ContentTypeSelect.vue.js";
5
5
  import I from "./ParameterHeaders.vue.js";
6
- import T from "../../../components/Content/Schema/SchemaProperty.vue.js";
6
+ import _ from "../../../components/Content/Schema/SchemaProperty.vue.js";
7
7
  const j = {
8
8
  key: 0,
9
- class: "parameter-item"
10
- }, N = { class: "parameter-item-name" }, O = { class: "parameter-item-type" }, _ = { class: "absolute right-0 top-2.5 opacity-0 group-focus-within/parameter-item-trigger:opacity-100 group-hover/parameter-item-trigger:opacity-100" }, F = /* @__PURE__ */ k({
9
+ class: "parameter-item group/parameter-item relative"
10
+ }, N = { class: "parameter-item-name" }, T = { class: "parameter-item-type" }, O = { class: "absolute right-0 top-2.5 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, A = /* @__PURE__ */ w({
11
11
  __name: "ParameterListItem",
12
12
  props: {
13
13
  parameter: {},
@@ -16,62 +16,53 @@ const j = {
16
16
  withExamples: { type: Boolean, default: !0 }
17
17
  },
18
18
  setup(y) {
19
- const t = y, v = i(() => t.parameter.content ? Object.keys(t.parameter.content) : []), l = w(
19
+ const a = y, v = i(() => a.parameter.content ? Object.keys(a.parameter.content) : []), l = C(
20
20
  v.value[0]
21
21
  );
22
- t.parameter.content && "application/json" in t.parameter.content && (l.value = "application/json");
23
- const r = i(() => !!(t.collapsableItems && t.parameter.content)), g = i(() => t.parameter.readOnly !== !0);
24
- return (e, d) => g.value ? (o(), C("li", j, [
25
- m(a(b), null, {
26
- default: u(({ open: h }) => [
27
- r.value ? (o(), p(a(E), {
22
+ a.parameter.content && "application/json" in a.parameter.content && (l.value = "application/json");
23
+ const r = i(() => !!(a.collapsableItems && a.parameter.content)), k = i(() => a.parameter.readOnly !== !0);
24
+ return (e, d) => k.value ? (o(), g("li", j, [
25
+ m(t(E), null, {
26
+ default: u(({ open: s }) => [
27
+ r.value ? (o(), p(t(S), {
28
28
  key: 0,
29
- class: B(["parameter-item-trigger group/parameter-item-trigger flex", { "parameter-item-trigger-open": h }])
29
+ class: B(["parameter-item-trigger flex", { "parameter-item-trigger-open": s }])
30
30
  }, {
31
31
  default: u(() => [
32
- m(a(D), {
32
+ m(t(D), {
33
33
  class: "parameter-item-icon",
34
- icon: h ? "ChevronDown" : "ChevronRight",
34
+ icon: s ? "ChevronDown" : "ChevronRight",
35
35
  thickness: "1.5"
36
36
  }, null, 8, ["icon"]),
37
- c("span", N, S(e.parameter.name), 1),
38
- c("span", O, [
39
- e.parameter.description ? (o(), p(a(P), {
37
+ c("span", N, b(e.parameter.name), 1),
38
+ c("span", T, [
39
+ e.parameter.description ? (o(), p(t(P), {
40
40
  key: 0,
41
41
  class: "markdown",
42
42
  value: e.parameter.description
43
43
  }, null, 8, ["value"])) : n("", !0)
44
- ]),
45
- c("div", _, [
46
- r.value && t.parameter.content ? (o(), p(V, {
47
- key: 0,
48
- class: "parameter-item-content-type",
49
- defaultValue: l.value,
50
- requestBody: t.parameter,
51
- onSelectContentType: d[0] || (d[0] = ({ contentType: s }) => l.value = s)
52
- }, null, 8, ["defaultValue", "requestBody"])) : n("", !0)
53
44
  ])
54
45
  ]),
55
46
  _: 2
56
47
  }, 1032, ["class"])) : n("", !0),
57
- m(a(q), {
48
+ m(t(q), {
58
49
  class: "parameter-item-container parameter-item-container-markdown",
59
50
  static: !r.value
60
51
  }, {
61
52
  default: u(() => {
62
- var s, f;
53
+ var f, h;
63
54
  return [
64
55
  e.parameter.headers ? (o(), p(I, {
65
56
  key: 0,
66
57
  headers: e.parameter.headers
67
58
  }, null, 8, ["headers"])) : n("", !0),
68
- m(a(T), {
59
+ m(t(_), {
69
60
  compact: "",
70
61
  description: r.value ? "" : e.parameter.description,
71
62
  name: r.value ? "" : e.parameter.name,
72
63
  noncollapsible: e.showChildren,
73
64
  required: e.parameter.required,
74
- value: e.parameter.content ? (f = (s = e.parameter.content) == null ? void 0 : s[l.value]) == null ? void 0 : f.schema : e.parameter.schema,
65
+ value: e.parameter.content ? (h = (f = e.parameter.content) == null ? void 0 : f[l.value]) == null ? void 0 : h.schema : e.parameter.schema,
75
66
  withExamples: e.withExamples
76
67
  }, null, 8, ["description", "name", "noncollapsible", "required", "value", "withExamples"])
77
68
  ];
@@ -80,10 +71,19 @@ const j = {
80
71
  }, 8, ["static"])
81
72
  ]),
82
73
  _: 1
83
- })
74
+ }),
75
+ c("div", O, [
76
+ r.value && a.parameter.content ? (o(), p(V, {
77
+ key: 0,
78
+ class: "parameter-item-content-type",
79
+ defaultValue: l.value,
80
+ requestBody: a.parameter,
81
+ onSelectContentType: d[0] || (d[0] = ({ contentType: s }) => l.value = s)
82
+ }, null, 8, ["defaultValue", "requestBody"])) : n("", !0)
83
+ ])
84
84
  ])) : n("", !0);
85
85
  }
86
86
  });
87
87
  export {
88
- F as default
88
+ A as default
89
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASpE,KAAK,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAqBjD,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAWD,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
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAmIA,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASpE,KAAK,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAqBjD,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAWD,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,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7637dd89"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1e0d96b3"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as p, computed as v, ref as f, openBlock as d, createElementBlock as c, createElementVNode as q, renderSlot as B, createVNode as i, unref as h, createCommentVNode as y } from "vue";
2
- import C from "./ContentTypeSelect.vue.js";
3
- import b from "../../../components/Content/Schema/Schema.vue.js";
4
- const k = { key: 0 }, V = { class: "request-body-title" }, S = {
1
+ import { defineComponent as p, computed as v, ref as f, openBlock as d, createElementBlock as c, createElementVNode as q, renderSlot as B, createVNode as i, unref as h, createCommentVNode as m } from "vue";
2
+ import b from "./ContentTypeSelect.vue.js";
3
+ import k from "../../../components/Content/Schema/Schema.vue.js";
4
+ const C = { key: 0 }, V = { class: "request-body-title" }, _ = {
5
5
  key: 0,
6
6
  class: "request-body-schema"
7
7
  }, j = /* @__PURE__ */ p({
@@ -10,32 +10,32 @@ const k = { key: 0 }, V = { class: "request-body-title" }, S = {
10
10
  requestBody: {}
11
11
  },
12
12
  setup(o) {
13
- var l;
13
+ var s;
14
14
  const n = v(
15
15
  () => {
16
16
  var e;
17
17
  return Object.keys(((e = o.requestBody) == null ? void 0 : e.content) ?? {});
18
18
  }
19
19
  ), t = f("application/json");
20
- return (l = o.requestBody) != null && l.content && n.value.length > 0 && (t.value = n.value[0]), (e, s) => {
21
- var u, r, a;
22
- return e.requestBody ? (d(), c("div", k, [
20
+ return (s = o.requestBody) != null && s.content && n.value.length > 0 && (t.value = n.value[0]), (e, l) => {
21
+ var u, a, r;
22
+ return e.requestBody ? (d(), c("div", C, [
23
23
  q("div", V, [
24
24
  B(e.$slots, "title", {}, void 0, !0),
25
- i(C, {
25
+ i(b, {
26
26
  defaultValue: t.value,
27
27
  requestBody: e.requestBody,
28
- onSelectContentType: s[0] || (s[0] = ({ contentType: m }) => t.value = m)
28
+ onSelectContentType: l[0] || (l[0] = ({ contentType: y }) => t.value = y)
29
29
  }, null, 8, ["defaultValue", "requestBody"])
30
30
  ]),
31
- (u = e.requestBody.content) != null && u[t.value] ? (d(), c("div", S, [
32
- i(h(b), {
31
+ (u = e.requestBody.content) != null && u[t.value] ? (d(), c("div", _, [
32
+ i(h(k), {
33
33
  compact: "",
34
34
  noncollapsible: "",
35
- value: (a = (r = e.requestBody.content) == null ? void 0 : r[t.value]) == null ? void 0 : a.schema
35
+ value: (r = (a = e.requestBody.content) == null ? void 0 : a[t.value]) == null ? void 0 : r.schema
36
36
  }, null, 8, ["value"])
37
- ])) : y("", !0)
38
- ])) : y("", !0);
37
+ ])) : m("", !0)
38
+ ])) : m("", !0);
39
39
  };
40
40
  }
41
41
  });
@@ -22,17 +22,21 @@ export declare const useMultipleDocuments: ({ configuration, initialIndex }: Use
22
22
  hideSearch: boolean;
23
23
  hideDarkModeToggle: boolean;
24
24
  withDefaultFonts: boolean;
25
- authentication?: any;
26
- baseServerURL?: string | undefined;
27
- proxyUrl?: string | undefined;
28
- searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
29
- servers?: any[] | undefined;
25
+ url?: string | undefined;
26
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
27
+ title?: string | undefined;
28
+ slug?: string | undefined;
30
29
  spec?: {
31
30
  url?: string | undefined;
32
31
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
33
32
  title?: string | undefined;
34
33
  slug?: string | undefined;
35
34
  } | undefined;
35
+ authentication?: any;
36
+ baseServerURL?: string | undefined;
37
+ proxyUrl?: string | undefined;
38
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
39
+ servers?: any[] | undefined;
36
40
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
37
41
  proxy?: string | undefined;
38
42
  darkMode?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EAI1C,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CACd,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,SAAS,CACZ,CAAA;IACD,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAsCD,eAAO,MAAM,oBAAoB,oCAAqC,yBAAyB;;;;;;;;;;;;;;;;;;;eAqGsooB,CAAC;mBAAqC,CAAC,mCAAmC,GAAG;iBAA0E,CAAC;gBAAkC,CAAC;;;;;;;;;;;;;;yCAAw4B,GAAI;2CAA6E,GAAI;;;;;gBAA0J,CAAC;WAA4B,GAAI;;gBAAyF,CAAC;WAA4B,GAAI;;gBAAuF,CAAC;WAA4B,GAAI;;;;uBAAkJ,CAAC;mBAAqC,CAAC;WAA4B,GAAI;;;kBAAmH,CAAC;WAA4B,GAAI;qBAA0D,GAAG;qCAAuE,GAAI;;2DAAgK,GAAI;4EAAgH,GAAI;;;;mDAtIh/sB,GAAG;;;;;CAqIzE,CAAA"}
1
+ {"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EAI1C,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CACd,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,SAAS,CACZ,CAAA;IACD,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAsCD,eAAO,MAAM,oBAAoB,oCAAqC,yBAAyB;;;;;;;;;;;;;;mDAqGu8yB,GAAG;;;;eAAoJ,CAAC;mBAAqC,CAAC,mCAAmC,GAAG;iBAA0E,CAAC;gBAAkC,CAAC;;;;;;;;;;;;;;;;;;;yCAAwsC,GAAI;2CAA6E,GAAI;;;;;gBAA0J,CAAC;WAA4B,GAAI;;gBAAyF,CAAC;WAA4B,GAAI;;gBAAuF,CAAC;WAA4B,GAAI;;;;uBAAkJ,CAAC;mBAAqC,CAAC;WAA4B,GAAI;;;kBAAmH,CAAC;WAA4B,GAAI;qBAA0D,GAAG;qCAAuE,GAAI;;2DAAgK,GAAI;4EAAgH,GAAI;;;;mDAhGv04B,GAAG;;;;;CA+FV,CAAA"}