@scalar/blocks 0.7.3 → 0.7.4

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 (201) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +1 -2
  3. package/dist/code-example/components/AsyncApiCodeExample.vue.js +1 -2
  4. package/dist/code-example/components/AsyncApiCodeExample.vue.js.map +1 -1
  5. package/dist/code-example/components/AsyncApiCodeExample.vue_vue_type_script_setup_true_lang.js +1 -2
  6. package/dist/code-example/components/AsyncApiCodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/code-example/components/CodeExample.vue.d.ts +2 -0
  8. package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
  9. package/dist/code-example/components/CodeExample.vue.js +4 -5
  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 +102 -100
  12. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -1
  13. package/dist/code-example/components/ExamplePicker.vue.js +1 -2
  14. package/dist/code-example/components/ExamplePicker.vue.js.map +1 -1
  15. package/dist/code-example/components/ExamplePicker.vue_vue_type_script_setup_true_lang.js +1 -2
  16. package/dist/code-example/components/HttpMethod.vue.js +1 -2
  17. package/dist/code-example/components/HttpMethod.vue.js.map +1 -1
  18. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js +1 -2
  19. package/dist/code-example/helpers/filter-clients-by-query.js +1 -2
  20. package/dist/code-example/helpers/find-client.js +1 -2
  21. package/dist/code-example/helpers/format-language.js +1 -2
  22. package/dist/code-example/helpers/generate-client-options.js +1 -2
  23. package/dist/code-example/helpers/generate-code-snippet.d.ts +2 -1
  24. package/dist/code-example/helpers/generate-code-snippet.d.ts.map +1 -1
  25. package/dist/code-example/helpers/generate-code-snippet.js +11 -11
  26. package/dist/code-example/helpers/generate-code-snippet.js.map +1 -1
  27. package/dist/code-example/helpers/get-asyncapi-example-context.js +1 -2
  28. package/dist/code-example/helpers/get-clients.js +8 -9
  29. package/dist/code-example/helpers/get-custom-code-samples.js +1 -2
  30. package/dist/code-example/helpers/get-generated-payload-example.js +1 -2
  31. package/dist/code-example/helpers/get-message-example-content.js +1 -2
  32. package/dist/code-example/helpers/get-secrets.js +1 -2
  33. package/dist/code-example/helpers/get-snippet.js +1 -2
  34. package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts +2 -1
  35. package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  36. package/dist/code-example/helpers/operation-to-har/operation-to-har.js +32 -31
  37. package/dist/code-example/helpers/operation-to-har/operation-to-har.js.map +1 -1
  38. package/dist/code-example/helpers/operation-to-har/process-body.d.ts +2 -2
  39. package/dist/code-example/helpers/operation-to-har/process-body.d.ts.map +1 -1
  40. package/dist/code-example/helpers/operation-to-har/process-body.js +80 -52
  41. package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
  42. package/dist/code-example/helpers/operation-to-har/process-parameters.d.ts +2 -1
  43. package/dist/code-example/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  44. package/dist/code-example/helpers/operation-to-har/process-parameters.js +65 -58
  45. package/dist/code-example/helpers/operation-to-har/process-parameters.js.map +1 -1
  46. package/dist/code-example/helpers/operation-to-har/process-security-schemes.js +1 -2
  47. package/dist/code-example/helpers/operation-to-har/process-server-url.js +1 -2
  48. package/dist/code-example/index.js +10 -10
  49. package/dist/code-example/mount-asyncapi.js +7 -8
  50. package/dist/code-example/mount.js +5 -6
  51. package/dist/constants.js +2 -3
  52. package/dist/schema/LinkButton.vue.js +1 -2
  53. package/dist/schema/RenderString.vue.js +1 -2
  54. package/dist/schema/RenderString.vue.js.map +1 -1
  55. package/dist/schema/RenderString.vue_vue_type_script_setup_true_lang.js +1 -2
  56. package/dist/schema/Schema.vue.js +4 -5
  57. package/dist/schema/Schema.vue.js.map +1 -1
  58. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js +67 -68
  59. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +1 -1
  60. package/dist/schema/SchemaCollapsedPreview.vue.js +1 -2
  61. package/dist/schema/SchemaCollapsedPreview.vue.js.map +1 -1
  62. package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js +1 -2
  63. package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js.map +1 -1
  64. package/dist/schema/SchemaComposition.vue.js +4 -5
  65. package/dist/schema/SchemaComposition.vue.js.map +1 -1
  66. package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js +26 -27
  67. package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/schema/SchemaEnumPropertyItem.vue.js +1 -2
  69. package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -1
  70. package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js +1 -2
  71. package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/schema/SchemaEnums.vue.js +4 -5
  73. package/dist/schema/SchemaEnums.vue.js.map +1 -1
  74. package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js +12 -13
  75. package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js.map +1 -1
  76. package/dist/schema/SchemaGlyphPuck.vue.js +1 -2
  77. package/dist/schema/SchemaGlyphPuck.vue.js.map +1 -1
  78. package/dist/schema/SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js +1 -2
  79. package/dist/schema/SchemaGutterToggle.vue.js +1 -2
  80. package/dist/schema/SchemaGutterToggle.vue.js.map +1 -1
  81. package/dist/schema/SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js +1 -2
  82. package/dist/schema/SchemaHeading.vue.js +4 -5
  83. package/dist/schema/SchemaHeading.vue.js.map +1 -1
  84. package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js +1 -2
  85. package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  86. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js +1 -2
  87. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  88. package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js +1 -2
  89. package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/schema/SchemaObjectProperties.vue.js +1 -2
  91. package/dist/schema/SchemaObjectProperties.vue.js.map +1 -1
  92. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js +1 -2
  93. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map +1 -1
  94. package/dist/schema/SchemaProperty.vue.js +4 -5
  95. package/dist/schema/SchemaProperty.vue.js.map +1 -1
  96. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js +48 -49
  97. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/schema/SchemaPropertyDefault.vue.js +4 -5
  99. package/dist/schema/SchemaPropertyDefault.vue.js.map +1 -1
  100. package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js +9 -10
  101. package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js.map +1 -1
  102. package/dist/schema/SchemaPropertyDetail.vue.js +4 -5
  103. package/dist/schema/SchemaPropertyDetail.vue.js.map +1 -1
  104. package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js +1 -2
  105. package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js.map +1 -1
  106. package/dist/schema/SchemaPropertyExamples.vue.js +4 -5
  107. package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -1
  108. package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js +18 -19
  109. package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/schema/SchemaPropertyHeading.vue.js +4 -5
  111. package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -1
  112. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +101 -102
  113. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/schema/SchemaPropertyPattern.vue.js +4 -5
  115. package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -1
  116. package/dist/schema/SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js +1 -2
  117. package/dist/schema/SchemaRailPanel.vue.js +1 -2
  118. package/dist/schema/SchemaRailPanel.vue.js.map +1 -1
  119. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js +1 -2
  120. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  121. package/dist/schema/components/CopyLinkButton.vue.js +1 -2
  122. package/dist/schema/components/CopyLinkButton.vue.js.map +1 -1
  123. package/dist/schema/components/CopyLinkButton.vue_vue_type_script_setup_true_lang.js +1 -2
  124. package/dist/schema/components/WithBreadcrumb.vue.js +1 -2
  125. package/dist/schema/components/WithBreadcrumb.vue.js.map +1 -1
  126. package/dist/schema/components/WithBreadcrumb.vue_vue_type_script_setup_true_lang.js +1 -2
  127. package/dist/schema/discriminator-metadata.js +1 -2
  128. package/dist/schema/helpers/dynamic-scope.js +1 -2
  129. package/dist/schema/helpers/format-example.js +1 -2
  130. package/dist/schema/helpers/format-value.js +1 -2
  131. package/dist/schema/helpers/get-compositions-to-render.js +19 -20
  132. package/dist/schema/helpers/get-discriminator-values.js +1 -2
  133. package/dist/schema/helpers/get-enum-values.js +1 -2
  134. package/dist/schema/helpers/get-property-description.js +1 -2
  135. package/dist/schema/helpers/get-ref-name.js +1 -2
  136. package/dist/schema/helpers/get-rendered-example.js +1 -2
  137. package/dist/schema/helpers/get-schema-type.js +1 -2
  138. package/dist/schema/helpers/get-type-signature-tokens.d.ts +2 -2
  139. package/dist/schema/helpers/get-type-signature-tokens.d.ts.map +1 -1
  140. package/dist/schema/helpers/get-type-signature-tokens.js +3 -4
  141. package/dist/schema/helpers/get-type-signature-tokens.js.map +1 -1
  142. package/dist/schema/helpers/has-complex-array-items.js +1 -2
  143. package/dist/schema/helpers/index.js +13 -13
  144. package/dist/schema/helpers/is-empty-schema-object.js +1 -2
  145. package/dist/schema/helpers/is-model-linkable.js +1 -2
  146. package/dist/schema/helpers/is-on-schema-target-path.js +1 -2
  147. package/dist/schema/helpers/is-type-object.js +1 -2
  148. package/dist/schema/helpers/merge-all-of-schemas.js +1 -2
  149. package/dist/schema/helpers/normalize-object-composition.js +1 -2
  150. package/dist/schema/helpers/optimize-value-for-display.js +1 -2
  151. package/dist/schema/helpers/partition-all-of-compositions.js +1 -2
  152. package/dist/schema/helpers/schema-composition.js +1 -2
  153. package/dist/schema/helpers/schema-cycle.js +1 -2
  154. package/dist/schema/helpers/schema-expansion.js +1 -2
  155. package/dist/schema/helpers/schema-keyboard-nav.js +1 -2
  156. package/dist/schema/helpers/schema-name.js +2 -3
  157. package/dist/schema/helpers/schema-name.js.map +1 -1
  158. package/dist/schema/helpers/should-display-description.js +1 -2
  159. package/dist/schema/helpers/should-display-heading.js +1 -2
  160. package/dist/schema/helpers/should-render-array-item-composition.js +1 -2
  161. package/dist/schema/helpers/sort-property-names.js +1 -2
  162. package/dist/schema/helpers/unwrap-for-read.js +1 -2
  163. package/dist/schema/index.js +8 -8
  164. package/dist/schema/localization/index.js +1 -2
  165. package/dist/schema/localization/locales/ar.js +1 -2
  166. package/dist/schema/localization/locales/de.js +1 -2
  167. package/dist/schema/localization/locales/en.js +1 -2
  168. package/dist/schema/localization/locales/es.js +1 -2
  169. package/dist/schema/localization/locales/fr.js +1 -2
  170. package/dist/schema/localization/locales/pt.js +1 -2
  171. package/dist/schema/localization/locales/ru.js +1 -2
  172. package/dist/schema/localization/locales/zh-cn.js +1 -2
  173. package/dist/schema/localization/locales/zh-tw.js +1 -2
  174. package/dist/schema/localization/translations.js +1 -2
  175. package/dist/schema/protobuf-metadata.js +1 -2
  176. package/dist/schema/recursive-metadata.js +1 -2
  177. package/dist/schema/request-body-composition-index.js +1 -2
  178. package/dist/shared/Badge.vue.d.ts.map +1 -1
  179. package/dist/shared/Badge.vue.js +4 -5
  180. package/dist/shared/Badge.vue.js.map +1 -1
  181. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js +2 -3
  182. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  183. package/dist/shared/ExternalDocs.vue.js +1 -2
  184. package/dist/shared/ExternalDocs.vue.js.map +1 -1
  185. package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js +1 -2
  186. package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  187. package/dist/shared/ScreenReader.vue.js +1 -2
  188. package/dist/shared/ScreenReader.vue.js.map +1 -1
  189. package/dist/shared/ScreenReader.vue_vue_type_script_setup_true_lang.js +1 -2
  190. package/dist/shared/index.js +4 -4
  191. package/dist/specification-extensions/ExtensionValue.vue.js +1 -2
  192. package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -1
  193. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +5 -6
  194. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  195. package/dist/specification-extensions/SpecificationExtensions.vue.js +1 -2
  196. package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -1
  197. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +1 -2
  198. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  199. package/dist/style.css +40 -20
  200. package/dist/vue-styles.css +1 -1
  201. package/package.json +22 -22
