@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 +1 @@
1
- {"version":3,"file":"TraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntry.vue"],"names":[],"mappings":"AA8JA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAQnG,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,MAAM,EAAE,yBAAyB,CAAA;IACjC,QAAQ,EAAE,eAAe,CAAA;IACzB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,gBAAgB,EAAE,UAAU,CAAA;IAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;oBAyCqB,cAAc,SAAS,MAAM;;AAgMpD,wBAOG"}
1
+ {"version":3,"file":"TraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntry.vue"],"names":[],"mappings":"AA+JA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAIf,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,MAAM,EAAE,yBAAyB,CAAA;IACjC,QAAQ,EAAE,eAAe,CAAA;IACzB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,gBAAgB,EAAE,UAAU,CAAA;IAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;oBA0CqB,cAAc,SAAS,MAAM;;AA+LpD,wBAOG"}
@@ -1,11 +1,11 @@
1
- import { defineComponent as S, computed as h, resolveComponent as T, createElementBlock as b, openBlock as i, Fragment as W, renderList as B, createBlock as t, unref as n, withCtx as v, createCommentVNode as g, createVNode as L } from "vue";
1
+ import { defineComponent as I, computed as g, resolveComponent as S, createElementBlock as T, openBlock as t, Fragment as L, renderList as b, createBlock as n, unref as i, withCtx as v, createCommentVNode as h, createVNode as B } from "vue";
2
2
  import { getCurrentIndex as E } from "./get-current-index.js";
3
- import { useNavState as G } from "../../../hooks/useNavState.js";
4
- import z from "../../Lazy/Lazy.vue2.js";
5
- import N from "../../Section/SectionContainer.vue.js";
3
+ import { useNavState as z } from "../../../hooks/useNavState.js";
4
+ import N from "../../Lazy/Lazy.vue2.js";
5
+ import W from "../../Section/SectionContainer.vue.js";
6
6
  import $ from "../../../features/Operation/Operation.vue.js";
7
7
  import w from "../Tags/Tag.vue.js";
