@scalar/blocks 0.7.2 → 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 (205) hide show
  1. package/CHANGELOG.md +35 -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 +85 -83
  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.d.ts.map +1 -1
  14. package/dist/code-example/components/ExamplePicker.vue.js +1 -2
  15. package/dist/code-example/components/ExamplePicker.vue.js.map +1 -1
  16. package/dist/code-example/components/ExamplePicker.vue_vue_type_script_setup_true_lang.js +20 -21
  17. package/dist/code-example/components/ExamplePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  18. package/dist/code-example/components/HttpMethod.vue.js +1 -2
  19. package/dist/code-example/components/HttpMethod.vue.js.map +1 -1
  20. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js +1 -2
  21. package/dist/code-example/helpers/filter-clients-by-query.js +1 -2
  22. package/dist/code-example/helpers/find-client.js +1 -2
  23. package/dist/code-example/helpers/format-language.js +1 -2
  24. package/dist/code-example/helpers/generate-client-options.js +1 -2
  25. package/dist/code-example/helpers/generate-code-snippet.d.ts +2 -1
  26. package/dist/code-example/helpers/generate-code-snippet.d.ts.map +1 -1
  27. package/dist/code-example/helpers/generate-code-snippet.js +11 -11
  28. package/dist/code-example/helpers/generate-code-snippet.js.map +1 -1
  29. package/dist/code-example/helpers/get-asyncapi-example-context.js +1 -2
  30. package/dist/code-example/helpers/get-clients.js +8 -9
  31. package/dist/code-example/helpers/get-custom-code-samples.js +1 -2
  32. package/dist/code-example/helpers/get-generated-payload-example.js +1 -2
  33. package/dist/code-example/helpers/get-message-example-content.js +1 -2
  34. package/dist/code-example/helpers/get-secrets.js +1 -2
  35. package/dist/code-example/helpers/get-snippet.js +1 -2
  36. package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts +2 -1
  37. package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  38. package/dist/code-example/helpers/operation-to-har/operation-to-har.js +32 -31
  39. package/dist/code-example/helpers/operation-to-har/operation-to-har.js.map +1 -1
  40. package/dist/code-example/helpers/operation-to-har/process-body.d.ts +2 -2
  41. package/dist/code-example/helpers/operation-to-har/process-body.d.ts.map +1 -1
  42. package/dist/code-example/helpers/operation-to-har/process-body.js +80 -52
  43. package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
  44. package/dist/code-example/helpers/operation-to-har/process-parameters.d.ts +2 -1
  45. package/dist/code-example/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  46. package/dist/code-example/helpers/operation-to-har/process-parameters.js +65 -58
  47. package/dist/code-example/helpers/operation-to-har/process-parameters.js.map +1 -1
  48. package/dist/code-example/helpers/operation-to-har/process-security-schemes.js +1 -2
  49. package/dist/code-example/helpers/operation-to-har/process-server-url.js +1 -2
  50. package/dist/code-example/index.js +10 -10
  51. package/dist/code-example/mount-asyncapi.js +7 -8
  52. package/dist/code-example/mount.d.ts.map +1 -1
  53. package/dist/code-example/mount.js +33 -33
  54. package/dist/code-example/mount.js.map +1 -1
  55. package/dist/constants.js +2 -3
  56. package/dist/schema/LinkButton.vue.js +1 -2
  57. package/dist/schema/RenderString.vue.js +1 -2
  58. package/dist/schema/RenderString.vue.js.map +1 -1
  59. package/dist/schema/RenderString.vue_vue_type_script_setup_true_lang.js +1 -2
  60. package/dist/schema/Schema.vue.js +4 -5
  61. package/dist/schema/Schema.vue.js.map +1 -1
  62. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js +67 -68
  63. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +1 -1
  64. package/dist/schema/SchemaCollapsedPreview.vue.js +1 -2
  65. package/dist/schema/SchemaCollapsedPreview.vue.js.map +1 -1
  66. package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js +1 -2
  67. package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/schema/SchemaComposition.vue.js +4 -5
  69. package/dist/schema/SchemaComposition.vue.js.map +1 -1
  70. package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js +26 -27
  71. package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/schema/SchemaEnumPropertyItem.vue.js +1 -2
  73. package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -1
  74. package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js +1 -2
  75. package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  76. package/dist/schema/SchemaEnums.vue.js +4 -5
  77. package/dist/schema/SchemaEnums.vue.js.map +1 -1
  78. package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js +12 -13
  79. package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/schema/SchemaGlyphPuck.vue.js +1 -2
  81. package/dist/schema/SchemaGlyphPuck.vue.js.map +1 -1
  82. package/dist/schema/SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js +1 -2
  83. package/dist/schema/SchemaGutterToggle.vue.js +1 -2
  84. package/dist/schema/SchemaGutterToggle.vue.js.map +1 -1
  85. package/dist/schema/SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js +1 -2
  86. package/dist/schema/SchemaHeading.vue.js +4 -5
  87. package/dist/schema/SchemaHeading.vue.js.map +1 -1
  88. package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js +1 -2
  89. package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js +1 -2
  91. package/dist/schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  92. package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js +1 -2
  93. package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  94. package/dist/schema/SchemaObjectProperties.vue.js +1 -2
  95. package/dist/schema/SchemaObjectProperties.vue.js.map +1 -1
  96. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js +1 -2
  97. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/schema/SchemaProperty.vue.js +4 -5
  99. package/dist/schema/SchemaProperty.vue.js.map +1 -1
  100. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js +48 -49
  101. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +1 -1
  102. package/dist/schema/SchemaPropertyDefault.vue.js +4 -5
  103. package/dist/schema/SchemaPropertyDefault.vue.js.map +1 -1
  104. package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js +9 -10
  105. package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js.map +1 -1
  106. package/dist/schema/SchemaPropertyDetail.vue.js +4 -5
  107. package/dist/schema/SchemaPropertyDetail.vue.js.map +1 -1
  108. package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js +1 -2
  109. package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/schema/SchemaPropertyExamples.vue.js +4 -5
  111. package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -1
  112. package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js +18 -19
  113. package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/schema/SchemaPropertyHeading.vue.js +4 -5
  115. package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -1
  116. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +101 -102
  117. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/schema/SchemaPropertyPattern.vue.js +4 -5
  119. package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -1
  120. package/dist/schema/SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js +1 -2
  121. package/dist/schema/SchemaRailPanel.vue.js +1 -2
  122. package/dist/schema/SchemaRailPanel.vue.js.map +1 -1
  123. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js +1 -2
  124. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  125. package/dist/schema/components/CopyLinkButton.vue.js +1 -2
  126. package/dist/schema/components/CopyLinkButton.vue.js.map +1 -1
  127. package/dist/schema/components/CopyLinkButton.vue_vue_type_script_setup_true_lang.js +1 -2
  128. package/dist/schema/components/WithBreadcrumb.vue.js +1 -2
  129. package/dist/schema/components/WithBreadcrumb.vue.js.map +1 -1
  130. package/dist/schema/components/WithBreadcrumb.vue_vue_type_script_setup_true_lang.js +1 -2
  131. package/dist/schema/discriminator-metadata.js +1 -2
  132. package/dist/schema/helpers/dynamic-scope.js +1 -2
  133. package/dist/schema/helpers/format-example.js +1 -2
  134. package/dist/schema/helpers/format-value.js +1 -2
  135. package/dist/schema/helpers/get-compositions-to-render.js +19 -20
  136. package/dist/schema/helpers/get-discriminator-values.js +1 -2
  137. package/dist/schema/helpers/get-enum-values.js +1 -2
  138. package/dist/schema/helpers/get-property-description.js +1 -2
  139. package/dist/schema/helpers/get-ref-name.js +1 -2
  140. package/dist/schema/helpers/get-rendered-example.js +1 -2
  141. package/dist/schema/helpers/get-schema-type.js +1 -2
  142. package/dist/schema/helpers/get-type-signature-tokens.d.ts +2 -2
  143. package/dist/schema/helpers/get-type-signature-tokens.d.ts.map +1 -1
  144. package/dist/schema/helpers/get-type-signature-tokens.js +3 -4
  145. package/dist/schema/helpers/get-type-signature-tokens.js.map +1 -1
  146. package/dist/schema/helpers/has-complex-array-items.js +1 -2
  147. package/dist/schema/helpers/index.js +13 -13
  148. package/dist/schema/helpers/is-empty-schema-object.js +1 -2
  149. package/dist/schema/helpers/is-model-linkable.js +1 -2
  150. package/dist/schema/helpers/is-on-schema-target-path.js +1 -2
  151. package/dist/schema/helpers/is-type-object.js +1 -2
  152. package/dist/schema/helpers/merge-all-of-schemas.js +1 -2
  153. package/dist/schema/helpers/normalize-object-composition.js +1 -2
  154. package/dist/schema/helpers/optimize-value-for-display.js +1 -2
  155. package/dist/schema/helpers/partition-all-of-compositions.js +1 -2
  156. package/dist/schema/helpers/schema-composition.js +1 -2
  157. package/dist/schema/helpers/schema-cycle.js +1 -2
  158. package/dist/schema/helpers/schema-expansion.js +1 -2
  159. package/dist/schema/helpers/schema-keyboard-nav.js +1 -2
  160. package/dist/schema/helpers/schema-name.js +2 -3
  161. package/dist/schema/helpers/schema-name.js.map +1 -1
  162. package/dist/schema/helpers/should-display-description.js +1 -2
  163. package/dist/schema/helpers/should-display-heading.js +1 -2
  164. package/dist/schema/helpers/should-render-array-item-composition.js +1 -2
  165. package/dist/schema/helpers/sort-property-names.js +1 -2
  166. package/dist/schema/helpers/unwrap-for-read.js +1 -2
  167. package/dist/schema/index.js +8 -8
  168. package/dist/schema/localization/index.js +1 -2
  169. package/dist/schema/localization/locales/ar.js +1 -2
  170. package/dist/schema/localization/locales/de.js +1 -2
  171. package/dist/schema/localization/locales/en.js +1 -2
  172. package/dist/schema/localization/locales/es.js +1 -2
  173. package/dist/schema/localization/locales/fr.js +1 -2
  174. package/dist/schema/localization/locales/pt.js +1 -2
  175. package/dist/schema/localization/locales/ru.js +1 -2
  176. package/dist/schema/localization/locales/zh-cn.js +1 -2
  177. package/dist/schema/localization/locales/zh-tw.js +1 -2
  178. package/dist/schema/localization/translations.js +1 -2
  179. package/dist/schema/protobuf-metadata.js +1 -2
  180. package/dist/schema/recursive-metadata.js +1 -2
  181. package/dist/schema/request-body-composition-index.js +1 -2
  182. package/dist/shared/Badge.vue.d.ts.map +1 -1
  183. package/dist/shared/Badge.vue.js +4 -5
  184. package/dist/shared/Badge.vue.js.map +1 -1
  185. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js +2 -3
  186. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  187. package/dist/shared/ExternalDocs.vue.js +1 -2
  188. package/dist/shared/ExternalDocs.vue.js.map +1 -1
  189. package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js +1 -2
  190. package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  191. package/dist/shared/ScreenReader.vue.js +1 -2
  192. package/dist/shared/ScreenReader.vue.js.map +1 -1
  193. package/dist/shared/ScreenReader.vue_vue_type_script_setup_true_lang.js +1 -2
  194. package/dist/shared/index.js +4 -4
  195. package/dist/specification-extensions/ExtensionValue.vue.js +1 -2
  196. package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -1
  197. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +5 -6
  198. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  199. package/dist/specification-extensions/SpecificationExtensions.vue.js +1 -2
  200. package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -1
  201. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +1 -2
  202. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  203. package/dist/style.css +48 -24
  204. package/dist/vue-styles.css +1 -1
  205. package/package.json +24 -24
@@ -1,47 +1,47 @@
1
- import { protobufFieldNumber as e, protobufPresence as t } from "./protobuf-metadata.js";
2
- import { schemaRecursiveTarget as n } from "./recursive-metadata.js";
3
- import { useLocalization as ee } from "./localization/index.js";
4
- import { getSchemaType as te } from "./helpers/get-schema-type.js";
5
- import { getModelNameWithArray as ne } from "./helpers/schema-name.js";
6
- import { getDisplayTypeSignatureTokens as re } from "./helpers/get-type-signature-tokens.js";
7
- import ie from "../shared/Badge.vue.js";
1
+ import e from "../shared/Badge.vue.js";
2
+ import { getSchemaType as t } from "./helpers/get-schema-type.js";
3
+ import { getDisplayTypeSignatureTokens as n } from "./helpers/get-type-signature-tokens.js";
8
4
  import { isModelLinkable as r } from "./helpers/is-model-linkable.js";
9
- import i from "./RenderString.vue.js";
10
- import ae from "./SchemaPropertyDefault.vue.js";
11
- import a from "./SchemaPropertyDetail.vue.js";
12
- import oe from "./SchemaPropertyExamples.vue.js";
13
- import se from "./SchemaPropertyPattern.vue.js";
14
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as ce, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, toRef as le, unref as b, withCtx as x } from "vue";
15
- import { isDefined as S } from "@scalar/helpers/array/is-defined";
5
+ import { getModelNameWithArray as ee } from "./helpers/schema-name.js";
6
+ import { useLocalization as i } from "./localization/index.js";
7
+ import { protobufFieldNumber as te, protobufPresence as ne } from "./protobuf-metadata.js";
8
+ import { schemaRecursiveTarget as re } from "./recursive-metadata.js";
9
+ import a from "./RenderString.vue.js";
10
+ import ie from "./SchemaPropertyDefault.vue.js";
11
+ import o from "./SchemaPropertyDetail.vue.js";
12
+ import ae from "./SchemaPropertyExamples.vue.js";
13
+ import oe from "./SchemaPropertyPattern.vue.js";
14
+ import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as se, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, openBlock as _, renderList as v, renderSlot as y, toDisplayString as b, toRef as ce, unref as x, withCtx as S } from "vue";
16
15
  import { resolve as C } from "@scalar/workspace-store/resolve";
17
16
  import { isArraySchema as w, isNumberSchema as T, isStringSchema as E } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
18
- import { ScalarTooltip as D } from "@scalar/components/tooltip";
19
- //#region src/schema/SchemaPropertyHeading.vue?vue&type=script&setup=true&lang.ts
20
- var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:mr-0" }, de = { class: "text-c-3 font-code mr-2 text-xs" }, fe = { "aria-hidden": "true" }, pe = { class: "sr-only" }, me = {
17
+ import { isDefined as D } from "@scalar/helpers/array/is-defined";
18
+ import { ScalarTooltip as O } from "@scalar/components/tooltip";
19
+ // src/schema/SchemaPropertyHeading.vue?vue&type=script&setup=true&lang.ts
20
+ var le = { class: "property-heading [&>.property-detail:has(+.property-detail)]:mr-0" }, ue = { class: "text-c-3 font-code mr-2 text-xs" }, de = { "aria-hidden": "true" }, fe = { class: "sr-only" }, pe = {
21
21
  key: 2,
22
22
  class: "property-discriminator"
23
- }, O = { class: "font-code text-c-accent" }, k = { class: "screenreader-only" }, A = {
23
+ }, k = { class: "font-code text-c-accent" }, A = { class: "screenreader-only" }, j = {
24
24
  key: 0,
25
25
  class: "property-type-signature text-c-2 text-(length:--scalar-mini)"
26
- }, j = {
26
+ }, M = {
27
27
  key: 1,
28
28
  class: "property-type-signature text-c-2 text-(length:--scalar-mini)"
29
- }, M = { class: "text-c-2 mr-2 text-xs" }, N = { class: "sr-only" }, P = {
29
+ }, N = { class: "text-c-2 mr-2 text-xs" }, P = { class: "sr-only" }, F = {
30
30
  key: 0,
31
31
  class: "screenreader-only"
32
- }, F = {
32
+ }, I = {
33
33
  key: 4,
34
34
  class: "property-additional"
35
- }, I = {
35
+ }, L = {
36
36
  key: 5,
37
37
  class: "property-deprecated"
38
- }, L = {
38
+ }, R = {
39
39
  key: 6,
40
40
  class: "text-c-2"
41
- }, R = {
41
+ }, z = {
42
42
  key: 7,
43
43
  class: "property-const"
44
- }, z = {
44
+ }, me = {
45
45
  key: 9,
46
46
  class: "property-write-only"
47
47
  }, he = {
@@ -50,7 +50,7 @@ var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:
50
50
  }, ge = {
51
51
  key: 11,
52
52
  class: "property-required"
53
- }, B = /*@__PURE__*/ m({
53
+ }, B = /*@__PURE__*/ h({
54
54
  __name: "SchemaPropertyHeading",
55
55
  props: {
56
56
  value: {},
@@ -80,15 +80,15 @@ var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:
80
80
  keyKind: {},
81
81
  recursiveTo: {}
82
82
  },
83
- setup(m) {
84
- let B = m, { translate: V } = ee(), H = s(() => B.value?.[e]), U = s(() => B.recursiveTo ?? B.value?.[n]), W = s(() => B.value?.[t]), G = s(() => W.value === "explicit" ? "Explicit presence: Protobuf distinguishes an unset field from one set to its default value." : "Implicit presence: Protobuf does not distinguish an unset field from one set to its default value."), K = le(B, "value"), q = s(() => {
83
+ setup(h) {
84
+ let B = h, { translate: V } = i(), H = c(() => B.value?.[te]), U = c(() => B.recursiveTo ?? B.value?.[re]), W = c(() => B.value?.[ne]), G = c(() => W.value === "explicit" ? "Explicit presence: Protobuf distinguishes an unset field from one set to its default value." : "Implicit presence: Protobuf does not distinguish an unset field from one set to its default value."), K = ce(B, "value"), q = c(() => {
85
85
  if (!K.value) return;
86
86
  let e = K.value;
87
87
  if (e.const !== void 0) return e.const;
88
88
  if (e.enum?.length === 1) return e.enum[0];
89
89
  if (w(e) && e.items) {
90
90
  let t = C.schema(e.items);
91
- if (S(t.const)) return t.const;
91
+ if (D(t.const)) return t.const;
92
92
  if (t.enum?.length === 1) return t.enum[0];
93
93
  }
94
94
  }), J = (e) => {
@@ -105,28 +105,28 @@ var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:
105
105
  key: "format",
106
106
  value: e.format,
107
107
  truncate: !0
108
- }), T(e) && (S(e.exclusiveMinimum) && t.push({
108
+ }), T(e) && (D(e.exclusiveMinimum) && t.push({
109
109
  key: "exclusive-minimum",
110
110
  prefix: `${V("schema.greaterThan")}: `,
111
111
  value: e.exclusiveMinimum
112
- }), S(e.minimum) && t.push({
112
+ }), D(e.minimum) && t.push({
113
113
  key: "minimum",
114
114
  prefix: `${V("schema.min")}: `,
115
115
  value: e.minimum
116
- }), S(e.exclusiveMaximum) && t.push({
116
+ }), D(e.exclusiveMaximum) && t.push({
117
117
  key: "exclusive-maximum",
118
118
  prefix: `${V("schema.lessThan")}: `,
119
119
  value: e.exclusiveMaximum
120
- }), S(e.maximum) && t.push({
120
+ }), D(e.maximum) && t.push({
121
121
  key: "maximum",
122
122
  prefix: `${V("schema.max")}: `,
123
123
  value: e.maximum
124
- }), S(e.multipleOf) && t.push({
124
+ }), D(e.multipleOf) && t.push({
125
125
  key: "multiple-of",
126
126
  prefix: `${V("schema.multipleOf")}: `,
127
127
  value: e.multipleOf
128
128
  })), t;
129
- }, _e = s(() => {
129
+ }, _e = c(() => {
130
130
  if (!K.value) return [];
131
131
  let e = K.value, t = [];
132
132
  return w(e) && ((e.minItems || e.maxItems) && t.push({
@@ -136,30 +136,30 @@ var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:
136
136
  key: "unique-items",
137
137
  value: `${V("schema.unique")}!`
138
138
  })), t.push(...J(e)), w(e) && e.items && t.push(...J(C.schema(e.items))), t;
139
- }), Y = s(() => !B.value || B.hideModelNames ? null : B.modelName ? {
139
+ }), Y = c(() => !B.value || B.hideModelNames ? null : B.modelName ? {
140
140
  schemaKey: B.modelName,
141
141
  label: B.modelName
142
- } : ne(B.value)), ve = s(() => r(Y.value?.schemaKey, B.modelLinkOptions ?? {})), X = s(() => re(B.value, {
142
+ } : ee(B.value)), ve = c(() => r(Y.value?.schemaKey, B.modelLinkOptions ?? {})), X = c(() => n(B.value, {
143
143
  hideModelNames: B.hideModelNames,
144
144
  modelName: Y.value?.label
145
- })), ye = s(() => !B.value || !("type" in B.value) ? !1 : B.value.type === "array" || !q.value), Z = s(() => {
145
+ })), ye = c(() => !B.value || !("type" in B.value) ? !1 : B.value.type === "array" || !q.value), Z = c(() => {
146
146
  let e = B.propertyNames;
147
147
  if (!e) return;
148
- let t = [te(e)];
149
- "format" in e && typeof e.format == "string" && t.push(e.format);
150
- let n = t.filter(Boolean).join(" · ");
151
- return n.length > 0 ? n : void 0;
152
- }), Q = s(() => {
148
+ let n = [t(e)];
149
+ "format" in e && typeof e.format == "string" && n.push(e.format);
150
+ let r = n.filter(Boolean).join(" · ");
151
+ return r.length > 0 ? r : void 0;
152
+ }), Q = c(() => {
153
153
  if (B.value && "example" in B.value && B.value.example !== void 0) return B.value.example;
154
154
  if (B.value && w(B.value) && !B.value.examples?.length) {
155
155
  let e = C.schema(B.value.items);
156
156
  if (e && "example" in e && e.example !== void 0) return e.example;
157
157
  }
158
- }), be = s(() => {
158
+ }), be = c(() => {
159
159
  if (Q.value !== void 0) return !0;
160
160
  let e = B.value?.examples;
161
161
  return !!e && typeof e == "object" && Object.keys(e).length > 0;
162
- }), $ = s(() => {
162
+ }), $ = c(() => {
163
163
  let e = K.value;
164
164
  if (e) {
165
165
  if (E(e) && e.pattern) return e.pattern;
@@ -169,124 +169,123 @@ var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:
169
169
  }
170
170
  }
171
171
  });
172
- return (e, t) => (g(), u("div", ue, [
173
- e.$slots.name ? (g(), u("div", {
172
+ return (t, n) => (_(), d("div", le, [
173
+ t.$slots.name ? (_(), d("div", {
174
174
  key: 0,
175
- class: h(["property-name", { deprecated: B.value?.deprecated }])
176
- }, [v(e.$slots, "name", {}, void 0, !0)], 2)) : l("", !0),
177
- H.value === void 0 ? l("", !0) : (g(), c(b(D), {
175
+ class: g(["property-name", { deprecated: B.value?.deprecated }])
176
+ }, [y(t.$slots, "name", {}, void 0, !0)], 2)) : u("", !0),
177
+ H.value === void 0 ? u("", !0) : (_(), l(x(O), {
178
178
  key: 1,
179
179
  content: "Protobuf field number"
180
180
  }, {
181
- default: x(() => [d("span", de, [d("span", fe, "#" + y(H.value), 1), d("span", pe, "Protobuf field number: " + y(H.value), 1)])]),
181
+ default: S(() => [f("span", ue, [f("span", de, "#" + b(H.value), 1), f("span", fe, "Protobuf field number: " + b(H.value), 1)])]),
182
182
  _: 1
183
183
  })),
184
- B.isDiscriminator ? (g(), u("div", me, y(b(V)("schema.discriminator")), 1)) : l("", !0),
185
- B.value ? (g(), u(o, { key: 3 }, [
186
- B.keyKind ? (g(), c(a, {
184
+ B.isDiscriminator ? (_(), d("div", pe, b(x(V)("schema.discriminator")), 1)) : u("", !0),
185
+ B.value ? (_(), d(s, { key: 3 }, [
186
+ B.keyKind ? (_(), l(o, {
187
187
  key: 0,
188
188
  class: "property-key-kind"
189
189
  }, {
190
- default: x(() => [d("span", O, y(B.keyKind === "pattern" ? "patternProperty" : "additionalProperty"), 1)]),
190
+ default: S(() => [f("span", k, b(B.keyKind === "pattern" ? "patternProperty" : "additionalProperty"), 1)]),
191
191
  _: 1
192
- })) : l("", !0),
193
- ye.value ? (g(), c(a, {
192
+ })) : u("", !0),
193
+ ye.value ? (_(), l(o, {
194
194
  key: 1,
195
195
  truncate: ""
196
196
  }, {
197
- default: x(() => [d("span", k, y(b(V)("schema.type")) + ": ", 1), B.eventBus && Y.value?.schemaKey && ve.value ? (g(), u("button", {
197
+ default: S(() => [f("span", A, b(x(V)("schema.type")) + ": ", 1), B.eventBus && Y.value?.schemaKey && ve.value ? (_(), d("button", {
198
198
  key: 0,
199
199
  class: "text-c-2 hover:text-c-1 underline",
200
200
  type: "button",
201
- onClick: t[0] ||= (e) => B.eventBus.emit("scroll-to:model-by-name", { name: Y.value.schemaKey })
202
- }, [X.value.length ? (g(), u("span", A, [(g(!0), u(o, null, _(X.value, (e, t) => (g(), u(o, { key: t }, [f(y(t > 0 ? " " : ""), 1), d("span", { class: h(["property-type-token", [
201
+ onClick: n[0] ||= (e) => B.eventBus.emit("scroll-to:model-by-name", { name: Y.value.schemaKey })
202
+ }, [X.value.length ? (_(), d("span", j, [(_(!0), d(s, null, v(X.value, (e, t) => (_(), d(s, { key: t }, [p(b(t > 0 ? " " : ""), 1), f("span", { class: g(["property-type-token", [
203
203
  `property-type-token--${e.kind}`,
204
204
  e.kind === "word" ? "font-sans" : "",
205
205
  e.kind === "ident" || e.kind === "literal" ? "font-code" : "",
206
206
  e.kind === "punctuation" ? "text-c-2" : ""
207
- ]]) }, y(e.text), 3)], 64))), 128))])) : l("", !0)])) : X.value.length ? (g(), u("span", j, [(g(!0), u(o, null, _(X.value, (e, t) => (g(), u(o, { key: t }, [f(y(t > 0 ? " " : ""), 1), d("span", { class: h(["property-type-token", [
207
+ ]]) }, b(e.text), 3)], 64))), 128))])) : u("", !0)])) : X.value.length ? (_(), d("span", M, [(_(!0), d(s, null, v(X.value, (e, t) => (_(), d(s, { key: t }, [p(b(t > 0 ? " " : ""), 1), f("span", { class: g(["property-type-token", [
208
208
  `property-type-token--${e.kind}`,
209
209
  e.kind === "word" ? "font-sans" : "",
210
210
  e.kind === "ident" || e.kind === "literal" ? "font-code" : "",
211
211
  e.kind === "punctuation" ? "text-c-2" : ""
212
- ]]) }, y(e.text), 3)], 64))), 128))])) : l("", !0)]),
212
+ ]]) }, b(e.text), 3)], 64))), 128))])) : u("", !0)]),
213
213
  _: 1
214
- })) : l("", !0),
215
- U.value ? (g(), c(a, {
214
+ })) : u("", !0),
215
+ U.value ? (_(), l(o, {
216
216
  key: 2,
217
217
  class: "property-recursive",
218
- title: b(V)("schema.recursiveReference", { name: U.value })
218
+ title: x(V)("schema.recursiveReference", { name: U.value })
219
219
  }, {
220
- default: x(() => [f(y(b(V)("schema.recursive")), 1)]),
220
+ default: S(() => [p(b(x(V)("schema.recursive")), 1)]),
221
221
  _: 1
222
- }, 8, ["title"])) : l("", !0),
223
- W.value ? (g(), c(b(D), {
222
+ }, 8, ["title"])) : u("", !0),
223
+ W.value ? (_(), l(x(O), {
224
224
  key: 3,
225
225
  content: G.value
226
226
  }, {
227
- default: x(() => [d("span", M, [t[1] ||= d("span", { "aria-hidden": "true" }, "optional", -1), d("span", N, "Optional (" + y(W.value) + " presence). " + y(G.value), 1)])]),
227
+ default: S(() => [f("span", N, [n[1] ||= f("span", { "aria-hidden": "true" }, "optional", -1), f("span", P, "Optional (" + b(W.value) + " presence). " + b(G.value), 1)])]),
228
228
  _: 1
229
- }, 8, ["content"])) : l("", !0),
230
- Z.value ? (g(), c(a, {
229
+ }, 8, ["content"])) : u("", !0),
230
+ Z.value ? (_(), l(o, {
231
231
  key: 4,
232
232
  truncate: ""
233
233
  }, {
234
- prefix: x(() => [f(y(b(V)("schema.keys")) + ":", 1)]),
235
- default: x(() => [f(" " + y(Z.value), 1)]),
234
+ prefix: S(() => [p(b(x(V)("schema.keys")) + ":", 1)]),
235
+ default: S(() => [p(" " + b(Z.value), 1)]),
236
236
  _: 1
237
- })) : l("", !0),
238
- (g(!0), u(o, null, _(_e.value, (e) => (g(), c(a, {
237
+ })) : u("", !0),
238
+ (_(!0), d(s, null, v(_e.value, (e) => (_(), l(o, {
239
239
  key: e.key,
240
240
  code: e.code,
241
241
  truncate: e.truncate
242
- }, ce({
243
- default: x(() => [e.key === "format" ? (g(), u("span", P, y(b(V)("schema.format")) + ": ", 1)) : l("", !0), f(" " + y(e.value), 1)]),
242
+ }, se({
243
+ default: S(() => [e.key === "format" ? (_(), d("span", F, b(x(V)("schema.format")) + ": ", 1)) : u("", !0), p(" " + b(e.value), 1)]),
244
244
  _: 2
245
245
  }, [e.prefix ? {
246
246
  name: "prefix",
247
- fn: x(() => [f(y(e.prefix), 1)]),
247
+ fn: S(() => [p(b(e.prefix), 1)]),
248
248
  key: "0"
249
249
  } : void 0]), 1032, ["code", "truncate"]))), 128)),
250
- B.enum ? (g(), c(a, { key: 5 }, {
251
- default: x(() => [f(y(b(V)("schema.enum")), 1)]),
250
+ B.enum ? (_(), l(o, { key: 5 }, {
251
+ default: S(() => [p(b(x(V)("schema.enum")), 1)]),
252
252
  _: 1
253
- })) : l("", !0)
254
- ], 64)) : l("", !0),
255
- B.additional ? (g(), u("div", F, [B.value?.["x-additionalPropertiesName"] ? (g(), u(o, { key: 0 }, [f(y(B.value["x-additionalPropertiesName"]), 1)], 64)) : (g(), u(o, { key: 1 }, [f(y(b(V)("schema.additionalProperties")), 1)], 64))])) : l("", !0),
256
- B.value?.deprecated ? (g(), u("div", I, [p(ie, null, {
257
- default: x(() => [f(y(b(V)("schema.deprecated")), 1)]),
253
+ })) : u("", !0)
254
+ ], 64)) : u("", !0),
255
+ B.additional ? (_(), d("div", I, [B.value?.["x-additionalPropertiesName"] ? (_(), d(s, { key: 0 }, [p(b(B.value["x-additionalPropertiesName"]), 1)], 64)) : (_(), d(s, { key: 1 }, [p(b(x(V)("schema.additionalProperties")), 1)], 64))])) : u("", !0),
256
+ B.value?.deprecated ? (_(), d("div", L, [m(e, null, {
257
+ default: S(() => [p(b(x(V)("schema.deprecated")), 1)]),
258
258
  _: 1
259
- })])) : l("", !0),
260
- m.discriminatorValue === void 0 ? l("", !0) : (g(), u("span", L, [f(y(b(V)("schema.discriminatorValue")) + ": ", 1), p(i, { value: m.discriminatorValue }, null, 8, ["value"])])),
261
- q.value === void 0 ? (g(), u(o, { key: 8 }, [B.value?.nullable === !0 ? (g(), c(a, { key: 0 }, {
262
- default: x(() => [f(y(b(V)("schema.nullable")), 1)]),
259
+ })])) : u("", !0),
260
+ h.discriminatorValue === void 0 ? u("", !0) : (_(), d("span", R, [p(b(x(V)("schema.discriminatorValue")) + ": ", 1), m(a, { value: h.discriminatorValue }, null, 8, ["value"])])),
261
+ q.value === void 0 ? (_(), d(s, { key: 8 }, [B.value?.nullable === !0 ? (_(), l(o, { key: 0 }, {
262
+ default: S(() => [p(b(x(V)("schema.nullable")), 1)]),
263
263
  _: 1
264
- })) : l("", !0)], 64)) : (g(), u("div", R, [p(a, { truncate: "" }, {
265
- prefix: x(() => [f(y(b(V)("schema.const")) + ": ", 1)]),
266
- default: x(() => [p(i, { value: q.value }, null, 8, ["value"])]),
264
+ })) : u("", !0)], 64)) : (_(), d("div", z, [m(o, { truncate: "" }, {
265
+ prefix: S(() => [p(b(x(V)("schema.const")) + ": ", 1)]),
266
+ default: S(() => [m(a, { value: q.value }, null, 8, ["value"])]),
267
267
  _: 1
268
268
  })])),
269
- B.value?.writeOnly ? (g(), u("div", z, y(b(V)("schema.writeOnly")), 1)) : B.value?.readOnly ? (g(), u("div", he, y(b(V)("schema.readOnly")), 1)) : l("", !0),
270
- B.required ? (g(), u("div", ge, y(b(V)("schema.required")), 1)) : l("", !0),
271
- B.value?.default === void 0 ? l("", !0) : (g(), c(ae, {
269
+ B.value?.writeOnly ? (_(), d("div", me, b(x(V)("schema.writeOnly")), 1)) : B.value?.readOnly ? (_(), d("div", he, b(x(V)("schema.readOnly")), 1)) : u("", !0),
270
+ B.required ? (_(), d("div", ge, b(x(V)("schema.required")), 1)) : u("", !0),
271
+ B.value?.default === void 0 ? u("", !0) : (_(), l(ie, {
272
272
  key: 12,
273
273
  value: B.value?.default
274
274
  }, null, 8, ["value"])),
275
- $.value ? (g(), c(se, {
275
+ $.value ? (_(), l(oe, {
276
276
  key: 13,
277
277
  pattern: $.value
278
- }, null, 8, ["pattern"])) : l("", !0),
279
- B.withExamples && be.value ? (g(), c(oe, {
278
+ }, null, 8, ["pattern"])) : u("", !0),
279
+ B.withExamples && be.value ? (_(), l(ae, {
280
280
  key: 14,
281
281
  example: Q.value,
282
282
  examples: B.value?.examples
283
- }, null, 8, ["example", "examples"])) : l("", !0),
284
- v(e.$slots, "preview", {}, void 0, !0),
285
- v(e.$slots, "trailing", {}, void 0, !0)
283
+ }, null, 8, ["example", "examples"])) : u("", !0),
284
+ y(t.$slots, "preview", {}, void 0, !0),
285
+ y(t.$slots, "trailing", {}, void 0, !0)
286
286
  ]));
287
287
  }
288
288
  });
289
- //#endregion
290
289
  export { B as default };
291
290
 
292
291
  //# sourceMappingURL=SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js","names":["$slots","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createCommentVNode","_createBlock","_unref","_withCtx","_createElementVNode","_toDisplayString","_Fragment","SchemaPropertyDetail","_renderList","_createTextVNode","_createSlots","_createVNode","Badge","RenderString","SchemaPropertyDefault","SchemaPropertyPattern","SchemaPropertyExamples","Badge_default","RenderString_default","SchemaPropertyDefault_default","SchemaPropertyDetail_default","SchemaPropertyExamples_default","SchemaPropertyPattern_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default","props","__props","useLocalization","fieldNumber","computed","protobufFieldNumber","recursiveTarget","schemaRecursiveTarget","presence","protobufPresence","presenceDescription","valueRef","toRef","constValue","schema","isArraySchema","items","resolve","isDefined","getLeafConstraints","properties","isStringSchema","translate","isNumberSchema","validationProperties","modelLink","getModelNameWithArray","modelLinkable","isModelLinkable","signatureTokens","getDisplayTypeSignatureTokens","shouldShowType","propertyNamesDetail","parts","getSchemaType","detail","exampleValue","itemsSchema","hasExampleContent","examples","patternValue","openBlock","createElementBlock","_ctx","normalizeClass","renderSlot","createCommentVNode","createBlock","unref","ScalarTooltip","withCtx","createElementVNode","toDisplayString","Fragment","_cache","renderList","index","createTextVNode","token","property","createSlots","createVNode"],"sources":["../../src/schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarTooltip } from '@scalar/components/tooltip'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport Badge from '../shared/Badge.vue'\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getDisplayTypeSignatureTokens } from './helpers/get-type-signature-tokens'\nimport {\n isModelLinkable,\n type ModelLinkOptions,\n} from './helpers/is-model-linkable'\nimport { getModelNameWithArray } from './helpers/schema-name'\nimport { useLocalization } from './localization'\nimport {\n protobufFieldNumber,\n protobufPresence,\n type ProtobufSchema,\n} from './protobuf-metadata'\nimport {\n schemaRecursiveTarget,\n type RecursiveSchema,\n} from './recursive-metadata'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\nimport SchemaPropertyPattern from './SchemaPropertyPattern.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n enum?: boolean\n isDiscriminator?: boolean\n /** Effective AsyncAPI variant value, separate from const/enum constraints. */\n discriminatorValue?: string\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /**\n * Config for deciding whether a model name links to the models section. When the section or\n * the referenced model is hidden there is nothing to scroll to, so the name renders as plain text.\n */\n modelLinkOptions?: ModelLinkOptions\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n /**\n * The row's name is a stand-in for keys the caller chooses\n * (`additionalProperties`) or keys matching a regex (`patternProperties`),\n * not a literal property. The heading says so in the signature line, where\n * the tree already describes shapes, instead of styling the name itself.\n */\n keyKind?: 'additional' | 'pattern'\n /**\n * The name of the schema this row loops back to. A cut cycle is a leaf, so\n * the signature line says why it does not expand; the model link beside it\n * already names the schema the loop returns to.\n */\n recursiveTo?: string\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst fieldNumber = computed(\n () => (props.value as ProtobufSchema | undefined)?.[protobufFieldNumber],\n)\n\nconst recursiveTarget = computed(\n () =>\n props.recursiveTo ??\n (props.value as RecursiveSchema | undefined)?.[schemaRecursiveTarget],\n)\n\nconst presence = computed(\n () => (props.value as ProtobufSchema | undefined)?.[protobufPresence],\n)\nconst presenceDescription = computed(() =>\n presence.value === 'explicit'\n ? 'Explicit presence: Protobuf distinguishes an unset field from one set to its default value.'\n : 'Implicit presence: Protobuf does not distinguish an unset field from one set to its default value.',\n)\n\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\ntype ValidationProperty = {\n key: string\n value: string | number\n prefix?: string\n code?: boolean\n truncate?: boolean\n}\n\n/**\n * Constraints that live on a leaf (string or number) schema: length, pattern,\n * format and numeric ranges. Extracted so they can be surfaced for a primitive\n * schema as well as for a primitive array's items, which are not rendered on\n * their own. See https://github.com/scalar/scalar/issues/9690\n */\nconst getLeafConstraints = (schema: SchemaObject) => {\n const properties: ValidationProperty[] = []\n\n if (isStringSchema(schema)) {\n if (schema.minLength) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('schema.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (schema.maxLength) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('schema.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n // pattern is rendered via SchemaPropertyPattern (hover dropdown), skip here\n }\n\n if ((isStringSchema(schema) || isNumberSchema(schema)) && schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('schema.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('schema.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('schema.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('schema.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('schema.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n}\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties: ValidationProperty[] = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (schema.minItems || schema.maxItems) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('schema.unique')}!`,\n })\n }\n }\n\n properties.push(...getLeafConstraints(schema))\n\n // Primitive array items carry their own constraints (e.g. an array of `uuid`\n // strings) but are not rendered separately, so surface them here.\n if (isArraySchema(schema) && schema.items) {\n properties.push(...getLeafConstraints(resolve.schema(schema.items)))\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n return getModelNameWithArray(props.value)\n})\n\n/** Whether the model name links to the models section, or renders as plain text. */\nconst modelLinkable = computed(() =>\n isModelLinkable(modelLink.value?.schemaKey, props.modelLinkOptions ?? {}),\n)\n\n/**\n * The type as a run of tokens rather than a single string — identifiers in\n * the code face, English words like `array of` in the sans face, and a muted\n * `|` so `string | null` reads as one type with an alternative.\n *\n * The token run and the screen-reader label are written straight into the\n * template instead of being their own components: the tree mounts one per\n * typed row, and a component instance costs more to create than the span it\n * renders. On a flat object the type cells would be most of the instance\n * count. The linked and the plain copy of the token markup below must stay\n * identical.\n */\nconst signatureTokens = computed(() =>\n getDisplayTypeSignatureTokens(props.value, {\n hideModelNames: props.hideModelNames,\n modelName: modelLink.value?.label,\n }),\n)\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n // An array's own examples take precedence over the fallback from its items.\n if (\n props.value &&\n isArraySchema(props.value) &&\n !props.value.examples?.length\n ) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n\n/**\n * Whether the examples chip has anything to render.\n *\n * `SchemaPropertyExamples` already renders nothing without an example, but it\n * still mounts, and mounting is what installs its popup's window-level click\n * and keydown listeners. `withExamples` defaults to true, so without this gate\n * every property row on the page — including a plain `{ type: 'string' }` —\n * pays for a popup it never opens. Mirrors the component's own two branches.\n */\nconst hasExampleContent = computed((): boolean => {\n if (exampleValue.value !== undefined) {\n return true\n }\n\n const examples = props.value?.examples\n\n return (\n !!examples &&\n typeof examples === 'object' &&\n Object.keys(examples).length > 0\n )\n})\n\n/**\n * The regex `pattern` to surface via the hover dropdown. It lives on a string\n * schema, or on the items of a primitive array (which is not rendered on its\n * own, so its constraints are surfaced on the array heading — see\n * https://github.com/scalar/scalar/issues/9690).\n */\nconst patternValue = computed(() => {\n const schema = valueRef.value\n if (!schema) {\n return undefined\n }\n\n if (isStringSchema(schema) && schema.pattern) {\n return schema.pattern\n }\n\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n if (isStringSchema(items) && items.pattern) {\n return items.pattern\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div\n class=\"property-heading [&>.property-detail:has(+.property-detail)]:mr-0\">\n <!-- `:has(+.property-detail)`: only a detail FOLLOWED BY another detail\n drops its right margin, because the `·` separator supplies the gap\n there. Not `:not(:last-of-type)`, which matches by element type: the\n collapsed preview and the trailing copy-link are spans as well, so it\n would strip the margin from the final detail and glue \"Addressrequired\"\n together on a collapsed row. -->\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <ScalarTooltip\n v-if=\"fieldNumber !== undefined\"\n content=\"Protobuf field number\">\n <span class=\"text-c-3 font-code mr-2 text-xs\">\n <span aria-hidden=\"true\">#{{ fieldNumber }}</span>\n <span class=\"sr-only\">Protobuf field number: {{ fieldNumber }}</span>\n </span>\n </ScalarTooltip>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('schema.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- A map key reads `additionalProperty · string`: the keyword leads the\n detail list in the accent colour, like a type word, so the name\n above it can look like every other name. -->\n <SchemaPropertyDetail\n v-if=\"props.keyKind\"\n class=\"property-key-kind\">\n <span class=\"font-code text-c-accent\">{{\n props.keyKind === 'pattern' ? 'patternProperty' : 'additionalProperty'\n }}</span>\n </SchemaPropertyDetail>\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <!-- The type is a token run (`array of Planet`) and a $ref link IS the\n type, not an appended `· Account` -->\n <!-- Written across lines on purpose: Vue drops whitespace-only text\n between two elements, so a single-line label would read\n `Type:string`. -->\n <span class=\"screenreader-only\"> {{ translate('schema.type') }}: </span>\n <button\n v-if=\"props.eventBus && modelLink?.schemaKey && modelLinkable\"\n class=\"text-c-2 hover:text-c-1 underline\"\n type=\"button\"\n @click=\"\n props.eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n <span\n v-if=\"signatureTokens.length\"\n class=\"property-type-signature text-c-2 text-(length:--scalar-mini)\">\n <template\n v-for=\"(token, index) in signatureTokens\"\n :key=\"index\">\n {{ index > 0 ? ' ' : ''\n }}<span\n class=\"property-type-token\"\n :class=\"[\n `property-type-token--${token.kind}`,\n token.kind === 'word' ? 'font-sans' : '',\n token.kind === 'ident' || token.kind === 'literal'\n ? 'font-code'\n : '',\n token.kind === 'punctuation' ? 'text-c-2' : '',\n ]\"\n >{{ token.text }}</span\n >\n </template>\n </span>\n </button>\n <span\n v-else-if=\"signatureTokens.length\"\n class=\"property-type-signature text-c-2 text-(length:--scalar-mini)\">\n <template\n v-for=\"(token, index) in signatureTokens\"\n :key=\"index\">\n {{ index > 0 ? ' ' : ''\n }}<span\n class=\"property-type-token\"\n :class=\"[\n `property-type-token--${token.kind}`,\n token.kind === 'word' ? 'font-sans' : '',\n token.kind === 'ident' || token.kind === 'literal'\n ? 'font-code'\n : '',\n token.kind === 'punctuation' ? 'text-c-2' : '',\n ]\"\n >{{ token.text }}</span\n >\n </template>\n </span>\n </SchemaPropertyDetail>\n\n <!-- A cycle reads `array of Satellite · recursive`, a modifier like\n `nullable`; the full sentence rides the tooltip. -->\n <SchemaPropertyDetail\n v-if=\"recursiveTarget\"\n class=\"property-recursive\"\n :title=\"\n translate('schema.recursiveReference', { name: recursiveTarget })\n \">\n {{ translate('schema.recursive') }}\n </SchemaPropertyDetail>\n\n <ScalarTooltip\n v-if=\"presence\"\n :content=\"presenceDescription\">\n <span class=\"text-c-2 mr-2 text-xs\">\n <span aria-hidden=\"true\">optional</span>\n <span class=\"sr-only\"\n >Optional ({{ presence }} presence). {{ presenceDescription }}</span\n >\n </span>\n </ScalarTooltip>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('schema.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <span\n v-if=\"property.key === 'format'\"\n class=\"screenreader-only\">\n {{ translate('schema.format') }}:\n </span>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('schema.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('schema.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('schema.deprecated') }}</Badge>\n </div>\n <span\n v-if=\"discriminatorValue !== undefined\"\n class=\"text-c-2\">\n {{ translate('schema.discriminatorValue') }}:\n <RenderString :value=\"discriminatorValue\" />\n </span>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('schema.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('schema.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('schema.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('schema.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('schema.required') }}\n </div>\n <!-- Gated here, not only inside the component: each popup instance installs\n window-level click and keydown listeners for its dismissal, so mounting\n one per row costs the page a listener per row it never shows anything\n for. Same reason `SchemaPropertyPattern` below is gated. -->\n <SchemaPropertyDefault\n v-if=\"props.value?.default !== undefined\"\n :value=\"props.value?.default\" />\n <!--\n Pattern is a hover dropdown chip like Examples, not an inline constraint,\n so it sits beside the example. This keeps the real constraints (length,\n nullable, …) together in the dotted list. See #9966.\n -->\n <SchemaPropertyPattern\n v-if=\"patternValue\"\n :pattern=\"patternValue\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples && hasExampleContent\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n <!-- The collapsed preview rides the end of the heading line -->\n <slot name=\"preview\" />\n <!-- Last so the tab order matches the visual order: the trailing copy-link\n is painted at the row's right edge, after every control to its left -->\n <slot name=\"trailing\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n/*\n * Light-mode oranges are too bright on a light page for 13px text (the default\n * #ff5800 is 3.16:1), so blend the theme orange toward the text colour to reach\n * WCAG 1.4.3 (4.5:1) while keeping the hue and letting custom themes flow\n * through. Dark mode already passes (8.37:1) and keeps the plain token.\n */\n.light-mode .property-required {\n color: color-mix(\n in srgb,\n var(--scalar-color-orange),\n var(--scalar-color-1) 32%\n );\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-decoration: line-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Ce,IAAA;;IADnC,SAAS+D,EAAA;IACT,UAAUpC,EAAM,OAAO;;GAE1B5C,EAAuBuF,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA;GAGvBvF,EAAwBuF,EAAA,QAAA,YAAA,CAAA,GAAA,KAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js","names":["$slots","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createBlock","_unref","_withCtx","_createElementVNode","_toDisplayString","_Fragment","SchemaPropertyDetail","_renderList","_createTextVNode","_createVNode","Badge","RenderString","SchemaPropertyDefault","SchemaPropertyPattern","SchemaPropertyExamples","Badge_default","RenderString_default","SchemaPropertyDefault_default","SchemaPropertyDetail_default","SchemaPropertyExamples_default","SchemaPropertyPattern_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default","props","__props","useLocalization","fieldNumber","computed","protobufFieldNumber","recursiveTarget","schemaRecursiveTarget","presence","protobufPresence","presenceDescription","valueRef","toRef","constValue","schema","isArraySchema","items","resolve","isDefined","getLeafConstraints","properties","isStringSchema","translate","isNumberSchema","validationProperties","modelLink","getModelNameWithArray","modelLinkable","isModelLinkable","signatureTokens","getDisplayTypeSignatureTokens","shouldShowType","propertyNamesDetail","parts","getSchemaType","detail","exampleValue","itemsSchema","hasExampleContent","examples","patternValue","openBlock","createElementBlock","_ctx","normalizeClass","renderSlot","createCommentVNode","createBlock","unref","ScalarTooltip","withCtx","createElementVNode","toDisplayString","Fragment","_cache","renderList","index","createTextVNode","token","property","createSlots","createVNode"],"sources":["../../src/schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarTooltip } from '@scalar/components/tooltip'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport Badge from '../shared/Badge.vue'\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getDisplayTypeSignatureTokens } from './helpers/get-type-signature-tokens'\nimport {\n isModelLinkable,\n type ModelLinkOptions,\n} from './helpers/is-model-linkable'\nimport { getModelNameWithArray } from './helpers/schema-name'\nimport { useLocalization } from './localization'\nimport {\n protobufFieldNumber,\n protobufPresence,\n type ProtobufSchema,\n} from './protobuf-metadata'\nimport {\n schemaRecursiveTarget,\n type RecursiveSchema,\n} from './recursive-metadata'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\nimport SchemaPropertyPattern from './SchemaPropertyPattern.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n enum?: boolean\n isDiscriminator?: boolean\n /** Effective AsyncAPI variant value, separate from const/enum constraints. */\n discriminatorValue?: string\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /**\n * Config for deciding whether a model name links to the models section. When the section or\n * the referenced model is hidden there is nothing to scroll to, so the name renders as plain text.\n */\n modelLinkOptions?: ModelLinkOptions\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n /**\n * The row's name is a stand-in for keys the caller chooses\n * (`additionalProperties`) or keys matching a regex (`patternProperties`),\n * not a literal property. The heading says so in the signature line, where\n * the tree already describes shapes, instead of styling the name itself.\n */\n keyKind?: 'additional' | 'pattern'\n /**\n * The name of the schema this row loops back to. A cut cycle is a leaf, so\n * the signature line says why it does not expand; the model link beside it\n * already names the schema the loop returns to.\n */\n recursiveTo?: string\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst fieldNumber = computed(\n () => (props.value as ProtobufSchema | undefined)?.[protobufFieldNumber],\n)\n\nconst recursiveTarget = computed(\n () =>\n props.recursiveTo ??\n (props.value as RecursiveSchema | undefined)?.[schemaRecursiveTarget],\n)\n\nconst presence = computed(\n () => (props.value as ProtobufSchema | undefined)?.[protobufPresence],\n)\nconst presenceDescription = computed(() =>\n presence.value === 'explicit'\n ? 'Explicit presence: Protobuf distinguishes an unset field from one set to its default value.'\n : 'Implicit presence: Protobuf does not distinguish an unset field from one set to its default value.',\n)\n\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\ntype ValidationProperty = {\n key: string\n value: string | number\n prefix?: string\n code?: boolean\n truncate?: boolean\n}\n\n/**\n * Constraints that live on a leaf (string or number) schema: length, pattern,\n * format and numeric ranges. Extracted so they can be surfaced for a primitive\n * schema as well as for a primitive array's items, which are not rendered on\n * their own. See https://github.com/scalar/scalar/issues/9690\n */\nconst getLeafConstraints = (schema: SchemaObject) => {\n const properties: ValidationProperty[] = []\n\n if (isStringSchema(schema)) {\n if (schema.minLength) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('schema.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (schema.maxLength) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('schema.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n // pattern is rendered via SchemaPropertyPattern (hover dropdown), skip here\n }\n\n if ((isStringSchema(schema) || isNumberSchema(schema)) && schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('schema.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('schema.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('schema.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('schema.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('schema.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n}\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties: ValidationProperty[] = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (schema.minItems || schema.maxItems) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('schema.unique')}!`,\n })\n }\n }\n\n properties.push(...getLeafConstraints(schema))\n\n // Primitive array items carry their own constraints (e.g. an array of `uuid`\n // strings) but are not rendered separately, so surface them here.\n if (isArraySchema(schema) && schema.items) {\n properties.push(...getLeafConstraints(resolve.schema(schema.items)))\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n return getModelNameWithArray(props.value)\n})\n\n/** Whether the model name links to the models section, or renders as plain text. */\nconst modelLinkable = computed(() =>\n isModelLinkable(modelLink.value?.schemaKey, props.modelLinkOptions ?? {}),\n)\n\n/**\n * The type as a run of tokens rather than a single string — identifiers in\n * the code face, English words like `array of` in the sans face, and a muted\n * `|` so `string | null` reads as one type with an alternative.\n *\n * The token run and the screen-reader label are written straight into the\n * template instead of being their own components: the tree mounts one per\n * typed row, and a component instance costs more to create than the span it\n * renders. On a flat object the type cells would be most of the instance\n * count. The linked and the plain copy of the token markup below must stay\n * identical.\n */\nconst signatureTokens = computed(() =>\n getDisplayTypeSignatureTokens(props.value, {\n hideModelNames: props.hideModelNames,\n modelName: modelLink.value?.label,\n }),\n)\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n // An array's own examples take precedence over the fallback from its items.\n if (\n props.value &&\n isArraySchema(props.value) &&\n !props.value.examples?.length\n ) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n\n/**\n * Whether the examples chip has anything to render.\n *\n * `SchemaPropertyExamples` already renders nothing without an example, but it\n * still mounts, and mounting is what installs its popup's window-level click\n * and keydown listeners. `withExamples` defaults to true, so without this gate\n * every property row on the page — including a plain `{ type: 'string' }` —\n * pays for a popup it never opens. Mirrors the component's own two branches.\n */\nconst hasExampleContent = computed((): boolean => {\n if (exampleValue.value !== undefined) {\n return true\n }\n\n const examples = props.value?.examples\n\n return (\n !!examples &&\n typeof examples === 'object' &&\n Object.keys(examples).length > 0\n )\n})\n\n/**\n * The regex `pattern` to surface via the hover dropdown. It lives on a string\n * schema, or on the items of a primitive array (which is not rendered on its\n * own, so its constraints are surfaced on the array heading — see\n * https://github.com/scalar/scalar/issues/9690).\n */\nconst patternValue = computed(() => {\n const schema = valueRef.value\n if (!schema) {\n return undefined\n }\n\n if (isStringSchema(schema) && schema.pattern) {\n return schema.pattern\n }\n\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n if (isStringSchema(items) && items.pattern) {\n return items.pattern\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div\n class=\"property-heading [&>.property-detail:has(+.property-detail)]:mr-0\">\n <!-- `:has(+.property-detail)`: only a detail FOLLOWED BY another detail\n drops its right margin, because the `·` separator supplies the gap\n there. Not `:not(:last-of-type)`, which matches by element type: the\n collapsed preview and the trailing copy-link are spans as well, so it\n would strip the margin from the final detail and glue \"Addressrequired\"\n together on a collapsed row. -->\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <ScalarTooltip\n v-if=\"fieldNumber !== undefined\"\n content=\"Protobuf field number\">\n <span class=\"text-c-3 font-code mr-2 text-xs\">\n <span aria-hidden=\"true\">#{{ fieldNumber }}</span>\n <span class=\"sr-only\">Protobuf field number: {{ fieldNumber }}</span>\n </span>\n </ScalarTooltip>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('schema.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- A map key reads `additionalProperty · string`: the keyword leads the\n detail list in the accent colour, like a type word, so the name\n above it can look like every other name. -->\n <SchemaPropertyDetail\n v-if=\"props.keyKind\"\n class=\"property-key-kind\">\n <span class=\"font-code text-c-accent\">{{\n props.keyKind === 'pattern' ? 'patternProperty' : 'additionalProperty'\n }}</span>\n </SchemaPropertyDetail>\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <!-- The type is a token run (`array of Planet`) and a $ref link IS the\n type, not an appended `· Account` -->\n <!-- Written across lines on purpose: Vue drops whitespace-only text\n between two elements, so a single-line label would read\n `Type:string`. -->\n <span class=\"screenreader-only\"> {{ translate('schema.type') }}: </span>\n <button\n v-if=\"props.eventBus && modelLink?.schemaKey && modelLinkable\"\n class=\"text-c-2 hover:text-c-1 underline\"\n type=\"button\"\n @click=\"\n props.eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n <span\n v-if=\"signatureTokens.length\"\n class=\"property-type-signature text-c-2 text-(length:--scalar-mini)\">\n <template\n v-for=\"(token, index) in signatureTokens\"\n :key=\"index\">\n {{ index > 0 ? ' ' : ''\n }}<span\n class=\"property-type-token\"\n :class=\"[\n `property-type-token--${token.kind}`,\n token.kind === 'word' ? 'font-sans' : '',\n token.kind === 'ident' || token.kind === 'literal'\n ? 'font-code'\n : '',\n token.kind === 'punctuation' ? 'text-c-2' : '',\n ]\"\n >{{ token.text }}</span\n >\n </template>\n </span>\n </button>\n <span\n v-else-if=\"signatureTokens.length\"\n class=\"property-type-signature text-c-2 text-(length:--scalar-mini)\">\n <template\n v-for=\"(token, index) in signatureTokens\"\n :key=\"index\">\n {{ index > 0 ? ' ' : ''\n }}<span\n class=\"property-type-token\"\n :class=\"[\n `property-type-token--${token.kind}`,\n token.kind === 'word' ? 'font-sans' : '',\n token.kind === 'ident' || token.kind === 'literal'\n ? 'font-code'\n : '',\n token.kind === 'punctuation' ? 'text-c-2' : '',\n ]\"\n >{{ token.text }}</span\n >\n </template>\n </span>\n </SchemaPropertyDetail>\n\n <!-- A cycle reads `array of Satellite · recursive`, a modifier like\n `nullable`; the full sentence rides the tooltip. -->\n <SchemaPropertyDetail\n v-if=\"recursiveTarget\"\n class=\"property-recursive\"\n :title=\"\n translate('schema.recursiveReference', { name: recursiveTarget })\n \">\n {{ translate('schema.recursive') }}\n </SchemaPropertyDetail>\n\n <ScalarTooltip\n v-if=\"presence\"\n :content=\"presenceDescription\">\n <span class=\"text-c-2 mr-2 text-xs\">\n <span aria-hidden=\"true\">optional</span>\n <span class=\"sr-only\"\n >Optional ({{ presence }} presence). {{ presenceDescription }}</span\n >\n </span>\n </ScalarTooltip>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('schema.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <span\n v-if=\"property.key === 'format'\"\n class=\"screenreader-only\">\n {{ translate('schema.format') }}:\n </span>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('schema.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('schema.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('schema.deprecated') }}</Badge>\n </div>\n <span\n v-if=\"discriminatorValue !== undefined\"\n class=\"text-c-2\">\n {{ translate('schema.discriminatorValue') }}:\n <RenderString :value=\"discriminatorValue\" />\n </span>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('schema.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('schema.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('schema.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('schema.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('schema.required') }}\n </div>\n <!-- Gated here, not only inside the component: each popup instance installs\n window-level click and keydown listeners for its dismissal, so mounting\n one per row costs the page a listener per row it never shows anything\n for. Same reason `SchemaPropertyPattern` below is gated. -->\n <SchemaPropertyDefault\n v-if=\"props.value?.default !== undefined\"\n :value=\"props.value?.default\" />\n <!--\n Pattern is a hover dropdown chip like Examples, not an inline constraint,\n so it sits beside the example. This keeps the real constraints (length,\n nullable, …) together in the dotted list. See #9966.\n -->\n <SchemaPropertyPattern\n v-if=\"patternValue\"\n :pattern=\"patternValue\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples && hasExampleContent\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n <!-- The collapsed preview rides the end of the heading line -->\n <slot name=\"preview\" />\n <!-- Last so the tab order matches the visual order: the trailing copy-link\n is painted at the row's right edge, after every control to its left -->\n <slot name=\"trailing\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n/*\n * Light-mode oranges are too bright on a light page for 13px text (the default\n * #ff5800 is 3.16:1), so blend the theme orange toward the text colour to reach\n * WCAG 1.4.3 (4.5:1) while keeping the hue and letting custom themes flow\n * through. Dark mode already passes (8.37:1) and keeps the plain token.\n */\n.light-mode .property-required {\n color: color-mix(\n in srgb,\n var(--scalar-color-orange),\n var(--scalar-color-1) 32%\n );\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-dec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AA,GAAAI,EAGsCc,IAAA;;IADnC,SAAS+D,EAAA;IACT,UAAUpC,EAAM,OAAO;;GAE1B1C,EAAuBqF,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA;GAGvBrF,EAAwBqF,EAAA,QAAA,YAAA,CAAA,GAAA,KAAA,GAAA,EAAA"}
@@ -1,9 +1,8 @@
1
- import e from "../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js";
1
+ import e from "./SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js";
3
2
  /* empty css */
4
- //#region src/schema/SchemaPropertyPattern.vue
5
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-e8f7b07b"]]);
6
- //#endregion
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ // src/schema/SchemaPropertyPattern.vue
5
+ var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-e8f7b07b"]]);
7
6
  export { n as default };
8
7
 
9
8
  //# sourceMappingURL=SchemaPropertyPattern.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyPattern.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","SchemaPropertyPattern_vue_vue_type_script_setup_true_lang_default","SchemaPropertyPattern_default"],"sources":["../../src/schema/SchemaPropertyPattern.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { onClickOutside, onKeyStroke } from '@vueuse/core'\nimport { ref } from 'vue'\n\nimport LinkButton from './LinkButton.vue'\nimport { useLocalization } from './localization'\n\nconst { pattern } = defineProps<{ pattern: string }>()\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n\n/**\n * The popup reveals on hover and keyboard focus purely via CSS. Touch devices\n * have no hover, so a click/tap also pins it open, and a second click, a click\n * outside, or Escape closes it again. Without this the full pattern was\n * unreachable on mobile — a regression from the old inline (truncated) text.\n */\nconst rootRef = ref<HTMLElement | null>(null)\nconst isOpen = ref(false)\n\nconst toggle = () => {\n isOpen.value = !isOpen.value\n}\n\nconst close = () => {\n isOpen.value = false\n}\n\nonClickOutside(rootRef, close)\nonKeyStroke('Escape', () => {\n if (isOpen.value) {\n close()\n }\n})\n</script>\n<template>\n <div\n ref=\"rootRef\"\n class=\"property-pattern\"\n :class=\"{ 'is-open': isOpen }\">\n <LinkButton\n class=\"decoration-dotted\"\n @click=\"toggle\">\n {{ translate('schema.pattern') }}\n </LinkButton>\n <div class=\"property-pattern-popup\">\n <button\n :aria-label=\"`${translate('schema.copyPattern')}: ${pattern}`\"\n class=\"property-pattern-value group\"\n type=\"button\"\n @click=\"copyToClipboard(pattern)\">\n <code>{{ pattern }}</code>\n <ScalarIcon\n aria-hidden=\"true\"\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n@reference \"../style.css\";\n\n.property-pattern {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n\n/*\n * Invisible bridge that fills the gap between the label and the popup, so the\n * pointer can travel down into the popup without dropping the `:hover` state.\n * Mirrors the same trick in SchemaPropertyExamples.vue.\n */\n.property-pattern:hover::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n\n.property-pattern-popup {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n /* Cap the width so the centered popup never overflows a narrow viewport\n * (mobile, modal). Long patterns wrap instead of widening it. */\n max-width: min(500px, calc(100vw - 32px));\n /* Cap the height too, so a very long multi-line regex scrolls inside the\n * popup instead of running off the bottom of the viewport. */\n max-height: min(400px, calc(100vh - 32px));\n overflow-y: auto;\n display: none;\n @apply z-context;\n}\n\n.property-pattern:hover .property-pattern-popup,\n.property-pattern:focus-within .property-pattern-popup,\n.property-pattern.is-open .property-pattern-popup {\n display: flex;\n}\n\n.property-pattern-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n /* Top-align so the copy icon stays with the first line of a wrapped pattern. */\n align-items: flex-start;\n width: 100%;\n padding: 6px;\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n\n.property-pattern-value code {\n font-family: var(--scalar-font-code);\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-2);\n /* Wrap long regex so the full pattern is readable, not just copyable. */\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n flex: 1;\n text-align: left;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaPropertyPattern.vue.js","names":["SchemaPropertyPattern_vue_vue_type_script_setup_true_lang_default","_plugin_vue_export_helper_default","SchemaPropertyPattern_default"],"sources":[],"mappings":""}
@@ -4,7 +4,7 @@ import { createElementBlock as n, createElementVNode as r, createTextVNode as i,
4
4
  import { ScalarIcon as p } from "@scalar/components/icon";
5
5
  import { useClipboard as m } from "@scalar/use-hooks/useClipboard";
6
6
  import { onClickOutside as h, onKeyStroke as g } from "@vueuse/core";
7
- //#region src/schema/SchemaPropertyPattern.vue?vue&type=script&setup=true&lang.ts
7
+ // src/schema/SchemaPropertyPattern.vue?vue&type=script&setup=true&lang.ts
8
8
  var _ = { class: "property-pattern-popup" }, v = ["aria-label"], y = /*@__PURE__*/ o({
9
9
  __name: "SchemaPropertyPattern",
10
10
  props: { pattern: {} },
@@ -39,7 +39,6 @@ var _ = { class: "property-pattern-popup" }, v = ["aria-label"], y = /*@__PURE__
39
39
  })], 8, v)])], 2));
40
40
  }
41
41
  });
42
- //#endregion
43
42
  export { y as default };
44
43
 
45
44
  //# sourceMappingURL=SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js.map
@@ -1,7 +1,6 @@
1
1
  import e from "./SchemaRailPanel.vue_vue_type_script_setup_true_lang.js";
2
- //#region src/schema/SchemaRailPanel.vue
2
+ // src/schema/SchemaRailPanel.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=SchemaRailPanel.vue.js.map