@scalar/api-client 2.1.7 → 2.1.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 (112) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/assets/rabbit.ascii.js +11 -0
  3. package/dist/assets/rabbitjump.ascii.js +11 -0
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  6. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +48 -21
  8. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  9. package/dist/components/ContextBar.vue.js +2 -2
  10. package/dist/components/ContextBar.vue2.js +22 -13
  11. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
  12. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  13. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  14. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  15. package/dist/components/IconSelector.vue.d.ts +35 -0
  16. package/dist/components/IconSelector.vue.d.ts.map +1 -0
  17. package/dist/components/IconSelector.vue.js +74 -0
  18. package/dist/components/IconSelector.vue2.js +4 -0
  19. package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
  20. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  21. package/dist/components/ScalarAsciiArt.vue2.js +10 -10
  22. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  23. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  24. package/dist/components/SideNav/SideNav.vue.js +2 -2
  25. package/dist/components/SideNav/SideNav.vue2.js +19 -22
  26. package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -2
  27. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  28. package/dist/components/SideNav/SideNavLink.vue.js +19 -21
  29. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +24 -0
  30. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -0
  31. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +58 -0
  32. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +4 -0
  33. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.d.ts → EditSidebarListElement.vue.d.ts} +3 -3
  34. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -0
  35. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.js → EditSidebarListElement.vue.js} +9 -9
  36. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +4 -0
  37. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  38. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  39. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  40. package/dist/components/Sidebar/SidebarButton.vue.js +24 -26
  41. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  42. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  43. package/dist/layouts/App/ApiClientApp.vue.js +4 -4
  44. package/dist/layouts/App/create-api-client-app.d.ts +34 -22
  45. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  46. package/dist/layouts/Modal/create-api-client-modal.d.ts +68 -44
  47. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  48. package/dist/layouts/Modal/create-api-client-modal.js +19 -17
  49. package/dist/libs/create-client.d.ts +39 -38
  50. package/dist/libs/create-client.d.ts.map +1 -1
  51. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  52. package/dist/store/collections.d.ts +14 -4
  53. package/dist/store/collections.d.ts.map +1 -1
  54. package/dist/store/import-spec.d.ts +3 -2
  55. package/dist/store/import-spec.d.ts.map +1 -1
  56. package/dist/store/import-spec.js +34 -26
  57. package/dist/store/request-example.d.ts +2 -2
  58. package/dist/store/requests.d.ts +2 -2
  59. package/dist/store/security-schemes.d.ts +4 -4
  60. package/dist/store/store.d.ts +68 -44
  61. package/dist/store/store.d.ts.map +1 -1
  62. package/dist/store/tags.d.ts +4 -4
  63. package/dist/store/workspace.d.ts +4 -4
  64. package/dist/style.css +1 -1
  65. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  66. package/dist/views/Cookies/Cookies.vue2.js +74 -80
  67. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  68. package/dist/views/Environment/Environment.vue2.js +86 -92
  69. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  70. package/dist/views/Request/Request.vue.js +1 -1
  71. package/dist/views/Request/Request.vue2.js +26 -26
  72. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  74. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -80
  75. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  76. package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -45
  77. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  79. package/dist/views/Request/RequestSidebar.vue2.js +135 -113
  80. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  82. package/dist/views/Request/RequestSidebarItem.vue2.js +94 -91
  83. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  84. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  85. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +93 -79
  86. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  87. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  88. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +8 -5
  89. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +33 -33
  91. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  92. package/dist/views/Request/components/WorkspaceDropdown.vue.js +109 -95
  93. package/dist/views/Request/types/sidebar-item.d.ts +2 -1
  94. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  95. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  96. package/dist/views/Servers/Servers.vue2.js +48 -54
  97. package/package.json +9 -12
  98. package/dist/components/Search/SearchButton.vue.d.ts +0 -7
  99. package/dist/components/Search/SearchButton.vue.d.ts.map +0 -1
  100. package/dist/components/Search/SearchModal.vue.d.ts +0 -17
  101. package/dist/components/Search/SearchModal.vue.d.ts.map +0 -1
  102. package/dist/components/Search/SearchModal.vue.js +0 -7
  103. package/dist/components/Search/SearchModal.vue2.js +0 -142
  104. package/dist/components/Search/index.d.ts +0 -3
  105. package/dist/components/Search/index.d.ts.map +0 -1
  106. package/dist/components/Search/index.js +0 -4
  107. package/dist/components/SideNav/WorkspaceProfileIcon.vue.js +0 -31
  108. package/dist/components/SideNav/WorkspaceProfileIcon.vue3.js +0 -5
  109. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +0 -1
  110. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +0 -4
  111. package/dist/components/SubpageHeader.vue.js +0 -7
  112. package/dist/components/SubpageHeader.vue2.js +0 -34
