@scalar/blocks 0.4.3 → 0.5.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 (341) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +45 -0
  3. package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  4. package/dist/code-example/helpers/operation-to-har/operation-to-har.js +1 -0
  5. package/dist/code-example/helpers/operation-to-har/operation-to-har.js.map +1 -1
  6. package/dist/code-example/helpers/operation-to-har/process-body.d.ts.map +1 -1
  7. package/dist/code-example/helpers/operation-to-har/process-body.js +51 -45
  8. package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
  9. package/dist/constants.js +1 -1
  10. package/dist/schema/LinkButton.vue.d.ts +14 -0
  11. package/dist/schema/LinkButton.vue.d.ts.map +1 -0
  12. package/dist/schema/LinkButton.vue.js +15 -0
  13. package/dist/schema/LinkButton.vue.js.map +1 -0
  14. package/dist/schema/RenderString.vue.d.ts +7 -0
  15. package/dist/schema/RenderString.vue.d.ts.map +1 -0
  16. package/dist/schema/RenderString.vue.js +7 -0
  17. package/dist/schema/RenderString.vue.js.map +1 -0
  18. package/dist/schema/RenderString.vue.script.js +14 -0
  19. package/dist/schema/RenderString.vue.script.js.map +1 -0
  20. package/dist/schema/Schema.vue.d.ts +50 -0
  21. package/dist/schema/Schema.vue.d.ts.map +1 -0
  22. package/dist/schema/Schema.vue.js +9 -0
  23. package/dist/schema/Schema.vue.js.map +1 -0
  24. package/dist/schema/Schema.vue.script.js +234 -0
  25. package/dist/schema/Schema.vue.script.js.map +1 -0
  26. package/dist/schema/SchemaCollapsedPreview.vue.d.ts +17 -0
  27. package/dist/schema/SchemaCollapsedPreview.vue.d.ts.map +1 -0
  28. package/dist/schema/SchemaCollapsedPreview.vue.js +7 -0
  29. package/dist/schema/SchemaCollapsedPreview.vue.js.map +1 -0
  30. package/dist/schema/SchemaCollapsedPreview.vue.script.js +28 -0
  31. package/dist/schema/SchemaCollapsedPreview.vue.script.js.map +1 -0
  32. package/dist/schema/SchemaComposition.vue.d.ts +42 -0
  33. package/dist/schema/SchemaComposition.vue.d.ts.map +1 -0
  34. package/dist/schema/SchemaComposition.vue.js +9 -0
  35. package/dist/schema/SchemaComposition.vue.js.map +1 -0
  36. package/dist/schema/SchemaComposition.vue.script.js +231 -0
  37. package/dist/schema/SchemaComposition.vue.script.js.map +1 -0
  38. package/dist/schema/SchemaEnumPropertyItem.vue.d.ts +8 -0
  39. package/dist/schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -0
  40. package/dist/schema/SchemaEnumPropertyItem.vue.js +7 -0
  41. package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -0
  42. package/dist/schema/SchemaEnumPropertyItem.vue.script.js +24 -0
  43. package/dist/schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
  44. package/dist/schema/SchemaEnums.vue.d.ts +11 -0
  45. package/dist/schema/SchemaEnums.vue.d.ts.map +1 -0
  46. package/dist/schema/SchemaEnums.vue.js +9 -0
  47. package/dist/schema/SchemaEnums.vue.js.map +1 -0
  48. package/dist/schema/SchemaEnums.vue.script.js +78 -0
  49. package/dist/schema/SchemaEnums.vue.script.js.map +1 -0
  50. package/dist/schema/SchemaGlyphPuck.vue.d.ts +33 -0
  51. package/dist/schema/SchemaGlyphPuck.vue.d.ts.map +1 -0
  52. package/dist/schema/SchemaGlyphPuck.vue.js +7 -0
  53. package/dist/schema/SchemaGlyphPuck.vue.js.map +1 -0
  54. package/dist/schema/SchemaGlyphPuck.vue.script.js +30 -0
  55. package/dist/schema/SchemaGlyphPuck.vue.script.js.map +1 -0
  56. package/dist/schema/SchemaGutterToggle.vue.d.ts +32 -0
  57. package/dist/schema/SchemaGutterToggle.vue.d.ts.map +1 -0
  58. package/dist/schema/SchemaGutterToggle.vue.js +7 -0
  59. package/dist/schema/SchemaGutterToggle.vue.js.map +1 -0
  60. package/dist/schema/SchemaGutterToggle.vue.script.js +43 -0
  61. package/dist/schema/SchemaGutterToggle.vue.script.js.map +1 -0
  62. package/dist/schema/SchemaHeading.vue.d.ts +9 -0
  63. package/dist/schema/SchemaHeading.vue.d.ts.map +1 -0
  64. package/dist/schema/SchemaHeading.vue.js +9 -0
  65. package/dist/schema/SchemaHeading.vue.js.map +1 -0
  66. package/dist/schema/SchemaHeading.vue.script.js +35 -0
  67. package/dist/schema/SchemaHeading.vue.script.js.map +1 -0
  68. package/dist/schema/SchemaObjectExampleCodeBlock.vue.d.ts +8 -0
  69. package/dist/schema/SchemaObjectExampleCodeBlock.vue.d.ts.map +1 -0
  70. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
  71. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
  72. package/dist/schema/SchemaObjectExampleCodeBlock.vue.script.js +48 -0
  73. package/dist/schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
  74. package/dist/schema/SchemaObjectProperties.vue.d.ts +22 -0
  75. package/dist/schema/SchemaObjectProperties.vue.d.ts.map +1 -0
  76. package/dist/schema/SchemaObjectProperties.vue.js +7 -0
  77. package/dist/schema/SchemaObjectProperties.vue.js.map +1 -0
  78. package/dist/schema/SchemaObjectProperties.vue.script.js +207 -0
  79. package/dist/schema/SchemaObjectProperties.vue.script.js.map +1 -0
  80. package/dist/schema/SchemaProperty.vue.d.ts +88 -0
  81. package/dist/schema/SchemaProperty.vue.d.ts.map +1 -0
  82. package/dist/schema/SchemaProperty.vue.js +9 -0
  83. package/dist/schema/SchemaProperty.vue.js.map +1 -0
  84. package/dist/schema/SchemaProperty.vue.script.js +456 -0
  85. package/dist/schema/SchemaProperty.vue.script.js.map +1 -0
  86. package/dist/schema/SchemaPropertyDefault.vue.d.ts +7 -0
  87. package/dist/schema/SchemaPropertyDefault.vue.d.ts.map +1 -0
  88. package/dist/schema/SchemaPropertyDefault.vue.js +9 -0
  89. package/dist/schema/SchemaPropertyDefault.vue.js.map +1 -0
  90. package/dist/schema/SchemaPropertyDefault.vue.script.js +64 -0
  91. package/dist/schema/SchemaPropertyDefault.vue.script.js.map +1 -0
  92. package/dist/schema/SchemaPropertyDetail.vue.d.ts +22 -0
  93. package/dist/schema/SchemaPropertyDetail.vue.d.ts.map +1 -0
  94. package/dist/schema/SchemaPropertyDetail.vue.js +9 -0
  95. package/dist/schema/SchemaPropertyDetail.vue.js.map +1 -0
  96. package/dist/schema/SchemaPropertyDetail.vue.script.js +25 -0
  97. package/dist/schema/SchemaPropertyDetail.vue.script.js.map +1 -0
  98. package/dist/schema/SchemaPropertyExamples.vue.d.ts +8 -0
  99. package/dist/schema/SchemaPropertyExamples.vue.d.ts.map +1 -0
  100. package/dist/schema/SchemaPropertyExamples.vue.js +9 -0
  101. package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -0
  102. package/dist/schema/SchemaPropertyExamples.vue.script.js +125 -0
  103. package/dist/schema/SchemaPropertyExamples.vue.script.js.map +1 -0
  104. package/dist/schema/SchemaPropertyHeading.vue.d.ts +59 -0
  105. package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -0
  106. package/dist/schema/SchemaPropertyHeading.vue.js +9 -0
  107. package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -0
  108. package/dist/schema/SchemaPropertyHeading.vue.script.js +270 -0
  109. package/dist/schema/SchemaPropertyHeading.vue.script.js.map +1 -0
  110. package/dist/schema/SchemaPropertyPattern.vue.d.ts +7 -0
  111. package/dist/schema/SchemaPropertyPattern.vue.d.ts.map +1 -0
  112. package/dist/schema/SchemaPropertyPattern.vue.js +9 -0
  113. package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -0
  114. package/dist/schema/SchemaPropertyPattern.vue.script.js +45 -0
  115. package/dist/schema/SchemaPropertyPattern.vue.script.js.map +1 -0
  116. package/dist/schema/SchemaRailPanel.vue.d.ts +35 -0
  117. package/dist/schema/SchemaRailPanel.vue.d.ts.map +1 -0
  118. package/dist/schema/SchemaRailPanel.vue.js +7 -0
  119. package/dist/schema/SchemaRailPanel.vue.js.map +1 -0
  120. package/dist/schema/SchemaRailPanel.vue.script.js +49 -0
  121. package/dist/schema/SchemaRailPanel.vue.script.js.map +1 -0
  122. package/dist/schema/components/CopyLinkButton.vue.d.ts +27 -0
  123. package/dist/schema/components/CopyLinkButton.vue.d.ts.map +1 -0
  124. package/dist/schema/components/CopyLinkButton.vue.js +7 -0
  125. package/dist/schema/components/CopyLinkButton.vue.js.map +1 -0
  126. package/dist/schema/components/CopyLinkButton.vue.script.js +26 -0
  127. package/dist/schema/components/CopyLinkButton.vue.script.js.map +1 -0
  128. package/dist/schema/components/WithBreadcrumb.vue.d.ts +19 -0
  129. package/dist/schema/components/WithBreadcrumb.vue.d.ts.map +1 -0
  130. package/dist/schema/components/WithBreadcrumb.vue.js +7 -0
  131. package/dist/schema/components/WithBreadcrumb.vue.js.map +1 -0
  132. package/dist/schema/components/WithBreadcrumb.vue.script.js +18 -0
  133. package/dist/schema/components/WithBreadcrumb.vue.script.js.map +1 -0
  134. package/dist/schema/expansion/index.d.ts +2 -0
  135. package/dist/schema/expansion/index.d.ts.map +1 -0
  136. package/dist/schema/expansion/index.js +2 -0
  137. package/dist/schema/helpers/dynamic-scope.d.ts +27 -0
  138. package/dist/schema/helpers/dynamic-scope.d.ts.map +1 -0
  139. package/dist/schema/helpers/dynamic-scope.js +8 -0
  140. package/dist/schema/helpers/dynamic-scope.js.map +1 -0
  141. package/dist/schema/helpers/format-example.d.ts +5 -0
  142. package/dist/schema/helpers/format-example.d.ts.map +1 -0
  143. package/dist/schema/helpers/format-example.js +12 -0
  144. package/dist/schema/helpers/format-example.js.map +1 -0
  145. package/dist/schema/helpers/format-value.d.ts +5 -0
  146. package/dist/schema/helpers/format-value.d.ts.map +1 -0
  147. package/dist/schema/helpers/format-value.js +8 -0
  148. package/dist/schema/helpers/format-value.js.map +1 -0
  149. package/dist/schema/helpers/get-compositions-to-render.d.ts +33 -0
  150. package/dist/schema/helpers/get-compositions-to-render.d.ts.map +1 -0
  151. package/dist/schema/helpers/get-compositions-to-render.js +39 -0
  152. package/dist/schema/helpers/get-compositions-to-render.js.map +1 -0
  153. package/dist/schema/helpers/get-discriminator-values.d.ts +4 -0
  154. package/dist/schema/helpers/get-discriminator-values.d.ts.map +1 -0
  155. package/dist/schema/helpers/get-discriminator-values.js +6 -0
  156. package/dist/schema/helpers/get-discriminator-values.js.map +1 -0
  157. package/dist/schema/helpers/get-enum-values.d.ts +9 -0
  158. package/dist/schema/helpers/get-enum-values.d.ts.map +1 -0
  159. package/dist/schema/helpers/get-enum-values.js +16 -0
  160. package/dist/schema/helpers/get-enum-values.js.map +1 -0
  161. package/dist/schema/helpers/get-property-description.d.ts +9 -0
  162. package/dist/schema/helpers/get-property-description.d.ts.map +1 -0
  163. package/dist/schema/helpers/get-property-description.js +27 -0
  164. package/dist/schema/helpers/get-property-description.js.map +1 -0
  165. package/dist/schema/helpers/get-ref-name.d.ts +24 -0
  166. package/dist/schema/helpers/get-ref-name.d.ts.map +1 -0
  167. package/dist/schema/helpers/get-ref-name.js +15 -0
  168. package/dist/schema/helpers/get-ref-name.js.map +1 -0
  169. package/dist/schema/helpers/get-schema-type.d.ts +13 -0
  170. package/dist/schema/helpers/get-schema-type.d.ts.map +1 -0
  171. package/dist/schema/helpers/get-schema-type.js +24 -0
  172. package/dist/schema/helpers/get-schema-type.js.map +1 -0
  173. package/dist/schema/helpers/get-type-signature-tokens.d.ts +48 -0
  174. package/dist/schema/helpers/get-type-signature-tokens.d.ts.map +1 -0
  175. package/dist/schema/helpers/get-type-signature-tokens.js +62 -0
  176. package/dist/schema/helpers/get-type-signature-tokens.js.map +1 -0
  177. package/dist/schema/helpers/has-complex-array-items.d.ts +10 -0
  178. package/dist/schema/helpers/has-complex-array-items.d.ts.map +1 -0
  179. package/dist/schema/helpers/has-complex-array-items.js +22 -0
  180. package/dist/schema/helpers/has-complex-array-items.js.map +1 -0
  181. package/dist/schema/helpers/index.d.ts +12 -0
  182. package/dist/schema/helpers/index.d.ts.map +1 -0
  183. package/dist/schema/helpers/index.js +12 -0
  184. package/dist/schema/helpers/is-empty-schema-object.d.ts +8 -0
  185. package/dist/schema/helpers/is-empty-schema-object.d.ts.map +1 -0
  186. package/dist/schema/helpers/is-empty-schema-object.js +11 -0
  187. package/dist/schema/helpers/is-empty-schema-object.js.map +1 -0
  188. package/dist/schema/helpers/is-model-linkable.d.ts +15 -0
  189. package/dist/schema/helpers/is-model-linkable.d.ts.map +1 -0
  190. package/dist/schema/helpers/is-model-linkable.js +13 -0
  191. package/dist/schema/helpers/is-model-linkable.js.map +1 -0
  192. package/dist/schema/helpers/is-on-schema-target-path.d.ts +3 -0
  193. package/dist/schema/helpers/is-on-schema-target-path.d.ts.map +1 -0
  194. package/dist/schema/helpers/is-on-schema-target-path.js +6 -0
  195. package/dist/schema/helpers/is-on-schema-target-path.js.map +1 -0
  196. package/dist/schema/helpers/is-type-object.d.ts +5 -0
  197. package/dist/schema/helpers/is-type-object.d.ts.map +1 -0
  198. package/dist/schema/helpers/is-type-object.js +15 -0
  199. package/dist/schema/helpers/is-type-object.js.map +1 -0
  200. package/dist/schema/helpers/merge-all-of-schemas.d.ts +12 -0
  201. package/dist/schema/helpers/merge-all-of-schemas.d.ts.map +1 -0
  202. package/dist/schema/helpers/merge-all-of-schemas.js +151 -0
  203. package/dist/schema/helpers/merge-all-of-schemas.js.map +1 -0
  204. package/dist/schema/helpers/normalize-object-composition.d.ts +9 -0
  205. package/dist/schema/helpers/normalize-object-composition.d.ts.map +1 -0
  206. package/dist/schema/helpers/normalize-object-composition.js +29 -0
  207. package/dist/schema/helpers/normalize-object-composition.js.map +1 -0
  208. package/dist/schema/helpers/optimize-value-for-display.d.ts +13 -0
  209. package/dist/schema/helpers/optimize-value-for-display.d.ts.map +1 -0
  210. package/dist/schema/helpers/optimize-value-for-display.js +64 -0
  211. package/dist/schema/helpers/optimize-value-for-display.js.map +1 -0
  212. package/dist/schema/helpers/partition-all-of-compositions.d.ts +32 -0
  213. package/dist/schema/helpers/partition-all-of-compositions.d.ts.map +1 -0
  214. package/dist/schema/helpers/partition-all-of-compositions.js +67 -0
  215. package/dist/schema/helpers/partition-all-of-compositions.js.map +1 -0
  216. package/dist/schema/helpers/schema-composition.d.ts +4 -0
  217. package/dist/schema/helpers/schema-composition.d.ts.map +1 -0
  218. package/dist/schema/helpers/schema-composition.js +11 -0
  219. package/dist/schema/helpers/schema-composition.js.map +1 -0
  220. package/dist/schema/helpers/schema-cycle.d.ts +31 -0
  221. package/dist/schema/helpers/schema-cycle.d.ts.map +1 -0
  222. package/dist/schema/helpers/schema-cycle.js +8 -0
  223. package/dist/schema/helpers/schema-cycle.js.map +1 -0
  224. package/dist/schema/helpers/schema-expansion.d.ts +89 -0
  225. package/dist/schema/helpers/schema-expansion.d.ts.map +1 -0
  226. package/dist/schema/helpers/schema-expansion.js +93 -0
  227. package/dist/schema/helpers/schema-expansion.js.map +1 -0
  228. package/dist/schema/helpers/schema-keyboard-nav.d.ts +23 -0
  229. package/dist/schema/helpers/schema-keyboard-nav.d.ts.map +1 -0
  230. package/dist/schema/helpers/schema-keyboard-nav.js +36 -0
  231. package/dist/schema/helpers/schema-keyboard-nav.js.map +1 -0
  232. package/dist/schema/helpers/schema-name.d.ts +27 -0
  233. package/dist/schema/helpers/schema-name.d.ts.map +1 -0
  234. package/dist/schema/helpers/schema-name.js +40 -0
  235. package/dist/schema/helpers/schema-name.js.map +1 -0
  236. package/dist/schema/helpers/should-display-description.d.ts +10 -0
  237. package/dist/schema/helpers/should-display-description.d.ts.map +1 -0
  238. package/dist/schema/helpers/should-display-description.js +6 -0
  239. package/dist/schema/helpers/should-display-description.js.map +1 -0
  240. package/dist/schema/helpers/should-display-heading.d.ts +11 -0
  241. package/dist/schema/helpers/should-display-heading.d.ts.map +1 -0
  242. package/dist/schema/helpers/should-display-heading.js +6 -0
  243. package/dist/schema/helpers/should-display-heading.js.map +1 -0
  244. package/dist/schema/helpers/should-render-array-item-composition.d.ts +10 -0
  245. package/dist/schema/helpers/should-render-array-item-composition.d.ts.map +1 -0
  246. package/dist/schema/helpers/should-render-array-item-composition.js +12 -0
  247. package/dist/schema/helpers/should-render-array-item-composition.js.map +1 -0
  248. package/dist/schema/helpers/sort-property-names.d.ts +23 -0
  249. package/dist/schema/helpers/sort-property-names.d.ts.map +1 -0
  250. package/dist/schema/helpers/sort-property-names.js +55 -0
  251. package/dist/schema/helpers/sort-property-names.js.map +1 -0
  252. package/dist/schema/helpers/unwrap-for-read.d.ts +48 -0
  253. package/dist/schema/helpers/unwrap-for-read.d.ts.map +1 -0
  254. package/dist/schema/helpers/unwrap-for-read.js +8 -0
  255. package/dist/schema/helpers/unwrap-for-read.js.map +1 -0
  256. package/dist/schema/index.d.ts +12 -0
  257. package/dist/schema/index.d.ts.map +1 -0
  258. package/dist/schema/index.js +11 -0
  259. package/dist/schema/localization/index.d.ts +59 -0
  260. package/dist/schema/localization/index.d.ts.map +1 -0
  261. package/dist/schema/localization/index.js +18 -0
  262. package/dist/schema/localization/index.js.map +1 -0
  263. package/dist/schema/localization/locales/ar.d.ts +58 -0
  264. package/dist/schema/localization/locales/ar.d.ts.map +1 -0
  265. package/dist/schema/localization/locales/ar.js +60 -0
  266. package/dist/schema/localization/locales/ar.js.map +1 -0
  267. package/dist/schema/localization/locales/de.d.ts +58 -0
  268. package/dist/schema/localization/locales/de.d.ts.map +1 -0
  269. package/dist/schema/localization/locales/de.js +60 -0
  270. package/dist/schema/localization/locales/de.js.map +1 -0
  271. package/dist/schema/localization/locales/en.d.ts +58 -0
  272. package/dist/schema/localization/locales/en.d.ts.map +1 -0
  273. package/dist/schema/localization/locales/en.js +60 -0
  274. package/dist/schema/localization/locales/en.js.map +1 -0
  275. package/dist/schema/localization/locales/es.d.ts +58 -0
  276. package/dist/schema/localization/locales/es.d.ts.map +1 -0
  277. package/dist/schema/localization/locales/es.js +60 -0
  278. package/dist/schema/localization/locales/es.js.map +1 -0
  279. package/dist/schema/localization/locales/fr.d.ts +58 -0
  280. package/dist/schema/localization/locales/fr.d.ts.map +1 -0
  281. package/dist/schema/localization/locales/fr.js +60 -0
  282. package/dist/schema/localization/locales/fr.js.map +1 -0
  283. package/dist/schema/localization/locales/pt.d.ts +58 -0
  284. package/dist/schema/localization/locales/pt.d.ts.map +1 -0
  285. package/dist/schema/localization/locales/pt.js +60 -0
  286. package/dist/schema/localization/locales/pt.js.map +1 -0
  287. package/dist/schema/localization/locales/ru.d.ts +58 -0
  288. package/dist/schema/localization/locales/ru.d.ts.map +1 -0
  289. package/dist/schema/localization/locales/ru.js +60 -0
  290. package/dist/schema/localization/locales/ru.js.map +1 -0
  291. package/dist/schema/localization/locales/zh-cn.d.ts +58 -0
  292. package/dist/schema/localization/locales/zh-cn.d.ts.map +1 -0
  293. package/dist/schema/localization/locales/zh-cn.js +60 -0
  294. package/dist/schema/localization/locales/zh-cn.js.map +1 -0
  295. package/dist/schema/localization/translations.d.ts +460 -0
  296. package/dist/schema/localization/translations.d.ts.map +1 -0
  297. package/dist/schema/localization/translations.js +23 -0
  298. package/dist/schema/localization/translations.js.map +1 -0
  299. package/dist/schema/request-body-composition-index.d.ts +8 -0
  300. package/dist/schema/request-body-composition-index.d.ts.map +1 -0
  301. package/dist/schema/request-body-composition-index.js +6 -0
  302. package/dist/schema/request-body-composition-index.js.map +1 -0
  303. package/dist/schema/schema-tree.bench.d.ts +2 -0
  304. package/dist/schema/schema-tree.bench.d.ts.map +1 -0
  305. package/dist/schema/types.d.ts +51 -0
  306. package/dist/schema/types.d.ts.map +1 -0
  307. package/dist/shared/Badge.vue.d.ts +17 -0
  308. package/dist/shared/Badge.vue.d.ts.map +1 -0
  309. package/dist/shared/Badge.vue.js +9 -0
  310. package/dist/shared/Badge.vue.js.map +1 -0
  311. package/dist/shared/Badge.vue.script.js +16 -0
  312. package/dist/shared/Badge.vue.script.js.map +1 -0
  313. package/dist/shared/ScreenReader.vue.d.ts +21 -0
  314. package/dist/shared/ScreenReader.vue.d.ts.map +1 -0
  315. package/dist/shared/ScreenReader.vue.js +7 -0
  316. package/dist/shared/ScreenReader.vue.js.map +1 -0
  317. package/dist/shared/ScreenReader.vue.script.js +19 -0
  318. package/dist/shared/ScreenReader.vue.script.js.map +1 -0
  319. package/dist/shared/index.d.ts +3 -0
  320. package/dist/shared/index.d.ts.map +1 -0
  321. package/dist/shared/index.js +3 -0
  322. package/dist/specification-extensions/ExtensionValue.vue.d.ts +13 -0
  323. package/dist/specification-extensions/ExtensionValue.vue.d.ts.map +1 -0
  324. package/dist/specification-extensions/ExtensionValue.vue.js +7 -0
  325. package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -0
  326. package/dist/specification-extensions/ExtensionValue.vue.script.js +84 -0
  327. package/dist/specification-extensions/ExtensionValue.vue.script.js.map +1 -0
  328. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts +9 -0
  329. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts.map +1 -0
  330. package/dist/specification-extensions/SpecificationExtensions.vue.js +7 -0
  331. package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -0
  332. package/dist/specification-extensions/SpecificationExtensions.vue.script.js +21 -0
  333. package/dist/specification-extensions/SpecificationExtensions.vue.script.js.map +1 -0
  334. package/dist/specification-extensions/index.d.ts +2 -0
  335. package/dist/specification-extensions/index.d.ts.map +1 -0
  336. package/dist/specification-extensions/index.js +2 -0
  337. package/dist/style.css +576 -15
  338. package/dist/styles/schema-tree.css +91 -0
  339. package/dist/styles/tailwind.config.css +22 -0
  340. package/dist/vue-styles.css +1 -1
  341. package/package.json +45 -7
@@ -0,0 +1,7 @@
1
+ import e from "./SchemaGutterToggle.vue.script.js";
2
+ //#region src/schema/SchemaGutterToggle.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=SchemaGutterToggle.vue.js.map
@@ -0,0 +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":""}
@@ -0,0 +1,43 @@
1
+ import e from "./SchemaGlyphPuck.vue.js";
2
+ import { createElementBlock as t, createVNode as n, defineComponent as r, openBlock as i } from "vue";
3
+ //#region src/schema/SchemaGutterToggle.vue?vue&type=script&setup=true&lang.ts
4
+ var a = [
5
+ "aria-controls",
6
+ "aria-describedby",
7
+ "aria-expanded",
8
+ "aria-label",
9
+ "aria-labelledby"
10
+ ], o = /*@__PURE__*/ r({
11
+ __name: "SchemaGutterToggle",
12
+ props: {
13
+ open: { type: Boolean },
14
+ panelId: {},
15
+ panelRendered: { type: Boolean },
16
+ nameId: {},
17
+ fallbackLabel: {},
18
+ countId: {}
19
+ },
20
+ emits: ["toggle"],
21
+ setup(r, { emit: o }) {
22
+ let s = o;
23
+ return (o, c) => (i(), t("button", {
24
+ "aria-controls": r.panelRendered ? r.panelId : void 0,
25
+ "aria-describedby": r.countId,
26
+ "aria-expanded": r.open,
27
+ "aria-label": r.nameId ? void 0 : r.fallbackLabel,
28
+ "aria-labelledby": r.nameId,
29
+ 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))]",
30
+ "data-schema-toggle": "",
31
+ type: "button",
32
+ onClick: c[0] ||= (e) => s("toggle")
33
+ }, [n(e, {
34
+ class: "property-glyph",
35
+ floating: !1,
36
+ open: r.open
37
+ }, null, 8, ["open"])], 8, a));
38
+ }
39
+ });
40
+ //#endregion
41
+ export { o as default };
42
+
43
+ //# sourceMappingURL=SchemaGutterToggle.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaGutterToggle.vue.script.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":";;;;;;;;;;;;;;;;;;;;;EA6BA,IAAM,IAAO;yBAKX,EAeS,UAAA;GAdN,iBAAe,EAAA,gBAAgB,EAAA,UAAU,KAAA;GACzC,oBAAkB,EAAA;GAClB,iBAAe,EAAA;GACf,cAAY,EAAA,SAAS,KAAA,IAAY,EAAA;GACjC,mBAAiB,EAAA;GAClB,OAAM;GACN,sBAAA;GACA,MAAK;GACJ,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,QAAA;MAEZ,EAGiB,GAAA;GAFf,OAAM;GACL,UAAU;GACV,MAAM,EAAA"}
@@ -0,0 +1,9 @@
1
+ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
2
+ type __VLS_Props = {
3
+ value: SchemaObject;
4
+ name?: string;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ //# sourceMappingURL=SchemaHeading.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../src/schema/SchemaHeading.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAOhG,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AA8FF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,9 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./SchemaHeading.vue.script.js";
3
+ /* empty css */
4
+ //#region src/schema/SchemaHeading.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-39d4fd7f"]]);
6
+ //#endregion
7
+ export { n as default };
8
+
9
+ //# sourceMappingURL=SchemaHeading.vue.js.map
@@ -0,0 +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":""}
@@ -0,0 +1,35 @@
1
+ import { isTypeObject as e } from "./helpers/is-type-object.js";
2
+ import { useLocalization as t } from "./localization/index.js";
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";
6
+ //#region src/schema/SchemaHeading.vue?vue&type=script&setup=true&lang.ts
7
+ var h = {
8
+ key: 0,
9
+ class: "schema-type"
10
+ }, g = ["title"], _ = /*@__PURE__*/ l({
11
+ __name: "SchemaHeading",
12
+ props: {
13
+ value: {},
14
+ name: {}
15
+ },
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");
18
+ return (t, r) => typeof l.value == "object" ? (u(), o("span", h, [s("span", {
19
+ class: "schema-type-icon",
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
+ }, [
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),
24
+ l.value.enum ? (u(), o(n, { key: 2 }, [c(" enum ")], 64)) : a("", !0)
25
+ ], 8, g), l.name ? (u(), i(f(m), {
26
+ key: 0,
27
+ preset: "property",
28
+ text: l.name
29
+ }, null, 8, ["text"])) : (u(), o(n, { key: 1 }, [c(d(v.value), 1)], 64))])) : a("", !0);
30
+ }
31
+ });
32
+ //#endregion
33
+ export { _ as default };
34
+
35
+ //# sourceMappingURL=SchemaHeading.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaHeading.vue.script.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":";;;;;;;;;;;;;;;;EAaA,IAAM,EAAE,iBAAc,EAAgB,GAGhC,IAAe,QACf,UAAU,EAAA,QACL,EAAA,MAAM,OAGX,EAAA,MAAM,OACD,SAGL,EAAc,EAAA,KAAK,KAAK,EAAA,MAAM,QACzB,UAGL,EAAa,EAAA,KAAK,MAAM,EAAA,MAAM,cAAc,EAAA,MAAM,wBAC7C,WAGF,SACR;0BAKgB,EAAA,SAAK,YAAA,EAAA,GADpB,EAwBO,QAxBP,GAwBO,CArBL,EAYO,QAAA;GAXL,OAAM;GACL,OAAA,UAA0B,EAAA,SAAK,OAAW,EAAA,MAAM,QAAI,WAA0B,EAAA,MAAM,OAAA,UAA2B,EAAA,SAAS,MAAM,QAAQ,EAAA,MAAM,IAAI,IAAgB,EAAA,MAAM,KAAK,KAAI,KAAA,IAAsB,EAAA,CAAA,CAAS,CAAA,oBAAA;;GAO/L,EAAA,CAAA,CAAY,CAAC,EAAA,KAAK,KAAA,EAAA,GAAlC,EAAoD,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAf,MAAI,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;GACzB,EAAA,CAAA,CAAa,CAAC,EAAA,KAAK,KAAA,EAAA,GAAnC,EAAqD,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAf,MAAI,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;GAC1B,EAAA,MAAM,QAAA,EAAA,GAAtB,EAA6C,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAjB,QAAM,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;YAEpB,EAAA,QAAA,EAAA,GACd,EAEiB,EAAA,CAAA,GAAA;;GADf,QAAO;GACN,MAAM,EAAA;iCAEX,EAEW,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,EADN,EAAA,KAAY,GAAA,CAAA,CAAA,GAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
@@ -0,0 +1,8 @@
1
+ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
2
+ type __VLS_Props = {
3
+ schema: SchemaObject;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ //# sourceMappingURL=SchemaObjectExampleCodeBlock.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaObjectExampleCodeBlock.vue.d.ts","sourceRoot":"","sources":["../../src/schema/SchemaObjectExampleCodeBlock.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC;AAmJ5C,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,7 @@
1
+ import e from "./SchemaObjectExampleCodeBlock.vue.script.js";
2
+ //#region src/schema/SchemaObjectExampleCodeBlock.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=SchemaObjectExampleCodeBlock.vue.js.map
@@ -0,0 +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":""}
@@ -0,0 +1,48 @@
1
+ import e from "../code-example/components/ExamplePicker.vue.js";
2
+ import { computed as t, createBlock as n, createCommentVNode as r, createElementVNode as i, createVNode as a, defineComponent as o, openBlock as s, ref as c, unref as l, withCtx as u } from "vue";
3
+ import { ScalarCard as d, ScalarCardFooter as f, ScalarCardSection as p } from "@scalar/components/card";
4
+ import { ScalarCodeBlock as m } from "@scalar/components/code-block";
5
+ //#region src/schema/SchemaObjectExampleCodeBlock.vue?vue&type=script&setup=true&lang.ts
6
+ var h = { class: "code-snippet" }, g = /*@__PURE__*/ o({
7
+ __name: "SchemaObjectExampleCodeBlock",
8
+ props: { schema: {} },
9
+ setup(o) {
10
+ let g = t(() => {
11
+ let e = {};
12
+ return o.schema["x-examples"] && Object.entries(o.schema["x-examples"]).forEach(([t, n]) => {
13
+ e[t] = typeof n == "object" ? JSON.stringify(n, null, 2) : String(n);
14
+ }), o.schema.examples && o.schema.examples.forEach((t, n) => {
15
+ e[`Example ${n + 1}`] = typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
16
+ }), e;
17
+ }), _ = c(Object.keys(g.value)[0] ?? "");
18
+ return (t, o) => Object.keys(g.value).length > 0 ? (s(), n(l(d), {
19
+ key: 0,
20
+ class: "dark-mode"
21
+ }, {
22
+ default: u(() => [a(l(p), null, {
23
+ default: u(() => [i("div", h, [a(l(m), {
24
+ class: "bg-b-2",
25
+ lang: "json",
26
+ lineNumbers: "",
27
+ prettyPrintedContent: g.value[_.value] ?? "There was an error loading the example"
28
+ }, null, 8, ["prettyPrintedContent"])])]),
29
+ _: 1
30
+ }), Object.keys(g.value).length > 1 ? (s(), n(l(f), {
31
+ key: 0,
32
+ class: "bg-b-3"
33
+ }, {
34
+ default: u(() => [a(l(e), {
35
+ modelValue: _.value,
36
+ "onUpdate:modelValue": o[0] ||= (e) => _.value = e,
37
+ examples: g.value
38
+ }, null, 8, ["modelValue", "examples"])]),
39
+ _: 1
40
+ })) : r("", !0)]),
41
+ _: 1
42
+ })) : r("", !0);
43
+ }
44
+ });
45
+ //#endregion
46
+ export { g as default };
47
+
48
+ //# sourceMappingURL=SchemaObjectExampleCodeBlock.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaObjectExampleCodeBlock.vue.script.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":";;;;;;;;;EAeA,IAAM,IAAW,QAAuC;GACtD,IAAM,IAA+B,CAAC;GAsBtC,OAnBI,EAAA,OAAO,iBACT,OAAO,QAAQ,EAAA,OAAO,aAAa,CAAC,CAAC,SAAS,CAAC,GAAK,OAAW;IAC7D,EAAK,KACH,OAAO,KAAU,WACb,KAAK,UAAU,GAAO,MAAM,CAAC,IAC7B,OAAO,CAAK;GACpB,CAAC,GAIC,EAAA,OAAO,YACT,EAAA,OAAO,SAAS,SAAS,GAAO,MAAU;IACxC,EAAK,WAAW,IAAQ,OACtB,OAAO,KAAU,WACb,KAAK,UAAU,GAAO,MAAM,CAAC,IAC7B,OAAO,CAAK;GACpB,CAAC,GAGI;EACT,CAAC,GAGK,IAAqB,EAAY,OAAO,KAAK,EAAS,KAAK,CAAC,CAAC,MAAM,EAAE;mBAIjE,OAAO,KAAK,EAAA,KAAQ,CAAA,CAAE,SAAM,KAAA,EAAA,GADpC,EAyBa,EAAA,CAAA,GAAA;;GAvBX,OAAM;;oBAac,CAXpB,EAWoB,EAAA,CAAA,GAAA,MAAA;qBADZ,CATN,EASM,OATN,GASM,CARJ,EAOM,EAAA,CAAA,GAAA;KANJ,OAAM;KACN,MAAK;KACL,aAAA;KACC,sBAAmC,EAAA,MAAS,EAAA,UAAA;;;OAS3C,OAAO,KAAK,EAAA,KAAQ,CAAA,CAAE,SAAM,KAAA,EAAA,GADpC,EAMmB,EAAA,CAAA,GAAA;;IAJjB,OAAM;;qBAGQ,CAFd,EAEc,EAAA,CAAA,GAAA;iBADH,EAAA;8CAAkB,QAAA;KAC1B,UAAA,EAAA"}
@@ -0,0 +1,22 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
3
+ import type { SchemaOptions, SchemaRenderingProps } from './types';
4
+ type __VLS_Props = {
5
+ schema: SchemaObject;
6
+ discriminator?: DiscriminatorObject;
7
+ compact?: boolean;
8
+ hideHeading?: boolean;
9
+ level?: number;
10
+ /** Real nesting depth (see SchemaProperty) */
11
+ depth?: number;
12
+ hideModelNames?: boolean;
13
+ breadcrumb?: string[];
14
+ eventBus: WorkspaceEventBus | null;
15
+ options: SchemaOptions;
16
+ schemaContext?: string;
17
+ compositionPath?: string[];
18
+ } & SchemaRenderingProps;
19
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ //# sourceMappingURL=SchemaObjectProperties.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../src/schema/SchemaObjectProperties.vue"],"names":[],"mappings":"AAoUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EAEb,MAAM,8DAA8D,CAAA;AAOrE,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAElE,KAAK,WAAW,GAAG;IACb,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B,GAAG,oBAAoB,CAAC;AAsZ7B,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,7 @@
1
+ import e from "./SchemaObjectProperties.vue.script.js";
2
+ //#region src/schema/SchemaObjectProperties.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=SchemaObjectProperties.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaObjectProperties.vue.js","names":[],"sources":["../../src/schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from './helpers/is-type-object'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { sortPropertyNames } from './helpers/sort-property-names'\nimport SchemaProperty from './SchemaProperty.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n defineProps<\n {\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n schemaContext?: string\n compositionPath?: string[]\n } & SchemaRenderingProps\n >()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * The resolved propertyNames schema for the property keys.\n *\n * Surfaces key constraints such as `format` (for example `uuid`) so they are\n * not lost when rendering a map of additional properties.\n */\nconst additionalPropertiesKeySchema = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return schema.propertyNames ? resolve.schema(schema.propertyNames) : undefined\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n */\nconst getPropertySchema = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n if (!property) {\n return undefined\n }\n return resolve.schema(property)\n}\n\nconst getPropertyDescription = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n if (!property) {\n return undefined\n }\n\n return typeof property.description === 'string'\n ? property.description\n : undefined\n}\n\ntype PropertyRow = {\n name: string\n cycleKey: unknown\n description: string | undefined\n required: boolean\n schema: SchemaObject | undefined\n}\n\n/**\n * Each child read once, in panel order.\n *\n * The template used to fetch `schema.properties[name]` three times per row\n * (cycle key, description, schema) and walk the `required` array with\n * `includes` for every row. Through the document's proxy stack those reads\n * were the panel's largest per-row JS cost, and none of them can change while\n * the panel is up. `false` for a name outside `required` lands on the same\n * `required: false` default in SchemaProperty that `undefined` did.\n */\nconst rows = computed((): PropertyRow[] => {\n if (!isTypeObject(schema) || !schema.properties) {\n return []\n }\n\n const { properties } = schema\n const requiredSet = new Set(schema.required ?? [])\n\n return sortedProperties.value.map((name): PropertyRow => {\n const property = properties[name]\n\n return {\n name,\n cycleKey: getCycleKey(property),\n description: getPropertyDescription(property),\n required: requiredSet.has(name),\n schema: getPropertySchema(property),\n }\n })\n})\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n * $ref values are resolved before the type check so the referenced schema is rendered correctly.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n // Resolve $ref first so the type check below works on the actual schema\n const resolved =\n typeof additionalProperties === 'boolean'\n ? additionalProperties\n : resolve.schema(additionalProperties)\n\n if (\n resolved === true ||\n (typeof resolved === 'object' && Object.keys(resolved).length === 0) ||\n typeof resolved !== 'object' ||\n !('type' in resolved)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof resolved === 'object' ? resolved : {}),\n }\n }\n\n return resolved\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"row in rows\"\n :key=\"row.name\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"row.name\"\n :cycleKey=\"row.cycleKey\"\n :depth\n :description=\"row.description\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"row.name\"\n :options=\"options\"\n :required=\"row.required\"\n :schema=\"row.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"key\"\n :cycleKey=\"getCycleKey(property)\"\n :depth\n :description=\"getPropertyDescription(property)\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"getPropertySchema(property)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n :cycleKey=\"getCycleKey(schema.additionalProperties)\"\n :depth\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :propertyNamesSchema=\"additionalPropertiesKeySchema\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":""}
@@ -0,0 +1,207 @@
1
+ import { isTypeObject as e } from "./helpers/is-type-object.js";
2
+ import { getCycleKey as t } from "./helpers/schema-cycle.js";
3
+ import { sortPropertyNames as n } from "./helpers/sort-property-names.js";
4
+ import r from "./SchemaProperty.vue.js";
5
+ import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, openBlock as u, renderList as d, unref as f } from "vue";
6
+ import { resolve as p } from "@scalar/workspace-store/resolve";
7
+ //#region src/schema/SchemaObjectProperties.vue?vue&type=script&setup=true&lang.ts
8
+ var m = /*@__PURE__*/ l({
9
+ __name: "SchemaObjectProperties",
10
+ props: {
11
+ schema: {},
12
+ discriminator: {},
13
+ compact: { type: Boolean },
14
+ hideHeading: { type: Boolean },
15
+ level: {},
16
+ depth: {},
17
+ hideModelNames: { type: Boolean },
18
+ breadcrumb: {},
19
+ eventBus: {},
20
+ options: {},
21
+ schemaContext: {},
22
+ compositionPath: {},
23
+ scrollTargetId: {},
24
+ specificationExtension: {},
25
+ expansion: {}
26
+ },
27
+ setup(l) {
28
+ let m = a(() => n(l.schema, l.discriminator, l.options)), h = (e, t) => {
29
+ let n = typeof e == "boolean" ? e : p.schema(e);
30
+ if (typeof n == "object" && typeof n["x-additionalPropertiesName"] == "string" && n["x-additionalPropertiesName"].trim().length > 0) return `${n["x-additionalPropertiesName"].trim()}`;
31
+ if (t) {
32
+ let e = p.schema(t);
33
+ if (e?.title) return e.title;
34
+ }
35
+ return "propertyName";
36
+ }, g = (e) => {
37
+ if (!e) return;
38
+ let t = p.schema(e);
39
+ if (t && "enum" in t && Array.isArray(t.enum) && t.enum.length > 0) return t.enum;
40
+ }, _ = a(() => {
41
+ if (!(!e(l.schema) || !l.schema.additionalProperties)) return g(l.schema.propertyNames);
42
+ }), v = a(() => {
43
+ if (!(!e(l.schema) || !l.schema.additionalProperties)) return l.schema.propertyNames ? p.schema(l.schema.propertyNames) : void 0;
44
+ }), y = (e) => {
45
+ if (e) return p.schema(e);
46
+ }, b = (e) => {
47
+ if (e) return typeof e.description == "string" ? e.description : void 0;
48
+ }, x = a(() => {
49
+ if (!e(l.schema) || !l.schema.properties) return [];
50
+ let { properties: n } = l.schema, r = new Set(l.schema.required ?? []);
51
+ return m.value.map((e) => {
52
+ let i = n[e];
53
+ return {
54
+ name: e,
55
+ cycleKey: t(i),
56
+ description: b(i),
57
+ required: r.has(e),
58
+ schema: y(i)
59
+ };
60
+ });
61
+ }), S = (e) => {
62
+ let t = typeof e == "boolean" ? e : p.schema(e);
63
+ return t === !0 || typeof t == "object" && Object.keys(t).length === 0 || typeof t != "object" || !("type" in t) ? {
64
+ type: "anything",
65
+ ...typeof t == "object" ? t : {}
66
+ } : t;
67
+ };
68
+ return (n, a) => (u(), c(i, null, [
69
+ f(e)(l.schema) && l.schema.properties ? (u(!0), c(i, { key: 0 }, d(x.value, (e) => (u(), o(r, {
70
+ key: e.name,
71
+ breadcrumb: l.breadcrumb,
72
+ compact: l.compact,
73
+ compositionPath: l.compositionPath,
74
+ compositionPathSegment: e.name,
75
+ cycleKey: e.cycleKey,
76
+ depth: l.depth,
77
+ description: e.description,
78
+ discriminator: l.discriminator,
79
+ eventBus: l.eventBus,
80
+ expansion: l.expansion,
81
+ hideHeading: l.hideHeading,
82
+ hideModelNames: l.hideModelNames,
83
+ level: l.level,
84
+ name: e.name,
85
+ options: l.options,
86
+ required: e.required,
87
+ schema: e.schema,
88
+ schemaContext: l.schemaContext,
89
+ scrollTargetId: l.scrollTargetId,
90
+ specificationExtension: l.specificationExtension
91
+ }, null, 8, [
92
+ "breadcrumb",
93
+ "compact",
94
+ "compositionPath",
95
+ "compositionPathSegment",
96
+ "cycleKey",
97
+ "depth",
98
+ "description",
99
+ "discriminator",
100
+ "eventBus",
101
+ "expansion",
102
+ "hideHeading",
103
+ "hideModelNames",
104
+ "level",
105
+ "name",
106
+ "options",
107
+ "required",
108
+ "schema",
109
+ "schemaContext",
110
+ "scrollTargetId",
111
+ "specificationExtension"
112
+ ]))), 128)) : s("", !0),
113
+ f(e)(l.schema) && l.schema.patternProperties ? (u(!0), c(i, { key: 1 }, d(Object.entries(l.schema.patternProperties), ([e, n]) => (u(), o(r, {
114
+ key: e,
115
+ breadcrumb: l.breadcrumb,
116
+ compact: l.compact,
117
+ compositionPath: l.compositionPath,
118
+ compositionPathSegment: e,
119
+ cycleKey: f(t)(n),
120
+ depth: l.depth,
121
+ description: b(n),
122
+ discriminator: l.discriminator,
123
+ eventBus: l.eventBus,
124
+ expansion: l.expansion,
125
+ hideHeading: l.hideHeading,
126
+ hideModelNames: l.hideModelNames,
127
+ level: l.level,
128
+ name: e,
129
+ options: l.options,
130
+ schema: y(n),
131
+ schemaContext: l.schemaContext,
132
+ scrollTargetId: l.scrollTargetId,
133
+ specificationExtension: l.specificationExtension
134
+ }, null, 8, [
135
+ "breadcrumb",
136
+ "compact",
137
+ "compositionPath",
138
+ "compositionPathSegment",
139
+ "cycleKey",
140
+ "depth",
141
+ "description",
142
+ "discriminator",
143
+ "eventBus",
144
+ "expansion",
145
+ "hideHeading",
146
+ "hideModelNames",
147
+ "level",
148
+ "name",
149
+ "options",
150
+ "schema",
151
+ "schemaContext",
152
+ "scrollTargetId",
153
+ "specificationExtension"
154
+ ]))), 128)) : s("", !0),
155
+ f(e)(l.schema) && l.schema.additionalProperties ? (u(), o(r, {
156
+ key: 2,
157
+ breadcrumb: l.breadcrumb,
158
+ compact: l.compact,
159
+ compositionPath: l.compositionPath,
160
+ compositionPathSegment: h(l.schema.additionalProperties, l.schema.propertyNames),
161
+ cycleKey: f(t)(l.schema.additionalProperties),
162
+ depth: l.depth,
163
+ discriminator: l.discriminator,
164
+ eventBus: l.eventBus,
165
+ expansion: l.expansion,
166
+ hideHeading: l.hideHeading,
167
+ hideModelNames: l.hideModelNames,
168
+ level: l.level,
169
+ name: h(l.schema.additionalProperties, l.schema.propertyNames),
170
+ noncollapsible: "",
171
+ options: l.options,
172
+ propertyNamesEnum: _.value,
173
+ propertyNamesSchema: v.value,
174
+ schema: S(l.schema.additionalProperties),
175
+ schemaContext: l.schemaContext,
176
+ scrollTargetId: l.scrollTargetId,
177
+ specificationExtension: l.specificationExtension,
178
+ variant: "additionalProperties"
179
+ }, null, 8, [
180
+ "breadcrumb",
181
+ "compact",
182
+ "compositionPath",
183
+ "compositionPathSegment",
184
+ "cycleKey",
185
+ "depth",
186
+ "discriminator",
187
+ "eventBus",
188
+ "expansion",
189
+ "hideHeading",
190
+ "hideModelNames",
191
+ "level",
192
+ "name",
193
+ "options",
194
+ "propertyNamesEnum",
195
+ "propertyNamesSchema",
196
+ "schema",
197
+ "schemaContext",
198
+ "scrollTargetId",
199
+ "specificationExtension"
200
+ ])) : s("", !0)
201
+ ], 64));
202
+ }
203
+ });
204
+ //#endregion
205
+ export { m as default };
206
+
207
+ //# sourceMappingURL=SchemaObjectProperties.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaObjectProperties.vue.script.js","names":[],"sources":["../../src/schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from './helpers/is-type-object'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { sortPropertyNames } from './helpers/sort-property-names'\nimport SchemaProperty from './SchemaProperty.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n defineProps<\n {\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n schemaContext?: string\n compositionPath?: string[]\n } & SchemaRenderingProps\n >()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * The resolved propertyNames schema for the property keys.\n *\n * Surfaces key constraints such as `format` (for example `uuid`) so they are\n * not lost when rendering a map of additional properties.\n */\nconst additionalPropertiesKeySchema = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return schema.propertyNames ? resolve.schema(schema.propertyNames) : undefined\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n */\nconst getPropertySchema = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n if (!property) {\n return undefined\n }\n return resolve.schema(property)\n}\n\nconst getPropertyDescription = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n if (!property) {\n return undefined\n }\n\n return typeof property.description === 'string'\n ? property.description\n : undefined\n}\n\ntype PropertyRow = {\n name: string\n cycleKey: unknown\n description: string | undefined\n required: boolean\n schema: SchemaObject | undefined\n}\n\n/**\n * Each child read once, in panel order.\n *\n * The template used to fetch `schema.properties[name]` three times per row\n * (cycle key, description, schema) and walk the `required` array with\n * `includes` for every row. Through the document's proxy stack those reads\n * were the panel's largest per-row JS cost, and none of them can change while\n * the panel is up. `false` for a name outside `required` lands on the same\n * `required: false` default in SchemaProperty that `undefined` did.\n */\nconst rows = computed((): PropertyRow[] => {\n if (!isTypeObject(schema) || !schema.properties) {\n return []\n }\n\n const { properties } = schema\n const requiredSet = new Set(schema.required ?? [])\n\n return sortedProperties.value.map((name): PropertyRow => {\n const property = properties[name]\n\n return {\n name,\n cycleKey: getCycleKey(property),\n description: getPropertyDescription(property),\n required: requiredSet.has(name),\n schema: getPropertySchema(property),\n }\n })\n})\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n * $ref values are resolved before the type check so the referenced schema is rendered correctly.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n // Resolve $ref first so the type check below works on the actual schema\n const resolved =\n typeof additionalProperties === 'boolean'\n ? additionalProperties\n : resolve.schema(additionalProperties)\n\n if (\n resolved === true ||\n (typeof resolved === 'object' && Object.keys(resolved).length === 0) ||\n typeof resolved !== 'object' ||\n !('type' in resolved)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof resolved === 'object' ? resolved : {}),\n }\n }\n\n return resolved\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"row in rows\"\n :key=\"row.name\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"row.name\"\n :cycleKey=\"row.cycleKey\"\n :depth\n :description=\"row.description\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"row.name\"\n :options=\"options\"\n :required=\"row.required\"\n :schema=\"row.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"key\"\n :cycleKey=\"getCycleKey(property)\"\n :depth\n :description=\"getPropertyDescription(property)\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"getPropertySchema(property)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n :cycleKey=\"getCycleKey(schema.additionalProperties)\"\n :depth\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :propertyNamesSchema=\"additionalPropertiesKeySchema\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCA,IAAM,IAAmB,QACvB,EAAkB,EAAA,QAAQ,EAAA,eAAe,EAAA,OAAO,CAClD,GAQM,KACJ,GAIA,MACG;GACH,IAAM,IACJ,OAAO,KAA0B,YAC7B,IACA,EAAQ,OAAO,CAAqB;GAE1C,IACE,OAAO,KAAyB,YAChC,OAAO,EAAqB,iCAAkC,YAC9D,EAAqB,6BAA6B,CAAC,KAAK,CAAC,CAAC,SAAS,GAEnE,OAAO,GAAG,EAAqB,6BAA6B,CAAC,KAAK;GAIpE,IAAI,GAAgB;IAClB,IAAM,IAAW,EAAQ,OAAO,CAAc;IAC9C,IAAI,GAAU,OACZ,OAAO,EAAS;GAEpB;GAEA,OAAO;EACT,GASM,KACJ,MACyB;GACzB,IAAI,CAAC,GACH;GAGF,IAAM,IAAW,EAAQ,OAAO,CAAc;GAC9C,IACE,KACA,UAAU,KACV,MAAM,QAAQ,EAAS,IAAI,KAC3B,EAAS,KAAK,SAAS,GAEvB,OAAO,EAAS;EAIpB,GAGM,IAA2B,QAAe;GAC1C,OAAC,EAAa,EAAA,MAAM,KAAK,CAAC,EAAA,OAAO,uBAGrC,OAAO,EAAqB,EAAA,OAAO,aAAa;EAClD,CAAC,GAQK,IAAgC,QAAe;GAC/C,OAAC,EAAa,EAAA,MAAM,KAAK,CAAC,EAAA,OAAO,uBAGrC,OAAO,EAAA,OAAO,gBAAgB,EAAQ,OAAO,EAAA,OAAO,aAAa,IAAI,KAAA;EACvE,CAAC,GASK,KACJ,MAC6B;GACxB,OAGL,OAAO,EAAQ,OAAO,CAAQ;EAChC,GAEM,KACJ,MACuB;GAClB,OAIL,OAAO,OAAO,EAAS,eAAgB,WACnC,EAAS,cACT,KAAA;EACN,GAoBM,IAAO,QAA8B;GACzC,IAAI,CAAC,EAAa,EAAA,MAAM,KAAK,CAAC,EAAA,OAAO,YACnC,OAAO,CAAC;GAGV,IAAM,EAAE,kBAAe,EAAA,QACjB,IAAc,IAAI,IAAI,EAAA,OAAO,YAAY,CAAC,CAAC;GAEjD,OAAO,EAAiB,MAAM,KAAK,MAAsB;IACvD,IAAM,IAAW,EAAW;IAE5B,OAAO;KACL;KACA,UAAU,EAAY,CAAQ;KAC9B,aAAa,EAAuB,CAAQ;KAC5C,UAAU,EAAY,IAAI,CAAI;KAC9B,QAAQ,EAAkB,CAAQ;IACpC;GACF,CAAC;EACH,CAAC,GAQK,KACJ,MAIiB;GAEjB,IAAM,IACJ,OAAO,KAAyB,YAC5B,IACA,EAAQ,OAAO,CAAoB;GAezC,OAZE,MAAa,MACZ,OAAO,KAAa,YAAY,OAAO,KAAK,CAAQ,CAAC,CAAC,WAAW,KAClE,OAAO,KAAa,YACpB,EAAE,UAAU,KAEL;IAEL,MAAM;IACN,GAAI,OAAO,KAAa,WAAW,IAAW,CAAC;GACjD,IAGK;EACT;;GAKkB,EAAA,CAAA,CAAY,CAAC,EAAA,MAAM,KAAK,EAAA,OAAO,cAAA,EAAA,EAAA,GAC7C,EAsBqD,GAAA,EAAA,KAAA,EAAA,GAAA,EArBrC,EAAA,QAAP,YADT,EAsBqD,GAAA;IApBlD,KAAK,EAAI;IACT,YAAA,EAAA;IACA,SAAA,EAAA;IACA,iBAAiB,EAAA;IACjB,wBAAwB,EAAI;IAC5B,UAAU,EAAI;IACd,OAAA,EAAA;IACA,aAAa,EAAI;IACjB,eAAA,EAAA;IACA,UAAU,EAAA;IACV,WAAW,EAAA;IACX,aAAA,EAAA;IACA,gBAAA,EAAA;IACA,OAAA,EAAA;IACA,MAAM,EAAI;IACV,SAAS,EAAA;IACT,UAAU,EAAI;IACd,QAAQ,EAAI;IACZ,eAAe,EAAA;IACf,gBAAgB,EAAA;IAChB,wBAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;GAIb,EAAA,CAAA,CAAY,CAAC,EAAA,MAAM,KAAK,EAAA,OAAO,qBAAA,EAAA,EAAA,GAC7C,EAqBqD,GAAA,EAAA,KAAA,EAAA,GAAA,EApBzB,OAAO,QAAQ,EAAA,OAAO,iBAAiB,IAAA,CAAzD,GAAK,aADf,EAqBqD,GAAA;IAnB7C;IACL,YAAA,EAAA;IACA,SAAA,EAAA;IACA,iBAAiB,EAAA;IACjB,wBAAwB;IACxB,UAAU,EAAA,CAAA,CAAW,CAAC,CAAQ;IAC9B,OAAA,EAAA;IACA,aAAa,EAAuB,CAAQ;IAC5C,eAAA,EAAA;IACA,UAAU,EAAA;IACV,WAAW,EAAA;IACX,aAAA,EAAA;IACA,gBAAgB,EAAA;IAChB,OAAA,EAAA;IACA,MAAM;IACN,SAAS,EAAA;IACT,QAAQ,EAAkB,CAAQ;IAClC,eAAe,EAAA;IACf,gBAAgB,EAAA;IAChB,wBAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;GAIb,EAAA,CAAA,CAAY,CAAC,EAAA,MAAM,KAAK,EAAA,OAAO,wBAAA,EAAA,GAC7C,EAgCmC,GAAA;;IA/BhC,YAAA,EAAA;IACA,SAAA,EAAA;IACA,iBAAiB,EAAA;IACjB,wBAAiC,EAAuC,EAAA,OAAO,sBAAgC,EAAA,OAAO,aAAA;IAMtH,UAAU,EAAA,CAAA,CAAW,CAAC,EAAA,OAAO,oBAAoB;IACjD,OAAA,EAAA;IACA,eAAA,EAAA;IACA,UAAU,EAAA;IACV,WAAW,EAAA;IACX,aAAA,EAAA;IACA,gBAAA,EAAA;IACA,OAAA,EAAA;IACA,MAAe,EAAuC,EAAA,OAAO,sBAAgC,EAAA,OAAO,aAAA;IAMrG,gBAAA;IACC,SAAS,EAAA;IACT,mBAAmB,EAAA;IACnB,qBAAqB,EAAA;IACrB,QAAQ,EAA6B,EAAA,OAAO,oBAAoB;IAChE,eAAe,EAAA;IACf,gBAAgB,EAAA;IAChB,wBAAwB,EAAA;IACzB,SAAQ"}
@@ -0,0 +1,88 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
3
+ import { type Component } from 'vue';
4
+ import type { SchemaOptions, SchemaRenderingProps } from './types';
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ declare const __VLS_export: import("vue").DefineComponent<{
8
+ is?: string | Component;
9
+ schema: SchemaObject | undefined;
10
+ /** Extensions on the containing parameter or header; schema values take precedence. */
11
+ extensionSource?: Record<string, unknown>;
12
+ noncollapsible?: boolean;
13
+ level?: number;
14
+ /**
15
+ * Real nesting depth. Its own counter because `level` advances by a
16
+ * different stride per edge (object +2, composition +1).
17
+ */
18
+ depth?: number;
19
+ name?: string;
20
+ required?: boolean;
21
+ compact?: boolean;
22
+ discriminator?: DiscriminatorObject;
23
+ description?: string;
24
+ hideModelNames?: boolean;
25
+ hideHeading?: boolean;
26
+ /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. "Data"). */
27
+ modelName?: string | null;
28
+ variant?: "additionalProperties" | "patternProperties";
29
+ breadcrumb?: string[];
30
+ eventBus: WorkspaceEventBus | null;
31
+ options: SchemaOptions;
32
+ /** Enum values for property names (from JSON Schema propertyNames keyword). */
33
+ propertyNamesEnum?: string[];
34
+ /** Resolved propertyNames schema, used to show key constraints like `format`. */
35
+ propertyNamesSchema?: SchemaObject;
36
+ /** When "requestBody", composition selection is synced with the example snippet */
37
+ schemaContext?: string;
38
+ /** Internal path used to sync nested request body compositions with the code sample */
39
+ compositionPath?: string[];
40
+ /** Internal path segment for this property when building nested composition keys */
41
+ compositionPathSegment?: string;
42
+ /** Stable identity of this property's schema, used for cycle detection. */
43
+ cycleKey?: unknown;
44
+ } & SchemaRenderingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
45
+ is?: string | Component;
46
+ schema: SchemaObject | undefined;
47
+ /** Extensions on the containing parameter or header; schema values take precedence. */
48
+ extensionSource?: Record<string, unknown>;
49
+ noncollapsible?: boolean;
50
+ level?: number;
51
+ /**
52
+ * Real nesting depth. Its own counter because `level` advances by a
53
+ * different stride per edge (object +2, composition +1).
54
+ */
55
+ depth?: number;
56
+ name?: string;
57
+ required?: boolean;
58
+ compact?: boolean;
59
+ discriminator?: DiscriminatorObject;
60
+ description?: string;
61
+ hideModelNames?: boolean;
62
+ hideHeading?: boolean;
63
+ /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. "Data"). */
64
+ modelName?: string | null;
65
+ variant?: "additionalProperties" | "patternProperties";
66
+ breadcrumb?: string[];
67
+ eventBus: WorkspaceEventBus | null;
68
+ options: SchemaOptions;
69
+ /** Enum values for property names (from JSON Schema propertyNames keyword). */
70
+ propertyNamesEnum?: string[];
71
+ /** Resolved propertyNames schema, used to show key constraints like `format`. */
72
+ propertyNamesSchema?: SchemaObject;
73
+ /** When "requestBody", composition selection is synced with the example snippet */
74
+ schemaContext?: string;
75
+ /** Internal path used to sync nested request body compositions with the code sample */
76
+ compositionPath?: string[];
77
+ /** Internal path segment for this property when building nested composition keys */
78
+ compositionPathSegment?: string;
79
+ /** Stable identity of this property's schema, used for cycle detection. */
80
+ cycleKey?: unknown;
81
+ } & SchemaRenderingProps> & Readonly<{}>, {
82
+ required: boolean;
83
+ level: number;
84
+ depth: number;
85
+ hideModelNames: boolean;
86
+ compact: boolean;
87
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
88
+ //# sourceMappingURL=SchemaProperty.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../src/schema/SchemaProperty.vue"],"names":[],"mappings":"AA80CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAMvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,KAAK,CAAA;AAiCZ,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;wBAU7C,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;SAEP,MAAM,GAAG,SAAS;YACf,YAAY,GAAG,SAAS;IAChC,uFAAuF;sBACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;qBACxB,OAAO;YAChB,MAAM;IACd;;;OAGG;YACK,MAAM;WACP,MAAM;eACF,OAAO;cACR,OAAO;oBACD,mBAAmB;kBACrB,MAAM;qBACH,OAAO;kBACV,OAAO;IACrB,kGAAkG;gBACtF,MAAM,GAAG,IAAI;cACf,sBAAsB,GAAG,mBAAmB;iBACzC,MAAM,EAAE;cACX,iBAAiB,GAAG,IAAI;aACzB,aAAa;IACtB,+EAA+E;wBAC3D,MAAM,EAAE;IAC5B,iFAAiF;0BAC3D,YAAY;IAClC,mFAAmF;oBACnE,MAAM;IACtB,uFAAuF;sBACrE,MAAM,EAAE;IAC1B,oFAAoF;6BAC3D,MAAM;IAC/B,2EAA2E;eAChE,OAAO;;SAnCb,MAAM,GAAG,SAAS;YACf,YAAY,GAAG,SAAS;IAChC,uFAAuF;sBACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;qBACxB,OAAO;YAChB,MAAM;IACd;;;OAGG;YACK,MAAM;WACP,MAAM;eACF,OAAO;cACR,OAAO;oBACD,mBAAmB;kBACrB,MAAM;qBACH,OAAO;kBACV,OAAO;IACrB,kGAAkG;gBACtF,MAAM,GAAG,IAAI;cACf,sBAAsB,GAAG,mBAAmB;iBACzC,MAAM,EAAE;cACX,iBAAiB,GAAG,IAAI;aACzB,aAAa;IACtB,+EAA+E;wBAC3D,MAAM,EAAE;IAC5B,iFAAiF;0BAC3D,YAAY;IAClC,mFAAmF;oBACnE,MAAM;IACtB,uFAAuF;sBACrE,MAAM,EAAE;IAC1B,oFAAoF;6BAC3D,MAAM;IAC/B,2EAA2E;eAChE,OAAO;;cAvBP,OAAO;WAPV,MAAM;WAKN,MAAM;oBAMG,OAAO;aAHd,OAAO;6EAwgDnB,CAAC"}