@scalar/api-reference 1.31.7 → 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.
Files changed (183) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/browser/standalone.js +18613 -18470
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +10 -30
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +240 -222
  9. package/dist/components/Content/Content.vue.d.ts +2 -0
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +84 -74
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +84 -86
  19. package/dist/components/Content/Models/Models.vue.js +1 -1
  20. package/dist/components/Content/Models/Models.vue2.js +4 -4
  21. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  23. package/dist/components/Content/Schema/Schema.vue2.js +53 -53
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
  32. package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
  33. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
  35. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  37. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
  38. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
  39. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  41. package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
  42. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/Tag.vue.js +45 -47
  44. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tag/TagList.vue.js +40 -41
  47. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  49. package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  52. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
  53. package/dist/components/MobileHeader.vue.d.ts +1 -8
  54. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  55. package/dist/components/MobileHeader.vue.js +1 -1
  56. package/dist/components/MobileHeader.vue2.js +19 -19
  57. package/dist/components/Section/Section.vue.js +2 -2
  58. package/dist/components/Section/Section.vue2.js +1 -1
  59. package/dist/components/ShowMoreButton.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue2.js +1 -1
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
  65. package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
  66. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  68. package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
  69. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
  70. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
  71. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
  72. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
  78. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  79. package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
  80. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  81. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
  82. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  83. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  84. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
  85. package/dist/features/Operation/Operation.vue.d.ts +0 -1
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/Operation.vue.js +31 -34
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
  89. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
  91. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
  92. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
  94. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  96. package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
  97. package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
  98. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  99. package/dist/features/Operation/hooks/useResponses.js +12 -13
  100. package/dist/features/Operation/index.d.ts +0 -1
  101. package/dist/features/Operation/index.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +85 -72
  106. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  109. package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
  110. package/dist/features/Search/SearchModal.vue.js +2 -2
  111. package/dist/features/Search/SearchModal.vue2.js +1 -1
  112. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  113. package/dist/features/Search/useSearchIndex.js +61 -64
  114. package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
  115. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  116. package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
  117. package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
  118. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
  119. package/dist/features/sidebar/hooks/useSidebar.js +18 -0
  120. package/dist/features/sidebar/index.d.ts +2 -1
  121. package/dist/features/sidebar/index.d.ts.map +1 -1
  122. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
  123. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  124. package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
  125. package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
  126. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  127. package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
  128. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
  129. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  130. package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
  131. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
  132. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  133. package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
  134. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
  135. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  136. package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
  137. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
  138. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  139. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
  140. package/dist/features/traverse-schema/index.d.ts +3 -3
  141. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  142. package/dist/features/traverse-schema/types.d.ts +8 -5
  143. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  144. package/dist/helpers/parse.d.ts +2 -1
  145. package/dist/helpers/parse.d.ts.map +1 -1
  146. package/dist/helpers/parse.js +72 -88
  147. package/dist/hooks/useMultipleDocuments.d.ts +6 -6
  148. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  149. package/dist/hooks/useNavState.d.ts +1 -1
  150. package/dist/hooks/useNavState.d.ts.map +1 -1
  151. package/dist/hooks/useNavState.js +14 -9
  152. package/dist/hooks/useOperation.d.ts +7 -7
  153. package/dist/hooks/useOperation.d.ts.map +1 -1
  154. package/dist/hooks/useOperation.js +13 -12
  155. package/dist/index.d.ts +0 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +23 -25
  158. package/dist/legacy/fixtures/index.d.ts +1 -1
  159. package/dist/libs/openapi.d.ts +3 -4
  160. package/dist/libs/openapi.d.ts.map +1 -1
  161. package/dist/libs/openapi.js +8 -9
  162. package/dist/style.css +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
  164. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  165. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
  166. package/package.json +17 -17
  167. package/dist/components/Content/Webhooks/index.d.ts +0 -2
  168. package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
  169. package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
  170. package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
  171. package/dist/features/Operation/Webhooks.vue.js +0 -7
  172. package/dist/features/Operation/Webhooks.vue2.js +0 -121
  173. package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
  174. package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
  175. package/dist/features/Operation/components/Webhook.vue.js +0 -7
  176. package/dist/features/Operation/components/Webhook.vue2.js +0 -29
  177. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
  178. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
  179. package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
  180. package/dist/hooks/useSidebar.d.ts +0 -53
  181. package/dist/hooks/useSidebar.d.ts.map +0 -1
  182. package/dist/hooks/useSidebar.js +0 -248
  183. package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
