@scalar/api-reference 1.25.101 → 1.25.103

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 (38) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/browser/standalone.js +7267 -7225
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
  5. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  6. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  7. package/dist/components/Content/Schema/SchemaProperty.vue2.js +63 -61
  8. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -3
  9. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  11. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +162 -170
  12. package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
  13. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
  14. package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
  15. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Tag/Tag.vue.js +1 -1
  17. package/dist/components/Content/Tag/Tag.vue2.js +39 -37
  18. package/dist/features/ApiClientModal/useApiClient.d.ts +20 -20
  19. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  20. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  21. package/dist/features/Operation/components/OperationParameters.vue.js +26 -18
  22. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  23. package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
  24. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
  25. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  26. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  27. package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
  28. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
  29. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  30. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  31. package/dist/features/Operation/components/ParameterListItem.vue2.js +27 -25
  32. package/dist/helpers/get-request.d.ts.map +1 -1
  33. package/dist/hooks/useOperation.d.ts +1 -0
  34. package/dist/hooks/useOperation.d.ts.map +1 -1
  35. package/dist/hooks/useOperation.js +12 -11
  36. package/dist/index.js +1 -1
  37. package/dist/style.css +1 -1
  38. package/package.json +10 -10
@@ -1,31 +1,28 @@
1
- import { defineComponent as M, openBlock as u, createElementBlock as n, Fragment as s, createElementVNode as P, renderSlot as O, createCommentVNode as t, createTextVNode as a, toDisplayString as i, createVNode as v, unref as V, withCtx as l, createBlock as d, renderList as S } from "vue";
1
+ import { defineComponent as P, openBlock as u, createElementBlock as n, renderSlot as S, createCommentVNode as t, Fragment as s, createTextVNode as a, toDisplayString as i, createVNode as v, unref as O, withCtx as l, createBlock as d, renderList as V } from "vue";
2
2
  import o from "./SchemaPropertyDetail.vue.js";
