@scalar/api-client 2.1.11 → 2.1.13

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 (108) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServer.vue.js +18 -18
  4. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -0
  5. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandActionForm.vue.js +1 -1
  7. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -0
  8. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  9. package/dist/components/CommandPalette/CommandActionInput.vue.js +27 -23
  10. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -0
  11. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +32 -31
  13. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -0
  14. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +43 -42
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -0
  17. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +26 -25
  19. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -0
  20. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  21. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +31 -30
  22. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -0
  23. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +35 -34
  25. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -0
  26. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  27. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +28 -27
  28. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -0
  29. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +18 -17
  31. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -0
  32. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  33. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  34. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +112 -103
  35. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  36. package/dist/components/ImportCollection/DropEventListener.vue.d.ts +7 -0
  37. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -0
  38. package/dist/components/ImportCollection/DropEventListener.vue.js +75 -0
  39. package/dist/components/ImportCollection/DropEventListener.vue2.js +4 -0
  40. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +12 -0
  41. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -0
  42. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +30 -0
  43. package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +4 -0
  44. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +20 -0
  45. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -0
  46. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +101 -0
  47. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
  48. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +22 -0
  49. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -0
  50. package/dist/components/ImportCollection/ImportNowButton.vue.js +85 -0
  51. package/dist/components/ImportCollection/ImportNowButton.vue2.js +4 -0
  52. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +16 -0
  53. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -0
  54. package/dist/components/ImportCollection/OperationBadge.vue.d.ts +19 -0
  55. package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +1 -0
  56. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +7 -0
  57. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +1 -0
  58. package/dist/components/ImportCollection/PasteEventListener.vue.js +24 -0
  59. package/dist/components/ImportCollection/PasteEventListener.vue2.js +4 -0
  60. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +7 -0
  61. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -0
  62. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +15 -0
  63. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +4 -0
  64. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +28 -0
  65. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -0
  66. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +55 -0
  67. package/dist/components/ImportCollection/index.d.ts +2 -0
  68. package/dist/components/ImportCollection/index.d.ts.map +1 -0
  69. package/dist/components/ImportCollection/index.js +4 -0
  70. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts +5 -0
  71. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts.map +1 -0
  72. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.js +20 -0
  73. package/dist/components/ImportCollection/utils/isDocument.d.ts +3 -0
  74. package/dist/components/ImportCollection/utils/isDocument.d.ts.map +1 -0
  75. package/dist/components/ImportCollection/utils/isDocument.js +7 -0
  76. package/dist/components/ImportCollection/utils/isUrl.d.ts +3 -0
  77. package/dist/components/ImportCollection/utils/isUrl.d.ts.map +1 -0
  78. package/dist/components/ImportCollection/utils/isUrl.js +6 -0
  79. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  80. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  81. package/dist/layouts/App/create-api-client-app.d.ts +129 -2
  82. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  83. package/dist/layouts/Modal/create-api-client-modal.d.ts +258 -4
  84. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  85. package/dist/libs/create-client.d.ts +130 -2
  86. package/dist/libs/create-client.d.ts.map +1 -1
  87. package/dist/libs/create-client.js +54 -41
  88. package/dist/libs/send-request.d.ts +37 -1
  89. package/dist/libs/send-request.d.ts.map +1 -1
  90. package/dist/libs/send-request.js +24 -19
  91. package/dist/store/import-spec.d.ts +128 -2
  92. package/dist/store/import-spec.d.ts.map +1 -1
  93. package/dist/store/import-spec.js +24 -23
  94. package/dist/store/store.d.ts +256 -4
  95. package/dist/store/store.d.ts.map +1 -1
  96. package/dist/store/store.js +65 -65
  97. package/dist/style.css +1 -1
  98. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  99. package/dist/views/Request/Request.vue.js +1 -1
  100. package/dist/views/Request/RequestSection/RequestSection.vue.js +39 -39
  101. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  102. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  103. package/dist/views/Request/RequestSidebar.vue2.js +14 -14
  104. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  105. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  106. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  107. package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
  108. package/package.json +13 -8
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.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-901adb4c"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d69f8ce9"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,6 +1,6 @@
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";
1
+ import { defineComponent as B, computed as _, ref as g, watch as V, openBlock as m, createBlock as b, withCtx as x, createVNode as s, unref as o, createElementVNode as A, createTextVNode as C, createElementBlock as d, createCommentVNode as w, toDisplayString as H, withDirectives as n, vShow as i } from "vue";
2
+ import N from "../../../components/ContextBar.vue.js";
3
+ import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
4
  import E from "./RequestBody.vue.js";
