@scalar/api-client 2.1.33 → 2.1.35

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 (106) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  6. package/dist/components/ContextBar.vue.js +1 -1
  7. package/dist/components/ContextBar.vue2.js +6 -6
  8. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  10. package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
  11. package/dist/components/ScalarHotkey.vue.d.ts +5 -6
  12. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  13. package/dist/components/ScalarHotkey.vue.js +9 -18
  14. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  15. package/dist/components/SideNav/SideNav.vue.js +2 -2
  16. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  17. package/dist/components/Sidebar/SidebarButton.vue.d.ts +4 -0
  18. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  19. package/dist/components/Sidebar/SidebarButton.vue.js +19 -17
  20. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  21. package/dist/components/TopNav/TopNav.vue.js +2 -2
  22. package/dist/components/TopNav/TopNav.vue2.js +14 -14
  23. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  24. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +8 -8
  28. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  29. package/dist/layouts/App/ApiClientApp.vue.js +35 -29
  30. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  31. package/dist/layouts/App/MainLayout.vue.js +4 -4
  32. package/dist/layouts/App/create-api-client-app.d.ts +257 -45
  33. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  34. package/dist/layouts/App/create-api-client-app.js +10 -10
  35. package/dist/layouts/App/hotkeys.js +1 -1
  36. package/dist/layouts/Modal/create-api-client-modal.d.ts +514 -90
  37. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  38. package/dist/layouts/Modal/create-api-client-modal.js +24 -22
  39. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  40. package/dist/layouts/Web/ApiClientWeb.vue.js +33 -27
  41. package/dist/layouts/Web/create-api-client-web.d.ts +258 -46
  42. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  43. package/dist/layouts/Web/create-api-client-web.js +9 -9
  44. package/dist/libs/create-client.d.ts +280 -50
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/create-client.js +25 -24
  47. package/dist/libs/hot-keys.d.ts +1 -1
  48. package/dist/libs/local-storage.d.ts +2 -2
  49. package/dist/libs/local-storage.d.ts.map +1 -1
  50. package/dist/libs/send-request.d.ts +2 -1
  51. package/dist/libs/send-request.d.ts.map +1 -1
  52. package/dist/libs/send-request.js +98 -97
  53. package/dist/router.d.ts +5 -5
  54. package/dist/router.d.ts.map +1 -1
  55. package/dist/router.js +32 -32
  56. package/dist/store/collections.d.ts +14 -4
  57. package/dist/store/collections.d.ts.map +1 -1
  58. package/dist/store/events.d.ts +1 -1
  59. package/dist/store/import-spec.d.ts +16 -31
  60. package/dist/store/import-spec.d.ts.map +1 -1
  61. package/dist/store/import-spec.js +43 -56
  62. package/dist/store/requests.d.ts +14 -14
  63. package/dist/store/store.d.ts +514 -90
  64. package/dist/store/store.d.ts.map +1 -1
  65. package/dist/store/store.js +43 -43
  66. package/dist/store/workspace.d.ts +10 -10
  67. package/dist/store/workspace.d.ts.map +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/views/Cookies/Cookies.vue.d.ts +5 -1
  70. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  71. package/dist/views/Cookies/Cookies.vue2.js +64 -55
  72. package/dist/views/Environment/Environment.vue.d.ts +5 -1
  73. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  74. package/dist/views/Environment/Environment.vue2.js +75 -66
  75. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  76. package/dist/views/Request/Request.vue.js +1 -1
  77. package/dist/views/Request/Request.vue2.js +96 -90
  78. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
  79. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  80. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
  81. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -0
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +105 -112
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +5 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +38 -35
  88. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +5 -1
  89. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -118
  91. package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
  92. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  93. package/dist/views/Request/RequestSidebar.vue.js +4 -4
  94. package/dist/views/Request/RequestSidebar.vue2.js +43 -42
  95. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  96. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  97. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -26
  98. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  99. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
  100. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  101. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
  102. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
  103. package/dist/views/Settings/SettingsGeneral.vue.js +3 -3
  104. package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
  105. package/package.json +8 -8
  106. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
