@scalar/api-client 2.26.2 → 2.29.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 (164) hide show
  1. package/CHANGELOG.md +218 -0
  2. package/dist/components/Server/ServerSelector.vue.js +6 -6
  3. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
  4. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  5. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  6. package/dist/libs/local-storage.js +3 -3
  7. package/dist/style.css +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  9. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
  10. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
  12. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
  13. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
  14. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
  15. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  16. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
  17. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  18. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  19. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
  20. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
  21. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  22. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
  23. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
  25. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  26. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
  27. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  28. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
  29. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  31. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +52 -54
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
  44. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  45. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
  46. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
  47. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
  58. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  59. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
  60. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  61. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  62. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  63. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  64. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  65. package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
  66. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
  67. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  68. package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
  69. package/dist/v2/features/app/App.vue.d.ts +5 -0
  70. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  71. package/dist/v2/features/app/App.vue.js +80 -78
  72. package/dist/v2/features/app/app-events.d.ts +2 -1
  73. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  74. package/dist/v2/features/app/app-events.js +89 -64
  75. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  76. package/dist/v2/features/app/app-state.js +172 -151
  77. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  78. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  79. package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
  80. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  81. package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
  82. package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
  83. package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
  84. package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
  85. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
  86. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
  87. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
  88. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  89. package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
  90. package/dist/v2/features/app/helpers/routes.d.ts +2 -0
  91. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  92. package/dist/v2/features/app/helpers/routes.js +11 -11
  93. package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
  94. package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
  95. package/dist/v2/features/app/hooks/use-theme.js +34 -0
  96. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  97. package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
  98. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
  99. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  100. package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
  101. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  102. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  103. package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
  104. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  105. package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
  106. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  107. package/dist/v2/features/collection/components/Environment.vue.js +27 -15
  108. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
  109. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
  110. package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
  111. package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
  112. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  113. package/dist/v2/features/collection/components/Overview.vue.js +2 -2
  114. package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
  115. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  116. package/dist/v2/features/collection/components/Servers.vue.js +93 -88
  117. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  118. package/dist/v2/features/collection/components/Settings.vue.js +19 -17
  119. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
  120. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  121. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
  122. package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
  123. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
  124. package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
  125. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
  126. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
  127. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  128. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
  129. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
  130. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  131. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
  132. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
  133. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  134. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
  135. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  136. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  137. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
  138. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
  139. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  140. package/dist/v2/features/modal/Modal.vue.js +15 -15
  141. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  142. package/dist/v2/features/operation/Operation.vue.js +30 -33
  143. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
  144. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  145. package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
  146. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
  147. package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
  148. package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
  149. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
  150. package/dist/v2/features/settings/components/Section.vue.js +26 -15
  151. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
  152. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
  153. package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
  154. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  155. package/dist/v2/helpers/handle-hotkeys.js +2 -2
  156. package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
  157. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
  158. package/dist/v2/hooks/use-global-hot-keys.js +8 -6
  159. package/dist/v2/workspace-events.d.ts.map +1 -1
  160. package/dist/v2/workspace-events.js +132 -115
  161. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  162. package/package.json +17 -16
  163. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
  164. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
