@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,9 +1,9 @@
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";
2
- import { ScalarIconGlobe as m } from "@scalar/icons";
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({
6
- ...k,
1
+ import { defineComponent as m, ref as p, watch as i, createElementBlock as u, openBlock as d, createElementVNode as a, createVNode as l, unref as f, mergeProps as v } from "vue";
2
+ import { RouterView as _ } from "vue-router";
3
+ import k from "./components/LabelInput.vue.js";
4
+ import w from "./components/Tabs.vue.js";
5
+ const h = { class: "custom-scroll h-full" }, x = { class: "w-full md:mx-auto md:max-w-180" }, b = ["aria-label"], W = { class: "group relative ml-1.25" }, V = { class: "px-1.5 py-8" }, g = {}, S = /* @__PURE__ */ m({
6
+ ...g,
7
7
  __name: "WorkspaceCollection",
8
8
  props: {
9
9
  documentSlug: {},
@@ -17,29 +17,48 @@ 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
- setup(t) {
23
- const s = t;
24
- return (w, b) => (r(), l("div", u, [
25
- e("div", _, [
26
- e("div", {
27
- "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]"
23
+ setup(s) {
24
+ const e = s, o = p(e.activeWorkspace.label);
25
+ i(
26
+ () => e.activeWorkspace.label,
27
+ (t) => {
28
+ o.value = t;
29
+ }
30
+ );
31
+ const r = (t) => {
32
+ if (t.trim() === "") {
33
+ o.value = e.activeWorkspace.label;
34
+ return;
35
+ }
36
+ e.eventBus.emit("workspace:update:name", t);
37
+ };
38
+ return (t, c) => (d(), u("div", h, [
39
+ a("div", x, [
40
+ a("div", {
41
+ "aria-label": `title: ${s.activeWorkspace.label}`,
42
+ class: "mx-auto flex h-fit w-full flex-row items-center gap-2 pt-8 pb-3 md:max-w-180"
29
43
  }, [
30
- o(c(m), { class: "text-c-2 size-6" }),
31
- e("div", x, [
32
- e("span", h, i(t.activeWorkspace.label), 1)
44
+ a("div", W, [
45
+ l(k, {
46
+ modelValue: o.value,
47
+ "onUpdate:modelValue": c[0] || (c[0] = (n) => o.value = n),
48
+ class: "text-xl font-bold",
49
+ inputId: "workspaceName",
50
+ onBlur: r
51
+ }, null, 8, ["modelValue"])
33
52
  ])
34
- ], 8, f),
35
- o(d, { type: "workspace" }),
36
- e("div", v, [
37
- o(c(p), n(s, { collectionType: "workspace" }), null, 16)
53
+ ], 8, b),
54
+ l(w, { type: "workspace" }),
55
+ a("div", V, [
56
+ l(f(_), v(e, { collectionType: "workspace" }), null, 16)
38
57
  ])
39
58
  ])
40
59
  ]));
41
60
  }
42
61
  });
43
62
  export {
44
- B as default
63
+ S as default
45
64
  };
@@ -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
  };
@@ -3,8 +3,11 @@ type __VLS_ModelProps = {
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
5
  "update:modelValue": (value: string) => any;
6
+ } & {
7
+ blur: (value: string) => any;
6
8
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
7
9
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
10
+ onBlur?: ((value: string) => any) | undefined;
8
11
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
12
  declare const _default: typeof __VLS_export;
10
13
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"LabelInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/LabelInput.vue"],"names":[],"mappings":"AA+CA,KAAK,gBAAgB,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AAyEF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"LabelInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/LabelInput.vue"],"names":[],"mappings":"AAgEA,KAAK,gBAAgB,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AAgFF,QAAA,MAAM,YAAY;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./LabelInput.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5a23cb87"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a6458fc"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,29 +1,33 @@
1
- import { defineComponent as r, useModel as i, useId as d, createElementBlock as a, openBlock as p, createElementVNode as o, withDirectives as c, unref as n, vModelText as m } from "vue";
2
- const f = { class: "group pointer-events-none flex flex-1 items-center gap-1" }, v = ["for"], _ = ["id"], V = /* @__PURE__ */ r({
1
+ import { defineComponent as a, mergeModels as m, useModel as p, useId as c, createElementBlock as f, openBlock as v, createElementVNode as n, withDirectives as h, unref as u, withKeys as x, vModelText as _ } from "vue";
2
+ const b = { class: "group pointer-events-none flex flex-1 items-center gap-1" }, g = ["for"], w = ["id"], M = /* @__PURE__ */ a({
3
3
  __name: "LabelInput",
4
4
  props: {
5
5
  modelValue: { required: !0 },
6
6
  modelModifiers: {}
7
7
  },
8
- emits: ["update:modelValue"],
9
- setup(u) {
10
- const e = i(u, "modelValue"), t = d();
11
- return (h, l) => (p(), a("div", f, [
12
- o("label", {
8
+ emits: /* @__PURE__ */ m(["blur"], ["update:modelValue"]),
9
+ setup(r, { emit: s }) {
10
+ const i = s, t = p(r, "modelValue"), o = c(), d = () => {
11
+ i("blur", t.value);
12
+ };
13
+ return (V, e) => (v(), f("div", b, [
14
+ n("label", {
13
15
  class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
14
- for: n(t)
15
- }, null, 8, v),
16
- c(o("input", {
17
- id: n(t),
18
- "onUpdate:modelValue": l[0] || (l[0] = (s) => e.value = s),
16
+ for: u(o)
17
+ }, null, 8, g),
18
+ h(n("input", {
19
+ id: u(o),
20
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value = l),
19
21
  class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full flex-1 rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
20
- placeholder: "Untitled Document"
21
- }, null, 8, _), [
22
- [m, e.value]
22
+ placeholder: "Untitled Document",
23
+ onBlur: d,
24
+ onKeydown: e[1] || (e[1] = x((l) => l.target?.blur(), ["enter"]))
25
+ }, null, 40, w), [
26
+ [_, t.value]
23
27
  ])
24
28
  ]));
25
29
  }
26
30
  });
27
31
  export {
28
- V as default
32
+ M as default
29
33
  };
@@ -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
  };
@@ -1,11 +1,12 @@
1
- import { defineComponent as k, computed as x, ref as y, useTemplateRef as w, createElementBlock as i, openBlock as t, createElementVNode as o, createBlock as m, createCommentVNode as h, unref as n, withCtx as v, createVNode as r, Fragment as f, nextTick as B } from "vue";
2
- import { ScalarButton as b, ScalarMarkdown as C } from "@scalar/components";
3
- import { ScalarIconPencil as g } from "@scalar/icons";
4
- import I from "../../../components/code-input/CodeInput.vue.js";
5
- const S = { class: "flex flex-col gap-2" }, V = { class: "flex items-center justify-between gap-2 pl-1.5" }, z = { class: "has-[:focus-visible]:bg-b-1 group rounded-lg" }, N = {
1
+ import { defineComponent as g, computed as x, ref as y, useTemplateRef as w, createBlock as c, openBlock as t, withCtx as r, createElementVNode as l, createElementBlock as p, Fragment as f, createVNode as s, unref as o, createCommentVNode as B, createTextVNode as V, nextTick as h } from "vue";
2
+ import { ScalarMarkdown as C, ScalarButton as k } from "@scalar/components";
3
+ import { ScalarIconPencil as b } from "@scalar/icons";
4
+ import I from "../../settings/components/Section.vue.js";
5
+ import S from "../../../components/code-input/CodeInput.vue.js";
6
+ const z = { class: "has-focus-visible:bg-b-1 group rounded-lg" }, N = {
6
7
  key: 1,
7
8
  class: "text-c-3 flex items-center justify-center rounded-lg border p-4"
8
- }, j = /* @__PURE__ */ k({
9
+ }, W = /* @__PURE__ */ g({
9
10
  __name: "Overview",
10
11
  props: {
11
12
  documentSlug: {},
@@ -20,77 +21,83 @@ const S = { class: "flex flex-col gap-2" }, V = { class: "flex items-center just
20
21
  workspaceStore: {},
21
22
  activeWorkspace: {},
22
23
  plugins: {},
24
+ customThemes: {},
23
25
  collectionType: {}
24
26
  },
25
- setup(d) {
26
- const u = x(
27
- () => d.document?.info?.description ?? ""
28
- ), a = y("preview"), p = w("codeInputRef"), l = async (c) => {
29
- a.value = c, c === "edit" && (await B(), p.value?.focus());
27
+ setup(u) {
28
+ const d = x(
29
+ () => u.document?.info?.description ?? ""
30
+ ), a = y("preview"), v = w("codeInputRef"), i = async (m) => {
31
+ a.value = m, m === "edit" && (await h(), v.value?.focus());
30
32
  };
31
- return (c, e) => (t(), i("div", S, [
32
- o("div", V, [
33
- e[6] || (e[6] = o("h3", { class: "font-bold" }, "Description", -1)),
34
- a.value === "preview" ? (t(), m(n(b), {
33
+ return (m, e) => (t(), c(I, null, {
34
+ title: r(() => [...e[5] || (e[5] = [
35
+ V("Description", -1)
36
+ ])]),
37
+ actions: r(() => [
38
+ a.value === "preview" ? (t(), c(o(k), {
35
39
  key: 0,
36
40
  class: "text-c-2 hover:text-c-1 flex items-center gap-2",
37
41
  size: "sm",
38
42
  type: "button",
39
43
  variant: "outlined",
40
- onClick: e[0] || (e[0] = (s) => l("edit"))
44
+ onClick: e[0] || (e[0] = (n) => i("edit"))
41
45
  }, {
42
- default: v(() => [
43
- r(n(g), {
46
+ default: r(() => [
47
+ s(o(b), {
44
48
  size: "sm",
45
49
  thickness: "1.5"
46
50
  }),
47
- e[5] || (e[5] = o("span", null, "Edit", -1))
51
+ e[6] || (e[6] = l("span", null, "Edit", -1))
48
52
  ]),
49
53
  _: 1
50
- })) : h("", !0)
54
+ })) : B("", !0)
51
55
  ]),
52
- o("div", z, [
53
- a.value === "preview" ? (t(), i(f, { key: 0 }, [
54
- u.value.trim().length ? (t(), i(f, { key: 0 }, [
55
- r(n(C), {
56
- class: "flex-1 rounded border border-transparent p-1.5 hover:border-(--scalar-background-3)",
57
- value: u.value,
58
- withImages: "",
59
- onDblclick: e[1] || (e[1] = (s) => l("edit"))
60
- }, null, 8, ["value"]),
61
- e[7] || (e[7] = o("div", { class: "brightness-lifted bg-b-1 absolute inset-0 -z-1 hidden rounded group-hover:block group-has-[:focus-visible]:hidden" }, null, -1))
62
- ], 64)) : (t(), i("div", N, [
63
- r(n(b), {
64
- class: "hover:bg-b-2 hover:text-c-1 text-c-2 flex items-center gap-2",
65
- size: "sm",
66
- variant: "ghost",
67
- onClick: e[2] || (e[2] = (s) => l("edit"))
68
- }, {
69
- default: v(() => [
70
- r(n(g), {
71
- size: "sm",
72
- thickness: "1.5"
73
- }),
74
- e[8] || (e[8] = o("span", null, "Write a description", -1))
75
- ]),
76
- _: 1
77
- })
78
- ]))
79
- ], 64)) : (t(), m(n(I), {
80
- key: 1,
81
- ref_key: "codeInputRef",
82
- ref: p,
83
- class: "border px-0.5 py-0",
84
- environment: void 0,
85
- layout: d.layout,
86
- modelValue: u.value,
87
- onBlur: e[3] || (e[3] = (s) => l("preview")),
88
- "onUpdate:modelValue": e[4] || (e[4] = (s) => d.eventBus.emit("document:update:info", { description: s }))
89
- }, null, 8, ["layout", "modelValue"]))
90
- ])
91
- ]));
56
+ default: r(() => [
57
+ l("div", z, [
58
+ a.value === "preview" ? (t(), p(f, { key: 0 }, [
59
+ d.value.trim().length ? (t(), p(f, { key: 0 }, [
60
+ s(o(C), {
61
+ class: "flex-1 rounded border border-transparent p-1.5 hover:border-(--scalar-background-3)",
62
+ value: d.value,
63
+ withImages: "",
64
+ onDblclick: e[1] || (e[1] = (n) => i("edit"))
65
+ }, null, 8, ["value"]),
66
+ e[7] || (e[7] = l("div", { class: "brightness-lifted bg-b-1 absolute inset-0 -z-1 hidden rounded group-hover:block group-has-focus-visible:hidden" }, null, -1))
67
+ ], 64)) : (t(), p("div", N, [
68
+ s(o(k), {
69
+ class: "hover:bg-b-2 hover:text-c-1 text-c-2 flex items-center gap-2",
70
+ size: "sm",
71
+ variant: "ghost",
72
+ onClick: e[2] || (e[2] = (n) => i("edit"))
73
+ }, {
74
+ default: r(() => [
75
+ s(o(b), {
76
+ size: "sm",
77
+ thickness: "1.5"
78
+ }),
79
+ e[8] || (e[8] = l("span", null, "Write a description", -1))
80
+ ]),
81
+ _: 1
82
+ })
83
+ ]))
84
+ ], 64)) : (t(), c(o(S), {
85
+ key: 1,
86
+ ref_key: "codeInputRef",
87
+ ref: v,
88
+ class: "border px-0.5 py-0",
89
+ environment: void 0,
90
+ layout: u.layout,
91
+ modelValue: d.value,
92
+ onBlur: e[3] || (e[3] = (n) => i("preview")),
93
+ "onUpdate:modelValue": e[4] || (e[4] = (n) => u.eventBus.emit("document:update:info", { description: n }))
94
+ }, null, 8, ["layout", "modelValue"]))
95
+ ])
96
+ ]),
97
+ _: 1
98
+ }));
92
99
  }
93
100
  });
94
101
  export {
95
- j as default
102
+ W as default
96
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Servers.vue"],"names":[],"mappings":"AAukBA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Servers.vue"],"names":[],"mappings":"AAkkBA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}