@scalar/api-reference 1.35.2 → 1.35.3

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 (165) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/browser/standalone.js +9896 -10062
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts +2 -1
  5. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReference.vue.js +14 -11
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  9. package/dist/components/ApiReferenceLayout.vue2.js +70 -72
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +3 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Content.vue.d.ts +0 -2
  13. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Content.vue.js +80 -80
  15. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +5 -2
  16. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  18. package/dist/components/Content/Models/ClassicLayout.vue2.js +43 -45
  19. package/dist/components/Content/Models/ClassicLayout.vue3.js +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  21. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/Models.vue.js +27 -20
  23. package/dist/components/Content/Models/ModernLayout.vue.d.ts +5 -2
  24. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  26. package/dist/components/Content/Models/ModernLayout.vue2.js +48 -52
  27. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -2
  28. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Operations/TraversedEntry.vue.js +33 -32
  30. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +2 -2
  31. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  33. package/dist/components/Content/Schema/Schema.vue.d.ts +6 -22
  34. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  36. package/dist/components/Content/Schema/Schema.vue2.js +86 -140
  37. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +15 -4
  38. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  39. package/dist/components/Content/Schema/SchemaComposition.vue.js +77 -138
  40. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +2 -13
  41. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +2 -2
  43. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +66 -92
  44. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  45. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Schema/SchemaHeading.vue.js +2 -2
  47. package/dist/components/Content/Schema/SchemaHeading.vue2.js +19 -17
  48. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +5 -14
  49. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +47 -68
  51. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -13
  52. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  54. package/dist/components/Content/Schema/SchemaProperty.vue2.js +116 -144
  55. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +1 -1
  56. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  57. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
  58. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +9 -4
  59. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  60. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  61. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +173 -204
  62. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +11 -0
  63. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -0
  64. package/dist/components/Content/Schema/helpers/get-ref-name.js +11 -0
  65. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +13 -3
  66. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
  67. package/dist/components/Content/Schema/helpers/get-schema-type.js +34 -13
  68. package/dist/components/Content/Schema/helpers/is-type-object.d.ts +4 -2
  69. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
  70. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -4
  71. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  72. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +130 -84
  73. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -5
  74. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  75. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +40 -31
  76. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +0 -8
  77. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -1
  78. package/dist/components/Content/Schema/helpers/schema-composition.js +2 -6
  79. package/dist/components/Content/Schema/helpers/schema-name.d.ts +8 -17
  80. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  81. package/dist/components/Content/Schema/helpers/schema-name.js +24 -33
  82. package/dist/features/Operation/Operation.vue.d.ts +3 -4
  83. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/Operation.vue.js +54 -73
  85. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +10 -11
  86. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ContentTypeSelect.vue.js +35 -43
  88. package/dist/features/Operation/components/{ParameterHeaders.vue.d.ts → Header.vue.d.ts} +4 -5
  89. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -0
  90. package/dist/features/Operation/components/Header.vue.js +23 -0
  91. package/dist/features/Operation/components/Header.vue2.js +4 -0
  92. package/dist/features/Operation/components/Headers.vue.d.ts +8 -0
  93. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -0
  94. package/dist/features/Operation/components/Headers.vue.js +7 -0
  95. package/dist/features/Operation/components/Headers.vue2.js +61 -0
  96. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -10
  97. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  98. package/dist/features/Operation/components/OperationParameters.vue.js +23 -33
  99. package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -6
  100. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  101. package/dist/features/Operation/components/OperationResponses.vue.js +22 -19
  102. package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -10
  103. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/components/ParameterList.vue.js +35 -5
  105. package/dist/features/Operation/components/ParameterList.vue2.js +2 -38
  106. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -10
  107. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  109. package/dist/features/Operation/components/ParameterListItem.vue2.js +77 -74
  110. package/dist/features/Operation/components/RequestBody.vue.d.ts +3 -8
  111. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  112. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  113. package/dist/features/Operation/components/RequestBody.vue2.js +75 -82
  114. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +0 -4
  115. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  116. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  117. package/dist/features/Operation/components/callbacks/Callback.vue2.js +35 -36
  118. package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
  119. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +0 -2
  120. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  121. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +13 -15
  122. package/dist/features/Operation/helpers/combine-params.d.ts +1 -1
  123. package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
  124. package/dist/features/Operation/helpers/combine-params.js +2 -2
  125. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -9
  126. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  127. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  128. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +75 -82
  129. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -10
  130. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  131. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  132. package/dist/features/Operation/layouts/ModernLayout.vue2.js +96 -103
  133. package/dist/index.js +1 -1
  134. package/dist/libs/openapi.d.ts +1 -13
  135. package/dist/libs/openapi.d.ts.map +1 -1
  136. package/dist/libs/openapi.js +39 -56
  137. package/dist/style.css +1 -1
  138. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +10 -4
  139. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  140. package/dist/v2/ApiReferenceWorkspace.vue.js +22 -18
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  143. package/package.json +12 -12
  144. package/dist/components/Content/Schema/Schema.preview.d.ts +0 -1078
  145. package/dist/components/Content/Schema/Schema.preview.d.ts.map +0 -1
  146. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +0 -12
  147. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  148. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -49
  149. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
  150. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +0 -13
  151. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +0 -1
  152. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +0 -1
  153. package/dist/features/Operation/components/ParameterHeaders.vue.js +0 -7
  154. package/dist/features/Operation/components/ParameterHeaders.vue2.js +0 -64
  155. package/dist/features/Operation/components/ParameterList.vue3.js +0 -4
  156. package/dist/features/Operation/hooks/useResponses.d.ts +0 -17
  157. package/dist/features/Operation/hooks/useResponses.d.ts.map +0 -1
  158. package/dist/features/Operation/hooks/useResponses.js +0 -19
  159. package/dist/hooks/useDiscriminator.d.ts +0 -53
  160. package/dist/hooks/useDiscriminator.d.ts.map +0 -1
  161. package/dist/hooks/useDiscriminator.js +0 -149
  162. package/dist/hooks/useOperationDiscriminator.d.ts +0 -8
  163. package/dist/hooks/useOperationDiscriminator.d.ts.map +0 -1
  164. package/dist/hooks/useOperationDiscriminator.js +0 -57
  165. /package/dist/features/Operation/components/{ParameterHeaders.vue3.js → Headers.vue3.js} +0 -0