@@ -0,0 +1,126 @@
1
+ import { defineComponent as g, computed as _, ref as q, watch as b, openBlock as m, createBlock as C, withCtx as S, createElementVNode as A, unref as s, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as u, withDirectives as i, vShow as r } from "vue";
2
+ import H from "../../../components/ContextBar.vue.js";
3
+ import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import N from "./RequestBody.vue.js";
5
+ import v from "./RequestParams.vue.js";
6
+ import K from "./RequestPathParams.vue.js";
7
+ import { canMethodHaveBody as h } from "@scalar/oas-utils/helpers";
8
+ import U from "./RequestAuth/RequestAuth.vue.js";
9
+ import { useWorkspace as E } from "../../../store/store.js";
10
+ const Q = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none h-full" }, $ = {
11
+ key: 0,
12
+ class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
13
+ for: "requestname"
14
+ }, D = ["value"], M = {
15
+ key: 2,
16
+ class: "text-c-1"
17
+ }, P = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ g({
18
+ __name: "RequestSection",
19
+ props: {
20
+ selectedSecuritySchemeUids: {}
21
+ },
22
+ setup(I) {
23
+ const { activeRequest: a, activeExample: f, isReadOnly: d, requestMutators: x } = E(), k = _(() => {
24
+ var l, o;
25
+ const t = /* @__PURE__ */ new Set([
26
+ "All",
27
+ "Query",
28
+ "Auth",
29
+ "Variables",
30
+ "Cookies",
31
+ "Headers",
32
+ "Body"
33
+ ]);
34
+ return (l = f.value) != null && l.parameters.path.length || t.delete("Variables"), h(((o = a.value) == null ? void 0 : o.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
35
+ }), y = _(
36
+ () => {
37
+ var t, l;
38
+ return d.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
39
+ }
40
+ ), e = q("All");
41
+ b(a, (t) => {
42
+ e.value === "Body" && t && !h(t.method) && (e.value = "All");
43
+ });
44
+ const B = (t) => {
45
+ if (!a.value) return;
46
+ const l = t.target;
47
+ x.edit(a.value.uid, "summary", l.value);
48
+ };
49
+ return (t, l) => (m(), C(R, null, {
50
+ title: S(() => {
51
+ var o, n;
52
+ return [
53
+ A("div", Q, [
54
+ s(d) ? V("", !0) : (m(), p("label", $)),
55
+ s(d) ? (m(), p("span", M, w((n = s(a)) == null ? void 0 : n.summary), 1)) : (m(), p("input", {
56
+ key: 1,
57
+ id: "requestname",
58
+ class: "text-c-1 rounded pointer-events-auto relative w-full pl-3 -ml-3 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline",
59
+ placeholder: "Request Name",
60
+ value: (o = s(a)) == null ? void 0 : o.summary,
61
+ onInput: B
62
+ }, null, 40, D))
63
+ ]),
64
+ u(H, {
65
+ activeSection: e.value,
66
+ sections: k.value,
67
+ onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
68
+ }, null, 8, ["activeSection", "sections"])
69
+ ];
70
+ }),
71
+ default: S(() => {
72
+ var o, n, c;
73
+ return [
74
+ A("div", P, [
75
+ i(u(U, {
76
+ selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
77
+ title: "Authentication"
78
+ }, null, 8, ["selectedSecuritySchemeUids"]), [
79
+ [
80
+ r,
81
+ !y.value && (e.value === "All" || e.value === "Auth")
82
+ ]
83
+ ]),
84
+ i(u(K, {
85
+ paramKey: "path",
86
+ title: "Path Variables"
87
+ }, null, 512), [
88
+ [
89
+ r,
90
+ (e.value === "All" || e.value === "Variables") && ((c = (n = (o = s(f)) == null ? void 0 : o.parameters) == null ? void 0 : n.path) == null ? void 0 : c.length)
91
+ ]
92
+ ]),
93
+ i(u(v, {
94
+ paramKey: "cookies",
95
+ title: "Cookies"
96
+ }, null, 512), [
97
+ [r, e.value === "All" || e.value === "Cookies"]
98
+ ]),
99
+ i(u(v, {
100
+ paramKey: "headers",
101
+ title: "Headers"
102
+ }, null, 512), [
103
+ [r, e.value === "All" || e.value === "Headers"]
104
+ ]),
105
+ i(u(v, {
106
+ paramKey: "query",
107
+ title: "Query Parameters"
108
+ }, null, 512), [
109
+ [r, e.value === "All" || e.value === "Query"]
110
+ ]),
111
+ i(u(N, { title: "Body" }, null, 512), [
112
+ [
113
+ r,
114
+ s(a) && (e.value === "All" || e.value === "Body") && s(h)(s(a).method)
115
+ ]
116
+ ])
117
+ ])
118
+ ];
119
+ }),
120
+ _: 1
121
+ }));
122
+ }
123
+ });
124
+ export {
125
+ X as default
126
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBA6Ve,OAAO;gBACR,OAAO;;;cAynBkB,MAAM;aAAO,MAAM;;;;iBA1nB3C,OAAO;gBACR,OAAO;;;cAynBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAwVe,OAAO;gBACR,OAAO;;;cAmnBkB,MAAM;aAAO,MAAM;;;;iBApnB3C,OAAO;gBACR,OAAO;;;cAmnBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
@@ -1,7 +1,7 @@
1
- import o from "./RequestSidebar.vue2.js";
1
+ import e from "./RequestSidebar.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7cb3d69f"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-beea081e"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as u, unref as t, normalizeClass as b, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as p, createBlock as l, renderList as x, createTextVNode as D, toDisplayString as se, createCommentVNode as F, vShow as re } from "vue";
1
+ import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as u, unref as t, normalizeClass as f, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as m, createBlock as l, renderList as x, createTextVNode as D, toDisplayString as se, createCommentVNode as F, vShow as re } from "vue";
2
2
  import ae from "../../assets/rabbit.ascii.js";
3
3
  import ne from "../../assets/rabbitjump.ascii.js";
4
4
  import ie from "../../components/HttpMethod/HttpMethod.vue.js";
@@ -6,8 +6,8 @@ import $ from "../../components/ScalarAsciiArt.vue.js";
6
6
  import { useSearch as le } from "../../components/Search/useSearch.js";
7
7
  import de from "../../components/Sidebar/SidebarButton.vue.js";
8
8
  import ue from "./RequestSidebarItemMenu.vue.js";
9
- import { dragHandlerFactory as me } from "./handle-drag.js";
10
- import { ScalarSearchInput as pe, ScalarSearchResultList as ce, ScalarSearchResultItem as fe, ScalarIcon as V } from "@scalar/components";
9
+ import { dragHandlerFactory as pe } from "./handle-drag.js";
10
+ import { ScalarSearchInput as me, ScalarSearchResultList as ce, ScalarSearchResultItem as fe, ScalarIcon as V } from "@scalar/components";
11
11
  import { LibraryIcon as be } from "@scalar/icons";
12
12
  import he from "./RequestSidebarItem.vue.js";
13
13
  import Se from "../../components/Sidebar/Sidebar.vue.js";
@@ -20,76 +20,76 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
20
20
  isReadonly: { type: Boolean }
21
21
  },
22
22
  emits: ["update:showSidebar", "newTab"],
23
- setup(q, { emit: P }) {
24
- const T = q, g = P, R = ge(), {
25
- activeWorkspaceCollections: B,
26
- activeRequest: E,
23
+ setup(q, { emit: T }) {
24
+ const B = q, g = T, R = ge(), {
25
+ activeWorkspaceCollections: E,
26
+ activeRequest: K,
27
27
  activeWorkspaceRequests: M,
28
28
  findRequestParents: O,
29
29
  isReadOnly: W,
30
- events: c
31
- } = R, { handleDragEnd: K, isDroppable: N } = me(R), { collapsedSidebarFolders: U, setCollapsedSidebarFolder: z } = ve(), m = X({ open: !1 });
30
+ events: b
31
+ } = R, { handleDragEnd: N, isDroppable: U } = pe(R), { collapsedSidebarFolders: z, setCollapsedSidebarFolder: A } = ve(), p = X({ open: !1 });
32
32
  Y(
33
- E,
33
+ K,
34
34
  (o) => {
35
35
  o && O(o).forEach(
36
- (e) => z(e, !0)
36
+ (e) => A(e, !0)
37
37
  );
38
38
  },
39
39
  { immediate: !0 }
40
40
  );
41
41
  const {
42
- searchText: f,
42
+ searchText: c,
43
43
  searchResultsWithPlaceholderResults: w,
44
44
  selectedSearchResult: k,
45
- onSearchResultClick: A,
46
- fuseSearch: L,
45
+ onSearchResultClick: L,
46
+ fuseSearch: P,
47
47
  searchInputRef: y,
48
48
  searchResultRefs: H,
49
49
  navigateSearchResults: C,
50
50
  selectSearchResult: j
51
51
  } = le(), I = (o) => {
52
52
  var e;
53
- o && (o.toggleSidebar && g("update:showSidebar", T.showSidebar), o.openCommandPalette && (o.openCommandPalette.preventDefault(), c.commandPalette.emit()), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
53
+ o && (o.toggleSidebar && g("update:showSidebar", B.showSidebar), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
54
54
  };
55
- Z(() => c.hotKeys.on(I)), _(() => {
56
- c.hotKeys.off(I);
55
+ Z(() => b.hotKeys.on(I)), _(() => {
56
+ b.hotKeys.off(I);
57
57
  });
58
58
  const G = (o) => {
59
59
  o != null && o.documentUrl && (o.watchForChanges = !o.watchForChanges);
60
60
  };
61
61
  return (o, e) => (a(), h(S, null, [
62
62
  ee(u(t(Se), {
63
- class: b([o.showSidebar ? "sidebar-active-width" : ""]),
63
+ class: f([o.showSidebar ? "sidebar-active-width" : ""]),
64
64
  showSidebar: o.showSidebar,
65
65
  "onUpdate:showSidebar": e[8] || (e[8] = (s) => o.$emit("update:showSidebar", s))
66
66
  }, te({
67
67
  content: i(() => [
68
68
  n("div", Re, [
69
- u(t(pe), {
69
+ u(t(me), {
70
70
  ref_key: "searchInputRef",
71
71
  ref: y,
72
- modelValue: t(f),
73
- "onUpdate:modelValue": e[0] || (e[0] = (s) => oe(f) ? f.value = s : null),
72
+ modelValue: t(c),
73
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => oe(c) ? c.value = s : null),
74
74
  sidebar: "",
75
- onInput: t(L),
75
+ onInput: t(P),
76
76
  onKeydown: [
77
- e[1] || (e[1] = v(p((s) => t(C)("down"), ["stop"]), ["down"])),
78
- e[2] || (e[2] = v(p((s) => t(j)(), ["stop"]), ["enter"])),
79
- e[3] || (e[3] = v(p((s) => t(C)("up"), ["stop"]), ["up"]))
77
+ e[1] || (e[1] = v(m((s) => t(C)("down"), ["stop"]), ["down"])),
78
+ e[2] || (e[2] = v(m((s) => t(j)(), ["stop"]), ["enter"])),
79
+ e[3] || (e[3] = v(m((s) => t(C)("up"), ["stop"]), ["up"]))
80
80
  ]
81
81
  }, null, 8, ["modelValue", "onInput"])
82
82
  ]),
83
83
  n("div", {
84
- class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
84
+ class: f(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
85
85
  "pb-14": !o.isReadonly
86
86
  }]),
87
- onDragenter: e[6] || (e[6] = p(() => {
87
+ onDragenter: e[6] || (e[6] = m(() => {
88
88
  }, ["prevent"])),
89
- onDragover: e[7] || (e[7] = p(() => {
89
+ onDragover: e[7] || (e[7] = m(() => {
90
90
  }, ["prevent"]))
91
91
  }, [
92
- t(f) ? (a(), l(t(ce), {
92
+ t(c) ? (a(), l(t(ce), {
93
93
  key: 0,
94
94
  class: "gap-px custom-scroll",
95
95
  noResults: !t(w).length
@@ -102,7 +102,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
102
102
  ref: (r) => t(H)[d] = r,
103
103
  active: t(k) === d,
104
104
  class: "px-2",
105
- onClick: (r) => t(A)(s),
105
+ onClick: (r) => t(L)(s),
106
106
  onFocus: (r) => k.value = d
107
107
  }, {
108
108
  addon: i(() => [
@@ -118,18 +118,18 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
118
118
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
119
119
  ]),
120
120
  _: 1
121
- }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(B), (s) => {
121
+ }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(E), (s) => {
122
122
  var d;
123
123
  return a(), l(he, {
124
124
  key: s.uid,
125
125
  isDraggable: !o.isReadonly && ((d = s.info) == null ? void 0 : d.title) !== "Drafts",
126
- isDroppable: t(N),
127
- menuItem: m,
126
+ isDroppable: t(U),
127
+ menuItem: p,
128
128
  parentUids: [],
129
129
  uid: s.uid,
130
130
  onNewTab: e[4] || (e[4] = (r, J) => g("newTab", { name: r, uid: J })),
131
- onOnDragEnd: t(K),
132
- onOpenMenu: e[5] || (e[5] = (r) => Object.assign(m, r))
131
+ onOnDragEnd: t(N),
132
+ onOpenMenu: e[5] || (e[5] = (r) => Object.assign(p, r))
133
133
  }, {
134
134
  leftIcon: i(() => {
135
135
  var r;
@@ -145,8 +145,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
145
145
  src: s["x-scalar-icon"] || "interface-content-folder"
146
146
  }, null, 8, ["src"])),
147
147
  n("div", {
148
- class: b({
149
- "rotate-90": t(U)[s.uid]
148
+ class: f({
149
+ "rotate-90": t(z)[s.uid]
150
150
  })
151
151
  }, [
152
152
  u(t(V), {
@@ -165,7 +165,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
165
165
  ]),
166
166
  button: i(() => [
167
167
  n("div", {
168
- class: b({
168
+ class: f({
169
169
  "empty-sidebar-item": t(M).length <= 1
170
170
  })
171
171
  }, [
@@ -187,7 +187,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
187
187
  ]),
188
188
  o.isReadonly ? F("", !0) : (a(), l(de, {
189
189
  key: 0,
190
- click: t(c).commandPalette.emit
190
+ click: t(b).commandPalette.emit,
191
+ hotkey: "K"
191
192
  }, {
192
193
  title: i(() => e[11] || (e[11] = [
193
194
  D("Add Item")
@@ -206,10 +207,10 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
206
207
  ]), 1032, ["class", "showSidebar"]), [
207
208
  [re, o.showSidebar]
208
209
  ]),
209
- !t(W) && m ? (a(), l(ue, {
210
+ !t(W) && p ? (a(), l(ue, {
210
211
  key: 0,
211
- menuItem: m,
212
- onCloseMenu: e[9] || (e[9] = (s) => m.open = !1),
212
+ menuItem: p,
213
+ onCloseMenu: e[9] || (e[9] = (s) => p.open = !1),
213
214
  onToggleWatchForChanges: G
214
215
  }, null, 8, ["menuItem"])) : F("", !0)
215
216
  ], 64));
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AA+NA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAuOA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cddb96c9"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cf8761cd"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,25 +1,26 @@
1
- import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as r, createElementBlock as l, createElementVNode as t, unref as o, createTextVNode as a, toDisplayString as g, createCommentVNode as p, createVNode as i } from "vue";
2
- import _ from "../../../assets/computer.ascii.js";
3
- import b from "../../../components/ScalarAsciiArt.vue.js";
4
- import u from "../../../components/ScalarHotkey.vue.js";
5
- import { useWorkspace as C } from "../../../store/store.js";
6
- const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, v = {
1
+ import { defineComponent as k, onMounted as R, onBeforeUnmount as g, openBlock as a, createElementBlock as l, createElementVNode as t, unref as o, createTextVNode as r, toDisplayString as _, createCommentVNode as u, createVNode as i } from "vue";
2
+ import b from "../../../assets/computer.ascii.js";
3
+ import N from "../../../components/ScalarAsciiArt.vue.js";
4
+ import p from "../../../components/ScalarHotkey.vue.js";
5
+ import { useRoute as C } from "vue-router";
6
+ import { useWorkspace as q } from "../../../store/store.js";
7
+ const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, B = {
7
8
  key: 0,
8
9
  class: "scalar-version-number"
9
- }, V = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, A = /* @__PURE__ */ y({
10
+ }, S = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, $ = /* @__PURE__ */ k({
10
11
  __name: "ResponseEmpty",
11
- setup(B) {
12
- const { isReadOnly: d, activeWorkspace: f, events: s } = C(), m = () => {
12
+ setup(h) {
13
+ const { isReadOnly: d, activeWorkspace: f, events: s } = q(), x = C(), m = () => {
13
14
  s.commandPalette.emit({ commandName: "Create Request" });
14
15
  }, c = (n) => {
15
- n != null && n.openCommandPaletteRequest && m();
16
- }, x = "2.1.33";
17
- return k(() => s.hotKeys.on(c)), R(() => s.hotKeys.off(c)), (n, e) => (r(), l("div", N, [
18
- t("div", q, [
19
- o(f).isReadOnly ? p("", !0) : (r(), l("div", v, [
20
- a(" Scalar V" + g(o(x)) + " ", 1),
16
+ n != null && n.createNew && x.name === "request" && m();
17
+ }, y = "2.1.35";
18
+ return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
19
+ t("div", V, [
20
+ o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
21
+ r(" Scalar V" + _(o(y)) + " ", 1),
21
22
  e[1] || (e[1] = t("b", null, "Beta", -1)),
22
- e[2] || (e[2] = a(" Release ")),
23
+ e[2] || (e[2] = r(" Release ")),
23
24
  e[3] || (e[3] = t("div", { class: "mt-1" }, [
24
25
  t("a", {
25
26
  href: "https://github.com/scalar/scalar/issues/2669",
@@ -27,33 +28,33 @@ const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { cl
27
28
  }, " Roadmap ")
28
29
  ], -1))
29
30
  ])),
30
- i(b, {
31
- art: o(_),
31
+ i(N, {
32
+ art: o(b),
32
33
  class: "text-c-3"
33
34
  }, null, 8, ["art"])
34
35
  ]),
35
- t("div", V, [
36
+ t("div", S, [
36
37
  t("button", {
37
38
  class: "flex items-center gap-1.5",
38
39
  type: "button",
39
- onClick: e[0] || (e[0] = (S) => o(s).executeRequest.emit())
40
+ onClick: e[0] || (e[0] = (w) => o(s).executeRequest.emit())
40
41
  }, [
41
- e[4] || (e[4] = a(" Send Request ")),
42
- i(u, { hotkey: "↵" })
42
+ e[4] || (e[4] = r(" Send Request ")),
43
+ i(p, { hotkey: "↵" })
43
44
  ]),
44
- o(d) ? p("", !0) : (r(), l("button", {
45
+ o(d) ? u("", !0) : (a(), l("button", {
45
46
  key: 0,
46
47
  class: "flex items-center gap-1.5",
47
48
  type: "button",
48
49
  onClick: m
49
50
  }, [
50
- e[5] || (e[5] = a(" New Request ")),
51
- i(u, { hotkey: "N" })
51
+ e[5] || (e[5] = r(" New Request ")),
52
+ i(p, { hotkey: "N" })
52
53
  ]))
53
54
  ])
54
55
  ]));
55
56
  }
56
57
  });
57
58
  export {
58
- A as default
59
+ $ as default
59
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AAgIlD,wBAMG"}
1
+ {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AA+HlD,wBAMG"}
@@ -4,7 +4,7 @@ import { httpStatusCodes as N } from "@scalar/oas-utils/helpers";
4
4
  import V from "pretty-bytes";
5
5
  import f from "pretty-ms";
6
6
  import { useWorkspace as w } from "../../../store/store.js";
7
- const E = { class: "flex gap-1.5 text-c-3 pl-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
7
+ const E = { class: "flex gap-1.5 text-c-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
8
8
  __name: "ResponseMetaInformation",
9
9
  props: {
10
10
  response: {}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAgOxC,wBAMG"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA8JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkPxC,wBAMG"}
@@ -1,101 +1,7 @@
1
- import { defineComponent as A, computed as i, ref as C, openBlock as s, createBlock as r, withCtx as u, createElementVNode as d, createTextVNode as B, createCommentVNode as a, createVNode as f, createElementBlock as v, Fragment as _ } from "vue";
2
- import S from "../../../components/ContextBar.vue.js";
3
- import H from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import R from "./ResponseBody.vue.js";
5
- import V from "./ResponseEmpty.vue.js";
6
- import $ from "./ResponseLoadingOverlay.vue.js";
7
- import N from "./ResponseMetaInformation.vue.js";
8
- import g from "./ResponseBodyVirtual.vue.js";
9
- /* empty css */
10
- import E from "./ResponseCookies.vue.js";
11
- import I from "./ResponseHeaders.vue.js";
12
- const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, T = 2e5, X = /* @__PURE__ */ A({
13
- __name: "ResponseSection",
14
- props: {
15
- response: {}
16
- },
17
- setup(k) {
18
- const l = k, c = i(() => {
19
- var t;
20
- const e = (t = l.response) == null ? void 0 : t.headers;
21
- return e ? Object.keys(e).map((o) => ({
22
- name: o,
23
- value: e[o],
24
- required: !1
25
- })).filter(
26
- (o) => ![
27
- "rest-api-client-content-length",
28
- "X-API-Client-Content-Length"
29
- ].includes(o.name)
30
- ) : [];
31
- }), y = i(
32
- () => {
33
- var e;
34
- return ((e = l.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((t) => {
35
- var p, m;
36
- const o = (m = (p = l.response) == null ? void 0 : p.headers) == null ? void 0 : m[t];
37
- return o ? {
38
- name: t,
39
- value: o,
40
- required: !1
41
- } : [];
42
- })) ?? [];
43
- }
44
- ), h = ["All", "Cookies", "Headers", "Body"], n = C("All"), x = i(
45
- () => {
46
- var e;
47
- return (((e = l.response) == null ? void 0 : e.size) ?? 0) > T;
48
- }
49
- );
50
- return (e, t) => (s(), r(H, null, {
51
- title: u(() => [
52
- d("div", L, [
53
- t[1] || (t[1] = B(" Response ")),
54
- e.response ? (s(), r(N, {
55
- key: 0,
56
- response: e.response
57
- }, null, 8, ["response"])) : a("", !0),
58
- f(S, {
59
- activeSection: n.value,
60
- sections: h,
61
- onSetActiveSection: t[0] || (t[0] = (o) => n.value = o)
62
- }, null, 8, ["activeSection"])
63
- ])
64
- ]),
65
- default: u(() => {
66
- var o;
67
- return [
68
- d("div", O, [
69
- e.response ? (s(), v(_, { key: 1 }, [
70
- n.value === "All" || n.value === "Cookies" ? (s(), r(E, {
71
- key: 0,
72
- cookies: y.value
73
- }, null, 8, ["cookies"])) : a("", !0),
74
- n.value === "All" || n.value === "Headers" ? (s(), r(I, {
75
- key: 1,
76
- headers: c.value
77
- }, null, 8, ["headers"])) : a("", !0),
78
- n.value === "All" || n.value === "Body" ? (s(), v(_, { key: 2 }, [
79
- x.value ? (s(), r(g, {
80
- key: 0,
81
- content: l.response.data
82
- }, null, 8, ["content"])) : (s(), r(R, {
83
- key: 1,
84
- active: !0,
85
- data: (o = l.response) == null ? void 0 : o.data,
86
- headers: c.value,
87
- title: "Body"
88
- }, null, 8, ["data", "headers"]))
89
- ], 64)) : a("", !0)
90
- ], 64)) : (s(), r(V, { key: 0 })),
91
- f($)
92
- ])
93
- ];
94
- }),
95
- _: 1
96
- }));
97
- }
98
- });
1
+ import o from "./ResponseSection.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9b7fd1f2"]]);
99
5
  export {
100
- X as default
6
+ r as default
101
7
  };