@scalar/api-client 2.2.54 → 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 (79) hide show
  1. package/CHANGELOG.md +18 -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/TopNav/TopNav.vue.d.ts.map +1 -1
  19. package/dist/components/TopNav/TopNav.vue.js +122 -94
  20. package/dist/components/TopNav/TopNavItem.vue.d.ts +1 -0
  21. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  22. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  23. package/dist/components/TopNav/TopNavItem.vue2.js +49 -42
  24. package/dist/layouts/App/create-api-client-app.d.ts +12 -12
  25. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  26. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  27. package/dist/layouts/Modal/create-api-client-modal.d.ts +24 -24
  28. package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
  29. package/dist/libs/create-client.d.ts +12 -12
  30. package/dist/libs/create-client.d.ts.map +1 -1
  31. package/dist/libs/create-client.js +91 -115
  32. package/dist/libs/get-request-uid-by-path-method.d.ts +7 -0
  33. package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -0
  34. package/dist/libs/get-request-uid-by-path-method.js +10 -0
  35. package/dist/libs/get-request-uid-by-path-method.test.d.ts +2 -0
  36. package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +1 -0
  37. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  38. package/dist/libs/validate-parameters.d.ts +6 -0
  39. package/dist/libs/validate-parameters.d.ts.map +1 -0
  40. package/dist/libs/validate-parameters.js +12 -0
  41. package/dist/libs/validate-parameters.test.d.ts +2 -0
  42. package/dist/libs/validate-parameters.test.d.ts.map +1 -0
  43. package/dist/store/cookies.d.ts +4 -4
  44. package/dist/store/request-example.d.ts +4 -4
  45. package/dist/store/requests.d.ts +4 -4
  46. package/dist/store/store.d.ts +12 -12
  47. package/dist/style.css +1 -1
  48. package/dist/views/Request/Request.vue.d.ts +6 -3
  49. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  50. package/dist/views/Request/Request.vue.js +2 -2
  51. package/dist/views/Request/Request.vue2.js +96 -145
  52. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  53. package/dist/views/Request/RequestRoot.vue.js +2 -2
  54. package/dist/views/Request/RequestRoot.vue2.js +68 -57
  55. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
  56. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  57. package/dist/views/Request/RequestSection/RequestParams.vue.js +34 -31
  58. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -0
  59. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  60. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +35 -33
  61. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -0
  62. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  63. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  64. package/dist/views/Request/RequestSection/RequestSection.vue2.js +59 -54
  65. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
  66. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  67. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  68. package/dist/views/Request/RequestSection/RequestTable.vue2.js +29 -27
  69. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  70. package/dist/views/Request/RequestSidebar.vue2.js +23 -23
  71. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  72. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  73. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  74. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  75. package/dist/views/Request/libs/request.js +1 -2
  76. package/package.json +13 -13
  77. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +0 -1
  78. package/dist/components/ImportCurl/ImportCurlModal.vue.js +0 -7
  79. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +0 -125
@@ -6,7 +6,7 @@
6
6
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
7
  export default _default;
