@scalar/api-reference 1.35.7 → 1.36.1

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 (194) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/browser/standalone.js +14984 -15007
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +148 -150
  7. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Content.vue.js +44 -51
  9. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -1
  10. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  12. package/dist/components/Content/Models/ClassicLayout.vue2.js +49 -40
  13. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  14. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Models/Models.vue.js +25 -23
  16. package/dist/components/Content/Models/ModernLayout.vue.d.ts +1 -0
  17. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  19. package/dist/components/Content/Models/ModernLayout.vue2.js +54 -51
  20. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -2
  21. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Operations/TraversedEntry.vue.js +24 -24
  23. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  25. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  26. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  27. package/dist/components/Content/Operations/get-current-index.js +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +72 -75
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
  35. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
  36. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +33 -54
  38. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -6
  39. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  41. package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
  42. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +16 -0
  43. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -0
  44. package/dist/components/Content/Schema/helpers/sort-property-names.js +36 -0
  45. package/dist/components/Content/Schema/types.d.ts +17 -0
  46. package/dist/components/Content/Schema/types.d.ts.map +1 -0
  47. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  48. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  49. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  50. package/dist/components/Content/Tags/ClassicLayout.vue2.js +1 -1
  51. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +1 -1
  52. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Tags/ModernLayout.vue.js +2 -2
  54. package/dist/components/Content/Tags/ModernLayout.vue2.js +2 -2
  55. package/dist/components/Content/Tags/Tag.vue.d.ts +1 -1
  56. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  57. package/dist/components/Content/Tags/TagSection.vue.d.ts +1 -1
  58. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  59. package/dist/components/Content/Tags/TagSection.vue.js +4 -4
  60. package/dist/components/MobileHeader.vue.js +2 -2
  61. package/dist/components/MobileHeader.vue2.js +1 -1
  62. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  63. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  64. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  65. package/dist/components/OperationsList/OperationsList.vue2.js +9 -11
  66. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  67. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  68. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  69. package/dist/components/OperationsList/OperationsListItem.vue2.js +24 -27
  70. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  71. package/dist/components/Section/Section.vue.js +2 -2
  72. package/dist/components/Section/Section.vue2.js +12 -13
  73. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  74. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  75. package/dist/components/Section/SectionAccordion.vue2.js +36 -37
  76. package/dist/components/ShowMoreButton.vue.js +2 -2
  77. package/dist/components/ShowMoreButton.vue2.js +3 -3
  78. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/Operation.vue.js +32 -22
  80. package/dist/features/Operation/components/Header.vue.d.ts +2 -0
  81. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/Header.vue.js +15 -10
  83. package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
  84. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  85. package/dist/features/Operation/components/Headers.vue.js +1 -1
  86. package/dist/features/Operation/components/Headers.vue2.js +23 -21
  87. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  88. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  89. package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
  90. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  91. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  92. package/dist/features/Operation/components/RequestBody.vue2.js +74 -49
  93. package/dist/features/Operation/helpers/get-first-server.d.ts +9 -0
  94. package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -0
  95. package/dist/features/Operation/helpers/get-first-server.js +20 -0
  96. package/dist/features/Search/components/SearchButton.vue.d.ts +2 -0
  97. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  98. package/dist/features/Search/components/SearchButton.vue.js +19 -17
  99. package/dist/features/Search/components/SearchModal.vue.d.ts +2 -1
  100. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  101. package/dist/features/Search/components/SearchModal.vue.js +2 -2
  102. package/dist/features/Search/components/SearchModal.vue2.js +74 -75
  103. package/dist/features/Search/helpers/create-search-index.d.ts +2 -2
  104. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  105. package/dist/features/Search/helpers/create-search-index.js +68 -66
  106. package/dist/features/Search/hooks/useSearchIndex.d.ts +3 -2
  107. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  108. package/dist/features/Search/hooks/useSearchIndex.js +13 -13
  109. package/dist/features/Search/types.d.ts +1 -1
  110. package/dist/features/Search/types.d.ts.map +1 -1
  111. package/dist/features/api-client-modal/useApiClient.d.ts +40 -40
  112. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  113. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  114. package/dist/helpers/test-utils.d.ts +367 -5
  115. package/dist/helpers/test-utils.d.ts.map +1 -1
  116. package/dist/hooks/useNavState.d.ts +1 -15
  117. package/dist/hooks/useNavState.d.ts.map +1 -1
  118. package/dist/hooks/useNavState.js +29 -53
  119. package/dist/index.d.ts +5 -6
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +16 -20
  122. package/dist/style.css +1 -1
  123. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  124. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
  125. package/dist/{features/sidebar/components/Sidebar.vue.d.ts → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts} +1 -1
  126. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -0
  127. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +7 -0
  128. package/dist/{features/sidebar/components/Sidebar.vue2.js → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js} +15 -15
  129. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue.d.ts +1 -1
  130. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -0
  131. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +7 -0
  132. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue2.js +41 -43
  133. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +1 -0
  134. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +7 -0
  135. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +7 -0
  137. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue2.js +1 -1
  138. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +385 -0
  139. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -0
  140. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +35 -0
  141. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +189 -0
  142. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -0
  143. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +9 -0
  144. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/hooks/useSidebar.d.ts +4 -8
  145. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +18 -0
  147. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +4 -0
  148. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +1 -0
  149. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  150. package/package.json +11 -11
  151. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +0 -1
  152. package/dist/features/sidebar/components/Sidebar.vue.js +0 -7
  153. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +0 -1
  154. package/dist/features/sidebar/components/SidebarElement.vue.js +0 -7
  155. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +0 -1
  156. package/dist/features/sidebar/components/SidebarGroup.vue.js +0 -7
  157. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +0 -1
  158. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +0 -7
  159. package/dist/features/sidebar/helpers/create-sidebar.d.ts +0 -28
  160. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +0 -1
  161. package/dist/features/sidebar/helpers/create-sidebar.js +0 -32
  162. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +0 -1
  163. package/dist/features/sidebar/hooks/useSidebar.js +0 -18
  164. package/dist/features/sidebar/index.d.ts +0 -4
  165. package/dist/features/sidebar/index.d.ts.map +0 -1
  166. package/dist/features/traverse-schema/helpers/get-tag.d.ts +0 -6
  167. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +0 -1
  168. package/dist/features/traverse-schema/helpers/get-tag.js +0 -7
  169. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +0 -11
  170. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +0 -1
  171. package/dist/features/traverse-schema/helpers/traverse-description.js +0 -32
  172. package/dist/features/traverse-schema/helpers/traverse-document.d.ts +0 -16
  173. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +0 -1
  174. package/dist/features/traverse-schema/helpers/traverse-document.js +0 -33
  175. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +0 -18
  176. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +0 -1
  177. package/dist/features/traverse-schema/helpers/traverse-paths.js +0 -30
  178. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +0 -8
  179. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +0 -1
  180. package/dist/features/traverse-schema/helpers/traverse-schemas.js +0 -21
  181. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +0 -11
  182. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +0 -1
  183. package/dist/features/traverse-schema/helpers/traverse-tags.js +0 -43
  184. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +0 -10
  185. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +0 -1
  186. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +0 -24
  187. package/dist/features/traverse-schema/index.d.ts +0 -5
  188. package/dist/features/traverse-schema/index.d.ts.map +0 -1
  189. package/dist/features/traverse-schema/types.d.ts +0 -55
  190. package/dist/features/traverse-schema/types.d.ts.map +0 -1
  191. package/dist/libs/markdown.js +0 -18
  192. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts +0 -0
  193. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js +0 -0
  194. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
