@scalar/api-reference 1.46.4 → 1.48.0

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":"AgentScalarDrawer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/AgentScalarDrawer.vue"],"names":[],"mappings":"AAoJA,OAAO,8BAA8B,CAAA;AAErC,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,6BAA6B,CAAA;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,wBAAwB,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAA;IACtE,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAyGF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"AgentScalarDrawer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/AgentScalarDrawer.vue"],"names":[],"mappings":"AAsFA,OAAO,8BAA8B,CAAA;AAGrC,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,6BAA6B,CAAA;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,wBAAwB,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAA;IACtE,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA8KF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./AgentScalarDrawer.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const AgentScalarDrawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b45a83b1"]]);
4
+ const AgentScalarDrawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b38821a2"]]);
5
5
  export {
6
6
  AgentScalarDrawer as default
7
7
  };
@@ -1,13 +1,9 @@
1
- import { defineComponent, defineAsyncComponent, createElementBlock, openBlock, Fragment, withDirectives, createElementVNode, unref, normalizeClass, createVNode, vShow } from "vue";
1
+ import { defineComponent, defineAsyncComponent, createElementBlock, openBlock, Fragment, createVNode, Transition, withCtx, withDirectives, createElementVNode, unref, vShow, withKeys } from "vue";
2
2
  import { ScalarIconX } from "@scalar/icons";
3
3
  import "@scalar/agent-chat/style.css";
4
+ import { ScalarIconButton } from "@scalar/components";
4
5
  import { useAgentContext } from "../../hooks/use-agent.js";
5
- const _hoisted_1 = {
6
- class: "app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2",
7
- type: "button"
8
- };
9
- const _hoisted_2 = { class: "agent-scalar" };
10
- const _hoisted_3 = { class: "agent-scalar-container custom-scroll custom-scroll-self-contain-overflow" };
6
+ const _hoisted_1 = { class: "agent-scalar-container custom-scroll custom-scroll-self-contain-overflow overflow-auto px-6" };
11
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
8
  __name: "AgentScalarDrawer",
13
9
  props: {
@@ -22,28 +18,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
18
  );
23
19
  return (_ctx, _cache) => {
24
20
  return openBlock(), createElementBlock(Fragment, null, [
25
- withDirectives(createElementVNode("div", {
26
- class: normalizeClass(["scalar-app-exit", unref(agentContext)?.showAgent.value ? "scalar-app-exit-animation" : ""]),
27
- onClick: _cache[0] || (_cache[0] = ($event) => unref(agentContext)?.closeAgent())
28
- }, [
29
- createElementVNode("button", _hoisted_1, [
30
- createVNode(unref(ScalarIconX), { weight: "bold" }),
31
- _cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Close Client", -1))
32
- ])
33
- ], 2), [
34
- [vShow, unref(agentContext)?.showAgent.value]
35
- ]),
36
- withDirectives(createElementVNode("div", _hoisted_2, [
37
- createElementVNode("div", _hoisted_3, [
38
- createVNode(unref(AgentScalarChatInterface), {
39
- agentScalarConfiguration: __props.agentScalarConfiguration,
40
- prefilledMessage: unref(agentContext)?.prefilledMessage,
41
- workspaceStore: __props.workspaceStore
42
- }, null, 8, ["agentScalarConfiguration", "prefilledMessage", "workspaceStore"])
43
- ])
44
- ], 512), [
45
- [vShow, unref(agentContext)?.showAgent.value]
46
- ])
21
+ createVNode(Transition, {
22
+ enterActiveClass: "transition-opacity duration-500",
23
+ enterFromClass: "opacity-0",
24
+ enterToClass: "opacity-100",
25
+ leaveActiveClass: "transition-opacity duration-200",
26
+ leaveFromClass: "opacity-100",
27
+ leaveToClass: "opacity-0"
28
+ }, {
29
+ default: withCtx(() => [
30
+ withDirectives(createElementVNode("div", {
31
+ class: "agent-scalar-overlay bg-backdrop fixed inset-0 z-10 ease-[cubic-bezier(0.77,0,0.175,1)]",
32
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(agentContext)?.closeAgent())
33
+ }, null, 512), [
34
+ [vShow, unref(agentContext)?.showAgent.value]
35
+ ])
36
+ ]),
37
+ _: 1
38
+ }),
39
+ createVNode(Transition, {
40
+ enterActiveClass: "transition-transform duration-300",
41
+ enterFromClass: "-translate-x-full",
42
+ enterToClass: "translate-x-0",
43
+ leaveActiveClass: "transition-transform duration-200",
44
+ leaveFromClass: "translate-x-0",
45
+ leaveToClass: "-translate-x-full"
46
+ }, {
47
+ default: withCtx(() => [
48
+ withDirectives(createElementVNode("div", {
49
+ class: "agent-scalar left-w-sidebar bg-b-1 fixed inset-y-0 right-12 z-10 grid border-r shadow-lg",
50
+ onKeydown: _cache[2] || (_cache[2] = withKeys(($event) => unref(agentContext)?.closeAgent(), ["escape"]))
51
+ }, [
52
+ createElementVNode("div", _hoisted_1, [
53
+ createVNode(unref(AgentScalarChatInterface), {
54
+ agentScalarConfiguration: __props.agentScalarConfiguration,
55
+ prefilledMessage: unref(agentContext)?.prefilledMessage,
56
+ workspaceStore: __props.workspaceStore
57
+ }, null, 8, ["agentScalarConfiguration", "prefilledMessage", "workspaceStore"])
58
+ ]),
59
+ createVNode(unref(ScalarIconButton), {
60
+ class: "agent-scalar-exit-button absolute top-2 right-2",
61
+ icon: unref(ScalarIconX),
62
+ label: "Close Client",
63
+ weight: "bold",
64
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(agentContext)?.closeAgent())
65
+ }, null, 8, ["icon"])
66
+ ], 544), [
67
+ [vShow, unref(agentContext)?.showAgent.value]
68
+ ])
69
+ ]),
70
+ _: 1
71
+ })
47
72
  ], 64);
