@scalar/api-reference 1.32.5 → 1.32.7

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 (94) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser/standalone.js +9924 -9851
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +8 -8
  6. package/dist/components/Badge/Badge.vue.js +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +28 -26
  10. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  12. package/dist/components/Content/Schema/Schema.vue2.js +97 -156
  13. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts +7 -0
  14. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -0
  15. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +7 -0
  16. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +25 -0
  17. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  19. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +73 -90
  20. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +21 -0
  21. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -0
  22. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +92 -0
  23. package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +4 -0
  24. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -2
  25. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  27. package/dist/components/Content/Schema/SchemaProperty.vue2.js +54 -55
  28. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
  29. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +0 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  33. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +81 -97
  34. package/dist/components/Content/Schema/helpers/{formatExample.d.ts → format-example.d.ts} +1 -1
  35. package/dist/components/Content/Schema/helpers/format-example.d.ts.map +1 -0
  36. package/dist/components/Content/Schema/helpers/is-type-object.d.ts +3 -0
  37. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -0
  38. package/dist/components/Content/Schema/helpers/is-type-object.js +17 -0
  39. package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.d.ts → optimize-value-for-display.d.ts} +1 -1
  40. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -0
  41. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  43. package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
  44. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  45. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  46. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  47. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -2
  48. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  49. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  50. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +8 -8
  51. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +4 -2
  52. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  53. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  54. package/dist/features/Operation/layouts/ModernLayout.vue2.js +30 -30
  55. package/dist/features/api-client-modal/useApiClient.d.ts +84 -4
  56. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  57. package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -1
  58. package/dist/features/download-link/DownloadLink.vue.js +1 -1
  59. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -1
  60. package/dist/features/example-request/ExampleRequest.vue.js +1 -1
  61. package/dist/features/example-request/ExampleRequest.vue2.js +126 -124
  62. package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
  63. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  64. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  65. package/dist/features/sidebar/components/SidebarElement.vue.js +2 -2
  66. package/dist/features/sidebar/components/SidebarElement.vue2.js +16 -15
  67. package/dist/helpers/convert-security-scheme.d.ts +9 -0
  68. package/dist/helpers/convert-security-scheme.d.ts.map +1 -0
  69. package/dist/index.js +1 -1
  70. package/dist/libs/openapi.d.ts +0 -13
  71. package/dist/libs/openapi.d.ts.map +1 -1
  72. package/dist/libs/openapi.js +49 -63
  73. package/dist/stores/useHttpClientStore.js +20 -20
  74. package/dist/style.css +1 -1
  75. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  76. package/dist/v2/ApiReferenceWorkspace.vue.js +84 -75
  77. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +19 -0
  78. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -0
  79. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +21 -72
  80. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  81. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +4 -2
  82. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
  83. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +5 -0
  84. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +1 -0
  85. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -1
  86. package/dist/v2/events/definitions.d.ts +13 -4
  87. package/dist/v2/events/definitions.d.ts.map +1 -1
  88. package/dist/v2/hooks/useStore.d.ts +9 -0
  89. package/dist/v2/hooks/useStore.d.ts.map +1 -0
  90. package/package.json +13 -12
  91. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +0 -1
  92. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +0 -1
  93. /package/dist/components/Content/Schema/helpers/{formatExample.js → format-example.js} +0 -0
  94. /package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.js → optimize-value-for-display.js} +0 -0
@@ -1,9 +1,9 @@
1
- import { defineComponent as I, computed as N, useId as O, createBlock as l, openBlock as s, unref as o, withCtx as r, createVNode as a, createCommentVNode as i, createElementVNode as n, normalizeClass as S, createTextVNode as m, toDisplayString as q, createSlots as W } from "vue";
1
+ import { defineComponent as I, computed as N, useId as O, createBlock as l, openBlock as s, unref as o, withCtx as t, createVNode as a, createCommentVNode as i, createElementVNode as n, normalizeClass as S, createTextVNode as m, toDisplayString as q, createSlots as W } from "vue";
2
2
  import { ScalarMarkdown as D, ScalarErrorBoundary as p } from "@scalar/components";
3
3
  import { ScalarIconWebhooksLogo as L } from "@scalar/icons";
4
- import P from "../../../components/OperationPath.vue.js";
5
- import { useConfig as R } from "../../../hooks/useConfig.js";
6
- import { getOperationStability as C, getOperationStabilityColor as $, isOperationDeprecated as z } from "../../../libs/openapi.js";
4
+ import { getOperationStability as C, getOperationStabilityColor as P, isOperationDeprecated as R } from "@scalar/oas-utils/helpers";
5
+ import $ from "../../../components/OperationPath.vue.js";
6
+ import { useConfig as z } from "../../../hooks/useConfig.js";
7
7
  import A from "../components/callbacks/Callbacks.vue.js";
8
8
  import H from "../components/OperationParameters.vue.js";
9
9
  import M from "../components/OperationResponses.vue.js";
