@scalar/blocks 0.9.0 → 0.11.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 (93) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
  3. package/dist/code-example/components/CodeExample.vue.js +1 -1
  4. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js +1 -2
  5. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -1
  6. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js +5 -1
  7. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +1 -1
  8. package/dist/code-example/helpers/operation-to-har/process-parameters.js +4 -1
  9. package/dist/code-example/helpers/operation-to-har/process-parameters.js.map +1 -1
  10. package/dist/code-example/helpers/operation-to-har/process-server-url.d.ts +1 -3
  11. package/dist/code-example/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
  12. package/dist/code-example/helpers/operation-to-har/process-server-url.js +6 -12
  13. package/dist/code-example/helpers/operation-to-har/process-server-url.js.map +1 -1
  14. package/dist/constants.js +1 -1
  15. package/dist/schema/Schema.vue.d.ts.map +1 -1
  16. package/dist/schema/Schema.vue.js +1 -1
  17. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js +114 -117
  18. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  20. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js +101 -92
  21. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/schema/SchemaProperty.vue.d.ts +5 -0
  23. package/dist/schema/SchemaProperty.vue.d.ts.map +1 -1
  24. package/dist/schema/SchemaProperty.vue.js +1 -1
  25. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js +226 -223
  26. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/schema/SchemaPropertyHeading.vue.d.ts +6 -4
  28. package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  29. package/dist/schema/SchemaPropertyHeading.vue.js +1 -1
  30. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +156 -133
  31. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js +8 -1
  33. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/dist/schema/helpers/dynamic-scope.d.ts +13 -17
  35. package/dist/schema/helpers/dynamic-scope.d.ts.map +1 -1
  36. package/dist/schema/helpers/dynamic-scope.js +4 -4
  37. package/dist/schema/helpers/dynamic-scope.js.map +1 -1
  38. package/dist/schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  39. package/dist/schema/helpers/optimize-value-for-display.js +11 -11
  40. package/dist/schema/helpers/optimize-value-for-display.js.map +1 -1
  41. package/dist/schema/localization/index.d.ts +2 -1
  42. package/dist/schema/localization/index.d.ts.map +1 -1
  43. package/dist/schema/localization/locales/ar.d.ts +1 -0
  44. package/dist/schema/localization/locales/ar.d.ts.map +1 -1
  45. package/dist/schema/localization/locales/ar.js +1 -0
  46. package/dist/schema/localization/locales/ar.js.map +1 -1
  47. package/dist/schema/localization/locales/de.d.ts +1 -0
  48. package/dist/schema/localization/locales/de.d.ts.map +1 -1
  49. package/dist/schema/localization/locales/de.js +1 -0
  50. package/dist/schema/localization/locales/de.js.map +1 -1
  51. package/dist/schema/localization/locales/en.d.ts +1 -0
  52. package/dist/schema/localization/locales/en.d.ts.map +1 -1
  53. package/dist/schema/localization/locales/en.js +1 -0
  54. package/dist/schema/localization/locales/en.js.map +1 -1
  55. package/dist/schema/localization/locales/es.d.ts +1 -0
  56. package/dist/schema/localization/locales/es.d.ts.map +1 -1
  57. package/dist/schema/localization/locales/es.js +1 -0
  58. package/dist/schema/localization/locales/es.js.map +1 -1
  59. package/dist/schema/localization/locales/fr.d.ts +1 -0
  60. package/dist/schema/localization/locales/fr.d.ts.map +1 -1
  61. package/dist/schema/localization/locales/fr.js +1 -0
  62. package/dist/schema/localization/locales/fr.js.map +1 -1
  63. package/dist/schema/localization/locales/pt.d.ts +1 -0
  64. package/dist/schema/localization/locales/pt.d.ts.map +1 -1
  65. package/dist/schema/localization/locales/pt.js +1 -0
  66. package/dist/schema/localization/locales/pt.js.map +1 -1
  67. package/dist/schema/localization/locales/ru.d.ts +1 -0
  68. package/dist/schema/localization/locales/ru.d.ts.map +1 -1
  69. package/dist/schema/localization/locales/ru.js +1 -0
  70. package/dist/schema/localization/locales/ru.js.map +1 -1
  71. package/dist/schema/localization/locales/zh-cn.d.ts +1 -0
  72. package/dist/schema/localization/locales/zh-cn.d.ts.map +1 -1
  73. package/dist/schema/localization/locales/zh-cn.js +1 -0
  74. package/dist/schema/localization/locales/zh-cn.js.map +1 -1
  75. package/dist/schema/localization/locales/zh-tw.d.ts +1 -0
  76. package/dist/schema/localization/locales/zh-tw.d.ts.map +1 -1
  77. package/dist/schema/localization/locales/zh-tw.js +1 -0
  78. package/dist/schema/localization/locales/zh-tw.js.map +1 -1
  79. package/dist/schema/localization/translations.d.ts +9 -0
  80. package/dist/schema/localization/translations.d.ts.map +1 -1
  81. package/dist/schema/proxy-performance.bench.d.ts +2 -0
  82. package/dist/schema/proxy-performance.bench.d.ts.map +1 -0
  83. package/dist/specification-extensions/ExtensionValue.vue.d.ts +2 -0
  84. package/dist/specification-extensions/ExtensionValue.vue.d.ts.map +1 -1
  85. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +19 -15
  86. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  87. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts +6 -0
  88. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts.map +1 -1
  89. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +60 -13
  90. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/style.css +91 -40
  92. package/dist/vue-styles.css +1 -1
  93. package/package.json +17 -16
