@scalar/api-reference 1.44.27 → 1.46.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.
- package/CHANGELOG.md +71 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +8 -2
- package/dist/browser/standalone.js +3069 -3039
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/features/Operation/helpers/filter-selected-security.d.ts.map +1 -1
- package/dist/features/Operation/helpers/filter-selected-security.js +6 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +12 -9
- package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue2.js +17 -15
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +14 -7
- package/dist/features/example-responses/ExampleSchema.vue.d.ts +8 -0
- package/dist/features/example-responses/ExampleSchema.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleSchema.vue.js +34 -0
- package/dist/features/example-responses/ExampleSchema.vue2.js +4 -0
- package/dist/helpers/lazy-bus.d.ts.map +1 -1
- package/dist/helpers/lazy-bus.js +2 -1
- package/dist/style.css +123 -118
- package/package.json +12 -12
|
@@ -48,7 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
})
|
|
49
49
|
);
|
|
50
50
|
const selectedServer = computed(
|
|
51
|
-
() => getSelectedServer(
|
|
51
|
+
() => getSelectedServer(servers.value, __props.document?.["x-scalar-selected-server"])
|
|
52
52
|
);
|
|
53
53
|
const securitySchemes = computed(
|
|
54
54
|
() => mergeSecurity(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-selected-security.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/filter-selected-security.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,yDAAyD,CAAA;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAKrE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,eAAe,EACzB,WAAW,eAAe,GAAG,IAAI,EACjC,2BAA2B,gBAAgB,EAC3C,4BAA4B,gBAAgB,EAC5C,kBAAiB,qBAA0B,KAC1C,0BAA0B,
|
|
1
|
+
{"version":3,"file":"filter-selected-security.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/filter-selected-security.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,yDAAyD,CAAA;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAKrE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,eAAe,EACzB,WAAW,eAAe,GAAG,IAAI,EACjC,2BAA2B,gBAAgB,EAC3C,4BAA4B,gBAAgB,EAC5C,kBAAiB,qBAA0B,KAC1C,0BAA0B,EAmC5B,CAAA"}
|
|
@@ -3,7 +3,11 @@ import { getSelectedSecurity } from "@scalar/api-client/v2/features/operation";
|
|
|
3
3
|
const getKey = (requirement) => Object.keys(requirement).sort().join(",");
|
|
4
4
|
const filterSelectedSecurity = (document, operation, selectedSecurityDocument, selectedSecurityOperation, securitySchemes = {}) => {
|
|
5
5
|
const securityRequirements = operation?.security ?? document.security ?? [];
|
|
6
|
-
const selectedSecurity = getSelectedSecurity(
|
|
6
|
+
const selectedSecurity = getSelectedSecurity(
|
|
7
|
+
selectedSecurityDocument,
|
|
8
|
+
selectedSecurityOperation,
|
|
9
|
+
securityRequirements
|
|
10
|
+
);
|
|
7
11
|
const requirementSet = new Set(securityRequirements.map((r) => getKey(r)));
|
|
8
12
|
const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex];
|
|
9
13
|
if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) {
|
|
@@ -14,7 +18,7 @@ const filterSelectedSecurity = (document, operation, selectedSecurityDocument, s
|
|
|
14
18
|
return getSecuritySchemes(securitySchemes, [selected]);
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
|
-
if (operation?.security?.length
|
|
21
|
+
if (operation?.security?.length) {
|
|
18
22
|
return getSecuritySchemes(securitySchemes, securityRequirements.slice(0, 1));
|
|
19
23
|
}
|
|
20
24
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAgQA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AASzG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAqBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACZ,UAAU,GACV,WAAW,GACX,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,WAAW,CACd,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;CACtD,CAAC;AAmjBJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ModernLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ModernLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ModernLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c3c5405"]]);
|
|
5
5
|
export {
|
|
6
6
|
ModernLayout as default
|
|
7
7
|
};
|
|
@@ -29,6 +29,7 @@ const _hoisted_2 = { class: "flex gap-1" };
|
|
|
29
29
|
const _hoisted_3 = { class: "flex gap-1" };
|
|
30
30
|
const _hoisted_4 = { class: "operation-details" };
|
|
31
31
|
const _hoisted_5 = { class: "examples" };
|
|
32
|
+
const _hoisted_6 = { class: "flex" };
|
|
32
33
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
34
|
__name: "ModernLayout",
|
|
34
35
|
props: {
|
|
@@ -206,15 +207,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
206
207
|
!__props.isWebhook ? {
|
|
207
208
|
name: "footer",
|
|
208
209
|
fn: withCtx(({ exampleName }) => [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
210
|
+
createElementVNode("div", _hoisted_6, [
|
|
211
|
+
createVNode(AskAgentButton),
|
|
212
|
+
!__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(TestRequestButton), {
|
|
213
|
+
key: 0,
|
|
214
|
+
id: __props.id,
|
|
215
|
+
eventBus: __props.eventBus,
|
|
216
|
+
exampleName,
|
|
217
|
+
method: __props.method,
|
|
218
|
+
path: __props.path
|
|
219
|
+
}, null, 8, ["id", "eventBus", "exampleName", "method", "path"])) : createCommentVNode("", true)
|
|
220
|
+
])
|
|
218
221
|
]),
|
|
219
222
|
key: "0"
|
|
220
223
|
} : void 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":"AAgPA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./AskAgentButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f43e32ab"]]);
|
|
5
5
|
export {
|
|
6
6
|
AskAgentButton as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAGrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAA;CACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAGrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAA;CACnC,CAAC;AAqHF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ExampleResponse.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ExampleResponse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ExampleResponse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fa0d0b45"]]);
|
|
5
5
|
export {
|
|
6
6
|
ExampleResponse as default
|
|
7
7
|
};
|
|
@@ -4,7 +4,7 @@ import { ScalarCodeBlock, ScalarVirtualText } from "@scalar/components";
|
|
|
4
4
|
import { prettyPrintJson } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
6
|
const _hoisted_1 = {
|
|
7
|
-
key:
|
|
7
|
+
key: 2,
|
|
8
8
|
class: "empty-state"
|
|
9
9
|
};
|
|
10
10
|
const VIRTUALIZATION_THRESHOLD = 2e4;
|
|
@@ -25,27 +25,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
mode: "read"
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return void 0;
|
|
29
29
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
const prettyPrintedContent = computed(() => {
|
|
31
|
+
const content = getContent();
|
|
32
|
+
if (content === void 0) {
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
return prettyPrintJson(content);
|
|
36
|
+
});
|
|
37
|
+
const shouldVirtualize = computed(() => {
|
|
38
|
+
if (prettyPrintedContent.value === void 0) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD;
|
|
42
|
+
});
|
|
36
43
|
return (_ctx, _cache) => {
|
|
37
|
-
return
|
|
44
|
+
return prettyPrintedContent.value !== void 0 && !shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
|
|
38
45
|
key: 0,
|
|
39
46
|
class: "bg-b-2",
|
|
40
47
|
lang: "json",
|
|
41
48
|
prettyPrintedContent: prettyPrintedContent.value
|
|
42
|
-
}, null, 8, ["prettyPrintedContent"])) :
|
|
49
|
+
}, null, 8, ["prettyPrintedContent"])) : prettyPrintedContent.value !== void 0 && shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarVirtualText), {
|
|
43
50
|
key: 1,
|
|
44
|
-
class: "bg-b-2",
|
|
45
|
-
lang: "json",
|
|
46
|
-
prettyPrintedContent: prettyPrintedContent.value
|
|
47
|
-
}, null, 8, ["prettyPrintedContent"])) : (__props.example !== void 0 || __props.response?.schema) && shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarVirtualText), {
|
|
48
|
-
key: 2,
|
|
49
51
|
containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
|
|
50
52
|
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
51
53
|
lineHeight: 20,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"AAgYA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAWrE;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAC;AA+XF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ExampleResponses.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ExampleResponses = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ExampleResponses = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-557aa19c"]]);
|
|
5
5
|
export {
|
|
6
6
|
ExampleResponses as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineComponent, useId, computed, ref, watch, toValue, createBlock, createCommentVNode, openBlock, unref, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, withDirectives, createElementVNode, vModelCheckbox } from "vue";
|
|
2
2
|
import { getExample } from "@scalar/api-client/v2/blocks/operation-block";
|
|
3
3
|
import { getResolvedRefDeep, ExamplePicker } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
-
import { ScalarCard, ScalarIcon, ScalarCardSection,
|
|
5
|
-
import { normalizeMimeTypeObject, getObjectKeys } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { ScalarCard, ScalarIcon, ScalarCardSection, ScalarCardFooter, ScalarMarkdown } from "@scalar/components";
|
|
5
|
+
import { normalizeMimeTypeObject, getObjectKeys, prettyPrintJson } from "@scalar/oas-utils/helpers";
|
|
6
6
|
import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
7
7
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
8
8
|
import ScreenReader from "../../components/ScreenReader.vue.js";
|
|
9
|
+
import _sfc_main$1 from "./ExampleSchema.vue.js";
|
|
9
10
|
import ExampleResponse from "./ExampleResponse.vue.js";
|
|
10
11
|
import ExampleResponseTab from "./ExampleResponseTab.vue.js";
|
|
11
12
|
import ExampleResponseTabList from "./ExampleResponseTabList.vue.js";
|
|
@@ -79,6 +80,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
80
|
selectedResponseIndex.value = index;
|
|
80
81
|
selectedExampleKey.value = "";
|
|
81
82
|
};
|
|
83
|
+
const schemaContent = computed(() => {
|
|
84
|
+
if (!currentResponseContent.value?.schema) {
|
|
85
|
+
return void 0;
|
|
86
|
+
}
|
|
87
|
+
return prettyPrintJson(
|
|
88
|
+
getResolvedRefDeep(currentResponseContent.value?.schema)
|
|
89
|
+
);
|
|
90
|
+
});
|
|
82
91
|
const showSchema = ref(false);
|
|
83
92
|
return (_ctx, _cache) => {
|
|
84
93
|
return statusCodesWithContent.value.length ? (openBlock(), createBlock(unref(ScalarCard), {
|
|
@@ -137,13 +146,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
137
146
|
}),
|
|
138
147
|
createVNode(unref(ScalarCardSection), { class: "grid flex-1" }, {
|
|
139
148
|
default: withCtx(() => [
|
|
140
|
-
|
|
149
|
+
schemaContent.value !== void 0 && showSchema.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
141
150
|
key: 0,
|
|
142
151
|
id: unref(id),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
lang: "json"
|
|
146
|
-
}, null, 8, ["id", "content"])) : (openBlock(), createBlock(ExampleResponse, {
|
|
152
|
+
schemaContent: schemaContent.value
|
|
153
|
+
}, null, 8, ["id", "schemaContent"])) : (openBlock(), createBlock(ExampleResponse, {
|
|
147
154
|
key: 1,
|
|
148
155
|
id: unref(id),
|
|
149
156
|
example: currentExample.value,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id: string;
|
|
3
|
+
schemaContent: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ExampleSchema.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleSchema.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleSchema.vue"],"names":[],"mappings":"AAoCA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;AA4EF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, unref } from "vue";
|
|
2
|
+
import { ScalarCodeBlock, ScalarVirtualText } from "@scalar/components";
|
|
3
|
+
const VIRTUALIZATION_THRESHOLD = 2e4;
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "ExampleSchema",
|
|
6
|
+
props: {
|
|
7
|
+
id: {},
|
|
8
|
+
schemaContent: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const shouldVirtualizeSchema = computed(() => {
|
|
12
|
+
return __props.schemaContent.length > VIRTUALIZATION_THRESHOLD;
|
|
13
|
+
});
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
return !shouldVirtualizeSchema.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
|
|
16
|
+
key: 0,
|
|
17
|
+
id: __props.id,
|
|
18
|
+
class: "bg-b-2",
|
|
19
|
+
lang: "json",
|
|
20
|
+
prettyPrintedContent: __props.schemaContent
|
|
21
|
+
}, null, 8, ["id", "prettyPrintedContent"])) : (openBlock(), createBlock(unref(ScalarVirtualText), {
|
|
22
|
+
key: 1,
|
|
23
|
+
id: __props.id,
|
|
24
|
+
containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
|
|
25
|
+
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
26
|
+
lineHeight: 20,
|
|
27
|
+
text: __props.schemaContent
|
|
28
|
+
}, null, 8, ["id", "text"]));
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
_sfc_main as default
|
|
34
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-bus.d.ts","sourceRoot":"","sources":["../../src/helpers/lazy-bus.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/helpers/lazy-bus.js
CHANGED
|
@@ -6,6 +6,7 @@ const priorityQueue = reactive(/* @__PURE__ */ new Set());
|
|
|
6
6
|
const pendingQueue = reactive(/* @__PURE__ */ new Set());
|
|
7
7
|
const readyQueue = reactive(/* @__PURE__ */ new Set());
|
|
8
8
|
const isRunning = ref(false);
|
|
9
|
+
const SCROLL_RETRY_MS = 3e3;
|
|
9
10
|
const firstLazyLoadComplete = ref(false);
|
|
10
11
|
const intersectionBlockers = reactive(/* @__PURE__ */ new Set());
|
|
11
12
|
const onRenderComplete = /* @__PURE__ */ new Set();
|
|
@@ -105,7 +106,7 @@ const scrollToLazy = (id, setExpanded, getEntryById) => {
|
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
tryScroll(id, Date.now() +
|
|
109
|
+
tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze);
|
|
109
110
|
setExpanded(rawId, true);
|
|
110
111
|
const addParents = (currentId) => {
|
|
111
112
|
const parent = getEntryById(currentId)?.parent;
|