@scalar/api-reference 1.28.12 → 1.28.14
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.
- package/CHANGELOG.md +33 -0
- package/dist/browser/standalone.js +2947 -2897
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/components/Card/Card.vue.js +7 -7
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +18 -19
- package/dist/components/Content/Lazy/Loading.vue.d.ts +8 -17
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +50 -44
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +84 -71
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +42 -39
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +159 -148
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +23 -20
- package/dist/features/ApiClientModal/useApiClient.d.ts +308 -8
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +29 -19
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +1 -0
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +29 -26
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +42 -29
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +3 -3
- package/dist/features/Search/SearchModal.vue2.js +102 -96
- package/dist/features/Search/useSearchIndex.d.ts +2 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +55 -52
- package/dist/helpers/get-request.d.ts +15 -0
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -9
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { defineComponent as $, computed as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import { optimizeValueForDisplay as
|
|
1
|
+
import { defineComponent as $, computed as y, openBlock as o, createBlock as f, resolveDynamicComponent as G, normalizeClass as z, withCtx as m, createSlots as J, createTextVNode as D, toDisplayString as d, createCommentVNode as a, createElementBlock as i, createVNode as s, unref as l, Fragment as c, renderList as k, createElementVNode as h } from "vue";
|
|
2
|
+
import { Disclosure as K, DisclosurePanel as Q, DisclosureButton as W } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as S, ScalarIcon as X } from "@scalar/components";
|
|
4
|
+
import { optimizeValueForDisplay as Y, discriminators as I } from "./helpers/optimizeValueForDisplay.js";
|
|
5
5
|
import L from "./Schema.vue.js";
|
|
6
6
|
import O from "./SchemaDiscriminator.vue.js";
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import x from "./SchemaPropertyHeading.vue.js";
|
|
8
|
+
const ee = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "property-description"
|
|
11
|
-
},
|
|
11
|
+
}, te = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "property-description"
|
|
14
|
-
},
|
|
14
|
+
}, ne = {
|
|
15
15
|
key: 3,
|
|
16
16
|
class: "property-enum"
|
|
17
|
-
},
|
|
17
|
+
}, oe = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "property-list"
|
|
20
|
-
}, re = { class: "property-heading" },
|
|
20
|
+
}, re = { class: "property-heading" }, ie = { class: "property-name" }, ae = { class: "property-description" }, se = {
|
|
21
21
|
key: 1,
|
|
22
22
|
class: "property-enum-values"
|
|
23
|
-
},
|
|
23
|
+
}, le = { class: "property-enum-value-label" }, pe = { class: "property-enum-value-label" }, me = {
|
|
24
24
|
key: 4,
|
|
25
25
|
class: "children"
|
|
26
26
|
}, de = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "children"
|
|
29
|
-
},
|
|
29
|
+
}, be = /* @__PURE__ */ $({
|
|
30
30
|
__name: "SchemaProperty",
|
|
31
31
|
props: {
|
|
32
|
+
is: {},
|
|
32
33
|
value: {},
|
|
33
34
|
level: { default: 0 },
|
|
34
35
|
name: {},
|
|
@@ -58,158 +59,168 @@ const x = {
|
|
|
58
59
|
}, B = (e, n) => n != null && n.properties || n != null && n.additionalProperties || n != null && n.patternProperties || n != null && n.allOf ? null : e || (n == null ? void 0 : n.description) || null, E = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], p = (e) => {
|
|
59
60
|
var n;
|
|
60
61
|
return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
|
|
61
|
-
},
|
|
62
|
+
}, C = y(
|
|
62
63
|
() => p(t.value).length > 9
|
|
63
|
-
), P =
|
|
64
|
+
), P = y(() => C.value ? 5 : 9), U = y(
|
|
64
65
|
() => p(t.value).slice(0, P.value)
|
|
65
|
-
), Z =
|
|
66
|
+
), Z = y(
|
|
66
67
|
() => p(t.value).slice(P.value)
|
|
67
|
-
), t =
|
|
68
|
+
), t = y(() => Y(T.value));
|
|
68
69
|
I.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
|
|
69
|
-
const M = (e, n,
|
|
70
|
+
const M = (e, n, g, v, b) => n || g || v || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || b;
|
|
70
71
|
return (e, n) => {
|
|
71
|
-
var
|
|
72
|
-
return
|
|
72
|
+
var g;
|
|
73
|
+
return o(), f(G(e.is ?? "li"), {
|
|
73
74
|
class: z(["property", [
|
|
74
75
|
(B(e.description, t.value), ""),
|
|
75
76
|
`property--level-${e.level}`,
|
|
76
77
|
{
|
|
77
78
|
"property--compact": e.compact,
|
|
78
|
-
"property--deprecated": (
|
|
79
|
+
"property--deprecated": (g = t.value) == null ? void 0 : g.deprecated
|
|
79
80
|
}
|
|
80
81
|
]])
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
pattern: e.pattern,
|
|
93
|
-
required: e.required,
|
|
94
|
-
value: t.value
|
|
95
|
-
}, G({ _: 2 }, [
|
|
96
|
-
e.name ? {
|
|
97
|
-
name: "name",
|
|
98
|
-
fn: y(() => [
|
|
99
|
-
S(d(e.name), 1)
|
|
100
|
-
]),
|
|
101
|
-
key: "0"
|
|
102
|
-
} : void 0,
|
|
103
|
-
(g = t.value) != null && g.example ? {
|
|
104
|
-
name: "example",
|
|
105
|
-
fn: y(() => [
|
|
106
|
-
S(" Example: " + d(t.value.example), 1)
|
|
107
|
-
]),
|
|
108
|
-
key: "1"
|
|
109
|
-
} : void 0
|
|
110
|
-
]), 1032, ["additional", "enum", "pattern", "required", "value"])) : l("", !0),
|
|
111
|
-
B(e.description, t.value) ? (r(), i("div", x, [
|
|
112
|
-
s(a(D), {
|
|
113
|
-
value: B(e.description, t.value)
|
|
114
|
-
}, null, 8, ["value"])
|
|
115
|
-
])) : E(t.value) ? (r(), i("div", ee, [
|
|
116
|
-
s(a(D), {
|
|
117
|
-
value: E(t.value) || ""
|
|
118
|
-
}, null, 8, ["value"])
|
|
119
|
-
])) : l("", !0),
|
|
120
|
-
((v = p(t.value)) == null ? void 0 : v.length) > 0 ? (r(), i("div", te, [
|
|
121
|
-
Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (r(), i("div", ne, [
|
|
122
|
-
(r(!0), i(c, null, k(p(t.value), (o) => (r(), i("div", {
|
|
123
|
-
key: o,
|
|
124
|
-
class: "property"
|
|
125
|
-
}, [
|
|
126
|
-
f("div", re, [
|
|
127
|
-
f("div", oe, d(o), 1)
|
|
128
|
-
]),
|
|
129
|
-
f("div", ie, [
|
|
130
|
-
s(a(D), {
|
|
131
|
-
value: t.value["x-enumDescriptions"][o]
|
|
132
|
-
}, null, 8, ["value"])
|
|
133
|
-
])
|
|
134
|
-
]))), 128))
|
|
135
|
-
])) : (r(), i("ul", le, [
|
|
136
|
-
(r(!0), i(c, null, k(U.value, (o) => (r(), i("li", {
|
|
137
|
-
key: o,
|
|
138
|
-
class: "property-enum-value"
|
|
139
|
-
}, [
|
|
140
|
-
f("span", se, d(o), 1)
|
|
141
|
-
]))), 128)),
|
|
142
|
-
_.value ? (r(), b(a(J), { key: 0 }, {
|
|
143
|
-
default: y(({ open: o }) => [
|
|
144
|
-
s(a(K), null, {
|
|
145
|
-
default: y(() => [
|
|
146
|
-
(r(!0), i(c, null, k(Z.value, (m) => (r(), i("li", {
|
|
147
|
-
key: m,
|
|
148
|
-
class: "property-enum-value"
|
|
149
|
-
}, [
|
|
150
|
-
f("span", ae, d(m), 1)
|
|
151
|
-
]))), 128))
|
|
152
|
-
]),
|
|
153
|
-
_: 1
|
|
154
|
-
}),
|
|
155
|
-
s(a(Q), { class: "enum-toggle-button" }, {
|
|
156
|
-
default: y(() => [
|
|
157
|
-
s(a(W), {
|
|
158
|
-
class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
|
|
159
|
-
icon: "Add",
|
|
160
|
-
size: "sm"
|
|
161
|
-
}, null, 8, ["class"]),
|
|
162
|
-
S(" " + d(o ? "Hide values" : "Show all values"), 1)
|
|
163
|
-
]),
|
|
164
|
-
_: 2
|
|
165
|
-
}, 1024)
|
|
166
|
-
]),
|
|
167
|
-
_: 1
|
|
168
|
-
})) : l("", !0)
|
|
169
|
-
]))
|
|
170
|
-
])) : l("", !0),
|
|
171
|
-
((C = t.value) == null ? void 0 : C.type) === "object" && ((j = t.value) != null && j.properties || (q = t.value) != null && q.additionalProperties) ? (r(), i("div", pe, [
|
|
172
|
-
s(L, {
|
|
173
|
-
compact: e.compact,
|
|
174
|
-
level: e.level + 1,
|
|
175
|
-
value: t.value
|
|
176
|
-
}, null, 8, ["compact", "level", "value"])
|
|
177
|
-
])) : l("", !0),
|
|
178
|
-
(A = t.value) != null && A.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (r(), i(c, { key: 5 }, [
|
|
179
|
-
["object"].includes((N = (F = t.value) == null ? void 0 : F.items) == null ? void 0 : N.type) ? (r(), i("div", de, [
|
|
180
|
-
s(L, {
|
|
181
|
-
compact: e.compact,
|
|
182
|
-
level: e.level + 1,
|
|
183
|
-
value: t.value.items
|
|
184
|
-
}, null, 8, ["compact", "level", "value"])
|
|
185
|
-
])) : l("", !0)
|
|
186
|
-
], 64)) : l("", !0),
|
|
187
|
-
(r(!0), i(c, null, k(a(I), (o) => {
|
|
188
|
-
var m, V;
|
|
189
|
-
return r(), i(c, { key: o }, [
|
|
190
|
-
(m = t.value) != null && m[o] ? (r(), b(O, {
|
|
82
|
+
}, {
|
|
83
|
+
default: m(() => {
|
|
84
|
+
var v, b, w, j, q, A, F, N, V;
|
|
85
|
+
return [
|
|
86
|
+
M(
|
|
87
|
+
t.value,
|
|
88
|
+
e.name,
|
|
89
|
+
e.additional,
|
|
90
|
+
e.pattern,
|
|
91
|
+
e.required
|
|
92
|
+
) ? (o(), f(x, {
|
|
191
93
|
key: 0,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
schemas: e.schemas,
|
|
94
|
+
additional: e.additional,
|
|
95
|
+
enum: p(t.value).length > 0,
|
|
96
|
+
pattern: e.pattern,
|
|
97
|
+
required: e.required,
|
|
197
98
|
value: t.value
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
99
|
+
}, J({ _: 2 }, [
|
|
100
|
+
e.name ? {
|
|
101
|
+
name: "name",
|
|
102
|
+
fn: m(() => [
|
|
103
|
+
D(d(e.name), 1)
|
|
104
|
+
]),
|
|
105
|
+
key: "0"
|
|
106
|
+
} : void 0,
|
|
107
|
+
(v = t.value) != null && v.example ? {
|
|
108
|
+
name: "example",
|
|
109
|
+
fn: m(() => [
|
|
110
|
+
D(" Example: " + d(t.value.example), 1)
|
|
111
|
+
]),
|
|
112
|
+
key: "1"
|
|
113
|
+
} : void 0
|
|
114
|
+
]), 1032, ["additional", "enum", "pattern", "required", "value"])) : a("", !0),
|
|
115
|
+
B(e.description, t.value) ? (o(), i("div", ee, [
|
|
116
|
+
s(l(S), {
|
|
117
|
+
value: B(e.description, t.value)
|
|
118
|
+
}, null, 8, ["value"])
|
|
119
|
+
])) : E(t.value) ? (o(), i("div", te, [
|
|
120
|
+
s(l(S), {
|
|
121
|
+
value: E(t.value) || ""
|
|
122
|
+
}, null, 8, ["value"])
|
|
123
|
+
])) : a("", !0),
|
|
124
|
+
((b = p(t.value)) == null ? void 0 : b.length) > 0 ? (o(), i("div", ne, [
|
|
125
|
+
Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (o(), i("div", oe, [
|
|
126
|
+
(o(!0), i(c, null, k(p(t.value), (r) => (o(), i("div", {
|
|
127
|
+
key: r,
|
|
128
|
+
class: "property"
|
|
129
|
+
}, [
|
|
130
|
+
h("div", re, [
|
|
131
|
+
h("div", ie, d(r), 1)
|
|
132
|
+
]),
|
|
133
|
+
h("div", ae, [
|
|
134
|
+
s(l(S), {
|
|
135
|
+
value: t.value["x-enumDescriptions"][r]
|
|
136
|
+
}, null, 8, ["value"])
|
|
137
|
+
])
|
|
138
|
+
]))), 128))
|
|
139
|
+
])) : (o(), i("ul", se, [
|
|
140
|
+
(o(!0), i(c, null, k(U.value, (r) => (o(), i("li", {
|
|
141
|
+
key: r,
|
|
142
|
+
class: "property-enum-value"
|
|
143
|
+
}, [
|
|
144
|
+
h("span", le, d(r), 1)
|
|
145
|
+
]))), 128)),
|
|
146
|
+
C.value ? (o(), f(l(K), { key: 0 }, {
|
|
147
|
+
default: m(({ open: r }) => [
|
|
148
|
+
s(l(Q), null, {
|
|
149
|
+
default: m(() => [
|
|
150
|
+
(o(!0), i(c, null, k(Z.value, (u) => (o(), i("li", {
|
|
151
|
+
key: u,
|
|
152
|
+
class: "property-enum-value"
|
|
153
|
+
}, [
|
|
154
|
+
h("span", pe, d(u), 1)
|
|
155
|
+
]))), 128))
|
|
156
|
+
]),
|
|
157
|
+
_: 1
|
|
158
|
+
}),
|
|
159
|
+
s(l(W), { class: "enum-toggle-button" }, {
|
|
160
|
+
default: m(() => [
|
|
161
|
+
s(l(X), {
|
|
162
|
+
class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": r }]),
|
|
163
|
+
icon: "Add",
|
|
164
|
+
size: "sm"
|
|
165
|
+
}, null, 8, ["class"]),
|
|
166
|
+
D(" " + d(r ? "Hide values" : "Show all values"), 1)
|
|
167
|
+
]),
|
|
168
|
+
_: 2
|
|
169
|
+
}, 1024)
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
})) : a("", !0)
|
|
173
|
+
]))
|
|
174
|
+
])) : a("", !0),
|
|
175
|
+
((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (o(), i("div", me, [
|
|
176
|
+
s(L, {
|
|
177
|
+
compact: e.compact,
|
|
178
|
+
level: e.level + 1,
|
|
179
|
+
name: e.name,
|
|
180
|
+
value: t.value
|
|
181
|
+
}, null, 8, ["compact", "level", "name", "value"])
|
|
182
|
+
])) : a("", !0),
|
|
183
|
+
(F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (o(), i(c, { key: 5 }, [
|
|
184
|
+
["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (o(), i("div", de, [
|
|
185
|
+
s(L, {
|
|
186
|
+
compact: e.compact,
|
|
187
|
+
level: e.level + 1,
|
|
188
|
+
name: e.name,
|
|
189
|
+
value: t.value.items
|
|
190
|
+
}, null, 8, ["compact", "level", "name", "value"])
|
|
191
|
+
])) : a("", !0)
|
|
192
|
+
], 64)) : a("", !0),
|
|
193
|
+
(o(!0), i(c, null, k(l(I), (r) => {
|
|
194
|
+
var u, _;
|
|
195
|
+
return o(), i(c, { key: r }, [
|
|
196
|
+
(u = t.value) != null && u[r] ? (o(), f(O, {
|
|
197
|
+
key: 0,
|
|
198
|
+
compact: e.compact,
|
|
199
|
+
discriminator: r,
|
|
200
|
+
hideHeading: e.hideHeading,
|
|
201
|
+
level: e.level,
|
|
202
|
+
name: e.name,
|
|
203
|
+
schemas: e.schemas,
|
|
204
|
+
value: t.value
|
|
205
|
+
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "schemas", "value"])) : (_ = t.value) != null && _.items && typeof r == "string" && typeof t.value.items == "object" && r in t.value.items && Array.isArray(t.value.items[r]) && e.level < 3 ? (o(), f(O, {
|
|
206
|
+
key: 1,
|
|
207
|
+
compact: e.compact,
|
|
208
|
+
discriminator: r,
|
|
209
|
+
hideHeading: e.hideHeading,
|
|
210
|
+
level: e.level,
|
|
211
|
+
name: e.name,
|
|
212
|
+
schemas: e.schemas,
|
|
213
|
+
value: t.value.items
|
|
214
|
+
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "schemas", "value"])) : a("", !0)
|
|
215
|
+
], 64);
|
|
216
|
+
}), 128))
|
|
217
|
+
];
|
|
218
|
+
}),
|
|
219
|
+
_: 1
|
|
220
|
+
}, 8, ["class"]);
|
|
210
221
|
};
|
|
211
222
|
}
|
|
212
223
|
});
|
|
213
224
|
export {
|
|
214
|
-
|
|
225
|
+
be as default
|
|
215
226
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAWzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AAwGF,wBAOG"}
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as m, ref as p, onMounted as f, watch as s, onBeforeUnmount as d, openBlock as v, createElementBlock as x } from "vue";
|
|
2
|
+
import { useWorkspace as E } from "@scalar/api-client/store";
|
|
3
3
|
import { watchDebounced as g } from "@vueuse/core";
|
|
4
4
|
import { useApiClient as k } from "./useApiClient.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useNavState as C } from "../../hooks/useNavState.js";
|
|
6
|
+
import { useExampleStore as _ } from "../../legacy/stores/useExampleStore.js";
|
|
7
|
+
const S = /* @__PURE__ */ m({
|
|
7
8
|
__name: "ApiClientModal",
|
|
8
9
|
props: {
|
|
9
10
|
configuration: {}
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
el:
|
|
16
|
-
configuration:
|
|
17
|
-
store:
|
|
12
|
+
setup(u) {
|
|
13
|
+
const o = p(null), { client: t, init: i } = k(), { selectedExampleKey: l, operationId: a } = _(), c = E(), { isIntersectionEnabled: r } = C();
|
|
14
|
+
return f(() => {
|
|
15
|
+
o.value && i({
|
|
16
|
+
el: o.value,
|
|
17
|
+
configuration: u.configuration,
|
|
18
|
+
store: c
|
|
18
19
|
});
|
|
19
20
|
}), g(
|
|
20
|
-
() =>
|
|
21
|
+
() => u.configuration,
|
|
21
22
|
(e) => {
|
|
22
23
|
var n;
|
|
23
|
-
|
|
24
|
+
e && (r.value = !1, (n = t.value) == null || n.updateConfig(e), setTimeout(() => {
|
|
25
|
+
r.value = !0;
|
|
26
|
+
}, 1e3));
|
|
24
27
|
},
|
|
25
28
|
{ deep: !0, debounce: 300 }
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
+
), s(l, (e) => {
|
|
30
|
+
t.value && e && a.value && t.value.updateExample(e, a.value);
|
|
31
|
+
}), d(() => {
|
|
29
32
|
var e;
|
|
30
|
-
return (e =
|
|
31
|
-
}), (e, n) => (
|
|
33
|
+
return (e = t.value) == null ? void 0 : e.app.unmount();
|
|
34
|
+
}), (e, n) => (v(), x("div", {
|
|
32
35
|
ref_key: "el",
|
|
33
|
-
ref:
|
|
36
|
+
ref: o
|
|
34
37
|
}, null, 512));
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
S as default
|
|
39
42
|
};
|