1
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ import type { SchemaOptions } from '../../../components/Content/Schema/types';
3
3
  type __VLS_Props = {
4
4
  schema: SchemaObject;
5
5
  discriminator?: DiscriminatorObject;
@@ -7,13 +7,8 @@ type __VLS_Props = {
7
7
  hideHeading?: boolean;
8
8
  level?: number;
9
9
  hideModelNames?: boolean;
10
- /** Hide readonly properties */
11
- hideReadOnly?: boolean;
12
- /** Hide write-only properties */
13
- hideWriteOnly?: boolean;
14
10
  breadcrumb?: string[];
15
- orderSchemaPropertiesBy?: ApiReferenceConfiguration['orderSchemaPropertiesBy'];
16
- orderRequiredPropertiesFirst?: ApiReferenceConfiguration['orderRequiredPropertiesFirst'];
11
+ options: SchemaOptions;
17
12
  };
18
13
  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>;
19
14
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAOrE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,uBAAuB,CAAC,EAAE,yBAAyB,CAAC,yBAAyB,CAAC,CAAA;IAC9E,4BAA4B,CAAC,EAAE,yBAAyB,CAAC,8BAA8B,CAAC,CAAA;CACzF,CAAC;;AAiQF,wBAMG"}
1
+ {"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"names":[],"mappings":"AA2IA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AA2LF,wBAMG"}
@@ -1,8 +1,9 @@
1
- import { defineComponent as R, computed as P, createElementBlock as l, openBlock as t, Fragment as s, createCommentVNode as h, createBlock as c, unref as n, renderList as f } from "vue";
2
- import { getResolvedRef as o } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import { isTypeObject as m } from "./helpers/is-type-object.js";
4
- import u from "./SchemaProperty.vue.js";
5
- const j = /* @__PURE__ */ R({
1
+ import { defineComponent as N, computed as y, createElementBlock as n, openBlock as i, Fragment as t, createCommentVNode as d, createBlock as s, unref as a, renderList as h } from "vue";
2
+ import { getResolvedRef as l } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import { isTypeObject as c } from "./helpers/is-type-object.js";
4
+ import { sortPropertyNames as v } from "./helpers/sort-property-names.js";
5
+ import p from "./SchemaProperty.vue.js";
6
+ const B = /* @__PURE__ */ N({
6
7
  __name: "SchemaObjectProperties",
7
8
  props: {
8
9
  schema: {},
@@ -11,85 +12,63 @@ const j = /* @__PURE__ */ R({
11
12
  hideHeading: { type: Boolean },
12
13
  level: {},
13
14
  hideModelNames: { type: Boolean },
14
- hideReadOnly: { type: Boolean },
15
- hideWriteOnly: { type: Boolean },
16
15
  breadcrumb: {},
17
- orderSchemaPropertiesBy: { default: "alpha" },
18
- orderRequiredPropertiesFirst: { default: !0 }
16
+ options: {}
19
17
  },
20
- setup(r) {
21
- const v = P(() => {
22
- if (!m(r.schema) || !r.schema.properties)
23
- return [];
24
- const e = Object.keys(r.schema.properties), a = new Set(r.schema.required || []);
25
- return e.sort((i, d) => {
26
- const y = i === r.discriminator?.propertyName, p = d === r.discriminator?.propertyName, b = a.has(i), O = a.has(d);
27
- if (y && !p)
28
- return -1;
29
- if (!y && p)
30
- return 1;
31
- if (r.orderRequiredPropertiesFirst) {
32
- if (b && !O)
33
- return -1;
34
- if (!b && O)
35
- return 1;
36
- }
37
- return r.orderSchemaPropertiesBy === "alpha" ? i.localeCompare(d) : 0;
38
- }).filter((i) => r.hideReadOnly ? !(r.schema.properties && o(r.schema.properties[i])?.readOnly === !0) : r.hideWriteOnly ? !(r.schema.properties && o(r.schema.properties[i])?.writeOnly === !0) : !0);
39
- }), N = (e) => {
40
- const a = o(e);
41
- return typeof a == "object" && typeof a["x-additionalPropertiesName"] == "string" && a["x-additionalPropertiesName"].trim().length > 0 ? `${a["x-additionalPropertiesName"].trim()}*` : "propertyName*";
18
+ setup(m) {
19
+ const u = y(
20
+ () => v(m.schema, m.discriminator, m.options)
21
+ ), b = (e) => {
22
+ const o = l(e);
23
+ return typeof o == "object" && typeof o["x-additionalPropertiesName"] == "string" && o["x-additionalPropertiesName"].trim().length > 0 ? `${o["x-additionalPropertiesName"].trim()}` : "propertyName";
42
24
  }, g = (e) => e === !0 || typeof e == "object" && Object.keys(e).length === 0 || typeof e != "object" || !("type" in e) ? {
43
25
  // @ts-expect-error - ask hans
44
26
  type: "anything",
45
27
  ...typeof e == "object" ? e : {}
46
28
  } : e;
47
- return (e, a) => (t(), l(s, null, [
48
- n(m)(e.schema) && e.schema.properties ? (t(!0), l(s, { key: 0 }, f(v.value, (i) => (t(), c(u, {
49
- key: i,
29
+ return (e, o) => (i(), n(t, null, [
30
+ a(c)(e.schema) && e.schema.properties ? (i(!0), n(t, { key: 0 }, h(u.value, (r) => (i(), s(p, {
31
+ key: r,
50
32
  breadcrumb: e.breadcrumb,
51
33
  compact: e.compact,
52
34
  discriminator: e.discriminator,
53
35
  hideHeading: e.hideHeading,
54
36
  hideModelNames: e.hideModelNames,
55
- hideReadOnly: e.hideReadOnly,
56
- hideWriteOnly: e.hideWriteOnly,
57
37
  level: e.level,
58
- name: i,
59
- required: e.schema.required?.includes(i),
60
- value: n(o)(e.schema.properties[i])
61
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "required", "value"]))), 128)) : h("", !0),
62
- n(m)(e.schema) && e.schema.patternProperties ? (t(!0), l(s, { key: 1 }, f(Object.entries(e.schema.patternProperties), ([i, d]) => (t(), c(u, {
63
- key: i,
38
+ name: r,
39
+ options: e.options,
40
+ required: e.schema.required?.includes(r),
41
+ schema: a(l)(e.schema.properties[r])
42
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "name", "options", "required", "schema"]))), 128)) : d("", !0),
43
+ a(c)(e.schema) && e.schema.patternProperties ? (i(!0), n(t, { key: 1 }, h(Object.entries(e.schema.patternProperties), ([r, f]) => (i(), s(p, {
44
+ key: r,
64
45
  breadcrumb: e.breadcrumb,
65
46
  compact: e.compact,
66
47
  discriminator: e.discriminator,
67
48
  hideHeading: e.hideHeading,
68
49
  hideModelNames: e.hideModelNames,
69
- hideReadOnly: e.hideReadOnly,
70
- hideWriteOnly: e.hideWriteOnly,
71
50
  level: e.level,
72
- name: i,
73
- value: n(o)(d)
74
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"]))), 128)) : h("", !0),
75
- n(m)(e.schema) && e.schema.additionalProperties ? (t(), c(u, {
51
+ name: r,
52
+ options: e.options,
53
+ schema: a(l)(f)
54
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "name", "options", "schema"]))), 128)) : d("", !0),
55
+ a(c)(e.schema) && e.schema.additionalProperties ? (i(), s(p, {
76
56
  key: 2,
77
57
  breadcrumb: e.breadcrumb,
78
58
  compact: e.compact,
79
59
  discriminator: e.discriminator,
80
60
  hideHeading: e.hideHeading,
81
61
  hideModelNames: e.hideModelNames,
82
- hideReadOnly: e.hideReadOnly,
83
- hideWriteOnly: e.hideWriteOnly,
84
62
  level: e.level,
85
- name: N(e.schema.additionalProperties),
63
+ name: b(e.schema.additionalProperties),
86
64
  noncollapsible: "",
87
- value: g(e.schema.additionalProperties),
65
+ options: e.options,
66
+ schema: g(e.schema.additionalProperties),
88
67
  variant: "additionalProperties"
89
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "name", "value"])) : h("", !0)
68
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "name", "options", "schema"])) : d("", !0)
90
69
  ], 64));
91
70
  }
92
71
  });
93
72
  export {
94
- j as default
73
+ B as default
95
74
  };
@@ -1,5 +1,6 @@
1
1
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  import { type Component } from 'vue';
3
+ import type { SchemaOptions } from '../../../components/Content/Schema/types';
3
4
  /**
4
5
  * Note: We're taking in a prop called `value` which should be a JSON Schema.
5
6
  *
@@ -8,7 +9,7 @@ import { type Component } from 'vue';
8
9
  */
9
10
  type __VLS_Props = {
10
11
  is?: string | Component;
11
- value: SchemaObject | undefined;
12
+ schema: SchemaObject | undefined;
12
13
  noncollapsible?: boolean;
13
14
  level?: number;
14
15
  name?: string;
@@ -18,16 +19,13 @@ type __VLS_Props = {
18
19
  description?: string;
19
20
  hideModelNames?: boolean;
20
21
  hideHeading?: boolean;
21
- /** Hide read-only properties */
22
- hideReadOnly?: boolean;
23
- /** Hide write-only properties */
24
- hideWriteOnly?: boolean;
25
22
  variant?: 'additionalProperties' | 'patternProperties';
26
23
  breadcrumb?: string[];
24
+ options: SchemaOptions;
27
25
  };
28
26
  declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
29
- required: boolean;
30
27
  level: number;
28
+ required: boolean;
31
29
  compact: boolean;
32
30
  hideModelNames: boolean;
33
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAijBA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAa9C;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B,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,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAGA,OAAO;;AA+jB5B,0BAOG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA4iBA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAUtE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,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,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAXQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;AAsjB5B,0BAOG"}
@@ -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 p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7569fa08"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ad32fbeb"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,27 +1,27 @@
1
- import { defineComponent as V, computed as t, createBlock as p, openBlock as r, resolveDynamicComponent as w, normalizeClass as A, withCtx as c, createCommentVNode as s, createElementBlock as i, createVNode as d, createSlots as T, unref as l, toDisplayString as y, Fragment as v, createTextVNode as k, renderList as q } from "vue";
2
- import { ScalarMarkdown as R } from "@scalar/components";
3
- import { isDefined as E } from "@scalar/helpers/array/is-defined";
4
- import { getResolvedRef as f } from "@scalar/workspace-store/helpers/get-resolved-ref";
1
+ import { defineComponent as w, computed as t, createBlock as d, openBlock as n, resolveDynamicComponent as A, normalizeClass as T, withCtx as c, createCommentVNode as s, createElementBlock as o, createVNode as m, createSlots as q, unref as i, toDisplayString as v, Fragment as f, createTextVNode as P, renderList as E } from "vue";
2
+ import { ScalarMarkdown as O } from "@scalar/components";
3
+ import { isDefined as F } from "@scalar/helpers/array/is-defined";
4
+ import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
5
  import { isArraySchema as u } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
6
- import { isTypeObject as F } from "./helpers/is-type-object.js";
7
- import { optimizeValueForDisplay as M } from "./helpers/optimize-value-for-display.js";
8
- import { compositions as $ } from "./helpers/schema-composition.js";
9
- import P from "./Schema.vue.js";
10
- import I from "./SchemaComposition.vue.js";
11
- import z from "./SchemaEnumValues.vue.js";
12
- import U from "./SchemaPropertyHeading.vue.js";
13
- import Z from "../../Anchor/WithBreadcrumb.vue2.js";
14
- import L from "../../../features/specification-extension/SpecificationExtension.vue2.js";
15
- const G = {
6
+ import { isTypeObject as M } from "./helpers/is-type-object.js";
7
+ import { optimizeValueForDisplay as $ } from "./helpers/optimize-value-for-display.js";
8
+ import { compositions as I } from "./helpers/schema-composition.js";
9
+ import C from "./Schema.vue.js";
10
+ import z from "./SchemaComposition.vue.js";
11
+ import U from "./SchemaEnumValues.vue.js";
12
+ import Z from "./SchemaPropertyHeading.vue.js";
13
+ import L from "../../Anchor/WithBreadcrumb.vue2.js";
14
+ import G from "../../../features/specification-extension/SpecificationExtension.vue2.js";
15
+ const J = {
16
16
  key: 0,
17
17
  class: "property-name-pattern-properties"
18
- }, J = {
18
+ }, K = {
19
19
  key: 1,
20
20
  class: "property-name-additional-properties"
21
- }, K = {
21
+ }, Q = {
22
22
  key: 1,
23
23
  class: "property-description"
24
- }, Q = {
24
+ }, W = {
25
25
  key: 2,
26
26
  class: "property-description"
27
27
  }, X = {
@@ -30,11 +30,11 @@ const G = {
30
30
  }, Y = {
31
31
  key: 0,
32
32
  class: "children"
33
- }, pe = /* @__PURE__ */ V({
33
+ }, de = /* @__PURE__ */ w({
34
34
  __name: "SchemaProperty",
35
35
  props: {
36
36
  is: {},
37
- value: {},
37
+ schema: {},
38
38
  noncollapsible: { type: Boolean },
39
39
  level: { default: 0 },
40
40
  name: {},
@@ -44,13 +44,12 @@ const G = {
44
44
  description: {},
45
45
  hideModelNames: { type: Boolean, default: !1 },
46
46
  hideHeading: { type: Boolean },
47
- hideReadOnly: { type: Boolean },
48
- hideWriteOnly: { type: Boolean },
49
47
  variant: {},
50
- breadcrumb: {}
48
+ breadcrumb: {},
49
+ options: {}
51
50
  },
52
- setup(B) {
53
- const m = B, h = {
51
+ setup(j) {
52
+ const p = j, b = {
54
53
  integer: {
55
54
  _default: "Integer numbers.",
56
55
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -64,32 +63,32 @@ const G = {
64
63
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
65
64
  binary: "binary data, used to describe files"
66
65
  }
67
- }, b = (e) => !e || !h[e.type] ? null : h[e.type][e.format || e.contentEncoding || "_default"], C = (e) => e?.enum || e?.items?.enum || [], a = t(() => M(m.value)), O = t(() => {
66
+ }, h = (e) => !e || !b[e.type] ? null : b[e.type][e.format || e.contentEncoding || "_default"], B = (e) => e?.enum || e?.items?.enum || [], a = t(() => $(p.schema)), g = t(() => {
68
67
  const e = a.value;
69
- return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e?.allOf || e?.allOf ? null : m.description || e?.description || null;
70
- }), j = (e, n, o) => n || e?.deprecated || e?.const !== void 0 || e?.enum && e.enum.length === 1 || e?.type || e?.nullable === !0 || e?.writeOnly || e?.readOnly || o, g = t(() => {
68
+ return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e?.allOf || e?.allOf ? null : p.description || e?.description || null;
69
+ }), N = (e, r, l) => r || e?.deprecated || e?.const !== void 0 || e?.enum && e.enum.length === 1 || e?.type || e?.nullable === !0 || e?.writeOnly || e?.readOnly || l, k = t(() => {
71
70
  const e = a.value;
72
71
  if (!e || !u(e) || typeof e.items != "object")
73
72
  return !1;
74
- const n = e.items;
75
- return "type" in n && n.type && (Array.isArray(n.type) ? n.type.includes("object") : ["object"].includes(n.type)) || "properties" in n || "$ref" in n || "discriminator" in n || "allOf" in n || "oneOf" in n || "anyOf" in n;
76
- }), N = (e) => {
77
- const n = a.value;
78
- return n && u(n) === !1 || !n?.items || typeof n.items != "object" || !(e in n.items) ? !1 : !g.value;
79
- }, S = t(() => g.value), W = t(() => {
73
+ const r = e.items;
74
+ return "type" in r && r.type && (Array.isArray(r.type) ? r.type.includes("object") : ["object"].includes(r.type)) || "properties" in r || "$ref" in r || "discriminator" in r || "allOf" in r || "oneOf" in r || "anyOf" in r;
75
+ }), S = (e) => {
76
+ const r = a.value;
77
+ return r && u(r) === !1 || !r?.items || typeof r.items != "object" || !(e in r.items) ? !1 : !k.value;
78
+ }, R = t(() => k.value), D = t(() => {
80
79
  if (!a.value)
81
80
  return !1;
82
- const e = a.value, n = F(e), o = "properties" in e || "additionalProperties" in e;
83
- return n && o;
84
- }), D = t(() => m.level <= 1), H = t(() => a.value ? $.map((e) => a.value?.[e] && !(u(a.value) && a.value?.items && typeof e == "string" && typeof a.value.items == "object" && e in a.value.items) ? {
81
+ const e = a.value, r = M(e), l = "properties" in e || "additionalProperties" in e;
82
+ return r && l;
83
+ }), H = t(() => p.level <= 1), V = t(() => a.value ? I.map((e) => a.value?.[e] && !(u(a.value) && a.value?.items && typeof e == "string" && typeof a.value.items == "object" && e in a.value.items) ? {
85
84
  composition: e,
86
85
  value: a.value
87
- } : N(e) && a.value && u(a.value) && a.value.items ? {
86
+ } : S(e) && a.value && u(a.value) && a.value.items ? {
88
87
  composition: e,
89
88
  value: a.value.items
90
- } : null).filter(E) : []);
91
- return (e, n) => (r(), p(w(e.is ?? "li"), {
92
- class: A(["property", [
89
+ } : null).filter(F) : []);
90
+ return (e, r) => (n(), d(A(e.is ?? "li"), {
91
+ class: T(["property", [
93
92
  `property--level-${e.level}`,
94
93
  {
95
94
  "property--compact": e.compact,
@@ -98,24 +97,24 @@ const G = {
98
97
  ]])
99
98
  }, {
100
99
  default: c(() => [
101
- j(a.value, e.name, e.required) ? (r(), p(U, {
100
+ N(a.value, e.name, e.required) ? (n(), d(Z, {
102
101
  key: 0,
103
102
  class: "group",
104
- enum: C(a.value).length > 0,
103
+ enum: B(a.value).length > 0,
105
104
  hideModelNames: e.hideModelNames,
106
105
  isDiscriminator: e.discriminator && e.discriminator.propertyName === e.name,
107
106
  required: e.required,
108
107
  value: a.value
109
- }, T({ _: 2 }, [
108
+ }, q({ _: 2 }, [
110
109
  e.name ? {
111
110
  name: "name",
112
111
  fn: c(() => [
113
- d(l(Z), {
114
- breadcrumb: D.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
112
+ m(i(L), {
113
+ breadcrumb: H.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
115
114
  }, {
116
115
  default: c(() => [
117
- e.variant === "patternProperties" ? (r(), i("span", G, y(e.name), 1)) : e.variant === "additionalProperties" ? (r(), i("span", J, y(e.name), 1)) : (r(), i(v, { key: 2 }, [
118
- k(y(e.name), 1)
116
+ e.variant === "patternProperties" ? (n(), o("span", J, v(e.name), 1)) : e.variant === "additionalProperties" ? (n(), o("span", K, v(e.name), 1)) : (n(), o(f, { key: 2 }, [
117
+ P(v(e.name), 1)
119
118
  ], 64))
120
119
  ]),
121
120
  _: 1
@@ -126,67 +125,64 @@ const G = {
126
125
  a.value?.example ? {
127
126
  name: "example",
128
127
  fn: c(() => [
129
- k(" Example: " + y(a.value.example), 1)
128
+ P(" Example: " + v(a.value.example), 1)
130
129
  ]),
131
130
  key: "1"
132
131
  } : void 0
133
132
  ]), 1032, ["enum", "hideModelNames", "isDiscriminator", "required", "value"])) : s("", !0),
134
- O.value ? (r(), i("div", K, [
135
- d(l(R), { value: O.value }, null, 8, ["value"])
136
- ])) : b(a.value) ? (r(), i("div", Q, [
137
- d(l(R), {
138
- value: b(a.value) || ""
133
+ g.value ? (n(), o("div", Q, [
134
+ m(i(O), { value: g.value }, null, 8, ["value"])
135
+ ])) : h(a.value) ? (n(), o("div", W, [
136
+ m(i(O), {
137
+ value: h(a.value) || ""
139
138
  }, null, 8, ["value"])
140
139
  ])) : s("", !0),
141
- (a.value?.enum || a.value && l(u)(a.value) && l(f)(a.value?.items)?.enum || []).length ? (r(), p(z, {
140
+ (a.value?.enum || a.value && i(u)(a.value) && i(y)(a.value?.items)?.enum || []).length ? (n(), d(U, {
142
141
  key: 3,
143
142
  value: a.value
144
143
  }, null, 8, ["value"])) : s("", !0),
145
- W.value ? (r(), i("div", X, [
146
- d(P, {
144
+ D.value ? (n(), o("div", X, [
145
+ m(C, {
147
146
  breadcrumb: e.breadcrumb && e.name ? [...e.breadcrumb, e.name] : void 0,
148
147
  compact: e.compact,
149
- hideReadOnly: e.hideReadOnly,
150
- hideWriteOnly: e.hideWriteOnly,
151
148
  level: e.level + 1,
152
149
  name: e.name,
153
150
  noncollapsible: e.noncollapsible,
151
+ options: e.options,
154
152
  schema: a.value
155
- }, null, 8, ["breadcrumb", "compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
153
+ }, null, 8, ["breadcrumb", "compact", "level", "name", "noncollapsible", "options", "schema"])
156
154
  ])) : s("", !0),
157
- a.value && l(u)(a.value) && typeof a.value.items == "object" ? (r(), i(v, { key: 5 }, [
158
- S.value ? (r(), i("div", Y, [
159
- d(P, {
155
+ a.value && i(u)(a.value) && typeof a.value.items == "object" ? (n(), o(f, { key: 5 }, [
156
+ R.value ? (n(), o("div", Y, [
157
+ m(C, {
160
158
  compact: e.compact,
161
- hideReadOnly: e.hideReadOnly,
162
- hideWriteOnly: e.hideWriteOnly,
163
159
  level: e.level + 1,
164
160
  name: e.name,
165
161
  noncollapsible: e.noncollapsible,
166
- schema: l(f)(a.value.items)
167
- }, null, 8, ["compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
162
+ options: e.options,
163
+ schema: i(y)(a.value.items)
164
+ }, null, 8, ["compact", "level", "name", "noncollapsible", "options", "schema"])
168
165
  ])) : s("", !0)
169
166
  ], 64)) : s("", !0),
170
- (r(!0), i(v, null, q(H.value, (o) => (r(), p(I, {
171
- key: o.composition,
167
+ (n(!0), o(f, null, E(V.value, (l) => (n(), d(z, {
168
+ key: l.composition,
172
169
  breadcrumb: e.breadcrumb,
173
170
  compact: e.compact,
174
- composition: o.composition,
175
- discriminator: e.value?.discriminator,
171
+ composition: l.composition,
172
+ discriminator: e.schema?.discriminator,
176
173
  hideHeading: e.hideHeading,
177
- hideReadOnly: e.hideReadOnly,
178
- hideWriteOnly: e.hideWriteOnly,
179
174
  level: e.level,
180
175
  name: e.name,
181
176
  noncollapsible: e.noncollapsible,
182
- value: l(f)(m.value)
183
- }, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "value"]))), 128)),
184
- d(l(L), { value: a.value }, null, 8, ["value"])
177
+ options: e.options,
178
+ schema: i(y)(p.schema)
179
+ }, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "level", "name", "noncollapsible", "options", "schema"]))), 128)),
180
+ m(i(G), { value: a.value }, null, 8, ["value"])
185
181
  ]),
186
182
  _: 1
187
183
  }, 8, ["class"]));
188
184
  }
189
185
  });
190
186
  export {
191
- pe as default
187
+ de as default
192
188
  };
@@ -0,0 +1,16 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types';
2
+ import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ /** Extract the type of properties */
4
+ type Properties = NonNullable<Extract<SchemaObject, {
5
+ type: 'object';
6
+ }>['properties']>;
7
+ type Options = Partial<Pick<ApiReferenceConfiguration, 'orderSchemaPropertiesBy' | 'orderRequiredPropertiesFirst'> & {
8
+ hideReadOnly: boolean;
9
+ hideWriteOnly: boolean;
10
+ }>;
11
+ /** Take a list of property names and reduce it back into an object */
12
+ export declare const reduceNamesToObject: (names: string[], properties: Properties) => Properties;
13
+ /** Sort property names in an object schema */
14
+ export declare const sortPropertyNames: (schema: SchemaObject, discriminator?: DiscriminatorObject, { hideReadOnly, hideWriteOnly, orderSchemaPropertiesBy, orderRequiredPropertiesFirst, }?: Options) => string[];
15
+ export {};
16
+ //# sourceMappingURL=sort-property-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-property-names.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/sort-property-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIrH,qCAAqC;AACrC,KAAK,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;AAEtF,KAAK,OAAO,GAAG,OAAO,CACpB,IAAI,CAAC,yBAAyB,EAAE,yBAAyB,GAAG,8BAA8B,CAAC,GAAG;IAC5F,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,EAAE,EAAE,YAAY,UAAU,KAAG,UAOxD,CAAA;AAEtB,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,EACpB,gBAAgB,mBAAmB,EACnC,0FAKG,OAAY,KACd,MAAM,EAuDR,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ import { isTypeObject as m } from "./is-type-object.js";
3
+ const q = (r, o) => r.reduce((i, s) => {
4
+ const n = o?.[s];
5
+ return n && (i[s] = n), i;
6
+ }, {}), R = (r, o, {
7
+ hideReadOnly: i = !1,
8
+ hideWriteOnly: s = !1,
9
+ orderSchemaPropertiesBy: n = "alpha",
10
+ orderRequiredPropertiesFirst: c = !0
11
+ } = {}) => {
12
+ if (!m(r) || !r.properties)
13
+ return [];
14
+ const d = Object.keys(r.properties), p = new Set(r.required || []);
15
+ return d.sort((t, e) => {
16
+ const u = t === o?.propertyName, f = e === o?.propertyName, l = p.has(t), a = p.has(e);
17
+ if (u && !f)
18
+ return -1;
19
+ if (!u && f)
20
+ return 1;
21
+ if (c) {
22
+ if (l && !a)
23
+ return -1;
24
+ if (!l && a)
25
+ return 1;
26
+ }
27
+ return n === "alpha" ? t.localeCompare(e) : 0;
28
+ }).filter((t) => {
29
+ const e = r.properties && y(r.properties[t]);
30
+ return !(i && e?.readOnly === !0 || s && e?.writeOnly === !0);
31
+ });
32
+ };
33
+ export {
34
+ q as reduceNamesToObject,
35
+ R as sortPropertyNames
36
+ };
@@ -0,0 +1,17 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
+ /**
3
+ * Options for the schema component tree
4
+ *
5
+ * These options should be prop drilled through the Schema component tree and shouldn't be changed
6
+ */
7
+ export type SchemaOptions = {
8
+ /** Hide read-only properties */
9
+ hideReadOnly?: boolean;
10
+ /** Hide write-only properties */
11
+ hideWriteOnly?: boolean;
12
+ /** Order schema properties, defaults to 'alpha' */
13
+ orderSchemaPropertiesBy?: ApiReferenceConfiguration['orderSchemaPropertiesBy'];
14
+ /** Order required properties first */
15
+ orderRequiredPropertiesFirst?: ApiReferenceConfiguration['orderRequiredPropertiesFirst'];
16
+ };
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mDAAmD;IACnD,uBAAuB,CAAC,EAAE,yBAAyB,CAAC,yBAAyB,CAAC,CAAA;IAC9E,sCAAsC;IACtC,4BAA4B,CAAC,EAAE,yBAAyB,CAAC,8BAA8B,CAAC,CAAA;CACzF,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { TraversedTag } from '../../../features/traverse-schema';
1
+ import type { TraversedTag } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
3
  tag: TraversedTag;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tags/ClassicLayout.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,YAAY,CAAA;CAClB,CAAC;AAqFF,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAwBhD,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
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tags/ClassicLayout.vue"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,YAAY,CAAA;CAClB,CAAC;AAqFF,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAwBhD,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 "./ClassicLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-56f55c2b"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2414d1d0"]]);
5
5
  export {
6
- c as default
6
+ m as default
7
7
  };
@@ -32,7 +32,7 @@ const y = /* @__PURE__ */ r({
32
32
  }),
33
33
  o(e(d), {
34
34
  class: "tag-description",
35
- value: a.tag.tag?.description,
35
+ value: a.tag?.description,
36
36
  withImages: ""
37
37
  }, null, 8, ["value"])
38
38
  ]),
@@ -1,4 +1,4 @@
1
- import type { TraversedTag } from '../../../features/traverse-schema';
1
+ import type { TraversedTag } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
3
  tag: TraversedTag;
4
4
  moreThanOneTag: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tags/ModernLayout.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAK9D,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,YAAY,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAC;AAqHF,QAAA,IAAuB,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAgChD,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
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tags/ModernLayout.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAWhG,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,YAAY,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAC;AAoHF,QAAA,IAAuB,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAgChD,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 "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-91405c72"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5edb9c26"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };