@scalar/api-reference 1.24.20 → 1.24.21

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 (82) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/browser/standalone.js +8172 -8136
  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 +1 -1
  6. package/dist/components/ApiClientModal.vue3.js +5 -0
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  9. package/dist/components/ApiReferenceLayout.vue2.js +105 -116
  10. package/dist/components/Content/Content.vue.d.ts +0 -3
  11. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Content.vue.js +2 -2
  13. package/dist/components/Content/Content.vue2.js +70 -93
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  15. package/dist/components/Content/Schema/Schema.vue.d.ts +2 -2
  16. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  17. package/dist/components/api-client-bus.d.ts +1 -1
  18. package/dist/components/api-client-bus.d.ts.map +1 -1
  19. package/dist/{components/Content/BaseUrl/ServerVariables.vue.d.ts → features/BaseUrl/BaseUrl.vue.d.ts} +18 -4
  20. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -0
  21. package/dist/features/BaseUrl/BaseUrl.vue.js +87 -0
  22. package/dist/features/BaseUrl/BaseUrl.vue2.js +4 -0
  23. package/dist/features/BaseUrl/ServerForm.vue.d.ts +41 -0
  24. package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +1 -0
  25. package/dist/features/BaseUrl/ServerForm.vue.js +7 -0
  26. package/dist/features/BaseUrl/ServerForm.vue2.js +66 -0
  27. package/dist/{components/Content/BaseUrl/ServerItem.vue.d.ts → features/BaseUrl/ServerUrl.vue.d.ts} +6 -6
  28. package/dist/features/BaseUrl/ServerUrl.vue.d.ts.map +1 -0
  29. package/dist/features/BaseUrl/ServerUrl.vue.js +8 -0
  30. package/dist/features/BaseUrl/ServerUrl.vue2.js +29 -0
  31. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts +30 -0
  32. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -0
  33. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +7 -0
  34. package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +56 -0
  35. package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts +23 -0
  36. package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts.map +1 -0
  37. package/dist/features/BaseUrl/ServerVariablesForm.vue.js +7 -0
  38. package/dist/features/BaseUrl/ServerVariablesForm.vue2.js +53 -0
  39. package/dist/{components/Content/BaseUrl/ServerVariableSelect.vue.d.ts → features/BaseUrl/ServerVariablesSelect.vue.d.ts} +1 -1
  40. package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -0
  41. package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +7 -0
  42. package/dist/{components/Content/BaseUrl/ServerVariableSelect.vue2.js → features/BaseUrl/ServerVariablesSelect.vue2.js} +1 -1
  43. package/dist/{components/Content/BaseUrl/ServerVariableTextbox.vue.d.ts → features/BaseUrl/ServerVariablesTextbox.vue.d.ts} +1 -1
  44. package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +1 -0
  45. package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +7 -0
  46. package/dist/{components/Content/BaseUrl/ServerVariableTextbox.vue2.js → features/BaseUrl/ServerVariablesTextbox.vue2.js} +6 -6
  47. package/dist/features/BaseUrl/index.d.ts +3 -0
  48. package/dist/features/BaseUrl/index.d.ts.map +1 -0
  49. package/dist/features/BaseUrl/types.d.ts +10 -0
  50. package/dist/features/BaseUrl/types.d.ts.map +1 -0
  51. package/dist/features/BaseUrl/utils/getServers.d.ts +15 -0
  52. package/dist/features/BaseUrl/utils/getServers.d.ts.map +1 -0
  53. package/dist/features/BaseUrl/utils/getServers.js +29 -0
  54. package/dist/features/BaseUrl/utils/index.d.ts +2 -0
  55. package/dist/features/BaseUrl/utils/index.d.ts.map +1 -0
  56. package/dist/helpers/createEmptySpecification.d.ts +1 -1
  57. package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
  58. package/dist/helpers/createEmptySpecification.js +5 -4
  59. package/dist/helpers/getModels.d.ts +1 -1
  60. package/dist/hooks/useReactiveSpec.d.ts +8 -8
  61. package/dist/index.js +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/types.d.ts +1 -4
  64. package/dist/types.d.ts.map +1 -1
  65. package/package.json +7 -7
  66. package/dist/components/ApiClientModal.vue2.js +0 -4
  67. package/dist/components/Content/BaseUrl/BaseUrl.vue.d.ts +0 -3
  68. package/dist/components/Content/BaseUrl/BaseUrl.vue.d.ts.map +0 -1
  69. package/dist/components/Content/BaseUrl/BaseUrl.vue.js +0 -7
  70. package/dist/components/Content/BaseUrl/BaseUrl.vue2.js +0 -90
  71. package/dist/components/Content/BaseUrl/ServerItem.vue.d.ts.map +0 -1
  72. package/dist/components/Content/BaseUrl/ServerItem.vue.js +0 -8
  73. package/dist/components/Content/BaseUrl/ServerItem.vue2.js +0 -35
  74. package/dist/components/Content/BaseUrl/ServerVariableSelect.vue.d.ts.map +0 -1
  75. package/dist/components/Content/BaseUrl/ServerVariableSelect.vue.js +0 -7
  76. package/dist/components/Content/BaseUrl/ServerVariableTextbox.vue.d.ts.map +0 -1
  77. package/dist/components/Content/BaseUrl/ServerVariableTextbox.vue.js +0 -7
  78. package/dist/components/Content/BaseUrl/ServerVariables.vue.d.ts.map +0 -1
  79. package/dist/components/Content/BaseUrl/ServerVariables.vue.js +0 -7
  80. package/dist/components/Content/BaseUrl/ServerVariables.vue2.js +0 -47
  81. package/dist/components/Content/BaseUrl/index.d.ts +0 -2
  82. package/dist/components/Content/BaseUrl/index.d.ts.map +0 -1
@@ -1,7 +0,0 @@
1
- import o from "./BaseUrl.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e4183eb6"]]);
5
- export {
6
- m as default
7
- };
@@ -1,90 +0,0 @@
1
- import { defineComponent as b, ref as S, watch as k, unref as r, openBlock as l, createElementBlock as v, createElementVNode as o, Fragment as g, renderList as I, toDisplayString as V, createCommentVNode as d, createVNode as p, createBlock as y, pushScopeId as B, popScopeId as w } from "vue";
2
- import { useServerStore as C, findVariables as E } from "@scalar/api-client";
3
- import { ScalarIcon as N, ScalarMarkdown as x } from "@scalar/components";
4
- import D from "./ServerItem.vue.js";
5
- import L from "./ServerVariables.vue.js";
6
- const U = (c) => (B("data-v-e4183eb6"), c = c(), w(), c), j = { key: 0 }, F = /* @__PURE__ */ U(() => /* @__PURE__ */ o("span", { class: "scalar-card-serverlist-title" }, "Base URL", -1)), M = { class: "scalar-card-serverlist" }, O = { class: "scalar-card-serverlist-container" }, R = { class: "server-item" }, q = { class: "server-selector" }, z = ["value"], A = ["value"], G = {
7
- key: 0,
8
- muted: ""
9
- }, H = { class: "description" }, W = /* @__PURE__ */ b({
10
- __name: "BaseUrl",
11
- setup(c) {
12
- const { server: e, setServer: f } = C(), s = S(0);
13
- return k(
14
- [s, () => e.servers],
15
- () => {
16
- var n, _, m;
17
- if (!e.servers.length) return;
18
- const a = ((n = e.servers[s.value]) == null ? void 0 : n.variables) ?? {}, i = a ? Object.keys(a).map((t) => {
19
- var h;
20
- return {
21
- name: t,
22
- value: ((h = a[t].default) == null ? void 0 : h.toString()) ?? "",
23
- enum: a[t].enum ?? []
24
- };
25
- }) : [];
26
- E(
27
- (_ = e.servers[s.value]) == null ? void 0 : _.url
28
- ).filter((t) => !a[t]).forEach((t) => {
29
- i.push({
30
- name: t,
31
- value: "",
32
- enum: []
33
- });
34
- }), f({
35
- selectedServer: s.value,
36
- description: (m = e.servers[s.value]) == null ? void 0 : m.description,
37
- variables: i
38
- });
39
- },
40
- {
41
- immediate: !0,
42
- deep: !0
43
- }
44
- ), (a, i) => r(e).servers.length > 0 ? (l(), v("div", j, [
45
- F,
46
- o("div", M, [
47
- o("div", O, [
48
- o("div", R, [
49
- o("div", q, [
50
- r(e).servers.length > 1 ? (l(), v("select", {
51
- key: 0,
52
- value: s.value,
53
- onInput: i[0] || (i[0] = (u) => s.value = parseInt(
54
- u.target.value,
55
- 10
56
- ))
57
- }, [
58
- (l(!0), v(g, null, I(r(e).servers, (u, n) => (l(), v("option", {
59
- key: n,
60
- value: n
61
- }, V(u.url), 9, A))), 128))
62
- ], 40, z)) : d("", !0),
63
- p(D, {
64
- value: r(e).servers[s.value],
65
- variables: r(e).variables
66
- }, null, 8, ["value", "variables"]),
67
- r(e).servers.length > 1 ? (l(), y(r(N), {
68
- key: 1,
69
- icon: "ChevronDown"
70
- })) : d("", !0)
71
- ])
72
- ]),
73
- p(L, {
74
- value: r(e).variables
75
- }, null, 8, ["value"])
76
- ])
77
- ]),
78
- r(e).description ? (l(), v("div", G, [
79
- o("div", H, [
80
- p(r(x), {
81
- value: r(e).description
82
- }, null, 8, ["value"])
83
- ])
84
- ])) : d("", !0)
85
- ])) : d("", !0);
86
- }
87
- });
88
- export {
89
- W as default
90
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerItem.vue"],"names":[],"mappings":"AA+EA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EAEd,MAAM,oBAAoB,CAAA;;;;;;;;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,8 +0,0 @@
1
- import o from "./ServerItem.vue2.js";
2
- /* empty css */
3
- /* empty css */
4
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-41c016dc"]]);
6
- export {
7
- c as default
8
- };
@@ -1,35 +0,0 @@
1
- import { defineComponent as v, computed as u, openBlock as d, createElementBlock as f, unref as b, createCommentVNode as C } from "vue";
2
- import { replaceVariables as k } from "@scalar/api-client";
3
- import { useClipboard as T } from "../../../hooks/useClipboard.js";
4
- const _ = ["title", "innerHTML"], y = /* @__PURE__ */ v({
5
- __name: "ServerItem",
6
- props: {
7
- value: {},
8
- variables: {}
9
- },
10
- setup(p) {
11
- const n = p, { copyToClipboard: i } = T(), o = u(() => {
12
- var l;
13
- const r = (((l = n.value) == null ? void 0 : l.url) ?? "").replace(/(<([^>]+)>)/gi, "");
14
- return k(r, (a) => {
15
- var s;
16
- const e = (s = n.variables) == null ? void 0 : s.find(
17
- (m) => m.name === a
18
- );
19
- return `<span class="base-url-variable">${((e == null ? void 0 : e.value) ?? "") !== "" ? e == null ? void 0 : e.value : `{${a}}`}</span>`;
20
- });
21
- }), c = u(
22
- () => o.value.replace(/(<([^>]+)>)/gi, "")
23
- );
24
- return (t, r) => t.value ? (d(), f("a", {
25
- key: 0,
26
- class: "base-url",
27
- title: t.value.description,
28
- onClick: r[0] || (r[0] = (l) => b(i)(c.value)),
29
- innerHTML: o.value
30
- }, null, 8, _)) : C("", !0);
31
- }
32
- });
33
- export {
34
- y as default
35
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerVariableSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerVariableSelect.vue"],"names":[],"mappings":";;;;;;;;;;;AA6LA,wBAOG;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 +0,0 @@
1
- import e from "./ServerVariableSelect.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(e, [["__scopeId", "data-v-59ebb6b5"]]);
5
- export {
6
- m as default
7
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerVariableTextbox.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerVariableTextbox.vue"],"names":[],"mappings":";;;;;;;;;AAyGA,wBAOG;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 +0,0 @@
1
- import o from "./ServerVariableTextbox.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d02ff0e9"]]);
5
- export {
6
- f as default
7
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerVariables.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerVariables.vue"],"names":[],"mappings":"AA4EA,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,oBAAoB,CAAA;;;;;;AAgIlE,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 +0,0 @@
1
- import r from "./ServerVariables.vue2.js";
2
- /* empty css */
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ e(r, [["__scopeId", "data-v-99d6eef0"]]);
5
- export {
6
- f as default
7
- };
@@ -1,47 +0,0 @@
1
- import { defineComponent as p, openBlock as r, createElementBlock as o, Fragment as v, renderList as d, createElementVNode as s, toDisplayString as f, createBlock as m, createCommentVNode as _ } from "vue";
2
- import { useServerStore as h } from "@scalar/api-client";
3
- import S from "./ServerVariableSelect.vue.js";
4
- import g from "./ServerVariableTextbox.vue.js";
5
- const k = {
6
- key: 0,
7
- class: "variable-container"
8
- }, V = ["for"], E = /* @__PURE__ */ p({
9
- __name: "ServerVariables",
10
- props: {
11
- value: {}
12
- },
13
- setup(C) {
14
- const { server: u, setServer: c } = h(), t = (a, l) => {
15
- const e = [...u.variables], n = e.findIndex((i) => i.name === a);
16
- e[n].value = l, c({
17
- variables: e
18
- });
19
- };
20
- return (a, l) => a.value ? (r(), o("div", k, [
21
- (r(!0), o(v, null, d(a.value, (e) => (r(), o("div", {
22
- key: e.name,
23
- class: "variable-container-item"
24
- }, [
25
- s("label", {
26
- class: "variable-description",
27
- for: `variable-${e.name}`
28
- }, [
29
- s("code", null, f(e.name), 1)
30
- ], 8, V),
31
- e.enum && e.enum.length ? (r(), m(S, {
32
- key: 0,
33
- enum: e.enum.map((n) => `${n}`),
34
- value: e.value,
35
- onChange: (n) => t(e.name, n)
36
- }, null, 8, ["enum", "value", "onChange"])) : (r(), m(g, {
37
- key: 1,
38
- value: e.value,
39
- onChange: (n) => t(e.name, n)
40
- }, null, 8, ["value", "onChange"]))
41
- ]))), 128))
42
- ])) : _("", !0);
43
- }
44
- });
45
- export {
46
- E as default
47
- };
@@ -1,2 +0,0 @@
1
- export { default as BaseUrl } from './BaseUrl.vue.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}