@scalar/api-reference 1.29.3 → 1.31.0

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 (159) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +13 -114
  3. package/dist/browser/standalone.js +6525 -6416
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  7. package/dist/components/ApiReferenceLayout.vue2.js +164 -181
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
  11. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Content.vue.js +1 -1
  13. package/dist/components/Content/Content.vue2.js +5 -5
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  15. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  17. package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
  18. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Lazy/Loading.vue.js +46 -46
  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 +2 -2
  23. package/dist/components/Content/Models/Models.vue2.js +7 -6
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
  25. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  27. package/dist/components/Content/Schema/Schema.preview.d.ts +98 -56
  28. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  29. package/dist/components/Content/Schema/Schema.vue.d.ts +6 -3
  30. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  31. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  32. package/dist/components/Content/Schema/Schema.vue2.js +140 -97
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  34. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
  36. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +13 -0
  37. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
  38. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +49 -0
  39. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +4 -0
  40. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  41. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  43. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -2
  44. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  45. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  46. package/dist/components/Content/Schema/SchemaProperty.vue2.js +40 -38
  47. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
  48. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  49. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  50. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +147 -143
  51. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
  52. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  53. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +9 -1
  54. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -1
  55. package/dist/components/Content/Schema/helpers/schema-discriminator.js +45 -0
  56. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
  57. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  58. package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
  59. package/dist/components/Layouts/ClassicLayout.vue.js +10 -8
  60. package/dist/components/Layouts/Layouts.vue.js +11 -9
  61. package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
  62. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  63. package/dist/components/Section/SectionHeader.vue.js +2 -2
  64. package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
  65. package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
  66. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  68. package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
  69. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  70. package/dist/components/SingleApiReference.vue.js +27 -33
  71. package/dist/esm.d.ts.map +1 -1
  72. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +224 -204
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
  78. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
  79. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
  80. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
  81. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
  82. package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
  83. package/dist/features/DocumentSource/index.d.ts +2 -0
  84. package/dist/features/DocumentSource/index.d.ts.map +1 -0
  85. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  86. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  87. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  88. package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
  89. package/dist/features/DownloadLink/index.d.ts +1 -0
  90. package/dist/features/DownloadLink/index.d.ts.map +1 -1
  91. package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
  92. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
  93. package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
  94. package/dist/features/Operation/Operation.vue.d.ts +2 -2
  95. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  96. package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
  97. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  98. package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
  99. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
  101. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  102. package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
  103. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  104. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  105. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  106. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -2
  107. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  109. package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
  110. package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -2
  111. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  112. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  113. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +14 -0
  114. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -0
  115. package/dist/features/Operation/components/callbacks/Callback.vue.js +7 -0
  116. package/dist/features/Operation/components/callbacks/Callback.vue2.js +62 -0
  117. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +10 -0
  118. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -0
  119. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +30 -0
  120. package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +4 -0
  121. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +2 -2
  122. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  123. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  124. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +55 -55
  125. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -2
  126. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  127. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  128. package/dist/features/Operation/layouts/ModernLayout.vue2.js +94 -79
  129. package/dist/features/Operation/types/schemas.d.ts +3 -0
  130. package/dist/features/Operation/types/schemas.d.ts.map +1 -0
  131. package/dist/features/Search/SearchButton.vue.js +2 -2
  132. package/dist/helpers/local-storage.d.ts +8 -0
  133. package/dist/helpers/local-storage.d.ts.map +1 -0
  134. package/dist/helpers/local-storage.js +6 -0
  135. package/dist/helpers/measure.d.ts +21 -0
  136. package/dist/helpers/measure.d.ts.map +1 -0
  137. package/dist/helpers/measure.js +7 -0
  138. package/dist/helpers/parse.d.ts +3 -5
  139. package/dist/helpers/parse.d.ts.map +1 -1
  140. package/dist/helpers/parse.js +64 -86
  141. package/dist/helpers/scroll-to-id.d.ts.map +1 -1
  142. package/dist/helpers/scroll-to-id.js +18 -4
  143. package/dist/index.d.ts +0 -1
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +33 -35
  146. package/dist/libs/openapi.d.ts +3 -3
  147. package/dist/libs/openapi.d.ts.map +1 -1
  148. package/dist/libs/openapi.js +35 -42
  149. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  150. package/dist/standalone/lib/html-api.js +15 -15
  151. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  152. package/dist/stores/useHttpClientStore.js +19 -18
  153. package/dist/style.css +1 -1
  154. package/dist/types.d.ts +27 -3
  155. package/dist/types.d.ts.map +1 -1
  156. package/package.json +15 -16
  157. package/dist/hooks/useReactiveSpec.d.ts +0 -448
  158. package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
  159. package/dist/hooks/useReactiveSpec.js +0 -59