48
73
  };
49
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AA4vCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAOpC,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAkBnD,OAAO,8BAA8B,CAAA;AAiCrC,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,UA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C,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-94d6fca6"]]);
7
+ const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-69e552a7"]]);
8
8
  export {
9
9
  ApiReference as default
10
10
  };
@@ -28,7 +28,7 @@ import _sfc_main$3 from "../features/Search/components/SearchButton.vue.js";
28
28
  import { getSystemModePreference } from "../helpers/color-mode.js";
29
29
  import { downloadDocument } from "../helpers/download.js";
30
30
  import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
31
- import { intersectionEnabled, scrollToLazy, blockIntersection } from "../helpers/lazy-bus.js";
31
+ import { intersectionEnabled, addToPriorityQueue, scrollToLazy, blockIntersection } from "../helpers/lazy-bus.js";
32
32
  import { loadClientFromStorage, loadAuthFromStorage } from "../helpers/load-from-perssistance.js";
33
33
  import { mapConfigPlugins } from "../helpers/map-config-plugins.js";
34
34
  import { mapConfigToWorkspaceStore } from "../helpers/map-config-to-workspace-store.js";
@@ -45,7 +45,7 @@ const _hoisted_1 = {
45
45
  class: "flex gap-1.5 px-3 pt-3"
46
46
  };
47
47
  const _hoisted_2 = { key: 1 };
48
- const _hoisted_3 = ["aria-label"];
48
+ const _hoisted_3 = ["aria-label", "inert"];
49
49
  const _hoisted_4 = { class: "w-64 empty:hidden" };
50
50
  const _hoisted_5 = {
51
51
  key: 2,
@@ -162,6 +162,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
162
162
  activeSlug.value = slug;
163
163
  }