@@ -1,7 +1,7 @@
1
1
  import { schemaDiscriminator as e } from "../discriminator-metadata.js";
2
2
  import { compositions as t } from "./schema-composition.js";
3
3
  import { resolve as n } from "@scalar/workspace-store/resolve";
4
- //#region src/schema/helpers/optimize-value-for-display.ts
4
+ // src/schema/helpers/optimize-value-for-display.ts
5
5
  function r(...e) {
6
6
  let t = {}, n = {}, r = /* @__PURE__ */ new Set(), i = !1, a = !1;
7
7
  for (let o of e) if (o) {
@@ -55,7 +55,6 @@ function i(i) {
55
55
  }
56
56
  return { ...i };
57
57
  }
58
- //#endregion
59
58
  export { i as optimizeValueForDisplay };
60
59
 
61
60
  //# sourceMappingURL=optimize-value-for-display.js.map
@@ -1,7 +1,7 @@
1
1
  import { mergeAllOfSchemas as e } from "./merge-all-of-schemas.js";
2
2
  import { getResolvedRef as t } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { resolve as n } from "@scalar/workspace-store/resolve";
4
- //#region src/schema/helpers/partition-all-of-compositions.ts
4
+ // src/schema/helpers/partition-all-of-compositions.ts
5
5
  var r = ["oneOf", "anyOf"], i = (e, a, o) => {
6
6
  let s = t(e);
7
7
  if (typeof s == "boolean") {
@@ -73,7 +73,6 @@ var r = ["oneOf", "anyOf"], i = (e, a, o) => {
73
73
  }));
74
74
  return v(), { segments: h };
75
75
  };
76
- //#endregion
77
76
  export { a as partitionAllOfCompositions };
78
77
 
79
78
  //# sourceMappingURL=partition-all-of-compositions.js.map
@@ -1,11 +1,10 @@
1
- //#region src/schema/helpers/schema-composition.ts
1
+ // src/schema/helpers/schema-composition.ts
2
2
  var e = [
3
3
  "oneOf",
4
4
  "anyOf",
5
5
  "allOf",
6
6
  "not"
7
7
  ];
8
- //#endregion
9
8
  export { e as compositions };
10
9
 
11
10
  //# sourceMappingURL=schema-composition.js.map
@@ -1,8 +1,7 @@
1
- //#region src/schema/helpers/schema-cycle.ts
1
+ // src/schema/helpers/schema-cycle.ts
2
2
  var e = Symbol("schema-ancestors"), t = (e) => {
3
3
  if (e && typeof e == "object") return "$ref" in e && typeof e.$ref == "string" ? e.$ref : e;
4
4
  };
5
- //#endregion
6
5
  export { e as SCHEMA_ANCESTORS_SYMBOL, t as getCycleKey };
7
6
 
8
7
  //# sourceMappingURL=schema-cycle.js.map
@@ -1,6 +1,6 @@
1
1
  import { isOnSchemaTargetPath as e } from "./is-on-schema-target-path.js";
