@scalar/api-reference 1.35.5 → 1.35.6

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 (217) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/browser/standalone.js +18150 -18465
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
  5. package/dist/components/ApiReference.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue.js +4 -4
  7. package/dist/components/ApiReferenceLayout.vue2.js +247 -268
  8. package/dist/components/Badge/Badge.vue.js +1 -1
  9. package/dist/components/ClassicHeader.vue.js +1 -1
  10. package/dist/components/Content/Content.vue.js +145 -169
  11. package/dist/components/Content/Content.vue3.js +1 -1
  12. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  13. package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
  14. package/dist/components/Content/Models/Models.vue.js +27 -31
  15. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  16. package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
  17. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
  18. package/dist/components/Content/Operations/get-current-index.js +1 -1
  19. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  20. package/dist/components/Content/Schema/Schema.vue2.js +68 -74
  21. package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
  22. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  23. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  24. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
  25. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +41 -48
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
  29. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
  33. package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
  34. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
  35. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
  36. package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
  37. package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
  38. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  39. package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
  40. package/dist/components/Content/Tags/TagSection.vue.js +86 -92
  41. package/dist/components/GettingStarted.vue.js +1 -1
  42. package/dist/components/LinkList/LinkList.vue.js +1 -1
  43. package/dist/components/LoadingSkeleton.vue.js +1 -1
  44. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  45. package/dist/components/MobileHeader.vue.js +3 -3
  46. package/dist/components/MobileHeader.vue2.js +13 -12
  47. package/dist/components/OperationPath.vue.js +1 -1
  48. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  49. package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
  50. package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
  51. package/dist/components/ScreenReader.vue.js +1 -1
  52. package/dist/components/Section/CompactSection.vue.js +1 -1
  53. package/dist/components/Section/Section.vue.js +1 -1
  54. package/dist/components/Section/Section.vue2.js +13 -14
  55. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  56. package/dist/components/Section/SectionAccordion.vue2.js +29 -30
  57. package/dist/components/Section/SectionColumn.vue.js +1 -1
  58. package/dist/components/Section/SectionColumns.vue.js +1 -1
  59. package/dist/components/Section/SectionContainer.vue.js +1 -1
  60. package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
  61. package/dist/components/Section/SectionContent.vue.js +1 -1
  62. package/dist/components/Section/SectionHeader.vue.js +1 -1
  63. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  64. package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
  65. package/dist/components/ShowMoreButton.vue.js +1 -1
  66. package/dist/components/ShowMoreButton.vue2.js +12 -13
  67. package/dist/features/Operation/Operation.vue.js +31 -36
  68. package/dist/features/Operation/components/Headers.vue.js +1 -1
  69. package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
  70. package/dist/features/Operation/components/ParameterList.vue.js +21 -24
  71. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  72. package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
  73. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  74. package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
  75. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  76. package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
  77. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  78. package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
  79. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
  80. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
  82. package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
  83. package/dist/features/Search/components/SearchButton.vue.js +23 -25
  84. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  85. package/dist/features/Search/components/SearchModal.vue2.js +53 -54
  86. package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
  87. package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
  88. package/dist/features/document-source/hooks/useDocumentSource.js +16 -16
  89. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  90. package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
  91. package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
  92. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  93. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  94. package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
  95. package/dist/features/info-object/Contact.vue.js +24 -27
  96. package/dist/features/info-object/License.vue.js +26 -29
  97. package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
  98. package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
  99. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
  100. package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
  101. package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
  102. package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
  103. package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
  104. package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
  105. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
  106. package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
  107. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  108. package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
  109. package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
  110. package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
  111. package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
  112. package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
  113. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
  114. package/dist/hooks/useFreezing.js +14 -14
  115. package/dist/hooks/useNavState.js +37 -39
  116. package/dist/index.js +2 -2
  117. package/dist/libs/openapi.js +28 -31
  118. package/dist/style.css +1 -1
  119. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -75
  120. package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  122. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
  128. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
  129. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  130. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
  131. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  132. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
  133. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  134. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +46 -49
  135. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
  136. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
  137. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
  138. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  139. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
  140. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
  141. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
  142. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +106 -119
  143. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
  144. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
  145. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
  146. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
  147. package/dist/v2/helpers/get-document-name.js +10 -10
  148. package/dist/v2/helpers/map-configuration.js +48 -51
  149. package/dist/v2/hooks/use-legacy-store-events.js +44 -48
  150. package/dist/v2/hooks/use-workspace-store-events.js +23 -26
  151. package/package.json +22 -22
  152. package/dist/components/ApiReferenceLayout.vue3.js +0 -4
  153. package/dist/components/ApiReferenceLayout.vue4.js +0 -4
  154. package/dist/components/ApiReferenceLayout.vue5.js +0 -4
  155. package/dist/components/ApiReferenceLayout.vue6.js +0 -4
  156. package/dist/components/Badge/Badge.vue3.js +0 -4
  157. package/dist/components/ClassicHeader.vue2.js +0 -4
  158. package/dist/components/Content/Content.vue2.js +0 -4
  159. package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
  160. package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
  161. package/dist/components/Content/Schema/Schema.vue3.js +0 -4
  162. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
  163. package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
  164. package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
  165. package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
  166. package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
  167. package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
  168. package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
  169. package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
  170. package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
  171. package/dist/components/GettingStarted.vue3.js +0 -4
  172. package/dist/components/LinkList/LinkList.vue3.js +0 -4
  173. package/dist/components/LoadingSkeleton.vue3.js +0 -4
  174. package/dist/components/MobileHeader.vue3.js +0 -4
  175. package/dist/components/OperationPath.vue3.js +0 -4
  176. package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
  177. package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
  178. package/dist/components/ScreenReader.vue3.js +0 -4
  179. package/dist/components/Section/CompactSection.vue3.js +0 -4
  180. package/dist/components/Section/Section.vue3.js +0 -4
  181. package/dist/components/Section/SectionAccordion.vue3.js +0 -4
  182. package/dist/components/Section/SectionColumn.vue2.js +0 -4
  183. package/dist/components/Section/SectionColumns.vue2.js +0 -4
  184. package/dist/components/Section/SectionContainer.vue3.js +0 -4
  185. package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
  186. package/dist/components/Section/SectionContent.vue3.js +0 -4
  187. package/dist/components/Section/SectionHeader.vue3.js +0 -4
  188. package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
  189. package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
  190. package/dist/components/ShowMoreButton.vue3.js +0 -4
  191. package/dist/features/Operation/components/Headers.vue3.js +0 -4
  192. package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
  193. package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
  194. package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
  195. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
  196. package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
  197. package/dist/features/Search/components/SearchModal.vue3.js +0 -4
  198. package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
  199. package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
  200. package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
  201. package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
  202. package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
  203. package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
  204. package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
  205. package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
  206. package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
  207. package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
  208. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
  209. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
  210. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
  211. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
  212. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
  213. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
  214. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
  215. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
  216. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
  217. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