@@ -1,156 +1,163 @@
1
- import { defineComponent as N, ref as C, computed as S, openBlock as f, createBlock as F, withCtx as n, createElementVNode as u, toDisplayString as A, createVNode as a, unref as c, createElementBlock as x, Fragment as W, renderList as q, createTextVNode as z, withModifiers as E, pushScopeId as K, popScopeId as H } from "vue";
2
- import L from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useModal as P, ScalarComboboxMultiselect as G, ScalarButton as J, ScalarIcon as D } from "@scalar/components";
4
- import Q from "./DeleteRequestAuthModal.vue.js";
5
- import X from "./RequestExampleAuth.vue.js";
6
- import { displaySchemeFormatter as M, createSchemeValueSet as Y } from "../../libs/auth.js";
7
- import { ADD_AUTH_OPTIONS as Z } from "../../consts/new-auth-options.js";
8
- import ee from "../../../../components/DataTable/DataTable.vue.js";
9
- import te from "../../../../components/DataTable/DataTableRow.vue.js";
10
- import le from "../../../../components/DataTable/DataTableHeader.vue.js";
11
- import { useWorkspace as oe } from "../../../../store/store.js";
12
- const b = (h) => (K("data-v-cdda9bac"), h = h(), H(), h), se = { class: "flex gap-1" }, ae = /* @__PURE__ */ b(() => /* @__PURE__ */ u("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ce = {
1
+ import { defineComponent as F, ref as A, computed as b, openBlock as d, createBlock as $, withCtx as n, createElementVNode as i, toDisplayString as D, createVNode as a, unref as c, createElementBlock as x, Fragment as q, renderList as z, createTextVNode as E, withModifiers as H, Teleport as K, createCommentVNode as L, pushScopeId as P, popScopeId as G } from "vue";
2
+ import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useModal as Q, ScalarComboboxMultiselect as X, ScalarButton as Y, ScalarIcon as V } from "@scalar/components";
4
+ import { nanoid as Z } from "nanoid";
5
+ import ee from "./DeleteRequestAuthModal.vue.js";
6
+ import te from "./RequestExampleAuth.vue.js";
7
+ import { displaySchemeFormatter as M, createSchemeValueSet as le } from "../../libs/auth.js";
8
+ import { ADD_AUTH_OPTIONS as oe } from "../../consts/new-auth-options.js";
9
+ import se from "../../../../components/DataTable/DataTable.vue.js";
10
+ import ae from "../../../../components/DataTable/DataTableRow.vue.js";
11
+ import ce from "../../../../components/DataTable/DataTableHeader.vue.js";
12
+ import { useWorkspace as ie } from "../../../../store/store.js";
13
+ const y = (v) => (P("data-v-b2a5825f"), v = v(), G(), v), re = { class: "flex gap-1" }, ne = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ue = {
13
14
  key: 0,
14
15
  class: "flex relative scroll-timeline-x w-full"
15
- }, ie = /* @__PURE__ */ b(() => /* @__PURE__ */ u("div", { class: "fade-left" }, null, -1)), ne = { class: "flex flex-1 gap-0.75 mr-1.5 items-center" }, re = /* @__PURE__ */ b(() => /* @__PURE__ */ u("div", { class: "fade-right" }, null, -1)), ue = {
16
+ }, de = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", { class: "fade-left" }, null, -1)), me = { class: "flex flex-1 gap-0.75 mr-1.5 items-center" }, pe = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", null, "Hello World", -1)), fe = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", { class: "fade-right" }, null, -1)), he = {
16
17
  key: 1,
17
18
  class: "pl-2"
18
- }, ge = /* @__PURE__ */ N({
19
+ }, De = /* @__PURE__ */ F({
19
20
  __name: "RequestAuth",
20
21
  props: {
21
22
  title: {}
22
23
  },
23
- setup(h) {
24
+ setup(v) {
24
25
  const {
25
- activeCollection: r,
26
- activeRequest: i,
27
- collectionMutators: V,
26
+ activeCollection: u,
27
+ activeRequest: r,
28
+ collectionMutators: I,
28
29
  isReadOnly: g,
29
30
  requestMutators: k,
30
- securitySchemes: v,
31
- securitySchemeMutators: $
32
- } = oe(), O = C(null), y = P(), w = C(void 0), R = S(() => {
33
- var o, m, d;
34
- const e = (m = (o = i.value) == null ? void 0 : o.security) == null ? void 0 : m.filter(
31
+ securitySchemes: _,
32
+ securitySchemeMutators: O
33
+ } = ie(), R = A(null), S = Q(), C = A(void 0), w = `combobox-${Z()}`, T = b(() => {
34
+ var o, p, f;
35
+ const e = (p = (o = r.value) == null ? void 0 : o.security) == null ? void 0 : p.filter(
35
36
  (s) => Object.keys(s).length
36
37
  );
37
38
  return ((g.value && (e != null && e.length) ? e.map((s) => {
38
- var p;
39
+ var h;
39
40
  const l = Object.keys(s)[0];
40
- return ((p = Object.values(v).find((B) => B.nameKey === l)) == null ? void 0 : p.uid) ?? "";
41
- }) : (d = r.value) == null ? void 0 : d.securitySchemes) ?? []).map((s) => v[s]).filter((s) => s);
42
- }), U = S(
41
+ return ((h = Object.values(_).find((W) => W.nameKey === l)) == null ? void 0 : h.uid) ?? "";
42
+ }) : (f = u.value) == null ? void 0 : f.securitySchemes) ?? []).map((s) => _[s]).filter((s) => s);
43
+ }), U = b(
43
44
  () => {
44
- const e = R.value.map(
45
+ const e = T.value.map(
45
46
  (t) => M(t)
46
47
  );
47
48
  return g.value ? e : [
48
49
  { label: "Select auth", options: e },
49
50
  {
50
51
  label: "Add new auth",
51
- options: Z
52
+ options: oe
52
53
  }
53
54
  ];
54
55
  }
55
- ), _ = S(
56
+ ), m = b(
56
57
  () => {
57
58
  var e;
58
- return ((e = i.value) == null ? void 0 : e.selectedSecuritySchemeUids.map(
59
- (t) => M(v[t])
59
+ return ((e = r.value) == null ? void 0 : e.selectedSecuritySchemeUids.map(
60
+ (t) => M(_[t])
60
61
  )) ?? [];
61
62
  }
62
63
  );
63
- function I(e) {
64
- var d, s;
65
- if (!((d = r.value) != null && d.uid) || !((s = i.value) != null && s.uid)) return;
64
+ function N(e) {
65
+ var f, s;
66
+ if (!((f = u.value) != null && f.uid) || !((s = r.value) != null && s.uid)) return;
66
67
  const t = e.find((l) => l.payload), o = e.filter((l) => !l.payload).map(({ id: l }) => l);
67
68
  if (t != null && t.payload) {
68
- const l = $.add(
69
+ const l = O.add(
69
70
  t.payload,
70
- r.value.uid
71
+ u.value.uid
71
72
  );
72
73
  o.push(l.uid);
73
74
  }
74
- const m = o.filter((l) => !r.value.auth[l]);
75
- V.edit(
76
- r.value.uid,
75
+ const p = o.filter((l) => !u.value.auth[l]);
76
+ I.edit(
77
+ u.value.uid,
77
78
  "auth",
78
- m.reduce((l, p) => (l[p] = Y(v[p]), l), r.value.auth)
79
+ p.reduce((l, h) => (l[h] = le(_[h]), l), u.value.auth)
79
80
  ), k.edit(
80
- i.value.uid,
81
+ r.value.uid,
81
82
  "selectedSecuritySchemeUids",
82
83
  o
83
84
  );
84
85
  }
85
- const T = (e) => i.value && k.edit(
86
- i.value.uid,
86
+ const j = (e) => r.value && k.edit(
87
+ r.value.uid,
87
88
  "selectedSecuritySchemeUids",
88
- i.value.selectedSecuritySchemeUids.filter(
89
+ r.value.selectedSecuritySchemeUids.filter(
89
90
  (t) => t !== e
90
91
  )
91
92
  );
92
- function j(e) {
93
- w.value = e, y.show();
93
+ function B(e) {
94
+ C.value = e, S.show();
94
95
  }
95
- return (e, t) => (f(), F(L, {
96
+ return (e, t) => (d(), $(J, {
96
97
  class: "group/params",
97
- itemCount: _.value.length
98
+ itemCount: m.value.length
98
99
  }, {
99
100
  title: n(() => [
100
- u("div", se, A(e.title), 1)
101
+ i("div", re, D(e.title), 1)
101
102
  ]),
102
103
  default: n(() => [
103
- u("form", null, [
104
- a(c(ee), {
104
+ i("form", null, [
105
+ a(c(se), {
105
106
  class: "flex-1",
106
107
  columns: [""]
107
108
  }, {
108
109
  default: n(() => [
109
- a(c(te), null, {
110
+ a(c(ae), null, {
110
111
  default: n(() => [
111
- a(c(le), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
112
+ a(c(ce), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
112
113
  default: n(() => [
113
- a(c(G), {
114
+ a(c(X), {
114
115
  ref_key: "comboboxRef",
115
- ref: O,
116
+ ref: R,
116
117
  class: "text-xs w-full",
117
118
  fullWidth: "",
118
119
  isDeletable: "",
119
- modelValue: _.value,
120
+ modelValue: m.value,
120
121
  multiple: "",
121
122
  options: U.value,
122
123
  style: { "margin-left": "120px" },
123
- teleport: "",
124
- onDelete: j,
125
- "onUpdate:modelValue": I
124
+ teleport: `#${w}`,
125
+ onDelete: B,
126
+ "onUpdate:modelValue": N
126
127
  }, {
127
128
  default: n(() => [
128
- a(c(J), {
129
+ a(c(Y), {
129
130
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
130
131
  fullWidth: "",
131
132
  variant: "ghost"
132
133
  }, {
133
134
  default: n(() => [
134
- ae,
135
- _.value.length ? (f(), x("div", ce, [
136
- ie,
137
- u("div", ne, [
138
- (f(!0), x(W, null, q(_.value, (o) => (f(), x("span", {
135
+ ne,
136
+ m.value.length ? (d(), x("div", ue, [
137
+ de,
138
+ i("div", me, [
139
+ (d(!0), x(q, null, z(m.value, (o) => (d(), x("span", {
139
140
  key: o.id,
140
141
  class: "cm-pill flex items-center mx-0 h-fit"
141
142
  }, [
142
- z(A(o.label) + " ", 1),
143
- a(c(D), {
143
+ E(D(o.label) + " ", 1),
144
+ a(c(V), {
144
145
  class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
145
146
  icon: "Close",
146
147
  size: "xs",
147
- onClick: E((m) => T(o.id), ["stop"])
148
+ onClick: H((p) => j(o.id), ["stop"])
148
149
  }, null, 8, ["onClick"])
149
150
  ]))), 128))
150
151
  ]),
151
- re
152
- ])) : (f(), x("div", ue, " None ")),
153
- a(c(D), {
152
+ m.value.length ? (d(), $(K, {
153
+ key: 0,
154
+ to: "body"
155
+ }, [
156
+ pe
157
+ ])) : L("", !0),
158
+ fe
159
+ ])) : (d(), x("div", he, " None ")),
160
+ a(c(V), {
154
161
  class: "min-w-3 ml-auto mr-2.5",
155
162
  icon: "ChevronDown",
156
163
  size: "xs"
@@ -160,22 +167,23 @@ const b = (h) => (K("data-v-cdda9bac"), h = h(), H(), h), se = { class: "flex ga
160
167
  })
161
168
  ]),
162
169
  _: 1
163
- }, 8, ["modelValue", "options"])
170
+ }, 8, ["modelValue", "options", "teleport"])
164
171
  ]),
165
172
  _: 1
166
173
  })
167
174
  ]),
168
175
  _: 1
169
176
  }),
170
- a(X)
177
+ a(te)
171
178
  ]),
172
179
  _: 1
173
180
  }),
174
- a(Q, {
175
- scheme: w.value,
176
- state: c(y),
177
- onClose: t[0] || (t[0] = (o) => c(y).hide())
178
- }, null, 8, ["scheme", "state"])
181
+ a(ee, {
182
+ scheme: C.value,
183
+ state: c(S),
184
+ onClose: t[0] || (t[0] = (o) => c(S).hide())
185
+ }, null, 8, ["scheme", "state"]),
186
+ i("div", { id: w })
179
187
  ])
180
188
  ]),
181
189
  _: 1
@@ -183,5 +191,5 @@ const b = (h) => (K("data-v-cdda9bac"), h = h(), H(), h), se = { class: "flex ga
183
191
  }
184
192
  });
185
193
  export {
186
- ge as default
194
+ De as default
187
195
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAsaA,wBAKG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAuaA,wBAKG"}
@@ -1,24 +1,24 @@
1
- import { defineComponent as R, computed as _, ref as g, watch as C, openBlock as c, createBlock as w, withCtx as x, createVNode as n, unref as a, createElementVNode as A, createTextVNode as H, createElementBlock as d, createCommentVNode as N, toDisplayString as V, withDirectives as r, vShow as u } from "vue";
2
- import b from "../../../components/ContextBar.vue.js";
3
- import E from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import K from "./RequestBody.vue.js";
5
- import p from "./RequestParams.vue.js";
6
- import $ from "./RequestPathParams.vue.js";
7
- import { ScalarIcon as Q } from "@scalar/components";
8
- import { canMethodHaveBody as v } from "@scalar/oas-utils/helpers";
9
- import D from "./RequestAuth/RequestAuth.vue.js";
10
- import { useWorkspace as I } from "../../../store/store.js";
11
- const M = { class: "flex-1 flex gap-1 items-center pointer-events-none" }, P = {
1
+ import { defineComponent as B, computed as _, ref as g, watch as R, openBlock as m, createBlock as C, withCtx as x, createVNode as n, unref as a, createElementVNode as A, createTextVNode as w, createElementBlock as d, createCommentVNode as H, toDisplayString as N, withDirectives as r, vShow as u } from "vue";
2
+ import V from "../../../components/ContextBar.vue.js";
3
+ import b from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import E from "./RequestBody.vue.js";
5
+ import v from "./RequestParams.vue.js";
6
+ import K from "./RequestPathParams.vue.js";
7
+ import { ScalarIcon as $ } from "@scalar/components";
8
+ import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
9
+ import Q from "./RequestAuth/RequestAuth.vue.js";
10
+ import { useWorkspace as D } from "../../../store/store.js";
11
+ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none" }, M = {
12
12
  key: 0,
13
13
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
14
14
  for: "requestname"
15
- }, z = ["value"], L = {
15
+ }, P = ["value"], z = {
16
16
  key: 2,
17
17
  class: "text-c-2"
18
- }, O = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, te = /* @__PURE__ */ R({
18
+ }, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, ee = /* @__PURE__ */ B({
19
19
  __name: "RequestSection",
20
- setup(T) {
21
- const { activeRequest: o, activeExample: f, isReadOnly: m, requestMutators: k } = I(), q = _(() => {
20
+ setup(O) {
21
+ const { activeRequest: o, activeExample: h, isReadOnly: p, requestMutators: k } = D(), q = _(() => {
22
22
  var l, s;
23
23
  const t = /* @__PURE__ */ new Set([
24
24
  "Query",
@@ -29,91 +29,91 @@ const M = { class: "flex-1 flex gap-1 items-center pointer-events-none" }, P = {
29
29
  "Body",
30
30
  "All"
31
31
  ]);
32
- return (l = f.value) != null && l.parameters.path.length || t.delete("Request"), v(((s = o.value) == null ? void 0 : s.method) ?? "get") || t.delete("Body"), h.value && t.delete("Auth"), [...t];
33
- }), h = _(
32
+ return (l = h.value) != null && l.parameters.path.length || t.delete("Request"), f(((s = o.value) == null ? void 0 : s.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
33
+ }), y = _(
34
34
  () => {
35
35
  var t, l;
36
- return m.value && ((l = (t = o.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
36
+ return p.value && ((l = (t = o.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
37
37
  }
38
38
  ), e = g("All");
39
- C(o, (t) => {
40
- e.value === "Body" && t && !v(t.method) && (e.value = "All");
39
+ R(o, (t) => {
40
+ e.value === "Body" && t && !f(t.method) && (e.value = "All");
41
41
  });
42
42
  const S = (t) => {
43
43
  if (!o.value) return;
44
44
  const l = t.target;
45
45
  k.edit(o.value.uid, "summary", l.value);
46
46
  };
47
- return (t, l) => (c(), w(E, null, {
47
+ return (t, l) => (m(), C(b, null, {
48
48
  title: x(() => {
49
49
  var s, i;
50
50
  return [
51
- n(a(Q), {
51
+ n(a($), {
52
52
  class: "text-c-3 mr-2 pointer-events-none",
53
53
  icon: "ExternalLink",
54
54
  size: "sm",
55
55
  thickness: "2.5"
56
56
  }),
57
- A("div", M, [
58
- H(" Request "),
59
- a(m) ? N("", !0) : (c(), d("label", P)),
60
- a(m) ? (c(), d("span", L, V((i = a(o)) == null ? void 0 : i.summary), 1)) : (c(), d("input", {
57
+ A("div", I, [
58
+ w(" Request "),
59
+ a(p) ? H("", !0) : (m(), d("label", M)),
60
+ a(p) ? (m(), d("span", z, N((i = a(o)) == null ? void 0 : i.summary), 1)) : (m(), d("input", {
61
61
  key: 1,
62
62
  id: "requestname",
63
63
  class: "outline-none border-0 text-c-2 rounded pointer-events-auto relative w-full",
64
64
  placeholder: "Request Name",
65
65
  value: (s = a(o)) == null ? void 0 : s.summary,
66
66
  onInput: S
67
- }, null, 40, z))
68
- ])
67
+ }, null, 40, P))
68
+ ]),
69
+ n(V, {
70
+ activeSection: e.value,
71
+ sections: q.value,
72
+ onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
73
+ }, null, 8, ["activeSection", "sections"])
69
74
  ];
70
75
  }),
71
76
  default: x(() => {
72
- var s, i, y;
77
+ var s, i, c;
73
78
  return [
74
- A("div", O, [
75
- n(b, {
76
- activeSection: e.value,
77
- sections: q.value,
78
- onSetActiveSection: l[0] || (l[0] = (B) => e.value = B)
79
- }, null, 8, ["activeSection", "sections"]),
80
- r(n(D, { title: "Authentication" }, null, 512), [
79
+ A("div", L, [
80
+ r(n(Q, { title: "Authentication" }, null, 512), [
81
81
  [
82
82
  u,
83
- !h.value && (e.value === "All" || e.value === "Auth")
83
+ !y.value && (e.value === "All" || e.value === "Auth")
84
84
  ]
85
85
  ]),
86
- r(n($, {
86
+ r(n(K, {
87
87
  paramKey: "path",
88
88
  title: "Path Variables"
89
89
  }, null, 512), [
90
90
  [
91
91
  u,
92
- (e.value === "All" || e.value === "Request") && ((y = (i = (s = a(f)) == null ? void 0 : s.parameters) == null ? void 0 : i.path) == null ? void 0 : y.length)
92
+ (e.value === "All" || e.value === "Request") && ((c = (i = (s = a(h)) == null ? void 0 : s.parameters) == null ? void 0 : i.path) == null ? void 0 : c.length)
93
93
  ]
94
94
  ]),
95
- r(n(p, {
95
+ r(n(v, {
96
96
  paramKey: "cookies",
97
97
  title: "Cookies"
98
98
  }, null, 512), [
99
99
  [u, e.value === "All" || e.value === "Cookies"]
100
100
  ]),
101
- r(n(p, {
101
+ r(n(v, {
102
102
  paramKey: "headers",
103
103
  title: "Headers"
104
104
  }, null, 512), [
105
105
  [u, e.value === "All" || e.value === "Headers"]
106
106
  ]),
107
- r(n(p, {
107
+ r(n(v, {
108
108
  paramKey: "query",
109
109
  title: "Query Parameters"
110
110
  }, null, 512), [
111
111
  [u, e.value === "All" || e.value === "Query"]
112
112
  ]),
113
- r(n(K, { title: "Body" }, null, 512), [
113
+ r(n(E, { title: "Body" }, null, 512), [
114
114
  [
115
115
  u,
116
- a(o) && (e.value === "All" || e.value === "Body") && a(v)(a(o).method)
116
+ a(o) && (e.value === "All" || e.value === "Body") && a(f)(a(o).method)
117
117
  ]
118
118
  ])
119
119
  ])
@@ -124,5 +124,5 @@ const M = { class: "flex-1 flex gap-1 items-center pointer-events-none" }, P = {
124
124
  }
125
125
  });
126
126
  export {
127
- te as default
127
+ ee as default
128
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBA4Oe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAqgB1D,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAgVe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAklB1D,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSidebar.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-4163cb67"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-07523d65"]]);
5
5
  export {
6
6
  m as default
7
7
  };