5
5
  import v from "./RequestParams.vue.js";
6
6
  import K from "./RequestPathParams.vue.js";
@@ -18,102 +18,102 @@ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
18
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
20
  setup(O) {
21
- const { activeRequest: o, activeExample: h, isReadOnly: p, requestMutators: k } = D(), q = _(() => {
22
- var l, s;
21
+ const { activeRequest: a, activeExample: h, isReadOnly: p, requestMutators: k } = D(), S = _(() => {
22
+ var l, r;
23
23
  const t = /* @__PURE__ */ new Set([
24
+ "All",
24
25
  "Query",
25
26
  "Auth",
26
- "Request",
27
+ "Variables",
27
28
  "Cookies",
28
29
  "Headers",
29
- "Body",
30
- "All"
30
+ "Body"
31
31
  ]);
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];
32
+ return (l = h.value) != null && l.parameters.path.length || t.delete("Variables"), f(((r = a.value) == null ? void 0 : r.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
33
33
  }), y = _(
34
34
  () => {
35
35
  var t, l;
36
- return p.value && ((l = (t = o.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
36
+ return p.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
37
37
  }
38
38
  ), e = g("All");
39
- R(o, (t) => {
39
+ V(a, (t) => {
40
40
  e.value === "Body" && t && !f(t.method) && (e.value = "All");
41
41
  });
42
- const S = (t) => {
43
- if (!o.value) return;
42
+ const q = (t) => {
43
+ if (!a.value) return;
44
44
  const l = t.target;
45
- k.edit(o.value.uid, "summary", l.value);
45
+ k.edit(a.value.uid, "summary", l.value);
46
46
  };
47
- return (t, l) => (m(), C(b, null, {
47
+ return (t, l) => (m(), b(R, null, {
48
48
  title: x(() => {
49
- var s, i;
49
+ var r, u;
50
50
  return [
51
- n(a($), {
51
+ s(o($), {
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
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", {
58
+ C(" Request "),
59
+ o(p) ? w("", !0) : (m(), d("label", M)),
60
+ o(p) ? (m(), d("span", z, H((u = o(a)) == null ? void 0 : u.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
- value: (s = a(o)) == null ? void 0 : s.summary,
66
- onInput: S
65
+ value: (r = o(a)) == null ? void 0 : r.summary,
66
+ onInput: q
67
67
  }, null, 40, P))
68
68
  ]),
69
- n(V, {
69
+ s(N, {
70
70
  activeSection: e.value,
71
- sections: q.value,
71
+ sections: S.value,
72
72
  onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
73
73
  }, null, 8, ["activeSection", "sections"])
74
74
  ];
75
75
  }),
76
76
  default: x(() => {
77
- var s, i, c;
77
+ var r, u, c;
78
78
  return [
79
79
  A("div", L, [
80
- r(n(Q, { title: "Authentication" }, null, 512), [
80
+ n(s(Q, { title: "Authentication" }, null, 512), [
81
81
  [
82
- u,
82
+ i,
83
83
  !y.value && (e.value === "All" || e.value === "Auth")
84
84
  ]
85
85
  ]),
86
- r(n(K, {
86
+ n(s(K, {
87
87
  paramKey: "path",
88
88
  title: "Path Variables"
89
89
  }, null, 512), [
90
90
  [
91
- u,
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)
91
+ i,
92
+ (e.value === "All" || e.value === "Variables") && ((c = (u = (r = o(h)) == null ? void 0 : r.parameters) == null ? void 0 : u.path) == null ? void 0 : c.length)
93
93
  ]
94
94
  ]),
95
- r(n(v, {
95
+ n(s(v, {
96
96
  paramKey: "cookies",
97
97
  title: "Cookies"
98
98
  }, null, 512), [
99
- [u, e.value === "All" || e.value === "Cookies"]
99
+ [i, e.value === "All" || e.value === "Cookies"]
100
100
  ]),
101
- r(n(v, {
101
+ n(s(v, {
102
102
  paramKey: "headers",
103
103
  title: "Headers"
104
104
  }, null, 512), [
105
- [u, e.value === "All" || e.value === "Headers"]
105
+ [i, e.value === "All" || e.value === "Headers"]
106
106
  ]),
107
- r(n(v, {
107
+ n(s(v, {
108
108
  paramKey: "query",
109
109
  title: "Query Parameters"
110
110
  }, null, 512), [
111
- [u, e.value === "All" || e.value === "Query"]
111
+ [i, e.value === "All" || e.value === "Query"]
112
112
  ]),
113
- r(n(E, { title: "Body" }, null, 512), [
113
+ n(s(E, { title: "Body" }, null, 512), [
114
114
  [
115
- u,
116
- a(o) && (e.value === "All" || e.value === "Body") && a(f)(a(o).method)
115
+ i,
116
+ o(a) && (e.value === "All" || e.value === "Body") && o(f)(o(a).method)
117
117
  ]
118
118
  ])
119
119
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAqVe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAomB1D,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":";iBAsVe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAymB1D,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-12ed2604"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e83264ab"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -3,8 +3,8 @@ import ne from "../../assets/rabbit.ascii.js";
3
3
  import le from "../../assets/rabbitjump.ascii.js";
4
4
  import de from "../../components/HttpMethod/HttpMethod.vue.js";
5
5
  import V from "../../components/ScalarAsciiArt.vue.js";
6
- import { useSearch as me } from "../../components/Search/useSearch.js";
7
- import pe from "../../components/Sidebar/SidebarButton.vue.js";
6
+ import { useSearch as pe } from "../../components/Search/useSearch.js";
7
+ import me from "../../components/Sidebar/SidebarButton.vue.js";
8
8
  import ue from "./RequestSidebarItemMenu.vue.js";
9
9
  import { dragHandlerFactory as ce } from "./handle-drag.js";
10
10
  import { ScalarSearchInput as fe, ScalarSearchResultList as be, ScalarSearchResultItem as he, ScalarIcon as q } from "@scalar/components";
@@ -16,7 +16,7 @@ import { useSidebar as ye } from "../../hooks/useSidebar.js";
16
16
  import { useWorkspace as ke } from "../../store/store.js";
17
17
  import { hotKeyBus as E } from "../../libs/event-busses/hot-keys-bus.js";
18
18
  import { commandPaletteBus as F } from "../../libs/event-busses/command-palette-bus.js";
19
- const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, xe = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, Ce = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, De = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
19
+ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, xe = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, Ce = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, De = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
20
20
  /* @__PURE__ */ i("b", { class: "font-medium" }, "Let's Get Started"),
21
21
  /* @__PURE__ */ i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
22
22
  ], -1)), je = /* @__PURE__ */ Q({
@@ -26,8 +26,8 @@ const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "sear
26
26
  isReadonly: { type: Boolean }
27
27
  },
28
28
  emits: ["update:showSidebar", "newTab"],
29
- setup(p, { emit: M }) {
30
- const O = p, R = M, w = ke(), {
29
+ setup(m, { emit: M }) {
30
+ const O = m, R = M, w = ke(), {
31
31
  activeWorkspaceCollections: P,
32
32
  activeRequest: z,
33
33
  activeWorkspaceRequests: y,
@@ -53,7 +53,7 @@ const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "sear
53
53
  searchResultRefs: j,
54
54
  navigateSearchResults: x,
55
55
  selectSearchResult: G
56
- } = me(), C = (r) => {
56
+ } = pe(), C = (r) => {
57
57
  var t;
58
58
  r.toggleSidebar && R("update:showSidebar", O.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), F.emit()), r.focusRequestSearch && ((t = I.value) == null || t.focus());
59
59
  };
@@ -96,15 +96,15 @@ const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "sear
96
96
  noResults: !e(k).length
97
97
  }, {
98
98
  default: n(() => [
99
- (a(!0), h(S, null, D(e(k), (o, m) => (a(), d(e(he), {
99
+ (a(!0), h(S, null, D(e(k), (o, p) => (a(), d(e(he), {
100
100
  id: `#search-input-${o.item.id}`,
101
101
  key: o.refIndex,
102
102
  ref_for: !0,
103
- ref: (s) => e(j)[m] = s,
104
- active: e(g) === m,
103
+ ref: (s) => e(j)[p] = s,
104
+ active: e(g) === p,
105
105
  class: "px-2",
106
106
  onClick: (s) => e(W)(o),
107
- onFocus: (s) => g.value = m
107
+ onFocus: (s) => g.value = p
108
108
  }, {
109
109
  addon: n(() => [
110
110
  l(de, {
@@ -120,10 +120,10 @@ const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "sear
120
120
  ]),
121
121
  _: 1
122
122
  }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, D(e(P), (o) => {
123
- var m;
123
+ var p;
124
124
  return a(), d(ve, {
125
125
  key: o.uid,
126
- isDraggable: !r.isReadonly && ((m = o.info) == null ? void 0 : m.title) !== "Drafts",
126
+ isDraggable: !r.isReadonly && ((p = o.info) == null ? void 0 : p.title) !== "Drafts",
127
127
  isDroppable: e(K),
128
128
  menuItem: u,
129
129
  parentUids: [],
@@ -183,7 +183,7 @@ const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "sear
183
183
  ]),
184
184
  De
185
185
  ]),
186
- r.isReadonly ? B("", !0) : (a(), d(pe, {
186
+ r.isReadonly ? B("", !0) : (a(), d(me, {
187
187
  key: 0,
188
188
  click: e(F).emit
189
189
  }, {
@@ -199,7 +199,7 @@ const ge = (p) => (ae("data-v-12ed2604"), p = p(), ie(), p), Ie = { class: "sear
199
199
  r.isReadonly ? void 0 : {
200
200
  name: "header",
201
201
  fn: n(() => [
202
- l(e(we))
202
+ l(e(we), { class: "xl:min-h-header xl:py-2.5 py-1 px-2.5 border-b-1/2" })
203
203
  ]),
204
204
  key: "0"
205
205
  }
@@ -21,7 +21,7 @@ const f = (o) => (g("data-v-43fc1968"), o = o(), b(), o), V = { class: "relative
21
21
  q.emit({ commandName: "Create Request" });
22
22
  }, i = (l) => {
23
23
  l.openCommandPaletteRequest && r();
24
- }, x = "2.1.11";
24
+ }, x = "2.1.13";
25
25
  return k(() => d.on(i)), R(() => d.off(i)), (l, m) => (a(), c("div", V, [
26
26
  e("div", w, [
27
27
  t(h).isReadOnly ? p("", !0) : (a(), c("div", E, [
@@ -40,7 +40,7 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
40
40
  } : [];
41
41
  })) ?? [];
42
42
  }
43
- ), _ = ["Cookies", "Headers", "Body", "All"], t = x("All");
43
+ ), _ = ["All", "Cookies", "Headers", "Body"], t = x("All");
44
44
  return (o, s) => (r(), n($, null, {
45
45
  title: d(() => [
46
46
  i(y(R), {
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA67BA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA07BA,wBAKG"}
@@ -1,43 +1,43 @@
1
- import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, Fragment as z, createElementVNode as o, createVNode as t, unref as e, withCtx as s, renderList as I, createBlock as k, withModifiers as c, normalizeClass as L, toDisplayString as C } from "vue";
1
+ import { defineComponent as R, computed as O, ref as M, openBlock as u, createElementBlock as W, createElementVNode as o, createVNode as t, unref as e, withCtx as s, Fragment as A, renderList as I, createBlock as x, withModifiers as r, normalizeClass as L, toDisplayString as z } from "vue";
2
2
  import U from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import V from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
- import { useModal as $, ScalarDropdown as S, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as q, ScalarButton as N, ScalarDropdownDivider as F, ScalarModal as T } from "@scalar/components";
4
+ import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as q, ScalarButton as S, ScalarDropdownDivider as F, ScalarModal as N } from "@scalar/components";
5
5
  import { useRouter as P } from "vue-router";
6
6
  import { useWorkspace as Y } from "../../../store/store.js";
7
7
  import { commandPaletteBus as G } from "../../../libs/event-busses/command-palette-bus.js";
8
- const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
8
+ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
9
9
  /* @__PURE__ */ o("div", { class: "flex items-center text-c-2" }, [
10
10
  /* @__PURE__ */ o("span", null, "Only workspace cannot be deleted.")
11
11
  ])
12
- ], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), ue = /* @__PURE__ */ O({
12
+ ], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), ue = /* @__PURE__ */ R({
13
13
  __name: "WorkspaceDropdown",
14
14
  setup(oe) {
15
- const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } = Y(), { push: g } = P(), E = (n) => {
15
+ const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } = Y(), { push: g } = P(), T = (n) => {
16
16
  n !== f.value.uid && g(`/workspace/${n}`);
17
- }, b = A(() => Object.keys(d).length === 1), j = () => G.emit({ commandName: "Create Workspace" }), h = M(""), r = M(""), v = $(), x = $(), y = (n) => {
18
- h.value = d[n].name, r.value = n, v.show();
19
- }, B = (n) => {
20
- n.trim() && (_.edit(r.value, "name", n.trim()), v.hide());
17
+ }, b = O(() => Object.keys(d).length === 1), E = () => G.emit({ commandName: "Create Workspace" }), h = M(""), c = M(""), v = C(), w = C(), y = (n) => {
18
+ h.value = d[n].name, c.value = n, v.show();
19
+ }, j = (n) => {
20
+ n.trim() && (_.edit(c.value, "name", n.trim()), v.hide());
21
21
  }, D = (n) => {
22
- h.value = d[n].name, r.value = n, x.show();
23
- }, R = async () => {
22
+ h.value = d[n].name, c.value = n, w.show();
23
+ }, B = async () => {
24
24
  if (!b.value) {
25
- const n = f.value.uid === r.value, a = { ...d };
26
- if (delete a[r.value], _.delete(r.value), n) {
25
+ const n = f.value.uid === c.value, a = { ...d };
26
+ if (delete a[c.value], _.delete(c.value), n) {
27
27
  const p = Object.keys(a)[0];
28
28
  await g(`/workspace/${p}/`);
29
29
  }
30
30
  }
31
- x.hide();
31
+ w.hide();
32
32
  };
33
- return (n, a) => (u(), W(z, null, [
33
+ return (n, a) => (u(), W("div", null, [
34
34
  o("div", H, [
35
- t(e(S), null, {
35
+ t(e($), null, {
36
36
  items: s(() => [
37
- (u(!0), W(z, null, I(e(d), (p, l) => (u(), k(e(m), {
37
+ (u(!0), W(A, null, I(e(d), (p, l) => (u(), x(e(m), {
38
38
  key: l,
39
39
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
40
- onClick: c((w) => E(l), ["stop"])
40
+ onClick: r((k) => T(l), ["stop"])
41
41
  }, {
42
42
  default: s(() => [
43
43
  o("div", {
@@ -52,13 +52,13 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
52
52
  thickness: "3.5"
53
53
  })
54
54
  ], 2),
55
- o("span", Q, C(p.name), 1),
56
- t(e(S), { teleport: ".scalar-client" }, {
55
+ o("span", Q, z(p.name), 1),
56
+ t(e($), { teleport: ".scalar-client" }, {
57
57
  items: s(() => [
58
58
  t(e(m), {
59
59
  class: "flex gap-2",
60
- onMousedown: (w) => y(l),
61
- onTouchend: c((w) => y(l), ["prevent"])
60
+ onMousedown: (k) => y(l),
61
+ onTouchend: r((k) => y(l), ["prevent"])
62
62
  }, {
63
63
  default: s(() => [
64
64
  t(e(i), {
@@ -71,7 +71,7 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
71
71
  ]),
72
72
  _: 2
73
73
  }, 1032, ["onMousedown", "onTouchend"]),
74
- b.value ? (u(), k(e(q), {
74
+ b.value ? (u(), x(e(q), {
75
75
  key: 0,
76
76
  class: "z-10",
77
77
  side: "bottom"
@@ -80,9 +80,9 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
80
80
  t(e(m), {
81
81
  class: "flex gap-2 w-full",
82
82
  disabled: "",
83
- onMousedown: a[0] || (a[0] = c(() => {
83
+ onMousedown: a[0] || (a[0] = r(() => {
84
84
  }, ["prevent"])),
85
- onTouchend: a[1] || (a[1] = c(() => {
85
+ onTouchend: a[1] || (a[1] = r(() => {
86
86
  }, ["prevent"]))
87
87
  }, {
88
88
  default: s(() => [
@@ -101,11 +101,11 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
101
101
  ee
102
102
  ]),
103
103
  _: 1
104
- })) : (u(), k(e(m), {
104
+ })) : (u(), x(e(m), {
105
105
  key: 1,
106
106
  class: "flex !gap-2",
107
- onMousedown: c((w) => D(l), ["prevent"]),
108
- onTouchend: c((w) => D(l), ["prevent"])
107
+ onMousedown: r((k) => D(l), ["prevent"]),
108
+ onTouchend: r((k) => D(l), ["prevent"])
109
109
  }, {
110
110
  default: s(() => [
111
111
  t(e(i), {
@@ -120,7 +120,7 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
120
120
  }, 1032, ["onMousedown", "onTouchend"]))
121
121
  ]),
122
122
  default: s(() => [
123
- t(e(N), {
123
+ t(e(S), {
124
124
  class: "px-0.5 py-0 hover:bg-b-3 group-hover/item:flex aspect-square ml-auto -mr-1 h-fit",
125
125
  size: "sm",
126
126
  type: "button",
@@ -143,7 +143,7 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
143
143
  t(e(F)),
144
144
  t(e(m), {
145
145
  class: "flex items-center gap-1.5",
146
- onClick: j
146
+ onClick: E
147
147
  }, {
148
148
  default: s(() => [
149
149
  o("div", se, [
@@ -159,14 +159,14 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
159
159
  })
160
160
  ]),
161
161
  default: s(() => [
162
- t(e(N), {
162
+ t(e(S), {
163
163
  class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
164
164
  fullWidth: "",
165
165
  variant: "ghost"
166
166
  }, {
167
167
  default: s(() => [
168
168
  o("div", J, [
169
- o("h2", K, C(e(f).name), 1),
169
+ o("h2", K, z(e(f).name), 1),
170
170
  t(e(i), {
171
171
  class: "size-2.5",
172
172
  icon: "ChevronDown",
@@ -180,22 +180,22 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
180
180
  _: 1
181
181
  })
182
182
  ]),
183
- t(e(T), {
183
+ t(e(N), {
184
184
  size: "xxs",
185
- state: e(x),
185
+ state: e(w),
186
186
  title: "Delete workspace"
187
187
  }, {
188
188
  default: s(() => [
189
189
  t(U, {
190
190
  variableName: h.value,
191
191
  warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
192
- onClose: a[2] || (a[2] = (p) => e(x).hide()),
193
- onDelete: R
192
+ onClose: a[2] || (a[2] = (p) => e(w).hide()),
193
+ onDelete: B
194
194
  }, null, 8, ["variableName"])
195
195
  ]),
196
196
  _: 1
197
197
  }, 8, ["state"]),
198
- t(e(T), {
198
+ t(e(N), {
199
199
  size: "xxs",
200
200
  state: e(v),
201
201
  title: "Rename Workspace"
@@ -204,12 +204,12 @@ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
204
204
  t(V, {
205
205
  name: h.value,
206
206
  onClose: a[3] || (a[3] = (p) => e(v).hide()),
207
- onEdit: B
207
+ onEdit: j
208
208
  }, null, 8, ["name"])
209
209
  ]),
210
210
  _: 1
211
211
  }, 8, ["state"])
212
- ], 64));
212
+ ]));
213
213
  }
214
214
  });
215
215
  export {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.11",
21
+ "version": "2.1.13",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -77,6 +77,10 @@
77
77
  "import": "./dist/components/Sidebar/index.js",
78
78
  "types": "./dist/components/Sidebar/index.d.ts"
79
79
  },
80
+ "./components/ImportCollection": {
81
+ "import": "./dist/components/ImportCollection/index.js",
82
+ "types": "./dist/components/ImportCollection/index.d.ts"
83
+ },
80
84
  "./components/HttpMethod": {
81
85
  "import": "./dist/components/HttpMethod/index.js",
82
86
  "types": "./dist/components/HttpMethod/index.d.ts"
@@ -124,19 +128,20 @@
124
128
  "vue": "^3.4.29",
125
129
  "vue-router": "^4.3.0",
126
130
  "whatwg-mimetype": "^4.0.0",
131
+ "yaml": "^2.4.5",
127
132
  "zod": "^3.23.8",
133
+ "@scalar/components": "0.12.50",
128
134
  "@scalar/draggable": "0.1.5",
129
- "@scalar/components": "0.12.49",
130
135
  "@scalar/icons": "0.1.0",
131
- "@scalar/oas-utils": "0.2.50",
132
- "@scalar/openapi-parser": "0.8.4",
136
+ "@scalar/oas-utils": "0.2.51",
133
137
  "@scalar/object-utils": "1.1.9",
134
138
  "@scalar/openapi-types": "0.1.1",
135
- "@scalar/themes": "0.9.32",
136
- "@scalar/types": "0.0.11",
137
- "@scalar/use-toasts": "0.7.6",
139
+ "@scalar/openapi-parser": "0.8.5",
140
+ "@scalar/themes": "0.9.33",
141
+ "@scalar/use-codemirror": "0.11.16",
142
+ "@scalar/types": "0.0.12",
138
143
  "@scalar/use-tooltip": "1.0.2",
139
- "@scalar/use-codemirror": "0.11.15"
144
+ "@scalar/use-toasts": "0.7.6"
140
145
  },
141
146
  "devDependencies": {
142
147
  "@types/content-type": "^1.1.8",