@scalar/api-client 2.2.37 → 2.2.39

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 (124) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue2.js +107 -116
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  7. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  8. package/dist/components/AddressBar/AddressBarHistory.vue2.js +95 -75
  9. package/dist/components/AddressBar/AddressBarServer.vue.d.ts +5 -1
  10. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  11. package/dist/components/AddressBar/AddressBarServer.vue.js +92 -86
  12. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +7 -10
  13. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  14. package/dist/components/AddressBar/AddressBarServerItem.vue.js +5 -52
  15. package/dist/components/AddressBar/AddressBarServerItem.vue2.js +75 -2
  16. package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -0
  17. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  18. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  19. package/dist/components/CodeInput/CodeInput.vue2.js +72 -64
  20. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -4
  21. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  22. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -0
  23. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  24. package/dist/components/DataTable/DataTableInputSelect.vue.js +83 -51
  25. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  26. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +22 -21
  27. package/dist/components/Server/ServerVariablesForm.vue.d.ts +14 -0
  28. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -0
  29. package/dist/components/Server/ServerVariablesForm.vue.js +47 -0
  30. package/dist/components/Server/ServerVariablesForm.vue2.js +4 -0
  31. package/dist/components/Server/ServerVariablesSelect.vue.d.ts +12 -0
  32. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -0
  33. package/dist/components/Server/ServerVariablesSelect.vue.js +54 -0
  34. package/dist/components/Server/ServerVariablesSelect.vue2.js +4 -0
  35. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +11 -0
  36. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -0
  37. package/dist/components/Server/ServerVariablesTextbox.vue.js +29 -0
  38. package/dist/components/Server/ServerVariablesTextbox.vue2.js +4 -0
  39. package/dist/components/Server/types.d.ts +9 -0
  40. package/dist/components/Server/types.d.ts.map +1 -0
  41. package/dist/components/SideNav/SideHelp.vue.js +16 -16
  42. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  43. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  44. package/dist/components/Sidebar/Sidebar.vue2.js +11 -10
  45. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  46. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  47. package/dist/components/Sidebar/SidebarListElement.vue2.js +10 -9
  48. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
  49. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  50. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +24 -24
  51. package/dist/layouts/App/create-api-client-app.d.ts +95 -26
  52. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  53. package/dist/layouts/Modal/create-api-client-modal.d.ts +190 -52
  54. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  55. package/dist/layouts/Modal/create-api-client-modal.js +20 -17
  56. package/dist/layouts/Web/create-api-client-web.d.ts +95 -26
  57. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  58. package/dist/libs/create-client.d.ts +106 -32
  59. package/dist/libs/create-client.d.ts.map +1 -1
  60. package/dist/libs/create-client.js +86 -81
  61. package/dist/libs/find-request.d.ts.map +1 -1
  62. package/dist/libs/importers/curl.js +4 -4
  63. package/dist/store/active-entities.d.ts +13 -4
  64. package/dist/store/active-entities.d.ts.map +1 -1
  65. package/dist/store/collections.d.ts.map +1 -1
  66. package/dist/store/import-spec.d.ts.map +1 -1
  67. package/dist/store/request-example.d.ts +52 -2
  68. package/dist/store/request-example.d.ts.map +1 -1
  69. package/dist/store/requests.d.ts +2 -2
  70. package/dist/store/requests.d.ts.map +1 -1
  71. package/dist/store/servers.d.ts +40 -20
  72. package/dist/store/servers.d.ts.map +1 -1
  73. package/dist/store/store.d.ts +95 -28
  74. package/dist/store/store.d.ts.map +1 -1
  75. package/dist/store/store.js +51 -53
  76. package/dist/style.css +1 -1
  77. package/dist/views/Cookies/Cookies.vue2.js +1 -1
  78. package/dist/views/Environment/Environment.vue2.js +1 -1
  79. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  80. package/dist/views/Request/Request.vue.js +2 -2
  81. package/dist/views/Request/Request.vue2.js +88 -89
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +85 -85
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
  88. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +16 -17
  89. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
  90. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +1 -1
  91. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  92. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +57 -74
  93. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  94. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  95. package/dist/views/Request/RequestSection/RequestSection.vue2.js +39 -38
  96. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
  97. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  98. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  99. package/dist/views/Request/RequestSection/RequestTable.vue2.js +8 -7
  100. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  102. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +5 -5
  103. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  105. package/dist/views/Request/RequestSidebar.vue2.js +143 -143
  106. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  107. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  108. package/dist/views/Request/RequestSidebarItem.vue2.js +71 -71
  109. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  110. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  111. package/dist/views/Request/RequestSubpageHeader.vue2.js +37 -37
  112. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  113. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  114. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -27
  115. package/dist/views/Request/handle-drag.d.ts +1 -1
  116. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  117. package/dist/views/Request/handle-drag.js +27 -26
  118. package/dist/views/Request/hooks/useOpenApiWatcher.js +1 -1
  119. package/dist/views/Request/libs/{live-sync.d.ts → watch-mode.d.ts} +1 -1
  120. package/dist/views/Request/libs/watch-mode.d.ts.map +1 -0
  121. package/dist/views/Request/libs/{live-sync.js → watch-mode.js} +6 -6
  122. package/dist/views/Servers/Servers.vue2.js +29 -29
  123. package/package.json +14 -14
  124. package/dist/views/Request/libs/live-sync.d.ts.map +0 -1