2
2
  import { nextTick as t, onBeforeUnmount as n, onMounted as r, shallowReactive as i, shallowRef as a, watch as o } from "vue";
3
- //#region src/schema/helpers/schema-expansion.ts
3
+ // src/schema/helpers/schema-expansion.ts
4
4
  var s = (e, t) => t === "" || e === t || e.startsWith(`${t}.`), c = (e) => e?.join(".") ?? "", l = 300, u = (n = a("")) => {
5
5
  let r = i(/* @__PURE__ */ new Map()), o = i(/* @__PURE__ */ new Map()), c = a("default"), u = (e) => {
6
6
  if (o.size === 0) return;
@@ -86,7 +86,6 @@ var s = (e, t) => t === "" || e === t || e.startsWith(`${t}.`), c = (e) => e?.jo
86
86
  });
87
87
  }), t;
88
88
  };
89
- //#endregion
90
89
  export { d as SCHEMA_TREE_ROOT_SYMBOL, u as createSchemaExpansionStore, c as toNodeKey, f as useSchemaExpansion };
91
90
 
92
91
  //# sourceMappingURL=schema-expansion.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/helpers/schema-keyboard-nav.ts
1
+ // src/schema/helpers/schema-keyboard-nav.ts
2
2
  var e = (e) => [...e.querySelectorAll("[data-schema-toggle]")].filter((e) => e.offsetParent !== null && !e.closest("[hidden]")), t = (e) => e.closest(".property-children")?.closest(".property--tree")?.querySelector(":scope > [data-schema-toggle]") ?? null, n = (e) => e.closest(".property--tree")?.querySelector(":scope > .property-children [data-schema-toggle]") ?? null, r = (r) => {
3
3
  let i = r.target;
4
4
  if (r.defaultPrevented || !(i instanceof HTMLElement) || !i.hasAttribute("data-schema-toggle") || r.altKey || r.ctrlKey || r.metaKey || r.shiftKey) return;
@@ -30,7 +30,6 @@ var e = (e) => [...e.querySelectorAll("[data-schema-toggle]")].filter((e) => e.o
30
30
  }
31
31
  r.preventDefault();
32
32
  };
33
- //#endregion
34
33
  export { r as handleTreeKeydown };
35
34
 
36
35
  //# sourceMappingURL=schema-keyboard-nav.js.map
@@ -1,7 +1,7 @@
1
1
  import { getRefName as e, getSchemaRefName as t } from "./get-ref-name.js";
2
2
  import { resolve as n } from "@scalar/workspace-store/resolve";
3
3
  import { isArraySchema as r } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
