@scalar/api-client 2.2.53 → 2.2.55

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 (84) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +1 -1
  3. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandActionForm.vue.js +15 -14
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +121 -106
  7. package/dist/components/{ImportCurl/ImportCurlModal.vue.d.ts → CommandPalette/CommandPaletteImportCurl.vue.d.ts} +9 -17
  8. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +1 -0
  9. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +7 -0
  10. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +141 -0
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +98 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  13. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  14. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +128 -113
  15. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  16. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  17. package/dist/components/OpenApiClientButton.vue.js +2 -2
  18. package/dist/components/Server/ServerSelector.vue.d.ts +5 -1
  19. package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
  20. package/dist/components/Server/ServerSelector.vue.js +48 -43
  21. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  22. package/dist/components/TopNav/TopNav.vue.js +122 -94
  23. package/dist/components/TopNav/TopNavItem.vue.d.ts +1 -0
  24. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  25. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  26. package/dist/components/TopNav/TopNavItem.vue2.js +49 -42
  27. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  28. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +10 -9
  29. package/dist/layouts/App/create-api-client-app.d.ts +12 -12
  30. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  31. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  32. package/dist/layouts/Modal/create-api-client-modal.d.ts +24 -24
  33. package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
  34. package/dist/libs/create-client.d.ts +12 -12
  35. package/dist/libs/create-client.d.ts.map +1 -1
  36. package/dist/libs/create-client.js +91 -115
  37. package/dist/libs/get-request-uid-by-path-method.d.ts +7 -0
  38. package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -0
  39. package/dist/libs/get-request-uid-by-path-method.js +10 -0
  40. package/dist/libs/get-request-uid-by-path-method.test.d.ts +2 -0
  41. package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +1 -0
  42. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  43. package/dist/libs/validate-parameters.d.ts +6 -0
  44. package/dist/libs/validate-parameters.d.ts.map +1 -0
  45. package/dist/libs/validate-parameters.js +12 -0
  46. package/dist/libs/validate-parameters.test.d.ts +2 -0
  47. package/dist/libs/validate-parameters.test.d.ts.map +1 -0
  48. package/dist/store/cookies.d.ts +4 -4
  49. package/dist/store/request-example.d.ts +4 -4
  50. package/dist/store/requests.d.ts +4 -4
  51. package/dist/store/store.d.ts +12 -12
  52. package/dist/style.css +1 -1
  53. package/dist/views/Request/Request.vue.d.ts +6 -3
  54. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  55. package/dist/views/Request/Request.vue.js +2 -2
  56. package/dist/views/Request/Request.vue2.js +96 -145
  57. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  58. package/dist/views/Request/RequestRoot.vue.js +2 -2
  59. package/dist/views/Request/RequestRoot.vue2.js +68 -57
  60. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
  61. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSection/RequestParams.vue.js +34 -31
  63. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -0
  64. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +35 -33
  66. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -0
  67. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  68. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  69. package/dist/views/Request/RequestSection/RequestSection.vue2.js +59 -54
  70. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
  71. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  72. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  73. package/dist/views/Request/RequestSection/RequestTable.vue2.js +29 -27
  74. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  75. package/dist/views/Request/RequestSidebar.vue2.js +23 -23
  76. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  78. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  79. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  80. package/dist/views/Request/libs/request.js +1 -2
  81. package/package.json +11 -11
  82. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +0 -1
  83. package/dist/components/ImportCurl/ImportCurlModal.vue.js +0 -7
  84. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +0 -125
@@ -1,13 +1,13 @@
1
- import { defineComponent as _, resolveComponent as $, openBlock as r, createBlock as p, withCtx as t, createElementBlock as b, Fragment as f, renderList as I, normalizeClass as y, unref as u, createElementVNode as s, createVNode as i, toDisplayString as w, createCommentVNode as V } from "vue";
2
- import { ScalarTooltip as T, ScalarIcon as x, ScalarButton as q } from "@scalar/components";
3
- import g from "../../../components/CodeInput/CodeInput.vue.js";
4
- import z from "../../../components/DataTable/DataTable.vue.js";
1
+ import { defineComponent as $, resolveComponent as _, openBlock as r, createBlock as p, withCtx as t, createElementBlock as b, Fragment as f, renderList as I, normalizeClass as y, unref as u, createElementVNode as s, createVNode as i, toDisplayString as w, createCommentVNode as V } from "vue";
2
+ import { ScalarTooltip as T, ScalarIcon as g, ScalarButton as z } from "@scalar/components";
3
+ import x from "../../../components/CodeInput/CodeInput.vue.js";
4
+ import D from "../../../components/DataTable/DataTable.vue.js";
5
5
  import v from "../../../components/DataTable/DataTableCell.vue.js";
