@scalar/api-reference 1.39.3 → 1.40.1
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 +66 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +10 -8
- package/dist/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/index.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +2 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.d.ts +1 -1
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/blocks/scalar-info-block/index.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/index.d.ts.map +1 -1
- package/dist/browser/standalone.js +18855 -18540
- 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 +15 -3
- package/dist/components/Content/Content.vue.d.ts +2 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Model.vue.d.ts +1 -1
- package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +8 -4
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +7 -5
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +17 -7
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +1 -2
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +1 -2
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +1 -2
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +8 -4
- package/dist/features/specification-extension/index.d.ts +1 -1
- package/dist/features/specification-extension/index.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +1 -1
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +4 -4
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +29 -8
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +9 -9
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +9 -9
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +1 -1
- package/dist/features/x-badges/XBadges.vue.d.ts +1 -1
- package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -1
- package/dist/helpers/color-mode.d.ts +8 -0
- package/dist/helpers/color-mode.d.ts.map +1 -0
- package/dist/helpers/color-mode.js +9 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/map-config-to-client-store.d.ts +4 -4
- package/dist/helpers/map-config-to-client-store.d.ts.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.d.ts +1 -1
- package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js +2 -2
- package/dist/helpers/map-configuration.d.ts +1 -1
- package/dist/helpers/map-configuration.d.ts.map +1 -1
- package/dist/helpers/normalize-configurations.d.ts +1 -1
- package/dist/helpers/normalize-configurations.d.ts.map +1 -1
- package/dist/helpers/normalize-configurations.js +1 -1
- package/dist/hooks/use-workspace-store-events.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/style.css +1474 -1263
- package/package.json +24 -24
|
@@ -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":"AAqoCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAqDpC,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;AAutCF,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-bab13fc8"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -22,6 +22,7 @@ import _sfc_main$1 from "./MobileHeader.vue.js";
|
|
|
22
22
|
import _sfc_main$2 from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
23
23
|
import _sfc_main$3 from "../features/Search/components/SearchButton.vue.js";
|
|
24
24
|
import _sfc_main$5 from "../features/toolbar/ApiReferenceToolbar.vue.js";
|
|
25
|
+
import { getSystemModePreference } from "../helpers/color-mode.js";
|
|
25
26
|
import { downloadDocument } from "../helpers/download.js";
|
|
26
27
|
import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
|
|
27
28
|
import { intersectionEnabled, scrollToLazy } from "../helpers/lazy-bus.js";
|
|
@@ -258,6 +259,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
258
259
|
...normalized.config,
|
|
259
260
|
...configurationOverrides.value
|
|
260
261
|
};
|
|
262
|
+
const onDocumentSelectPromise = config.onDocumentSelect?.();
|
|
261
263
|
syncSlugAndUrlWithDocument(slug, elementId, config);
|
|
262
264
|
const isFirstLoad = !workspaceStore.workspace.documents[slug];
|
|
263
265
|
if (isFirstLoad) {
|
|
@@ -274,8 +276,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
274
276
|
config: mapConfiguration(config)
|
|
275
277
|
}
|
|
276
278
|
);
|
|
277
|
-
config.onLoaded?.(slug);
|
|
278
279
|
}
|
|
280
|
+
void (async () => {
|
|
281
|
+
await onDocumentSelectPromise;
|
|
282
|
+
void config.onLoaded?.(slug);
|
|
283
|
+
})();
|
|
279
284
|
if (elementId && elementId !== slug) {
|
|
280
285
|
scrollToLazyElement(elementId);
|
|
281
286
|
} else {
|
|
@@ -460,6 +465,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
460
465
|
useIntersection(documentStartRef, () => {
|
|
461
466
|
eventBus.emit("intersecting:nav-item", { id: activeSlug.value });
|
|
462
467
|
});
|
|
468
|
+
const colorMode = computed(() => {
|
|
469
|
+
const mode = workspaceStore.workspace["x-scalar-color-mode"];
|
|
470
|
+
if (mode === "system") {
|
|
471
|
+
return getSystemModePreference();
|
|
472
|
+
}
|
|
473
|
+
return mode;
|
|
474
|
+
});
|
|
463
475
|
return (_ctx, _cache) => {
|
|
464
476
|
return openBlock(), createElementBlock("div", {
|
|
465
477
|
ref_key: "root",
|
|
@@ -541,7 +553,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
541
553
|
toggle: withCtx(() => [
|
|
542
554
|
!mergedConfig.value.hideDarkModeToggle ? (openBlock(), createBlock(unref(ScalarColorModeToggleButton), {
|
|
543
555
|
key: 0,
|
|
544
|
-
modelValue:
|
|
556
|
+
modelValue: colorMode.value === "dark",
|
|
545
557
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = () => unref(toggleColorMode)())
|
|
546
558
|
}, null, 8, ["modelValue"])) : (openBlock(), createElementBlock("span", _hoisted_2))
|
|
547
559
|
]),
|
|
@@ -607,7 +619,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
607
619
|
!mergedConfig.value.hideDarkModeToggle ? (openBlock(), createBlock(unref(ScalarColorModeToggleIcon), {
|
|
608
620
|
key: 0,
|
|
609
621
|
class: "text-c-2 hover:text-c-1",
|
|
610
|
-
mode:
|
|
622
|
+
mode: colorMode.value,
|
|
611
623
|
style: { "transform": "scale(1.4)" },
|
|
612
624
|
variant: "icon",
|
|
613
625
|
onClick: _cache[4] || (_cache[4] = () => unref(toggleColorMode)())
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Server } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import type { ApiReferenceConfiguration
|
|
2
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
|
+
import type { Heading } from '@scalar/types/legacy';
|
|
3
4
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
5
|
import type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation';
|
|
5
6
|
import type { Workspace, WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAsLA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AACtG,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,2CAA2C,CAAA;AAclD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAEhF,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,oBAAoB,EAAE,SAAS,CAAC,yBAAyB,CAAC,CAAA;IAC1D,kBAAkB,EAAE,oBAAoB,CAAA;IACxC,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,OAAO,EAAE;QACP,aAAa,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAA;QACzD,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAA;QAC5B,WAAW,EAAE,OAAO,CAAA;QACpB,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACrC,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAA;QAC1C,kBAAkB,CAAC,EAAE,OAAO,CAAA;QAC5B,sBAAsB,EAAE,OAAO,GAAG,SAAS,CAAA;QAC3C,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;QACzD,oBAAoB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;QACvE,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;KACnD,CAAA;CACF,CAAC;AAkSF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAgC5C,QAAA,MAAM,eAAe,kSAMnB,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/
|
|
2
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Model.vue"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Model.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Model.vue"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAQhG,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;QAC5B,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAoFF,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaEnumPropertyItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaEnumPropertyItem.vue"],"names":[],"mappings":"AAmGA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;;
|
|
1
|
+
{"version":3,"file":"SchemaEnumPropertyItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaEnumPropertyItem.vue"],"names":[],"mappings":"AAmGA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;;AAsFF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaEnumPropertyItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaEnumPropertyItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaEnumPropertyItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-88bc950e"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaEnumPropertyItem as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode,
|
|
2
|
-
import { ScalarMarkdown } from "@scalar/components";
|
|
3
|
-
import { addWordBreaks } from "@scalar/helpers/string/add-word-breaks";
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, unref } from "vue";
|
|
2
|
+
import { ScalarWrappingText, ScalarMarkdown } from "@scalar/components";
|
|
4
3
|
const _hoisted_1 = { class: "property-enum-value" };
|
|
5
4
|
const _hoisted_2 = { class: "property-enum-value-content" };
|
|
6
5
|
const _hoisted_3 = { class: "property-enum-value-label" };
|
|
@@ -18,7 +17,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
17
|
return (_ctx, _cache) => {
|
|
19
18
|
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
20
19
|
createElementVNode("div", _hoisted_2, [
|
|
21
|
-
createElementVNode("span", _hoisted_3,
|
|
20
|
+
createElementVNode("span", _hoisted_3, [
|
|
21
|
+
createVNode(unref(ScalarWrappingText), {
|
|
22
|
+
text: _ctx.label,
|
|
23
|
+
preset: "property"
|
|
24
|
+
}, null, 8, ["text"])
|
|
25
|
+
]),
|
|
22
26
|
_ctx.description ? (openBlock(), createElementBlock("span", _hoisted_4, [
|
|
23
27
|
createVNode(unref(ScalarMarkdown), { value: _ctx.description }, null, 8, ["value"])
|
|
24
28
|
])) : createCommentVNode("", true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaHeading.vue"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAMhG,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;AAmGF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaHeading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaHeading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaHeading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70cb5c13"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaHeading as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, unref, Fragment, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, createBlock, unref, Fragment, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { ScalarWrappingText } from "@scalar/components";
|
|
3
3
|
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
4
4
|
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
5
5
|
const _hoisted_1 = {
|
|
@@ -45,9 +45,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
createTextVNode(" enum ")
|
|
46
46
|
], 64)) : createCommentVNode("", true)
|
|
47
47
|
], 8, _hoisted_2),
|
|
48
|
-
_ctx.name ? (openBlock(),
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
_ctx.name ? (openBlock(), createBlock(unref(ScalarWrappingText), {
|
|
49
|
+
key: 0,
|
|
50
|
+
text: _ctx.name,
|
|
51
|
+
preset: "property"
|
|
52
|
+
}, null, 8, ["text"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
51
53
|
createTextVNode(toDisplayString(failsafeType.value), 1)
|
|
52
54
|
], 64))
|
|
53
55
|
])) : createCommentVNode("", true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA4jBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAUtE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;cAVW,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAGA,OAAO;;AAkmB5B,0BAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a12694ef"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaProperty as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createCommentVNode, createElementBlock, createVNode, createSlots, unref, toDisplayString, Fragment,
|
|
2
|
-
import { ScalarMarkdown } from "@scalar/components";
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createCommentVNode, createElementBlock, createVNode, createSlots, unref, createTextVNode, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
+
import { ScalarWrappingText, ScalarMarkdown } from "@scalar/components";
|
|
3
3
|
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
4
|
-
import { addWordBreaks } from "@scalar/helpers/string/add-word-breaks";
|
|
5
4
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
5
|
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
7
6
|
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
@@ -58,7 +57,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
57
|
},
|
|
59
58
|
setup(__props) {
|
|
60
59
|
const props = __props;
|
|
61
|
-
const formatLabel = (s) => addWordBreaks(s, { preset: "property" });
|
|
62
60
|
const childBreadcrumb = computed(
|
|
63
61
|
() => props.breadcrumb && props.name ? [...props.breadcrumb, props.name] : void 0
|
|
64
62
|
);
|
|
@@ -188,9 +186,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
186
|
eventBus: _ctx.eventBus
|
|
189
187
|
}, {
|
|
190
188
|
default: withCtx(() => [
|
|
191
|
-
_ctx.variant === "patternProperties" ? (openBlock(), createElementBlock("span", _hoisted_1,
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
_ctx.variant === "patternProperties" ? (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
190
|
+
createVNode(unref(ScalarWrappingText), {
|
|
191
|
+
text: _ctx.name,
|
|
192
|
+
preset: "property"
|
|
193
|
+
}, null, 8, ["text"])
|
|
194
|
+
])) : _ctx.variant === "additionalProperties" ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
195
|
+
createVNode(unref(ScalarWrappingText), {
|
|
196
|
+
text: _ctx.name,
|
|
197
|
+
preset: "property"
|
|
198
|
+
}, null, 8, ["text"])
|
|
199
|
+
])) : (openBlock(), createBlock(unref(ScalarWrappingText), {
|
|
200
|
+
key: 2,
|
|
201
|
+
text: _ctx.name,
|
|
202
|
+
preset: "property"
|
|
203
|
+
}, null, 8, ["text"]))
|
|
194
204
|
]),
|
|
195
205
|
_: 1
|
|
196
206
|
}, 8, ["breadcrumb", "eventBus"])
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
-
import type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference';
|
|
1
|
+
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
2
|
/**
|
|
4
3
|
* Gets the "name" of the schema from the ref path
|
|
5
4
|
* TODO: this will change so fix it when the new refs are out
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ref-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"get-ref-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAE/G;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,aAAa,CAAC,YAAY,CAAC,8BAiB7D,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
-
import type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference';
|
|
1
|
+
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
2
|
/**
|
|
4
3
|
* Computes the human-readable type for a schema.
|
|
5
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAoC/G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GAAI,YAAY,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,KAAG,MA0DtF,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
-
import type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference';
|
|
1
|
+
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
2
|
/**
|
|
4
3
|
* Extract schema name from various schema formats
|
|
5
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAK/G;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,aAAa,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,KAAG,MAAM,GAAG,IAyBzG,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,MAAM,KAAG,MACrD,CAAA;AAEvD;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,YAAY,EAAE,wBAAsB,KAAG,MAAM,GAAG,IA+CnF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
2
|
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
3
|
/** Extract the type of properties */
|
|
4
4
|
type Properties = NonNullable<Extract<SchemaObject, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-property-names.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/sort-property-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sort-property-names.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/sort-property-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIrH,qCAAqC;AACrC,KAAK,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;AAEtF,KAAK,OAAO,GAAG,OAAO,CACpB,IAAI,CAAC,yBAAyB,EAAE,yBAAyB,GAAG,8BAA8B,CAAC,GAAG;IAC5F,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,EAAE,EAAE,YAAY,UAAU,KAAG,UAOxD,CAAA;AAEtB,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,EACpB,gBAAgB,mBAAmB,EACnC,0FAKG,OAAY,KACd,MAAM,EAuDR,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAmTA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE;QACP,gBAAgB,CAAC,EAAE,OAAO,CAAA;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAiWF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-57b2f2e5"]]);
|
|
5
5
|
export {
|
|
6
6
|
ParameterListItem as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, createElementBlock, openBlock, createVNode, unref, withCtx, createBlock, createCommentVNode, normalizeClass, createElementVNode
|
|
1
|
+
import { defineComponent, computed, ref, createElementBlock, openBlock, createVNode, unref, withCtx, createBlock, createCommentVNode, normalizeClass, createElementVNode } from "vue";
|
|
2
2
|
import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
|
|
3
|
-
import { ScalarMarkdownSummary, ScalarMarkdown } from "@scalar/components";
|
|
3
|
+
import { ScalarWrappingText, ScalarMarkdownSummary, ScalarMarkdown } from "@scalar/components";
|
|
4
4
|
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
5
|
-
import { addWordBreaks } from "@scalar/helpers/string/add-word-breaks";
|
|
6
5
|
import { ScalarIconCaretRight } from "@scalar/icons";
|
|
7
6
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
8
7
|
import SchemaProperty from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
@@ -72,7 +71,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
71
|
class: normalizeClass(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": open }]),
|
|
73
72
|
weight: "bold"
|
|
74
73
|
}, null, 8, ["class"]),
|
|
75
|
-
createElementVNode("div", null,
|
|
74
|
+
createElementVNode("div", null, [
|
|
75
|
+
createVNode(unref(ScalarWrappingText), {
|
|
76
|
+
text: _ctx.name,
|
|
77
|
+
preset: "property"
|
|
78
|
+
}, null, 8, ["text"])
|
|
79
|
+
])
|
|
76
80
|
]),
|
|
77
81
|
!open && _ctx.parameter.description ? (openBlock(), createBlock(unref(ScalarMarkdownSummary), {
|
|
78
82
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/specification-extension/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/specification-extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbar.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbar.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbar.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbar.vue"],"names":[],"mappings":"AAyDA,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;AAyBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;;;;;;AAoGF,wBAOG"}
|
|
@@ -23,11 +23,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
emits: ["update:overrides"],
|
|
24
24
|
setup(__props) {
|
|
25
25
|
const overrides = useModel(__props, "overrides");
|
|
26
|
-
const
|
|
27
|
-
if (__props.configuration?.
|
|
26
|
+
const showDeveloperTools = computed(() => {
|
|
27
|
+
if (__props.configuration?.showDeveloperTools === "always") {
|
|
28
28
|
return true;
|
|
29
29
|
}
|
|
30
|
-
if (__props.configuration?.
|
|
30
|
+
if (__props.configuration?.showDeveloperTools === "never") {
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
33
|
if (typeof window === "undefined") {
|
|
@@ -36,7 +36,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
return isLocalUrl(window.location.href);
|
|
37
37
|
});
|
|
38
38
|
return (_ctx, _cache) => {
|
|
39
|
-
return
|
|
39
|
+
return showDeveloperTools.value ? (openBlock(), createElementBlock("header", _hoisted_1, [
|
|
40
40
|
createElementVNode("div", _hoisted_2, [
|
|
41
41
|
createElementVNode("div", _hoisted_3, [
|
|
42
42
|
createVNode(_sfc_main$1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfig.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfig.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfig.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfig.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAQ5E,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA2BF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;;;;;;AA4JF,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA8BF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;;;;;;AA8MF,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigTheme.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigTheme.vue"],"names":[],"mappings":"AA2EA,OAAO,EAAkC,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAmC7E,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;;;;;AAmIF,wBAOG"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { defineComponent, useModel, computed, createBlock, openBlock, unref, withCtx, createVNode,
|
|
2
|
-
import { ScalarCombobox,
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, useModel, computed, createBlock, openBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, normalizeClass } from "vue";
|
|
2
|
+
import { ScalarCombobox, ScalarListboxCheckbox, ScalarThemeSwatches, ScalarFormInput } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown } from "@scalar/icons";
|
|
4
|
+
import { themeIds, presets, themeLabels } from "@scalar/themes";
|
|
5
|
+
const _hoisted_1 = { class: "min-w-0 flex-1 truncate text-left" };
|
|
6
|
+
const _hoisted_2 = { class: "text-c-1 inline-block min-w-0 flex-1 truncate" };
|
|
4
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
8
|
__name: "ApiReferenceToolbarConfigTheme",
|
|
6
9
|
props: {
|
|
@@ -11,7 +14,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
14
|
setup(__props) {
|
|
12
15
|
const model = useModel(__props, "modelValue");
|
|
13
16
|
const options = computed(
|
|
14
|
-
() => themeIds.
|
|
17
|
+
() => themeIds.filter((id) => id !== "none").map((id) => ({
|
|
18
|
+
id,
|
|
19
|
+
label: themeLabels[id],
|
|
20
|
+
css: presets[id].theme
|
|
21
|
+
}))
|
|
15
22
|
);
|
|
16
23
|
const selected = computed({
|
|
17
24
|
get: () => {
|
|
@@ -28,12 +35,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
35
|
resize: ""
|
|
29
36
|
}, {
|
|
30
37
|
default: withCtx(({ open }) => [
|
|
31
|
-
createVNode(unref(
|
|
38
|
+
createVNode(unref(ScalarFormInput), null, {
|
|
32
39
|
default: withCtx(() => [
|
|
33
|
-
|
|
40
|
+
createElementVNode("div", _hoisted_1, toDisplayString(selected.value.label), 1),
|
|
41
|
+
createVNode(unref(ScalarThemeSwatches), {
|
|
42
|
+
class: "mr-2",
|
|
43
|
+
css: selected.value.css
|
|
44
|
+
}, null, 8, ["css"]),
|
|
45
|
+
createVNode(unref(ScalarIconCaretDown), {
|
|
46
|
+
class: normalizeClass(["size-3.5 transition-transform", { "rotate-180": open }])
|
|
47
|
+
}, null, 8, ["class"])
|
|
34
48
|
]),
|
|
35
|
-
_:
|
|
36
|
-
},
|
|
49
|
+
_: 2
|
|
50
|
+
}, 1024)
|
|
51
|
+
]),
|
|
52
|
+
option: withCtx(({ selected: selected2, option }) => [
|
|
53
|
+
createVNode(unref(ScalarListboxCheckbox), { selected: selected2 }, null, 8, ["selected"]),
|
|
54
|
+
createElementVNode("span", _hoisted_2, toDisplayString(option.label), 1),
|
|
55
|
+
createVNode(unref(ScalarThemeSwatches), {
|
|
56
|
+
css: option.css
|
|
57
|
+
}, null, 8, ["css"])
|
|
37
58
|
]),
|
|
38
59
|
_: 1
|
|
39
60
|
}, 8, ["modelValue", "options"]);
|
|
@@ -16,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
setup(__props) {
|
|
17
17
|
const tempDocUrl = useModel(__props, "url");
|
|
18
18
|
const { toast } = useToasts();
|
|
19
|
-
const
|
|
19
|
+
const loader = useLoadingState();
|
|
20
20
|
function openRegisterLink(docUrl) {
|
|
21
21
|
const url = new URL(DASHBOARD_REGISTER_URL);
|
|
22
22
|
url.searchParams.set("url", docUrl);
|
|
@@ -24,36 +24,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
window.open(url.toString(), "_blank");
|
|
25
25
|
}
|
|
26
26
|
async function generateRegisterLink() {
|
|
27
|
-
if (
|
|
27
|
+
if (loader.isLoading || !__props.workspace) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
if (tempDocUrl.value) {
|
|
31
31
|
openRegisterLink(tempDocUrl.value);
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
loader.start();
|
|
35
35
|
const document = __props.workspace.exportActiveDocument("json");
|
|
36
36
|
if (!document) {
|
|
37
37
|
toast("Unable to export active document", "error");
|
|
38
|
-
|
|
38
|
+
await loader.invalidate();
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
try {
|
|
42
42
|
tempDocUrl.value = await uploadTempDocument(document);
|
|
43
|
-
await
|
|
43
|
+
await loader.validate();
|
|
44
44
|
openRegisterLink(tempDocUrl.value);
|
|
45
45
|
await nextTick();
|
|
46
|
-
|
|
46
|
+
await loader.clear();
|
|
47
47
|
} catch (error) {
|
|
48
48
|
const message = error instanceof Error ? error.message : "An unknown error occurred";
|
|
49
49
|
toast(message, "error");
|
|
50
|
-
|
|
50
|
+
await loader.invalidate();
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
return (_ctx, _cache) => {
|
|
54
54
|
return openBlock(), createBlock(unref(ScalarButton), {
|
|
55
55
|
class: "h-auto p-2.5",
|
|
56
|
-
|
|
56
|
+
loader: unref(loader),
|
|
57
57
|
onClick: generateRegisterLink
|
|
58
58
|
}, {
|
|
59
59
|
default: withCtx(() => [
|
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
])
|
|
63
63
|
]),
|
|
64
64
|
_: 3
|
|
65
|
-
}, 8, ["
|
|
65
|
+
}, 8, ["loader"]);
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
});
|