4
- //#region src/schema/helpers/schema-name.ts
4
+ // src/schema/helpers/schema-name.ts
5
5
  var i = (r) => {
6
6
  if (!r || typeof r != "object") return null;
7
7
  let i = n.schema(r), a = "$ref" in r ? t(r.$ref) : null;
@@ -25,7 +25,7 @@ var i = (r) => {
25
25
  let t = i(e);
26
26
  if (t) return t;
27
27
  let a = n.schema(e);
28
- if (r(a) && a.items) {
28
+ if (r(a) && a.items && typeof a.items == "object") {
29
29
  let e = i(a.items);
30
30
  if (e) return {
31
31
  schemaKey: e.schemaKey,
@@ -34,7 +34,6 @@ var i = (r) => {
34
34
  }
35
35
  return null;
36
36
  };
37
- //#endregion
38
37
  export { i as getModelNameFromSchema, a as getModelNameWithArray };
39
38
 
40
39
  //# sourceMappingURL=schema-name.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-name.js","names":["getModelNameFromSchema","schemaOrRef","schema","resolve","schemaKey","getSchemaRefName","label","getRefName","getModelNameWithArray","direct","isArraySchema","itemName"],"sources":["../../../src/schema/helpers/schema-name.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject, SchemaReferenceType } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport { getRefName, getSchemaRefName } from './get-ref-name'\n\ntype SchemaModelName = {\n /**\n * The key in `components.schemas` (extracted from `$ref`), used for sidebar\n * navigation. Only set when the `$ref` actually targets\n * `#/components/schemas/`; `null` for refs into other component buckets or\n * external files, so those never render a dead link.\n */\n schemaKey: string | null\n /** The human-readable name to display (schema.title, schema.name, or ref key). */\n label: string\n}\n\n/**\n * Extract schema name from various schema formats\n *\n * Handles $ref, title, name, type, and schema dictionary lookup\n */\nexport const getModelNameFromSchema = (\n schemaOrRef: SchemaObject | SchemaReferenceType<SchemaObject>,\n): SchemaModelName | null => {\n if (!schemaOrRef || typeof schemaOrRef !== 'object') {\n return null\n }\n\n const schema = resolve.schema(schemaOrRef)\n\n // Only refs into `#/components/schemas/` are navigable in the models section.\n const schemaKey = '$ref' in schemaOrRef ? getSchemaRefName(schemaOrRef.$ref) : null\n\n if (schema.title) {\n return { schemaKey, label: schema.title }\n }\n\n if (schema.name) {\n return { schemaKey, label: schema.name }\n }\n\n if ('$ref' in schemaOrRef) {\n // Fall back to the last ref segment as a display label, even for\n // non-schema refs. The name still shows, it just is not a link.\n const label = getRefName(schemaOrRef.$ref)\n if (label) {\n return { schemaKey, label }\n }\n }\n\n return null\n}\n\n/**\n * Model name for a schema, resolving array branches too: an inline\n * `{ type: 'array', items: { $ref: Model } }` becomes `Model[]` instead of the\n * structural `array object[]`. Returns `null` when no model name applies (for\n * example an array of primitives), so callers can fall back to `getSchemaType`.\n */\nexport const getModelNameWithArray = (\n schemaOrRef: SchemaObject | SchemaReferenceType<SchemaObject>,\n): SchemaModelName | null => {\n const direct = getModelNameFromSchema(schemaOrRef)\n if (direct) {\n return direct\n }\n\n const schema = resolve.schema(schemaOrRef)\n if (isArraySchema(schema) && schema.items) {\n const itemName = getModelNameFromSchema(schema.items)\n if (itemName) {\n return { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n }\n }\n\n return null\n}\n"],"mappings":";;;;AAuBA,IAAaA,KACX,MAC2B;CAC3B,IAAI,CAACC,KAAe,OAAOA,KAAgB,UACzC,OAAO;CAGT,IAAMC,IAASC,EAAQ,OAAOF,CAAW,GAGnCG,IAAY,UAAUH,IAAcI,EAAiBJ,EAAY,IAAI,IAAI;CAE/E,IAAIC,EAAO,OACT,OAAO;EAAE;EAAW,OAAOA,EAAO;CAAM;CAG1C,IAAIA,EAAO,MACT,OAAO;EAAE;EAAW,OAAOA,EAAO;CAAK;CAGzC,IAAI,UAAUD,GAAa;EAGzB,IAAMK,IAAQC,EAAWN,EAAY,IAAI;EACzC,IAAIK,GACF,OAAO;GAAE;GAAW;EAAM;CAE9B;CAEA,OAAO;AACT,GAQaE,KACX,MAC2B;CAC3B,IAAMC,IAAST,EAAuBC,CAAW;CACjD,IAAIQ,GACF,OAAOA;CAGT,IAAMP,IAASC,EAAQ,OAAOF,CAAW;CACzC,IAAIS,EAAcR,CAAM,KAAKA,EAAO,OAAO;EACzC,IAAMS,IAAWX,EAAuBE,EAAO,KAAK;EACpD,IAAIS,GACF,OAAO;GAAE,WAAWA,EAAS;GAAW,OAAO,GAAGA,EAAS,MAAM;EAAI;CAEzE;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"schema-name.js","names":["getModelNameFromSchema","schemaOrRef","schema","resolve","schemaKey","getSchemaRefName","label","getRefName","getModelNameWithArray","direct","isArraySchema","itemName"],"sources":["../../../src/schema/helpers/schema-name.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject, SchemaReferenceType } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport { getRefName, getSchemaRefName } from './get-ref-name'\n\ntype SchemaModelName = {\n /**\n * The key in `components.schemas` (extracted from `$ref`), used for sidebar\n * navigation. Only set when the `$ref` actually targets\n * `#/components/schemas/`; `null` for refs into other component buckets or\n * external files, so those never render a dead link.\n */\n schemaKey: string | null\n /** The human-readable name to display (schema.title, schema.name, or ref key). */\n label: string\n}\n\n/**\n * Extract schema name from various schema formats\n *\n * Handles $ref, title, name, type, and schema dictionary lookup\n */\nexport const getModelNameFromSchema = (\n schemaOrRef: SchemaObject | SchemaReferenceType<SchemaObject>,\n): SchemaModelName | null => {\n if (!schemaOrRef || typeof schemaOrRef !== 'object') {\n return null\n }\n\n const schema = resolve.schema(schemaOrRef)\n\n // Only refs into `#/components/schemas/` are navigable in the models section.\n const schemaKey = '$ref' in schemaOrRef ? getSchemaRefName(schemaOrRef.$ref) : null\n\n if (schema.title) {\n return { schemaKey, label: schema.title }\n }\n\n if (schema.name) {\n return { schemaKey, label: schema.name }\n }\n\n if ('$ref' in schemaOrRef) {\n // Fall back to the last ref segment as a display label, even for\n // non-schema refs. The name still shows, it just is not a link.\n const label = getRefName(schemaOrRef.$ref)\n if (label) {\n return { schemaKey, label }\n }\n }\n\n return null\n}\n\n/**\n * Model name for a schema, resolving array branches too: an inline\n * `{ type: 'array', items: { $ref: Model } }` becomes `Model[]` instead of the\n * structural `array object[]`. Returns `null` when no model name applies (for\n * example an array of primitives), so callers can fall back to `getSchemaType`.\n */\nexport const getModelNameWithArray = (\n schemaOrRef: SchemaObject | SchemaReferenceType<SchemaObject>,\n): SchemaModelName | null => {\n const direct = getModelNameFromSchema(schemaOrRef)\n if (direct) {\n return direct\n }\n\n const schema = resolve.schema(schemaOrRef)\n if (isArraySchema(schema) && schema.items && typeof schema.items === 'object') {\n const itemName = getModelNameFromSchema(schema.items)\n if (itemName) {\n return { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n }\n }\n\n return null\n}\n"],"mappings":";;;;AAuBA,IAAaA,KACX,MAC2B;CAC3B,IAAI,CAACC,KAAe,OAAOA,KAAgB,UACzC,OAAO;CAGT,IAAMC,IAASC,EAAQ,OAAOF,CAAW,GAGnCG,IAAY,UAAUH,IAAcI,EAAiBJ,EAAY,IAAI,IAAI;CAE/E,IAAIC,EAAO,OACT,OAAO;EAAE;EAAW,OAAOA,EAAO;CAAM;CAG1C,IAAIA,EAAO,MACT,OAAO;EAAE;EAAW,OAAOA,EAAO;CAAK;CAGzC,IAAI,UAAUD,GAAa;EAGzB,IAAMK,IAAQC,EAAWN,EAAY,IAAI;EACzC,IAAIK,GACF,OAAO;GAAE;GAAW;EAAM;CAE9B;CAEA,OAAO;AACT,GAQaE,KACX,MAC2B;CAC3B,IAAMC,IAAST,EAAuBC,CAAW;CACjD,IAAIQ,GACF,OAAOA;CAGT,IAAMP,IAASC,EAAQ,OAAOF,CAAW;CACzC,IAAIS,EAAcR,CAAM,KAAKA,EAAO,SAAS,OAAOA,EAAO,SAAU,UAAU;EAC7E,IAAMS,IAAWX,EAAuBE,EAAO,KAAK;EACpD,IAAIS,GACF,OAAO;GAAE,WAAWA,EAAS;GAAW,OAAO,GAAGA,EAAS,MAAM;EAAI;CAEzE;CAEA,OAAO;AACT"}
@@ -1,6 +1,5 @@
1
- //#region src/schema/helpers/should-display-description.ts
1
+ // src/schema/helpers/should-display-description.ts
2
2
  var e = (e, t) => !e || e.allOf ? null : t && e.description ? t === e.description ? t : `${t}\n\n${e.description}` : t || e.description || null;
3
- //#endregion
4
3
  export { e as shouldDisplayDescription };
5
4
 
6
5
  //# sourceMappingURL=should-display-description.js.map
@@ -1,6 +1,5 @@
1
- //#region src/schema/helpers/should-display-heading.ts
1
+ // src/schema/helpers/should-display-heading.ts
2
2
  var e = (e, t, n = !1) => t || n ? !0 : e ? e.deprecated === !0 || e.const !== void 0 || e.enum?.length === 1 || "type" in e && e.type !== void 0 || "nullable" in e && e.nullable === !0 || e.writeOnly === !0 || e.readOnly === !0 : !1;
3
- //#endregion
4
3
  export { e as shouldDisplayHeading };
5
4
 
6
5
  //# sourceMappingURL=should-display-heading.js.map
@@ -1,12 +1,11 @@
1
1
  import { hasComplexArrayItems as e } from "./has-complex-array-items.js";
2
2
  import { isArraySchema as t } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
3
- //#region src/schema/helpers/should-render-array-item-composition.ts
3
+ // src/schema/helpers/should-render-array-item-composition.ts
4
4
  var n = (n, r) => {
5
5
  if (!n || !t(n)) return !1;
6
6
  let i = n.items;
7
7
  return !i || typeof i != "object" || !(r in i) ? !1 : !e(n);
8
8
  };
9
- //#endregion
10
9
  export { n as shouldRenderArrayItemComposition };
11
10
 
12
11
  //# sourceMappingURL=should-render-array-item-composition.js.map
@@ -1,6 +1,6 @@
1
1
  import { isTypeObject as e } from "./is-type-object.js";
2
2
  import { resolve as t } from "@scalar/workspace-store/resolve";
3
- //#region src/schema/helpers/sort-property-names.ts
3
+ // src/schema/helpers/sort-property-names.ts
4
4
  var n = (e, t) => e.reduce((e, n) => {
5
5
  let r = t?.[n];
6
6
  return r && (e[n] = r), e;
@@ -49,7 +49,6 @@ var n = (e, t) => e.reduce((e, n) => {
49
49
  names: b
50
50
  }]]))), b;
51
51
  };
52
- //#endregion
53
52
  export { n as reduceNamesToObject, o as sortPropertyNames };
54
53
 
55
54
  //# sourceMappingURL=sort-property-names.js.map
@@ -1,8 +1,7 @@
1
1
  import { toRaw as e } from "vue";
2
2
  import { unpackDetectChangesProxy as t } from "@scalar/workspace-store/helpers/detect-changes-proxy";
3
- //#region src/schema/helpers/unwrap-for-read.ts
3
+ // src/schema/helpers/unwrap-for-read.ts
4
4
  var n = (n) => t(e(n));
5
- //#endregion
6
5
  export { n as unwrapForRead };
7
6
 
8
7
  //# sourceMappingURL=unwrap-for-read.js.map
@@ -5,12 +5,12 @@ import { schemaTranslations as r } from "./localization/translations.js";
5
5
  import { protobufFieldNumber as i, protobufPresence as a } from "./protobuf-metadata.js";
6
6
  import { schemaRecursiveTarget as o } from "./recursive-metadata.js";
7
7
  import { REQUEST_BODY_COMPOSITION_INDEX_SYMBOL as s } from "./request-body-composition-index.js";
8
- import c from "./SchemaGlyphPuck.vue.js";
9
- import l from "./SchemaRailPanel.vue.js";
8
+ import c from "./Schema.vue.js";
9
+ import l from "./SchemaGlyphPuck.vue.js";
10
10
  import u from "./SchemaGutterToggle.vue.js";
11
- import d from "./SchemaPropertyExamples.vue.js";
12
- import f from "./SchemaProperty.vue.js";
13
- import p from "./Schema.vue.js";
14
- import m from "./SchemaHeading.vue.js";
15
- import h from "./SchemaObjectExampleCodeBlock.vue.js";
16
- export { n as LinkButton, s as REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, p as Schema, c as SchemaGlyphPuck, u as SchemaGutterToggle, m as SchemaHeading, h as SchemaObjectExampleCodeBlock, f as SchemaProperty, d as SchemaPropertyExamples, l as SchemaRailPanel, t as inferDiscriminatorMappingComposition, i as protobufFieldNumber, a as protobufPresence, e as schemaDiscriminator, o as schemaRecursiveTarget, r as schemaTranslations };
11
+ import d from "./SchemaHeading.vue.js";
12
+ import f from "./SchemaObjectExampleCodeBlock.vue.js";
13
+ import p from "./SchemaProperty.vue.js";
14
+ import m from "./SchemaPropertyExamples.vue.js";
15
+ import h from "./SchemaRailPanel.vue.js";
16
+ export { n as LinkButton, s as REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, c as Schema, l as SchemaGlyphPuck, u as SchemaGutterToggle, d as SchemaHeading, f as SchemaObjectExampleCodeBlock, p as SchemaProperty, m as SchemaPropertyExamples, h as SchemaRailPanel, t as inferDiscriminatorMappingComposition, i as protobufFieldNumber, a as protobufPresence, e as schemaDiscriminator, o as schemaRecursiveTarget, r as schemaTranslations };
@@ -1,6 +1,6 @@
1
1
  import { schemaTranslations as e } from "./translations.js";
2
2
  import { createLocalization as t } from "@scalar/localization";
3
- //#region src/schema/localization/index.ts
3
+ // src/schema/localization/index.ts
4
4
  var { useLocalization: n } = t({
5
5
  localeTranslations: e,
6
6
  defaultLocale: "en",
@@ -12,7 +12,6 @@ var { useLocalization: n } = t({
12
12
  ]),
13
13
  logPrefix: "[@scalar/blocks/schema]"
14
14
  });
15
- //#endregion
16
15
  export { n as useLocalization };
17
16
 
18
17
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/ar.ts
1
+ // src/schema/localization/locales/ar.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "المتغيرات",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "نسخ الرابط إلى {name}" }
66
66
  };