@@ -1,11 +1,13 @@
1
- import { isTypeObject as e } from "./helpers/is-type-object.js";
2
- import { getCycleKey as t } from "./helpers/schema-cycle.js";
3
- import { sortPropertyNames as n } from "./helpers/sort-property-names.js";
4
- import r from "./SchemaProperty.vue.js";
5
- import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, openBlock as u, renderList as d, unref as f } from "vue";
6
- import { resolve as p } from "@scalar/workspace-store/resolve";
1
+ import { resolveDynamicSchema as e } from "./helpers/dynamic-scope.js";
2
+ import { isTypeObject as t } from "./helpers/is-type-object.js";
3
+ import { getCycleKey as n } from "./helpers/schema-cycle.js";
4
+ import { sortPropertyNames as r } from "./helpers/sort-property-names.js";
5
+ import i from "./SchemaProperty.vue.js";
6
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, defineComponent as u, openBlock as d, renderList as f, unref as p } from "vue";
7
+ import { resolve as m } from "@scalar/workspace-store/resolve";
8
+ import { getXBadges as h } from "@scalar/workspace-store/schemas/extensions/get-x-badges";
7
9
  // src/schema/SchemaObjectProperties.vue?vue&type=script&setup=true&lang.ts
8
- var m = /*@__PURE__*/ l({
10
+ var g = /*@__PURE__*/ u({
9
11
  __name: "SchemaObjectProperties",
10
12
  props: {
11
13
  schema: {},
@@ -21,74 +23,77 @@ var m = /*@__PURE__*/ l({
21
23
  schemaContext: {},
22
24
  compositionPath: {},
23
25
  scrollTargetId: {},
24
- specificationExtension: {},
26
+ specificationExtension: { type: [Object, Function] },
25
27
  expansion: {}
26
28
  },
27
- setup(l) {
28
- let m = a(() => n(l.schema, l.discriminator, l.options)), h = (e, t) => {
29
- let n = typeof e == "boolean" ? e : p.schema(e);
29
+ setup(u) {
30
+ let g = o(() => r(u.schema, u.discriminator, u.options)), _ = (e, t) => {
31
+ let n = typeof e == "boolean" ? e : m.schema(e);
30
32
  if (typeof n == "object" && typeof n["x-additionalPropertiesName"] == "string" && n["x-additionalPropertiesName"].trim().length > 0) return `${n["x-additionalPropertiesName"].trim()}`;
31
33
  if (t) {
32
- let e = p.schema(t);
34
+ let e = m.schema(t);
33
35
  if (e?.title) return e.title;
34
36
  }
35
37
  return "propertyName";
36
- }, g = (e) => {
38
+ }, v = (e) => {
37
39
  if (!e) return;
38
- let t = p.schema(e);
40
+ let t = m.schema(e);
39
41
  if (t && "enum" in t && Array.isArray(t.enum) && t.enum.length > 0) return t.enum;
40
- }, _ = a(() => {
41
- if (e(l.schema) && l.schema.additionalProperties) return g(l.schema.propertyNames);
42
- }), v = a(() => {
43
- if (e(l.schema) && l.schema.additionalProperties) return l.schema.propertyNames ? p.schema(l.schema.propertyNames) : void 0;
44
- }), y = (e) => {
45
- if (e !== void 0) return p.schema(e);
46
- }, b = (e) => {
42
+ }, y = o(() => {
43
+ if (t(u.schema) && u.schema.additionalProperties) return v(u.schema.propertyNames);
44
+ }), b = o(() => {
45
+ if (t(u.schema) && u.schema.additionalProperties) return u.schema.propertyNames ? m.schema(u.schema.propertyNames) : void 0;
46
+ }), x = (t) => {
47
+ if (t !== void 0) return m.schema(e(t));
48
+ }, S = (e) => {
47
49
  if (e) return typeof e.description == "string" ? e.description : void 0;
48
- }, x = a(() => {
49
- if (!e(l.schema) || !l.schema.properties) return [];
50
- let { properties: n } = l.schema, r = new Set(l.schema.required ?? []);
51
- return m.value.map((e) => {
52
- let i = n[e];
50
+ }, C = o(() => {
51
+ if (!t(u.schema) || !u.schema.properties) return [];
52
+ let { properties: e } = u.schema, r = new Set(u.schema.required ?? []);
53
+ return g.value.map((t) => {
54
+ let i = e[t];
53
55
  return {
54
- name: e,
55
- cycleKey: t(i),
56
- description: b(i),
57
- required: r.has(e),
58
- schema: y(i)
56
+ badges: h(i),
57
+ name: t,
58
+ cycleKey: n(i),
59
+ description: S(i),
60
+ required: r.has(t),
61
+ schema: x(i)
59
62
  };
60
63
  });
61
- }), S = (e) => {
62
- let t = typeof e == "boolean" ? e : p.schema(e);
64
+ }), w = (e) => {
65
+ let t = typeof e == "boolean" ? e : m.schema(e);
63
66
  return t === !0 || typeof t == "object" && Object.keys(t).length === 0 || typeof t != "object" || !("type" in t) ? {
64
67
  type: "anything",
65
68
  ...typeof t == "object" ? t : {}
66
69
  } : t;
67
70
  };
68
- return (n, a) => (u(), c(i, null, [
69
- f(e)(l.schema) && l.schema.properties ? (u(!0), c(i, { key: 0 }, d(x.value, (e) => (u(), o(r, {
71
+ return (e, r) => (d(), l(a, null, [
72
+ p(t)(u.schema) && u.schema.properties ? (d(!0), l(a, { key: 0 }, f(C.value, (e) => (d(), s(i, {
70
73
  key: e.name,
71
- breadcrumb: l.breadcrumb,
72
- compact: l.compact,
73
- compositionPath: l.compositionPath,
74
+ badges: e.badges,
75
+ breadcrumb: u.breadcrumb,
76
+ compact: u.compact,
77
+ compositionPath: u.compositionPath,
74
78
  compositionPathSegment: e.name,
75
79
  cycleKey: e.cycleKey,
76
- depth: l.depth,
80
+ depth: u.depth,
77
81
  description: e.description,
78
- discriminator: l.discriminator,
79
- eventBus: l.eventBus,
80
- expansion: l.expansion,
81
- hideHeading: l.hideHeading,
82
- hideModelNames: l.hideModelNames,
83
- level: l.level,
82
+ discriminator: u.discriminator,
83
+ eventBus: u.eventBus,
84
+ expansion: u.expansion,
85
+ hideHeading: u.hideHeading,
86
+ hideModelNames: u.hideModelNames,
87
+ level: u.level,
84
88
  name: e.name,
85
- options: l.options,
89
+ options: u.options,
86
90
  required: e.required,
87
91
  schema: e.schema,
88
- schemaContext: l.schemaContext,
89
- scrollTargetId: l.scrollTargetId,
90
- specificationExtension: l.specificationExtension
92
+ schemaContext: u.schemaContext,
93
+ scrollTargetId: u.scrollTargetId,
94
+ specificationExtension: u.specificationExtension
91
95
  }, null, 8, [
96
+ "badges",
92
97
  "breadcrumb",
93
98
  "compact",
94
99
  "compositionPath",
@@ -109,29 +114,31 @@ var m = /*@__PURE__*/ l({
109
114
  "schemaContext",
110
115
  "scrollTargetId",
111
116
  "specificationExtension"
112
- ]))), 128)) : s("", !0),
113
- f(e)(l.schema) && l.schema.patternProperties ? (u(!0), c(i, { key: 1 }, d(Object.entries(l.schema.patternProperties), ([e, n]) => (u(), o(r, {
117
+ ]))), 128)) : c("", !0),
118
+ p(t)(u.schema) && u.schema.patternProperties ? (d(!0), l(a, { key: 1 }, f(Object.entries(u.schema.patternProperties), ([e, t]) => (d(), s(i, {
114
119
  key: e,
115
- breadcrumb: l.breadcrumb,
116
- compact: l.compact,
117
- compositionPath: l.compositionPath,
120
+ badges: p(h)(t),
121
+ breadcrumb: u.breadcrumb,
122
+ compact: u.compact,
123
+ compositionPath: u.compositionPath,
118
124
  compositionPathSegment: e,
119
- cycleKey: f(t)(n),
120
- depth: l.depth,
121
- description: b(n),
122
- discriminator: l.discriminator,
123
- eventBus: l.eventBus,
124
- expansion: l.expansion,
125
- hideHeading: l.hideHeading,
126
- hideModelNames: l.hideModelNames,
127
- level: l.level,
125
+ cycleKey: p(n)(t),
126
+ depth: u.depth,
127
+ description: S(t),
128
+ discriminator: u.discriminator,
129
+ eventBus: u.eventBus,
130
+ expansion: u.expansion,
131
+ hideHeading: u.hideHeading,
132
+ hideModelNames: u.hideModelNames,
133
+ level: u.level,
128
134
  name: e,
129
- options: l.options,
130
- schema: y(n),
131
- schemaContext: l.schemaContext,
132
- scrollTargetId: l.scrollTargetId,
133
- specificationExtension: l.specificationExtension
135
+ options: u.options,
136
+ schema: x(t),
137
+ schemaContext: u.schemaContext,
138
+ scrollTargetId: u.scrollTargetId,
139
+ specificationExtension: u.specificationExtension
134
140
  }, null, 8, [
141
+ "badges",
135
142
  "breadcrumb",
136
143
  "compact",
137
144
  "compositionPath",
@@ -151,32 +158,34 @@ var m = /*@__PURE__*/ l({
151
158
  "schemaContext",
152
159
  "scrollTargetId",
153
160
  "specificationExtension"
154
- ]))), 128)) : s("", !0),
155
- f(e)(l.schema) && l.schema.additionalProperties ? (u(), o(r, {
161
+ ]))), 128)) : c("", !0),
162
+ p(t)(u.schema) && u.schema.additionalProperties ? (d(), s(i, {
156
163
  key: 2,
157
- breadcrumb: l.breadcrumb,
158
- compact: l.compact,
159
- compositionPath: l.compositionPath,
160
- compositionPathSegment: h(l.schema.additionalProperties, l.schema.propertyNames),
161
- cycleKey: f(t)(l.schema.additionalProperties),
162
- depth: l.depth,
163
- discriminator: l.discriminator,
164
- eventBus: l.eventBus,
165
- expansion: l.expansion,
166
- hideHeading: l.hideHeading,
167
- hideModelNames: l.hideModelNames,
168
- level: l.level,
169
- name: h(l.schema.additionalProperties, l.schema.propertyNames),
164
+ badges: p(h)(u.schema.additionalProperties),
165
+ breadcrumb: u.breadcrumb,
166
+ compact: u.compact,
167
+ compositionPath: u.compositionPath,
168
+ compositionPathSegment: _(u.schema.additionalProperties, u.schema.propertyNames),
169
+ cycleKey: p(n)(u.schema.additionalProperties),
170
+ depth: u.depth,
171
+ discriminator: u.discriminator,
172
+ eventBus: u.eventBus,
173
+ expansion: u.expansion,
174
+ hideHeading: u.hideHeading,
175
+ hideModelNames: u.hideModelNames,
176
+ level: u.level,
177
+ name: _(u.schema.additionalProperties, u.schema.propertyNames),
170
178
  noncollapsible: "",
171
- options: l.options,
172
- propertyNamesEnum: _.value,
173
- propertyNamesSchema: v.value,
174
- schema: S(l.schema.additionalProperties),
175
- schemaContext: l.schemaContext,
176
- scrollTargetId: l.scrollTargetId,
177
- specificationExtension: l.specificationExtension,
179
+ options: u.options,
180
+ propertyNamesEnum: y.value,
181
+ propertyNamesSchema: b.value,
182
+ schema: w(u.schema.additionalProperties),
183
+ schemaContext: u.schemaContext,
184
+ scrollTargetId: u.scrollTargetId,
185
+ specificationExtension: u.specificationExtension,
178
186
  variant: "additionalProperties"
179
187
  }, null, 8, [
188
+ "badges",
180
189
  "breadcrumb",
181
190
  "compact",
182
191
  "compositionPath",
@@ -197,10 +206,10 @@ var m = /*@__PURE__*/ l({
197
206
  "schemaContext",
198
207
  "scrollTargetId",
199
208
  "specificationExtension"
200
- ])) : s("", !0)
209
+ ])) : c("", !0)
201
210
  ], 64));
202
211
  }
203
212
  });
204
- export { m as default };
213
+ export { g as default };
205
214
 
206
215
  //# sourceMappingURL=SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_unref","_renderList","_createBlock","SchemaProperty","SchemaProperty_default","SchemaObjectProperties_vue_vue_type_script_setup_true_lang_default","sortedProperties","computed","sortPropertyNames","__props","getAdditionalPropertiesName","additionalProperties","_additionalProperties","resolve","_propertyNames","resolved","getPropertyNamesEnum","additionalPropertiesEnum","isTypeObject","additionalPropertiesKeySchema","getPropertySchema","property","getPropertyDescription","rows","requiredSet","properties","name","getCycleKey","getAdditionalPropertiesValue","openBlock","createElementBlock","Fragment","unref","renderList","createBlock","row","createCommentVNode","key"],"sources":["../../src/schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from './helpers/is-type-object'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { sortPropertyNames } from './helpers/sort-property-names'\nimport SchemaProperty from './SchemaProperty.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n defineProps<\n {\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n schemaContext?: string\n compositionPath?: string[]\n } & SchemaRenderingProps\n >()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * The resolved propertyNames schema for the property keys.\n *\n * Surfaces key constraints such as `format` (for example `uuid`) so they are\n * not lost when rendering a map of additional properties.\n */\nconst additionalPropertiesKeySchema = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return schema.propertyNames ? resolve.schema(schema.propertyNames) : undefined\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n */\nconst getPropertySchema = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n if (property === undefined) {\n return undefined\n }\n return resolve.schema(property)\n}\n\nconst getPropertyDescription = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n if (!property) {\n return undefined\n }\n\n return typeof property.description === 'string'\n ? property.description\n : undefined\n}\n\ntype PropertyRow = {\n name: string\n cycleKey: unknown\n description: string | undefined\n required: boolean\n schema: SchemaObject | undefined\n}\n\n/**\n * Each child read once, in panel order.\n *\n * The template used to fetch `schema.properties[name]` three times per row\n * (cycle key, description, schema) and walk the `required` array with\n * `includes` for every row. Through the document's proxy stack those reads\n * were the panel's largest per-row JS cost, and none of them can change while\n * the panel is up. `false` for a name outside `required` lands on the same\n * `required: false` default in SchemaProperty that `undefined` did.\n */\nconst rows = computed((): PropertyRow[] => {\n if (!isTypeObject(schema) || !schema.properties) {\n return []\n }\n\n const { properties } = schema\n const requiredSet = new Set(schema.required ?? [])\n\n return sortedProperties.value.map((name): PropertyRow => {\n const property = properties[name]\n\n return {\n name,\n cycleKey: getCycleKey(property),\n description: getPropertyDescription(property),\n required: requiredSet.has(name),\n schema: getPropertySchema(property),\n }\n })\n})\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n * $ref values are resolved before the type check so the referenced schema is rendered correctly.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n // Resolve $ref first so the type check below works on the actual schema\n const resolved =\n typeof additionalProperties === 'boolean'\n ? additionalProperties\n : resolve.schema(additionalProperties)\n\n if (\n resolved === true ||\n (typeof resolved === 'object' && Object.keys(resolved).length === 0) ||\n typeof resolved !== 'object' ||\n !('type' in resolved)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof resolved === 'object' ? resolved : {}),\n }\n }\n\n return resolved\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"row in rows\"\n :key=\"row.name\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"row.name\"\n :cycleKey=\"row.cycleKey\"\n :depth\n :description=\"row.description\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"row.name\"\n :options=\"options\"\n :required=\"row.required\"\n :schema=\"row.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"key\"\n :cycleKey=\"getCycleKey(property)\"\n :depth\n :description=\"getPropertyDescription(property)\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"getPropertySchema(property)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n :cycleKey=\"getCycleKey(schema.additionalProperties)\"\n :depth\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :propertyNamesSchema=\"additionalPropertiesKeySchema\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCA,IAAMS,IAAmBC,QACvBC,EAAkBC,EAAA,QAAQA,EAAA,eAAeA,EAAA,OAAO,CAClD,GAQMC,KACJ,GAIA,MACG;GACH,IAAMC,IACJ,OAAOC,KAA0B,YAC7BA,IACAC,EAAQ,OAAOD,CAAqB;GAE1C,IACE,OAAOD,KAAyB,YAChC,OAAOA,EAAqB,iCAAkC,YAC9DA,EAAqB,6BAA6B,CAAC,KAAK,CAAC,CAAC,SAAS,GAEnE,OAAO,GAAGA,EAAqB,6BAA6B,CAAC,KAAK;GAIpE,IAAIG,GAAgB;IAClB,IAAMC,IAAWF,EAAQ,OAAOC,CAAc;IAC9C,IAAIC,GAAU,OACZ,OAAOA,EAAS;GAEpB;GAEA,OAAO;EACT,GASMC,KACJ,MACyB;GACzB,IAAI,CAACF,GACH;GAGF,IAAMC,IAAWF,EAAQ,OAAOC,CAAc;GAC9C,IACEC,KACA,UAAUA,KACV,MAAM,QAAQA,EAA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,QAAQW,EAAkBC,CAAQ;IAClC,eAAeZ,EAAA;IACf,gBAAgBA,EAAA;IAChB,wBAAwBA,EAAA;;;;;;;;;;;;;;;;;;;;;;GAIbT,EAAAkB,CAAA,CAAY,CAACT,EAAA,MAAM,KAAKA,EAAA,OAAO,wBAC7CZ,EAAA,GAAAK,EAgCmCC,GAAA;;IA/BhC,YAAAM,EAAA;IACA,SAAAA,EAAA;IACA,iBAAiBA,EAAA;IACjB,wBAAiCC,EAAuCD,EAAA,OAAO,sBAAgCA,EAAA,OAAO,a;IAMtH,UAAUT,EAAA2B,CAAA,CAAW,CAAClB,EAAA,OAAO,oBAAoB;IACjD,OAAAA,EAAA;IACA,eAAAA,EAAA;IACA,UAAUA,EAAA;IACV,WAAWA,EAAA;IACX,aAAAA,EAAA;IACA,gBAAAA,EAAA;IACA,OAAAA,EAAA;IACA,MAAeC,EAAuCD,EAAA,OAAO,sBAAgCA,EAAA,OAAO,a;IAMrG,gBAAA;IACC,SAASA,EAAA;IACT,mBAAmBQ,EAAA;IACnB,qBAAqBE,EAAA;IACrB,QAAQS,EAA6BnB,EAAA,OAAO,oBAAoB;IAChE,eAAeA,EAAA;IACf,gBAAgBA,EAAA;IAChB,wBAAwBA,EAAA;IACzB,SAAQ"}
1
+ {"version":3,"file":"SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_unref","_renderList","_createBlock","SchemaProperty","SchemaProperty_default","SchemaObjectProperties_vue_vue_type_script_setup_true_lang_default","sortedProperties","computed","sortPropertyNames","__props","getAdditionalPropertiesName","additionalProperties","_additionalProperties","resolve","_propertyNames","resolved","getPropertyNamesEnum","additionalPropertiesEnum","isTypeObject","additionalPropertiesKeySchema","getPropertySchema","property","resolveDynamicSchema","getPropertyDescription","rows","requiredSet","properties","name","getXBadges","getCycleKey","getAdditionalPropertiesValue","openBlock","createElementBlock","Fragment","unref","renderList","createBlock","row","createCommentVNode","key"],"sources":["../../src/schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport { getXBadges } from '@scalar/workspace-store/schemas/extensions/get-x-badges'\nimport type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { resolveDynamicSchema } from './helpers/dynamic-scope'\nimport { isTypeObject } from './helpers/is-type-object'\nimport { getCycleKey } from './helpers/schema-cycle'\nimport { sortPropertyNames } from './helpers/sort-property-names'\nimport SchemaProperty from './SchemaProperty.vue'\nimport type { SchemaOptions, SchemaRenderingProps } from './types'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n defineProps<\n {\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n /** Real nesting depth (see SchemaProperty) */\n depth?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n schemaContext?: string\n compositionPath?: string[]\n } & SchemaRenderingProps\n >()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * The resolved propertyNames schema for the property keys.\n *\n * Surfaces key constraints such as `format` (for example `uuid`) so they are\n * not lost when rendering a map of additional properties.\n */\nconst additionalPropertiesKeySchema = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return schema.propertyNames ? resolve.schema(schema.propertyNames) : undefined\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n *\n * A property that is itself a `$dynamicRef` is bound to its concrete type first, while the value is\n * still a magic proxy. `resolve.schema` coerces the value into a plain object and would drop the proxy's\n * virtual `$dynamicRef-value` accessor, so binding afterwards is impossible — see {@link resolveDynamicSchema}.\n */\nconst getPropertySchema = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n if (property === undefined) {\n return undefined\n }\n return resolve.schema(resolveDynamicSchema(property))\n}\n\nconst getPropertyDescription = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n if (!property) {\n return undefined\n }\n\n return typeof property.description === 'string'\n ? property.description\n : undefined\n}\n\ntype PropertyRow = {\n badges: XBadge[] | undefined\n name: string\n cycleKey: unknown\n description: string | undefined\n required: boolean\n schema: SchemaObject | undefined\n}\n\n/**\n * Each child read once, in panel order.\n *\n * The template used to fetch `schema.properties[name]` three times per row\n * (cycle key, description, schema) and walk the `required` array with\n * `includes` for every row. Through the document's proxy stack those reads\n * were the panel's largest per-row JS cost, and none of them can change while\n * the panel is up. `false` for a name outside `required` lands on the same\n * `required: false` default in SchemaProperty that `undefined` did.\n */\nconst rows = computed((): PropertyRow[] => {\n if (!isTypeObject(schema) || !schema.properties) {\n return []\n }\n\n const { properties } = schema\n const requiredSet = new Set(schema.required ?? [])\n\n return sortedProperties.value.map((name): PropertyRow => {\n const property = properties[name]\n\n return {\n badges: getXBadges(property),\n name,\n cycleKey: getCycleKey(property),\n description: getPropertyDescription(property),\n required: requiredSet.has(name),\n schema: getPropertySchema(property),\n }\n })\n})\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n * $ref values are resolved before the type check so the referenced schema is rendered correctly.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n // Resolve $ref first so the type check below works on the actual schema\n const resolved =\n typeof additionalProperties === 'boolean'\n ? additionalProperties\n : resolve.schema(additionalProperties)\n\n if (\n resolved === true ||\n (typeof resolved === 'object' && Object.keys(resolved).length === 0) ||\n typeof resolved !== 'object' ||\n !('type' in resolved)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof resolved === 'object' ? resolved : {}),\n }\n }\n\n return resolved\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"row in rows\"\n :key=\"row.name\"\n :badges=\"row.badges\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"row.name\"\n :cycleKey=\"row.cycleKey\"\n :depth\n :description=\"row.description\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"row.name\"\n :options=\"options\"\n :required=\"row.required\"\n :schema=\"row.schema\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :badges=\"getXBadges(property)\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"key\"\n :cycleKey=\"getCycleKey(property)\"\n :depth\n :description=\"getPropertyDescription(property)\"\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"getPropertySchema(property)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :badges=\"getXBadges(schema.additionalProperties)\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n :cycleKey=\"getCycleKey(schema.additionalProperties)\"\n :depth\n :discriminator\n :eventBus=\"eventBus\"\n :expansion=\"expansion\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :propertyNamesSchema=\"additionalPropertiesKeySchema\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n :schemaContext=\"schemaContext\"\n :scrollTargetId=\"scrollTargetId\"\n :specificationExtension=\"specificationExtension\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,IAAMS,IAAmBC,QACvBC,EAAkBC,EAAA,QAAQA,EAAA,eAAeA,EAAA,OAAO,CAClD,GAQMC,KACJ,GAIA,MACG;GACH,IAAMC,IACJ,OAAOC,KAA0B,YAC7BA,IACAC,EAAQ,OAAOD,CAAqB;GAE1C,IACE,OAAOD,KAAyB,YAChC,OAAOA,EAAqB,iCAAkC,YAC9DA,EAAqB,6BAA6B,CAAC,KAAK,CAAC,CAAC,SAAS,GAEnE,OAAO,GAAGA,EAAqB,6BAA6B,CAAC,KAAK;GAIpE,IAAIG,GAAgB;IAClB,IAAMC,IAAWF,EAAQ,OAAOC,CAAc;IAC9C,IAAIC,GAAU,OACZ,OAAOA,EAAS;GAEpB;GAEA,OAAO;EACT,GASMC,KACJ,MACyB;GACzB,IAAI,CAACF,GACH;GAGF,IAAMC,IAAWF,EAAQ,OAAOC,CAAc;GAC9C,IACEC,KACA,UAAUA,KACV,MAAM,QAAQA,EAAS,IAAI,KAC3BA,EAAS,KAAK,SAAS,GAEvB,OAAOA,EAAS;EAIpB,GAGME,IAA2BV,QAAe;GAC9C,IAAKW,EAAaT,EAAA,MAAM,KAAMA,EAAA,OAAO,sBAGrC,OAAOO,EAAqBP,EAAA,OAAO,aAAa;EAClD,CAAC,GAQKU,IAAgCZ,QAAe;GACnD,IAAKW,EAAaT,EAAA,MAAM,KAAMA,EAAA,OAAO,sBAGrC,OAAOA,EAAA,OAAO,gBAAgBI,EAAQ,OAAOJ,EAAA,OAAO,aAAa,IAAI,KAAA;EACvE,CAAC,GAaKW,KACJ,MAC6B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AA,OAAO,oBAAoB;IAC9C,YAAAA,EAAA;IACA,SAAAA,EAAA;IACA,iBAAiBA,EAAA;IACjB,wBAAiCC,EAAuCD,EAAA,OAAO,sBAAgCA,EAAA,OAAO,a;IAMtH,UAAUT,EAAA6B,CAAA,CAAW,CAACpB,EAAA,OAAO,oBAAoB;IACjD,OAAAA,EAAA;IACA,eAAAA,EAAA;IACA,UAAUA,EAAA;IACV,WAAWA,EAAA;IACX,aAAAA,EAAA;IACA,gBAAAA,EAAA;IACA,OAAAA,EAAA;IACA,MAAeC,EAAuCD,EAAA,OAAO,sBAAgCA,EAAA,OAAO,a;IAMrG,gBAAA;IACC,SAASA,EAAA;IACT,mBAAmBQ,EAAA;IACnB,qBAAqBE,EAAA;IACrB,QAAQW,EAA6BrB,EAAA,OAAO,oBAAoB;IAChE,eAAeA,EAAA;IACf,gBAAgBA,EAAA;IAChB,wBAAwBA,EAAA;IACzB,SAAQ"}
@@ -1,4 +1,5 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation';
2
3
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
3
4
  import { type Component } from 'vue';
4
5
  import type { SchemaOptions, SchemaRenderingProps } from './types';
@@ -7,6 +8,8 @@ export default _default;
7
8
  declare const __VLS_export: import("vue").DefineComponent<{
8
9
  is?: string | Component;
9
10
  schema: SchemaObject | undefined;
11
+ /** Badges authored on this property before resolving its schema. */
12
+ badges?: XBadge[];
10
13
  /** Extensions on the containing parameter or header; schema values take precedence. */
11
14
  extensionSource?: Record<string, unknown>;
12
15
  noncollapsible?: boolean;
@@ -44,6 +47,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
44
47
  } & SchemaRenderingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
45
48
  is?: string | Component;
46
49
  schema: SchemaObject | undefined;
50
+ /** Badges authored on this property before resolving its schema. */
51
+ badges?: XBadge[];
47
52
  /** Extensions on the containing parameter or header; schema values take precedence. */
48
53
  extensionSource?: Record<string, unknown>;
49
54
  noncollapsible?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../src/schema/SchemaProperty.vue"],"names":[],"mappings":"AAg3CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAMvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,KAAK,CAAA;AAsCZ,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;wBAU7C,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;SAEP,MAAM,GAAG,SAAS;YACf,YAAY,GAAG,SAAS;IAChC,uFAAuF;sBACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;qBACxB,OAAO;YAChB,MAAM;IACd;;;OAGG;YACK,MAAM;WACP,MAAM;eACF,OAAO;cACR,OAAO;oBACD,mBAAmB;kBACrB,MAAM;qBACH,OAAO;kBACV,OAAO;IACrB,kGAAkG;gBACtF,MAAM,GAAG,IAAI;cACf,sBAAsB,GAAG,mBAAmB;iBACzC,MAAM,EAAE;cACX,iBAAiB,GAAG,IAAI;aACzB,aAAa;IACtB,+EAA+E;wBAC3D,MAAM,EAAE;IAC5B,iFAAiF;0BAC3D,YAAY;IAClC,mFAAmF;oBACnE,MAAM;IACtB,uFAAuF;sBACrE,MAAM,EAAE;IAC1B,oFAAoF;6BAC3D,MAAM;IAC/B,2EAA2E;eAChE,OAAO;;SAnCb,MAAM,GAAG,SAAS;YACf,YAAY,GAAG,SAAS;IAChC,uFAAuF;sBACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;qBACxB,OAAO;YAChB,MAAM;IACd;;;OAGG;YACK,MAAM;WACP,MAAM;eACF,OAAO;cACR,OAAO;oBACD,mBAAmB;kBACrB,MAAM;qBACH,OAAO;kBACV,OAAO;IACrB,kGAAkG;gBACtF,MAAM,GAAG,IAAI;cACf,sBAAsB,GAAG,mBAAmB;iBACzC,MAAM,EAAE;cACX,iBAAiB,GAAG,IAAI;aACzB,aAAa;IACtB,+EAA+E;wBAC3D,MAAM,EAAE;IAC5B,iFAAiF;0BAC3D,YAAY;IAClC,mFAAmF;oBACnE,MAAM;IACtB,uFAAuF;sBACrE,MAAM,EAAE;IAC1B,oFAAoF;6BAC3D,MAAM;IAC/B,2EAA2E;eAChE,OAAO;;cAvBP,OAAO;WAPV,MAAM;oBAWG,OAAO;WANhB,MAAM;aAGJ,OAAO;6EA8iDnB,CAAC"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../src/schema/SchemaProperty.vue"],"names":[],"mappings":"AAi3CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sDAAsD,CAAA;AAClF,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,KAAK,CAAA;AAsCZ,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;wBAU7C,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;SAEP,MAAM,GAAG,SAAS;YACf,YAAY,GAAG,SAAS;IAChC,oEAAoE;aAC3D,MAAM,EAAE;IACjB,uFAAuF;sBACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;qBACxB,OAAO;YAChB,MAAM;IACd;;;OAGG;YACK,MAAM;WACP,MAAM;eACF,OAAO;cACR,OAAO;oBACD,mBAAmB;kBACrB,MAAM;qBACH,OAAO;kBACV,OAAO;IACrB,kGAAkG;gBACtF,MAAM,GAAG,IAAI;cACf,sBAAsB,GAAG,mBAAmB;iBACzC,MAAM,EAAE;cACX,iBAAiB,GAAG,IAAI;aACzB,aAAa;IACtB,+EAA+E;wBAC3D,MAAM,EAAE;IAC5B,iFAAiF;0BAC3D,YAAY;IAClC,mFAAmF;oBACnE,MAAM;IACtB,uFAAuF;sBACrE,MAAM,EAAE;IAC1B,oFAAoF;6BAC3D,MAAM;IAC/B,2EAA2E;eAChE,OAAO;;SArCb,MAAM,GAAG,SAAS;YACf,YAAY,GAAG,SAAS;IAChC,oEAAoE;aAC3D,MAAM,EAAE;IACjB,uFAAuF;sBACrE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;qBACxB,OAAO;YAChB,MAAM;IACd;;;OAGG;YACK,MAAM;WACP,MAAM;eACF,OAAO;cACR,OAAO;oBACD,mBAAmB;kBACrB,MAAM;qBACH,OAAO;kBACV,OAAO;IACrB,kGAAkG;gBACtF,MAAM,GAAG,IAAI;cACf,sBAAsB,GAAG,mBAAmB;iBACzC,MAAM,EAAE;cACX,iBAAiB,GAAG,IAAI;aACzB,aAAa;IACtB,+EAA+E;wBAC3D,MAAM,EAAE;IAC5B,iFAAiF;0BAC3D,YAAY;IAClC,mFAAmF;oBACnE,MAAM;IACtB,uFAAuF;sBACrE,MAAM,EAAE;IAC1B,oFAAoF;6BAC3D,MAAM;IAC/B,2EAA2E;eAChE,OAAO;;cAvBP,OAAO;WAPV,MAAM;oBAWG,OAAO;WANhB,MAAM;aAGJ,OAAO;6EA+iDnB,CAAC"}
@@ -2,7 +2,7 @@ import e from "./SchemaProperty.vue_vue_type_script_setup_true_lang.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
4
  // src/schema/SchemaProperty.vue
5
- var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-00f22f7c"]]);
5
+ var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-171bc332"]]);
6
6
  export { n as default };
7
7
 
8
8
  //# sourceMappingURL=SchemaProperty.vue.js.map