@scalar/api-reference 1.36.0 → 1.36.1

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 (49) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/browser/standalone.js +14762 -14744
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -0
  5. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  6. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  7. package/dist/components/Content/Models/ClassicLayout.vue2.js +52 -41
  8. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  9. package/dist/components/Content/Models/Models.vue.js +9 -8
  10. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  12. package/dist/components/Content/Models/ModernLayout.vue2.js +46 -42
  13. package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
  14. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  16. package/dist/components/Content/Schema/Schema.vue2.js +72 -75
  17. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
  18. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
  20. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
  21. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -40
  23. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -5
  24. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  26. package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
  27. package/dist/components/Content/Schema/types.d.ts +17 -0
  28. package/dist/components/Content/Schema/types.d.ts.map +1 -0
  29. package/dist/features/Operation/components/Header.vue.d.ts +2 -0
  30. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/Header.vue.js +15 -10
  32. package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
  33. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/Headers.vue.js +1 -1
  35. package/dist/features/Operation/components/Headers.vue2.js +23 -21
  36. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  38. package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
  39. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  40. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  41. package/dist/features/Operation/components/RequestBody.vue2.js +74 -61
  42. package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
  43. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  44. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  45. package/dist/index.js +1 -1
  46. package/dist/style.css +1 -1
  47. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  48. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
  49. package/package.json +10 -10
@@ -1,27 +1,27 @@
1
- import { defineComponent as V, computed as t, createBlock as p, openBlock as r, resolveDynamicComponent as w, normalizeClass as A, withCtx as c, createCommentVNode as s, createElementBlock as i, createVNode as d, createSlots as T, unref as l, toDisplayString as y, Fragment as v, createTextVNode as k, renderList as q } from "vue";
2
- import { ScalarMarkdown as R } from "@scalar/components";
3
- import { isDefined as E } from "@scalar/helpers/array/is-defined";
4
- import { getResolvedRef as f } from "@scalar/workspace-store/helpers/get-resolved-ref";
1
+ import { defineComponent as w, computed as t, createBlock as d, openBlock as n, resolveDynamicComponent as A, normalizeClass as T, withCtx as c, createCommentVNode as s, createElementBlock as o, createVNode as m, createSlots as q, unref as i, toDisplayString as v, Fragment as f, createTextVNode as P, renderList as E } from "vue";
2
+ import { ScalarMarkdown as O } from "@scalar/components";
3
+ import { isDefined as F } from "@scalar/helpers/array/is-defined";
4
+ import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
5
  import { isArraySchema as u } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
6
- import { isTypeObject as F } from "./helpers/is-type-object.js";
7
- import { optimizeValueForDisplay as M } from "./helpers/optimize-value-for-display.js";
8
- import { compositions as $ } from "./helpers/schema-composition.js";
9
- import P from "./Schema.vue.js";
10
- import I from "./SchemaComposition.vue.js";
11
- import z from "./SchemaEnumValues.vue.js";
12
- import U from "./SchemaPropertyHeading.vue.js";
13
- import Z from "../../Anchor/WithBreadcrumb.vue2.js";
14
- import L from "../../../features/specification-extension/SpecificationExtension.vue2.js";
15
- const G = {
6
+ import { isTypeObject as M } from "./helpers/is-type-object.js";
7
+ import { optimizeValueForDisplay as $ } from "./helpers/optimize-value-for-display.js";
8
+ import { compositions as I } from "./helpers/schema-composition.js";
9
+ import C from "./Schema.vue.js";
10
+ import z from "./SchemaComposition.vue.js";
11
+ import U from "./SchemaEnumValues.vue.js";
12
+ import Z from "./SchemaPropertyHeading.vue.js";
13
+ import L from "../../Anchor/WithBreadcrumb.vue2.js";
14
+ import G from "../../../features/specification-extension/SpecificationExtension.vue2.js";
15
+ const J = {
16
16
  key: 0,
17
17
  class: "property-name-pattern-properties"
18
- }, J = {
18
+ }, K = {
19
19
  key: 1,
20
20
  class: "property-name-additional-properties"
21
- }, K = {
21
+ }, Q = {
22
22
  key: 1,
23
23
  class: "property-description"
24
- }, Q = {
24
+ }, W = {
25
25
  key: 2,
26
26
  class: "property-description"
27
27
  }, X = {
@@ -30,11 +30,11 @@ const G = {
30
30
  }, Y = {
31
31
  key: 0,
32
32
  class: "children"
33
- }, pe = /* @__PURE__ */ V({
33
+ }, de = /* @__PURE__ */ w({
34
34
  __name: "SchemaProperty",
35
35
  props: {
36
36
  is: {},
37
- value: {},
37
+ schema: {},
38
38
  noncollapsible: { type: Boolean },
39
39
  level: { default: 0 },
40
40
  name: {},
@@ -44,13 +44,12 @@ const G = {
44
44
  description: {},
45
45
  hideModelNames: { type: Boolean, default: !1 },
46
46
  hideHeading: { type: Boolean },
47
- hideReadOnly: { type: Boolean },
48
- hideWriteOnly: { type: Boolean },
49
47
  variant: {},
50
- breadcrumb: {}
48
+ breadcrumb: {},
49
+ options: {}
51
50
  },
52
- setup(B) {
53
- const m = B, h = {
51
+ setup(j) {
52
+ const p = j, b = {
54
53
  integer: {
55
54
  _default: "Integer numbers.",
56
55
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -64,32 +63,32 @@ const G = {
64
63
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
65
64
  binary: "binary data, used to describe files"
66
65
  }
67
- }, b = (e) => !e || !h[e.type] ? null : h[e.type][e.format || e.contentEncoding || "_default"], C = (e) => e?.enum || e?.items?.enum || [], a = t(() => M(m.value)), O = t(() => {
66
+ }, h = (e) => !e || !b[e.type] ? null : b[e.type][e.format || e.contentEncoding || "_default"], B = (e) => e?.enum || e?.items?.enum || [], a = t(() => $(p.schema)), g = t(() => {
68
67
  const e = a.value;
69
- return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e?.allOf || e?.allOf ? null : m.description || e?.description || null;
70
- }), j = (e, n, o) => n || e?.deprecated || e?.const !== void 0 || e?.enum && e.enum.length === 1 || e?.type || e?.nullable === !0 || e?.writeOnly || e?.readOnly || o, g = t(() => {
68
+ return !e || "properties" in e || "additionalProperties" in e || "patternProperties" in e || e?.allOf || e?.allOf ? null : p.description || e?.description || null;
69
+ }), N = (e, r, l) => r || e?.deprecated || e?.const !== void 0 || e?.enum && e.enum.length === 1 || e?.type || e?.nullable === !0 || e?.writeOnly || e?.readOnly || l, k = t(() => {
71
70
  const e = a.value;
72
71
  if (!e || !u(e) || typeof e.items != "object")
73
72
  return !1;
74
- const n = e.items;
75
- return "type" in n && n.type && (Array.isArray(n.type) ? n.type.includes("object") : ["object"].includes(n.type)) || "properties" in n || "$ref" in n || "discriminator" in n || "allOf" in n || "oneOf" in n || "anyOf" in n;
76
- }), N = (e) => {
77
- const n = a.value;
78
- return n && u(n) === !1 || !n?.items || typeof n.items != "object" || !(e in n.items) ? !1 : !g.value;
79
- }, S = t(() => g.value), W = t(() => {
73
+ const r = e.items;
74
+ return "type" in r && r.type && (Array.isArray(r.type) ? r.type.includes("object") : ["object"].includes(r.type)) || "properties" in r || "$ref" in r || "discriminator" in r || "allOf" in r || "oneOf" in r || "anyOf" in r;
75
+ }), S = (e) => {
76
+ const r = a.value;
77
+ return r && u(r) === !1 || !r?.items || typeof r.items != "object" || !(e in r.items) ? !1 : !k.value;
78
+ }, R = t(() => k.value), D = t(() => {
80
79
  if (!a.value)
81
80
  return !1;
82
- const e = a.value, n = F(e), o = "properties" in e || "additionalProperties" in e;
83
- return n && o;
84
- }), D = t(() => m.level <= 1), H = t(() => a.value ? $.map((e) => a.value?.[e] && !(u(a.value) && a.value?.items && typeof e == "string" && typeof a.value.items == "object" && e in a.value.items) ? {
81
+ const e = a.value, r = M(e), l = "properties" in e || "additionalProperties" in e;
82
+ return r && l;
83
+ }), H = t(() => p.level <= 1), V = t(() => a.value ? I.map((e) => a.value?.[e] && !(u(a.value) && a.value?.items && typeof e == "string" && typeof a.value.items == "object" && e in a.value.items) ? {
85
84
  composition: e,
86
85
  value: a.value
87
- } : N(e) && a.value && u(a.value) && a.value.items ? {
86
+ } : S(e) && a.value && u(a.value) && a.value.items ? {
88
87
  composition: e,
89
88
  value: a.value.items
90
- } : null).filter(E) : []);
91
- return (e, n) => (r(), p(w(e.is ?? "li"), {
92
- class: A(["property", [
89
+ } : null).filter(F) : []);
90
+ return (e, r) => (n(), d(A(e.is ?? "li"), {
91
+ class: T(["property", [
93
92
  `property--level-${e.level}`,
94
93
  {
95
94
  "property--compact": e.compact,
@@ -98,24 +97,24 @@ const G = {
98
97
  ]])
99
98
  }, {
100
99
  default: c(() => [
101
- j(a.value, e.name, e.required) ? (r(), p(U, {
100
+ N(a.value, e.name, e.required) ? (n(), d(Z, {
102
101
  key: 0,
103
102
  class: "group",
104
- enum: C(a.value).length > 0,
103
+ enum: B(a.value).length > 0,
105
104
  hideModelNames: e.hideModelNames,
106
105
  isDiscriminator: e.discriminator && e.discriminator.propertyName === e.name,
107
106
  required: e.required,
108
107
  value: a.value
109
- }, T({ _: 2 }, [
108
+ }, q({ _: 2 }, [
110
109
  e.name ? {
111
110
  name: "name",
112
111
  fn: c(() => [
113
- d(l(Z), {
114
- breadcrumb: D.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
112
+ m(i(L), {
113
+ breadcrumb: H.value && e.breadcrumb ? [...e.breadcrumb, e.name] : void 0
115
114
  }, {
116
115
  default: c(() => [
117
- e.variant === "patternProperties" ? (r(), i("span", G, y(e.name), 1)) : e.variant === "additionalProperties" ? (r(), i("span", J, y(e.name), 1)) : (r(), i(v, { key: 2 }, [
118
- k(y(e.name), 1)
116
+ e.variant === "patternProperties" ? (n(), o("span", J, v(e.name), 1)) : e.variant === "additionalProperties" ? (n(), o("span", K, v(e.name), 1)) : (n(), o(f, { key: 2 }, [
117
+ P(v(e.name), 1)
119
118
  ], 64))
120
119
  ]),
121
120
  _: 1
@@ -126,67 +125,64 @@ const G = {
126
125
  a.value?.example ? {
127
126
  name: "example",
128
127
  fn: c(() => [
129
- k(" Example: " + y(a.value.example), 1)
128
+ P(" Example: " + v(a.value.example), 1)
130
129
  ]),
131
130
  key: "1"
132
131
  } : void 0
133
132
  ]), 1032, ["enum", "hideModelNames", "isDiscriminator", "required", "value"])) : s("", !0),
134
- O.value ? (r(), i("div", K, [
135
- d(l(R), { value: O.value }, null, 8, ["value"])
136
- ])) : b(a.value) ? (r(), i("div", Q, [
137
- d(l(R), {
138
- value: b(a.value) || ""
133
+ g.value ? (n(), o("div", Q, [
134
+ m(i(O), { value: g.value }, null, 8, ["value"])
135
+ ])) : h(a.value) ? (n(), o("div", W, [
136
+ m(i(O), {
137
+ value: h(a.value) || ""
139
138
  }, null, 8, ["value"])
140
139
  ])) : s("", !0),
141
- (a.value?.enum || a.value && l(u)(a.value) && l(f)(a.value?.items)?.enum || []).length ? (r(), p(z, {
140
+ (a.value?.enum || a.value && i(u)(a.value) && i(y)(a.value?.items)?.enum || []).length ? (n(), d(U, {
142
141
  key: 3,
143
142
  value: a.value
144
143
  }, null, 8, ["value"])) : s("", !0),
145
- W.value ? (r(), i("div", X, [
146
- d(P, {
144
+ D.value ? (n(), o("div", X, [
145
+ m(C, {
147
146
  breadcrumb: e.breadcrumb && e.name ? [...e.breadcrumb, e.name] : void 0,
148
147
  compact: e.compact,
149
- hideReadOnly: e.hideReadOnly,
150
- hideWriteOnly: e.hideWriteOnly,
151
148
  level: e.level + 1,
152
149
  name: e.name,
153
150
  noncollapsible: e.noncollapsible,
151
+ options: e.options,
154
152
  schema: a.value
155
- }, null, 8, ["breadcrumb", "compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
153
+ }, null, 8, ["breadcrumb", "compact", "level", "name", "noncollapsible", "options", "schema"])
156
154
  ])) : s("", !0),
157
- a.value && l(u)(a.value) && typeof a.value.items == "object" ? (r(), i(v, { key: 5 }, [
158
- S.value ? (r(), i("div", Y, [
159
- d(P, {
155
+ a.value && i(u)(a.value) && typeof a.value.items == "object" ? (n(), o(f, { key: 5 }, [
156
+ R.value ? (n(), o("div", Y, [
157
+ m(C, {
160
158
  compact: e.compact,
161
- hideReadOnly: e.hideReadOnly,
162
- hideWriteOnly: e.hideWriteOnly,
163
159
  level: e.level + 1,
164
160
  name: e.name,
165
161
  noncollapsible: e.noncollapsible,
166
- schema: l(f)(a.value.items)
167
- }, null, 8, ["compact", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "schema"])
162
+ options: e.options,
163
+ schema: i(y)(a.value.items)
164
+ }, null, 8, ["compact", "level", "name", "noncollapsible", "options", "schema"])
168
165
  ])) : s("", !0)
169
166
  ], 64)) : s("", !0),
170
- (r(!0), i(v, null, q(H.value, (o) => (r(), p(I, {
171
- key: o.composition,
167
+ (n(!0), o(f, null, E(V.value, (l) => (n(), d(z, {
168
+ key: l.composition,
172
169
  breadcrumb: e.breadcrumb,
173
170
  compact: e.compact,
174
- composition: o.composition,
175
- discriminator: e.value?.discriminator,
171
+ composition: l.composition,
172
+ discriminator: e.schema?.discriminator,
176
173
  hideHeading: e.hideHeading,
177
- hideReadOnly: e.hideReadOnly,
178
- hideWriteOnly: e.hideWriteOnly,
179
174
  level: e.level,
180
175
  name: e.name,
181
176
  noncollapsible: e.noncollapsible,
182
- value: l(f)(m.value)
183
- }, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "hideReadOnly", "hideWriteOnly", "level", "name", "noncollapsible", "value"]))), 128)),
184
- d(l(L), { value: a.value }, null, 8, ["value"])
177
+ options: e.options,
178
+ schema: i(y)(p.schema)
179
+ }, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "hideHeading", "level", "name", "noncollapsible", "options", "schema"]))), 128)),
180
+ m(i(G), { value: a.value }, null, 8, ["value"])
185
181
  ]),
186
182
  _: 1
187
183
  }, 8, ["class"]));
188
184
  }
189
185
  });
190
186
  export {
191
- pe as default
187
+ de as default
192
188
  };
@@ -0,0 +1,17 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
+ /**
3
+ * Options for the schema component tree
4
+ *
5
+ * These options should be prop drilled through the Schema component tree and shouldn't be changed
6
+ */
7
+ export type SchemaOptions = {
8
+ /** Hide read-only properties */
9
+ hideReadOnly?: boolean;
10
+ /** Hide write-only properties */
11
+ hideWriteOnly?: boolean;
12
+ /** Order schema properties, defaults to 'alpha' */
13
+ orderSchemaPropertiesBy?: ApiReferenceConfiguration['orderSchemaPropertiesBy'];
14
+ /** Order required properties first */
15
+ orderRequiredPropertiesFirst?: ApiReferenceConfiguration['orderRequiredPropertiesFirst'];
16
+ };
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mDAAmD;IACnD,uBAAuB,CAAC,EAAE,yBAAyB,CAAC,yBAAyB,CAAC,CAAA;IAC9E,sCAAsC;IACtC,4BAA4B,CAAC,EAAE,yBAAyB,CAAC,8BAA8B,CAAC,CAAA;CACzF,CAAA"}
@@ -1,8 +1,10 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
1
2
  import type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  type __VLS_Props = {
3
4
  header: HeaderObject;
4
5
  name: string;
5
6
  breadcrumb?: string[];
7
+ config: ApiReferenceConfiguration;
6
8
  };
7
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
10
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Header.vue"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAkDF,wBAMG"}
1
+ {"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Header.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AA0DF,wBAMG"}
@@ -1,23 +1,28 @@
1
- import { defineComponent as r, createBlock as a, createCommentVNode as m, openBlock as o, unref as d } from "vue";
2
- import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import p from "../../../components/Content/Schema/SchemaProperty.vue.js";
4
- const h = /* @__PURE__ */ r({
1
+ import { defineComponent as r, createBlock as o, createCommentVNode as a, openBlock as m, unref as d } from "vue";
2
+ import { getResolvedRef as i } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import n from "../../../components/Content/Schema/SchemaProperty.vue.js";
4
+ const u = /* @__PURE__ */ r({
5
5
  __name: "Header",
6
6
  props: {
7
7
  header: {},
8
8
  name: {},
9
- breadcrumb: {}
9
+ breadcrumb: {},
10
+ config: {}
10
11
  },
11
- setup(c) {
12
- return (e, s) => "schema" in e.header && e.header.schema ? (o(), a(p, {
12
+ setup(s) {
13
+ return (e, p) => "schema" in e.header && e.header.schema ? (m(), o(n, {
13
14
  key: 0,
14
15
  breadcrumb: e.breadcrumb ? [...e.breadcrumb, "headers"] : void 0,
15
16
  description: e.header.description,
16
17
  name: e.name,
17
- value: d(n)(e.header.schema)
18
- }, null, 8, ["breadcrumb", "description", "name", "value"])) : m("", !0);
18
+ options: {
19
+ orderRequiredPropertiesFirst: e.config.orderRequiredPropertiesFirst,
20
+ orderSchemaPropertiesBy: e.config.orderSchemaPropertiesBy
21
+ },
22
+ schema: d(i)(e.header.schema)
23
+ }, null, 8, ["breadcrumb", "description", "name", "options", "schema"])) : a("", !0);
19
24
  }
20
25
  });
21
26
  export {
22
- h as default
27
+ u as default
23
28
  };
@@ -1,7 +1,9 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
1
2
  import type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  type __VLS_Props = {
3
4
  headers: Record<string, HeaderObject>;
4
5
  breadcrumb?: string[];
6
+ config: ApiReferenceConfiguration;
5
7
  };
6
8
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Headers.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAkJF,wBAMG"}
1
+ {"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/Headers.vue"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAoJF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Headers.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-755d65e4"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6b889a81"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,51 +1,53 @@
1
- import { defineComponent as p, createBlock as i, openBlock as e, unref as r, withCtx as d, createElementVNode as m, normalizeClass as t, createVNode as c, createElementBlock as o, Fragment as l, createTextVNode as u, renderList as f } from "vue";
2
- import { Disclosure as b, DisclosureButton as _, DisclosurePanel as v } from "@headlessui/vue";
3
- import { ScalarIcon as k } from "@scalar/components";
4
- import { getResolvedRef as B } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
- import H from "./Header.vue.js";
1
+ import { defineComponent as p, createBlock as i, openBlock as e, unref as r, withCtx as d, createElementVNode as m, normalizeClass as c, createVNode as o, createElementBlock as t, Fragment as l, createTextVNode as u, renderList as f } from "vue";
2
+ import { Disclosure as b, DisclosureButton as _, DisclosurePanel as g } from "@headlessui/vue";
3
+ import { ScalarIcon as v } from "@scalar/components";
4
+ import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import B from "./Header.vue.js";
6
6
  const z = /* @__PURE__ */ p({
7
7
  __name: "Headers",
8
8
  props: {
9
9
  headers: {},
10
- breadcrumb: {}
10
+ breadcrumb: {},
11
+ config: {}
11
12
  },
12
- setup(g) {
13
- return (s, C) => (e(), i(r(b), null, {
14
- default: d(({ open: a }) => [
13
+ setup(H) {
14
+ return (a, C) => (e(), i(r(b), null, {
15
+ default: d(({ open: s }) => [
15
16
  m("div", {
16
- class: t(["headers-card headers-card--compact", [{ "headers-card--open": a }]])
17
+ class: c(["headers-card headers-card--compact", [{ "headers-card--open": s }]])
17
18
  }, [
18
19
  m("div", {
19
- class: t(["headers-properties", { "headers-properties-open": a }])
20
+ class: c(["headers-properties", { "headers-properties-open": s }])
20
21
  }, [
21
- c(r(_), {
22
+ o(r(_), {
22
23
  class: "headers-card-title headers-card-title--compact",
23
24
  style: {
24
25
  top: "calc(var(--refs-header-height)))"
25
26
  }
26
27
  }, {
27
28
  default: d(() => [
28
- c(r(k), {
29
- class: t(["headers-card-title-icon", { "headers-card-title-icon--open": a }]),
29
+ o(r(v), {
30
+ class: c(["headers-card-title-icon", { "headers-card-title-icon--open": s }]),
30
31
  icon: "Add",
31
32
  size: "sm"
32
33
  }, null, 8, ["class"]),
33
- a ? (e(), o(l, { key: 0 }, [
34
+ s ? (e(), t(l, { key: 0 }, [
34
35
  u(" Hide Headers ")
35
- ], 64)) : (e(), o(l, { key: 1 }, [
36
+ ], 64)) : (e(), t(l, { key: 1 }, [
36
37
  u(" Show Headers ")
37
38
  ], 64))
38
39
  ]),
39
40
  _: 2
40
41
  }, 1024),
41
- c(r(v), null, {
42
+ o(r(g), null, {
42
43
  default: d(() => [
43
- (e(!0), o(l, null, f(s.headers, (h, n) => (e(), i(H, {
44
+ (e(!0), t(l, null, f(a.headers, (h, n) => (e(), i(B, {
44
45
  key: n,
45
- breadcrumb: s.breadcrumb ? [...s.breadcrumb, "headers"] : void 0,
46
- header: r(B)(h),
46
+ breadcrumb: a.breadcrumb ? [...a.breadcrumb, "headers"] : void 0,
47
+ config: a.config,
48
+ header: r(k)(h),
47
49
  name: n
48
- }, null, 8, ["breadcrumb", "header", "name"]))), 128))
50
+ }, null, 8, ["breadcrumb", "config", "header", "name"]))), 128))
49
51
  ]),
50
52
  _: 1
51
53
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAqRA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAsSF,wBAMG"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AA8RA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AASrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAqTF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./ParameterListItem.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f259ff0d"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-de860ce9"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,13 +1,14 @@
1
- import { defineComponent as x, computed as m, ref as E, createElementBlock as B, openBlock as n, createVNode as c, createElementVNode as p, unref as o, withCtx as f, createBlock as d, createCommentVNode as v, normalizeClass as b, toDisplayString as C } from "vue";
2
- import { Disclosure as V, DisclosureButton as D, DisclosurePanel as S } from "@headlessui/vue";
3
- import { ScalarMarkdown as q } from "@scalar/components";
4
- import { isDefined as I } from "@scalar/helpers/array/is-defined";
5
- import { ScalarIconCaretRight as N } from "@scalar/icons";
6
- import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
1
+ import { defineComponent as E, computed as o, ref as B, createElementBlock as C, openBlock as n, createVNode as u, createElementVNode as p, unref as r, withCtx as b, createBlock as d, createCommentVNode as h, normalizeClass as y, toDisplayString as P } from "vue";
2
+ import { Disclosure as S, DisclosureButton as q, DisclosurePanel as V } from "@headlessui/vue";
3
+ import { ScalarMarkdown as D } from "@scalar/components";
4
+ import { isDefined as R } from "@scalar/helpers/array/is-defined";
5
+ import { ScalarIconCaretRight as I } from "@scalar/icons";
6
+ import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
7
  import O from "../../../components/Content/Schema/SchemaProperty.vue.js";
8
- import P from "./ContentTypeSelect.vue.js";
9
- import R from "./Headers.vue.js";
10
- const j = { class: "parameter-item group/parameter-item relative" }, z = { class: "parameter-item-name" }, H = { class: "parameter-item-type" }, L = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, Q = /* @__PURE__ */ x({
8
+ import { useConfig as N } from "../../../hooks/useConfig.js";
9
+ import j from "./ContentTypeSelect.vue.js";
10
+ import z from "./Headers.vue.js";
11
+ const F = { class: "parameter-item group/parameter-item relative" }, W = { class: "parameter-item-name" }, H = { class: "parameter-item-type" }, L = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, Z = /* @__PURE__ */ E({
11
12
  __name: "ParameterListItem",
12
13
  props: {
13
14
  parameter: {},
@@ -17,62 +18,63 @@ const j = { class: "parameter-item group/parameter-item relative" }, z = { class
17
18
  breadcrumb: {}
18
19
  },
19
20
  setup(e) {
20
- const s = m(
21
- () => "schema" in e.parameter && e.parameter.schema ? y(e.parameter.schema) : null
22
- ), t = m(
21
+ const v = N(), s = o(
22
+ () => "schema" in e.parameter && e.parameter.schema ? g(e.parameter.schema) : null
23
+ ), t = o(
23
24
  () => "content" in e.parameter && e.parameter.content ? e.parameter.content : null
24
- ), i = E(Object.keys(t.value || {})[0]), h = m(
25
+ ), i = B(Object.keys(t.value || {})[0]), f = o(
25
26
  () => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
26
- ), g = m(() => {
27
- const a = t.value ? t.value?.[i.value]?.schema : s.value, u = "deprecated" in e.parameter ? e.parameter.deprecated : s.value?.deprecated, r = "examples" in e.parameter ? e.parameter.examples : {}, k = s.value?.examples ?? [], w = [...Object.values({
28
- ...r,
27
+ ), k = o(() => {
28
+ const a = t.value ? t.value?.[i.value]?.schema : s.value, c = "deprecated" in e.parameter ? e.parameter.deprecated : s.value?.deprecated, m = "examples" in e.parameter ? e.parameter.examples : {}, w = s.value?.examples ?? [], x = [...Object.values({
29
+ ...m,
29
30
  ...t.value?.[i.value]?.examples
30
- }), ...k];
31
+ }), ...w];
31
32
  return {
32
- ...y(a),
33
- deprecated: u,
34
- ..."example" in e.parameter && I(e.parameter.example) && { example: e.parameter.example },
35
- examples: w
33
+ ...g(a),
34
+ deprecated: c,
35
+ ..."example" in e.parameter && R(e.parameter.example) && { example: e.parameter.example },
36
+ examples: x
36
37
  };
37
- }), l = m(
38
- () => !!(e.collapsableItems && (t.value || h.value || s.value))
38
+ }), l = o(
39
+ () => !!(e.collapsableItems && (t.value || f.value || s.value))
39
40
  );
40
- return (a, u) => (n(), B("li", j, [
41
- c(o(V), null, {
42
- default: f(({ open: r }) => [
43
- l.value ? (n(), d(o(D), {
41
+ return (a, c) => (n(), C("li", F, [
42
+ u(r(S), null, {
43
+ default: b(({ open: m }) => [
44
+ l.value ? (n(), d(r(q), {
44
45
  key: 0,
45
- class: b(["parameter-item-trigger", { "parameter-item-trigger-open": r }])
46
+ class: y(["parameter-item-trigger", { "parameter-item-trigger-open": m }])
46
47
  }, {
47
- default: f(() => [
48
- p("span", z, [
49
- c(o(N), {
50
- class: b(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": r }]),
48
+ default: b(() => [
49
+ p("span", W, [
50
+ u(r(I), {
51
+ class: y(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": m }]),
51
52
  weight: "bold"
52
53
  }, null, 8, ["class"]),
53
- p("span", null, C(a.name), 1)
54
+ p("span", null, P(a.name), 1)
54
55
  ]),
55
56
  p("span", H, [
56
- a.parameter.description ? (n(), d(o(q), {
57
+ a.parameter.description ? (n(), d(r(D), {
57
58
  key: 0,
58
59
  class: "markdown",
59
60
  value: a.parameter.description
60
- }, null, 8, ["value"])) : v("", !0)
61
+ }, null, 8, ["value"])) : h("", !0)
61
62
  ])
62
63
  ]),
63
64
  _: 2
64
- }, 1032, ["class"])) : v("", !0),
65
- c(o(S), {
65
+ }, 1032, ["class"])) : h("", !0),
66
+ u(r(V), {
66
67
  class: "parameter-item-container parameter-item-container-markdown",
67
68
  static: !l.value
68
69
  }, {
69
- default: f(() => [
70
- h.value ? (n(), d(R, {
70
+ default: b(() => [
71
+ f.value ? (n(), d(z, {
71
72
  key: 0,
72
73
  breadcrumb: a.breadcrumb,
73
- headers: h.value
74
- }, null, 8, ["breadcrumb", "headers"])) : v("", !0),
75
- c(O, {
74
+ config: r(v),
75
+ headers: f.value
76
+ }, null, 8, ["breadcrumb", "config", "headers"])) : h("", !0),
77
+ u(O, {
76
78
  is: "div",
77
79
  breadcrumb: a.breadcrumb,
78
80
  compact: "",
@@ -80,10 +82,15 @@ const j = { class: "parameter-item group/parameter-item relative" }, z = { class
80
82
  hideWriteOnly: !0,
81
83
  name: l.value ? "" : a.name,
82
84
  noncollapsible: !0,
85
+ options: {
86
+ hideWriteOnly: !0,
87
+ orderRequiredPropertiesFirst: r(v).orderRequiredPropertiesFirst,
88
+ orderSchemaPropertiesBy: r(v).orderSchemaPropertiesBy
89
+ },
83
90
  required: "required" in a.parameter && a.parameter.required,
84
- value: g.value,
91
+ schema: k.value,
85
92
  withExamples: a.withExamples
86
- }, null, 8, ["breadcrumb", "description", "name", "required", "value", "withExamples"])
93
+ }, null, 8, ["breadcrumb", "description", "name", "options", "required", "schema", "withExamples"])
87
94
  ]),
88
95
  _: 1
89
96
  }, 8, ["static"])
@@ -91,17 +98,17 @@ const j = { class: "parameter-item group/parameter-item relative" }, z = { class
91
98
  _: 1
92
99
  }),
93
100
  p("div", L, [
94
- l.value && t.value ? (n(), d(P, {
101
+ l.value && t.value ? (n(), d(j, {
95
102
  key: 0,
96
103
  modelValue: i.value,
97
- "onUpdate:modelValue": u[0] || (u[0] = (r) => i.value = r),
104
+ "onUpdate:modelValue": c[0] || (c[0] = (m) => i.value = m),
98
105
  class: "parameter-item-content-type",
99
106
  content: t.value
100
- }, null, 8, ["modelValue", "content"])) : v("", !0)
107
+ }, null, 8, ["modelValue", "content"])) : h("", !0)
101
108
  ])
102
109
  ]));
103
110
  }
104
111
  });
105
112
  export {
106
- Q as default
113
+ Z as default
107
114
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAwMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAarG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AA2NF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAqNA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAarG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AAqPF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}