67
- //#endregion
68
67
  export { e as ar };
69
68
 
70
69
  //# sourceMappingURL=ar.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/de.ts
1
+ // src/schema/localization/locales/de.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "Varianten",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "Link zu {name} kopieren" }
66
66
  };
67
- //#endregion
68
67
  export { e as de };
69
68
 
70
69
  //# sourceMappingURL=de.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/en.ts
1
+ // src/schema/localization/locales/en.ts
2
2
  var e = {
3
3
  schema: {
4
4
  noAllowedValues: "No values satisfy this enum constraint.",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "Copy link to {name}" }
66
66
  };
67
- //#endregion
68
67
  export { e as en };
69
68
 
70
69
  //# sourceMappingURL=en.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/es.ts
1
+ // src/schema/localization/locales/es.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "Variantes",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "Copiar enlace a {name}" }
66
66
  };
67
- //#endregion
68
67
  export { e as es };
69
68
 
70
69
  //# sourceMappingURL=es.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/fr.ts
1
+ // src/schema/localization/locales/fr.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "Variantes",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "Copier le lien vers {name}" }
66
66
  };
67
- //#endregion
68
67
  export { e as fr };
69
68
 
70
69
  //# sourceMappingURL=fr.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/pt.ts
1
+ // src/schema/localization/locales/pt.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "Variantes",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "Copiar link para {name}" }
66
66
  };
67
- //#endregion
68
67
  export { e as pt };
69
68
 
70
69
  //# sourceMappingURL=pt.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/ru.ts
1
+ // src/schema/localization/locales/ru.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "Варианты",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "Скопировать ссылку на {name}" }
66
66
  };
67
- //#endregion
68
67
  export { e as ru };
69
68
 
70
69
  //# sourceMappingURL=ru.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/zh-cn.ts
1
+ // src/schema/localization/locales/zh-cn.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "变体",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "复制指向 {name} 的链接" }
66
66
  };
67
- //#endregion
68
67
  export { e as zhCn };
69
68
 
70
69
  //# sourceMappingURL=zh-cn.js.map
@@ -1,4 +1,4 @@
1
- //#region src/schema/localization/locales/zh-tw.ts
1
+ // src/schema/localization/locales/zh-tw.ts
2
2
  var e = {
3
3
  schema: {
4
4
  variants: "變體",
@@ -64,7 +64,6 @@ var e = {
64
64
  },
65
65
  actions: { copyLinkTo: "複製指向 {name} 的連結" }
66
66
  };
67
- //#endregion
68
67
  export { e as zhTw };
69
68
 
70
69
  //# sourceMappingURL=zh-tw.js.map
@@ -7,7 +7,7 @@ import { pt as a } from "./locales/pt.js";
7
7
  import { ru as o } from "./locales/ru.js";
8
8
  import { zhCn as s } from "./locales/zh-cn.js";
9
9
  import { zhTw as c } from "./locales/zh-tw.js";
10
- //#region src/schema/localization/translations.ts
10
+ // src/schema/localization/translations.ts
11
11
  var l = {
12
12
  en: n,
13
13
  de: t,
@@ -19,7 +19,6 @@ var l = {
19
19
  "zh-CN": s,
20
20
  "zh-TW": c
21
21
  };
22
- //#endregion
23
22
  export { l as schemaTranslations };
24
23
 
25
24
  //# sourceMappingURL=translations.js.map
@@ -1,6 +1,5 @@
1
- //#region src/schema/protobuf-metadata.ts
1
+ // src/schema/protobuf-metadata.ts
2
2
  var e = Symbol("protobuf-field-number"), t = Symbol("protobuf-presence");
3
- //#endregion
4
3
  export { e as protobufFieldNumber, t as protobufPresence };
5
4
 
6
5
  //# sourceMappingURL=protobuf-metadata.js.map
@@ -1,6 +1,5 @@
1
- //#region src/schema/recursive-metadata.ts
1
+ // src/schema/recursive-metadata.ts
2
2
  var e = Symbol("schema-recursive-target");
3
- //#endregion
4
3
  export { e as schemaRecursiveTarget };
5
4
 
6
5
  //# sourceMappingURL=recursive-metadata.js.map
@@ -1,6 +1,5 @@
1
- //#region src/schema/request-body-composition-index.ts
1
+ // src/schema/request-body-composition-index.ts
2
2
  var e = Symbol();
3
- //#endregion
4
3
  export { e as REQUEST_BODY_COMPOSITION_INDEX_SYMBOL };
5
4
 
6
5
  //# sourceMappingURL=request-body-composition-index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/shared/Badge.vue"],"names":[],"mappings":"AAgFA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA4DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/shared/Badge.vue"],"names":[],"mappings":"AA8DA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAwDF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,9 +1,8 @@
1
- import e from "../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./Badge.vue_vue_type_script_setup_true_lang.js";
1
+ import e from "./Badge.vue_vue_type_script_setup_true_lang.js";
3
2
  /* empty css */
4
- //#region src/shared/Badge.vue
5
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-eecf5e58"]]);
6
- //#endregion
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ // src/shared/Badge.vue
5
+ var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-7a577ad4"]]);
7
6
  export { n as default };
8
7
 
9
8
  //# sourceMappingURL=Badge.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","Badge_vue_vue_type_script_setup_true_lang_default","Badge_default"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; the text color is derived from\n// it in CSS below, where the browser can read lightness out of any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n { 'badge-colored': Boolean(color) },\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.badge.badge-colored {\n background-color: var(--badge-color);\n /* Fallback for browsers without relative color syntax: a darker shade of the\n background, which is readable on pale colors but muddy on mid-tones. */\n color: color-mix(in srgb, var(--badge-color), black 40%);\n}\n\n/* Black text on a light background, white on a dark one. `l` is the background's\n lightness in LCH (0-100); multiplying its distance from the midpoint by infinity\n and letting the channel clamp turns that into 0 or 100, with no color parsing\n in JavaScript and no opinion about which format the color was written in. */\n@supports (color: lch(from red calc((50 - l) * infinity) 0 0)) {\n .badge.badge-colored {\n /* Keep text opaque even when the background color is transparent. */\n color: lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1);\n }\n}\n\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Badge.vue.js","names":["Badge_vue_vue_type_script_setup_true_lang_default","_plugin_vue_export_helper_default","Badge_default"],"sources":[],"mappings":""}
@@ -1,16 +1,15 @@
1
1
  import { computed as e, createElementBlock as t, defineComponent as n, mergeProps as r, openBlock as i, renderSlot as a, unref as o } from "vue";
2
2
  import { useBindCx as s } from "@scalar/use-hooks/useBindCx";
3
- //#region src/shared/Badge.vue?vue&type=script&setup=true&lang.ts
3
+ // src/shared/Badge.vue?vue&type=script&setup=true&lang.ts
4
4
  var c = /*@__PURE__*/ n({
5
5
  inheritAttrs: !1,
6
6
  __name: "Badge",
7
7
  props: { color: {} },
8
8
  setup(n) {
9
9
  let { cx: c } = s(), l = e(() => n.color ? { "--badge-color": n.color } : void 0);
10
- return (e, s) => (i(), t("div", r(o(c)("badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm", { "badge-colored": !!n.color }), { style: l.value }), [a(e.$slots, "default", {}, void 0, !0)], 16));
10
+ return (e, s) => (i(), t("div", r(o(c)("badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm", n.color && "bg-(--badge-color) text-auto-contrast-(--badge-color)"), { style: l.value }), [a(e.$slots, "default", {}, void 0, !0)], 16));
11
11
  }
12
12
  });
13
- //#endregion
14
13
  export { c as default };
15
14
 
16
15
  //# sourceMappingURL=Badge.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","Badge_vue_vue_type_script_setup_true_lang_default","useBindCx","badgeStyle","computed","__props","openBlock","createElementBlock","mergeProps","unref","cx","renderSlot","_ctx"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; the text color is derived from\n// it in CSS below, where the browser can read lightness out of any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n { 'badge-colored': Boolean(color) },\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.badge.badge-colored {\n background-color: var(--badge-color);\n /* Fallback for browsers without relative color syntax: a darker shade of the\n background, which is readable on pale colors but muddy on mid-tones. */\n color: color-mix(in srgb, var(--badge-color), black 40%);\n}\n\n/* Black text on a light background, white on a dark one. `l` is the background's\n lightness in LCH (0-100); multiplying its distance from the midpoint by infinity\n and letting the channel clamp turns that into 0 or 100, with no color parsing\n in JavaScript and no opinion about which format the color was written in. */\n@supports (color: lch(from red calc((50 - l) * infinity) 0 0)) {\n .badge.badge-colored {\n /* Keep text opaque even when the background color is transparent. */\n color: lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1);\n }\n}\n\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":";;;;;;;;EAWA,IAAM,EAAE,UAAOM,EAAU,GAInBC,IAAaC,QACjBC,EAAA,QAAQ,EAAE,iBAAiBA,EAAA,MAAM,IAAI,KAAA,CACvC;E,kBAIET,EAAA,GAAAC,EASM,OATNC,EACiBC,EAAAW,CAAA,CAAE,C,+EAAoH,EAAA,iBAAA,EAAQL,EAAA,MAAK,C,GAMjJ,EAAA,OAAOF,EAAA,MAAU,CAAA,GAAA,CAClBH,EAAQY,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
1
+ {"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","Badge_vue_vue_type_script_setup_true_lang_default","useBindCx","badgeStyle","computed","__props","openBlock","createElementBlock","mergeProps","unref","cx","renderSlot","_ctx"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; `text-auto-contrast-*` derives\n// readable text from it in CSS, where the browser can read any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n color && 'bg-(--badge-color) text-auto-contrast-(--badge-color)',\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":";;;;;;;;EAWA,IAAM,EAAE,UAAOM,EAAU,GAInBC,IAAaC,QACjBC,EAAA,QAAQ,EAAE,iBAAiBA,EAAA,MAAM,IAAI,KAAA,CACvC;E,kBAIET,EAAA,GAAAC,EASM,OATNC,EACiBC,EAAAW,CAAA,CAAE,C,+EAAiGL,EAAA,SAAK,uD,GAMtH,EAAA,OAAOF,EAAA,MAAU,CAAA,GAAA,CAClBH,EAAQY,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
@@ -1,7 +1,6 @@
1
1
  import e from "./ExternalDocs.vue_vue_type_script_setup_true_lang.js";
2
- //#region src/shared/ExternalDocs.vue
2
+ // src/shared/ExternalDocs.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=ExternalDocs.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalDocs.vue.js","names":["_sfc_main","ExternalDocs_vue_vue_type_script_setup_true_lang_default","ExternalDocs_default"],"sources":["../../src/shared/ExternalDocs.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { sanitizeUrl } from '@scalar/helpers/url/is-safe-url'\nimport { ScalarIconBook } from '@scalar/icons'\nimport {\n getResolvedRef,\n type NodeInput,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ExternalDocumentationObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { value } = defineProps<{\n value?: NodeInput<ExternalDocumentationObject>\n}>()\n\nconst documentation = computed<ExternalDocumentationObject | undefined>(() => {\n const resolved = getResolvedRef(value)\n return resolved && typeof resolved.url === 'string' && resolved.url\n ? resolved\n : undefined\n})\n/** Unsafe URL protocols fall back to a plain-text label. */\nconst url = computed<string | undefined>(() =>\n sanitizeUrl(documentation.value?.url),\n)\n</script>\n\n<template>\n <template v-if=\"documentation\">\n <div\n class=\"group narrow:border-r-0 narrow:first:ml-0 flex items-center border-r first:ml-auto last:border-r-0\">\n <component\n :is=\"url ? 'a' : 'span'\"\n :aria-label=\"documentation.description || documentation.url\"\n class=\"text-c-1 hover:bg-b-2 narrow:border mr-2 flex min-h-7 min-w-7 items-center rounded-lg px-2 py-1 no-underline group-last:mr-0\"\n :href=\"url\"\n :rel=\"url ? 'noopener noreferrer' : undefined\"\n :target=\"url ? '_blank' : undefined\">\n <ScalarIconBook\n class=\"size-3 text-current\"\n weight=\"bold\" />\n <span\n v-if=\"documentation.description\"\n class=\"ml-1 empty:hidden\">\n {{ documentation.description }}\n </span>\n <span\n v-else\n class=\"ml-1 empty:hidden\">\n {{ documentation.url }}\n </span>\n </component>\n </div>\n </template>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ExternalDocs.vue.js","names":["ExternalDocs_vue_vue_type_script_setup_true_lang_default","ExternalDocs_default"],"sources":[],"mappings":""}
@@ -2,7 +2,7 @@ import { computed as e, createBlock as t, createCommentVNode as n, createElement
2
2
  import { ScalarIconBook as d } from "@scalar/icons";
3
3
  import { getResolvedRef as f } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
4
  import { sanitizeUrl as p } from "@scalar/helpers/url/is-safe-url";
5
- //#region src/shared/ExternalDocs.vue?vue&type=script&setup=true&lang.ts
5
+ // src/shared/ExternalDocs.vue?vue&type=script&setup=true&lang.ts
6
6
  var m = {
7
7
  key: 0,
8
8
  class: "group narrow:border-r-0 narrow:first:ml-0 flex items-center border-r first:ml-auto last:border-r-0"
@@ -40,7 +40,6 @@ var m = {
40
40
  ]))])) : n("", !0);
