@scalar/blocks 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/code-example/components/CodeExample.vue.d.ts +1 -1
  3. package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
  4. package/dist/code-example/components/CodeExample.vue.js +1 -1
  5. package/dist/code-example/components/CodeExample.vue.js.map +1 -1
  6. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js +141 -126
  7. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -1
  8. package/dist/code-example/helpers/generate-client-options.d.ts +1 -1
  9. package/dist/code-example/helpers/generate-client-options.d.ts.map +1 -1
  10. package/dist/code-example/helpers/generate-client-options.js +5 -1
  11. package/dist/code-example/helpers/generate-client-options.js.map +1 -1
  12. package/dist/code-example/helpers/get-clients.d.ts.map +1 -1
  13. package/dist/code-example/helpers/get-clients.js +17 -18
  14. package/dist/code-example/helpers/get-clients.js.map +1 -1
  15. package/dist/code-example/helpers/get-generated-payload-example.d.ts.map +1 -1
  16. package/dist/code-example/helpers/get-generated-payload-example.js +1 -4
  17. package/dist/code-example/helpers/get-generated-payload-example.js.map +1 -1
  18. package/dist/code-example/types.d.ts +1 -1
  19. package/dist/code-example/types.d.ts.map +1 -1
  20. package/dist/constants.js +1 -1
  21. package/dist/schema/SchemaPropertyExamples.vue.js +1 -1
  22. package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -1
  23. package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/schema/SchemaPropertyHeading.vue.d.ts +3 -3
  25. package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  26. package/dist/schema/SchemaPropertyHeading.vue.js +1 -1
  27. package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -1
  28. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +154 -137
  29. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  31. package/dist/schema/helpers/optimize-value-for-display.js +8 -5
  32. package/dist/schema/helpers/optimize-value-for-display.js.map +1 -1
  33. package/dist/schema/index.d.ts +2 -0
  34. package/dist/schema/index.d.ts.map +1 -1
  35. package/dist/schema/index.js +12 -10
  36. package/dist/schema/protobuf-metadata.d.ts +11 -0
  37. package/dist/schema/protobuf-metadata.d.ts.map +1 -0
  38. package/dist/schema/protobuf-metadata.js +6 -0
  39. package/dist/schema/protobuf-metadata.js.map +1 -0
  40. package/dist/schema/recursive-metadata.d.ts +8 -0
  41. package/dist/schema/recursive-metadata.d.ts.map +1 -0
  42. package/dist/schema/recursive-metadata.js +6 -0
  43. package/dist/schema/recursive-metadata.js.map +1 -0
  44. package/dist/shared/Badge.vue.d.ts.map +1 -1
  45. package/dist/shared/Badge.vue.js +1 -1
  46. package/dist/shared/Badge.vue.js.map +1 -1
  47. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/specification-extensions/ExtensionValue.vue.d.ts +2 -0
  49. package/dist/specification-extensions/ExtensionValue.vue.d.ts.map +1 -1
  50. package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -1
  51. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +5 -1
  52. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts +2 -0
  54. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts.map +1 -1
  55. package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -1
  56. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +19 -8
  57. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/style.css +12 -4
  59. package/dist/vue-styles.css +1 -1
  60. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default","SchemaPropertyHeading_default"],"sources":["../../src/schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\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 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 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 if (props.value && isArraySchema(props.value)) {\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 <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=\"props.recursiveTo\"\n class=\"property-recursive\"\n :title=\"\n translate('schema.recursiveReference', { name: props.recursiveTo })\n \">\n {{ translate('schema.recursive') }}\n </SchemaPropertyDetail>\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-through;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default","SchemaPropertyHeading_default"],"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-through;\n}\n</style>\n"],"mappings":""}
@@ -1,53 +1,56 @@
1
- import { useLocalization as e } from "./localization/index.js";
2
- import { getSchemaType as t } from "./helpers/get-schema-type.js";
3
- import { getModelNameWithArray as n } from "./helpers/schema-name.js";
4
- import { getDisplayTypeSignatureTokens as r } from "./helpers/get-type-signature-tokens.js";
5
- import i from "../shared/Badge.vue.js";
6
- import { isModelLinkable as a } from "./helpers/is-model-linkable.js";
7
- import o from "./RenderString.vue.js";
8
- import ee from "./SchemaPropertyDefault.vue.js";
9
- import s from "./SchemaPropertyDetail.vue.js";
10
- import c from "./SchemaPropertyExamples.vue.js";
11
- import te from "./SchemaPropertyPattern.vue.js";
12
- import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ne, createTextVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, openBlock as y, renderList as b, renderSlot as x, toDisplayString as S, toRef as re, unref as C, withCtx as w } from "vue";
13
- import { isDefined as T } from "@scalar/helpers/array/is-defined";
14
- import { resolve as E } from "@scalar/workspace-store/resolve";
15
- import { isArraySchema as D, isNumberSchema as O, isStringSchema as k } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
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";
8
+ 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";
16
+ import { resolve as C } from "@scalar/workspace-store/resolve";
17
+ 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";
16
19
  //#region src/schema/SchemaPropertyHeading.vue?vue&type=script&setup=true&lang.ts
17
- var A = { class: "property-heading [&>.property-detail:has(+.property-detail)]:mr-0" }, j = {
18
- key: 1,
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 = {
21
+ key: 2,
19
22
  class: "property-discriminator"
20
- }, M = { class: "font-code text-c-accent" }, N = { class: "screenreader-only" }, P = {
23
+ }, O = { class: "font-code text-c-accent" }, k = { class: "screenreader-only" }, A = {
21
24
  key: 0,
22
25
  class: "property-type-signature text-c-2 text-(length:--scalar-mini)"
23
- }, F = {
26
+ }, j = {
24
27
  key: 1,
25
28
  class: "property-type-signature text-c-2 text-(length:--scalar-mini)"
26
- }, I = {
29
+ }, M = { class: "text-c-2 mr-2 text-xs" }, N = { class: "sr-only" }, P = {
27
30
  key: 0,
28
31
  class: "screenreader-only"
29
- }, L = {
30
- key: 3,
31
- class: "property-additional"
32
- }, R = {
32
+ }, F = {
33
33
  key: 4,
34
- class: "property-deprecated"
35
- }, z = {
34
+ class: "property-additional"
35
+ }, I = {
36
36
  key: 5,
37
- class: "text-c-2"
38
- }, B = {
37
+ class: "property-deprecated"
38
+ }, L = {
39
39
  key: 6,
40
+ class: "text-c-2"
41
+ }, R = {
42
+ key: 7,
40
43
  class: "property-const"
41
- }, V = {
42
- key: 8,
43
- class: "property-write-only"
44
- }, H = {
44
+ }, z = {
45
45
  key: 9,
46
- class: "property-read-only"
47
- }, U = {
46
+ class: "property-write-only"
47
+ }, he = {
48
48
  key: 10,
49
+ class: "property-read-only"
50
+ }, ge = {
51
+ key: 11,
49
52
  class: "property-required"
50
- }, W = /*@__PURE__*/ _({
53
+ }, B = /*@__PURE__*/ m({
51
54
  __name: "SchemaPropertyHeading",
52
55
  props: {
53
56
  value: {},
@@ -77,199 +80,213 @@ var A = { class: "property-heading [&>.property-detail:has(+.property-detail)]:m
77
80
  keyKind: {},
78
81
  recursiveTo: {}
79
82
  },
80
- setup(_) {
81
- let W = _, { translate: G } = e(), K = re(W, "value"), q = u(() => {
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(() => {
82
85
  if (!K.value) return;
83
86
  let e = K.value;
84
87
  if (e.const !== void 0) return e.const;
85
88
  if (e.enum?.length === 1) return e.enum[0];
86
- if (D(e) && e.items) {
87
- let t = E.schema(e.items);
88
- if (T(t.const)) return t.const;
89
+ if (w(e) && e.items) {
90
+ let t = C.schema(e.items);
91
+ if (S(t.const)) return t.const;
89
92
  if (t.enum?.length === 1) return t.enum[0];
90
93
  }
91
94
  }), J = (e) => {
92
95
  let t = [];
93
- return k(e) && (e.minLength && t.push({
96
+ return E(e) && (e.minLength && t.push({
94
97
  key: "min-length",
95
- prefix: `${G("schema.minLength")}: `,
98
+ prefix: `${V("schema.minLength")}: `,
96
99
  value: e.minLength
97
100
  }), e.maxLength && t.push({
98
101
  key: "max-length",
99
- prefix: `${G("schema.maxLength")}: `,
102
+ prefix: `${V("schema.maxLength")}: `,
100
103
  value: e.maxLength
101
- })), (k(e) || O(e)) && e.format && t.push({
104
+ })), (E(e) || T(e)) && e.format && t.push({
102
105
  key: "format",
103
106
  value: e.format,
104
107
  truncate: !0
105
- }), O(e) && (T(e.exclusiveMinimum) && t.push({
108
+ }), T(e) && (S(e.exclusiveMinimum) && t.push({
106
109
  key: "exclusive-minimum",
107
- prefix: `${G("schema.greaterThan")}: `,
110
+ prefix: `${V("schema.greaterThan")}: `,
108
111
  value: e.exclusiveMinimum
109
- }), T(e.minimum) && t.push({
112
+ }), S(e.minimum) && t.push({
110
113
  key: "minimum",
111
- prefix: `${G("schema.min")}: `,
114
+ prefix: `${V("schema.min")}: `,
112
115
  value: e.minimum
113
- }), T(e.exclusiveMaximum) && t.push({
116
+ }), S(e.exclusiveMaximum) && t.push({
114
117
  key: "exclusive-maximum",
115
- prefix: `${G("schema.lessThan")}: `,
118
+ prefix: `${V("schema.lessThan")}: `,
116
119
  value: e.exclusiveMaximum
117
- }), T(e.maximum) && t.push({
120
+ }), S(e.maximum) && t.push({
118
121
  key: "maximum",
119
- prefix: `${G("schema.max")}: `,
122
+ prefix: `${V("schema.max")}: `,
120
123
  value: e.maximum
121
- }), T(e.multipleOf) && t.push({
124
+ }), S(e.multipleOf) && t.push({
122
125
  key: "multiple-of",
123
- prefix: `${G("schema.multipleOf")}: `,
126
+ prefix: `${V("schema.multipleOf")}: `,
124
127
  value: e.multipleOf
125
128
  })), t;
126
- }, ie = u(() => {
129
+ }, _e = s(() => {
127
130
  if (!K.value) return [];
128
131
  let e = K.value, t = [];
129
- return D(e) && ((e.minItems || e.maxItems) && t.push({
132
+ return w(e) && ((e.minItems || e.maxItems) && t.push({
130
133
  key: "array-range",
131
134
  value: `${e.minItems || ""}…${e.maxItems || ""}`
132
135
  }), e.uniqueItems && t.push({
133
136
  key: "unique-items",
134
- value: `${G("schema.unique")}!`
135
- })), t.push(...J(e)), D(e) && e.items && t.push(...J(E.schema(e.items))), t;
136
- }), Y = u(() => !W.value || W.hideModelNames ? null : W.modelName ? {
137
- schemaKey: W.modelName,
138
- label: W.modelName
139
- } : n(W.value)), ae = u(() => a(Y.value?.schemaKey, W.modelLinkOptions ?? {})), X = u(() => r(W.value, {
140
- hideModelNames: W.hideModelNames,
137
+ value: `${V("schema.unique")}!`
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 ? {
140
+ schemaKey: B.modelName,
141
+ label: B.modelName
142
+ } : ne(B.value)), ve = s(() => r(Y.value?.schemaKey, B.modelLinkOptions ?? {})), X = s(() => re(B.value, {
143
+ hideModelNames: B.hideModelNames,
141
144
  modelName: Y.value?.label
142
- })), oe = u(() => !W.value || !("type" in W.value) ? !1 : W.value.type === "array" || !q.value), Z = u(() => {
143
- let e = W.propertyNames;
145
+ })), ye = s(() => !B.value || !("type" in B.value) ? !1 : B.value.type === "array" || !q.value), Z = s(() => {
146
+ let e = B.propertyNames;
144
147
  if (!e) return;
145
- let n = [t(e)];
146
- "format" in e && typeof e.format == "string" && n.push(e.format);
147
- let r = n.filter(Boolean).join(" · ");
148
- return r.length > 0 ? r : void 0;
149
- }), Q = u(() => {
150
- if (W.value && "example" in W.value && W.value.example !== void 0) return W.value.example;
151
- if (W.value && D(W.value)) {
152
- let e = E.schema(W.value.items);
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(() => {
153
+ if (B.value && "example" in B.value && B.value.example !== void 0) return B.value.example;
154
+ if (B.value && w(B.value) && !B.value.examples?.length) {
155
+ let e = C.schema(B.value.items);
153
156
  if (e && "example" in e && e.example !== void 0) return e.example;
154
157
  }
155
- }), se = u(() => {
158
+ }), be = s(() => {
156
159
  if (Q.value !== void 0) return !0;
157
- let e = W.value?.examples;
160
+ let e = B.value?.examples;
158
161
  return !!e && typeof e == "object" && Object.keys(e).length > 0;
159
- }), $ = u(() => {
162
+ }), $ = s(() => {
160
163
  let e = K.value;
161
164
  if (e) {
162
- if (k(e) && e.pattern) return e.pattern;
163
- if (D(e) && e.items) {
164
- let t = E.schema(e.items);
165
- if (k(t) && t.pattern) return t.pattern;
165
+ if (E(e) && e.pattern) return e.pattern;
166
+ if (w(e) && e.items) {
167
+ let t = C.schema(e.items);
168
+ if (E(t) && t.pattern) return t.pattern;
166
169
  }
167
170
  }
168
171
  });
169
- return (e, t) => (y(), p("div", A, [
170
- e.$slots.name ? (y(), p("div", {
172
+ return (e, t) => (g(), u("div", ue, [
173
+ e.$slots.name ? (g(), u("div", {
171
174
  key: 0,
172
- class: v(["property-name", { deprecated: W.value?.deprecated }])
173
- }, [x(e.$slots, "name", {}, void 0, !0)], 2)) : f("", !0),
174
- W.isDiscriminator ? (y(), p("div", j, S(C(G)("schema.discriminator")), 1)) : f("", !0),
175
- W.value ? (y(), p(l, { key: 2 }, [
176
- W.keyKind ? (y(), d(s, {
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), {
178
+ key: 1,
179
+ content: "Protobuf field number"
180
+ }, {
181
+ default: x(() => [d("span", de, [d("span", fe, "#" + y(H.value), 1), d("span", pe, "Protobuf field number: " + y(H.value), 1)])]),
182
+ _: 1
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, {
177
187
  key: 0,
178
188
  class: "property-key-kind"
179
189
  }, {
180
- default: w(() => [m("span", M, S(W.keyKind === "pattern" ? "patternProperty" : "additionalProperty"), 1)]),
190
+ default: x(() => [d("span", O, y(B.keyKind === "pattern" ? "patternProperty" : "additionalProperty"), 1)]),
181
191
  _: 1
182
- })) : f("", !0),
183
- oe.value ? (y(), d(s, {
192
+ })) : l("", !0),
193
+ ye.value ? (g(), c(a, {
184
194
  key: 1,
185
195
  truncate: ""
186
196
  }, {
187
- default: w(() => [m("span", N, S(C(G)("schema.type")) + ": ", 1), W.eventBus && Y.value?.schemaKey && ae.value ? (y(), p("button", {
197
+ default: x(() => [d("span", k, y(b(V)("schema.type")) + ": ", 1), B.eventBus && Y.value?.schemaKey && ve.value ? (g(), u("button", {
188
198
  key: 0,
189
199
  class: "text-c-2 hover:text-c-1 underline",
190
200
  type: "button",
191
- onClick: t[0] ||= (e) => W.eventBus.emit("scroll-to:model-by-name", { name: Y.value.schemaKey })
192
- }, [X.value.length ? (y(), p("span", P, [(y(!0), p(l, null, b(X.value, (e, t) => (y(), p(l, { key: t }, [h(S(t > 0 ? " " : ""), 1), m("span", { class: v(["property-type-token", [
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", [
193
203
  `property-type-token--${e.kind}`,
194
204
  e.kind === "word" ? "font-sans" : "",
195
205
  e.kind === "ident" || e.kind === "literal" ? "font-code" : "",
196
206
  e.kind === "punctuation" ? "text-c-2" : ""
197
- ]]) }, S(e.text), 3)], 64))), 128))])) : f("", !0)])) : X.value.length ? (y(), p("span", F, [(y(!0), p(l, null, b(X.value, (e, t) => (y(), p(l, { key: t }, [h(S(t > 0 ? " " : ""), 1), m("span", { class: v(["property-type-token", [
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", [
198
208
  `property-type-token--${e.kind}`,
199
209
  e.kind === "word" ? "font-sans" : "",
200
210
  e.kind === "ident" || e.kind === "literal" ? "font-code" : "",
201
211
  e.kind === "punctuation" ? "text-c-2" : ""
202
- ]]) }, S(e.text), 3)], 64))), 128))])) : f("", !0)]),
212
+ ]]) }, y(e.text), 3)], 64))), 128))])) : l("", !0)]),
203
213
  _: 1
204
- })) : f("", !0),
205
- W.recursiveTo ? (y(), d(s, {
214
+ })) : l("", !0),
215
+ U.value ? (g(), c(a, {
206
216
  key: 2,
207
217
  class: "property-recursive",
208
- title: C(G)("schema.recursiveReference", { name: W.recursiveTo })
218
+ title: b(V)("schema.recursiveReference", { name: U.value })
209
219
  }, {
210
- default: w(() => [h(S(C(G)("schema.recursive")), 1)]),
220
+ default: x(() => [f(y(b(V)("schema.recursive")), 1)]),
211
221
  _: 1
212
- }, 8, ["title"])) : f("", !0),
213
- Z.value ? (y(), d(s, {
222
+ }, 8, ["title"])) : l("", !0),
223
+ W.value ? (g(), c(b(D), {
214
224
  key: 3,
225
+ content: G.value
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)])]),
228
+ _: 1
229
+ }, 8, ["content"])) : l("", !0),
230
+ Z.value ? (g(), c(a, {
231
+ key: 4,
215
232
  truncate: ""
216
233
  }, {
217
- prefix: w(() => [h(S(C(G)("schema.keys")) + ":", 1)]),
218
- default: w(() => [h(" " + S(Z.value), 1)]),
234
+ prefix: x(() => [f(y(b(V)("schema.keys")) + ":", 1)]),
235
+ default: x(() => [f(" " + y(Z.value), 1)]),
219
236
  _: 1
220
- })) : f("", !0),
221
- (y(!0), p(l, null, b(ie.value, (e) => (y(), d(s, {
237
+ })) : l("", !0),
238
+ (g(!0), u(o, null, _(_e.value, (e) => (g(), c(a, {
222
239
  key: e.key,
223
240
  code: e.code,
224
241
  truncate: e.truncate
225
- }, ne({
226
- default: w(() => [e.key === "format" ? (y(), p("span", I, S(C(G)("schema.format")) + ": ", 1)) : f("", !0), h(" " + S(e.value), 1)]),
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)]),
227
244
  _: 2
228
245
  }, [e.prefix ? {
229
246
  name: "prefix",
230
- fn: w(() => [h(S(e.prefix), 1)]),
247
+ fn: x(() => [f(y(e.prefix), 1)]),
231
248
  key: "0"
232
249
  } : void 0]), 1032, ["code", "truncate"]))), 128)),
233
- W.enum ? (y(), d(s, { key: 4 }, {
234
- default: w(() => [h(S(C(G)("schema.enum")), 1)]),
250
+ B.enum ? (g(), c(a, { key: 5 }, {
251
+ default: x(() => [f(y(b(V)("schema.enum")), 1)]),
235
252
  _: 1
236
- })) : f("", !0)
237
- ], 64)) : f("", !0),
238
- W.additional ? (y(), p("div", L, [W.value?.["x-additionalPropertiesName"] ? (y(), p(l, { key: 0 }, [h(S(W.value["x-additionalPropertiesName"]), 1)], 64)) : (y(), p(l, { key: 1 }, [h(S(C(G)("schema.additionalProperties")), 1)], 64))])) : f("", !0),
239
- W.value?.deprecated ? (y(), p("div", R, [g(i, null, {
240
- default: w(() => [h(S(C(G)("schema.deprecated")), 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)]),
241
258
  _: 1
242
- })])) : f("", !0),
243
- _.discriminatorValue === void 0 ? f("", !0) : (y(), p("span", z, [h(S(C(G)("schema.discriminatorValue")) + ": ", 1), g(o, { value: _.discriminatorValue }, null, 8, ["value"])])),
244
- q.value === void 0 ? (y(), p(l, { key: 7 }, [W.value?.nullable === !0 ? (y(), d(s, { key: 0 }, {
245
- default: w(() => [h(S(C(G)("schema.nullable")), 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)]),
246
263
  _: 1
247
- })) : f("", !0)], 64)) : (y(), p("div", B, [g(s, { truncate: "" }, {
248
- prefix: w(() => [h(S(C(G)("schema.const")) + ": ", 1)]),
249
- default: w(() => [g(o, { value: q.value }, null, 8, ["value"])]),
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"])]),
250
267
  _: 1
251
268
  })])),
252
- W.value?.writeOnly ? (y(), p("div", V, S(C(G)("schema.writeOnly")), 1)) : W.value?.readOnly ? (y(), p("div", H, S(C(G)("schema.readOnly")), 1)) : f("", !0),
253
- W.required ? (y(), p("div", U, S(C(G)("schema.required")), 1)) : f("", !0),
254
- W.value?.default === void 0 ? f("", !0) : (y(), d(ee, {
255
- key: 11,
256
- value: W.value?.default
257
- }, null, 8, ["value"])),
258
- $.value ? (y(), d(te, {
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, {
259
272
  key: 12,
260
- pattern: $.value
261
- }, null, 8, ["pattern"])) : f("", !0),
262
- W.withExamples && se.value ? (y(), d(c, {
273
+ value: B.value?.default
274
+ }, null, 8, ["value"])),
275
+ $.value ? (g(), c(se, {
263
276
  key: 13,
277
+ pattern: $.value
278
+ }, null, 8, ["pattern"])) : l("", !0),
279
+ B.withExamples && be.value ? (g(), c(oe, {
280
+ key: 14,
264
281
  example: Q.value,
265
- examples: W.value?.examples
266
- }, null, 8, ["example", "examples"])) : f("", !0),
267
- x(e.$slots, "preview", {}, void 0, !0),
268
- x(e.$slots, "trailing", {}, void 0, !0)
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)
269
286
  ]));
270
287
  }
271
288
  });
272
289
  //#endregion
273
- export { W as default };
290
+ export { B as default };
274
291
 
275
292
  //# sourceMappingURL=SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map