@scalar/api-reference 1.34.1 → 1.34.4

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 (113) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/README.md +1 -1
  3. package/dist/browser/standalone.js +13121 -12730
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Badge/Badge.vue.d.ts +4 -1
  6. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  7. package/dist/components/Badge/Badge.vue.js +5 -11
  8. package/dist/components/Badge/Badge.vue2.js +22 -2
  9. package/dist/components/Badge/Badge.vue3.js +4 -0
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  13. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Models/Models.vue.js +30 -31
  15. package/dist/components/Content/Models/ModernLayout.vue.d.ts +2 -0
  16. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  18. package/dist/components/Content/Models/ModernLayout.vue2.js +39 -37
  19. package/dist/components/Content/Operations/TraversedEntry.vue.js +12 -12
  20. package/dist/components/Content/Tags/TagSection.vue.js +6 -6
  21. package/dist/components/GettingStarted.vue.js +3 -3
  22. package/dist/components/GettingStarted.vue2.js +21 -21
  23. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  24. package/dist/components/MobileHeader.vue.js +3 -3
  25. package/dist/components/Section/CompactSection.vue.d.ts +2 -0
  26. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  27. package/dist/components/Section/CompactSection.vue.js +1 -1
  28. package/dist/components/Section/CompactSection.vue2.js +30 -29
  29. package/dist/features/Operation/Operation.vue.d.ts +2 -1
  30. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/Operation.vue.js +53 -52
  32. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -2
  33. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  35. package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
  36. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +16 -16
  38. package/dist/features/Operation/helpers/combine-params.d.ts +5 -0
  39. package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -0
  40. package/dist/features/Operation/helpers/combine-params.js +13 -0
  41. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -4
  42. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  43. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  44. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +59 -50
  45. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +2 -2
  46. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -4
  47. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  49. package/dist/features/Operation/layouts/ModernLayout.vue2.js +94 -78
  50. package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -1
  51. package/dist/features/Search/helpers/create-fuse-instance.js +0 -3
  52. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  53. package/dist/features/api-client-modal/ApiClientModal.vue.js +51 -48
  54. package/dist/features/api-client-modal/useApiClient.d.ts +100 -100
  55. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  56. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  57. package/dist/features/document-source/hooks/useDocumentFetcher.js +16 -18
  58. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  59. package/dist/features/document-source/hooks/useDocumentSource.js +30 -33
  60. package/dist/features/example-responses/ExampleResponse.vue.d.ts +1 -1
  61. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  62. package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
  63. package/dist/features/example-responses/ExampleResponse.vue2.js +15 -13
  64. package/dist/features/example-responses/ExampleResponses.vue.d.ts +2 -3
  65. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  66. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  67. package/dist/features/example-responses/ExampleResponses.vue2.js +73 -69
  68. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +26 -0
  69. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +1 -0
  70. package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +29 -0
  71. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  72. package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
  73. package/dist/features/sidebar/components/SidebarElement.vue2.js +6 -6
  74. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  75. package/dist/features/sidebar/helpers/create-sidebar.js +13 -14
  76. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +1 -2
  77. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  78. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  79. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  80. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  81. package/dist/features/traverse-schema/types.d.ts +11 -12
  82. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  83. package/dist/features/x-badges/XBadges.vue.d.ts +8 -0
  84. package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -0
  85. package/dist/features/x-badges/XBadges.vue.js +26 -0
  86. package/dist/features/x-badges/XBadges.vue2.js +4 -0
  87. package/dist/features/x-badges/index.d.ts +2 -0
  88. package/dist/features/x-badges/index.d.ts.map +1 -0
  89. package/dist/helpers/test-utils.d.ts +1 -1
  90. package/dist/helpers/test-utils.d.ts.map +1 -1
  91. package/dist/hooks/useNavState.d.ts +1 -2
  92. package/dist/hooks/useNavState.d.ts.map +1 -1
  93. package/dist/index.js +1 -1
  94. package/dist/libs/openapi.d.ts +4 -14
  95. package/dist/libs/openapi.d.ts.map +1 -1
  96. package/dist/libs/openapi.js +55 -36
  97. package/dist/style.css +1 -1
  98. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  99. package/dist/v2/ApiReferenceWorkspace.vue.js +64 -64
  100. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +1 -2
  101. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  102. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
  103. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +97 -100
  104. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +1 -2
  105. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -1
  106. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +17 -20
  107. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  108. package/dist/v2/helpers/map-configuration.d.ts +66 -0
  109. package/dist/v2/helpers/map-configuration.d.ts.map +1 -0
  110. package/dist/v2/helpers/map-configuration.js +53 -0
  111. package/dist/vitest.setup.d.ts +2 -0
  112. package/dist/vitest.setup.d.ts.map +1 -0
  113. package/package.json +24 -20
@@ -1,35 +1,35 @@
1
- import { defineComponent as g, computed as B, createBlock as r, openBlock as i, unref as o, createSlots as O, withCtx as s, createElementVNode as a, createVNode as t, createElementBlock as w, createCommentVNode as n, withModifiers as V, toDisplayString as h, normalizeClass as $, createTextVNode as u } from "vue";
1
+ import { defineComponent as C, computed as B, createBlock as r, openBlock as i, unref as o, createSlots as O, withCtx as s, createElementVNode as a, createCommentVNode as n, createElementBlock as w, createVNode as t, withModifiers as V, toDisplayString as h, normalizeClass as $, createTextVNode as u } from "vue";
2
2
  import { ScalarErrorBoundary as q, ScalarIconButton as I, ScalarMarkdown as T } from "@scalar/components";
3
3
  import { ScalarIconPlay as D, ScalarIconCopy as E, ScalarIconWebhooksLogo as L } from "@scalar/icons";
4
4
  import { isOperationDeprecated as R, getOperationStability as f, getOperationStabilityColor as W } from "@scalar/oas-utils/helpers";
5
- import { useClipboard as N } from "@scalar/use-hooks/useClipboard";
6
- import P from "../../../components/OperationPath.vue.js";
7
- import _ from "../components/callbacks/Callbacks.vue.js";
8
- import z from "../components/OperationParameters.vue.js";
9
- import U from "../components/OperationResponses.vue.js";
10
- import { useConfig as A } from "../../../hooks/useConfig.js";
5
+ import { useClipboard as z } from "@scalar/use-hooks/useClipboard";
6
+ import N from "../../../components/OperationPath.vue.js";
7
+ import P from "../components/callbacks/Callbacks.vue.js";
8
+ import U from "../components/OperationParameters.vue.js";
9
+ import A from "../components/OperationResponses.vue.js";
11
10
  import M from "../../../components/Section/SectionAccordion.vue.js";
