@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,54 +1,54 @@
1
- import { defineComponent as w, ref as k, openBlock as F, createBlock as y, withCtx as l, createVNode as n, unref as c, createTextVNode as p } from "vue";
2
- import { ScalarButton as C, ScalarIcon as I } from "@scalar/components";
3
- import { useToasts as U } from "@scalar/use-toasts";
4
- import b from "./CommandActionForm.vue.js";
1
+ import { defineComponent as w, ref as b, openBlock as F, createBlock as h, withCtx as l, createVNode as c, unref as i, createTextVNode as p } from "vue";
2
+ import { ScalarButton as y, ScalarIcon as C } from "@scalar/components";
3
+ import { useToasts as I } from "@scalar/use-toasts";
4
+ import U from "./CommandActionForm.vue.js";
5
5
  import V from "./CommandActionInput.vue.js";
6
6
  import { useFileDialog as R } from "../../hooks/useFileDialog.js";
7
7
  import { useWorkspace as $ } from "../../store/store.js";
8
- const W = /* @__PURE__ */ w({
8
+ const O = /* @__PURE__ */ w({
9
9
  __name: "CommandPaletteImport",
10
- emits: ["close"],
10
+ emits: ["close", "back"],
11
11
  setup(A, { emit: u }) {
12
- const i = u, { activeWorkspace: f, importSpecFile: d, importSpecFromUrl: g } = $(), t = k(""), { toast: r } = U(), { open: _ } = R({
12
+ const n = u, { activeWorkspace: f, importSpecFile: d, importSpecFromUrl: g } = $(), r = b(""), { toast: a } = I(), { open: k } = R({
13
13
  onChange: async (e) => {
14
14
  const o = e == null ? void 0 : e[0];
15
15
  if (o) {
16
- const a = new FileReader();
17
- a.onload = async (S) => {
16
+ const t = new FileReader();
17
+ t.onload = async (S) => {
18
18
  var m;
19
- const h = (m = S.target) == null ? void 0 : m.result;
19
+ const _ = (m = S.target) == null ? void 0 : m.result;
20
20
  try {
21
- await d(h, f.value.uid), r("Import successful", "info"), i("close");
21
+ await d(_, f.value.uid), a("Import successful", "info"), n("close");
22
22
  } catch (s) {
23
23
  console.error(s);
24
24
  const v = (s == null ? void 0 : s.message) || "Unknown error";
25
- r(`Import failed: ${v}`, "error");
25
+ a(`Import failed: ${v}`, "error");
26
26
  }
27
- }, a.readAsText(o);
27
+ }, t.readAsText(o);
28
28
  }
29
29
  },
30
30
  multiple: !1,
31
31
  accept: ".json,.yaml,.yml"
32
32
  }), x = async () => {
33
- if (t.value)
33
+ if (r.value)
34
34
  try {
35
- await g(t.value), r("Import successful", "info"), i("close");
35
+ await g(r.value), a("Import successful", "info"), n("close");
36
36
  } catch (e) {
37
37
  console.error("the error ", e);
38
38
  const o = (e == null ? void 0 : e.message) || "Unknown error";
39
- r(`Import failed: ${o}`, "error");
39
+ a(`Import failed: ${o}`, "error");
40
40
  }
41
41
  };
42
- return (e, o) => (F(), y(b, { onSubmit: x }, {
42
+ return (e, o) => (F(), h(U, { onSubmit: x }, {
43
43
  options: l(() => [
44
- n(c(C), {
44
+ c(i(y), {
45
45
  class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
46
46
  variant: "outlined",
47
- onClick: c(_)
47
+ onClick: i(k)
48
48
  }, {
49
49
  default: l(() => [
50
50
  p(" JSON, or YAML Files "),
51
- n(c(I), {
51
+ c(i(C), {
52
52
  class: "text-c-3 -rotate-90",
53
53
  icon: "ArrowRight",
54
54
  size: "sm"
@@ -61,11 +61,12 @@ const W = /* @__PURE__ */ w({
61
61
  p("Import Collection")
62
62
  ]),
63
63
  default: l(() => [
64
- n(V, {
65
- modelValue: t.value,
66
- "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
64
+ c(V, {
65
+ modelValue: r.value,
66
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
67
67
  label: "Paste Swagger File URL",
68
- placeholder: "Paste Swagger File URL"
68
+ placeholder: "Paste Swagger File URL",
69
+ onOnDelete: o[1] || (o[1] = (t) => n("back", t))
69
70
  }, null, 8, ["modelValue"])
70
71
  ]),
71
72
  _: 1
@@ -73,5 +74,5 @@ const W = /* @__PURE__ */ w({
73
74
  }
74
75
  });
75
76
  export {
76
- W as default
77
+ O as default
77
78
  };
@@ -5,12 +5,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
5
5
  };
6
6
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  close: () => void;
8
+ back: (e: KeyboardEvent) => void;
8
9
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
10
  metaData?: {
10
11
  itemUid: string;
11
12
  parentUid: string;
12
13
  };
13
14
  }>>> & {
15
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
14
16
  onClose?: (() => any) | undefined;
15
17
  }, {}, {}>;
16
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";eAgMa;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;eAHU;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;AAmUH,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":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";eAkMa;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;eAHU;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;AAqVH,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,36 +1,36 @@
1
- import { defineComponent as P, ref as c, computed as g, openBlock as x, createBlock as h, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as C, toDisplayString as V, createCommentVNode as W, createTextVNode as j } from "vue";
1
+ import { defineComponent as P, ref as c, computed as x, openBlock as h, createBlock as C, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as V, toDisplayString as q, createCommentVNode as W, createTextVNode as j } from "vue";
2
2
  import E from "../HttpMethod/HttpMethod.vue.js";
3
- import { ScalarListbox as q, ScalarButton as _, ScalarIcon as w } from "@scalar/components";
3
+ import { ScalarListbox as D, ScalarButton as _, ScalarIcon as k } from "@scalar/components";
4
4
  import { useToasts as H } from "@scalar/use-toasts";
5
5
  import { useRouter as I } from "vue-router";
6
6
  import L from "./CommandActionForm.vue.js";
7
- import A from "./CommandActionInput.vue.js";
8
- import { isHTTPMethod as F } from "../HttpMethod/helpers.js";
9
- import { useWorkspace as G } from "../../store/store.js";
10
- const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
7
+ import O from "./CommandActionInput.vue.js";
8
+ import { isHTTPMethod as A } from "../HttpMethod/helpers.js";
9
+ import { useWorkspace as F } from "../../store/store.js";
10
+ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
11
11
  __name: "CommandPaletteRequest",
12
12
  props: {
13
13
  metaData: {}
14
14
  },
15
- emits: ["close"],
16
- setup(D, { emit: S }) {
17
- const r = D, k = S, { push: M } = I(), { toast: N } = H(), {
15
+ emits: ["close", "back"],
16
+ setup(w, { emit: S }) {
17
+ const r = w, b = S, { push: M } = I(), { toast: N } = H(), {
18
18
  activeCollection: R,
19
19
  activeWorkspace: U,
20
- activeWorkspaceCollections: b,
20
+ activeWorkspaceCollections: g,
21
21
  requestMutators: T,
22
22
  activeRequest: y,
23
23
  tags: $
24
- } = G(), o = c(""), d = c("get"), v = g(
25
- () => b.value.map((t) => {
24
+ } = F(), o = c(""), d = c("get"), v = x(
25
+ () => g.value.map((t) => {
26
26
  var e;
27
27
  return {
28
28
  id: t.uid,
29
29
  label: ((e = t.info) == null ? void 0 : e.title) ?? "Unititled Collection"
30
30
  };
31
31
  })
32
- ), m = g(
33
- () => b.value.flatMap(
32
+ ), m = x(
33
+ () => g.value.flatMap(
34
34
  (t) => {
35
35
  var e;
36
36
  return t.uid === ((e = l.value) == null ? void 0 : e.id) ? t.tags.flatMap((a) => {
@@ -70,7 +70,7 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
70
70
  N("Please enter a name before creating a request.", "error");
71
71
  return;
72
72
  }
73
- if (!((e = l.value) != null && e.id) || !F(d.value))
73
+ if (!((e = l.value) != null && e.id) || !A(d.value))
74
74
  return;
75
75
  const t = T.add(
76
76
  {
@@ -83,23 +83,23 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
83
83
  },
84
84
  l.value.id
85
85
  );
86
- t && M(`/workspace/${U.value.uid}/request/${t.uid}`), k("close");
86
+ t && M(`/workspace/${U.value.uid}/request/${t.uid}`), b("close");
87
87
  };
88
- return (t, e) => (x(), h(L, {
88
+ return (t, e) => (h(), C(L, {
89
89
  disabled: !o.value.trim(),
90
90
  onSubmit: B
91
91
  }, {
92
92
  options: u(() => [
93
- f("div", J, [
93
+ f("div", G, [
94
94
  i(E, {
95
95
  isEditable: !0,
96
96
  isSquare: "",
97
97
  method: d.value,
98
98
  onChange: z
99
99
  }, null, 8, ["method"]),
100
- i(n(q), {
100
+ i(n(D), {
101
101
  modelValue: l.value,
102
- "onUpdate:modelValue": e[1] || (e[1] = (a) => l.value = a),
102
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
103
103
  options: v.value
104
104
  }, {
105
105
  default: u(() => [
@@ -109,9 +109,9 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
109
109
  }, {
110
110
  default: u(() => [
111
111
  f("span", {
112
- class: C(l.value ? "text-c-1" : "text-c-3")
113
- }, V(l.value ? l.value.label : "Select Collection"), 3),
114
- i(n(w), {
112
+ class: V(l.value ? "text-c-1" : "text-c-3")
113
+ }, q(l.value ? l.value.label : "Select Collection"), 3),
114
+ i(n(k), {
115
115
  class: "text-c-3",
116
116
  icon: "ChevronDown",
117
117
  size: "xs"
@@ -122,10 +122,10 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
122
122
  ]),
123
123
  _: 1
124
124
  }, 8, ["modelValue", "options"]),
125
- m.value.length ? (x(), h(n(q), {
125
+ m.value.length ? (h(), C(n(D), {
126
126
  key: 0,
127
127
  modelValue: s.value,
128
- "onUpdate:modelValue": e[2] || (e[2] = (a) => s.value = a),
128
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => s.value = a),
129
129
  options: m.value
130
130
  }, {
131
131
  default: u(() => [
@@ -135,9 +135,9 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
135
135
  }, {
136
136
  default: u(() => [
137
137
  f("span", {
138
- class: C(s.value ? "text-c-1" : "text-c-3")
139
- }, V(s.value ? s.value.label : "Select Tag"), 3),
140
- i(n(w), {
138
+ class: V(s.value ? "text-c-1" : "text-c-3")
139
+ }, q(s.value ? s.value.label : "Select Tag"), 3),
140
+ i(n(k), {
141
141
  class: "text-c-3",
142
142
  icon: "ChevronDown",
143
143
  size: "xs"
@@ -154,11 +154,12 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
154
154
  j("Create Request")
155
155
  ]),
156
156
  default: u(() => [
157
- i(A, {
157
+ i(O, {
158
158
  modelValue: o.value,
159
159
  "onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
160
160
  label: "Request Name",
161
- placeholder: "Request Name"
161
+ placeholder: "Request Name",
162
+ onOnDelete: e[1] || (e[1] = (a) => b("back", a))
162
163
  }, null, 8, ["modelValue"])
163
164
  ]),
164
165
  _: 1
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
2
  close: () => void;
3
+ back: (e: KeyboardEvent) => void;
3
4
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
5
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
4
6
  onClose?: (() => any) | undefined;
5
7
  }, {}, {}>;
6
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":";;;;;AAqSA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":";;;;;;;AAyTA,wBAMG"}
@@ -1,55 +1,55 @@
1
- import { defineComponent as S, ref as u, computed as C, openBlock as _, createBlock as V, withCtx as r, createVNode as i, unref as s, createElementVNode as U, normalizeClass as g, toDisplayString as k, createTextVNode as w } from "vue";
2
- import { ScalarListbox as h, ScalarButton as B, ScalarIcon as D } from "@scalar/components";
3
- import { useToasts as L } from "@scalar/use-toasts";
4
- import M from "./CommandActionForm.vue.js";
5
- import N from "./CommandActionInput.vue.js";
6
- import { useWorkspace as y } from "../../store/store.js";
1
+ import { defineComponent as S, ref as c, computed as C, openBlock as V, createBlock as _, withCtx as r, createVNode as i, unref as s, createElementVNode as U, normalizeClass as k, toDisplayString as g, createTextVNode as w } from "vue";
2
+ import { ScalarListbox as D, ScalarButton as B, ScalarIcon as L } from "@scalar/components";
3
+ import { useToasts as M } from "@scalar/use-toasts";
4
+ import N from "./CommandActionForm.vue.js";
5
+ import y from "./CommandActionInput.vue.js";
6
+ import { useWorkspace as z } from "../../store/store.js";
7
7
  const E = /* @__PURE__ */ S({
8
8
  __name: "CommandPaletteServer",
9
- emits: ["close"],
10
- setup(z, { emit: c }) {
11
- const d = c, { toast: m } = L(), {
9
+ emits: ["close", "back"],
10
+ setup(P, { emit: d }) {
11
+ const n = d, { toast: m } = M(), {
12
12
  activeCollection: v,
13
13
  activeWorkspaceCollections: f,
14
14
  collectionMutators: p,
15
15
  serverMutators: b
16
- } = y(), a = u(""), n = C(
16
+ } = z(), a = c(""), u = C(
17
17
  () => f.value.flatMap(
18
- (t) => {
19
- var e, l;
20
- return ((e = t.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
21
- id: t.uid,
22
- label: ((l = t.info) == null ? void 0 : l.title) ?? "Unititled Collection"
18
+ (l) => {
19
+ var e, t;
20
+ return ((e = l.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
21
+ id: l.uid,
22
+ label: ((t = l.info) == null ? void 0 : t.title) ?? "Unititled Collection"
23
23
  };
24
24
  }
25
25
  )
26
- ), o = u(
27
- n.value.find(
28
- (t) => {
26
+ ), o = c(
27
+ u.value.find(
28
+ (l) => {
29
29
  var e;
30
- return t.id === ((e = v.value) == null ? void 0 : e.uid);
30
+ return l.id === ((e = v.value) == null ? void 0 : e.uid);
31
31
  }
32
32
  )
33
33
  ), x = () => {
34
- var l;
34
+ var t;
35
35
  if (!a.value.trim()) {
36
36
  m("Please enter a valid url before creating a server.", "error");
37
37
  return;
38
38
  }
39
- const t = (l = o.value) == null ? void 0 : l.id;
40
- if (!t) return;
41
- const e = b.add({ url: a.value }, t);
42
- p.edit(t, "selectedServerUid", e.uid), d("close");
39
+ const l = (t = o.value) == null ? void 0 : t.id;
40
+ if (!l) return;
41
+ const e = b.add({ url: a.value }, l);
42
+ p.edit(l, "selectedServerUid", e.uid), n("close");
43
43
  };
44
- return (t, e) => (_(), V(M, {
44
+ return (l, e) => (V(), _(N, {
45
45
  disabled: !a.value.trim(),
46
46
  onSubmit: x
47
47
  }, {
48
48
  options: r(() => [
49
- i(s(h), {
49
+ i(s(D), {
50
50
  modelValue: o.value,
51
- "onUpdate:modelValue": e[1] || (e[1] = (l) => o.value = l),
52
- options: n.value
51
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => o.value = t),
52
+ options: u.value
53
53
  }, {
54
54
  default: r(() => [
55
55
  i(s(B), {
@@ -58,9 +58,9 @@ const E = /* @__PURE__ */ S({
58
58
  }, {
59
59
  default: r(() => [
60
60
  U("span", {
61
- class: g(o.value ? "text-c-1" : "text-c-3")
62
- }, k(o.value ? o.value.label : "Select Collection"), 3),
63
- i(s(D), {
61
+ class: k(o.value ? "text-c-1" : "text-c-3")
62
+ }, g(o.value ? o.value.label : "Select Collection"), 3),
63
+ i(s(L), {
64
64
  class: "text-c-3",
65
65
  icon: "ChevronDown",
66
66
  size: "xs"
@@ -76,11 +76,12 @@ const E = /* @__PURE__ */ S({
76
76
  w("Create Server")
77
77
  ]),
78
78
  default: r(() => [
79
- i(N, {
79
+ i(y, {
80
80
  modelValue: a.value,
81
- "onUpdate:modelValue": e[0] || (e[0] = (l) => a.value = l),
81
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => a.value = t),
82
82
  label: "Server URL",
83
- placeholder: "Server URL"
83
+ placeholder: "Server URL",
84
+ onOnDelete: e[1] || (e[1] = (t) => n("back", t))
84
85
  }, null, 8, ["modelValue"])
85
86
  ]),
86
87
  _: 1
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
2
  close: () => void;
3
+ back: (e: KeyboardEvent) => void;
3
4
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
5
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
4
6
  onClose?: (() => any) | undefined;
5
7
  }, {}, {}>;
6
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":";;;;;AA+QA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":";;;;;;;AAmSA,wBAMG"}
@@ -1,14 +1,14 @@
1
- import { defineComponent as g, computed as x, ref as u, openBlock as C, createBlock as _, withCtx as o, createVNode as n, unref as i, createElementVNode as V, normalizeClass as S, toDisplayString as T, createTextVNode as N } from "vue";
2
- import { ScalarListbox as k, ScalarButton as w, ScalarIcon as h } from "@scalar/components";
3
- import { useToasts as B } from "@scalar/use-toasts";
1
+ import { defineComponent as g, computed as x, ref as m, openBlock as C, createBlock as V, withCtx as n, createVNode as s, unref as i, createElementVNode as _, normalizeClass as S, toDisplayString as k, createTextVNode as T } from "vue";
2
+ import { ScalarListbox as N, ScalarButton as w, ScalarIcon as B } from "@scalar/components";
3
+ import { useToasts as D } from "@scalar/use-toasts";
4
4
  import y from "./CommandActionForm.vue.js";
5
5
  import z from "./CommandActionInput.vue.js";
6
- import { useWorkspace as D } from "../../store/store.js";
6
+ import { useWorkspace as P } from "../../store/store.js";
7
7
  const L = /* @__PURE__ */ g({
8
8
  __name: "CommandPaletteTag",
9
- emits: ["close"],
10
- setup(P, { emit: m }) {
11
- const c = m, { activeWorkspaceCollections: d, activeCollection: p, tagMutators: f } = D(), { toast: v } = B(), r = x(
9
+ emits: ["close", "back"],
10
+ setup(U, { emit: c }) {
11
+ const r = c, { activeWorkspaceCollections: d, activeCollection: p, tagMutators: f } = P(), { toast: v } = D(), u = x(
12
12
  () => d.value.map((l) => {
13
13
  var e;
14
14
  return {
@@ -16,8 +16,8 @@ const L = /* @__PURE__ */ g({
16
16
  label: ((e = l.info) == null ? void 0 : e.title) ?? ""
17
17
  };
18
18
  })
19
- ), t = u(""), a = u(
20
- r.value.find(
19
+ ), t = m(""), a = m(
20
+ u.value.find(
21
21
  (l) => {
22
22
  var e;
23
23
  return l.id === ((e = p.value) == null ? void 0 : e.uid);
@@ -34,28 +34,28 @@ const L = /* @__PURE__ */ g({
34
34
  name: t.value
35
35
  },
36
36
  a.value.id
37
- ) && c("close");
37
+ ) && r("close");
38
38
  };
39
- return (l, e) => (C(), _(y, {
39
+ return (l, e) => (C(), V(y, {
40
40
  disabled: !t.value.trim(),
41
41
  onSubmit: b
42
42
  }, {
43
- options: o(() => [
44
- n(i(k), {
43
+ options: n(() => [
44
+ s(i(N), {
45
45
  modelValue: a.value,
46
- "onUpdate:modelValue": e[1] || (e[1] = (s) => a.value = s),
47
- options: r.value
46
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => a.value = o),
47
+ options: u.value
48
48
  }, {
49
- default: o(() => [
50
- n(i(w), {
49
+ default: n(() => [
50
+ s(i(w), {
51
51
  class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
52
52
  variant: "outlined"
53
53
  }, {
54
- default: o(() => [
55
- V("span", {
54
+ default: n(() => [
55
+ _("span", {
56
56
  class: S(a.value ? "text-c-1" : "text-c-3")
57
- }, T(a.value ? a.value.label : "Select Collection"), 3),
58
- n(i(h), {
57
+ }, k(a.value ? a.value.label : "Select Collection"), 3),
58
+ s(i(B), {
59
59
  class: "text-c-3",
60
60
  icon: "ChevronDown",
61
61
  size: "xs"
@@ -67,15 +67,16 @@ const L = /* @__PURE__ */ g({
67
67
  _: 1
68
68
  }, 8, ["modelValue", "options"])
69
69
  ]),
70
- submit: o(() => [
71
- N("Create Tag")
70
+ submit: n(() => [
71
+ T("Create Tag")
72
72
  ]),
73
- default: o(() => [
74
- n(z, {
73
+ default: n(() => [
74
+ s(z, {
75
75
  modelValue: t.value,
76
- "onUpdate:modelValue": e[0] || (e[0] = (s) => t.value = s),
76
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => t.value = o),
77
77
  label: "Tag Name",
78
- placeholder: "Tag Name"
78
+ placeholder: "Tag Name",
79
+ onOnDelete: e[1] || (e[1] = (o) => r("back", o))
79
80
  }, null, 8, ["modelValue"])
80
81
  ]),
81
82
  _: 1
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
2
  close: () => void;
3
+ back: (e: KeyboardEvent) => void;
3
4
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
5
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
4
6
  onClose?: (() => any) | undefined;
5
7
  }, {}, {}>;
6
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;AAoJA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;AAwKA,wBAMG"}
@@ -1,36 +1,37 @@
1
- import { defineComponent as u, ref as i, openBlock as d, createBlock as f, withCtx as t, createTextVNode as k, createVNode as _ } from "vue";
2
- import { useToasts as b } from "@scalar/use-toasts";
1
+ import { defineComponent as u, ref as i, openBlock as d, createBlock as f, withCtx as s, createTextVNode as k, createVNode as b } from "vue";
2
+ import { useToasts as _ } from "@scalar/use-toasts";
3
3
  import { useRouter as w } from "vue-router";
4
4
  import v from "./CommandActionForm.vue.js";
5
5
  import N from "./CommandActionInput.vue.js";
6
6
  import { useWorkspace as V } from "../../store/store.js";
7
- const S = /* @__PURE__ */ u({
7
+ const T = /* @__PURE__ */ u({
8
8
  __name: "CommandPaletteWorkspace",
9
- emits: ["close"],
10
- setup(W, { emit: r }) {
11
- const s = r, { push: m } = w(), { toast: c } = b(), { workspaceMutators: l } = V(), e = i(""), n = () => {
9
+ emits: ["close", "back"],
10
+ setup(W, { emit: m }) {
11
+ const a = m, { push: n } = w(), { toast: l } = _(), { workspaceMutators: c } = V(), e = i(""), p = () => {
12
12
  if (!e.value.trim()) {
13
- c("Please enter a name before creating a workspace.", "error");
13
+ l("Please enter a name before creating a workspace.", "error");
14
14
  return;
15
15
  }
16
- const o = l.add({
16
+ const r = c.add({
17
17
  name: e.value
18
18
  });
19
- m(`/workspace/${o.uid}`), s("close");
19
+ n(`/workspace/${r.uid}`), a("close");
20
20
  };
21
- return (o, a) => (d(), f(v, {
21
+ return (r, o) => (d(), f(v, {
22
22
  disabled: !e.value.trim(),
23
- onSubmit: n
23
+ onSubmit: p
24
24
  }, {
25
- submit: t(() => [
25
+ submit: s(() => [
26
26
  k("Create Workspace")
27
27
  ]),
28
- default: t(() => [
29
- _(N, {
28
+ default: s(() => [
29
+ b(N, {
30
30
  modelValue: e.value,
31
- "onUpdate:modelValue": a[0] || (a[0] = (p) => e.value = p),
31
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => e.value = t),
32
32
  label: "Workspace Name",
33
- placeholder: "Workspace Name"
33
+ placeholder: "Workspace Name",
34
+ onOnDelete: o[1] || (o[1] = (t) => a("back", t))
34
35
  }, null, 8, ["modelValue"])
35
36
  ]),
36
37
  _: 1
@@ -38,5 +39,5 @@ const S = /* @__PURE__ */ u({
38
39
  }
39
40
  });
40
41
  export {
41
- S as default
42
+ T as default
42
43
  };