@scalar/api-reference 1.32.8 → 1.32.9

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 (77) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/blocks/constants.js +6 -0
  3. package/dist/blocks/helpers/getPointer.js +12 -0
  4. package/dist/blocks/hooks/useBlockProps.d.ts +31 -0
  5. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
  6. package/dist/blocks/hooks/useBlockProps.js +24 -0
  7. package/dist/browser/standalone.js +14550 -14647
  8. package/dist/browser/webpack-stats.json +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  10. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  11. package/dist/components/ApiReferenceLayout.vue2.js +176 -164
  12. package/dist/components/Content/Content.vue.js +2 -2
  13. package/dist/components/Content/Content.vue2.js +5 -5
  14. package/dist/features/Operation/Operation.vue.d.ts +6 -6
  15. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  16. package/dist/features/Operation/Operation.vue.js +49 -50
  17. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +6 -8
  18. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  19. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  20. package/dist/features/Operation/components/callbacks/Callback.vue2.js +28 -21
  21. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +3 -5
  22. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  23. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -33
  24. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +12 -11
  25. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  26. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  27. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +162 -164
  28. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +13 -12
  29. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  30. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  31. package/dist/features/Operation/layouts/ModernLayout.vue2.js +117 -111
  32. package/dist/features/api-client-modal/useApiClient.d.ts +5795 -5795
  33. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  34. package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
  35. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
  36. package/dist/features/example-request/ExamplePicker.vue.js +7 -0
  37. package/dist/features/example-request/ExamplePicker.vue2.js +57 -0
  38. package/dist/features/example-request/ExampleRequest.vue.d.ts +85 -0
  39. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
  40. package/dist/features/example-request/ExampleRequest.vue.js +7 -0
  41. package/dist/features/example-request/ExampleRequest.vue2.js +348 -0
  42. package/dist/features/example-request/TextSelect.vue.d.ts +34 -0
  43. package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
  44. package/dist/features/example-request/TextSelect.vue.js +48 -0
  45. package/dist/features/example-request/TextSelect.vue3.js +5 -0
  46. package/dist/features/example-request/index.d.ts +3 -0
  47. package/dist/features/example-request/index.d.ts.map +1 -0
  48. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  49. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  50. package/dist/features/example-responses/ExampleResponses.vue2.js +50 -51
  51. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +2 -3
  52. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  53. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  54. package/dist/features/test-request-button/TestRequestButton.vue2.js +19 -21
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +15 -13
  58. package/dist/style.css +1 -1
  59. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +1 -3
  60. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  61. package/dist/v2/ApiReferenceWorkspace.vue.js +86 -113
  62. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +3 -20
  64. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
  65. package/dist/v2/events/index.d.ts +1 -1
  66. package/dist/v2/events/listeners.d.ts +1 -1
  67. package/package.json +10 -10
  68. package/dist/helpers/convert-security-scheme.js +0 -23
  69. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  70. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -64
  71. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  72. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -212
  73. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -35
  74. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -29
  75. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  76. package/dist/v2/events/definitions.js +0 -7
  77. package/dist/v2/hooks/useStore.js +0 -14
@@ -11,9 +11,7 @@ declare function __VLS_template(): {
11
11
  footer?(_: {}): any;
12
12
  "sidebar-start"?(_: {}): any;
13
13
  };
14
- refs: {
15
- root: HTMLDivElement;
16
- };
14
+ refs: {};
17
15
  rootEl: any;
18
16
  };
19
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAuXA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAGjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AA2BpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,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@ -1,47 +1,43 @@
1
- import { defineComponent as b, ref as p, toRef as A, provide as B, useTemplateRef as P, onServerPrefetch as V, onMounted as F, watch as n, computed as H, createElementBlock as U, openBlock as y, createBlock as W, createCommentVNode as Y, createVNode as D, unref as l, resolveDynamicComponent as O, withCtx as i, createTextVNode as j, toDisplayString as w, renderSlot as v, isRef as J } from "vue";
2
- import { safeLocalStorage as S, REFERENCE_LS_KEYS as g } from "@scalar/helpers/object/local-storage";
3
- import { parseJsonOrYaml as q, redirectToProxy as z } from "@scalar/oas-utils/helpers";
4
- import { useColorMode as G } from "@scalar/use-hooks/useColorMode";
5
- import { useSeoMeta as Q } from "@unhead/vue";
6
- import { useFavicon as X } from "@vueuse/core";
7
- import Z from "../components/ApiReferenceLayout.vue.js";
8
- import { NAV_STATE_SYMBOL as ee } from "../hooks/useNavState.js";
9
- import { useHttpClientStore as te } from "../stores/useHttpClientStore.js";
10
- import { isClient as k } from "./blocks/scalar-request-example-block/helpers/find-client.js";
11
- import { useStore as oe } from "./hooks/useStore.js";
12
- import { useMultipleDocuments as ae } from "../features/multiple-documents/useMultipleDocuments.js";
13
- import { onCustomEvent as C } from "./events/listeners.js";
14
- import re from "../features/multiple-documents/DocumentSelector.vue.js";
15
- const xe = /* @__PURE__ */ b({
1
+ import { defineComponent as V, ref as f, toRef as b, provide as _, shallowRef as w, onServerPrefetch as $, onMounted as C, watch as d, computed as A, createElementBlock as B, openBlock as D, Fragment as F, createBlock as P, createCommentVNode as U, createVNode as S, unref as r, resolveDynamicComponent as W, withCtx as n, createTextVNode as Y, toDisplayString as O, renderSlot as p, isRef as j } from "vue";
2
+ import { safeLocalStorage as x, REFERENCE_LS_KEYS as h } from "@scalar/helpers/object/local-storage";
3
+ import { parseJsonOrYaml as J, redirectToProxy as K } from "@scalar/oas-utils/helpers";
4
+ import { useColorMode as q } from "@scalar/use-hooks/useColorMode";
5
+ import { useSeoMeta as z } from "@unhead/vue";
6
+ import { useFavicon as G } from "@vueuse/core";
7
+ import H from "../components/ApiReferenceLayout.vue.js";
8
+ import { NAV_STATE_SYMBOL as Q } from "../hooks/useNavState.js";
9
+ import { isClient as X } from "./blocks/scalar-request-example-block/helpers/find-client.js";
10
+ import { useMultipleDocuments as Z } from "../features/multiple-documents/useMultipleDocuments.js";
11
+ import { onCustomEvent as v } from "./events/listeners.js";
12
+ import ee from "../features/multiple-documents/DocumentSelector.vue.js";
13
+ const fe = /* @__PURE__ */ V({
16
14
  __name: "ApiReferenceWorkspace",
17
15
  props: {
18
16
  configuration: {},
19
17
  getWorkspaceStore: { type: Function }
20
18
  },
21
- setup(h) {
22
- const E = h, {
23
- availableDocuments: u,
19
+ setup(M) {
20
+ const k = M, {
21
+ availableDocuments: l,
24
22
  selectedConfiguration: a,
25
- selectedDocumentIndex: d,
26
- isIntersectionEnabled: M,
27
- hash: T,
28
- hashPrefix: I
29
- } = ae({
30
- configuration: A(E, "configuration"),
31
- isIntersectionEnabled: p(!1),
32
- hash: p(""),
33
- hashPrefix: p("")
34
- }), { httpClient: $, setExcludedClients: L, setDefaultHttpClient: x } = te(), K = (e, t) => fetch(
35
- z(a.value.proxyUrl, e.toString()),
23
+ selectedDocumentIndex: s,
24
+ isIntersectionEnabled: g,
25
+ hash: y,
26
+ hashPrefix: T
27
+ } = Z({
28
+ configuration: b(k, "configuration"),
29
+ isIntersectionEnabled: f(!1),
30
+ hash: f(""),
31
+ hashPrefix: f("")
32
+ }), L = (e, t) => fetch(
33
+ K(a.value.proxyUrl, e.toString()),
36
34
  t
37
35
  );
38
- B(ee, { isIntersectionEnabled: M, hash: T, hashPrefix: I });
39
- const c = P("root"), o = E.getWorkspaceStore();
40
- oe(o);
41
- const f = u, m = (e) => {
36
+ _(Q, { isIntersectionEnabled: g, hash: y, hashPrefix: T });
37
+ const i = w(null), o = k.getWorkspaceStore(), c = l, u = (e) => {
42
38
  if (o.workspace.documents[e.slug ?? "default"] === void 0) {
43
39
  if (e.content) {
44
- const t = typeof e.content == "string" ? q(e.content) : e.content;
40
+ const t = typeof e.content == "string" ? J(e.content) : e.content;
45
41
  return o.addDocumentSync({
46
42
  name: e.slug ?? "default",
47
43
  document: typeof t == "function" ? t() : t
@@ -51,120 +47,97 @@ const xe = /* @__PURE__ */ b({
51
47
  return o.addDocument({
52
48
  name: e.slug ?? "default",
53
49
  url: e.url,
54
- fetch: K
50
+ fetch: L
55
51
  });
56
52
  }
57
53
  };
58
- f.value.forEach((e) => {
59
- e.content && m(e);
60
- }), V(() => {
61
- f.value.forEach((e) => {
62
- e.url && m(e);
54
+ c.value.forEach((e) => {
55
+ e.content && u(e);
56
+ }), $(() => {
57
+ c.value.forEach((e) => {
58
+ e.url && u(e);
63
59
  });
64
- }), F(() => {
65
- f.value.forEach((t) => {
66
- t.url && m(t);
60
+ }), C(() => {
61
+ c.value.forEach((e) => {
62
+ e.url && u(e);
67
63
  });
68
- const e = S().getItem(
69
- g.SELECTED_CLIENT
70
- );
71
- k(e) && !o.workspace["x-scalar-default-client"] && o.update("x-scalar-default-client", e);
72
- }), C(c, "scalar-update-dark-mode", (e) => {
64
+ }), v(i, "scalar-update-dark-mode", (e) => {
73
65
  o.update("x-scalar-dark-mode", e.detail.value);
74
- }), C(c, "scalar-update-active-document", (e) => {
66
+ }), v(i, "scalar-update-active-document", (e) => {
75
67
  o.update("x-scalar-active-document", e.detail.value);
76
- }), C(c, "scalar-update-selected-client", (e) => {
77
- o.update("x-scalar-default-client", e.detail), S().setItem(g.SELECTED_CLIENT, e.detail);
78
- const [t, r] = e.detail.split("/");
79
- x({
80
- targetKey: t,
81
- clientKey: r
82
- });
83
- }), n(
84
- () => a.value.hiddenClients,
85
- (e) => e && L(e)
86
- ), n($, (e) => {
87
- var r;
88
- const t = `${e.targetKey}/${e.clientKey}`;
89
- e && ((r = o.workspace.activeDocument) == null ? void 0 : r["x-scalar-default-client"]) !== t && k(t) && o.update("x-scalar-default-client", t);
90
- }), n(
91
- () => a.value.defaultHttpClient,
92
- (e) => {
93
- if (e) {
94
- const { targetKey: t, clientKey: r } = e, s = `${t}/${r}`;
95
- k(s) && o.update("x-scalar-default-client", s), x(e);
96
- }
97
- },
98
- { immediate: !0 }
99
- );
100
- const { toggleColorMode: N, isDarkMode: R } = G({
68
+ }), v(i, "scalar-update-selected-client", (e) => {
69
+ o.update("x-scalar-default-client", e.detail), x().setItem(h.SELECTED_CLIENT, e.detail);
70
+ }), C(() => {
71
+ const e = x().getItem(
72
+ h.SELECTED_CLIENT
73
+ );
74
+ X(e) && o.update("x-scalar-default-client", e);
75
+ });
76
+ const { toggleColorMode: I, isDarkMode: N } = q({
101
77
  initialColorMode: a.value.darkMode ? "dark" : void 0,
102
78
  overrideColorMode: a.value.forceDarkModeState
103
79
  });
104
- n(
80
+ d(
105
81
  () => a.value.darkMode,
106
82
  (e) => o.update("x-scalar-dark-mode", !!e)
107
- ), n(
108
- () => R.value,
83
+ ), d(
84
+ () => N.value,
109
85
  (e) => o.update("x-scalar-dark-mode", e),
110
86
  { immediate: !0 }
111
- ), n(
112
- () => d.value,
87
+ ), d(
88
+ () => s.value,
113
89
  (e) => {
114
90
  var t;
115
91
  return o.update(
116
92
  "x-scalar-active-document",
117
- (t = u.value[e]) == null ? void 0 : t.slug
93
+ (t = l.value[e]) == null ? void 0 : t.slug
118
94
  );
119
95
  },
120
96
  { immediate: !0 }
121
- ), n(
122
- () => u.value,
97
+ ), d(
98
+ () => l.value,
123
99
  (e) => {
124
- e.forEach(m);
100
+ e.forEach(u);
125
101
  }
126
- ), a.value.metaData && Q(a.value.metaData);
127
- const _ = H(() => a.value.favicon);
128
- return X(_), (e, t) => {
129
- var r;
130
- return y(), U("div", {
131
- ref_key: "root",
132
- ref: c
133
- }, [
134
- (r = l(a)) != null && r.customCss ? (y(), W(O("style"), { key: 0 }, {
135
- default: i(() => [
136
- j(w(l(a).customCss), 1)
102
+ ), a.value.metaData && z(a.value.metaData);
103
+ const R = A(() => a.value.favicon);
104
+ return G(R), (e, t) => {
105
+ var E;
106
+ return D(), B(F, null, [
107
+ (E = r(a)) != null && E.customCss ? (D(), P(W("style"), { key: 0 }, {
108
+ default: n(() => [
109
+ Y(O(r(a).customCss), 1)
137
110
  ]),
138
111
  _: 1
139
- })) : Y("", !0),
140
- D(Z, {
141
- configuration: l(a),
142
- isDark: !!l(o).workspace["x-scalar-dark-mode"],
143
- onToggleDarkMode: t[1] || (t[1] = () => l(N)()),
144
- onUpdateContent: t[2] || (t[2] = (s) => e.$emit("updateContent", s))
112
+ })) : U("", !0),
113
+ S(H, {
114
+ configuration: r(a),
115
+ isDark: !!r(o).workspace["x-scalar-dark-mode"],
116
+ onToggleDarkMode: t[1] || (t[1] = () => r(I)()),
117
+ onUpdateContent: t[2] || (t[2] = (m) => e.$emit("updateContent", m))
145
118
  }, {
146
- footer: i(() => [
147
- v(e.$slots, "footer")
119
+ footer: n(() => [
120
+ p(e.$slots, "footer")
148
121
  ]),
149
- "content-end": i(() => [
150
- v(e.$slots, "footer")
122
+ "content-end": n(() => [
123
+ p(e.$slots, "footer")
151
124
  ]),
152
- "document-selector": i(() => [
153
- D(l(re), {
154
- modelValue: l(d),
155
- "onUpdate:modelValue": t[0] || (t[0] = (s) => J(d) ? d.value = s : null),
156
- options: l(u)
125
+ "document-selector": n(() => [
126
+ S(r(ee), {
127
+ modelValue: r(s),
128
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => j(s) ? s.value = m : null),
129
+ options: r(l)
157
130
  }, null, 8, ["modelValue", "options"])
158
131
  ]),
159
- "sidebar-start": i(() => [
160
- v(e.$slots, "sidebar-start")
132
+ "sidebar-start": n(() => [
133
+ p(e.$slots, "sidebar-start")
161
134
  ]),
162
135
  _: 3
163
136
  }, 8, ["configuration", "isDark"])
164
- ], 512);
137
+ ], 64);
165
138
  };
166
139
  }
167
140
  });
168
141
  export {
169
- xe as default
142
+ fe as default
170
143
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.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,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAqYA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAkBxD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAA;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAoBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AApBvB,wBAkaC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,22 +1,5 @@
1
- import { AVAILABLE_CLIENTS as c } from "@scalar/snippetz";
2
- const d = "shell/curl", u = (o) => c.includes(o), e = (o, r) => {
3
- var f;
4
- const n = (f = o[0]) == null ? void 0 : f.options[0];
5
- if (r)
6
- for (const i of o) {
7
- const t = i.options.find((s) => s.id === r);
8
- if (t)
9
- return t;
10
- }
11
- if (!(n != null && n.id.startsWith("custom")))
12
- for (const i of o) {
13
- const t = i.options.find((s) => s.id === d);
14
- if (t)
15
- return t;
16
- }
17
- return n;
18
- };
1
+ import { AVAILABLE_CLIENTS as o } from "@scalar/snippetz";
2
+ const e = (i) => o.includes(i);
19
3
  export {
20
- e as findClient,
21
- u as isClient
4
+ e as isClient
22
5
  };
@@ -1,3 +1,3 @@
1
- export { default as RequestExample } from './components/RequestExample.vue.js';
2
- export { default as ExamplePicker } from './components/ExamplePicker.vue.js';
1
+ export { default as RequestExample } from './components/RequestExample.vue';
2
+ export { default as ExamplePicker } from './components/ExamplePicker.vue';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { type ApiReferenceEvents, type ApiReferenceEvent, emitCustomEvent } from './definitions.js';
1
+ export { type ApiReferenceEvents, type ApiReferenceEvent, emitCustomEvent } from './definitions';
2
2
  export { onCustomEvent } from './listeners.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { ApiReferenceEvent, ApiReferenceEvents } from './definitions.js';
1
+ import type { ApiReferenceEvent, ApiReferenceEvents } from './definitions';
2
2
  import { type Ref } from 'vue';
3
3
  /**
4
4
  * Vue wrapper for attaching and removing event listeners
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.32.8",
23
+ "version": "1.32.9",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -54,21 +54,21 @@
54
54
  "nanoid": "5.1.5",
55
55
  "vue": "^3.5.17",
56
56
  "zod": "3.24.1",
57
- "@scalar/api-client": "2.5.18",
58
57
  "@scalar/code-highlight": "0.1.8",
58
+ "@scalar/api-client": "2.5.18",
59
+ "@scalar/helpers": "0.0.6",
59
60
  "@scalar/components": "0.14.19",
60
61
  "@scalar/icons": "0.4.6",
62
+ "@scalar/openapi-parser": "0.18.1",
61
63
  "@scalar/object-utils": "1.2.2",
62
- "@scalar/oas-utils": "0.4.14",
63
- "@scalar/helpers": "0.0.6",
64
64
  "@scalar/openapi-types": "0.3.6",
65
- "@scalar/snippetz": "0.4.2",
65
+ "@scalar/types": "0.2.9",
66
+ "@scalar/oas-utils": "0.4.14",
66
67
  "@scalar/themes": "0.13.10",
67
- "@scalar/openapi-parser": "0.18.1",
68
68
  "@scalar/use-hooks": "0.2.4",
69
+ "@scalar/snippetz": "0.4.2",
69
70
  "@scalar/use-toasts": "0.8.0",
70
- "@scalar/workspace-store": "0.10.1",
71
- "@scalar/types": "0.2.9"
71
+ "@scalar/workspace-store": "0.10.1"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@tailwindcss/vite": "^4.1.7",
@@ -86,8 +86,8 @@
86
86
  "vite-plugin-css-injected-by-js": "^3.4.0",
87
87
  "vitest": "^1.6.1",
88
88
  "@scalar/build-tooling": "0.2.4",
89
- "@scalar/galaxy": "0.5.4",
90
- "@scalar/react-renderer": "0.2.1"
89
+ "@scalar/react-renderer": "0.2.1",
90
+ "@scalar/galaxy": "0.5.4"
91
91
  },
92
92
  "scripts": {
93
93
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -1,23 +0,0 @@
1
- const e = (r) => r.type === "apiKey" ? {
2
- ...r,
3
- "x-scalar-secret-token": r.value
4
- } : r.type === "http" ? {
5
- ...r,
6
- "x-scalar-secret-token": r.token,
7
- "x-scalar-secret-username": r.username,
8
- "x-scalar-secret-password": r.password
9
- } : r.type === "oauth2" ? {
10
- ...r,
11
- flows: Object.fromEntries(
12
- Object.entries(r.flows).map(([a, t]) => [
13
- a,
14
- t && {
15
- ...t,
16
- "x-scalar-secret-token": t.token
17
- }
18
- ])
19
- )
20
- } : r;
21
- export {
22
- e as convertSecurityScheme
23
- };
@@ -1,4 +0,0 @@
1
- import f from "./ExamplePicker.vue2.js";
2
- export {
3
- f as default
4
- };
@@ -1,64 +0,0 @@
1
- import { defineComponent as f, mergeModels as b, useModel as v, computed as c, createBlock as V, openBlock as h, unref as r, withCtx as u, createVNode as d, createElementVNode as g, toDisplayString as S } from "vue";
2
- import { ScalarCombobox as _, ScalarButton as E } from "@scalar/components";
3
- import { ScalarIconCaretDown as C } from "@scalar/icons";
4
- const k = /* @__PURE__ */ f({
5
- __name: "ExamplePicker",
6
- props: /* @__PURE__ */ b({
7
- examples: {}
8
- }, {
9
- modelValue: { required: !0 },
10
- modelModifiers: {}
11
- }),
12
- emits: ["update:modelValue"],
13
- setup(m, { expose: i }) {
14
- const n = m, l = v(m, "modelValue"), a = c(() => Object.keys(n.examples).map((e) => ({
15
- id: e,
16
- label: s(e)
17
- }))), o = c(
18
- () => a.value.find(
19
- (e) => e.id === l.value
20
- ) ?? a.value[0]
21
- ), s = (e) => {
22
- if (!e)
23
- return "Select an example";
24
- const t = n.examples[e];
25
- return (t == null ? void 0 : t.summary) ?? e;
26
- }, x = (e) => {
27
- l.value = e.id;
28
- };
29
- return i({
30
- getLabel: s,
31
- selectedExample: o,
32
- selectedExampleKey: l
33
- }), (e, t) => (h(), V(r(_), {
34
- class: "max-h-80",
35
- modelValue: o.value,
36
- options: a.value,
37
- teleport: "",
38
- placement: "bottom-start",
39
- "onUpdate:modelValue": x
40
- }, {
41
- default: u(() => [
42
- d(r(E), {
43
- "data-testid": "example-picker",
44
- class: "text-c-1 hover:bg-b-2 flex h-full w-fit gap-1.5 px-1.5 py-0.75 font-normal",
45
- fullWidth: "",
46
- variant: "ghost"
47
- }, {
48
- default: u(() => {
49
- var p;
50
- return [
51
- g("span", null, S(((p = o.value) == null ? void 0 : p.label) || "Select an example"), 1),
52
- d(r(C))
53
- ];
54
- }),
55
- _: 1
56
- })
57
- ]),
58
- _: 1
59
- }, 8, ["modelValue", "options"]));
60
- }
61
- });
62
- export {
63
- k as default
64
- };
@@ -1,7 +0,0 @@
1
- import o from "./RequestExample.vue2.js";
2
- /* empty css */
3
- import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6d2391e7"]]);
5
- export {
6
- r as default
7
- };