@@ -1,117 +1,123 @@
1
- import { defineComponent as U, computed as i, watch as V, openBlock as l, createBlock as p, unref as o, withCtx as m, createElementBlock as a, createCommentVNode as x, Fragment as d, renderList as b, createVNode as c, createElementVNode as n, createTextVNode as E, toDisplayString as O } from "vue";
2
- import { useActiveEntities as R } from "../../store/active-entities.js";
3
- import { ScalarDropdown as W, ScalarDropdownDivider as h, ScalarDropdownItem as I, ScalarIcon as L } from "@scalar/components";
4
- import g from "./AddressBarServerItem.vue.js";
5
- import { useWorkspace as T } from "../../store/store.js";
6
- const j = {
7
- class: "font-code lg:text-sm text-xs whitespace-nowrap border border-b-3 border-solid rounded px-1.5 py-0.5 text-c-2 -outline-offset-1",
8
- type: "button"
9
- }, z = {
10
- key: 0,
11
- class: "text-xxs text-c-2 px-2.5 py-1"
12
- }, F = { class: "flex items-center justify-center h-4 w-4" }, J = /* @__PURE__ */ U({
1
+ import { defineComponent as D, computed as n, watch as U, openBlock as s, createBlock as v, unref as l, withCtx as i, createElementVNode as a, createElementBlock as c, Fragment as m, renderList as b, createVNode as d, createCommentVNode as k, createTextVNode as V, toDisplayString as z } from "vue";
2
+ import { useActiveEntities as E } from "../../store/active-entities.js";
3
+ import { ScalarPopover as L, ScalarDropdownDivider as W, ScalarIcon as F, ScalarFloatingBackdrop as I, ScalarButton as O } from "@scalar/components";
4
+ import y from "./AddressBarServerItem.vue.js";
5
+ import { useWorkspace as P } from "../../store/store.js";
6
+ import { useLayout as T } from "../../hooks/useLayout.js";
7
+ const j = { class: "custom-scroll flex border-t p-1 flex-col gap-1 max-h-[inherit]" }, M = { class: "flex items-center justify-center h-4 w-4" }, X = /* @__PURE__ */ D({
13
8
  __name: "AddressBarServer",
14
- setup(M) {
15
- const { activeRequest: u, activeCollection: f, activeServer: v } = R(), { isReadOnly: A, servers: S, collectionMutators: C, events: D } = T(), y = i(
9
+ props: {
10
+ target: {}
11
+ },
12
+ setup(R) {
13
+ const { activeRequest: u, activeCollection: f, activeServer: p } = E(), { servers: x, collectionMutators: w, events: A } = P(), { layout: B } = T(), S = n(
16
14
  () => {
17
- var r, e;
18
- return (e = (r = u.value) == null ? void 0 : r.servers) == null ? void 0 : e.map((t) => {
19
- var s;
15
+ var t, e;
16
+ return (e = (t = u.value) == null ? void 0 : t.servers) == null ? void 0 : e.map((r) => {
17
+ var o;
20
18
  return {
21
- id: t,
22
- label: ((s = S[t]) == null ? void 0 : s.url) ?? "Unknown server"
19
+ id: r,
20
+ label: ((o = x[r]) == null ? void 0 : o.url) ?? "Unknown server"
23
21
  };
24
22
  });
25
23
  }
26
- ), w = i(
24
+ ), g = n(
27
25
  () => {
28
- var r, e;
26
+ var t, e;
29
27
  return (
30
28
  // Filters out servers already present in the request
31
- (e = (r = f.value) == null ? void 0 : r.servers) == null ? void 0 : e.filter(
32
- (t) => {
33
- var s, _;
34
- return !((_ = (s = u.value) == null ? void 0 : s.servers) != null && _.includes(t));
29
+ (e = (t = f.value) == null ? void 0 : t.servers) == null ? void 0 : e.filter(
30
+ (r) => {
31
+ var o, h;
32
+ return !((h = (o = u.value) == null ? void 0 : o.servers) != null && h.includes(r));
35
33
  }
36
- ).map((t) => {
37
- var s;
34
+ ).map((r) => {
35
+ var o;
38
36
  return {
39
- id: t,
40
- label: ((s = S[t]) == null ? void 0 : s.url) ?? "Unknown server"
37
+ id: r,
38
+ label: ((o = x[r]) == null ? void 0 : o.url) ?? "Unknown server"
41
39
  };
42
40
  })
43
41
  );
44
42
  }
45
- ), k = i(
43
+ ), C = n(
46
44
  () => {
47
- var r, e;
48
- return ((r = y.value) == null ? void 0 : r.length) && ((e = w.value) == null ? void 0 : e.length);
45
+ var t, e;
46
+ return ((t = S.value) == null ? void 0 : t.length) && ((e = g.value) == null ? void 0 : e.length);
49
47
  }
50
48
  );
51
- V([f, u], ([r, e]) => {
52
- var s;
53
- if (!r || r.selectedServerUid || e != null && e.selectedServerUid)
49
+ U([f, u], ([t, e]) => {
50
+ var o;
51
+ if (!t || t.selectedServerUid || e != null && e.selectedServerUid)
54
52
  return;
55
- const t = (s = r.servers) == null ? void 0 : s[0];
56
- t && C.edit(r.uid, "selectedServerUid", t);
53
+ const r = (o = t.servers) == null ? void 0 : o[0];
54
+ r && w.edit(t.uid, "selectedServerUid", r);
57
55
  });
58
- const N = () => D.commandPalette.emit({
56
+ const _ = () => A.commandPalette.emit({
59
57
  commandName: "Add Server"
60
- }), B = i(() => {
61
- var r, e, t;
62
- return (e = (r = v.value) == null ? void 0 : r.url) != null && e.endsWith("/") ? v.value.url.slice(0, -1) : ((t = v.value) == null ? void 0 : t.url) || "";
58
+ }), N = n(() => {
59
+ var t, e, r;
60
+ return (e = (t = p.value) == null ? void 0 : t.url) != null && e.endsWith("/") ? p.value.url.slice(0, -1) : ((r = p.value) == null ? void 0 : r.url) || "";
63
61
  });
64
- return (r, e) => (l(), p(o(W), {
65
- class: "w-max",
66
- teleport: ""
62
+ return (t, e) => (s(), v(l(L), {
63
+ class: "max-h-[inherit] p-0 text-sm",
64
+ offset: 0,
65
+ placement: "bottom-start",
66
+ resize: "",
67
+ target: t.target,
68
+ teleport: `#${t.target}`
67
69
  }, {
68
- items: m(() => [
69
- k.value ? (l(), a("div", z, " Request ")) : x("", !0),
70
- (l(!0), a(d, null, b(y.value, (t) => (l(), p(g, {
71
- key: t.id,
72
- serverOption: t,
73
- type: "request"
74
- }, null, 8, ["serverOption"]))), 128)),
75
- k.value ? (l(), a(d, { key: 1 }, [
76
- c(o(h)),
77
- e[1] || (e[1] = n("div", { class: "text-xxs text-c-2 px-2.5 py-1" }, "Collection", -1))
78
- ], 64)) : x("", !0),
79
- (l(!0), a(d, null, b(w.value, (t) => (l(), p(g, {
80
- key: t.id,
81
- serverOption: t,
82
- type: "collection"
83
- }, null, 8, ["serverOption"]))), 128)),
84
- o(A) ? x("", !0) : (l(), a(d, { key: 2 }, [
85
- c(o(h)),
86
- c(o(I), null, {
87
- default: m(() => [
88
- n("div", {
89
- class: "font-code text-xxs flex items-center gap-1.5",
90
- onClick: N
91
- }, [
92
- n("div", F, [
93
- c(o(L), {
94
- icon: "Add",
95
- size: "sm"
96
- })
97
- ]),
98
- e[2] || (e[2] = n("span", null, "Add Server", -1))
99
- ])
70
+ popover: i(() => [
71
+ a("div", j, [
72
+ (s(!0), c(m, null, b(S.value, (r) => (s(), v(y, {
73
+ key: r.id,
74
+ serverOption: r,
75
+ type: "request"
76
+ }, null, 8, ["serverOption"]))), 128)),
77
+ C.value ? (s(), c(m, { key: 0 }, [
78
+ d(l(W)),
79
+ e[1] || (e[1] = a("div", { class: "text-xxs text-c-2 px-2.5 py-1" }, "Collection", -1))
80
+ ], 64)) : k("", !0),
81
+ (s(!0), c(m, null, b(g.value, (r) => (s(), v(y, {
82
+ key: r.id,
83
+ serverOption: r,
84
+ type: "collection"
85
+ }, null, 8, ["serverOption"]))), 128)),
86
+ l(B) !== "modal" ? (s(), c("button", {
87
+ key: 1,
88
+ class: "rounded text-xxs flex items-center gap-1.5 p-1.75 hover:bg-b-2 cursor-pointer",
89
+ type: "button",
90
+ onClick: _
91
+ }, [
92
+ a("div", M, [
93
+ d(l(F), {
94
+ icon: "Add",
95
+ size: "sm"
96
+ })
100
97
  ]),
101
- _: 1
102
- })
103
- ], 64))
104
- ]),
105
- default: m(() => [
106
- n("button", j, [
107
- e[0] || (e[0] = n("span", { class: "sr-only" }, "Server:", -1)),
108
- E(" " + O(B.value), 1)
98
+ e[2] || (e[2] = a("span", null, "Add Server", -1))
99
+ ])) : k("", !0)
109
100
  ])
110
101
  ]),
102
+ backdrop: i(() => [
103
+ d(l(I), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
104
+ ]),
105
+ default: i(() => [
106
+ d(l(O), {
107
+ class: "font-code z-context-plus lg:text-sm text-xs whitespace-nowrap border ml-0.75 rounded px-1.5 h-6.5 text-c-2 hover:bg-b-2",
108
+ variant: "ghost"
109
+ }, {
110
+ default: i(() => [
111
+ e[0] || (e[0] = a("span", { class: "sr-only" }, "Server:", -1)),
112
+ V(" " + z(N.value), 1)
113
+ ]),
114
+ _: 1
115
+ })
116
+ ]),
111
117
  _: 1
112
- }));
118
+ }, 8, ["target", "teleport"]));
113
119
  }
114
120
  });
115
121
  export {
116
- J as default
122
+ X as default
117
123
  };
@@ -1,13 +1,10 @@
1
- export type ServerOption = {
2
- id: string;
3
- label: string;
1
+ type __VLS_Props = {
2
+ serverOption: {
3
+ id: string;
4
+ label: string;
5
+ };
6
+ type: 'collection' | 'request';
4
7
  };
5
- declare const _default: import("vue").DefineComponent<{
6
- serverOption: ServerOption;
7
- type: "collection" | "request";
8
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
9
- serverOption: ServerOption;
10
- type: "collection" | "request";
11
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
12
9
  export default _default;
13
10
  //# sourceMappingURL=AddressBarServerItem.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarServerItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServerItem.vue"],"names":[],"mappings":"AAyEA,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CACvD;;kBAIe,YAAY;UACpB,YAAY,GAAG,SAAS;;kBADhB,YAAY;UACpB,YAAY,GAAG,SAAS;;AAJhC,wBAyJK"}
1
+ {"version":3,"file":"AddressBarServerItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServerItem.vue"],"names":[],"mappings":"AAkHA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,IAAI,EAAE,YAAY,GAAG,SAAS,CAAA;CAC/B,CAAC;;AA4LF,wBAOG"}
@@ -1,54 +1,7 @@
1
- import { defineComponent as m, openBlock as f, createBlock as S, unref as l, withCtx as h, createElementVNode as n, normalizeClass as w, createVNode as k, toDisplayString as x } from "vue";
2
- import { useActiveEntities as g } from "../../store/active-entities.js";
3
- import { ScalarDropdownItem as y, ScalarIcon as C } from "@scalar/components";
4
- import { useWorkspace as O } from "../../store/store.js";
5
- const b = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, _ = /* @__PURE__ */ m({
6
- __name: "AddressBarServerItem",
7
- props: {
8
- serverOption: {},
9
- type: {}
10
- },
11
- setup(a) {
12
- const i = a, { activeCollection: o, activeRequest: r, activeServer: c } = g(), { collectionMutators: p, requestMutators: d } = O(), u = (e) => {
13
- var t, s;
14
- i.type === "collection" && o.value ? ((s = (t = r.value) == null ? void 0 : t.servers) != null && s.length && (r.value.selectedServerUid = ""), p.edit(
15
- o.value.uid,
16
- "selectedServerUid",
17
- e
18
- )) : i.type === "request" && r.value && d.edit(
19
- r.value.uid,
20
- "selectedServerUid",
21
- e
22
- );
23
- }, v = (e) => {
24
- var t;
25
- return ((t = c.value) == null ? void 0 : t.uid) === e;
26
- };
27
- return (e, t) => (f(), S(l(y), {
28
- key: "serverOption.id",
29
- class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
30
- value: e.serverOption.id,
31
- onClick: t[0] || (t[0] = (s) => u(e.serverOption.id))
32
- }, {
33
- default: h(() => [
34
- n("div", {
35
- class: w([
36
- "flex size-4 items-center justify-center p-0.75 text-b-1 rounded-full",
37
- v(e.serverOption.id) ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
38
- ])
39
- }, [
40
- k(l(C), {
41
- icon: "Checkmark",
42
- size: "xs",
43
- thickness: "2.5"
44
- })
45
- ], 2),
46
- n("span", b, x(e.serverOption.label), 1)
47
- ]),
48
- _: 1
49
- }, 8, ["value"]));
50
- }
51
- });
1
+ import r from "./AddressBarServerItem.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ o(r, [["__scopeId", "data-v-7b0b0967"]]);
52
5
  export {
53
- _ as default
6
+ s as default
54
7
  };
@@ -1,4 +1,77 @@
1
- import f from "./AddressBarServerItem.vue.js";
1
+ import { defineComponent as M, useId as O, computed as d, openBlock as c, createElementBlock as v, normalizeClass as h, createElementVNode as u, unref as i, withModifiers as V, createVNode as p, toDisplayString as E, createCommentVNode as _ } from "vue";
2
+ import q from "../Server/ServerVariablesForm.vue.js";
3
+ import { useActiveEntities as B } from "../../store/active-entities.js";
4
+ import { ScalarListboxCheckbox as I, ScalarMarkdown as N } from "@scalar/components";
5
+ import { useWorkspace as U } from "../../store/store.js";
6
+ const A = ["aria-controls", "aria-expanded"], $ = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, j = ["id"], z = { key: 0 }, D = { class: "description px-3 py-1.5 text-c-3" }, J = /* @__PURE__ */ M({
7
+ __name: "AddressBarServerItem",
8
+ props: {
9
+ serverOption: {},
10
+ type: {}
11
+ },
12
+ setup(x) {
13
+ const l = x, b = O(), { activeCollection: m, activeRequest: s, activeServer: t } = B(), { collectionMutators: S, requestMutators: y, serverMutators: g } = U(), k = (e) => {
14
+ var a, r;
15
+ l.type === "collection" && m.value ? ((r = (a = s.value) == null ? void 0 : a.servers) != null && r.length && (s.value.selectedServerUid = ""), S.edit(
16
+ m.value.uid,
17
+ "selectedServerUid",
18
+ e
19
+ )) : l.type === "request" && s.value && y.edit(
20
+ s.value.uid,
21
+ "selectedServerUid",
22
+ e
23
+ );
24
+ }, o = d(
25
+ () => {
26
+ var e;
27
+ return ((e = t.value) == null ? void 0 : e.uid) === l.serverOption.id;
28
+ }
29
+ ), C = d(
30
+ () => {
31
+ var e;
32
+ return ((e = t.value) == null ? void 0 : e.variables) && Object.keys(t.value.variables).length > 0;
33
+ }
34
+ ), n = d(() => o.value && C.value), w = (e, a) => {
35
+ if (!t.value) return;
36
+ const r = t.value.variables || {};
37
+ r[e] = { ...r[e], default: a }, g.edit(t.value.uid, "variables", r);
38
+ };
39
+ return (e, a) => {
40
+ var r, f;
41
+ return c(), v("div", {
42
+ class: h(["min-h-fit rounded flex flex-col border group/item", { "border-transparent": !o.value }])
43
+ }, [
44
+ u("button", {
45
+ "aria-controls": n.value ? i(b) : void 0,
46
+ "aria-expanded": n.value,
47
+ class: h(["cursor-pointer rounded flex items-center gap-1.5 min-h-8 px-1.5", o.value ? "text-c-1 bg-b-2" : "hover:bg-b-2"]),
48
+ type: "button",
49
+ onClick: a[0] || (a[0] = V((L) => k(e.serverOption.id), ["stop"]))
50
+ }, [
51
+ p(i(I), { selected: o.value }, null, 8, ["selected"]),
52
+ u("span", $, E(e.serverOption.label), 1)
53
+ ], 10, A),
54
+ n.value ? (c(), v("div", {
55
+ key: 0,
56
+ id: i(b),
57
+ class: "bg-b-2 border-t divide divide-y *:pl-4 rounded-b"
58
+ }, [
59
+ p(q, {
60
+ variables: (r = i(t)) == null ? void 0 : r.variables,
61
+ "onUpdate:variable": w
62
+ }, null, 8, ["variables"]),
63
+ (f = i(t)) != null && f.description ? (c(), v("div", z, [
64
+ u("div", D, [
65
+ p(i(N), {
66
+ value: i(t).description
67
+ }, null, 8, ["value"])
68
+ ])
69
+ ])) : _("", !0)
70
+ ], 8, j)) : _("", !0)
71
+ ], 2);
72
+ };
73
+ }
74
+ });
2
75
  export {
3
- f as default
76
+ J as default
4
77
  };
@@ -16,6 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
16
16
  disableEnter?: boolean;
17
17
  disableCloseBrackets?: boolean;
18
18
  enum?: string[];
19
+ examples?: string[];
19
20
  type?: string;
20
21
  nullable?: boolean;
21
22
  withVariables?: boolean;
@@ -45,6 +46,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
45
46
  disableEnter?: boolean;
46
47
  disableCloseBrackets?: boolean;
47
48
  enum?: string[];
49
+ examples?: string[];
48
50
  type?: string;
49
51
  nullable?: boolean;
50
52
  withVariables?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAqdO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAkBb,OAAO;eACV,OAAO;gBACN,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;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBArBX,OAAO;eACV,OAAO;gBACN,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;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;cApBd,OAAO;gBAGL,OAAO;iBAJN,OAAO;sBAOF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBAwaM,GAAG;kBACN,GAAG;;AAhc9B,wBA4fC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,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,OA+dO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAkBb,OAAO;eACV,OAAO;gBACN,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;eACJ,MAAM,EAAE;WACZ,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBAtBX,OAAO;eACV,OAAO;gBACN,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;eACJ,MAAM,EAAE;WACZ,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;cArBd,OAAO;gBAGL,OAAO;iBAJN,OAAO;sBAOF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAInB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBA0cM,GAAG;kBACN,GAAG;;AAne9B,wBA+hBC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,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-492fdbc8"]]);
5
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-63d3ce30"]]);
6
6
  export {
7
7
  _ as default
8
8
  };