@scalar/api-reference 1.39.3 → 1.40.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 +34 -0
- 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/browser/standalone.js +17250 -16963
- 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 +10 -2
- 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/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/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/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/ApiReferenceToolbarTitle.vue.js +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/map-config-to-client-store.d.ts +2 -1
- 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 +354 -309
- package/package.json +20 -20
|
@@ -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":"AA6nCA,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;AA+sCF,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-8817c068"]]);
|
|
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";
|
|
@@ -460,6 +461,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
460
461
|
useIntersection(documentStartRef, () => {
|
|
461
462
|
eventBus.emit("intersecting:nav-item", { id: activeSlug.value });
|
|
462
463
|
});
|
|
464
|
+
const colorMode = computed(() => {
|
|
465
|
+
const mode = workspaceStore.workspace["x-scalar-color-mode"];
|
|
466
|
+
if (mode === "system") {
|
|
467
|
+
return getSystemModePreference();
|
|
468
|
+
}
|
|
469
|
+
return mode;
|
|
470
|
+
});
|
|
463
471
|
return (_ctx, _cache) => {
|
|
464
472
|
return openBlock(), createElementBlock("div", {
|
|
465
473
|
ref_key: "root",
|
|
@@ -541,7 +549,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
541
549
|
toggle: withCtx(() => [
|
|
542
550
|
!mergedConfig.value.hideDarkModeToggle ? (openBlock(), createBlock(unref(ScalarColorModeToggleButton), {
|
|
543
551
|
key: 0,
|
|
544
|
-
modelValue:
|
|
552
|
+
modelValue: colorMode.value === "dark",
|
|
545
553
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = () => unref(toggleColorMode)())
|
|
546
554
|
}, null, 8, ["modelValue"])) : (openBlock(), createElementBlock("span", _hoisted_2))
|
|
547
555
|
]),
|
|
@@ -607,7 +615,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
607
615
|
!mergedConfig.value.hideDarkModeToggle ? (openBlock(), createBlock(unref(ScalarColorModeToggleIcon), {
|
|
608
616
|
key: 0,
|
|
609
617
|
class: "text-c-2 hover:text-c-1",
|
|
610
|
-
mode:
|
|
618
|
+
mode: colorMode.value,
|
|
611
619
|
style: { "transform": "scale(1.4)" },
|
|
612
620
|
variant: "icon",
|
|
613
621
|
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 +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,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":"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"]);
|
|
@@ -9,7 +9,7 @@ const _hoisted_1 = {
|
|
|
9
9
|
};
|
|
10
10
|
const _hoisted_2 = { class: "-m-2 flex flex-col gap-2 leading-relaxed" };
|
|
11
11
|
const _hoisted_3 = { class: "bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm" };
|
|
12
|
-
const CONFIG_SETTING = '
|
|
12
|
+
const CONFIG_SETTING = 'showDeveloperTools: "never"';
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
14
|
__name: "ApiReferenceToolbarTitle",
|
|
15
15
|
setup(__props) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the system color mode preference from the browser.
|
|
3
|
+
* Falls back to 'light' if running in a non-browser environment.
|
|
4
|
+
*
|
|
5
|
+
* @returns The system preference for dark or light mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSystemModePreference: () => "dark" | "light";
|
|
8
|
+
//# sourceMappingURL=color-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-mode.d.ts","sourceRoot":"","sources":["../../src/helpers/color-mode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAO,MAAM,GAAG,OAMnD,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const getSystemModePreference = () => {
|
|
2
|
+
if (typeof window === "undefined" || typeof window?.matchMedia !== "function") {
|
|
3
|
+
return "light";
|
|
4
|
+
}
|
|
5
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
getSystemModePreference
|
|
9
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
-
import type {
|
|
2
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
3
4
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
5
|
import type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-requirement';
|
|
5
6
|
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-config-to-client-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-client-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"map-config-to-client-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-client-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAA;AACjH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,KAAK,GAAG,EAA4C,MAAM,KAAK,CAAA;AAKxE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,cAAc,EACd,EAAE,EACF,IAAI,EACJ,oBAAoB,EACpB,WAAW,GACZ,EAAE;IACD,4CAA4C;IAC5C,EAAE,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC3B,oDAAoD;IACpD,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC7B,0CAA0C;IAC1C,MAAM,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IACtD,gCAAgC;IAChC,cAAc,EAAE,cAAc,CAAA;IAC9B,oBAAoB,EAAE,gBAAgB,CAAC,WAAW,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IACnE,mBAAmB;IACnB,WAAW,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAClD;;;;;;gBAuM+3K,CAAC;mBAA2C,CAAC;uBAA6C,CAAC;iBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA5rC,CAAC;;yBAAg6B,CAAC;;;;;;0BAR/sK;QAAE,MAAM,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;EAE7D;AAED,MAAM,MAAM,oBAAoB,GAAG,CACjC,iBAAiB,EAAE,yBAAyB,EAAE,GAAG,SAAS,EAC1D,gBAAgB,EAAE,yBAAyB,EAAE,GAAG,SAAS,KACtD,oBAAoB,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiReferenceConfigurationRaw } from '@scalar/types';
|
|
1
|
+
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
2
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
3
|
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
4
4
|
export declare const mapConfigToWorkspaceStore: ({ config, store, isDarkMode, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-config-to-workspace-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-workspace-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"map-config-to-workspace-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-workspace-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAGpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAA2C,MAAM,KAAK,CAAA;AAE9F,eAAO,MAAM,yBAAyB,GAAI,gCAIvC;IACD,MAAM,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IACtD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACzB,SA4CA,CAAA"}
|
|
@@ -29,11 +29,11 @@ const mapConfigToWorkspaceStore = ({
|
|
|
29
29
|
);
|
|
30
30
|
watch(
|
|
31
31
|
() => toValue(config).darkMode,
|
|
32
|
-
(isDark) => store.update("x-scalar-
|
|
32
|
+
(isDark) => store.update("x-scalar-color-mode", isDark ? "dark" : "light")
|
|
33
33
|
);
|
|
34
34
|
watch(
|
|
35
35
|
() => isDarkMode.value,
|
|
36
|
-
(
|
|
36
|
+
(newIsDark) => store.update("x-scalar-color-mode", newIsDark ? "dark" : "light"),
|
|
37
37
|
{ immediate: true }
|
|
38
38
|
);
|
|
39
39
|
if (toValue(config).metaData) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
2
|
/**
|
|
3
3
|
* Maps a partial ApiReferenceConfigurationWithMultipleSources object to a DocumentConfiguration
|
|
4
4
|
* for use in the API Reference. This function transforms configuration options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../src/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../src/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1E,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnyApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithSource } from '@scalar/types';
|
|
1
|
+
import { type AnyApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithSource } from '@scalar/types/api-reference';
|
|
2
2
|
import GithubSlugger from 'github-slugger';
|
|
3
3
|
/** Processed API Reference Configuration
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-configurations.d.ts","sourceRoot":"","sources":["../../src/helpers/normalize-configurations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EAGzC,MAAM,
|
|
1
|
+
{"version":3,"file":"normalize-configurations.d.ts","sourceRoot":"","sources":["../../src/helpers/normalize-configurations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EAGzC,MAAM,6BAA6B,CAAA;AACpC,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,4BAA4B,CAAA;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,GAAG,CAAC,EAAE,KAAK,CAAA;KAAE,CAAA;CAC7F,CAAA;AAED,KAAK,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;AAEvE,KAAK,wBAAwB,GAAG,IAAI,CAAC,mCAAmC,EAAE,KAAK,GAAG,SAAS,CAAC,GAC1F,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,wBAmDF,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACnF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAc5B,CAAA;AAED,4EAA4E;AAC5E,eAAO,MAAM,eAAe,GAC1B,QAAQ,wBAAwB,EAChC,yBAAS,EACT,SAAS,aAAa,KACrB,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAyB1D,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseJsonOrYaml } from "@scalar/oas-utils/helpers";
|
|
2
|
-
import { isConfigurationWithSources, apiReferenceConfigurationWithSourceSchema } from "@scalar/types";
|
|
2
|
+
import { isConfigurationWithSources, apiReferenceConfigurationWithSourceSchema } from "@scalar/types/api-reference";
|
|
3
3
|
import GitHubSlugger from "github-slugger";
|
|
4
4
|
const normalizeConfigurations = (configuration) => {
|
|
5
5
|
const slugger = new GitHubSlugger();
|
|
@@ -4,7 +4,7 @@ import { onCustomEvent } from "@scalar/workspace-store/events";
|
|
|
4
4
|
const useWorkspaceStoreEvents = (store, root) => {
|
|
5
5
|
const mutators = generateClientMutators(store);
|
|
6
6
|
onCustomEvent(root, "scalar-update-dark-mode", (event) => {
|
|
7
|
-
store.update("x-scalar-
|
|
7
|
+
store.update("x-scalar-color-mode", event.detail.value ? "dark" : "light");
|
|
8
8
|
});
|
|
9
9
|
onCustomEvent(root, "scalar-update-active-document", (event) => {
|
|
10
10
|
store.update("x-scalar-active-document", event.detail.value);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */
|
|
2
|
+
import type { AnyApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
3
|
export type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
4
|
export { default as ApiReference } from './components/ApiReference.vue.js';
|
|
4
5
|
export { default as GettingStarted } from './components/GettingStarted.vue.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mCAAmC,EACnC,kBAAkB,EACnB,MAAM,6BAA6B,CAAA;AASpC;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,QAAQ,GAAG,mCAAmC,CA+GrG;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,mCAAmC,QAiBnG;AAID,eAAO,MAAM,eAAe,GAAI,KAAK,QAAQ,EAAE,UAAU,OAAO,GAAG,IAAI,mBAatE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAwHhC,CAAA"}
|