@scalar/api-client 2.0.22 → 2.0.25

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 (182) hide show
  1. package/CHANGELOG.md +48 -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 +80 -84
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
  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 +3 -2
  11. package/dist/components/CodeInput/CodeInput.vue2.js +42 -37
  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/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
  46. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  47. package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
  48. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  49. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  50. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  51. package/dist/components/DataTable/DataTableInput.vue2.js +36 -49
  52. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  53. package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
  54. package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
  55. package/dist/components/Search/SearchButton.vue.js +7 -6
  56. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  57. package/dist/components/SideNav/SideNav.vue.js +26 -23
  58. package/dist/components/SideNav/SideNavLink.vue.d.ts +3 -2
  59. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  60. package/dist/components/SideNav/SideNavLink.vue.js +18 -16
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +15 -2
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +14 -12
  64. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  65. package/dist/components/Sidebar/SidebarButton.vue.js +5 -5
  66. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
  68. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  69. package/dist/components/TopNav/TopNav.vue.js +1 -1
  70. package/dist/components/TopNav/TopNav.vue2.js +31 -29
  71. package/dist/components/TopNav/TopNavItem.vue.d.ts +7 -3
  72. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  73. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  74. package/dist/components/TopNav/TopNavItem.vue2.js +18 -18
  75. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  76. package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
  77. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  78. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -1
  79. package/dist/constants.d.ts +13 -7
  80. package/dist/constants.d.ts.map +1 -1
  81. package/dist/constants.js +4 -4
  82. package/dist/index.d.ts +2 -4
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +11 -16
  85. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -0
  86. package/dist/layouts/App/ApiClientApp.vue.js +72 -0
  87. package/dist/{App → layouts/App}/createApiClientApp.d.ts +1 -1
  88. package/dist/layouts/App/createApiClientApp.d.ts.map +1 -0
  89. package/dist/{App → layouts/App}/createApiClientApp.js +2 -2
  90. package/dist/layouts/App/index.d.ts.map +1 -0
  91. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.d.ts +1 -0
  92. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -0
  93. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.js +2 -2
  94. package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -0
  95. package/dist/{Modal → layouts/Modal}/api-client-modal.js +7 -7
  96. package/dist/layouts/Modal/index.d.ts.map +1 -0
  97. package/dist/libs/eventBusses/command-palette.d.ts +14 -0
  98. package/dist/libs/eventBusses/command-palette.d.ts.map +1 -0
  99. package/dist/libs/eventBusses/command-palette.js +5 -0
  100. package/dist/libs/local-storage.d.ts +1 -1
  101. package/dist/libs/local-storage.d.ts.map +1 -1
  102. package/dist/libs/local-storage.js +19 -19
  103. package/dist/router.d.ts +18 -6
  104. package/dist/router.d.ts.map +1 -1
  105. package/dist/router.js +107 -71
  106. package/dist/store/topNav.d.ts +94 -82
  107. package/dist/store/topNav.d.ts.map +1 -1
  108. package/dist/store/topNav.js +21 -20
  109. package/dist/store/workspace.d.ts +312 -82
  110. package/dist/store/workspace.d.ts.map +1 -1
  111. package/dist/store/workspace.js +299 -224
  112. package/dist/style.css +1 -1
  113. package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
  114. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +1 -1
  115. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  116. package/dist/views/Cookies/Cookies.vue2.js +9 -12
  117. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  118. package/dist/views/Environment/Environment.vue2.js +22 -25
  119. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  120. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -47
  121. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  122. package/dist/views/Request/Request.vue.js +1 -1
  123. package/dist/views/Request/Request.vue2.js +125 -108
  124. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  125. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
  128. package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -2
  129. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
  131. package/dist/views/Request/RequestSection/RequestTable.vue2.js +22 -21
  132. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +6 -5
  134. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  135. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  136. package/dist/views/Request/RequestSidebarItem.vue2.js +84 -79
  137. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSidebarItemMenu.vue.js +58 -38
  139. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  140. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -2
  141. package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
  142. package/dist/views/Request/components/OAuth2.vue.js +2 -0
  143. package/dist/{App.vue.d.ts → views/Request/components/WorkspaceDropdown.vue.d.ts} +1 -2
  144. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -0
  145. package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -0
  146. package/dist/views/Request/components/WorkspaceDropdown.vue2.js +4 -0
  147. package/dist/views/Request/components/index.d.ts +1 -0
  148. package/dist/views/Request/components/index.d.ts.map +1 -1
  149. package/dist/views/Request/components/index.js +4 -2
  150. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  151. package/dist/views/Servers/Servers.vue2.js +12 -15
  152. package/package.json +19 -15
  153. package/dist/App/ApiClientApp.vue.d.ts.map +0 -1
  154. package/dist/App/ApiClientApp.vue.js +0 -56
  155. package/dist/App/createApiClientApp.d.ts.map +0 -1
  156. package/dist/App/index.d.ts.map +0 -1
  157. package/dist/App.vue.d.ts.map +0 -1
  158. package/dist/App.vue.js +0 -77
  159. package/dist/App.vue3.js +0 -5
  160. package/dist/Modal/ApiClientModal.vue.d.ts.map +0 -1
  161. package/dist/Modal/api-client-modal.d.ts.map +0 -1
  162. package/dist/Modal/index.d.ts.map +0 -1
  163. package/dist/components/AddressBar/AddressBarServer.vue.js +0 -106
  164. package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
  165. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +0 -17
  166. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +0 -1
  167. package/dist/components/CommandPalette/CommandPalette.vue.js +0 -7
  168. package/dist/components/CommandPalette/CommandPalette.vue2.js +0 -184
  169. package/dist/main.d.ts +0 -2
  170. package/dist/main.d.ts.map +0 -1
  171. package/dist/views/Collection/Collection.vue.js +0 -4
  172. package/dist/views/Collection/Collection.vue2.js +0 -136
  173. package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
  174. package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
  175. /package/dist/{App → layouts/App}/ApiClientApp.vue.d.ts +0 -0
  176. /package/dist/{App → layouts/App}/ApiClientApp.vue3.js +0 -0
  177. /package/dist/{App → layouts/App}/index.d.ts +0 -0
  178. /package/dist/{App → layouts/App}/index.js +0 -0
  179. /package/dist/{Modal → layouts/Modal}/ApiClientModal.vue2.js +0 -0
  180. /package/dist/{Modal → layouts/Modal}/api-client-modal.d.ts +0 -0
  181. /package/dist/{Modal → layouts/Modal}/index.d.ts +0 -0
  182. /package/dist/{Modal → layouts/Modal}/index.js +0 -0
@@ -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"}
@@ -1,119 +1,126 @@
1
- import { defineComponent as y, ref as u, computed as v, onMounted as M, openBlock as V, createElementBlock as N, Fragment as R, createElementVNode as l, toDisplayString as h, withModifiers as I, withDirectives as k, vModelText as E, createVNode as s, unref as n, withCtx as c, normalizeClass as F, createTextVNode as U } from "vue";
2
- import B from "../HttpMethod/HttpMethod.vue.js";
3
- import { useWorkspace as D } from "../../store/workspace.js";
4
- import { ScalarListbox as T, ScalarButton as x, ScalarIcon as j } from "@scalar/components";
5
- import { useRouter as z } from "vue-router";
6
- const $ = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, G = /* @__PURE__ */ l("label", {
1
+ import { defineComponent as y, ref as n, computed as h, onMounted as V, openBlock as N, createElementBlock as R, withModifiers as I, createElementVNode as o, withDirectives as U, vModelText as E, createVNode as u, unref as r, withCtx as d, normalizeClass as B, toDisplayString as D, createTextVNode as F } from "vue";
2
+ import T from "../HttpMethod/HttpMethod.vue.js";
3
+ import { useWorkspace as W } from "../../store/workspace.js";
4
+ import { ScalarListbox as $, ScalarButton as x, ScalarIcon as z } from "@scalar/components";
5
+ import { useRouter as j } from "vue-router";
6
+ const G = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, L = /* @__PURE__ */ o("label", {
7
7
  class: "absolute w-full h-full opacity-0 cursor-text",
8
8
  for: "requestname"
9
- }, null, -1), L = { class: "flex" }, O = { class: "flex flex-1 gap-2 max-h-8" }, Q = /* @__PURE__ */ y({
9
+ }, null, -1), P = { class: "flex" }, A = { class: "flex flex-1 gap-2 max-h-8" }, Y = /* @__PURE__ */ y({
10
10
  __name: "CommandPaletteRequest",
11
- props: {
12
- title: {}
13
- },
14
11
  emits: ["close"],
15
- setup(P, { emit: b }) {
16
- const _ = b, { push: q } = z(), { requestMutators: g, activeCollection: r, folders: w } = D(), a = u(""), i = u("GET"), m = u(""), f = v(() => r.value ? Object.values(r.value.childUids).flatMap((e) => {
17
- const t = w[e];
18
- return t ? [
19
- {
20
- id: t.uid,
21
- label: t.name
22
- }
23
- ] : [];
24
- }) : []), o = v({
12
+ setup(H, { emit: b }) {
13
+ const _ = b, { push: q } = j(), {
14
+ activeCollection: c,
15
+ activeWorkspace: w,
16
+ activeWorkspaceCollections: g,
17
+ requestMutators: C,
18
+ folders: M
19
+ } = W(), s = n(""), i = n("GET"), m = n(""), f = h(
20
+ () => g.value.flatMap(
21
+ (e) => e.childUids.flatMap((l) => {
22
+ const t = M[l];
23
+ return t ? [
24
+ {
25
+ id: t.uid,
26
+ label: t.name
27
+ }
28
+ ] : [];
29
+ })
30
+ )
31
+ ), a = h({
25
32
  get: () => f.value.find(({ id: e }) => e === m.value),
26
33
  set: (e) => {
27
34
  e != null && e.id && (m.value = e.id);
28
35
  }
29
36
  });
30
- function C(e) {
37
+ function S(e) {
31
38
  i.value = e;
32
39
  }
33
- function S() {
34
- if (!r.value) return;
35
- const e = g.add({
36
- path: "",
37
- method: i.value.toUpperCase(),
38
- description: a.value,
39
- operationId: a.value,
40
- summary: a.value,
41
- tags: ["default"]
42
- });
43
- q(`/request/${e.uid}`), _("close");
44
- }
45
- const p = u(null);
46
- return M(() => {
40
+ const k = () => {
41
+ var t, v;
42
+ if (!c.value) return;
43
+ const e = ((t = a.value) == null ? void 0 : t.id) ?? ((v = c.value) == null ? void 0 : v.uid), l = C.add(
44
+ {
45
+ path: "",
46
+ method: i.value.toUpperCase(),
47
+ description: s.value,
48
+ operationId: s.value,
49
+ summary: s.value,
50
+ tags: ["default"]
51
+ },
52
+ e
53
+ );
54
+ q(`/workspace/${w.value.uid}/request/${l.uid}`), _("close");
55
+ }, p = n(null);
56
+ return V(() => {
47
57
  var e;
48
58
  (e = p.value) == null || e.focus();
49
- }), (e, t) => (V(), N(R, null, [
50
- l("h2", null, h(e.title), 1),
51
- l("form", {
52
- class: "flex w-full flex-col gap-3",
53
- onSubmit: I(S, ["prevent"])
54
- }, [
55
- l("div", $, [
56
- G,
57
- k(l("input", {
58
- id: "requestname",
59
- ref_key: "requestInput",
60
- ref: p,
61
- "onUpdate:modelValue": t[0] || (t[0] = (d) => a.value = d),
62
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
63
- label: "Request Name",
64
- placeholder: "Request Name"
65
- }, null, 512), [
66
- [E, a.value]
67
- ])
68
- ]),
69
- l("div", L, [
70
- l("div", O, [
71
- s(B, {
72
- isEditable: !0,
73
- isSquare: "",
74
- method: i.value,
75
- onChange: C
76
- }, null, 8, ["method"]),
77
- s(n(T), {
78
- modelValue: o.value,
79
- "onUpdate:modelValue": t[1] || (t[1] = (d) => o.value = d),
80
- options: f.value
81
- }, {
82
- default: c(() => [
83
- s(n(x), {
84
- class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
85
- variant: "outlined"
86
- }, {
87
- default: c(() => [
88
- l("span", {
89
- class: F(o.value ? "text-c-1" : "text-c-3")
90
- }, h(o.value ? o.value.label : "Select Folder"), 3),
91
- s(n(j), {
92
- class: "text-c-3",
93
- icon: "ChevronDown",
94
- size: "xs"
95
- })
96
- ]),
97
- _: 1
98
- })
99
- ]),
100
- _: 1
101
- }, 8, ["modelValue", "options"])
102
- ]),
103
- s(n(x), {
104
- class: "max-h-8 text-xs p-0 px-3",
105
- type: "submit"
59
+ }), (e, l) => (N(), R("form", {
60
+ class: "flex w-full flex-col gap-3",
61
+ onSubmit: I(k, ["prevent"])
62
+ }, [
63
+ o("div", G, [
64
+ L,
65
+ U(o("input", {
66
+ id: "requestname",
67
+ ref_key: "requestInput",
68
+ ref: p,
69
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => s.value = t),
70
+ class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
71
+ label: "Request Name",
72
+ placeholder: "Request Name"
73
+ }, null, 512), [
74
+ [E, s.value]
75
+ ])
76
+ ]),
77
+ o("div", P, [
78
+ o("div", A, [
79
+ u(T, {
80
+ isEditable: !0,
81
+ isSquare: "",
82
+ method: i.value,
83
+ onChange: S
84
+ }, null, 8, ["method"]),
85
+ u(r($), {
86
+ modelValue: a.value,
87
+ "onUpdate:modelValue": l[1] || (l[1] = (t) => a.value = t),
88
+ options: f.value
106
89
  }, {
107
- default: c(() => [
108
- U(" Create Request ")
90
+ default: d(() => [
91
+ u(r(x), {
92
+ class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
93
+ variant: "outlined"
94
+ }, {
95
+ default: d(() => [
96
+ o("span", {
97
+ class: B(a.value ? "text-c-1" : "text-c-3")
98
+ }, D(a.value ? a.value.label : "Select Folder"), 3),
99
+ u(r(z), {
100
+ class: "text-c-3",
101
+ icon: "ChevronDown",
102
+ size: "xs"
103
+ })
104
+ ]),
105
+ _: 1
106
+ })
109
107
  ]),
110
108
  _: 1
111
- })
112
- ])
113
- ], 32)
114
- ], 64));
109
+ }, 8, ["modelValue", "options"])
110
+ ]),
111
+ u(r(x), {
112
+ class: "max-h-8 text-xs p-0 px-3",
113
+ type: "submit"
114
+ }, {
115
+ default: d(() => [
116
+ F(" Create Request ")
117
+ ]),
118
+ _: 1
119
+ })
120
+ ])
121
+ ], 32));
115
122
  }
116
123
  });
117
124
  export {
118
- Q as default
125
+ Y as default
119
126
  };
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ close: () => void;
3
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
4
+ onClose?: (() => any) | undefined;
5
+ }, {}, {}>;
6
+ export default _default;
7
+ //# sourceMappingURL=CommandPaletteWorkspace.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;AAqLA,wBAMG"}