@scalar/blocks 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +13 -29
  3. package/dist/code-example/components/AsyncApiCodeExample.vue.d.ts +19 -0
  4. package/dist/code-example/components/AsyncApiCodeExample.vue.d.ts.map +1 -0
  5. package/dist/code-example/components/AsyncApiCodeExample.vue.js +9 -0
  6. package/dist/code-example/components/AsyncApiCodeExample.vue.js.map +1 -0
  7. package/dist/code-example/components/AsyncApiCodeExample.vue_vue_type_script_setup_true_lang.js +114 -0
  8. package/dist/code-example/components/AsyncApiCodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -0
  9. package/dist/code-example/components/CodeExample.vue.js +4 -4
  10. package/dist/code-example/components/CodeExample.vue.js.map +1 -1
  11. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js +258 -0
  12. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -0
  13. package/dist/code-example/components/ExamplePicker.vue.js +1 -1
  14. package/dist/code-example/components/ExamplePicker.vue.js.map +1 -1
  15. package/dist/code-example/components/{ExamplePicker.vue.script.js → ExamplePicker.vue_vue_type_script_setup_true_lang.js} +5 -5
  16. package/dist/code-example/components/ExamplePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  17. package/dist/code-example/components/HttpMethod.vue.js +1 -1
  18. package/dist/code-example/components/HttpMethod.vue.js.map +1 -1
  19. package/dist/code-example/components/{HttpMethod.vue.script.js → HttpMethod.vue_vue_type_script_setup_true_lang.js} +1 -1
  20. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +1 -0
  21. package/dist/code-example/helpers/filter-clients-by-query.js.map +1 -1
  22. package/dist/code-example/helpers/find-client.js.map +1 -1
  23. package/dist/code-example/helpers/format-language.js.map +1 -1
  24. package/dist/code-example/helpers/generate-client-options.js.map +1 -1
  25. package/dist/code-example/helpers/generate-code-snippet.js.map +1 -1
  26. package/dist/code-example/helpers/get-asyncapi-example-context.d.ts +12 -0
  27. package/dist/code-example/helpers/get-asyncapi-example-context.d.ts.map +1 -0
  28. package/dist/code-example/helpers/get-asyncapi-example-context.js +33 -0
  29. package/dist/code-example/helpers/get-asyncapi-example-context.js.map +1 -0
  30. package/dist/code-example/helpers/get-clients.js.map +1 -1
  31. package/dist/code-example/helpers/get-custom-code-samples.js.map +1 -1
  32. package/dist/code-example/helpers/get-generated-payload-example.d.ts +4 -0
  33. package/dist/code-example/helpers/get-generated-payload-example.d.ts.map +1 -0
  34. package/dist/code-example/helpers/get-generated-payload-example.js +25 -0
  35. package/dist/code-example/helpers/get-generated-payload-example.js.map +1 -0
  36. package/dist/code-example/helpers/get-message-example-content.d.ts +10 -0
  37. package/dist/code-example/helpers/get-message-example-content.d.ts.map +1 -0
  38. package/dist/code-example/helpers/get-message-example-content.js +29 -0
  39. package/dist/code-example/helpers/get-message-example-content.js.map +1 -0
  40. package/dist/code-example/helpers/get-secrets.js.map +1 -1
  41. package/dist/code-example/helpers/get-snippet.js.map +1 -1
  42. package/dist/code-example/helpers/operation-to-har/operation-to-har.js +32 -32
  43. package/dist/code-example/helpers/operation-to-har/operation-to-har.js.map +1 -1
  44. package/dist/code-example/helpers/operation-to-har/process-body.js +41 -47
  45. package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
  46. package/dist/code-example/helpers/operation-to-har/process-parameters.js +51 -55
  47. package/dist/code-example/helpers/operation-to-har/process-parameters.js.map +1 -1
  48. package/dist/code-example/helpers/operation-to-har/process-security-schemes.js +30 -38
  49. package/dist/code-example/helpers/operation-to-har/process-security-schemes.js.map +1 -1
  50. package/dist/code-example/helpers/operation-to-har/process-server-url.js +5 -1
  51. package/dist/code-example/helpers/operation-to-har/process-server-url.js.map +1 -1
  52. package/dist/code-example/index.d.ts +4 -0
  53. package/dist/code-example/index.d.ts.map +1 -1
  54. package/dist/code-example/index.js +17 -14
  55. package/dist/code-example/mount-asyncapi.d.ts +14 -0
  56. package/dist/code-example/mount-asyncapi.d.ts.map +1 -0
  57. package/dist/code-example/mount-asyncapi.js +27 -0
  58. package/dist/code-example/mount-asyncapi.js.map +1 -0
  59. package/dist/code-example/mount.d.ts +4 -2
  60. package/dist/code-example/mount.d.ts.map +1 -1
  61. package/dist/code-example/mount.js +39 -36
  62. package/dist/code-example/mount.js.map +1 -1
  63. package/dist/constants.js +1 -1
  64. package/dist/constants.js.map +1 -1
  65. package/dist/schema/LinkButton.vue.js.map +1 -1
  66. package/dist/schema/RenderString.vue.js +1 -1
  67. package/dist/schema/RenderString.vue.js.map +1 -1
  68. package/dist/schema/{RenderString.vue.script.js → RenderString.vue_vue_type_script_setup_true_lang.js} +1 -1
  69. package/dist/schema/RenderString.vue_vue_type_script_setup_true_lang.js.map +1 -0
  70. package/dist/schema/Schema.vue.js +2 -2
  71. package/dist/schema/Schema.vue.js.map +1 -1
  72. package/dist/schema/{Schema.vue.script.js → Schema.vue_vue_type_script_setup_true_lang.js} +1 -1
  73. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +1 -0
  74. package/dist/schema/SchemaCollapsedPreview.vue.js +1 -1
  75. package/dist/schema/SchemaCollapsedPreview.vue.js.map +1 -1
  76. package/dist/schema/{SchemaCollapsedPreview.vue.script.js → SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js} +1 -1
  77. package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js.map +1 -0
  78. package/dist/schema/SchemaComposition.vue.js +2 -2
  79. package/dist/schema/SchemaComposition.vue.js.map +1 -1
  80. package/dist/schema/{SchemaComposition.vue.script.js → SchemaComposition.vue_vue_type_script_setup_true_lang.js} +5 -5
  81. package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js.map +1 -0
  82. package/dist/schema/SchemaEnumPropertyItem.vue.js +1 -1
  83. package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -1
  84. package/dist/schema/{SchemaEnumPropertyItem.vue.script.js → SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js} +5 -5
  85. package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  86. package/dist/schema/SchemaEnums.vue.js +2 -2
  87. package/dist/schema/SchemaEnums.vue.js.map +1 -1
  88. package/dist/schema/{SchemaEnums.vue.script.js → SchemaEnums.vue_vue_type_script_setup_true_lang.js} +1 -1
  89. package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js.map +1 -0
  90. package/dist/schema/SchemaGlyphPuck.vue.js +1 -1
  91. package/dist/schema/SchemaGlyphPuck.vue.js.map +1 -1
  92. package/dist/schema/{SchemaGlyphPuck.vue.script.js → SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js} +1 -1
  93. package/dist/schema/SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js.map +1 -0
  94. package/dist/schema/SchemaGutterToggle.vue.js +1 -1
  95. package/dist/schema/SchemaGutterToggle.vue.js.map +1 -1
  96. package/dist/schema/{SchemaGutterToggle.vue.script.js → SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
  97. package/dist/schema/SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
  98. package/dist/schema/SchemaHeading.vue.js +2 -2
  99. package/dist/schema/SchemaHeading.vue.js.map +1 -1
  100. package/dist/schema/{SchemaHeading.vue.script.js → SchemaHeading.vue_vue_type_script_setup_true_lang.js} +6 -6
  101. package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js.map +1 -0
  102. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js +1 -1
  103. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  104. package/dist/schema/{SchemaObjectExampleCodeBlock.vue.script.js → SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js} +1 -1
  105. package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js.map +1 -0
  106. package/dist/schema/SchemaObjectProperties.vue.js +1 -1
  107. package/dist/schema/SchemaObjectProperties.vue.js.map +1 -1
  108. package/dist/schema/{SchemaObjectProperties.vue.script.js → SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js} +3 -3
  109. package/dist/schema/{SchemaObjectProperties.vue.script.js.map → SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map} +1 -1
  110. package/dist/schema/SchemaProperty.vue.js +2 -2
  111. package/dist/schema/SchemaProperty.vue.js.map +1 -1
  112. package/dist/schema/{SchemaProperty.vue.script.js → SchemaProperty.vue_vue_type_script_setup_true_lang.js} +14 -18
  113. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +1 -0
  114. package/dist/schema/SchemaPropertyDefault.vue.js +2 -2
  115. package/dist/schema/SchemaPropertyDefault.vue.js.map +1 -1
  116. package/dist/schema/{SchemaPropertyDefault.vue.script.js → SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js} +1 -1
  117. package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js.map +1 -0
  118. package/dist/schema/SchemaPropertyDetail.vue.js +2 -2
  119. package/dist/schema/SchemaPropertyDetail.vue.js.map +1 -1
  120. package/dist/schema/{SchemaPropertyDetail.vue.script.js → SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js} +1 -1
  121. package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js.map +1 -0
  122. package/dist/schema/SchemaPropertyExamples.vue.d.ts +2 -0
  123. package/dist/schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  124. package/dist/schema/SchemaPropertyExamples.vue.js +3 -3
  125. package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -1
  126. package/dist/schema/{SchemaPropertyExamples.vue.script.js → SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js} +10 -3
  127. package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js.map +1 -0
  128. package/dist/schema/SchemaPropertyHeading.vue.js +2 -2
  129. package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -1
  130. package/dist/schema/{SchemaPropertyHeading.vue.script.js → SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js} +1 -1
  131. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -0
  132. package/dist/schema/SchemaPropertyPattern.vue.js +2 -2
  133. package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -1
  134. package/dist/schema/{SchemaPropertyPattern.vue.script.js → SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js} +1 -1
  135. package/dist/schema/SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js.map +1 -0
  136. package/dist/schema/SchemaRailPanel.vue.js +1 -1
  137. package/dist/schema/SchemaRailPanel.vue.js.map +1 -1
  138. package/dist/schema/{SchemaRailPanel.vue.script.js → SchemaRailPanel.vue_vue_type_script_setup_true_lang.js} +1 -1
  139. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  140. package/dist/schema/components/CopyLinkButton.vue.js +1 -1
  141. package/dist/schema/components/CopyLinkButton.vue.js.map +1 -1
  142. package/dist/schema/components/{CopyLinkButton.vue.script.js → CopyLinkButton.vue_vue_type_script_setup_true_lang.js} +1 -1
  143. package/dist/schema/components/CopyLinkButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  144. package/dist/schema/components/WithBreadcrumb.vue.js +1 -1
  145. package/dist/schema/components/WithBreadcrumb.vue.js.map +1 -1
  146. package/dist/schema/components/{WithBreadcrumb.vue.script.js → WithBreadcrumb.vue_vue_type_script_setup_true_lang.js} +1 -1
  147. package/dist/schema/components/WithBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -0
  148. package/dist/schema/discriminator-metadata.js.map +1 -1
  149. package/dist/schema/expansion/index.js +1 -2
  150. package/dist/schema/helpers/dynamic-scope.js.map +1 -1
  151. package/dist/schema/helpers/format-example.js.map +1 -1
  152. package/dist/schema/helpers/format-value.js.map +1 -1
  153. package/dist/schema/helpers/get-compositions-to-render.js.map +1 -1
  154. package/dist/schema/helpers/get-discriminator-values.js.map +1 -1
  155. package/dist/schema/helpers/get-enum-values.js.map +1 -1
  156. package/dist/schema/helpers/get-property-description.js.map +1 -1
  157. package/dist/schema/helpers/get-ref-name.js.map +1 -1
  158. package/dist/schema/helpers/get-schema-type.js.map +1 -1
  159. package/dist/schema/helpers/get-type-signature-tokens.js.map +1 -1
  160. package/dist/schema/helpers/has-complex-array-items.js.map +1 -1
  161. package/dist/schema/helpers/is-empty-schema-object.js.map +1 -1
  162. package/dist/schema/helpers/is-model-linkable.js.map +1 -1
  163. package/dist/schema/helpers/is-on-schema-target-path.js.map +1 -1
  164. package/dist/schema/helpers/is-type-object.js.map +1 -1
  165. package/dist/schema/helpers/merge-all-of-schemas.js +24 -25
  166. package/dist/schema/helpers/merge-all-of-schemas.js.map +1 -1
  167. package/dist/schema/helpers/normalize-object-composition.js.map +1 -1
  168. package/dist/schema/helpers/optimize-value-for-display.js +5 -12
  169. package/dist/schema/helpers/optimize-value-for-display.js.map +1 -1
  170. package/dist/schema/helpers/partition-all-of-compositions.js.map +1 -1
  171. package/dist/schema/helpers/schema-composition.js.map +1 -1
  172. package/dist/schema/helpers/schema-cycle.js.map +1 -1
  173. package/dist/schema/helpers/schema-expansion.js +4 -5
  174. package/dist/schema/helpers/schema-expansion.js.map +1 -1
  175. package/dist/schema/helpers/schema-keyboard-nav.js.map +1 -1
  176. package/dist/schema/helpers/schema-name.js.map +1 -1
  177. package/dist/schema/helpers/should-display-description.js.map +1 -1
  178. package/dist/schema/helpers/should-display-heading.js.map +1 -1
  179. package/dist/schema/helpers/should-render-array-item-composition.js.map +1 -1
  180. package/dist/schema/helpers/sort-property-names.js.map +1 -1
  181. package/dist/schema/helpers/unwrap-for-read.js.map +1 -1
  182. package/dist/schema/index.d.ts +1 -0
  183. package/dist/schema/index.d.ts.map +1 -1
  184. package/dist/schema/index.js +6 -5
  185. package/dist/schema/localization/index.d.ts +1 -1
  186. package/dist/schema/localization/index.js.map +1 -1
  187. package/dist/schema/localization/locales/ar.js.map +1 -1
  188. package/dist/schema/localization/locales/de.js.map +1 -1
  189. package/dist/schema/localization/locales/en.js.map +1 -1
  190. package/dist/schema/localization/locales/es.js.map +1 -1
  191. package/dist/schema/localization/locales/fr.js.map +1 -1
  192. package/dist/schema/localization/locales/pt.js.map +1 -1
  193. package/dist/schema/localization/locales/ru.js.map +1 -1
  194. package/dist/schema/localization/locales/zh-cn.js.map +1 -1
  195. package/dist/schema/localization/locales/zh-tw.js.map +1 -1
  196. package/dist/schema/localization/translations.js.map +1 -1
  197. package/dist/schema/request-body-composition-index.js.map +1 -1
  198. package/dist/shared/Badge.vue.js +2 -2
  199. package/dist/shared/Badge.vue.js.map +1 -1
  200. package/dist/shared/{Badge.vue.script.js → Badge.vue_vue_type_script_setup_true_lang.js} +1 -1
  201. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -0
  202. package/dist/shared/ExternalDocs.vue.js +1 -1
  203. package/dist/shared/ExternalDocs.vue.js.map +1 -1
  204. package/dist/shared/{ExternalDocs.vue.script.js → ExternalDocs.vue_vue_type_script_setup_true_lang.js} +1 -1
  205. package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js.map +1 -0
  206. package/dist/shared/ScreenReader.vue.js +1 -1
  207. package/dist/shared/ScreenReader.vue.js.map +1 -1
  208. package/dist/shared/{ScreenReader.vue.script.js → ScreenReader.vue_vue_type_script_setup_true_lang.js} +1 -1
  209. package/dist/shared/ScreenReader.vue_vue_type_script_setup_true_lang.js.map +1 -0
  210. package/dist/specification-extensions/ExtensionValue.vue.js +1 -1
  211. package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -1
  212. package/dist/specification-extensions/{ExtensionValue.vue.script.js → ExtensionValue.vue_vue_type_script_setup_true_lang.js} +1 -1
  213. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -0
  214. package/dist/specification-extensions/SpecificationExtensions.vue.js +1 -1
  215. package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -1
  216. package/dist/specification-extensions/{SpecificationExtensions.vue.script.js → SpecificationExtensions.vue_vue_type_script_setup_true_lang.js} +1 -1
  217. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -0
  218. package/dist/specification-extensions/index.js +1 -2
  219. package/dist/style.css +76 -31
  220. package/dist/vue-styles.css +1 -1
  221. package/package.json +23 -23
  222. package/dist/code-example/components/CodeExample.vue.script.js +0 -258
  223. package/dist/code-example/components/CodeExample.vue.script.js.map +0 -1
  224. package/dist/code-example/components/ExamplePicker.vue.script.js.map +0 -1
  225. package/dist/code-example/components/HttpMethod.vue.script.js.map +0 -1
  226. package/dist/schema/RenderString.vue.script.js.map +0 -1
  227. package/dist/schema/Schema.vue.script.js.map +0 -1
  228. package/dist/schema/SchemaCollapsedPreview.vue.script.js.map +0 -1
  229. package/dist/schema/SchemaComposition.vue.script.js.map +0 -1
  230. package/dist/schema/SchemaEnumPropertyItem.vue.script.js.map +0 -1
  231. package/dist/schema/SchemaEnums.vue.script.js.map +0 -1
  232. package/dist/schema/SchemaGlyphPuck.vue.script.js.map +0 -1
  233. package/dist/schema/SchemaGutterToggle.vue.script.js.map +0 -1
  234. package/dist/schema/SchemaHeading.vue.script.js.map +0 -1
  235. package/dist/schema/SchemaObjectExampleCodeBlock.vue.script.js.map +0 -1
  236. package/dist/schema/SchemaProperty.vue.script.js.map +0 -1
  237. package/dist/schema/SchemaPropertyDefault.vue.script.js.map +0 -1
  238. package/dist/schema/SchemaPropertyDetail.vue.script.js.map +0 -1
  239. package/dist/schema/SchemaPropertyExamples.vue.script.js.map +0 -1
  240. package/dist/schema/SchemaPropertyHeading.vue.script.js.map +0 -1
  241. package/dist/schema/SchemaPropertyPattern.vue.script.js.map +0 -1
  242. package/dist/schema/SchemaRailPanel.vue.script.js.map +0 -1
  243. package/dist/schema/components/CopyLinkButton.vue.script.js.map +0 -1
  244. package/dist/schema/components/WithBreadcrumb.vue.script.js.map +0 -1
  245. package/dist/shared/Badge.vue.script.js.map +0 -1
  246. package/dist/shared/ExternalDocs.vue.script.js.map +0 -1
  247. package/dist/shared/ScreenReader.vue.script.js.map +0 -1
  248. package/dist/specification-extensions/ExtensionValue.vue.script.js.map +0 -1
  249. package/dist/specification-extensions/SpecificationExtensions.vue.script.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaCollapsedPreview.vue.js","names":[],"sources":["../../src/schema/SchemaCollapsedPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\n/**\n * A hint at what a collapsed object holds: `{ code, message, source, +1 }`.\n * Marked `aria-hidden` by the parent: the child count already rides the\n * toggle's `aria-describedby`, and reading names before every row is noise.\n */\nconst {\n schema,\n propertyNames,\n limit = 3,\n} = defineProps<{\n schema?: SchemaObject\n /** The names the panel will render, already filtered; defaults to the schema's keys */\n propertyNames?: readonly string[]\n /** How many property names to show before eliding the rest */\n limit?: number\n}>()\n\nconst preview = computed((): string | null => {\n if (!schema || typeof schema !== 'object') {\n return null\n }\n\n /*\n * The caller passes the names the panel will render, filtered by\n * hideReadOnly / hideWriteOnly; deriving them here let the preview advertise\n * fields the panel drops. The fallback (stories, tests) reads `properties`\n * directly: `resolve.schema` keeps `$ref` but drops `$ref-value`, so resolving\n * again returned undefined for a `$ref` property and nothing rendered.\n */\n const resolved =\n 'properties' in schema ? schema : (getResolvedRef(schema) ?? schema)\n const properties =\n propertyNames ??\n (resolved && 'properties' in resolved && resolved.properties\n ? Object.keys(resolved.properties)\n : [])\n\n if (properties.length === 0) {\n return null\n }\n\n const shown = properties.slice(0, limit)\n const rest = properties.length - shown.length\n const parts = rest > 0 ? [...shown, `+${rest}`] : shown\n\n return `{ ${parts.join(', ')} }`\n})\n</script>\n<template>\n <span\n v-if=\"preview\"\n class=\"property-collapsed-preview font-code text-c-1 max-w-max min-w-0 flex-1 basis-0 truncate text-(length:--scalar-mini)\"\n >{{ preview }}</span\n >\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaCollapsedPreview.vue.js","names":["_sfc_main","SchemaCollapsedPreview_vue_vue_type_script_setup_true_lang_default","SchemaCollapsedPreview_default"],"sources":["../../src/schema/SchemaCollapsedPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\n/**\n * A hint at what a collapsed object holds: `{ code, message, source, +1 }`.\n * Marked `aria-hidden` by the parent: the child count already rides the\n * toggle's `aria-describedby`, and reading names before every row is noise.\n */\nconst {\n schema,\n propertyNames,\n limit = 3,\n} = defineProps<{\n schema?: SchemaObject\n /** The names the panel will render, already filtered; defaults to the schema's keys */\n propertyNames?: readonly string[]\n /** How many property names to show before eliding the rest */\n limit?: number\n}>()\n\nconst preview = computed((): string | null => {\n if (!schema || typeof schema !== 'object') {\n return null\n }\n\n /*\n * The caller passes the names the panel will render, filtered by\n * hideReadOnly / hideWriteOnly; deriving them here let the preview advertise\n * fields the panel drops. The fallback (stories, tests) reads `properties`\n * directly: `resolve.schema` keeps `$ref` but drops `$ref-value`, so resolving\n * again returned undefined for a `$ref` property and nothing rendered.\n */\n const resolved =\n 'properties' in schema ? schema : (getResolvedRef(schema) ?? schema)\n const properties =\n propertyNames ??\n (resolved && 'properties' in resolved && resolved.properties\n ? Object.keys(resolved.properties)\n : [])\n\n if (properties.length === 0) {\n return null\n }\n\n const shown = properties.slice(0, limit)\n const rest = properties.length - shown.length\n const parts = rest > 0 ? [...shown, `+${rest}`] : shown\n\n return `{ ${parts.join(', ')} }`\n})\n</script>\n<template>\n <span\n v-if=\"preview\"\n class=\"property-collapsed-preview font-code text-c-1 max-w-max min-w-0 flex-1 basis-0 truncate text-(length:--scalar-mini)\"\n >{{ preview }}</span\n >\n</template>\n"],"mappings":""}
@@ -25,4 +25,4 @@ var s = {
25
25
  //#endregion
26
26
  export { c as default };
27
27
 
28
- //# sourceMappingURL=SchemaCollapsedPreview.vue.script.js.map
28
+ //# sourceMappingURL=SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_toDisplayString","_createCommentVNode","_hoisted_1","SchemaCollapsedPreview_vue_vue_type_script_setup_true_lang_default","preview","computed","__props","resolved","getResolvedRef","properties","shown","rest","openBlock","createElementBlock","toDisplayString","createCommentVNode"],"sources":["../../src/schema/SchemaCollapsedPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\n/**\n * A hint at what a collapsed object holds: `{ code, message, source, +1 }`.\n * Marked `aria-hidden` by the parent: the child count already rides the\n * toggle's `aria-describedby`, and reading names before every row is noise.\n */\nconst {\n schema,\n propertyNames,\n limit = 3,\n} = defineProps<{\n schema?: SchemaObject\n /** The names the panel will render, already filtered; defaults to the schema's keys */\n propertyNames?: readonly string[]\n /** How many property names to show before eliding the rest */\n limit?: number\n}>()\n\nconst preview = computed((): string | null => {\n if (!schema || typeof schema !== 'object') {\n return null\n }\n\n /*\n * The caller passes the names the panel will render, filtered by\n * hideReadOnly / hideWriteOnly; deriving them here let the preview advertise\n * fields the panel drops. The fallback (stories, tests) reads `properties`\n * directly: `resolve.schema` keeps `$ref` but drops `$ref-value`, so resolving\n * again returned undefined for a `$ref` property and nothing rendered.\n */\n const resolved =\n 'properties' in schema ? schema : (getResolvedRef(schema) ?? schema)\n const properties =\n propertyNames ??\n (resolved && 'properties' in resolved && resolved.properties\n ? Object.keys(resolved.properties)\n : [])\n\n if (properties.length === 0) {\n return null\n }\n\n const shown = properties.slice(0, limit)\n const rest = properties.length - shown.length\n const parts = rest > 0 ? [...shown, `+${rest}`] : shown\n\n return `{ ${parts.join(', ')} }`\n})\n</script>\n<template>\n <span\n v-if=\"preview\"\n class=\"property-collapsed-preview font-code text-c-1 max-w-max min-w-0 flex-1 basis-0 truncate text-(length:--scalar-mini)\"\n >{{ preview }}</span\n >\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAsBA,IAAMM,IAAUC,QAA8B;GAC5C,IAAI,CAACC,EAAA,UAAU,OAAOA,EAAA,UAAW,UAC/B,OAAO;GAUT,IAAMC,IACJ,gBAAgBD,EAAA,SAASA,EAAA,SAAUE,EAAeF,EAAA,MAAM,KAAKA,EAAA,QACzDG,IACJH,EAAA,kBACCC,KAAY,gBAAgBA,KAAYA,EAAS,aAC9C,OAAO,KAAKA,EAAS,UAAU,IAC/B,CAAC;GAEP,IAAIE,EAAW,WAAW,GACxB,OAAO;GAGT,IAAMC,IAAQD,EAAW,MAAM,GAAGH,EAAA,KAAK,GACjCK,IAAOF,EAAW,SAASC,EAAM;GAGvC,OAAO,MAFOC,IAAO,IAAI,CAAC,GAAGD,GAAO,IAAIC,GAAM,IAAID,EAAA,CAEhC,KAAK,IAAI,EAAE;EAC/B,CAAC;E,iBAISN,EAAA,SADRN,EAAA,GAAAC,EAIC,QAJDG,GAICF,EADKI,EAAA,KAAO,GAAA,CAAA,K"}
@@ -1,6 +1,6 @@
1
1
  import e from "../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./SchemaComposition.vue.script.js";
3
- /* empty css */
2
+ import t from "./SchemaComposition.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/schema/SchemaComposition.vue
5
5
  var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-e22666da"]]);
6
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaComposition.vue.js","names":[],"sources":["../../src/schema/SchemaComposition.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport { ScalarIconCaretUpDown } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, inject, ref, watch } from 'vue'\n\nimport {\n schemaDiscriminator,\n type DiscriminatorMetadata,\n type DiscriminatorSchema,\n} from './discriminator-metadata'\nimport { getDiscriminatorValues } from './helpers/get-discriminator-values'\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { partitionAllOfCompositions } from './helpers/partition-all-of-compositions'\nimport { type CompositionKeyword } from './helpers/schema-composition'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { getModelNameWithArray } from './helpers/schema-name'\nimport { useLocalization } from './localization'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from './request-body-composition-index'\nimport Schema from './Schema.vue'\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\nimport SchemaRailPanel from './SchemaRailPanel.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst props = withDefaults(\n defineProps<\n {\n /** The composition keyword (oneOf, anyOf, allOf) */\n composition: CompositionKeyword\n /** Optional discriminator object for polymorphic schemas */\n discriminator?: DiscriminatorObject\n /** Optional name for the schema */\n name?: string\n /** The schema value containing the composition */\n schema: SchemaObject\n /** Nesting level for proper indentation */\n level: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n /** Whether to use compact layout */\n compact?: boolean\n /** Whether to hide the heading */\n hideHeading?: boolean\n /** Hide model names in type display */\n hideModelNames?: boolean\n /** Breadcrumb for navigation */\n breadcrumb?: string[]\n /** Event bus emitting actions */\n eventBus: WorkspaceEventBus | null\n /** Move the options into single prop so they are easy to pass around */\n options: SchemaOptions\n /** When \"requestBody\", sync selected index with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n } & SchemaRenderingProps\n >(),\n {\n depth: 0,\n compact: false,\n hideHeading: false,\n },\n)\nconst { translate } = useLocalization()\n\n/**\n * Split an `allOf` into an ordered list of segments (object chunks + choice\n * pickers) so multiple mutually-exclusive selections each render their own\n * picker, in the position they were declared, instead of all but the first\n * being dropped and the rest bubbling to the end.\n */\nconst allOfSegments = computed(() =>\n props.composition === 'allOf'\n ? partitionAllOfCompositions(props.schema).segments\n : [],\n)\n\n/** The current composition */\nconst composition = computed(() =>\n [props.schema[props.composition]]\n .flat()\n .map((schema) => ({ value: resolve.schema(schema), original: schema }))\n .filter((it) => isDefined(it.value)),\n)\n\n/**\n * Generate listbox options for the composition selector.\n * Each option represents a schema in the composition with a human-readable label.\n * Prefers schema title/name (including array item models, e.g. `Model[]`) over\n * structural type when present.\n */\nconst listboxOptions = computed((): ScalarListboxOption[] =>\n composition.value.map((schema, index: number) => {\n const resolved = resolve.schema(schema.original!)\n const label =\n (getModelNameWithArray(resolved)?.label ?? getSchemaType(resolved)) ||\n translate('schema.schema')\n const mapping = (props.schema.discriminator ?? props.discriminator)?.mapping\n const mappedValues = getDiscriminatorValues(resolved.$ref, mapping)\n // Multiple inherited schemas can share a value that a mapping can only store once.\n const inheritedValue = (resolved.discriminator as DiscriminatorMetadata)?.[\n schemaDiscriminator\n ]?.value\n const values = mappedValues.length\n ? mappedValues\n : inheritedValue === undefined\n ? []\n : [inheritedValue]\n return {\n id: String(index),\n label:\n values.length && values.join(', ') !== label\n ? `${values.join(', ')} · ${label}`\n : label,\n }\n }),\n)\n\nconst compositionSelectionKey = computed(() =>\n props.compositionPath?.length\n ? [...props.compositionPath, props.composition].join('.')\n : '',\n)\n\n/** When this composition is in the request body, sync selection with the example snippet */\nconst requestBodyCompositionSelectionRef = inject(\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n undefined,\n)\n\nconst initialSelectedIndex = computed(() => {\n if (\n props.schemaContext !== 'requestBody' ||\n !requestBodyCompositionSelectionRef?.value ||\n !compositionSelectionKey.value\n ) {\n return 0\n }\n\n const selectedIndex =\n requestBodyCompositionSelectionRef.value[compositionSelectionKey.value]\n\n if (typeof selectedIndex !== 'number' || Number.isNaN(selectedIndex)) {\n return 0\n }\n\n return Math.max(0, Math.min(selectedIndex, listboxOptions.value.length - 1))\n})\n\n/**\n * Two-way computed property for the selected option.\n * Handles conversion between the selected index and the listbox option format.\n */\nconst selectedOption = ref<ScalarListboxOption | undefined>()\n\nwatch(\n [listboxOptions, initialSelectedIndex],\n ([options, selectedIndex]) => {\n if (\n !selectedOption.value ||\n !options.some((option) => option.id === selectedOption.value?.id)\n ) {\n selectedOption.value = options[selectedIndex] ?? options[0]\n }\n },\n { immediate: true },\n)\n\nconst compositionLabel = (type: CompositionKeyword): string =>\n (props.schema as DiscriminatorSchema)[schemaDiscriminator]?.inheritedVariants\n ? translate('schema.variants')\n : translate(`schema.${type}`)\n\n/** Inside the currently selected composition */\nconst selectedComposition = computed(\n () => composition.value[Number(selectedOption.value?.id ?? '0')]?.value,\n)\n\n/** AsyncAPI variants carry their own effective value; OpenAPI keeps its existing inference context. */\nconst selectedDiscriminator = computed((): DiscriminatorObject | undefined => {\n const own = selectedComposition.value?.discriminator\n return (own as DiscriminatorMetadata)?.[schemaDiscriminator]\n ? own\n : props.discriminator\n})\n\n/**\n * The request body card renders the merged `allOf` description on its outer card\n * (see `Schema.vue`), but only for the top-level request body schema. For that\n * single composition we hide the nested merged `Schema`'s description so the text\n * is not shown twice. Nested request-body compositions (deeper properties) are\n * not shown on the outer card and would otherwise lose their description\n * entirely, because the property row already skips it when `allOf` is present.\n *\n * The top-level request body composition is the one whose `compositionPath` is\n * still the request body root (`['requestBody']`); nested compositions append\n * property segments and therefore have a longer path.\n */\nconst isRequestBodyRootComposition = computed(\n () =>\n props.schemaContext === 'requestBody' &&\n props.compositionPath?.length === 1,\n)\n\n/**\n * Cycle key for the selected composition member, derived from its raw\n * (unresolved) value so a member that references an ancestor is detected as a\n * cycle.\n */\nconst selectedCompositionCycleKey = computed(() =>\n getCycleKey(\n composition.value[Number(selectedOption.value?.id ?? '0')]?.original,\n ),\n)\n\n/**\n * Controls whether the nested schema is displayed. When expanding all schema\n * properties we open it by default; the nested Schema handles cycle detection,\n * so finite compositions render fully while recursive ones still stop.\n */\nconst showNestedSchema = ref(!!props.options.expandAllSchemaProperties)\n\nif (\n requestBodyCompositionSelectionRef &&\n props.schemaContext === 'requestBody' &&\n compositionSelectionKey.value\n) {\n watch(\n selectedOption,\n (option) => {\n const index = option ? Number(option.id) : 0\n if (!Number.isNaN(index)) {\n requestBodyCompositionSelectionRef.value = {\n ...requestBodyCompositionSelectionRef.value,\n [compositionSelectionKey.value]: index,\n } satisfies RequestBodyCompositionSelection\n }\n },\n { immediate: true },\n )\n}\n</script>\n\n<template>\n <!-- 6px after a container's children keeps the 12px row rhythm -->\n <div class=\"property-rule [.children+&]:mt-1.5!\">\n <!--\n allOf: render the members in source order — object chunks as fields, each\n oneOf/anyOf group as its own picker in place. Keeps every mutually-exclusive\n selection (mergeAllOfSchemas alone drops all but the first) and preserves the\n position of each choice group among the surrounding fields, flowing inline\n with them as one continuous list (no extra spacing or card).\n -->\n <template v-if=\"props.composition === 'allOf'\">\n <template\n v-for=\"(segment, segmentIndex) in allOfSegments\"\n :key=\"segmentIndex\">\n <Schema\n v-if=\"segment.kind === 'object'\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"compositionPath\"\n :depth=\"depth\"\n :discriminator=\"schema.discriminator ?? discriminator\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideDescription=\"isRequestBodyRootComposition\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"true\"\n :options=\"options\"\n :schema=\"segment.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n <SchemaComposition\n v-else\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"segment.composition\"\n :compositionPath=\"[\n ...(compositionPath ?? []),\n String(segment.choiceIndex),\n ]\"\n :depth=\"depth\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :options=\"options\"\n :schema=\"segment.value\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n </template>\n\n <!-- The picker sits on the rail behind a circled icon, like the toggle\n pucks; the chosen variant hangs below in the same panel -->\n <SchemaRailPanel\n v-else\n class=\"composition-panel composition-panel--tree mt-1 mb-0.5\"\n :depth=\"depth + 1\">\n <!-- No `resize`: it would pin the popup to this compact trigger's width.\n The listbox slot must hold exactly ONE node: Headless UI renders its\n button as a fragment and passes props through to the slot root, so\n even an HTML comment in here breaks the picker. The puck is the\n picker's whole affordance: an up/down caret on the rail, like the\n plus on a row, so no trailing caret. -->\n <ScalarListbox\n v-model=\"selectedOption\"\n class=\"w-fit max-w-full min-w-40\"\n :options=\"listboxOptions\">\n <button\n class=\"composition-selector composition-selector--tree group/tree-control font-code relative flex w-fit max-w-full cursor-pointer items-start gap-1.5 py-1 text-sm\"\n type=\"button\">\n <SchemaGlyphPuck\n anchor=\"line\"\n class=\"composition-selector-icon mt-1\">\n <!-- No size of its own: the puck sizes the icons it holds, so this\n one shrinks with the others in a narrow container -->\n <ScalarIconCaretUpDown />\n </SchemaGlyphPuck>\n <!-- Keyword and choice read as one bold name, split by the same `·`\n the tree uses between details -->\n <span\n class=\"text-c-1 shrink-0 [font-weight:var(--scalar-bold)] whitespace-nowrap\"\n >{{ compositionLabel(props.composition) }}</span\n >\n <span\n aria-hidden=\"true\"\n class=\"text-c-3 shrink-0\"\n >·</span\n >\n <span\n class=\"composition-selector-label text-c-1 min-w-0 truncate [font-weight:var(--scalar-bold)]\"\n :class=\"{\n 'line-through': selectedComposition?.deprecated,\n }\"\n :title=\"selectedOption?.label || translate('schema.schema')\">\n {{ selectedOption?.label || translate('schema.schema') }}\n </span>\n <div\n v-if=\"selectedComposition?.deprecated\"\n class=\"text-red\">\n {{ translate('schema.deprecated') }}\n </div>\n </button>\n </ScalarListbox>\n\n <!-- The reveal is one more row of the tree: a plus puck on the rail -->\n <button\n v-if=\"!showNestedSchema && level > 2\"\n class=\"composition-details-toggle group/tree-control font-code text-c-1 relative flex w-fit cursor-pointer items-center py-1.5 text-sm font-normal\"\n type=\"button\"\n @click=\"showNestedSchema = true\">\n <SchemaGlyphPuck />\n {{ translate('schema.showSchemaDetails') }}\n </button>\n\n <!-- Render the selected schema if it has content to display -->\n <Schema\n v-else\n :key=\"selectedOption?.id ?? '0'\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"compositionPath\"\n :cycleKey=\"selectedCompositionCycleKey\"\n :depth=\"depth + 1\"\n :discriminator=\"selectedDiscriminator\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"true\"\n :options=\"options\"\n :schema=\"selectedComposition\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </SchemaRailPanel>\n </div>\n</template>\n\n<style scoped>\n/*\n * A `oneOf`/`anyOf` whose chosen variant `allOf`s back to a shared base — most\n * commonly a discriminator-inferred `oneOf` sitting directly on the request body\n * — renders the merged variant one level deeper than a plain object variant:\n * `Schema.vue` cannot flatten the `allOf`, so it hands the merged object to\n * `SchemaProperty`, which wraps it in a headless passthrough row\n * (`.property--tree-container`). That wrapper carries a row's own\n * `--schema-row-pad`, opening a gap between the selector and the first field\n * that a plain `oneOf` does not have, so the variant reads as detached from its\n * picker. Drop that leading row pad for the panel's own variant card so the\n * field sits flush under the selector, matching a plain `oneOf`. Only the top\n * pad goes: the wrapper's trailing pad is what closes the card under the last\n * field, exactly as a plain variant's last row does.\n *\n * The rule lives here rather than in `SchemaProperty` because a body-level\n * discriminator `oneOf` is rendered straight from `Schema.vue` and never passes\n * through `SchemaProperty`, so a rule scoped there would never reach it.\n * See https://github.com/scalar/scalar/issues/9861\n */\n.property-rule\n :deep(\n .composition-panel\n > .schema-card\n > .schema-properties\n > ul\n > li.property.property--tree-container\n ) {\n padding-top: 0 !important;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaComposition.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","SchemaComposition_vue_vue_type_script_setup_true_lang_default","SchemaComposition_default"],"sources":["../../src/schema/SchemaComposition.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport { ScalarIconCaretUpDown } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, inject, ref, watch } from 'vue'\n\nimport {\n schemaDiscriminator,\n type DiscriminatorMetadata,\n type DiscriminatorSchema,\n} from './discriminator-metadata'\nimport { getDiscriminatorValues } from './helpers/get-discriminator-values'\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { partitionAllOfCompositions } from './helpers/partition-all-of-compositions'\nimport { type CompositionKeyword } from './helpers/schema-composition'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { getModelNameWithArray } from './helpers/schema-name'\nimport { useLocalization } from './localization'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from './request-body-composition-index'\nimport Schema from './Schema.vue'\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\nimport SchemaRailPanel from './SchemaRailPanel.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst props = withDefaults(\n defineProps<\n {\n /** The composition keyword (oneOf, anyOf, allOf) */\n composition: CompositionKeyword\n /** Optional discriminator object for polymorphic schemas */\n discriminator?: DiscriminatorObject\n /** Optional name for the schema */\n name?: string\n /** The schema value containing the composition */\n schema: SchemaObject\n /** Nesting level for proper indentation */\n level: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n /** Whether to use compact layout */\n compact?: boolean\n /** Whether to hide the heading */\n hideHeading?: boolean\n /** Hide model names in type display */\n hideModelNames?: boolean\n /** Breadcrumb for navigation */\n breadcrumb?: string[]\n /** Event bus emitting actions */\n eventBus: WorkspaceEventBus | null\n /** Move the options into single prop so they are easy to pass around */\n options: SchemaOptions\n /** When \"requestBody\", sync selected index with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n } & SchemaRenderingProps\n >(),\n {\n depth: 0,\n compact: false,\n hideHeading: false,\n },\n)\nconst { translate } = useLocalization()\n\n/**\n * Split an `allOf` into an ordered list of segments (object chunks + choice\n * pickers) so multiple mutually-exclusive selections each render their own\n * picker, in the position they were declared, instead of all but the first\n * being dropped and the rest bubbling to the end.\n */\nconst allOfSegments = computed(() =>\n props.composition === 'allOf'\n ? partitionAllOfCompositions(props.schema).segments\n : [],\n)\n\n/** The current composition */\nconst composition = computed(() =>\n [props.schema[props.composition]]\n .flat()\n .map((schema) => ({ value: resolve.schema(schema), original: schema }))\n .filter((it) => isDefined(it.value)),\n)\n\n/**\n * Generate listbox options for the composition selector.\n * Each option represents a schema in the composition with a human-readable label.\n * Prefers schema title/name (including array item models, e.g. `Model[]`) over\n * structural type when present.\n */\nconst listboxOptions = computed((): ScalarListboxOption[] =>\n composition.value.map((schema, index: number) => {\n const resolved = resolve.schema(schema.original!)\n const label =\n (getModelNameWithArray(resolved)?.label ?? getSchemaType(resolved)) ||\n translate('schema.schema')\n const mapping = (props.schema.discriminator ?? props.discriminator)?.mapping\n const mappedValues = getDiscriminatorValues(resolved.$ref, mapping)\n // Multiple inherited schemas can share a value that a mapping can only store once.\n const inheritedValue = (resolved.discriminator as DiscriminatorMetadata)?.[\n schemaDiscriminator\n ]?.value\n const values = mappedValues.length\n ? mappedValues\n : inheritedValue === undefined\n ? []\n : [inheritedValue]\n return {\n id: String(index),\n label:\n values.length && values.join(', ') !== label\n ? `${values.join(', ')} · ${label}`\n : label,\n }\n }),\n)\n\nconst compositionSelectionKey = computed(() =>\n props.compositionPath?.length\n ? [...props.compositionPath, props.composition].join('.')\n : '',\n)\n\n/** When this composition is in the request body, sync selection with the example snippet */\nconst requestBodyCompositionSelectionRef = inject(\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n undefined,\n)\n\nconst initialSelectedIndex = computed(() => {\n if (\n props.schemaContext !== 'requestBody' ||\n !requestBodyCompositionSelectionRef?.value ||\n !compositionSelectionKey.value\n ) {\n return 0\n }\n\n const selectedIndex =\n requestBodyCompositionSelectionRef.value[compositionSelectionKey.value]\n\n if (typeof selectedIndex !== 'number' || Number.isNaN(selectedIndex)) {\n return 0\n }\n\n return Math.max(0, Math.min(selectedIndex, listboxOptions.value.length - 1))\n})\n\n/**\n * Two-way computed property for the selected option.\n * Handles conversion between the selected index and the listbox option format.\n */\nconst selectedOption = ref<ScalarListboxOption | undefined>()\n\nwatch(\n [listboxOptions, initialSelectedIndex],\n ([options, selectedIndex]) => {\n if (\n !selectedOption.value ||\n !options.some((option) => option.id === selectedOption.value?.id)\n ) {\n selectedOption.value = options[selectedIndex] ?? options[0]\n }\n },\n { immediate: true },\n)\n\nconst compositionLabel = (type: CompositionKeyword): string =>\n (props.schema as DiscriminatorSchema)[schemaDiscriminator]?.inheritedVariants\n ? translate('schema.variants')\n : translate(`schema.${type}`)\n\n/** Inside the currently selected composition */\nconst selectedComposition = computed(\n () => composition.value[Number(selectedOption.value?.id ?? '0')]?.value,\n)\n\n/** AsyncAPI variants carry their own effective value; OpenAPI keeps its existing inference context. */\nconst selectedDiscriminator = computed((): DiscriminatorObject | undefined => {\n const own = selectedComposition.value?.discriminator\n return (own as DiscriminatorMetadata)?.[schemaDiscriminator]\n ? own\n : props.discriminator\n})\n\n/**\n * The request body card renders the merged `allOf` description on its outer card\n * (see `Schema.vue`), but only for the top-level request body schema. For that\n * single composition we hide the nested merged `Schema`'s description so the text\n * is not shown twice. Nested request-body compositions (deeper properties) are\n * not shown on the outer card and would otherwise lose their description\n * entirely, because the property row already skips it when `allOf` is present.\n *\n * The top-level request body composition is the one whose `compositionPath` is\n * still the request body root (`['requestBody']`); nested compositions append\n * property segments and therefore have a longer path.\n */\nconst isRequestBodyRootComposition = computed(\n () =>\n props.schemaContext === 'requestBody' &&\n props.compositionPath?.length === 1,\n)\n\n/**\n * Cycle key for the selected composition member, derived from its raw\n * (unresolved) value so a member that references an ancestor is detected as a\n * cycle.\n */\nconst selectedCompositionCycleKey = computed(() =>\n getCycleKey(\n composition.value[Number(selectedOption.value?.id ?? '0')]?.original,\n ),\n)\n\n/**\n * Controls whether the nested schema is displayed. When expanding all schema\n * properties we open it by default; the nested Schema handles cycle detection,\n * so finite compositions render fully while recursive ones still stop.\n */\nconst showNestedSchema = ref(!!props.options.expandAllSchemaProperties)\n\nif (\n requestBodyCompositionSelectionRef &&\n props.schemaContext === 'requestBody' &&\n compositionSelectionKey.value\n) {\n watch(\n selectedOption,\n (option) => {\n const index = option ? Number(option.id) : 0\n if (!Number.isNaN(index)) {\n requestBodyCompositionSelectionRef.value = {\n ...requestBodyCompositionSelectionRef.value,\n [compositionSelectionKey.value]: index,\n } satisfies RequestBodyCompositionSelection\n }\n },\n { immediate: true },\n )\n}\n</script>\n\n<template>\n <!-- 6px after a container's children keeps the 12px row rhythm -->\n <div class=\"property-rule [.children+&]:mt-1.5!\">\n <!--\n allOf: render the members in source order — object chunks as fields, each\n oneOf/anyOf group as its own picker in place. Keeps every mutually-exclusive\n selection (mergeAllOfSchemas alone drops all but the first) and preserves the\n position of each choice group among the surrounding fields, flowing inline\n with them as one continuous list (no extra spacing or card).\n -->\n <template v-if=\"props.composition === 'allOf'\">\n <template\n v-for=\"(segment, segmentIndex) in allOfSegments\"\n :key=\"segmentIndex\">\n <Schema\n v-if=\"segment.kind === 'object'\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"compositionPath\"\n :depth=\"depth\"\n :discriminator=\"schema.discriminator ?? discriminator\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideDescription=\"isRequestBodyRootComposition\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"true\"\n :options=\"options\"\n :schema=\"segment.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n <SchemaComposition\n v-else\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"segment.composition\"\n :compositionPath=\"[\n ...(compositionPath ?? []),\n String(segment.choiceIndex),\n ]\"\n :depth=\"depth\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :options=\"options\"\n :schema=\"segment.value\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n </template>\n\n <!-- The picker sits on the rail behind a circled icon, like the toggle\n pucks; the chosen variant hangs below in the same panel -->\n <SchemaRailPanel\n v-else\n class=\"composition-panel composition-panel--tree mt-1 mb-0.5\"\n :depth=\"depth + 1\">\n <!-- No `resize`: it would pin the popup to this compact trigger's width.\n The listbox slot must hold exactly ONE node: Headless UI renders its\n button as a fragment and passes props through to the slot root, so\n even an HTML comment in here breaks the picker. The puck is the\n picker's whole affordance: an up/down caret on the rail, like the\n plus on a row, so no trailing caret. -->\n <ScalarListbox\n v-model=\"selectedOption\"\n class=\"w-fit max-w-full min-w-40\"\n :options=\"listboxOptions\">\n <button\n class=\"composition-selector composition-selector--tree group/tree-control font-code relative flex w-fit max-w-full cursor-pointer items-start gap-1.5 py-1 text-sm\"\n type=\"button\">\n <SchemaGlyphPuck\n anchor=\"line\"\n class=\"composition-selector-icon mt-1\">\n <!-- No size of its own: the puck sizes the icons it holds, so this\n one shrinks with the others in a narrow container -->\n <ScalarIconCaretUpDown />\n </SchemaGlyphPuck>\n <!-- Keyword and choice read as one bold name, split by the same `·`\n the tree uses between details -->\n <span\n class=\"text-c-1 shrink-0 [font-weight:var(--scalar-bold)] whitespace-nowrap\"\n >{{ compositionLabel(props.composition) }}</span\n >\n <span\n aria-hidden=\"true\"\n class=\"text-c-3 shrink-0\"\n >·</span\n >\n <span\n class=\"composition-selector-label text-c-1 min-w-0 truncate [font-weight:var(--scalar-bold)]\"\n :class=\"{\n 'line-through': selectedComposition?.deprecated,\n }\"\n :title=\"selectedOption?.label || translate('schema.schema')\">\n {{ selectedOption?.label || translate('schema.schema') }}\n </span>\n <div\n v-if=\"selectedComposition?.deprecated\"\n class=\"text-red\">\n {{ translate('schema.deprecated') }}\n </div>\n </button>\n </ScalarListbox>\n\n <!-- The reveal is one more row of the tree: a plus puck on the rail -->\n <button\n v-if=\"!showNestedSchema && level > 2\"\n class=\"composition-details-toggle group/tree-control font-code text-c-1 relative flex w-fit cursor-pointer items-center py-1.5 text-sm font-normal\"\n type=\"button\"\n @click=\"showNestedSchema = true\">\n <SchemaGlyphPuck />\n {{ translate('schema.showSchemaDetails') }}\n </button>\n\n <!-- Render the selected schema if it has content to display -->\n <Schema\n v-else\n :key=\"selectedOption?.id ?? '0'\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"compositionPath\"\n :cycleKey=\"selectedCompositionCycleKey\"\n :depth=\"depth + 1\"\n :discriminator=\"selectedDiscriminator\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"true\"\n :options=\"options\"\n :schema=\"selectedComposition\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </SchemaRailPanel>\n </div>\n</template>\n\n<style scoped>\n/*\n * A `oneOf`/`anyOf` whose chosen variant `allOf`s back to a shared base — most\n * commonly a discriminator-inferred `oneOf` sitting directly on the request body\n * — renders the merged variant one level deeper than a plain object variant:\n * `Schema.vue` cannot flatten the `allOf`, so it hands the merged object to\n * `SchemaProperty`, which wraps it in a headless passthrough row\n * (`.property--tree-container`). That wrapper carries a row's own\n * `--schema-row-pad`, opening a gap between the selector and the first field\n * that a plain `oneOf` does not have, so the variant reads as detached from its\n * picker. Drop that leading row pad for the panel's own variant card so the\n * field sits flush under the selector, matching a plain `oneOf`. Only the top\n * pad goes: the wrapper's trailing pad is what closes the card under the last\n * field, exactly as a plain variant's last row does.\n *\n * The rule lives here rather than in `SchemaProperty` because a body-level\n * discriminator `oneOf` is rendered straight from `Schema.vue` and never passes\n * through `SchemaProperty`, so a rule scoped there would never reach it.\n * See https://github.com/scalar/scalar/issues/9861\n */\n.property-rule\n :deep(\n .composition-panel\n > .schema-card\n > .schema-properties\n > ul\n > li.property.property--tree-container\n ) {\n padding-top: 0 !important;\n}\n</style>\n"],"mappings":""}
@@ -10,8 +10,8 @@ import c from "./SchemaGlyphPuck.vue.js";
10
10
  import l from "./SchemaRailPanel.vue.js";
11
11
  import u from "./Schema.vue.js";
12
12
  import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, inject as b, normalizeClass as x, openBlock as S, ref as C, renderList as w, resolveComponent as T, toDisplayString as E, unref as D, watch as O, withCtx as k } from "vue";
13
- import { ScalarIconCaretUpDown as A } from "@scalar/icons";
14
- import { ScalarListbox as j } from "@scalar/components/listbox";
13
+ import { ScalarListbox as A } from "@scalar/components/listbox";
14
+ import { ScalarIconCaretUpDown as j } from "@scalar/icons";
15
15
  import { isDefined as M } from "@scalar/helpers/array/is-defined";
16
16
  import { resolve as N } from "@scalar/workspace-store/resolve";
17
17
  //#region src/schema/SchemaComposition.vue?vue&type=script&setup=true&lang.ts
@@ -154,7 +154,7 @@ var P = { class: "property-rule [.children+&]:mt-1.5!" }, F = {
154
154
  class: "composition-panel composition-panel--tree mt-1 mb-0.5",
155
155
  depth: y.depth + 1
156
156
  }, {
157
- default: k(() => [v(D(j), {
157
+ default: k(() => [v(D(A), {
158
158
  modelValue: q.value,
159
159
  "onUpdate:modelValue": t[0] ||= (e) => q.value = e,
160
160
  class: "w-fit max-w-full min-w-40",
@@ -165,7 +165,7 @@ var P = { class: "property-rule [.children+&]:mt-1.5!" }, F = {
165
165
  anchor: "line",
166
166
  class: "composition-selector-icon mt-1"
167
167
  }, {
168
- default: k(() => [v(D(A))]),
168
+ default: k(() => [v(D(j))]),
169
169
  _: 1
170
170
  }),
171
171
  g("span", I, E(J(z.composition)), 1),
@@ -232,4 +232,4 @@ var P = { class: "property-rule [.children+&]:mt-1.5!" }, F = {
232
232
  //#endregion
233
233
  export { z as default };
234
234
 
235
- //# sourceMappingURL=SchemaComposition.vue.script.js.map
235
+ //# sourceMappingURL=SchemaComposition.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaComposition.vue_vue_type_script_setup_true_lang.js","names":["_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","Schema","SchemaRailPanel","_withCtx","_createVNode","_unref","_createElementVNode","SchemaGlyphPuck","_toDisplayString","_normalizeClass","_createCommentVNode","_createTextVNode","SchemaGlyphPuck_default","SchemaRailPanel_default","Schema_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","SchemaComposition_vue_vue_type_script_setup_true_lang_default","props","__props","useLocalization","allOfSegments","computed","partitionAllOfCompositions","composition","resolve","schema","isDefined","it","listboxOptions","resolved","label","getModelNameWithArray","getSchemaType","translate","mapping","mappedValues","getDiscriminatorValues","inheritedValue","schemaDiscriminator","values","index","compositionSelectionKey","requestBodyCompositionSelectionRef","inject","REQUEST_BODY_COMPOSITION_INDEX_SYMBOL","initialSelectedIndex","selectedIndex","selectedOption","ref","options","option","compositionLabel","type","selectedComposition","selectedDiscriminator","own","isRequestBodyRootComposition","selectedCompositionCycleKey","getCycleKey","showNestedSchema","watch","_component_SchemaComposition","resolveComponent","openBlock","createElementBlock","Fragment","renderList","segmentIndex","segment","createBlock","withCtx","createVNode","unref","ScalarListbox","_cache","$event","createElementVNode","ScalarIconCaretUpDown","toDisplayString","normalizeClass","createCommentVNode","createTextVNode"],"sources":["../../src/schema/SchemaComposition.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport { ScalarIconCaretUpDown } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, inject, ref, watch } from 'vue'\n\nimport {\n schemaDiscriminator,\n type DiscriminatorMetadata,\n type DiscriminatorSchema,\n} from './discriminator-metadata'\nimport { getDiscriminatorValues } from './helpers/get-discriminator-values'\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { partitionAllOfCompositions } from './helpers/partition-all-of-compositions'\nimport { type CompositionKeyword } from './helpers/schema-composition'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { getModelNameWithArray } from './helpers/schema-name'\nimport { useLocalization } from './localization'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from './request-body-composition-index'\nimport Schema from './Schema.vue'\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\nimport SchemaRailPanel from './SchemaRailPanel.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst props = withDefaults(\n defineProps<\n {\n /** The composition keyword (oneOf, anyOf, allOf) */\n composition: CompositionKeyword\n /** Optional discriminator object for polymorphic schemas */\n discriminator?: DiscriminatorObject\n /** Optional name for the schema */\n name?: string\n /** The schema value containing the composition */\n schema: SchemaObject\n /** Nesting level for proper indentation */\n level: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n /** Whether to use compact layout */\n compact?: boolean\n /** Whether to hide the heading */\n hideHeading?: boolean\n /** Hide model names in type display */\n hideModelNames?: boolean\n /** Breadcrumb for navigation */\n breadcrumb?: string[]\n /** Event bus emitting actions */\n eventBus: WorkspaceEventBus | null\n /** Move the options into single prop so they are easy to pass around */\n options: SchemaOptions\n /** When \"requestBody\", sync selected index with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n } & SchemaRenderingProps\n >(),\n {\n depth: 0,\n compact: false,\n hideHeading: false,\n },\n)\nconst { translate } = useLocalization()\n\n/**\n * Split an `allOf` into an ordered list of segments (object chunks + choice\n * pickers) so multiple mutually-exclusive selections each render their own\n * picker, in the position they were declared, instead of all but the first\n * being dropped and the rest bubbling to the end.\n */\nconst allOfSegments = computed(() =>\n props.composition === 'allOf'\n ? partitionAllOfCompositions(props.schema).segments\n : [],\n)\n\n/** The current composition */\nconst composition = computed(() =>\n [props.schema[props.composition]]\n .flat()\n .map((schema) => ({ value: resolve.schema(schema), original: schema }))\n .filter((it) => isDefined(it.value)),\n)\n\n/**\n * Generate listbox options for the composition selector.\n * Each option represents a schema in the composition with a human-readable label.\n * Prefers schema title/name (including array item models, e.g. `Model[]`) over\n * structural type when present.\n */\nconst listboxOptions = computed((): ScalarListboxOption[] =>\n composition.value.map((schema, index: number) => {\n const resolved = resolve.schema(schema.original!)\n const label =\n (getModelNameWithArray(resolved)?.label ?? getSchemaType(resolved)) ||\n translate('schema.schema')\n const mapping = (props.schema.discriminator ?? props.discriminator)?.mapping\n const mappedValues = getDiscriminatorValues(resolved.$ref, mapping)\n // Multiple inherited schemas can share a value that a mapping can only store once.\n const inheritedValue = (resolved.discriminator as DiscriminatorMetadata)?.[\n schemaDiscriminator\n ]?.value\n const values = mappedValues.length\n ? mappedValues\n : inheritedValue === undefined\n ? []\n : [inheritedValue]\n return {\n id: String(index),\n label:\n values.length && values.join(', ') !== label\n ? `${values.join(', ')} · ${label}`\n : label,\n }\n }),\n)\n\nconst compositionSelectionKey = computed(() =>\n props.compositionPath?.length\n ? [...props.compositionPath, props.composition].join('.')\n : '',\n)\n\n/** When this composition is in the request body, sync selection with the example snippet */\nconst requestBodyCompositionSelectionRef = inject(\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n undefined,\n)\n\nconst initialSelectedIndex = computed(() => {\n if (\n props.schemaContext !== 'requestBody' ||\n !requestBodyCompositionSelectionRef?.value ||\n !compositionSelectionKey.value\n ) {\n return 0\n }\n\n const selectedIndex =\n requestBodyCompositionSelectionRef.value[compositionSelectionKey.value]\n\n if (typeof selectedIndex !== 'number' || Number.isNaN(selectedIndex)) {\n return 0\n }\n\n return Math.max(0, Math.min(selectedIndex, listboxOptions.value.length - 1))\n})\n\n/**\n * Two-way computed property for the selected option.\n * Handles conversion between the selected index and the listbox option format.\n */\nconst selectedOption = ref<ScalarListboxOption | undefined>()\n\nwatch(\n [listboxOptions, initialSelectedIndex],\n ([options, selectedIndex]) => {\n if (\n !selectedOption.value ||\n !options.some((option) => option.id === selectedOption.value?.id)\n ) {\n selectedOption.value = options[selectedIndex] ?? options[0]\n }\n },\n { immediate: true },\n)\n\nconst compositionLabel = (type: CompositionKeyword): string =>\n (props.schema as DiscriminatorSchema)[schemaDiscriminator]?.inheritedVariants\n ? translate('schema.variants')\n : translate(`schema.${type}`)\n\n/** Inside the currently selected composition */\nconst selectedComposition = computed(\n () => composition.value[Number(selectedOption.value?.id ?? '0')]?.value,\n)\n\n/** AsyncAPI variants carry their own effective value; OpenAPI keeps its existing inference context. */\nconst selectedDiscriminator = computed((): DiscriminatorObject | undefined => {\n const own = selectedComposition.value?.discriminator\n return (own as DiscriminatorMetadata)?.[schemaDiscriminator]\n ? own\n : props.discriminator\n})\n\n/**\n * The request body card renders the merged `allOf` description on its outer card\n * (see `Schema.vue`), but only for the top-level request body schema. For that\n * single composition we hide the nested merged `Schema`'s description so the text\n * is not shown twice. Nested request-body compositions (deeper properties) are\n * not shown on the outer card and would otherwise lose their description\n * entirely, because the property row already skips it when `allOf` is present.\n *\n * The top-level request body composition is the one whose `compositionPath` is\n * still the request body root (`['requestBody']`); nested compositions append\n * property segments and therefore have a longer path.\n */\nconst isRequestBodyRootComposition = computed(\n () =>\n props.schemaContext === 'requestBody' &&\n props.compositionPath?.length === 1,\n)\n\n/**\n * Cycle key for the selected composition member, derived from its raw\n * (unresolved) value so a member that references an ancestor is detected as a\n * cycle.\n */\nconst selectedCompositionCycleKey = computed(() =>\n getCycleKey(\n composition.value[Number(selectedOption.value?.id ?? '0')]?.original,\n ),\n)\n\n/**\n * Controls whether the nested schema is displayed. When expanding all schema\n * properties we open it by default; the nested Schema handles cycle detection,\n * so finite compositions render fully while recursive ones still stop.\n */\nconst showNestedSchema = ref(!!props.options.expandAllSchemaProperties)\n\nif (\n requestBodyCompositionSelectionRef &&\n props.schemaContext === 'requestBody' &&\n compositionSelectionKey.value\n) {\n watch(\n selectedOption,\n (option) => {\n const index = option ? Number(option.id) : 0\n if (!Number.isNaN(index)) {\n requestBodyCompositionSelectionRef.value = {\n ...requestBodyCompositionSelectionRef.value,\n [compositionSelectionKey.value]: index,\n } satisfies RequestBodyCompositionSelection\n }\n },\n { immediate: true },\n )\n}\n</script>\n\n<template>\n <!-- 6px after a container's children keeps the 12px row rhythm -->\n <div class=\"property-rule [.children+&]:mt-1.5!\">\n <!--\n allOf: render the members in source order — object chunks as fields, each\n oneOf/anyOf group as its own picker in place. Keeps every mutually-exclusive\n selection (mergeAllOfSchemas alone drops all but the first) and preserves the\n position of each choice group among the surrounding fields, flowing inline\n with them as one continuous list (no extra spacing or card).\n -->\n <template v-if=\"props.composition === 'allOf'\">\n <template\n v-for=\"(segment, segmentIndex) in allOfSegments\"\n :key=\"segmentIndex\">\n <Schema\n v-if=\"segment.kind === 'object'\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"compositionPath\"\n :depth=\"depth\"\n :discriminator=\"schema.discriminator ?? discriminator\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideDescription=\"isRequestBodyRootComposition\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"true\"\n :options=\"options\"\n :schema=\"segment.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n <SchemaComposition\n v-else\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"segment.composition\"\n :compositionPath=\"[\n ...(compositionPath ?? []),\n String(segment.choiceIndex),\n ]\"\n :depth=\"depth\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :options=\"options\"\n :schema=\"segment.value\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n </template>\n\n <!-- The picker sits on the rail behind a circled icon, like the toggle\n pucks; the chosen variant hangs below in the same panel -->\n <SchemaRailPanel\n v-else\n class=\"composition-panel composition-panel--tree mt-1 mb-0.5\"\n :depth=\"depth + 1\">\n <!-- No `resize`: it would pin the popup to this compact trigger's width.\n The listbox slot must hold exactly ONE node: Headless UI renders its\n button as a fragment and passes props through to the slot root, so\n even an HTML comment in here breaks the picker. The puck is the\n picker's whole affordance: an up/down caret on the rail, like the\n plus on a row, so no trailing caret. -->\n <ScalarListbox\n v-model=\"selectedOption\"\n class=\"w-fit max-w-full min-w-40\"\n :options=\"listboxOptions\">\n <button\n class=\"composition-selector composition-selector--tree group/tree-control font-code relative flex w-fit max-w-full cursor-pointer items-start gap-1.5 py-1 text-sm\"\n type=\"button\">\n <SchemaGlyphPuck\n anchor=\"line\"\n class=\"composition-selector-icon mt-1\">\n <!-- No size of its own: the puck sizes the icons it holds, so this\n one shrinks with the others in a narrow container -->\n <ScalarIconCaretUpDown />\n </SchemaGlyphPuck>\n <!-- Keyword and choice read as one bold name, split by the same `·`\n the tree uses between details -->\n <span\n class=\"text-c-1 shrink-0 [font-weight:var(--scalar-bold)] whitespace-nowrap\"\n >{{ compositionLabel(props.composition) }}</span\n >\n <span\n aria-hidden=\"true\"\n class=\"text-c-3 shrink-0\"\n >·</span\n >\n <span\n class=\"composition-selector-label text-c-1 min-w-0 truncate [font-weight:var(--scalar-bold)]\"\n :class=\"{\n 'line-through': selectedComposition?.deprecated,\n }\"\n :title=\"selectedOption?.label || translate('schema.schema')\">\n {{ selectedOption?.label || translate('schema.schema') }}\n </span>\n <div\n v-if=\"selectedComposition?.deprecated\"\n class=\"text-red\">\n {{ translate('schema.deprecated') }}\n </div>\n </button>\n </ScalarListbox>\n\n <!-- The reveal is one more row of the tree: a plus puck on the rail -->\n <button\n v-if=\"!showNestedSchema && level > 2\"\n class=\"composition-details-toggle group/tree-control font-code text-c-1 relative flex w-fit cursor-pointer items-center py-1.5 text-sm font-normal\"\n type=\"button\"\n @click=\"showNestedSchema = true\">\n <SchemaGlyphPuck />\n {{ translate('schema.showSchemaDetails') }}\n </button>\n\n <!-- Render the selected schema if it has content to display -->\n <Schema\n v-else\n :key=\"selectedOption?.id ?? '0'\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"compositionPath\"\n :cycleKey=\"selectedCompositionCycleKey\"\n :depth=\"depth + 1\"\n :discriminator=\"selectedDiscriminator\"\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"true\"\n :options=\"options\"\n :schema=\"selectedComposition\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </SchemaRailPanel>\n </div>\n</template>\n\n<style scoped>\n/*\n * A `oneOf`/`anyOf` whose chosen variant `allOf`s back to a shared base — most\n * commonly a discriminator-inferred `oneOf` sitting directly on the request body\n * — renders the merged variant one level deeper than a plain object variant:\n * `Schema.vue` cannot flatten the `allOf`, so it hands the merged object to\n * `SchemaProperty`, which wraps it in a headless passthrough row\n * (`.property--tree-container`). That wrapper carries a row's own\n * `--schema-row-pad`, opening a gap between the selector and the first field\n * that a plain `oneOf` does not have, so the variant reads as detached from its\n * picker. Drop that leading row pad for the panel's own variant card so the\n * field sits flush under the selector, matching a plain `oneOf`. Only the top\n * pad goes: the wrapper's trailing pad is what closes the card under the last\n * field, exactly as a plain variant's last row does.\n *\n * The rule lives here rather than in `SchemaProperty` because a body-level\n * discriminator `oneOf` is rendered straight from `Schema.vue` and never passes\n * through `SchemaProperty`, so a rule scoped there would never reach it.\n * See https://github.com/scalar/scalar/issues/9861\n */\n.property-rule\n :deep(\n .composition-panel\n > .schema-card\n > .schema-properties\n > ul\n > li.property.property--tree-container\n ) {\n padding-top: 0 !important;\n}\n</style>\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import e from "./SchemaEnumPropertyItem.vue.script.js";
1
+ import e from "./SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/schema/SchemaEnumPropertyItem.vue
3
3
  var t = e;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaEnumPropertyItem.vue.js","names":[],"sources":["../../src/schema/SchemaEnumPropertyItem.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\ndefineProps<{\n label: string\n description?: string\n}>()\n</script>\n\n<template>\n <li class=\"property-enum-row flex flex-col gap-0.5 border-t px-3 py-2\">\n <span class=\"property-enum-row-label font-code text-c-1 text-sm\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"label\" />\n </span>\n <span\n v-if=\"description\"\n class=\"property-enum-row-description text-c-2 text-(length:--scalar-small) [&_.markdown]:-mb-0.5\">\n <ScalarMarkdown :value=\"description\" />\n </span>\n </li>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaEnumPropertyItem.vue.js","names":["_sfc_main","SchemaEnumPropertyItem_vue_vue_type_script_setup_true_lang_default","SchemaEnumPropertyItem_default"],"sources":["../../src/schema/SchemaEnumPropertyItem.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\ndefineProps<{\n label: string\n description?: string\n}>()\n</script>\n\n<template>\n <li class=\"property-enum-row flex flex-col gap-0.5 border-t px-3 py-2\">\n <span class=\"property-enum-row-label font-code text-c-1 text-sm\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"label\" />\n </span>\n <span\n v-if=\"description\"\n class=\"property-enum-row-description text-c-2 text-(length:--scalar-small) [&_.markdown]:-mb-0.5\">\n <ScalarMarkdown :value=\"description\" />\n </span>\n </li>\n</template>\n"],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, createVNode as r, defineComponent as i, openBlock as a, unref as o } from "vue";
2
- import { ScalarMarkdown as s } from "@scalar/components/markdown";
3
- import { ScalarWrappingText as c } from "@scalar/components/wrapping-text";
2
+ import { ScalarWrappingText as s } from "@scalar/components/wrapping-text";
3
+ import { ScalarMarkdown as c } from "@scalar/components/markdown";
4
4
  //#region src/schema/SchemaEnumPropertyItem.vue?vue&type=script&setup=true&lang.ts
5
5
  var l = { class: "property-enum-row flex flex-col gap-0.5 border-t px-3 py-2" }, u = { class: "property-enum-row-label font-code text-c-1 text-sm" }, d = {
6
6
  key: 0,
@@ -12,13 +12,13 @@ var l = { class: "property-enum-row flex flex-col gap-0.5 border-t px-3 py-2" },
12
12
  description: {}
13
13
  },
14
14
  setup(i) {
15
- return (f, p) => (a(), t("li", l, [n("span", u, [r(o(c), {
15
+ return (f, p) => (a(), t("li", l, [n("span", u, [r(o(s), {
16
16
  preset: "property",
17
17
  text: i.label
18
- }, null, 8, ["text"])]), i.description ? (a(), t("span", d, [r(o(s), { value: i.description }, null, 8, ["value"])])) : e("", !0)]));
18
+ }, null, 8, ["text"])]), i.description ? (a(), t("span", d, [r(o(c), { value: i.description }, null, 8, ["value"])])) : e("", !0)]));
19
19
  }
20
20
  });
21
21
  //#endregion
22
22
  export { f as default };
23
23
 
24
- //# sourceMappingURL=SchemaEnumPropertyItem.vue.script.js.map
24
+ //# sourceMappingURL=SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_createCommentVNode","_hoisted_1","_hoisted_2","_hoisted_3","SchemaEnumPropertyItem_vue_vue_type_script_setup_true_lang_default","openBlock","createElementBlock","createElementVNode","createVNode","unref","ScalarWrappingText","__props","ScalarMarkdown","createCommentVNode"],"sources":["../../src/schema/SchemaEnumPropertyItem.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\ndefineProps<{\n label: string\n description?: string\n}>()\n</script>\n\n<template>\n <li class=\"property-enum-row flex flex-col gap-0.5 border-t px-3 py-2\">\n <span class=\"property-enum-row-label font-code text-c-1 text-sm\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"label\" />\n </span>\n <span\n v-if=\"description\"\n class=\"property-enum-row-description text-c-2 text-(length:--scalar-small) [&_.markdown]:-mb-0.5\">\n <ScalarMarkdown :value=\"description\" />\n </span>\n </li>\n</template>\n"],"mappings":";;;;;;;;;;;;;;E,kBAWEA,EAAA,GAAAC,EAWK,MAXLK,GAWK,CAVHJ,EAIO,QAJPK,GAIO,CAHLJ,EAEkBC,EAAAW,CAAA,GAAA;GADhB,QAAO;GACN,MAAMC,EAAA;E,yBAGHA,EAAA,eADRhB,EAAA,GAAAC,EAIO,QAJPO,GAIO,CADLL,EAAuCC,EAAAa,CAAA,GAAA,EAAtB,OAAOD,EAAA,YAAW,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA,C"}
@@ -1,6 +1,6 @@
1
1
  import e from "../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./SchemaEnums.vue.script.js";
3
- /* empty css */
2
+ import t from "./SchemaEnums.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/schema/SchemaEnums.vue
5
5
  var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-1b21ab2e"]]);
6
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaEnums.vue.js","names":[],"sources":["../../src/schema/SchemaEnums.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { useLocalization } from './localization'\nimport SchemaEnumPropertyItem from './SchemaEnumPropertyItem.vue'\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\n\nconst { value, propertyNames = false } = defineProps<{\n /** The schema object containing enum values and metadata */\n value: SchemaObject | undefined\n /** Whether to display the enum for property names */\n propertyNames?: boolean\n}>()\nconst { translate } = useLocalization()\n\n/**\n * Past this many values the list collapses behind a reveal. 12/8 rather than a\n * tighter pair: with 9/5 a 10-value enum hides half its values.\n */\nconst ENUM_DISPLAY_THRESHOLD = 12\nconst INITIAL_VISIBLE_COUNT = 8\n/** Values at or under this length can render as wrapped chips */\nconst CHIP_MAX_LENGTH = 24\nconst THIN_SPACE = '\\u2009'\n\n/**\n * Resolves the schema that carries the enum values.\n * For arrays, the enum and its x-enum-* metadata live on the items schema, so\n * both the values and their varnames/descriptions have to be read from there.\n */\nconst enumSchema = computed(() => {\n if (!value) {\n return undefined\n }\n if (value.enum) {\n return value\n }\n return isArraySchema(value) ? resolve.schema(value.items) : undefined\n})\n\n/**\n * Extracts enum values from the schema object.\n * Handles both direct enum values and nested enum arrays.\n */\nconst enumValues = computed(() => enumSchema.value?.enum ?? [])\n\n/**\n * Determines if we should show the long enum list UI.\n * When there are many enum values, we initially show only a subset.\n */\nconst shouldUseLongListDisplay = computed(\n () => enumValues.value.length > ENUM_DISPLAY_THRESHOLD,\n)\n\nconst initialVisibleCount = computed(() =>\n shouldUseLongListDisplay.value\n ? INITIAL_VISIBLE_COUNT\n : enumValues.value.length,\n)\n\n/**\n * Short flat enums render as wrapped chips: three lines instead of a 40-row\n * wall. Values with descriptions keep the rows instead.\n *\n * `!shouldUseLongListDisplay` is what bounds the COUNT. Chips have no reveal of\n * their own — the \"show all values\" control is a row of the list below — so a\n * long enum of short values (currency or country codes, hundreds of them)\n * would otherwise render every value at once with no way to collapse it.\n * Past the threshold the rows take over and bring their toggle with them.\n */\nconst shouldRenderAsChips = computed(\n () =>\n !propertyNames &&\n enumValues.value.length > 0 &&\n !shouldUseLongListDisplay.value &&\n enumValues.value.every(\n // Measure the text the chip actually renders (value plus any varname), not\n // the bare value, so a short value with a long x-enum-varname still wraps.\n (entry, index) =>\n formatEnumValueWithName(entry, index).length <= CHIP_MAX_LENGTH,\n ) &&\n !hasAnyDescription.value,\n)\n\n/** Whether any value carries an x-enum description (chips have nowhere to put one) */\nconst hasAnyDescription = computed(() =>\n enumValues.value.some(\n (entry, index) => getEnumValueDescription(entry, index) !== undefined,\n ),\n)\n\nconst visibleEnumValues = computed(() =>\n enumValues.value.slice(0, initialVisibleCount.value),\n)\n\nconst hiddenEnumValues = computed(() =>\n enumValues.value.slice(initialVisibleCount.value),\n)\n\n/**\n * Gets the description for an enum value.\n * Supports both array and object formats for x-enumDescriptions.\n */\nconst getEnumValueDescription = (\n enumValue: any,\n index: number,\n): string | undefined => {\n const schema = enumSchema.value\n const descriptions =\n schema?.['x-enumDescriptions'] ?? schema?.['x-enum-descriptions']\n\n if (!descriptions) {\n return undefined\n }\n\n if (Array.isArray(descriptions)) {\n return descriptions[index] || undefined\n }\n\n if (typeof descriptions === 'object' && descriptions !== null) {\n return descriptions[String(enumValue)] || undefined\n }\n\n return undefined\n}\n\n/**\n * Formats an enum value with its variable name if available.\n * This supports both x-enum-varnames and x-enumNames extensions.\n */\nconst formatEnumValueWithName = (enumValue: any, index: number): string => {\n const varNames =\n enumSchema.value?.['x-enum-varnames'] ?? enumSchema.value?.['x-enumNames']\n const varName = Array.isArray(varNames) ? varNames[index] : undefined\n return varName\n ? `${enumValue}${THIN_SPACE}=${THIN_SPACE}${varName}`\n : String(enumValue)\n}\n\n/**\n * Controls whether the hidden enum values are visible.\n */\nconst isExpanded = ref(false)\n\nconst toggleExpanded = () => {\n isExpanded.value = !isExpanded.value\n}\n</script>\n\n<template>\n <div\n v-if=\"enumSchema?.enum !== undefined\"\n class=\"property-enum property-enum--tree mt-2 rounded-(--scalar-radius-lg) border\">\n <!-- A bordered card with a muted header row and one hairline row per\n value; the chips and the long-list toggle are rows of it too -->\n <div class=\"property-enum-header text-c-2 px-3 py-2 text-sm capitalize\">\n {{\n propertyNames\n ? translate('schema.propertyNames')\n : translate('schema.values')\n }}\n </div>\n <p\n v-if=\"enumValues.length === 0\"\n class=\"text-c-2 border-t px-3 py-2 text-sm\">\n {{ translate('schema.noAllowedValues') }}\n </p>\n <div\n v-else-if=\"shouldRenderAsChips\"\n class=\"property-enum-chip-list flex flex-wrap gap-1 border-t px-3 py-2\"\n role=\"list\">\n <span\n v-for=\"(enumValue, index) in enumValues\"\n :key=\"index\"\n class=\"property-enum-chip font-code text-c-2 rounded-(--scalar-radius-lg) border px-1.5 py-px text-(length:--scalar-mini)\"\n role=\"listitem\">\n {{ formatEnumValueWithName(enumValue, index) }}\n </span>\n </div>\n <ul\n v-else\n class=\"property-enum-values-card\"\n role=\"list\">\n <SchemaEnumPropertyItem\n v-for=\"(enumValue, index) in visibleEnumValues\"\n :key=\"index\"\n :description=\"getEnumValueDescription(enumValue, index)\"\n :label=\"formatEnumValueWithName(enumValue, index)\" />\n\n <template v-if=\"shouldUseLongListDisplay && isExpanded\">\n <SchemaEnumPropertyItem\n v-for=\"(enumValue, index) in hiddenEnumValues\"\n :key=\"initialVisibleCount + index\"\n :description=\"\n getEnumValueDescription(enumValue, initialVisibleCount + index)\n \"\n :label=\"\n formatEnumValueWithName(enumValue, initialVisibleCount + index)\n \" />\n </template>\n\n <li\n v-if=\"shouldUseLongListDisplay\"\n class=\"border-t\">\n <!-- The reveal is a tree control like the row toggles, so it draws the\n same puck and lights it the same way when the row is hovered -->\n <button\n class=\"enum-toggle-button group/tree-control text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1.5 px-3 py-2 text-sm\"\n type=\"button\"\n @click=\"toggleExpanded\">\n <SchemaGlyphPuck\n :floating=\"false\"\n :open=\"isExpanded\" />\n {{\n isExpanded\n ? translate('schema.hideValues')\n : translate('schema.showAllValues')\n }}\n </button>\n </li>\n </ul>\n </div>\n</template>\n\n<style scoped>\n.property-heading:empty + .property-description:last-of-type,\n.property-description:first-of-type:last-of-type {\n margin-top: 0;\n}\n\n.property-list {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n margin-top: 10px;\n}\n\n.property-list .property:last-of-type {\n padding-bottom: 10px;\n}\n\n.enum-toggle-button:hover {\n color: var(--scalar-color-1);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaEnums.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","SchemaEnums_vue_vue_type_script_setup_true_lang_default","SchemaEnums_default"],"sources":["../../src/schema/SchemaEnums.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { useLocalization } from './localization'\nimport SchemaEnumPropertyItem from './SchemaEnumPropertyItem.vue'\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\n\nconst { value, propertyNames = false } = defineProps<{\n /** The schema object containing enum values and metadata */\n value: SchemaObject | undefined\n /** Whether to display the enum for property names */\n propertyNames?: boolean\n}>()\nconst { translate } = useLocalization()\n\n/**\n * Past this many values the list collapses behind a reveal. 12/8 rather than a\n * tighter pair: with 9/5 a 10-value enum hides half its values.\n */\nconst ENUM_DISPLAY_THRESHOLD = 12\nconst INITIAL_VISIBLE_COUNT = 8\n/** Values at or under this length can render as wrapped chips */\nconst CHIP_MAX_LENGTH = 24\nconst THIN_SPACE = '\\u2009'\n\n/**\n * Resolves the schema that carries the enum values.\n * For arrays, the enum and its x-enum-* metadata live on the items schema, so\n * both the values and their varnames/descriptions have to be read from there.\n */\nconst enumSchema = computed(() => {\n if (!value) {\n return undefined\n }\n if (value.enum) {\n return value\n }\n return isArraySchema(value) ? resolve.schema(value.items) : undefined\n})\n\n/**\n * Extracts enum values from the schema object.\n * Handles both direct enum values and nested enum arrays.\n */\nconst enumValues = computed(() => enumSchema.value?.enum ?? [])\n\n/**\n * Determines if we should show the long enum list UI.\n * When there are many enum values, we initially show only a subset.\n */\nconst shouldUseLongListDisplay = computed(\n () => enumValues.value.length > ENUM_DISPLAY_THRESHOLD,\n)\n\nconst initialVisibleCount = computed(() =>\n shouldUseLongListDisplay.value\n ? INITIAL_VISIBLE_COUNT\n : enumValues.value.length,\n)\n\n/**\n * Short flat enums render as wrapped chips: three lines instead of a 40-row\n * wall. Values with descriptions keep the rows instead.\n *\n * `!shouldUseLongListDisplay` is what bounds the COUNT. Chips have no reveal of\n * their own — the \"show all values\" control is a row of the list below — so a\n * long enum of short values (currency or country codes, hundreds of them)\n * would otherwise render every value at once with no way to collapse it.\n * Past the threshold the rows take over and bring their toggle with them.\n */\nconst shouldRenderAsChips = computed(\n () =>\n !propertyNames &&\n enumValues.value.length > 0 &&\n !shouldUseLongListDisplay.value &&\n enumValues.value.every(\n // Measure the text the chip actually renders (value plus any varname), not\n // the bare value, so a short value with a long x-enum-varname still wraps.\n (entry, index) =>\n formatEnumValueWithName(entry, index).length <= CHIP_MAX_LENGTH,\n ) &&\n !hasAnyDescription.value,\n)\n\n/** Whether any value carries an x-enum description (chips have nowhere to put one) */\nconst hasAnyDescription = computed(() =>\n enumValues.value.some(\n (entry, index) => getEnumValueDescription(entry, index) !== undefined,\n ),\n)\n\nconst visibleEnumValues = computed(() =>\n enumValues.value.slice(0, initialVisibleCount.value),\n)\n\nconst hiddenEnumValues = computed(() =>\n enumValues.value.slice(initialVisibleCount.value),\n)\n\n/**\n * Gets the description for an enum value.\n * Supports both array and object formats for x-enumDescriptions.\n */\nconst getEnumValueDescription = (\n enumValue: any,\n index: number,\n): string | undefined => {\n const schema = enumSchema.value\n const descriptions =\n schema?.['x-enumDescriptions'] ?? schema?.['x-enum-descriptions']\n\n if (!descriptions) {\n return undefined\n }\n\n if (Array.isArray(descriptions)) {\n return descriptions[index] || undefined\n }\n\n if (typeof descriptions === 'object' && descriptions !== null) {\n return descriptions[String(enumValue)] || undefined\n }\n\n return undefined\n}\n\n/**\n * Formats an enum value with its variable name if available.\n * This supports both x-enum-varnames and x-enumNames extensions.\n */\nconst formatEnumValueWithName = (enumValue: any, index: number): string => {\n const varNames =\n enumSchema.value?.['x-enum-varnames'] ?? enumSchema.value?.['x-enumNames']\n const varName = Array.isArray(varNames) ? varNames[index] : undefined\n return varName\n ? `${enumValue}${THIN_SPACE}=${THIN_SPACE}${varName}`\n : String(enumValue)\n}\n\n/**\n * Controls whether the hidden enum values are visible.\n */\nconst isExpanded = ref(false)\n\nconst toggleExpanded = () => {\n isExpanded.value = !isExpanded.value\n}\n</script>\n\n<template>\n <div\n v-if=\"enumSchema?.enum !== undefined\"\n class=\"property-enum property-enum--tree mt-2 rounded-(--scalar-radius-lg) border\">\n <!-- A bordered card with a muted header row and one hairline row per\n value; the chips and the long-list toggle are rows of it too -->\n <div class=\"property-enum-header text-c-2 px-3 py-2 text-sm capitalize\">\n {{\n propertyNames\n ? translate('schema.propertyNames')\n : translate('schema.values')\n }}\n </div>\n <p\n v-if=\"enumValues.length === 0\"\n class=\"text-c-2 border-t px-3 py-2 text-sm\">\n {{ translate('schema.noAllowedValues') }}\n </p>\n <div\n v-else-if=\"shouldRenderAsChips\"\n class=\"property-enum-chip-list flex flex-wrap gap-1 border-t px-3 py-2\"\n role=\"list\">\n <span\n v-for=\"(enumValue, index) in enumValues\"\n :key=\"index\"\n class=\"property-enum-chip font-code text-c-2 rounded-(--scalar-radius-lg) border px-1.5 py-px text-(length:--scalar-mini)\"\n role=\"listitem\">\n {{ formatEnumValueWithName(enumValue, index) }}\n </span>\n </div>\n <ul\n v-else\n class=\"property-enum-values-card\"\n role=\"list\">\n <SchemaEnumPropertyItem\n v-for=\"(enumValue, index) in visibleEnumValues\"\n :key=\"index\"\n :description=\"getEnumValueDescription(enumValue, index)\"\n :label=\"formatEnumValueWithName(enumValue, index)\" />\n\n <template v-if=\"shouldUseLongListDisplay && isExpanded\">\n <SchemaEnumPropertyItem\n v-for=\"(enumValue, index) in hiddenEnumValues\"\n :key=\"initialVisibleCount + index\"\n :description=\"\n getEnumValueDescription(enumValue, initialVisibleCount + index)\n \"\n :label=\"\n formatEnumValueWithName(enumValue, initialVisibleCount + index)\n \" />\n </template>\n\n <li\n v-if=\"shouldUseLongListDisplay\"\n class=\"border-t\">\n <!-- The reveal is a tree control like the row toggles, so it draws the\n same puck and lights it the same way when the row is hovered -->\n <button\n class=\"enum-toggle-button group/tree-control text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1.5 px-3 py-2 text-sm\"\n type=\"button\"\n @click=\"toggleExpanded\">\n <SchemaGlyphPuck\n :floating=\"false\"\n :open=\"isExpanded\" />\n {{\n isExpanded\n ? translate('schema.hideValues')\n : translate('schema.showAllValues')\n }}\n </button>\n </li>\n </ul>\n </div>\n</template>\n\n<style scoped>\n.property-heading:empty + .property-description:last-of-type,\n.property-description:first-of-type:last-of-type {\n margin-top: 0;\n}\n\n.property-list {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n margin-top: 10px;\n}\n\n.property-list .property:last-of-type {\n padding-bottom: 10px;\n}\n\n.enum-toggle-button:hover {\n color: var(--scalar-color-1);\n}\n</style>\n"],"mappings":""}
@@ -75,4 +75,4 @@ var y = {
75
75
  //#endregion
76
76
  export { k as default };
77
77
 
78
- //# sourceMappingURL=SchemaEnums.vue.script.js.map
78
+ //# sourceMappingURL=SchemaEnums.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaEnums.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_unref","_Fragment","_renderList","_createBlock","SchemaEnumPropertyItem","_createCommentVNode","_createVNode","SchemaGlyphPuck","_createTextVNode","SchemaGlyphPuck_default","SchemaEnumPropertyItem_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","ENUM_DISPLAY_THRESHOLD","INITIAL_VISIBLE_COUNT","CHIP_MAX_LENGTH","THIN_SPACE","SchemaEnums_vue_vue_type_script_setup_true_lang_default","useLocalization","enumSchema","computed","__props","isArraySchema","resolve","enumValues","shouldUseLongListDisplay","initialVisibleCount","shouldRenderAsChips","formatEnumValueWithName","entry","index","hasAnyDescription","getEnumValueDescription","visibleEnumValues","hiddenEnumValues","schema","descriptions","enumValue","varNames","varName","isExpanded","ref","toggleExpanded","createCommentVNode","openBlock","createElementBlock","createElementVNode","toDisplayString","unref","translate","Fragment","renderList","createBlock","createVNode","createTextVNode"],"sources":["../../src/schema/SchemaEnums.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { useLocalization } from './localization'\nimport SchemaEnumPropertyItem from './SchemaEnumPropertyItem.vue'\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\n\nconst { value, propertyNames = false } = defineProps<{\n /** The schema object containing enum values and metadata */\n value: SchemaObject | undefined\n /** Whether to display the enum for property names */\n propertyNames?: boolean\n}>()\nconst { translate } = useLocalization()\n\n/**\n * Past this many values the list collapses behind a reveal. 12/8 rather than a\n * tighter pair: with 9/5 a 10-value enum hides half its values.\n */\nconst ENUM_DISPLAY_THRESHOLD = 12\nconst INITIAL_VISIBLE_COUNT = 8\n/** Values at or under this length can render as wrapped chips */\nconst CHIP_MAX_LENGTH = 24\nconst THIN_SPACE = '\\u2009'\n\n/**\n * Resolves the schema that carries the enum values.\n * For arrays, the enum and its x-enum-* metadata live on the items schema, so\n * both the values and their varnames/descriptions have to be read from there.\n */\nconst enumSchema = computed(() => {\n if (!value) {\n return undefined\n }\n if (value.enum) {\n return value\n }\n return isArraySchema(value) ? resolve.schema(value.items) : undefined\n})\n\n/**\n * Extracts enum values from the schema object.\n * Handles both direct enum values and nested enum arrays.\n */\nconst enumValues = computed(() => enumSchema.value?.enum ?? [])\n\n/**\n * Determines if we should show the long enum list UI.\n * When there are many enum values, we initially show only a subset.\n */\nconst shouldUseLongListDisplay = computed(\n () => enumValues.value.length > ENUM_DISPLAY_THRESHOLD,\n)\n\nconst initialVisibleCount = computed(() =>\n shouldUseLongListDisplay.value\n ? INITIAL_VISIBLE_COUNT\n : enumValues.value.length,\n)\n\n/**\n * Short flat enums render as wrapped chips: three lines instead of a 40-row\n * wall. Values with descriptions keep the rows instead.\n *\n * `!shouldUseLongListDisplay` is what bounds the COUNT. Chips have no reveal of\n * their own — the \"show all values\" control is a row of the list below — so a\n * long enum of short values (currency or country codes, hundreds of them)\n * would otherwise render every value at once with no way to collapse it.\n * Past the threshold the rows take over and bring their toggle with them.\n */\nconst shouldRenderAsChips = computed(\n () =>\n !propertyNames &&\n enumValues.value.length > 0 &&\n !shouldUseLongListDisplay.value &&\n enumValues.value.every(\n // Measure the text the chip actually renders (value plus any varname), not\n // the bare value, so a short value with a long x-enum-varname still wraps.\n (entry, index) =>\n formatEnumValueWithName(entry, index).length <= CHIP_MAX_LENGTH,\n ) &&\n !hasAnyDescription.value,\n)\n\n/** Whether any value carries an x-enum description (chips have nowhere to put one) */\nconst hasAnyDescription = computed(() =>\n enumValues.value.some(\n (entry, index) => getEnumValueDescription(entry, index) !== undefined,\n ),\n)\n\nconst visibleEnumValues = computed(() =>\n enumValues.value.slice(0, initialVisibleCount.value),\n)\n\nconst hiddenEnumValues = computed(() =>\n enumValues.value.slice(initialVisibleCount.value),\n)\n\n/**\n * Gets the description for an enum value.\n * Supports both array and object formats for x-enumDescriptions.\n */\nconst getEnumValueDescription = (\n enumValue: any,\n index: number,\n): string | undefined => {\n const schema = enumSchema.value\n const descriptions =\n schema?.['x-enumDescriptions'] ?? schema?.['x-enum-descriptions']\n\n if (!descriptions) {\n return undefined\n }\n\n if (Array.isArray(descriptions)) {\n return descriptions[index] || undefined\n }\n\n if (typeof descriptions === 'object' && descriptions !== null) {\n return descriptions[String(enumValue)] || undefined\n }\n\n return undefined\n}\n\n/**\n * Formats an enum value with its variable name if available.\n * This supports both x-enum-varnames and x-enumNames extensions.\n */\nconst formatEnumValueWithName = (enumValue: any, index: number): string => {\n const varNames =\n enumSchema.value?.['x-enum-varnames'] ?? enumSchema.value?.['x-enumNames']\n const varName = Array.isArray(varNames) ? varNames[index] : undefined\n return varName\n ? `${enumValue}${THIN_SPACE}=${THIN_SPACE}${varName}`\n : String(enumValue)\n}\n\n/**\n * Controls whether the hidden enum values are visible.\n */\nconst isExpanded = ref(false)\n\nconst toggleExpanded = () => {\n isExpanded.value = !isExpanded.value\n}\n</script>\n\n<template>\n <div\n v-if=\"enumSchema?.enum !== undefined\"\n class=\"property-enum property-enum--tree mt-2 rounded-(--scalar-radius-lg) border\">\n <!-- A bordered card with a muted header row and one hairline row per\n value; the chips and the long-list toggle are rows of it too -->\n <div class=\"property-enum-header text-c-2 px-3 py-2 text-sm capitalize\">\n {{\n propertyNames\n ? translate('schema.propertyNames')\n : translate('schema.values')\n }}\n </div>\n <p\n v-if=\"enumValues.length === 0\"\n class=\"text-c-2 border-t px-3 py-2 text-sm\">\n {{ translate('schema.noAllowedValues') }}\n </p>\n <div\n v-else-if=\"shouldRenderAsChips\"\n class=\"property-enum-chip-list flex flex-wrap gap-1 border-t px-3 py-2\"\n role=\"list\">\n <span\n v-for=\"(enumValue, index) in enumValues\"\n :key=\"index\"\n class=\"property-enum-chip font-code text-c-2 rounded-(--scalar-radius-lg) border px-1.5 py-px text-(length:--scalar-mini)\"\n role=\"listitem\">\n {{ formatEnumValueWithName(enumValue, index) }}\n </span>\n </div>\n <ul\n v-else\n class=\"property-enum-values-card\"\n role=\"list\">\n <SchemaEnumPropertyItem\n v-for=\"(enumValue, index) in visibleEnumValues\"\n :key=\"index\"\n :description=\"getEnumValueDescription(enumValue, index)\"\n :label=\"formatEnumValueWithName(enumValue, index)\" />\n\n <template v-if=\"shouldUseLongListDisplay && isExpanded\">\n <SchemaEnumPropertyItem\n v-for=\"(enumValue, index) in hiddenEnumValues\"\n :key=\"initialVisibleCount + index\"\n :description=\"\n getEnumValueDescription(enumValue, initialVisibleCount + index)\n \"\n :label=\"\n formatEnumValueWithName(enumValue, initialVisibleCount + index)\n \" />\n </template>\n\n <li\n v-if=\"shouldUseLongListDisplay\"\n class=\"border-t\">\n <!-- The reveal is a tree control like the row toggles, so it draws the\n same puck and lights it the same way when the row is hovered -->\n <button\n class=\"enum-toggle-button group/tree-control text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1.5 px-3 py-2 text-sm\"\n type=\"button\"\n @click=\"toggleExpanded\">\n <SchemaGlyphPuck\n :floating=\"false\"\n :open=\"isExpanded\" />\n {{\n isExpanded\n ? translate('schema.hideValues')\n : translate('schema.showAllValues')\n }}\n </button>\n </li>\n </ul>\n </div>\n</template>\n\n<style scoped>\n.property-heading:empty + .property-description:last-of-type,\n.property-description:first-of-type:last-of-type {\n margin-top: 0;\n}\n\n.property-list {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n margin-top: 10px;\n}\n\n.property-list .property:last-of-type {\n padding-bottom: 10px;\n}\n\n.enum-toggle-button:hover {\n color: var(--scalar-color-1);\n}\n</style>\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import e from "./SchemaGlyphPuck.vue.script.js";
1
+ import e from "./SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/schema/SchemaGlyphPuck.vue
3
3
  var t = e;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaGlyphPuck.vue.js","names":[],"sources":["../../src/schema/SchemaGlyphPuck.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconMinus, ScalarIconPlus } from '@scalar/icons'\n\n/**\n * The 18px glyph puck every tree control shows: an opaque knockout around a\n * 16px icon, so a rail reads as passing behind it. Hover is the\n * `tree-control-hover` variant (see tailwind.config.css): a parent carrying\n * the Tailwind group `group/tree-control`, the row heading beside a gutter\n * toggle, or the open panel's rail, so whichever element is the real pointer\n * target lights the puck the same way — a hairline ring on the page colour.\n *\n * Floating pucks hang in the row's margin (see the indentation model in\n * SchemaProperty.vue); the line anchor keeps the glyph beside a heading that wraps.\n */\nconst {\n open,\n floating = true,\n anchor = 'middle',\n} = defineProps<{\n /** Whether the controlled panel is open; picks the minus glyph over plus when the slot is empty */\n open?: boolean\n /** Position the puck absolutely in the row's margin rather than inline */\n floating?: boolean\n /** Where a floating puck centres: the row's middle, or its first text line */\n anchor?: 'middle' | 'line'\n}>()\n</script>\n<template>\n <span\n aria-hidden=\"true\"\n class=\"schema-glyph tree-control-hover:bg-b-1 tree-control-hover:text-c-1 tree-control-hover:border-(--scalar-border-color) print:bg-transparent [&_svg]:size-[var(--schema-glyph-icon,16px)]\"\n :class=\"\n floating\n ? [\n 'absolute start-[calc(0px_-_var(--schema-glyph-half,9px)_-_var(--schema-gutter,16px))] -translate-y-1/2',\n anchor === 'line' ? 'top-[0.5lh]' : 'top-1/2',\n ]\n : undefined\n \">\n <!-- print: paper strips background paint but still prints the rail, so the\n knockout goes transparent. This comment stays inside the span: beside\n the root it would make the template a fragment and break fallthrough. -->\n <slot>\n <ScalarIconMinus\n v-if=\"open\"\n weight=\"light\" />\n <ScalarIconPlus\n v-else\n weight=\"light\" />\n </slot>\n </span>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaGlyphPuck.vue.js","names":["_sfc_main","SchemaGlyphPuck_vue_vue_type_script_setup_true_lang_default","SchemaGlyphPuck_default"],"sources":["../../src/schema/SchemaGlyphPuck.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconMinus, ScalarIconPlus } from '@scalar/icons'\n\n/**\n * The 18px glyph puck every tree control shows: an opaque knockout around a\n * 16px icon, so a rail reads as passing behind it. Hover is the\n * `tree-control-hover` variant (see tailwind.config.css): a parent carrying\n * the Tailwind group `group/tree-control`, the row heading beside a gutter\n * toggle, or the open panel's rail, so whichever element is the real pointer\n * target lights the puck the same way — a hairline ring on the page colour.\n *\n * Floating pucks hang in the row's margin (see the indentation model in\n * SchemaProperty.vue); the line anchor keeps the glyph beside a heading that wraps.\n */\nconst {\n open,\n floating = true,\n anchor = 'middle',\n} = defineProps<{\n /** Whether the controlled panel is open; picks the minus glyph over plus when the slot is empty */\n open?: boolean\n /** Position the puck absolutely in the row's margin rather than inline */\n floating?: boolean\n /** Where a floating puck centres: the row's middle, or its first text line */\n anchor?: 'middle' | 'line'\n}>()\n</script>\n<template>\n <span\n aria-hidden=\"true\"\n class=\"schema-glyph tree-control-hover:bg-b-1 tree-control-hover:text-c-1 tree-control-hover:border-(--scalar-border-color) print:bg-transparent [&_svg]:size-[var(--schema-glyph-icon,16px)]\"\n :class=\"\n floating\n ? [\n 'absolute start-[calc(0px_-_var(--schema-glyph-half,9px)_-_var(--schema-gutter,16px))] -translate-y-1/2',\n anchor === 'line' ? 'top-[0.5lh]' : 'top-1/2',\n ]\n : undefined\n \">\n <!-- print: paper strips background paint but still prints the rail, so the\n knockout goes transparent. This comment stays inside the span: beside\n the root it would make the template a fragment and break fallthrough. -->\n <slot>\n <ScalarIconMinus\n v-if=\"open\"\n weight=\"light\" />\n <ScalarIconPlus\n v-else\n weight=\"light\" />\n </slot>\n </span>\n</template>\n"],"mappings":""}
@@ -27,4 +27,4 @@ var l = /*@__PURE__*/ n({
27
27
  //#endregion
28
28
  export { l as default };
29
29
 
30
- //# sourceMappingURL=SchemaGlyphPuck.vue.script.js.map
30
+ //# sourceMappingURL=SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createBlock","_unref","SchemaGlyphPuck_vue_vue_type_script_setup_true_lang_default","openBlock","createElementBlock","normalizeClass","__props","renderSlot","_ctx","createBlock","unref","ScalarIconMinus","ScalarIconPlus"],"sources":["../../src/schema/SchemaGlyphPuck.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconMinus, ScalarIconPlus } from '@scalar/icons'\n\n/**\n * The 18px glyph puck every tree control shows: an opaque knockout around a\n * 16px icon, so a rail reads as passing behind it. Hover is the\n * `tree-control-hover` variant (see tailwind.config.css): a parent carrying\n * the Tailwind group `group/tree-control`, the row heading beside a gutter\n * toggle, or the open panel's rail, so whichever element is the real pointer\n * target lights the puck the same way — a hairline ring on the page colour.\n *\n * Floating pucks hang in the row's margin (see the indentation model in\n * SchemaProperty.vue); the line anchor keeps the glyph beside a heading that wraps.\n */\nconst {\n open,\n floating = true,\n anchor = 'middle',\n} = defineProps<{\n /** Whether the controlled panel is open; picks the minus glyph over plus when the slot is empty */\n open?: boolean\n /** Position the puck absolutely in the row's margin rather than inline */\n floating?: boolean\n /** Where a floating puck centres: the row's middle, or its first text line */\n anchor?: 'middle' | 'line'\n}>()\n</script>\n<template>\n <span\n aria-hidden=\"true\"\n class=\"schema-glyph tree-control-hover:bg-b-1 tree-control-hover:text-c-1 tree-control-hover:border-(--scalar-border-color) print:bg-transparent [&_svg]:size-[var(--schema-glyph-icon,16px)]\"\n :class=\"\n floating\n ? [\n 'absolute start-[calc(0px_-_var(--schema-glyph-half,9px)_-_var(--schema-gutter,16px))] -translate-y-1/2',\n anchor === 'line' ? 'top-[0.5lh]' : 'top-1/2',\n ]\n : undefined\n \">\n <!-- print: paper strips background paint but still prints the rail, so the\n knockout goes transparent. This comment stays inside the span: beside\n the root it would make the template a fragment and break fallthrough. -->\n <slot>\n <ScalarIconMinus\n v-if=\"open\"\n weight=\"light\" />\n <ScalarIconPlus\n v-else\n weight=\"light\" />\n </slot>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;E,kBA4BEA,EAAA,GAAAC,EAsBO,QAAA;GArBL,eAAY;GACZ,OAAKC,EAAA,CAAC,0LACSQ,EAAA,W,2GAAuJA,EAAA,WAAM,SAAA,gBAAA,S,IAA+D,KAAA,C;E,IAW3OP,EAOOS,EAAA,QAAA,WAAA,CAAA,SAAA,CALGF,EAAA,QADRV,EAAA,GAAAI,EAEmBC,EAAAU,CAAA,GAAA;;GAAjB,QAAO;E,OACTf,EAAA,GAAAI,EAEmBC,EAAAW,CAAA,GAAA;;GAAjB,QAAO"}
@@ -1,4 +1,4 @@
1
- import e from "./SchemaGutterToggle.vue.script.js";
1
+ import e from "./SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/schema/SchemaGutterToggle.vue
3
3
  var t = e;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaGutterToggle.vue.js","names":[],"sources":["../../src/schema/SchemaGutterToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\n\n/**\n * A property row's disclosure control: a content-free button in the property's\n * gutter. Its accessible name is the property name via `aria-labelledby`, and the\n * child count rides `aria-describedby` so screen-reader verbosity settings apply.\n * The 24px hit box (WCAG 2.5.8) and the 18px glyph puck inside it are sized\n * independently.\n */\nconst { open, panelId, panelRendered, nameId, fallbackLabel, countId } =\n defineProps<{\n /** Whether the controlled panel is expanded */\n open: boolean\n /** id of the panel this toggle controls */\n panelId: string\n /** Only reference the panel while it is actually in the DOM */\n panelRendered: boolean\n /** id of the visible property name that labels this control, absent on nameless rows */\n nameId?: string\n /**\n * Accessible name when there is no visible name to reference: pointing\n * `aria-labelledby` at an id that never renders leaves the button unnamed.\n */\n fallbackLabel: string\n /** id of the visually hidden child count that describes this control */\n countId?: string\n }>()\n\nconst emit = defineEmits<{\n (e: 'toggle'): void\n}>()\n</script>\n<template>\n <button\n :aria-controls=\"panelRendered ? panelId : undefined\"\n :aria-describedby=\"countId\"\n :aria-expanded=\"open\"\n :aria-label=\"nameId ? undefined : fallbackLabel\"\n :aria-labelledby=\"nameId\"\n class=\"property-toggle group/tree-control flex size-[var(--schema-toggle-size,24px)] shrink-0 cursor-pointer items-center justify-center rounded-[999px] border-none bg-transparent p-0 text-[color:var(--schema-glyph-color,var(--scalar-color-2))]\"\n data-schema-toggle\n type=\"button\"\n @click=\"emit('toggle')\">\n <!-- Inline, not floating: the button is already the box the puck centres in -->\n <SchemaGlyphPuck\n class=\"property-glyph\"\n :floating=\"false\"\n :open=\"open\" />\n </button>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaGutterToggle.vue.js","names":["_sfc_main","SchemaGutterToggle_vue_vue_type_script_setup_true_lang_default","SchemaGutterToggle_default"],"sources":["../../src/schema/SchemaGutterToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\n\n/**\n * A property row's disclosure control: a content-free button in the property's\n * gutter. Its accessible name is the property name via `aria-labelledby`, and the\n * child count rides `aria-describedby` so screen-reader verbosity settings apply.\n * The 24px hit box (WCAG 2.5.8) and the 18px glyph puck inside it are sized\n * independently.\n */\nconst { open, panelId, panelRendered, nameId, fallbackLabel, countId } =\n defineProps<{\n /** Whether the controlled panel is expanded */\n open: boolean\n /** id of the panel this toggle controls */\n panelId: string\n /** Only reference the panel while it is actually in the DOM */\n panelRendered: boolean\n /** id of the visible property name that labels this control, absent on nameless rows */\n nameId?: string\n /**\n * Accessible name when there is no visible name to reference: pointing\n * `aria-labelledby` at an id that never renders leaves the button unnamed.\n */\n fallbackLabel: string\n /** id of the visually hidden child count that describes this control */\n countId?: string\n }>()\n\nconst emit = defineEmits<{\n (e: 'toggle'): void\n}>()\n</script>\n<template>\n <button\n :aria-controls=\"panelRendered ? panelId : undefined\"\n :aria-describedby=\"countId\"\n :aria-expanded=\"open\"\n :aria-label=\"nameId ? undefined : fallbackLabel\"\n :aria-labelledby=\"nameId\"\n class=\"property-toggle group/tree-control flex size-[var(--schema-toggle-size,24px)] shrink-0 cursor-pointer items-center justify-center rounded-[999px] border-none bg-transparent p-0 text-[color:var(--schema-glyph-color,var(--scalar-color-2))]\"\n data-schema-toggle\n type=\"button\"\n @click=\"emit('toggle')\">\n <!-- Inline, not floating: the button is already the box the puck centres in -->\n <SchemaGlyphPuck\n class=\"property-glyph\"\n :floating=\"false\"\n :open=\"open\" />\n </button>\n</template>\n"],"mappings":""}
@@ -40,4 +40,4 @@ var a = [
40
40
  //#endregion
41
41
  export { o as default };
42
42
 
43
- //# sourceMappingURL=SchemaGutterToggle.vue.script.js.map
43
+ //# sourceMappingURL=SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","SchemaGlyphPuck","SchemaGlyphPuck_default","_hoisted_1","SchemaGutterToggle_vue_vue_type_script_setup_true_lang_default","__emit","emit","openBlock","createElementBlock","__props","_cache","createVNode"],"sources":["../../src/schema/SchemaGutterToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SchemaGlyphPuck from './SchemaGlyphPuck.vue'\n\n/**\n * A property row's disclosure control: a content-free button in the property's\n * gutter. Its accessible name is the property name via `aria-labelledby`, and the\n * child count rides `aria-describedby` so screen-reader verbosity settings apply.\n * The 24px hit box (WCAG 2.5.8) and the 18px glyph puck inside it are sized\n * independently.\n */\nconst { open, panelId, panelRendered, nameId, fallbackLabel, countId } =\n defineProps<{\n /** Whether the controlled panel is expanded */\n open: boolean\n /** id of the panel this toggle controls */\n panelId: string\n /** Only reference the panel while it is actually in the DOM */\n panelRendered: boolean\n /** id of the visible property name that labels this control, absent on nameless rows */\n nameId?: string\n /**\n * Accessible name when there is no visible name to reference: pointing\n * `aria-labelledby` at an id that never renders leaves the button unnamed.\n */\n fallbackLabel: string\n /** id of the visually hidden child count that describes this control */\n countId?: string\n }>()\n\nconst emit = defineEmits<{\n (e: 'toggle'): void\n}>()\n</script>\n<template>\n <button\n :aria-controls=\"panelRendered ? panelId : undefined\"\n :aria-describedby=\"countId\"\n :aria-expanded=\"open\"\n :aria-label=\"nameId ? undefined : fallbackLabel\"\n :aria-labelledby=\"nameId\"\n class=\"property-toggle group/tree-control flex size-[var(--schema-toggle-size,24px)] shrink-0 cursor-pointer items-center justify-center rounded-[999px] border-none bg-transparent p-0 text-[color:var(--schema-glyph-color,var(--scalar-color-2))]\"\n data-schema-toggle\n type=\"button\"\n @click=\"emit('toggle')\">\n <!-- Inline, not floating: the button is already the box the puck centres in -->\n <SchemaGlyphPuck\n class=\"property-glyph\"\n :floating=\"false\"\n :open=\"open\" />\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EA6BA,IAAMQ,IAAOD;E,kBAKXP,EAAA,GAAAC,EAeS,UAAA;GAdN,iBAAeU,EAAA,gBAAgBA,EAAA,UAAU,KAAA;GACzC,oBAAkBA,EAAA;GAClB,iBAAeA,EAAA;GACf,cAAYA,EAAA,SAAS,KAAA,IAAYA,EAAA;GACjC,mBAAiBA,EAAA;GAClB,OAAM;GACN,sBAAA;GACA,MAAK;GACJ,SAAK,AAAAC,EAAA,QAAA,MAAEJ,EAAI,QAAA;E,IAEZN,EAGiBC,GAAA;GAFf,OAAM;GACL,UAAU;GACV,MAAMQ,EAAA"}
@@ -1,6 +1,6 @@
1
1
  import e from "../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./SchemaHeading.vue.script.js";
3
- /* empty css */
2
+ import t from "./SchemaHeading.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/schema/SchemaHeading.vue
5
5
  var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-39d4fd7f"]]);
6
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaHeading.vue.js","names":[],"sources":["../../src/schema/SchemaHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from './helpers/is-type-object'\nimport { useLocalization } from './localization'\n\nconst { value } = defineProps<{\n value: SchemaObject\n name?: string\n}>()\nconst { translate } = useLocalization()\n\n/** Generate a failsafe type from the properties when we don't have one */\nconst failsafeType = computed(() => {\n if ('type' in value) {\n return value.type\n }\n\n if (value.enum) {\n return 'enum'\n }\n\n if (isArraySchema(value) && value.items) {\n return 'array'\n }\n\n if (isTypeObject(value) && (value.properties || value.additionalProperties)) {\n return 'object'\n }\n\n return 'unknown'\n})\n</script>\n\n<template>\n <span\n v-if=\"typeof value === 'object'\"\n class=\"schema-type\">\n <span\n class=\"schema-type-icon\"\n :title=\"\n 'type' in value && typeof value.type === 'string'\n ? value.type\n : 'type' in value && Array.isArray(value.type)\n ? value.type.join(' | ')\n : translate('schema.unknownType')\n \">\n <template v-if=\"isTypeObject(value)\"> {} </template>\n <template v-if=\"isArraySchema(value)\"> [] </template>\n <template v-if=\"value.enum\"> enum </template>\n </span>\n <template v-if=\"name\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </template>\n <template v-else>\n {{ failsafeType }}\n </template>\n </span>\n</template>\n<style scoped>\n/* Style the \"icon\" */\n.schema-type-icon {\n color: var(--scalar-color-1);\n display: none;\n}\n.schema-type {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaHeading.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","SchemaHeading_vue_vue_type_script_setup_true_lang_default","SchemaHeading_default"],"sources":["../../src/schema/SchemaHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from './helpers/is-type-object'\nimport { useLocalization } from './localization'\n\nconst { value } = defineProps<{\n value: SchemaObject\n name?: string\n}>()\nconst { translate } = useLocalization()\n\n/** Generate a failsafe type from the properties when we don't have one */\nconst failsafeType = computed(() => {\n if ('type' in value) {\n return value.type\n }\n\n if (value.enum) {\n return 'enum'\n }\n\n if (isArraySchema(value) && value.items) {\n return 'array'\n }\n\n if (isTypeObject(value) && (value.properties || value.additionalProperties)) {\n return 'object'\n }\n\n return 'unknown'\n})\n</script>\n\n<template>\n <span\n v-if=\"typeof value === 'object'\"\n class=\"schema-type\">\n <span\n class=\"schema-type-icon\"\n :title=\"\n 'type' in value && typeof value.type === 'string'\n ? value.type\n : 'type' in value && Array.isArray(value.type)\n ? value.type.join(' | ')\n : translate('schema.unknownType')\n \">\n <template v-if=\"isTypeObject(value)\"> {} </template>\n <template v-if=\"isArraySchema(value)\"> [] </template>\n <template v-if=\"value.enum\"> enum </template>\n </span>\n <template v-if=\"name\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </template>\n <template v-else>\n {{ failsafeType }}\n </template>\n </span>\n</template>\n<style scoped>\n/* Style the \"icon\" */\n.schema-type-icon {\n color: var(--scalar-color-1);\n display: none;\n}\n.schema-type {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import { isTypeObject as e } from "./helpers/is-type-object.js";
2
2
  import { useLocalization as t } from "./localization/index.js";
3
3
  import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, openBlock as u, toDisplayString as d, unref as f } from "vue";
4
- import { isArraySchema as p } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
5
- import { ScalarWrappingText as m } from "@scalar/components/wrapping-text";
4
+ import { ScalarWrappingText as p } from "@scalar/components/wrapping-text";
5
+ import { isArraySchema as m } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
6
6
  //#region src/schema/SchemaHeading.vue?vue&type=script&setup=true&lang.ts
7
7
  var h = {
8
8
  key: 0,
@@ -14,15 +14,15 @@ var h = {
14
14
  name: {}
15
15
  },
16
16
  setup(l) {
17
- let { translate: _ } = t(), v = r(() => "type" in l.value ? l.value.type : l.value.enum ? "enum" : p(l.value) && l.value.items ? "array" : e(l.value) && (l.value.properties || l.value.additionalProperties) ? "object" : "unknown");
17
+ let { translate: _ } = t(), v = r(() => "type" in l.value ? l.value.type : l.value.enum ? "enum" : m(l.value) && l.value.items ? "array" : e(l.value) && (l.value.properties || l.value.additionalProperties) ? "object" : "unknown");
18
18
  return (t, r) => typeof l.value == "object" ? (u(), o("span", h, [s("span", {
19
19
  class: "schema-type-icon",
20
20
  title: "type" in l.value && typeof l.value.type == "string" ? l.value.type : "type" in l.value && Array.isArray(l.value.type) ? l.value.type.join(" | ") : f(_)("schema.unknownType")
21
21
  }, [
22
22
  f(e)(l.value) ? (u(), o(n, { key: 0 }, [c(" {} ")], 64)) : a("", !0),
23
- f(p)(l.value) ? (u(), o(n, { key: 1 }, [c(" [] ")], 64)) : a("", !0),
23
+ f(m)(l.value) ? (u(), o(n, { key: 1 }, [c(" [] ")], 64)) : a("", !0),
24
24
  l.value.enum ? (u(), o(n, { key: 2 }, [c(" enum ")], 64)) : a("", !0)
25
- ], 8, g), l.name ? (u(), i(f(m), {
25
+ ], 8, g), l.name ? (u(), i(f(p), {
26
26
  key: 0,
27
27
  preset: "property",
28
28
  text: l.name
@@ -32,4 +32,4 @@ var h = {
32
32
  //#endregion
33
33
  export { _ as default };
34
34
 
35
- //# sourceMappingURL=SchemaHeading.vue.script.js.map
35
+ //# sourceMappingURL=SchemaHeading.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaHeading.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_Fragment","_createTextVNode","_createCommentVNode","_createBlock","_toDisplayString","_hoisted_1","_hoisted_2","SchemaHeading_vue_vue_type_script_setup_true_lang_default","useLocalization","failsafeType","computed","__props","isArraySchema","isTypeObject","openBlock","createElementBlock","createElementVNode","unref","translate","Fragment","createTextVNode","createCommentVNode","createBlock","ScalarWrappingText","toDisplayString"],"sources":["../../src/schema/SchemaHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from './helpers/is-type-object'\nimport { useLocalization } from './localization'\n\nconst { value } = defineProps<{\n value: SchemaObject\n name?: string\n}>()\nconst { translate } = useLocalization()\n\n/** Generate a failsafe type from the properties when we don't have one */\nconst failsafeType = computed(() => {\n if ('type' in value) {\n return value.type\n }\n\n if (value.enum) {\n return 'enum'\n }\n\n if (isArraySchema(value) && value.items) {\n return 'array'\n }\n\n if (isTypeObject(value) && (value.properties || value.additionalProperties)) {\n return 'object'\n }\n\n return 'unknown'\n})\n</script>\n\n<template>\n <span\n v-if=\"typeof value === 'object'\"\n class=\"schema-type\">\n <span\n class=\"schema-type-icon\"\n :title=\"\n 'type' in value && typeof value.type === 'string'\n ? value.type\n : 'type' in value && Array.isArray(value.type)\n ? value.type.join(' | ')\n : translate('schema.unknownType')\n \">\n <template v-if=\"isTypeObject(value)\"> {} </template>\n <template v-if=\"isArraySchema(value)\"> [] </template>\n <template v-if=\"value.enum\"> enum </template>\n </span>\n <template v-if=\"name\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </template>\n <template v-else>\n {{ failsafeType }}\n </template>\n </span>\n</template>\n<style scoped>\n/* Style the \"icon\" */\n.schema-type-icon {\n color: var(--scalar-color-1);\n display: none;\n}\n.schema-type {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;EAaA,IAAM,EAAE,iBAAcY,EAAgB,GAGhCC,IAAeC,QACf,UAAUC,EAAA,QACLA,EAAA,MAAM,OAGXA,EAAA,MAAM,OACD,SAGLC,EAAcD,EAAA,KAAK,KAAKA,EAAA,MAAM,QACzB,UAGLE,EAAaF,EAAA,KAAK,MAAMA,EAAA,MAAM,cAAcA,EAAA,MAAM,wBAC7C,WAGF,SACR;E,iBAKgB,OAAAA,EAAA,SAAK,YADpBf,EAAA,GAAAC,EAwBO,QAxBPQ,GAwBO,CArBLP,EAYO,QAAA;GAXL,OAAM;GACL,OAA0B,UAAAa,EAAA,SAAK,OAAWA,EAAA,MAAM,QAAI,WAA0BA,EAAA,MAAM,OAA2B,UAAAA,EAAA,SAAS,MAAM,QAAQA,EAAA,MAAM,IAAI,IAAgBA,EAAA,MAAM,KAAK,KAAI,KAAA,IAAsBZ,EAAAmB,CAAA,CAAS,CAAA,oBAAA;;GAO/LnB,EAAAc,CAAA,CAAY,CAACF,EAAA,KAAK,KAAlCf,EAAA,GAAAC,EAAoDG,GAAA,EAAA,KAAA,EAAA,GAAA,CAAfC,EAAA,MAAI,C;GACzBF,EAAAa,CAAA,CAAa,CAACD,EAAA,KAAK,KAAnCf,EAAA,GAAAC,EAAqDG,GAAA,EAAA,KAAA,EAAA,GAAA,CAAfC,EAAA,MAAI,C;GAC1BU,EAAA,MAAM,QAAtBf,EAAA,GAAAC,EAA6CG,GAAA,EAAA,KAAA,EAAA,GAAA,CAAjBC,EAAA,QAAM,C;E,UAEpBU,EAAA,QACdf,EAAA,GAAAO,EAEiBJ,EAAAwB,CAAA,GAAA;;GADf,QAAO;GACN,MAAMZ,EAAA;E,0BAEXf,EAAA,GAAAC,EAEWG,GAAA,EAAA,KAAA,EAAA,GAAA,CADNC,EAAAG,EAAAK,EAAA,KAAY,GAAA,CAAA,C"}
@@ -1,4 +1,4 @@
1
- import e from "./SchemaObjectExampleCodeBlock.vue.script.js";
1
+ import e from "./SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/schema/SchemaObjectExampleCodeBlock.vue
3
3
  var t = e;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaObjectExampleCodeBlock.vue.js","names":[],"sources":["../../src/schema/SchemaObjectExampleCodeBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nimport { ExamplePicker } from '../code-example'\n\nconst { schema } = defineProps<{ schema: SchemaObject }>()\n\n/** Grab the examples for the schema object */\nconst examples = computed<Record<string, string>>(() => {\n const base: Record<string, string> = {}\n\n // x-examples extension\n if (schema['x-examples']) {\n Object.entries(schema['x-examples']).forEach(([key, value]) => {\n base[key] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n // Regular schema examples array\n if (schema.examples) {\n schema.examples.forEach((value, index) => {\n base[`Example ${index + 1}`] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n return base\n})\n\n/** The currently selected example key */\nconst selectedExampleKey = ref<string>(Object.keys(examples.value)[0] ?? '')\n</script>\n<template>\n <ScalarCard\n v-if=\"Object.keys(examples).length > 0\"\n class=\"dark-mode\">\n <!-- Code snippet -->\n <ScalarCardSection>\n <div class=\"code-snippet\">\n <ScalarCodeBlock\n class=\"bg-b-2\"\n lang=\"json\"\n lineNumbers\n :prettyPrintedContent=\"\n examples[selectedExampleKey] ??\n 'There was an error loading the example'\n \" />\n </div>\n </ScalarCardSection>\n\n <!-- Example picker -->\n <ScalarCardFooter\n v-if=\"Object.keys(examples).length > 1\"\n class=\"bg-b-3\">\n <ExamplePicker\n v-model=\"selectedExampleKey\"\n :examples />\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaObjectExampleCodeBlock.vue.js","names":["_sfc_main","SchemaObjectExampleCodeBlock_vue_vue_type_script_setup_true_lang_default","SchemaObjectExampleCodeBlock_default"],"sources":["../../src/schema/SchemaObjectExampleCodeBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nimport { ExamplePicker } from '../code-example'\n\nconst { schema } = defineProps<{ schema: SchemaObject }>()\n\n/** Grab the examples for the schema object */\nconst examples = computed<Record<string, string>>(() => {\n const base: Record<string, string> = {}\n\n // x-examples extension\n if (schema['x-examples']) {\n Object.entries(schema['x-examples']).forEach(([key, value]) => {\n base[key] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n // Regular schema examples array\n if (schema.examples) {\n schema.examples.forEach((value, index) => {\n base[`Example ${index + 1}`] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n return base\n})\n\n/** The currently selected example key */\nconst selectedExampleKey = ref<string>(Object.keys(examples.value)[0] ?? '')\n</script>\n<template>\n <ScalarCard\n v-if=\"Object.keys(examples).length > 0\"\n class=\"dark-mode\">\n <!-- Code snippet -->\n <ScalarCardSection>\n <div class=\"code-snippet\">\n <ScalarCodeBlock\n class=\"bg-b-2\"\n lang=\"json\"\n lineNumbers\n :prettyPrintedContent=\"\n examples[selectedExampleKey] ??\n 'There was an error loading the example'\n \" />\n </div>\n </ScalarCardSection>\n\n <!-- Example picker -->\n <ScalarCardFooter\n v-if=\"Object.keys(examples).length > 1\"\n class=\"bg-b-3\">\n <ExamplePicker\n v-model=\"selectedExampleKey\"\n :examples />\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n"],"mappings":""}
@@ -45,4 +45,4 @@ var h = { class: "code-snippet" }, g = /*@__PURE__*/ o({
45
45
  //#endregion
46
46
  export { g as default };
47
47
 
48
- //# sourceMappingURL=SchemaObjectExampleCodeBlock.vue.script.js.map
48
+ //# sourceMappingURL=SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createVNode","_createElementVNode","ExamplePicker","_createCommentVNode","ExamplePicker_default","_hoisted_1","SchemaObjectExampleCodeBlock_vue_vue_type_script_setup_true_lang_default","examples","computed","base","__props","key","value","index","selectedExampleKey","ref","openBlock","createBlock","unref","ScalarCard","withCtx","createVNode","ScalarCardSection","createElementVNode","ScalarCodeBlock","ScalarCardFooter","_cache","$event","createCommentVNode"],"sources":["../../src/schema/SchemaObjectExampleCodeBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nimport { ExamplePicker } from '../code-example'\n\nconst { schema } = defineProps<{ schema: SchemaObject }>()\n\n/** Grab the examples for the schema object */\nconst examples = computed<Record<string, string>>(() => {\n const base: Record<string, string> = {}\n\n // x-examples extension\n if (schema['x-examples']) {\n Object.entries(schema['x-examples']).forEach(([key, value]) => {\n base[key] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n // Regular schema examples array\n if (schema.examples) {\n schema.examples.forEach((value, index) => {\n base[`Example ${index + 1}`] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n return base\n})\n\n/** The currently selected example key */\nconst selectedExampleKey = ref<string>(Object.keys(examples.value)[0] ?? '')\n</script>\n<template>\n <ScalarCard\n v-if=\"Object.keys(examples).length > 0\"\n class=\"dark-mode\">\n <!-- Code snippet -->\n <ScalarCardSection>\n <div class=\"code-snippet\">\n <ScalarCodeBlock\n class=\"bg-b-2\"\n lang=\"json\"\n lineNumbers\n :prettyPrintedContent=\"\n examples[selectedExampleKey] ??\n 'There was an error loading the example'\n \" />\n </div>\n </ScalarCardSection>\n\n <!-- Example picker -->\n <ScalarCardFooter\n v-if=\"Object.keys(examples).length > 1\"\n class=\"bg-b-3\">\n <ExamplePicker\n v-model=\"selectedExampleKey\"\n :examples />\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n"],"mappings":";;;;;;;;;EAeA,IAAMW,IAAWC,QAAuC;GACtD,IAAMC,IAA+B,CAAC;GAsBtC,OAnBIC,EAAA,OAAO,iBACT,OAAO,QAAQA,EAAA,OAAO,aAAa,CAAC,CAAC,SAAS,CAACC,GAAKC,OAAW;IAC7D,EAAKD,KACH,OAAOC,KAAU,WACb,KAAK,UAAUA,GAAO,MAAM,CAAC,IAC7B,OAAOA,CAAK;GACpB,CAAC,GAICF,EAAA,OAAO,YACTA,EAAA,OAAO,SAAS,SAAS,GAAO,MAAU;IACxC,EAAK,WAAWG,IAAQ,OACtB,OAAOD,KAAU,WACb,KAAK,UAAUA,GAAO,MAAM,CAAC,IAC7B,OAAOA,CAAK;GACpB,CAAC,GAGIH;EACT,CAAC,GAGKK,IAAqBC,EAAY,OAAO,KAAKR,EAAS,KAAK,CAAC,CAAC,MAAM,EAAE;E,iBAIjE,OAAO,KAAKA,EAAA,KAAQ,CAAA,CAAE,SAAM,KADpCX,EAAA,GAAAC,EAyBaC,EAAAqB,CAAA,GAAA;;GAvBX,OAAM;;GAEN,SAAApB,QAWoB,CAXpBC,EAWoBF,EAAAwB,CAAA,GAAA,MAAA;IAVlB,SAAAvB,QASM,CATNE,EASM,OATNI,GASM,CARJL,EAOMF,EAAA0B,CAAA,GAAA;KANJ,OAAM;KACN,MAAK;KACL,aAAA;KACC,sBAAmCjB,EAAA,MAASO,EAAA,U;;;G,IAS3C,OAAO,KAAKP,EAAA,KAAQ,CAAA,CAAE,SAAM,KADpCX,EAAA,GAAAC,EAMmBC,EAAA2B,CAAA,GAAA;;IAJjB,OAAM;;IACN,SAAA1B,QAEc,CAFdC,EAEcF,EAAAI,CAAA,GAAA;KADH,YAAAY,EAAA;KAAA,uBAAA,AAAAY,EAAA,QAAA,MAAA,EAAkB,QAAAC;KAC1B,UAAApB,EAAA"}