@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
@@ -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"}
@@ -1,14 +1,15 @@
1
- import { defineComponent as M, ref as A, computed as x, createElementBlock as u, openBlock as c, Fragment as S, createElementVNode as s, createVNode as o, createTextVNode as g, renderList as I, createBlock as y, unref as r, toDisplayString as T, withCtx as f, createCommentVNode as V } from "vue";
1
+ import { defineComponent as M, ref as T, computed as x, createElementBlock as v, openBlock as n, Fragment as g, createVNode as a, withCtx as i, createElementVNode as c, renderList as A, createBlock as y, unref as s, toDisplayString as I, createCommentVNode as V, createTextVNode as p } from "vue";
2
2
  import { useModal as P, ScalarMarkdown as z, ScalarButton as k, ScalarModal as L } from "@scalar/components";
3
3
  import { debounce as O } from "@scalar/helpers/general/debounce";
4
4
  import { ScalarIconTrash as R, ScalarIconPlus as j } from "@scalar/icons";
5
5
  import E from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
6
- import F from "./Form.vue.js";
7
- import W from "../../../../components/Server/ServerVariablesForm.vue.js";
8
- const Y = { class: "flex flex-col gap-4" }, q = { class: "flex flex-col gap-4" }, G = { class: "bg-b-2 flex items-center justify-between rounded-t-lg px-3 py-1 text-sm" }, H = {
6
+ import F from "../../settings/components/Section.vue.js";
7
+ import W from "./Form.vue.js";
8
+ import Y from "../../../../components/Server/ServerVariablesForm.vue.js";
9
+ const q = { class: "flex flex-col gap-4" }, G = { class: "bg-b-2 flex items-center justify-between rounded-t-lg px-3 py-1 text-sm" }, H = {
9
10
  key: 1,
10
11
  class: "self-center"
11
- }, J = { class: "divide-0 flex w-full flex-col divide-y rounded-b-lg text-sm" }, K = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, re = /* @__PURE__ */ M({
12
+ }, J = { class: "divide-0 flex w-full flex-col divide-y rounded-b-lg text-sm" }, K = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, oe = /* @__PURE__ */ M({
12
13
  __name: "Servers",
13
14
  props: {
14
15
  documentSlug: {},
@@ -23,12 +24,13 @@ const Y = { class: "flex flex-col gap-4" }, q = { class: "flex flex-col gap-4" }
23
24
  workspaceStore: {},
24
25
  activeWorkspace: {},
25
26
  plugins: {},
27
+ customThemes: {},
26
28
  collectionType: {}
27
29
  },
28
- setup(l) {
29
- const v = P(), n = A(-1), _ = x(
30
- () => l.document?.servers?.[n.value]
31
- ), $ = x(() => l.document?.servers ?? []), B = [
30
+ setup(o) {
31
+ const m = P(), l = T(-1), _ = x(
32
+ () => o.document?.servers?.[l.value]
33
+ ), $ = x(() => o.document?.servers ?? []), B = [
32
34
  {
33
35
  label: "URL",
34
36
  key: "url",
@@ -40,98 +42,101 @@ const Y = { class: "flex flex-col gap-4" }, q = { class: "flex flex-col gap-4" }
40
42
  placeholder: "Production"
41
43
  }
42
44
  ], w = (t) => {
43
- n.value = t, v.show();
44
- }, p = () => {
45
- v.hide(), n.value = -1;
45
+ l.value = t, m.show();
46
+ }, b = () => {
47
+ m.hide(), l.value = -1;
46
48
  }, N = () => {
47
- n.value < 0 || (l.eventBus.emit("server:delete:server", { index: n.value }), p());
48
- }, { execute: h } = O({ delay: 328, maxWait: 1e3 }), U = (t, e, a) => h(
49
+ l.value < 0 || (o.eventBus.emit("server:delete:server", { index: l.value }), b());
50
+ }, { execute: h } = O({ delay: 328, maxWait: 1e3 }), U = (t, e, r) => h(
49
51
  `${t}-${e}`,
50
- () => l.eventBus.emit("server:update:server", {
52
+ () => o.eventBus.emit("server:update:server", {
51
53
  index: t,
52
- server: { [e]: a }
54
+ server: { [e]: r }
53
55
  })
54
- ), C = (t, e, a) => h(
56
+ ), C = (t, e, r) => h(
55
57
  `${t}-${e}`,
56
- () => l.eventBus.emit("server:update:variables", {
58
+ () => o.eventBus.emit("server:update:variables", {
57
59
  index: t,
58
60
  key: e,
59
- value: a
61
+ value: r
60
62
  })
61
- ), D = () => l.eventBus.emit("server:add:server"), b = (t, e = 0) => t?.description || `Server ${e + 1}`;
62
- return (t, e) => (c(), u(S, null, [
63
- s("div", Y, [
64
- e[1] || (e[1] = s("div", { class: "flex flex-col gap-2" }, [
65
- s("h3", { class: "font-bold" }, "Servers"),
66
- s("p", { class: "text-sm" }, [
67
- g(" Add different base URLs for your API. You can use "),
68
- s("code", { class: "font-code text-c-2" }, "{variables}"),
69
- g(" for dynamic parts. ")
63
+ ), D = () => o.eventBus.emit("server:add:server"), S = (t, e = 0) => t?.description || `Server ${e + 1}`;
64
+ return (t, e) => (n(), v(g, null, [
65
+ a(F, null, {
66
+ title: i(() => [...e[0] || (e[0] = [
67
+ p("Servers", -1)
68
+ ])]),
69
+ description: i(() => [...e[1] || (e[1] = [
70
+ p(" Add different base URLs for your API. You can use ", -1),
71
+ c("code", { class: "font-code text-c-2" }, "{variables}", -1),
72
+ p(" for dynamic parts. ", -1)
73
+ ])]),
74
+ default: i(() => [
75
+ c("div", q, [
76
+ (n(!0), v(g, null, A($.value, (r, d) => (n(), v("div", {
77
+ key: d,
78
+ class: "rounded-lg border"
79
+ }, [
80
+ c("div", G, [
81
+ r.description ? (n(), y(s(z), {
82
+ key: 0,
83
+ class: "self-center",
84
+ value: r.description
85
+ }, null, 8, ["value"])) : (n(), v("span", H, I(S(r, d)), 1)),
86
+ a(s(k), {
87
+ class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
88
+ "data-testid": "delete-server-button",
89
+ variant: "ghost",
90
+ onClick: (u) => w(d)
91
+ }, {
92
+ default: i(() => [
93
+ a(s(R), { class: "size-3.5" })
94
+ ]),
95
+ _: 1
96
+ }, 8, ["onClick"])
97
+ ]),
98
+ c("div", J, [
99
+ a(W, {
100
+ data: r,
101
+ environment: o.environment,
102
+ onUpdate: (u, f) => U(d, u, f),
103
+ options: B
104
+ }, null, 8, ["data", "environment", "onUpdate"]),
105
+ r.variables ? (n(), y(s(Y), {
106
+ key: 0,
107
+ variables: r.variables,
108
+ "onUpdate:variable": (u, f) => C(d, u, f)
109
+ }, null, 8, ["variables", "onUpdate:variable"])) : V("", !0)
110
+ ])
111
+ ]))), 128))
112
+ ]),
113
+ c("div", K, [
114
+ a(s(k), {
115
+ class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
116
+ size: "sm",
117
+ variant: "ghost",
118
+ onClick: D
119
+ }, {
120
+ default: i(() => [
121
+ a(s(j)),
122
+ e[2] || (e[2] = c("span", null, "Add Server", -1))
123
+ ]),
124
+ _: 1
125
+ })
70
126
  ])
71
- ], -1)),
72
- s("div", q, [
73
- (c(!0), u(S, null, I($.value, (a, d) => (c(), u("div", {
74
- key: d,
75
- class: "rounded-lg border"
76
- }, [
77
- s("div", G, [
78
- a.description ? (c(), y(r(z), {
79
- key: 0,
80
- class: "self-center",
81
- value: a.description
82
- }, null, 8, ["value"])) : (c(), u("span", H, T(b(a, d)), 1)),
83
- o(r(k), {
84
- class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
85
- "data-testid": "delete-server-button",
86
- variant: "ghost",
87
- onClick: (i) => w(d)
88
- }, {
89
- default: f(() => [
90
- o(r(R), { class: "size-3.5" })
91
- ]),
92
- _: 1
93
- }, 8, ["onClick"])
94
- ]),
95
- s("div", J, [
96
- o(F, {
97
- data: a,
98
- environment: l.environment,
99
- onUpdate: (i, m) => U(d, i, m),
100
- options: B
101
- }, null, 8, ["data", "environment", "onUpdate"]),
102
- a.variables ? (c(), y(r(W), {
103
- key: 0,
104
- variables: a.variables,
105
- "onUpdate:variable": (i, m) => C(d, i, m)
106
- }, null, 8, ["variables", "onUpdate:variable"])) : V("", !0)
107
- ])
108
- ]))), 128))
109
127
  ]),
110
- s("div", K, [
111
- o(r(k), {
112
- class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
113
- size: "sm",
114
- variant: "ghost",
115
- onClick: D
116
- }, {
117
- default: f(() => [
118
- o(r(j)),
119
- e[0] || (e[0] = s("span", null, "Add Server", -1))
120
- ]),
121
- _: 1
122
- })
123
- ])
124
- ]),
125
- o(r(L), {
128
+ _: 1
129
+ }),
130
+ a(s(L), {
126
131
  size: "xxs",
127
- state: r(v),
128
- title: `Delete ${b(_.value, n.value)}`
132
+ state: s(m),
133
+ title: `Delete ${S(_.value, l.value)}`
129
134
  }, {
130
- default: f(() => [
131
- o(E, {
135
+ default: i(() => [
136
+ a(E, {
132
137
  variableName: "Server",
133
138
  warningMessage: "Are you sure you want to delete this server? This action cannot be undone.",
134
- onClose: p,
139
+ onClose: b,
135
140
  onDelete: N
136
141
  })
137
142
  ]),
@@ -141,5 +146,5 @@ const Y = { class: "flex flex-col gap-4" }, q = { class: "flex flex-col gap-4" }
141
146
  }
142
147
  });
143
148
  export {
144
- re as default
149
+ oe as default
145
150
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Settings.vue"],"names":[],"mappings":"AA6KA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Settings.vue"],"names":[],"mappings":"AA0LA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as u, createBlock as c, openBlock as a, unref as n } from "vue";
2
- import i from "../../settings/DocumentSettings.vue.js";
3
- import s from "../../settings/CollectionSettings.vue.js";
4
- const f = /* @__PURE__ */ u({
1
+ import { defineComponent as r, createBlock as c, openBlock as a, unref as n } from "vue";
2
+ import s from "../../settings/DocumentSettings.vue.js";
3
+ import i from "../../settings/CollectionSettings.vue.js";
4
+ const x = /* @__PURE__ */ r({
5
5
  __name: "Settings",
6
6
  props: {
7
7
  documentSlug: {},
@@ -16,37 +16,39 @@ const f = /* @__PURE__ */ u({
16
16
  workspaceStore: {},
17
17
  activeWorkspace: {},
18
18
  plugins: {},
19
+ customThemes: {},
19
20
  collectionType: {}
20
21
  },
21
22
  setup(e) {
22
- const d = (t) => {
23
+ const m = (t) => {
23
24
  e.eventBus.emit("document:update:watch-mode", t);
24
- }, m = (t) => {
25
+ }, u = (t) => {
25
26
  e.eventBus.emit("workspace:update:theme", t);
26
- }, r = (t) => {
27
- e.eventBus.emit("workspace:update:active-proxy", t);
28
27
  }, l = (t) => {
28
+ e.eventBus.emit("workspace:update:active-proxy", t);
29
+ }, d = (t) => {
29
30
  e.eventBus.emit("workspace:update:color-mode", t);
30
31
  };
31
- return (t, o) => e.collectionType === "document" ? (a(), c(n(i), {
32
+ return (t, o) => e.collectionType === "document" ? (a(), c(n(s), {
32
33
  key: 0,
33
34
  documentUrl: e.document?.["x-scalar-original-source-url"],
34
35
  isDraftDocument: e.documentSlug === "drafts",
35
36
  title: e.document?.info.title ?? "",
36
37
  watchMode: e.document?.["x-scalar-watch-mode"],
37
38
  "onDelete:document": o[0] || (o[0] = (h) => e.eventBus.emit("document:delete:document", { name: e.documentSlug })),
38
- "onUpdate:watchMode": d
39
- }, null, 8, ["documentUrl", "isDraftDocument", "title", "watchMode"])) : (a(), c(n(s), {
39
+ "onUpdate:watchMode": m
40
+ }, null, 8, ["documentUrl", "isDraftDocument", "title", "watchMode"])) : (a(), c(n(i), {
40
41
  key: 1,
41
42
  activeProxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"],
42
- activeThemeId: e.workspaceStore.workspace["x-scalar-theme"] ?? "default",
43
+ activeThemeSlug: e.workspaceStore.workspace["x-scalar-theme"] ?? "none",
43
44
  colorMode: e.workspaceStore.workspace["x-scalar-color-mode"] ?? "system",
44
- "onUpdate:colorMode": l,
45
- "onUpdate:proxyUrl": r,
46
- "onUpdate:themeId": m
47
- }, null, 8, ["activeProxyUrl", "activeThemeId", "colorMode"]));
45
+ customThemes: e.customThemes,
46
+ "onUpdate:colorMode": d,
47
+ "onUpdate:proxyUrl": l,
48
+ "onUpdate:themeSlug": u
49
+ }, null, 8, ["activeProxyUrl", "activeThemeSlug", "colorMode", "customThemes"]));
48
50
  }
49
51
  });
50
52
  export {
51
- f as default
53
+ x as default
52
54
  };
@@ -37,7 +37,7 @@ const A = { class: "text-c-3 flex h-full items-center justify-center rounded-lg
37
37
  T("div", A, [
38
38
  i(r(k), {
39
39
  class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
40
- size: "sm",
40
+ size: "xs",
41
41
  variant: "ghost",
42
42
  onClick: l[0] || (l[0] = () => a())
43
43
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"CookiesTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/global-cookies/components/CookiesTable.vue"],"names":[],"mappings":"AAuPA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AAYxG,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GAAG,cAAc,CAAC;AA6erB,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"CookiesTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/global-cookies/components/CookiesTable.vue"],"names":[],"mappings":"AAuPA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AAYxG,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GAAG,cAAc,CAAC;AA8erB,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./CookiesTable.vue2.js";
2
2
  /* empty css */
3
- import f from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ f(o, [["__scopeId", "data-v-6fc24fdf"]]);
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ddfccc08"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -2,11 +2,11 @@ import { defineComponent as y, computed as T, createBlock as p, openBlock as c,
2
2
  import { ScalarButton as U } from "@scalar/components";
3
3
  import { ScalarIconTrash as I } from "@scalar/icons";
4
4
  import $ from "../../../components/data-table/DataTable.vue.js";
5
- import b from "../../../components/data-table/DataTableRow.vue.js";
5
+ import k from "../../../components/data-table/DataTableRow.vue.js";
6
6
  import m from "../../../components/data-table/DataTableHeader.vue.js";
7
7
  import R from "../../../components/data-table/DataTableCheckbox.vue.js";
8
8
  import f from "../../../components/data-table/DataTableCell.vue.js";
9
- import k from "../../../components/code-input/CodeInput.vue.js";
9
+ import b from "../../../components/code-input/CodeInput.vue.js";
10
10
  const M = /* @__PURE__ */ y({
11
11
  __name: "CookiesTable",
12
12
  props: {
@@ -48,11 +48,11 @@ const M = /* @__PURE__ */ y({
48
48
  collectionType: i.collectionType
49
49
  });
50
50
  return (d, l) => (c(), p(a($), {
51
- class: "group/table data-table h-min flex-1 rounded border",
51
+ class: "group/table data-table h-min flex-1 rounded border border-t-0",
52
52
  columns: v
53
53
  }, {
54
54
  default: n(() => [
55
- o(a(b), { class: "sr-only !block" }, {
55
+ o(a(k), { class: "sr-only !block" }, {
56
56
  default: n(() => [
57
57
  o(a(m), null, {
58
58
  default: n(() => [...l[0] || (l[0] = [
@@ -87,7 +87,7 @@ const M = /* @__PURE__ */ y({
87
87
  ]),
88
88
  _: 1
89
89
  }),
90
- (c(!0), D(h, null, B(V.value, (e, t) => (c(), p(a(b), {
90
+ (c(!0), D(h, null, B(V.value, (e, t) => (c(), p(a(k), {
91
91
  key: t,
92
92
  class: "group/row"
93
93
  }, {
@@ -99,7 +99,7 @@ const M = /* @__PURE__ */ y({
99
99
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
100
100
  o(a(f), null, {
101
101
  default: n(() => [
102
- o(a(k), {
102
+ o(a(b), {
103
103
  "aria-label": "Cookie Name",
104
104
  disableCloseBrackets: "",
105
105
  disableTabIndent: "",
@@ -120,7 +120,7 @@ const M = /* @__PURE__ */ y({
120
120
  }, 1024),
121
121
  o(a(f), null, {
122
122
  default: n(() => [
123
- o(a(k), {
123
+ o(a(b), {
124
124
  "aria-label": "Cookie Value",
125
125
  disableTabIndent: "",
126
126
  environment: void 0,
@@ -140,7 +140,7 @@ const M = /* @__PURE__ */ y({
140
140
  }, 1024),
141
141
  o(a(f), null, {
142
142
  default: n(() => [
143
- o(a(k), {
143
+ o(a(b), {
144
144
  "aria-label": "Cookie Domain",
145
145
  disableCloseBrackets: "",
146
146
  disableTabIndent: "",
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AA4NA,OAAO,EAAE,KAAK,UAAU,EAA4B,MAAM,oBAAoB,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAKZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAQxF,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CACvB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,SAAS,CACZ,CACF,CACF,CAAA;CACF,CAAA;AAED;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;;;mPA8Qd,CAAC"}
1
+ {"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AA4NA,OAAO,EAAE,KAAK,UAAU,EAA4B,MAAM,oBAAoB,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAKZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAQxF,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CACvB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,SAAS,CACZ,CACF,CACF,CAAA;CACF,CAAA;AAED;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;;;mPAgRd,CAAC"}