@scalar/api-client 2.1.10 → 2.1.12

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 (113) hide show
  1. package/CHANGELOG.md +39 -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/router.js +1 -1
  92. package/dist/store/import-spec.d.ts +128 -2
  93. package/dist/store/import-spec.d.ts.map +1 -1
  94. package/dist/store/import-spec.js +24 -23
  95. package/dist/store/store.d.ts +256 -4
  96. package/dist/store/store.d.ts.map +1 -1
  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/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  102. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +82 -88
  103. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  105. package/dist/views/Request/RequestSidebar.vue2.js +106 -97
  106. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  107. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  108. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -26
  109. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  110. package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
  111. package/package.json +13 -8
  112. package/dist/views/Components/Schemas/Schemas.vue.d.ts +0 -3
  113. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +0 -1
@@ -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 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";WA+US,MAAM;;WAAN,MAAM;;AAudf,wBAMG;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":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";WA0US,MAAM;;WAAN,MAAM;;AAocf,wBAMG;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 t from "./RequestAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b2a5825f"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-ab00a92e"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,163 +1,157 @@
1
- import { defineComponent as F, ref as A, computed as b, openBlock as d, createBlock as $, withCtx as n, createElementVNode as i, toDisplayString as D, createVNode as a, unref as c, createElementBlock as x, Fragment as q, renderList as z, createTextVNode as E, withModifiers as H, Teleport as K, createCommentVNode as L, pushScopeId as P, popScopeId as G } from "vue";
2
- import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useModal as Q, ScalarComboboxMultiselect as X, ScalarButton as Y, ScalarIcon as V } from "@scalar/components";
4
- import { nanoid as Z } from "nanoid";
5
- import ee from "./DeleteRequestAuthModal.vue.js";
6
- import te from "./RequestExampleAuth.vue.js";
7
- import { displaySchemeFormatter as M, createSchemeValueSet as le } from "../../libs/auth.js";
8
- import { ADD_AUTH_OPTIONS as oe } from "../../consts/new-auth-options.js";
9
- import se from "../../../../components/DataTable/DataTable.vue.js";
10
- import ae from "../../../../components/DataTable/DataTableRow.vue.js";
11
- import ce from "../../../../components/DataTable/DataTableHeader.vue.js";
12
- import { useWorkspace as ie } from "../../../../store/store.js";
13
- const y = (v) => (P("data-v-b2a5825f"), v = v(), G(), v), re = { class: "flex gap-1" }, ne = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ue = {
1
+ import { defineComponent as F, ref as A, computed as S, openBlock as f, createBlock as W, withCtx as r, createElementVNode as n, toDisplayString as $, createVNode as a, unref as c, createElementBlock as x, Fragment as q, renderList as z, createTextVNode as E, withModifiers as K, pushScopeId as H, popScopeId as L } from "vue";
2
+ import P from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useModal as G, ScalarComboboxMultiselect as J, ScalarButton as Q, ScalarIcon as D } from "@scalar/components";
4
+ import { nanoid as X } from "nanoid";
5
+ import Y from "./DeleteRequestAuthModal.vue.js";
6
+ import Z from "./RequestExampleAuth.vue.js";
7
+ import { displaySchemeFormatter as M, createSchemeValueSet as ee } from "../../libs/auth.js";
8
+ import { ADD_AUTH_OPTIONS as te } from "../../consts/new-auth-options.js";
9
+ import le from "../../../../components/DataTable/DataTable.vue.js";
10
+ import oe from "../../../../components/DataTable/DataTableRow.vue.js";
11
+ import se from "../../../../components/DataTable/DataTableHeader.vue.js";
12
+ import { useWorkspace as ae } from "../../../../store/store.js";
13
+ const b = (h) => (H("data-v-ab00a92e"), h = h(), L(), h), ce = { class: "flex gap-1" }, ie = /* @__PURE__ */ b(() => /* @__PURE__ */ n("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), re = {
14
14
  key: 0,
15
15
  class: "flex relative scroll-timeline-x w-full"
16
- }, de = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", { class: "fade-left" }, null, -1)), me = { class: "flex flex-1 gap-0.75 mr-1.5 items-center" }, pe = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", null, "Hello World", -1)), fe = /* @__PURE__ */ y(() => /* @__PURE__ */ i("div", { class: "fade-right" }, null, -1)), he = {
16
+ }, ne = /* @__PURE__ */ b(() => /* @__PURE__ */ n("div", { class: "fade-left" }, null, -1)), ue = { class: "flex flex-1 gap-0.75 mr-1.5 items-center" }, me = /* @__PURE__ */ b(() => /* @__PURE__ */ n("div", { class: "fade-right" }, null, -1)), de = {
17
17
  key: 1,
18
18
  class: "pl-2"
19
- }, De = /* @__PURE__ */ F({
19
+ }, Ce = /* @__PURE__ */ F({
20
20
  __name: "RequestAuth",
21
21
  props: {
22
22
  title: {}
23
23
  },
24
- setup(v) {
24
+ setup(h) {
25
25
  const {
26
26
  activeCollection: u,
27
- activeRequest: r,
28
- collectionMutators: I,
27
+ activeRequest: i,
28
+ collectionMutators: V,
29
29
  isReadOnly: g,
30
30
  requestMutators: k,
31
- securitySchemes: _,
32
- securitySchemeMutators: O
33
- } = ie(), R = A(null), S = Q(), C = A(void 0), w = `combobox-${Z()}`, T = b(() => {
34
- var o, p, f;
35
- const e = (p = (o = r.value) == null ? void 0 : o.security) == null ? void 0 : p.filter(
31
+ securitySchemes: v,
32
+ securitySchemeMutators: I
33
+ } = ae(), O = A(null), y = G(), w = A(void 0), C = `combobox-${X()}`, R = S(() => {
34
+ var o, m, d;
35
+ const e = (m = (o = i.value) == null ? void 0 : o.security) == null ? void 0 : m.filter(
36
36
  (s) => Object.keys(s).length
37
37
  );
38
38
  return ((g.value && (e != null && e.length) ? e.map((s) => {
39
- var h;
39
+ var p;
40
40
  const l = Object.keys(s)[0];
41
- return ((h = Object.values(_).find((W) => W.nameKey === l)) == null ? void 0 : h.uid) ?? "";
42
- }) : (f = u.value) == null ? void 0 : f.securitySchemes) ?? []).map((s) => _[s]).filter((s) => s);
43
- }), U = b(
41
+ return ((p = Object.values(v).find((N) => N.nameKey === l)) == null ? void 0 : p.uid) ?? "";
42
+ }) : (d = u.value) == null ? void 0 : d.securitySchemes) ?? []).map((s) => v[s]).filter((s) => s);
43
+ }), U = S(
44
44
  () => {
45
- const e = T.value.map(
45
+ const e = R.value.map(
46
46
  (t) => M(t)
47
47
  );
48
48
  return g.value ? e : [
49
49
  { label: "Select auth", options: e },
50
50
  {
51
51
  label: "Add new auth",
52
- options: oe
52
+ options: te
53
53
  }
54
54
  ];
55
55
  }
56
- ), m = b(
56
+ ), _ = S(
57
57
  () => {
58
58
  var e;
59
- return ((e = r.value) == null ? void 0 : e.selectedSecuritySchemeUids.map(
60
- (t) => M(_[t])
59
+ return ((e = i.value) == null ? void 0 : e.selectedSecuritySchemeUids.map(
60
+ (t) => M(v[t])
61
61
  )) ?? [];
62
62
  }
63
63
  );
64
- function N(e) {
65
- var f, s;
66
- if (!((f = u.value) != null && f.uid) || !((s = r.value) != null && s.uid)) return;
64
+ function T(e) {
65
+ var d, s;
66
+ if (!((d = u.value) != null && d.uid) || !((s = i.value) != null && s.uid)) return;
67
67
  const t = e.find((l) => l.payload), o = e.filter((l) => !l.payload).map(({ id: l }) => l);
68
68
  if (t != null && t.payload) {
69
- const l = O.add(
69
+ const l = I.add(
70
70
  t.payload,
71
71
  u.value.uid
72
72
  );
73
73
  o.push(l.uid);
74
74
  }
75
- const p = o.filter((l) => !u.value.auth[l]);
76
- I.edit(
75
+ const m = o.filter((l) => !u.value.auth[l]);
76
+ V.edit(
77
77
  u.value.uid,
78
78
  "auth",
79
- p.reduce((l, h) => (l[h] = le(_[h]), l), u.value.auth)
79
+ m.reduce((l, p) => (l[p] = ee(v[p]), l), u.value.auth)
80
80
  ), k.edit(
81
- r.value.uid,
81
+ i.value.uid,
82
82
  "selectedSecuritySchemeUids",
83
83
  o
84
84
  );
85
85
  }
86
- const j = (e) => r.value && k.edit(
87
- r.value.uid,
86
+ const j = (e) => i.value && k.edit(
87
+ i.value.uid,
88
88
  "selectedSecuritySchemeUids",
89
- r.value.selectedSecuritySchemeUids.filter(
89
+ i.value.selectedSecuritySchemeUids.filter(
90
90
  (t) => t !== e
91
91
  )
92
92
  );
93
93
  function B(e) {
94
- C.value = e, S.show();
94
+ w.value = e, y.show();
95
95
  }
96
- return (e, t) => (d(), $(J, {
96
+ return (e, t) => (f(), W(P, {
97
97
  class: "group/params",
98
- itemCount: m.value.length
98
+ itemCount: _.value.length
99
99
  }, {
100
- title: n(() => [
101
- i("div", re, D(e.title), 1)
100
+ title: r(() => [
101
+ n("div", ce, $(e.title), 1)
102
102
  ]),
103
- default: n(() => [
104
- i("form", null, [
105
- a(c(se), {
103
+ default: r(() => [
104
+ n("form", null, [
105
+ a(c(le), {
106
106
  class: "flex-1",
107
107
  columns: [""]
108
108
  }, {
109
- default: n(() => [
110
- a(c(ae), null, {
111
- default: n(() => [
112
- a(c(ce), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
113
- default: n(() => [
114
- a(c(X), {
109
+ default: r(() => [
110
+ a(c(oe), null, {
111
+ default: r(() => [
112
+ a(c(se), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
113
+ default: r(() => [
114
+ a(c(J), {
115
115
  ref_key: "comboboxRef",
116
- ref: R,
116
+ ref: O,
117
117
  class: "text-xs w-full",
118
118
  fullWidth: "",
119
119
  isDeletable: "",
120
- modelValue: m.value,
120
+ modelValue: _.value,
121
121
  multiple: "",
122
122
  options: U.value,
123
123
  style: { "margin-left": "120px" },
124
- teleport: `#${w}`,
124
+ teleport: `#${C}`,
125
125
  onDelete: B,
126
- "onUpdate:modelValue": N
126
+ "onUpdate:modelValue": T
127
127
  }, {
128
- default: n(() => [
129
- a(c(Y), {
128
+ default: r(() => [
129
+ a(c(Q), {
130
130
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
131
131
  fullWidth: "",
132
132
  variant: "ghost"
133
133
  }, {
134
- default: n(() => [
135
- ne,
136
- m.value.length ? (d(), x("div", ue, [
137
- de,
138
- i("div", me, [
139
- (d(!0), x(q, null, z(m.value, (o) => (d(), x("span", {
134
+ default: r(() => [
135
+ ie,
136
+ _.value.length ? (f(), x("div", re, [
137
+ ne,
138
+ n("div", ue, [
139
+ (f(!0), x(q, null, z(_.value, (o) => (f(), x("span", {
140
140
  key: o.id,
141
141
  class: "cm-pill flex items-center mx-0 h-fit"
142
142
  }, [
143
- E(D(o.label) + " ", 1),
144
- a(c(V), {
143
+ E($(o.label) + " ", 1),
144
+ a(c(D), {
145
145
  class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
146
146
  icon: "Close",
147
147
  size: "xs",
148
- onClick: H((p) => j(o.id), ["stop"])
148
+ onClick: K((m) => j(o.id), ["stop"])
149
149
  }, null, 8, ["onClick"])
150
150
  ]))), 128))
151
151
  ]),
152
- m.value.length ? (d(), $(K, {
153
- key: 0,
154
- to: "body"
155
- }, [
156
- pe
157
- ])) : L("", !0),
158
- fe
159
- ])) : (d(), x("div", he, " None ")),
160
- a(c(V), {
152
+ me
153
+ ])) : (f(), x("div", de, " None ")),
154
+ a(c(D), {
161
155
  class: "min-w-3 ml-auto mr-2.5",
162
156
  icon: "ChevronDown",
163
157
  size: "xs"
@@ -174,16 +168,16 @@ const y = (v) => (P("data-v-b2a5825f"), v = v(), G(), v), re = { class: "flex ga
174
168
  ]),
175
169
  _: 1
176
170
  }),
177
- a(te)
171
+ a(Z)
178
172
  ]),
179
173
  _: 1
180
174
  }),
181
- a(ee, {
182
- scheme: C.value,
183
- state: c(S),
184
- onClose: t[0] || (t[0] = (o) => c(S).hide())
175
+ a(Y, {
176
+ scheme: w.value,
177
+ state: c(y),
178
+ onClose: t[0] || (t[0] = (o) => c(y).hide())
185
179
  }, null, 8, ["scheme", "state"]),
186
- i("div", { id: w })
180
+ n("div", { id: C })
187
181
  ])
188
182
  ]),
189
183
  _: 1
@@ -191,5 +185,5 @@ const y = (v) => (P("data-v-b2a5825f"), v = v(), G(), v), re = { class: "flex ga
191
185
  }
192
186
  });
193
187
  export {
194
- De as default
188
+ Ce as default
195
189
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAgVe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAklB1D,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"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-07523d65"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e83264ab"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,182 +1,191 @@
1
- import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as i, unref as e, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as s, isRef as te, withKeys as v, withModifiers as u, createBlock as c, renderList as D, createTextVNode as $, toDisplayString as oe, createCommentVNode as B, vShow as re, pushScopeId as se, popScopeId as ae } from "vue";
2
- import ie from "../../assets/rabbit.ascii.js";
3
- import ne from "../../assets/rabbitjump.ascii.js";
4
- import le from "../../components/HttpMethod/HttpMethod.vue.js";
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 l, unref as e, normalizeClass as b, createSlots as te, withCtx as n, createElementVNode as i, isRef as oe, withKeys as v, withModifiers as c, createBlock as d, renderList as D, createTextVNode as $, toDisplayString as re, createCommentVNode as B, vShow as se, pushScopeId as ae, popScopeId as ie } from "vue";
2
+ import ne from "../../assets/rabbit.ascii.js";
3
+ import le from "../../assets/rabbitjump.ascii.js";
4
+ import de from "../../components/HttpMethod/HttpMethod.vue.js";
5
5
  import V from "../../components/ScalarAsciiArt.vue.js";
6
- import { useSearch as de } from "../../components/Search/useSearch.js";
6
+ import { useSearch as pe } from "../../components/Search/useSearch.js";
7
7
  import me from "../../components/Sidebar/SidebarButton.vue.js";
8
- import pe from "./RequestSidebarItemMenu.vue.js";
9
- import { dragHandlerFactory as ue } from "./handle-drag.js";
10
- import { ScalarSearchInput as ce, ScalarSearchResultList as fe, ScalarSearchResultItem as be, ScalarIcon as he } from "@scalar/components";
8
+ import ue from "./RequestSidebarItemMenu.vue.js";
9
+ import { dragHandlerFactory as ce } from "./handle-drag.js";
10
+ import { ScalarSearchInput as fe, ScalarSearchResultList as be, ScalarSearchResultItem as he, ScalarIcon as q } from "@scalar/components";
11
11
  import { LibraryIcon as Se } from "@scalar/icons";
12
12
  import ve from "./RequestSidebarItem.vue.js";
13
13
  import Re from "../../components/Sidebar/Sidebar.vue.js";
14
14
  import we from "./components/WorkspaceDropdown.vue.js";
15
15
  import { useSidebar as ye } from "../../hooks/useSidebar.js";
16
- import { useWorkspace as ge } from "../../store/store.js";
17
- import { hotKeyBus as q } from "../../libs/event-busses/hot-keys-bus.js";
18
- import { commandPaletteBus as P } from "../../libs/event-busses/command-palette-bus.js";
19
- const ke = (m) => (se("data-v-07523d65"), m = m(), ae(), 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__ */ ke(() => /* @__PURE__ */ s("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
20
- /* @__PURE__ */ s("b", { class: "font-medium" }, "Let's Get Started"),
21
- /* @__PURE__ */ s("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI, Postman or Insomnia ")
22
- ], -1)), je = /* @__PURE__ */ J({
16
+ import { useWorkspace as ke } from "../../store/store.js";
17
+ import { hotKeyBus as E } from "../../libs/event-busses/hot-keys-bus.js";
18
+ import { commandPaletteBus as F } from "../../libs/event-busses/command-palette-bus.js";
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
+ /* @__PURE__ */ i("b", { class: "font-medium" }, "Let's Get Started"),
21
+ /* @__PURE__ */ i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
22
+ ], -1)), je = /* @__PURE__ */ Q({
23
23
  __name: "RequestSidebar",
24
24
  props: {
25
25
  showSidebar: { type: Boolean },
26
26
  isReadonly: { type: Boolean }
27
27
  },
28
28
  emits: ["update:showSidebar", "newTab"],
29
- setup(m, { emit: E }) {
30
- const F = m, R = E, w = ge(), {
31
- activeWorkspaceCollections: M,
32
- activeRequest: O,
29
+ setup(m, { emit: M }) {
30
+ const O = m, R = M, w = ke(), {
31
+ activeWorkspaceCollections: P,
32
+ activeRequest: z,
33
33
  activeWorkspaceRequests: y,
34
- findRequestParents: z,
35
- isReadOnly: N
36
- } = w, { handleDragEnd: T, isDroppable: A } = ue(w), { collapsedSidebarFolders: K, setCollapsedSidebarFolder: L } = ye(), p = Q({ open: !1 });
37
- X(
38
- O,
34
+ findRequestParents: N,
35
+ isReadOnly: T
36
+ } = w, { handleDragEnd: A, isDroppable: K } = ce(w), { collapsedSidebarFolders: L, setCollapsedSidebarFolder: U } = ye(), u = X({ open: !1 });
37
+ Y(
38
+ z,
39
39
  (r) => {
40
- r && z(r).forEach(
41
- (t) => L(t, !0)
40
+ r && N(r).forEach(
41
+ (t) => U(t, !0)
42
42
  );
43
43
  },
44
44
  { immediate: !0 }
45
45
  );
46
46
  const {
47
47
  searchText: f,
48
- searchResultsWithPlaceholderResults: g,
49
- selectedSearchResult: k,
50
- onSearchResultClick: U,
51
- fuseSearch: W,
48
+ searchResultsWithPlaceholderResults: k,
49
+ selectedSearchResult: g,
50
+ onSearchResultClick: W,
51
+ fuseSearch: H,
52
52
  searchInputRef: I,
53
- searchResultRefs: H,
53
+ searchResultRefs: j,
54
54
  navigateSearchResults: x,
55
- selectSearchResult: j
56
- } = de(), C = (r) => {
55
+ selectSearchResult: G
56
+ } = pe(), C = (r) => {
57
57
  var t;
58
- r.toggleSidebar && R("update:showSidebar", F.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), P.emit()), r.focusRequestSearch && ((t = I.value) == null || t.focus());
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
  };
60
- return Y(() => q.on(C)), Z(() => {
61
- q.off(C);
60
+ return Z(() => E.on(C)), _(() => {
61
+ E.off(C);
62
62
  }), (r, t) => (a(), h(S, null, [
63
- _(i(e(Re), {
63
+ ee(l(e(Re), {
64
64
  class: b([r.showSidebar ? "sidebar-active-width" : ""]),
65
65
  showSidebar: r.showSidebar,
66
66
  "onUpdate:showSidebar": t[8] || (t[8] = (o) => r.$emit("update:showSidebar", o))
67
- }, ee({
67
+ }, te({
68
68
  content: n(() => [
69
- s("div", Ie, [
70
- i(e(ce), {
69
+ i("div", Ie, [
70
+ l(e(fe), {
71
71
  ref_key: "searchInputRef",
72
72
  ref: I,
73
73
  modelValue: e(f),
74
- "onUpdate:modelValue": t[0] || (t[0] = (o) => te(f) ? f.value = o : null),
74
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => oe(f) ? f.value = o : null),
75
75
  sidebar: "",
76
- onInput: e(W),
76
+ onInput: e(H),
77
77
  onKeydown: [
78
- t[1] || (t[1] = v(u((o) => e(x)("down"), ["stop"]), ["down"])),
79
- t[2] || (t[2] = v(u((o) => e(j)(), ["stop"]), ["enter"])),
80
- t[3] || (t[3] = v(u((o) => e(x)("up"), ["stop"]), ["up"]))
78
+ t[1] || (t[1] = v(c((o) => e(x)("down"), ["stop"]), ["down"])),
79
+ t[2] || (t[2] = v(c((o) => e(G)(), ["stop"]), ["enter"])),
80
+ t[3] || (t[3] = v(c((o) => e(x)("up"), ["stop"]), ["up"]))
81
81
  ]
82
82
  }, null, 8, ["modelValue", "onInput"])
83
83
  ]),
84
- s("div", {
84
+ i("div", {
85
85
  class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
86
86
  "pb-14": !r.isReadonly
87
87
  }]),
88
- onDragenter: t[6] || (t[6] = u(() => {
88
+ onDragenter: t[6] || (t[6] = c(() => {
89
89
  }, ["prevent"])),
90
- onDragover: t[7] || (t[7] = u(() => {
90
+ onDragover: t[7] || (t[7] = c(() => {
91
91
  }, ["prevent"]))
92
92
  }, [
93
- e(f) ? (a(), c(e(fe), {
93
+ e(f) ? (a(), d(e(be), {
94
94
  key: 0,
95
95
  class: "gap-px custom-scroll",
96
- noResults: !e(g).length
96
+ noResults: !e(k).length
97
97
  }, {
98
98
  default: n(() => [
99
- (a(!0), h(S, null, D(e(g), (o, d) => (a(), c(e(be), {
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: (l) => e(H)[d] = l,
104
- active: e(k) === d,
103
+ ref: (s) => e(j)[p] = s,
104
+ active: e(g) === p,
105
105
  class: "px-2",
106
- onClick: (l) => e(U)(o),
107
- onFocus: (l) => k.value = d
106
+ onClick: (s) => e(W)(o),
107
+ onFocus: (s) => g.value = p
108
108
  }, {
109
109
  addon: n(() => [
110
- i(le, {
110
+ l(de, {
111
111
  class: "font-bold",
112
112
  method: o.item.httpVerb ?? "get"
113
113
  }, null, 8, ["method"])
114
114
  ]),
115
115
  default: n(() => [
116
- $(oe(o.item.title) + " ", 1)
116
+ $(re(o.item.title) + " ", 1)
117
117
  ]),
118
118
  _: 2
119
119
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
120
120
  ]),
121
121
  _: 1
122
- }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, D(e(M), (o) => {
123
- var d;
124
- return a(), c(ve, {
122
+ }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, D(e(P), (o) => {
123
+ var p;
124
+ return a(), d(ve, {
125
125
  key: o.uid,
126
- isDraggable: !r.isReadonly && ((d = o.info) == null ? void 0 : d.title) !== "Drafts",
127
- isDroppable: e(A),
128
- menuItem: p,
126
+ isDraggable: !r.isReadonly && ((p = o.info) == null ? void 0 : p.title) !== "Drafts",
127
+ isDroppable: e(K),
128
+ menuItem: u,
129
129
  parentUids: [],
130
130
  uid: o.uid,
131
- onNewTab: t[4] || (t[4] = (l, G) => R("newTab", { name: l, uid: G })),
132
- onOnDragEnd: e(T),
133
- onOpenMenu: t[5] || (t[5] = (l) => Object.assign(p, l))
131
+ onNewTab: t[4] || (t[4] = (s, J) => R("newTab", { name: s, uid: J })),
132
+ onOnDragEnd: e(A),
133
+ onOpenMenu: t[5] || (t[5] = (s) => Object.assign(u, s))
134
134
  }, {
135
- leftIcon: n(() => [
136
- i(e(Se), {
137
- class: "text-sidebar-c-2 size-3.5 stroke-[2.5] group-hover:hidden",
138
- src: o["x-scalar-icon"] || "interface-content-folder"
139
- }, null, 8, ["src"]),
140
- s("div", {
141
- class: b({
142
- "rotate-90": e(K)[o.uid]
143
- })
144
- }, [
145
- i(e(he), {
146
- class: "text-c-3 hidden text-sm group-hover:block",
147
- icon: "ChevronRight",
148
- size: "sm"
149
- })
150
- ], 2)
151
- ]),
135
+ leftIcon: n(() => {
136
+ var s;
137
+ return [
138
+ ((s = o.info) == null ? void 0 : s.title) === "Drafts" ? (a(), d(e(q), {
139
+ key: 0,
140
+ class: "text-sidebar-c-2 group-hover:hidden",
141
+ icon: "Scribble",
142
+ thickness: "2.5"
143
+ })) : (a(), d(e(Se), {
144
+ key: 1,
145
+ class: "text-sidebar-c-2 size-3.5 stroke-[2.5] group-hover:hidden",
146
+ src: o["x-scalar-icon"] || "interface-content-folder"
147
+ }, null, 8, ["src"])),
148
+ i("div", {
149
+ class: b({
150
+ "rotate-90": e(L)[o.uid]
151
+ })
152
+ }, [
153
+ l(e(q), {
154
+ class: "text-c-3 hidden text-sm group-hover:block",
155
+ icon: "ChevronRight",
156
+ size: "sm"
157
+ })
158
+ ], 2)
159
+ ];
160
+ }),
152
161
  _: 2
153
162
  }, 1032, ["isDraggable", "isDroppable", "menuItem", "uid", "onOnDragEnd"]);
154
163
  }), 128))
155
164
  ], 34)
156
165
  ]),
157
166
  button: n(() => [
158
- s("div", {
167
+ i("div", {
159
168
  class: b(["relative z-10 pt-0 md:px-2.5 md:pb-2.5 -translate-y-full w-[inherit]", {
160
169
  "empty-sidebar-item": e(y).length <= 1,
161
170
  "border-t-1/2": e(y).length <= 1
162
171
  }])
163
172
  }, [
164
- s("div", xe, [
165
- s("div", Ce, [
166
- i(V, {
167
- art: e(ie),
173
+ i("div", xe, [
174
+ i("div", Ce, [
175
+ l(V, {
176
+ art: e(ne),
168
177
  class: "font-bold rabbitsit"
169
178
  }, null, 8, ["art"]),
170
- i(V, {
171
- art: e(ne),
179
+ l(V, {
180
+ art: e(le),
172
181
  class: "font-bold absolute top-0 left-0 rabbitjump"
173
182
  }, null, 8, ["art"])
174
183
  ]),
175
184
  De
176
185
  ]),
177
- r.isReadonly ? B("", !0) : (a(), c(me, {
186
+ r.isReadonly ? B("", !0) : (a(), d(me, {
178
187
  key: 0,
179
- click: e(P).emit
188
+ click: e(F).emit
180
189
  }, {
181
190
  title: n(() => [
182
191
  $("Add Item")
@@ -190,17 +199,17 @@ const ke = (m) => (se("data-v-07523d65"), m = m(), ae(), m), Ie = { class: "sear
190
199
  r.isReadonly ? void 0 : {
191
200
  name: "header",
192
201
  fn: n(() => [
193
- i(e(we))
202
+ l(e(we), { class: "xl:min-h-header xl:py-2.5 py-1 px-2.5 border-b-1/2" })
194
203
  ]),
195
204
  key: "0"
196
205
  }
197
206
  ]), 1032, ["class", "showSidebar"]), [
198
- [re, r.showSidebar]
207
+ [se, r.showSidebar]
199
208
  ]),
200
- !e(N) && p ? (a(), c(pe, {
209
+ !e(T) && u ? (a(), d(ue, {
201
210
  key: 0,
202
- menuItem: p,
203
- onCloseMenu: t[9] || (t[9] = (o) => p.open = !1)
211
+ menuItem: u,
212
+ onCloseMenu: t[9] || (t[9] = (o) => u.open = !1)
204
213
  }, null, 8, ["menuItem"])) : B("", !0)
205
214
  ], 64));
206
215
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAmOA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAyOA,wBAKG"}