12
- import j from "../../example-responses/ExampleResponses.vue.js";
13
- import F from "../../../components/LinkList/LinkList.vue.js";
14
- import G from "../../external-docs/ExternalDocs.vue.js";
15
- import H from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
16
- import J from "../../test-request-button/TestRequestButton.vue.js";
17
- import K from "../../../components/HttpMethod/HttpMethod.vue.js";
18
- import Q from "../../../components/Anchor/Anchor.vue.js";
19
- import y from "../../../components/Badge/Badge.vue.js";
20
- const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z = { class: "endpoint-label" }, x = { class: "endpoint-label-path" }, ee = { class: "endpoint-label-name" }, oe = { class: "endpoint-content" }, te = { class: "operation-details-card" }, ae = { class: "operation-details-card-item" }, se = { class: "operation-details-card-item" }, ie = {
11
+ import _ from "../../example-responses/ExampleResponses.vue.js";
12
+ import j from "../../../components/LinkList/LinkList.vue.js";
13
+ import F from "../../external-docs/ExternalDocs.vue.js";
14
+ import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
15
+ import y from "../../x-badges/XBadges.vue.js";
16
+ import H from "../../test-request-button/TestRequestButton.vue.js";
17
+ import J from "../../../components/HttpMethod/HttpMethod.vue.js";
18
+ import K from "../../../components/Anchor/Anchor.vue.js";
19
+ import b from "../../../components/Badge/Badge.vue.js";
20
+ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y = { class: "endpoint-label" }, Z = { class: "endpoint-label-path" }, x = { class: "endpoint-label-name" }, ee = { class: "endpoint-content" }, oe = { class: "operation-details-card" }, te = { class: "operation-details-card-item" }, ae = { class: "operation-details-card-item" }, se = {
21
21
  key: 0,
22
22
  class: "operation-details-card-item"
23
- }, Ve = /* @__PURE__ */ g({
23
+ }, we = /* @__PURE__ */ C({
24
24
  __name: "ClassicLayout",
25
25
  props: {
26
26
  id: {},
27
27
  path: {},
28
28
  clientOptions: {},
29
29
  method: {},
30
+ config: {},
30
31
  operation: {},
31
32
  oldOperation: {},
32
- parameters: {},
33
33
  isWebhook: { type: Boolean },
34
34
  server: {},
35
35
  securitySchemes: {},
@@ -38,8 +38,8 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
38
38
  },
39
39
  emits: ["update:modelValue"],
40
40
  setup(d, { emit: k }) {
41
- const v = B(() => d.operation.summary || d.path || ""), { copyToClipboard: b } = N(), S = A(), C = k, m = (e) => {
42
- C("update:modelValue", e);
41
+ const v = B(() => d.operation.summary || d.path || ""), { copyToClipboard: g } = z(), S = k, m = (e) => {
42
+ S("update:modelValue", e);
43
43
  };
44
44
  return (e, l) => (i(), r(o(M), {
45
45
  id: e.id,
@@ -47,36 +47,36 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
47
47
  transparent: ""
48
48
  }, O({
49
49
  title: s(() => [
50
- a("div", X, [
51
- a("div", Y, [
52
- t(o(K), {
50
+ a("div", Q, [
51
+ a("div", X, [
52
+ t(o(J), {
53
53
  class: "endpoint-type",
54
54
  method: e.method,
55
55
  short: ""
56
56
  }, null, 8, ["method"]),
57
- t(o(Q), {
57
+ t(o(K), {
58
58
  id: e.id,
59
59
  class: "endpoint-anchor"
60
60
  }, {
61
61
  default: s(() => [
62
- a("h3", Z, [
63
- a("div", x, [
64
- t(P, {
62
+ a("h3", Y, [
63
+ a("div", Z, [
64
+ t(N, {
65
65
  deprecated: o(R)(e.operation),
66
66
  path: e.path
67
67
  }, null, 8, ["deprecated", "path"])
68
68
  ]),
69
- a("div", ee, h(v.value), 1),
70
- o(f)(e.operation) ? (i(), r(o(y), {
69
+ a("div", x, h(v.value), 1),
70
+ o(f)(e.operation) ? (i(), r(o(b), {
71
71
  key: 0,
72
- class: $(o(W)(e.operation))
72
+ class: $(["capitalize", o(W)(e.operation)])
73
73
  }, {
74
74
  default: s(() => [
75
75
  u(h(o(f)(e.operation)), 1)
76
76
  ]),
77
77
  _: 1
78
78
  }, 8, ["class"])) : n("", !0),
79
- e.isWebhook ? (i(), r(o(y), {
79
+ e.isWebhook ? (i(), r(o(b), {
80
80
  key: 1,
81
81
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
82
82
  }, {
@@ -86,7 +86,11 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
86
86
  ]),
87
87
  _: 1,
88
88
  __: [1]
89
- })) : n("", !0)
89
+ })) : n("", !0),
90
+ t(o(y), {
91
+ badges: e.operation["x-badges"],
92
+ position: "before"
93
+ }, null, 8, ["badges"])
90
94
  ])
91
95
  ]),
92
96
  _: 1
@@ -97,11 +101,15 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
97
101
  actions: s(({ active: p }) => {
98
102
  var c;
99
103
  return [
100
- p && !e.isWebhook ? (i(), r(o(J), {
104
+ t(o(y), {
105
+ badges: e.operation["x-badges"],
106
+ position: "after"
107
+ }, null, 8, ["badges"]),
108
+ p && !e.isWebhook ? (i(), r(o(H), {
101
109
  key: 0,
102
110
  method: e.method,
103
111
  path: e.path
104
- }, null, 8, ["method", "path"])) : (c = o(S)) != null && c.hideTestRequestButton ? n("", !0) : (i(), r(o(D), {
112
+ }, null, 8, ["method", "path"])) : (c = e.config) != null && c.hideTestRequestButton ? n("", !0) : (i(), r(o(D), {
105
113
  key: 1,
106
114
  class: "endpoint-try-hint size-4.5"
107
115
  })),
@@ -111,32 +119,32 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
111
119
  label: "Copy endpoint URL",
112
120
  size: "xs",
113
121
  variant: "ghost",
114
- onClick: l[0] || (l[0] = V((re) => o(b)(e.path), ["stop"]))
122
+ onClick: l[0] || (l[0] = V((ie) => o(g)(e.path), ["stop"]))
115
123
  }, null, 8, ["icon"])
116
124
  ];
117
125
  }),
118
126
  default: s(() => {
119
127
  var p;
120
128
  return [
121
- a("div", oe, [
122
- a("div", te, [
123
- a("div", ae, [
124
- t(z, {
129
+ a("div", ee, [
130
+ a("div", oe, [
131
+ a("div", te, [
132
+ t(U, {
125
133
  requestBody: e.oldOperation.requestBody,
126
- parameters: e.parameters,
134
+ parameters: e.operation.parameters,
127
135
  schemas: e.schemas,
128
136
  "onUpdate:modelValue": m
129
137
  }, null, 8, ["requestBody", "parameters", "schemas"])
130
138
  ]),
131
- a("div", se, [
132
- t(U, {
139
+ a("div", ae, [
140
+ t(A, {
133
141
  collapsableItems: !1,
134
142
  responses: e.oldOperation.responses,
135
143
  schemas: e.schemas
136
144
  }, null, 8, ["responses", "schemas"])
137
145
  ]),
138
- (p = e.operation) != null && p.callbacks ? (i(), w("div", ie, [
139
- t(_, {
146
+ (p = e.operation) != null && p.callbacks ? (i(), w("div", se, [
147
+ t(P, {
140
148
  method: e.method,
141
149
  path: e.path,
142
150
  callbacks: e.operation.callbacks,
@@ -144,14 +152,15 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
144
152
  }, null, 8, ["method", "path", "callbacks", "schemas"])
145
153
  ])) : n("", !0)
146
154
  ]),
147
- t(o(j), {
155
+ e.operation.responses ? (i(), r(o(_), {
156
+ key: 0,
148
157
  class: "operation-example-card",
149
158
  responses: e.operation.responses
150
- }, null, 8, ["responses"]),
159
+ }, null, 8, ["responses"])) : n("", !0),
151
160
  a("div", null, [
152
- e.operation.externalDocs ? (i(), r(o(F), { key: 0 }, {
161
+ e.operation.externalDocs ? (i(), r(o(j), { key: 0 }, {
153
162
  default: s(() => [
154
- t(o(G), {
163
+ t(o(F), {
155
164
  value: e.operation.externalDocs
156
165
  }, null, 8, ["value"])
157
166
  ]),
@@ -159,7 +168,7 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
159
168
  })) : n("", !0),
160
169
  t(o(q), null, {
161
170
  default: s(() => [
162
- t(o(H), {
171
+ t(o(G), {
163
172
  class: "operation-example-card",
164
173
  method: e.method,
165
174
  selectedServer: e.server,
@@ -197,5 +206,5 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
197
206
  }
198
207
  });
199
208
  export {
200
- Ve as default
209
+ we as default
201
210
  };
@@ -1,4 +1,4 @@
1
- const _ = "";
1
+ const e = "";
2
2
  export {
3
- _ as default
3
+ e as default
4
4
  };
@@ -1,11 +1,10 @@
1
1
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
2
  import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
+ import type { ApiReferenceConfiguration } from '@scalar/types';
3
4
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
- import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/parameter';
5
5
  import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
6
6
  import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
7
7
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
8
- import type { Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
9
8
  import type { Schemas } from '../../../features/Operation/types/schemas';
10
9
  import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
11
10
  type __VLS_Props = {
@@ -13,9 +12,9 @@ type __VLS_Props = {
13
12
  path: string;
14
13
  clientOptions: ClientOptionGroup[];
15
14
  method: HttpMethodType;
16
- operation: Dereference<OperationObject>;
15
+ config: ApiReferenceConfiguration;
16
+ operation: OperationObject;
17
17
  oldOperation: OpenAPIV3_1.OperationObject;
18
- parameters: ParameterObject[];
19
18
  isWebhook: boolean;
20
19
  securitySchemes: SecuritySchemeObject[];
21
20
  server: ServerObject | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAkNA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAoBlF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IACzC,UAAU,EAAE,eAAe,EAAE,CAAA;IAE7B,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;;;;AAmVF,wBAQG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAoOA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAoBtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,yBAAyB,CAAA;IACjC,SAAS,EAAE,eAAe,CAAA;IAC1B,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IAEzC,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;;;;AA2WJ,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ModernLayout.vue2.js";
2
2
  import "./ModernLayout.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8ffb0fcc"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1152fe62"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -1,35 +1,35 @@
1
- import { defineComponent as B, computed as V, useId as w, createBlock as r, openBlock as i, unref as o, withCtx as t, createVNode as a, createCommentVNode as s, createElementVNode as l, normalizeClass as b, createTextVNode as n, toDisplayString as y, createSlots as q } from "vue";
2
- import { ScalarMarkdown as D, ScalarErrorBoundary as m } from "@scalar/components";
3
- import { ScalarIconWebhooksLogo as L } from "@scalar/icons";
4
- import { getOperationStability as k, getOperationStabilityColor as T, isOperationDeprecated as W } from "@scalar/oas-utils/helpers";
5
- import $ from "../../../components/OperationPath.vue.js";
6
- import E from "../components/callbacks/Callbacks.vue.js";
7
- import I from "../components/OperationParameters.vue.js";
1
+ import { defineComponent as w, computed as B, useId as V, createBlock as r, openBlock as s, unref as o, withCtx as t, createVNode as a, createElementVNode as i, createCommentVNode as l, normalizeClass as b, createTextVNode as n, toDisplayString as g, createSlots as I } from "vue";
2
+ import { ScalarMarkdown as $, ScalarErrorBoundary as d } from "@scalar/components";
3
+ import { ScalarIconWebhooksLogo as q } from "@scalar/icons";
4
+ import { getOperationStability as y, getOperationStabilityColor as D, isOperationDeprecated as L } from "@scalar/oas-utils/helpers";
5
+ import T from "../../../components/OperationPath.vue.js";
6
+ import W from "../components/callbacks/Callbacks.vue.js";
7
+ import E from "../components/OperationParameters.vue.js";
8
8
  import N from "../components/OperationResponses.vue.js";
9
- import { useConfig as P } from "../../../hooks/useConfig.js";
10
9
  import R from "../../../components/Section/Section.vue.js";
11
- import z from "../../../components/Section/SectionContent.vue.js";
12
- import S from "../../../components/Badge/Badge.vue.js";
13
- import H from "../../../components/Section/SectionHeader.vue.js";
14
- import M from "../../../components/Anchor/Anchor.vue.js";
15
- import U from "../../../components/Section/SectionHeaderTag.vue.js";
16
- import j from "../../../components/Section/SectionColumns.vue.js";
17
- import g from "../../../components/Section/SectionColumn.vue.js";
18
- import A from "../../../components/LinkList/LinkList.vue.js";
19
- import F from "../../external-docs/ExternalDocs.vue.js";
20
- import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
21
- import J from "../../test-request-button/TestRequestButton.vue.js";
22
- import K from "../../example-responses/ExampleResponses.vue.js";
23
- const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__PURE__ */ B({
10
+ import P from "../../../components/Section/SectionContent.vue.js";
11
+ import k from "../../../components/Badge/Badge.vue.js";
12
+ import S from "../../x-badges/XBadges.vue.js";
13
+ import j from "../../../components/Section/SectionHeader.vue.js";
14
+ import z from "../../../components/Anchor/Anchor.vue.js";
15
+ import A from "../../../components/Section/SectionHeaderTag.vue.js";
16
+ import H from "../../../components/Section/SectionColumns.vue.js";
17
+ import v from "../../../components/Section/SectionColumn.vue.js";
18
+ import M from "../../../components/LinkList/LinkList.vue.js";
19
+ import U from "../../external-docs/ExternalDocs.vue.js";
20
+ import _ from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
21
+ import F from "../../test-request-button/TestRequestButton.vue.js";
22
+ import G from "../../example-responses/ExampleResponses.vue.js";
23
+ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex gap-1" }, Q = { class: "flex gap-1" }, X = { class: "operation-details" }, Y = { class: "examples" }, Se = /* @__PURE__ */ w({
24
24
  __name: "ModernLayout",
25
25
  props: {
26
26
  id: {},
27
27
  path: {},
28
28
  clientOptions: {},
29
29
  method: {},
30
+ config: {},
30
31
  operation: {},
31
32
  oldOperation: {},
32
- parameters: {},
33
33
  isWebhook: { type: Boolean },
34
34
  securitySchemes: {},
35
35
  server: {},
@@ -37,54 +37,68 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
37
37
  store: {}
38
38
  },
39
39
  emits: ["update:modelValue"],
40
- setup(d, { emit: v }) {
41
- const p = V(() => d.operation.summary || d.path || ""), C = v, u = w(), O = P(), c = (e) => {
42
- C("update:modelValue", e);
40
+ setup(p, { emit: C }) {
41
+ const m = B(() => p.operation.summary || p.path || ""), O = C, u = V(), c = (e) => {
42
+ O("update:modelValue", e);
43
43
  };
44
- return (e, f) => (i(), r(o(R), {
44
+ return (e, f) => (s(), r(o(R), {
45
45
  id: e.id,
46
46
  "aria-labelledby": o(u),
47
- label: p.value,
47
+ label: m.value,
48
48
  tabindex: "-1"
49
49
  }, {
50
50
  default: t(() => [
51
- a(o(z), {
52
- loading: o(O).isLoading
51
+ a(o(P), {
52
+ loading: e.config.isLoading
53
53
  }, {
54
54
  default: t(() => [
55
- o(k)(e.operation) ? (i(), r(o(S), {
56
- key: 0,
57
- class: b(["capitalize", o(T)(e.operation)])
58
- }, {
59
- default: t(() => [
60
- n(y(o(k)(e.operation)), 1)
61
- ]),
62
- _: 1
63
- }, 8, ["class"])) : s("", !0),
64
- e.isWebhook ? (i(), r(o(S), {
65
- key: 1,
66
- class: "font-code text-green flex w-fit items-center justify-center gap-1"
67
- }, {
68
- default: t(() => [
69
- a(o(L), { weight: "bold" }),
70
- f[0] || (f[0] = n("Webhook "))
55
+ i("div", J, [
56
+ i("div", K, [
57
+ o(y)(e.operation) ? (s(), r(o(k), {
58
+ key: 0,
59
+ class: b(["capitalize", o(D)(e.operation)])
60
+ }, {
61
+ default: t(() => [
62
+ n(g(o(y)(e.operation)), 1)
63
+ ]),
64
+ _: 1
65
+ }, 8, ["class"])) : l("", !0),
66
+ e.isWebhook ? (s(), r(o(k), {
67
+ key: 1,
68
+ class: "font-code text-green flex w-fit items-center justify-center gap-1"
69
+ }, {
70
+ default: t(() => [
71
+ a(o(q), { weight: "bold" }),
72
+ f[0] || (f[0] = n("Webhook "))
73
+ ]),
74
+ _: 1,
75
+ __: [0]
76
+ })) : l("", !0),
77
+ a(o(S), {
78
+ badges: e.operation["x-badges"],
79
+ position: "before"
80
+ }, null, 8, ["badges"])
71
81
  ]),
72
- _: 1,
73
- __: [0]
74
- })) : s("", !0),
75
- l("div", {
76
- class: b(o(W)(e.operation) ? "deprecated" : "")
82
+ i("div", Q, [
83
+ a(o(S), {
84
+ badges: e.operation["x-badges"],
85
+ position: "after"
86
+ }, null, 8, ["badges"])
87
+ ])
88
+ ]),
89
+ i("div", {
90
+ class: b(o(L)(e.operation) ? "deprecated" : "")
77
91
  }, [
78
- a(o(H), null, {
92
+ a(o(j), null, {
79
93
  default: t(() => [
80
- a(o(M), { id: e.id }, {
94
+ a(o(z), { id: e.id }, {
81
95
  default: t(() => [
82
- a(o(U), {
96
+ a(o(A), {
83
97
  id: o(u),
84
98
  level: 3
85
99
  }, {
86
100
  default: t(() => [
87
- n(y(p.value), 1)
101
+ n(g(m.value), 1)
88
102
  ]),
89
103
  _: 1
90
104
  }, 8, ["id"])
@@ -95,40 +109,41 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
95
109
  _: 1
96
110
  })
97
111
  ], 2),
98
- a(o(j), null, {
112
+ a(o(H), null, {
99
113
  default: t(() => [
100
- a(o(g), null, {
114
+ a(o(v), null, {
101
115
  default: t(() => [
102
- l("div", Q, [
103
- a(o(D), {
116
+ i("div", X, [
117
+ a(o($), {
104
118
  value: e.operation.description,
105
119
  withImages: "",
106
120
  withAnchors: "",
107
121
  transformType: "heading",
108
122
  anchorPrefix: e.id
109
123
  }, null, 8, ["value", "anchorPrefix"]),
110
- a(I, {
124
+ a(E, {
111
125
  breadcrumb: [e.id],
112
- parameters: e.parameters,
126
+ parameters: e.operation.parameters,
113
127
  requestBody: e.oldOperation.requestBody,
114
128
  schemas: e.schemas,
115
129
  "onUpdate:modelValue": c
116
130
  }, null, 8, ["breadcrumb", "parameters", "requestBody", "schemas"]),
117
131
  a(N, {
118
132
  breadcrumb: [e.id],
133
+ collapsableItems: !e.config.expandAllResponses,
119
134
  responses: e.oldOperation.responses,
120
135
  schemas: e.schemas
121
- }, null, 8, ["breadcrumb", "responses", "schemas"]),
122
- a(o(m), null, {
136
+ }, null, 8, ["breadcrumb", "collapsableItems", "responses", "schemas"]),
137
+ a(o(d), null, {
123
138
  default: t(() => [
124
- e.operation.callbacks ? (i(), r(E, {
139
+ e.operation.callbacks ? (s(), r(W, {
125
140
  key: 0,
126
141
  class: "mt-6",
127
142
  path: e.path,
128
143
  callbacks: e.operation.callbacks,
129
144
  method: e.method,
130
145
  schemas: e.schemas
131
- }, null, 8, ["path", "callbacks", "method", "schemas"])) : s("", !0)
146
+ }, null, 8, ["path", "callbacks", "method", "schemas"])) : l("", !0)
132
147
  ]),
133
148
  _: 1
134
149
  })
@@ -136,20 +151,20 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
136
151
  ]),
137
152
  _: 1
138
153
  }),
139
- a(o(g), null, {
154
+ a(o(v), null, {
140
155
  default: t(() => [
141
- l("div", X, [
142
- e.operation.externalDocs ? (i(), r(o(A), { key: 0 }, {
156
+ i("div", Y, [
157
+ e.operation.externalDocs ? (s(), r(o(M), { key: 0 }, {
143
158
  default: t(() => [
144
- a(o(F), {
159
+ a(o(U), {
145
160
  value: e.operation.externalDocs
146
161
  }, null, 8, ["value"])
147
162
  ]),
148
163
  _: 1
149
- })) : s("", !0),
150
- a(o(m), null, {
164
+ })) : l("", !0),
165
+ a(o(d), null, {
151
166
  default: t(() => [
152
- a(o(G), {
167
+ a(o(_), {
153
168
  method: e.method,
154
169
  selectedServer: e.server,
155
170
  clientOptions: e.clientOptions,
@@ -159,11 +174,11 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
159
174
  fallback: "",
160
175
  operation: e.operation,
161
176
  "onUpdate:modelValue": c
162
- }, q({
177
+ }, I({
163
178
  header: t(() => {
164
179
  var h;
165
180
  return [
166
- a($, {
181
+ a(T, {
167
182
  class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
168
183
  deprecated: (h = e.operation) == null ? void 0 : h.deprecated,
169
184
  path: e.path
@@ -175,7 +190,7 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
175
190
  e.isWebhook ? void 0 : {
176
191
  name: "footer",
177
192
  fn: t(() => [
178
- a(o(J), {
193
+ a(o(F), {
179
194
  method: e.method,
180
195
  path: e.path
181
196
  }, null, 8, ["method", "path"])
@@ -186,12 +201,13 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
186
201
  ]),
187
202
  _: 1
188
203
  }),
189
- a(o(m), null, {
204
+ a(o(d), null, {
190
205
  default: t(() => [
191
- a(o(K), {
206
+ e.operation.responses ? (s(), r(o(G), {
207
+ key: 0,
192
208
  responses: e.operation.responses,
193
209
  style: { "margin-top": "12px" }
194
- }, null, 8, ["responses"])
210
+ }, null, 8, ["responses"])) : l("", !0)
195
211
  ]),
196
212
  _: 1
197
213
  })
@@ -211,5 +227,5 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
211
227
  }
212
228
  });
213
229
  export {
214
- ke as default
230
+ Se as default
215
231
  };
@@ -1 +1 @@
1
- {"version":3,"file":"create-fuse-instance.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/helpers/create-fuse-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAAC,QAAQ,CAAC,CAiDnD"}
1
+ {"version":3,"file":"create-fuse-instance.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/helpers/create-fuse-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAAC,QAAQ,CAAC,CA6CnD"}
@@ -28,9 +28,6 @@ function n() {
28
28
  includeScore: !0,
29
29
  // Include detailed match information showing which parts of the text matched
30
30
  includeMatches: !0,
31
- // Minimum number of characters that must match to be considered a result
32
- // Prevents single-character matches that are usually noise
33
- minMatchCharLength: 2,
34
31
  // Don't require matches to be at the beginning of strings
35
32
  // Makes search more flexible and user-friendly
36
33
  ignoreLocation: !0,
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/api-client-modal/ApiClientModal.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAA;AAYpC,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,GAC7D,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,CAAC,CAAA;IACpD,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AAsMF,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/api-client-modal/ApiClientModal.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAA;AAYpC,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,GAC7D,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,CAAC,CAAA;IACpD,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AAuMF,wBAOG"}