164
164
  const workspaceStore = createWorkspaceStore({
165
+ verbose: isDevelopment,
165
166
  plugins: [
166
167
  persistencePlugin({
167
168
  prefix: () => activeSlug.value,
@@ -491,6 +492,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
491
492
  eventBus.on("toggle:nav-item", ({ id, open }) => {
492
493
  if (open) {
493
494
  mergedConfig.value.onShowMore?.(id);
495
+ const entry = sidebarState.getEntryById(id);
496
+ if (entry && "children" in entry && entry.children) {
497
+ const first = entry.children[0];
498
+ if (first) {
499
+ addToPriorityQueue(first.id);
500
+ }
501
+ }
494
502
  }
495
503
  sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id));
496
504
  });
@@ -638,7 +646,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
638
646
  }, 8, ["breadcrumb", "isSidebarOpen", "showSidebar"])) : createCommentVNode("", true),
639
647
  createElementVNode("main", {
640
648
  "aria-label": `Open API Documentation for ${unref(workspaceStore).workspace.activeDocument?.info?.title}`,
641
- class: "references-rendered"
649
+ class: "references-rendered",
650
+ inert: unref(agent).showAgent.value
642
651
  }, [
643
652
  createVNode(_sfc_main$5, {
644
653
  authStore: unref(workspaceStore).auth,
@@ -1 +1 @@
1
- {"version":3,"file":"DeveloperTools.vue.d.ts","sourceRoot":"","sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAQpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAuBF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsFxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"DeveloperTools.vue.d.ts","sourceRoot":"","sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAQpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAuBF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAoFxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -7,7 +7,7 @@ import _sfc_main$3 from "./components/ShareApiReference.vue.js";
7
7
  const _hoisted_1 = {
8
8
  key: 0,
9
9
  "aria-label": "Developer Tools",
10
- class: "api-reference-toolbar bg-b-1 relative z-10 flex h-10 justify-center border-b px-15"
10
+ class: "api-reference-toolbar bg-b-1 flex h-10 justify-center border-b px-15"
11
11
  };
12
12
  const _hoisted_2 = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" };
13
13
  const _hoisted_3 = { class: "flex flex-1 items-center" };
@@ -11,6 +11,12 @@ type UnblockFn = () => void;
11
11
  export declare const blockIntersection: () => UnblockFn;
12
12
  /** If there are any pending blocking operations we disable intersection */
13
13
  export declare const intersectionEnabled: import("vue").ComputedRef<boolean>;
14
+ /**
15
+ * Add elements to the priority queue for immediate rendering.
16
+ * We allow adding items already in readyQueue so that callbacks are still triggered,
17
+ * but processQueue will skip actual re-rendering for items already ready.
18
+ */
19
+ export declare const addToPriorityQueue: (id: string | undefined) => void;
14
20
  /**
15
21
  * Tracks the lazy loading state of an element.
16
22
  * The element should be conditionally rendered using the isReady property.
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-bus.d.ts","sourceRoot":"","sources":["../../src/helpers/lazy-bus.ts"],"names":[],"mappings":"AAwBA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qCAAa,CAAA;AAc/C,KAAK,SAAS,GAAG,MAAM,IAAI,CAAA;AAE3B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,SAMpC,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,oCAAkD,CAAA;AAkGlF;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM;;EAUpC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACvB,IAAI,MAAM,EACV,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,EACjD,cAAc,CAAC,EAAE,EAAE,MAAM,KAAK;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,GAAG,SAAS,SA2D/G,CAAA"}
1
+ {"version":3,"file":"lazy-bus.d.ts","sourceRoot":"","sources":["../../src/helpers/lazy-bus.ts"],"names":[],"mappings":"AAwBA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qCAAa,CAAA;AAc/C,KAAK,SAAS,GAAG,MAAM,IAAI,CAAA;AAE3B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,SAMpC,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,oCAAkD,CAAA;AA8ElF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,GAAG,SAAS,SAIxD,CAAA;AAWD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM;;EAUpC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACvB,IAAI,MAAM,EACV,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,EACjD,cAAc,CAAC,EAAE,EAAE,MAAM,KAAK;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,GAAG,SAAS,SA2D/G,CAAA"}
@@ -151,6 +151,7 @@ const freeze = (id) => {
151
151
  };
152
152
  };
153
153
  export {
154
+ addToPriorityQueue,
154
155
  blockIntersection,
155
156
  firstLazyLoadComplete,
156
157
  intersectionEnabled,