@scalar/api-client 2.26.2 → 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 (115) hide show
  1. package/CHANGELOG.md +72 -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/helpers/build-request-body.d.ts.map +1 -1
  6. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
  7. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
  9. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
  10. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
  11. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
  12. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  13. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +6 -6
  14. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  15. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  16. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
  17. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  18. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  19. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
  20. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  21. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  22. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
  23. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
  25. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
  26. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  27. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +107 -87
  28. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
  29. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
  30. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
  31. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
  34. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
  36. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
  37. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
  38. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
  39. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
  40. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
  41. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
  42. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
  44. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
  45. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
  50. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  51. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  52. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  53. package/dist/v2/components/sidebar/Sidebar.vue.js +24 -23
  54. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
  55. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  56. package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
  57. package/dist/v2/features/app/App.vue.d.ts +5 -0
  58. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/App.vue.js +48 -46
  60. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  61. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  62. package/dist/v2/features/app/components/AppSidebar.vue2.js +64 -63
  63. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
  64. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  65. package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
  66. package/dist/v2/features/app/helpers/routes.d.ts +2 -0
  67. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  68. package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
  69. package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
  70. package/dist/v2/features/app/hooks/use-theme.js +34 -0
  71. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  72. package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
  73. package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
  74. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  75. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  76. package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
  77. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  78. package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
  79. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  80. package/dist/v2/features/collection/components/Environment.vue.js +27 -15
  81. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  82. package/dist/v2/features/collection/components/Overview.vue.js +2 -2
  83. package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
  84. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  85. package/dist/v2/features/collection/components/Servers.vue.js +93 -88
  86. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  87. package/dist/v2/features/collection/components/Settings.vue.js +19 -17
  88. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  89. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  90. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
  91. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
  92. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  93. package/dist/v2/features/modal/Modal.vue.js +15 -15
  94. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  95. package/dist/v2/features/operation/Operation.vue.js +30 -33
  96. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
  97. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  98. package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
  99. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
  100. package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
  101. package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
  102. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
  103. package/dist/v2/features/settings/components/Section.vue.js +26 -15
  104. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
  105. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
  106. package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
  107. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  108. package/dist/v2/helpers/handle-hotkeys.js +2 -2
  109. package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
  110. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
  111. package/dist/v2/hooks/use-global-hot-keys.js +8 -6
  112. package/dist/v2/workspace-events.d.ts.map +1 -1
  113. package/dist/v2/workspace-events.js +13 -6
  114. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  115. package/package.json +18 -17
