@scalar/api-client 2.0.24 → 2.0.26

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 (168) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +79 -83
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +38 -38
  7. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  8. package/dist/components/CodeInput/CodeInput.vue.d.ts +10 -0
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  10. package/dist/components/CodeInput/CodeInput.vue.js +2 -1
  11. package/dist/components/CodeInput/CodeInput.vue2.js +43 -38
  12. package/dist/components/CodeInput/codeDropdownWidget.d.ts +24 -0
  13. package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -0
  14. package/dist/components/CodeInput/codeDropdownWidget.js +110 -0
  15. package/dist/components/CodeInput/codeVariableWidget.d.ts +8 -0
  16. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -0
  17. package/dist/components/CodeInput/codeVariableWidget.js +124 -0
  18. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -15
  19. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +51 -54
  21. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +4 -2
  22. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  23. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +106 -92
  24. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts +2 -15
  25. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +68 -74
  27. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -15
  28. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  29. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -62
  30. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -15
  31. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  32. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +106 -99
  33. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +7 -0
  34. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -0
  35. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +57 -0
  36. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +4 -0
  37. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +50 -0
  38. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -0
  39. package/dist/components/CommandPalette/TheCommandPalette.vue.js +9 -0
  40. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +198 -0
  41. package/dist/components/CommandPalette/index.d.ts +2 -0
  42. package/dist/components/CommandPalette/index.d.ts.map +1 -0
  43. package/dist/components/CommandPalette/index.js +4 -0
  44. package/dist/components/ContextBar.vue.js +4 -4
  45. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  46. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  47. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  48. package/dist/components/DataTable/DataTableInput.vue2.js +36 -49
  49. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  50. package/dist/components/SideNav/SideNav.vue.js +26 -23
  51. package/dist/components/SideNav/SideNavLink.vue.d.ts +3 -2
  52. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  53. package/dist/components/SideNav/SideNavLink.vue.js +5 -5
  54. package/dist/components/Sidebar/Sidebar.vue.d.ts +15 -2
  55. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  56. package/dist/components/Sidebar/Sidebar.vue.js +14 -12
  57. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  58. package/dist/components/Sidebar/SidebarButton.vue.js +5 -5
  59. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  60. package/dist/components/TopNav/TopNav.vue.js +2 -2
  61. package/dist/components/TopNav/TopNav.vue2.js +31 -28
  62. package/dist/components/TopNav/TopNavItem.vue.d.ts +7 -3
  63. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  64. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  65. package/dist/components/TopNav/TopNavItem.vue2.js +16 -15
  66. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  67. package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
  68. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  69. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -1
  70. package/dist/constants.d.ts +13 -7
  71. package/dist/constants.d.ts.map +1 -1
  72. package/dist/constants.js +4 -4
  73. package/dist/index.d.ts +3 -4
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +14 -16
  76. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -0
  77. package/dist/layouts/App/ApiClientApp.vue.js +72 -0
  78. package/dist/{App → layouts/App}/createApiClientApp.d.ts +1 -1
  79. package/dist/layouts/App/createApiClientApp.d.ts.map +1 -0
  80. package/dist/{App → layouts/App}/createApiClientApp.js +2 -2
  81. package/dist/layouts/App/index.d.ts.map +1 -0
  82. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.d.ts +1 -0
  83. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -0
  84. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.js +2 -2
  85. package/dist/{Modal → layouts/Modal}/api-client-modal.d.ts +1 -1
  86. package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -0
  87. package/dist/{Modal → layouts/Modal}/api-client-modal.js +42 -42
  88. package/dist/layouts/Modal/index.d.ts.map +1 -0
  89. package/dist/libs/eventBusses/command-palette.d.ts +14 -0
  90. package/dist/libs/eventBusses/command-palette.d.ts.map +1 -0
  91. package/dist/libs/eventBusses/command-palette.js +5 -0
  92. package/dist/libs/local-storage.d.ts +1 -1
  93. package/dist/libs/local-storage.d.ts.map +1 -1
  94. package/dist/libs/local-storage.js +19 -19
  95. package/dist/router.d.ts +5 -10
  96. package/dist/router.d.ts.map +1 -1
  97. package/dist/router.js +23 -19
  98. package/dist/store/topNav.d.ts +94 -82
  99. package/dist/store/topNav.d.ts.map +1 -1
  100. package/dist/store/topNav.js +21 -20
  101. package/dist/store/workspace.d.ts +348 -94
  102. package/dist/store/workspace.d.ts.map +1 -1
  103. package/dist/store/workspace.js +314 -221
  104. package/dist/style.css +1 -1
  105. package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
  106. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +1 -1
  107. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  108. package/dist/views/Cookies/Cookies.vue2.js +27 -30
  109. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  110. package/dist/views/Environment/Environment.vue2.js +22 -25
  111. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  112. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -47
  113. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  114. package/dist/views/Request/Request.vue.js +1 -1
  115. package/dist/views/Request/Request.vue2.js +130 -109
  116. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  117. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  118. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  119. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -4
  120. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  121. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  122. package/dist/views/Request/RequestSection/RequestTable.vue2.js +19 -19
  123. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  124. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +6 -5
  125. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  127. package/dist/views/Request/RequestSidebarItem.vue2.js +78 -81
  128. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  129. package/dist/views/Request/RequestSidebarItemMenu.vue.js +60 -42
  130. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  131. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +6 -5
  132. package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
  133. package/dist/views/Request/components/OAuth2.vue.js +2 -0
  134. package/dist/{App.vue.d.ts → views/Request/components/WorkspaceDropdown.vue.d.ts} +1 -2
  135. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -0
  136. package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -0
  137. package/dist/views/Request/components/WorkspaceDropdown.vue2.js +4 -0
  138. package/dist/views/Request/components/index.d.ts +1 -0
  139. package/dist/views/Request/components/index.d.ts.map +1 -1
  140. package/dist/views/Request/components/index.js +4 -2
  141. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  142. package/dist/views/Servers/Servers.vue2.js +12 -15
  143. package/package.json +22 -18
  144. package/dist/App/ApiClientApp.vue.d.ts.map +0 -1
  145. package/dist/App/ApiClientApp.vue.js +0 -56
  146. package/dist/App/createApiClientApp.d.ts.map +0 -1
  147. package/dist/App/index.d.ts.map +0 -1
  148. package/dist/App.vue.d.ts.map +0 -1
  149. package/dist/App.vue.js +0 -77
  150. package/dist/App.vue3.js +0 -5
  151. package/dist/Modal/ApiClientModal.vue.d.ts.map +0 -1
  152. package/dist/Modal/api-client-modal.d.ts.map +0 -1
  153. package/dist/Modal/index.d.ts.map +0 -1
  154. package/dist/components/AddressBar/AddressBarServer.vue.js +0 -113
  155. package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
  156. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +0 -17
  157. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +0 -1
  158. package/dist/components/CommandPalette/CommandPalette.vue.js +0 -7
  159. package/dist/components/CommandPalette/CommandPalette.vue2.js +0 -185
  160. package/dist/main.d.ts +0 -2
  161. package/dist/main.d.ts.map +0 -1
  162. /package/dist/{App → layouts/App}/ApiClientApp.vue.d.ts +0 -0
  163. /package/dist/{App → layouts/App}/ApiClientApp.vue3.js +0 -0
  164. /package/dist/{App → layouts/App}/index.d.ts +0 -0
  165. /package/dist/{App → layouts/App}/index.js +0 -0
  166. /package/dist/{Modal → layouts/Modal}/ApiClientModal.vue2.js +0 -0
  167. /package/dist/{Modal → layouts/Modal}/index.d.ts +0 -0
  168. /package/dist/{Modal → layouts/Modal}/index.js +0 -0
@@ -1,107 +1,121 @@
1
- import { defineComponent as k, ref as i, onMounted as y, openBlock as m, createElementBlock as h, Fragment as v, createElementVNode as e, toDisplayString as u, withModifiers as C, withDirectives as S, vModelText as N, createVNode as a, unref as s, withCtx as n, renderList as V, createBlock as D, createTextVNode as c } from "vue";
2
- import _ from "../HttpMethod/HttpMethod.vue.js";
3
- import { useWorkspace as B } from "../../store/workspace.js";
4
- import { ScalarDropdown as E, ScalarDropdownItem as I, ScalarButton as w, ScalarIcon as $ } from "@scalar/components";
5
- const M = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, j = /* @__PURE__ */ e("label", {
1
+ import { defineComponent as N, ref as u, onMounted as B, openBlock as i, createElementBlock as f, withModifiers as I, createElementVNode as l, withDirectives as M, vModelText as R, createVNode as s, unref as n, withCtx as r, Fragment as V, renderList as q, createBlock as W, createTextVNode as c, toDisplayString as x } from "vue";
2
+ import v from "../HttpMethod/HttpMethod.vue.js";
3
+ import { useWorkspace as j } from "../../store/workspace.js";
4
+ import { ScalarDropdown as z, ScalarDropdownItem as T, ScalarButton as h, ScalarIcon as F } from "@scalar/components";
5
+ import { useRouter as L } from "vue-router";
6
+ const P = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, U = /* @__PURE__ */ l("label", {
6
7
  class: "absolute w-full h-full opacity-0 cursor-text",
7
8
  for: "examplename"
8
- }, null, -1), z = { class: "flex gap-2" }, R = { class: "flex flex-1 max-h-8" }, T = { class: "flex items-center gap-2" }, F = { class: "max-h-40 custom-scroll" }, H = /* @__PURE__ */ k({
9
+ }, null, -1), A = { class: "flex gap-2" }, G = { class: "flex flex-1 max-h-8" }, H = { class: "flex items-center gap-2" }, J = { class: "max-h-40 custom-scroll" }, ee = /* @__PURE__ */ N({
9
10
  __name: "CommandPaletteExample",
10
11
  props: {
11
- title: {}
12
+ metaData: {}
12
13
  },
13
14
  emits: ["close"],
14
- setup(L, { emit: b }) {
15
- const g = b, { workspaceRequests: p } = B(), d = i(""), r = i(p.value[0]);
16
- function f(l) {
17
- r.value = l;
18
- }
19
- const x = i(null);
20
- return y(() => {
21
- var l;
22
- (l = x.value) == null || l.focus();
23
- }), (l, o) => (m(), h(v, null, [
24
- e("h2", null, u(l.title), 1),
25
- e("form", {
26
- class: "flex w-full flex-col gap-3",
27
- onSubmit: o[2] || (o[2] = C((t) => g("close"), ["prevent"]))
28
- }, [
29
- e("div", M, [
30
- j,
31
- S(e("input", {
32
- id: "examplename",
33
- ref_key: "exampleInput",
34
- ref: x,
35
- "onUpdate:modelValue": o[0] || (o[0] = (t) => d.value = t),
36
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
37
- label: "Variant Name",
38
- placeholder: "Variant Name"
39
- }, null, 512), [
40
- [N, d.value]
41
- ])
42
- ]),
43
- e("div", z, [
44
- e("div", R, [
45
- a(s(E), {
46
- placement: "bottom",
47
- resize: ""
48
- }, {
49
- items: n(() => [
50
- e("div", F, [
51
- (m(!0), h(v, null, V(s(p), (t) => (m(), D(s(I), {
52
- key: t.uid,
53
- class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
54
- onClick: (P) => f(t)
55
- }, {
56
- default: n(() => [
57
- c(u(t.summary) + " ", 1),
58
- a(_, {
59
- method: t.method
60
- }, null, 8, ["method"])
61
- ]),
62
- _: 2
63
- }, 1032, ["onClick"]))), 128))
64
- ])
65
- ]),
66
- default: n(() => [
67
- a(s(w), {
68
- class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
69
- variant: "outlined",
70
- onClick: o[1] || (o[1] = (t) => f(r.value))
15
+ setup(_, { emit: b }) {
16
+ const w = _, k = b, { push: g } = L(), {
17
+ activeRequest: y,
18
+ activeWorkspace: C,
19
+ activeWorkspaceRequests: S,
20
+ requests: D,
21
+ requestExampleMutators: E
22
+ } = j(), m = u(""), a = u(
23
+ // Ensure we pre-select the correct request
24
+ D[w.metaData ?? ""] ?? y.value
25
+ ), p = (e) => a.value = e, d = u(null);
26
+ B(() => {
27
+ var e;
28
+ return (e = d.value) == null ? void 0 : e.focus();
29
+ });
30
+ const $ = () => {
31
+ const e = E.add(
32
+ a.value,
33
+ m.value
34
+ );
35
+ e && g(
36
+ `/workspace/${C.value.uid}/request/${a.value.uid}/examples/${e.uid}`
37
+ );
38
+ };
39
+ return (e, o) => (i(), f("form", {
40
+ class: "flex w-full flex-col gap-3",
41
+ onSubmit: o[2] || (o[2] = I((t) => k("close"), ["prevent"]))
42
+ }, [
43
+ l("div", P, [
44
+ U,
45
+ M(l("input", {
46
+ id: "examplename",
47
+ ref_key: "exampleInput",
48
+ ref: d,
49
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => m.value = t),
50
+ class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
51
+ label: "Example Name",
52
+ placeholder: "Example Name"
53
+ }, null, 512), [
54
+ [R, m.value]
55
+ ])
56
+ ]),
57
+ l("div", A, [
58
+ l("div", G, [
59
+ s(n(z), {
60
+ placement: "bottom",
61
+ resize: ""
62
+ }, {
63
+ items: r(() => [
64
+ l("div", J, [
65
+ (i(!0), f(V, null, q(n(S), (t) => (i(), W(n(T), {
66
+ key: t.uid,
67
+ class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
68
+ onClick: (K) => p(t)
71
69
  }, {
72
- default: n(() => [
73
- c(u(r.value.summary) + " ", 1),
74
- e("div", T, [
75
- a(_, {
76
- method: r.value.method
77
- }, null, 8, ["method"]),
78
- a(s($), {
79
- class: "text-c-3",
80
- icon: "ChevronDown",
81
- size: "xs"
82
- })
83
- ])
70
+ default: r(() => [
71
+ c(x(t.summary) + " ", 1),
72
+ s(v, {
73
+ method: t.method
74
+ }, null, 8, ["method"])
84
75
  ]),
85
- _: 1
86
- })
87
- ]),
88
- _: 1
89
- })
90
- ]),
91
- a(s(w), {
92
- class: "max-h-8 text-xs p-0 px-3",
93
- type: "submit"
94
- }, {
95
- default: n(() => [
96
- c(" Create Example ")
76
+ _: 2
77
+ }, 1032, ["onClick"]))), 128))
78
+ ])
79
+ ]),
80
+ default: r(() => [
81
+ s(n(h), {
82
+ class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
83
+ variant: "outlined",
84
+ onClick: o[1] || (o[1] = (t) => p(a.value))
85
+ }, {
86
+ default: r(() => [
87
+ c(x(a.value.summary) + " ", 1),
88
+ l("div", H, [
89
+ s(v, {
90
+ method: a.value.method
91
+ }, null, 8, ["method"]),
92
+ s(n(F), {
93
+ class: "text-c-3",
94
+ icon: "ChevronDown",
95
+ size: "xs"
96
+ })
97
+ ])
98
+ ]),
99
+ _: 1
100
+ })
97
101
  ]),
98
102
  _: 1
99
103
  })
100
- ])
101
- ], 32)
102
- ], 64));
104
+ ]),
105
+ s(n(h), {
106
+ class: "max-h-8 text-xs p-0 px-3",
107
+ type: "submit",
108
+ onClick: $
109
+ }, {
110
+ default: r(() => [
111
+ c(" Create Example ")
112
+ ]),
113
+ _: 1
114
+ })
115
+ ])
116
+ ], 32));
103
117
  }
104
118
  });
105
119
  export {
106
- H as default
120
+ ee as default
107
121
  };
@@ -1,20 +1,7 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- title: string;
3
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
2
  close: () => void;
5
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
- title: string;
7
- }>>> & {
3
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
8
4
  onClose?: (() => any) | undefined;
9
5
  }, {}, {}>;
10
6
  export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToOption<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
20
7
  //# sourceMappingURL=CommandPaletteFolder.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":";WA0GS,MAAM;;;;WAAN,MAAM;;;;AAgNf,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":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":";;;;;AA2SA,wBAMG"}
@@ -1,104 +1,98 @@
1
- import { defineComponent as g, ref as r, computed as m, onMounted as C, openBlock as S, createElementBlock as V, Fragment as y, createElementVNode as l, toDisplayString as p, withModifiers as N, withDirectives as F, vModelText as k, createVNode as n, unref as i, withCtx as d, normalizeClass as I, createTextVNode as M } from "vue";
2
- import { useWorkspace as B } from "../../store/workspace.js";
3
- import { ScalarListbox as D, ScalarButton as v, ScalarIcon as j } from "@scalar/components";
4
- const z = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, E = /* @__PURE__ */ l("label", {
1
+ import { defineComponent as w, ref as r, computed as m, onMounted as C, openBlock as g, createElementBlock as S, withModifiers as V, createElementVNode as a, withDirectives as y, vModelText as N, createVNode as n, unref as i, withCtx as d, normalizeClass as k, toDisplayString as F, createTextVNode as I } from "vue";
2
+ import { useWorkspace as M } from "../../store/workspace.js";
3
+ import { ScalarListbox as B, ScalarButton as p, ScalarIcon as D } from "@scalar/components";
4
+ const j = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, z = /* @__PURE__ */ a("label", {
5
5
  class: "absolute w-full h-full opacity-0 cursor-text",
6
6
  for: "foldername"
7
- }, null, -1), T = { class: "flex" }, U = { class: "flex flex-1 gap-2 max-h-8" }, q = /* @__PURE__ */ g({
7
+ }, null, -1), E = { class: "flex" }, T = { class: "flex flex-1 gap-2 max-h-8" }, W = /* @__PURE__ */ w({
8
8
  __name: "CommandPaletteFolder",
9
- props: {
10
- title: {}
11
- },
12
9
  emits: ["close"],
13
- setup(L, { emit: x }) {
14
- const b = x, { collections: h, folderMutators: _ } = B(), s = r(""), u = r(""), c = m(
15
- () => Object.values(h).map((e) => {
16
- var t, a;
10
+ setup(U, { emit: v }) {
11
+ const x = v, { collections: b, folderMutators: h } = M(), s = r(""), u = r(""), c = m(
12
+ () => Object.values(b).map((e) => {
13
+ var l, o;
17
14
  return {
18
15
  id: e.uid,
19
- label: ((a = (t = e.spec) == null ? void 0 : t.info) == null ? void 0 : a.title) ?? ""
16
+ label: ((o = (l = e.spec) == null ? void 0 : l.info) == null ? void 0 : o.title) ?? ""
20
17
  };
21
18
  })
22
- ), o = m({
19
+ ), t = m({
23
20
  get: () => c.value.find(
24
21
  ({ id: e }) => e === u.value
25
22
  ),
26
23
  set: (e) => {
27
24
  e != null && e.id && (u.value = e.id);
28
25
  }
29
- }), w = () => {
30
- s.value && o.value && (_.add(
26
+ }), _ = () => {
27
+ s.value && t.value && (h.add(
31
28
  {
32
29
  name: s.value
33
30
  },
34
31
  u.value
35
- ), b("close"));
32
+ ), x("close"));
36
33
  }, f = r(null);
37
34
  return C(() => {
38
35
  var e;
39
36
  (e = f.value) == null || e.focus();
40
- }), (e, t) => (S(), V(y, null, [
41
- l("h2", null, p(e.title), 1),
42
- l("form", {
43
- class: "flex w-full flex-col gap-3",
44
- onSubmit: N(w, ["prevent"])
45
- }, [
46
- l("div", z, [
47
- E,
48
- F(l("input", {
49
- id: "foldername",
50
- ref_key: "folderInput",
51
- ref: f,
52
- "onUpdate:modelValue": t[0] || (t[0] = (a) => s.value = a),
53
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
54
- label: "Folder Name",
55
- placeholder: "Folder Name"
56
- }, null, 512), [
57
- [k, s.value]
58
- ])
59
- ]),
60
- l("div", T, [
61
- l("div", U, [
62
- n(i(D), {
63
- modelValue: o.value,
64
- "onUpdate:modelValue": t[1] || (t[1] = (a) => o.value = a),
65
- options: c.value
66
- }, {
67
- default: d(() => [
68
- n(i(v), {
69
- class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
70
- variant: "outlined"
71
- }, {
72
- default: d(() => [
73
- l("span", {
74
- class: I(o.value ? "text-c-1" : "text-c-3")
75
- }, p(o.value ? o.value.label : "Select Collection"), 3),
76
- n(i(j), {
77
- class: "text-c-3",
78
- icon: "ChevronDown",
79
- size: "xs"
80
- })
81
- ]),
82
- _: 1
83
- })
84
- ]),
85
- _: 1
86
- }, 8, ["modelValue", "options"])
87
- ]),
88
- n(i(v), {
89
- class: "max-h-8 text-xs p-0 px-3",
90
- type: "submit"
37
+ }), (e, l) => (g(), S("form", {
38
+ class: "flex w-full flex-col gap-3",
39
+ onSubmit: V(_, ["prevent"])
40
+ }, [
41
+ a("div", j, [
42
+ z,
43
+ y(a("input", {
44
+ id: "foldername",
45
+ ref_key: "folderInput",
46
+ ref: f,
47
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => s.value = o),
48
+ class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
49
+ label: "Folder Name",
50
+ placeholder: "Folder Name"
51
+ }, null, 512), [
52
+ [N, s.value]
53
+ ])
54
+ ]),
55
+ a("div", E, [
56
+ a("div", T, [
57
+ n(i(B), {
58
+ modelValue: t.value,
59
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => t.value = o),
60
+ options: c.value
91
61
  }, {
92
62
  default: d(() => [
93
- M(" Create Folder ")
63
+ n(i(p), {
64
+ class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
65
+ variant: "outlined"
66
+ }, {
67
+ default: d(() => [
68
+ a("span", {
69
+ class: k(t.value ? "text-c-1" : "text-c-3")
70
+ }, F(t.value ? t.value.label : "Select Collection"), 3),
71
+ n(i(D), {
72
+ class: "text-c-3",
73
+ icon: "ChevronDown",
74
+ size: "xs"
75
+ })
76
+ ]),
77
+ _: 1
78
+ })
94
79
  ]),
95
80
  _: 1
96
- })
97
- ])
98
- ], 32)
99
- ], 64));
81
+ }, 8, ["modelValue", "options"])
82
+ ]),
83
+ n(i(p), {
84
+ class: "max-h-8 text-xs p-0 px-3",
85
+ type: "submit"
86
+ }, {
87
+ default: d(() => [
88
+ I(" Create Folder ")
89
+ ]),
90
+ _: 1
91
+ })
92
+ ])
93
+ ], 32));
100
94
  }
101
95
  });
102
96
  export {
103
- q as default
97
+ W as default
104
98
  };
@@ -1,20 +1,7 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- title: string;
3
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
2
  close: () => void;
5
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
- title: string;
7
- }>>> & {
3
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
8
4
  onClose?: (() => any) | undefined;
9
5
  }, {}, {}>;
10
6
  export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToOption<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
20
7
  //# sourceMappingURL=CommandPaletteImport.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";WA+FS,MAAM;;;;WAAN,MAAM;;;;AAgMf,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":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;AAgRA,wBAMG"}
@@ -1,86 +1,80 @@
1
- import { defineComponent as v, ref as m, onMounted as S, openBlock as y, createElementBlock as F, Fragment as C, createElementVNode as t, toDisplayString as k, withModifiers as I, createVNode as a, unref as o, withCtx as u, createTextVNode as d } from "vue";
2
- import { useWorkspace as N } from "../../store/workspace.js";
3
- import { ScalarButton as f, ScalarIcon as R } from "@scalar/components";
4
- import { useFileDialog as U } from "../../hooks/useFileDialog.js";
5
- const A = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, B = /* @__PURE__ */ t("label", {
1
+ import { defineComponent as S, ref as m, onMounted as y, openBlock as F, createElementBlock as k, withModifiers as C, createElementVNode as t, createVNode as a, unref as o, withCtx as u, createTextVNode as d } from "vue";
2
+ import { useWorkspace as I } from "../../store/workspace.js";
3
+ import { ScalarButton as f, ScalarIcon as N } from "@scalar/components";
4
+ import { useFileDialog as R } from "../../hooks/useFileDialog.js";
5
+ const U = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, A = /* @__PURE__ */ t("label", {
6
6
  class: "absolute w-full h-full opacity-0 cursor-text",
7
7
  for: "requestimport"
8
- }, null, -1), D = { class: "flex gap-2" }, L = { class: "flex flex-1 gap-2 max-h-8" }, T = /* @__PURE__ */ v({
8
+ }, null, -1), B = { class: "flex gap-2" }, L = { class: "flex flex-1 gap-2 max-h-8" }, E = /* @__PURE__ */ S({
9
9
  __name: "CommandPaletteImport",
10
- props: {
11
- title: {}
12
- },
13
10
  emits: ["close"],
14
- setup(M, { emit: h }) {
15
- const s = h, { importSpecFile: x, importSpecFromUrl: g } = N(), r = m(""), { open: _ } = U({
11
+ setup(M, { emit: x }) {
12
+ const s = x, { activeWorkspace: h, importSpecFile: _, importSpecFromUrl: g } = I(), r = m(""), { open: b } = R({
16
13
  onChange: async (e) => {
17
14
  const l = e == null ? void 0 : e[0];
18
15
  if (l) {
19
- const c = new FileReader();
20
- c.onload = async (b) => {
16
+ const i = new FileReader();
17
+ i.onload = async (v) => {
21
18
  var p;
22
- const w = (p = b.target) == null ? void 0 : p.result;
23
- x(w), n(), s("close");
24
- }, c.readAsText(l);
19
+ const w = (p = v.target) == null ? void 0 : p.result;
20
+ _(w, h.value.uid, !1), n(), s("close");
21
+ }, i.readAsText(l);
25
22
  }
26
23
  },
27
24
  multiple: !1,
28
25
  accept: ".json,.yaml,.yml"
29
26
  }), n = async () => {
30
27
  r.value && (await g(r.value), s("close"));
31
- }, i = m(null);
32
- return S(() => {
28
+ }, c = m(null);
29
+ return y(() => {
33
30
  var e;
34
- (e = i.value) == null || e.focus();
35
- }), (e, l) => (y(), F(C, null, [
36
- t("h2", null, k(e.title), 1),
37
- t("form", {
38
- class: "flex w-full flex-col gap-3",
39
- onSubmit: I(n, ["prevent"])
40
- }, [
41
- t("div", A, [
42
- B,
43
- t("input", {
44
- id: "requestimport",
45
- ref_key: "importInput",
46
- ref: i,
47
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
48
- label: "Paste Swagger File URL",
49
- placeholder: "Paste Swagger File URL"
50
- }, null, 512)
51
- ]),
52
- t("div", D, [
53
- t("div", L, [
54
- a(o(f), {
55
- class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
56
- variant: "outlined",
57
- onClick: o(_)
58
- }, {
59
- default: u(() => [
60
- d(" JSON, or YAML Files "),
61
- a(o(R), {
62
- class: "text-c-3 -rotate-90",
63
- icon: "ArrowRight",
64
- size: "sm"
65
- })
66
- ]),
67
- _: 1
68
- }, 8, ["onClick"])
69
- ]),
31
+ (e = c.value) == null || e.focus();
32
+ }), (e, l) => (F(), k("form", {
33
+ class: "flex w-full flex-col gap-3",
34
+ onSubmit: C(n, ["prevent"])
35
+ }, [
36
+ t("div", U, [
37
+ A,
38
+ t("input", {
39
+ id: "requestimport",
40
+ ref_key: "importInput",
41
+ ref: c,
42
+ class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
43
+ label: "Paste Swagger File URL",
44
+ placeholder: "Paste Swagger File URL"
45
+ }, null, 512)
46
+ ]),
47
+ t("div", B, [
48
+ t("div", L, [
70
49
  a(o(f), {
71
- class: "max-h-8 text-xs p-0 px-3",
72
- type: "submit"
50
+ class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
51
+ variant: "outlined",
52
+ onClick: o(b)
73
53
  }, {
74
54
  default: u(() => [
75
- d(" Import Collection ")
55
+ d(" JSON, or YAML Files "),
56
+ a(o(N), {
57
+ class: "text-c-3 -rotate-90",
58
+ icon: "ArrowRight",
59
+ size: "sm"
60
+ })
76
61
  ]),
77
62
  _: 1
78
- })
79
- ])
80
- ], 32)
81
- ], 64));
63
+ }, 8, ["onClick"])
64
+ ]),
65
+ a(o(f), {
66
+ class: "max-h-8 text-xs p-0 px-3",
67
+ type: "submit"
68
+ }, {
69
+ default: u(() => [
70
+ d(" Import Collection ")
71
+ ]),
72
+ _: 1
73
+ })
74
+ ])
75
+ ], 32));
82
76
  }
83
77
  });
84
78
  export {
85
- T as default
79
+ E as default
86
80
  };
@@ -1,20 +1,7 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- title: string;
3
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
2
  close: () => void;
5
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
- title: string;
7
- }>>> & {
3
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
8
4
  onClose?: (() => any) | undefined;
9
5
  }, {}, {}>;
10
6
  export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToOption<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
20
7
  //# sourceMappingURL=CommandPaletteRequest.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";WAwIS,MAAM;;;;WAAN,MAAM;;;;AA0Pf,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":";;;;;AAuYA,wBAMG"}