@@ -0,0 +1,49 @@
1
+ import { defineComponent as c, computed as n, createBlock as u, openBlock as b, unref as s, withCtx as f, createElementVNode as i, createVNode as V, toDisplayString as m } from "vue";
2
+ import { ScalarListbox as x } from "@scalar/components";
3
+ import { ScalarIconCaretDown as g } from "@scalar/icons";
4
+ const v = {
5
+ class: "bg-b-1.5 hover:bg-b-2 flex w-full items-center gap-1 border-b px-2 py-1.25",
6
+ type: "button"
7
+ }, y = { class: "composition-selector-label text-c-1 relative" }, _ = /* @__PURE__ */ c({
8
+ __name: "SchemaDiscriminator",
9
+ props: {
10
+ discriminatorMapping: {},
11
+ modelValue: {},
12
+ discriminatorPropertyName: {}
13
+ },
14
+ emits: ["update:modelValue"],
15
+ setup(l, { emit: p }) {
16
+ const d = p, r = n(
17
+ () => Object.keys(l.discriminatorMapping).map((e) => ({
18
+ id: e,
19
+ label: e
20
+ }))
21
+ ), a = n({
22
+ get: () => r.value.find(
23
+ (e) => e.id === l.modelValue
24
+ ),
25
+ set: (e) => d("update:modelValue", e.id)
26
+ });
27
+ return (e, t) => (b(), u(s(x), {
28
+ modelValue: a.value,
29
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => a.value = o),
30
+ options: r.value,
31
+ resize: ""
32
+ }, {
33
+ default: f(() => {
34
+ var o;
35
+ return [
36
+ i("button", v, [
37
+ t[1] || (t[1] = i("span", { class: "text-c-2" }, "Discriminator", -1)),
38
+ i("span", y, m(e.discriminatorPropertyName) + " " + m((o = a.value) == null ? void 0 : o.label), 1),
39
+ V(s(g))
40
+ ])
41
+ ];
42
+ }),
43
+ _: 1
44
+ }, 8, ["modelValue", "options"]));
45
+ }
46
+ });
47
+ export {
48
+ _ as default
49
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SchemaDiscriminator.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,6 +1,6 @@
1
- import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
2
  type __VLS_Props = {
3
- value: OpenAPIV2.DefinitionsObject | OpenAPIV3.SchemaObject | OpenAPIV3.ArraySchemaObject | OpenAPIV3.NonArraySchemaObject | OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ArraySchemaObject | OpenAPIV3_1.NonArraySchemaObject;
3
+ value: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ArraySchemaObject | OpenAPIV3_1.NonArraySchemaObject;
4
4
  name?: string;
5
5
  };
6
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>;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAI9E,KAAK,WAAW,GAAG;IACjB,KAAK,EACD,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,YAAY,GACtB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;AAgFF,wBAMG"}
1
+ {"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,KAAK,WAAW,GAAG;IACjB,KAAK,EACD,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;AAgFF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaHeading.vue2.js";
2
2
  /* empty css */
3
3
  import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e45fe752"]]);
4
+ const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-eec32394"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
2
  import { type Component } from 'vue';
3
3
  /**
4
4
  * Note: We’re taking in a prop called `value` which should be a JSON Schema.
@@ -18,13 +18,15 @@ type __VLS_Props = {
18
18
  additional?: boolean;
19
19
  pattern?: boolean;
20
20
  withExamples?: boolean;
21
- schemas?: OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
21
+ hideModelNames?: boolean;
22
+ schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
22
23
  hideHeading?: boolean;
23
24
  };
24
25
  declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
26
  required: boolean;
26
27
  level: number;
27
28
  compact: boolean;
29
+ hideModelNames: boolean;
28
30
  withExamples: boolean;
29
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
32
  export default _default_1;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA+gBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAc9C;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAmd1B,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA8gBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAc9C;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cATW,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAKA,OAAO;kBADT,OAAO;;AAkd1B,0BAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaProperty.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-689c7117"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ac7dc0ae"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as Z, computed as y, createBlock as h, openBlock as l, resolveDynamicComponent as M, normalizeClass as I, withCtx as m, createCommentVNode as r, createElementBlock as o, createVNode as a, createSlots as G, createTextVNode as D, toDisplayString as c, unref as i, Fragment as d, renderList as k, createElementVNode as f } from "vue";
1
+ import { defineComponent as Z, computed as y, createBlock as h, openBlock as l, resolveDynamicComponent as _, normalizeClass as A, withCtx as m, createCommentVNode as r, createElementBlock as o, createVNode as a, createSlots as G, createTextVNode as D, toDisplayString as d, unref as i, Fragment as c, renderList as k, createElementVNode as f } from "vue";
2
2
  import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
3
3
  import { ScalarMarkdown as H, ScalarIcon as W } from "@scalar/components";
4
4
  import { optimizeValueForDisplay as X, compositions as Y } from "./helpers/optimizeValueForDisplay.js";
5
- import L from "./Schema.vue.js";
6
- import O from "./SchemaComposition.vue.js";
5
+ import I from "./Schema.vue.js";
6
+ import L from "./SchemaComposition.vue.js";
7
7
  import x from "./SchemaPropertyHeading.vue.js";
8
8
  import ee from "../../SpecificationExtension/SpecificationExtension.vue.js";
9
9
  const ne = {
@@ -21,10 +21,10 @@ const ne = {
21
21
  }, oe = { class: "property-heading" }, ae = { class: "property-name" }, ie = { class: "property-description" }, re = {
22
22
  key: 1,
23
23
  class: "property-enum-values"
24
- }, pe = { class: "property-enum-value-label" }, me = { class: "property-enum-value-label" }, ce = {
24
+ }, pe = { class: "property-enum-value-label" }, me = { class: "property-enum-value-label" }, de = {
25
25
  key: 4,
26
26
  class: "children"
27
- }, de = {
27
+ }, ce = {
28
28
  key: 0,
29
29
  class: "children"
30
30
  }, Be = /* @__PURE__ */ Z({
@@ -41,11 +41,12 @@ const ne = {
41
41
  additional: { type: Boolean },
42
42
  pattern: { type: Boolean },
43
43
  withExamples: { type: Boolean, default: !0 },
44
+ hideModelNames: { type: Boolean, default: !1 },
44
45
  schemas: {},
45
46
  hideHeading: { type: Boolean }
46
47
  },
47
- setup(_) {
48
- const $ = _, S = {
48
+ setup(O) {
49
+ const $ = O, S = {
49
50
  integer: {
50
51
  _default: "Integer numbers.",
51
52
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -61,17 +62,17 @@ const ne = {
61
62
  }, B = (e, t) => t != null && t.properties || t != null && t.additionalProperties || t != null && t.patternProperties || t != null && t.allOf ? null : e || (t == null ? void 0 : t.description) || null, E = (e) => !e || !S[e.type] ? null : S[e.type][e.format || "_default"], p = (e) => {
62
63
  var t;
63
64
  return (e == null ? void 0 : e.enum) || ((t = e == null ? void 0 : e.items) == null ? void 0 : t.enum) || [];
64
- }, C = y(
65
+ }, N = y(
65
66
  () => p(n.value).length > 9
66
- ), P = y(() => C.value ? 5 : 9), R = y(
67
- () => p(n.value).slice(0, P.value)
67
+ ), C = y(() => N.value ? 5 : 9), R = y(
68
+ () => p(n.value).slice(0, C.value)
68
69
  ), T = y(
69
- () => p(n.value).slice(P.value)
70
+ () => p(n.value).slice(C.value)
70
71
  ), n = y(() => X($.value)), U = (e, t, g, b, v) => t || g || b || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || v;
71
72
  return (e, t) => {
72
73
  var g;
73
- return l(), h(M(e.is ?? "li"), {
74
- class: I(["property", [
74
+ return l(), h(_(e.is ?? "li"), {
75
+ class: A(["property", [
75
76
  (B(e.description, n.value), ""),
76
77
  `property--level-${e.level}`,
77
78
  {
@@ -81,7 +82,7 @@ const ne = {
81
82
  ]])
82
83
  }, {
83
84
  default: m(() => {
84
- var b, v, w, q, F, N, V, j, z;
85
+ var b, v, P, w, q, F, M, V, j;
85
86
  return [
86
87
  U(
87
88
  n.value,
@@ -96,23 +97,24 @@ const ne = {
96
97
  pattern: e.pattern,
97
98
  required: e.required,
98
99
  value: n.value,
99
- schemas: e.schemas
100
+ schemas: e.schemas,
101
+ hideModelNames: e.hideModelNames
100
102
  }, G({ _: 2 }, [
101
103
  e.name ? {
102
104
  name: "name",
103
105
  fn: m(() => [
104
- D(c(e.name), 1)
106
+ D(d(e.name), 1)
105
107
  ]),
106
108
  key: "0"
107
109
  } : void 0,
108
110
  (b = n.value) != null && b.example ? {
109
111
  name: "example",
110
112
  fn: m(() => [
111
- D(" Example: " + c(n.value.example), 1)
113
+ D(" Example: " + d(n.value.example), 1)
112
114
  ]),
113
115
  key: "1"
114
116
  } : void 0
115
- ]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas"])) : r("", !0),
117
+ ]), 1032, ["additional", "enum", "pattern", "required", "value", "schemas", "hideModelNames"])) : r("", !0),
116
118
  B(e.description, n.value) ? (l(), o("div", ne, [
117
119
  a(i(H), {
118
120
  value: B(e.description, n.value)
@@ -123,13 +125,13 @@ const ne = {
123
125
  }, null, 8, ["value"])
124
126
  ])) : r("", !0),
125
127
  ((v = p(n.value)) == null ? void 0 : v.length) > 0 ? (l(), o("div", le, [
126
- Array.isArray((w = n.value) == null ? void 0 : w["x-enumDescriptions"]) ? (l(), o("div", se, [
127
- (l(!0), o(d, null, k(p(n.value), (s) => (l(), o("div", {
128
+ Array.isArray((P = n.value) == null ? void 0 : P["x-enumDescriptions"]) ? (l(), o("div", se, [
129
+ (l(!0), o(c, null, k(p(n.value), (s) => (l(), o("div", {
128
130
  key: s,
129
131
  class: "property"
130
132
  }, [
131
133
  f("div", oe, [
132
- f("div", ae, c(s), 1)
134
+ f("div", ae, d(s), 1)
133
135
  ]),
134
136
  f("div", ie, [
135
137
  a(i(H), {
@@ -138,21 +140,21 @@ const ne = {
138
140
  ])
139
141
  ]))), 128))
140
142
  ])) : (l(), o("ul", re, [
141
- (l(!0), o(d, null, k(R.value, (s) => (l(), o("li", {
143
+ (l(!0), o(c, null, k(R.value, (s) => (l(), o("li", {
142
144
  key: s,
143
145
  class: "property-enum-value"
144
146
  }, [
145
- f("span", pe, c(s), 1)
147
+ f("span", pe, d(s), 1)
146
148
  ]))), 128)),
147
- C.value ? (l(), h(i(J), { key: 0 }, {
149
+ N.value ? (l(), h(i(J), { key: 0 }, {
148
150
  default: m(({ open: s }) => [
149
151
  a(i(K), null, {
150
152
  default: m(() => [
151
- (l(!0), o(d, null, k(T.value, (u) => (l(), o("li", {
153
+ (l(!0), o(c, null, k(T.value, (u) => (l(), o("li", {
152
154
  key: u,
153
155
  class: "property-enum-value"
154
156
  }, [
155
- f("span", me, c(u), 1)
157
+ f("span", me, d(u), 1)
156
158
  ]))), 128))
157
159
  ]),
158
160
  _: 1
@@ -160,11 +162,11 @@ const ne = {
160
162
  a(i(Q), { class: "enum-toggle-button" }, {
161
163
  default: m(() => [
162
164
  a(i(W), {
163
- class: I(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": s }]),
165
+ class: A(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": s }]),
164
166
  icon: "Add",
165
167
  size: "sm"
166
168
  }, null, 8, ["class"]),
167
- D(" " + c(s ? "Hide values" : "Show all values"), 1)
169
+ D(" " + d(s ? "Hide values" : "Show all values"), 1)
168
170
  ]),
169
171
  _: 2
170
172
  }, 1024)
@@ -173,8 +175,8 @@ const ne = {
173
175
  })) : r("", !0)
174
176
  ]))
175
177
  ])) : r("", !0),
176
- ((q = n.value) == null ? void 0 : q.type) === "object" && ((F = n.value) != null && F.properties || (N = n.value) != null && N.additionalProperties) ? (l(), o("div", ce, [
177
- a(L, {
178
+ ((w = n.value) == null ? void 0 : w.type) === "object" && ((q = n.value) != null && q.properties || (F = n.value) != null && F.additionalProperties) ? (l(), o("div", de, [
179
+ a(I, {
178
180
  compact: e.compact,
179
181
  level: e.level + 1,
180
182
  name: e.name,
@@ -183,9 +185,9 @@ const ne = {
183
185
  schemas: e.schemas
184
186
  }, null, 8, ["compact", "level", "name", "noncollapsible", "value", "schemas"])
185
187
  ])) : r("", !0),
186
- (V = n.value) != null && V.items && typeof n.value.items == "object" && "type" in n.value.items && typeof n.value.items.type == "string" ? (l(), o(d, { key: 5 }, [
187
- ["object"].includes((z = (j = n.value) == null ? void 0 : j.items) == null ? void 0 : z.type) ? (l(), o("div", de, [
188
- a(L, {
188
+ (M = n.value) != null && M.items && typeof n.value.items == "object" && "type" in n.value.items && typeof n.value.items.type == "string" ? (l(), o(c, { key: 5 }, [
189
+ ["object"].includes((j = (V = n.value) == null ? void 0 : V.items) == null ? void 0 : j.type) ? (l(), o("div", ce, [
190
+ a(I, {
189
191
  compact: e.compact,
190
192
  level: e.level + 1,
191
193
  name: e.name,
@@ -195,10 +197,10 @@ const ne = {
195
197
  }, null, 8, ["compact", "level", "name", "noncollapsible", "value", "schemas"])
196
198
  ])) : r("", !0)
197
199
  ], 64)) : r("", !0),
198
- (l(!0), o(d, null, k(i(Y), (s) => {
199
- var u, A;
200
- return l(), o(d, { key: s }, [
201
- (u = n.value) != null && u[s] ? (l(), h(O, {
200
+ (l(!0), o(c, null, k(i(Y), (s) => {
201
+ var u, z;
202
+ return l(), o(c, { key: s }, [
203
+ (u = n.value) != null && u[s] ? (l(), h(L, {
202
204
  key: 0,
203
205
  compact: e.compact,
204
206
  composition: s,
@@ -208,7 +210,7 @@ const ne = {
208
210
  noncollapsible: e.noncollapsible,
209
211
  schemas: e.schemas,
210
212
  value: n.value
211
- }, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (A = n.value) != null && A.items && typeof s == "string" && typeof n.value.items == "object" && !("type" in n.value.items) && s in n.value.items ? (l(), h(O, {
213
+ }, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (z = n.value) != null && z.items && typeof s == "string" && typeof n.value.items == "object" && !("type" in n.value.items) && s in n.value.items ? (l(), h(L, {
212
214
  key: 1,
213
215
  compact: e.compact,
214
216
  composition: s,
@@ -1,4 +1,4 @@
1
- import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
2
  type __VLS_Props = {
3
3
  value?: Record<string, any>;
4
4
  enum?: boolean;
@@ -6,7 +6,8 @@ type __VLS_Props = {
6
6
  additional?: boolean;
7
7
  pattern?: boolean;
8
8
  withExamples?: boolean;
9
- schemas?: OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
9
+ hideModelNames?: boolean;
10
+ schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
10
11
  };
11
12
  declare function __VLS_template(): {
12
13
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AA2XA,OAAO,KAAK,EAEV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAgB9B,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;AAkJF,iBAAS,cAAc;WAuUT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAqZA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAgBxD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;AAyKF,iBAAS,cAAc;WA4UT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaPropertyHeading.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2e17f3f8"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-25ed5dbb"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };