@scalar/api-reference 1.17.1 → 1.17.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceBase.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceBase.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,gBAAgB,CAAA;AAU1D,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAExB,MAAM,UAAU,CAAA;;;;;;;;;;;;;;;;;AA8ZjB,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"ApiReferenceBase.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceBase.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,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C,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
3
+ //# sourceMappingURL=CustomToaster.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomToaster.vue.d.ts","sourceRoot":"","sources":["../../src/components/CustomToaster.vue.ts"],"names":[],"mappings":";AAkDA,wBAKG"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRequestFromAuthentication.d.ts","sourceRoot":"","sources":["../../src/helpers/getRequestFromAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AA8BnD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,mBAAmB,EACnC,QAAQ,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,GAC/C,OAAO,CAAC,UAAU,CAAC,CA2GrB"}
1
+ {"version":3,"file":"getRequestFromAuthentication.d.ts","sourceRoot":"","sources":["../../src/helpers/getRequestFromAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AA8BnD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,mBAAmB,EACnC,QAAQ,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,GAC/C,OAAO,CAAC,UAAU,CAAC,CAgHrB"}
@@ -2,5 +2,5 @@ import type { ServerState } from '../types';
2
2
  /**
3
3
  * Get the URL from the server state.
4
4
  */
5
- export declare function getUrlFromServerState(state: ServerState): string | undefined;
5
+ export declare function getUrlFromServerState(state: ServerState): string;
6
6
  //# sourceMappingURL=getUrlFromServerState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../src/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAG3C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,sBAgBvD"}
1
+ {"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../src/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAG3C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,UAuBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../src/hooks/useClipboard.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;6BACS,MAAM;CAQvC,CAAA"}
1
+ {"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../src/hooks/useClipboard.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;6BACS,MAAM;CAQvC,CAAA"}
@@ -1,28 +1,7 @@
1
- import { defineComponent as E, ref as C, watch as N, openBlock as m, createElementBlock as v, Fragment as k, createElementVNode as U, unref as a, createTextVNode as p, createCommentVNode as w, renderSlot as S, createVNode as n, withCtx as u, toDisplayString as R, computed as D, isRef as B, normalizeClass as L, createBlock as T } from "vue";
2
- import { o as j, H as F, E as H, U as O, u as I, f as A, _ as x, C as J, m as z, R as Q } from "./index-c142d3d3.js";
3
- import { a as Le } from "./index-c142d3d3.js";
1
+ import { defineComponent as E, ref as C, watch as N, openBlock as c, createElementBlock as v, Fragment as k, createElementVNode as U, unref as a, createTextVNode as u, createCommentVNode as w, renderSlot as S, createVNode as n, withCtx as p, toDisplayString as R, computed as D, isRef as B, normalizeClass as L, createBlock as T } from "vue";
2
+ import { o as j, H as F, E as H, U as O, u as I, f as A, _ as x, C as J, m as z, R as Q } from "./index-CCoBlGeV.js";
3
+ import { a as ve } from "./index-CCoBlGeV.js";
4
4
  import { useMediaQuery as W, useFileDialog as Y } from "@vueuse/core";
5
- import "@headlessui/vue";
6
- import "axios";
7
- import "@vcarl/remark-headings";
8
- import "github-slugger";
9
- import "remark-parse";
10
- import "remark-stringify";
11
- import "unified";
12
- import "js-yaml";
13
- import "httpsnippet-lite";
14
- import "unhead";
15
- import "rehype-external-links";
16
- import "rehype-format";
17
- import "rehype-highlight";
18
- import "rehype-raw";
19
- import "rehype-sanitize";
20
- import "rehype-stringify";
21
- import "remark-gfm";
22
- import "remark-rehype";
23
- import "@floating-ui/vue";
24
- import "prismjs";
25
- import "fuse.js";
26
5
  const q = (l) => {
27
6
  if (typeof l != "string")
28
7
  return !1;
@@ -38,7 +17,7 @@ const q = (l) => {
38
17
  proxyUrl: {}
39
18
  },
40
19
  emits: ["import"],
41
- setup(l, { expose: _, emit: c }) {
20
+ setup(l, { expose: _, emit: m }) {
42
21
  const o = l, t = W("(max-width: 1000px)"), { files: r, open: g, reset: $ } = Y({
43
22
  multiple: !1,
44
23
  accept: ".json,.yaml,.yml"
@@ -49,7 +28,7 @@ const q = (l) => {
49
28
  });
50
29
  const d = C(""), y = () => {
51
30
  f.value = "", A(d.value, o.proxyUrl).then(async (i) => {
52
- c("import", i), e.hide();
31
+ m("import", i), e.hide();
53
32
  }).catch((i) => {
54
33
  console.error("[importUrl]", i), f.value = i;
55
34
  });
@@ -61,34 +40,34 @@ const q = (l) => {
61
40
  h.onload = (V) => {
62
41
  var b;
63
42
  const M = (b = V.target) == null ? void 0 : b.result;
64
- typeof M == "string" && (c("import", M), $());
43
+ typeof M == "string" && (m("import", M), $());
65
44
  }, h.readAsText(s);
66
45
  }
67
- }), (i, s) => (m(), v(k, null, [
46
+ }), (i, s) => (c(), v(k, null, [
68
47
  U("div", G, [
69
48
  U("div", K, [
70
- a(t) ? w("", !0) : (m(), v(k, { key: 0 }, [
71
- p("Swagger ")
49
+ a(t) ? w("", !0) : (c(), v(k, { key: 0 }, [
50
+ u("Swagger ")
72
51
  ], 64)),
73
- p("Editor ")
52
+ u("Editor ")
74
53
  ]),
75
54
  S(i.$slots, "tab-items", {}, void 0, !0),
76
55
  U("div", P, [
77
56
  n(F, {
78
57
  onClick: s[0] || (s[0] = () => a(g)())
79
58
  }, {
80
- default: u(() => [
81
- p(" Upload"),
82
- a(t) ? w("", !0) : (m(), v("span", X, " File"))
59
+ default: p(() => [
60
+ u(" Upload"),
61
+ a(t) ? w("", !0) : (c(), v("span", X, " File"))
83
62
  ]),
84
63
  _: 1
85
64
  }),
86
65
  n(F, {
87
66
  onClick: s[1] || (s[1] = (h) => a(e).show())
88
67
  }, {
89
- default: u(() => [
90
- a(t) ? w("", !0) : (m(), v("span", Z, "Import ")),
91
- p("URL ")
68
+ default: p(() => [
69
+ a(t) ? w("", !0) : (c(), v("span", Z, "Import ")),
70
+ u("URL ")
92
71
  ]),
93
72
  _: 1
94
73
  })
@@ -98,7 +77,7 @@ const q = (l) => {
98
77
  state: a(e),
99
78
  title: "Import Swagger from URL"
100
79
  }, {
101
- default: u(() => [
80
+ default: p(() => [
102
81
  U("div", ee, [
103
82
  n(a(O), {
104
83
  modelValue: d.value,
@@ -109,19 +88,19 @@ const q = (l) => {
109
88
  labelShadowColor: "var(--theme-background-1, var(--default-theme-background-1))",
110
89
  placeholder: "https://scalar.com/swagger.json"
111
90
  }, null, 8, ["modelValue"]),
112
- p(" " + R(f.value) + " ", 1),
91
+ u(" " + R(f.value) + " ", 1),
113
92
  n(a(I), {
114
93
  variant: "outlined",
115
94
  onClick: s[3] || (s[3] = (h) => a(e).hide())
116
95
  }, {
117
- default: u(() => [
118
- p(" Cancel ")
96
+ default: p(() => [
97
+ u(" Cancel ")
119
98
  ]),
120
99
  _: 1
121
100
  }),
122
101
  n(a(I), { onClick: y }, {
123
- default: u(() => [
124
- p("Import")
102
+ default: p(() => [
103
+ u("Import")
125
104
  ]),
126
105
  _: 1
127
106
  })
@@ -141,27 +120,27 @@ const q = (l) => {
141
120
  _({
142
121
  setCodeMirrorContent: (t) => {
143
122
  var r;
144
- (r = c.value) == null || r.setCodeMirrorContent(t);
123
+ (r = m.value) == null || r.setCodeMirrorContent(t);
145
124
  }
146
125
  });
147
- const c = C(null);
126
+ const m = C(null);
148
127
  function o(t) {
149
- return q(t) ? ["json"] : ["yaml"];
128
+ return q(t) ? "json" : "yaml";
150
129
  }
151
- return (t, r) => (m(), v("div", oe, [
130
+ return (t, r) => (c(), v("div", oe, [
152
131
  n(a(J), {
153
132
  ref_key: "codeMirrorRef",
154
- ref: c,
133
+ ref: m,
155
134
  content: t.value,
156
- languages: o(t.value),
135
+ language: o(t.value),
157
136
  lineNumbers: "",
158
137
  onChange: r[0] || (r[0] = (g) => t.$emit("contentUpdate", g))
159
- }, null, 8, ["content", "languages"])
138
+ }, null, 8, ["content", "language"])
160
139
  ]));
161
140
  }
162
141
  }), ne = {}, se = { class: "swagger-editor-notification swagger-editor-notification--error" };
163
142
  function le(l, _) {
164
- return m(), v("div", se, [
143
+ return c(), v("div", se, [
165
144
  S(l.$slots, "default")
166
145
  ]);
167
146
  }
@@ -174,9 +153,9 @@ const ie = /* @__PURE__ */ x(ne, [["render", le]]), de = /* @__PURE__ */ E({
174
153
  error: {}
175
154
  },
176
155
  emits: ["contentUpdate", "import", "changeTheme"],
177
- setup(l, { expose: _, emit: c }) {
156
+ setup(l, { expose: _, emit: m }) {
178
157
  const o = l, t = C(null), r = (e) => {
179
- c("contentUpdate", e);
158
+ m("contentUpdate", e);
180
159
  }, g = D(() => {
181
160
  if (o.error === void 0 || o.error === null || o.error === "")
182
161
  return "";
@@ -195,10 +174,10 @@ const ie = /* @__PURE__ */ x(ne, [["render", le]]), de = /* @__PURE__ */ E({
195
174
  var f, d, y;
196
175
  e === "importUrl" ? (d = (f = t == null ? void 0 : t.value) == null ? void 0 : f.importUrlModal) == null || d.show() : e === "uploadFile" && ((y = t == null ? void 0 : t.value) == null || y.openFileDialog());
197
176
  }
198
- }), (e, f) => (m(), v(k, null, [
177
+ }), (e, f) => (c(), v(k, null, [
199
178
  n(a(z), { id: e.theme }, null, 8, ["id"]),
200
179
  n(Q, null, {
201
- default: u(({ styles: d }) => [
180
+ default: p(({ styles: d }) => [
202
181
  U("div", {
203
182
  class: L(["swagger-editor", d])
204
183
  }, [
@@ -208,14 +187,14 @@ const ie = /* @__PURE__ */ x(ne, [["render", le]]), de = /* @__PURE__ */ E({
208
187
  proxyUrl: e.proxyUrl,
209
188
  onImport: r
210
189
  }, {
211
- "tab-items": u(() => [
190
+ "tab-items": p(() => [
212
191
  S(e.$slots, "tab-items", {}, void 0, !0)
213
192
  ]),
214
193
  _: 3
215
194
  }, 8, ["proxyUrl"]),
216
- g.value ? (m(), T(ie, { key: 0 }, {
217
- default: u(() => [
218
- p(R(g.value), 1)
195
+ g.value ? (c(), T(ie, { key: 0 }, {
196
+ default: p(() => [
197
+ u(R(g.value), 1)
219
198
  ]),
220
199
  _: 1
221
200
  })) : w("", !0),
@@ -234,13 +213,13 @@ const ie = /* @__PURE__ */ x(ne, [["render", le]]), de = /* @__PURE__ */ E({
234
213
  })
235
214
  ], 64));
236
215
  }
237
- }), Ve = /* @__PURE__ */ x(de, [["__scopeId", "data-v-68ed8e3f"]]);
216
+ }), me = /* @__PURE__ */ x(de, [["__scopeId", "data-v-68ed8e3f"]]);
238
217
  export {
239
- Ve as CodeEditor,
218
+ me as CodeEditor,
240
219
  F as HeaderTabButton,
241
220
  Q as ResetStyles,
242
- Ve as SwaggerEditor,
221
+ me as SwaggerEditor,
243
222
  A as fetchSpecFromUrl,
244
223
  q as isJsonString,
245
- Le as useDarkModeState
224
+ ve as useDarkModeState
246
225
  };