8
8
  export declare const PaletteComponents: {
9
- readonly 'Import from OpenAPI/Swagger/Postman': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ readonly 'Import from OpenAPI/Swagger/Postman/cURL': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
10
  close: () => any;
11
11
  back: (e: KeyboardEvent) => any;
12
12
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
@@ -83,6 +83,103 @@ export declare const PaletteComponents: {
83
83
  onClose?: () => any;
84
84
  onBack?: (e: KeyboardEvent) => any;
85
85
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
86
+ readonly 'Import from cURL': import("vue").DefineComponent<{
87
+ metaData: {
88
+ parsedCurl: {
89
+ path?: string | undefined;
90
+ type?: "request" | undefined;
91
+ uid?: string | undefined;
92
+ description?: string | undefined;
93
+ summary?: string | undefined;
94
+ externalDocs?: {
95
+ url: string;
96
+ description?: unknown;
97
+ } | undefined;
98
+ 'x-internal'?: boolean | undefined;
99
+ 'x-scalar-ignore'?: boolean | undefined;
100
+ security?: Record<string, string[] | undefined>[] | undefined;
101
+ selectedSecuritySchemeUids?: (string | string[])[] | undefined;
102
+ selectedServerUid?: string | null | undefined;
103
+ servers?: string[] | undefined;
104
+ tags?: string[] | undefined;
105
+ deprecated?: boolean | undefined;
106
+ examples?: string[] | undefined;
107
+ operationId?: string | undefined;
108
+ parameters?: {
109
+ name: string;
110
+ in: "path" | "cookie" | "query" | "header";
111
+ example?: unknown;
112
+ required?: boolean | undefined;
113
+ description?: string | undefined;
114
+ deprecated?: boolean | undefined;
115
+ schema?: unknown;
116
+ content?: unknown;
117
+ style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
118
+ examples?: Record<string, {
119
+ value?: unknown;
120
+ summary?: string | undefined;
121
+ }> | undefined;
122
+ }[] | undefined;
123
+ requestBody?: any;
124
+ responses?: Record<string, any> | undefined;
125
+ method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
126
+ } & {
127
+ url?: string;
128
+ };
129
+ collectionUid: string;
130
+ };
131
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
132
+ close: () => any;
133
+ back: (e: KeyboardEvent) => any;
134
+ }, string, import("vue").PublicProps, Readonly<{
135
+ metaData: {
136
+ parsedCurl: {
137
+ path?: string | undefined;
138
+ type?: "request" | undefined;
139
+ uid?: string | undefined;
140
+ description?: string | undefined;
141
+ summary?: string | undefined;
142
+ externalDocs?: {
143
+ url: string;
144
+ description?: unknown;
145
+ } | undefined;
146
+ 'x-internal'?: boolean | undefined;
147
+ 'x-scalar-ignore'?: boolean | undefined;
148
+ security?: Record<string, string[] | undefined>[] | undefined;
149
+ selectedSecuritySchemeUids?: (string | string[])[] | undefined;
150
+ selectedServerUid?: string | null | undefined;
151
+ servers?: string[] | undefined;
152
+ tags?: string[] | undefined;
153
+ deprecated?: boolean | undefined;
154
+ examples?: string[] | undefined;
155
+ operationId?: string | undefined;
156
+ parameters?: {
157
+ name: string;
158
+ in: "path" | "cookie" | "query" | "header";
159
+ example?: unknown;
160
+ required?: boolean | undefined;
161
+ description?: string | undefined;
162
+ deprecated?: boolean | undefined;
163
+ schema?: unknown;
164
+ content?: unknown;
165
+ style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
166
+ examples?: Record<string, {
167
+ value?: unknown;
168
+ summary?: string | undefined;
169
+ }> | undefined;
170
+ }[] | undefined;
171
+ requestBody?: any;
172
+ responses?: Record<string, any> | undefined;
173
+ method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
174
+ } & {
175
+ url?: string;
176
+ };
177
+ collectionUid: string;
178
+ };
179
+ }> & Readonly<{
180
+ onClose?: () => any;
181
+ onBack?: (e: KeyboardEvent) => any;
182
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
86
183
  };
87
184
  /** Infer the types from the commands */
88
185
  export type CommandNames = keyof typeof PaletteComponents;
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,CAhOY;qBAgOZ,CAhOmC;;;;;;;mBAgOnC,CAhOY;qBAgOZ,CAhOmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsuBzB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
1
+ {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAwaA;;;;GAIG;;AACH,wBAmfI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAlhB9B,CAvPoB;qBAuPpB,CAvP2C;;;;;;;mBAuP3C,CAvPoB;qBAuPpB,CAvP2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA6lBmC,CAAC;;;;;;;;;;;;;;;2BAQQ,CAAC;4BAA2B,CAAC;+BACzF,CAAC;8BAAwC,CAAC;0BAAqC,CAAC;2BAA0B,CAAC;yBAChH,CAAC;4BAEiC,CAAC;6BAAqC,CAAA;+BAA8B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;+BAZ/C,CAAC;;;;;;;;;;;;;;;2BAQQ,CAAC;4BAA2B,CAAC;+BACzF,CAAC;8BAAwC,CAAC;0BAAqC,CAAC;2BAA0B,CAAC;yBAChH,CAAC;4BAEiC,CAAC;6BAAqC,CAAA;+BAA8B,CAAC;;;;;;;;;;;;;;;CAyKnH,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
@@ -2,8 +2,8 @@ import o from "./TheCommandPalette.vue2.js";
2
2
  import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a12eca9"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6b717663"]]);
