@scalar/api-reference 1.25.25 → 1.25.27

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 (30) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/browser/standalone.js +10747 -10739
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
  5. package/dist/components/ApiClientModal.vue.js +30 -18
  6. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  7. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +48 -48
  8. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  9. package/dist/features/BaseUrl/BaseUrl.vue.js +22 -35
  10. package/dist/features/BaseUrl/ServerForm.vue.d.ts +5 -5
  11. package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +1 -1
  12. package/dist/features/BaseUrl/ServerForm.vue.js +2 -2
  13. package/dist/features/BaseUrl/ServerForm.vue2.js +40 -37
  14. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts +4 -4
  15. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
  16. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
  17. package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +17 -17
  18. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  19. package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +1 -1
  20. package/dist/features/ExampleResponses/ExampleResponse.vue.js +1 -1
  21. package/dist/features/ExampleResponses/ExampleResponse.vue2.js +15 -18
  22. package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
  23. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/legacy/components/CardFormTextInput.vue.js +2 -2
  26. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
  27. package/dist/legacy/components/SecurityScheme.vue.js +1 -1
  28. package/dist/legacy/components/SecurityScheme.vue2.js +59 -59
  29. package/dist/style.css +1 -1
  30. package/package.json +12 -11
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;;eAQtD,MAAM;8BACS,MAAM,GAAG,IAAI;WAChC,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;eAHd,MAAM;8BACS,MAAM,GAAG,IAAI;WAChC,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;AA+F3B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue"],"names":[],"mappings":"AA2FA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;;eAQtD,MAAM;8BACS,MAAM,GAAG,IAAI;WAChC,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;eAHd,MAAM;8BACS,MAAM,GAAG,IAAI;WAChC,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;AA6G3B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as S, ref as c, onMounted as v, watch as l, onBeforeUnmount as h, openBlock as y, createElementBlock as _ } from "vue";
2
- import { modalStateBus as U, apiClientBus as x } from "./api-client-bus.js";
3
- import { useServerStore as A } from "../legacy/stores/useServerStore.js";
4
- import { getUrlFromServerState as B } from "../legacy/helpers/getUrlFromServerState.js";
5
- const g = /* @__PURE__ */ S({
1
+ import { defineComponent as x, ref as c, onMounted as U, watch as l, onBeforeUnmount as _, openBlock as A, createElementBlock as B } from "vue";
2
+ import { modalStateBus as C, apiClientBus as k } from "./api-client-bus.js";
3
+ import { useServerStore as M } from "../legacy/stores/useServerStore.js";
4
+ import { getUrlFromServerState as w } from "../legacy/helpers/getUrlFromServerState.js";
5
+ const b = /* @__PURE__ */ x({
6
6
  __name: "ApiClientModal",
7
7
  props: {
8
8
  proxyUrl: {},
@@ -10,11 +10,19 @@ const g = /* @__PURE__ */ S({
10
10
  spec: {},
11
11
  servers: {}
12
12
  },
13
- setup(n) {
14
- const p = n, a = c(null), o = c(null), { server: s } = A();
15
- return v(async () => {
13
+ setup(i) {
14
+ const p = i, a = c(null), o = c(null), { server: u, setServer: d } = M();
15
+ return U(async () => {
16
16
  if (!a.value) return;
17
- const { createApiClientModal: e } = await import("@scalar/api-client"), { app: r, open: i, updateAuth: m, modalState: d, updateSpec: u, updateServer: f } = await e(a.value, {
17
+ const { createApiClientModal: e } = await import("@scalar/api-client"), {
18
+ app: r,
19
+ open: f,
20
+ updateAuth: m,
21
+ modalState: S,
22
+ updateSpec: n,
23
+ updateServer: v,
24
+ onUpdateServer: h
25
+ } = await e(a.value, {
18
26
  spec: p.spec ?? {},
19
27
  preferredSecurityScheme: p.preferredSecurityScheme,
20
28
  proxyUrl: p.proxyUrl,
@@ -23,13 +31,17 @@ const g = /* @__PURE__ */ S({
23
31
  o.value = {
24
32
  // @ts-expect-error not sure what the beef with app is, possible router related
25
33
  app: r,
26
- updateSpec: u,
27
- updateServer: f
28
- }, U.emit(d), x.on((t) => {
29
- t.open && i(t.open), t.updateSpec && u(t.updateSpec), t.updateAuth && m(t.updateAuth);
34
+ updateSpec: n,
35
+ updateServer: v
36
+ }, C.emit(S), h((t) => {
37
+ if (!u.servers) return;
38
+ const s = u.servers.findIndex((y) => y.url === t);
39
+ s >= 0 && d({ selectedServer: s });
40
+ }), k.on((t) => {
41
+ t.open && f(t.open), t.updateSpec && n(t.updateSpec), t.updateAuth && m(t.updateAuth);
30
42
  });
31
- }), l(s, (e) => {
32
- const r = B(e);
43
+ }), l(u, (e) => {
44
+ const r = w(e);
33
45
  r && o.value && o.value.updateServer(r);
34
46
  }), l(
35
47
  () => p.spec,
@@ -38,15 +50,15 @@ const g = /* @__PURE__ */ S({
38
50
  return e && ((r = o.value) == null ? void 0 : r.updateSpec(e));
39
51
  },
40
52
  { deep: !0 }
41
- ), h(() => {
53
+ ), _(() => {
42
54
  var e;
43
55
  return (e = o.value) == null ? void 0 : e.app.unmount();
44
- }), (e, r) => (y(), _("div", {
56
+ }), (e, r) => (A(), B("div", {
45
57
  ref_key: "el",
46
58
  ref: a
47
59
  }, null, 512));
48
60
  }
49
61
  });
50
62
  export {
51
- g as default
63
+ b as default
52
64
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaPropertyHeading.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-51fd8de8"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9ff769a7"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as A, openBlock as a, createElementBlock as i, renderSlot as M, createCommentVNode as l, Fragment as m, createTextVNode as u, toDisplayString as t, createVNode as y, unref as L, withCtx as r, createBlock as o, renderList as P } from "vue";
1
+ import { defineComponent as A, openBlock as a, createElementBlock as i, renderSlot as M, createCommentVNode as r, Fragment as m, createTextVNode as u, toDisplayString as t, createVNode as y, unref as L, withCtx as l, createBlock as o, renderList as P } from "vue";
2
2
  import n from "./SchemaPropertyDetail.vue.js";
3
3
  import N from "../../Badge/Badge.vue.js";
4
4
  const S = { class: "property-heading" }, V = {
@@ -7,13 +7,13 @@ const S = { class: "property-heading" }, V = {
7
7
  }, C = {
8
8
  key: 1,
9
9
  class: "property-additional"
10
- }, $ = {
10
+ }, D = {
11
11
  key: 2,
12
12
  class: "property-deprecated"
13
- }, b = {
13
+ }, $ = {
14
14
  key: 3,
15
15
  class: "property-required"
16
- }, D = {
16
+ }, b = {
17
17
  key: 4,
18
18
  class: "property-const"
19
19
  }, j = {
@@ -40,36 +40,36 @@ const S = { class: "property-heading" }, V = {
40
40
  return a(), i("div", S, [
41
41
  e.$slots.name ? (a(), i("div", V, [
42
42
  M(e.$slots, "name", {}, void 0, !0)
43
- ])) : l("", !0),
43
+ ])) : r("", !0),
44
44
  e.additional ? (a(), i("div", C, [
45
45
  (v = e.value) != null && v["x-additionalPropertiesName"] ? (a(), i(m, { key: 0 }, [
46
46
  u(t(e.value["x-additionalPropertiesName"]), 1)
47
47
  ], 64)) : (a(), i(m, { key: 1 }, [
48
48
  u("additional properties")
49
49
  ], 64))
50
- ])) : l("", !0),
51
- (f = e.value) != null && f.deprecated ? (a(), i("div", $, [
50
+ ])) : r("", !0),
51
+ (f = e.value) != null && f.deprecated ? (a(), i("div", D, [
52
52
  y(L(N), null, {
53
- default: r(() => [
53
+ default: l(() => [
54
54
  u("deprecated")
55
55
  ]),
56
56
  _: 1
57
57
  })
58
- ])) : l("", !0),
59
- e.required ? (a(), i("div", b, " required ")) : l("", !0),
60
- (k = e.value) != null && k.const || (h = e.value) != null && h.enum && e.value.enum.length === 1 ? (a(), i("div", D, [
58
+ ])) : r("", !0),
59
+ e.required ? (a(), i("div", $, " required ")) : r("", !0),
60
+ (k = e.value) != null && k.const || (h = e.value) != null && h.enum && e.value.enum.length === 1 ? (a(), i("div", b, [
61
61
  y(n, { truncate: "" }, {
62
- prefix: r(() => [
62
+ prefix: l(() => [
63
63
  u("const:")
64
64
  ]),
65
- default: r(() => [
65
+ default: l(() => [
66
66
  u(" " + t(e.value.const ?? e.value.enum[0]), 1)
67
67
  ]),
68
68
  _: 1
69
69
  })
70
70
  ])) : (g = e.value) != null && g.type ? (a(), i("div", j, [
71
71
  y(n, null, {
72
- default: r(() => {
72
+ default: l(() => {
73
73
  var d, s, p;
74
74
  return [
75
75
  (s = (d = e.value) == null ? void 0 : d.items) != null && s.type ? (a(), i(m, { key: 0 }, [
@@ -79,112 +79,112 @@ const S = { class: "property-heading" }, V = {
79
79
  ], 64)),
80
80
  e.value.minItems || e.value.maxItems ? (a(), i(m, { key: 2 }, [
81
81
  u(t(e.value.minItems) + "…" + t(e.value.maxItems), 1)
82
- ], 64)) : l("", !0)
82
+ ], 64)) : r("", !0)
83
83
  ];
84
84
  }),
85
85
  _: 1
86
86
  }),
87
87
  e.value.minLength ? (a(), o(n, { key: 0 }, {
88
- prefix: r(() => [
88
+ prefix: l(() => [
89
89
  u("min:")
90
90
  ]),
91
- default: r(() => [
91
+ default: l(() => [
92
92
  u(" " + t(e.value.minLength), 1)
93
93
  ]),
94
94
  _: 1
95
- })) : l("", !0),
95
+ })) : r("", !0),
96
96
  e.value.maxLength ? (a(), o(n, { key: 1 }, {
97
- prefix: r(() => [
97
+ prefix: l(() => [
98
98
  u("max:")
99
99
  ]),
100
- default: r(() => [
100
+ default: l(() => [
101
101
  u(" " + t(e.value.maxLength), 1)
102
102
  ]),
103
103
  _: 1
104
- })) : l("", !0),
104
+ })) : r("", !0),
105
105
  e.value.uniqueItems ? (a(), o(n, { key: 2 }, {
106
- default: r(() => [
106
+ default: l(() => [
107
107
  u(" unique! ")
108
108
  ]),
109
109
  _: 1
110
- })) : l("", !0),
110
+ })) : r("", !0),
111
111
  e.value.format ? (a(), o(n, { key: 3 }, {
112
- default: r(() => [
112
+ default: l(() => [
113
113
  u(t(e.value.format), 1)
114
114
  ]),
115
115
  _: 1
116
- })) : l("", !0),
116
+ })) : r("", !0),
117
117
  e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (a(), o(n, { key: 4 }, {
118
- prefix: r(() => [
118
+ prefix: l(() => [
119
119
  u("greater than:")
120
120
  ]),
121
- default: r(() => [
121
+ default: l(() => [
122
122
  u(" " + t(e.value.minimum), 1)
123
123
  ]),
124
124
  _: 1
125
- })) : l("", !0),
125
+ })) : r("", !0),
126
126
  e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (a(), o(n, { key: 5 }, {
127
- prefix: r(() => [
127
+ prefix: l(() => [
128
128
  u("min:")
129
129
  ]),
130
- default: r(() => [
130
+ default: l(() => [
131
131
  u(" " + t(e.value.minimum), 1)
132
132
  ]),
133
133
  _: 1
134
- })) : l("", !0),
134
+ })) : r("", !0),
135
135
  e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (a(), o(n, { key: 6 }, {
136
- prefix: r(() => [
136
+ prefix: l(() => [
137
137
  u("less than:")
138
138
  ]),
139
- default: r(() => [
139
+ default: l(() => [
140
140
  u(" " + t(e.value.maximum), 1)
141
141
  ]),
142
142
  _: 1
143
- })) : l("", !0),
143
+ })) : r("", !0),
144
144
  e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (a(), o(n, { key: 7 }, {
145
- prefix: r(() => [
145
+ prefix: l(() => [
146
146
  u("max:")
147
147
  ]),
148
- default: r(() => [
148
+ default: l(() => [
149
149
  u(" " + t(e.value.maximum), 1)
150
150
  ]),
151
151
  _: 1
152
- })) : l("", !0),
152
+ })) : r("", !0),
153
153
  e.value.pattern ? (a(), o(n, {
154
154
  key: 8,
155
155
  code: "",
156
156
  truncate: ""
157
157
  }, {
158
- default: r(() => [
158
+ default: l(() => [
159
159
  u(t(e.value.pattern), 1)
160
160
  ]),
161
161
  _: 1
162
- })) : l("", !0),
162
+ })) : r("", !0),
163
163
  e.$props.enum ? (a(), o(n, { key: 9 }, {
164
- default: r(() => [
164
+ default: l(() => [
165
165
  u("enum")
166
166
  ]),
167
167
  _: 1
168
- })) : l("", !0),
169
- e.value.default ? (a(), o(n, {
168
+ })) : r("", !0),
169
+ e.value.default !== void 0 ? (a(), o(n, {
170
170
  key: 10,
171
171
  truncate: ""
172
172
  }, {
173
- prefix: r(() => [
173
+ prefix: l(() => [
174
174
  u("default:")
175
175
  ]),
176
- default: r(() => [
176
+ default: l(() => [
177
177
  u(" " + t(w(e.value)), 1)
178
178
  ]),
179
179
  _: 1
180
- })) : l("", !0)
181
- ])) : l("", !0),
182
- (B = e.value) != null && B.writeOnly ? (a(), i("div", E, " write-only ")) : (q = e.value) != null && q.readOnly ? (a(), i("div", F, " read-only ")) : l("", !0),
180
+ })) : r("", !0)
181
+ ])) : r("", !0),
182
+ (B = e.value) != null && B.writeOnly ? (a(), i("div", E, " write-only ")) : (q = e.value) != null && q.readOnly ? (a(), i("div", F, " read-only ")) : r("", !0),
183
183
  (a(!0), i(m, null, P(O.filter((d) => {
184
184
  var s, p, I;
185
185
  return ((s = e.value) == null ? void 0 : s[d]) || ((I = (p = e.value) == null ? void 0 : p.items) == null ? void 0 : I[d]);
186
186
  }), (d) => (a(), o(L(N), { key: d }, {
187
- default: r(() => [
187
+ default: l(() => [
188
188
  u(t(d), 1)
189
189
  ]),
190
190
  _: 2
@@ -1 +1 @@
1
- {"version":3,"file":"BaseUrl.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/BaseUrl.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;;IAQtD;;OAEG;oBACa,IAAI;IACpB;;OAEG;uBACgB,MAAM;IACzB;;OAEG;cACO,MAAM,EAAE;;IAXlB;;OAEG;oBACa,IAAI;IACpB;;OAEG;uBACgB,MAAM;IACzB;;OAEG;cACO,MAAM,EAAE;;AAgHpB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"BaseUrl.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/BaseUrl.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;;IAStD;;OAEG;oBACa,IAAI;IACpB;;OAEG;uBACgB,MAAM;IACzB;;OAEG;cACO,MAAM,EAAE;;IAXlB;;OAEG;oBACa,IAAI;IACpB;;OAEG;uBACgB,MAAM;IACzB;;OAEG;cACO,MAAM,EAAE;;AAsEpB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as d, toRef as a, ref as m, watch as S, openBlock as b, createBlock as U, unref as n } from "vue";
2
- import _ from "./ServerForm.vue.js";
1
+ import { defineComponent as f, toRef as a, computed as c, openBlock as m, createBlock as S, unref as b } from "vue";
2
+ import U from "./ServerForm.vue.js";
3
3
  import { useServerStore as B } from "../../legacy/stores/useServerStore.js";
4
- const C = /* @__PURE__ */ d({
4
+ const _ = /* @__PURE__ */ f({
5
5
  __name: "BaseUrl",
6
6
  props: {
7
7
  specification: {},
@@ -9,39 +9,26 @@ const C = /* @__PURE__ */ d({
9
9
  servers: {}
10
10
  },
11
11
  setup(i) {
12
- const s = i, v = a(s.specification), c = a(s.defaultServerUrl), p = a(s.servers), { server: t, setServer: o } = B({
13
- specification: v,
14
- defaultServerUrl: c,
15
- servers: p
16
- }), e = m(0);
17
- S(
18
- e,
19
- () => o({
20
- selectedServer: e.value
21
- }),
22
- {
23
- immediate: !0
24
- }
25
- );
26
- function f(l, r) {
27
- o({
28
- variables: {
29
- ...t.variables,
30
- [l]: r
31
- }
32
- });
33
- }
34
- return (l, r) => (b(), U(_, {
35
- selected: e.value,
36
- servers: n(t).servers,
37
- variables: n(t).variables,
38
- "onUpdate:selected": r[0] || (r[0] = (u) => {
39
- e.value = u;
40
- }),
41
- "onUpdate:variable": f
42
- }, null, 8, ["selected", "servers", "variables"]));
12
+ const s = i, p = a(s.specification), u = a(s.defaultServerUrl), d = a(s.servers), { server: t, setServer: l } = B({
13
+ specification: p,
14
+ defaultServerUrl: u,
15
+ servers: d
16
+ }), v = c({
17
+ get: () => t.selectedServer || 0,
18
+ set: (e) => l({ selectedServer: e })
19
+ }), n = c({
20
+ get: () => t.variables,
21
+ set: (e) => l({ variables: e })
22
+ });
23
+ return (e, r) => (m(), S(U, {
24
+ selected: v.value,
25
+ "onUpdate:selected": r[0] || (r[0] = (o) => v.value = o),
26
+ variables: n.value,
27
+ "onUpdate:variables": r[1] || (r[1] = (o) => n.value = o),
28
+ servers: b(t).servers
29
+ }, null, 8, ["selected", "variables", "servers"]));
43
30
  }
44
31
  });
45
32
  export {
46
- C as default
33
+ _ as default
47
34
  };
@@ -1,25 +1,25 @@
1
1
  import type { Server } from '@scalar/types/legacy';
2
2
  import type { ServerVariableValues } from './types';
3
3
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
4
- selected?: string | number;
4
+ selected?: number;
5
5
  servers?: Server[];
6
6
  variables?: ServerVariableValues;
7
7
  }>, {
8
8
  selected: number;
9
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
10
  "update:selected": (v: number) => void;
11
- "update:variable": (name: string, value: string) => void;
11
+ "update:variables": (v: ServerVariableValues) => void;
12
12
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
13
- selected?: string | number;
13
+ selected?: number;
14
14
  servers?: Server[];
15
15
  variables?: ServerVariableValues;
16
16
  }>, {
17
17
  selected: number;
18
18
  }>>> & {
19
- "onUpdate:variable"?: ((name: string, value: string) => any) | undefined;
20
19
  "onUpdate:selected"?: ((v: number) => any) | undefined;
20
+ "onUpdate:variables"?: ((v: ServerVariableValues) => any) | undefined;
21
21
  }, {
22
- selected: string | number;
22
+ selected: number;
23
23
  }, {}>;
24
24
  export default _default;
25
25
  type __VLS_WithDefaults<P, D> = {
@@ -1 +1 @@
1
- {"version":3,"file":"ServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerForm.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAMlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;;eAKpC,MAAM,GAAG,MAAM;cAChB,MAAM,EAAE;gBACN,oBAAoB;;;;;;;eAFrB,MAAM,GAAG,MAAM;cAChB,MAAM,EAAE;gBACN,oBAAoB;;;;;;;cAFrB,MAAM,GAAG,MAAM;;AA4K9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAA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AE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ServerForm.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-465cec21"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7b6cd311"]]);
5
5
  export {
6
- c as default
6
+ p as default
7
7
  };
@@ -1,66 +1,69 @@
1
- import { defineComponent as S, toRef as I, computed as k, openBlock as c, createElementBlock as u, createElementVNode as t, createVNode as o, withCtx as w, unref as C, createCommentVNode as p, pushScopeId as N, popScopeId as U } from "vue";
2
- import { ScalarMarkdown as V } from "@scalar/components";
1
+ import { defineComponent as S, computed as u, openBlock as p, createElementBlock as m, createElementVNode as s, createVNode as o, withCtx as V, unref as k, createCommentVNode as _, pushScopeId as U, popScopeId as I } from "vue";
2
+ import { ScalarMarkdown as w } from "@scalar/components";
3
3
  import B from "./ServerUrl.vue.js";
4
- import R from "./ServerUrlSelect.vue.js";
5
- import g from "./ServerVariablesForm.vue.js";
6
- const y = (r) => (N("data-v-465cec21"), r = r(), U(), r), E = { key: 0 }, F = /* @__PURE__ */ y(() => /* @__PURE__ */ t("span", { class: "server-form-title" }, "Base URL", -1)), L = { class: "server-form" }, M = { class: "server-form-container" }, $ = { class: "server-item" }, j = {
4
+ import C from "./ServerUrlSelect.vue.js";
5
+ import N from "./ServerVariablesForm.vue.js";
6
+ const g = (r) => (U("data-v-7b6cd311"), r = r(), I(), r), y = { key: 0 }, E = /* @__PURE__ */ g(() => /* @__PURE__ */ s("span", { class: "server-form-title" }, "Base URL", -1)), F = { class: "server-form" }, L = { class: "server-form-container" }, M = { class: "server-item" }, R = {
7
7
  key: 0,
8
8
  muted: ""
9
- }, q = { class: "description" }, H = /* @__PURE__ */ S({
9
+ }, j = { class: "description" }, G = /* @__PURE__ */ S({
10
10
  __name: "ServerForm",
11
11
  props: {
12
12
  selected: { default: 0 },
13
13
  servers: {},
14
14
  variables: {}
15
15
  },
16
- emits: ["update:selected", "update:variable"],
17
- setup(r, { emit: m }) {
18
- const i = r, f = m, l = I(Number(i.selected)), _ = (e) => {
19
- const s = parseInt(e, 10);
20
- f("update:selected", s), l.value = s;
21
- }, a = k(() => {
16
+ emits: ["update:selected", "update:variables"],
17
+ setup(r, { emit: b }) {
18
+ const l = r, d = b, i = u({
19
+ get: () => l.selected,
20
+ set: (e) => d("update:selected", e)
21
+ }), t = u(() => {
22
22
  var e;
23
- return (e = i.servers) == null ? void 0 : e[l.value];
23
+ return (e = l.servers) == null ? void 0 : e[i.value];
24
24
  });
25
- return (e, s) => {
26
- var v, n, d;
27
- return (v = e.servers) != null && v.length ? (c(), u("div", E, [
28
- F,
29
- t("div", L, [
30
- t("div", M, [
31
- t("div", $, [
32
- o(R, {
33
- options: e.servers,
34
- value: l.value,
35
- onChange: _
25
+ function f(e, a) {
26
+ d("update:variables", { ...l.variables, [e]: a });
27
+ }
28
+ return (e, a) => {
29
+ var v, n, c;
30
+ return (v = e.servers) != null && v.length ? (p(), m("div", y, [
31
+ E,
32
+ s("div", F, [
33
+ s("div", L, [
34
+ s("div", M, [
35
+ o(C, {
36
+ modelValue: i.value,
37
+ "onUpdate:modelValue": a[0] || (a[0] = (h) => i.value = h),
38
+ options: e.servers
36
39
  }, {
37
- default: w(() => [
40
+ default: V(() => [
38
41
  o(B, {
39
- server: a.value,
42
+ server: t.value,
40
43
  variables: e.variables
41
44
  }, null, 8, ["server", "variables"])
42
45
  ]),
43
46
  _: 1
44
- }, 8, ["options", "value"])
47
+ }, 8, ["modelValue", "options"])
45
48
  ]),
46
- o(g, {
49
+ o(N, {
47
50
  values: e.variables,
48
- variables: (n = a.value) == null ? void 0 : n.variables,
49
- "onUpdate:variable": s[0] || (s[0] = (b, h) => e.$emit("update:variable", b, h))
51
+ variables: (n = t.value) == null ? void 0 : n.variables,
52
+ "onUpdate:variable": f
50
53
  }, null, 8, ["values", "variables"])
51
54
  ])
52
55
  ]),
53
- (d = a.value) != null && d.description ? (c(), u("div", j, [
54
- t("div", q, [
55
- o(C(V), {
56
- value: a.value.description
56
+ (c = t.value) != null && c.description ? (p(), m("div", R, [
57
+ s("div", j, [
58
+ o(k(w), {
59
+ value: t.value.description
57
60
  }, null, 8, ["value"])
58
61
  ])
59
- ])) : p("", !0)
60
- ])) : p("", !0);
62
+ ])) : _("", !0)
63
+ ])) : _("", !0);
61
64
  };
62
65
  }
63
66
  });
64
67
  export {
65
- H as default
68
+ G as default
66
69
  };
@@ -4,14 +4,14 @@ declare function __VLS_template(): {
4
4
  };
5
5
  declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
6
6
  options: Server[];
7
- value: number;
7
+ modelValue: number;
8
8
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- change: (v: string) => void;
9
+ "update:modelValue": (v: number) => void;
10
10
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
11
11
  options: Server[];
12
- value: number;
12
+ modelValue: number;
13
13
  }>>> & {
14
- onChange?: ((v: string) => any) | undefined;
14
+ "onUpdate:modelValue"?: ((v: number) => any) | undefined;
15
15
  }, {}, {}>;
16
16
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
17
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ServerUrlSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerUrlSelect.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,MAAM,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OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import r from "./ServerUrlSelect.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ e(r, [["__scopeId", "data-v-a3e94a85"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-92440dbc"]]);
5
5
  export {
6
6
  m as default
7
7
  };