@@ -1,5 +1,5 @@
1
1
  import o from "./SchemaPropertyExamples.vue2.js";
2
- import "./SchemaPropertyExamples.vue3.js";
2
+ /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-64e15694"]]);
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./SchemaPropertyHeading.vue2.js";
2
- import "./SchemaPropertyHeading.vue3.js";
2
+ /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bfc3b782"]]);
5
5
  export {
@@ -1,36 +1,36 @@
1
- import { defineComponent as E, toRef as J, computed as f, createElementBlock as a, openBlock as i, createCommentVNode as l, createBlock as m, normalizeClass as F, renderSlot as j, Fragment as c, withCtx as n, createVNode as k, createTextVNode as u, toDisplayString as v, renderList as z, createSlots as H, unref as _ } from "vue";
2
- import { isDefined as d } from "@scalar/helpers/array/is-defined";
3
- import { getResolvedRef as I } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import { isArraySchema as g, isStringSchema as L, isNumberSchema as R } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
5
- import S from "../../ScreenReader.vue.js";
6
- import { getSchemaType as G } from "./helpers/get-schema-type.js";
7
- import { getModelName as K } from "./helpers/schema-name.js";
8
- import Q from "./RenderString.vue.js";
9
- import p from "./SchemaPropertyDetail.vue.js";
10
- import U from "./SchemaPropertyExamples.vue.js";
11
- import W from "../../Badge/Badge.vue.js";
12
- const X = { class: "property-heading" }, Y = {
1
+ import { defineComponent as P, toRef as A, computed as s, createElementBlock as u, openBlock as a, createCommentVNode as l, createBlock as m, normalizeClass as I, renderSlot as L, Fragment as p, withCtx as n, createVNode as c, createTextVNode as i, toDisplayString as v, renderList as R, createSlots as T, unref as k } from "vue";
2
+ import { isDefined as f } from "@scalar/helpers/array/is-defined";
3
+ import { getResolvedRef as S } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import { isArraySchema as h, isStringSchema as N, isNumberSchema as B } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
5
+ import _ from "../../ScreenReader.vue.js";
6
+ import { getSchemaType as V } from "./helpers/get-schema-type.js";
7
+ import { getModelName as $ } from "./helpers/schema-name.js";
8
+ import b from "./RenderString.vue.js";
9
+ import d from "./SchemaPropertyDetail.vue.js";
10
+ import C from "./SchemaPropertyExamples.vue.js";
11
+ import E from "../../Badge/Badge.vue.js";
12
+ const J = { class: "property-heading" }, F = {
13
13
  key: 1,
14
14
  class: "property-discriminator"
15
- }, Z = {
15
+ }, j = {
16
16
  key: 3,
17
17
  class: "property-additional"
18
- }, ee = {
18
+ }, z = {
19
19
  key: 4,
20
20
  class: "property-deprecated"
21
- }, te = {
21
+ }, H = {
22
22
  key: 5,
23
23
  class: "property-const"
24
- }, re = {
24
+ }, G = {
25
25
  key: 7,
26
26
  class: "property-write-only"
27
- }, ie = {
27
+ }, K = {
28
28
  key: 8,
29
29
  class: "property-read-only"
30
- }, ae = {
30
+ }, Q = {
31
31
  key: 9,
32
32
  class: "property-required"
33
- }, ve = /* @__PURE__ */ E({
33
+ }, le = /* @__PURE__ */ P({
34
34
  __name: "SchemaPropertyHeading",
35
35
  props: {
36
36
  value: {},
@@ -41,34 +41,33 @@ const X = { class: "property-heading" }, Y = {
41
41
  withExamples: { type: Boolean, default: !0 },
42
42
  hideModelNames: { type: Boolean, default: !1 }
43
43
  },
44
- setup(T) {
45
- const r = T, x = J(r, "value"), h = f(() => {
46
- var t, y;
47
- if (!x.value)
44
+ setup(q) {
45
+ const r = q, y = A(r, "value"), x = s(() => {
46
+ if (!y.value)
48
47
  return;
49
- const e = x.value;
48
+ const e = y.value;
50
49
  if (e.const !== void 0)
51
50
  return e.const;
52
- if (((t = e.enum) == null ? void 0 : t.length) === 1)
51
+ if (e.enum?.length === 1)
53
52
  return e.enum[0];
54
- if (g(e) && e.items) {
55
- const s = I(e.items);
56
- if (d(s.const))
57
- return s.const;
58
- if (((y = s.enum) == null ? void 0 : y.length) === 1)
59
- return s.enum[0];
53
+ if (h(e) && e.items) {
54
+ const t = S(e.items);
55
+ if (f(t.const))
56
+ return t.const;
57
+ if (t.enum?.length === 1)
58
+ return t.enum[0];
60
59
  }
61
- }), V = f(() => {
62
- if (!x.value)
60
+ }), w = s(() => {
61
+ if (!y.value)
63
62
  return [];
64
- const e = x.value, t = [];
65
- return g(e) && ((e.minItems || e.maxItems) && t.push({
63
+ const e = y.value, t = [];
64
+ return h(e) && ((e.minItems || e.maxItems) && t.push({
66
65
  key: "array-range",
67
66
  value: `${e.minItems || ""}…${e.maxItems || ""}`
68
67
  }), e.uniqueItems && t.push({
69
68
  key: "unique-items",
70
69
  value: "unique!"
71
- })), L(e) && (e.minLength && t.push({
70
+ })), N(e) && (e.minLength && t.push({
72
71
  key: "min-length",
73
72
  prefix: "min length: ",
74
73
  value: e.minLength
@@ -81,159 +80,156 @@ const X = { class: "property-heading" }, Y = {
81
80
  value: e.pattern,
82
81
  code: !0,
83
82
  truncate: !0
84
- })), (L(e) || R(e)) && e.format && t.push({
83
+ })), (N(e) || B(e)) && e.format && t.push({
85
84
  key: "format",
86
85
  value: e.format,
87
86
  truncate: !0
88
- }), R(e) && (d(e.exclusiveMinimum) && t.push({
87
+ }), B(e) && (f(e.exclusiveMinimum) && t.push({
89
88
  key: "exclusive-minimum",
90
89
  prefix: "greater than: ",
91
90
  value: e.exclusiveMinimum
92
- }), d(e.minimum) && t.push({
91
+ }), f(e.minimum) && t.push({
93
92
  key: "minimum",
94
93
  prefix: "min: ",
95
94
  value: e.minimum
96
- }), d(e.exclusiveMaximum) && t.push({
95
+ }), f(e.exclusiveMaximum) && t.push({
97
96
  key: "exclusive-maximum",
98
97
  prefix: "less than: ",
99
98
  value: e.exclusiveMaximum
100
- }), d(e.maximum) && t.push({
99
+ }), f(e.maximum) && t.push({
101
100
  key: "maximum",
102
101
  prefix: "max: ",
103
102
  value: e.maximum
104
- }), d(e.multipleOf) && t.push({
103
+ }), f(e.multipleOf) && t.push({
105
104
  key: "multiple-of",
106
105
  prefix: "multiple of: ",
107
106
  value: e.multipleOf
108
107
  })), t;
109
- }), $ = f(() => r.value ? K(r.value, r.hideModelNames) : null), b = f(() => !r.value || !("type" in r.value) ? !1 : r.value.type === "array" ? !0 : !h.value), C = f(() => r.value ? $.value || G(r.value) : ""), N = f(() => {
108
+ }), D = s(() => r.value ? $(r.value, r.hideModelNames) : null), M = s(() => !r.value || !("type" in r.value) ? !1 : r.value.type === "array" ? !0 : !x.value), O = s(() => r.value ? D.value || V(r.value) : ""), g = s(() => {
110
109
  const e = r.value;
111
- return (e == null ? void 0 : e.default) === null ? "null" : Array.isArray(e == null ? void 0 : e.default) && (e == null ? void 0 : e.default.length) === 1 ? String(e == null ? void 0 : e.default[0]) : typeof (e == null ? void 0 : e.default) == "string" ? JSON.stringify(e.default) : Array.isArray(e == null ? void 0 : e.default) || typeof (e == null ? void 0 : e.default) == "object" ? JSON.stringify(e == null ? void 0 : e.default) : e == null ? void 0 : e.default;
110
+ return e?.default === null ? "null" : Array.isArray(e?.default) && e?.default.length === 1 ? String(e?.default[0]) : typeof e?.default == "string" ? JSON.stringify(e.default) : Array.isArray(e?.default) || typeof e?.default == "object" ? JSON.stringify(e?.default) : e?.default;
112
111
  });
113
- return (e, t) => {
114
- var y, s, B, q, w, D, M, O, P, A;
115
- return i(), a("div", X, [
116
- e.$slots.name ? (i(), a("div", {
112
+ return (e, t) => (a(), u("div", J, [
113
+ e.$slots.name ? (a(), u("div", {
114
+ key: 0,
115
+ class: I(["property-name", { deprecated: r.value?.deprecated }])
116
+ }, [
117
+ L(e.$slots, "name", {}, void 0, !0)
118
+ ], 2)) : l("", !0),
119
+ r.isDiscriminator ? (a(), u("div", F, " Discriminator ")) : l("", !0),
120
+ r.value ? (a(), u(p, { key: 2 }, [
121
+ M.value ? (a(), m(d, {
117
122
  key: 0,
118
- class: F(["property-name", { deprecated: (y = r.value) == null ? void 0 : y.deprecated }])
123
+ truncate: ""
124
+ }, {
125
+ default: n(() => [
126
+ c(_, null, {
127
+ default: n(() => t[0] || (t[0] = [
128
+ i("Type: ")
129
+ ])),
130
+ _: 1,
131
+ __: [0]
132
+ }),
133
+ i(v(O.value), 1)
134
+ ]),
135
+ _: 1
136
+ })) : l("", !0),
137
+ (a(!0), u(p, null, R(w.value, (o) => (a(), m(d, {
138
+ key: o.key,
139
+ code: o.code,
140
+ truncate: o.truncate
141
+ }, T({
142
+ default: n(() => [
143
+ o.key === "format" ? (a(), m(_, { key: 0 }, {
144
+ default: n(() => t[1] || (t[1] = [
145
+ i("Format:")
146
+ ])),
147
+ _: 1,
148
+ __: [1]
149
+ })) : o.key === "pattern" ? (a(), m(_, { key: 1 }, {
150
+ default: n(() => t[2] || (t[2] = [
151
+ i(" Pattern: ")
152
+ ])),
153
+ _: 1,
154
+ __: [2]
155
+ })) : l("", !0),
156
+ i(" " + v(o.value), 1)
157
+ ]),
158
+ _: 2
119
159
  }, [
120
- j(e.$slots, "name", {}, void 0, !0)
121
- ], 2)) : l("", !0),
122
- r.isDiscriminator ? (i(), a("div", Y, " Discriminator ")) : l("", !0),
123
- r.value ? (i(), a(c, { key: 2 }, [
124
- b.value ? (i(), m(p, {
125
- key: 0,
126
- truncate: ""
127
- }, {
128
- default: n(() => [
129
- k(S, null, {
130
- default: n(() => t[0] || (t[0] = [
131
- u("Type: ")
132
- ])),
133
- _: 1,
134
- __: [0]
135
- }),
136
- u(v(C.value), 1)
160
+ o.prefix ? {
161
+ name: "prefix",
162
+ fn: n(() => [
163
+ i(v(o.prefix), 1)
137
164
  ]),
138
- _: 1
139
- })) : l("", !0),
140
- (i(!0), a(c, null, z(V.value, (o) => (i(), m(p, {
141
- key: o.key,
142
- code: o.code,
143
- truncate: o.truncate
144
- }, H({
145
- default: n(() => [
146
- o.key === "format" ? (i(), m(S, { key: 0 }, {
147
- default: n(() => t[1] || (t[1] = [
148
- u("Format:")
149
- ])),
150
- _: 1,
151
- __: [1]
152
- })) : o.key === "pattern" ? (i(), m(S, { key: 1 }, {
153
- default: n(() => t[2] || (t[2] = [
154
- u(" Pattern: ")
155
- ])),
156
- _: 1,
157
- __: [2]
158
- })) : l("", !0),
159
- u(" " + v(o.value), 1)
160
- ]),
161
- _: 2
162
- }, [
163
- o.prefix ? {
164
- name: "prefix",
165
- fn: n(() => [
166
- u(v(o.prefix), 1)
167
- ]),
168
- key: "0"
169
- } : void 0
170
- ]), 1032, ["code", "truncate"]))), 128)),
171
- r.enum ? (i(), m(p, { key: 1 }, {
172
- default: n(() => t[3] || (t[3] = [
173
- u("enum")
174
- ])),
175
- _: 1,
176
- __: [3]
177
- })) : l("", !0),
178
- N.value !== void 0 ? (i(), m(p, {
179
- key: 2,
180
- truncate: ""
181
- }, {
182
- prefix: n(() => t[4] || (t[4] = [
183
- u("default:")
184
- ])),
185
- default: n(() => [
186
- u(v(N.value), 1)
187
- ]),
188
- _: 1
189
- })) : l("", !0)
190
- ], 64)) : l("", !0),
191
- r.additional ? (i(), a("div", Z, [
192
- (s = r.value) != null && s["x-additionalPropertiesName"] ? (i(), a(c, { key: 0 }, [
193
- u(v(r.value["x-additionalPropertiesName"]), 1)
194
- ], 64)) : (i(), a(c, { key: 1 }, [
195
- u("additional properties")
196
- ], 64))
197
- ])) : l("", !0),
198
- (B = r.value) != null && B.deprecated ? (i(), a("div", ee, [
199
- k(_(W), null, {
200
- default: n(() => t[5] || (t[5] = [
201
- u("deprecated")
202
- ])),
203
- _: 1,
204
- __: [5]
205
- })
206
- ])) : l("", !0),
207
- h.value !== void 0 ? (i(), a("div", te, [
208
- k(p, { truncate: "" }, {
209
- prefix: n(() => t[6] || (t[6] = [
210
- u("const: ")
211
- ])),
212
- default: n(() => [
213
- k(Q, { value: h.value }, null, 8, ["value"])
214
- ]),
215
- _: 1
216
- })
217
- ])) : (i(), a(c, { key: 6 }, [
218
- ((q = r.value) == null ? void 0 : q.nullable) === !0 ? (i(), m(p, { key: 0 }, {
219
- default: n(() => t[7] || (t[7] = [
220
- u(" nullable ")
221
- ])),
222
- _: 1,
223
- __: [7]
224
- })) : l("", !0)
225
- ], 64)),
226
- (w = r.value) != null && w.writeOnly ? (i(), a("div", re, " write-only ")) : (D = r.value) != null && D.readOnly ? (i(), a("div", ie, " read-only ")) : l("", !0),
227
- r.required ? (i(), a("div", ae, " required ")) : l("", !0),
228
- r.withExamples ? (i(), m(U, {
229
- key: 10,
230
- example: ((M = r.value) == null ? void 0 : M.example) || r.value && _(g)(r.value) && ((P = _(I)((O = r.value) == null ? void 0 : O.items)) == null ? void 0 : P.example),
231
- examples: (A = r.value) == null ? void 0 : A.examples
232
- }, null, 8, ["example", "examples"])) : l("", !0)
233
- ]);
234
- };
165
+ key: "0"
166
+ } : void 0
167
+ ]), 1032, ["code", "truncate"]))), 128)),
168
+ r.enum ? (a(), m(d, { key: 1 }, {
169
+ default: n(() => t[3] || (t[3] = [
170
+ i("enum")
171
+ ])),
172
+ _: 1,
173
+ __: [3]
174
+ })) : l("", !0),
175
+ g.value !== void 0 ? (a(), m(d, {
176
+ key: 2,
177
+ truncate: ""
178
+ }, {
179
+ prefix: n(() => t[4] || (t[4] = [
180
+ i("default:")
181
+ ])),
182
+ default: n(() => [
183
+ i(v(g.value), 1)
184
+ ]),
185
+ _: 1
186
+ })) : l("", !0)
187
+ ], 64)) : l("", !0),
188
+ r.additional ? (a(), u("div", j, [
189
+ r.value?.["x-additionalPropertiesName"] ? (a(), u(p, { key: 0 }, [
190
+ i(v(r.value["x-additionalPropertiesName"]), 1)
191
+ ], 64)) : (a(), u(p, { key: 1 }, [
192
+ i("additional properties")
193
+ ], 64))
194
+ ])) : l("", !0),
195
+ r.value?.deprecated ? (a(), u("div", z, [
196
+ c(k(E), null, {
197
+ default: n(() => t[5] || (t[5] = [
198
+ i("deprecated")
199
+ ])),
200
+ _: 1,
201
+ __: [5]
202
+ })
203
+ ])) : l("", !0),
204
+ x.value !== void 0 ? (a(), u("div", H, [
205
+ c(d, { truncate: "" }, {
206
+ prefix: n(() => t[6] || (t[6] = [
207
+ i("const: ")
208
+ ])),
209
+ default: n(() => [
210
+ c(b, { value: x.value }, null, 8, ["value"])
211
+ ]),
212
+ _: 1
213
+ })
214
+ ])) : (a(), u(p, { key: 6 }, [
215
+ r.value?.nullable === !0 ? (a(), m(d, { key: 0 }, {
216
+ default: n(() => t[7] || (t[7] = [
217
+ i(" nullable ")
218
+ ])),
219
+ _: 1,
220
+ __: [7]
221
+ })) : l("", !0)
222
+ ], 64)),
223
+ r.value?.writeOnly ? (a(), u("div", G, " write-only ")) : r.value?.readOnly ? (a(), u("div", K, " read-only ")) : l("", !0),
224
+ r.required ? (a(), u("div", Q, " required ")) : l("", !0),
225
+ r.withExamples ? (a(), m(C, {
226
+ key: 10,
227
+ example: r.value?.example || r.value && k(h)(r.value) && k(S)(r.value?.items)?.example,
228
+ examples: r.value?.examples
229
+ }, null, 8, ["example", "examples"])) : l("", !0)
230
+ ]));
235
231
  }
236
232
  });
237
233
  export {
238
- ve as default
234
+ le as default
239
235
  };
@@ -1,41 +1,39 @@
1
- import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
- import { isArraySchema as s } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
3
- import { getRefName as p } from "./get-ref-name.js";
4
- const c = (t) => t ? `array ${t.includes(" | ") ? `(${t})` : t}[]` : "array", o = (t, r = !1) => {
5
- var n;
1
+ import { getResolvedRef as a } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ import { isArraySchema as y } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
3
+ import { getRefName as s } from "./get-ref-name.js";
4
+ const p = (t) => t ? `array ${t.includes(" | ") ? `(${t})` : t}[]` : "array", i = (t, r = !1) => {
6
5
  if (!t.items)
7
- return r ? "array" : t.title || ((n = t.xml) == null ? void 0 : n.name) || "array";
8
- const i = f(t.items), e = c(i);
9
- return r ? e : t.nullable ? `${e} | null` : e;
10
- }, f = (t) => {
11
- var i;
6
+ return r ? "array" : t.title || t.xml?.name || "array";
7
+ const e = c(t.items), n = p(e);
8
+ return r ? n : t.nullable ? `${n} | null` : n;
9
+ }, c = (t) => {
12
10
  if (!t)
13
11
  return "";
14
- const r = y(t);
12
+ const r = a(t);
15
13
  if (r.const !== void 0)
16
14
  return "const";
17
15
  if ("type" in r && Array.isArray(r.type)) {
18
16
  if (r.type.includes("array") && r.items) {
19
- const e = o(r, !0), n = r.type.filter((a) => a !== "array");
17
+ const e = i(r, !0), n = r.type.filter((o) => o !== "array");
20
18
  return n.length > 0 ? `${e} | ${n.join(" | ")}` : e;
21
19
  }
22
20
  return r.type.join(" | ");
23
21
  }
24
- if (s(r))
25
- return o(r, !1);
22
+ if (y(r))
23
+ return i(r, !1);
26
24
  if (r.title)
27
25
  return r.title;
28
- if ((i = r.xml) != null && i.name)
26
+ if (r.xml?.name)
29
27
  return r.xml.name;
30
28
  if ("type" in r && r.type && r.contentEncoding)
31
29
  return `${r.type} • ${r.contentEncoding}`;
32
30
  if ("$ref" in t) {
33
- const e = p(t);
31
+ const e = s(t);
34
32
  if (e)
35
33
  return e;
36
34
  }
37
35
  return "type" in r ? r.type : "";
38
36
  };
39
37
  export {
40
- f as getSchemaType
38
+ c as getSchemaType
41
39
  };