6
- import D from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
+ import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
7
7
  import E from "../../../components/DataTable/DataTableRow.vue.js";
8
- import { parameterIsInvalid as G, hasEmptyRequiredParameter as L, hasItemProperties as B } from "../libs/request.js";
9
- import N from "./RequestTableTooltip.vue.js";
10
- const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-2 filemask flex max-w-[100%] items-end justify-end overflow-hidden" }, P = ["onClick"], ee = /* @__PURE__ */ _({
8
+ import { parameterIsInvalid as G, hasItemProperties as B } from "../libs/request.js";
9
+ import P from "./RequestTableTooltip.vue.js";
10
+ const L = { class: "contents" }, N = { class: "sr-only" }, O = { class: "text-c-2 filemask flex max-w-[100%] items-end justify-end overflow-hidden" }, j = ["onClick"], Z = /* @__PURE__ */ $({
11
11
  __name: "RequestTable",
12
12
  props: {
13
13
  items: {},
@@ -17,31 +17,33 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
17
17
  isReadOnly: { type: Boolean, default: !1 },
18
18
  environment: {},
19
19
  envVariables: {},
20
- workspace: {}
20
+ workspace: {},
21
+ invalidParams: {}
21
22
  },
22
23
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
23
- setup(R, { emit: h }) {
24
- const m = R, n = h, C = ["", "", "36px"], k = (l, a, c) => {
24
+ setup(h, { emit: R }) {
25
+ const m = h, n = R, C = ["", "", "36px"], k = (l, a, c) => {
25
26
  n("updateRow", l, a, c);
26
27
  }, F = (l) => {
27
28
  n("uploadFile", l);
28
29
  }, U = (l) => Array.isArray(l.default) && l.default.length === 1 ? l.default[0] : l.default;
29
30
  return (l, a) => {
30
- const c = $("RouterLink");
31
- return r(), p(z, {
31
+ const c = _("RouterLink");
32
+ return r(), p(D, {
32
33
  class: "group/table flex-1",
33
34
  columns: C
34
35
  }, {
35
36
  default: t(() => [
36
37
  (r(!0), b(f, null, I(l.items, (e, d) => (r(), p(E, {
37
38
  key: d,
39
+ id: e.key,
38
40
  class: y({
39
41
  alert: u(G)(e).value,
40
- error: u(L)(e)
42
+ error: l.invalidParams && l.invalidParams.has(e.key)
41
43
  })
42
44
  }, {
43
45
  default: t(() => [
44
- s("label", O, [
46
+ s("label", L, [
45
47
  l.isGlobal ? (r(), p(c, {
46
48
  key: 0,
47
49
  class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
@@ -54,7 +56,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
54
56
  side: "top"
55
57
  }, {
56
58
  trigger: t(() => [
57
- i(u(x), {
59
+ i(u(g), {
58
60
  class: "text-c-1",
59
61
  icon: "Globe",
60
62
  size: "xs"
@@ -72,8 +74,8 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
72
74
  ]),
73
75
  _: 2
74
76
  }, 1032, ["to"])) : (r(), b(f, { key: 1 }, [
75
- s("span", j, " Row " + w(e.enabled ? "Enabled" : "Disabled"), 1),
76
- i(D, {
77
+ s("span", N, " Row " + w(e.enabled ? "Enabled" : "Disabled"), 1),
78
+ i(q, {
77
79
  class: "!border-r-1/2",
78
80
  disabled: m.hasCheckboxDisabled,
79
81
  modelValue: e.enabled,
@@ -83,7 +85,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
83
85
  ]),
84
86
  i(v, null, {
85
87
  default: t(() => [
86
- i(g, {
88
+ i(x, {
87
89
  disableCloseBrackets: "",
88
90
  disabled: m.isReadOnly,
89
91
  disableEnter: "",
@@ -104,7 +106,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
104
106
  }, 1024),
105
107
  i(v, null, {
106
108
  default: t(() => [
107
- i(g, {
109
+ i(x, {
108
110
  class: y({
109
111
  "pr-6": u(B)(e)
110
112
  }),
@@ -130,7 +132,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
130
132
  "onUpdate:modelValue": (o) => n("updateRow", d, "value", o)
131
133
  }, {
132
134
  icon: t(() => [
133
- u(B)(e) ? (r(), p(N, {
135
+ u(B)(e) ? (r(), p(P, {
134
136
  key: 0,
135
137
  item: { ...e, default: U(e) }
136
138
  }, null, 8, ["item"])) : V("", !0)
@@ -148,15 +150,15 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
148
150
  var o;
149
151
  return [
150
152
  e.file ? (r(), b(f, { key: 0 }, [
151
- s("div", A, [
153
+ s("div", O, [
152
154
  s("span", null, w((o = e.file) == null ? void 0 : o.name), 1)
153
155
  ]),
154
156
  s("button", {
155
157
  class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
156
158
  type: "button",
157
159
  onClick: (S) => n("removeFile", d)
158
- }, " Delete ", 8, P)
159
- ], 64)) : (r(), p(u(q), {
160
+ }, " Delete ", 8, j)
161
+ ], 64)) : (r(), p(u(z), {
160
162
  key: 1,
161
163
  class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 py-px shadow-none",
162
164
  size: "sm",
@@ -165,7 +167,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
165
167
  }, {
166
168
  default: t(() => [
167
169
  a[6] || (a[6] = s("span", null, "Upload File", -1)),
168
- i(u(x), {
170
+ i(u(g), {
169
171
  class: "ml-1",
170
172
  icon: "UploadSimple",
171
173
  size: "xs",
@@ -180,7 +182,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
180
182
  }, 1024)) : V("", !0)
181
183
  ]),
182
184
  _: 2
183
- }, 1032, ["class"]))), 128))
185
+ }, 1032, ["id", "class"]))), 128))
184
186
  ]),
185
187
  _: 1
186
188
  });
@@ -188,5 +190,5 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
188
190
  }
189
191
  });
190
192
  export {
191
- ee as default
193
+ Z as default
192
194
  };
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-72fc3d40"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ab5cde6a"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as ve, useId as he, reactive as be, ref as ge, watch as K, onMounted as Se, onBeforeUnmount as ke, computed as N, openBlock as r, createElementBlock as S, Fragment as q, withDirectives as B, createVNode as m, unref as e, normalizeClass as f, createSlots as Re, withCtx as d, createElementVNode as n, createBlock as u, createCommentVNode as p, isRef as xe, withKeys as D, withModifiers as v, vShow as L, renderList as H, createTextVNode as M, toDisplayString as ye, nextTick as we } from "vue";
1
+ import { defineComponent as ve, useId as he, reactive as be, ref as ge, watch as K, onMounted as Se, onBeforeUnmount as ke, computed as L, openBlock as r, createElementBlock as S, Fragment as q, withDirectives as N, createVNode as m, unref as e, normalizeClass as f, createSlots as Re, withCtx as d, createElementVNode as n, createBlock as u, createCommentVNode as p, isRef as xe, withKeys as D, withModifiers as v, vShow as B, renderList as H, createTextVNode as M, toDisplayString as ye, nextTick as we } from "vue";
2
2
  import { ScalarIcon as $, ScalarSearchInput as Ie, ScalarSearchResultList as Ce, ScalarSearchResultItem as qe, ScalarButton as De } from "@scalar/components";
3
3
  import { LibraryIcon as Me } from "@scalar/icons";
4
4
  import { useToasts as $e } from "@scalar/use-toasts";
@@ -7,20 +7,20 @@ import Te from "../../assets/rabbit.ascii.js";
7
7
  import _e from "../../assets/rabbitjump.ascii.js";
8
8
  import Ee from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
9
9
  import Ve from "../../components/HttpMethod/HttpMethod.vue.js";
10
- import G from "../../components/ScalarAsciiArt.vue.js";
10
+ import U from "../../components/ScalarAsciiArt.vue.js";
11
11
  import { useSearch as Oe } from "../../components/Search/useSearch.js";
12
12
  import We from "../../components/Sidebar/SidebarButton.vue.js";
13
13
  import ze from "../../components/Sidebar/SidebarToggle.vue.js";
14
14
  import { useLayout as Ae } from "../../hooks/useLayout.js";
15
15
  import { useSidebar as Fe } from "../../hooks/useSidebar.js";
16
- import { PathId as U } from "../../routes.js";
16
+ import { PathId as G } from "../../routes.js";
17
17
  import { useActiveEntities as Ke } from "../../store/active-entities.js";
18
- import { createInitialRequest as Ne } from "../../store/requests.js";
19
- import { dragHandlerFactory as Be } from "./handle-drag.js";
20
- import Le from "./RequestSidebarItemMenu.vue.js";
18
+ import { createInitialRequest as Le } from "../../store/requests.js";
19
+ import { dragHandlerFactory as Ne } from "./handle-drag.js";
20
+ import Be from "./RequestSidebarItemMenu.vue.js";
21
21
  import { isGettingStarted as He } from "./RequestSection/helpers/getting-started.js";
22
- import Ge from "./RequestSidebarItem.vue.js";
23
- import Ue from "../../components/Sidebar/Sidebar.vue.js";
22
+ import Ue from "./RequestSidebarItem.vue.js";
23
+ import Ge from "../../components/Sidebar/Sidebar.vue.js";
24
24
  import je from "./components/WorkspaceDropdown.vue.js";
25
25
  import { useWorkspace as Je } from "../../store/store.js";
26
26
  const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe = {
@@ -46,12 +46,12 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
46
46
  activeRequest: Z,
47
47
  activeWorkspaceRequests: _,
48
48
  activeWorkspace: ee
49
- } = Ke(), { findRequestParents: te, events: k, requestMutators: E, requests: x } = T, { handleDragEnd: oe, isDroppable: se } = Be(
49
+ } = Ke(), { findRequestParents: te, events: k, requestMutators: E, requests: x } = T, { handleDragEnd: oe, isDroppable: se } = Ne(
50
50
  ee,
51
51
  T
52
52
  ), { replace: V } = Pe(), ae = () => {
53
53
  k.commandPalette.emit({
54
- commandName: "Import from OpenAPI/Swagger/Postman"
54
+ commandName: "Import from OpenAPI/Swagger/Postman/cURL"
55
55
  });
56
56
  }, O = he(), { toast: re } = $e(), h = be({ open: !1 }), b = ge(!1);
57
57
  K(
@@ -105,7 +105,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
105
105
  });
106
106
  }
107
107
  );
108
- const de = N(() => {
108
+ const de = L(() => {
109
109
  var t;
110
110
  const s = y.value[w.value];
111
111
  return (t = s == null ? void 0 : s.item) != null && t.id ? `#search-input-${s.item.id}` : void 0;
@@ -123,15 +123,15 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
123
123
  a && V({
124
124
  name: "request",
125
125
  params: {
126
- [U.Request]: a
126
+ [G.Request]: a
127
127
  }
128
128
  });
129
129
  } else {
130
- const { request: o } = Ne();
130
+ const { request: o } = Le();
131
131
  s && (E.add(o, s.uid), V({
132
132
  name: "request",
133
133
  params: {
134
- [U.Request]: o.uid
134
+ [G.Request]: o.uid
135
135
  }
136
136
  }));
137
137
  }
@@ -140,7 +140,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
140
140
  var s;
141
141
  (s = I.value) == null || s.focus();
142
142
  }), b.value = !b.value;
143
- }, C = N(
143
+ }, C = L(
144
144
  () => He(
145
145
  c.value,
146
146
  _.value,
@@ -148,7 +148,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
148
148
  )
149
149
  );
150
150
  return (s, t) => (r(), S(q, null, [
151
- B(m(e(Ue), {
151
+ N(m(e(Ge), {
152
152
  class: f([e(P) ? "sidebar-active-width" : ""])
153
153
  }, Re({
154
154
  content: d(() => [
@@ -170,7 +170,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
170
170
  })
171
171
  ])
172
172
  ]),
173
- B(n("div", Ye, [
173
+ N(n("div", Ye, [
174
174
  m(e(Ie), {
175
175
  ref_key: "searchInputRef",
176
176
  ref: I,
@@ -187,7 +187,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
187
187
  ]
188
188
  }, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
189
189
  ], 512), [
190
- [L, b.value]
190
+ [B, b.value]
191
191
  ]),
192
192
  n("div", {
193
193
  class: f(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pb-3 pt-0", [
@@ -239,7 +239,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
239
239
  }, 8, ["id", "noResults"])) : (r(), S("nav", Ze, [
240
240
  (r(!0), S(q, null, H(e(c), (o) => {
241
241
  var a;
242
- return r(), u(Ge, {
242
+ return r(), u(Ue, {
243
243
  key: o.uid,
244
244
  isDraggable: e(i) !== "modal" && ((a = o.info) == null ? void 0 : a.title) !== "Drafts",
245
245
  isDroppable: e(se),
@@ -290,11 +290,11 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
290
290
  }, [
291
291
  n("div", et, [
292
292
  n("div", tt, [
293
- m(G, {
293
+ m(U, {
294
294
  art: e(Te),
295
295
  class: "rabbitsit font-bold"
296
296
  }, null, 8, ["art"]),
297
- m(G, {
297
+ m(U, {
298
298
  art: e(_e),
299
299
  class: "rabbitjump absolute left-0 top-0 font-bold"
300
300
  }, null, 8, ["art"])
@@ -336,9 +336,9 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
336
336
  key: "0"
337
337
  } : void 0
338
338
  ]), 1032, ["class"]), [
339
- [L, e(P)]
339
+ [B, e(P)]
340
340
  ]),
341
- e(i) !== "modal" && h ? (r(), u(Le, {
341
+ e(i) !== "modal" && h ? (r(), u(Be, {
342
342
  key: 0,
343
343
  menuItem: h,
344
344
  onClearDrafts: me,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AASrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;;;AA0NJ,wBAQG"}
1
+ {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AAqHA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AASrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;;;AA4NJ,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import e from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-259d1226"]]);
4
+ const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-82f1fa0c"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -7,7 +7,7 @@ import { useLayout as h } from "../../hooks/useLayout.js";
7
7
  import { useSidebar as x } from "../../hooks/useSidebar.js";
8
8
  import B from "../../components/OpenApiClientButton.vue.js";
9
9
  import { useWorkspace as S } from "../../store/store.js";
10
- const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, R = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, z = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, L = /* @__PURE__ */ k({
10
+ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, z = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, R = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, L = /* @__PURE__ */ k({
11
11
  __name: "RequestSubpageHeader",
12
12
  props: {
13
13
  collection: {},
@@ -21,7 +21,7 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
21
21
  setup(M) {
22
22
  const { hideClientButton: c, showSidebar: f, integration: b } = S(), { isSidebarOpen: l } = x(), { layout: r } = h(), { currentRoute: g } = w();
23
23
  return (o, t) => (i(), m("div", $, [
24
- s("div", R, [
24
+ s("div", z, [
25
25
  e(f) ? (i(), u(V, {
26
26
  key: 0,
27
27
  modelValue: e(l),
@@ -43,7 +43,7 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
43
43
  workspace: o.workspace,
44
44
  onImportCurl: t[1] || (t[1] = (n) => o.$emit("importCurl", n))
45
45
  }, null, 8, ["collection", "envVariables", "environment", "operation", "server", "workspace"]),
46
- s("div", z, [
46
+ s("div", R, [
47
47
  e(r) === "modal" && o.collection.documentUrl && !e(c) ? (i(), u(e(B), {
48
48
  key: 0,
49
49
  buttonSource: "modal",
@@ -54,7 +54,7 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
54
54
  }, null, 8, ["integration", "source", "url"])) : a("", !0),
55
55
  e(r) === "modal" ? (i(), m("button", {
56
56
  key: 1,
57
- class: "app-exit-button gitbook-hidden fixed right-2 top-2 rounded-full p-2",
57
+ class: "app-exit-button gitbook-hidden zoomed:static zoomed:p-1 fixed right-2 top-2 rounded-full p-2",
58
58
  type: "button",
59
59
  onClick: t[2] || (t[2] = (n) => o.$emit("hideModal"))
60
60
  }, [
@@ -19,7 +19,7 @@ const V = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, _ = {
19
19
  a.commandPalette.emit({ commandName: "Create Request" });
20
20
  }, d = (o) => {
21
21
  o != null && o.createNew && y.name === "request" && u();
22
- }, k = "2.2.53";
22
+ }, k = "2.2.55";
23
23
  return g(() => a.hotKeys.on(d)), R(() => a.hotKeys.off(d)), (o, e) => (n(), m("div", V, [
24
24
  s("div", {
25
25
  class: f(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -32,9 +32,8 @@ const m = (e) => !!(e.description || e.type || e.default || e.format || e.minimu
32
32
  }
33
33
  }
34
34
  return !1;
35
- }), s = (e) => !!(e.required && e.value === "");
35
+ });
36
36
  export {
37
- s as hasEmptyRequiredParameter,
38
37
  m as hasItemProperties,
39
38
  n as parameterIsInvalid
40
39
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.53",
21
+ "version": "2.2.55",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -188,22 +188,22 @@
188
188
  "whatwg-mimetype": "^4.0.0",
189
189
  "yaml": "^2.4.5",
190
190
  "zod": "^3.23.8",
191
+ "@scalar/components": "0.13.28",
191
192
  "@scalar/draggable": "0.1.11",
192
- "@scalar/components": "0.13.27",
193
- "@scalar/import": "0.2.29",
193
+ "@scalar/import": "0.2.30",
194
+ "@scalar/oas-utils": "0.2.110",
194
195
  "@scalar/icons": "0.1.3",
195
- "@scalar/oas-utils": "0.2.109",
196
- "@scalar/object-utils": "1.1.13",
197
196
  "@scalar/openapi-parser": "0.10.9",
198
197
  "@scalar/openapi-types": "0.1.9",
199
- "@scalar/postman-to-openapi": "0.1.32",
200
- "@scalar/types": "0.0.36",
198
+ "@scalar/object-utils": "1.1.13",
199
+ "@scalar/postman-to-openapi": "0.1.33",
201
200
  "@scalar/snippetz": "0.2.15",
202
- "@scalar/use-hooks": "0.1.24",
203
- "@scalar/use-codemirror": "0.11.72",
204
- "@scalar/themes": "0.9.70",
201
+ "@scalar/themes": "0.9.71",
202
+ "@scalar/types": "0.0.36",
203
+ "@scalar/use-hooks": "0.1.25",
205
204
  "@scalar/use-toasts": "0.7.9",
206
- "@scalar/use-tooltip": "1.0.6"
205
+ "@scalar/use-tooltip": "1.0.6",
206
+ "@scalar/use-codemirror": "0.11.73"
207
207
  },
208
208
  "devDependencies": {
209
209
  "@types/shell-quote": "^1.7.5",
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImportCurlModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCurl/ImportCurlModal.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,iCAAiC,CAAA;AASxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IAC5D,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;;;;oBAOgB,cAAc;qBACb,MAAM;uBACJ,MAAM;;;;;oBAFT,cAAc;qBACb,MAAM;uBACJ,MAAM;;;AAwP3B,wBAQG"}
@@ -1,7 +0,0 @@
1
- import o from "./ImportCurlModal.vue2.js";
2
- /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5e715899"]]);
5
- export {
6
- a as default
7
- };
@@ -1,125 +0,0 @@
1
- import { defineComponent as N, ref as x, computed as b, watch as k, openBlock as I, createBlock as R, unref as a, withCtx as n, createVNode as s, withKeys as E, createElementVNode as r, toDisplayString as c, normalizeClass as z, createTextVNode as B } from "vue";
2
- import { ScalarModal as M, ScalarTextField as T, ScalarListbox as j, ScalarButton as w, ScalarIcon as D } from "@scalar/components";
3
- import { useToasts as K } from "@scalar/use-toasts";
4
- import L from "../HttpMethod/HttpMethod.vue.js";
5
- import { useActiveEntities as A } from "../../store/active-entities.js";
6
- const F = { class: "mb-4 mt-2 flex h-9 flex-row items-center gap-2 rounded border p-[3px] text-sm" }, H = { class: "flex h-full" }, P = { class: "scroll-timeline-x whitespace-nowrap" }, W = { class: "flex justify-between gap-10" }, Y = /* @__PURE__ */ N({
7
- __name: "ImportCurlModal",
8
- props: {
9
- parsedCurl: {},
10
- state: {},
11
- collectionUid: {}
12
- },
13
- emits: ["importCurl", "close"],
14
- setup(_, { emit: q }) {
15
- const o = _, V = q, { toast: g } = K(), i = x(""), { activeWorkspaceCollections: y, activeCollection: S } = A(), p = b(() => !i.value.trim()), u = b(
16
- () => y.value.map((e) => {
17
- var t;
18
- return {
19
- id: e.uid,
20
- label: ((t = e.info) == null ? void 0 : t.title) ?? "Unititled Collection"
21
- };
22
- })
23
- ), l = x(
24
- o.collectionUid ? u.value.find(
25
- (e) => e.id === o.collectionUid
26
- ) : u.value.find(
27
- (e) => {
28
- var t;
29
- return e.id === ((t = S.value) == null ? void 0 : t.uid);
30
- }
31
- )
32
- );
33
- function m() {
34
- if (p.value) {
35
- g("Please enter a name before importing your request.", "error");
36
- return;
37
- }
38
- U();
39
- }
40
- function U() {
41
- var e;
42
- o.parsedCurl && V("importCurl", {
43
- parsedCurl: o.parsedCurl,
44
- requestName: i.value,
45
- collectionUid: ((e = l.value) == null ? void 0 : e.id) ?? ""
46
- });
47
- }
48
- return k(
49
- () => o.state.open,
50
- (e) => {
51
- e && (i.value = "");
52
- }
53
- ), (e, t) => (I(), R(a(M), {
54
- size: "xs",
55
- state: e.state,
56
- title: "Import cURL request"
57
- }, {
58
- default: n(() => {
59
- var f, v, C, h;
60
- return [
61
- s(a(T), {
62
- modelValue: i.value,
63
- "onUpdate:modelValue": t[0] || (t[0] = (d) => i.value = d),
64
- autofocus: "",
65
- class: "h-9",
66
- placeholder: "Request Name",
67
- onKeyup: E(m, ["enter"])
68
- }, null, 8, ["modelValue"]),
69
- r("div", F, [
70
- r("div", H, [
71
- s(L, {
72
- isEditable: !1,
73
- isSquare: "",
74
- method: ((f = o.parsedCurl) == null ? void 0 : f.method) || "get"
75
- }, null, 8, ["method"])
76
- ]),
77
- r("span", P, c(((C = (v = o.parsedCurl) == null ? void 0 : v.servers) == null ? void 0 : C[0]) || "") + c(((h = o.parsedCurl) == null ? void 0 : h.path) || ""), 1)
78
- ]),
79
- r("div", W, [
80
- s(a(j), {
81
- modelValue: l.value,
82
- "onUpdate:modelValue": t[1] || (t[1] = (d) => l.value = d),
83
- options: u.value
84
- }, {
85
- default: n(() => [
86
- s(a(w), {
87
- class: "hover:bg-b-2 max-h-8 justify-between gap-1 p-2 text-xs",
88
- variant: "outlined"
89
- }, {
90
- default: n(() => [
91
- r("span", {
92
- class: z(["whitespace-nowrap", l.value ? "text-c-1" : "text-c-3"])
93
- }, c(l.value ? l.value.label : "Select Collection"), 3),
94
- s(a(D), {
95
- class: "text-c-3",
96
- icon: "ChevronDown",
97
- size: "md"
98
- })
99
- ]),
100
- _: 1
101
- })
102
- ]),
103
- _: 1
104
- }, 8, ["modelValue", "options"]),
105
- s(a(w), {
106
- class: "h-8 gap-1.5 whitespace-nowrap px-2.5 font-medium shadow-none focus:outline-none",
107
- disabled: p.value,
108
- type: "submit",
109
- onClick: m
110
- }, {
111
- default: n(() => t[2] || (t[2] = [
112
- B(" Import Request ")
113
- ])),
114
- _: 1
115
- }, 8, ["disabled"])
116
- ])
117
- ];
118
- }),
119
- _: 1
120
- }, 8, ["state"]));
121
- }
122
- });
123
- export {
124
- Y as default
125
- };