6
6
  export {
7
7
  s as PaletteComponents,
8
- r as default
8
+ a as default
9
9
  };
@@ -1,41 +1,44 @@
1
- import { defineComponent as q, ref as c, computed as K, watch as F, onMounted as G, onBeforeUnmount as Q, openBlock as a, createBlock as M, unref as r, withCtx as g, createElementVNode as u, createVNode as f, createTextVNode as B, createElementBlock as m, withDirectives as N, withKeys as w, withModifiers as P, vModelText as j, Fragment as A, renderList as V, toDisplayString as W, vShow as J, normalizeClass as X, createCommentVNode as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as H } from "vue";
2
- import { Dialog as oe, DialogPanel as te, DialogTitle as ne } from "@headlessui/vue";
3
- import { useModal as ae, ScalarIcon as S } from "@scalar/components";
4
- import { useRouter as le } from "vue-router";
1
+ import { defineComponent as F, ref as c, computed as N, watch as G, onMounted as Q, onBeforeUnmount as j, openBlock as a, createBlock as T, unref as s, withCtx as g, createElementVNode as u, createVNode as f, createTextVNode as U, createElementBlock as m, withKeys as w, withModifiers as P, Fragment as I, renderList as B, withDirectives as J, toDisplayString as M, vShow as X, normalizeClass as Y, createCommentVNode as Z, resolveDynamicComponent as ee, mergeProps as oe, nextTick as W } from "vue";
2
+ import { Dialog as te, DialogPanel as ne, DialogTitle as ae } from "@headlessui/vue";
3
+ import { useModal as le, ScalarIcon as A } from "@scalar/components";
4
+ import { useRouter as re } from "vue-router";
5
5
  import { ROUTES as se } from "../../constants.js";