@@ -1,98 +1,79 @@
1
- import { defineComponent as O, computed as c, createElementBlock as b, createCommentVNode as S, openBlock as l, Fragment as g, createBlock as v, unref as y } from "vue";
2
- import { useWorkspace as W } from "@scalar/api-client/store";
3
- import { filterSecurityRequirements as U } from "@scalar/api-client/views/Request/RequestSection";
4
- import { getResolvedRef as V } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
- import { combineParams as B } from "./helpers/combine-params.js";
6
- import { convertSecurityScheme as C } from "../../helpers/convert-security-scheme.js";
7
- import { useOperationDiscriminator as w } from "../../hooks/useOperationDiscriminator.js";
8
- import D from "./layouts/ClassicLayout.vue.js";
9
- import R from "./layouts/ModernLayout.vue.js";
10
- const j = /* @__PURE__ */ O({
1
+ import { defineComponent as h, computed as i, createElementBlock as p, createCommentVNode as d, openBlock as s, Fragment as f, createBlock as l } from "vue";
2
+ import { useWorkspace as y } from "@scalar/api-client/store";
3
+ import { filterSecurityRequirements as v } from "@scalar/api-client/views/Request/RequestSection";
4
+ import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import { combineParams as S } from "./helpers/combine-params.js";
6
+ import { convertSecurityScheme as b } from "../../helpers/convert-security-scheme.js";
7
+ import g from "./layouts/ClassicLayout.vue.js";
8
+ import W from "./layouts/ModernLayout.vue.js";
9
+ const F = /* @__PURE__ */ h({
11
10
  __name: "Operation",
12
11
  props: {
13
12
  path: {},
14
13
  method: {},
15
14
  clientOptions: {},
15
+ config: {},
16
+ document: {},
16
17
  isWebhook: { type: Boolean },
17
18
  id: {},
18
- config: {},
19
19
  server: {},
20
20
  store: {},
21
- collection: {},
22
- document: {}
21
+ collection: {}
23
22
  },
24
23
  setup(o) {
25
- var p, f;
26
- const u = c(() => {
27
- var t, n;
24
+ const n = i(() => {
25
+ var t;
28
26
  const e = o.isWebhook ? "webhooks" : "paths";
29
- return (n = (t = o.store.workspace.activeDocument) == null ? void 0 : t[e]) == null ? void 0 : n[o.path];
30
- }), a = c(() => {
31
- var n, i;
32
- const e = V((n = u.value) == null ? void 0 : n[o.method]);
27
+ return (t = o.document[e]) == null ? void 0 : t[o.path];
28
+ }), r = i(() => {
29
+ var m, a;
30
+ const e = k((m = n.value) == null ? void 0 : m[o.method]);
33
31
  if (!e)
34
32
  return null;
35
- const t = B(
36
- (i = u.value) == null ? void 0 : i.parameters,
33
+ const t = S(
34
+ (a = n.value) == null ? void 0 : a.parameters,
37
35
  e.parameters
38
36
  );
39
37
  return { ...e, parameters: t };
40
- }), m = c(
41
- () => {
42
- var e, t, n, i, r, s;
43
- return o.isWebhook ? (n = (t = (e = o.document) == null ? void 0 : e.webhooks) == null ? void 0 : t[o.path]) == null ? void 0 : n[o.method] : (s = (r = (i = o.document) == null ? void 0 : i.paths) == null ? void 0 : r[o.path]) == null ? void 0 : s[o.method];
44
- }
45
- ), { handleDiscriminatorChange: h } = w(
46
- m.value,
47
- (f = (p = o.document) == null ? void 0 : p.components) == null ? void 0 : f.schemas
48
- ), { securitySchemes: k } = W(), d = c(
38
+ }), { securitySchemes: u } = y(), c = i(
49
39
  () => {
50
- var e, t;
51
- return U(
52
- ((e = a.value) == null ? void 0 : e.security) || ((t = o.document) == null ? void 0 : t.security),
40
+ var e;
41
+ return v(
42
+ ((e = r.value) == null ? void 0 : e.security) || o.document.security || [],
53
43
  o.collection.selectedSecuritySchemeUids,
54
- k
55
- ).map(C);
44
+ u
45
+ ).map(b);
56
46
  }
57
47
  );
58
- return (e, t) => {
59
- var n, i, r, s;
60
- return a.value && m.value ? (l(), b(g, { key: 0 }, [
61
- e.config.layout === "classic" ? (l(), v(D, {
62
- key: 0,
63
- id: e.id,
64
- isWebhook: e.isWebhook,
65
- method: e.method,
66
- operation: a.value,
67
- oldOperation: m.value,
68
- config: e.config,
69
- clientOptions: e.clientOptions,
70
- securitySchemes: d.value,
71
- store: e.store,
72
- path: e.path,
73
- schemas: (i = (n = e.document) == null ? void 0 : n.components) == null ? void 0 : i.schemas,
74
- server: e.server,
75
- "onUpdate:modelValue": y(h)
76
- }, null, 8, ["id", "isWebhook", "method", "operation", "oldOperation", "config", "clientOptions", "securitySchemes", "store", "path", "schemas", "server", "onUpdate:modelValue"])) : (l(), v(R, {
77
- key: 1,
78
- id: e.id,
79
- isWebhook: e.isWebhook,
80
- method: e.method,
81
- config: e.config,
82
- clientOptions: e.clientOptions,
83
- oldOperation: m.value,
84
- securitySchemes: d.value,
85
- path: e.path,
86
- store: e.store,
87
- operation: a.value,
88
- schemas: (s = (r = e.document) == null ? void 0 : r.components) == null ? void 0 : s.schemas,
89
- server: e.server,
90
- "onUpdate:modelValue": y(h)
91
- }, null, 8, ["id", "isWebhook", "method", "config", "clientOptions", "oldOperation", "securitySchemes", "path", "store", "operation", "schemas", "server", "onUpdate:modelValue"]))
92
- ], 64)) : S("", !0);
93
- };
48
+ return (e, t) => r.value ? (s(), p(f, { key: 0 }, [
49
+ e.config.layout === "classic" ? (s(), l(g, {
50
+ key: 0,
51
+ id: e.id,
52
+ clientOptions: e.clientOptions,
53
+ config: e.config,
54
+ isWebhook: e.isWebhook,
55
+ method: e.method,
56
+ operation: r.value,
57
+ path: e.path,
58
+ securitySchemes: c.value,
59
+ server: e.server,
60
+ store: e.store
61
+ }, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"])) : (s(), l(W, {
62
+ key: 1,
63
+ id: e.id,
64
+ clientOptions: e.clientOptions,
65
+ config: e.config,
66
+ isWebhook: e.isWebhook,
67
+ method: e.method,
68
+ operation: r.value,
69
+ path: e.path,
70
+ securitySchemes: c.value,
71
+ server: e.server,
72
+ store: e.store
73
+ }, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"]))
74
+ ], 64)) : d("", !0);
94
75
  }
95
76
  });
96
77
  export {
97
- j as default
78
+ F as default
98
79
  };
@@ -1,16 +1,15 @@
1
- import type { RequestBody } from '@scalar/types/legacy';
1
+ import type { MediaTypeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
- requestBody?: RequestBody;
4
- defaultValue?: string;
3
+ content: Record<string, MediaTypeObject> | undefined;
5
4
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- selectContentType: (payload: {
8
- contentType: string;
9
- }) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onSelectContentType?: ((payload: {
12
- contentType: string;
13
- }) => any) | undefined;
5
+ type __VLS_PublicProps = __VLS_Props & {
6
+ /** The selected content type with two-way binding */
7
+ modelValue: string;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
14
13
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
14
  export default _default;
16
15
  //# sourceMappingURL=ContentTypeSelect.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTypeSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ContentTypeSelect.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKvD,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;;qBAIiD,MAAM;;;;qBAAN,MAAM;;;AAsKzD,wBAOG"}
1
+ {"version":3,"file":"ContentTypeSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ContentTypeSelect.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,CAAA;CACrD,CAAC;AAwCF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;;;;;;AA+GF,wBAOG"}
@@ -1,28 +1,23 @@
1
- import { defineComponent as S, computed as r, ref as B, createBlock as V, createElementBlock as g, openBlock as p, unref as n, withCtx as s, createVNode as c, normalizeClass as m, createElementVNode as f, createTextVNode as _, toDisplayString as y } from "vue";
2
- import { cva as k, ScalarListbox as w, ScalarButton as h } from "@scalar/components";
3
- import { ScalarIconCaretDown as q } from "@scalar/icons";
4
- import N from "../../../components/ScreenReader.vue.js";
5
- const j = /* @__PURE__ */ S({
1
+ import { defineComponent as b, mergeModels as y, useModel as V, computed as l, createBlock as g, createElementBlock as S, openBlock as p, unref as t, withCtx as a, createVNode as r, normalizeClass as m, createElementVNode as f, createTextVNode as C, toDisplayString as v } from "vue";
2
+ import { cva as k, ScalarListbox as w, ScalarButton as T } from "@scalar/components";
3
+ import { ScalarIconCaretDown as _ } from "@scalar/icons";
4
+ import B from "../../../components/ScreenReader.vue.js";
5
+ const D = /* @__PURE__ */ b({
6
6
  __name: "ContentTypeSelect",
7
- props: {
8
- requestBody: {},
9
- defaultValue: {}
10
- },
11
- emits: ["selectContentType"],
12
- setup(v, { emit: x }) {
13
- const t = v, b = x, C = (e) => {
14
- e != null && e.id && b("selectContentType", { contentType: e.id });
15
- }, a = r(() => {
16
- var e;
17
- return (e = t.requestBody) != null && e.content ? Object.keys(t.requestBody.content) : [];
18
- }), o = B(
19
- t.defaultValue || a.value[0]
20
- ), d = r({
21
- get: () => u.value.find((e) => e.id === o.value),
7
+ props: /* @__PURE__ */ y({
8
+ content: {}
9
+ }, {
10
+ modelValue: { required: !0 },
11
+ modelModifiers: {}
12
+ }),
13
+ emits: ["update:modelValue"],
14
+ setup(s) {
15
+ const o = V(s, "modelValue"), d = l(() => Object.keys(s.content ?? {})), u = l({
16
+ get: () => c.value.find((e) => e.id === o.value),
22
17
  set: (e) => {
23
18
  e && (o.value = e.id);
24
19
  }
25
- }), u = r(() => a.value.map((e) => ({
20
+ }), c = l(() => d.value.map((e) => ({
26
21
  id: e,
27
22
  label: e
28
23
  }))), i = k({
@@ -34,48 +29,45 @@ const j = /* @__PURE__ */ S({
34
29
  }
35
30
  }
36
31
  });
37
- return (e, l) => t != null && t.requestBody && a.value.length > 1 ? (p(), V(n(w), {
32
+ return (e, n) => d.value.length > 1 ? (p(), g(t(w), {
38
33
  key: 0,
39
- modelValue: d.value,
40
- "onUpdate:modelValue": [
41
- l[0] || (l[0] = (T) => d.value = T),
42
- C
43
- ],
44
- options: u.value,
34
+ modelValue: u.value,
35
+ "onUpdate:modelValue": n[0] || (n[0] = (x) => u.value = x),
36
+ options: c.value,
45
37
  placement: "bottom-end"
46
38
  }, {
47
- default: s(() => [
48
- c(n(h), {
49
- class: m(["h-fit", n(i)({ dropdown: !0 })]),
39
+ default: a(() => [
40
+ r(t(T), {
41
+ class: m(["h-fit", t(i)({ dropdown: !0 })]),
50
42
  variant: "ghost"
51
43
  }, {
52
- default: s(() => [
53
- c(N, null, {
54
- default: s(() => l[1] || (l[1] = [
55
- _("Selected Content Type:")
44
+ default: a(() => [
45
+ r(B, null, {
46
+ default: a(() => n[1] || (n[1] = [
47
+ C("Selected Content Type:")
56
48
  ])),
57
49
  _: 1,
58
50
  __: [1]
59
51
  }),
60
- f("span", null, y(o.value), 1),
61
- c(n(q), {
62
- weight: "bold",
63
- class: "ui-open:rotate-180 size-2.75 transition-transform duration-100"
52
+ f("span", null, v(o.value), 1),
53
+ r(t(_), {
54
+ class: "ui-open:rotate-180 size-2.75 transition-transform duration-100",
55
+ weight: "bold"
64
56
  })
65
57
  ]),
66
58
  _: 1
67
59
  }, 8, ["class"])
68
60
  ]),
69
61
  _: 1
70
- }, 8, ["modelValue", "options"])) : (p(), g("div", {
62
+ }, 8, ["modelValue", "options"])) : (p(), S("div", {
71
63
  key: 1,
72
- class: m([n(i)({ dropdown: !1 }), "selected-content-type"]),
64
+ class: m(["selected-content-type", t(i)({ dropdown: !1 })]),
73
65
  tabindex: "0"
74
66
  }, [
75
- f("span", null, y(o.value), 1)
67
+ f("span", null, v(o.value), 1)
76
68
  ], 2));
77
69
  }
78
70
  });
79
71
  export {
80
- j as default
72
+ D as default
81
73
  };
@@ -1,10 +1,9 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
- headers: {
4
- [key: string]: OpenAPIV3_1.HeaderObject;
5
- };
3
+ header: HeaderObject;
4
+ name: string;
6
5
  breadcrumb?: string[];
7
6
  };
8
7
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
8
  export default _default;
10
- //# sourceMappingURL=ParameterHeaders.vue.d.ts.map
9
+ //# sourceMappingURL=Header.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Header.vue"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAkDF,wBAMG"}
@@ -0,0 +1,23 @@
1
+ import { defineComponent as r, createBlock as a, createCommentVNode as m, openBlock as o, unref as d } from "vue";
2
+ import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import p from "../../../components/Content/Schema/SchemaProperty.vue.js";
4
+ const h = /* @__PURE__ */ r({
5
+ __name: "Header",
6
+ props: {
7
+ header: {},
8
+ name: {},
9
+ breadcrumb: {}
10
+ },
11
+ setup(c) {
12
+ return (e, s) => "schema" in e.header && e.header.schema ? (o(), a(p, {
13
+ key: 0,
14
+ breadcrumb: e.breadcrumb ? [...e.breadcrumb, "headers"] : void 0,
15
+ description: e.header.description,
16
+ name: e.name,
17
+ value: d(n)(e.header.schema)
18
+ }, null, 8, ["breadcrumb", "description", "name", "value"])) : m("", !0);
19
+ }
20
+ });
21
+ export {
22
+ h as default
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Header.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,8 @@
1
+ import type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ type __VLS_Props = {
3
+ headers: Record<string, HeaderObject>;
4
+ breadcrumb?: string[];
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
8
+ //# sourceMappingURL=Headers.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Headers.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAkJF,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./Headers.vue2.js";
2
+ import "./Headers.vue3.js";
3
+ import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-755d65e4"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,61 @@
1
+ import { defineComponent as p, createBlock as i, openBlock as e, unref as r, withCtx as d, createElementVNode as m, normalizeClass as t, createVNode as c, createElementBlock as o, Fragment as l, createTextVNode as u, renderList as f } from "vue";
2
+ import { Disclosure as b, DisclosureButton as _, DisclosurePanel as v } from "@headlessui/vue";
3
+ import { ScalarIcon as k } from "@scalar/components";
4
+ import { getResolvedRef as B } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import H from "./Header.vue.js";
6
+ const z = /* @__PURE__ */ p({
7
+ __name: "Headers",
8
+ props: {
9
+ headers: {},
10
+ breadcrumb: {}
11
+ },
12
+ setup(g) {
13
+ return (s, C) => (e(), i(r(b), null, {
14
+ default: d(({ open: a }) => [
15
+ m("div", {
16
+ class: t(["headers-card headers-card--compact", [{ "headers-card--open": a }]])
17
+ }, [
18
+ m("div", {
19
+ class: t(["headers-properties", { "headers-properties-open": a }])
20
+ }, [
21
+ c(r(_), {
22
+ class: "headers-card-title headers-card-title--compact",
23
+ style: {
24
+ top: "calc(var(--refs-header-height)))"
25
+ }
26
+ }, {
27
+ default: d(() => [
28
+ c(r(k), {
29
+ class: t(["headers-card-title-icon", { "headers-card-title-icon--open": a }]),
30
+ icon: "Add",
31
+ size: "sm"
32
+ }, null, 8, ["class"]),
33
+ a ? (e(), o(l, { key: 0 }, [
34
+ u(" Hide Headers ")
35
+ ], 64)) : (e(), o(l, { key: 1 }, [
36
+ u(" Show Headers ")
37
+ ], 64))
38
+ ]),
39
+ _: 2
40
+ }, 1024),
41
+ c(r(v), null, {
42
+ default: d(() => [
43
+ (e(!0), o(l, null, f(s.headers, (h, n) => (e(), i(H, {
44
+ key: n,
45
+ breadcrumb: s.breadcrumb ? [...s.breadcrumb, "headers"] : void 0,
46
+ header: r(B)(h),
47
+ name: n
48
+ }, null, 8, ["breadcrumb", "header", "name"]))), 128))
49
+ ]),
50
+ _: 1
51
+ })
52
+ ], 2)
53
+ ], 2)
54
+ ]),
55
+ _: 1
56
+ }));
57
+ }
58
+ });
59
+ export {
60
+ z as default
61
+ };
@@ -1,15 +1,9 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { Schemas } from '../../../features/Operation/types/schemas';
1
+ import type { ParameterObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
2
  type __VLS_Props = {
4
3
  breadcrumb?: string[];
5
- parameters?: OpenAPIV3_1.ParameterObject[];
6
- requestBody?: OpenAPIV3_1.RequestBodyObject | undefined;
7
- schemas?: Schemas;
4
+ parameters?: ParameterObject[];
5
+ requestBody?: RequestBodyObject | undefined;
8
6
  };
9
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- "update:modelValue": (value: string) => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
8
  export default _default;
15
9
  //# sourceMappingURL=OperationParameters.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAKjE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAA;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AAgJF,wBAOG"}
1
+ {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAKrE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;IAC9B,WAAW,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;CAC5C,CAAC;;AAgHF,wBAMG"}
@@ -1,78 +1,68 @@
1
- import { defineComponent as n, createElementBlock as c, openBlock as o, Fragment as h, createVNode as t, createBlock as y, createCommentVNode as B, withCtx as a, createTextVNode as m } from "vue";
1
+ import { defineComponent as i, createElementBlock as p, openBlock as o, Fragment as n, createVNode as b, createBlock as l, createCommentVNode as y, withCtx as a, createTextVNode as m } from "vue";
2
2
  import d from "./ParameterList.vue.js";
3
3
  import f from "./RequestBody.vue.js";
4
- const V = /* @__PURE__ */ n({
4
+ const c = /* @__PURE__ */ i({
5
5
  __name: "OperationParameters",
6
6
  props: {
7
7
  breadcrumb: {},
8
8
  parameters: { default: () => [] },
9
- requestBody: {},
10
- schemas: {}
9
+ requestBody: {}
11
10
  },
12
- emits: ["update:modelValue"],
13
- setup(b, { emit: u }) {
14
- const i = u, p = (e) => {
15
- i("update:modelValue", e);
16
- }, s = (e) => {
11
+ setup(u) {
12
+ const t = (e) => {
17
13
  var r;
18
- return ((r = b.parameters) == null ? void 0 : r.filter((l) => l.in === e)) ?? [];
14
+ return ((r = u.parameters) == null ? void 0 : r.filter((s) => s.in === e)) ?? [];
19
15
  };
20
- return (e, r) => (o(), c(h, null, [
21
- t(d, {
16
+ return (e, r) => (o(), p(n, null, [
17
+ b(d, {
22
18
  breadcrumb: e.breadcrumb ? [...e.breadcrumb, "path"] : void 0,
23
- parameters: s("path"),
24
- schemas: e.schemas
19
+ parameters: t("path")
25
20
  }, {
26
21
  title: a(() => r[0] || (r[0] = [
27
22
  m("Path Parameters")
28
23
  ])),
29
24
  _: 1
30
- }, 8, ["breadcrumb", "parameters", "schemas"]),
31
- t(d, {
25
+ }, 8, ["breadcrumb", "parameters"]),
26
+ b(d, {
32
27
  breadcrumb: e.breadcrumb ? [...e.breadcrumb, "query"] : void 0,
33
- parameters: s("query"),
34
- schemas: e.schemas
28
+ parameters: t("query")
35
29
  }, {
36
30
  title: a(() => r[1] || (r[1] = [
37
31
  m("Query Parameters")
38
32
  ])),
39
33
  _: 1
40
- }, 8, ["breadcrumb", "parameters", "schemas"]),
41
- t(d, {
34
+ }, 8, ["breadcrumb", "parameters"]),
35
+ b(d, {
42
36
  breadcrumb: e.breadcrumb ? [...e.breadcrumb, "headers"] : void 0,
43
- parameters: s("header"),
44
- schemas: e.schemas
37
+ parameters: t("header")
45
38
  }, {
46
39
  title: a(() => r[2] || (r[2] = [
47
40
  m("Headers")
48
41
  ])),
49
42
  _: 1
50
- }, 8, ["breadcrumb", "parameters", "schemas"]),
51
- t(d, {
43
+ }, 8, ["breadcrumb", "parameters"]),
44
+ b(d, {
52
45
  breadcrumb: e.breadcrumb ? [...e.breadcrumb, "cookies"] : void 0,
53
- parameters: s("cookie"),
54
- schemas: e.schemas
46
+ parameters: t("cookie")
55
47
  }, {
56
48
  title: a(() => r[3] || (r[3] = [
57
49
  m("Cookies")
58
50
  ])),
59
51
  _: 1
60
- }, 8, ["breadcrumb", "parameters", "schemas"]),
61
- e.requestBody ? (o(), y(f, {
52
+ }, 8, ["breadcrumb", "parameters"]),
53
+ e.requestBody ? (o(), l(f, {
62
54
  key: 0,
63
55
  breadcrumb: e.breadcrumb ? [...e.breadcrumb, "body"] : void 0,
64
- requestBody: e.requestBody,
65
- schemas: e.schemas,
66
- "onUpdate:modelValue": p
56
+ requestBody: e.requestBody
67
57
  }, {
68
58
  title: a(() => r[4] || (r[4] = [
69
59
  m("Body")
70
60
  ])),
71
61
  _: 1
72
- }, 8, ["breadcrumb", "requestBody", "schemas"])) : B("", !0)
62
+ }, 8, ["breadcrumb", "requestBody"])) : y("", !0)
73
63
  ], 64));
74
64
  }
75
65
  });
76
66
  export {
77
- V as default
67
+ c as default
78
68
  };
@@ -1,12 +1,9 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
- responses: OpenAPIV3_1.ResponseObject | undefined;
3
+ responses: OperationObject['responses'];
4
4
  collapsableItems?: boolean;
5
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
6
5
  breadcrumb?: string[];
7
6
  };
8
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
- collapsableItems: boolean;
10
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
8
  export default _default;
12
9
  //# sourceMappingURL=OperationResponses.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAKxD,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,WAAW,CAAC,cAAc,GAAG,SAAS,CAAA;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;sBAHmB,OAAO;;AAkE9B,wBAOG"}
1
+ {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAyEF,wBAMG"}