@@ -0,0 +1,34 @@
1
+ import { themePresets as y, defaultFonts as S } from "@scalar/themes";
2
+ import { computed as T, toValue as a } from "vue";
3
+ const p = new Map(y.map((e) => [e.slug, e])), l = (e, s = "scalar-theme") => `<style id="scalar-theme" data-testid="${s}">${e}</style>`, o = (e, s) => {
4
+ const r = (t) => `${t}
5
+ ${S}`;
6
+ if (p.has(e))
7
+ return r(p.get(e)?.theme ?? "");
8
+ const c = s.find((t) => t.slug === e);
9
+ if (c)
10
+ return r(c.theme);
11
+ }, w = ({
12
+ fallbackThemeSlug: e,
13
+ store: s,
14
+ customThemes: r
15
+ }) => ({
16
+ themeStyleTag: T(() => {
17
+ const t = l(o("default", []), "default"), m = a(s), n = a(e);
18
+ if (m === null)
19
+ return t;
20
+ const f = m.workspace["x-scalar-theme"], u = f === "none" ? n : f;
21
+ if (!u) {
22
+ const i = o(n, a(r));
23
+ return i ? l(i, n) : t;
24
+ }
25
+ const h = o(u, a(r));
26
+ if (h)
27
+ return l(h, u);
28
+ const d = o(n, a(r));
29
+ return d ? l(d, n) : t;
30
+ })
31
+ });
32
+ export {
33
+ w as useTheme
34
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAyJA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,gSA6Vd,CAAC"}
1
+ {"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAyJA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,gSA4Vd,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, computed as p, createElementBlock as c, openBlock as u, createElementVNode as t, createVNode as o, createBlock as f, createCommentVNode as g, withCtx as l, unref as s, resolveDynamicComponent as h, mergeProps as k } from "vue";
1
+ import { defineComponent as h, computed as p, createElementBlock as c, openBlock as u, createElementVNode as t, createVNode as o, createBlock as f, createCommentVNode as y, withCtx as l, unref as s, resolveDynamicComponent as g, mergeProps as k } from "vue";
2
2
  import { ScalarButton as i } from "@scalar/components";
3
3
  import { ScalarIconFloppyDisk as b } from "@scalar/icons";
4
4
  import { LibraryIcon as w } from "@scalar/icons/library";
@@ -9,14 +9,14 @@ import V from "./components/LabelInput.vue.js";
9
9
  import B from "./components/Tabs.vue.js";
10
10
  const D = { class: "custom-scroll h-full" }, N = {
11
11
  key: 0,
12
- class: "w-full md:mx-auto md:max-w-[720px]"
13
- }, z = ["aria-label"], I = { class: "flex flex-row items-center gap-2" }, U = { class: "group relative ml-1.25" }, $ = { class: "px-1.5 py-8" }, j = {
12
+ class: "w-full md:mx-auto md:max-w-180"
13
+ }, z = ["aria-label"], I = { class: "flex flex-row items-center gap-2" }, U = { class: "group relative ml-1.25" }, T = { class: "px-1.5 py-8" }, $ = {
14
14
  key: 1,
15
15
  class: "flex w-full flex-1 items-center justify-center"
16
- }, E = {
16
+ }, j = {
17
17
  name: "DocumentCollection"
18
- }, H = /* @__PURE__ */ y({
19
- ...E,
18
+ }, H = /* @__PURE__ */ h({
19
+ ...j,
20
20
  props: {
21
21
  documentSlug: {},
22
22
  document: {},
@@ -29,21 +29,22 @@ const D = { class: "custom-scroll h-full" }, N = {
29
29
  securitySchemes: {},
30
30
  workspaceStore: {},
31
31
  activeWorkspace: {},
32
- plugins: {}
32
+ plugins: {},
33
+ customThemes: {}
33
34
  },
34
35
  setup(a) {
35
36
  const n = a, m = p(() => n.document?.info?.title || "Untitled Document"), d = p(
36
37
  () => n.document?.["x-scalar-icon"] || "interface-content-folder"
37
- ), x = () => {
38
+ ), v = () => {
38
39
  n.workspaceStore.revertDocumentChanges(n.documentSlug);
39
- }, v = () => {
40
+ }, x = () => {
40
41
  n.workspaceStore.saveDocument(n.documentSlug);
41
42
  };
42
- return (L, e) => (u(), c("div", D, [
43
+ return (E, e) => (u(), c("div", D, [
43
44
  a.document ? (u(), c("div", N, [
44
45
  t("div", {
45
46
  "aria-label": `title: ${m.value}`,
46
- class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
47
+ class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:max-w-180"
47
48
  }, [
48
49
  a.document?.["x-scalar-is-dirty"] ? (u(), f(S, {
49
50
  key: 0,
@@ -56,7 +57,7 @@ const D = { class: "custom-scroll h-full" }, N = {
56
57
  size: "xs",
57
58
  type: "button",
58
59
  variant: "outlined",
59
- onClick: x
60
+ onClick: v
60
61
  }, {
61
62
  default: l(() => [...e[2] || (e[2] = [
62
63
  t("span", null, "Undo", -1)
@@ -68,7 +69,7 @@ const D = { class: "custom-scroll h-full" }, N = {
68
69
  size: "xs",
69
70
  type: "button",
70
71
  variant: "solid",
71
- onClick: v
72
+ onClick: x
72
73
  }, {
73
74
  default: l(() => [
74
75
  o(s(b), {
@@ -84,7 +85,7 @@ const D = { class: "custom-scroll h-full" }, N = {
84
85
  e[4] || (e[4] = t("p", null, " You have unsaved changes. Save your work to keep your changes, or undo to revert them. ", -1))
85
86
  ]),
86
87
  _: 1
87
- })) : g("", !0),
88
+ })) : y("", !0),
88
89
  t("div", I, [
89
90
  o(C, {
90
91
  modelValue: d.value,
@@ -107,27 +108,27 @@ const D = { class: "custom-scroll h-full" }, N = {
107
108
  })
108
109
  ]),
109
110
  _: 1
110
- }, 8, ["modelValue"])
111
- ]),
112
- t("div", U, [
113
- o(V, {
114
- class: "text-xl font-bold",
115
- inputId: "documentName",
116
- modelValue: m.value,
117
- "onUpdate:modelValue": e[1] || (e[1] = (r) => a.eventBus.emit("document:update:info", { title: r }))
118
- }, null, 8, ["modelValue"])
111
+ }, 8, ["modelValue"]),
112
+ t("div", U, [
113
+ o(V, {
114
+ class: "text-xl font-bold",
115
+ inputId: "documentName",
116
+ modelValue: m.value,
117
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => a.eventBus.emit("document:update:info", { title: r }))
118
+ }, null, 8, ["modelValue"])
119
+ ])
119
120
  ])
120
121
  ], 8, z),
121
122
  o(B, { type: "document" }),
122
- t("div", $, [
123
+ t("div", T, [
123
124
  o(s(_), null, {
124
125
  default: l(({ Component: r }) => [
125
- (u(), f(h(r), k(n, { collectionType: "document" }), null, 16))
126
+ (u(), f(g(r), k(n, { collectionType: "document" }), null, 16))
126
127
  ]),
127
128
  _: 1
128
129
  })
129
130
  ])
130
- ])) : (u(), c("div", j, [...e[5] || (e[5] = [
131
+ ])) : (u(), c("div", $, [...e[5] || (e[5] = [
131
132
  t("div", { class: "flex h-full flex-col items-center justify-center" }, [
132
133
  t("h1", { class: "text-2xl font-bold" }, "Document not found"),
133
134
  t("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
@@ -1,8 +1,8 @@
1
- import { defineComponent as a, createElementBlock as l, openBlock as r, createElementVNode as e, createVNode as o, unref as c, toDisplayString as i, mergeProps as n } from "vue";
1
+ import { defineComponent as a, createElementBlock as l, openBlock as r, createElementVNode as e, createVNode as o, unref as s, toDisplayString as i, mergeProps as n } from "vue";
2
2
  import { ScalarIconGlobe as m } from "@scalar/icons";
3
3
  import { RouterView as p } from "vue-router";
4
- import d from "./components/Tabs.vue.js";
5
- const u = { class: "custom-scroll h-full" }, _ = { class: "w-full md:mx-auto md:max-w-[720px]" }, f = ["aria-label"], x = { class: "group relative ml-1.25" }, h = { class: "text-c-1 flex h-8 items-center" }, v = { class: "px-1.5 py-8" }, k = {}, B = /* @__PURE__ */ a({
4
+ import u from "./components/Tabs.vue.js";
5
+ const d = { class: "custom-scroll h-full" }, _ = { class: "w-full md:mx-auto md:max-w-180" }, f = ["aria-label"], h = { class: "group relative ml-1.25" }, x = { class: "text-c-1 flex h-8 items-center" }, v = { class: "px-1.5 py-8" }, k = {}, B = /* @__PURE__ */ a({
6
6
  ...k,
7
7
  __name: "WorkspaceCollection",
8
8
  props: {
@@ -17,24 +17,25 @@ const u = { class: "custom-scroll h-full" }, _ = { class: "w-full md:mx-auto md:
17
17
  securitySchemes: {},
18
18
  workspaceStore: {},
19
19
  activeWorkspace: {},
20
- plugins: {}
20
+ plugins: {},
21
+ customThemes: {}
21
22
  },
22
23
  setup(t) {
23
- const s = t;
24
- return (w, b) => (r(), l("div", u, [
24
+ const c = t;
25
+ return (w, b) => (r(), l("div", d, [
25
26
  e("div", _, [
26
27
  e("div", {
27
28
  "aria-label": `title: ${t.activeWorkspace.label}`,
28
- class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
29
+ class: "mx-auto flex h-fit w-full flex-row items-center gap-2 pt-8 pb-3 md:max-w-180"
29
30
  }, [
30
- o(c(m), { class: "text-c-2 size-6" }),
31
- e("div", x, [
32
- e("span", h, i(t.activeWorkspace.label), 1)
31
+ o(s(m), { class: "text-c-2 size-6" }),
32
+ e("div", h, [
33
+ e("span", x, i(t.activeWorkspace.label), 1)
33
34
  ])
34
35
  ], 8, f),
35
- o(d, { type: "workspace" }),
36
+ o(u, { type: "workspace" }),
36
37
  e("div", v, [
37
- o(c(p), n(s, { collectionType: "workspace" }), null, 16)
38
+ o(s(p), n(c, { collectionType: "workspace" }), null, 16)
38
39
  ])
39
40
  ])
40
41
  ]));
@@ -1 +1 @@
1
- {"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":"AA0OA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":"AA2OA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./Authentication.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1bfafc56"]]);
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9d8e1c09"]]);
5
5
  export {
6
- c as default
6
+ e as default
7
7
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as u, computed as s, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as c, unref as a, normalizeClass as i } from "vue";
2
- import { ScalarToggle as v } from "@scalar/components";
3
- import y from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
4
- const h = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, p = { class: "flex h-8 items-center justify-between" }, w = /* @__PURE__ */ u({
1
+ import { defineComponent as d, computed as c, createBlock as v, openBlock as y, withCtx as n, createElementVNode as i, normalizeClass as a, createVNode as s, unref as r, createTextVNode as u } from "vue";
2
+ import { ScalarToggle as h } from "@scalar/components";
3
+ import p from "../../settings/components/Section.vue.js";
4
+ import S from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
5
+ const f = { class: "flex h-8 items-center" }, B = /* @__PURE__ */ d({
5
6
  __name: "Authentication",
6
7
  props: {
7
8
  documentSlug: {},
@@ -16,54 +17,62 @@ const h = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
16
17
  workspaceStore: {},
17
18
  activeWorkspace: {},
18
19
  plugins: {},
20
+ customThemes: {},
19
21
  collectionType: {}
20
22
  },
21
23
  setup(e) {
22
- const l = s(
24
+ const o = c(
23
25
  () => e.document?.["x-scalar-set-operation-security"] ?? !1
24
- ), r = s(
26
+ ), m = c(
25
27
  () => e.document?.servers?.find(
26
- ({ url: o }) => o === e.document?.["x-scalar-selected-server"]
28
+ ({ url: l }) => l === e.document?.["x-scalar-selected-server"]
27
29
  ) ?? null
28
30
  );
29
- return (o, t) => (d(), m("div", h, [
30
- n("div", f, [
31
- n("div", p, [
32
- t[1] || (t[1] = n("h3", { class: "font-bold" }, "Authentication", -1)),
33
- c(a(v), {
31
+ return (l, t) => (y(), v(p, null, {
32
+ title: n(() => [...t[1] || (t[1] = [
33
+ u("Authentication", -1)
34
+ ])]),
35
+ description: n(() => [...t[2] || (t[2] = [
36
+ u(" If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1)
37
+ ])]),
38
+ actions: n(() => [
39
+ i("div", f, [
40
+ s(r(h), {
34
41
  class: "w-4",
35
- modelValue: l.value,
42
+ modelValue: o.value,
36
43
  "onUpdate:modelValue": t[0] || (t[0] = () => e.eventBus.emit("document:toggle:security"))
37
44
  }, null, 8, ["modelValue"])
38
- ]),
39
- t[2] || (t[2] = n("p", { class: "pr-6 text-sm" }, " If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1))
45
+ ])
40
46
  ]),
41
- n("div", {
42
- class: i(!l.value && "cursor-not-allowed")
43
- }, [
44
- c(a(y), {
45
- class: i([
46
- "scalar-collection-auth !border-none",
47
- !l.value && "pointer-events-none opacity-50 mix-blend-luminosity"
48
- ]),
49
- environment: e.environment,
50
- eventBus: e.eventBus,
51
- isStatic: "",
52
- meta: { type: "document" },
53
- proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
54
- securityRequirements: e.document?.security ?? [],
55
- securitySchemes: e.securitySchemes,
56
- selectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
57
- type: "document",
58
- documentName: e.documentSlug
59
- }),
60
- server: r.value,
61
- title: "Authentication"
62
- }, null, 8, ["class", "environment", "eventBus", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])
63
- ], 2)
64
- ]));
47
+ default: n(() => [
48
+ i("div", {
49
+ class: a(!o.value && "cursor-not-allowed")
50
+ }, [
51
+ s(r(S), {
52
+ class: a([
53
+ "scalar-collection-auth border-none!",
54
+ !o.value && "pointer-events-none opacity-50 mix-blend-luminosity"
55
+ ]),
56
+ environment: e.environment,
57
+ eventBus: e.eventBus,
58
+ isStatic: "",
59
+ meta: { type: "document" },
60
+ proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
61
+ securityRequirements: e.document?.security ?? [],
62
+ securitySchemes: e.securitySchemes,
63
+ selectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
64
+ type: "document",
65
+ documentName: e.documentSlug
66
+ }),
67
+ server: m.value,
68
+ title: "Authentication"
69
+ }, null, 8, ["class", "environment", "eventBus", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])
70
+ ], 2)
71
+ ]),
72
+ _: 1
73
+ }));
65
74
  }
66
75
  });
67
76
  export {
68
- w as default
77
+ B as default
69
78
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Cookies.vue"],"names":[],"mappings":"AAsIA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Cookies.vue"],"names":[],"mappings":"AAgHA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,6 +1,7 @@
1
- import { defineComponent as s, computed as c, createElementBlock as n, openBlock as l, createStaticVNode as a, createVNode as i, unref as r } from "vue";
2
- import u from "../../global-cookies/components/CookiesTable.vue.js";
3
- const d = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ s({
1
+ import { defineComponent as c, computed as i, createBlock as r, openBlock as u, withCtx as t, createVNode as a, unref as m, createTextVNode as n, createElementVNode as s } from "vue";
2
+ import k from "../../settings/components/Section.vue.js";
3
+ import d from "../../global-cookies/components/CookiesTable.vue.js";
4
+ const T = /* @__PURE__ */ c({
4
5
  __name: "Cookies",
5
6
  props: {
6
7
  documentSlug: {},
@@ -15,20 +16,32 @@ const d = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ s({
15
16
  workspaceStore: {},
16
17
  activeWorkspace: {},
17
18
  plugins: {},
19
+ customThemes: {},
18
20
  collectionType: {}
19
21
  },
20
22
  setup(e) {
21
- const t = c(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
22
- return (m, o) => (l(), n("div", d, [
23
- o[0] || (o[0] = a('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Cookies</h3></div><p class="text-c-2 mb-4 text-sm"> Manage your collection&#39;s cookies here.<br>Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.<br></p></div></div>', 1)),
24
- i(r(u), {
25
- cookies: t.value,
26
- eventBus: e.eventBus,
27
- collectionType: e.collectionType
28
- }, null, 8, ["cookies", "eventBus", "collectionType"])
29
- ]));
23
+ const l = i(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
24
+ return (p, o) => (u(), r(k, null, {
25
+ title: t(() => [...o[0] || (o[0] = [
26
+ n("Cookies", -1)
27
+ ])]),
28
+ description: t(() => [...o[1] || (o[1] = [
29
+ n(" Manage your collection's cookies here.", -1),
30
+ s("br", null, null, -1),
31
+ n("Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.", -1),
32
+ s("br", null, null, -1)
33
+ ])]),
34
+ default: t(() => [
35
+ a(m(d), {
36
+ collectionType: e.collectionType,
37
+ cookies: l.value,
38
+ eventBus: e.eventBus
39
+ }, null, 8, ["collectionType", "cookies", "eventBus"])
40
+ ]),
41
+ _: 1
42
+ }));
30
43
  }
31
44
  });
32
45
  export {
33
- f as default
46
+ T as default
34
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Environment.vue"],"names":[],"mappings":"AAyJA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Environment.vue"],"names":[],"mappings":"AAkIA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,6 +1,7 @@
1
- import { defineComponent as a, computed as n, createElementBlock as s, openBlock as i, createStaticVNode as l, createVNode as r, unref as m } from "vue";
2
- import v from "../../environments/EnvironmentsList.vue.js";
3
- const u = { class: "flex flex-col gap-4" }, x = /* @__PURE__ */ a({
1
+ import { defineComponent as i, computed as r, createBlock as l, openBlock as s, withCtx as t, createVNode as m, unref as u, createTextVNode as o, createElementVNode as v } from "vue";
2
+ import d from "../../settings/components/Section.vue.js";
3
+ import p from "../../environments/EnvironmentsList.vue.js";
4
+ const T = /* @__PURE__ */ i({
4
5
  __name: "Environment",
5
6
  props: {
6
7
  documentSlug: {},
@@ -15,23 +16,34 @@ const u = { class: "flex flex-col gap-4" }, x = /* @__PURE__ */ a({
15
16
  workspaceStore: {},
16
17
  activeWorkspace: {},
17
18
  plugins: {},
19
+ customThemes: {},
18
20
  collectionType: {}
19
21
  },
20
22
  setup(e) {
21
- const o = n(
23
+ const c = r(
22
24
  () => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
23
- ), c = n(() => e.workspaceStore.workspace["x-scalar-active-environment"]);
24
- return (d, t) => (i(), s("div", u, [
25
- t[0] || (t[0] = l('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Environment Variables</h3></div><p class="text-c-2 mb-4 text-sm"> Set environment variables at your collection level. Use <code class="font-code text-c-2"> {{ variable }} </code> to add / search among the selected environment&#39;s variables in your request inputs. </p></div></div>', 1)),
26
- r(m(v), {
27
- activeEnvironment: c.value,
28
- collectionType: e.collectionType,
29
- environments: o.value,
30
- eventBus: e.eventBus
31
- }, null, 8, ["activeEnvironment", "collectionType", "environments", "eventBus"])
32
- ]));
25
+ ), a = r(() => e.workspaceStore.workspace["x-scalar-active-environment"]);
26
+ return (f, n) => (s(), l(d, null, {
27
+ title: t(() => [...n[0] || (n[0] = [
28
+ o("Environment Variables", -1)
29
+ ])]),
30
+ description: t(() => [...n[1] || (n[1] = [
31
+ o(" Set environment variables at your collection level. Use ", -1),
32
+ v("code", { class: "font-code text-c-2" }, " {{ variable }} ", -1),
33
+ o(" to add / search among the selected environment's variables in your request inputs. ", -1)
34
+ ])]),
35
+ default: t(() => [
36
+ m(u(p), {
37
+ activeEnvironment: a.value,
38
+ collectionType: e.collectionType,
39
+ environments: c.value,
40
+ eventBus: e.eventBus
41
+ }, null, 8, ["activeEnvironment", "collectionType", "environments", "eventBus"])
42
+ ]),
43
+ _: 1
44
+ }));
33
45
  }
34
46
  });
35
47
  export {
36
- x as default
48
+ T as default
37
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Overview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Overview.vue"],"names":[],"mappings":"AAyaA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Overview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Overview.vue"],"names":[],"mappings":"AA2aA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Overview.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7c1a2f6c"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-59dae578"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };