@scalar/api-client 2.26.1 → 2.27.1

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 (158) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/components/Server/ServerSelector.vue.js +6 -6
  3. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -1
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +48 -43
  8. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  9. package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -10
  10. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
  12. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  13. package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
  14. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
  15. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
  16. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
  17. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
  18. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  19. package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -1
  20. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +1 -1
  21. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  22. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  23. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +101 -100
  24. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  25. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  26. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
  27. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +6 -6
  28. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +36 -2
  29. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  31. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +38 -3
  32. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  34. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
  35. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  37. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +68 -69
  38. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  40. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
  41. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  42. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +35 -41
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +107 -87
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
  50. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
  51. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
  52. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  53. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
  57. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
  58. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
  59. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
  60. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
  61. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
  62. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
  63. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
  64. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
  65. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
  66. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  67. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
  68. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  69. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
  70. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  71. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
  72. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  73. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  74. package/dist/v2/components/modals/ModalClientContainer.vue2.js +45 -42
  75. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  76. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  77. package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
  78. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
  79. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  80. package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
  81. package/dist/v2/features/app/App.vue.d.ts +6 -1
  82. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  83. package/dist/v2/features/app/App.vue.js +48 -46
  84. package/dist/v2/features/app/app-events.d.ts +1 -1
  85. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  86. package/dist/v2/features/app/app-events.js +95 -56
  87. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  88. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  89. package/dist/v2/features/app/components/AppSidebar.vue2.js +111 -105
  90. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +12 -2
  91. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  92. package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
  93. package/dist/v2/features/app/helpers/routes.d.ts +3 -1
  94. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  95. package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
  96. package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
  97. package/dist/v2/features/app/hooks/use-theme.js +34 -0
  98. package/dist/v2/features/app/index.d.ts +0 -1
  99. package/dist/v2/features/app/index.d.ts.map +1 -1
  100. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  101. package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
  102. package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
  103. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  104. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  105. package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
  106. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  107. package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
  108. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  109. package/dist/v2/features/collection/components/Environment.vue.js +27 -15
  110. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  111. package/dist/v2/features/collection/components/Overview.vue.js +2 -2
  112. package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
  113. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  114. package/dist/v2/features/collection/components/Servers.vue.js +93 -88
  115. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  116. package/dist/v2/features/collection/components/Settings.vue.js +19 -17
  117. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  118. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  119. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
  120. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
  121. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  122. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  123. package/dist/v2/features/modal/Modal.vue.js +15 -15
  124. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
  125. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  126. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  127. package/dist/v2/features/operation/Operation.vue.js +31 -34
  128. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
  129. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  130. package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
  131. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
  132. package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
  133. package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
  134. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
  135. package/dist/v2/features/settings/components/Section.vue.js +26 -15
  136. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
  137. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
  138. package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
  139. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  140. package/dist/v2/helpers/handle-hotkeys.js +2 -2
  141. package/dist/v2/helpers/index.d.ts +0 -1
  142. package/dist/v2/helpers/index.d.ts.map +1 -1
  143. package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
  144. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
  145. package/dist/v2/hooks/use-global-hot-keys.js +8 -6
  146. package/dist/v2/workspace-events.d.ts.map +1 -1
  147. package/dist/v2/workspace-events.js +10 -0
  148. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  150. package/dist/views/Request/RequestSidebar.vue2.js +139 -155
  151. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItem.vue2.js +104 -101
  154. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  155. package/package.json +20 -18
  156. package/dist/v2/helpers/plugins.d.ts +0 -65
  157. package/dist/v2/helpers/plugins.d.ts.map +0 -1
  158. package/dist/v2/helpers/plugins.js +0 -11
