@scalar/api-reference 1.48.1 → 1.48.2

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.
@@ -0,0 +1,21 @@
1
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
2
+ type __VLS_Props = {
3
+ config?: {
4
+ name?: string;
5
+ url?: string;
6
+ };
7
+ url?: string;
8
+ workspace: WorkspaceStore;
9
+ };
10
+ type __VLS_ModelProps = {
11
+ 'url'?: string;
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "update:url": (value: string | undefined) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ "onUpdate:url"?: ((value: string | undefined) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ //# sourceMappingURL=OpenMCPButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenMCPButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/OpenMCPButton.vue"],"names":[],"mappings":"AA0SA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,cAAc,CAAA;CAC1B,CAAC;AAkEF,KAAK,gBAAgB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAiOxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./OpenMCPButton.vue2.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const OpenMCPButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cfbd7ea4"]]);
5
+ export {
6
+ OpenMCPButton as default
7
+ };
@@ -0,0 +1,189 @@
1
+ import { defineComponent, mergeModels, useModel, createElementBlock, openBlock, createElementVNode, unref, createTextVNode, createVNode, nextTick } from "vue";
2
+ import { useLoadingState } from "@scalar/components";
3
+ import { ScalarIconArrowUpRight } from "@scalar/icons";
4
+ import { useClipboard } from "@scalar/use-hooks/useClipboard";
5
+ import { useToasts } from "@scalar/use-toasts";
6
+ import { DASHBOARD_REGISTER_URL } from "../../consts/urls.js";
7
+ import { uploadTempDocument } from "../../helpers/upload-temp-document.js";
8
+ const _hoisted_1 = { class: "scalar-mcp-layer" };
9
+ const _hoisted_2 = ["href", "target"];
10
+ const _hoisted_3 = ["href", "target"];
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "OpenMCPButton",
13
+ props: /* @__PURE__ */ mergeModels({
14
+ config: {},
15
+ url: {},
16
+ workspace: {}
17
+ }, {
18
+ "url": {},
19
+ "urlModifiers": {}
20
+ }),
21
+ emits: ["update:url"],
22
+ setup(__props) {
23
+ const props = __props;
24
+ const { copyToClipboard } = useClipboard();
25
+ const { toast } = useToasts();
26
+ const loader = useLoadingState();
27
+ const hasConfig = props.config?.name || props.config?.url;
28
+ const encoded = btoa(JSON.stringify(props.config ?? {}));
29
+ const name = encodeURIComponent(props.config?.name ?? "");
30
+ const cursorLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encoded}`;
31
+ const vscodeLink = `vscode:mcp/install?${encodeURIComponent(JSON.stringify(props.config ?? {}))}`;
32
+ const tempDocUrl = useModel(__props, "url");
33
+ async function generateRegisterLink() {
34
+ if (loader.isLoading || !props.workspace) {
35
+ return;
36
+ }
37
+ if (tempDocUrl.value) {
38
+ openRegisterLink(tempDocUrl.value);
39
+ return;
40
+ }
41
+ loader.start();
42
+ const document = props.workspace.exportActiveDocument("json");
43
+ if (!document) {
44
+ toast("Unable to export active document", "error");
45
+ await loader.invalidate();
46
+ return;
47
+ }
48
+ try {
49
+ tempDocUrl.value = await uploadTempDocument(document);
50
+ await loader.validate();
51
+ openRegisterLink(tempDocUrl.value);
52
+ await nextTick();
53
+ await loader.clear();
54
+ } catch (error) {
55
+ const message = error instanceof Error ? error.message : "An unknown error occurred";
56
+ toast(message, "error");
57
+ await loader.invalidate();
58
+ }
59
+ }
60
+ function openRegisterLink(docUrl) {
61
+ const url = new URL(DASHBOARD_REGISTER_URL);
62
+ url.searchParams.set("url", docUrl);
63
+ window.open(url.toString(), "_blank");
64
+ }
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createElementBlock("div", _hoisted_1, [
67
+ createElementVNode("a", {
68
+ class: "scalar-mcp-layer-link",
69
+ href: unref(hasConfig) ? vscodeLink : void 0,
70
+ target: unref(hasConfig) ? "_blank" : void 0,
71
+ onClick: _cache[0] || (_cache[0] = (e) => {
72
+ if (!unref(hasConfig)) {
73
+ e.preventDefault();
74
+ generateRegisterLink();
75
+ }
76
+ })
77
+ }, [
78
+ _cache[3] || (_cache[3] = createElementVNode("svg", {
79
+ class: "mcp-logo",
80
+ fill: "currentColor",
81
+ height: "800",
82
+ viewBox: "0 0 32 32",
83
+ width: "800",
84
+ xmlns: "http://www.w3.org/2000/svg"
85
+ }, [
86
+ createElementVNode("path", { d: "M30.865 3.448 24.282.281a1.99 1.99 0 0 0-2.276.385L9.397 12.171 3.902 8.004a1.33 1.33 0 0 0-1.703.073L.439 9.681a1.33 1.33 0 0 0-.005 1.969L5.2 15.999.434 20.348a1.33 1.33 0 0 0 .005 1.969l1.76 1.604a1.33 1.33 0 0 0 1.703.073l5.495-4.172 12.615 11.51a1.98 1.98 0 0 0 2.271.385l6.589-3.172a1.99 1.99 0 0 0 1.13-1.802V5.248c0-.766-.443-1.469-1.135-1.802zm-6.86 19.818L14.432 16l9.573-7.266z" })
87
+ ], -1)),
88
+ _cache[4] || (_cache[4] = createTextVNode(" VS Code ", -1)),
89
+ createVNode(unref(ScalarIconArrowUpRight), { class: "mcp-nav ml-auto size-4" })
90
+ ], 8, _hoisted_2),
91
+ createElementVNode("a", {
92
+ class: "scalar-mcp-layer-link",
93
+ href: unref(hasConfig) ? cursorLink : void 0,
94
+ target: unref(hasConfig) ? "_blank" : void 0,
95
+ onClick: _cache[1] || (_cache[1] = (e) => {
96
+ if (!unref(hasConfig)) {
97
+ e.preventDefault();
98
+ generateRegisterLink();
99
+ }
100
+ })
101
+ }, [
102
+ _cache[5] || (_cache[5] = createElementVNode("svg", {
103
+ class: "mcp-logo",
104
+ viewBox: "0 0 466.73 532.09",
105
+ xmlns: "http://www.w3.org/2000/svg"
106
+ }, [
107
+ createElementVNode("path", {
108
+ d: "M457.43 125.94 244.42 2.96a22.13 22.13 0 0 0-22.12 0L9.3 125.94C3.55 129.26 0 135.4 0 142.05v247.99c0 6.65 3.55 12.79 9.3 16.11l213.01 122.98a22.13 22.13 0 0 0 22.12 0l213.01-122.98c5.75-3.32 9.3-9.46 9.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11zm-13.38 26.05L238.42 508.15c-1.39 2.4-5.06 1.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87 145.67c-2.4-1.39-1.42-5.06 1.36-5.06h411.26c5.84 0 9.49 6.33 6.57 11.39h-.01Z",
109
+ style: { "fill": "currentColor" }
110
+ })
111
+ ], -1)),
112
+ _cache[6] || (_cache[6] = createTextVNode(" Cursor ", -1)),
113
+ createVNode(unref(ScalarIconArrowUpRight), { class: "mcp-nav ml-auto size-4" })
114
+ ], 8, _hoisted_3),
115
+ !unref(hasConfig) ? (openBlock(), createElementBlock("div", {
116
+ key: 0,
117
+ class: "scalar-mcp-layer-link",
118
+ onClick: generateRegisterLink
119
+ }, [
120
+ _cache[7] || (_cache[7] = createElementVNode("svg", {
121
+ class: "mcp-logo",
122
+ fill: "none",
123
+ height: "173",
124
+ viewBox: "0 0 156 173",
125
+ width: "156",
126
+ xmlns: "http://www.w3.org/2000/svg"
127
+ }, [
128
+ createElementVNode("path", {
129
+ d: "m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236",
130
+ stroke: "currentColor",
131
+ "stroke-linecap": "round",
132
+ "stroke-width": "12"
133
+ }),
134
+ createElementVNode("path", {
135
+ d: "m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607",
136
+ stroke: "currentColor",
137
+ "stroke-linecap": "round",
138
+ "stroke-width": "12"
139
+ }),
140
+ createElementVNode("path", {
141
+ d: "M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205",
142
+ stroke: "currentColor",
143
+ "stroke-linecap": "round",
144
+ "stroke-width": "12"
145
+ })
146
+ ], -1)),
147
+ _cache[8] || (_cache[8] = createTextVNode(" Generate MCP ", -1)),
148
+ createVNode(unref(ScalarIconArrowUpRight), { class: "mcp-nav ml-auto size-4" })
149
+ ])) : (openBlock(), createElementBlock("div", {
150
+ key: 1,
151
+ class: "scalar-mcp-layer-link",
152
+ onClick: _cache[2] || (_cache[2] = ($event) => unref(copyToClipboard)(__props.config?.url ?? ""))
153
+ }, [..._cache[9] || (_cache[9] = [
154
+ createTextVNode(" Connect MCP ", -1),
155
+ createElementVNode("svg", {
156
+ class: "mcp-logo ml-auto",
157
+ fill: "none",
158
+ height: "173",
159
+ viewBox: "0 0 156 173",
160
+ width: "156",
161
+ xmlns: "http://www.w3.org/2000/svg"
162
+ }, [
163
+ createElementVNode("path", {
164
+ d: "m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236",
165
+ stroke: "currentColor",
166
+ "stroke-linecap": "round",
167
+ "stroke-width": "12"
168
+ }),
169
+ createElementVNode("path", {
170
+ d: "m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607",
171
+ stroke: "currentColor",
172
+ "stroke-linecap": "round",
173
+ "stroke-width": "12"
174
+ }),
175
+ createElementVNode("path", {
176
+ d: "M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205",
177
+ stroke: "currentColor",
178
+ "stroke-linecap": "round",
179
+ "stroke-width": "12"
180
+ })
181
+ ], -1)
182
+ ])]))
183
+ ]);
184
+ };
185
+ }
186
+ });
187
+ export {
188
+ _sfc_main as default
189
+ };
@@ -1,3 +1,4 @@
1
1
  export { default as AgentScalarButton } from './AgentScalarButton.vue.js';
2
2
  export { default as AgentScalarDrawer } from './AgentScalarDrawer.vue.js';
3
+ export { default as OpenMCPButton } from './OpenMCPButton.vue.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAywCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAOpC,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAkBnD,OAAO,8BAA8B,CAAA;AAkCrC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AA01CF,QAAA,MAAM,UAAU;;;;oPAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAmyCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAOpC,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAsBnD,OAAO,8BAA8B,CAAA;AAkCrC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AA83CF,QAAA,MAAM,UAAU;;;;oPAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -4,7 +4,7 @@ import _sfc_main from "./ApiReference.vue2.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
7
- const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-69e552a7"]]);
7
+ const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e8fb8338"]]);
8
8
  export {
9
9
  ApiReference as default
10
10
  };
@@ -38,6 +38,7 @@ import { persistencePlugin } from "../plugins/persistance-plugin.js";
38
38
  import { PLUGIN_MANAGER_SYMBOL } from "../plugins/hooks/usePluginManager.js";
39
39
  import { createPluginManager } from "../plugins/plugin-manager.js";
40
40
  import AgentScalarDrawer from "./AgentScalar/AgentScalarDrawer.vue.js";
41
+ import OpenMCPButton from "./AgentScalar/OpenMCPButton.vue.js";
41
42
  import _sfc_main$4 from "./AgentScalar/AgentScalarButton.vue.js";
42
43
  import _sfc_main$6 from "../features/developer-tools/DeveloperTools.vue.js";
43
44
  const _hoisted_1 = {
@@ -537,6 +538,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
537
538
  });
538
539
  const bodyScrollLocked = useScrollLock(document.body);
539
540
  watch(agent.showAgent, () => bodyScrollLocked.value = agent.showAgent.value);
541
+ const showMCPButton = computed(() => {
542
+ if (mergedConfig.value.mcp?.disabled) {
543
+ return false;
544
+ }
545
+ if (typeof window !== "undefined" && isLocalUrl(window.location.href)) {
546
+ return true;
547
+ }
548
+ if (mergedConfig.value.mcp) {
549
+ return true;
550
+ }
551
+ return false;
552
+ });
540
553
  return (_ctx, _cache) => {
541
554
  return openBlock(), createElementBlock("div", null, [
542
555
  (openBlock(), createBlock(resolveDynamicComponent("style"), null, {
@@ -627,13 +640,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
627
640
  }, null, 8, ["modelValue"])) : (openBlock(), createElementBlock("span", _hoisted_2))
628
641
  ]),
629
642
  default: withCtx(() => [
630
- !mergedConfig.value.hideClientButton ? (openBlock(), createBlock(unref(OpenApiClientButton), {
643
+ !mergedConfig.value.hideClientButton && !showMCPButton.value ? (openBlock(), createBlock(unref(OpenApiClientButton), {
631
644
  key: 0,
632
645
  buttonSource: "sidebar",
633
646
  integration: mergedConfig.value._integration,
634
647
  isDevelopment: unref(isDevelopment),
635
648
  url: documentUrl.value
636
- }, null, 8, ["integration", "isDevelopment", "url"])) : createCommentVNode("", true)
649
+ }, null, 8, ["integration", "isDevelopment", "url"])) : createCommentVNode("", true),
650
+ showMCPButton.value ? (openBlock(), createBlock(unref(OpenMCPButton), {
651
+ key: 1,
652
+ config: mergedConfig.value.mcp,
653
+ isDevelopment: unref(isDevelopment),
654
+ url: documentUrl.value,
655
+ workspace: unref(workspaceStore)
656
+ }, null, 8, ["config", "isDevelopment", "url", "workspace"])) : createCommentVNode("", true)
637
657
  ]),
638
658
  _: 1
639
659
  })
@@ -101,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
101
101
  }),
102
102
  createVNode(unref(ScalarErrorBoundary), null, {
103
103
  default: withCtx(() => [
104
- __props.document ? (openBlock(), createBlock(unref(IntroductionCardItem), {
104
+ __props.document && !__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(IntroductionCardItem), {
105
105
  key: 0,
106
106
  class: "scalar-reference-intro-auth scalar-client introduction-card-item leading-normal"
107
107
  }, {
@@ -1,7 +1,7 @@
1
1
  export { getSystemModePreference } from './color-mode.js';
2
2
  export { downloadDocument } from './download.js';
3
3
  export { getIdFromUrl, makeUrlFromId } from './id-routing.js';
4
- export { blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from './lazy-bus.js';
4
+ export { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy, } from './lazy-bus.js';
5
5
  export { loadAuthFromStorage, loadClientFromStorage } from './load-from-perssistance.js';
6
6
  export { mapConfigPlugins } from './map-config-plugins.js';
7
7
  export { mapConfigToWorkspaceStore } from './map-config-to-workspace-store.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACxG,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,KAAK,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,KAAK,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,12 +1,13 @@
1
1
  import { getSystemModePreference } from "./color-mode.js";
2
2
  import { downloadDocument } from "./download.js";
3
3
  import { getIdFromUrl, makeUrlFromId } from "./id-routing.js";
4
- import { blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from "./lazy-bus.js";
4
+ import { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, intersectionEnabled, scrollToLazy } from "./lazy-bus.js";
5
5
  import { loadAuthFromStorage, loadClientFromStorage } from "./load-from-perssistance.js";
6
6
  import { mapConfigPlugins } from "./map-config-plugins.js";
7
7
  import { mapConfigToWorkspaceStore } from "./map-config-to-workspace-store.js";
8
8
  import { normalizeConfigurations } from "./normalize-configurations.js";
9
9
  export {
10
+ addToPriorityQueue,
10
11
  blockIntersection,
11
12
  downloadDocument,
12
13
  firstLazyLoadComplete,
package/dist/style.css CHANGED
@@ -2391,6 +2391,99 @@ to {
2391
2391
  z-index: 15;
2392
2392
  }
2393
2393
  }
2394
+
2395
+ .scalar-mcp-layer[data-v-cfbd7ea4] {
2396
+ gap: 2px;
2397
+ display: flex;
2398
+ flex-direction: column;
2399
+ background: transparent;
2400
+ position: relative;
2401
+ justify-content: flex-end;
2402
+ transition: all 0.4s ease-in-out;
2403
+ height: 32px;
2404
+ }
2405
+ .scalar-mcp-layer[data-v-cfbd7ea4]:hover {
2406
+ height: 172px;
2407
+ }
2408
+ .scalar-mcp-layer-link[data-v-cfbd7ea4]:hover {
2409
+ cursor: pointer !important;
2410
+ }
2411
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4] {
2412
+ cursor: pointer;
2413
+ width: 100%;
2414
+ padding: 9px 6px;
2415
+ height: 31px;
2416
+ display: block;
2417
+ text-align: center;
2418
+ display: flex;
2419
+ align-items: center;
2420
+ white-space: nowrap;
2421
+ font-size: var(--scalar-small);
2422
+ line-height: 1.385;
2423
+ text-decoration: none;
2424
+ border-radius: var(--scalar-radius);
2425
+ border: var(--scalar-border-width) solid var(--scalar-border-color);
2426
+ gap: 6px;
2427
+ color: var(--scalar-sidebar-color-1);
2428
+ background: var(--scalar-background-1);
2429
+ transition: transform 0.2s ease-in-out;
2430
+ position: absolute;
2431
+ bottom: 0;
2432
+ }
2433
+ /* increase click area for gap */
2434
+ .scalar-mcp-layer-link[data-v-cfbd7ea4]:after {
2435
+ content: '';
2436
+ position: absolute;
2437
+ bottom: -2px;
2438
+ height: 2px;
2439
+ width: 100%;
2440
+ left: 0;
2441
+ }
2442
+ .scalar-mcp-layer div.scalar-mcp-layer-link[data-v-cfbd7ea4] {
2443
+ cursor: default;
2444
+ }
2445
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4]:nth-last-child(1) {
2446
+ transform: translate3d(0, 0, 0);
2447
+ position: relative;
2448
+ }
2449
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4]:nth-last-child(2) {
2450
+ transform: translate3d(0, -2px, 0) scale(0.99);
2451
+ }
2452
+ .scalar-mcp-layer:hover a[data-v-cfbd7ea4]:nth-last-child(2) {
2453
+ transform: translate3d(0, calc(-100% - 2px), 0) scale(0.99);
2454
+ }
2455
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4]:nth-last-child(3) {
2456
+ transform: translate3d(0, -4px, 0) scale(0.98);
2457
+ }
2458
+ .scalar-mcp-layer:hover a[data-v-cfbd7ea4]:nth-last-child(3) {
2459
+ transform: translate3d(0, calc(-200% - 4px), 0) scale(1);
2460
+ }
2461
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4]:nth-last-child(4) {
2462
+ transform: translate3d(0, -6px, 0) scale(0.97);
2463
+ }
2464
+ .scalar-mcp-layer:hover a[data-v-cfbd7ea4]:nth-last-child(4) {
2465
+ transform: translate3d(0, calc(-300% - 6px), 0) scale(1);
2466
+ }
2467
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4]:nth-last-child(5) {
2468
+ transform: translate3d(0, -8px, 0) scale(0.96);
2469
+ }
2470
+ .scalar-mcp-layer:hover .scalar-mcp-layer-link[data-v-cfbd7ea4]:nth-last-child(5) {
2471
+ transform: translate3d(0, calc(-400% - 8px), 0) scale(1);
2472
+ }
2473
+ .scalar-mcp-layer:hover .scalar-mcp-layer-link[data-v-cfbd7ea4] {
2474
+ transition: transform 0.2s ease-in-out 0.1s;
2475
+ }
2476
+ .scalar-mcp-layer .scalar-mcp-layer-link[data-v-cfbd7ea4]:hover {
2477
+ background: var(--scalar-background-2);
2478
+ }
2479
+ .scalar-mcp-layer .mcp-logo[data-v-cfbd7ea4] {
2480
+ width: 16px;
2481
+ height: 16px;
2482
+ color: var(--scalar-sidebar-color-1);
2483
+ }
2484
+ .mcp-nav[data-v-cfbd7ea4] {
2485
+ color: var(--scalar-sidebar-color-2);
2486
+ }
2394
2487
  /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
2395
2488
  @layer properties {
2396
2489
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
@@ -12283,7 +12376,7 @@ to {
12283
12376
 
12284
12377
  /* Configurable Layout Variables */
12285
12378
  @layer scalar-config {
12286
- .scalar-api-reference[data-v-69e552a7] {
12379
+ .scalar-api-reference[data-v-e8fb8338] {
12287
12380
  /* The header height */
12288
12381
  --refs-header-height: calc(
12289
12382
  var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)
@@ -12305,20 +12398,20 @@ to {
12305
12398
  /* The maximum width of the content column */
12306
12399
  --refs-content-max-width: var(--scalar-content-max-width, 1540px);
12307
12400
  }
12308
- .scalar-api-reference.references-classic[data-v-69e552a7] {
12401
+ .scalar-api-reference.references-classic[data-v-e8fb8338] {
12309
12402
  /* Classic layout is wider */
12310
12403
  --refs-content-max-width: var(--scalar-content-max-width, 1420px);
12311
12404
  min-height: 100dvh;
12312
12405
  --refs-sidebar-width: 0;
12313
12406
  }
12314
12407
  }
12315
- .t-doc__sidebar[data-v-69e552a7] {
12408
+ .t-doc__sidebar[data-v-e8fb8338] {
12316
12409
  z-index: 10;
12317
12410
  }
12318
12411
 
12319
12412
  /* ----------------------------------------------------- */
12320
12413
  /* References Layout */
12321
- .references-layout[data-v-69e552a7] {
12414
+ .references-layout[data-v-e8fb8338] {
12322
12415
  /* Try to fill the container */
12323
12416
  min-height: 100dvh;
12324
12417
  min-width: 100%;
@@ -12342,39 +12435,39 @@ to {
12342
12435
 
12343
12436
  background: var(--scalar-background-1);
12344
12437
  }
12345
- .references-editor[data-v-69e552a7] {
12438
+ .references-editor[data-v-e8fb8338] {
12346
12439
  grid-area: editor;
12347
12440
  display: flex;
12348
12441
  min-width: 0;
12349
12442
  background: var(--scalar-background-1);
12350
12443
  }
12351
- .references-rendered[data-v-69e552a7] {
12444
+ .references-rendered[data-v-e8fb8338] {
12352
12445
  position: relative;
12353
12446
  grid-area: rendered;
12354
12447
  min-width: 0;
12355
12448
  background: var(--scalar-background-1);
12356
12449
  }
12357
- .scalar-api-reference.references-classic[data-v-69e552a7],
12358
- .references-classic .references-rendered[data-v-69e552a7] {
12450
+ .scalar-api-reference.references-classic[data-v-e8fb8338],
12451
+ .references-classic .references-rendered[data-v-e8fb8338] {
12359
12452
  height: initial !important;
12360
12453
  max-height: initial !important;
12361
12454
  }
12362
12455
  @layer scalar-config {
12363
- .references-sidebar[data-v-69e552a7] {
12456
+ .references-sidebar[data-v-e8fb8338] {
12364
12457
  /* Set a default width if references are enabled */
12365
12458
  --refs-sidebar-width: var(--scalar-sidebar-width, 288px);
12366
12459
  }
12367
12460
  }
12368
12461
 
12369
12462
  /* Footer */
12370
- .references-footer[data-v-69e552a7] {
12463
+ .references-footer[data-v-e8fb8338] {
12371
12464
  grid-area: footer;
12372
12465
  }
12373
12466
  /* ----------------------------------------------------- */
12374
12467
  /* Responsive / Mobile Layout */
12375
12468
  @media (max-width: 1000px) {
12376
12469
  /* Stack view on mobile */
12377
- .references-layout[data-v-69e552a7] {
12470
+ .references-layout[data-v-e8fb8338] {
12378
12471
  /* Adjust the sidebar height to the viewport height minus the header height */
12379
12472
  --refs-sidebar-height: calc(
12380
12473
  var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)
@@ -12389,13 +12482,13 @@ to {
12389
12482
  'rendered'
12390
12483
  'footer';
12391
12484
  }
12392
- .references-editable[data-v-69e552a7] {
12485
+ .references-editable[data-v-e8fb8338] {
12393
12486
  grid-template-areas:
12394
12487
  'header'
12395
12488
  'navigation'
12396
12489
  'editor';
12397
12490
  }
12398
- .references-rendered[data-v-69e552a7] {
12491
+ .references-rendered[data-v-e8fb8338] {
12399
12492
  position: static;
12400
12493
  }
12401
12494
  }
@@ -12406,12 +12499,12 @@ to {
12406
12499
  * when the new elements are available
12407
12500
  */
12408
12501
  @media (max-width: 1000px) {
12409
- .scalar-api-references-standalone-mobile[data-v-69e552a7]:not(.references-classic) {
12502
+ .scalar-api-references-standalone-mobile[data-v-e8fb8338]:not(.references-classic) {
12410
12503
  --scalar-header-height: 50px;
12411
12504
  }
12412
12505
  }
12413
12506
 
12414
- .darklight-reference[data-v-69e552a7] {
12507
+ .darklight-reference[data-v-e8fb8338] {
12415
12508
  width: 100%;
12416
12509
  margin-top: auto;
12417
12510
  }
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.48.1",
23
+ "version": "1.48.2",
24
24
  "engines": {
25
25
  "node": ">=22"
26
26
  },
@@ -85,22 +85,22 @@
85
85
  "microdiff": "^1.5.0",
86
86
  "nanoid": "^5.1.6",
87
87
  "vue": "^3.5.26",
88
- "@scalar/agent-chat": "0.9.1",
89
- "@scalar/api-client": "2.34.0",
90
- "@scalar/components": "0.20.2",
91
- "@scalar/code-highlight": "0.3.0",
88
+ "@scalar/agent-chat": "0.9.2",
89
+ "@scalar/api-client": "2.34.1",
90
+ "@scalar/components": "0.20.3",
92
91
  "@scalar/helpers": "0.3.0",
93
92
  "@scalar/icons": "0.6.0",
94
- "@scalar/openapi-parser": "0.25.1",
95
- "@scalar/oas-utils": "0.10.1",
93
+ "@scalar/oas-utils": "0.10.2",
94
+ "@scalar/code-highlight": "0.3.0",
96
95
  "@scalar/openapi-types": "0.6.0",
96
+ "@scalar/sidebar": "0.8.3",
97
+ "@scalar/snippetz": "0.7.1",
98
+ "@scalar/openapi-parser": "0.25.1",
97
99
  "@scalar/themes": "0.15.0",
98
- "@scalar/snippetz": "0.7.0",
99
- "@scalar/types": "0.7.0",
100
- "@scalar/sidebar": "0.8.2",
101
- "@scalar/use-hooks": "0.4.0",
100
+ "@scalar/types": "0.7.1",
102
101
  "@scalar/use-toasts": "0.10.0",
103
- "@scalar/workspace-store": "0.38.0"
102
+ "@scalar/workspace-store": "0.38.1",
103
+ "@scalar/use-hooks": "0.4.0"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@hono/node-server": "^1.19.7",
@@ -118,10 +118,10 @@
118
118
  "vite-plugin-banner": "^0.8.1",
119
119
  "vite-plugin-css-injected-by-js": "^3.5.2",
120
120
  "vitest": "4.0.16",
121
+ "@scalar/build-tooling": "0.5.0",
122
+ "@scalar/core": "0.4.1",
121
123
  "@scalar/galaxy": "0.6.0",
122
- "@scalar/react-renderer": "0.4.0",
123
- "@scalar/core": "0.4.0",
124
- "@scalar/build-tooling": "0.5.0"
124
+ "@scalar/react-renderer": "0.4.0"
125
125
  },
126
126
  "scripts": {
127
127
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build",