@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.27.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8159](https://github.com/scalar/scalar/pull/8159): fix: do not mutate document after ingress
8
+ - [#8158](https://github.com/scalar/scalar/pull/8158): fix: disable all listeners when modal is closed
9
+ - [#8178](https://github.com/scalar/scalar/pull/8178): chore: package bump due to ci failure
10
+
11
+ #### Updated Dependencies
12
+
13
+ - **@scalar/workspace-store@0.32.1**
14
+ - [#8159](https://github.com/scalar/scalar/pull/8159): fix: do not mutate document after ingress
15
+ - [#8178](https://github.com/scalar/scalar/pull/8178): chore: package bump due to ci failure
16
+
17
+ - **@scalar/components@0.19.4**
18
+ - [#8178](https://github.com/scalar/scalar/pull/8178): chore: package bump due to ci failure
19
+
20
+ - **@scalar/helpers@0.2.12**
21
+ - [#8178](https://github.com/scalar/scalar/pull/8178): chore: package bump due to ci failure
22
+
23
+ - **@scalar/sidebar@0.7.35**
24
+ - [#8178](https://github.com/scalar/scalar/pull/8178): chore: package bump due to ci failure
25
+
26
+ - **@scalar/oas-utils@0.6.42**
27
+
28
+ - **@scalar/use-codemirror@0.13.39**
29
+
30
+ - **@scalar/import@0.4.49**
31
+
32
+ - **@scalar/json-magic@0.11.1**
33
+
34
+ - **@scalar/object-utils@1.2.26**
35
+
36
+ - **@scalar/openapi-parser@0.24.10**
37
+
38
+ - **@scalar/postman-to-openapi@0.4.4**
39
+
40
+ - **@scalar/types@0.6.3**
41
+
42
+ - **@scalar/snippetz@0.6.12**
43
+
44
+ ## 2.27.0
45
+
46
+ ### Minor Changes
47
+
48
+ - [#8152](https://github.com/scalar/scalar/pull/8152): feat: support custom themes
49
+
50
+ ### Patch Changes
51
+
52
+ - [#8135](https://github.com/scalar/scalar/pull/8135): feat: added support for OpenID Connect Discovery
53
+ - [#8149](https://github.com/scalar/scalar/pull/8149): fix: prefill parameter inputs from parameter-level examples
54
+ - [#8155](https://github.com/scalar/scalar/pull/8155): fix(api-reference): bugs with cards rendering
55
+ - [#8138](https://github.com/scalar/scalar/pull/8138): chore: some minor style and ui updates
56
+ - [#8157](https://github.com/scalar/scalar/pull/8157): fix: navigate to workspace settings from the menu
57
+ - [#8154](https://github.com/scalar/scalar/pull/8154): fix: scrolling issues in client modal
58
+ - [#8156](https://github.com/scalar/scalar/pull/8156): fix: only trigger send request when client is open
59
+
60
+ #### Updated Dependencies
61
+
62
+ - **@scalar/workspace-store@0.32.0**
63
+ - [#8135](https://github.com/scalar/scalar/pull/8135): feat: added support for OpenID Connect Discovery
64
+ - [#8152](https://github.com/scalar/scalar/pull/8152): feat: support custom themes
65
+
66
+ - **@scalar/components@0.19.3**
67
+ - [#8155](https://github.com/scalar/scalar/pull/8155): fix(api-reference): bugs with cards rendering
68
+
69
+ - **@scalar/oas-utils@0.6.41**
70
+
71
+ - **@scalar/sidebar@0.7.34**
72
+
73
+ - **@scalar/use-codemirror@0.13.38**
74
+
3
75
  ## 2.26.2
4
76
 
5
77
  ### Patch Changes
@@ -1,11 +1,11 @@
1
- import { defineComponent as x, computed as a, watch as w, createBlock as b, createElementBlock as h, openBlock as v, unref as n, withCtx as f, createVNode as m, createElementVNode as l, toDisplayString as g } from "vue";
1
+ import { defineComponent as g, computed as a, watch as w, createBlock as b, createElementBlock as h, openBlock as v, unref as n, withCtx as f, createVNode as m, createElementVNode as l, toDisplayString as x } from "vue";
2
2
  import { ScalarListbox as y, ScalarButton as k } from "@scalar/components";
3
3
  import { ScalarIconCaretDown as U } from "@scalar/icons";
4
4
  import { useWorkspace as V } from "../../store/store.js";
5
5
  const B = { class: "overflow-x-auto" }, W = {
6
6
  key: 1,
7
- class: "text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap"
8
- }, z = { class: "overflow-x-auto" }, j = /* @__PURE__ */ x({
7
+ class: "text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap"
8
+ }, z = { class: "overflow-x-auto" }, j = /* @__PURE__ */ g({
9
9
  __name: "ServerSelector",
10
10
  props: {
11
11
  collection: {},
@@ -56,12 +56,12 @@ const B = { class: "overflow-x-auto" }, W = {
56
56
  }, {
57
57
  default: f(() => [
58
58
  m(n(k), {
59
- class: "bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-lg px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1",
59
+ class: "bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1",
60
60
  variant: "ghost"
61
61
  }, {
62
62
  default: f(() => [
63
63
  e[1] || (e[1] = l("span", { class: "sr-only" }, "Server:", -1)),
64
- l("span", B, g(d.value), 1),
64
+ l("span", B, x(d.value), 1),
65
65
  m(n(U), {
66
66
  weight: "bold",
67
67
  class: "text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100"
@@ -73,7 +73,7 @@ const B = { class: "overflow-x-auto" }, W = {
73
73
  _: 1
74
74
  }, 8, ["modelValue", "options", "target", "teleport"])) : (v(), h("div", W, [
75
75
  e[2] || (e[2] = l("span", { class: "sr-only" }, "Server:", -1)),
76
- l("span", z, g(d.value), 1)
76
+ l("span", z, x(d.value), 1)
77
77
  ]));
78
78
  }
79
79
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, useId as v, ref as C, onMounted as k, createBlock as p, openBlock as s, unref as t, normalizeClass as r, withCtx as c, createElementVNode as a, createVNode as b, createElementBlock as u, createCommentVNode as i, renderSlot as d, createTextVNode as V, toDisplayString as x, mergeProps as O } from "vue";
1
+ import { defineComponent as g, useId as v, ref as C, onMounted as k, createBlock as p, openBlock as s, unref as t, normalizeClass as r, withCtx as c, createElementVNode as a, createVNode as x, createElementBlock as u, createCommentVNode as i, renderSlot as d, createTextVNode as V, toDisplayString as b, mergeProps as O } from "vue";
2
2
  import { Disclosure as w, DisclosureButton as B, DisclosurePanel as $ } from "@headlessui/vue";
3
3
  import { ScalarIcon as D } from "@scalar/components";
4
4
  const N = ["aria-labelledby"], I = { class: "text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]" }, S = ["id"], z = {
@@ -37,9 +37,9 @@ const N = ["aria-labelledby"], I = { class: "text-c-1 m-0 flex flex-1 items-cent
37
37
  class: "contents"
38
38
  }, [
39
39
  a("div", {
40
- class: r(["bg-b-2 flex items-center", e.layout === "reference" && "rounded-t-lg border border-b-0"])
40
+ class: r(["bg-b-2 flex items-center", e.layout === "reference" && "rounded-t-xl border border-b-0"])
41
41
  }, [
42
- b(t(B), {
42
+ x(t(B), {
43
43
  class: r([
44
44
  "hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2",
45
45
  { "!pl-3": e.layout === "reference" }
@@ -64,8 +64,8 @@ const N = ["aria-labelledby"], I = { class: "text-c-1 m-0 flex flex-1 items-cent
64
64
  l ? i("", !0) : (s(), u("span", z, " (Collapsed) "))
65
65
  ], 8, S),
66
66
  !l && e.itemCount ? (s(), u("span", E, [
67
- V(x(e.itemCount) + " ", 1),
68
- a("span", P, "Item" + x(e.itemCount === 1 ? "" : "s"), 1)
67
+ V(b(e.itemCount) + " ", 1),
68
+ a("span", P, "Item" + b(e.itemCount === 1 ? "" : "s"), 1)
69
69
  ])) : i("", !0)
70
70
  ])
71
71
  ]),
@@ -75,7 +75,7 @@ const N = ["aria-labelledby"], I = { class: "text-c-1 m-0 flex flex-1 items-cent
75
75
  d(o.$slots, "actions", { open: l })
76
76
  ])) : i("", !0)
77
77
  ], 2),
78
- b(t($), O(o.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
78
+ x(t($), O(o.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
79
79
  default: c(() => [
80
80
  d(o.$slots, "default", { open: l })
81
81
  ]),