3
- import $ from "../../Badge/Badge.vue.js";
3
+ import w from "../../Badge/Badge.vue.js";
4
4
  const C = { class: "property-heading" }, D = {
5
5
  key: 0,
6
6
  class: "property-name"
7
- }, b = {
7
+ }, $ = {
8
8
  key: 1,
9
9
  class: "property-additional"
10
- }, E = {
10
+ }, b = {
11
11
  key: 2,
12
12
  class: "property-deprecated"
13
13
  }, j = {
14
14
  key: 3,
15
15
  class: "property-const"
16
- }, F = {
16
+ }, E = {
17
17
  key: 5,
18
18
  class: "property-write-only"
19
- }, H = {
19
+ }, F = {
20
20
  key: 6,
21
21
  class: "property-read-only"
22
- }, T = {
22
+ }, H = {
23
23
  key: 7,
24
24
  class: "property-required"
25
- }, h = {
26
- key: 0,
27
- class: "property-example"
28
- }, Q = /* @__PURE__ */ M({
25
+ }, K = /* @__PURE__ */ P({
29
26
  __name: "SchemaPropertyHeading",
30
27
  props: {
31
28
  value: {},
@@ -33,171 +30,166 @@ const C = { class: "property-heading" }, D = {
33
30
  required: { type: Boolean, default: !1 },
34
31
  additional: { type: Boolean }
35
32
  },
36
- setup(z) {
37
- const w = ["oneOf", "anyOf", "allOf", "not"], A = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default;
33
+ setup(T) {
34
+ const A = ["oneOf", "anyOf", "allOf", "not"], M = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default;
38
35
  return (e, r) => {
39
- var f, k, g, B, q, N, I;
40
- return u(), n(s, null, [
41
- P("div", C, [
42
- e.$slots.name ? (u(), n("div", D, [
43
- O(e.$slots, "name", {}, void 0, !0)
44
- ])) : t("", !0),
45
- e.additional ? (u(), n("div", b, [
46
- (f = e.value) != null && f["x-additionalPropertiesName"] ? (u(), n(s, { key: 0 }, [
47
- a(i(e.value["x-additionalPropertiesName"]), 1)
48
- ], 64)) : (u(), n(s, { key: 1 }, [
49
- a("additional properties")
50
- ], 64))
51
- ])) : t("", !0),
52
- (k = e.value) != null && k.deprecated ? (u(), n("div", E, [
53
- v(V($), null, {
54
- default: l(() => r[0] || (r[0] = [
55
- a("deprecated")
56
- ])),
57
- _: 1
58
- })
59
- ])) : t("", !0),
60
- (g = e.value) != null && g.const || (B = e.value) != null && B.enum && e.value.enum.length === 1 ? (u(), n("div", j, [
61
- v(o, { truncate: "" }, {
62
- prefix: l(() => r[1] || (r[1] = [
63
- a("const:")
64
- ])),
65
- default: l(() => [
66
- a(" " + i(e.value.const ?? e.value.enum[0]), 1)
67
- ]),
68
- _: 1
69
- })
70
- ])) : (q = e.value) != null && q.type ? (u(), n(s, { key: 4 }, [
71
- v(o, null, {
72
- default: l(() => {
73
- var m, p, y;
74
- return [
75
- (p = (m = e.value) == null ? void 0 : m.items) != null && p.type ? (u(), n(s, { key: 0 }, [
76
- a(i(e.value.type) + " " + i(e.value.items.type) + "[] ", 1)
77
- ], 64)) : (u(), n(s, { key: 1 }, [
78
- a(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((y = e.value) != null && y.nullable ? " | nullable" : ""), 1)
79
- ], 64)),
80
- e.value.minItems || e.value.maxItems ? (u(), n(s, { key: 2 }, [
81
- a(i(e.value.minItems) + "" + i(e.value.maxItems), 1)
82
- ], 64)) : t("", !0)
83
- ];
84
- }),
85
- _: 1
36
+ var f, k, g, B, q, I, L;
37
+ return u(), n("div", C, [
38
+ e.$slots.name ? (u(), n("div", D, [
39
+ S(e.$slots, "name", {}, void 0, !0)
40
+ ])) : t("", !0),
41
+ e.additional ? (u(), n("div", $, [
42
+ (f = e.value) != null && f["x-additionalPropertiesName"] ? (u(), n(s, { key: 0 }, [
43
+ a(i(e.value["x-additionalPropertiesName"]), 1)
44
+ ], 64)) : (u(), n(s, { key: 1 }, [
45
+ a("additional properties")
46
+ ], 64))
47
+ ])) : t("", !0),
48
+ (k = e.value) != null && k.deprecated ? (u(), n("div", b, [
49
+ v(O(w), null, {
50
+ default: l(() => r[0] || (r[0] = [
51
+ a("deprecated")
52
+ ])),
53
+ _: 1
54
+ })
55
+ ])) : t("", !0),
56
+ (g = e.value) != null && g.const || (B = e.value) != null && B.enum && e.value.enum.length === 1 ? (u(), n("div", j, [
57
+ v(o, { truncate: "" }, {
58
+ prefix: l(() => r[1] || (r[1] = [
59
+ a("const:")
60
+ ])),
61
+ default: l(() => [
62
+ a(" " + i(e.value.const ?? e.value.enum[0]), 1)
63
+ ]),
64
+ _: 1
65
+ })
66
+ ])) : (q = e.value) != null && q.type ? (u(), n(s, { key: 4 }, [
67
+ v(o, null, {
68
+ default: l(() => {
69
+ var m, p, y;
70
+ return [
71
+ (p = (m = e.value) == null ? void 0 : m.items) != null && p.type ? (u(), n(s, { key: 0 }, [
72
+ a(i(e.value.type) + " " + i(e.value.items.type) + "[] ", 1)
73
+ ], 64)) : (u(), n(s, { key: 1 }, [
74
+ a(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((y = e.value) != null && y.nullable ? " | nullable" : ""), 1)
75
+ ], 64)),
76
+ e.value.minItems || e.value.maxItems ? (u(), n(s, { key: 2 }, [
77
+ a(i(e.value.minItems) + "…" + i(e.value.maxItems), 1)
78
+ ], 64)) : t("", !0)
79
+ ];
86
80
  }),
87
- e.value.minLength ? (u(), d(o, { key: 0 }, {
88
- prefix: l(() => r[2] || (r[2] = [
89
- a("min:")
90
- ])),
91
- default: l(() => [
92
- a(" " + i(e.value.minLength), 1)
93
- ]),
94
- _: 1
95
- })) : t("", !0),
96
- e.value.maxLength ? (u(), d(o, { key: 1 }, {
97
- prefix: l(() => r[3] || (r[3] = [
98
- a("max:")
99
- ])),
100
- default: l(() => [
101
- a(" " + i(e.value.maxLength), 1)
102
- ]),
103
- _: 1
104
- })) : t("", !0),
105
- e.value.uniqueItems ? (u(), d(o, { key: 2 }, {
106
- default: l(() => r[4] || (r[4] = [
107
- a(" unique! ")
108
- ])),
109
- _: 1
110
- })) : t("", !0),
111
- e.value.format ? (u(), d(o, { key: 3 }, {
112
- default: l(() => [
113
- a(i(e.value.format), 1)
114
- ]),
115
- _: 1
116
- })) : t("", !0),
117
- e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (u(), d(o, { key: 4 }, {
118
- prefix: l(() => r[5] || (r[5] = [
119
- a("greater than:")
120
- ])),
121
- default: l(() => [
122
- a(" " + i(e.value.minimum), 1)
123
- ]),
124
- _: 1
125
- })) : t("", !0),
126
- e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (u(), d(o, { key: 5 }, {
127
- prefix: l(() => r[6] || (r[6] = [
128
- a("min:")
129
- ])),
130
- default: l(() => [
131
- a(" " + i(e.value.minimum), 1)
132
- ]),
133
- _: 1
134
- })) : t("", !0),
135
- e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (u(), d(o, { key: 6 }, {
136
- prefix: l(() => r[7] || (r[7] = [
137
- a("less than:")
138
- ])),
139
- default: l(() => [
140
- a(" " + i(e.value.maximum), 1)
141
- ]),
142
- _: 1
143
- })) : t("", !0),
144
- e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (u(), d(o, { key: 7 }, {
145
- prefix: l(() => r[8] || (r[8] = [
146
- a("max:")
147
- ])),
148
- default: l(() => [
149
- a(" " + i(e.value.maximum), 1)
150
- ]),
151
- _: 1
152
- })) : t("", !0),
153
- e.value.pattern ? (u(), d(o, {
154
- key: 8,
155
- code: "",
156
- truncate: ""
157
- }, {
158
- default: l(() => [
159
- a(i(e.value.pattern), 1)
160
- ]),
161
- _: 1
162
- })) : t("", !0),
163
- e.$props.enum ? (u(), d(o, { key: 9 }, {
164
- default: l(() => r[9] || (r[9] = [
165
- a("enum")
166
- ])),
167
- _: 1
168
- })) : t("", !0),
169
- e.value.default !== void 0 ? (u(), d(o, {
170
- key: 10,
171
- truncate: ""
172
- }, {
173
- prefix: l(() => r[10] || (r[10] = [
174
- a("default:")
175
- ])),
176
- default: l(() => [
177
- a(" " + i(A(e.value)), 1)
178
- ]),
179
- _: 1
180
- })) : t("", !0)
181
- ], 64)) : t("", !0),
182
- (N = e.value) != null && N.writeOnly ? (u(), n("div", F, " write-only ")) : (I = e.value) != null && I.readOnly ? (u(), n("div", H, " read-only ")) : t("", !0),
183
- (u(!0), n(s, null, S(w.filter((m) => {
184
- var p, y, L;
185
- return ((p = e.value) == null ? void 0 : p[m]) || ((L = (y = e.value) == null ? void 0 : y.items) == null ? void 0 : L[m]);
186
- }), (m) => (u(), d(V($), { key: m }, {
81
+ _: 1
82
+ }),
83
+ e.value.minLength ? (u(), d(o, { key: 0 }, {
84
+ prefix: l(() => r[2] || (r[2] = [
85
+ a("min:")
86
+ ])),
87
+ default: l(() => [
88
+ a(" " + i(e.value.minLength), 1)
89
+ ]),
90
+ _: 1
91
+ })) : t("", !0),
92
+ e.value.maxLength ? (u(), d(o, { key: 1 }, {
93
+ prefix: l(() => r[3] || (r[3] = [
94
+ a("max:")
95
+ ])),
96
+ default: l(() => [
97
+ a(" " + i(e.value.maxLength), 1)
98
+ ]),
99
+ _: 1
100
+ })) : t("", !0),
101
+ e.value.uniqueItems ? (u(), d(o, { key: 2 }, {
102
+ default: l(() => r[4] || (r[4] = [
103
+ a(" unique! ")
104
+ ])),
105
+ _: 1
106
+ })) : t("", !0),
107
+ e.value.format ? (u(), d(o, { key: 3 }, {
108
+ default: l(() => [
109
+ a(i(e.value.format), 1)
110
+ ]),
111
+ _: 1
112
+ })) : t("", !0),
113
+ e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (u(), d(o, { key: 4 }, {
114
+ prefix: l(() => r[5] || (r[5] = [
115
+ a("greater than:")
116
+ ])),
117
+ default: l(() => [
118
+ a(" " + i(e.value.minimum), 1)
119
+ ]),
120
+ _: 1
121
+ })) : t("", !0),
122
+ e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (u(), d(o, { key: 5 }, {
123
+ prefix: l(() => r[6] || (r[6] = [
124
+ a("min:")
125
+ ])),
126
+ default: l(() => [
127
+ a(" " + i(e.value.minimum), 1)
128
+ ]),
129
+ _: 1
130
+ })) : t("", !0),
131
+ e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (u(), d(o, { key: 6 }, {
132
+ prefix: l(() => r[7] || (r[7] = [
133
+ a("less than:")
134
+ ])),
135
+ default: l(() => [
136
+ a(" " + i(e.value.maximum), 1)
137
+ ]),
138
+ _: 1
139
+ })) : t("", !0),
140
+ e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (u(), d(o, { key: 7 }, {
141
+ prefix: l(() => r[8] || (r[8] = [
142
+ a("max:")
143
+ ])),
144
+ default: l(() => [
145
+ a(" " + i(e.value.maximum), 1)
146
+ ]),
147
+ _: 1
148
+ })) : t("", !0),
149
+ e.value.pattern ? (u(), d(o, {
150
+ key: 8,
151
+ code: "",
152
+ truncate: ""
153
+ }, {
154
+ default: l(() => [
155
+ a(i(e.value.pattern), 1)
156
+ ]),
157
+ _: 1
158
+ })) : t("", !0),
159
+ e.$props.enum ? (u(), d(o, { key: 9 }, {
160
+ default: l(() => r[9] || (r[9] = [
161
+ a("enum")
162
+ ])),
163
+ _: 1
164
+ })) : t("", !0),
165
+ e.value.default !== void 0 ? (u(), d(o, {
166
+ key: 10,
167
+ truncate: ""
168
+ }, {
169
+ prefix: l(() => r[10] || (r[10] = [
170
+ a("default:")
171
+ ])),
187
172
  default: l(() => [
188
- a(i(m), 1)
173
+ a(" " + i(M(e.value)), 1)
189
174
  ]),
190
- _: 2
191
- }, 1024))), 128)),
192
- e.required ? (u(), n("div", T, " required ")) : t("", !0)
193
- ]),
194
- e.$slots.example ? (u(), n("div", h, [
195
- O(e.$slots, "example", {}, void 0, !0)
196
- ])) : t("", !0)
197
- ], 64);
175
+ _: 1
176
+ })) : t("", !0)
177
+ ], 64)) : t("", !0),
178
+ (I = e.value) != null && I.writeOnly ? (u(), n("div", E, " write-only ")) : (L = e.value) != null && L.readOnly ? (u(), n("div", F, " read-only ")) : t("", !0),
179
+ (u(!0), n(s, null, V(A.filter((m) => {
180
+ var p, y, N;
181
+ return ((p = e.value) == null ? void 0 : p[m]) || ((N = (y = e.value) == null ? void 0 : y.items) == null ? void 0 : N[m]);
182
+ }), (m) => (u(), d(O(w), { key: m }, {
183
+ default: l(() => [
184
+ a(i(m), 1)
185
+ ]),
186
+ _: 2
187
+ }, 1024))), 128)),
188
+ e.required ? (u(), n("div", H, " required ")) : t("", !0)
189
+ ]);
198
190
  };
199
191
  }
200
192
  });
201
193
  export {
202
- Q as default
194
+ K as default
203
195
  };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Converts an example value to a string that can be displayed in the UI.
3
+ */
4
+ export declare function formatExample(example: unknown): string | number;
5
+ //# sourceMappingURL=formatExample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatExample.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/formatExample.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CA0C/D"}
@@ -0,0 +1,6 @@
1
+ function t(r) {
2
+ return Array.isArray(r) ? `[${r.map((n) => typeof n == "string" || typeof n == "number" ? `"${n.toString().trim()}"` : typeof n == "object" ? JSON.stringify(n) : n === void 0 ? "undefined" : n === null ? "null" : n).join(", ")}]` : typeof r == "object" ? JSON.stringify(r) : r === null ? "null" : r === void 0 ? "undefined" : typeof r == "string" ? r.trim() : r.toString().trim();
3
+ }
4
+ export {
5
+ t as formatExample
6
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/Tag.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAY,QAAQ,EAAO,MAAM,KAAK,CAAA;AAS7C,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;AA0BF,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;yBAVpB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0D6jiB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;EA3CntiB;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/Tag.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAY,QAAQ,EAAO,MAAM,KAAK,CAAA;AAS7C,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;AA8BF,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;yBAVpB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA2Ds2hB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;EA5C5/hB;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Tag.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-a6dd88a4"]]);
4
+ const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-d47a803a"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,60 +1,62 @@
1
- import { defineComponent as g, ref as d, computed as k, openBlock as a, createBlock as s, unref as n, withCtx as C, createCommentVNode as y, createElementBlock as S, renderSlot as h, nextTick as b } from "vue";
2
- import v from "../../ShowMoreButton.vue.js";
3
- import T from "./Endpoints.vue.js";
1
+ import { defineComponent as k, ref as d, computed as f, openBlock as n, createBlock as r, unref as o, withCtx as C, createCommentVNode as h, createElementBlock as y, renderSlot as S, nextTick as v } from "vue";
2
+ import T from "../../ShowMoreButton.vue.js";
3
+ import b from "./Endpoints.vue.js";
4
4
  import w from "../../Section/SectionContainer.vue.js";
5
5
  import { useSidebar as B } from "../../../hooks/useSidebar.js";
6
6
  import { useNavState as R } from "../../../hooks/useNavState.js";
7
- const M = /* @__PURE__ */ g({
7
+ const D = /* @__PURE__ */ k({
8
8
  __name: "Tag",
9
9
  props: {
10
10
  id: {},
11
11
  tag: {},
12
12
  spec: {}
13
13
  },
14
- setup(f) {
15
- const r = f, p = d(), i = d(), { collapsedSidebarItems: l } = B(), { getTagId: c } = R(), m = k(
14
+ setup(u) {
15
+ const a = u, m = d(), s = d(), { collapsedSidebarItems: i } = B(), { getTagId: l } = R(), c = f(
16
16
  () => {
17
- var e, t, o;
18
- return ((e = r.spec.tags) == null ? void 0 : e.length) !== 1 || ((t = r.tag) == null ? void 0 : t.name) !== "default" || ((o = r.tag) == null ? void 0 : o.description) !== "";
17
+ var e, t;
18
+ return ((e = a.spec.tags) == null ? void 0 : e.length) && ((t = a.spec.tags) == null ? void 0 : t.length) > 1;
19
+ }
20
+ ), p = f(
21
+ () => {
22
+ var e, t;
23
+ return c.value || ((e = a.tag) == null ? void 0 : e.name) !== "default" || ((t = a.tag) == null ? void 0 : t.description) !== "";
19
24
  }
20
25
  );
21
- async function u() {
26
+ async function g() {
22
27
  var e, t;
23
- await b(), (t = (e = i.value) == null ? void 0 : e.querySelector("button")) == null || t.focus();
28
+ await v(), (t = (e = s.value) == null ? void 0 : e.querySelector("button")) == null || t.focus();
24
29
  }
25
- return (e, t) => (a(), s(n(w), {
30
+ return (e, t) => (n(), r(o(w), {
26
31
  ref_key: "sectionContainerRef",
27
- ref: p,
32
+ ref: m,
28
33
  class: "tag-section-container"
29
34
  }, {
30
- default: C(() => {
31
- var o;
32
- return [
33
- m.value ? (a(), s(T, {
34
- key: 0,
35
- id: e.id,
36
- isCollapsed: !n(l)[n(c)(e.tag)],
37
- tag: e.tag
38
- }, null, 8, ["id", "isCollapsed", "tag"])) : y("", !0),
39
- !n(l)[n(c)(e.tag)] && ((o = e.tag.operations) == null ? void 0 : o.length) > 1 ? (a(), s(v, {
40
- key: 1,
41
- id: e.id ?? "",
42
- "aria-label": `Show all ${e.tag["x-displayName"] ?? e.tag.name} endpoints`,
43
- onClick: u
44
- }, null, 8, ["id", "aria-label"])) : (a(), S("div", {
45
- key: 2,
46
- ref_key: "contentsRef",
47
- ref: i,
48
- class: "contents"
49
- }, [
50
- h(e.$slots, "default", {}, void 0, !0)
51
- ], 512))
52
- ];
53
- }),
35
+ default: C(() => [
36
+ p.value ? (n(), r(b, {
37
+ key: 0,
38
+ id: e.id,
39
+ isCollapsed: !o(i)[o(l)(e.tag)],
40
+ tag: e.tag
41
+ }, null, 8, ["id", "isCollapsed", "tag"])) : h("", !0),
42
+ !o(i)[o(l)(e.tag)] && c.value ? (n(), r(T, {
43
+ key: 1,
44
+ id: e.id ?? "",
45
+ "aria-label": `Show all ${e.tag["x-displayName"] ?? e.tag.name} endpoints`,
46
+ onClick: g
47
+ }, null, 8, ["id", "aria-label"])) : (n(), y("div", {
48
+ key: 2,
49
+ ref_key: "contentsRef",
50
+ ref: s,
51
+ class: "contents"
52
+ }, [
53
+ S(e.$slots, "default", {}, void 0, !0)
54
+ ], 512))
55
+ ]),
54
56
  _: 3
55
57
  }, 512));
56
58
  }
57
59
  });
58
60
  export {
59
- M as default
61
+ D as default
60
62
  };