@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
@@ -2,61 +2,62 @@ import e from "../shared/ExternalDocs.vue.js";
2
2
  import t from "./components/CopyLinkButton.vue.js";
3
3
  import n from "./components/WithBreadcrumb.vue.js";
4
4
  import { schemaDiscriminator as ee } from "./discriminator-metadata.js";
5
- import { resolveDynamicSchema as r, useDynamicScope as te } from "./helpers/dynamic-scope.js";
6
- import { getCompositionsToRender as ne, inferDiscriminatorMappingComposition as i } from "./helpers/get-compositions-to-render.js";
7
- import { getEnumValues as re } from "./helpers/get-enum-values.js";
8
- import { getPropertyDescriptionKey as ie } from "./helpers/get-property-description.js";
9
- import { getRefName as ae } from "./helpers/get-ref-name.js";
10
- import { typeSignatureInlinesEnum as oe } from "./helpers/get-type-signature-tokens.js";
11
- import { hasComplexArrayItems as se } from "./helpers/has-complex-array-items.js";
5
+ import { resolveDynamicSchema as r } from "./helpers/dynamic-scope.js";
6
+ import { getCompositionsToRender as te, inferDiscriminatorMappingComposition as ne } from "./helpers/get-compositions-to-render.js";
7
+ import { getEnumValues as i } from "./helpers/get-enum-values.js";
8
+ import { getPropertyDescriptionKey as re } from "./helpers/get-property-description.js";
9
+ import { getRefName as ie } from "./helpers/get-ref-name.js";
10
+ import { typeSignatureInlinesEnum as ae } from "./helpers/get-type-signature-tokens.js";
11
+ import { hasComplexArrayItems as oe } from "./helpers/has-complex-array-items.js";
12
12
  import { isTypeObject as a } from "./helpers/is-type-object.js";
13
- import { normalizeObjectComposition as ce } from "./helpers/normalize-object-composition.js";
13
+ import { normalizeObjectComposition as se } from "./helpers/normalize-object-composition.js";
14
14
  import { optimizeValueForDisplay as o } from "./helpers/optimize-value-for-display.js";
15
- import { partitionAllOfCompositions as le } from "./helpers/partition-all-of-compositions.js";
16
- import { SCHEMA_ANCESTORS_SYMBOL as ue, getCycleKey as de } from "./helpers/schema-cycle.js";
17
- import { toNodeKey as fe, useSchemaExpansion as pe } from "./helpers/schema-expansion.js";
18
- import { shouldDisplayDescription as me } from "./helpers/should-display-description.js";
19
- import { shouldDisplayHeading as he } from "./helpers/should-display-heading.js";
20
- import { sortPropertyNames as ge } from "./helpers/sort-property-names.js";
21
- import { unwrapForRead as _e } from "./helpers/unwrap-for-read.js";
22
- import { useLocalization as ve } from "./localization/index.js";
23
- import ye from "./Schema.vue.js";
24
- import be from "./SchemaCollapsedPreview.vue.js";
25
- import xe from "./SchemaComposition.vue.js";
26
- import Se from "./SchemaEnums.vue.js";
27
- import Ce from "./SchemaGutterToggle.vue.js";
28
- import we from "./SchemaPropertyHeading.vue.js";
29
- import Te from "./SchemaRailPanel.vue.js";
30
- import { Fragment as Ee, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as De, createSlots as Oe, createTextVNode as ke, createVNode as d, defineComponent as f, inject as Ae, mergeProps as p, normalizeClass as je, onBeforeUnmount as Me, onScopeDispose as Ne, openBlock as m, ref as Pe, renderList as Fe, resolveDynamicComponent as Ie, toDisplayString as Le, toHandlers as Re, toRef as ze, unref as h, useId as g, useTemplateRef as _, watch as v, withCtx as y } from "vue";
31
- import { ScalarWrappingText as b } from "@scalar/components/wrapping-text";
32
- import { resolve as Be } from "@scalar/workspace-store/resolve";
33
- import { isArraySchema as x } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
34
- import { ScalarMarkdown as Ve } from "@scalar/components/markdown";
35
- import { isDynamicRef as He, resolveDynamicRef as Ue } from "@scalar/workspace-store/helpers/dynamic-ref";
15
+ import { partitionAllOfCompositions as ce } from "./helpers/partition-all-of-compositions.js";
16
+ import { SCHEMA_ANCESTORS_SYMBOL as le, getCycleKey as ue } from "./helpers/schema-cycle.js";
17
+ import { toNodeKey as de, useSchemaExpansion as fe } from "./helpers/schema-expansion.js";
18
+ import { shouldDisplayDescription as pe } from "./helpers/should-display-description.js";
19
+ import { shouldDisplayHeading as me } from "./helpers/should-display-heading.js";
20
+ import { sortPropertyNames as he } from "./helpers/sort-property-names.js";
21
+ import { unwrapForRead as ge } from "./helpers/unwrap-for-read.js";
22
+ import { useLocalization as _e } from "./localization/index.js";
23
+ import s from "./Schema.vue.js";
24
+ import ve from "./SchemaCollapsedPreview.vue.js";
25
+ import ye from "./SchemaComposition.vue.js";
26
+ import be from "./SchemaEnums.vue.js";
27
+ import xe from "./SchemaGutterToggle.vue.js";
28
+ import Se from "./SchemaPropertyHeading.vue.js";
29
+ import Ce from "./SchemaRailPanel.vue.js";
30
+ import { Fragment as we, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as Te, createSlots as Ee, createTextVNode as De, createVNode as f, defineComponent as p, inject as Oe, mergeProps as m, normalizeClass as ke, onBeforeUnmount as Ae, onScopeDispose as je, openBlock as h, ref as Me, renderList as Ne, resolveDynamicComponent as Pe, toDisplayString as g, toHandlers as Fe, toRef as Ie, unref as _, useId as v, useTemplateRef as y, watch as b, withCtx as x } from "vue";
31
+ import { ScalarWrappingText as S } from "@scalar/components/wrapping-text";
32
+ import { resolve as C } from "@scalar/workspace-store/resolve";
33
+ import { isArraySchema as w } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
34
+ import { ScalarMarkdown as Le } from "@scalar/components/markdown";
35
+ import { isDynamicRef as Re } from "@scalar/workspace-store/helpers/dynamic-ref";
36
36
  // src/schema/SchemaProperty.vue?vue&type=script&setup=true&lang.ts
37
- var We = ["id"], Ge = {
37
+ var ze = ["id"], Be = {
38
38
  key: 0,
39
39
  class: "property-name-pattern-properties text-c-1! border-0! p-0! before:hidden!"
40
- }, Ke = {
40
+ }, Ve = {
41
41
  key: 1,
42
42
  class: "property-name-additional-properties text-c-1! border-0! p-0! before:hidden!"
43
- }, qe = ["id"], Je = {
43
+ }, He = ["id"], Ue = {
44
44
  key: 0,
45
45
  class: "property-name-pattern-properties text-c-1! border-0! p-0! before:hidden!"
46
- }, Ye = {
46
+ }, We = {
47
47
  key: 1,
48
48
  class: "property-name-additional-properties text-c-1! border-0! p-0! before:hidden!"
49
- }, Xe = {
49
+ }, Ge = {
50
50
  key: 2,
51
51
  class: "property-description mt-1! has-[+.property-rule]:mb-1.5!"
52
- }, Ze = ["id"], Qe = {
52
+ }, Ke = ["id"], qe = {
53
53
  key: 7,
54
54
  class: "children [.property-description+&]:mt-1.5!"
55
- }, $e = Object.freeze({}), S = /*@__PURE__*/ f({
55
+ }, Je = Object.freeze({}), T = /*@__PURE__*/ p({
56
56
  __name: "SchemaProperty",
57
57
  props: {
58
58
  is: {},
59
59
  schema: {},
60
+ badges: {},
60
61
  extensionSource: {},
61
62
  noncollapsible: { type: Boolean },
62
63
  level: { default: 0 },
@@ -92,38 +93,38 @@ var We = ["id"], Ge = {
92
93
  specificationExtension: {},
93
94
  expansion: {}
94
95
  },
95
- setup(f) {
96
- let S = f, et = [
96
+ setup(p) {
97
+ let T = p, Ye = [
97
98
  "oneOf",
98
99
  "anyOf",
99
100
  "allOf"
100
- ], tt = te(), C = s(() => ce(o(r(_e(S.schema), tt)), S.name)), w = s(() => {
101
- let { name: e } = S, t = C.value;
102
- return !!e && !!t?.allOf && le(t).segments.some((e) => e.kind === "object" && a(e.schema));
103
- }), T = s(() => S.breadcrumb ? S.name ? [...S.breadcrumb, S.name] : S.breadcrumb : void 0), E = s(() => S.compositionPathSegment ? [...S.compositionPath ?? [], S.compositionPathSegment] : S.compositionPath ?? []), nt = s(() => [...E.value, "items"]), D = s(() => {
104
- let e = S.options.linkablePropertyPath, t = T.value;
105
- return S.level <= 2 || !!(e && t && e.length === t.length && e.every((e, n) => e === t[n]));
106
- }), rt = s(() => D.value && (T.value?.length ?? 0) > 0), O = s(() => {
107
- let e = C.value;
108
- if (!e || !x(e) || !He(e.items)) return e;
109
- let t = Ue(e.items.$dynamicRef, tt);
110
- return t ? {
101
+ ], E = c(() => se(o(r(ge(T.schema))), T.name)), D = c(() => {
102
+ let { name: e } = T, t = E.value;
103
+ return !!e && !!t?.allOf && ce(t).segments.some((e) => e.kind === "object" && a(e.schema));
104
+ }), O = c(() => T.breadcrumb ? T.name ? [...T.breadcrumb, T.name] : T.breadcrumb : void 0), k = c(() => T.compositionPathSegment ? [...T.compositionPath ?? [], T.compositionPathSegment] : T.compositionPath ?? []), Xe = c(() => [...k.value, "items"]), Ze = c(() => {
105
+ let e = T.options.linkablePropertyPath, t = O.value;
106
+ return T.level <= 2 || !!(e && t && e.length === t.length && e.every((e, n) => e === t[n]));
107
+ }), Qe = c(() => Ze.value && (O.value?.length ?? 0) > 0), $e = c(() => {
108
+ let e = E.value;
109
+ if (!e || !w(e) || !Re(e.items)) return e;
110
+ let t = r(e.items);
111
+ return t === e.items ? e : {
111
112
  ...e,
112
113
  items: t
113
- } : e;
114
- }), it = s(() => se(O.value)), at = s(() => st.value.length > 0), ot = s(() => C.value ? i(C.value, S.options.document) : null), k = s(() => {
115
- let e = C.value;
116
- if (!e || !("properties" in e || "additionalProperties" in e) || "allOf" in e || !(S.schema && typeof S.schema == "object" && "allOf" in S.schema) && ot.value) return !1;
114
+ };
115
+ }), et = c(() => oe($e.value)), tt = c(() => it.value.length > 0), nt = c(() => E.value ? ne(E.value, T.options.document) : null), rt = c(() => {
116
+ let e = E.value;
117
+ if (!e || !("properties" in e || "additionalProperties" in e) || "allOf" in e || !(T.schema && typeof T.schema == "object" && "allOf" in T.schema) && nt.value) return !1;
117
118
  let t = "type" in e ? e.type : void 0, n = typeof t == "string" && t !== "object";
118
119
  return a(e) || !n;
119
- }), A = s(() => {
120
- let e = C.value;
121
- return !e || !x(e) || e.items === void 0 ? !1 : it.value;
122
- }), st = s(() => re(C.value)), ct = s(() => {
123
- let e = ie(C.value);
120
+ }), A = c(() => {
121
+ let e = E.value;
122
+ return !e || !w(e) || e.items === void 0 ? !1 : et.value;
123
+ }), it = c(() => i(E.value)), at = c(() => {
124
+ let e = re(E.value);
124
125
  return e ? I(e) : null;
125
- }), j = s(() => me(C.value, S.description)), lt = s(() => {
126
- let e = C.value;
126
+ }), j = c(() => pe(E.value, T.description)), ot = c(() => {
127
+ let e = E.value;
127
128
  if (!e) return e;
128
129
  let { oneOf: t, anyOf: n, allOf: ee, not: r, discriminator: te, externalDocs: ne, ...i } = e;
129
130
  if (j.value && "description" in i) {
@@ -131,70 +132,70 @@ var We = ["id"], Ge = {
131
132
  return t;
132
133
  }
133
134
  return i;
134
- }), M = s(() => he(C.value, S.name, S.required)), ut = s(() => B.value || w.value ? [] : ne(C.value, S.options.document, ot.value)), dt = s(() => S.extensionSource ? {
135
- ...S.extensionSource,
136
- ...C.value
137
- } : C.value), ft = s(() => {
138
- let e = dt.value;
135
+ }), M = c(() => me(E.value, T.name, T.required)), st = c(() => B.value || D.value ? [] : te(E.value, T.options.document, nt.value)), ct = c(() => T.extensionSource ? {
136
+ ...T.extensionSource,
137
+ ...E.value
138
+ } : E.value), lt = c(() => {
139
+ let e = ct.value;
139
140
  if (!e || typeof e != "object") return !1;
140
141
  for (let t in e) if (t.startsWith("x-")) return !0;
141
142
  return !1;
142
- }), pt = (e) => e === "allOf" ? S.schema?.discriminator ?? S.discriminator : S.schema?.discriminator, N = s(() => {
143
- let e = O.value;
144
- if (!e || !x(e) || e.items === void 0) return;
145
- let t = Be.schema(e.items);
146
- return et.some((e) => Array.isArray(t?.[e]) && t[e]?.length === 1) ? o(t) : t;
147
- }), mt = s(() => {
148
- let e = C.value;
149
- if (e && x(e)) return de(e.items);
150
- }), P = s(() => ({
151
- compact: S.compact,
152
- eventBus: S.eventBus,
143
+ }), ut = (e) => e === "allOf" ? T.schema?.discriminator ?? T.discriminator : T.schema?.discriminator, N = c(() => {
144
+ let e = $e.value;
145
+ if (!e || !w(e) || e.items === void 0) return;
146
+ let t = C.schema(e.items);
147
+ return Ye.some((e) => Array.isArray(t?.[e]) && t[e]?.length === 1) ? o(t) : t;
148
+ }), dt = c(() => {
149
+ let e = E.value;
150
+ if (e && w(e)) return ue(e.items);
151
+ }), P = c(() => ({
152
+ compact: T.compact,
153
+ eventBus: T.eventBus,
153
154
  hideModelNames: L.value,
154
- level: S.level + 1,
155
- name: S.name,
156
- options: S.options,
157
- schemaContext: S.schemaContext
158
- })), ht = s(() => k.value ? {
155
+ level: T.level + 1,
156
+ name: T.name,
157
+ options: T.options,
158
+ schemaContext: T.schemaContext
159
+ })), ft = c(() => rt.value ? {
159
160
  ...P.value,
160
- breadcrumb: T.value,
161
- compositionPath: E.value,
162
- cycleKey: S.cycleKey,
163
- schema: lt.value,
164
- discriminator: C.value?.discriminator ?? S.discriminator
165
- } : null), gt = s(() => A.value && N.value ? {
161
+ breadcrumb: O.value,
162
+ compositionPath: k.value,
163
+ cycleKey: T.cycleKey,
164
+ schema: ot.value,
165
+ discriminator: E.value?.discriminator ?? T.discriminator
166
+ } : null), pt = c(() => A.value && N.value ? {
166
167
  ...P.value,
167
- compositionPath: nt.value,
168
- cycleKey: mt.value,
169
- schema: Be.schema(N.value)
170
- } : null), F = s(() => {
171
- let { cycleKey: e } = S;
172
- return w.value ? {
168
+ compositionPath: Xe.value,
169
+ cycleKey: dt.value,
170
+ schema: C.schema(N.value)
171
+ } : null), F = c(() => {
172
+ let { cycleKey: e } = T;
173
+ return D.value ? {
173
174
  ...P.value,
174
- breadcrumb: T.value,
175
- compositionPath: E.value,
175
+ breadcrumb: O.value,
176
+ compositionPath: k.value,
176
177
  cycleKey: e,
177
- schema: C.value
178
- } : ht.value ?? gt.value;
179
- }), _t = s(() => !ht.value && !!gt.value), vt = s(() => S.name === S.discriminator?.propertyName ? S.discriminator?.[ee]?.value : void 0), yt = s(() => !!(S.name && S.discriminator?.propertyName === S.name)), { translate: I } = ve(), L = s(() => S.hideModelNames || !!S.options.hideModelNames), R = s(() => w.value || k.value || A.value), bt = Ae(ue, void 0), z = s(() => _t.value ? mt.value : S.cycleKey), B = s(() => z.value != null && !!bt?.has(z.value)), xt = s(() => {
178
+ schema: E.value
179
+ } : ft.value ?? pt.value;
180
+ }), mt = c(() => !ft.value && !!pt.value), ht = c(() => T.name === T.discriminator?.propertyName ? T.discriminator?.[ee]?.value : void 0), gt = c(() => !!(T.name && T.discriminator?.propertyName === T.name)), { translate: I } = _e(), L = c(() => T.hideModelNames || !!T.options.hideModelNames), R = c(() => D.value || rt.value || A.value), _t = Oe(le, void 0), z = c(() => mt.value ? dt.value : T.cycleKey), B = c(() => z.value != null && !!_t?.has(z.value)), vt = c(() => {
180
181
  let e = z.value;
181
182
  if (typeof e == "string") {
182
- let t = ae(e);
183
+ let t = ie(e);
183
184
  if (t) return t;
184
185
  }
185
- return S.modelName || S.name || I("schema.schema");
186
- }), V = S.expansion ?? pe(ze(() => S.scrollTargetId ?? "")), St = g(), H = s(() => fe(T.value) || `~anonymous-${St}`), U = s(() => R.value && !S.noncollapsible && M.value && !B.value), W = s(() => R.value && !!S.noncollapsible && !!S.name && M.value && !B.value), G = s(() => U.value && V.isExpanded(H.value, {
186
+ return T.modelName || T.name || I("schema.schema");
187
+ }), V = T.expansion ?? fe(Ie(() => T.scrollTargetId ?? "")), yt = v(), H = c(() => de(O.value) || `~anonymous-${yt}`), U = c(() => R.value && !T.noncollapsible && M.value && !B.value), W = c(() => R.value && !!T.noncollapsible && !!T.name && M.value && !B.value), G = c(() => U.value && V.isExpanded(H.value, {
187
188
  cyclic: B.value,
188
- defaultOpen: !!S.options.expandAllSchemaProperties
189
- })), K = Pe(!1);
190
- v(G, (e, t) => {
191
- e ? K.value &&= (V.untilFound.release(), !1) : t && (K.value = Ct() && V.untilFound.acquire());
192
- }), Ne(() => {
189
+ defaultOpen: !!T.options.expandAllSchemaProperties
190
+ })), K = Me(!1);
191
+ b(G, (e, t) => {
192
+ e ? K.value &&= (V.untilFound.release(), !1) : t && (K.value = bt() && V.untilFound.acquire());
193
+ }), je(() => {
193
194
  K.value &&= (V.untilFound.release(), !1);
194
195
  });
195
- let Ct = () => typeof document < "u" && "onbeforematch" in document.body, wt = s(() => W.value || U.value && (G.value || K.value)), Tt = s(() => W.value || G.value ? void 0 : "until-found"), Et = s(() => R.value && !B.value && !U.value && !W.value), Dt = g(), q = g(), Ot = g(), kt = _("treePanel"), J = _("treeToggle"), Y = null, X = () => {
196
+ let bt = () => typeof document < "u" && "onbeforematch" in document.body, xt = c(() => W.value || U.value && (G.value || K.value)), St = c(() => W.value || G.value ? void 0 : "until-found"), Ct = c(() => R.value && !B.value && !U.value && !W.value), wt = v(), q = v(), Tt = v(), Et = y("treePanel"), J = y("treeToggle"), Y = null, X = () => {
196
197
  Y?.removeAttribute("data-heading-hovered"), Y = null;
197
- }, At = {
198
+ }, Dt = {
198
199
  pointerenter: (e) => {
199
200
  X();
200
201
  let t = e.currentTarget instanceof HTMLElement ? e.currentTarget.parentElement : null;
@@ -202,54 +203,54 @@ var We = ["id"], Ge = {
202
203
  },
203
204
  pointerleave: X
204
205
  };
205
- v(U, (e) => {
206
+ b(U, (e) => {
206
207
  e || X();
207
- }), Me(X), v(G, (e) => {
208
+ }), Ae(X), b(G, (e) => {
208
209
  if (e) return;
209
- let t = kt.value?.$el;
210
+ let t = Et.value?.$el;
210
211
  t?.removeAttribute("data-rail-hovered"), t?.parentElement?.removeAttribute("data-child-rail-hovered");
211
212
  });
212
- let Z = s(() => _t.value ? N.value : lt.value), jt = s(() => Z.value ? ge(Z.value, void 0, S.options) : []), Q = s(() => {
213
+ let Z = c(() => mt.value ? N.value : ot.value), Ot = c(() => Z.value ? he(Z.value, void 0, T.options) : []), Q = c(() => {
213
214
  if (!R.value) return null;
214
215
  let e = Z.value;
215
216
  if (!e) return null;
216
- let t = S.options.hideReadOnly || S.options.hideWriteOnly ? jt.value.length : a(e) && e.properties ? Object.keys(e.properties).length : 0, n = "patternProperties" in e && e.patternProperties ? Object.keys(e.patternProperties).length : 0, ee = "additionalProperties" in e && e.additionalProperties ? 1 : 0, r = t + n + ee;
217
+ let t = T.options.hideReadOnly || T.options.hideWriteOnly ? Ot.value.length : a(e) && e.properties ? Object.keys(e.properties).length : 0, n = "patternProperties" in e && e.patternProperties ? Object.keys(e.patternProperties).length : 0, ee = "additionalProperties" in e && e.additionalProperties ? 1 : 0, r = t + n + ee;
217
218
  return r === 0 ? null : I("schema.propertyCount", { count: String(r) });
218
- }), Mt = s(() => oe(C.value, { hideModelNames: L.value })), Nt = s(() => S.modelName || I("schema.schema")), $ = () => {
219
+ }), kt = c(() => ae(E.value, { hideModelNames: L.value })), At = c(() => T.modelName || I("schema.schema")), $ = () => {
219
220
  let e = !G.value;
220
221
  if (!e) {
221
222
  let e = document.activeElement, t = J.value instanceof HTMLElement ? J.value : J.value?.$el;
222
- e && kt.value?.$el.contains(e) && t?.focus();
223
+ e && Et.value?.$el.contains(e) && t?.focus();
223
224
  }
224
225
  V.setExpanded(H.value, e);
225
- }, Pt = (e) => {
226
+ }, jt = (e) => {
226
227
  if (!U.value) return;
227
228
  let t = e.target;
228
229
  t instanceof Element && t.closest("a, button, [role=\"button\"], input, select, label") || window.getSelection()?.toString() || $();
229
- }, Ft = () => {
230
+ }, Mt = () => {
230
231
  V.setExpanded(H.value, !0);
231
232
  };
232
- return (ee, r) => (m(), c(Ie(f.is ?? "li"), { class: je(["property", [
233
- `property--level-${f.level}`,
233
+ return (ee, r) => (h(), l(Pe(p.is ?? "li"), { class: ke(["property", [
234
+ `property--level-${p.level}`,
234
235
  {
235
- "property--compact": f.compact,
236
- "property--deprecated": C.value?.deprecated
236
+ "property--compact": p.compact,
237
+ "property--deprecated": E.value?.deprecated
237
238
  },
238
239
  "property--tree grid! grid-cols-[minmax(0,1fr)] border-b-0! px-0! py-[var(--schema-row-pad,6px)]!",
239
240
  { "property--tree-container": !U.value && !B.value && (R.value || !M.value) },
240
- `property--depth-${f.depth}`
241
+ `property--depth-${p.depth}`
241
242
  ]]) }, {
242
- default: y(() => [
243
- U.value ? (m(), c(Ce, {
243
+ default: x(() => [
244
+ U.value ? (h(), l(xe, {
244
245
  key: 0,
245
246
  ref: "treeToggle",
246
247
  class: "absolute start-[calc(0px_-_var(--schema-toggle-half,12px)_-_var(--schema-gutter,16px))] top-2.5 z-[1] col-start-1 row-start-1 -translate-y-1/2 print:hidden",
247
- countId: Q.value ? h(Ot) : void 0,
248
- fallbackLabel: Nt.value,
249
- nameId: f.name ? h(q) : void 0,
248
+ countId: Q.value ? _(Tt) : void 0,
249
+ fallbackLabel: At.value,
250
+ nameId: p.name ? _(q) : void 0,
250
251
  open: G.value,
251
- panelId: h(Dt),
252
- panelRendered: wt.value,
252
+ panelId: _(wt),
253
+ panelRendered: xt.value,
253
254
  onToggle: $
254
255
  }, null, 8, [
255
256
  "countId",
@@ -258,84 +259,86 @@ var We = ["id"], Ge = {
258
259
  "open",
259
260
  "panelId",
260
261
  "panelRendered"
261
- ])) : l("", !0),
262
- M.value ? (m(), c(we, p({
262
+ ])) : u("", !0),
263
+ M.value ? (h(), l(Se, m({
263
264
  key: 1,
265
+ badges: p.badges,
264
266
  class: ["group", [{ "cursor-pointer": U.value }, "relative row-start-1 min-h-5 content-center [&>*:has(+.copy-link-trailing)]:me-0!"]],
265
- discriminatorValue: vt.value,
266
- enum: at.value,
267
- eventBus: f.eventBus,
267
+ discriminatorValue: ht.value,
268
+ enum: tt.value,
269
+ eventBus: p.eventBus,
268
270
  hideModelNames: L.value,
269
- isDiscriminator: yt.value,
270
- keyKind: f.variant === "additionalProperties" ? "additional" : f.variant === "patternProperties" ? "pattern" : void 0,
271
+ isDiscriminator: gt.value,
272
+ keyKind: p.variant === "additionalProperties" ? "additional" : p.variant === "patternProperties" ? "pattern" : void 0,
271
273
  modelLinkOptions: {
272
- hideModels: f.options.hideModels,
273
- document: f.options.document
274
+ hideModels: p.options.hideModels,
275
+ document: p.options.document
274
276
  },
275
- modelName: f.modelName,
276
- propertyNames: f.propertyNamesSchema,
277
- recursiveTo: B.value ? xt.value : void 0,
278
- required: f.required,
279
- value: C.value
280
- }, Re(U.value ? At : h($e)), { onClick: Pt }), Oe({ _: 2 }, [
281
- f.name ? {
277
+ modelName: p.modelName,
278
+ propertyNames: p.propertyNamesSchema,
279
+ recursiveTo: B.value ? vt.value : void 0,
280
+ required: p.required,
281
+ value: E.value
282
+ }, Fe(U.value ? Dt : _(Je)), { onClick: jt }), Ee({ _: 2 }, [
283
+ p.name ? {
282
284
  name: "name",
283
- fn: y(() => [rt.value ? (m(), c(n, {
285
+ fn: x(() => [Qe.value ? (h(), l(n, {
284
286
  key: 0,
285
- breadcrumb: T.value
287
+ breadcrumb: O.value
286
288
  }, {
287
- default: y(() => [De("span", { id: h(q) }, [f.variant === "patternProperties" ? (m(), u("span", Ge, [d(h(b), {
289
+ default: x(() => [Te("span", { id: _(q) }, [p.variant === "patternProperties" ? (h(), d("span", Be, [f(_(S), {
288
290
  preset: "property",
289
- text: f.name
290
- }, null, 8, ["text"])])) : f.variant === "additionalProperties" ? (m(), u("span", Ke, [d(h(b), {
291
+ text: p.name
292
+ }, null, 8, ["text"])])) : p.variant === "additionalProperties" ? (h(), d("span", Ve, [f(_(S), {
291
293
  preset: "property",
292
- text: f.name
293
- }, null, 8, ["text"])])) : (m(), c(h(b), {
294
+ text: p.name
295
+ }, null, 8, ["text"])])) : (h(), l(_(S), {
294
296
  key: 2,
295
297
  preset: "property",
296
- text: f.name
297
- }, null, 8, ["text"]))], 8, We)]),
298
+ text: p.name
299
+ }, null, 8, ["text"]))], 8, ze)]),
298
300
  _: 1
299
- }, 8, ["breadcrumb"])) : (m(), u("span", {
301
+ }, 8, ["breadcrumb"])) : (h(), d("span", {
300
302
  key: 1,
301
- id: h(q)
302
- }, [f.variant === "patternProperties" ? (m(), u("span", Je, [d(h(b), {
303
+ id: _(q)
304
+ }, [p.variant === "patternProperties" ? (h(), d("span", Ue, [f(_(S), {
303
305
  preset: "property",
304
- text: f.name
305
- }, null, 8, ["text"])])) : f.variant === "additionalProperties" ? (m(), u("span", Ye, [d(h(b), {
306
+ text: p.name
307
+ }, null, 8, ["text"])])) : p.variant === "additionalProperties" ? (h(), d("span", We, [f(_(S), {
306
308
  preset: "property",
307
- text: f.name
308
- }, null, 8, ["text"])])) : (m(), c(h(b), {
309
+ text: p.name
310
+ }, null, 8, ["text"])])) : (h(), l(_(S), {
309
311
  key: 2,
310
312
  preset: "property",
311
- text: f.name
312
- }, null, 8, ["text"]))], 8, qe))]),
313
+ text: p.name
314
+ }, null, 8, ["text"]))], 8, He))]),
313
315
  key: "0"
314
316
  } : void 0,
315
- C.value?.example === void 0 ? void 0 : {
317
+ E.value?.example === void 0 ? void 0 : {
316
318
  name: "example",
317
- fn: y(() => [ke(" Example: " + Le(C.value.example), 1)]),
319
+ fn: x(() => [De(" Example: " + g(E.value.example), 1)]),
318
320
  key: "1"
319
321
  },
320
322
  U.value && !G.value ? {
321
323
  name: "preview",
322
- fn: y(() => [d(be, {
324
+ fn: x(() => [f(ve, {
323
325
  "aria-hidden": "true",
324
326
  class: "mr-0!",
325
- propertyNames: jt.value,
327
+ propertyNames: Ot.value,
326
328
  schema: Z.value
327
329
  }, null, 8, ["propertyNames", "schema"])]),
328
330
  key: "2"
329
331
  } : void 0,
330
- f.name && D.value && T.value ? {
332
+ p.name && Ze.value && O.value ? {
331
333
  name: "trailing",
332
- fn: y(() => [d(t, {
333
- anchorId: T.value.join("."),
334
- eventBus: f.eventBus
334
+ fn: x(() => [f(t, {
335
+ anchorId: O.value.join("."),
336
+ eventBus: p.eventBus
335
337
  }, null, 8, ["anchorId", "eventBus"])]),
336
338
  key: "3"
337
339
  } : void 0
338
340
  ]), 1040, [
341
+ "badges",
339
342
  "class",
340
343
  "discriminatorValue",
341
344
  "enum",
@@ -349,88 +352,88 @@ var We = ["id"], Ge = {
349
352
  "recursiveTo",
350
353
  "required",
351
354
  "value"
352
- ])) : l("", !0),
353
- d(e, {
355
+ ])) : u("", !0),
356
+ f(e, {
354
357
  class: "my-2",
355
- value: C.value?.externalDocs
358
+ value: E.value?.externalDocs
356
359
  }, null, 8, ["value"]),
357
- j.value || ct.value ? (m(), u("div", Xe, [d(h(Ve), { value: j.value || ct.value || "" }, null, 8, ["value"])])) : l("", !0),
358
- f.propertyNamesEnum && f.propertyNamesEnum.length > 0 ? (m(), c(Se, {
360
+ j.value || at.value ? (h(), d("div", Ge, [f(_(Le), { value: j.value || at.value || "" }, null, 8, ["value"])])) : u("", !0),
361
+ p.propertyNamesEnum && p.propertyNamesEnum.length > 0 ? (h(), l(be, {
359
362
  key: 3,
360
363
  propertyNames: "",
361
- value: { enum: f.propertyNamesEnum }
362
- }, null, 8, ["value"])) : l("", !0),
363
- st.value.length > 0 && !A.value && !Mt.value ? (m(), c(Se, {
364
+ value: { enum: p.propertyNamesEnum }
365
+ }, null, 8, ["value"])) : u("", !0),
366
+ it.value.length > 0 && !A.value && !kt.value ? (h(), l(be, {
364
367
  key: 4,
365
- value: C.value
366
- }, null, 8, ["value"])) : l("", !0),
367
- U.value && Q.value ? (m(), u("span", {
368
+ value: E.value
369
+ }, null, 8, ["value"])) : u("", !0),
370
+ U.value && Q.value ? (h(), d("span", {
368
371
  key: 5,
369
- id: h(Ot),
372
+ id: _(Tt),
370
373
  class: "screenreader-only"
371
- }, Le(Q.value), 9, Ze)) : l("", !0),
372
- wt.value ? (m(), c(Te, {
374
+ }, g(Q.value), 9, Ke)) : u("", !0),
375
+ xt.value ? (h(), l(Ce, {
373
376
  key: 6,
374
- id: h(Dt),
377
+ id: _(wt),
375
378
  ref: "treePanel",
376
379
  class: "property-children mt-1.5 mb-0.5 [&_.schema-card]:mb-0! [&_.schema-card]:pb-0! [&_.schema-properties]:mb-0! [&_.schema-properties]:pb-0! [&_ul]:my-0! [&_ul]:py-0! [&[hidden=until-found]]:my-0 [&[hidden=until-found]]:border-s-0 [&[hidden]:not([hidden=until-found])]:hidden",
377
380
  closeOnRail: U.value,
378
- depth: f.depth + 1,
379
- hidden: Tt.value,
380
- onBeforematch: Ft,
381
+ depth: p.depth + 1,
382
+ hidden: St.value,
383
+ onBeforematch: Mt,
381
384
  onClose: $
382
385
  }, {
383
- default: y(() => [F.value ? (m(), c(ye, p({ key: 0 }, F.value, {
384
- depth: f.depth + 1,
385
- expansion: h(V),
386
+ default: x(() => [F.value ? (h(), l(s, m({ key: 0 }, F.value, {
387
+ depth: p.depth + 1,
388
+ expansion: _(V),
386
389
  noncollapsible: "",
387
- scrollTargetId: f.scrollTargetId,
388
- specificationExtension: f.specificationExtension
390
+ scrollTargetId: p.scrollTargetId,
391
+ specificationExtension: p.specificationExtension
389
392
  }), null, 16, [
390
393
  "depth",
391
394
  "expansion",
392
395
  "scrollTargetId",
393
396
  "specificationExtension"
394
- ])) : l("", !0)]),
397
+ ])) : u("", !0)]),
395
398
  _: 1
396
399
  }, 8, [
397
400
  "id",
398
401
  "closeOnRail",
399
402
  "depth",
400
403
  "hidden"
401
- ])) : l("", !0),
402
- Et.value ? (m(), u("div", Qe, [F.value ? (m(), c(ye, p({ key: 0 }, F.value, {
403
- depth: f.depth,
404
- expansion: h(V),
404
+ ])) : u("", !0),
405
+ Ct.value ? (h(), d("div", qe, [F.value ? (h(), l(s, m({ key: 0 }, F.value, {
406
+ depth: p.depth,
407
+ expansion: _(V),
405
408
  noncollapsible: "",
406
- scrollTargetId: f.scrollTargetId,
407
- specificationExtension: f.specificationExtension
409
+ scrollTargetId: p.scrollTargetId,
410
+ specificationExtension: p.specificationExtension
408
411
  }), null, 16, [
409
412
  "depth",
410
413
  "expansion",
411
414
  "scrollTargetId",
412
415
  "specificationExtension"
413
- ])) : l("", !0)])) : l("", !0),
414
- (m(!0), u(Ee, null, Fe(ut.value, (e) => (m(), c(xe, {
416
+ ])) : u("", !0)])) : u("", !0),
417
+ (h(!0), d(we, null, Ne(st.value, (e) => (h(), l(ye, {
415
418
  key: e.composition,
416
- breadcrumb: T.value,
417
- compact: f.compact,
419
+ breadcrumb: O.value,
420
+ compact: p.compact,
418
421
  composition: e.composition,
419
- compositionPath: E.value,
420
- depth: f.depth,
421
- discriminator: pt(e.composition),
422
- eventBus: f.eventBus,
423
- expansion: h(V),
424
- hideHeading: f.hideHeading,
422
+ compositionPath: k.value,
423
+ depth: p.depth,
424
+ discriminator: ut(e.composition),
425
+ eventBus: p.eventBus,
426
+ expansion: _(V),
427
+ hideHeading: p.hideHeading,
425
428
  hideModelNames: L.value,
426
- level: f.level,
427
- name: f.name,
428
- noncollapsible: f.noncollapsible,
429
- options: f.options,
429
+ level: p.level,
430
+ name: p.name,
431
+ noncollapsible: p.noncollapsible,
432
+ options: p.options,
430
433
  schema: e.value,
431
- schemaContext: f.schemaContext,
432
- scrollTargetId: f.scrollTargetId,
433
- specificationExtension: f.specificationExtension
434
+ schemaContext: p.schemaContext,
435
+ scrollTargetId: p.scrollTargetId,
436
+ specificationExtension: p.specificationExtension
434
437
  }, null, 8, [
435
438
  "breadcrumb",
436
439
  "compact",
@@ -451,16 +454,16 @@ var We = ["id"], Ge = {
451
454
  "scrollTargetId",
452
455
  "specificationExtension"
453
456
  ]))), 128)),
454
- ft.value && f.specificationExtension ? (m(), c(Ie(f.specificationExtension), {
457
+ lt.value && p.specificationExtension ? (h(), l(Pe(p.specificationExtension), {
455
458
  key: 8,
456
- showExtensions: f.options.showExtensions,
457
- value: dt.value
458
- }, null, 8, ["showExtensions", "value"])) : l("", !0)
459
+ showExtensions: p.options.showExtensions,
460
+ value: ct.value
461
+ }, null, 8, ["showExtensions", "value"])) : u("", !0)
459
462
  ]),
460
463
  _: 1
461
464
  }, 8, ["class"]));
462
465
  }
463
466
  });
464
- export { S as default };
467
+ export { T as default };
465
468
 
466
469
  //# sourceMappingURL=SchemaProperty.vue_vue_type_script_setup_true_lang.js.map