@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,29 +1,32 @@
1
- import { defineComponent as r, createBlock as p, openBlock as m, unref as l, withCtx as n, createTextVNode as c } from "vue";
2
- import { useResponses as i } from "../hooks/useResponses.js";
3
- import f from "./ParameterList.vue.js";
4
- const h = /* @__PURE__ */ r({
1
+ import { defineComponent as l, createElementBlock as o, createCommentVNode as n, openBlock as t, createElementVNode as a, Fragment as p, renderList as c, createBlock as d, unref as u } from "vue";
2
+ import { getResolvedRef as i } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import b from "./ParameterListItem.vue.js";
4
+ const f = {
5
+ key: 0,
6
+ class: "mt-6"
7
+ }, k = { class: "mb-3 list-none p-0 text-sm" }, B = /* @__PURE__ */ l({
5
8
  __name: "OperationResponses",
6
9
  props: {
7
10
  responses: {},
8
11
  collapsableItems: { type: Boolean, default: !0 },
9
- schemas: {},
10
12
  breadcrumb: {}
11
13
  },
12
- setup(o) {
13
- const t = o, { responses: a } = i(t.responses);
14
- return (e, s) => (m(), p(f, {
15
- collapsableItems: e.collapsableItems,
16
- parameters: l(a),
17
- schemas: e.schemas,
18
- withExamples: !1
19
- }, {
20
- title: n(() => s[0] || (s[0] = [
21
- c("Responses")
22
- ])),
23
- _: 1
24
- }, 8, ["collapsableItems", "parameters", "schemas"]));
14
+ setup(_) {
15
+ return (e, s) => Object.keys(e.responses ?? {}).length ? (t(), o("div", f, [
16
+ s[0] || (s[0] = a("div", { class: "text-c-1 mt-3 mb-3 leading-[1.45] font-medium" }, "Responses", -1)),
17
+ a("ul", k, [
18
+ (t(!0), o(p, null, c(e.responses, (m, r) => (t(), d(b, {
19
+ key: r,
20
+ breadcrumb: e.breadcrumb,
21
+ collapsableItems: e.collapsableItems,
22
+ name: r,
23
+ parameter: u(i)(m),
24
+ withExamples: !1
25
+ }, null, 8, ["breadcrumb", "collapsableItems", "name", "parameter"]))), 128))
26
+ ])
27
+ ])) : n("", !0);
25
28
  }
26
29
  });
27
30
  export {
28
- h as default
31
+ B as default
29
32
  };
@@ -1,22 +1,15 @@
1
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
2
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
2
  type __VLS_Props = {
4
- parameters?: RequestEntity['parameters'] | RequestEntity['responses'];
5
- showChildren?: boolean;
3
+ parameters: ParameterObject[];
6
4
  collapsableItems?: boolean;
7
5
  withExamples?: boolean;
8
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
9
6
  breadcrumb?: string[];
10
7
  };
11
8
  declare var __VLS_1: {};
12
9
  type __VLS_Slots = {} & {
13
10
  title?: (props: typeof __VLS_1) => any;
14
11
  };
15
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
- withExamples: boolean;
17
- showChildren: boolean;
18
- collapsableItems: boolean;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_component: 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>;
20
13
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
21
14
  export default _default;
22
15
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,KAAK,WAAW,GAAG;IACf,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAA;IACrE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;AAoEJ,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAqB7C,QAAA,MAAM,eAAe;kBA9FF,OAAO;kBAFP,OAAO;sBACH,OAAO;6EAsG5B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;AA4DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,37 @@
1
- import t from "./ParameterList.vue2.js";
2
- import "./ParameterList.vue3.js";
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-d28c9986"]]);
1
+ import { defineComponent as s, createElementBlock as l, createCommentVNode as o, openBlock as a, createElementVNode as m, renderSlot as n, Fragment as p, renderList as c, createBlock as d } from "vue";
2
+ import i from "./ParameterListItem.vue.js";
3
+ const u = {
4
+ key: 0,
5
+ class: "mt-6"
6
+ }, b = { class: "text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium" }, f = { class: "mb-3 list-none p-0 text-sm" }, B = /* @__PURE__ */ s({
7
+ __name: "ParameterList",
8
+ props: {
9
+ parameters: {},
10
+ collapsableItems: { type: Boolean, default: !1 },
11
+ withExamples: { type: Boolean, default: !0 },
12
+ breadcrumb: {}
13
+ },
14
+ setup(h) {
15
+ return (e, _) => {
16
+ var r;
17
+ return (r = e.parameters) != null && r.length ? (a(), l("div", u, [
18
+ m("div", b, [
19
+ n(e.$slots, "title")
20
+ ]),
21
+ m("ul", f, [
22
+ (a(!0), l(p, null, c(e.parameters, (t) => (a(), d(i, {
23
+ key: t.name,
24
+ breadcrumb: e.breadcrumb,
25
+ collapsableItems: e.collapsableItems,
26
+ name: t.name,
27
+ parameter: t,
28
+ withExamples: e.withExamples
29
+ }, null, 8, ["breadcrumb", "collapsableItems", "name", "parameter", "withExamples"]))), 128))
30
+ ])
31
+ ])) : o("", !0);
32
+ };
33
+ }
34
+ });
5
35
  export {
6
- e as default
36
+ B as default
7
37
  };
@@ -1,40 +1,4 @@
1
- import { defineComponent as m, createElementBlock as s, createCommentVNode as o, openBlock as a, createElementVNode as l, renderSlot as n, Fragment as p, renderList as i, createBlock as d } from "vue";
2
- import c from "./ParameterListItem.vue.js";
3
- const h = {
4
- key: 0,
5
- class: "parameter-list"
6
- }, u = { class: "parameter-list-title" }, b = { class: "parameter-list-items" }, E = /* @__PURE__ */ m({
7
- __name: "ParameterList",
8
- props: {
9
- parameters: {},
10
- showChildren: { type: Boolean, default: !1 },
11
- collapsableItems: { type: Boolean, default: !1 },
12
- withExamples: { type: Boolean, default: !0 },
13
- schemas: {},
14
- breadcrumb: {}
15
- },
16
- setup(f) {
17
- return (e, w) => {
18
- var t;
19
- return (t = e.parameters) != null && t.length ? (a(), s("div", h, [
20
- l("div", u, [
21
- n(e.$slots, "title", {}, void 0, !0)
22
- ]),
23
- l("ul", b, [
24
- (a(!0), s(p, null, i(e.parameters, (r) => (a(), d(c, {
25
- key: r.name,
26
- breadcrumb: e.breadcrumb,
27
- collapsableItems: e.collapsableItems,
28
- parameter: r,
29
- schemas: e.schemas,
30
- showChildren: e.showChildren,
31
- withExamples: e.withExamples
32
- }, null, 8, ["breadcrumb", "collapsableItems", "parameter", "schemas", "showChildren", "withExamples"]))), 128))
33
- ])
34
- ])) : o("", !0);
35
- };
36
- }
37
- });
1
+ import f from "./ParameterList.vue.js";
38
2
  export {
39
- E as default
3
+ f as default
40
4
  };
@@ -1,17 +1,11 @@
1
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
2
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { ParameterObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
2
  type __VLS_Props = {
4
- parameter: NonNullable<RequestEntity['parameters']>[number] | NonNullable<RequestEntity['responses']>[number];
5
- showChildren?: boolean;
3
+ parameter: ParameterObject | ResponseObject;
4
+ name: string;
6
5
  collapsableItems?: boolean;
7
6
  withExamples?: boolean;
8
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
9
7
  breadcrumb?: string[];
10
8
  };
11
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
- withExamples: boolean;
13
- showChildren: boolean;
14
- collapsableItems: boolean;
15
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ 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>;
16
10
  export default _default;
17
11
  //# sourceMappingURL=ParameterListItem.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAuQA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQxD,KAAK,WAAW,GAAG;IACf,SAAS,EACL,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,GAChD,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;kBAHe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AA6T9B,wBAOG"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAoSF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./ParameterListItem.vue2.js";
2
2
  import "./ParameterListItem.vue3.js";
3
3
  import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f353e243"]]);
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-61c384f2"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,104 +1,107 @@
1
- import { defineComponent as C, computed as u, ref as E, createElementBlock as S, createCommentVNode as o, openBlock as s, createVNode as l, createElementVNode as p, unref as r, withCtx as c, createBlock as i, normalizeClass as k, toDisplayString as q } from "vue";
2
- import { Disclosure as D, DisclosureButton as P, DisclosurePanel as V } from "@headlessui/vue";
3
- import { ScalarMarkdown as I } from "@scalar/components";
4
- import { ScalarIconCaretRight as j } from "@scalar/icons";
5
- import { isDefined as N } from "@scalar/oas-utils/helpers";
6
- import T from "./ContentTypeSelect.vue.js";
7
- import z from "./ParameterHeaders.vue.js";
8
- import O from "../../../components/Content/Schema/SchemaProperty.vue.js";
9
- const H = {
10
- key: 0,
11
- class: "parameter-item group/parameter-item relative"
12
- }, L = { class: "parameter-item-name" }, M = { class: "parameter-item-type" }, R = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, W = /* @__PURE__ */ C({
1
+ import { defineComponent as S, computed as m, ref as q, createElementBlock as I, openBlock as n, createVNode as u, createElementVNode as p, unref as o, withCtx as f, createBlock as d, createCommentVNode as v, normalizeClass as E, toDisplayString as N } from "vue";
2
+ import { Disclosure as P, DisclosureButton as R, DisclosurePanel as j } from "@headlessui/vue";
3
+ import { ScalarMarkdown as z } from "@scalar/components";
4
+ import { isDefined as O } from "@scalar/helpers/array/is-defined";
5
+ import { ScalarIconCaretRight as H } from "@scalar/icons";
6
+ import { getResolvedRef as B } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
+ import L from "../../../components/Content/Schema/SchemaProperty.vue.js";
8
+ import M from "./ContentTypeSelect.vue.js";
9
+ import T from "./Headers.vue.js";
10
+ const U = { class: "parameter-item group/parameter-item relative" }, $ = { class: "parameter-item-name" }, A = { class: "parameter-item-type" }, F = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, ae = /* @__PURE__ */ S({
13
11
  __name: "ParameterListItem",
14
12
  props: {
15
13
  parameter: {},
16
- showChildren: { type: Boolean, default: !1 },
14
+ name: {},
17
15
  collapsableItems: { type: Boolean, default: !1 },
18
16
  withExamples: { type: Boolean, default: !0 },
19
- schemas: {},
20
17
  breadcrumb: {}
21
18
  },
22
- setup(w) {
23
- const a = w, g = u(() => a.parameter.content ? Object.keys(a.parameter.content) : []), t = E(g.value[0]);
24
- a.parameter.content && "application/json" in a.parameter.content && (t.value = "application/json");
25
- const m = u(() => !!(a.collapsableItems && (a.parameter.content || a.parameter.headers || a.parameter.schema))), B = u(() => a.parameter.readOnly !== !0);
26
- return (e, d) => B.value ? (s(), S("li", H, [
27
- l(r(D), null, {
28
- default: c(({ open: n }) => [
29
- m.value ? (s(), i(r(P), {
19
+ setup(e) {
20
+ const s = m(
21
+ () => "schema" in e.parameter && e.parameter.schema ? B(e.parameter.schema) : null
22
+ ), t = m(
23
+ () => "content" in e.parameter && e.parameter.content ? e.parameter.content : null
24
+ ), i = q(Object.keys(t.value || {})[0]), h = m(
25
+ () => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
26
+ ), C = m(() => {
27
+ var b, y, g, k, w, x;
28
+ const a = t.value ? (y = (b = t.value) == null ? void 0 : b[i.value]) == null ? void 0 : y.schema : s.value, c = "deprecated" in e.parameter ? e.parameter.deprecated : (g = s.value) == null ? void 0 : g.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, V = ((k = s.value) == null ? void 0 : k.examples) ?? [], D = [...Object.values({
29
+ ...r,
30
+ ...(x = (w = t.value) == null ? void 0 : w[i.value]) == null ? void 0 : x.examples
31
+ }), ...V];
32
+ return {
33
+ ...B(a),
34
+ deprecated: c,
35
+ ..."example" in e.parameter && O(e.parameter.example) && { example: e.parameter.example },
36
+ examples: D
37
+ };
38
+ }), l = m(
39
+ () => !!(e.collapsableItems && (t.value || h.value || s.value))
40
+ );
41
+ return (a, c) => (n(), I("li", U, [
42
+ u(o(P), null, {
43
+ default: f(({ open: r }) => [
44
+ l.value ? (n(), d(o(R), {
30
45
  key: 0,
31
- class: k(["parameter-item-trigger", { "parameter-item-trigger-open": n }])
46
+ class: E(["parameter-item-trigger", { "parameter-item-trigger-open": r }])
32
47
  }, {
33
- default: c(() => [
34
- p("span", L, [
35
- l(r(j), {
36
- weight: "bold",
37
- class: k(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": n }])
48
+ default: f(() => [
49
+ p("span", $, [
50
+ u(o(H), {
51
+ class: E(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": r }]),
52
+ weight: "bold"
38
53
  }, null, 8, ["class"]),
39
- p("span", null, q(e.parameter.name), 1)
54
+ p("span", null, N(a.name), 1)
40
55
  ]),
41
- p("span", M, [
42
- e.parameter.description ? (s(), i(r(I), {
56
+ p("span", A, [
57
+ a.parameter.description ? (n(), d(o(z), {
43
58
  key: 0,
44
59
  class: "markdown",
45
- value: e.parameter.description
46
- }, null, 8, ["value"])) : o("", !0)
60
+ value: a.parameter.description
61
+ }, null, 8, ["value"])) : v("", !0)
47
62
  ])
48
63
  ]),
49
64
  _: 2
50
- }, 1032, ["class"])) : o("", !0),
51
- l(r(V), {
65
+ }, 1032, ["class"])) : v("", !0),
66
+ u(o(j), {
52
67
  class: "parameter-item-container parameter-item-container-markdown",
53
- static: !m.value
68
+ static: !l.value
54
69
  }, {
55
- default: c(() => {
56
- var f, h, y, b, v;
57
- return [
58
- e.parameter.headers ? (s(), i(z, {
59
- key: 0,
60
- breadcrumb: e.breadcrumb,
61
- headers: e.parameter.headers
62
- }, null, 8, ["breadcrumb", "headers"])) : o("", !0),
63
- l(r(O), {
64
- is: "div",
65
- compact: "",
66
- breadcrumb: e.breadcrumb,
67
- description: m.value ? "" : e.parameter.description,
68
- name: m.value ? "" : e.parameter.name,
69
- noncollapsible: !0,
70
- required: e.parameter.required,
71
- schemas: e.schemas,
72
- value: {
73
- ...e.parameter.content ? (h = (f = e.parameter.content) == null ? void 0 : f[t.value]) == null ? void 0 : h.schema : e.parameter.schema,
74
- deprecated: e.parameter.deprecated,
75
- ...r(N)(e.parameter.example) && { example: e.parameter.example },
76
- examples: e.parameter.content ? {
77
- ...e.parameter.examples,
78
- ...(b = (y = e.parameter.content) == null ? void 0 : y[t.value]) == null ? void 0 : b.examples
79
- } : e.parameter.examples || ((v = e.parameter.schema) == null ? void 0 : v.examples)
80
- },
81
- withExamples: e.withExamples
82
- }, null, 8, ["breadcrumb", "description", "name", "required", "schemas", "value", "withExamples"])
83
- ];
84
- }),
70
+ default: f(() => [
71
+ h.value ? (n(), d(T, {
72
+ key: 0,
73
+ breadcrumb: a.breadcrumb,
74
+ headers: h.value
75
+ }, null, 8, ["breadcrumb", "headers"])) : v("", !0),
76
+ u(L, {
77
+ is: "div",
78
+ breadcrumb: a.breadcrumb,
79
+ compact: "",
80
+ description: l.value ? "" : a.parameter.description,
81
+ name: l.value ? "" : a.name,
82
+ noncollapsible: !0,
83
+ required: "required" in a.parameter && a.parameter.required,
84
+ value: C.value,
85
+ withExamples: a.withExamples
86
+ }, null, 8, ["breadcrumb", "description", "name", "required", "value", "withExamples"])
87
+ ]),
85
88
  _: 1
86
89
  }, 8, ["static"])
87
90
  ]),
88
91
  _: 1
89
92
  }),
90
- p("div", R, [
91
- m.value && a.parameter.content ? (s(), i(T, {
93
+ p("div", F, [
94
+ l.value && t.value ? (n(), d(M, {
92
95
  key: 0,
96
+ modelValue: i.value,
97
+ "onUpdate:modelValue": c[0] || (c[0] = (r) => i.value = r),
93
98
  class: "parameter-item-content-type",
94
- defaultValue: t.value,
95
- requestBody: a.parameter,
96
- onSelectContentType: d[0] || (d[0] = ({ contentType: n }) => t.value = n)
97
- }, null, 8, ["defaultValue", "requestBody"])) : o("", !0)
99
+ content: t.value
100
+ }, null, 8, ["modelValue", "content"])) : v("", !0)
98
101
  ])
99
- ])) : o("", !0);
102
+ ]));
100
103
  }
101
104
  });
102
105
  export {
103
- W as default
106
+ ae as default
104
107
  };
@@ -1,18 +1,13 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
3
  breadcrumb?: string[];
4
- requestBody?: OpenAPIV3_1.OperationObject['requestBody'];
5
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
4
+ requestBody?: RequestBodyObject;
6
5
  };
7
6
  declare var __VLS_1: {};
8
7
  type __VLS_Slots = {} & {
9
8
  title?: (props: typeof __VLS_1) => any;
10
9
  };
11
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
- "update:modelValue": (value: string) => any;
13
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_component: 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>;
16
11
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
17
12
  export default _default;
18
13
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AA2LA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAYxD,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;AAsOF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B7C,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAQrG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AAoMF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  import "./RequestBody.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-940125b5"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-593d1099"]]);
5
5
  export {
6
6
  p as default
7
7
  };