@@ -1,27 +1,41 @@
1
- import { defineComponent as M, createElementBlock as y, openBlock as c, createVNode as n, withCtx as s, createElementVNode as o, unref as r, normalizeClass as a, createTextVNode as l, createBlock as f, createCommentVNode as p, Fragment as C, renderList as w, toDisplayString as U, normalizeStyle as g } from "vue";
2
- import { cva as $, ScalarButton as m, cx as x, ScalarIcon as b } from "@scalar/components";
3
- import { themeLabels as T } from "@scalar/themes";
4
- import B from "../../../components/ImportCollection/IntegrationLogo.vue.js";
5
- import L from "./components/Appearance.vue.js";
6
- import k from "./components/Section.vue.js";
7
- import { getThemeColors as h } from "./helpers/get-theme-colors.js";
8
- const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }, V = { class: "flex flex-col gap-2" }, A = { class: "grid grid-cols-2 gap-2" }, E = { class: "flex items-center gap-2" }, F = { class: "flex items-center gap-1" }, O = { class: "grid grid-cols-2 gap-2" }, D = { class: "flex items-center gap-2" }, W = { class: "flex items-center gap-1" }, q = { class: "size-7 rounded-xl" }, v = "https://proxy.scalar.com", I = /* @__PURE__ */ M({
1
+ import { defineComponent as L, computed as $, createElementBlock as h, openBlock as n, createVNode as d, createBlock as c, createCommentVNode as g, withCtx as o, createElementVNode as r, unref as s, normalizeClass as u, createTextVNode as a, Fragment as S, renderList as C, toDisplayString as w, normalizeStyle as U } from "vue";
2
+ import { cva as O, ScalarButton as y, cx as f, ScalarIcon as x } from "@scalar/components";
3
+ import { presets as F, themeLabels as V } from "@scalar/themes";
4
+ import H from "../../../components/ImportCollection/IntegrationLogo.vue.js";
5
+ import G from "./components/Appearance.vue.js";
6
+ import p from "./components/Section.vue.js";
7
+ import { getThemeColors as N } from "./helpers/get-theme-colors.js";
8
+ const W = { class: "flex flex-col gap-10" }, q = { class: "flex flex-col gap-2" }, I = { class: "grid grid-cols-2 gap-2" }, X = { class: "flex items-center gap-2" }, Y = { class: "flex items-center gap-1" }, J = { class: "grid grid-cols-2 gap-2" }, K = { class: "flex items-center gap-2" }, Q = { class: "flex items-center gap-1" }, Z = { class: "size-7 rounded-xl" }, _ = { class: "grid grid-cols-2 gap-2" }, ee = { class: "flex items-center gap-2" }, T = "https://proxy.scalar.com", ne = /* @__PURE__ */ L({
9
9
  __name: "CollectionSettings",
10
10
  props: {
11
11
  activeProxyUrl: {},
12
- activeThemeId: {},
12
+ customThemes: { default: () => [] },
13
+ activeThemeSlug: {},
13
14
  colorMode: {}
14
15
  },
15
- emits: ["update:proxyUrl", "update:themeId", "update:colorMode"],
16
- setup(i, { emit: S }) {
17
- const d = S, P = [
16
+ emits: ["update:proxyUrl", "update:themeSlug", "update:colorMode"],
17
+ setup(l, { emit: A }) {
18
+ const m = A, B = [
19
+ "none",
18
20
  "default",
19
21
  "alternate",
20
22
  "purple",
21
23
  "solarized",
22
24
  "saturn",
23
25
  "kepler"
24
- ], z = ["elysiajs", "fastify"], u = $({
26
+ ], R = ["elysiajs", "fastify"], z = B.map((i) => i === "none" ? {
27
+ slug: i,
28
+ name: "None",
29
+ description: "No theme",
30
+ theme: ""
31
+ } : F[i]), M = R.map((i) => ({
32
+ slug: i,
33
+ name: V[i],
34
+ description: V[i],
35
+ theme: ""
36
+ })), j = $(
37
+ () => new Set(l.customThemes.map((i) => i.slug))
38
+ ), v = O({
25
39
  base: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",
26
40
  variants: {
27
41
  active: {
@@ -29,75 +43,73 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
29
43
  false: "bg-b-1 hover:bg-b-2"
30
44
  }
31
45
  }
32
- });
33
- return (G, e) => (c(), y("div", N, [
34
- n(k, null, {
35
- title: s(() => [...e[3] || (e[3] = [
36
- l(" CORS Proxy ", -1)
46
+ }), D = $(() => l.activeThemeSlug === void 0 || l.activeThemeSlug === "none" ? !0 : !(j.value.has(l.activeThemeSlug) || z.some((e) => e.slug === l.activeThemeSlug) || M.some((e) => e.slug === l.activeThemeSlug))), P = (i) => i === "none", b = (i) => l.activeThemeSlug === i || P(i) && D.value, k = (i) => f(
47
+ "flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
48
+ i && "bg-c-accent text-b-1 border-transparent"
49
+ );
50
+ return (i, e) => (n(), h("div", W, [
51
+ d(p, null, {
52
+ title: o(() => [...e[3] || (e[3] = [
53
+ a("CORS Proxy", -1)
37
54
  ])]),
38
- description: s(() => [...e[4] || (e[4] = [
39
- l(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
40
- o("a", {
55
+ description: o(() => [...e[4] || (e[4] = [
56
+ a(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
57
+ r("a", {
41
58
  class: "hover:text-c-1 underline-offset-2",
42
59
  href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
43
60
  target: "_blank"
44
61
  }, " bypass CORS issues ", -1),
45
- l(" . Check the ", -1),
46
- o("a", {
62
+ a(" . Check the ", -1),
63
+ r("a", {
47
64
  class: "hover:text-c-1 underline-offset-2",
48
65
  href: "https://github.com/scalar/scalar/tree/main/projects/proxy-scalar-com",
49
66
  target: "_blank"
50
67
  }, " source code on GitHub ", -1),
51
- l(" . ", -1)
68
+ a(" . ", -1)
52
69
  ])]),
53
- default: s(() => [
54
- o("div", R, [
55
- n(r(m), {
56
- class: a(
57
- r(x)(
58
- r(u)({
59
- active: i.activeProxyUrl === v
70
+ default: o(() => [
71
+ r("div", q, [
72
+ d(s(y), {
73
+ class: u(
74
+ s(f)(
75
+ s(v)({
76
+ active: l.activeProxyUrl === T
60
77
  })
61
78
  )
62
79
  ),
63
- onClick: e[0] || (e[0] = (t) => d("update:proxyUrl", v))
80
+ onClick: e[0] || (e[0] = (t) => m("update:proxyUrl", T))
64
81
  }, {
65
- default: s(() => [
66
- o("div", {
67
- class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
68
- "bg-c-accent text-b-1 border-transparent": i.activeProxyUrl === v
69
- }])
82
+ default: o(() => [
83
+ r("div", {
84
+ class: u(k(l.activeProxyUrl === T))
70
85
  }, [
71
- i.activeProxyUrl === v ? (c(), f(r(b), {
86
+ l.activeProxyUrl === T ? (n(), c(s(x), {
72
87
  key: 0,
73
88
  icon: "Checkmark",
74
89
  size: "xs",
75
90
  thickness: "3.5"
76
- })) : p("", !0)
91
+ })) : g("", !0)
77
92
  ], 2),
78
- e[5] || (e[5] = l(" Use proxy.scalar.com (default) ", -1))
93
+ e[5] || (e[5] = a(" Use proxy.scalar.com (default) ", -1))
79
94
  ]),
80
95
  _: 1
81
96
  }, 8, ["class"]),
82
- n(r(m), {
83
- class: a(r(x)(r(u)({ active: !i.activeProxyUrl }))),
84
- onClick: e[1] || (e[1] = (t) => d("update:proxyUrl", null))
97
+ d(s(y), {
98
+ class: u(s(f)(s(v)({ active: !l.activeProxyUrl }))),
99
+ onClick: e[1] || (e[1] = (t) => m("update:proxyUrl", null))
85
100
  }, {
86
- default: s(() => [
87
- o("div", {
88
- class: a([
89
- "flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
90
- !i.activeProxyUrl && "bg-c-accent text-b-1 border-transparent"
91
- ])
101
+ default: o(() => [
102
+ r("div", {
103
+ class: u(k(!l.activeProxyUrl))
92
104
  }, [
93
- i.activeProxyUrl ? p("", !0) : (c(), f(r(b), {
105
+ l.activeProxyUrl ? g("", !0) : (n(), c(s(x), {
94
106
  key: 0,
95
107
  icon: "Checkmark",
96
108
  size: "xs",
97
109
  thickness: "3.5"
98
110
  }))
99
111
  ], 2),
100
- e[6] || (e[6] = l(" Skip the proxy ", -1))
112
+ e[6] || (e[6] = a(" Skip the proxy ", -1))
101
113
  ]),
102
114
  _: 1
103
115
  }, 8, ["class"])
@@ -105,130 +117,152 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
105
117
  ]),
106
118
  _: 1
107
119
  }),
108
- n(k, null, {
109
- title: s(() => [...e[7] || (e[7] = [
110
- l(" Themes ", -1)
120
+ d(p, null, {
121
+ title: o(() => [...e[7] || (e[7] = [
122
+ a("Themes", -1)
111
123
  ])]),
112
- description: s(() => [...e[8] || (e[8] = [
113
- l(" We've got a whole rainbow of themes for you to play with: ", -1)
124
+ description: o(() => [...e[8] || (e[8] = [
125
+ a(" We've got a whole rainbow of themes for you to play with: ", -1)
114
126
  ])]),
115
- default: s(() => [
116
- o("div", V, [
117
- o("div", A, [
118
- (c(), y(C, null, w(P, (t) => n(r(m), {
119
- key: t,
120
- class: a(
121
- r(x)(
122
- r(u)({
123
- active: i.activeThemeId === t
124
- })
125
- )
126
- ),
127
- onClick: (j) => d("update:themeId", t)
128
- }, {
129
- default: s(() => [
130
- o("div", E, [
131
- o("div", {
132
- class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
133
- "bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
134
- }])
135
- }, [
136
- i.activeThemeId === t ? (c(), f(r(b), {
137
- key: 0,
138
- icon: "Checkmark",
139
- size: "xs",
140
- thickness: "3.5"
141
- })) : p("", !0)
142
- ], 2),
143
- l(" " + U(r(T)[t]), 1)
144
- ]),
145
- o("div", F, [
146
- o("span", {
147
- class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
148
- style: g({
149
- backgroundColor: r(h)(t).light
150
- })
151
- }, null, 4),
152
- o("span", {
153
- class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
154
- style: g({
155
- backgroundColor: r(h)(t).dark
156
- })
157
- }, null, 4),
158
- o("span", {
159
- class: "border-c-3 inline-block h-5 w-5 rounded-full",
160
- style: g({
161
- backgroundColor: r(h)(t).accent
162
- })
163
- }, null, 4)
164
- ])
127
+ default: o(() => [
128
+ r("div", I, [
129
+ (n(!0), h(S, null, C(s(z), (t) => (n(), c(s(y), {
130
+ key: t.slug,
131
+ class: u(s(f)(s(v)({ active: b(t.slug) }))),
132
+ onClick: (E) => m(
133
+ "update:themeSlug",
134
+ P(t.slug) ? void 0 : t.slug
135
+ )
136
+ }, {
137
+ default: o(() => [
138
+ r("div", X, [
139
+ r("div", {
140
+ class: u(k(b(t.slug)))
141
+ }, [
142
+ b(t.slug) ? (n(), c(s(x), {
143
+ key: 0,
144
+ icon: "Checkmark",
145
+ size: "xs",
146
+ thickness: "3.5"
147
+ })) : g("", !0)
148
+ ], 2),
149
+ a(" " + w(t.name), 1)
165
150
  ]),
166
- _: 2
167
- }, 1032, ["class", "onClick"])), 64))
168
- ])
151
+ r("div", Y, [
152
+ r("span", {
153
+ class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
154
+ style: U({
155
+ backgroundColor: s(N)(t.slug).light
156
+ })
157
+ }, null, 4),
158
+ r("span", {
159
+ class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
160
+ style: U({
161
+ backgroundColor: s(N)(t.slug).dark
162
+ })
163
+ }, null, 4),
164
+ r("span", {
165
+ class: "border-c-3 inline-block h-5 w-5 rounded-full",
166
+ style: U({
167
+ backgroundColor: s(N)(t.slug).accent
168
+ })
169
+ }, null, 4)
170
+ ])
171
+ ]),
172
+ _: 2
173
+ }, 1032, ["class", "onClick"]))), 128))
169
174
  ])
170
175
  ]),
171
176
  _: 1
172
177
  }),
173
- n(k, null, {
174
- title: s(() => [...e[9] || (e[9] = [
175
- l(" Framework Themes ", -1)
178
+ d(p, null, {
179
+ title: o(() => [...e[9] || (e[9] = [
180
+ a("Framework Themes", -1)
176
181
  ])]),
177
- description: s(() => [...e[10] || (e[10] = [
178
- l(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
182
+ description: o(() => [...e[10] || (e[10] = [
183
+ a(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
179
184
  ])]),
180
- default: s(() => [
181
- o("div", O, [
182
- (c(), y(C, null, w(z, (t) => n(r(m), {
183
- key: t,
184
- class: a(
185
- r(x)(
186
- r(u)({
187
- active: i.activeThemeId === t
188
- })
189
- )
190
- ),
191
- onClick: (j) => d("update:themeId", t)
185
+ default: o(() => [
186
+ r("div", J, [
187
+ (n(!0), h(S, null, C(s(M), (t) => (n(), c(s(y), {
188
+ key: t.slug,
189
+ class: u(s(f)(s(v)({ active: l.activeThemeSlug === t.slug }))),
190
+ onClick: (E) => m("update:themeSlug", t.slug)
192
191
  }, {
193
- default: s(() => [
194
- o("div", D, [
195
- o("div", {
196
- class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
197
- "bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
198
- }])
192
+ default: o(() => [
193
+ r("div", K, [
194
+ r("div", {
195
+ class: u(k(l.activeThemeSlug === t.slug))
199
196
  }, [
200
- i.activeThemeId === t ? (c(), f(r(b), {
197
+ l.activeThemeSlug === t.slug ? (n(), c(s(x), {
201
198
  key: 0,
202
199
  icon: "Checkmark",
203
200
  size: "xs",
204
201
  thickness: "3.5"
205
- })) : p("", !0)
202
+ })) : g("", !0)
206
203
  ], 2),
207
- l(" " + U(r(T)[t]), 1)
204
+ a(" " + w(t.name), 1)
208
205
  ]),
209
- o("div", W, [
210
- o("div", q, [
211
- n(B, { integration: t }, null, 8, ["integration"])
206
+ r("div", Q, [
207
+ r("div", Z, [
208
+ d(H, {
209
+ integration: t.slug
210
+ }, null, 8, ["integration"])
212
211
  ])
213
212
  ])
214
213
  ]),
215
214
  _: 2
216
- }, 1032, ["class", "onClick"])), 64))
215
+ }, 1032, ["class", "onClick"]))), 128))
217
216
  ])
218
217
  ]),
219
218
  _: 1
220
219
  }),
221
- n(k, null, {
222
- title: s(() => [...e[11] || (e[11] = [
223
- l(" Appearance ", -1)
220
+ l.customThemes.length > 0 ? (n(), c(p, { key: 0 }, {
221
+ title: o(() => [...e[11] || (e[11] = [
222
+ a(" Custom Themes ", -1)
223
+ ])]),
224
+ description: o(() => [...e[12] || (e[12] = [
225
+ a(" Team defined themes are available to all workspaces in the team. ", -1)
226
+ ])]),
227
+ default: o(() => [
228
+ r("div", _, [
229
+ (n(!0), h(S, null, C(l.customThemes, (t) => (n(), c(s(y), {
230
+ key: t.slug,
231
+ class: u(s(f)(s(v)({ active: l.activeThemeSlug === t.slug }))),
232
+ onClick: (E) => m("update:themeSlug", t.slug)
233
+ }, {
234
+ default: o(() => [
235
+ r("div", ee, [
236
+ r("div", {
237
+ class: u(k(l.activeThemeSlug === t.slug))
238
+ }, [
239
+ l.activeThemeSlug === t.slug ? (n(), c(s(x), {
240
+ key: 0,
241
+ icon: "Checkmark",
242
+ size: "xs",
243
+ thickness: "3.5"
244
+ })) : g("", !0)
245
+ ], 2),
246
+ a(" " + w(t.name), 1)
247
+ ])
248
+ ]),
249
+ _: 2
250
+ }, 1032, ["class", "onClick"]))), 128))
251
+ ])
252
+ ]),
253
+ _: 1
254
+ })) : g("", !0),
255
+ d(p, null, {
256
+ title: o(() => [...e[13] || (e[13] = [
257
+ a("Appearance", -1)
224
258
  ])]),
225
- description: s(() => [...e[12] || (e[12] = [
226
- l(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
259
+ description: o(() => [...e[14] || (e[14] = [
260
+ a(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
227
261
  ])]),
228
- default: s(() => [
229
- n(L, {
230
- colorMode: i.colorMode,
231
- "onUpdate:colorMode": e[2] || (e[2] = (t) => d("update:colorMode", t))
262
+ default: o(() => [
263
+ d(G, {
264
+ colorMode: l.colorMode,
265
+ "onUpdate:colorMode": e[2] || (e[2] = (t) => m("update:colorMode", t))
232
266
  }, null, 8, ["colorMode"])
233
267
  ]),
234
268
  _: 1
@@ -237,5 +271,5 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
237
271
  }
238
272
  });
239
273
  export {
240
- I as default
274
+ ne as default
241
275
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/DocumentSettings.vue"],"names":[],"mappings":"AA0JA,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;AAuTF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"DocumentSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/DocumentSettings.vue"],"names":[],"mappings":"AA4JA,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;AAyTF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,8 @@
1
- import { defineComponent as p, createElementBlock as d, openBlock as a, Fragment as i, createElementVNode as e, createVNode as n, unref as o, createTextVNode as u, toDisplayString as h, withCtx as m } from "vue";
2
- import { useModal as v, ScalarToggle as w, ScalarIcon as f, ScalarButton as D, ScalarModal as y } from "@scalar/components";
3
- import k from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
4
- const M = { class: "flex flex-col gap-12" }, U = { class: "flex flex-col gap-2" }, C = { class: "bg-b-2 rounded-lg border text-sm" }, N = { class: "bg-b-1 flex items-center justify-between gap-4 rounded-t-lg p-3" }, S = { class: "text-c-1 flex items-center overflow-x-auto border-t py-1.5 whitespace-nowrap" }, B = { class: "flex items-center" }, V = ["href"], T = { class: "flex flex-col gap-4" }, z = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, O = /* @__PURE__ */ p({
1
+ import { defineComponent as w, createElementBlock as s, openBlock as r, Fragment as u, createElementVNode as t, createVNode as n, withCtx as d, unref as o, createTextVNode as i, toDisplayString as h } from "vue";
2
+ import { useModal as v, ScalarToggle as D, ScalarIcon as f, ScalarButton as y, ScalarModal as k } from "@scalar/components";
3
+ import M from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
4
+ import g from "./components/Section.vue.js";
5
+ const U = { class: "flex flex-col gap-12" }, C = { class: "bg-b-2 rounded-lg border text-sm" }, N = { class: "bg-b-1 flex items-center justify-between gap-4 rounded-t-lg p-3" }, S = { class: "text-c-1 flex items-center overflow-x-auto border-t py-1.5 whitespace-nowrap" }, B = { class: "flex items-center" }, V = ["href"], T = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, L = /* @__PURE__ */ w({
5
6
  __name: "DocumentSettings",
6
7
  props: {
7
8
  documentUrl: {},
@@ -10,90 +11,98 @@ const M = { class: "flex flex-col gap-12" }, U = { class: "flex flex-col gap-2"
10
11
  isDraftDocument: { type: Boolean, default: !1 }
11
12
  },
12
13
  emits: ["delete:document", "update:watchMode"],
13
- setup(l, { emit: x }) {
14
- const r = x, s = v(), g = () => {
15
- l.isDraftDocument || s.show();
16
- }, b = () => {
17
- r("delete:document"), s.hide();
14
+ setup(l, { emit: b }) {
15
+ const c = b, a = v(), p = () => {
16
+ l.isDraftDocument || a.show();
17
+ }, x = () => {
18
+ c("delete:document"), a.hide();
18
19
  };
19
- return (A, t) => (a(), d(i, null, [
20
- e("div", M, [
21
- e("div", U, [
22
- t[5] || (t[5] = e("div", { class: "flex h-8 items-center" }, [
23
- e("h3", { class: "font-bold" }, "Features")
24
- ], -1)),
25
- e("div", C, [
26
- e("div", N, [
27
- t[2] || (t[2] = e("div", null, [
28
- e("h4", null, "Watch Mode"),
29
- e("p", { class: "text-c-2 mt-1" }, " When enabled, the OpenAPI document will be polled for changes. The collection will be updated automatically. ")
30
- ], -1)),
31
- n(o(w), {
32
- class: "w-4",
33
- disabled: !l.documentUrl,
34
- modelValue: l.watchMode ?? !1,
35
- "onUpdate:modelValue": t[0] || (t[0] = (c) => r("update:watchMode", c))
36
- }, null, 8, ["disabled", "modelValue"])
37
- ]),
38
- e("div", S, [
39
- e("div", B, [
40
- l.documentUrl ? (a(), d(i, { key: 0 }, [
41
- t[3] || (t[3] = e("span", { class: "bg-b-2 sticky left-0 pr-2 pl-3" }, "Source", -1)),
42
- e("a", {
43
- class: "text-c-2 group rounded pr-3 no-underline hover:underline",
44
- href: l.documentUrl,
45
- target: "_blank"
46
- }, [
47
- u(h(l.documentUrl) + " ", 1),
20
+ return ($, e) => (r(), s(u, null, [
21
+ t("div", U, [
22
+ n(g, null, {
23
+ title: d(() => [...e[2] || (e[2] = [
24
+ i("Features", -1)
25
+ ])]),
26
+ default: d(() => [
27
+ t("div", C, [
28
+ t("div", N, [
29
+ e[3] || (e[3] = t("div", null, [
30
+ t("h4", null, "Watch Mode"),
31
+ t("p", { class: "text-c-2 mt-1" }, " When enabled, the OpenAPI document will be polled for changes. The collection will be updated automatically. ")
32
+ ], -1)),
33
+ n(o(D), {
34
+ class: "w-4",
35
+ disabled: !l.documentUrl,
36
+ modelValue: l.watchMode ?? !1,
37
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => c("update:watchMode", m))
38
+ }, null, 8, ["disabled", "modelValue"])
39
+ ]),
40
+ t("div", S, [
41
+ t("div", B, [
42
+ l.documentUrl ? (r(), s(u, { key: 0 }, [
43
+ e[4] || (e[4] = t("span", { class: "bg-b-2 sticky left-0 pr-2 pl-3" }, "Source", -1)),
44
+ t("a", {
45
+ class: "text-c-2 group rounded pr-3 no-underline hover:underline",
46
+ href: l.documentUrl,
47
+ target: "_blank"
48
+ }, [
49
+ i(h(l.documentUrl) + " ", 1),
50
+ n(o(f), {
51
+ class: "ml-1 hidden w-2.5 group-hover:inline",
52
+ icon: "ExternalLink"
53
+ })
54
+ ], 8, V)
55
+ ], 64)) : (r(), s(u, { key: 1 }, [
48
56
  n(o(f), {
49
- class: "ml-1 hidden w-2.5 group-hover:inline",
50
- icon: "ExternalLink"
51
- })
52
- ], 8, V)
53
- ], 64)) : (a(), d(i, { key: 1 }, [
54
- n(o(f), {
55
- class: "text-c-2 mr-2 ml-3 w-4",
56
- icon: "NotAllowed",
57
- size: "sm"
58
- }),
59
- t[4] || (t[4] = e("span", { class: "text-c-2 pr-3" }, " No URL configured. Try importing an OpenAPI document from an URL. ", -1))
60
- ], 64))
57
+ class: "text-c-2 mr-2 ml-3 w-4",
58
+ icon: "NotAllowed",
59
+ size: "sm"
60
+ }),
61
+ e[5] || (e[5] = t("span", { class: "text-c-2 pr-3" }, " No URL configured. Try importing an OpenAPI document from an URL. ", -1))
62
+ ], 64))
63
+ ])
61
64
  ])
62
65
  ])
63
- ])
64
- ]),
65
- e("div", T, [
66
- t[8] || (t[8] = e("h3", { class: "font-bold" }, "Danger Zone", -1)),
67
- e("div", z, [
68
- t[7] || (t[7] = e("div", null, [
69
- e("h4", null, "Delete Collection"),
70
- e("p", { class: "text-c-2 mt-1" }, " Be careful, my friend. Once deleted, there is no way to recover the collection. ")
71
- ], -1)),
72
- n(o(D), {
73
- disabled: l.isDraftDocument,
74
- size: "sm",
75
- variant: "danger",
76
- onClick: g
77
- }, {
78
- default: m(() => [...t[6] || (t[6] = [
79
- u(" Delete Collection ", -1)
80
- ])]),
81
- _: 1
82
- }, 8, ["disabled"])
83
- ])
84
- ])
66
+ ]),
67
+ _: 1
68
+ }),
69
+ n(g, null, {
70
+ title: d(() => [...e[6] || (e[6] = [
71
+ i("Danger Zone", -1)
72
+ ])]),
73
+ default: d(() => [
74
+ t("div", T, [
75
+ e[8] || (e[8] = t("div", null, [
76
+ t("h4", null, "Delete Collection"),
77
+ t("p", { class: "text-c-2 mt-1" }, " Be careful, my friend. Once deleted, there is no way to recover the collection. ")
78
+ ], -1)),
79
+ n(o(y), {
80
+ disabled: l.isDraftDocument,
81
+ size: "sm",
82
+ variant: "danger",
83
+ onClick: p
84
+ }, {
85
+ default: d(() => [...e[7] || (e[7] = [
86
+ i(" Delete Collection ", -1)
87
+ ])]),
88
+ _: 1
89
+ }, 8, ["disabled"])
90
+ ])
91
+ ]),
92
+ _: 1
93
+ })
85
94
  ]),
86
- n(o(y), {
95
+ n(o(k), {
87
96
  size: "xxs",
88
- state: o(s),
97
+ state: o(a),
89
98
  title: `Delete ${l.title}`
90
99
  }, {
91
- default: m(() => [
92
- n(k, {
100
+ default: d(() => [
101
+ n(M, {
93
102
  variableName: l.title ?? "",
94
103
  warningMessage: "This action cannot be undone.",
95
- onClose: t[1] || (t[1] = (c) => o(s).hide()),
96
- onDelete: b
104
+ onClose: e[1] || (e[1] = (m) => o(a).hide()),
105
+ onDelete: x
97
106
  }, null, 8, ["variableName"])
98
107
  ]),
99
108
  _: 1
@@ -102,5 +111,5 @@ const M = { class: "flex flex-col gap-12" }, U = { class: "flex flex-col gap-2"
102
111
  }
103
112
  });
104
113
  export {
105
- O as default
114
+ L as default
106
115
  };
@@ -1,7 +1,8 @@
1
1
  type __VLS_Slots = {
2
2
  title?: () => string;
3
3
  description?: () => string;
4
- default: () => any;
4
+ actions?: () => unknown;
5
+ default: () => unknown;
5
6
  };
6
7
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;