6
- import { PathId as re } from "../../routes.js";
7
- import { useActiveEntities as me } from "../../store/active-entities.js";
8
- import ie from "./CommandPaletteCollection.vue.js";
9
- import ce from "./CommandPaletteExample.vue.js";
10
- import ue from "./CommandPaletteImport.vue.js";
11
- import de from "./CommandPaletteRequest.vue.js";
12
- import fe from "./CommandPaletteServer.vue.js";
13
- import pe from "./CommandPaletteTag.vue.js";
14
- import ve from "./CommandPaletteWorkspace.vue.js";
15
- import { useWorkspace as he } from "../../store/store.js";
16
- const Ce = {
6
+ import { importCurlCommand as me } from "../../libs/importers/curl.js";
7
+ import { PathId as ie } from "../../routes.js";
8
+ import { useActiveEntities as ce } from "../../store/active-entities.js";
9
+ import ue from "./CommandPaletteCollection.vue.js";
10
+ import de from "./CommandPaletteExample.vue.js";
11
+ import pe from "./CommandPaletteImport.vue.js";
12
+ import fe from "./CommandPaletteImportCurl.vue.js";
13
+ import ve from "./CommandPaletteRequest.vue.js";
14
+ import Ce from "./CommandPaletteServer.vue.js";
15
+ import he from "./CommandPaletteTag.vue.js";
16
+ import xe from "./CommandPaletteWorkspace.vue.js";
17
+ import { useWorkspace as _e } from "../../store/store.js";
18
+ const be = {
17
19
  key: 0,
18
20
  class: "custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5"
19
- }, xe = { class: "bg-b-2 focus-within:bg-b-1 focus-within:border-b-3 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)]" }, _e = { for: "commandmenu" }, be = ["onKeydown"], ke = ["onClick"], ye = {
21
+ }, ke = { class: "bg-b-2 focus-within:bg-b-1 focus-within:border-b-3 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)]" }, ye = { for: "commandmenu" }, ge = ["value", "onKeydown"], we = ["onClick"], Pe = {
20
22
  key: 0,
21
23
  class: "text-c-3 p-2 pt-3 text-center text-sm"
22
- }, ge = {
24
+ }, Ie = {
23
25
  key: 1,
24
26
  class: "flex-1 p-1.5"
25
- }, we = {
27
+ }, Ae = {
26
28
  name: "TheCommandPalette"
27
- }, Pe = {
28
- "Import from OpenAPI/Swagger/Postman": ue,
29
- "Create Request": de,
30
- "Create Workspace": ve,
31
- "Add Tag": pe,
32
- "Add Server": fe,
33
- "Create Collection": ie,
34
- "Add Example": ce
35
- }, He = /* @__PURE__ */ q({
36
- ...we,
37
- setup(Ae) {
38
- const d = ae(), D = le(), { activeWorkspace: x } = me(), { events: p } = he(), I = [
29
+ }, Le = {
30
+ "Import from OpenAPI/Swagger/Postman/cURL": pe,
31
+ "Create Request": ve,
32
+ "Create Workspace": xe,
33
+ "Add Tag": he,
34
+ "Add Server": Ce,
35
+ "Create Collection": ue,
36
+ "Add Example": de,
37
+ "Import from cURL": fe
38
+ }, Ge = /* @__PURE__ */ F({
39
+ ...Ae,
40
+ setup(Re) {
41
+ const d = le(), L = re(), { activeWorkspace: x, activeCollection: V } = ce(), { events: p } = _e(), R = [
39
42
  {
40
43
  label: "",
41
44
  commands: [
@@ -44,7 +47,7 @@ const Ce = {
44
47
  icon: "ExternalLink"
45
48
  },
46
49
  {
47
- name: "Import from OpenAPI/Swagger/Postman",
50
+ name: "Import from OpenAPI/Swagger/Postman/cURL",
48
51
  icon: "Import"
49
52
  },
50
53
  {
@@ -86,164 +89,176 @@ const Ce = {
86
89
  },
87
90
  {
88
91
  label: "Pages",
89
- commands: se.map((o) => {
90
- var e;
92
+ commands: se.map((e) => {
93
+ var o;
91
94
  return {
92
- name: o.displayName,
93
- icon: o.icon,
94
- path: D.resolve({
95
- ...o.to,
95
+ name: e.displayName,
96
+ icon: e.icon,
97
+ path: L.resolve({
98
+ ...e.to,
96
99
  params: {
97
- [re.Workspace]: ((e = x == null ? void 0 : x.value) == null ? void 0 : e.uid) ?? "default"
100
+ [ie.Workspace]: ((o = x == null ? void 0 : x.value) == null ? void 0 : o.uid) ?? "default"
98
101
  }
99
102
  }).href
100
103
  };
101
104
  })
102
105
  }
103
- ], _ = c(), l = c(""), s = c(null), i = c(-1), R = c([]), v = K(
104
- () => I.reduce((o, e) => {
105
- const t = e.commands.filter(
106
+ ], _ = c(), l = c(""), r = c(null), i = c(-1), S = c([]), v = N(
107
+ () => R.reduce((e, o) => {
108
+ const t = o.commands.filter(
106
109
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
107
110
  );
108
- return [...o, ...t];
111
+ return [...e, ...t];
109
112
  }, [])
110
- ), h = () => {
111
- d.hide(), l.value = "", s.value = null, i.value = -1;
112
- }, O = (o) => {
113
- l.value !== "" && (o == null || o.preventDefault()), s.value = null, H(() => {
114
- var e;
115
- return (e = b.value) == null ? void 0 : e.focus();
113
+ ), C = () => {
114
+ d.hide(), l.value = "", r.value = null, i.value = -1;
115
+ }, H = (e) => {
116
+ l.value !== "" && (e == null || e.preventDefault()), r.value = null, W(() => {
117
+ var o;
118
+ return (o = b.value) == null ? void 0 : o.focus();
116
119
  });
117
- }, $ = (o) => {
118
- "path" in o ? (D.push(o.path), h()) : s.value = o.name;
119
- }, b = c(), E = ({
120
- commandName: o,
121
- metaData: e
120
+ }, D = (e) => {
121
+ "path" in e ? (L.push(e.path), C()) : r.value = e.name;
122
+ }, b = c(), $ = ({
123
+ commandName: e,
124
+ metaData: o
122
125
  } = {}) => {
123
- s.value = o ?? null, _.value = e, d.show(), H(() => {
126
+ r.value = e ?? null, _.value = o, d.show(), W(() => {
124
127
  var t;
125
128
  return (t = b.value) == null ? void 0 : t.focus();
126
129
  });
127
130
  };
128
- F(l, (o) => {
129
- o && v.value.length > 0 && (i.value = 0);
131
+ G(l, (e) => {
132
+ e && v.value.length > 0 && (i.value = 0);
130
133
  });
131
- const L = (o, e) => {
132
- var C;
134
+ const E = (e, o) => {
135
+ var h;
133
136
  if (!d.open) return;
134
- e.preventDefault();
135
- const t = o === "up" ? -1 : 1, n = v.value.length;
136
- i.value = (i.value + t + n) % n, (C = R.value[i.value]) == null || C.scrollIntoView({
137
+ o.preventDefault();
138
+ const t = e === "up" ? -1 : 1, n = v.value.length;
139
+ i.value = (i.value + t + n) % n, (h = S.value[i.value]) == null || h.scrollIntoView({
137
140
  behavior: "smooth",
138
141
  block: "nearest"
139
142
  });
140
- }, k = K(
143
+ }, k = N(
141
144
  () => v.value[i.value]
142
- ), U = (o) => {
143
- !k.value || s.value || (o.preventDefault(), o.stopPropagation(), $(k.value));
144
- }, T = (o) => {
145
- d.open && o != null && o.closeModal && h();
145
+ ), O = (e) => {
146
+ !k.value || r.value || (e.preventDefault(), e.stopPropagation(), D(k.value));
147
+ }, z = (e) => {
148
+ d.open && e != null && e.closeModal && C();
149
+ }, q = (e) => {
150
+ var o;
151
+ if (e.trim().toLowerCase().startsWith("curl")) {
152
+ p.commandPalette.emit({
153
+ commandName: "Import from cURL",
154
+ metaData: {
155
+ parsedCurl: me(e),
156
+ collectionUid: (o = V.value) == null ? void 0 : o.uid
157
+ }
158
+ });
159
+ return;
160
+ }
161
+ l.value = e;
146
162
  };
147
- return G(() => {
148
- p.commandPalette.on(E), p.hotKeys.on(T);
149
- }), Q(() => {
150
- p.commandPalette.off(E), p.hotKeys.off(T);
151
- }), (o, e) => (a(), M(r(oe), {
152
- open: r(d).open,
153
- onClose: e[5] || (e[5] = (t) => h())
163
+ return Q(() => {
164
+ p.commandPalette.on($), p.hotKeys.on(z);
165
+ }), j(() => {
166
+ p.commandPalette.off($), p.hotKeys.off(z);
167
+ }), (e, o) => (a(), T(s(te), {
168
+ open: s(d).open,
169
+ onClose: o[5] || (o[5] = (t) => C())
154
170
  }, {
155
171
  default: g(() => [
156
- e[7] || (e[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
157
- f(r(te), { class: "commandmenu z-overlay flex flex-col" }, {
172
+ o[7] || (o[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
173
+ f(s(ne), { class: "commandmenu z-overlay flex flex-col" }, {
158
174
  default: g(() => [
159
- f(r(ne), { class: "sr-only" }, {
160
- default: g(() => e[6] || (e[6] = [
161
- B("API Client Command Menu")
175
+ f(s(ae), { class: "sr-only" }, {
176
+ default: g(() => o[6] || (o[6] = [
177
+ U("API Client Command Menu")
162
178
  ])),
163
179
  _: 1
164
180
  }),
165
- s.value ? (a(), m("div", ge, [
181
+ r.value ? (a(), m("div", Ie, [
166
182
  u("button", {
167
- class: "p-0.75 hover:bg-b-3 text-c-3 active:text-c-1 my-1.25 z-1 absolute mr-1.5 rounded",
183
+ class: "hover:bg-b-3 text-c-3 active:text-c-1 z-1 my-1.25 p-0.75 absolute mr-1.5 rounded",
168
184
  type: "button",
169
- onClick: e[3] || (e[3] = (t) => s.value = null)
185
+ onClick: o[3] || (o[3] = (t) => r.value = null)
170
186
  }, [
171
- f(r(S), {
187
+ f(s(A), {
172
188
  icon: "ChevronLeft",
173
189
  size: "md",
174
190
  thickness: "1.5"
175
191
  })
176
192
  ]),
177
- (a(), M(Z(Pe[s.value]), ee(_.value ? { metaData: _.value } : {}, {
178
- onBack: e[4] || (e[4] = (t) => O(t)),
179
- onClose: h
193
+ (a(), T(ee(Le[r.value]), oe(_.value ? { metaData: _.value } : {}, {
194
+ onBack: o[4] || (o[4] = (t) => H(t)),
195
+ onClose: C
180
196
  }), null, 16))
181
- ])) : (a(), m("div", Ce, [
182
- u("div", xe, [
183
- u("label", _e, [
184
- f(r(S), {
197
+ ])) : (a(), m("div", be, [
198
+ u("div", ke, [
199
+ u("label", ye, [
200
+ f(s(A), {
185
201
  class: "text-c-2 mr-2.5",
186
202
  icon: "Search",
187
203
  size: "md",
188
204
  thickness: "1.5"
189
205
  })
190
206
  ]),
191
- N(u("input", {
207
+ u("input", {
192
208
  id: "commandmenu",
193
209
  ref_key: "commandInputRef",
194
210
  ref: b,
195
- "onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
211
+ value: l.value,
196
212
  autocomplete: "off",
197
213
  autofocus: "",
198
214
  class: "w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none",
199
215
  placeholder: "Search commands...",
200
216
  type: "text",
217
+ onInput: o[0] || (o[0] = (t) => q(t.target.value)),
201
218
  onKeydown: [
202
- e[1] || (e[1] = w(P((t) => L("down", t), ["stop"]), ["down"])),
203
- w(P(U, ["stop"]), ["enter"]),
204
- e[2] || (e[2] = w(P((t) => L("up", t), ["stop"]), ["up"]))
219
+ o[1] || (o[1] = w(P((t) => E("down", t), ["stop"]), ["down"])),
220
+ w(P(O, ["stop"]), ["enter"]),
221
+ o[2] || (o[2] = w(P((t) => E("up", t), ["stop"]), ["up"]))
205
222
  ]
206
- }, null, 40, be), [
207
- [j, l.value]
208
- ])
223
+ }, null, 40, ge)
209
224
  ]),
210
- (a(), m(A, null, V(I, (t) => (a(), m(A, {
225
+ (a(), m(I, null, B(R, (t) => (a(), m(I, {
211
226
  key: t.label
212
227
  }, [
213
- N(u("div", { class: "text-c-3 mb-1 mt-2 px-2 text-xs font-medium" }, W(t.label), 513), [
228
+ J(u("div", { class: "text-c-3 mb-1 mt-2 px-2 text-xs font-medium" }, M(t.label), 513), [
214
229
  [
215
- J,
230
+ X,
216
231
  t.commands.filter(
217
232
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
218
233
  ).length > 0
219
234
  ]
220
235
  ]),
221
- (a(!0), m(A, null, V(t.commands.filter(
236
+ (a(!0), m(I, null, B(t.commands.filter(
222
237
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
223
- ), (n, C) => {
224
- var z;
238
+ ), (n, h) => {
239
+ var K;
225
240
  return a(), m("div", {
226
241
  key: n.name,
227
242
  ref_for: !0,
228
243
  ref: (y) => {
229
- y && (R.value[C] = y);
244
+ y && (S.value[h] = y);
230
245
  },
231
- class: X(["commandmenu-item hover:bg-b-2 flex cursor-pointer items-center rounded px-2 py-1.5 text-sm", {
232
- "bg-b-2": n.name === ((z = k.value) == null ? void 0 : z.name)
246
+ class: Y(["commandmenu-item hover:bg-b-2 flex cursor-pointer items-center rounded px-2 py-1.5 text-sm", {
247
+ "bg-b-2": n.name === ((K = k.value) == null ? void 0 : K.name)
233
248
  }]),
234
- onClick: (y) => $(n)
249
+ onClick: (y) => D(n)
235
250
  }, [
236
- f(r(S), {
251
+ f(s(A), {
237
252
  class: "text-c-2 mr-2.5",
238
253
  icon: n.icon,
239
254
  size: "md",
240
255
  thickness: "1.5"
241
256
  }, null, 8, ["icon"]),
242
- B(" " + W(n.name), 1)
243
- ], 10, ke);
257
+ U(" " + M(n.name), 1)
258
+ ], 10, we);
244
259
  }), 128))
245
260
  ], 64))), 64)),
246
- v.value.length ? Y("", !0) : (a(), m("div", ye, " No commands found "))
261
+ v.value.length ? Z("", !0) : (a(), m("div", Pe, " No commands found "))
247
262
  ]))
248
263
  ]),
249
264
  _: 1
@@ -254,6 +269,6 @@ const Ce = {
254
269
  }
255
270
  });
256
271
  export {
257
- Pe as PaletteComponents,
258
- He as default
272
+ Le as PaletteComponents,
273
+ Ge as default
259
274
  };
@@ -4,9 +4,9 @@ type __VLS_Props = {
4
4
  isEditable?: boolean;
5
5
  };
6
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- change: (value: "delete" | "get" | "head" | "connect" | "options" | "patch" | "post" | "put" | "trace") => any;
7
+ change: (value: "delete" | "get" | "put" | "post" | "options" | "head" | "patch" | "trace" | "connect") => any;
8
8
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onChange?: (value: "delete" | "get" | "head" | "connect" | "options" | "patch" | "post" | "put" | "trace") => any;
9
+ onChange?: (value: "delete" | "get" | "put" | "post" | "options" | "head" | "patch" | "trace" | "connect") => any;
10
10
  }>, {
11
11
  isEditable: boolean;
12
12
  isSquare: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"AAuHA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAA;IACjC,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AA4HF,wBAMG"}
1
+ {"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"AAwHA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAA;IACjC,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AA4HF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./OpenApiClientButton.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2e9f75f1"]]);
4
+ const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-01d14731"]]);
5
5
  export {
6
- r as default
6
+ i as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAiRA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAkcF,wBAOG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAqTA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AA+eF,wBAOG"}