8
- const H = /* @__PURE__ */ S({
8
+ const D = /* @__PURE__ */ I({
9
9
  __name: "TraversedEntry",
10
10
  props: {
11
11
  level: { default: 0 },
@@ -18,47 +18,47 @@ const H = /* @__PURE__ */ S({
18
18
  activeServer: {},
19
19
  store: {}
20
20
  },
21
- setup(r, { expose: k }) {
22
- const l = (e) => "isGroup" in e && e.isGroup, d = (e) => "tag" in e && !l(e), C = (e) => "operation" in e, s = (e) => "webhook" in e, O = (e) => "isWebhooks" in e && !!e.isWebhooks, m = h(() => r.level === 0), { hash: I } = G(), a = h(() => m.value ? r.rootIndex : E(I.value, r.entries)), c = (e, u) => l(e) ? null : u < a.value ? "prev" : u > a.value + 2 ? "after" : null;
23
- return k({
24
- currentIndex: a,
25
- isLazy: c
21
+ setup(r, { expose: C }) {
22
+ const l = (e) => e.type === "tag" && e.isGroup === !0, d = (e) => e.type === "tag" && !l(e), O = (e) => e.type === "operation", a = (e) => e.type === "webhook", m = g(() => r.level === 0), { hash: k } = z(), c = g(() => m.value ? r.rootIndex : E(k.value, r.entries)), s = (e, u) => l(e) ? null : u < c.value ? "prev" : u > c.value + 2 ? "after" : null;
23
+ return C({
24
+ currentIndex: c,
25
+ isLazy: s
26
26
  }), (e, u) => {
27
- const p = T("TraversedEntry", !0);
28
- return i(!0), b(W, null, B(e.entries, (o, f) => (i(), t(n(z), {
27
+ const p = S("TraversedEntry", !0);
28
+ return t(!0), T(L, null, b(e.entries, (o, f) => (t(), n(i(N), {
29
29
  id: o.id,
30
30
  key: o.id,
31
- isLazy: !!c(o, f),
32
- prev: c(o, f) === "prev"
31
+ isLazy: !!s(o, f),
32
+ prev: s(o, f) === "prev"
33
33
  }, {
34
34
  default: v(() => [
35
- C(o) || s(o) ? (i(), t(n(N), {
35
+ O(o) || a(o) ? (t(), n(i(W), {
36
36
  key: 0,
37
37
  omit: !m.value
38
38
  }, {
39
39
  default: v(() => [
40
- L(n($), {
40
+ B(i($), {
41
41
  id: o.id,
42
42
  clientOptions: e.clientOptions,
43
43
  collection: e.activeCollection,
44
44
  config: e.config,
45
45
  document: e.document,
46
- isWebhook: s(o),
46
+ isWebhook: a(o),
47
47
  method: o.method,
48
- path: s(o) ? o.name : o.path,
48
+ path: a(o) ? o.name : o.path,
49
49
  server: e.activeServer,
50
50
  store: e.store
51
51
  }, null, 8, ["id", "clientOptions", "collection", "config", "document", "isWebhook", "method", "path", "server", "store"])
52
52
  ]),
53
53
  _: 2
54
- }, 1032, ["omit"])) : O(o) || d(o) ? (i(), t(n(w), {
54
+ }, 1032, ["omit"])) : d(o) ? (t(), n(i(w), {
55
55
  key: 1,
56
56
  layout: e.config.layout,
57
57
  moreThanOneTag: e.entries.filter(d).length > 1,
58
58
  tag: o
59
59
  }, {
60
60
  default: v(() => [
61
- "children" in o && o.children?.length ? (i(), t(p, {
61
+ "children" in o && o.children?.length ? (t(), n(p, {
62
62
  key: 0,
63
63
  activeCollection: e.activeCollection,
64
64
  activeServer: e.activeServer,
@@ -69,10 +69,10 @@ const H = /* @__PURE__ */ S({
69
69
  level: e.level + 1,
70
70
  rootIndex: e.rootIndex,
71
71
  store: e.store
72
- }, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : g("", !0)
72
+ }, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : h("", !0)
73
73
  ]),
74
74
  _: 2
75
- }, 1032, ["layout", "moreThanOneTag", "tag"])) : l(o) ? (i(), t(p, {
75
+ }, 1032, ["layout", "moreThanOneTag", "tag"])) : l(o) ? (t(), n(p, {
76
76
  key: 2,
77
77
  activeCollection: e.activeCollection,
78
78
  activeServer: e.activeServer,
@@ -83,7 +83,7 @@ const H = /* @__PURE__ */ S({
83
83
  level: e.level + 1,
84
84
  rootIndex: e.rootIndex,
85
85
  store: e.store
86
- }, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : g("", !0)
86
+ }, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : h("", !0)
87
87
  ]),
88
88
  _: 2
89
89
  }, 1032, ["id", "isLazy", "prev"]))), 128);
@@ -91,5 +91,5 @@ const H = /* @__PURE__ */ S({
91
91
  }
92
92
  });
93
93
  export {
94
- H as default
94
+ D as default
95
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TraversedEntryContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntryContainer.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAMnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,QAAQ,EAAE,eAAe,CAAA;IACzB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AA6GF,wBAMG"}
1
+ {"version":3,"file":"TraversedEntryContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntryContainer.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAKvF,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,QAAQ,EAAE,eAAe,CAAA;IACzB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AA6GF,wBAMG"}
@@ -4,7 +4,7 @@ import { getSlugUid as h } from "@scalar/oas-utils/transforms";
4
4
  import { getCurrentIndex as _ } from "./get-current-index.js";
5
5
  import { useNavState as k } from "../../../hooks/useNavState.js";
6
6
  import I from "./TraversedEntry.vue.js";
7
- import { useSidebar as O } from "../../../features/sidebar/hooks/useSidebar.js";
7
+ import { useSidebar as O } from "../../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
8
8
  const E = { key: 0 }, T = /* @__PURE__ */ m({
9
9
  __name: "TraversedEntryContainer",
10
10
  props: {
@@ -1,4 +1,4 @@
1
- import type { TraversedEntry } from '../../../features/traverse-schema/types';
1
+ import type { TraversedEntry } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  /** Loops through the entries and returns the index of the current entry based on the hash */
3
3
  export declare const getCurrentIndex: (hash: string, entries: TraversedEntry[]) => number;
4
4
  //# sourceMappingURL=get-current-index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-current-index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/get-current-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAuBtE,6FAA6F;AAC7F,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,SAAS,cAAc,EAAE,WAYtE,CAAA"}
1
+ {"version":3,"file":"get-current-index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/get-current-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAuBlG,6FAA6F;AAC7F,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,SAAS,cAAc,EAAE,WAYtE,CAAA"}
@@ -9,7 +9,7 @@ const d = /^.*?(?=\.query|\.path|\.headers|\.cookies|\.body)/, i = (t) => {
9
9
  return t;
10
10
  }, o = (t, e) => {
11
11
  const n = i(t);
12
- return e.findIndex((r) => "tag" in r ? n.startsWith(r.id) : n === r.id);
12
+ return e.findIndex((r) => r.type === "tag" ? n.startsWith(r.id) : n === r.id);
13
13
  };
14
14
  export {
15
15
  o as getCurrentIndex
@@ -1,4 +1,5 @@
1
1
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ import type { SchemaOptions } from '../../../components/Content/Schema/types';
2
3
  type __VLS_Props = {
3
4
  schema?: SchemaObject;
4
5
  /** Track how deep we've gone */
@@ -10,10 +11,6 @@ type __VLS_Props = {
10
11
  noncollapsible?: boolean;
11
12
  /** Hide the heading */
12
13
  hideHeading?: boolean;
13
- /** Hide read-only properties */
14
- hideReadOnly?: boolean;
15
- /** Hide write-only properties */
16
- hideWriteOnly?: boolean;
17
14
  /** Show a special one way toggle for additional properties, also has a top border when open */
18
15
  additionalProperties?: boolean;
19
16
  /** Hide model names in type display */
@@ -22,6 +19,8 @@ type __VLS_Props = {
22
19
  discriminator?: DiscriminatorObject;
23
20
  /** Breadcrumb for the schema */
24
21
  breadcrumb?: string[];
22
+ /** Move the options into a single prop so they are easy to pass around */
23
+ options: SchemaOptions;
25
24
  };
26
25
  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>;
27
26
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAoVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AA8aF,wBAMG"}
1
+ {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAQtE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AAyaF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Schema.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-6897f9dc"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-09c7c1bd"]]);
5
5
  export {
6
- c as default
6
+ a as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as N, computed as O, createBlock as d, createCommentVNode as n, openBlock as l, unref as i, withCtx as s, createElementVNode as k, normalizeClass as c, createElementBlock as r, createVNode as o, withDirectives as g, createTextVNode as m, toDisplayString as u, vShow as B, normalizeStyle as H, Fragment as h } from "vue";
2
- import { Disclosure as P, DisclosureButton as S, DisclosurePanel as R } from "@headlessui/vue";
3
- import { ScalarMarkdown as M, ScalarIcon as y } from "@scalar/components";
4
- import C from "../../ScreenReader.vue.js";
5
- import { isTypeObject as w } from "./helpers/is-type-object.js";
6
- import W from "./SchemaHeading.vue.js";
7
- import D from "./SchemaObjectProperties.vue.js";
8
- import z from "./SchemaProperty.vue.js";
9
- const A = {
1
+ import { defineComponent as H, computed as k, createBlock as o, createCommentVNode as t, openBlock as i, unref as l, withCtx as r, createElementVNode as g, normalizeClass as m, createElementBlock as c, createVNode as n, withDirectives as S, createTextVNode as d, toDisplayString as u, vShow as C, normalizeStyle as O, Fragment as h } from "vue";
2
+ import { Disclosure as P, DisclosureButton as N, DisclosurePanel as M } from "@headlessui/vue";
3
+ import { ScalarMarkdown as w, ScalarIcon as p } from "@scalar/components";
4
+ import B from "../../ScreenReader.vue.js";
5
+ import { isTypeObject as D } from "./helpers/is-type-object.js";
6
+ import z from "./SchemaHeading.vue.js";
7
+ import A from "./SchemaObjectProperties.vue.js";
8
+ import V from "./SchemaProperty.vue.js";
9
+ const j = {
10
10
  key: 0,
11
11
  class: "schema-card-description"
12
- }, V = {
12
+ }, T = {
13
13
  key: 0,
14
14
  class: "schema-properties"
15
- }, J = /* @__PURE__ */ N({
15
+ }, K = /* @__PURE__ */ H({
16
16
  __name: "Schema",
17
17
  props: {
18
18
  schema: {},
@@ -21,94 +21,93 @@ const A = {
21
21
  compact: { type: Boolean },
22
22
  noncollapsible: { type: Boolean, default: !1 },
23
23
  hideHeading: { type: Boolean },
24
- hideReadOnly: { type: Boolean },
25
- hideWriteOnly: { type: Boolean },
26
24
  additionalProperties: { type: Boolean },
27
25
  hideModelNames: { type: Boolean, default: !1 },
28
26
  discriminator: {},
29
- breadcrumb: {}
27
+ breadcrumb: {},
28
+ options: {}
30
29
  },
31
30
  setup(a) {
32
- const p = O(() => !a.noncollapsible && a.level > 0), f = O(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), v = (e) => a.noncollapsible && e.stopPropagation();
33
- return (e, b) => typeof e.schema == "object" && Object.keys(e.schema).length ? (l(), d(i(P), {
31
+ const f = k(() => !a.noncollapsible && a.level > 0), y = k(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), b = (e) => a.noncollapsible && e.stopPropagation();
32
+ return (e, v) => typeof e.schema == "object" && Object.keys(e.schema).length ? (i(), o(l(P), {
34
33
  key: 0,
35
34
  defaultOpen: e.noncollapsible
36
35
  }, {
37
- default: s(({ open: t }) => [
38
- k("div", {
39
- class: c(["schema-card", [
36
+ default: r(({ open: s }) => [
37
+ g("div", {
38
+ class: m(["schema-card", [
40
39
  `schema-card--level-${e.level}`,
41
- { "schema-card--compact": e.compact, "schema-card--open": t },
42
- { "border-t": e.additionalProperties && t }
40
+ { "schema-card--compact": e.compact, "schema-card--open": s },
41
+ { "border-t": e.additionalProperties && s }
43
42
  ]])
44
43
  }, [
45
- f.value ? (l(), r("div", A, [
46
- o(i(M), { value: f.value }, null, 8, ["value"])
47
- ])) : n("", !0),
48
- k("div", {
49
- class: c(["schema-properties", {
50
- "schema-properties-open": t
44
+ y.value ? (i(), c("div", j, [
45
+ n(l(w), { value: y.value }, null, 8, ["value"])
46
+ ])) : t("", !0),
47
+ g("div", {
48
+ class: m(["schema-properties", {
49
+ "schema-properties-open": s
51
50
  }])
52
51
  }, [
53
- e.additionalProperties ? g((l(), r("div", V, [
54
- o(i(S), {
52
+ e.additionalProperties ? S((i(), c("div", T, [
53
+ n(l(N), {
55
54
  as: "button",
56
55
  class: "schema-card-title schema-card-title--compact",
57
- onClickCapture: v
56
+ onClickCapture: b
58
57
  }, {
59
- default: s(() => [
60
- o(i(y), {
58
+ default: r(() => [
59
+ n(l(p), {
61
60
  class: "schema-card-title-icon",
62
61
  icon: "Add",
63
62
  size: "sm"
64
63
  }),
65
- b[0] || (b[0] = m(" Show additional properties ")),
66
- e.name ? (l(), d(C, { key: 0 }, {
67
- default: s(() => [
68
- m("for " + u(e.name), 1)
64
+ v[0] || (v[0] = d(" Show additional properties ")),
65
+ e.name ? (i(), o(B, { key: 0 }, {
66
+ default: r(() => [
67
+ d("for " + u(e.name), 1)
69
68
  ]),
70
69
  _: 1
71
- })) : n("", !0)
70
+ })) : t("", !0)
72
71
  ]),
73
72
  _: 1,
74
73
  __: [0]
75
74
  })
76
75
  ], 512)), [
77
- [B, !t]
78
- ]) : p.value ? g((l(), d(i(S), {
76
+ [C, !s]
77
+ ]) : f.value ? S((i(), o(l(N), {
79
78
  key: 1,
80
79
  as: e.noncollapsible ? "div" : "button",
81
- class: c(["schema-card-title", { "schema-card-title--compact": e.compact }]),
82
- style: H({
80
+ class: m(["schema-card-title", { "schema-card-title--compact": e.compact }]),
81
+ style: O({
83
82
  top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
84
83
  }),
85
- onClickCapture: v
84
+ onClickCapture: b
86
85
  }, {
87
- default: s(() => [
88
- e.compact ? (l(), r(h, { key: 0 }, [
89
- o(i(y), {
90
- class: c(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
86
+ default: r(() => [
87
+ e.compact ? (i(), c(h, { key: 0 }, [
88
+ n(l(p), {
89
+ class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
91
90
  icon: "Add",
92
91
  size: "sm"
93
92
  }, null, 8, ["class"]),
94
- t ? (l(), r(h, { key: 0 }, [
95
- m(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
96
- ], 64)) : (l(), r(h, { key: 1 }, [
97
- m(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
93
+ s ? (i(), c(h, { key: 0 }, [
94
+ d(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
95
+ ], 64)) : (i(), c(h, { key: 1 }, [
96
+ d(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
98
97
  ], 64)),
99
- e.name ? (l(), d(C, { key: 2 }, {
100
- default: s(() => [
101
- m("for " + u(e.name), 1)
98
+ e.name ? (i(), o(B, { key: 2 }, {
99
+ default: r(() => [
100
+ d("for " + u(e.name), 1)
102
101
  ]),
103
102
  _: 1
104
- })) : n("", !0)
105
- ], 64)) : (l(), r(h, { key: 1 }, [
106
- o(i(y), {
107
- class: c(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
103
+ })) : t("", !0)
104
+ ], 64)) : (i(), c(h, { key: 1 }, [
105
+ n(l(p), {
106
+ class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
108
107
  icon: "Add",
109
108
  size: "sm"
110
109
  }, null, 8, ["class"]),
111
- o(W, {
110
+ n(z, {
112
111
  name: e.schema?.title ?? e.name,
113
112
  value: e.schema
114
113
  }, null, 8, ["name", "value"])
@@ -116,48 +115,46 @@ const A = {
116
115
  ]),
117
116
  _: 2
118
117
  }, 1032, ["as", "class", "style"])), [
119
- [B, !e.hideHeading && !(e.noncollapsible && e.compact)]
120
- ]) : n("", !0),
121
- !e.additionalProperties || t ? (l(), d(i(R), {
118
+ [C, !e.hideHeading && !(e.noncollapsible && e.compact)]
119
+ ]) : t("", !0),
120
+ !e.additionalProperties || s ? (i(), o(l(M), {
122
121
  key: 2,
123
122
  as: "ul",
124
- static: !p.value
123
+ static: !f.value
125
124
  }, {
126
- default: s(() => [
127
- i(w)(e.schema) ? (l(), d(D, {
125
+ default: r(() => [
126
+ l(D)(e.schema) ? (i(), o(A, {
128
127
  key: 0,
129
128
  breadcrumb: e.breadcrumb,
130
129
  compact: e.compact,
131
130
  discriminator: e.discriminator,
132
131
  hideHeading: e.hideHeading,
133
132
  hideModelNames: e.hideModelNames,
134
- hideReadOnly: e.hideReadOnly,
135
- hideWriteOnly: e.hideWriteOnly,
136
133
  level: e.level + 1,
134
+ options: e.options,
137
135
  schema: e.schema
138
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "schema"])) : (l(), r(h, { key: 1 }, [
139
- e.schema ? (l(), d(z, {
136
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "options", "schema"])) : (i(), c(h, { key: 1 }, [
137
+ e.schema ? (i(), o(V, {
140
138
  key: 0,
141
139
  breadcrumb: e.breadcrumb,
142
140
  compact: e.compact,
143
141
  hideHeading: e.hideHeading,
144
142
  hideModelNames: e.hideModelNames,
145
- hideReadOnly: e.hideReadOnly,
146
- hideWriteOnly: e.hideWriteOnly,
147
143
  level: e.level,
148
- value: e.schema
149
- }, null, 8, ["breadcrumb", "compact", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "value"])) : n("", !0)
144
+ options: e.options,
145
+ schema: e.schema
146
+ }, null, 8, ["breadcrumb", "compact", "hideHeading", "hideModelNames", "level", "options", "schema"])) : t("", !0)
150
147
  ], 64))
151
148
  ]),
152
149
  _: 1
153
- }, 8, ["static"])) : n("", !0)
150
+ }, 8, ["static"])) : t("", !0)
154
151
  ], 2)
155
152
  ], 2)
156
153
  ]),
157
154
  _: 1
158
- }, 8, ["defaultOpen"])) : n("", !0);
155
+ }, 8, ["defaultOpen"])) : t("", !0);
159
156
  }
160
157
  });
161
158
  export {
162
- J as default
159
+ K as default
163
160
  };
@@ -1,4 +1,5 @@
1
1
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ import type { SchemaOptions } from '../../../components/Content/Schema/types';
2
3
  import { type CompositionKeyword } from './helpers/schema-composition.js';
3
4
  type __VLS_Props = {
4
5
  /** The composition keyword (oneOf, anyOf, allOf) */
@@ -8,19 +9,17 @@ type __VLS_Props = {
8
9
  /** Optional name for the schema */
9
10
  name?: string;
10
11
  /** The schema value containing the composition */
11
- value: SchemaObject;
12
+ schema: SchemaObject;
12
13
  /** Nesting level for proper indentation */
13
14
  level: number;
14
15
  /** Whether to use compact layout */
15
16
  compact?: boolean;
16
17
  /** Whether to hide the heading */
17
18
  hideHeading?: boolean;
18
- /** Whether to hide read-only properties */
19
- hideReadOnly?: boolean;
20
- /** Hide write-only properties */
21
- hideWriteOnly?: boolean;
22
19
  /** Breadcrumb for navigation */
23
20
  breadcrumb?: string[];
21
+ /** Move the options into single prop so they are easy to pass around */
22
+ options: SchemaOptions;
24
23
  };
25
24
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
26
25
  compact: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AAwJA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,WAAW,EAAE,kBAAkB,CAAA;IAC/B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,KAAK,EAAE,YAAY,CAAA;IACnB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;aATU,OAAO;iBAEH,OAAO;;AA+NzB,wBAOG"}
1
+ {"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AAsJA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,WAAW,EAAE,kBAAkB,CAAA;IAC/B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,MAAM,EAAE,YAAY,CAAA;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,yEAAyE;IACzE,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;aAPU,OAAO;iBAEH,OAAO;;AAyNzB,wBAOG"}
@@ -1,94 +1,91 @@
1
- import { defineComponent as y, computed as n, ref as g, createElementBlock as d, openBlock as l, createBlock as O, unref as m, Fragment as C, createVNode as s, createElementVNode as t, withCtx as S, createCommentVNode as R, toDisplayString as u, normalizeClass as B } from "vue";
2
- import { ScalarListbox as H } from "@scalar/components";
3
- import { isDefined as W } from "@scalar/helpers/array/is-defined";
4
- import { ScalarIconCaretDown as k } from "@scalar/icons";
5
- import { getResolvedRef as V } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
- import { getSchemaType as w } from "./helpers/get-schema-type.js";
7
- import { mergeAllOfSchemas as N } from "./helpers/merge-all-of-schemas.js";
8
- import h from "./Schema.vue.js";
9
- const z = { class: "property-rule" }, D = {
1
+ import { defineComponent as g, computed as n, ref as y, createElementBlock as s, openBlock as i, createBlock as C, unref as m, Fragment as S, createVNode as c, createElementVNode as r, withCtx as H, createCommentVNode as k, toDisplayString as u, normalizeClass as V } from "vue";
2
+ import { ScalarListbox as w } from "@scalar/components";
3
+ import { isDefined as B } from "@scalar/helpers/array/is-defined";
4
+ import { ScalarIconCaretDown as N } from "@scalar/icons";
5
+ import { getResolvedRef as O } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import { getSchemaType as z } from "./helpers/get-schema-type.js";
7
+ import { mergeAllOfSchemas as D } from "./helpers/merge-all-of-schemas.js";
8
+ import b from "./Schema.vue.js";
9
+ const U = { class: "property-rule" }, A = {
10
10
  class: "composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border border-b-0 px-2 py-1.25 pr-3 text-left",
11
11
  type: "button"
12
- }, U = { class: "text-c-2" }, A = {
12
+ }, E = { class: "text-c-2" }, L = {
13
13
  key: 0,
14
14
  class: "text-red"
15
- }, E = { class: "composition-panel" }, G = /* @__PURE__ */ y({
15
+ }, R = { class: "composition-panel" }, J = /* @__PURE__ */ g({
16
16
  __name: "SchemaComposition",
17
17
  props: {
18
18
  composition: {},
19
19
  discriminator: {},
20
20
  name: {},
21
- value: {},
21
+ schema: {},
22
22
  level: {},
23
23
  compact: { type: Boolean, default: !1 },
24
24
  hideHeading: { type: Boolean, default: !1 },
25
- hideReadOnly: { type: Boolean },
26
- hideWriteOnly: { type: Boolean },
27
- breadcrumb: {}
25
+ breadcrumb: {},
26
+ options: {}
28
27
  },
29
- setup(b) {
30
- const a = b, c = n(
31
- () => [a.value[a.composition]].flat().map((e) => ({ value: V(e), original: e })).filter((e) => W(e.value))
32
- ), p = n(
33
- () => c.value.map((e, o) => ({
28
+ setup(h) {
29
+ const a = h, p = n(
30
+ () => [a.schema[a.composition]].flat().map((e) => ({ value: O(e), original: e })).filter((e) => B(e.value))
31
+ ), d = n(
32
+ () => p.value.map((e, o) => ({
34
33
  id: String(o),
35
- label: w(e.original) || "Schema"
34
+ label: z(e.original) || "Schema"
36
35
  }))
37
- ), i = g(p.value[0]), v = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase()), r = n(
38
- () => c.value[Number(i.value.id)].value
36
+ ), t = y(d.value[0]), f = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase()), l = n(
37
+ () => p.value[Number(t.value.id)].value
39
38
  );
40
- return (e, o) => (l(), d("div", z, [
41
- a.composition === "allOf" ? (l(), O(h, {
39
+ return (e, o) => (i(), s("div", U, [
40
+ a.composition === "allOf" ? (i(), C(b, {
42
41
  key: 0,
43
42
  breadcrumb: e.breadcrumb,
44
43
  compact: e.compact,
45
44
  discriminator: e.discriminator,
46
45
  hideHeading: e.hideHeading,
47
- hideReadOnly: e.hideReadOnly,
48
- hideWriteOnly: e.hideWriteOnly,
49
46
  level: e.level,
50
47
  name: e.name,
51
48
  noncollapsible: !0,
52
- schema: m(N)(a.value)
53
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "schema"])) : (l(), d(C, { key: 1 }, [
54
- s(m(H), {
55
- modelValue: i.value,
56
- "onUpdate:modelValue": o[0] || (o[0] = (f) => i.value = f),
57
- options: p.value,
49
+ options: e.options,
50
+ schema: m(D)(e.schema)
51
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "level", "name", "options", "schema"])) : (i(), s(S, { key: 1 }, [
52
+ c(m(w), {
53
+ modelValue: t.value,
54
+ "onUpdate:modelValue": o[0] || (o[0] = (v) => t.value = v),
55
+ options: d.value,
58
56
  resize: ""
59
57
  }, {
60
- default: S(() => [
61
- t("button", D, [
62
- t("span", U, u(v(a.composition)), 1),
63
- t("span", {
64
- class: B(["composition-selector-label text-c-1", {
65
- "line-through": r.value?.deprecated
58
+ default: H(() => [
59
+ r("button", A, [
60
+ r("span", E, u(f(a.composition)), 1),
61
+ r("span", {
62
+ class: V(["composition-selector-label text-c-1", {
63
+ "line-through": l.value?.deprecated
66
64
  }])
67
- }, u(i.value?.label || "Schema"), 3),
68
- r.value?.deprecated ? (l(), d("div", A, " deprecated ")) : R("", !0),
69
- s(m(k))
65
+ }, u(t.value?.label || "Schema"), 3),
66
+ l.value?.deprecated ? (i(), s("div", L, " deprecated ")) : k("", !0),
67
+ c(m(N))
70
68
  ])
71
69
  ]),
72
70
  _: 1
73
71
  }, 8, ["modelValue", "options"]),
74
- t("div", E, [
75
- s(h, {
72
+ r("div", R, [
73
+ c(b, {
76
74
  breadcrumb: e.breadcrumb,
77
75
  compact: e.compact,
78
76
  discriminator: e.discriminator,
79
77
  hideHeading: e.hideHeading,
80
- hideReadOnly: e.hideReadOnly,
81
- hideWriteOnly: e.hideWriteOnly,
82
78
  level: e.level + 1,
83
79
  name: e.name,
84
80
  noncollapsible: !0,
85
- schema: r.value
86
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "schema"])
81
+ options: e.options,
82
+ schema: l.value
83
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "level", "name", "options", "schema"])
87
84
  ])
88
85
  ], 64))
89
86
  ]));
90
87
  }
91
88
  });
92
89
  export {
93
- G as default
90
+ J as default
94
91
  };