@scalar/api-client 2.1.22 → 2.1.24

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 (86) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +22 -0
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  7. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
  8. package/dist/components/ContextBar.vue.js +2 -2
  9. package/dist/components/ContextBar.vue2.js +1 -1
  10. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableCell.vue.js +5 -5
  12. package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
  13. package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
  14. package/dist/components/DataTable/DataTableText.vue.js +13 -9
  15. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  16. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -9
  17. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  18. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
  19. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  20. package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
  21. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
  22. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
  23. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
  24. package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
  25. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
  26. package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
  27. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
  28. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  29. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  30. package/dist/components/SideNav/SideNav.vue.js +1 -1
  31. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  32. package/dist/components/SideNav/SideNavLink.vue.js +1 -1
  33. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  34. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  35. package/dist/components/Sidebar/Sidebar.vue2.js +4 -4
  36. package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
  37. package/dist/components/Sidebar/SidebarList.vue.js +3 -3
  38. package/dist/components/Sidebar/SidebarToggle.vue.js +1 -1
  39. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  40. package/dist/components/TopNav/TopNav.vue.js +3 -3
  41. package/dist/data/httpHeaders.d.ts +6 -0
  42. package/dist/data/httpHeaders.d.ts.map +1 -0
  43. package/dist/data/httpHeaders.js +537 -0
  44. package/dist/layouts/App/create-api-client-app.d.ts +8 -8
  45. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  46. package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
  47. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  48. package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
  49. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  50. package/dist/libs/create-client.d.ts +8 -8
  51. package/dist/libs/create-client.d.ts.map +1 -1
  52. package/dist/libs/importers/curl.d.ts +25 -1
  53. package/dist/libs/importers/curl.d.ts.map +1 -1
  54. package/dist/libs/importers/curl.js +40 -38
  55. package/dist/libs/parse-curl.d.ts +3 -4
  56. package/dist/libs/parse-curl.d.ts.map +1 -1
  57. package/dist/libs/parse-curl.js +58 -55
  58. package/dist/store/collections.d.ts.map +1 -1
  59. package/dist/store/import-spec.d.ts.map +1 -1
  60. package/dist/store/request-example.d.ts +4 -4
  61. package/dist/store/requests.d.ts +4 -4
  62. package/dist/store/store.d.ts +16 -16
  63. package/dist/store/store.d.ts.map +1 -1
  64. package/dist/store/tags.d.ts.map +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  67. package/dist/views/Cookies/Cookies.vue2.js +21 -21
  68. package/dist/views/Request/Request.vue.js +1 -1
  69. package/dist/views/Request/Request.vue2.js +1 -1
  70. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  71. package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -53
  72. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  74. package/dist/views/Request/RequestSidebar.vue2.js +61 -63
  75. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  76. package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
  77. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  79. package/dist/views/Request/RequestSubpageHeader.vue2.js +15 -13
  80. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  81. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  82. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +43 -22
  83. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  84. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +44 -51
  85. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
  86. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.24
4
+
5
+ ### Patch Changes
6
+
7
+ - 8f4b4a2: fix: ui tweaks and fixes
8
+
9
+ ## 2.1.23
10
+
11
+ ### Patch Changes
12
+
13
+ - 5cb5cdf: fix: removes duplicated utility class in request header
14
+ - 971c04c: feat(api-client): create custom workspace selector
15
+ - 75f84f8: fix: sidebar indent lines + icon stroke thickness
16
+ - 3800b54: fix: import curl query parameters
17
+ - 59d3931: chore: remove unused dependencies
18
+ - 2173073: feat: add links to http headers
19
+ - c379e5a: feat: adds api client web playground
20
+ - aebac4e: style: updates sidenav gap and sidehelp hover
21
+ - 4738228: feat: make collection.info.version optional
22
+ - Updated dependencies [971c04c]
23
+ - Updated dependencies [6394a5d]
24
+ - Updated dependencies [dbbe38f]
25
+ - Updated dependencies [4b8b611]
26
+ - Updated dependencies [4738228]
27
+ - @scalar/components@0.12.55
28
+ - @scalar/openapi-parser@0.8.7
29
+ - @scalar/types@0.0.16
30
+ - @scalar/themes@0.9.38
31
+ - @scalar/oas-utils@0.2.57
32
+ - @scalar/use-codemirror@0.11.22
33
+
3
34
  ## 2.1.22
4
35
 
5
36
  ### Patch Changes
package/README.md CHANGED
@@ -5,6 +5,20 @@
5
5
  [![License](https://img.shields.io/npm/l/%40scalar%2Fapi-client)](https://www.npmjs.com/package/@scalar/api-client)
6
6
  [![Discord](https://img.shields.io/discord/1135330207960678410?style=flat&color=5865F2)](https://discord.gg/scalar)
7
7
 
8
+ The Scalar API Client is a powerful tool designed to simplify API testing and integration. This versatile package offers multiple usage options:
9
+
10
+ - standalone application for quick and easy API testing
11
+ - embeddable component in various frontend environments
12
+ - customizable module that can be integrated into existing projects
13
+
14
+ ## Features
15
+
16
+ - Intuitive interface for sending API requests and viewing responses
17
+ - Support for multiple authentication methods
18
+ - Real-time request/response logging
19
+ - Customizable request headers and parameters
20
+ - Response visualization and formatting options
21
+
8
22
  ## Installation
9
23
 
10
24
  ```bash
@@ -146,3 +160,11 @@ Allows you to update the config at any time, this will clear your current state
146
160
  ```ts
147
161
  updateConfig(newConfig: ClientConfiguration, mergeConfigs?: boolean): void
148
162
  ```
163
+
164
+ ## Community
165
+
166
+ We are API nerds. You too? Let’s chat on Discord: <https://discord.gg/scalar>
167
+
168
+ ## License
169
+
170
+ The source code in this repository is licensed under [MIT](https://github.com/scalar/scalar/blob/main/LICENSE).
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAwWO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAcb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;;;;;;;;kBAlBN,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;;;;;;gBAfP,OAAO;iBAHN,OAAO;sBAMF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBAuUG,GAAG;kBACN,GAAG;;AA5V9B,wBAmZC;AAcD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA2WO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAcb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;;;;;;;;kBAlBN,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;;;;;;gBAfP,OAAO;iBAHN,OAAO;sBAMF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBAuUG,GAAG;kBACN,GAAG;;AA5V9B,wBAmZC;AAcD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5c35162a"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6d843399"]]);
6
6
  export {
7
- _ as default
7
+ a as default
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA8XA;;;;GAIG;;AACH,wBAybI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,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":"AA2XA;;;;GAIG;;AACH,wBAgfI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-60105bc4"]]);
5
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c50523ba"]]);
6
6
  export {
7
7
  s as PaletteComponents,
8
- a as default
8
+ r as default
9
9
  };
@@ -1,31 +1,32 @@
1
- import { defineComponent as q, ref as u, computed as K, watch as F, onMounted as U, onBeforeUnmount as G, openBlock as a, createElementBlock as r, Fragment as d, withDirectives as k, createElementVNode as m, vShow as y, unref as f, createVNode as g, withKeys as $, withModifiers as S, vModelText as Q, renderList as B, toDisplayString as M, normalizeClass as j, createTextVNode as J, createCommentVNode as O, createBlock as X, resolveDynamicComponent as Y, mergeProps as Z, nextTick as T } from "vue";
2
- import { useModal as ee, ScalarIcon as A } from "@scalar/components";
3
- import { useRouter as oe } from "vue-router";
4
- import te from "./CommandPaletteCollection.vue.js";
5
- import ne from "./CommandPaletteExample.vue.js";
6
- import ae from "./CommandPaletteImport.vue.js";
7
- import le from "./CommandPaletteRequest.vue.js";
8
- import se from "./CommandPaletteServer.vue.js";
9
- import re from "./CommandPaletteTag.vue.js";
10
- import me from "./CommandPaletteWorkspace.vue.js";
11
- import { useWorkspace as ce } from "../../store/store.js";
12
- const ie = { class: "commandmenu z-overlay custom-scroll" }, ue = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, de = { for: "commandmenu" }, fe = ["onKeydown"], pe = ["onClick"], ve = {
1
+ import { defineComponent as U, ref as i, computed as E, watch as G, onMounted as Q, onBeforeUnmount as j, openBlock as a, createBlock as K, unref as r, withCtx as _, createElementVNode as u, createVNode as f, createTextVNode as M, createElementBlock as m, Fragment as p, withDirectives as T, withKeys as g, withModifiers as D, vModelText as J, renderList as B, toDisplayString as V, vShow as O, normalizeClass as X, createCommentVNode as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as W } from "vue";
2
+ import { useModal as oe, ScalarIcon as $ } from "@scalar/components";
3
+ import { Dialog as te, DialogPanel as ne, DialogTitle as ae } from "@headlessui/vue";
4
+ import { useRouter as le } from "vue-router";
5
+ import se from "./CommandPaletteCollection.vue.js";
6
+ import re from "./CommandPaletteExample.vue.js";
7
+ import me from "./CommandPaletteImport.vue.js";
8
+ import ce from "./CommandPaletteRequest.vue.js";
9
+ import ie from "./CommandPaletteServer.vue.js";
10
+ import ue from "./CommandPaletteTag.vue.js";
11
+ import de from "./CommandPaletteWorkspace.vue.js";
12
+ import { useWorkspace as fe } from "../../store/store.js";
13
+ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, ve = { for: "commandmenu" }, Ce = ["onKeydown"], he = ["onClick"], ke = {
13
14
  key: 0,
14
15
  class: "text-c-3 text-center text-sm p-2 pt-3"
15
- }, Ce = {
16
+ }, xe = {
16
17
  name: "TheCommandPalette"
17
- }, he = {
18
- "Import Collection": ae,
19
- "Create Request": le,
20
- "Create Workspace": me,
21
- "Add Tag": re,
22
- "Add Server": se,
23
- "Create Collection": te,
24
- "Add Example": ne
25
- }, Re = /* @__PURE__ */ q({
26
- ...Ce,
27
- setup(ke) {
28
- const D = [
18
+ }, be = {
19
+ "Import Collection": me,
20
+ "Create Request": ce,
21
+ "Create Workspace": de,
22
+ "Add Tag": ue,
23
+ "Add Server": ie,
24
+ "Create Collection": se,
25
+ "Add Example": re
26
+ }, Ee = /* @__PURE__ */ U({
27
+ ...xe,
28
+ setup(ye) {
29
+ const A = [
29
30
  {
30
31
  label: "",
31
32
  commands: [
@@ -74,152 +75,160 @@ const ie = { class: "commandmenu z-overlay custom-scroll" }, ue = { class: "bg-b
74
75
  }
75
76
  ]
76
77
  }
77
- ], c = ee(), { push: V } = oe(), { activeWorkspace: W, events: p } = ce(), b = u(), l = u(""), s = u(null), i = u(-1), L = u([]), v = K(
78
- () => D.reduce((e, o) => {
79
- const t = o.commands.filter(
78
+ ], d = oe(), { push: N } = le(), { activeWorkspace: H, events: v } = fe(), x = i(), l = i(""), s = i(null), c = i(-1), S = i([]), C = E(
79
+ () => A.reduce((o, e) => {
80
+ const t = e.commands.filter(
80
81
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
81
82
  );
82
- return [...e, ...t];
83
+ return [...o, ...t];
83
84
  }, [])
84
- ), C = () => {
85
- c.hide(), l.value = "", s.value = null, i.value = -1;
86
- }, N = (e) => {
87
- l.value !== "" && (e == null || e.preventDefault()), s.value = null, T(() => {
88
- var o;
89
- return (o = x.value) == null ? void 0 : o.focus();
85
+ ), h = () => {
86
+ d.hide(), l.value = "", s.value = null, c.value = -1;
87
+ }, q = (o) => {
88
+ l.value !== "" && (o == null || o.preventDefault()), s.value = null, W(() => {
89
+ var e;
90
+ return (e = b.value) == null ? void 0 : e.focus();
90
91
  });
91
- }, R = (e) => {
92
- "path" in e ? (V(`/workspace/${W.value.uid}${e.path}`), C()) : s.value = e.name;
93
- }, x = u(), P = ({
94
- commandName: e,
95
- metaData: o
92
+ }, P = (o) => {
93
+ "path" in o ? (N(`/workspace/${H.value.uid}${o.path}`), h()) : s.value = o.name;
94
+ }, b = i(), L = ({
95
+ commandName: o,
96
+ metaData: e
96
97
  } = {}) => {
97
- s.value = e ?? null, b.value = o, c.show(), T(() => {
98
+ s.value = o ?? null, x.value = e, d.show(), W(() => {
98
99
  var t;
99
- return (t = x.value) == null ? void 0 : t.focus();
100
+ return (t = b.value) == null ? void 0 : t.focus();
100
101
  });
101
102
  };
102
- F(l, (e) => {
103
- e && v.value.length > 0 && (i.value = 0);
103
+ G(l, (o) => {
104
+ o && C.value.length > 0 && (c.value = 0);
104
105
  });
105
- const z = (e, o) => {
106
- var h;
107
- if (!c.open) return;
108
- o.preventDefault();
109
- const t = e === "up" ? -1 : 1, n = v.value.length;
110
- i.value = (i.value + t + n) % n, (h = L.value[i.value]) == null || h.scrollIntoView({
106
+ const R = (o, e) => {
107
+ var k;
108
+ if (!d.open) return;
109
+ e.preventDefault();
110
+ const t = o === "up" ? -1 : 1, n = C.value.length;
111
+ c.value = (c.value + t + n) % n, (k = S.value[c.value]) == null || k.scrollIntoView({
111
112
  behavior: "smooth",
112
113
  block: "nearest"
113
114
  });
114
- }, _ = K(
115
- () => v.value[i.value]
116
- ), H = (e) => {
117
- !_.value || s.value || (e.preventDefault(), e.stopPropagation(), R(_.value));
118
- }, E = (e) => {
119
- c.open && e != null && e.closeModal && C();
115
+ }, y = E(
116
+ () => C.value[c.value]
117
+ ), F = (o) => {
118
+ !y.value || s.value || (o.preventDefault(), o.stopPropagation(), P(y.value));
119
+ }, I = (o) => {
120
+ d.open && o != null && o.closeModal && h();
120
121
  };
121
- return U(() => {
122
- p.commandPalette.on(P), p.hotKeys.on(E);
123
- }), G(() => {
124
- p.commandPalette.off(P), p.hotKeys.off(E);
125
- }), (e, o) => (a(), r(d, null, [
126
- k(m("div", {
127
- class: "commandmenu-clickout z-overlay",
128
- onClick: o[0] || (o[0] = (t) => C())
129
- }, null, 512), [
130
- [y, f(c).open]
131
- ]),
132
- k(m("div", ie, [
133
- s.value ? (a(), r(d, { key: 1 }, [
134
- m("button", {
135
- class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
136
- type: "button",
137
- onClick: o[4] || (o[4] = (t) => s.value = null)
138
- }, [
139
- g(f(A), {
140
- icon: "ChevronLeft",
141
- size: "md",
142
- thickness: "1.5"
143
- })
144
- ]),
145
- (a(), X(Y(he[s.value]), Z(b.value ? { metaData: b.value } : {}, {
146
- onBack: o[5] || (o[5] = (t) => N(t)),
147
- onClose: C
148
- }), null, 16))
149
- ], 64)) : (a(), r(d, { key: 0 }, [
150
- m("div", ue, [
151
- m("label", de, [
152
- g(f(A), {
153
- class: "text-c-2 mr-2.5",
154
- icon: "Search",
155
- size: "md",
156
- thickness: "1.5"
157
- })
158
- ]),
159
- k(m("input", {
160
- id: "commandmenu",
161
- ref_key: "commandInputRef",
162
- ref: x,
163
- "onUpdate:modelValue": o[1] || (o[1] = (t) => l.value = t),
164
- autocomplete: "off",
165
- autofocus: "",
166
- class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
167
- placeholder: "Search commands...",
168
- type: "text",
169
- onKeydown: [
170
- o[2] || (o[2] = $(S((t) => z("down", t), ["stop"]), ["down"])),
171
- $(S(H, ["stop"]), ["enter"]),
172
- o[3] || (o[3] = $(S((t) => z("up", t), ["stop"]), ["up"]))
173
- ]
174
- }, null, 40, fe), [
175
- [Q, l.value]
176
- ])
177
- ]),
178
- (a(), r(d, null, B(D, (t) => (a(), r(d, {
179
- key: t.label
180
- }, [
181
- k(m("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, M(t.label), 513), [
182
- [
183
- y,
184
- t.commands.filter(
185
- (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
186
- ).length > 0
187
- ]
188
- ]),
189
- (a(!0), r(d, null, B(t.commands.filter(
190
- (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
191
- ), (n, h) => {
192
- var I;
193
- return a(), r("div", {
194
- key: n.name,
195
- ref_for: !0,
196
- ref: (w) => {
197
- w && (L.value[h] = w);
198
- },
199
- class: j(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
200
- "bg-b-2": n.name === ((I = _.value) == null ? void 0 : I.name)
201
- }]),
202
- onClick: (w) => R(n)
122
+ return Q(() => {
123
+ v.commandPalette.on(L), v.hotKeys.on(I);
124
+ }), j(() => {
125
+ v.commandPalette.off(L), v.hotKeys.off(I);
126
+ }), (o, e) => (a(), K(r(te), {
127
+ open: r(d).open,
128
+ onClose: e[5] || (e[5] = (t) => h())
129
+ }, {
130
+ default: _(() => [
131
+ e[7] || (e[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
132
+ f(r(ne), { class: "commandmenu z-overlay custom-scroll" }, {
133
+ default: _(() => [
134
+ f(r(ae), { class: "sr-only" }, {
135
+ default: _(() => e[6] || (e[6] = [
136
+ M("API Client Command Menu")
137
+ ])),
138
+ _: 1
139
+ }),
140
+ s.value ? (a(), m(p, { key: 1 }, [
141
+ u("button", {
142
+ class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
143
+ type: "button",
144
+ onClick: e[3] || (e[3] = (t) => s.value = null)
203
145
  }, [
204
- g(f(A), {
205
- class: "text-c-2 mr-2.5",
206
- icon: n.icon,
146
+ f(r($), {
147
+ icon: "ChevronLeft",
207
148
  size: "md",
208
149
  thickness: "1.5"
209
- }, null, 8, ["icon"]),
210
- J(" " + M(n.name), 1)
211
- ], 10, pe);
212
- }), 128))
213
- ], 64))), 64)),
214
- v.value.length ? O("", !0) : (a(), r("div", ve, " No commands found "))
215
- ], 64))
216
- ], 512), [
217
- [y, f(c).open]
218
- ])
219
- ], 64));
150
+ })
151
+ ]),
152
+ (a(), K(Z(be[s.value]), ee(x.value ? { metaData: x.value } : {}, {
153
+ onBack: e[4] || (e[4] = (t) => q(t)),
154
+ onClose: h
155
+ }), null, 16))
156
+ ], 64)) : (a(), m(p, { key: 0 }, [
157
+ u("div", pe, [
158
+ u("label", ve, [
159
+ f(r($), {
160
+ class: "text-c-2 mr-2.5",
161
+ icon: "Search",
162
+ size: "md",
163
+ thickness: "1.5"
164
+ })
165
+ ]),
166
+ T(u("input", {
167
+ id: "commandmenu",
168
+ ref_key: "commandInputRef",
169
+ ref: b,
170
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
171
+ autocomplete: "off",
172
+ autofocus: "",
173
+ class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
174
+ placeholder: "Search commands...",
175
+ type: "text",
176
+ onKeydown: [
177
+ e[1] || (e[1] = g(D((t) => R("down", t), ["stop"]), ["down"])),
178
+ g(D(F, ["stop"]), ["enter"]),
179
+ e[2] || (e[2] = g(D((t) => R("up", t), ["stop"]), ["up"]))
180
+ ]
181
+ }, null, 40, Ce), [
182
+ [J, l.value]
183
+ ])
184
+ ]),
185
+ (a(), m(p, null, B(A, (t) => (a(), m(p, {
186
+ key: t.label
187
+ }, [
188
+ T(u("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, V(t.label), 513), [
189
+ [
190
+ O,
191
+ t.commands.filter(
192
+ (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
193
+ ).length > 0
194
+ ]
195
+ ]),
196
+ (a(!0), m(p, null, B(t.commands.filter(
197
+ (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
198
+ ), (n, k) => {
199
+ var z;
200
+ return a(), m("div", {
201
+ key: n.name,
202
+ ref_for: !0,
203
+ ref: (w) => {
204
+ w && (S.value[k] = w);
205
+ },
206
+ class: X(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
207
+ "bg-b-2": n.name === ((z = y.value) == null ? void 0 : z.name)
208
+ }]),
209
+ onClick: (w) => P(n)
210
+ }, [
211
+ f(r($), {
212
+ class: "text-c-2 mr-2.5",
213
+ icon: n.icon,
214
+ size: "md",
215
+ thickness: "1.5"
216
+ }, null, 8, ["icon"]),
217
+ M(" " + V(n.name), 1)
218
+ ], 10, he);
219
+ }), 128))
220
+ ], 64))), 64)),
221
+ C.value.length ? Y("", !0) : (a(), m("div", ke, " No commands found "))
222
+ ], 64))
223
+ ]),
224
+ _: 1
225
+ })
226
+ ]),
227
+ _: 1
228
+ }, 8, ["open"]));
220
229
  }
221
230
  });
222
231
  export {
223
- he as PaletteComponents,
224
- Re as default
232
+ be as PaletteComponents,
233
+ Ee as default
225
234
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ContextBar.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10366d6c"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1bc6f599"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, openBlock as n, createElementBlock as o, createElementVNode as i, Fragment as c, renderList as a, normalizeClass as l, toDisplayString as s, createVNode as d, unref as p } from "vue";
2
2
  import { ScalarIcon as u } from "@scalar/components";
3
- const m = { class: "hidden lg:flex ml-auto filter-hover group lg:w-[120px]" }, v = { class: "request-section-content request-section-content-filter fade-request-section-content text-c-3 hidden xl:flex justify-end rounded text-xs gap-[1.5px] pointer-events-auto relative w-full py-2" }, f = ["isActive", "onClick"], h = { class: "flex items-center group-hover:text-c-1 absolute -right-6 top-1/2 -translate-y-1/2" }, _ = { class: "mr-4 group-hover:hidden" }, b = /* @__PURE__ */ r({
3
+ const m = { class: "hidden lg:flex ml-auto filter-hover group lg:w-[120px]" }, v = { class: "request-section-content request-section-content-filter fade-request-section-content text-c-3 hidden xl:flex justify-end rounded text-xs gap-[1.5px] pointer-events-auto relative w-full py-2" }, f = ["isActive", "onClick"], h = { class: "flex items-center group-hover:text-c-1 absolute -right-6 top-1/2 -translate-y-1/2" }, _ = { class: "mr-1.5 group-hover:hidden" }, b = /* @__PURE__ */ r({
4
4
  __name: "ContextBar",
5
5
  props: {
6
6
  sections: {},
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAkBpC,iBAAS,cAAc;qBAsCM,GAAG;EAe/B;AACD,QAAA,MAAM,eAAe;SAnEZ,MAAM,GAAG,SAAS;;SAAlB,MAAM,GAAG,SAAS;;QAAlB,MAAM,GAAG,SAAS;6EA0EzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAkBpC,iBAAS,cAAc;qBAuCM,GAAG;EAe/B;AACD,QAAA,MAAM,eAAe;SApEZ,MAAM,GAAG,SAAS;;SAAlB,MAAM,GAAG,SAAS;;QAAlB,MAAM,GAAG,SAAS;6EA2EzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,12 @@
1
- import { defineComponent as r, openBlock as t, createBlock as o, resolveDynamicComponent as l, withCtx as a, renderSlot as n } from "vue";
2
- const m = /* @__PURE__ */ r({
1
+ import { defineComponent as r, openBlock as o, createBlock as t, resolveDynamicComponent as l, withCtx as a, renderSlot as n } from "vue";
2
+ const i = /* @__PURE__ */ r({
3
3
  __name: "DataTableCell",
4
4
  props: {
5
5
  is: { default: "td" }
6
6
  },
7
7
  setup(s) {
8
- return (e, d) => (t(), o(l(e.is), {
9
- class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative",
8
+ return (e, d) => (o(), t(l(e.is), {
9
+ class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative overflow-hidden",
10
10
  role: "cell"
11
11
  }, {
12
12
  default: a(() => [
@@ -17,5 +17,5 @@ const m = /* @__PURE__ */ r({
17
17
  }
18
18
  });
19
19
  export {
20
- m as default
20
+ i as default
21
21
  };
@@ -1,7 +1,16 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- text: string | number;
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import("vue").DefineComponent<{
5
+ text?: string | number;
3
6
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
4
- text: string | number;
7
+ text?: string | number;
5
8
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
6
10
  export default _default;
11
+ type __VLS_WithTemplateSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
7
16
  //# sourceMappingURL=DataTableText.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableText.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableText.vue"],"names":[],"mappings":";UAqBQ,MAAM,GAAG,MAAM;;UAAf,MAAM,GAAG,MAAM;;AAwDvB,wBAMG"}
1
+ {"version":3,"file":"DataTableText.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableText.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;qBAmCM,GAAG;EAe/B;AACD,QAAA,MAAM,eAAe;WA5DZ,MAAM,GAAG,MAAM;;WAAf,MAAM,GAAG,MAAM;iGAkEtB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,19 +1,23 @@
1
- import { defineComponent as t, openBlock as a, createBlock as o, withCtx as p, createElementVNode as r, toDisplayString as s } from "vue";
2
- import n from "./DataTableCell.vue.js";
3
- const c = { class: "flex-1 px-2 py-1.5 whitespace-nowrap" }, m = /* @__PURE__ */ t({
1
+ import { defineComponent as t, openBlock as a, createBlock as o, withCtx as r, createElementVNode as s, renderSlot as n, createTextVNode as p, toDisplayString as l } from "vue";
2
+ import c from "./DataTableCell.vue.js";
3
+ const i = { class: "flex-1 px-2 py-1.5 whitespace-nowrap" }, x = /* @__PURE__ */ t({
4
4
  __name: "DataTableText",
5
5
  props: {
6
6
  text: {}
7
7
  },
8
- setup(l) {
9
- return (e, _) => (a(), o(n, { class: "relative flex" }, {
10
- default: p(() => [
11
- r("span", c, s(e.text), 1)
8
+ setup(_) {
9
+ return (e, f) => (a(), o(c, { class: "relative flex" }, {
10
+ default: r(() => [
11
+ s("span", i, [
12
+ n(e.$slots, "default", {}, () => [
13
+ p(l(e.text), 1)
14
+ ])
15
+ ])
12
16
  ]),
13
- _: 1
17
+ _: 3
14
18
  }));
15
19
  }
16
20
  });
17
21
  export {
18
- m as default
22
+ x as default
19
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAkdA,wBAKG"}
1
+ {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAmdA,wBAKG"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as y, computed as S, openBlock as l, createElementBlock as f, createVNode as n, unref as e, withCtx as r, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as s, normalizeClass as w, createTextVNode as d, toDisplayString as x, createCommentVNode as j } from "vue";
1
+ import { defineComponent as y, computed as S, openBlock as l, createElementBlock as f, createVNode as n, unref as e, withCtx as r, Fragment as N, renderList as D, createBlock as v, withModifiers as x, createElementVNode as s, normalizeClass as h, createTextVNode as d, toDisplayString as w, createCommentVNode as j } from "vue";
2
2
  import { ScalarDropdown as z, ScalarDropdownItem as u, ScalarIcon as c, ScalarDropdownDivider as B, ScalarButton as I } from "@scalar/components";
3
3
  import { useRouter as V } from "vue-router";
4
4
  import { useWorkspace as M } from "../../store/store.js";
5
- const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace-nowrap" }, $ = { class: "flex items-center justify-center h-4 w-4" }, A = /* @__PURE__ */ y({
5
+ const W = { class: "font-medium m-0 text-xs flex gap-1.5 items-center whitespace-nowrap" }, $ = { class: "flex items-center justify-center h-4 w-4" }, A = /* @__PURE__ */ y({
6
6
  __name: "EnvironmentSelector",
7
7
  setup(O) {
8
8
  const {
@@ -24,11 +24,11 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace
24
24
  (l(!0), f(N, null, D(_.value, (t) => (l(), v(e(u), {
25
25
  key: t.uid,
26
26
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
27
- onClick: h((R) => p(t.uid), ["stop"])
27
+ onClick: x((R) => p(t.uid), ["stop"])
28
28
  }, {
29
29
  default: r(() => [
30
30
  s("div", {
31
- class: w([
31
+ class: h([
32
32
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
33
33
  e(i).activeEnvironmentId === t.uid ? "bg-blue text-b-1" : "text-transparent"
34
34
  ])
@@ -39,17 +39,17 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace
39
39
  thickness: "3.5"
40
40
  })
41
41
  ], 2),
42
- d(" " + x(t.name), 1)
42
+ d(" " + w(t.name), 1)
43
43
  ]),
44
44
  _: 2
45
45
  }, 1032, ["onClick"]))), 128)),
46
46
  n(e(u), {
47
47
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
48
- onClick: o[0] || (o[0] = h((t) => p(""), ["stop"]))
48
+ onClick: o[0] || (o[0] = x((t) => p(""), ["stop"]))
49
49
  }, {
50
50
  default: r(() => [
51
51
  s("div", {
52
- class: w([
52
+ class: h([
53
53
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
54
54
  e(i).activeEnvironmentId === "" ? "bg-blue text-b-1" : "text-transparent"
55
55
  ])
@@ -84,7 +84,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace
84
84
  ]),
85
85
  default: r(() => [
86
86
  n(e(I), {
87
- class: "font-normal h-auto justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 text-c-2 w-fit",
87
+ class: "font-normal h-auto justify-start py-1.5 px-1.5 pl-2 text-c-1 hover:bg-b-2 text-c-3 w-fit",
88
88
  fullWidth: "",
89
89
  variant: "ghost"
90
90
  }, {
@@ -92,7 +92,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace
92
92
  var t;
93
93
  return [
94
94
  s("h2", W, [
95
- d(x(((t = e(g)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
95
+ d(w(((t = e(g)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
96
96
  n(e(c), {
97
97
  class: "size-3",
98
98
  icon: "ChevronDown",