@scalar/api-reference 1.40.1 → 1.40.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.
- package/CHANGELOG.md +44 -0
- package/dist/browser/standalone.js +8974 -8971
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +5 -2
- package/dist/helpers/lazy-bus.d.ts +7 -0
- package/dist/helpers/lazy-bus.d.ts.map +1 -1
- package/dist/helpers/lazy-bus.js +7 -11
- package/dist/style.css +19 -16
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AA0oCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAsDpC,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;AA2tCF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oPAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,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-
|
|
7
|
+
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-624789fe"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -25,7 +25,7 @@ import _sfc_main$5 from "../features/toolbar/ApiReferenceToolbar.vue.js";
|
|
|
25
25
|
import { getSystemModePreference } from "../helpers/color-mode.js";
|
|
26
26
|
import { downloadDocument } from "../helpers/download.js";
|
|
27
27
|
import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
|
|
28
|
-
import { intersectionEnabled, scrollToLazy } from "../helpers/lazy-bus.js";
|
|
28
|
+
import { intersectionEnabled, scrollToLazy, blockIntersection } from "../helpers/lazy-bus.js";
|
|
29
29
|
import { mapConfigToClientStore } from "../helpers/map-config-to-client-store.js";
|
|
30
30
|
import { mapConfigToWorkspaceStore } from "../helpers/map-config-to-workspace-store.js";
|
|
31
31
|
import { mapConfiguration } from "../helpers/map-configuration.js";
|
|
@@ -411,7 +411,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
411
411
|
const handleSelectItem = (id) => {
|
|
412
412
|
const item = sidebarState.getEntryById(id);
|
|
413
413
|
if ((item?.type === "tag" || item?.type === "models") && sidebarState.isExpanded(id)) {
|
|
414
|
-
|
|
414
|
+
const unblock = blockIntersection();
|
|
415
|
+
sidebarState.setExpanded(id, false);
|
|
416
|
+
unblock();
|
|
417
|
+
return;
|
|
415
418
|
}
|
|
416
419
|
if (item?.type !== "tag" && item?.type !== "models") {
|
|
417
420
|
isSidebarOpen.value = false;
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
* the rest of the content is loaded.
|
|
4
4
|
*/
|
|
5
5
|
export declare const firstLazyLoadComplete: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
type UnblockFn = () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Adds a unique identifier to the intersection blockers set
|
|
9
|
+
* Intersection will not be enabled until the unblock callback is run
|
|
10
|
+
*/
|
|
11
|
+
export declare const blockIntersection: () => UnblockFn;
|
|
6
12
|
/** If there are any pending blocking operations we disable intersection */
|
|
7
13
|
export declare const intersectionEnabled: import("vue").ComputedRef<boolean>;
|
|
8
14
|
/**
|
|
@@ -36,4 +42,5 @@ export declare const scrollToLazy: (id: string, setExpanded: (id: string, value:
|
|
|
36
42
|
}[];
|
|
37
43
|
} | undefined) => void;
|
|
38
44
|
export declare const freeze: (id: string) => () => void;
|
|
45
|
+
export {};
|
|
39
46
|
//# sourceMappingURL=lazy-bus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-bus.d.ts","sourceRoot":"","sources":["../../src/helpers/lazy-bus.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qCAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"lazy-bus.d.ts","sourceRoot":"","sources":["../../src/helpers/lazy-bus.ts"],"names":[],"mappings":"AAqBA;;;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;AA6FlF;;;;;;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;AAyBD,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,eAwBhC,CAAA"}
|
package/dist/helpers/lazy-bus.js
CHANGED
|
@@ -25,19 +25,14 @@ const runLazyBus = () => {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
const unblock = blockIntersection();
|
|
28
|
-
const
|
|
28
|
+
const processQueue = async () => {
|
|
29
29
|
if (pendingQueue.size > 0 || priorityQueue.size > 0) {
|
|
30
30
|
isRunning.value = true;
|
|
31
|
-
for (const id of pendingQueue
|
|
31
|
+
for (const id of [...pendingQueue, ...priorityQueue]) {
|
|
32
32
|
readyQueue.add(id);
|
|
33
33
|
pendingQueue.delete(id);
|
|
34
34
|
priorityQueue.delete(id);
|
|
35
35
|
}
|
|
36
|
-
for (const id of priorityQueue.values()) {
|
|
37
|
-
readyQueue.add(id);
|
|
38
|
-
priorityQueue.delete(id);
|
|
39
|
-
pendingQueue.delete(id);
|
|
40
|
-
}
|
|
41
36
|
}
|
|
42
37
|
await nextTick();
|
|
43
38
|
onRenderComplete.forEach((fn) => fn());
|
|
@@ -47,9 +42,9 @@ const runLazyBus = () => {
|
|
|
47
42
|
firstLazyLoadComplete.value = true;
|
|
48
43
|
};
|
|
49
44
|
if (window.requestIdleCallback) {
|
|
50
|
-
window.requestIdleCallback(
|
|
45
|
+
window.requestIdleCallback(processQueue, { timeout: 1500 });
|
|
51
46
|
} else {
|
|
52
|
-
nextTick(
|
|
47
|
+
nextTick(processQueue);
|
|
53
48
|
}
|
|
54
49
|
};
|
|
55
50
|
watchDebounced(
|
|
@@ -62,12 +57,12 @@ watchDebounced(
|
|
|
62
57
|
{ debounce: 300, maxWait: 1500 }
|
|
63
58
|
);
|
|
64
59
|
const addToPendingQueue = (id) => {
|
|
65
|
-
if (!!id && !
|
|
60
|
+
if (!!id && !priorityQueue.has(id)) {
|
|
66
61
|
pendingQueue.add(id);
|
|
67
62
|
}
|
|
68
63
|
};
|
|
69
64
|
const addToPriorityQueue = (id) => {
|
|
70
|
-
if (id
|
|
65
|
+
if (id) {
|
|
71
66
|
priorityQueue.add(id);
|
|
72
67
|
}
|
|
73
68
|
};
|
|
@@ -153,6 +148,7 @@ const freeze = (id) => {
|
|
|
153
148
|
};
|
|
154
149
|
};
|
|
155
150
|
export {
|
|
151
|
+
blockIntersection,
|
|
156
152
|
firstLazyLoadComplete,
|
|
157
153
|
freeze,
|
|
158
154
|
intersectionEnabled,
|
package/dist/style.css
CHANGED
|
@@ -6836,6 +6836,9 @@ to {
|
|
|
6836
6836
|
.scalar-app .m-auto {
|
|
6837
6837
|
margin: auto;
|
|
6838
6838
|
}
|
|
6839
|
+
.scalar-app .m-header {
|
|
6840
|
+
margin: 48px;
|
|
6841
|
+
}
|
|
6839
6842
|
.scalar-app .-mx-0\.25 {
|
|
6840
6843
|
margin-inline: -1px;
|
|
6841
6844
|
}
|
|
@@ -10162,7 +10165,7 @@ to {
|
|
|
10162
10165
|
-webkit-mask-image: linear-gradient(to right, transparent 0, var(--scalar-background-2) 20px);
|
|
10163
10166
|
mask-image: linear-gradient(to right, transparent 0, var(--scalar-background-2) 20px);
|
|
10164
10167
|
}
|
|
10165
|
-
[data-v-
|
|
10168
|
+
[data-v-1b70fdaa] .cm-content {
|
|
10166
10169
|
font-size: var(--scalar-small);
|
|
10167
10170
|
}
|
|
10168
10171
|
[data-v-25ff4902] .cm-editor {
|
|
@@ -11645,7 +11648,7 @@ to {
|
|
|
11645
11648
|
|
|
11646
11649
|
/* Configurable Layout Variables */
|
|
11647
11650
|
@layer scalar-config {
|
|
11648
|
-
.scalar-api-reference[data-v-
|
|
11651
|
+
.scalar-api-reference[data-v-624789fe] {
|
|
11649
11652
|
--refs-sidebar-width: var(--scalar-sidebar-width, 0px);
|
|
11650
11653
|
/* The header height */
|
|
11651
11654
|
--refs-header-height: calc(
|
|
@@ -11661,7 +11664,7 @@ to {
|
|
|
11661
11664
|
);
|
|
11662
11665
|
--refs-content-max-width: var(--scalar-content-max-width, 1540px);
|
|
11663
11666
|
}
|
|
11664
|
-
.scalar-api-reference.references-classic[data-v-
|
|
11667
|
+
.scalar-api-reference.references-classic[data-v-624789fe] {
|
|
11665
11668
|
/* Classic layout is wider */
|
|
11666
11669
|
--refs-content-max-width: var(--scalar-content-max-width, 1420px);
|
|
11667
11670
|
min-height: 100dvh;
|
|
@@ -11669,14 +11672,14 @@ to {
|
|
|
11669
11672
|
}
|
|
11670
11673
|
|
|
11671
11674
|
/* When the toolbar is present, we need to offset the content */
|
|
11672
|
-
.scalar-api-reference[data-v-
|
|
11675
|
+
.scalar-api-reference[data-v-624789fe]:has(.api-reference-toolbar) {
|
|
11673
11676
|
--refs-content-offset: 48px;
|
|
11674
11677
|
}
|
|
11675
11678
|
}
|
|
11676
11679
|
|
|
11677
11680
|
/* ----------------------------------------------------- */
|
|
11678
11681
|
/* References Layout */
|
|
11679
|
-
.references-layout[data-v-
|
|
11682
|
+
.references-layout[data-v-624789fe] {
|
|
11680
11683
|
/* Try to fill the container */
|
|
11681
11684
|
min-height: 100dvh;
|
|
11682
11685
|
min-width: 100%;
|
|
@@ -11700,39 +11703,39 @@ to {
|
|
|
11700
11703
|
|
|
11701
11704
|
background: var(--scalar-background-1);
|
|
11702
11705
|
}
|
|
11703
|
-
.references-editor[data-v-
|
|
11706
|
+
.references-editor[data-v-624789fe] {
|
|
11704
11707
|
grid-area: editor;
|
|
11705
11708
|
display: flex;
|
|
11706
11709
|
min-width: 0;
|
|
11707
11710
|
background: var(--scalar-background-1);
|
|
11708
11711
|
}
|
|
11709
|
-
.references-rendered[data-v-
|
|
11712
|
+
.references-rendered[data-v-624789fe] {
|
|
11710
11713
|
position: relative;
|
|
11711
11714
|
grid-area: rendered;
|
|
11712
11715
|
min-width: 0;
|
|
11713
11716
|
background: var(--scalar-background-1);
|
|
11714
11717
|
}
|
|
11715
|
-
.scalar-api-reference.references-classic[data-v-
|
|
11716
|
-
.references-classic .references-rendered[data-v-
|
|
11718
|
+
.scalar-api-reference.references-classic[data-v-624789fe],
|
|
11719
|
+
.references-classic .references-rendered[data-v-624789fe] {
|
|
11717
11720
|
height: initial !important;
|
|
11718
11721
|
max-height: initial !important;
|
|
11719
11722
|
}
|
|
11720
11723
|
@layer scalar-config {
|
|
11721
|
-
.references-sidebar[data-v-
|
|
11724
|
+
.references-sidebar[data-v-624789fe] {
|
|
11722
11725
|
/* Set a default width if references are enabled */
|
|
11723
11726
|
--refs-sidebar-width: var(--scalar-sidebar-width, 280px);
|
|
11724
11727
|
}
|
|
11725
11728
|
}
|
|
11726
11729
|
|
|
11727
11730
|
/* Footer */
|
|
11728
|
-
.references-footer[data-v-
|
|
11731
|
+
.references-footer[data-v-624789fe] {
|
|
11729
11732
|
grid-area: footer;
|
|
11730
11733
|
}
|
|
11731
11734
|
/* ----------------------------------------------------- */
|
|
11732
11735
|
/* Responsive / Mobile Layout */
|
|
11733
11736
|
@media (max-width: 1000px) {
|
|
11734
11737
|
/* Stack view on mobile */
|
|
11735
|
-
.references-layout[data-v-
|
|
11738
|
+
.references-layout[data-v-624789fe] {
|
|
11736
11739
|
grid-template-columns: auto;
|
|
11737
11740
|
grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;
|
|
11738
11741
|
|
|
@@ -11742,13 +11745,13 @@ to {
|
|
|
11742
11745
|
'rendered'
|
|
11743
11746
|
'footer';
|
|
11744
11747
|
}
|
|
11745
|
-
.references-editable[data-v-
|
|
11748
|
+
.references-editable[data-v-624789fe] {
|
|
11746
11749
|
grid-template-areas:
|
|
11747
11750
|
'header'
|
|
11748
11751
|
'navigation'
|
|
11749
11752
|
'editor';
|
|
11750
11753
|
}
|
|
11751
|
-
.references-rendered[data-v-
|
|
11754
|
+
.references-rendered[data-v-624789fe] {
|
|
11752
11755
|
position: static;
|
|
11753
11756
|
}
|
|
11754
11757
|
}
|
|
@@ -11759,12 +11762,12 @@ to {
|
|
|
11759
11762
|
* when the new elements are available
|
|
11760
11763
|
*/
|
|
11761
11764
|
@media (max-width: 1000px) {
|
|
11762
|
-
.scalar-api-references-standalone-mobile[data-v-
|
|
11765
|
+
.scalar-api-references-standalone-mobile[data-v-624789fe] {
|
|
11763
11766
|
--scalar-header-height: 50px;
|
|
11764
11767
|
}
|
|
11765
11768
|
}
|
|
11766
11769
|
|
|
11767
|
-
.darklight-reference[data-v-
|
|
11770
|
+
.darklight-reference[data-v-624789fe] {
|
|
11768
11771
|
width: 100%;
|
|
11769
11772
|
margin-top: auto;
|
|
11770
11773
|
}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.40.
|
|
23
|
+
"version": "1.40.3",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -68,25 +68,25 @@
|
|
|
68
68
|
"nanoid": "5.1.5",
|
|
69
69
|
"type-fest": "5.0.0",
|
|
70
70
|
"vue": "^3.5.21",
|
|
71
|
-
"zod": "4.1.11",
|
|
72
|
-
"@scalar/api-client": "2.13.0",
|
|
73
|
-
"@scalar/components": "0.16.5",
|
|
71
|
+
"zod": "^4.1.11",
|
|
74
72
|
"@scalar/code-highlight": "0.2.1",
|
|
75
|
-
"@scalar/
|
|
73
|
+
"@scalar/api-client": "2.14.1",
|
|
74
|
+
"@scalar/components": "0.16.7",
|
|
76
75
|
"@scalar/icons": "0.5.0",
|
|
77
|
-
"@scalar/
|
|
78
|
-
"@scalar/json-magic": "0.8.
|
|
79
|
-
"@scalar/
|
|
80
|
-
"@scalar/
|
|
81
|
-
"@scalar/openapi-
|
|
82
|
-
"@scalar/
|
|
83
|
-
"@scalar/
|
|
84
|
-
"@scalar/types": "0.5.
|
|
76
|
+
"@scalar/helpers": "0.2.1",
|
|
77
|
+
"@scalar/json-magic": "0.8.5",
|
|
78
|
+
"@scalar/oas-utils": "0.6.7",
|
|
79
|
+
"@scalar/object-utils": "1.2.15",
|
|
80
|
+
"@scalar/openapi-parser": "0.23.6",
|
|
81
|
+
"@scalar/sidebar": "0.5.2",
|
|
82
|
+
"@scalar/openapi-upgrader": "0.1.6",
|
|
83
|
+
"@scalar/openapi-types": "0.5.3",
|
|
84
|
+
"@scalar/snippetz": "0.5.5",
|
|
85
85
|
"@scalar/themes": "0.13.25",
|
|
86
|
-
"@scalar/
|
|
87
|
-
"@scalar/snippetz": "0.5.4",
|
|
86
|
+
"@scalar/types": "0.5.2",
|
|
88
87
|
"@scalar/use-toasts": "0.9.1",
|
|
89
|
-
"@scalar/
|
|
88
|
+
"@scalar/use-hooks": "0.3.3",
|
|
89
|
+
"@scalar/workspace-store": "0.22.2"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@hono/node-server": "1.19.5",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
108
108
|
"vitest": "3.2.4",
|
|
109
109
|
"@scalar/build-tooling": "0.3.1",
|
|
110
|
-
"@scalar/core": "0.3.
|
|
110
|
+
"@scalar/core": "0.3.26",
|
|
111
111
|
"@scalar/galaxy": "0.5.12",
|
|
112
112
|
"@scalar/react-renderer": "0.3.0"
|
|
113
113
|
},
|