@scalar/blocks 0.9.0 → 0.10.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 (81) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js +5 -1
  3. package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +1 -1
  4. package/dist/code-example/helpers/operation-to-har/process-server-url.d.ts +1 -3
  5. package/dist/code-example/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
  6. package/dist/code-example/helpers/operation-to-har/process-server-url.js +6 -12
  7. package/dist/code-example/helpers/operation-to-har/process-server-url.js.map +1 -1
  8. package/dist/constants.js +1 -1
  9. package/dist/schema/Schema.vue.d.ts.map +1 -1
  10. package/dist/schema/Schema.vue.js +1 -1
  11. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js +114 -117
  12. package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +1 -1
  13. package/dist/schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  14. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js +93 -92
  15. package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map +1 -1
  16. package/dist/schema/SchemaProperty.vue.d.ts.map +1 -1
  17. package/dist/schema/SchemaProperty.vue.js +1 -1
  18. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js +223 -223
  19. package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +1 -1
  20. package/dist/schema/SchemaPropertyHeading.vue.js +1 -1
  21. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +4 -4
  22. package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js +8 -1
  24. package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/schema/helpers/dynamic-scope.d.ts +13 -17
  26. package/dist/schema/helpers/dynamic-scope.d.ts.map +1 -1
  27. package/dist/schema/helpers/dynamic-scope.js +4 -4
  28. package/dist/schema/helpers/dynamic-scope.js.map +1 -1
  29. package/dist/schema/localization/index.d.ts +2 -1
  30. package/dist/schema/localization/index.d.ts.map +1 -1
  31. package/dist/schema/localization/locales/ar.d.ts +1 -0
  32. package/dist/schema/localization/locales/ar.d.ts.map +1 -1
  33. package/dist/schema/localization/locales/ar.js +1 -0
  34. package/dist/schema/localization/locales/ar.js.map +1 -1
  35. package/dist/schema/localization/locales/de.d.ts +1 -0
  36. package/dist/schema/localization/locales/de.d.ts.map +1 -1
  37. package/dist/schema/localization/locales/de.js +1 -0
  38. package/dist/schema/localization/locales/de.js.map +1 -1
  39. package/dist/schema/localization/locales/en.d.ts +1 -0
  40. package/dist/schema/localization/locales/en.d.ts.map +1 -1
  41. package/dist/schema/localization/locales/en.js +1 -0
  42. package/dist/schema/localization/locales/en.js.map +1 -1
  43. package/dist/schema/localization/locales/es.d.ts +1 -0
  44. package/dist/schema/localization/locales/es.d.ts.map +1 -1
  45. package/dist/schema/localization/locales/es.js +1 -0
  46. package/dist/schema/localization/locales/es.js.map +1 -1
  47. package/dist/schema/localization/locales/fr.d.ts +1 -0
  48. package/dist/schema/localization/locales/fr.d.ts.map +1 -1
  49. package/dist/schema/localization/locales/fr.js +1 -0
  50. package/dist/schema/localization/locales/fr.js.map +1 -1
  51. package/dist/schema/localization/locales/pt.d.ts +1 -0
  52. package/dist/schema/localization/locales/pt.d.ts.map +1 -1
  53. package/dist/schema/localization/locales/pt.js +1 -0
  54. package/dist/schema/localization/locales/pt.js.map +1 -1
  55. package/dist/schema/localization/locales/ru.d.ts +1 -0
  56. package/dist/schema/localization/locales/ru.d.ts.map +1 -1
  57. package/dist/schema/localization/locales/ru.js +1 -0
  58. package/dist/schema/localization/locales/ru.js.map +1 -1
  59. package/dist/schema/localization/locales/zh-cn.d.ts +1 -0
  60. package/dist/schema/localization/locales/zh-cn.d.ts.map +1 -1
  61. package/dist/schema/localization/locales/zh-cn.js +1 -0
  62. package/dist/schema/localization/locales/zh-cn.js.map +1 -1
  63. package/dist/schema/localization/locales/zh-tw.d.ts +1 -0
  64. package/dist/schema/localization/locales/zh-tw.d.ts.map +1 -1
  65. package/dist/schema/localization/locales/zh-tw.js +1 -0
  66. package/dist/schema/localization/locales/zh-tw.js.map +1 -1
  67. package/dist/schema/localization/translations.d.ts +9 -0
  68. package/dist/schema/localization/translations.d.ts.map +1 -1
  69. package/dist/schema/proxy-performance.bench.d.ts +2 -0
  70. package/dist/schema/proxy-performance.bench.d.ts.map +1 -0
  71. package/dist/specification-extensions/ExtensionValue.vue.d.ts +2 -0
  72. package/dist/specification-extensions/ExtensionValue.vue.d.ts.map +1 -1
  73. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +19 -15
  74. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  75. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts +6 -0
  76. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts.map +1 -1
  77. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +60 -13
  78. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  79. package/dist/style.css +27 -1
  80. package/dist/vue-styles.css +1 -1
  81. package/package.json +16 -15
@@ -2,57 +2,57 @@ 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: {},
@@ -92,38 +92,38 @@ var We = ["id"], Ge = {
92
92
  specificationExtension: {},
93
93
  expansion: {}
94
94
  },
95
- setup(f) {
96
- let S = f, et = [
95
+ setup(p) {
96
+ let T = p, Ye = [
97
97
  "oneOf",
98
98
  "anyOf",
99
99
  "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 ? {
100
+ ], E = c(() => se(o(r(ge(T.schema))), T.name)), D = c(() => {
101
+ let { name: e } = T, t = E.value;
102
+ return !!e && !!t?.allOf && ce(t).segments.some((e) => e.kind === "object" && a(e.schema));
103
+ }), 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(() => {
104
+ let e = T.options.linkablePropertyPath, t = O.value;
105
+ return T.level <= 2 || !!(e && t && e.length === t.length && e.every((e, n) => e === t[n]));
106
+ }), Qe = c(() => Ze.value && (O.value?.length ?? 0) > 0), $e = c(() => {
107
+ let e = E.value;
108
+ if (!e || !w(e) || !Re(e.items)) return e;
109
+ let t = r(e.items);
110
+ return t === e.items ? e : {
111
111
  ...e,
112
112
  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;
113
+ };
114
+ }), et = c(() => oe($e.value)), tt = c(() => it.value.length > 0), nt = c(() => E.value ? ne(E.value, T.options.document) : null), rt = c(() => {
115
+ let e = E.value;
116
+ 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
117
  let t = "type" in e ? e.type : void 0, n = typeof t == "string" && t !== "object";
118
118
  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);
119
+ }), A = c(() => {
120
+ let e = E.value;
121
+ return !e || !w(e) || e.items === void 0 ? !1 : et.value;
122
+ }), it = c(() => i(E.value)), at = c(() => {
123
+ let e = re(E.value);
124
124
  return e ? I(e) : null;
125
- }), j = s(() => me(C.value, S.description)), lt = s(() => {
126
- let e = C.value;
125
+ }), j = c(() => pe(E.value, T.description)), ot = c(() => {
126
+ let e = E.value;
127
127
  if (!e) return e;
128
128
  let { oneOf: t, anyOf: n, allOf: ee, not: r, discriminator: te, externalDocs: ne, ...i } = e;
129
129
  if (j.value && "description" in i) {
@@ -131,70 +131,70 @@ var We = ["id"], Ge = {
131
131
  return t;
132
132
  }
133
133
  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;
134
+ }), 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 ? {
135
+ ...T.extensionSource,
136
+ ...E.value
137
+ } : E.value), lt = c(() => {
138
+ let e = ct.value;
139
139
  if (!e || typeof e != "object") return !1;
140
140
  for (let t in e) if (t.startsWith("x-")) return !0;
141
141
  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,
142
+ }), ut = (e) => e === "allOf" ? T.schema?.discriminator ?? T.discriminator : T.schema?.discriminator, N = c(() => {
143
+ let e = $e.value;
144
+ if (!e || !w(e) || e.items === void 0) return;
145
+ let t = C.schema(e.items);
146
+ return Ye.some((e) => Array.isArray(t?.[e]) && t[e]?.length === 1) ? o(t) : t;
147
+ }), dt = c(() => {
148
+ let e = E.value;
149
+ if (e && w(e)) return ue(e.items);
150
+ }), P = c(() => ({
151
+ compact: T.compact,
152
+ eventBus: T.eventBus,
153
153
  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 ? {
154
+ level: T.level + 1,
155
+ name: T.name,
156
+ options: T.options,
157
+ schemaContext: T.schemaContext
158
+ })), ft = c(() => rt.value ? {
159
159
  ...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 ? {
160
+ breadcrumb: O.value,
161
+ compositionPath: k.value,
162
+ cycleKey: T.cycleKey,
163
+ schema: ot.value,
164
+ discriminator: E.value?.discriminator ?? T.discriminator
165
+ } : null), pt = c(() => A.value && N.value ? {
166
166
  ...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 ? {
167
+ compositionPath: Xe.value,
168
+ cycleKey: dt.value,
169
+ schema: C.schema(N.value)
170
+ } : null), F = c(() => {
171
+ let { cycleKey: e } = T;
172
+ return D.value ? {
173
173
  ...P.value,
174
- breadcrumb: T.value,
175
- compositionPath: E.value,
174
+ breadcrumb: O.value,
175
+ compositionPath: k.value,
176
176
  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(() => {
177
+ schema: E.value
178
+ } : ft.value ?? pt.value;
179
+ }), 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
180
  let e = z.value;
181
181
  if (typeof e == "string") {
182
- let t = ae(e);
182
+ let t = ie(e);
183
183
  if (t) return t;
184
184
  }
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, {
185
+ return T.modelName || T.name || I("schema.schema");
186
+ }), 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
187
  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(() => {
188
+ defaultOpen: !!T.options.expandAllSchemaProperties
189
+ })), K = Me(!1);
190
+ b(G, (e, t) => {
191
+ e ? K.value &&= (V.untilFound.release(), !1) : t && (K.value = bt() && V.untilFound.acquire());
192
+ }), je(() => {
193
193
  K.value &&= (V.untilFound.release(), !1);
194
194
  });
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 = () => {
195
+ 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
196
  Y?.removeAttribute("data-heading-hovered"), Y = null;
197
- }, At = {
197
+ }, Dt = {
198
198
  pointerenter: (e) => {
199
199
  X();
200
200
  let t = e.currentTarget instanceof HTMLElement ? e.currentTarget.parentElement : null;
@@ -202,54 +202,54 @@ var We = ["id"], Ge = {
202
202
  },
203
203
  pointerleave: X
204
204
  };
205
- v(U, (e) => {
205
+ b(U, (e) => {
206
206
  e || X();
207
- }), Me(X), v(G, (e) => {
207
+ }), Ae(X), b(G, (e) => {
208
208
  if (e) return;
209
- let t = kt.value?.$el;
209
+ let t = Et.value?.$el;
210
210
  t?.removeAttribute("data-rail-hovered"), t?.parentElement?.removeAttribute("data-child-rail-hovered");
211
211
  });
212
- let Z = s(() => _t.value ? N.value : lt.value), jt = s(() => Z.value ? ge(Z.value, void 0, S.options) : []), Q = s(() => {
212
+ let Z = c(() => mt.value ? N.value : ot.value), Ot = c(() => Z.value ? he(Z.value, void 0, T.options) : []), Q = c(() => {
213
213
  if (!R.value) return null;
214
214
  let e = Z.value;
215
215
  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;
216
+ 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
217
  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")), $ = () => {
218
+ }), kt = c(() => ae(E.value, { hideModelNames: L.value })), At = c(() => T.modelName || I("schema.schema")), $ = () => {
219
219
  let e = !G.value;
220
220
  if (!e) {
221
221
  let e = document.activeElement, t = J.value instanceof HTMLElement ? J.value : J.value?.$el;
222
- e && kt.value?.$el.contains(e) && t?.focus();
222
+ e && Et.value?.$el.contains(e) && t?.focus();
223
223
  }
224
224
  V.setExpanded(H.value, e);
225
- }, Pt = (e) => {
225
+ }, jt = (e) => {
226
226
  if (!U.value) return;
227
227
  let t = e.target;
228
228
  t instanceof Element && t.closest("a, button, [role=\"button\"], input, select, label") || window.getSelection()?.toString() || $();
229
- }, Ft = () => {
229
+ }, Mt = () => {
230
230
  V.setExpanded(H.value, !0);
231
231
  };
232
- return (ee, r) => (m(), c(Ie(f.is ?? "li"), { class: je(["property", [
233
- `property--level-${f.level}`,
232
+ return (ee, r) => (h(), l(Pe(p.is ?? "li"), { class: ke(["property", [
233
+ `property--level-${p.level}`,
234
234
  {
235
- "property--compact": f.compact,
236
- "property--deprecated": C.value?.deprecated
235
+ "property--compact": p.compact,
236
+ "property--deprecated": E.value?.deprecated
237
237
  },
238
238
  "property--tree grid! grid-cols-[minmax(0,1fr)] border-b-0! px-0! py-[var(--schema-row-pad,6px)]!",
239
239
  { "property--tree-container": !U.value && !B.value && (R.value || !M.value) },
240
- `property--depth-${f.depth}`
240
+ `property--depth-${p.depth}`
241
241
  ]]) }, {
242
- default: y(() => [
243
- U.value ? (m(), c(Ce, {
242
+ default: x(() => [
243
+ U.value ? (h(), l(xe, {
244
244
  key: 0,
245
245
  ref: "treeToggle",
246
246
  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,
247
+ countId: Q.value ? _(Tt) : void 0,
248
+ fallbackLabel: At.value,
249
+ nameId: p.name ? _(q) : void 0,
250
250
  open: G.value,
251
- panelId: h(Dt),
252
- panelRendered: wt.value,
251
+ panelId: _(wt),
252
+ panelRendered: xt.value,
253
253
  onToggle: $
254
254
  }, null, 8, [
255
255
  "countId",
@@ -258,80 +258,80 @@ var We = ["id"], Ge = {
258
258
  "open",
259
259
  "panelId",
260
260
  "panelRendered"
261
- ])) : l("", !0),
262
- M.value ? (m(), c(we, p({
261
+ ])) : u("", !0),
262
+ M.value ? (h(), l(Se, m({
263
263
  key: 1,
264
264
  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,
265
+ discriminatorValue: ht.value,
266
+ enum: tt.value,
267
+ eventBus: p.eventBus,
268
268
  hideModelNames: L.value,
269
- isDiscriminator: yt.value,
270
- keyKind: f.variant === "additionalProperties" ? "additional" : f.variant === "patternProperties" ? "pattern" : void 0,
269
+ isDiscriminator: gt.value,
270
+ keyKind: p.variant === "additionalProperties" ? "additional" : p.variant === "patternProperties" ? "pattern" : void 0,
271
271
  modelLinkOptions: {
272
- hideModels: f.options.hideModels,
273
- document: f.options.document
272
+ hideModels: p.options.hideModels,
273
+ document: p.options.document
274
274
  },
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 ? {
275
+ modelName: p.modelName,
276
+ propertyNames: p.propertyNamesSchema,
277
+ recursiveTo: B.value ? vt.value : void 0,
278
+ required: p.required,
279
+ value: E.value
280
+ }, Fe(U.value ? Dt : _(Je)), { onClick: jt }), Ee({ _: 2 }, [
281
+ p.name ? {
282
282
  name: "name",
283
- fn: y(() => [rt.value ? (m(), c(n, {
283
+ fn: x(() => [Qe.value ? (h(), l(n, {
284
284
  key: 0,
285
- breadcrumb: T.value
285
+ breadcrumb: O.value
286
286
  }, {
287
- default: y(() => [De("span", { id: h(q) }, [f.variant === "patternProperties" ? (m(), u("span", Ge, [d(h(b), {
287
+ default: x(() => [Te("span", { id: _(q) }, [p.variant === "patternProperties" ? (h(), d("span", Be, [f(_(S), {
288
288
  preset: "property",
289
- text: f.name
290
- }, null, 8, ["text"])])) : f.variant === "additionalProperties" ? (m(), u("span", Ke, [d(h(b), {
289
+ text: p.name
290
+ }, null, 8, ["text"])])) : p.variant === "additionalProperties" ? (h(), d("span", Ve, [f(_(S), {
291
291
  preset: "property",
292
- text: f.name
293
- }, null, 8, ["text"])])) : (m(), c(h(b), {
292
+ text: p.name
293
+ }, null, 8, ["text"])])) : (h(), l(_(S), {
294
294
  key: 2,
295
295
  preset: "property",
296
- text: f.name
297
- }, null, 8, ["text"]))], 8, We)]),
296
+ text: p.name
297
+ }, null, 8, ["text"]))], 8, ze)]),
298
298
  _: 1
299
- }, 8, ["breadcrumb"])) : (m(), u("span", {
299
+ }, 8, ["breadcrumb"])) : (h(), d("span", {
300
300
  key: 1,
301
- id: h(q)
302
- }, [f.variant === "patternProperties" ? (m(), u("span", Je, [d(h(b), {
301
+ id: _(q)
302
+ }, [p.variant === "patternProperties" ? (h(), d("span", Ue, [f(_(S), {
303
303
  preset: "property",
304
- text: f.name
305
- }, null, 8, ["text"])])) : f.variant === "additionalProperties" ? (m(), u("span", Ye, [d(h(b), {
304
+ text: p.name
305
+ }, null, 8, ["text"])])) : p.variant === "additionalProperties" ? (h(), d("span", We, [f(_(S), {
306
306
  preset: "property",
307
- text: f.name
308
- }, null, 8, ["text"])])) : (m(), c(h(b), {
307
+ text: p.name
308
+ }, null, 8, ["text"])])) : (h(), l(_(S), {
309
309
  key: 2,
310
310
  preset: "property",
311
- text: f.name
312
- }, null, 8, ["text"]))], 8, qe))]),
311
+ text: p.name
312
+ }, null, 8, ["text"]))], 8, He))]),
313
313
  key: "0"
314
314
  } : void 0,
315
- C.value?.example === void 0 ? void 0 : {
315
+ E.value?.example === void 0 ? void 0 : {
316
316
  name: "example",
317
- fn: y(() => [ke(" Example: " + Le(C.value.example), 1)]),
317
+ fn: x(() => [De(" Example: " + g(E.value.example), 1)]),
318
318
  key: "1"
319
319
  },
320
320
  U.value && !G.value ? {
321
321
  name: "preview",
322
- fn: y(() => [d(be, {
322
+ fn: x(() => [f(ve, {
323
323
  "aria-hidden": "true",
324
324
  class: "mr-0!",
325
- propertyNames: jt.value,
325
+ propertyNames: Ot.value,
326
326
  schema: Z.value
327
327
  }, null, 8, ["propertyNames", "schema"])]),
328
328
  key: "2"
329
329
  } : void 0,
330
- f.name && D.value && T.value ? {
330
+ p.name && Ze.value && O.value ? {
331
331
  name: "trailing",
332
- fn: y(() => [d(t, {
333
- anchorId: T.value.join("."),
334
- eventBus: f.eventBus
332
+ fn: x(() => [f(t, {
333
+ anchorId: O.value.join("."),
334
+ eventBus: p.eventBus
335
335
  }, null, 8, ["anchorId", "eventBus"])]),
336
336
  key: "3"
337
337
  } : void 0
@@ -349,88 +349,88 @@ var We = ["id"], Ge = {
349
349
  "recursiveTo",
350
350
  "required",
351
351
  "value"
352
- ])) : l("", !0),
353
- d(e, {
352
+ ])) : u("", !0),
353
+ f(e, {
354
354
  class: "my-2",
355
- value: C.value?.externalDocs
355
+ value: E.value?.externalDocs
356
356
  }, 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, {
357
+ j.value || at.value ? (h(), d("div", Ge, [f(_(Le), { value: j.value || at.value || "" }, null, 8, ["value"])])) : u("", !0),
358
+ p.propertyNamesEnum && p.propertyNamesEnum.length > 0 ? (h(), l(be, {
359
359
  key: 3,
360
360
  propertyNames: "",
361
- value: { enum: f.propertyNamesEnum }
362
- }, null, 8, ["value"])) : l("", !0),
363
- st.value.length > 0 && !A.value && !Mt.value ? (m(), c(Se, {
361
+ value: { enum: p.propertyNamesEnum }
362
+ }, null, 8, ["value"])) : u("", !0),
363
+ it.value.length > 0 && !A.value && !kt.value ? (h(), l(be, {
364
364
  key: 4,
365
- value: C.value
366
- }, null, 8, ["value"])) : l("", !0),
367
- U.value && Q.value ? (m(), u("span", {
365
+ value: E.value
366
+ }, null, 8, ["value"])) : u("", !0),
367
+ U.value && Q.value ? (h(), d("span", {
368
368
  key: 5,
369
- id: h(Ot),
369
+ id: _(Tt),
370
370
  class: "screenreader-only"
371
- }, Le(Q.value), 9, Ze)) : l("", !0),
372
- wt.value ? (m(), c(Te, {
371
+ }, g(Q.value), 9, Ke)) : u("", !0),
372
+ xt.value ? (h(), l(Ce, {
373
373
  key: 6,
374
- id: h(Dt),
374
+ id: _(wt),
375
375
  ref: "treePanel",
376
376
  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
377
  closeOnRail: U.value,
378
- depth: f.depth + 1,
379
- hidden: Tt.value,
380
- onBeforematch: Ft,
378
+ depth: p.depth + 1,
379
+ hidden: St.value,
380
+ onBeforematch: Mt,
381
381
  onClose: $
382
382
  }, {
383
- default: y(() => [F.value ? (m(), c(ye, p({ key: 0 }, F.value, {
384
- depth: f.depth + 1,
385
- expansion: h(V),
383
+ default: x(() => [F.value ? (h(), l(s, m({ key: 0 }, F.value, {
384
+ depth: p.depth + 1,
385
+ expansion: _(V),
386
386
  noncollapsible: "",
387
- scrollTargetId: f.scrollTargetId,
388
- specificationExtension: f.specificationExtension
387
+ scrollTargetId: p.scrollTargetId,
388
+ specificationExtension: p.specificationExtension
389
389
  }), null, 16, [
390
390
  "depth",
391
391
  "expansion",
392
392
  "scrollTargetId",
393
393
  "specificationExtension"
394
- ])) : l("", !0)]),
394
+ ])) : u("", !0)]),
395
395
  _: 1
396
396
  }, 8, [
397
397
  "id",
398
398
  "closeOnRail",
399
399
  "depth",
400
400
  "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),
401
+ ])) : u("", !0),
402
+ Ct.value ? (h(), d("div", qe, [F.value ? (h(), l(s, m({ key: 0 }, F.value, {
403
+ depth: p.depth,
404
+ expansion: _(V),
405
405
  noncollapsible: "",
406
- scrollTargetId: f.scrollTargetId,
407
- specificationExtension: f.specificationExtension
406
+ scrollTargetId: p.scrollTargetId,
407
+ specificationExtension: p.specificationExtension
408
408
  }), null, 16, [
409
409
  "depth",
410
410
  "expansion",
411
411
  "scrollTargetId",
412
412
  "specificationExtension"
413
- ])) : l("", !0)])) : l("", !0),
414
- (m(!0), u(Ee, null, Fe(ut.value, (e) => (m(), c(xe, {
413
+ ])) : u("", !0)])) : u("", !0),
414
+ (h(!0), d(we, null, Ne(st.value, (e) => (h(), l(ye, {
415
415
  key: e.composition,
416
- breadcrumb: T.value,
417
- compact: f.compact,
416
+ breadcrumb: O.value,
417
+ compact: p.compact,
418
418
  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,
419
+ compositionPath: k.value,
420
+ depth: p.depth,
421
+ discriminator: ut(e.composition),
422
+ eventBus: p.eventBus,
423
+ expansion: _(V),
424
+ hideHeading: p.hideHeading,
425
425
  hideModelNames: L.value,
426
- level: f.level,
427
- name: f.name,
428
- noncollapsible: f.noncollapsible,
429
- options: f.options,
426
+ level: p.level,
427
+ name: p.name,
428
+ noncollapsible: p.noncollapsible,
429
+ options: p.options,
430
430
  schema: e.value,
431
- schemaContext: f.schemaContext,
432
- scrollTargetId: f.scrollTargetId,
433
- specificationExtension: f.specificationExtension
431
+ schemaContext: p.schemaContext,
432
+ scrollTargetId: p.scrollTargetId,
433
+ specificationExtension: p.specificationExtension
434
434
  }, null, 8, [
435
435
  "breadcrumb",
436
436
  "compact",
@@ -451,16 +451,16 @@ var We = ["id"], Ge = {
451
451
  "scrollTargetId",
452
452
  "specificationExtension"
453
453
  ]))), 128)),
454
- ft.value && f.specificationExtension ? (m(), c(Ie(f.specificationExtension), {
454
+ lt.value && p.specificationExtension ? (h(), l(Pe(p.specificationExtension), {
455
455
  key: 8,
456
- showExtensions: f.options.showExtensions,
457
- value: dt.value
458
- }, null, 8, ["showExtensions", "value"])) : l("", !0)
456
+ showExtensions: p.options.showExtensions,
457
+ value: ct.value
458
+ }, null, 8, ["showExtensions", "value"])) : u("", !0)
459
459
  ]),
460
460
  _: 1
461
461
  }, 8, ["class"]));
462
462
  }
463
463
  });
464
- export { S as default };
464
+ export { T as default };
465
465
 
466
466
  //# sourceMappingURL=SchemaProperty.vue_vue_type_script_setup_true_lang.js.map