@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
|
@@ -17,27 +17,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
emits: ["update:url"],
|
|
18
18
|
setup(__props) {
|
|
19
19
|
const { toast } = useToasts();
|
|
20
|
-
const
|
|
20
|
+
const loader = useLoadingState();
|
|
21
21
|
const tempDocUrl = useModel(__props, "url");
|
|
22
22
|
async function generateTemporaryLink() {
|
|
23
|
-
if (
|
|
23
|
+
if (loader.isLoading || !__props.workspace || !!tempDocUrl.value) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
loader.start();
|
|
27
27
|
const document = __props.workspace.exportActiveDocument("json");
|
|
28
28
|
if (!document) {
|
|
29
29
|
toast("Unable to export active document", "error");
|
|
30
|
-
|
|
30
|
+
await loader.invalidate();
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
try {
|
|
34
34
|
tempDocUrl.value = await uploadTempDocument(document);
|
|
35
|
-
copyToClipboard(tempDocUrl.value);
|
|
36
|
-
|
|
35
|
+
await copyToClipboard(tempDocUrl.value);
|
|
36
|
+
await loader.validate();
|
|
37
37
|
} catch (error) {
|
|
38
38
|
const message = error instanceof Error ? error.message : "An unknown error occurred";
|
|
39
39
|
toast(message, "error");
|
|
40
|
-
|
|
40
|
+
await loader.invalidate();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
const { copyToClipboard } = useClipboard();
|
|
@@ -66,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
66
|
createVNode(unref(ScalarButton), {
|
|
67
67
|
class: "h-auto p-2.5",
|
|
68
68
|
disabled: !!tempDocUrl.value,
|
|
69
|
-
|
|
69
|
+
loader: unref(loader),
|
|
70
70
|
variant: "outlined",
|
|
71
71
|
onClick: generateTemporaryLink
|
|
72
72
|
}, {
|
|
@@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
createTextVNode(" Generate ", -1)
|
|
75
75
|
])]),
|
|
76
76
|
_: 1
|
|
77
|
-
}, 8, ["disabled", "
|
|
77
|
+
}, 8, ["disabled", "loader"]),
|
|
78
78
|
createVNode(ApiReferenceToolbarBlurb, { class: "-mt-1" }, {
|
|
79
79
|
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
80
80
|
createTextVNode(" Shared documents will automatically be deleted after 7 days. ", -1)
|
|
@@ -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) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XBadges.vue.d.ts","sourceRoot":"","sources":["../../../src/features/x-badges/XBadges.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"XBadges.vue.d.ts","sourceRoot":"","sources":["../../../src/features/x-badges/XBadges.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sDAAsD,CAAA;AAKlF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;CAC3B,CAAC;;AA2DF,wBAMG"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,KAAK,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
import type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/
|
|
5
|
-
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
5
|
+
import type { SecurityRequirementObject, SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
6
|
import { type MaybeRefOrGetter } from '@vueuse/core';
|
|
7
7
|
import { type Ref } from 'vue';
|
|
8
8
|
/**
|
|
@@ -55,7 +55,7 @@ export declare function mapConfigToClientStore({ config, workspaceStore, el, roo
|
|
|
55
55
|
};
|
|
56
56
|
hotKeyConfig?: {
|
|
57
57
|
modifiers: ("default" | "Meta" | "Control" | "Shift" | "Alt")[];
|
|
58
|
-
hotKeys?: Partial<Record<"" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "
|
|
58
|
+
hotKeys?: Partial<Record<"" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "." | "2" | "-" | "," | "/" | "1" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "`" | "[" | "\\" | "]" | "4" | "3" | "5" | "6" | "7" | "8" | "9", {
|
|
59
59
|
event: "addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar";
|
|
60
60
|
modifiers?: ("default" | "Meta" | "Control" | "Shift" | "Alt")[] | undefined;
|
|
61
61
|
}>> | undefined;
|
|
@@ -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,EACV,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AACrE,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;;;;;;gBAuMg9K,CAAC;mBAA2C,CAAC;uBAA6C,CAAC;iBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA5rC,CAAC;;yBAAg6B,CAAC;;;;;;0BARhyK;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"}
|