@@ -1,43 +1,37 @@
1
- import { defineComponent as z, computed as v, createElementBlock as m, openBlock as n, createCommentVNode as d, createVNode as s, unref as e, withCtx as c, normalizeClass as f, createElementVNode as t, toDisplayString as p, createBlock as x, withModifiers as g, Fragment as D, renderList as A } from "vue";
2
- import { ScalarDropdown as j, ScalarButton as B, ScalarIcon as u, ScalarDropdownItem as h, ScalarDropdownDivider as y } from "@scalar/components";
3
- const I = { class: "relative flex items-center" }, V = {
4
- key: 0,
5
- "aria-hidden": "true",
6
- class: "bg-c-accent absolute -top-0.5 -left-0.5 size-2 rounded-full",
7
- title: "Environment active"
8
- }, $ = { class: "flex items-center gap-1.5" }, L = { class: "text-xxs line-clamp-1 max-w-[120px] text-left font-medium" }, N = { class: "overflow-hidden text-ellipsis" }, F = { class: "flex h-4 w-4 items-center justify-center" }, G = {
1
+ import { defineComponent as _, computed as u, createElementBlock as x, openBlock as s, createVNode as n, unref as e, withCtx as c, normalizeClass as m, createElementVNode as t, toDisplayString as p, createBlock as v, createCommentVNode as f, withModifiers as g, Fragment as D, renderList as A } from "vue";
2
+ import { ScalarDropdown as j, ScalarButton as B, ScalarIcon as d, ScalarDropdownItem as h, ScalarDropdownDivider as y } from "@scalar/components";
3
+ const I = { class: "relative flex items-center" }, V = { class: "flex items-center gap-1.5" }, $ = { class: "text-xxs line-clamp-1 max-w-[120px] text-left font-medium" }, L = { class: "overflow-hidden text-ellipsis" }, N = { class: "flex h-4 w-4 items-center justify-center" }, F = {
9
4
  key: 3,
10
5
  class: "text-c-3 px-2 py-1.5 text-xs"
11
- }, T = /* @__PURE__ */ z({
6
+ }, R = /* @__PURE__ */ _({
12
7
  __name: "EnvironmentSelector",
13
8
  props: {
14
9
  environments: { default: () => [] },
15
10
  activeEnvironment: {}
16
11
  },
17
12
  emits: ["select:environment", "add:environment"],
18
- setup(a, { emit: C }) {
19
- const b = C, r = v(() => !!a.activeEnvironment), l = v(() => a.environments.length > 0), k = v(() => r.value ? a.activeEnvironment : l.value ? "Select Environment" : "Add Environment"), S = v(() => r.value ? "bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30" : l.value ? "hover:bg-b-2 text-c-2 border-transparent" : "hover:bg-b-2 text-c-3 border-transparent"), _ = () => {
13
+ setup(r, { emit: C }) {
14
+ const b = C, a = u(() => !!r.activeEnvironment), l = u(() => r.environments.length > 0), k = u(() => a.value ? r.activeEnvironment : l.value ? "Select Environment" : "Add Environment"), S = u(() => a.value ? "bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30" : l.value ? "hover:bg-b-2 text-c-2 border-transparent" : "hover:bg-b-2 text-c-3 border-transparent"), z = () => {
20
15
  b("add:environment");
21
16
  }, w = (E) => {
22
17
  b("select:environment", E);
23
18
  };
24
- return (E, i) => (n(), m("div", I, [
25
- r.value ? (n(), m("div", V)) : d("", !0),
26
- s(e(j), null, {
19
+ return (E, i) => (s(), x("div", I, [
20
+ n(e(j), null, {
27
21
  items: c(() => [
28
- r.value ? (n(), x(e(h), {
22
+ a.value ? (s(), v(e(h), {
29
23
  key: 0,
30
24
  class: "group/item flex w-full items-center gap-1.5",
31
25
  onClick: i[0] || (i[0] = g((o) => w(""), ["stop"]))
32
26
  }, {
33
27
  default: c(() => [
34
28
  t("div", {
35
- class: f([
29
+ class: m([
36
30
  "flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
37
- a.activeEnvironment ? "shadow-border text-transparent" : "bg-c-accent text-b-1"
31
+ r.activeEnvironment ? "shadow-border text-transparent" : "bg-c-accent text-b-1"
38
32
  ])
39
33
  }, [
40
- s(e(u), {
34
+ n(e(d), {
41
35
  class: "size-2.5",
42
36
  icon: "Checkmark",
43
37
  thickness: "3"
@@ -46,38 +40,38 @@ const I = { class: "relative flex items-center" }, V = {
46
40
  i[1] || (i[1] = t("span", { class: "text-c-2" }, "No Environment", -1))
47
41
  ]),
48
42
  _: 1
49
- })) : d("", !0),
50
- r.value && l.value ? (n(), x(e(y), { key: 1 })) : d("", !0),
51
- (n(!0), m(D, null, A(a.environments, (o) => (n(), x(e(h), {
43
+ })) : f("", !0),
44
+ a.value && l.value ? (s(), v(e(y), { key: 1 })) : f("", !0),
45
+ (s(!0), x(D, null, A(r.environments, (o) => (s(), v(e(h), {
52
46
  key: o,
53
47
  class: "group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
54
- onClick: g((M) => w(o), ["stop"])
48
+ onClick: g((G) => w(o), ["stop"])
55
49
  }, {
56
50
  default: c(() => [
57
51
  t("div", {
58
- class: f([
52
+ class: m([
59
53
  "flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
60
- a.activeEnvironment === o ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
54
+ r.activeEnvironment === o ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
61
55
  ])
62
56
  }, [
63
- s(e(u), {
57
+ n(e(d), {
64
58
  class: "size-2.5",
65
59
  icon: "Checkmark",
66
60
  thickness: "3"
67
61
  })
68
62
  ], 2),
69
- t("span", N, p(o), 1)
63
+ t("span", L, p(o), 1)
70
64
  ]),
71
65
  _: 2
72
66
  }, 1032, ["onClick"]))), 128)),
73
- l.value ? (n(), x(e(y), { key: 2 })) : d("", !0),
74
- s(e(h), {
67
+ l.value ? (s(), v(e(y), { key: 2 })) : f("", !0),
68
+ n(e(h), {
75
69
  class: "text-c-accent flex items-center gap-1.5",
76
- onClick: _
70
+ onClick: z
77
71
  }, {
78
72
  default: c(() => [
79
- t("div", F, [
80
- s(e(u), {
73
+ t("div", N, [
74
+ n(e(d), {
81
75
  icon: "Add",
82
76
  size: "sm"
83
77
  })
@@ -86,26 +80,26 @@ const I = { class: "relative flex items-center" }, V = {
86
80
  ]),
87
81
  _: 1
88
82
  }),
89
- !l.value && !r.value ? (n(), m("div", G, [...i[2] || (i[2] = [
83
+ !l.value && !a.value ? (s(), x("div", F, [...i[2] || (i[2] = [
90
84
  t("p", { class: "mb-1" }, " Environments let you manage variables like API keys and base URLs across different contexts. ", -1)
91
- ])])) : d("", !0)
85
+ ])])) : f("", !0)
92
86
  ]),
93
87
  default: c(() => [
94
- s(e(B), {
88
+ n(e(B), {
95
89
  "aria-label": `Current environment: ${k.value}`,
96
- class: f(["line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors", S.value]),
90
+ class: m(["line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors", S.value]),
97
91
  size: "sm",
98
92
  variant: "ghost"
99
93
  }, {
100
94
  default: c(() => [
101
- t("div", $, [
102
- s(e(u), {
103
- class: f(["shrink-0", r.value ? "text-c-accent" : "text-c-3"]),
95
+ t("div", V, [
96
+ n(e(d), {
97
+ class: m(["shrink-0", a.value ? "text-c-accent" : "text-c-3"]),
104
98
  icon: "Globe",
105
99
  size: "sm"
106
100
  }, null, 8, ["class"]),
107
- t("span", L, p(k.value), 1),
108
- s(e(u), {
101
+ t("span", $, p(k.value), 1),
102
+ n(e(d), {
109
103
  class: "shrink-0",
110
104
  icon: "ChevronDown",
111
105
  size: "xs"
@@ -121,5 +115,5 @@ const I = { class: "relative flex items-center" }, V = {
121
115
  }
122
116
  });
123
117
  export {
124
- T as default
118
+ R as default
125
119
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAoTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAC1G,OAAO,EAIL,KAAK,oBAAoB,EAC1B,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AE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA0eF,QAAA,MAAM,YAAY;;cA3cqB,IAAI;cAAQ,MAAM;;;;oPA8cvD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as U, useId as $, ref as p, computed as S, createBlock as x, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as b, createElementBlock as v, Fragment as g, createElementVNode as u, createTextVNode as k, toDisplayString as y, withModifiers as q, normalizeClass as M } from "vue";
1
+ import { defineComponent as U, useId as $, ref as y, computed as S, createBlock as p, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as x, createElementBlock as v, Fragment as b, createElementVNode as u, createTextVNode as g, toDisplayString as f, withModifiers as q, normalizeClass as M } from "vue";
2
2
  import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
3
3
  import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
4
4
  import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
@@ -22,8 +22,8 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
22
22
  server: {},
23
23
  title: {}
24
24
  },
25
- setup(e, { expose: I }) {
26
- const C = $(), B = p(null), O = p(!1), d = N(), o = p(null), h = S(() => {
25
+ setup(e, { expose: D }) {
26
+ const k = $(), C = y(null), B = y(!1), d = N(), o = y(null), h = S(() => {
27
27
  if (!e.securityRequirements?.length)
28
28
  return null;
29
29
  const l = J(e.securityRequirements);
@@ -31,7 +31,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
31
31
  icon: l ? "Unlock" : "Lock",
32
32
  text: l ? "Optional" : "Required"
33
33
  };
34
- }), R = S(
34
+ }), O = S(
35
35
  () => K(
36
36
  e.securityRequirements ?? [],
37
37
  e.securitySchemes ?? {},
@@ -46,18 +46,14 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
46
46
  if (a.length > 1)
47
47
  return Q(t);
48
48
  const n = a[0];
49
- if (!n)
50
- return [];
51
- const f = F(e.securitySchemes?.[n]);
52
- return f ? W({
49
+ return n ? F(e.securitySchemes?.[n]) ? W({
53
50
  name: n,
54
- type: f.type,
55
51
  value: t
56
- }) : [];
52
+ }) : [] : [];
57
53
  }) : [];
58
- }), w = (l) => {
59
- O.value && l.stopPropagation(), B.value?.$el.click();
60
- }, A = (l) => {
54
+ }), I = (l) => {
55
+ B.value && l.stopPropagation(), C.value?.$el.click();
56
+ }, w = (l) => {
61
57
  const t = l.filter((n) => n.payload === void 0).map((n) => G(n.value, { depth: 2 })), a = l.filter((n) => n.payload !== void 0).map((n) => ({
62
58
  name: n.label,
63
59
  scheme: n.payload
@@ -67,35 +63,35 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
67
63
  newSchemes: a,
68
64
  meta: e.meta
69
65
  });
70
- }, D = (l) => {
66
+ }, R = (l) => {
71
67
  o.value = { label: l.label, payload: l.value }, d.show();
72
- }, V = () => {
68
+ }, A = () => {
73
69
  o.value && (e.eventBus.emit("auth:delete:security-scheme", {
74
70
  names: Object.keys(o.value.payload)
75
71
  }), o.value = null, d.hide());
76
72
  };
77
- return I({
73
+ return D({
78
74
  authIndicator: h,
79
75
  selectedSchemeOptions: i,
80
- schemeOptions: R
81
- }), (l, t) => (c(), x(s(Y), {
76
+ schemeOptions: O
77
+ }), (l, t) => (c(), p(s(Y), {
82
78
  class: "group/params relative",
83
79
  isStatic: e.isStatic,
84
80
  itemCount: i.value.length,
85
- "onUpdate:modelValue": t[1] || (t[1] = (a) => O.value = a)
81
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => B.value = a)
86
82
  }, {
87
83
  title: r(() => [
88
84
  u("div", {
89
- id: s(C),
85
+ id: s(k),
90
86
  class: "inline-flex items-center gap-0.5 leading-[20px]"
91
87
  }, [
92
- u("span", null, y(e.title), 1),
88
+ u("span", null, f(e.title), 1),
93
89
  h.value ? (c(), v("span", {
94
90
  key: 0,
95
91
  class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -my-0.5 -mr-1 cursor-pointer rounded px-1 py-0.5 leading-[normal] font-normal", { "text-c-1": h.value.text === "Required" }]),
96
92
  "data-testid": "auth-indicator",
97
- onClick: w
98
- }, y(h.value.text), 3)) : b("", !0)
93
+ onClick: I
94
+ }, f(h.value.text), 3)) : x("", !0)
99
95
  ], 8, Z)
100
96
  ]),
101
97
  actions: r(() => [
@@ -103,45 +99,45 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
103
99
  class: "w-72 text-xs",
104
100
  modelValue: i.value,
105
101
  multiple: "",
106
- options: R.value,
102
+ options: O.value,
107
103
  placement: "bottom-end",
108
104
  teleport: "",
109
- onDelete: D,
110
- "onUpdate:modelValue": A
105
+ onDelete: R,
106
+ "onUpdate:modelValue": w
111
107
  }, {
112
108
  option: r(({ option: a, selected: n }) => [
113
109
  m(s(z), {
114
110
  multiselect: "",
115
111
  selected: n
116
112
  }, null, 8, ["selected"]),
117
- u("div", _, y(a.label), 1),
118
- a.isDeletable ? (c(), x(s(E), {
113
+ u("div", _, f(a.label), 1),
114
+ a.isDeletable ? (c(), p(s(E), {
119
115
  key: 0,
120
116
  class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
121
117
  icon: s(P),
122
118
  label: `Delete ${a.label}`,
123
119
  size: "xs",
124
- onClick: q((f) => D(a), ["stop"])
125
- }, null, 8, ["icon", "label", "onClick"])) : b("", !0)
120
+ onClick: q((V) => R(a), ["stop"])
121
+ }, null, 8, ["icon", "label", "onClick"])) : x("", !0)
126
122
  ]),
127
123
  default: r(() => [
128
124
  m(s(j), {
129
125
  ref_key: "comboboxButtonRef",
130
- ref: B,
131
- "aria-describedby": s(C),
126
+ ref: C,
127
+ "aria-describedby": s(k),
132
128
  class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal",
133
129
  variant: "ghost"
134
130
  }, {
135
131
  default: r(() => [
136
- i.value.length === 1 ? (c(), v(g, { key: 0 }, [
132
+ i.value.length === 1 ? (c(), v(b, { key: 0 }, [
137
133
  t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
138
- k(" " + y(i.value[0]?.label), 1)
139
- ], 64)) : i.value.length > 1 ? (c(), v(g, { key: 1 }, [
140
- t[3] || (t[3] = k(" Multiple ", -1)),
134
+ g(" " + f(i.value[0]?.label), 1)
135
+ ], 64)) : i.value.length > 1 ? (c(), v(b, { key: 1 }, [
136
+ t[3] || (t[3] = g(" Multiple ", -1)),
141
137
  t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
142
- ], 64)) : (c(), v(g, { key: 2 }, [
138
+ ], 64)) : (c(), v(b, { key: 2 }, [
143
139
  t[5] || (t[5] = u("span", { class: "sr-only" }, "Select", -1)),
144
- t[6] || (t[6] = k(" Auth Type ", -1))
140
+ t[6] || (t[6] = g(" Auth Type ", -1))
145
141
  ], 64)),
146
142
  m(s(L), {
147
143
  class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
@@ -166,14 +162,14 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
166
162
  selectedSchemeOptions: i.value,
167
163
  server: e.server
168
164
  }, null, 8, ["activeAuthIndex", "environment", "eventBus", "isStatic", "meta", "proxyUrl", "securitySchemes", "selectedSchemeOptions", "server"]),
169
- o.value ? (c(), x(H, {
165
+ o.value ? (c(), p(H, {
170
166
  key: 0,
171
167
  label: o.value.label,
172
168
  scheme: o.value,
173
169
  state: s(d),
174
170
  onClose: t[0] || (t[0] = (a) => s(d).hide()),
175
- onDelete: V
176
- }, null, 8, ["label", "scheme", "state"])) : b("", !0)
171
+ onDelete: A
172
+ }, null, 8, ["label", "scheme", "state"])) : x("", !0)
177
173
  ]),
178
174
  _: 1
179
175
  }, 8, ["isStatic", "itemCount"]));
@@ -1,17 +1,18 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
2
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
3
3
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
- import type { OAuthFlowsObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
4
+ import type { OAuthFlowsObjectSecret, SecuritySchemeObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
5
5
  type __VLS_Props = {
6
6
  /** Current environment configuration */
7
7
  environment: XScalarEnvironment;
8
8
  /** OAuth flows */
9
9
  flows: OAuthFlowsObjectSecret;
10
- /** Current environment configuration */
11
10
  /** Type of the OAuth flow */
12
11
  type: keyof OAuthFlowsObjectSecret;
13
12
  /** Selected scopes */
14
13
  selectedScopes: string[];
14
+ /** Security scheme */
15
+ scheme: SecuritySchemeObjectSecret;
15
16
  /** Current server configuration */
16
17
  server: ServerObject | null;
17
18
  /** Proxy URL */
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AAkWA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,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