@@ -1,21 +1,23 @@
1
- import { defineComponent as A, createElementBlock as p, openBlock as s, createElementVNode as r, renderSlot as v, createCommentVNode as l, normalizeClass as T, unref as c, createTextVNode as h, withModifiers as V, createVNode as C, withCtx as E, toDisplayString as u, createBlock as N } from "vue";
2
- import { ScalarSidebarGroupToggle as O, ScalarIcon as R } from "@scalar/components";
3
- import { scrollToId as U } from "@scalar/helpers/dom/scroll-to-id";
1
+ import { defineComponent as $, createElementBlock as l, openBlock as n, createElementVNode as a, renderSlot as g, createCommentVNode as r, normalizeClass as A, unref as d, createTextVNode as p, withModifiers as T, createVNode as b, withCtx as v, toDisplayString as h, createBlock as E, normalizeStyle as N } from "vue";
2
+ import { ScalarSidebarGroupToggle as O } from "@scalar/components";
3
+ import { scrollToId as V } from "@scalar/helpers/dom/scroll-to-id";
4
+ import { getHttpMethodInfo as H } from "@scalar/helpers/http/http-info";
4
5
  import { sleep as k } from "@scalar/helpers/testing/sleep";
5
- import { combineUrlAndPath as H } from "@scalar/oas-utils/helpers";
6
- import { useConfig as I } from "../../hooks/useConfig.js";
7
- import { useNavState as P } from "../../hooks/useNavState.js";
8
- import D from "./SidebarHttpBadge.vue.js";
9
- const L = ["id"], M = {
6
+ import { ScalarIconWebhooksLogo as I } from "@scalar/icons";
7
+ import { combineUrlAndPath as R } from "@scalar/oas-utils/helpers";
8
+ import { useConfig as U } from "../../hooks/useConfig.js";
9
+ import { useNavState as L } from "../../hooks/useNavState.js";
10
+ import M from "./SidebarHttpBadge.vue.js";
11
+ const P = ["id"], z = {
10
12
  key: 0,
11
13
  class: "sidebar-heading-chevron"
12
- }, z = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, j = {
13
- key: 1,
14
+ }, D = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, W = {
15
+ key: 0,
14
16
  class: "sidebar-heading-link-method"
15
- }, q = {
17
+ }, j = {
16
18
  key: 1,
17
19
  class: "action-menu"
18
- }, x = /* @__PURE__ */ A({
20
+ }, te = /* @__PURE__ */ $({
19
21
  __name: "SidebarElement",
20
22
  props: {
21
23
  id: {},
@@ -25,82 +27,84 @@ const L = ["id"], M = {
25
27
  open: { type: Boolean }
26
28
  },
27
29
  emits: ["toggleOpen"],
28
- setup(y, { emit: w }) {
29
- const i = y, m = w, { getFullHash: f, isIntersectionEnabled: d, replaceUrlState: S } = P(), n = I(), g = async () => {
30
- var e, t;
31
- d.value = !1, i.hasChildren && m("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), await k(100), d.value = !0;
32
- }, B = () => {
33
- if (n.value.pathRouting)
34
- return H(n.value.pathRouting.basePath, i.item.id);
30
+ setup(C, { emit: y }) {
31
+ const o = C, m = y, { getFullHash: u, isIntersectionEnabled: s, replaceUrlState: w } = L(), i = U(), c = async () => {
32
+ s.value = !1, o.hasChildren && m("toggleOpen"), await k(100), s.value = !0;
33
+ }, S = () => {
34
+ if (i.value.pathRouting)
35
+ return R(i.value.pathRouting.basePath, o.item.id);
35
36
  if (typeof window < "u") {
36
37
  const e = new URL(window.location.href);
37
- return e.hash = f(i.item.id), `${e.pathname}${e.search}${e.hash}`;
38
+ return e.hash = u(o.item.id), `${e.pathname}${e.search}${e.hash}`;
38
39
  }
39
- return `#${f(i.item.id)}`;
40
- }, $ = async (e) => {
41
- var t, a, o, b;
42
- (a = (t = n.value).onSidebarClick) == null || a.call(t, i.item.id), n.value.pathRouting && (e.preventDefault(), i.hasChildren && m("toggleOpen"), (b = (o = i.item) == null ? void 0 : o.select) == null || b.call(o), m("toggleOpen"), d.value = !1, S(i.item.id), U(i.item.id), await k(100), d.value = !0);
40
+ return `#${u(o.item.id)}`;
41
+ }, B = async (e) => {
42
+ var t, f;
43
+ (f = (t = i.value).onSidebarClick) == null || f.call(t, o.item.id), i.value.pathRouting && (e.preventDefault(), o.hasChildren && m("toggleOpen"), m("toggleOpen"), s.value = !1, w(o.item.id), V(o.item.id), await k(100), s.value = !0);
43
44
  };
44
- return (e, t) => {
45
- var a, o;
46
- return s(), p("li", {
47
- id: e.id,
48
- class: "sidebar-group-item"
45
+ return (e, t) => (n(), l("li", {
46
+ id: e.id,
47
+ class: "sidebar-group-item"
48
+ }, [
49
+ a("div", {
50
+ class: A(["sidebar-heading", {
51
+ "sidebar-group-item__folder": e.hasChildren,
52
+ active_page: e.isActive,
53
+ deprecated: "deprecated" in e.item && e.item.deprecated
54
+ }]),
55
+ onClick: c
49
56
  }, [
50
- r("div", {
51
- class: T(["sidebar-heading", {
52
- "sidebar-group-item__folder": e.hasChildren,
53
- active_page: e.isActive,
54
- deprecated: e.item.deprecated ?? !1
55
- }]),
56
- onClick: g
57
- }, [
58
- e.hasChildren && !c(n).defaultOpenAllTags ? (s(), p("p", M, [
59
- r("button", {
60
- "aria-expanded": e.open,
61
- class: "toggle-nested-icon",
62
- type: "button",
63
- onClick: V(g, ["stop"])
64
- }, [
65
- C(c(O), { open: e.open }, {
66
- label: E(() => [
67
- h(u(e.open ? "Collapse" : "Expand") + " " + u(e.item.title), 1)
68
- ]),
69
- _: 1
70
- }, 8, ["open"])
71
- ], 8, z),
72
- t[0] || (t[0] = h("   "))
73
- ])) : l("", !0),
74
- r("a", {
75
- class: "sidebar-heading-link",
76
- href: B(),
77
- tabindex: e.hasChildren ? -1 : 0,
78
- onClick: $
57
+ e.hasChildren && !d(i).defaultOpenAllTags ? (n(), l("p", z, [
58
+ a("button", {
59
+ "aria-expanded": e.open,
60
+ class: "toggle-nested-icon",
61
+ type: "button",
62
+ onClick: T(c, ["stop"])
79
63
  }, [
80
- (o = (a = e.item) == null ? void 0 : a.icon) != null && o.src ? (s(), N(c(R), {
81
- key: 0,
82
- class: "sidebar-icon",
83
- icon: e.item.icon.src
84
- }, null, 8, ["icon"])) : l("", !0),
85
- r("p", G, u(e.item.title), 1),
86
- e.item.httpVerb && !e.hasChildren ? (s(), p("p", j, [
87
- t[1] || (t[1] = h("   ")),
88
- t[2] || (t[2] = r("span", { class: "sr-only" }, "HTTP Method: ", -1)),
89
- C(D, {
90
- active: e.isActive,
91
- method: e.item.httpVerb
92
- }, null, 8, ["active", "method"])
93
- ])) : l("", !0)
94
- ], 8, F)
95
- ], 2),
96
- e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : l("", !0),
97
- e.$slots["action-menu"] ? (s(), p("div", q, [
98
- v(e.$slots, "action-menu", {}, void 0, !0)
99
- ])) : l("", !0)
100
- ], 8, L);
101
- };
64
+ b(d(O), { open: e.open }, {
65
+ label: v(() => [
66
+ p(h(e.open ? "Collapse" : "Expand") + " " + h(e.item.title), 1)
67
+ ]),
68
+ _: 1
69
+ }, 8, ["open"])
70
+ ], 8, D),
71
+ t[0] || (t[0] = p("   "))
72
+ ])) : r("", !0),
73
+ a("a", {
74
+ class: "sidebar-heading-link",
75
+ href: S(),
76
+ tabindex: e.hasChildren ? -1 : 0,
77
+ onClick: B
78
+ }, [
79
+ a("p", G, h(e.item.title), 1),
80
+ "method" in e.item && !e.hasChildren ? (n(), l("p", W, [
81
+ t[1] || (t[1] = p("")),
82
+ t[2] || (t[2] = a("span", { class: "sr-only" }, "HTTP Method: ", -1)),
83
+ b(M, {
84
+ active: e.isActive,
85
+ method: e.item.method
86
+ }, {
87
+ default: v(() => [
88
+ "webhook" in e.item ? (n(), E(d(I), {
89
+ key: 0,
90
+ weight: "bold",
91
+ style: N({
92
+ color: d(H)(e.item.method).colorVar
93
+ })
94
+ }, null, 8, ["style"])) : r("", !0)
95
+ ]),
96
+ _: 1
97
+ }, 8, ["active", "method"])
98
+ ])) : r("", !0)
99
+ ], 8, F)
100
+ ], 2),
101
+ e.open ? g(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0),
102
+ e.$slots["action-menu"] ? (n(), l("div", j, [
103
+ g(e.$slots, "action-menu", {}, void 0, !0)
104
+ ])) : r("", !0)
105
+ ], 8, P));
102
106
  }
103
107
  });
104
108
  export {
105
- x as default
109
+ te as default
106
110
  };
@@ -2,6 +2,21 @@ type __VLS_Props = {
2
2
  method: string;
3
3
  active?: boolean;
4
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>;
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: any;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: 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>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
6
16
  export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
7
22
  //# sourceMappingURL=SidebarHttpBadge.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarHttpBadge.vue"],"names":[],"mappings":"AAgDA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;;AA0EF,wBAOG"}
1
+ {"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarHttpBadge.vue"],"names":[],"mappings":"AAmDA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAQF,iBAAS,cAAc;WA6DT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,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 t from "./SidebarHttpBadge.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-4929f40c"]]);
4
+ const d = /* @__PURE__ */ o(t, [["__scopeId", "data-v-43724d28"]]);
5
5
  export {
6
- e as default
6
+ d as default
7
7
  };
@@ -1,14 +1,15 @@
1
- import { defineComponent as o, createBlock as t, openBlock as a, unref as r, normalizeClass as s } from "vue";
1
+ import { defineComponent as t, createBlock as o, openBlock as a, unref as r, normalizeClass as s, withCtx as d, renderSlot as i } from "vue";
2
2
  import n from "../HttpMethod/HttpMethod.vue.js";
3
- const c = /* @__PURE__ */ o({
3
+ const h = /* @__PURE__ */ t({
4
4
  __name: "SidebarHttpBadge",
5
5
  props: {
6
6
  method: {},
7
7
  active: { type: Boolean }
8
8
  },
9
9
  setup(p) {
10
- return (e, d) => (a(), t(r(n), {
10
+ return (e, m) => (a(), o(r(n), {
11
11
  class: s([
12
+ "flex items-center justify-end gap-1",
12
13
  "sidebar-heading-type",
13
14
  `sidebar-heading-type--${e.method.toLowerCase()}`,
14
15
  { "sidebar-heading-type-active": e.active }
@@ -16,9 +17,14 @@ const c = /* @__PURE__ */ o({
16
17
  method: e.method,
17
18
  property: "--method-color",
18
19
  short: ""
19
- }, null, 8, ["class", "method"]));
20
+ }, {
21
+ default: d(() => [
22
+ i(e.$slots, "default", {}, void 0, !0)
23
+ ]),
24
+ _: 3
25
+ }, 8, ["class", "method"]));
20
26
  }
21
27
  });
22
28
  export {
23
- c as default
29
+ h as default
24
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAYzE,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/D,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AA8JF,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAYzE,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/D,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AAuLF,wBAOG"}
@@ -1,53 +1,65 @@
1
- import { defineComponent as d, ref as h, onMounted as S, watch as E, onBeforeUnmount as b, createElementBlock as x, openBlock as D } from "vue";
2
- import { useActiveEntities as M, useWorkspace as g } from "@scalar/api-client/store";
1
+ import { defineComponent as h, ref as S, onMounted as E, watch as g, onBeforeUnmount as D, createElementBlock as b, openBlock as x } from "vue";
2
+ import { useActiveEntities as M, useWorkspace as U } from "@scalar/api-client/store";
3
3
  import { mutateSecuritySchemeDiff as k } from "@scalar/api-client/views/Request/libs";
4
4
  import { getServersFromOpenApiDocument as A } from "@scalar/oas-utils/transforms";
5
- import { watchDebounced as U } from "@vueuse/core";
6
- import B from "microdiff";
7
- import { useNavState as _ } from "../../hooks/useNavState.js";
8
- import { useApiClient as y } from "./useApiClient.js";
9
- import { useExampleStore as C } from "../../legacy/stores/useExampleStore.js";
10
- const q = /* @__PURE__ */ d({
5
+ import { watchDebounced as d } from "@vueuse/core";
6
+ import C from "microdiff";
7
+ import { useNavState as y } from "../../hooks/useNavState.js";
8
+ import { useApiClient as B } from "./useApiClient.js";
9
+ import { useExampleStore as L } from "../../legacy/stores/useExampleStore.js";
10
+ const z = /* @__PURE__ */ h({
11
11
  __name: "ApiClientModal",
12
12
  props: {
13
13
  configuration: {},
14
14
  dereferencedDocument: {}
15
15
  },
16
- setup(a) {
17
- const c = h(null), { client: i, init: p } = y(), { selectedExampleKey: v, operationId: l } = C(), u = M(), r = g(), { isIntersectionEnabled: m } = _();
18
- return S(() => {
19
- c.value && p({
20
- el: c.value,
21
- configuration: a.configuration,
22
- store: r
16
+ setup(n) {
17
+ const a = S(null), { client: c, init: v } = B(), { selectedExampleKey: p, operationId: s } = L(), u = M(), i = U(), { isIntersectionEnabled: m } = y();
18
+ return E(() => {
19
+ a.value && v({
20
+ el: a.value,
21
+ configuration: n.configuration,
22
+ store: i
23
23
  });
24
- }), U(
25
- () => a.configuration,
26
- (t, o) => {
27
- if (!o || !u.activeCollection.value)
24
+ }), d(
25
+ () => n.dereferencedDocument,
26
+ (e) => {
27
+ var r, o;
28
+ e && (u.activeCollection.value && ((r = c.value) == null || r.resetStore()), i.importSpecFile(void 0, "default", {
29
+ dereferencedDocument: e,
30
+ shouldLoad: !1,
31
+ documentUrl: (o = n.configuration) == null ? void 0 : o.url,
32
+ useCollectionSecurity: !0,
33
+ ...n.configuration
34
+ }));
35
+ }
36
+ ), d(
37
+ () => n.configuration,
38
+ (e, r) => {
39
+ if (!r || !u.activeCollection.value)
28
40
  return;
29
- const n = u.activeCollection.value, f = B(o, t);
41
+ const o = u.activeCollection.value, f = C(r, e);
30
42
  if (!f.some(
31
- (e) => e.path[0] === "url" || e.path[0] === "content" || e.path[1] === "url" || e.path[1] === "content"
43
+ (t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
32
44
  )) {
33
- if (f.forEach((e) => {
34
- e.path[0] === "authentication" && k(e, u, r);
35
- }), t.servers || o.servers) {
36
- n.servers.forEach((s) => {
37
- r.serverMutators.delete(s, n.uid);
45
+ if (f.forEach((t) => {
46
+ t.path[0] === "authentication" && k(t, u, i);
47
+ }), e.servers || r.servers) {
48
+ o.servers.forEach((l) => {
49
+ i.serverMutators.delete(l, o.uid);
38
50
  });
39
- const e = A(
40
- t.servers ?? a.dereferencedDocument.servers,
51
+ const t = A(
52
+ e.servers ?? n.dereferencedDocument.servers,
41
53
  {
42
- baseServerURL: t.baseServerURL
54
+ baseServerURL: e.baseServerURL
43
55
  }
44
56
  );
45
- e.forEach((s) => {
46
- r.serverMutators.add(s, n.uid);
47
- }), e.length && r.collectionMutators.edit(
48
- n.uid,
57
+ t.forEach((l) => {
58
+ i.serverMutators.add(l, o.uid);
59
+ }), t.length && i.collectionMutators.edit(
60
+ o.uid,
49
61
  "selectedServerUid",
50
- e[e.length - 1].uid
62
+ t[t.length - 1].uid
51
63
  );
52
64
  }
53
65
  }
@@ -56,17 +68,17 @@ const q = /* @__PURE__ */ d({
56
68
  }, 1e3);
57
69
  },
58
70
  { deep: !0, debounce: 300 }
59
- ), E(v, (t) => {
60
- i.value && t && l.value && i.value.updateExample(t, l.value);
61
- }), b(() => {
62
- var t;
63
- return (t = i.value) == null ? void 0 : t.app.unmount();
64
- }), (t, o) => (D(), x("div", {
71
+ ), g(p, (e) => {
72
+ c.value && e && s.value && c.value.updateExample(e, s.value);
73
+ }), D(() => {
74
+ var e;
75
+ return (e = c.value) == null ? void 0 : e.app.unmount();
76
+ }), (e, r) => (x(), b("div", {
65
77
  ref_key: "el",
66
- ref: c
78
+ ref: a
67
79
  }, null, 512));
68
80
  }
69
81
  });
70
82
  export {
71
- q as default
83
+ z as default
72
84
  };