41
41
  }
42
42
  });
43
- //#endregion
44
43
  export { _ as default };
45
44
 
46
45
  //# sourceMappingURL=ExternalDocs.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalDocs.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_withCtx","_createVNode","_unref","_toDisplayString","_createCommentVNode","_hoisted_1","_hoisted_2","_hoisted_3","ExternalDocs_vue_vue_type_script_setup_true_lang_default","documentation","computed","resolved","getResolvedRef","__props","url","sanitizeUrl","openBlock","createElementBlock","createBlock","resolveDynamicComponent","withCtx","createVNode","unref","ScalarIconBook","toDisplayString","createCommentVNode"],"sources":["../../src/shared/ExternalDocs.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { sanitizeUrl } from '@scalar/helpers/url/is-safe-url'\nimport { ScalarIconBook } from '@scalar/icons'\nimport {\n getResolvedRef,\n type NodeInput,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ExternalDocumentationObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { value } = defineProps<{\n value?: NodeInput<ExternalDocumentationObject>\n}>()\n\nconst documentation = computed<ExternalDocumentationObject | undefined>(() => {\n const resolved = getResolvedRef(value)\n return resolved && typeof resolved.url === 'string' && resolved.url\n ? resolved\n : undefined\n})\n/** Unsafe URL protocols fall back to a plain-text label. */\nconst url = computed<string | undefined>(() =>\n sanitizeUrl(documentation.value?.url),\n)\n</script>\n\n<template>\n <template v-if=\"documentation\">\n <div\n class=\"group narrow:border-r-0 narrow:first:ml-0 flex items-center border-r first:ml-auto last:border-r-0\">\n <component\n :is=\"url ? 'a' : 'span'\"\n :aria-label=\"documentation.description || documentation.url\"\n class=\"text-c-1 hover:bg-b-2 narrow:border mr-2 flex min-h-7 min-w-7 items-center rounded-lg px-2 py-1 no-underline group-last:mr-0\"\n :href=\"url\"\n :rel=\"url ? 'noopener noreferrer' : undefined\"\n :target=\"url ? '_blank' : undefined\">\n <ScalarIconBook\n class=\"size-3 text-current\"\n weight=\"bold\" />\n <span\n v-if=\"documentation.description\"\n class=\"ml-1 empty:hidden\">\n {{ documentation.description }}\n </span>\n <span\n v-else\n class=\"ml-1 empty:hidden\">\n {{ documentation.url }}\n </span>\n </component>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAcA,IAAMa,IAAgBC,QAAwD;GAC5E,IAAMC,IAAWC,EAAeC,EAAA,KAAK;GACrC,OAAOF,KAAY,OAAOA,EAAS,OAAQ,YAAYA,EAAS,MAC5DA,IACA,KAAA;EACN,CAAC,GAEKG,IAAMJ,QACVK,EAAYN,EAAc,OAAO,GAAG,CACtC;E,iBAIkBA,EAAA,SACdb,EAAA,GAAAC,EAuBM,OAvBNQ,GAuBM,EArBJT,EAAA,GAAAE,EAoBYC,EAnBLe,EAAA,QAAG,MAAA,MAAA,GAAA;GACP,cAAYL,EAAA,MAAc,eAAeA,EAAA,MAAc;GACxD,OAAM;GACL,MAAMK,EAAA;GACN,KAAKA,EAAA,QAAG,wBAA2B,KAAA;GACnC,QAAQA,EAAA,QAAG,WAAc,KAAA;;GAC1B,SAAAd,QAEkB,CAFlBC,EAEkBC,EAAAqB,CAAA,GAAA;IADhB,OAAM;IACN,QAAO;G,IAEDd,EAAA,MAAc,eADtBb,EAAA,GAAAC,EAIO,QAJPS,GAIOH,EADFM,EAAA,MAAc,WAAW,GAAA,CAAA,MAE9Bb,EAAA,GAAAC,EAIO,QAJPU,GAIOJ,EADFM,EAAA,MAAc,GAAG,GAAA,CAAA,E"}
1
+ {"version":3,"file":"ExternalDocs.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_withCtx","_createVNode","_unref","_toDisplayString","_hoisted_1","_hoisted_2","_hoisted_3","ExternalDocs_vue_vue_type_script_setup_true_lang_default","documentation","computed","resolved","getResolvedRef","__props","url","sanitizeUrl","openBlock","createElementBlock","createBlock","resolveDynamicComponent","withCtx","createVNode","unref","ScalarIconBook","toDisplayString","createCommentVNode"],"sources":["../../src/shared/ExternalDocs.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { sanitizeUrl } from '@scalar/helpers/url/is-safe-url'\nimport { ScalarIconBook } from '@scalar/icons'\nimport {\n getResolvedRef,\n type NodeInput,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ExternalDocumentationObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { value } = defineProps<{\n value?: NodeInput<ExternalDocumentationObject>\n}>()\n\nconst documentation = computed<ExternalDocumentationObject | undefined>(() => {\n const resolved = getResolvedRef(value)\n return resolved && typeof resolved.url === 'string' && resolved.url\n ? resolved\n : undefined\n})\n/** Unsafe URL protocols fall back to a plain-text label. */\nconst url = computed<string | undefined>(() =>\n sanitizeUrl(documentation.value?.url),\n)\n</script>\n\n<template>\n <template v-if=\"documentation\">\n <div\n class=\"group narrow:border-r-0 narrow:first:ml-0 flex items-center border-r first:ml-auto last:border-r-0\">\n <component\n :is=\"url ? 'a' : 'span'\"\n :aria-label=\"documentation.description || documentation.url\"\n class=\"text-c-1 hover:bg-b-2 narrow:border mr-2 flex min-h-7 min-w-7 items-center rounded-lg px-2 py-1 no-underline group-last:mr-0\"\n :href=\"url\"\n :rel=\"url ? 'noopener noreferrer' : undefined\"\n :target=\"url ? '_blank' : undefined\">\n <ScalarIconBook\n class=\"size-3 text-current\"\n weight=\"bold\" />\n <span\n v-if=\"documentation.description\"\n class=\"ml-1 empty:hidden\">\n {{ documentation.description }}\n </span>\n <span\n v-else\n class=\"ml-1 empty:hidden\">\n {{ documentation.url }}\n </span>\n </component>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAcA,IAAMY,IAAgBC,QAAwD;GAC5E,IAAMC,IAAWC,EAAeC,EAAA,KAAK;GACrC,OAAOF,KAAY,OAAOA,EAAS,OAAQ,YAAYA,EAAS,MAC5DA,IACA,KAAA;EACN,CAAC,GAEKG,IAAMJ,QACVK,EAAYN,EAAc,OAAO,GAAG,CACtC;E,iBAIkBA,EAAA,SACdZ,EAAA,GAAAC,EAuBM,OAvBNO,GAuBM,EArBJR,EAAA,GAAAE,EAoBYC,EAnBLc,EAAA,QAAG,MAAA,MAAA,GAAA;GACP,cAAYL,EAAA,MAAc,eAAeA,EAAA,MAAc;GACxD,OAAM;GACL,MAAMK,EAAA;GACN,KAAKA,EAAA,QAAG,wBAA2B,KAAA;GACnC,QAAQA,EAAA,QAAG,WAAc,KAAA;;GAC1B,SAAAb,QAEkB,CAFlBC,EAEkBC,EAAAoB,CAAA,GAAA;IADhB,OAAM;IACN,QAAO;G,IAEDd,EAAA,MAAc,eADtBZ,EAAA,GAAAC,EAIO,QAJPQ,GAIOF,EADFK,EAAA,MAAc,WAAW,GAAA,CAAA,MAE9BZ,EAAA,GAAAC,EAIO,QAJPS,GAIOH,EADFK,EAAA,MAAc,GAAG,GAAA,CAAA,E"}
@@ -1,7 +1,6 @@
1
1
  import e from "./ScreenReader.vue_vue_type_script_setup_true_lang.js";
2
- //#region src/shared/ScreenReader.vue
2
+ // src/shared/ScreenReader.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=ScreenReader.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenReader.vue.js","names":["_sfc_main","ScreenReader_vue_vue_type_script_setup_true_lang_default","ScreenReader_default"],"sources":["../../src/shared/ScreenReader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nwithDefaults(\n defineProps<{\n if?: boolean\n }>(),\n {\n if: true,\n },\n)\n</script>\n<template>\n <span\n v-if=\"$props.if\"\n class=\"screenreader-only\">\n <slot />\n </span>\n <slot v-else />\n</template>\n<!--\n `.screenreader-only` is declared globally in styles/tailwind.config.css rather\n than scoped here, so other components can hide text without wrapping it in\n this component.\n-->\n"],"mappings":""}
1
+ {"version":3,"file":"ScreenReader.vue.js","names":["ScreenReader_vue_vue_type_script_setup_true_lang_default","ScreenReader_default"],"sources":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
- //#region src/shared/ScreenReader.vue?vue&type=script&setup=true&lang.ts
2
+ // src/shared/ScreenReader.vue?vue&type=script&setup=true&lang.ts
3
3
  var i = {
4
4
  key: 0,
5
5
  class: "screenreader-only"
@@ -13,7 +13,6 @@ var i = {
13
13
  return (t, a) => t.$props.if ? (n(), e("span", i, [r(t.$slots, "default")])) : r(t.$slots, "default", {}, void 0, void 0, 1);
14
14
  }
15
15
  });
16
- //#endregion
17
16
  export { a as default };
18
17
 
19
18
  //# sourceMappingURL=ScreenReader.vue_vue_type_script_setup_true_lang.js.map
@@ -1,4 +1,4 @@
1
- import e from "./ExternalDocs.vue.js";
2
- import t from "./ScreenReader.vue.js";
3
- import n from "./Badge.vue.js";
4
- export { n as Badge, e as ExternalDocs, t as ScreenReader };
1
+ import e from "./Badge.vue.js";
2
+ import t from "./ExternalDocs.vue.js";
3
+ import n from "./ScreenReader.vue.js";
4
+ export { e as Badge, t as ExternalDocs, n as ScreenReader };
@@ -1,7 +1,6 @@
1
1
  import e from "./ExtensionValue.vue_vue_type_script_setup_true_lang.js";
2
- //#region src/specification-extensions/ExtensionValue.vue
2
+ // src/specification-extensions/ExtensionValue.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=ExtensionValue.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionValue.vue.js","names":["_sfc_main","ExtensionValue_vue_vue_type_script_setup_true_lang_default","ExtensionValue_default"],"sources":["../../src/specification-extensions/ExtensionValue.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\n\nconst {\n name,\n value,\n depth = 0,\n compact = false,\n arrayItem = false,\n ancestors = [],\n} = defineProps<{\n name: string\n value: unknown\n depth?: number\n /** Primitive values can align with the surrounding panel content. */\n compact?: boolean\n /** Array entries display only their values; keep their names for assistive technology. */\n arrayItem?: boolean\n /** Only ancestors count as cycles; shared sibling values remain independently expandable. */\n ancestors?: readonly unknown[]\n}>()\n\nconst nameId = useId()\nconst panelId = useId()\nconst open = ref(depth === 0)\nconst circular = computed<boolean>(() => ancestors.includes(value))\nconst children = computed<[string, unknown][]>(() => {\n if (value === null || typeof value !== 'object' || circular.value) {\n return []\n }\n return Array.isArray(value)\n ? value.map((item, index) => [`[${index}]`, item])\n : Object.entries(value)\n})\nconst expandable = computed<boolean>(() => children.value.length > 0)\nconst label = computed<string>(() => {\n if (arrayItem && expandable.value) {\n return Array.isArray(value) ? '[…]' : '{…}'\n }\n return !arrayItem && !expandable.value ? `${name}:` : name\n})\nconst text = computed<string>(() => {\n if (circular.value) {\n return '[Circular]'\n }\n if (typeof value === 'string') {\n return JSON.stringify(value)\n }\n if (value !== null && typeof value === 'object') {\n return Array.isArray(value) ? '[]' : '{}'\n }\n return String(value)\n})\n</script>\n\n<template>\n <div\n class=\"relative min-w-0 py-0.5\"\n :class=\"{\n 'ps-8': depth === 0 && (!compact || expandable),\n 'flex items-baseline gap-x-2': !arrayItem && !expandable,\n }\">\n <dt\n :class=\"\n arrayItem && !expandable\n ? 'sr-only'\n : 'relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2'\n \">\n <SchemaGutterToggle\n v-if=\"expandable\"\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"name\"\n :nameId=\"nameId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n v-if=\"!arrayItem || expandable\"\n :id=\"arrayItem ? undefined : nameId\"\n :aria-hidden=\"arrayItem || undefined\"\n class=\"font-code min-w-0 font-medium break-words\"\n >{{ label }}</span\n >\n <span\n v-if=\"arrayItem\"\n :id=\"nameId\"\n class=\"sr-only\"\n >Array item {{ name }}</span\n >\n </dt>\n <SchemaRailPanel\n v-if=\"expandable && open\"\n :id=\"panelId\"\n as=\"dd\"\n class=\"mt-0.5\"\n :depth=\"depth + 1\">\n <dl>\n <ExtensionValue\n v-for=\"[childName, childValue] in children\"\n :key=\"childName\"\n :ancestors=\"[...ancestors, value]\"\n :arrayItem=\"Array.isArray(value)\"\n :depth=\"depth + 1\"\n :name=\"childName\"\n :value=\"childValue\" />\n </dl>\n </SchemaRailPanel>\n <dd\n v-else-if=\"!expandable\"\n class=\"text-c-2 min-w-0\"\n :class=\"{ 'flex-1': !arrayItem }\">\n <code class=\"font-code break-words whitespace-pre-wrap\">{{ text }}</code>\n </dd>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ExtensionValue.vue.js","names":["ExtensionValue_vue_vue_type_script_setup_true_lang_default","ExtensionValue_default"],"sources":[],"mappings":""}