@@ -36,7 +36,7 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
36
36
  const u = N(() => {
37
37
  var e;
38
38
  return ((e = d.operation) == null ? void 0 : e.summary) || d.path || "";
39
- }), T = w, c = O(), E = R(), f = (e) => {
39
+ }), T = w, c = O(), E = z(), f = (e) => {
40
40
  T("update:modelValue", e);
41
41
  };
42
42
  return (e, h) => (s(), l(o(U), {
@@ -45,16 +45,16 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
45
45
  label: u.value,
46
46
  tabindex: "-1"
47
47
  }, {
48
- default: r(() => [
48
+ default: t(() => [
49
49
  a(o(j), {
50
50
  loading: o(E).isLoading
51
51
  }, {
52
- default: r(() => [
52
+ default: t(() => [
53
53
  o(C)(e.operation) ? (s(), l(o(B), {
54
54
  key: 0,
55
- class: S(["capitalize", o($)(e.operation)])
55
+ class: S(["capitalize", o(P)(e.operation)])
56
56
  }, {
57
- default: r(() => [
57
+ default: t(() => [
58
58
  m(q(o(C)(e.operation)), 1)
59
59
  ]),
60
60
  _: 1
@@ -63,24 +63,24 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
63
63
  key: 1,
64
64
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
65
65
  }, {
66
- default: r(() => [
66
+ default: t(() => [
67
67
  a(o(L), { weight: "bold" }),
68
68
  h[0] || (h[0] = m("Webhook "))
69
69
  ]),
70
70
  _: 1
71
71
  })) : i("", !0),
72
72
  n("div", {
73
- class: S(o(z)(e.operation) ? "deprecated" : "")
73
+ class: S(o(R)(e.operation) ? "deprecated" : "")
74
74
  }, [
75
75
  a(o(F), null, {
76
- default: r(() => [
76
+ default: t(() => [
77
77
  a(o(G), { id: e.id }, {
78
- default: r(() => [
78
+ default: t(() => [
79
79
  a(o(J), {
80
80
  id: o(c),
81
81
  level: 3
82
82
  }, {
83
- default: r(() => [
83
+ default: t(() => [
84
84
  m(q(u.value), 1)
85
85
  ]),
86
86
  _: 1
@@ -93,14 +93,14 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
93
93
  })
94
94
  ], 2),
95
95
  a(o(K), null, {
96
- default: r(() => [
96
+ default: t(() => [
97
97
  a(o(V), null, {
98
- default: r(() => {
99
- var t, b, y, g;
98
+ default: t(() => {
99
+ var r, b, y, g;
100
100
  return [
101
101
  n("div", Z, [
102
102
  a(o(D), {
103
- value: (t = e.operation) == null ? void 0 : t.description,
103
+ value: (r = e.operation) == null ? void 0 : r.description,
104
104
  withImages: "",
105
105
  withAnchors: "",
106
106
  transformType: "heading",
@@ -117,7 +117,7 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
117
117
  schemas: e.schemas
118
118
  }, null, 8, ["responses", "schemas"]),
119
119
  a(o(p), null, {
120
- default: r(() => {
120
+ default: t(() => {
121
121
  var k, v;
122
122
  return [
123
123
  (k = e.operation) != null && k.callbacks ? (s(), l(A, {
@@ -136,10 +136,10 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
136
136
  _: 1
137
137
  }),
138
138
  a(o(V), null, {
139
- default: r(() => [
139
+ default: t(() => [
140
140
  n("div", _, [
141
141
  a(o(p), null, {
142
- default: r(() => [
142
+ default: t(() => [
143
143
  a(o(Q), {
144
144
  request: e.request,
145
145
  method: e.method,
@@ -150,12 +150,12 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
150
150
  schemas: e.schemas,
151
151
  "onUpdate:modelValue": f
152
152
  }, W({
153
- header: r(() => {
154
- var t;
153
+ header: t(() => {
154
+ var r;
155
155
  return [
156
- a(P, {
157
- class: "example-path",
158
- deprecated: (t = e.operation) == null ? void 0 : t.deprecated,
156
+ a($, {
157
+ class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
158
+ deprecated: (r = e.operation) == null ? void 0 : r.deprecated,
159
159
  path: e.path
160
160
  }, null, 8, ["deprecated", "path"])
161
161
  ];
@@ -164,7 +164,7 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
164
164
  }, [
165
165
  e.request ? {
166
166
  name: "footer",
167
- fn: r(() => [
167
+ fn: t(() => [
168
168
  a(o(X), { operation: e.request }, null, 8, ["operation"])
169
169
  ]),
170
170
  key: "0"
@@ -174,11 +174,11 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
174
174
  _: 1
175
175
  }),
176
176
  a(o(p), null, {
177
- default: r(() => {
178
- var t;
177
+ default: t(() => {
178
+ var r;
179
179
  return [
180
180
  a(o(Y), {
181
- responses: (t = e.operation) == null ? void 0 : t.responses,
181
+ responses: (r = e.operation) == null ? void 0 : r.responses,
182
182
  style: { "margin-top": "12px" }
183
183
  }, null, 8, ["responses"])
184
184
  ];